@alfadocs/ui-kit-debug 1.73.2 → 1.74.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.
- package/dist/_chunks/alia-sidebar-CsTRAxC8.js +1323 -0
- package/dist/_chunks/alia-sidebar-CsTRAxC8.js.map +1 -0
- package/dist/_chunks/{anamnesis-summary-rows-BedVmSAB.js → anamnesis-summary-rows-vNDyE5HW.js} +2 -2
- package/dist/_chunks/{anamnesis-summary-rows-BedVmSAB.js.map → anamnesis-summary-rows-vNDyE5HW.js.map} +1 -1
- package/dist/_chunks/{antenatal-schedule-timeline-DW_qkGo1.js → antenatal-schedule-timeline-BGewPfEX.js} +18 -18
- package/dist/_chunks/{antenatal-schedule-timeline-DW_qkGo1.js.map → antenatal-schedule-timeline-BGewPfEX.js.map} +1 -1
- package/dist/_chunks/{appointment-timeline-CKwMXUid.js → appointment-timeline-1-Za2miy.js} +2 -2
- package/dist/_chunks/{appointment-timeline-CKwMXUid.js.map → appointment-timeline-1-Za2miy.js.map} +1 -1
- package/dist/_chunks/{ar-pLopgMbL.js → ar-C4YQVTH6.js} +2 -2
- package/dist/_chunks/{ar-pLopgMbL.js.map → ar-C4YQVTH6.js.map} +1 -1
- package/dist/_chunks/{auth-form-parts-DHv6LVV2.js → auth-form-parts-B3GWChvG.js} +2 -2
- package/dist/_chunks/{auth-form-parts-DHv6LVV2.js.map → auth-form-parts-B3GWChvG.js.map} +1 -1
- package/dist/_chunks/{balance-badge-cell-DG5JWB2p.js → balance-badge-cell-B49xgL6H.js} +2 -2
- package/dist/_chunks/{balance-badge-cell-DG5JWB2p.js.map → balance-badge-cell-B49xgL6H.js.map} +1 -1
- package/dist/_chunks/{booking-CTRoFbIS.js → booking-sq9sa29d.js} +9 -9
- package/dist/_chunks/booking-sq9sa29d.js.map +1 -0
- package/dist/_chunks/brand-mark-DLk9kD8g.js +63 -0
- package/dist/_chunks/brand-mark-DLk9kD8g.js.map +1 -0
- package/dist/_chunks/{calendar-appointment-editor-dialog-Lji2y0qJ.js → calendar-appointment-editor-dialog-CctI6mpd.js} +8 -8
- package/dist/_chunks/{calendar-appointment-editor-dialog-Lji2y0qJ.js.map → calendar-appointment-editor-dialog-CctI6mpd.js.map} +1 -1
- package/dist/_chunks/{cycle-calculator-Ycp3li61.js → cycle-calculator-HO3s5InI.js} +5 -5
- package/dist/_chunks/{cycle-calculator-Ycp3li61.js.map → cycle-calculator-HO3s5InI.js.map} +1 -1
- package/dist/_chunks/{date-picker-KcoNNsM0.js → date-picker-CdhXlgVI.js} +4 -4
- package/dist/_chunks/{date-picker-KcoNNsM0.js.map → date-picker-CdhXlgVI.js.map} +1 -1
- package/dist/_chunks/{date-picker-variants-DN37Oj5-.js → date-picker-variants-Dt6UbonG.js} +25 -25
- package/dist/_chunks/{date-picker-variants-DN37Oj5-.js.map → date-picker-variants-Dt6UbonG.js.map} +1 -1
- package/dist/_chunks/{date-range-picker-CjcjUJLW.js → date-range-picker-B_j4VQlV.js} +5 -5
- package/dist/_chunks/{date-range-picker-CjcjUJLW.js.map → date-range-picker-B_j4VQlV.js.map} +1 -1
- package/dist/_chunks/{date-time-picker-BVQNZ4yC.js → date-time-picker-n-yrlMJq.js} +3 -3
- package/dist/_chunks/{date-time-picker-BVQNZ4yC.js.map → date-time-picker-n-yrlMJq.js.map} +1 -1
- package/dist/_chunks/{de-lVkJRPnh.js → de-B1B3PIgY.js} +2 -2
- package/dist/_chunks/{de-lVkJRPnh.js.map → de-B1B3PIgY.js.map} +1 -1
- package/dist/_chunks/{due-date-calculator-B0gyOijA.js → due-date-calculator-CDWTSblh.js} +6 -6
- package/dist/_chunks/{due-date-calculator-B0gyOijA.js.map → due-date-calculator-CDWTSblh.js.map} +1 -1
- package/dist/_chunks/{el-CHzxNWPj.js → el-iLqGpapg.js} +16 -16
- package/dist/_chunks/{el-CHzxNWPj.js.map → el-iLqGpapg.js.map} +1 -1
- package/dist/_chunks/{en-GB-CwxYmmhU.js → en-GB-CxPRQbD6.js} +6 -6
- package/dist/_chunks/{en-GB-CwxYmmhU.js.map → en-GB-CxPRQbD6.js.map} +1 -1
- package/dist/_chunks/{es-Ck-oxbHW.js → es-Bg1oqwDs.js} +2 -2
- package/dist/_chunks/{es-Ck-oxbHW.js.map → es-Bg1oqwDs.js.map} +1 -1
- package/dist/_chunks/{forgot-password-form-D6kB72OD.js → forgot-password-form-BSOZVrZG.js} +3 -3
- package/dist/_chunks/{forgot-password-form-D6kB72OD.js.map → forgot-password-form-BSOZVrZG.js.map} +1 -1
- package/dist/_chunks/{format-D-1gTdHF.js → format--x5jypvH.js} +13 -13
- package/dist/_chunks/{format-D-1gTdHF.js.map → format--x5jypvH.js.map} +1 -1
- package/dist/_chunks/{fr-fWRnDcSD.js → fr-DpGxyOGI.js} +2 -2
- package/dist/_chunks/{fr-fWRnDcSD.js.map → fr-DpGxyOGI.js.map} +1 -1
- package/dist/_chunks/{gestational-age-calculator-Bu_a-K9z.js → gestational-age-calculator-CTHeJJdb.js} +7 -7
- package/dist/_chunks/{gestational-age-calculator-Bu_a-K9z.js.map → gestational-age-calculator-CTHeJJdb.js.map} +1 -1
- package/dist/_chunks/{hcg-doubling-BnopYgd-.js → hcg-doubling-BBk-a33g.js} +11 -11
- package/dist/_chunks/{hcg-doubling-BnopYgd-.js.map → hcg-doubling-BBk-a33g.js.map} +1 -1
- package/dist/_chunks/{hi-B5uX0h3V.js → hi-3Dtsksrw.js} +2 -2
- package/dist/_chunks/{hi-B5uX0h3V.js.map → hi-3Dtsksrw.js.map} +1 -1
- package/dist/_chunks/{isSameWeek-u81Z-J7h.js → isSameWeek-DyVftHWi.js} +2 -2
- package/dist/_chunks/{isSameWeek-u81Z-J7h.js.map → isSameWeek-DyVftHWi.js.map} +1 -1
- package/dist/_chunks/{it-DBoNIelY.js → it-Cp0CA13d.js} +3 -3
- package/dist/_chunks/{it-DBoNIelY.js.map → it-Cp0CA13d.js.map} +1 -1
- package/dist/_chunks/{ja-Du8gfg8p.js → ja-9FOyR1lb.js} +22 -22
- package/dist/_chunks/{ja-Du8gfg8p.js.map → ja-9FOyR1lb.js.map} +1 -1
- package/dist/_chunks/{kit-extensions-DgBi3tsK.js → kit-extensions-sNTZWkoo.js} +4 -4
- package/dist/_chunks/{kit-extensions-DgBi3tsK.js.map → kit-extensions-sNTZWkoo.js.map} +1 -1
- package/dist/_chunks/{link-cell-renderer-BDxxpfJM.js → link-cell-renderer-B0riA_h_.js} +2 -2
- package/dist/_chunks/{link-cell-renderer-BDxxpfJM.js.map → link-cell-renderer-B0riA_h_.js.map} +1 -1
- package/dist/_chunks/{login-dev-card-pnJbVaoQ.js → login-dev-card-DRxTPkE9.js} +3 -3
- package/dist/_chunks/{login-dev-card-pnJbVaoQ.js.map → login-dev-card-DRxTPkE9.js.map} +1 -1
- package/dist/_chunks/{nl-BCBwxYi8.js → nl-sfx-zJgR.js} +2 -2
- package/dist/_chunks/{nl-BCBwxYi8.js.map → nl-sfx-zJgR.js.map} +1 -1
- package/dist/_chunks/{notes-panel-C_QshXyI.js → notes-panel-CxjMovCh.js} +2 -2
- package/dist/_chunks/{notes-panel-C_QshXyI.js.map → notes-panel-CxjMovCh.js.map} +1 -1
- package/dist/_chunks/{parse-UB4FJGNA.js → parse-B0s7bY4d.js} +3 -3
- package/dist/_chunks/{parse-UB4FJGNA.js.map → parse-B0s7bY4d.js.map} +1 -1
- package/dist/_chunks/{parseISO-y3LncvfO.js → parseISO-DZZ5a-zK.js} +2 -2
- package/dist/_chunks/{parseISO-y3LncvfO.js.map → parseISO-DZZ5a-zK.js.map} +1 -1
- package/dist/_chunks/{patient-details-Cd_dCqkg.js → patient-details-Dgd_tocD.js} +2 -2
- package/dist/_chunks/{patient-details-Cd_dCqkg.js.map → patient-details-Dgd_tocD.js.map} +1 -1
- package/dist/_chunks/{patient-field-row-D6Ftm46u.js → patient-field-row-BFVlJnS9.js} +3 -3
- package/dist/_chunks/{patient-field-row-D6Ftm46u.js.map → patient-field-row-BFVlJnS9.js.map} +1 -1
- package/dist/_chunks/{patient-summary-card-BSOHR4Ol.js → patient-summary-card-BTKvFUmh.js} +2 -2
- package/dist/_chunks/{patient-summary-card-BSOHR4Ol.js.map → patient-summary-card-BTKvFUmh.js.map} +1 -1
- package/dist/_chunks/{phone-input-O9camxkq.js → phone-input-EwVuqFik.js} +74 -74
- package/dist/_chunks/phone-input-EwVuqFik.js.map +1 -0
- package/dist/_chunks/{pl-HwLM6gPs.js → pl-BLh7KO-s.js} +3 -3
- package/dist/_chunks/{pl-HwLM6gPs.js.map → pl-BLh7KO-s.js.map} +1 -1
- package/dist/_chunks/{pregnancy-dating-CvNFirHt.js → pregnancy-dating-JBAUbM40.js} +7 -7
- package/dist/_chunks/{pregnancy-dating-CvNFirHt.js.map → pregnancy-dating-JBAUbM40.js.map} +1 -1
- package/dist/_chunks/{pt-BxhT5ZQH.js → pt-CPKOrOLj.js} +2 -2
- package/dist/_chunks/{pt-BxhT5ZQH.js.map → pt-CPKOrOLj.js.map} +1 -1
- package/dist/_chunks/{radiograph-panel.agent-ESnkuDfH.js → radiograph-panel.agent-DQh2SX8G.js} +3 -3
- package/dist/_chunks/{radiograph-panel.agent-ESnkuDfH.js.map → radiograph-panel.agent-DQh2SX8G.js.map} +1 -1
- package/dist/_chunks/registration-form-B6qqeXP1.js +1310 -0
- package/dist/_chunks/registration-form-B6qqeXP1.js.map +1 -0
- package/dist/_chunks/{rich-text-editor-BXFgcvBW.js → rich-text-editor-BZTyxQBd.js} +1683 -1673
- package/dist/_chunks/rich-text-editor-BZTyxQBd.js.map +1 -0
- package/dist/_chunks/{ro-Do9W55ae.js → ro-Dc-oNqbF.js} +2 -2
- package/dist/_chunks/{ro-Do9W55ae.js.map → ro-Dc-oNqbF.js.map} +1 -1
- package/dist/_chunks/{ru-PDBX5gdf.js → ru-BtNpDZRR.js} +3 -3
- package/dist/_chunks/{ru-PDBX5gdf.js.map → ru-BtNpDZRR.js.map} +1 -1
- package/dist/_chunks/send-registration-link-form-pO2bGjGa.js +409 -0
- package/dist/_chunks/send-registration-link-form-pO2bGjGa.js.map +1 -0
- package/dist/_chunks/{slot-grid-uA9j7Nik.js → slot-grid-Bb13H9Rl.js} +3 -3
- package/dist/_chunks/{slot-grid-uA9j7Nik.js.map → slot-grid-Bb13H9Rl.js.map} +1 -1
- package/dist/_chunks/{sq-DnvsgyIh.js → sq-D4c7olaV.js} +2 -2
- package/dist/_chunks/{sq-DnvsgyIh.js.map → sq-D4c7olaV.js.map} +1 -1
- package/dist/_chunks/subDays-DKISP2nE.js +8 -0
- package/dist/_chunks/{subDays-xH7cpN6B.js.map → subDays-DKISP2nE.js.map} +1 -1
- package/dist/_chunks/{sv-CpFSK8xS.js → sv-Bf_dHPvh.js} +2 -2
- package/dist/_chunks/{sv-CpFSK8xS.js.map → sv-Bf_dHPvh.js.map} +1 -1
- package/dist/_chunks/{task-editor-BTeUFGUX.js → task-editor-CRhfwP9T.js} +2 -2
- package/dist/_chunks/{task-editor-BTeUFGUX.js.map → task-editor-CRhfwP9T.js.map} +1 -1
- package/dist/_chunks/{tr-DW4oQYHT.js → tr-xqQ6cbGY.js} +2 -2
- package/dist/_chunks/{tr-DW4oQYHT.js.map → tr-xqQ6cbGY.js.map} +1 -1
- package/dist/_chunks/{use-appointment-details-read-BWbOiLVw.js → use-appointment-details-read-BFslxbRr.js} +2 -2
- package/dist/_chunks/{use-appointment-details-read-BWbOiLVw.js.map → use-appointment-details-read-BFslxbRr.js.map} +1 -1
- package/dist/_chunks/use-field-match-C8ug3sdQ.js +30 -0
- package/dist/_chunks/use-field-match-C8ug3sdQ.js.map +1 -0
- package/dist/_chunks/use-registration-submit-CLGHxwoT.js +112 -0
- package/dist/_chunks/use-registration-submit-CLGHxwoT.js.map +1 -0
- package/dist/_chunks/{zh-CN-QGEs29fQ.js → zh-CN-C657DBCO.js} +3 -3
- package/dist/_chunks/{zh-CN-QGEs29fQ.js.map → zh-CN-C657DBCO.js.map} +1 -1
- package/dist/agent-catalog.json +87 -3
- package/dist/agent-i18n/en.json +9 -2
- package/dist/alia-asteroid-icon/index.js +52 -0
- package/dist/alia-asteroid-icon/index.js.map +1 -0
- package/dist/aws-transcribe/index.js +320 -0
- package/dist/aws-transcribe/index.js.map +1 -0
- package/dist/components/appointment-details-panel/index.js +1 -1
- package/dist/components/appointment-timeline/index.js +1 -1
- package/dist/components/booking/booking.d.ts.map +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/cycle-calculator/index.js +1 -1
- package/dist/components/data-table/index.js +1 -1
- package/dist/components/date-picker/index.js +1 -1
- package/dist/components/date-range-picker/index.js +1 -1
- package/dist/components/date-time-picker/index.js +1 -1
- package/dist/components/due-date-calculator/index.js +2 -2
- package/dist/components/gestational-age-calculator/index.js +1 -1
- package/dist/components/hcg-doubling/index.js +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/notes-panel/index.js +1 -1
- package/dist/components/patient-details/index.js +1 -1
- package/dist/components/patient-summary-card/index.js +1 -1
- package/dist/components/patient-table/index.js +1 -1
- package/dist/components/phone-input/index.js +1 -1
- package/dist/components/phone-input/phone-input.d.ts.map +1 -1
- package/dist/components/pregnancy-dating/index.js +1 -1
- package/dist/components/radiograph-panel/index.js +1 -1
- package/dist/components/rich-text-editor/help-me-write-overlay.d.ts.map +1 -1
- package/dist/components/rich-text-editor/index.js +2 -2
- package/dist/components/rich-text-editor/rich-text-editor.d.ts.map +1 -1
- package/dist/components/slot-grid/index.js +1 -1
- package/dist/components/task-editor/index.js +1 -1
- package/dist/hooks/index.js +1 -1
- package/dist/hooks/use-field-match.d.ts +2 -2
- package/dist/hooks/use-field-match.d.ts.map +1 -1
- package/dist/i18n/locales/ar.d.ts +36 -0
- package/dist/i18n/locales/ar.d.ts.map +1 -1
- package/dist/i18n/locales/ar.js +38 -2
- package/dist/i18n/locales/ar.js.map +1 -1
- package/dist/i18n/locales/de.d.ts +36 -0
- package/dist/i18n/locales/de.d.ts.map +1 -1
- package/dist/i18n/locales/de.js +38 -2
- package/dist/i18n/locales/de.js.map +1 -1
- package/dist/i18n/locales/el.d.ts +36 -0
- package/dist/i18n/locales/el.d.ts.map +1 -1
- package/dist/i18n/locales/el.js +38 -2
- package/dist/i18n/locales/el.js.map +1 -1
- package/dist/i18n/locales/en.d.ts +36 -0
- package/dist/i18n/locales/en.d.ts.map +1 -1
- package/dist/i18n/locales/en.js +38 -2
- package/dist/i18n/locales/en.js.map +1 -1
- package/dist/i18n/locales/es.d.ts +36 -0
- package/dist/i18n/locales/es.d.ts.map +1 -1
- package/dist/i18n/locales/es.js +38 -2
- package/dist/i18n/locales/es.js.map +1 -1
- package/dist/i18n/locales/fr.d.ts +36 -0
- package/dist/i18n/locales/fr.d.ts.map +1 -1
- package/dist/i18n/locales/fr.js +38 -2
- package/dist/i18n/locales/fr.js.map +1 -1
- package/dist/i18n/locales/hi.d.ts +36 -0
- package/dist/i18n/locales/hi.d.ts.map +1 -1
- package/dist/i18n/locales/hi.js +38 -2
- package/dist/i18n/locales/hi.js.map +1 -1
- package/dist/i18n/locales/it.d.ts +36 -0
- package/dist/i18n/locales/it.d.ts.map +1 -1
- package/dist/i18n/locales/it.js +38 -2
- package/dist/i18n/locales/it.js.map +1 -1
- package/dist/i18n/locales/ja.d.ts +36 -0
- package/dist/i18n/locales/ja.d.ts.map +1 -1
- package/dist/i18n/locales/ja.js +38 -2
- package/dist/i18n/locales/ja.js.map +1 -1
- package/dist/i18n/locales/nl.d.ts +36 -0
- package/dist/i18n/locales/nl.d.ts.map +1 -1
- package/dist/i18n/locales/nl.js +38 -2
- package/dist/i18n/locales/nl.js.map +1 -1
- package/dist/i18n/locales/pl.d.ts +36 -0
- package/dist/i18n/locales/pl.d.ts.map +1 -1
- package/dist/i18n/locales/pl.js +38 -2
- package/dist/i18n/locales/pl.js.map +1 -1
- package/dist/i18n/locales/pt.d.ts +36 -0
- package/dist/i18n/locales/pt.d.ts.map +1 -1
- package/dist/i18n/locales/pt.js +38 -2
- package/dist/i18n/locales/pt.js.map +1 -1
- package/dist/i18n/locales/ro.d.ts +36 -0
- package/dist/i18n/locales/ro.d.ts.map +1 -1
- package/dist/i18n/locales/ro.js +38 -2
- package/dist/i18n/locales/ro.js.map +1 -1
- package/dist/i18n/locales/ru.d.ts +36 -0
- package/dist/i18n/locales/ru.d.ts.map +1 -1
- package/dist/i18n/locales/ru.js +38 -2
- package/dist/i18n/locales/ru.js.map +1 -1
- package/dist/i18n/locales/sq.d.ts +36 -0
- package/dist/i18n/locales/sq.d.ts.map +1 -1
- package/dist/i18n/locales/sq.js +38 -2
- package/dist/i18n/locales/sq.js.map +1 -1
- package/dist/i18n/locales/sv.d.ts +36 -0
- package/dist/i18n/locales/sv.d.ts.map +1 -1
- package/dist/i18n/locales/sv.js +38 -2
- package/dist/i18n/locales/sv.js.map +1 -1
- package/dist/i18n/locales/tr.d.ts +36 -0
- package/dist/i18n/locales/tr.d.ts.map +1 -1
- package/dist/i18n/locales/tr.js +38 -2
- package/dist/i18n/locales/tr.js.map +1 -1
- package/dist/i18n/locales/zh.d.ts +36 -0
- package/dist/i18n/locales/zh.d.ts.map +1 -1
- package/dist/i18n/locales/zh.js +38 -2
- package/dist/i18n/locales/zh.js.map +1 -1
- package/dist/index.js +296 -292
- package/dist/index.js.map +1 -1
- package/dist/locales/ar.json +38 -2
- package/dist/locales/de.json +38 -2
- package/dist/locales/el.json +38 -2
- package/dist/locales/en.json +38 -2
- package/dist/locales/es.json +38 -2
- package/dist/locales/fr.json +38 -2
- package/dist/locales/hi.json +38 -2
- package/dist/locales/it.json +38 -2
- package/dist/locales/ja.json +38 -2
- package/dist/locales/nl.json +38 -2
- package/dist/locales/pl.json +38 -2
- package/dist/locales/pt.json +38 -2
- package/dist/locales/ro.json +38 -2
- package/dist/locales/ru.json +38 -2
- package/dist/locales/sq.json +38 -2
- package/dist/locales/sv.json +38 -2
- package/dist/locales/tr.json +38 -2
- package/dist/locales/zh.json +38 -2
- package/dist/patterns/alia-assistant/alia-chat-surface.d.ts.map +1 -1
- package/dist/patterns/alia-assistant/alia-types.d.ts +22 -0
- package/dist/patterns/alia-assistant/alia-types.d.ts.map +1 -1
- package/dist/patterns/alia-assistant/index.js +7 -6
- package/dist/patterns/alia-assistant/index.js.map +1 -1
- package/dist/patterns/anamnesis/index.js +1 -1
- package/dist/patterns/calendar/index.js +1 -1
- package/dist/patterns/forgot-password-form/index.js +1 -1
- package/dist/patterns/login-form/index.js +1 -1
- package/dist/patterns/registration-form/index.d.ts +1 -0
- package/dist/patterns/registration-form/index.d.ts.map +1 -1
- package/dist/patterns/registration-form/index.js +1 -1
- package/dist/patterns/registration-form/registration-form.d.ts +43 -0
- package/dist/patterns/registration-form/registration-form.d.ts.map +1 -1
- package/dist/patterns/registration-form/registration-verification.d.ts +38 -0
- package/dist/patterns/registration-form/registration-verification.d.ts.map +1 -0
- package/dist/patterns/registration-form/use-contact-verification.d.ts +107 -0
- package/dist/patterns/registration-form/use-contact-verification.d.ts.map +1 -0
- package/dist/patterns/registration-form/verification-requests.d.ts +9 -0
- package/dist/patterns/registration-form/verification-requests.d.ts.map +1 -0
- package/dist/patterns/send-registration-link-form/index.d.ts +3 -0
- package/dist/patterns/send-registration-link-form/index.d.ts.map +1 -0
- package/dist/patterns/send-registration-link-form/index.js +6 -0
- package/dist/patterns/send-registration-link-form/index.js.map +1 -0
- package/dist/patterns/send-registration-link-form/send-registration-link-form.d.ts +80 -0
- package/dist/patterns/send-registration-link-form/send-registration-link-form.d.ts.map +1 -0
- package/dist/speech/aws-transcribe.d.ts +65 -0
- package/dist/speech/aws-transcribe.d.ts.map +1 -0
- package/dist/speech/event-stream.d.ts +13 -0
- package/dist/speech/event-stream.d.ts.map +1 -0
- package/dist/tokens.css +1 -1
- package/package.json +13 -1
- package/dist/_chunks/alia-sidebar-DZoyUFW8.js +0 -1290
- package/dist/_chunks/alia-sidebar-DZoyUFW8.js.map +0 -1
- package/dist/_chunks/booking-CTRoFbIS.js.map +0 -1
- package/dist/_chunks/phone-input-O9camxkq.js.map +0 -1
- package/dist/_chunks/registration-form-BGSVMAga.js +0 -819
- package/dist/_chunks/registration-form-BGSVMAga.js.map +0 -1
- package/dist/_chunks/rich-text-editor-BXFgcvBW.js.map +0 -1
- package/dist/_chunks/subDays-xH7cpN6B.js +0 -8
- package/dist/_chunks/use-field-match-pdbEnKvO.js +0 -28
- package/dist/_chunks/use-field-match-pdbEnKvO.js.map +0 -1
- package/dist/_chunks/use-registration-submit-eWAECgUC.js +0 -171
- package/dist/_chunks/use-registration-submit-eWAECgUC.js.map +0 -1
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { useState as M, useCallback as w, useEffect as E } from "react";
|
|
2
|
+
import { useTranslation as b } from "react-i18next";
|
|
3
|
+
const L = {
|
|
4
|
+
email: (e) => e.trim().toLowerCase(),
|
|
5
|
+
password: (e) => e,
|
|
6
|
+
// Phones arrive in E.164 form, so they are compared as they come.
|
|
7
|
+
phone: (e) => e
|
|
8
|
+
};
|
|
9
|
+
function C({
|
|
10
|
+
value: e,
|
|
11
|
+
confirmValue: i,
|
|
12
|
+
kind: s,
|
|
13
|
+
submitted: f = !1,
|
|
14
|
+
normalise: u
|
|
15
|
+
}) {
|
|
16
|
+
const { t: o } = b("ui"), [m, a] = M(!1), p = w(() => a(!0), []), c = u ?? L[s], t = c(e), r = c(i), n = t === r, h = t !== "" && r !== "" && !n, l = t === "" && r === "";
|
|
17
|
+
E(() => {
|
|
18
|
+
l && a(!1);
|
|
19
|
+
}, [l]);
|
|
20
|
+
const d = o(s === "email" ? "fieldMatch.email" : s === "phone" ? "fieldMatch.phone" : "fieldMatch.password");
|
|
21
|
+
return {
|
|
22
|
+
matches: n,
|
|
23
|
+
error: h && (m || f) ? d : void 0,
|
|
24
|
+
confirmProps: { onBlur: p }
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
export {
|
|
28
|
+
C as u
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=use-field-match-C8ug3sdQ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-field-match-C8ug3sdQ.js","sources":["../../src/hooks/use-field-match.ts"],"sourcesContent":["import { useCallback, useEffect, useState } from 'react';\nimport { useTranslation } from 'react-i18next';\n\n/** Which pair of fields is compared: it picks the comparison and the message. */\nexport type FieldMatchKind = 'email' | 'password' | 'phone';\n\nexport interface UseFieldMatchOptions {\n /** The value of the first field. */\n value: string;\n /** The value of the field that repeats it. */\n confirmValue: string;\n /**\n * `'email'` compares trimmed and without regard to case. `'password'`\n * and `'phone'` (E.164 values) compare exactly. Each has its own translated message.\n */\n kind: FieldMatchKind;\n /**\n * True once the user has tried to submit the form. The message then\n * shows even if the confirm field was never left.\n */\n submitted?: boolean;\n /**\n * Replaces the default preparation of both values before they are\n * compared, e.g. to strip dots from an address.\n */\n normalise?: (value: string) => string;\n}\n\nexport interface UseFieldMatchReturn {\n /**\n * True when the two values are equal after normalising. Two empty\n * fields match: check that they are filled in separately.\n */\n matches: boolean;\n /**\n * The translated message, ready for `FormField`'s `error`. Set only\n * when both fields have text, they differ, and the user has left the\n * confirm field once or tried to submit. Cleared as soon as they match.\n * Emptying both fields starts again: the message waits for the confirm\n * field to be left once more.\n */\n error: string | undefined;\n /** Spread onto the confirm field's input. */\n confirmProps: { onBlur: () => void };\n}\n\nconst DEFAULT_NORMALISE: Record<FieldMatchKind, (value: string) => string> = {\n email: (value) => value.trim().toLowerCase(),\n password: (value) => value,\n // Phones arrive in E.164 form, so they are compared as they come.\n phone: (value) => value,\n};\n\n/**\n * \"These two fields must match\", for email with confirm email and\n * password with confirm password. It compares the values and says when\n * to show the message; `FormField` shows and announces it.\n *\n * It does not block paste, copy or drop itself. A host that wants the\n * confirm field typed sets `blockPaste` on that input (any field built\n * on `TextInput` takes it); password managers still fill both fields.\n *\n * @example\n * const match = useFieldMatch({\n * value: email,\n * confirmValue: emailConfirm,\n * kind: 'email',\n * submitted,\n * });\n *\n * // `disableBuiltInValidation`: the match is this field's only check.\n * // With EmailInput's own message on too, two messages share one id.\n * <FormField label=\"Confirm email\" required error={match.error}>\n * <EmailInput\n * disableBuiltInValidation\n * value={emailConfirm}\n * onChange={(event) => setEmailConfirm(event.target.value)}\n * {...match.confirmProps}\n * />\n * </FormField>\n */\nexport function useFieldMatch({\n value,\n confirmValue,\n kind,\n submitted = false,\n normalise,\n}: UseFieldMatchOptions): UseFieldMatchReturn {\n const { t } = useTranslation('ui');\n const [blurred, setBlurred] = useState(false);\n const onBlur = useCallback(() => setBlurred(true), []);\n\n const prepare = normalise ?? DEFAULT_NORMALISE[kind];\n const first = prepare(value);\n const second = prepare(confirmValue);\n const matches = first === second;\n const show = first !== '' && second !== '' && !matches;\n\n // Both emptied, as after a server refuses a password: a fresh start,\n // so the message does not jump out at the first key typed.\n const bothEmpty = first === '' && second === '';\n useEffect(() => {\n if (bothEmpty) setBlurred(false);\n }, [bothEmpty]);\n\n // Two plain calls, not a key built from `kind`: the i18n checks read\n // keys from the source.\n const message =\n kind === 'email'\n ? t('fieldMatch.email')\n : kind === 'phone'\n ? t('fieldMatch.phone')\n : t('fieldMatch.password');\n\n return {\n matches,\n error: show && (blurred || submitted) ? message : undefined,\n confirmProps: { onBlur },\n };\n}\n"],"names":["DEFAULT_NORMALISE","value","useFieldMatch","confirmValue","kind","submitted","normalise","t","useTranslation","blurred","setBlurred","useState","onBlur","useCallback","prepare","first","second","matches","show","bothEmpty","useEffect","message"],"mappings":";;AA8CA,MAAMA,IAAuE;AAAA,EAC3E,OAAO,CAACC,MAAUA,EAAM,KAAA,EAAO,YAAA;AAAA,EAC/B,UAAU,CAACA,MAAUA;AAAA;AAAA,EAErB,OAAO,CAACA,MAAUA;AACpB;AA8BO,SAASC,EAAc;AAAA,EAC5B,OAAAD;AAAA,EACA,cAAAE;AAAA,EACA,MAAAC;AAAA,EACA,WAAAC,IAAY;AAAA,EACZ,WAAAC;AACF,GAA8C;AAC5C,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,IAAI,GAC3B,CAACC,GAASC,CAAU,IAAIC,EAAS,EAAK,GACtCC,IAASC,EAAY,MAAMH,EAAW,EAAI,GAAG,CAAA,CAAE,GAE/CI,IAAUR,KAAaN,EAAkBI,CAAI,GAC7CW,IAAQD,EAAQb,CAAK,GACrBe,IAASF,EAAQX,CAAY,GAC7Bc,IAAUF,MAAUC,GACpBE,IAAOH,MAAU,MAAMC,MAAW,MAAM,CAACC,GAIzCE,IAAYJ,MAAU,MAAMC,MAAW;AAC7C,EAAAI,EAAU,MAAM;AACd,IAAID,OAAsB,EAAK;AAAA,EACjC,GAAG,CAACA,CAAS,CAAC;AAId,QAAME,IAEAd,EADJH,MAAS,UACH,qBACFA,MAAS,UACL,qBACA,qBAHgB;AAK1B,SAAO;AAAA,IACL,SAAAa;AAAA,IACA,OAAOC,MAAST,KAAWJ,KAAagB,IAAU;AAAA,IAClD,cAAc,EAAE,QAAAT,EAAA;AAAA,EAAO;AAE3B;"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { useState as d, useRef as i, useEffect as S } from "react";
|
|
2
|
+
function N(r, e, c = !1) {
|
|
3
|
+
const [n, E] = d(
|
|
4
|
+
() => c ? {} : null
|
|
5
|
+
), [g, T] = d(null), [s, v] = d([]);
|
|
6
|
+
if (n !== g)
|
|
7
|
+
T(n), v(r.filter((t) => !!e(t)));
|
|
8
|
+
else {
|
|
9
|
+
const t = s.filter((l) => !!e(l));
|
|
10
|
+
t.length !== s.length && v(t);
|
|
11
|
+
}
|
|
12
|
+
const h = i(null), o = i(null);
|
|
13
|
+
return S(() => {
|
|
14
|
+
var t, l;
|
|
15
|
+
!n || o.current === n || (o.current = n, s.length > 0 ? (t = h.current) == null || t.focus() : (l = n.fallback) == null || l.call(n));
|
|
16
|
+
}, [n, s]), {
|
|
17
|
+
listed: s,
|
|
18
|
+
lists: (t) => s.includes(t),
|
|
19
|
+
// A new object each time, so a second refused submit moves focus again.
|
|
20
|
+
open: (t) => E({ fallback: t }),
|
|
21
|
+
ref: h
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
function H(r, e) {
|
|
25
|
+
const [c, n] = d(void 0);
|
|
26
|
+
return r && e && c !== r && n(r), !r && c !== void 0 && n(void 0), r && (e || c === r) ? "off" : void 0;
|
|
27
|
+
}
|
|
28
|
+
const x = 8e3, B = (r) => JSON.stringify(
|
|
29
|
+
Object.entries(r ?? {}).filter(([, e]) => !!e).sort(([e], [c]) => e < c ? -1 : e > c ? 1 : 0)
|
|
30
|
+
);
|
|
31
|
+
function O(r) {
|
|
32
|
+
const e = i(r);
|
|
33
|
+
e.current = r;
|
|
34
|
+
const [c, n] = d(!1), [E, g] = d(!1), [T, s] = d(!1), v = r.submitting || c || E, h = i(null), o = i(!1), t = i(void 0), l = i(!1), m = i(!1), A = i(void 0), P = () => {
|
|
35
|
+
o.current = !1, clearTimeout(t.current), g(!1);
|
|
36
|
+
};
|
|
37
|
+
S(() => () => clearTimeout(t.current), []);
|
|
38
|
+
const R = (u) => {
|
|
39
|
+
e.current.native ? n(!0) : (l.current = !0, m.current = !1, A.current = e.current.errors), e.current.deliver(u);
|
|
40
|
+
}, C = (u) => {
|
|
41
|
+
if (v) {
|
|
42
|
+
u.preventDefault();
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
s(!1);
|
|
46
|
+
const f = e.current.firstProblem();
|
|
47
|
+
if (f !== void 0) {
|
|
48
|
+
u.preventDefault(), e.current.onRefused(f);
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
if (e.current.captcha) {
|
|
52
|
+
u.preventDefault();
|
|
53
|
+
const a = h.current;
|
|
54
|
+
if (!a) {
|
|
55
|
+
s(!0);
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
o.current = !1, a.reset(), o.current = !0, g(!0), clearTimeout(t.current), t.current = setTimeout(
|
|
59
|
+
() => g(!1),
|
|
60
|
+
x
|
|
61
|
+
), a.execute();
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
if (e.current.native) {
|
|
65
|
+
n(!0);
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
u.preventDefault(), R();
|
|
69
|
+
}, F = (u) => {
|
|
70
|
+
if (!o.current) return;
|
|
71
|
+
if (P(), !u) {
|
|
72
|
+
s(!0);
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
const f = e.current.firstProblem();
|
|
76
|
+
if (f !== void 0) {
|
|
77
|
+
e.current.onRefused(f);
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
R(u);
|
|
81
|
+
}, D = () => {
|
|
82
|
+
o.current && (P(), s(!0));
|
|
83
|
+
}, p = r.errors, b = B(p), w = i(null);
|
|
84
|
+
return S(() => {
|
|
85
|
+
var a;
|
|
86
|
+
if (w.current === null) {
|
|
87
|
+
w.current = b;
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
const u = b !== w.current;
|
|
91
|
+
w.current = b, l.current && r.submitting && (m.current = !0);
|
|
92
|
+
const f = l.current && m.current && !r.submitting && p !== A.current;
|
|
93
|
+
!u && !f || (l.current = !1, m.current = !1, o.current = !1, clearTimeout(t.current), g(!1), (a = h.current) == null || a.reset(), e.current.onAnswer(p ?? {}));
|
|
94
|
+
}, [p, b, r.submitting]), S(() => {
|
|
95
|
+
const u = (f) => {
|
|
96
|
+
var a, y;
|
|
97
|
+
f.persisted && (n(!1), (y = (a = e.current).onRestore) == null || y.call(a));
|
|
98
|
+
};
|
|
99
|
+
return window.addEventListener("pageshow", u), () => window.removeEventListener("pageshow", u);
|
|
100
|
+
}, []), {
|
|
101
|
+
busy: v,
|
|
102
|
+
captchaFailed: T,
|
|
103
|
+
handleSubmit: C,
|
|
104
|
+
captcha: { ref: h, onChange: F, onError: D }
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
export {
|
|
108
|
+
H as a,
|
|
109
|
+
O as b,
|
|
110
|
+
N as u
|
|
111
|
+
};
|
|
112
|
+
//# sourceMappingURL=use-registration-submit-CLGHxwoT.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-registration-submit-CLGHxwoT.js","sources":["../../src/patterns/_shared/use-error-summary.ts","../../src/patterns/registration-form/use-registration-submit.ts"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* useErrorSummary: what the signed-out forms' ErrorSummary lists, and */\n/* when it takes focus. */\n/* */\n/* A refused submit, or a server answer with messages for fields, opens */\n/* the summary: it lists every field then in error and takes focus. A */\n/* field leaves the list once it has no message, and does not come back */\n/* until the next submit: an error made later, on leaving that field, is */\n/* the field's own to announce. A listed field stays quiet. */\n/* */\n/* Shipped with the patterns that import it; not an export of its own. */\n/* -------------------------------------------------------------------- */\n\nimport { useEffect, useRef, useState, type RefObject } from 'react';\nimport type { AlertAnnounce } from '../../components/alert';\n\ninterface OpenRequest {\n /** Called instead of focusing the summary when no field has a message. */\n fallback?: () => void;\n}\n\nexport interface UseErrorSummaryReturn<Field extends string> {\n /** The fields the summary lists now, in the form's order. */\n listed: readonly Field[];\n /** True while the summary lists the field: its own message then stays\n * quiet (FormField's `announceError`). */\n lists: (field: Field) => boolean;\n /**\n * Lists every field in error after this render and moves focus to the\n * summary. When no field has a message, calls `fallback` instead (a\n * message about the whole form, say).\n */\n open: (fallback?: () => void) => void;\n /** For the `ErrorSummary`. */\n ref: RefObject<HTMLDivElement | null>;\n}\n\n/**\n * @param order the fields the form shows, in order.\n * @param messageFor the message a field shows in this render, if any.\n * @param openAtMount open at once: the form arrived with messages from\n * the server (a page it rendered after a failed post).\n */\nexport function useErrorSummary<Field extends string>(\n order: readonly Field[],\n messageFor: (field: Field) => string | undefined,\n openAtMount = false,\n): UseErrorSummaryReturn<Field> {\n const [request, setRequest] = useState<OpenRequest | null>(() =>\n openAtMount ? {} : null,\n );\n const [handled, setHandled] = useState<OpenRequest | null>(null);\n const [listed, setListed] = useState<readonly Field[]>([]);\n\n // Worked out while rendering, not in an effect: the messages and the\n // summary must reach the page in the same commit. A message drawn one\n // commit before the summary would still be announced on its own.\n if (request !== handled) {\n setHandled(request);\n setListed(order.filter((field) => Boolean(messageFor(field))));\n } else {\n const kept = listed.filter((field) => Boolean(messageFor(field)));\n if (kept.length !== listed.length) setListed(kept);\n }\n\n const ref = useRef<HTMLDivElement | null>(null);\n const focusedFor = useRef<OpenRequest | null>(null);\n useEffect(() => {\n if (!request || focusedFor.current === request) return;\n focusedFor.current = request;\n if (listed.length > 0) ref.current?.focus();\n else request.fallback?.();\n }, [request, listed]);\n\n return {\n listed,\n lists: (field) => listed.includes(field),\n // A new object each time, so a second refused submit moves focus again.\n open: (fallback) => setRequest({ fallback }),\n ref,\n };\n}\n\n/**\n * How the message about the whole form is announced, beside the summary.\n * While the summary lists a field it takes focus and reads that message\n * too (its `aria-describedby`), so an alert as well would be read over it:\n * the message stays quiet. It stays quiet until its text changes, because\n * a role=\"alert\" added to text already on screen can be read out of turn.\n * Otherwise the Alert's own default applies.\n */\nexport function useFormMessageAnnounce(\n message: string | undefined,\n summaryOpen: boolean,\n): AlertAnnounce | undefined {\n const [quietFor, setQuietFor] = useState<string | undefined>(undefined);\n // Worked out while rendering, so the message mounts quiet in the same\n // commit as the summary.\n if (message && summaryOpen && quietFor !== message) setQuietFor(message);\n if (!message && quietFor !== undefined) setQuietFor(undefined);\n return message && (summaryOpen || quietFor === message) ? 'off' : undefined;\n}\n","/* -------------------------------------------------------------------- */\n/* useRegistrationSubmit — what happens between \"the user pressed the */\n/* button\" and \"the values left the page\". */\n/* */\n/* Three things that are easy to get wrong live here, away from the */\n/* form's markup so they can be tested on their own: */\n/* */\n/* 1. The submit itself: refuse while busy or invalid, otherwise hand */\n/* over to the host or let the browser post. */\n/* 2. The reCAPTCHA wait: the token arrives later, and the fields stay */\n/* live meanwhile, so the form is checked again when it does. */\n/* 3. The server's answer: telling a new `errors` object that carries */\n/* an answer from one the host merely rebuilt while rendering. */\n/* -------------------------------------------------------------------- */\n\nimport { useEffect, useRef, useState, type RefObject } from 'react';\nimport type { RecaptchaWidgetHandle } from '../../components/recaptcha-widget';\n\ntype Messages = Readonly<Record<string, string | undefined>>;\n\n/**\n * How long the button stays busy waiting for a reCAPTCHA token. Google\n * sends no event when the user closes a challenge, so the wait cannot be\n * open-ended: after this the button comes back and the user can try\n * again. A token that arrives later is still used.\n */\nexport const CAPTCHA_PATIENCE = 8000;\n\nexport interface UseRegistrationSubmitOptions<Field extends string> {\n /** The host's `errors` prop. */\n errors: Messages | undefined;\n /** The host's `submitting` prop. */\n submitting: boolean;\n /** True when the browser posts the form itself. */\n native: boolean;\n /** True when a reCAPTCHA check guards the submit. */\n captcha: boolean;\n /**\n * The first field that stops a submit, or `undefined` when every field\n * is valid. Called when the answer is needed, so it must read the\n * latest values.\n */\n firstProblem: () => Field | undefined;\n /** A submit was refused because of this field. */\n onRefused: (field: Field) => void;\n /**\n * Hand the values over. For a React host, call its `onSubmit`. For a\n * native post this is only called when a reCAPTCHA token arrives (put\n * the token in its field and call `form.submit()`); without reCAPTCHA\n * the browser posts on its own and this is not called.\n */\n deliver: (captchaToken?: string) => void;\n /** The server has answered with these messages. */\n onAnswer: (errors: Messages) => void;\n /** The browser restored the page from its back-forward cache. */\n onRestore?: () => void;\n}\n\nexport interface UseRegistrationSubmitReturn {\n /** True while a submit is on its way: the host is sending, the browser\n * is posting, or a reCAPTCHA token is awaited. */\n busy: boolean;\n /** True when the last reCAPTCHA check failed or expired. */\n captchaFailed: boolean;\n /** The form's `onSubmit`. */\n handleSubmit: (event: { preventDefault: () => void }) => void;\n /** Props for the `RecaptchaWidget`. */\n captcha: {\n ref: RefObject<RecaptchaWidgetHandle | null>;\n onChange: (token: string | null) => void;\n onError: () => void;\n };\n}\n\n/** The messages a host's `errors` carries, whatever order it lists them\n * in and however it spells \"no message\". */\nconst signatureOf = (errors: Messages | undefined): string =>\n JSON.stringify(\n Object.entries(errors ?? {})\n .filter(([, message]) => Boolean(message))\n .sort(([a], [b]) => (a < b ? -1 : a > b ? 1 : 0)),\n );\n\nexport function useRegistrationSubmit<Field extends string>(\n options: UseRegistrationSubmitOptions<Field>,\n): UseRegistrationSubmitReturn {\n // The handlers below run long after the render that made them (a token\n // arrives seconds later), so they read the options of the latest render.\n const latest = useRef(options);\n latest.current = options;\n\n // A native post is on its way: the page is about to change.\n const [posting, setPosting] = useState(false);\n // Waiting for a reCAPTCHA token, within the patience above.\n const [verifying, setVerifying] = useState(false);\n const [captchaFailed, setCaptchaFailed] = useState(false);\n const busy = options.submitting || posting || verifying;\n\n const widget = useRef<RecaptchaWidgetHandle | null>(null);\n /** True between asking for a token and the widget's answer. */\n const expecting = useRef(false);\n const patience = useRef<ReturnType<typeof setTimeout> | undefined>(undefined);\n /** True between handing the values to the host and its next answer. */\n const awaitingAnswer = useRef(false);\n /** The host has shown `submitting` since the values were handed over. */\n const sawSending = useRef(false);\n /** The `errors` object the form was sent with. */\n const sentWith = useRef<Messages | undefined>(undefined);\n\n const stopWaiting = () => {\n expecting.current = false;\n clearTimeout(patience.current);\n setVerifying(false);\n };\n useEffect(() => () => clearTimeout(patience.current), []);\n\n const send = (captchaToken?: string) => {\n if (latest.current.native) {\n setPosting(true);\n } else {\n awaitingAnswer.current = true;\n sawSending.current = false;\n sentWith.current = latest.current.errors;\n }\n latest.current.deliver(captchaToken);\n };\n\n const handleSubmit = (event: { preventDefault: () => void }) => {\n if (busy) {\n event.preventDefault();\n return;\n }\n setCaptchaFailed(false);\n const problem = latest.current.firstProblem();\n if (problem !== undefined) {\n event.preventDefault();\n latest.current.onRefused(problem);\n return;\n }\n if (latest.current.captcha) {\n // The token arrives later, in `onChange`.\n event.preventDefault();\n const handle = widget.current;\n if (!handle) {\n setCaptchaFailed(true);\n return;\n }\n // A token works once, so start clean. The widget reports the\n // reset as \"no token\": that is not the answer to this request.\n expecting.current = false;\n handle.reset();\n expecting.current = true;\n setVerifying(true);\n clearTimeout(patience.current);\n patience.current = setTimeout(\n () => setVerifying(false),\n CAPTCHA_PATIENCE,\n );\n // Queued by the widget if its script is still loading; loads the\n // script again if it failed to.\n handle.execute();\n return;\n }\n if (latest.current.native) {\n // Not prevented: the browser posts the form.\n setPosting(true);\n return;\n }\n event.preventDefault();\n send();\n };\n\n const onChange = (token: string | null) => {\n if (!expecting.current) return;\n stopWaiting();\n if (!token) {\n setCaptchaFailed(true);\n return;\n }\n // The fields stayed live during the wait: check them again, so an\n // edit made meanwhile cannot go out unchecked.\n const problem = latest.current.firstProblem();\n if (problem !== undefined) {\n latest.current.onRefused(problem);\n return;\n }\n send(token);\n };\n\n const onError = () => {\n // A failure nobody is waiting on (the script was blocked when the\n // page loaded) says nothing yet: the next submit tries again.\n if (!expecting.current) return;\n stopWaiting();\n setCaptchaFailed(true);\n };\n\n // The server has answered when `errors` says something new. The same\n // messages can also come back twice (another address, also taken), and\n // then the content cannot tell. A new object alone is no proof either:\n // a host that writes `errors={{ email: emailError }}` makes one on\n // every render, in flight or not. What settles it is `submitting`: a\n // host that sets it while it sends has an answer once it is false\n // again and `errors` is no longer the object the form was sent with.\n const errors = options.errors;\n const signature = signatureOf(errors);\n const lastSignature = useRef<string | null>(null);\n useEffect(() => {\n if (lastSignature.current === null) {\n // The messages the form opened with are not an answer.\n lastSignature.current = signature;\n return;\n }\n const saysSomethingNew = signature !== lastSignature.current;\n lastSignature.current = signature;\n if (awaitingAnswer.current && options.submitting) sawSending.current = true;\n const settled =\n awaitingAnswer.current &&\n sawSending.current &&\n !options.submitting &&\n errors !== sentWith.current;\n if (!saysSomethingNew && !settled) return;\n awaitingAnswer.current = false;\n sawSending.current = false;\n // The token, if any, has been used.\n expecting.current = false;\n clearTimeout(patience.current);\n setVerifying(false);\n widget.current?.reset();\n latest.current.onAnswer(errors ?? {});\n }, [errors, signature, options.submitting]);\n\n // Back from the next page, the browser may restore this one as it was\n // left: mid-post, with the button spinning.\n useEffect(() => {\n const onPageShow = (event: PageTransitionEvent) => {\n if (!event.persisted) return;\n setPosting(false);\n latest.current.onRestore?.();\n };\n window.addEventListener('pageshow', onPageShow);\n return () => window.removeEventListener('pageshow', onPageShow);\n }, []);\n\n return {\n busy,\n captchaFailed,\n handleSubmit,\n captcha: { ref: widget, onChange, onError },\n };\n}\n"],"names":["useErrorSummary","order","messageFor","openAtMount","request","setRequest","useState","handled","setHandled","listed","setListed","field","kept","ref","useRef","focusedFor","useEffect","_a","fallback","useFormMessageAnnounce","message","summaryOpen","quietFor","setQuietFor","CAPTCHA_PATIENCE","signatureOf","errors","a","b","useRegistrationSubmit","options","latest","posting","setPosting","verifying","setVerifying","captchaFailed","setCaptchaFailed","busy","widget","expecting","patience","awaitingAnswer","sawSending","sentWith","stopWaiting","send","captchaToken","handleSubmit","event","problem","handle","onChange","token","onError","signature","lastSignature","saysSomethingNew","settled","onPageShow","_b"],"mappings":";AA2CO,SAASA,EACdC,GACAC,GACAC,IAAc,IACgB;AAC9B,QAAM,CAACC,GAASC,CAAU,IAAIC;AAAA,IAA6B,MACzDH,IAAc,CAAA,IAAK;AAAA,EAAA,GAEf,CAACI,GAASC,CAAU,IAAIF,EAA6B,IAAI,GACzD,CAACG,GAAQC,CAAS,IAAIJ,EAA2B,CAAA,CAAE;AAKzD,MAAIF,MAAYG;AACd,IAAAC,EAAWJ,CAAO,GAClBM,EAAUT,EAAM,OAAO,CAACU,MAAU,EAAQT,EAAWS,CAAK,CAAE,CAAC;AAAA,OACxD;AACL,UAAMC,IAAOH,EAAO,OAAO,CAACE,MAAU,EAAQT,EAAWS,CAAK,CAAE;AAChE,IAAIC,EAAK,WAAWH,EAAO,YAAkBG,CAAI;AAAA,EACnD;AAEA,QAAMC,IAAMC,EAA8B,IAAI,GACxCC,IAAaD,EAA2B,IAAI;AAClD,SAAAE,EAAU,MAAM;;AACd,IAAI,CAACZ,KAAWW,EAAW,YAAYX,MACvCW,EAAW,UAAUX,GACjBK,EAAO,SAAS,KAAGQ,IAAAJ,EAAI,YAAJ,QAAAI,EAAa,iBACvB;EACf,GAAG,CAACb,GAASK,CAAM,CAAC,GAEb;AAAA,IACL,QAAAA;AAAA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
|
|
1
|
-
import {
|
|
2
|
-
import { i as u } from "./isSameWeek-
|
|
1
|
+
import { e as s, p as i, q as o, r as m } from "./format--x5jypvH.js";
|
|
2
|
+
import { i as u } from "./isSameWeek-DyVftHWi.js";
|
|
3
3
|
const c = {
|
|
4
4
|
lessThanXSeconds: {
|
|
5
5
|
one: "不到 1 秒",
|
|
@@ -385,4 +385,4 @@ const b = {
|
|
|
385
385
|
export {
|
|
386
386
|
Q as zhCN
|
|
387
387
|
};
|
|
388
|
-
//# sourceMappingURL=zh-CN-
|
|
388
|
+
//# sourceMappingURL=zh-CN-C657DBCO.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zh-CN-QGEs29fQ.js","sources":["../../node_modules/date-fns/locale/zh-CN/_lib/formatDistance.js","../../node_modules/date-fns/locale/zh-CN/_lib/formatLong.js","../../node_modules/date-fns/locale/zh-CN/_lib/formatRelative.js","../../node_modules/date-fns/locale/zh-CN/_lib/localize.js","../../node_modules/date-fns/locale/zh-CN/_lib/match.js","../../node_modules/date-fns/locale/zh-CN.js"],"sourcesContent":["const formatDistanceLocale = {\n lessThanXSeconds: {\n one: \"不到 1 秒\",\n other: \"不到 {{count}} 秒\",\n },\n\n xSeconds: {\n one: \"1 秒\",\n other: \"{{count}} 秒\",\n },\n\n halfAMinute: \"半分钟\",\n\n lessThanXMinutes: {\n one: \"不到 1 分钟\",\n other: \"不到 {{count}} 分钟\",\n },\n\n xMinutes: {\n one: \"1 分钟\",\n other: \"{{count}} 分钟\",\n },\n\n xHours: {\n one: \"1 小时\",\n other: \"{{count}} 小时\",\n },\n\n aboutXHours: {\n one: \"大约 1 小时\",\n other: \"大约 {{count}} 小时\",\n },\n\n xDays: {\n one: \"1 天\",\n other: \"{{count}} 天\",\n },\n\n aboutXWeeks: {\n one: \"大约 1 个星期\",\n other: \"大约 {{count}} 个星期\",\n },\n\n xWeeks: {\n one: \"1 个星期\",\n other: \"{{count}} 个星期\",\n },\n\n aboutXMonths: {\n one: \"大约 1 个月\",\n other: \"大约 {{count}} 个月\",\n },\n\n xMonths: {\n one: \"1 个月\",\n other: \"{{count}} 个月\",\n },\n\n aboutXYears: {\n one: \"大约 1 年\",\n other: \"大约 {{count}} 年\",\n },\n\n xYears: {\n one: \"1 年\",\n other: \"{{count}} 年\",\n },\n\n overXYears: {\n one: \"超过 1 年\",\n other: \"超过 {{count}} 年\",\n },\n\n almostXYears: {\n one: \"将近 1 年\",\n other: \"将近 {{count}} 年\",\n },\n};\n\nexport const formatDistance = (token, count, options) => {\n let result;\n\n const tokenValue = formatDistanceLocale[token];\n if (typeof tokenValue === \"string\") {\n result = tokenValue;\n } else if (count === 1) {\n result = tokenValue.one;\n } else {\n result = tokenValue.other.replace(\"{{count}}\", String(count));\n }\n\n if (options?.addSuffix) {\n if (options.comparison && options.comparison > 0) {\n return result + \"内\";\n } else {\n return result + \"前\";\n }\n }\n\n return result;\n};\n","import { buildFormatLongFn } from \"../../_lib/buildFormatLongFn.js\";\n\nconst dateFormats = {\n full: \"y'年'M'月'd'日' EEEE\",\n long: \"y'年'M'月'd'日'\",\n medium: \"yyyy-MM-dd\",\n short: \"yy-MM-dd\",\n};\n\nconst timeFormats = {\n full: \"zzzz a h:mm:ss\",\n long: \"z a h:mm:ss\",\n medium: \"a h:mm:ss\",\n short: \"a h:mm\",\n};\n\nconst dateTimeFormats = {\n full: \"{{date}} {{time}}\",\n long: \"{{date}} {{time}}\",\n medium: \"{{date}} {{time}}\",\n short: \"{{date}} {{time}}\",\n};\n\nexport const formatLong = {\n date: buildFormatLongFn({\n formats: dateFormats,\n defaultWidth: \"full\",\n }),\n\n time: buildFormatLongFn({\n formats: timeFormats,\n defaultWidth: \"full\",\n }),\n\n dateTime: buildFormatLongFn({\n formats: dateTimeFormats,\n defaultWidth: \"full\",\n }),\n};\n","import { isSameWeek } from \"../../../isSameWeek.js\";\n\nfunction checkWeek(date, baseDate, options) {\n const baseFormat = \"eeee p\";\n\n if (isSameWeek(date, baseDate, options)) {\n return baseFormat; // in same week\n } else if (date.getTime() > baseDate.getTime()) {\n return \"'下个'\" + baseFormat; // in next week\n }\n return \"'上个'\" + baseFormat; // in last week\n}\n\nconst formatRelativeLocale = {\n lastWeek: checkWeek, // days before yesterday, maybe in this week or last week\n yesterday: \"'昨天' p\",\n today: \"'今天' p\",\n tomorrow: \"'明天' p\",\n nextWeek: checkWeek, // days after tomorrow, maybe in this week or next week\n other: \"PP p\",\n};\n\nexport const formatRelative = (token, date, baseDate, options) => {\n const format = formatRelativeLocale[token];\n\n if (typeof format === \"function\") {\n return format(date, baseDate, options);\n }\n\n return format;\n};\n","import { buildLocalizeFn } from \"../../_lib/buildLocalizeFn.js\";\n\nconst eraValues = {\n narrow: [\"前\", \"公元\"],\n abbreviated: [\"前\", \"公元\"],\n wide: [\"公元前\", \"公元\"],\n};\n\nconst quarterValues = {\n narrow: [\"1\", \"2\", \"3\", \"4\"],\n abbreviated: [\"第一季\", \"第二季\", \"第三季\", \"第四季\"],\n wide: [\"第一季度\", \"第二季度\", \"第三季度\", \"第四季度\"],\n};\n\nconst monthValues = {\n narrow: [\n \"一\",\n \"二\",\n \"三\",\n \"四\",\n \"五\",\n \"六\",\n \"七\",\n \"八\",\n \"九\",\n \"十\",\n \"十一\",\n \"十二\",\n ],\n\n abbreviated: [\n \"1月\",\n \"2月\",\n \"3月\",\n \"4月\",\n \"5月\",\n \"6月\",\n \"7月\",\n \"8月\",\n \"9月\",\n \"10月\",\n \"11月\",\n \"12月\",\n ],\n\n wide: [\n \"一月\",\n \"二月\",\n \"三月\",\n \"四月\",\n \"五月\",\n \"六月\",\n \"七月\",\n \"八月\",\n \"九月\",\n \"十月\",\n \"十一月\",\n \"十二月\",\n ],\n};\n\nconst dayValues = {\n narrow: [\"日\", \"一\", \"二\", \"三\", \"四\", \"五\", \"六\"],\n short: [\"日\", \"一\", \"二\", \"三\", \"四\", \"五\", \"六\"],\n abbreviated: [\"周日\", \"周一\", \"周二\", \"周三\", \"周四\", \"周五\", \"周六\"],\n\n wide: [\"星期日\", \"星期一\", \"星期二\", \"星期三\", \"星期四\", \"星期五\", \"星期六\"],\n};\n\nconst dayPeriodValues = {\n narrow: {\n am: \"上\",\n pm: \"下\",\n midnight: \"凌晨\",\n noon: \"午\",\n morning: \"早\",\n afternoon: \"下午\",\n evening: \"晚\",\n night: \"夜\",\n },\n abbreviated: {\n am: \"上午\",\n pm: \"下午\",\n midnight: \"凌晨\",\n noon: \"中午\",\n morning: \"早晨\",\n afternoon: \"中午\",\n evening: \"晚上\",\n night: \"夜间\",\n },\n wide: {\n am: \"上午\",\n pm: \"下午\",\n midnight: \"凌晨\",\n noon: \"中午\",\n morning: \"早晨\",\n afternoon: \"中午\",\n evening: \"晚上\",\n night: \"夜间\",\n },\n};\n\nconst formattingDayPeriodValues = {\n narrow: {\n am: \"上\",\n pm: \"下\",\n midnight: \"凌晨\",\n noon: \"午\",\n morning: \"早\",\n afternoon: \"下午\",\n evening: \"晚\",\n night: \"夜\",\n },\n abbreviated: {\n am: \"上午\",\n pm: \"下午\",\n midnight: \"凌晨\",\n noon: \"中午\",\n morning: \"早晨\",\n afternoon: \"中午\",\n evening: \"晚上\",\n night: \"夜间\",\n },\n wide: {\n am: \"上午\",\n pm: \"下午\",\n midnight: \"凌晨\",\n noon: \"中午\",\n morning: \"早晨\",\n afternoon: \"中午\",\n evening: \"晚上\",\n night: \"夜间\",\n },\n};\n\nconst ordinalNumber = (dirtyNumber, options) => {\n const number = Number(dirtyNumber);\n\n switch (options?.unit) {\n case \"date\":\n return number.toString() + \"日\";\n case \"hour\":\n return number.toString() + \"时\";\n case \"minute\":\n return number.toString() + \"分\";\n case \"second\":\n return number.toString() + \"秒\";\n default:\n return \"第 \" + number.toString();\n }\n};\n\nexport const localize = {\n ordinalNumber,\n\n era: buildLocalizeFn({\n values: eraValues,\n defaultWidth: \"wide\",\n }),\n\n quarter: buildLocalizeFn({\n values: quarterValues,\n defaultWidth: \"wide\",\n argumentCallback: (quarter) => quarter - 1,\n }),\n\n month: buildLocalizeFn({\n values: monthValues,\n defaultWidth: \"wide\",\n }),\n\n day: buildLocalizeFn({\n values: dayValues,\n defaultWidth: \"wide\",\n }),\n\n dayPeriod: buildLocalizeFn({\n values: dayPeriodValues,\n defaultWidth: \"wide\",\n formattingValues: formattingDayPeriodValues,\n defaultFormattingWidth: \"wide\",\n }),\n};\n","import { buildMatchFn } from \"../../_lib/buildMatchFn.js\";\nimport { buildMatchPatternFn } from \"../../_lib/buildMatchPatternFn.js\";\n\nconst matchOrdinalNumberPattern = /^(第\\s*)?\\d+(日|时|分|秒)?/i;\nconst parseOrdinalNumberPattern = /\\d+/i;\n\nconst matchEraPatterns = {\n narrow: /^(前)/i,\n abbreviated: /^(前)/i,\n wide: /^(公元前|公元)/i,\n};\nconst parseEraPatterns = {\n any: [/^(前)/i, /^(公元)/i],\n};\n\nconst matchQuarterPatterns = {\n narrow: /^[1234]/i,\n abbreviated: /^第[一二三四]刻/i,\n wide: /^第[一二三四]刻钟/i,\n};\nconst parseQuarterPatterns = {\n any: [/(1|一)/i, /(2|二)/i, /(3|三)/i, /(4|四)/i],\n};\n\nconst matchMonthPatterns = {\n narrow: /^(一|二|三|四|五|六|七|八|九|十[二一])/i,\n abbreviated: /^(一|二|三|四|五|六|七|八|九|十[二一]|\\d|1[12])月/i,\n wide: /^(一|二|三|四|五|六|七|八|九|十[二一])月/i,\n};\nconst parseMonthPatterns = {\n narrow: [\n /^一/i,\n /^二/i,\n /^三/i,\n /^四/i,\n /^五/i,\n /^六/i,\n /^七/i,\n /^八/i,\n /^九/i,\n /^十(?!(一|二))/i,\n /^十一/i,\n /^十二/i,\n ],\n\n any: [\n /^一|1/i,\n /^二|2/i,\n /^三|3/i,\n /^四|4/i,\n /^五|5/i,\n /^六|6/i,\n /^七|7/i,\n /^八|8/i,\n /^九|9/i,\n /^十(?!(一|二))|10/i,\n /^十一|11/i,\n /^十二|12/i,\n ],\n};\n\nconst matchDayPatterns = {\n narrow: /^[一二三四五六日]/i,\n short: /^[一二三四五六日]/i,\n abbreviated: /^周[一二三四五六日]/i,\n wide: /^星期[一二三四五六日]/i,\n};\nconst parseDayPatterns = {\n any: [/日/i, /一/i, /二/i, /三/i, /四/i, /五/i, /六/i],\n};\n\nconst matchDayPeriodPatterns = {\n any: /^(上午?|下午?|午夜|[中正]午|早上?|下午|晚上?|凌晨|)/i,\n};\nconst parseDayPeriodPatterns = {\n any: {\n am: /^上午?/i,\n pm: /^下午?/i,\n midnight: /^午夜/i,\n noon: /^[中正]午/i,\n morning: /^早上/i,\n afternoon: /^下午/i,\n evening: /^晚上?/i,\n night: /^凌晨/i,\n },\n};\n\nexport const match = {\n ordinalNumber: buildMatchPatternFn({\n matchPattern: matchOrdinalNumberPattern,\n parsePattern: parseOrdinalNumberPattern,\n valueCallback: (value) => parseInt(value, 10),\n }),\n\n era: buildMatchFn({\n matchPatterns: matchEraPatterns,\n defaultMatchWidth: \"wide\",\n parsePatterns: parseEraPatterns,\n defaultParseWidth: \"any\",\n }),\n\n quarter: buildMatchFn({\n matchPatterns: matchQuarterPatterns,\n defaultMatchWidth: \"wide\",\n parsePatterns: parseQuarterPatterns,\n defaultParseWidth: \"any\",\n valueCallback: (index) => index + 1,\n }),\n\n month: buildMatchFn({\n matchPatterns: matchMonthPatterns,\n defaultMatchWidth: \"wide\",\n parsePatterns: parseMonthPatterns,\n defaultParseWidth: \"any\",\n }),\n\n day: buildMatchFn({\n matchPatterns: matchDayPatterns,\n defaultMatchWidth: \"wide\",\n parsePatterns: parseDayPatterns,\n defaultParseWidth: \"any\",\n }),\n\n dayPeriod: buildMatchFn({\n matchPatterns: matchDayPeriodPatterns,\n defaultMatchWidth: \"any\",\n parsePatterns: parseDayPeriodPatterns,\n defaultParseWidth: \"any\",\n }),\n};\n","import { formatDistance } from \"./zh-CN/_lib/formatDistance.js\";\nimport { formatLong } from \"./zh-CN/_lib/formatLong.js\";\nimport { formatRelative } from \"./zh-CN/_lib/formatRelative.js\";\nimport { localize } from \"./zh-CN/_lib/localize.js\";\nimport { match } from \"./zh-CN/_lib/match.js\";\n\n/**\n * @category Locales\n * @summary Chinese Simplified locale.\n * @language Chinese Simplified\n * @iso-639-2 zho\n * @author Changyu Geng [@KingMario](https://github.com/KingMario)\n * @author Song Shuoyun [@fnlctrl](https://github.com/fnlctrl)\n * @author sabrinaM [@sabrinamiao](https://github.com/sabrinamiao)\n * @author Carney Wu [@cubicwork](https://github.com/cubicwork)\n * @author Terrence Lam [@skyuplam](https://github.com/skyuplam)\n */\nexport const zhCN = {\n code: \"zh-CN\",\n formatDistance: formatDistance,\n formatLong: formatLong,\n formatRelative: formatRelative,\n localize: localize,\n match: match,\n options: {\n weekStartsOn: 1 /* Monday */,\n firstWeekContainsDate: 4,\n },\n};\n\n// Fallback for modularized imports:\nexport default zhCN;\n"],"names":["formatDistanceLocale","formatDistance","token","count","options","result","tokenValue","dateFormats","timeFormats","dateTimeFormats","formatLong","buildFormatLongFn","checkWeek","date","baseDate","baseFormat","isSameWeek","formatRelativeLocale","formatRelative","format","eraValues","quarterValues","monthValues","dayValues","dayPeriodValues","formattingDayPeriodValues","ordinalNumber","dirtyNumber","number","localize","buildLocalizeFn","quarter","matchOrdinalNumberPattern","parseOrdinalNumberPattern","matchEraPatterns","parseEraPatterns","matchQuarterPatterns","parseQuarterPatterns","matchMonthPatterns","parseMonthPatterns","matchDayPatterns","parseDayPatterns","matchDayPeriodPatterns","parseDayPeriodPatterns","match","buildMatchPatternFn","value","buildMatchFn","index","zhCN"],"mappings":";;AAAA,MAAMA,IAAuB;AAAA,EAC3B,kBAAkB;AAAA,IAChB,KAAK;AAAA,IACL,OAAO;AAAA,EACX;AAAA,EAEE,UAAU;AAAA,IACR,KAAK;AAAA,IACL,OAAO;AAAA,EACX;AAAA,EAEE,aAAa;AAAA,EAEb,kBAAkB;AAAA,IAChB,KAAK;AAAA,IACL,OAAO;AAAA,EACX;AAAA,EAEE,UAAU;AAAA,IACR,KAAK;AAAA,IACL,OAAO;AAAA,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AQ;AAAA,EACnB,eAAeC,EAAoB;AAAA,IACjC,cAAcb;AAAA,IACd,cAAcC;AAAA,IACd,eAAe,CAACa,MAAU,SAASA,GAAO,EAAE;AAAA,EAChD,CAAG;AAAA,EAED,KAAKC,EAAa;AAAA,IAChB,eAAeb;AAAA,IACf,mBAAmB;AAAA,IACnB,eAAeC;AAAA,IACf,mBAAmB;AAAA,EACvB,CAAG;AAAA,EAED,SAASY,EAAa;AAAA,IACpB,eAAeX;AAAA,IACf,mBAAmB;AAAA,IACnB,eAAeC;AAAA,IACf,mBAAmB;AAAA,IACnB,eAAe,CAACW,MAAUA,IAAQ;AAAA,EACtC,CAAG;AAAA,EAED,OAAOD,EAAa;AAAA,IAClB,eAAeT;AAAA,IACf,mBAAmB;AAAA,IACnB,eAAeC;AAAA,IACf,mBAAmB;AAAA,EACvB,CAAG;AAAA,EAED,KAAKQ,EAAa;AAAA,IAChB,eAAeP;AAAA,IACf,mBAAmB;AAAA,IACnB,eAAeC;AAAA,IACf,mBAAmB;AAAA,EACvB,CAAG;AAAA,EAED,WAAWM,EAAa;AAAA,IACtB,eAAeL;AAAA,IACf,mBAAmB;AAAA,IACnB,eAAeC;AAAA,IACf,mBAAmB;AAAA,EACvB,CAAG;AACH,GChHaM,IAAO;AAAA,EAClB,MAAM;AAAA,EACN,gBAAgBhD;AAAA,EAChB,YAAYS;AAAA,EACZ,gBAAgBQ;AAAA,EAChB,UAAUW;AAAA,EACV,OAAOe;AAAA,EACP,SAAS;AAAA,IACP,cAAc;AAAA,IACd,uBAAuB;AAAA,EAC3B;AACA;","x_google_ignoreList":[0,1,2,3,4,5]}
|
|
1
|
+
{"version":3,"file":"zh-CN-C657DBCO.js","sources":["../../node_modules/date-fns/locale/zh-CN/_lib/formatDistance.js","../../node_modules/date-fns/locale/zh-CN/_lib/formatLong.js","../../node_modules/date-fns/locale/zh-CN/_lib/formatRelative.js","../../node_modules/date-fns/locale/zh-CN/_lib/localize.js","../../node_modules/date-fns/locale/zh-CN/_lib/match.js","../../node_modules/date-fns/locale/zh-CN.js"],"sourcesContent":["const formatDistanceLocale = {\n lessThanXSeconds: {\n one: \"不到 1 秒\",\n other: \"不到 {{count}} 秒\",\n },\n\n xSeconds: {\n one: \"1 秒\",\n other: \"{{count}} 秒\",\n },\n\n halfAMinute: \"半分钟\",\n\n lessThanXMinutes: {\n one: \"不到 1 分钟\",\n other: \"不到 {{count}} 分钟\",\n },\n\n xMinutes: {\n one: \"1 分钟\",\n other: \"{{count}} 分钟\",\n },\n\n xHours: {\n one: \"1 小时\",\n other: \"{{count}} 小时\",\n },\n\n aboutXHours: {\n one: \"大约 1 小时\",\n other: \"大约 {{count}} 小时\",\n },\n\n xDays: {\n one: \"1 天\",\n other: \"{{count}} 天\",\n },\n\n aboutXWeeks: {\n one: \"大约 1 个星期\",\n other: \"大约 {{count}} 个星期\",\n },\n\n xWeeks: {\n one: \"1 个星期\",\n other: \"{{count}} 个星期\",\n },\n\n aboutXMonths: {\n one: \"大约 1 个月\",\n other: \"大约 {{count}} 个月\",\n },\n\n xMonths: {\n one: \"1 个月\",\n other: \"{{count}} 个月\",\n },\n\n aboutXYears: {\n one: \"大约 1 年\",\n other: \"大约 {{count}} 年\",\n },\n\n xYears: {\n one: \"1 年\",\n other: \"{{count}} 年\",\n },\n\n overXYears: {\n one: \"超过 1 年\",\n other: \"超过 {{count}} 年\",\n },\n\n almostXYears: {\n one: \"将近 1 年\",\n other: \"将近 {{count}} 年\",\n },\n};\n\nexport const formatDistance = (token, count, options) => {\n let result;\n\n const tokenValue = formatDistanceLocale[token];\n if (typeof tokenValue === \"string\") {\n result = tokenValue;\n } else if (count === 1) {\n result = tokenValue.one;\n } else {\n result = tokenValue.other.replace(\"{{count}}\", String(count));\n }\n\n if (options?.addSuffix) {\n if (options.comparison && options.comparison > 0) {\n return result + \"内\";\n } else {\n return result + \"前\";\n }\n }\n\n return result;\n};\n","import { buildFormatLongFn } from \"../../_lib/buildFormatLongFn.js\";\n\nconst dateFormats = {\n full: \"y'年'M'月'd'日' EEEE\",\n long: \"y'年'M'月'd'日'\",\n medium: \"yyyy-MM-dd\",\n short: \"yy-MM-dd\",\n};\n\nconst timeFormats = {\n full: \"zzzz a h:mm:ss\",\n long: \"z a h:mm:ss\",\n medium: \"a h:mm:ss\",\n short: \"a h:mm\",\n};\n\nconst dateTimeFormats = {\n full: \"{{date}} {{time}}\",\n long: \"{{date}} {{time}}\",\n medium: \"{{date}} {{time}}\",\n short: \"{{date}} {{time}}\",\n};\n\nexport const formatLong = {\n date: buildFormatLongFn({\n formats: dateFormats,\n defaultWidth: \"full\",\n }),\n\n time: buildFormatLongFn({\n formats: timeFormats,\n defaultWidth: \"full\",\n }),\n\n dateTime: buildFormatLongFn({\n formats: dateTimeFormats,\n defaultWidth: \"full\",\n }),\n};\n","import { isSameWeek } from \"../../../isSameWeek.js\";\n\nfunction checkWeek(date, baseDate, options) {\n const baseFormat = \"eeee p\";\n\n if (isSameWeek(date, baseDate, options)) {\n return baseFormat; // in same week\n } else if (date.getTime() > baseDate.getTime()) {\n return \"'下个'\" + baseFormat; // in next week\n }\n return \"'上个'\" + baseFormat; // in last week\n}\n\nconst formatRelativeLocale = {\n lastWeek: checkWeek, // days before yesterday, maybe in this week or last week\n yesterday: \"'昨天' p\",\n today: \"'今天' p\",\n tomorrow: \"'明天' p\",\n nextWeek: checkWeek, // days after tomorrow, maybe in this week or next week\n other: \"PP p\",\n};\n\nexport const formatRelative = (token, date, baseDate, options) => {\n const format = formatRelativeLocale[token];\n\n if (typeof format === \"function\") {\n return format(date, baseDate, options);\n }\n\n return format;\n};\n","import { buildLocalizeFn } from \"../../_lib/buildLocalizeFn.js\";\n\nconst eraValues = {\n narrow: [\"前\", \"公元\"],\n abbreviated: [\"前\", \"公元\"],\n wide: [\"公元前\", \"公元\"],\n};\n\nconst quarterValues = {\n narrow: [\"1\", \"2\", \"3\", \"4\"],\n abbreviated: [\"第一季\", \"第二季\", \"第三季\", \"第四季\"],\n wide: [\"第一季度\", \"第二季度\", \"第三季度\", \"第四季度\"],\n};\n\nconst monthValues = {\n narrow: [\n \"一\",\n \"二\",\n \"三\",\n \"四\",\n \"五\",\n \"六\",\n \"七\",\n \"八\",\n \"九\",\n \"十\",\n \"十一\",\n \"十二\",\n ],\n\n abbreviated: [\n \"1月\",\n \"2月\",\n \"3月\",\n \"4月\",\n \"5月\",\n \"6月\",\n \"7月\",\n \"8月\",\n \"9月\",\n \"10月\",\n \"11月\",\n \"12月\",\n ],\n\n wide: [\n \"一月\",\n \"二月\",\n \"三月\",\n \"四月\",\n \"五月\",\n \"六月\",\n \"七月\",\n \"八月\",\n \"九月\",\n \"十月\",\n \"十一月\",\n \"十二月\",\n ],\n};\n\nconst dayValues = {\n narrow: [\"日\", \"一\", \"二\", \"三\", \"四\", \"五\", \"六\"],\n short: [\"日\", \"一\", \"二\", \"三\", \"四\", \"五\", \"六\"],\n abbreviated: [\"周日\", \"周一\", \"周二\", \"周三\", \"周四\", \"周五\", \"周六\"],\n\n wide: [\"星期日\", \"星期一\", \"星期二\", \"星期三\", \"星期四\", \"星期五\", \"星期六\"],\n};\n\nconst dayPeriodValues = {\n narrow: {\n am: \"上\",\n pm: \"下\",\n midnight: \"凌晨\",\n noon: \"午\",\n morning: \"早\",\n afternoon: \"下午\",\n evening: \"晚\",\n night: \"夜\",\n },\n abbreviated: {\n am: \"上午\",\n pm: \"下午\",\n midnight: \"凌晨\",\n noon: \"中午\",\n morning: \"早晨\",\n afternoon: \"中午\",\n evening: \"晚上\",\n night: \"夜间\",\n },\n wide: {\n am: \"上午\",\n pm: \"下午\",\n midnight: \"凌晨\",\n noon: \"中午\",\n morning: \"早晨\",\n afternoon: \"中午\",\n evening: \"晚上\",\n night: \"夜间\",\n },\n};\n\nconst formattingDayPeriodValues = {\n narrow: {\n am: \"上\",\n pm: \"下\",\n midnight: \"凌晨\",\n noon: \"午\",\n morning: \"早\",\n afternoon: \"下午\",\n evening: \"晚\",\n night: \"夜\",\n },\n abbreviated: {\n am: \"上午\",\n pm: \"下午\",\n midnight: \"凌晨\",\n noon: \"中午\",\n morning: \"早晨\",\n afternoon: \"中午\",\n evening: \"晚上\",\n night: \"夜间\",\n },\n wide: {\n am: \"上午\",\n pm: \"下午\",\n midnight: \"凌晨\",\n noon: \"中午\",\n morning: \"早晨\",\n afternoon: \"中午\",\n evening: \"晚上\",\n night: \"夜间\",\n },\n};\n\nconst ordinalNumber = (dirtyNumber, options) => {\n const number = Number(dirtyNumber);\n\n switch (options?.unit) {\n case \"date\":\n return number.toString() + \"日\";\n case \"hour\":\n return number.toString() + \"时\";\n case \"minute\":\n return number.toString() + \"分\";\n case \"second\":\n return number.toString() + \"秒\";\n default:\n return \"第 \" + number.toString();\n }\n};\n\nexport const localize = {\n ordinalNumber,\n\n era: buildLocalizeFn({\n values: eraValues,\n defaultWidth: \"wide\",\n }),\n\n quarter: buildLocalizeFn({\n values: quarterValues,\n defaultWidth: \"wide\",\n argumentCallback: (quarter) => quarter - 1,\n }),\n\n month: buildLocalizeFn({\n values: monthValues,\n defaultWidth: \"wide\",\n }),\n\n day: buildLocalizeFn({\n values: dayValues,\n defaultWidth: \"wide\",\n }),\n\n dayPeriod: buildLocalizeFn({\n values: dayPeriodValues,\n defaultWidth: \"wide\",\n formattingValues: formattingDayPeriodValues,\n defaultFormattingWidth: \"wide\",\n }),\n};\n","import { buildMatchFn } from \"../../_lib/buildMatchFn.js\";\nimport { buildMatchPatternFn } from \"../../_lib/buildMatchPatternFn.js\";\n\nconst matchOrdinalNumberPattern = /^(第\\s*)?\\d+(日|时|分|秒)?/i;\nconst parseOrdinalNumberPattern = /\\d+/i;\n\nconst matchEraPatterns = {\n narrow: /^(前)/i,\n abbreviated: /^(前)/i,\n wide: /^(公元前|公元)/i,\n};\nconst parseEraPatterns = {\n any: [/^(前)/i, /^(公元)/i],\n};\n\nconst matchQuarterPatterns = {\n narrow: /^[1234]/i,\n abbreviated: /^第[一二三四]刻/i,\n wide: /^第[一二三四]刻钟/i,\n};\nconst parseQuarterPatterns = {\n any: [/(1|一)/i, /(2|二)/i, /(3|三)/i, /(4|四)/i],\n};\n\nconst matchMonthPatterns = {\n narrow: /^(一|二|三|四|五|六|七|八|九|十[二一])/i,\n abbreviated: /^(一|二|三|四|五|六|七|八|九|十[二一]|\\d|1[12])月/i,\n wide: /^(一|二|三|四|五|六|七|八|九|十[二一])月/i,\n};\nconst parseMonthPatterns = {\n narrow: [\n /^一/i,\n /^二/i,\n /^三/i,\n /^四/i,\n /^五/i,\n /^六/i,\n /^七/i,\n /^八/i,\n /^九/i,\n /^十(?!(一|二))/i,\n /^十一/i,\n /^十二/i,\n ],\n\n any: [\n /^一|1/i,\n /^二|2/i,\n /^三|3/i,\n /^四|4/i,\n /^五|5/i,\n /^六|6/i,\n /^七|7/i,\n /^八|8/i,\n /^九|9/i,\n /^十(?!(一|二))|10/i,\n /^十一|11/i,\n /^十二|12/i,\n ],\n};\n\nconst matchDayPatterns = {\n narrow: /^[一二三四五六日]/i,\n short: /^[一二三四五六日]/i,\n abbreviated: /^周[一二三四五六日]/i,\n wide: /^星期[一二三四五六日]/i,\n};\nconst parseDayPatterns = {\n any: [/日/i, /一/i, /二/i, /三/i, /四/i, /五/i, /六/i],\n};\n\nconst matchDayPeriodPatterns = {\n any: /^(上午?|下午?|午夜|[中正]午|早上?|下午|晚上?|凌晨|)/i,\n};\nconst parseDayPeriodPatterns = {\n any: {\n am: /^上午?/i,\n pm: /^下午?/i,\n midnight: /^午夜/i,\n noon: /^[中正]午/i,\n morning: /^早上/i,\n afternoon: /^下午/i,\n evening: /^晚上?/i,\n night: /^凌晨/i,\n },\n};\n\nexport const match = {\n ordinalNumber: buildMatchPatternFn({\n matchPattern: matchOrdinalNumberPattern,\n parsePattern: parseOrdinalNumberPattern,\n valueCallback: (value) => parseInt(value, 10),\n }),\n\n era: buildMatchFn({\n matchPatterns: matchEraPatterns,\n defaultMatchWidth: \"wide\",\n parsePatterns: parseEraPatterns,\n defaultParseWidth: \"any\",\n }),\n\n quarter: buildMatchFn({\n matchPatterns: matchQuarterPatterns,\n defaultMatchWidth: \"wide\",\n parsePatterns: parseQuarterPatterns,\n defaultParseWidth: \"any\",\n valueCallback: (index) => index + 1,\n }),\n\n month: buildMatchFn({\n matchPatterns: matchMonthPatterns,\n defaultMatchWidth: \"wide\",\n parsePatterns: parseMonthPatterns,\n defaultParseWidth: \"any\",\n }),\n\n day: buildMatchFn({\n matchPatterns: matchDayPatterns,\n defaultMatchWidth: \"wide\",\n parsePatterns: parseDayPatterns,\n defaultParseWidth: \"any\",\n }),\n\n dayPeriod: buildMatchFn({\n matchPatterns: matchDayPeriodPatterns,\n defaultMatchWidth: \"any\",\n parsePatterns: parseDayPeriodPatterns,\n defaultParseWidth: \"any\",\n }),\n};\n","import { formatDistance } from \"./zh-CN/_lib/formatDistance.js\";\nimport { formatLong } from \"./zh-CN/_lib/formatLong.js\";\nimport { formatRelative } from \"./zh-CN/_lib/formatRelative.js\";\nimport { localize } from \"./zh-CN/_lib/localize.js\";\nimport { match } from \"./zh-CN/_lib/match.js\";\n\n/**\n * @category Locales\n * @summary Chinese Simplified locale.\n * @language Chinese Simplified\n * @iso-639-2 zho\n * @author Changyu Geng [@KingMario](https://github.com/KingMario)\n * @author Song Shuoyun [@fnlctrl](https://github.com/fnlctrl)\n * @author sabrinaM [@sabrinamiao](https://github.com/sabrinamiao)\n * @author Carney Wu [@cubicwork](https://github.com/cubicwork)\n * @author Terrence Lam [@skyuplam](https://github.com/skyuplam)\n */\nexport const zhCN = {\n code: \"zh-CN\",\n formatDistance: formatDistance,\n formatLong: formatLong,\n formatRelative: formatRelative,\n localize: localize,\n match: match,\n options: {\n weekStartsOn: 1 /* Monday */,\n firstWeekContainsDate: 4,\n },\n};\n\n// Fallback for modularized imports:\nexport default zhCN;\n"],"names":["formatDistanceLocale","formatDistance","token","count","options","result","tokenValue","dateFormats","timeFormats","dateTimeFormats","formatLong","buildFormatLongFn","checkWeek","date","baseDate","baseFormat","isSameWeek","formatRelativeLocale","formatRelative","format","eraValues","quarterValues","monthValues","dayValues","dayPeriodValues","formattingDayPeriodValues","ordinalNumber","dirtyNumber","number","localize","buildLocalizeFn","quarter","matchOrdinalNumberPattern","parseOrdinalNumberPattern","matchEraPatterns","parseEraPatterns","matchQuarterPatterns","parseQuarterPatterns","matchMonthPatterns","parseMonthPatterns","matchDayPatterns","parseDayPatterns","matchDayPeriodPatterns","parseDayPeriodPatterns","match","buildMatchPatternFn","value","buildMatchFn","index","zhCN"],"mappings":";;AAAA,MAAMA,IAAuB;AAAA,EAC3B,kBAAkB;AAAA,IAChB,KAAK;AAAA,IACL,OAAO;AAAA,EACX;AAAA,EAEE,UAAU;AAAA,IACR,KAAK;AAAA,IACL,OAAO;AAAA,EACX;AAAA,EAEE,aAAa;AAAA,EAEb,kBAAkB;AAAA,IAChB,KAAK;AAAA,IACL,OAAO;AAAA,EACX;AAAA,EAEE,UAAU;AAAA,IACR,KAAK;AAAA,IACL,OAAO;AAAA,EACX;AAAA,EAEE,QAAQ;AAAA,IACN,KAAK;AAAA,IACL,OAAO;AAAA,EACX;AAAA,EAEE,aAAa;AAAA,IACX,KAAK;AAAA,IACL,OAAO;AAAA,EACX;AAAA,EAEE,OAAO;AAAA,IACL,KAAK;AAAA,IACL,OAAO;AAAA,EACX;AAAA,EAEE,aAAa;AAAA,IACX,KAAK;AAAA,IACL,OAAO;AAAA,EACX;AAAA,EAEE,QAAQ;AAAA,IACN,KAAK;AAAA,IACL,OAAO;AAAA,EACX;AAAA,EAEE,cAAc;AAAA,IACZ,KAAK;AAAA,IACL,OAAO;AAAA,EACX;AAAA,EAEE,SAAS;AAAA,IACP,KAAK;AAAA,IACL,OAAO;AAAA,EACX;AAAA,EAEE,aAAa;AAAA,IACX,KAAK;AAAA,IACL,OAAO;AAAA,EACX;AAAA,EAEE,QAAQ;AAAA,IACN,KAAK;AAAA,IACL,OAAO;AAAA,EACX;AAAA,EAEE,YAAY;AAAA,IACV,KAAK;AAAA,IACL,OAAO;AAAA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;AAAA,EACvB,CAAG;AAAA,EAED,WAAWM,EAAa;AAAA,IACtB,eAAeL;AAAA,IACf,mBAAmB;AAAA,IACnB,eAAeC;AAAA,IACf,mBAAmB;AAAA,EACvB,CAAG;AACH,GChHaM,IAAO;AAAA,EAClB,MAAM;AAAA,EACN,gBAAgBhD;AAAA,EAChB,YAAYS;AAAA,EACZ,gBAAgBQ;AAAA,EAChB,UAAUW;AAAA,EACV,OAAOe;AAAA,EACP,SAAS;AAAA,IACP,cAAc;AAAA,IACd,uBAAuB;AAAA,EAC3B;AACA;","x_google_ignoreList":[0,1,2,3,4,5]}
|
package/dist/agent-catalog.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"packageVersion": "1.
|
|
3
|
+
"packageVersion": "1.74.0",
|
|
4
4
|
"components": [
|
|
5
5
|
{
|
|
6
6
|
"kind": "component",
|
|
@@ -22310,6 +22310,14 @@
|
|
|
22310
22310
|
"component": "phone-input",
|
|
22311
22311
|
"as": "phone"
|
|
22312
22312
|
},
|
|
22313
|
+
{
|
|
22314
|
+
"component": "otp-input",
|
|
22315
|
+
"as": "emailCode"
|
|
22316
|
+
},
|
|
22317
|
+
{
|
|
22318
|
+
"component": "otp-input",
|
|
22319
|
+
"as": "phoneCode"
|
|
22320
|
+
},
|
|
22313
22321
|
{
|
|
22314
22322
|
"component": "select",
|
|
22315
22323
|
"as": "branch"
|
|
@@ -22335,7 +22343,7 @@
|
|
|
22335
22343
|
{
|
|
22336
22344
|
"name": "read_form",
|
|
22337
22345
|
"safety": "read",
|
|
22338
|
-
"description": "Read which fields the form asks for and which have a problem. The host picks the fields, so read them from the page: each one that shows sits in a wrapper with `data-field`. A field with a problem has `aria-invalid=\"true\"` on its control and its message in a `data-slot=\"error\"` element inside the wrapper. After a refused submit the fields with a problem are also listed in `data-component=\"error-summary\"` at the top of the form, one item per field (`data-error-field`). A message about the whole form is in `data-field=\"form\"`. An email the person cannot change is marked `readonly`. Never read or repeat the password fields.",
|
|
22346
|
+
"description": "Read which fields the form asks for and which have a problem. The host picks the fields, so read them from the page: each one that shows sits in a wrapper with `data-field`. A field with a problem has `aria-invalid=\"true\"` on its control and its message in a `data-slot=\"error\"` element inside the wrapper. After a refused submit the fields with a problem are also listed in `data-component=\"error-summary\"` at the top of the form, one item per field (`data-error-field`). A message about the whole form is in `data-field=\"form\"`. An email the person cannot change is marked `readonly`. When the host asks for a code, a field's wrapper also carries `data-verification` (`idle`, `sent` or `verified`); a verified field is `readonly`. Never read or repeat the password fields.",
|
|
22339
22347
|
"descriptionKey": "ui.agent.registrationForm.workflows.readForm",
|
|
22340
22348
|
"uiActions": [],
|
|
22341
22349
|
"apiActions": []
|
|
@@ -22343,13 +22351,23 @@
|
|
|
22343
22351
|
{
|
|
22344
22352
|
"name": "register",
|
|
22345
22353
|
"safety": "write",
|
|
22346
|
-
"description": "Create the account (`data-action=\"submit\"`). The person fills in the fields and accepts the terms themselves; the form does not submit until every field is valid; it lists what is wrong in its error summary and moves focus there. The host then registers the account: through its `onSubmit` handler, or as a native form post to its own field names.",
|
|
22354
|
+
"description": "Create the account (`data-action=\"submit\"`). The person fills in the fields and accepts the terms themselves; the form does not submit until every field is valid and, when the host asks for codes, until the email and the phone are verified; it lists what is wrong in its error summary and moves focus there. The host then registers the account: through its `onSubmit` handler, or as a native form post to its own field names.",
|
|
22347
22355
|
"descriptionKey": "ui.agent.registrationForm.workflows.register",
|
|
22348
22356
|
"uiActions": [],
|
|
22349
22357
|
"apiActions": [
|
|
22350
22358
|
"account.register"
|
|
22351
22359
|
]
|
|
22352
22360
|
},
|
|
22361
|
+
{
|
|
22362
|
+
"name": "verify_contact",
|
|
22363
|
+
"safety": "write",
|
|
22364
|
+
"description": "Prove an email or a phone number with a code, when the host asks for it (a field wrapper has `data-verification`). Press Send code (`data-action=\"send-code\"`) beside the field; the code goes to the person's own inbox or phone, so the person reads it and types it into the code box (`data-component=\"otp-input\"`), or presses Verify (`data-action=\"verify-code\"`). Send a new code is `data-action=\"resend-code\"` and waits a few seconds; `data-action=\"change-value\"` returns to editing. Never read or guess the code. When it is right the field becomes `readonly` and `data-verification` is `verified`. The host's server holds the verified value and checks it again on submit.",
|
|
22365
|
+
"descriptionKey": "ui.agent.registrationForm.workflows.verifyContact",
|
|
22366
|
+
"uiActions": [],
|
|
22367
|
+
"apiActions": [
|
|
22368
|
+
"account.verify_contact"
|
|
22369
|
+
]
|
|
22370
|
+
},
|
|
22353
22371
|
{
|
|
22354
22372
|
"name": "dev_bypass",
|
|
22355
22373
|
"safety": "write",
|
|
@@ -22502,6 +22520,72 @@
|
|
|
22502
22520
|
}
|
|
22503
22521
|
]
|
|
22504
22522
|
},
|
|
22523
|
+
{
|
|
22524
|
+
"kind": "pattern",
|
|
22525
|
+
"id": "send-registration-link-form",
|
|
22526
|
+
"composes": [
|
|
22527
|
+
{
|
|
22528
|
+
"component": "card",
|
|
22529
|
+
"as": "card"
|
|
22530
|
+
},
|
|
22531
|
+
{
|
|
22532
|
+
"component": "alert",
|
|
22533
|
+
"as": "notice"
|
|
22534
|
+
},
|
|
22535
|
+
{
|
|
22536
|
+
"component": "error-summary",
|
|
22537
|
+
"as": "errorSummary"
|
|
22538
|
+
},
|
|
22539
|
+
{
|
|
22540
|
+
"component": "form-field",
|
|
22541
|
+
"as": "field"
|
|
22542
|
+
},
|
|
22543
|
+
{
|
|
22544
|
+
"component": "email-input",
|
|
22545
|
+
"as": "email"
|
|
22546
|
+
},
|
|
22547
|
+
{
|
|
22548
|
+
"component": "email-input",
|
|
22549
|
+
"as": "emailConfirm"
|
|
22550
|
+
},
|
|
22551
|
+
{
|
|
22552
|
+
"component": "phone-input",
|
|
22553
|
+
"as": "phone"
|
|
22554
|
+
},
|
|
22555
|
+
{
|
|
22556
|
+
"component": "phone-input",
|
|
22557
|
+
"as": "phoneConfirm"
|
|
22558
|
+
},
|
|
22559
|
+
{
|
|
22560
|
+
"component": "date-picker",
|
|
22561
|
+
"as": "allowLoginUntil"
|
|
22562
|
+
},
|
|
22563
|
+
{
|
|
22564
|
+
"component": "button",
|
|
22565
|
+
"as": "submit"
|
|
22566
|
+
}
|
|
22567
|
+
],
|
|
22568
|
+
"workflows": [
|
|
22569
|
+
{
|
|
22570
|
+
"name": "read_form",
|
|
22571
|
+
"safety": "read",
|
|
22572
|
+
"description": "Read which fields have a problem. Each field sits in a wrapper with `data-field`; a field with a problem has `aria-invalid=\"true\"` on its control and its message in a `data-slot=\"error\"` element. After a refused submit the fields with a problem are listed in `data-component=\"error-summary\"`. After a send the root has `data-state=\"sent\"` and the result is in `data-slot=\"sent\"`.",
|
|
22573
|
+
"descriptionKey": "ui.agent.sendRegistrationLinkForm.workflows.readForm",
|
|
22574
|
+
"uiActions": [],
|
|
22575
|
+
"apiActions": []
|
|
22576
|
+
},
|
|
22577
|
+
{
|
|
22578
|
+
"name": "send_link",
|
|
22579
|
+
"safety": "write",
|
|
22580
|
+
"description": "Send the registration link (`data-action=\"submit\"`). The person fills in the email twice, a mobile phone twice and the last day login is allowed; the form does not submit until every field is valid. The host then sends the email through a native form post or its `onSubmit` handler.",
|
|
22581
|
+
"descriptionKey": "ui.agent.sendRegistrationLinkForm.workflows.sendLink",
|
|
22582
|
+
"uiActions": [],
|
|
22583
|
+
"apiActions": [
|
|
22584
|
+
"doctor.sendRegistrationLink"
|
|
22585
|
+
]
|
|
22586
|
+
}
|
|
22587
|
+
]
|
|
22588
|
+
},
|
|
22505
22589
|
{
|
|
22506
22590
|
"kind": "pattern",
|
|
22507
22591
|
"id": "services",
|
package/dist/agent-i18n/en.json
CHANGED
|
@@ -2029,8 +2029,9 @@
|
|
|
2029
2029
|
},
|
|
2030
2030
|
"registrationForm": {
|
|
2031
2031
|
"workflows": {
|
|
2032
|
-
"readForm": "Read which fields the form asks for and which have a problem. The host picks the fields, so read them from the page: each one that shows sits in a wrapper with `data-field`. A field with a problem has `aria-invalid=\"true\"` on its control and its message in a `data-slot=\"error\"` element inside the wrapper. After a refused submit the fields with a problem are also listed in `data-component=\"error-summary\"` at the top of the form, one item per field (`data-error-field`). A message about the whole form is in `data-field=\"form\"`. An email the person cannot change is marked `readonly`. Never read or repeat the password fields.",
|
|
2033
|
-
"register": "Create the account (`data-action=\"submit\"`). The person fills in the fields and accepts the terms themselves; the form does not submit until every field is valid; it lists what is wrong in its error summary and moves focus there. The host then registers the account: through its `onSubmit` handler, or as a native form post to its own field names.",
|
|
2032
|
+
"readForm": "Read which fields the form asks for and which have a problem. The host picks the fields, so read them from the page: each one that shows sits in a wrapper with `data-field`. A field with a problem has `aria-invalid=\"true\"` on its control and its message in a `data-slot=\"error\"` element inside the wrapper. After a refused submit the fields with a problem are also listed in `data-component=\"error-summary\"` at the top of the form, one item per field (`data-error-field`). A message about the whole form is in `data-field=\"form\"`. An email the person cannot change is marked `readonly`. When the host asks for a code, a field's wrapper also carries `data-verification` (`idle`, `sent` or `verified`); a verified field is `readonly`. Never read or repeat the password fields.",
|
|
2033
|
+
"register": "Create the account (`data-action=\"submit\"`). The person fills in the fields and accepts the terms themselves; the form does not submit until every field is valid and, when the host asks for codes, until the email and the phone are verified; it lists what is wrong in its error summary and moves focus there. The host then registers the account: through its `onSubmit` handler, or as a native form post to its own field names.",
|
|
2034
|
+
"verifyContact": "Prove an email or a phone number with a code, when the host asks for it (a field wrapper has `data-verification`). Press Send code (`data-action=\"send-code\"`) beside the field; the code goes to the person's own inbox or phone, so the person reads it and types it into the code box (`data-component=\"otp-input\"`), or presses Verify (`data-action=\"verify-code\"`). Send a new code is `data-action=\"resend-code\"` and waits a few seconds; `data-action=\"change-value\"` returns to editing. Never read or guess the code. When it is right the field becomes `readonly` and `data-verification` is `verified`. The host's server holds the verified value and checks it again on submit.",
|
|
2034
2035
|
"devBypass": "Development only: press the shortcut (`data-component=\"dev-bypass-button\"`). It puts the values the host supplied into the fields that show, as if typed, and submits the form through the normal path when the host asked for that; a host may instead run a handler of its own, such as a development-only route. The kit holds no test data. The button is present only when the host's server reports a development environment, and what it submits is checked by the server like any other submit."
|
|
2035
2036
|
}
|
|
2036
2037
|
},
|
|
@@ -2045,6 +2046,12 @@
|
|
|
2045
2046
|
"dismissAlert": "Dismiss an item from the top-of-page alerts strip. Persists the dismissal so it stays hidden."
|
|
2046
2047
|
}
|
|
2047
2048
|
},
|
|
2049
|
+
"sendRegistrationLinkForm": {
|
|
2050
|
+
"workflows": {
|
|
2051
|
+
"readForm": "Read which fields have a problem. Each field sits in a wrapper with `data-field`; a field with a problem has `aria-invalid=\"true\"` on its control and its message in a `data-slot=\"error\"` element. After a refused submit the fields with a problem are listed in `data-component=\"error-summary\"`. After a send the root has `data-state=\"sent\"` and the result is in `data-slot=\"sent\"`.",
|
|
2052
|
+
"sendLink": "Send the registration link (`data-action=\"submit\"`). The person fills in the email twice, a mobile phone twice and the last day login is allowed; the form does not submit until every field is valid. The host then sends the email through a native form post or its `onSubmit` handler."
|
|
2053
|
+
}
|
|
2054
|
+
},
|
|
2048
2055
|
"services": {
|
|
2049
2056
|
"workflows": {
|
|
2050
2057
|
"filterServices": "Narrow the catalogue by name, code, category, VAT rate or active status using the per-column filters.",
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { jsxs as i, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { useId as d } from "react";
|
|
3
|
+
function c({
|
|
4
|
+
className: n,
|
|
5
|
+
size: e,
|
|
6
|
+
variant: t = "gradient"
|
|
7
|
+
}) {
|
|
8
|
+
const o = `alia-asteroid-gradient-${d().replace(/:/g, "")}`;
|
|
9
|
+
return /* @__PURE__ */ i(
|
|
10
|
+
"svg",
|
|
11
|
+
{
|
|
12
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
13
|
+
viewBox: "0 0 24 24",
|
|
14
|
+
width: e,
|
|
15
|
+
height: e,
|
|
16
|
+
fill: "none",
|
|
17
|
+
strokeLinecap: "round",
|
|
18
|
+
strokeLinejoin: "round",
|
|
19
|
+
strokeWidth: "2",
|
|
20
|
+
"aria-hidden": "true",
|
|
21
|
+
className: n,
|
|
22
|
+
children: [
|
|
23
|
+
t === "gradient" ? /* @__PURE__ */ r("defs", { children: /* @__PURE__ */ i(
|
|
24
|
+
"linearGradient",
|
|
25
|
+
{
|
|
26
|
+
id: o,
|
|
27
|
+
gradientUnits: "userSpaceOnUse",
|
|
28
|
+
x1: "0",
|
|
29
|
+
y1: "12",
|
|
30
|
+
x2: "24",
|
|
31
|
+
y2: "12",
|
|
32
|
+
children: [
|
|
33
|
+
/* @__PURE__ */ r("stop", { offset: "0%", stopColor: "var(--accent)" }),
|
|
34
|
+
/* @__PURE__ */ r("stop", { offset: "100%", stopColor: "var(--primary)" })
|
|
35
|
+
]
|
|
36
|
+
}
|
|
37
|
+
) }) : null,
|
|
38
|
+
/* @__PURE__ */ r(
|
|
39
|
+
"path",
|
|
40
|
+
{
|
|
41
|
+
d: "M12.983 21.186a1 1 0 0 1-1.966 0 10 10 0 0 0-8.203-8.203 1 1 0 0 1 0-1.966 10 10 0 0 0 8.203-8.203 1 1 0 0 1 1.966 0 10 10 0 0 0 8.203 8.203 1 1 0 0 1 0 1.966 10 10 0 0 0-8.203 8.203",
|
|
42
|
+
stroke: t === "gradient" ? `url(#${o})` : "currentColor"
|
|
43
|
+
}
|
|
44
|
+
)
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
export {
|
|
50
|
+
c as AliaAsteroidIcon
|
|
51
|
+
};
|
|
52
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/patterns/alia-assistant/alia-asteroid-icon.tsx"],"sourcesContent":["import { useId } from 'react';\n\nexport interface AliaAsteroidIconProps {\n className?: string;\n /** Width and height (px number or CSS length). No default, unlike lucide's 24:\n * without it the glyph fills the box its host sizes, such as a rail icon slot. */\n size?: number | string;\n /** `'gradient'` (default) — accent→primary stroke. `'mono'` — inherits\n * `currentColor` so the parent can control the stroke via `text-*`. */\n variant?: 'gradient' | 'mono';\n}\n\n/**\n * The Alia glyph: the Lucide Astroid path with an accent-to-primary stroke.\n * Always `aria-hidden`: name the control that hosts it, such as a rail tool button.\n */\nexport function AliaAsteroidIcon({\n className,\n size,\n variant = 'gradient',\n}: AliaAsteroidIconProps) {\n // A per-instance id keeps each glyph's <defs> apart on a shared page, and\n // `userSpaceOnUse` spans the gradient across the full 24 × 24 viewBox.\n const uid = useId().replace(/:/g, '');\n const gradientId = `alia-asteroid-gradient-${uid}`;\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n width={size}\n height={size}\n fill=\"none\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth=\"2\"\n aria-hidden=\"true\"\n className={className}\n >\n {variant === 'gradient' ? (\n <defs>\n <linearGradient\n id={gradientId}\n gradientUnits=\"userSpaceOnUse\"\n x1=\"0\"\n y1=\"12\"\n x2=\"24\"\n y2=\"12\"\n >\n <stop offset=\"0%\" stopColor=\"var(--accent)\" />\n <stop offset=\"100%\" stopColor=\"var(--primary)\" />\n </linearGradient>\n </defs>\n ) : null}\n <path\n d=\"M12.983 21.186a1 1 0 0 1-1.966 0 10 10 0 0 0-8.203-8.203 1 1 0 0 1 0-1.966 10 10 0 0 0 8.203-8.203 1 1 0 0 1 1.966 0 10 10 0 0 0 8.203 8.203 1 1 0 0 1 0 1.966 10 10 0 0 0-8.203 8.203\"\n stroke={variant === 'gradient' ? `url(#${gradientId})` : 'currentColor'}\n />\n </svg>\n );\n}\n"],"names":["AliaAsteroidIcon","className","size","variant","gradientId","useId","jsxs","jsx"],"mappings":";;AAgBO,SAASA,EAAiB;AAAA,EAC/B,WAAAC;AAAA,EACA,MAAAC;AAAA,EACA,SAAAC,IAAU;AACZ,GAA0B;AAIxB,QAAMC,IAAa,0BADPC,EAAA,EAAQ,QAAQ,MAAM,EAAE,CACY;AAChD,SACE,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,OAAM;AAAA,MACN,SAAQ;AAAA,MACR,OAAOJ;AAAA,MACP,QAAQA;AAAA,MACR,MAAK;AAAA,MACL,eAAc;AAAA,MACd,gBAAe;AAAA,MACf,aAAY;AAAA,MACZ,eAAY;AAAA,MACZ,WAAAD;AAAA,MAEC,UAAA;AAAA,QAAAE,MAAY,+BACV,QAAA,EACC,UAAA,gBAAAG;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,IAAIF;AAAA,YACJ,eAAc;AAAA,YACd,IAAG;AAAA,YACH,IAAG;AAAA,YACH,IAAG;AAAA,YACH,IAAG;AAAA,YAEH,UAAA;AAAA,cAAA,gBAAAG,EAAC,QAAA,EAAK,QAAO,MAAK,WAAU,iBAAgB;AAAA,cAC5C,gBAAAA,EAAC,QAAA,EAAK,QAAO,QAAO,WAAU,iBAAA,CAAiB;AAAA,YAAA;AAAA,UAAA;AAAA,QAAA,GAEnD,IACE;AAAA,QACJ,gBAAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,GAAE;AAAA,YACF,QAAQJ,MAAY,aAAa,QAAQC,CAAU,MAAM;AAAA,UAAA;AAAA,QAAA;AAAA,MAC3D;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|