@wssto2/vue-core 0.1.0 → 0.3.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/README.md +53 -9
- package/dist/AccessGate.vue_vue_type_script_setup_true_lang-DKX3PH2n.js +22 -0
- package/dist/AccountMenuItem.vue_vue_type_script_setup_true_lang-DIGqTLwd.js +76 -0
- package/dist/ActionRow.vue_vue_type_script_setup_true_lang-B7Lpfkf6.js +45 -0
- package/dist/Activity-DviO0VQ8.js +156 -0
- package/dist/{AdaptivePageShell.vue_vue_type_script_setup_true_lang-CKghARkW.js → AdaptivePageShell.vue_vue_type_script_setup_true_lang-CvAnzdc1.js} +48 -47
- package/dist/{AlertDialog.vue_vue_type_script_setup_true_lang-BZb4qKXo.js → AlertDialog.vue_vue_type_script_setup_true_lang-CJsMUIUg.js} +2 -2
- package/dist/{AsyncSection.vue_vue_type_script_setup_true_lang-B82bl36A.js → AsyncSection.vue_vue_type_script_setup_true_lang-CCtthMRd.js} +4 -4
- package/dist/Badge.vue_vue_type_script_setup_true_lang-DJyZc0C7.js +51 -0
- package/dist/{Banner.vue_vue_type_script_setup_true_lang-n_wGPIIu.js → Banner.vue_vue_type_script_setup_true_lang-Cib_YYpr.js} +1 -1
- package/dist/{BottomDock.vue_vue_type_script_setup_true_lang-DhlMnPC2.js → BottomDock.vue_vue_type_script_setup_true_lang-CjN7xYEr.js} +1 -1
- package/dist/Button.vue_vue_type_script_setup_true_lang-CYil8h9z.js +182 -0
- package/dist/Changes-DlT5mN9G.js +129 -0
- package/dist/CollectionPage.vue_vue_type_script_setup_true_lang-CXILftEc.js +1481 -0
- package/dist/CountryFlag.vue_vue_type_script_setup_true_lang-Kry_vPPZ.js +299 -0
- package/dist/DataTable.vue_vue_type_script_setup_true_lang-DSYgS9lC.js +52 -0
- package/dist/DateField.vue_vue_type_script_setup_true_lang-DMVjNsaM.js +1099 -0
- package/dist/{DiscardChangesModal.vue_vue_type_script_setup_true_lang-Bx5O1RZJ.js → DiscardChangesModal.vue_vue_type_script_setup_true_lang-Cb3xJI1x.js} +1 -1
- package/dist/{EmptyState.vue_vue_type_script_setup_true_lang-BeGpHMUP.js → EmptyState.vue_vue_type_script_setup_true_lang-C2ZYIT9F.js} +1 -1
- package/dist/FormErrors.vue_vue_type_script_setup_true_lang-DVgNBQ8p.js +276 -0
- package/dist/FormGroup.vue_vue_type_script_setup_true_lang-0mfG8TkU.js +136 -0
- package/dist/FormView.vue_vue_type_script_setup_true_lang-Bz2m3AtF.js +38 -0
- package/dist/General-BD-Hcz0a.js +145 -0
- package/dist/{Icon.vue_vue_type_script_lang-DtC4_mkz.js → Icon.vue_vue_type_script_lang-VvcV2Bzo.js} +46 -33
- package/dist/{IconTile.vue_vue_type_script_setup_true_lang-Csfv6Sel.js → IconTile.vue_vue_type_script_setup_true_lang-D7QgnUyN.js} +1 -1
- package/dist/KeyValue.vue_vue_type_script_setup_true_lang-wcZcvnow.js +35 -0
- package/dist/{LeaveGuardRoot.vue_vue_type_script_setup_true_lang-DH6EB8br.js → LeaveGuardRoot.vue_vue_type_script_setup_true_lang-C2udmeEA.js} +2 -2
- package/dist/{Menu.vue_vue_type_script_setup_true_lang-D44EHXQZ.js → Menu.vue_vue_type_script_setup_true_lang-BNAjx9tj.js} +61 -57
- package/dist/{Modal.vue_vue_type_script_setup_true_lang-DYQgaUtj.js → Modal.vue_vue_type_script_setup_true_lang-D7SwVPpL.js} +139 -129
- package/dist/NewRolePage-Dla4YnMs.js +42 -0
- package/dist/NoAccess.vue_vue_type_script_setup_true_lang-8m9cNptR.js +31 -0
- package/dist/NumberField.vue_vue_type_script_setup_true_lang-CYRg7Kfg.js +113 -0
- package/dist/OtpInput.vue_vue_type_script_setup_true_lang-gp4FfWAH.js +95 -0
- package/dist/PageBar.vue_vue_type_script_setup_true_lang-Cfr5xsJx.js +47 -0
- package/dist/{Panel.vue_vue_type_script_setup_true_lang-BQmv3cLb.js → Panel.vue_vue_type_script_setup_true_lang-BCRxRK4D.js} +1 -1
- package/dist/{PhotoViewer.vue_vue_type_script_setup_true_lang-DDVQXJRB.js → PhotoViewer.vue_vue_type_script_setup_true_lang-B3Q4dhqJ.js} +2 -2
- package/dist/Popover.vue_vue_type_script_setup_true_lang-Dx-tDhNE.js +125 -0
- package/dist/ProfilePage-OJMQ8cr8.js +691 -0
- package/dist/{ProgressTrack.vue_vue_type_script_setup_true_lang-1DDaNs2W.js → ProgressTrack.vue_vue_type_script_setup_true_lang-B6Prw9hi.js} +2 -2
- package/dist/RecordHeader.vue_vue_type_script_setup_true_lang-DKsaKlAq.js +64 -0
- package/dist/ResourcePage.vue_vue_type_script_setup_true_lang-CJcKa9SW.js +173 -0
- package/dist/RoleEditor.vue_vue_type_script_setup_true_lang-DuEPOmjI.js +299 -0
- package/dist/RolePage-bZzv_E4l.js +315 -0
- package/dist/RolesPage-BniZv0nB.js +115 -0
- package/dist/SectionIntro.vue_vue_type_script_setup_true_lang-CZtPrmXD.js +23 -0
- package/dist/SectionList.vue_vue_type_script_setup_true_lang-BKP_bge8.js +148 -0
- package/dist/SectionNavigator.vue_vue_type_script_setup_true_lang-BgGEGxSI.js +314 -0
- package/dist/SegmentedField.vue_vue_type_script_setup_true_lang-BZ9UdgA1.js +58 -0
- package/dist/SelectField.vue_vue_type_script_setup_true_lang-BiGaEKBQ.js +422 -0
- package/dist/SessionList.vue_vue_type_script_setup_true_lang-DUQpr7gb.js +111 -0
- package/dist/Sessions-Co5-xdeb.js +96 -0
- package/dist/Sheet.vue_vue_type_script_setup_true_lang-bHYzx7-J.js +142 -0
- package/dist/SignIn-BWwFbxki.js +140 -0
- package/dist/SignInPage-FnLtoi2q.js +60 -0
- package/dist/SignInTable.vue_vue_type_script_setup_true_lang-Dnx3T_42.js +79 -0
- package/dist/SignIns-3UcI64_h.js +66 -0
- package/dist/SwipeActions.vue_vue_type_script_setup_true_lang-4I8m27ol.js +93 -0
- package/dist/Tabs.vue_vue_type_script_setup_true_lang-BeGaydRr.js +155 -0
- package/dist/TextField.vue_vue_type_script_setup_true_lang-C_FMf3Vc.js +269 -0
- package/dist/TextareaField.vue_vue_type_script_setup_true_lang-CU3KTKIJ.js +127 -0
- package/dist/{Timestamp.vue_vue_type_script_setup_true_lang-CSY_mMm1.js → Timestamp.vue_vue_type_script_setup_true_lang-1RJGKxbD.js} +1 -1
- package/dist/{Tooltip.vue_vue_type_script_setup_true_lang-BJWPVyfT.js → Tooltip.vue_vue_type_script_setup_true_lang-OOD_XNWx.js} +1 -1
- package/dist/UserRecord-Ci8HfwbX.js +267 -0
- package/dist/UsersList-vEJ-cgkT.js +155 -0
- package/dist/ViewTabs.vue_vue_type_script_setup_true_lang-ByqTU2JT.js +28 -0
- package/dist/access/AddRoleDialog.vue.d.ts +19 -0
- package/dist/access/BindingRow.vue.d.ts +19 -0
- package/dist/access/EffectiveAccess.vue.d.ts +12 -0
- package/dist/access/NewRolePage.vue.d.ts +2 -0
- package/dist/access/PermissionTree.vue.d.ts +13 -0
- package/dist/access/PersonAccess.vue.d.ts +21 -0
- package/dist/access/ReplaceRoleDialog.vue.d.ts +17 -0
- package/dist/access/RoleCompareDialog.vue.d.ts +14 -0
- package/dist/access/RoleEditor.vue.d.ts +28 -0
- package/dist/access/RolePage.vue.d.ts +2 -0
- package/dist/access/RolesPage.vue.d.ts +2 -0
- package/dist/access/api.d.ts +26 -0
- package/dist/access/catalogue.d.ts +64 -0
- package/dist/access/context.d.ts +20 -0
- package/dist/access/effective.d.ts +42 -0
- package/dist/access/feature.d.ts +27 -0
- package/dist/access/index.d.ts +13 -0
- package/dist/access/index.js +15 -0
- package/dist/access/labels.d.ts +35 -0
- package/dist/access/refusals.d.ts +6 -0
- package/dist/access/routes.d.ts +45 -0
- package/dist/access/scopes.d.ts +20 -0
- package/dist/app/application.d.ts +5 -0
- package/dist/app/contributions.d.ts +1 -1
- package/dist/app/environment.d.ts +2 -0
- package/dist/app/feature.d.ts +8 -0
- package/dist/app/index.js +260 -294
- package/dist/bottomDock-BZEiOPYZ.js +12 -0
- package/dist/button/Button.vue.d.ts +3 -3
- package/dist/button/index.d.ts +1 -1
- package/dist/button/index.js +5 -3
- package/dist/button/shortcut.d.ts +28 -2
- package/dist/chrome-BS3xJcad.js +93 -0
- package/dist/client/client.d.ts +13 -0
- package/dist/client/index.d.ts +3 -1
- package/dist/client/index.js +19 -138
- package/dist/client/route.d.ts +59 -0
- package/dist/client-Bw0aM5Gu.js +147 -0
- package/dist/closeOverlays-CjVsIrpL.js +8 -0
- package/dist/collection/CollectionPage.vue.d.ts +1 -0
- package/dist/collection/CollectionRows.vue.d.ts +59 -0
- package/dist/collection/CollectionTable.vue.d.ts +1 -1
- package/dist/collection/DataTable.vue.d.ts +47 -0
- package/dist/collection/RowActions.vue.d.ts +19 -0
- package/dist/collection/columns.d.ts +2 -0
- package/dist/collection/http.d.ts +4 -2
- package/dist/collection/index.d.ts +4 -2
- package/dist/collection/index.js +87 -2299
- package/dist/collection/rowLayout.d.ts +10 -0
- package/dist/collection/slots.d.ts +6 -3
- package/dist/content/index.js +37 -66
- package/dist/contributions-CDDg3fKp.js +26 -0
- package/dist/controls/DateButton.vue.d.ts +1 -1
- package/dist/controls/PopupButton.vue.d.ts +1 -1
- package/dist/controls/index.js +11 -10
- package/dist/defineRoutes-BGAdiIrt.js +19 -0
- package/dist/describeError-Ctga6GcS.js +41 -0
- package/dist/dialogStack-DZZg55w0.js +31 -0
- package/dist/environment-Dva-SG8D.js +6 -0
- package/dist/{error-Bb_dr_Ay.js → error-CD7x0Jrz.js} +2 -2
- package/dist/feature-DdUAfyi4.js +25 -0
- package/dist/fieldMessages-C3Rpbktw.js +25 -0
- package/dist/form/CheckboxField.vue.d.ts +1 -1
- package/dist/form/CommandDialog.vue.d.ts +13 -2
- package/dist/form/DateField.vue.d.ts +1 -1
- package/dist/form/DateTimeField.vue.d.ts +1 -1
- package/dist/form/EditorPage.vue.d.ts +1 -1
- package/dist/form/Field.vue.d.ts +1 -1
- package/dist/form/FileField.vue.d.ts +1 -1
- package/dist/form/FormGroup.vue.d.ts +1 -1
- package/dist/form/FormGroupButton.vue.d.ts +1 -1
- package/dist/form/FormRow.vue.d.ts +1 -1
- package/dist/form/I18nField.vue.d.ts +3 -3
- package/dist/form/MoneyField.vue.d.ts +1 -1
- package/dist/form/MonthYearField.vue.d.ts +1 -1
- package/dist/form/MultiSelectField.vue.d.ts +4 -1
- package/dist/form/NumberCell.vue.d.ts +1 -1
- package/dist/form/NumberField.vue.d.ts +8 -2
- package/dist/form/OptionList.vue.d.ts +6 -2
- package/dist/form/OtpInput.vue.d.ts +2 -2
- package/dist/form/PhotoField.vue.d.ts +1 -1
- package/dist/form/SelectField.vue.d.ts +4 -1
- package/dist/form/SwitchField.vue.d.ts +1 -1
- package/dist/form/TextField.vue.d.ts +3 -3
- package/dist/form/TextareaField.vue.d.ts +3 -3
- package/dist/form/TimeField.vue.d.ts +1 -1
- package/dist/form/date/DatePickerSheet.vue.d.ts +1 -1
- package/dist/form/date/MonthYearPanel.vue.d.ts +1 -1
- package/dist/form/index.d.ts +2 -0
- package/dist/form/index.js +1273 -3509
- package/dist/form/suggestions.d.ts +11 -0
- package/dist/form/useOptions.d.ts +60 -0
- package/dist/guards-Cd1V28oG.js +51 -0
- package/dist/http-DGGSKWvU.js +193 -0
- package/dist/i18n/describeError.d.ts +31 -0
- package/dist/i18n/index.d.ts +307 -0
- package/dist/i18n/index.js +54 -52
- package/dist/icon/core.d.ts +13 -0
- package/dist/icon/index.js +1 -1
- package/dist/identity/ImpersonationBanner.vue.d.ts +2 -0
- package/dist/identity/LocaleSync.vue.d.ts +2 -0
- package/dist/identity/SessionExpiry.vue.d.ts +2 -0
- package/dist/identity/SignInAsButton.vue.d.ts +15 -0
- package/dist/identity/SignInPage.vue.d.ts +2 -0
- package/dist/identity/context.d.ts +7 -0
- package/dist/identity/feature.d.ts +16 -0
- package/dist/identity/fieldMessages.d.ts +15 -0
- package/dist/identity/index.d.ts +16 -0
- package/dist/identity/index.js +18 -0
- package/dist/identity/profile/DetailsPanel.vue.d.ts +11 -0
- package/dist/identity/profile/EmailChangeDialog.vue.d.ts +14 -0
- package/dist/identity/profile/EmailPanel.vue.d.ts +11 -0
- package/dist/identity/profile/PanelActions.vue.d.ts +17 -0
- package/dist/identity/profile/PasswordPanel.vue.d.ts +2 -0
- package/dist/identity/profile/ProfileMenuItem.vue.d.ts +2 -0
- package/dist/identity/profile/ProfilePage.vue.d.ts +2 -0
- package/dist/identity/profile/SessionsPanel.vue.d.ts +2 -0
- package/dist/identity/profile/SignInsPanel.vue.d.ts +2 -0
- package/dist/identity/profile/VerifyCode.vue.d.ts +49 -0
- package/dist/identity/profile/routes.d.ts +13 -0
- package/dist/identity/session.d.ts +30 -0
- package/dist/identity/shared/ActionRow.vue.d.ts +20 -0
- package/dist/identity/shared/ChangeFeed.vue.d.ts +11 -0
- package/dist/identity/shared/PageBar.vue.d.ts +12 -0
- package/dist/identity/shared/SectionIntro.vue.d.ts +16 -0
- package/dist/identity/shared/SessionList.vue.d.ts +19 -0
- package/dist/{phone/CountryFlag.vue.d.ts → identity/shared/SignInTable.vue.d.ts} +5 -4
- package/dist/identity/shared/ViewTabs.vue.d.ts +23 -0
- package/dist/identity/shared/signInEvents.d.ts +9 -0
- package/dist/identity/signIn.d.ts +27 -0
- package/dist/identity/useSignInForm.d.ts +20 -0
- package/dist/identity/user.d.ts +6 -0
- package/dist/identity/users/DeactivateDialog.vue.d.ts +18 -0
- package/dist/identity/users/NewUserDialog.vue.d.ts +9 -0
- package/dist/identity/users/SetPasswordDialog.vue.d.ts +16 -0
- package/dist/identity/users/UserRecord.vue.d.ts +2 -0
- package/dist/identity/users/UsersList.vue.d.ts +2 -0
- package/dist/identity/users/access.d.ts +4 -0
- package/dist/identity/users/context.d.ts +9 -0
- package/dist/identity/users/feature.d.ts +34 -0
- package/dist/identity/users/languages.d.ts +4 -0
- package/dist/identity/users/list.d.ts +8 -0
- package/dist/identity/users/person.d.ts +26 -0
- package/dist/identity/users/personSections.d.ts +22 -0
- package/dist/identity/users/routes.d.ts +22 -0
- package/dist/identity/users/sections/Activity.vue.d.ts +2 -0
- package/dist/identity/users/sections/Changes.vue.d.ts +2 -0
- package/dist/identity/users/sections/General.vue.d.ts +2 -0
- package/dist/identity/users/sections/Sessions.vue.d.ts +2 -0
- package/dist/identity/users/sections/SignIn.vue.d.ts +2 -0
- package/dist/identity/users/sections/SignIns.vue.d.ts +2 -0
- package/dist/identity/users/status.d.ts +4 -0
- package/dist/index-B2dbYZR9.js +706 -0
- package/dist/index-BAcl44SC.js +459 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/internal/CountryFlag.vue.d.ts +10 -0
- package/dist/internal/languageName.d.ts +2 -0
- package/dist/keepAlive-WYQGRhuz.js +48 -0
- package/dist/languageName-CItV_SOv.js +11 -0
- package/dist/languages-BShG9LpE.js +10 -0
- package/dist/leaveGuard-Cc8yeLxM.js +72 -0
- package/dist/modal/Modal.vue.d.ts +4 -0
- package/dist/modal/ShortcutHelp.vue.d.ts +2 -0
- package/dist/modal/index.d.ts +2 -0
- package/dist/modal/index.js +64 -6
- package/dist/modal/placement.d.ts +22 -0
- package/dist/modules/access/entities.d.ts +112 -0
- package/dist/modules/access/routes.d.ts +67 -0
- package/dist/modules/access/schemas.d.ts +73 -0
- package/dist/modules/identity/entities.d.ts +150 -0
- package/dist/modules/identity/routes.d.ts +118 -0
- package/dist/modules/identity/schemas.d.ts +145 -0
- package/dist/{navigation-B33ikiCS.js → navigation-BPWa63ge.js} +21 -20
- package/dist/neighbors-D0WRBxXI.js +86 -0
- package/dist/{options-CjSz2dQK.js → options-BXkMR63B.js} +48 -49
- package/dist/overlay/AlertDialog.vue.d.ts +3 -3
- package/dist/overlay/Popover.vue.d.ts +4 -1
- package/dist/overlay/closeOverlays.d.ts +7 -0
- package/dist/overlay/dialogStack.d.ts +9 -0
- package/dist/overlay/index.d.ts +1 -1
- package/dist/overlay/index.js +20 -18
- package/dist/page/AdaptivePageShell.vue.d.ts +2 -2
- package/dist/page/ResourceHeader.vue.d.ts +2 -2
- package/dist/page/index.js +99 -457
- package/dist/phone/PhoneField.vue.d.ts +2 -2
- package/dist/phone/index.js +247 -540
- package/dist/platform/AccessGate.vue.d.ts +50 -0
- package/dist/platform/index.d.ts +4 -2
- package/dist/platform/index.js +38 -35
- package/dist/platform/platform.d.ts +2 -2
- package/dist/platform/session.d.ts +22 -1
- package/dist/platform-hunMqFdB.js +255 -0
- package/dist/resource/index.js +8 -248
- package/dist/routeResource-DstM0hvf.js +82 -0
- package/dist/router/guards.d.ts +7 -1
- package/dist/router/index.js +23 -37
- package/dist/router/navigation.d.ts +1 -1
- package/dist/rowLayout-BI7a3Kom.js +603 -0
- package/dist/sectionIndex-BS0ic5W7.js +86 -0
- package/dist/{sections-LtxV5Mtk.js → sections-BEqW1dOc.js} +1 -1
- package/dist/shell/AccountMenuItem.vue.d.ts +4 -1
- package/dist/shell/BackofficeShell.vue.d.ts +2 -2
- package/dist/shell/ShellBrand.vue.d.ts +1 -1
- package/dist/shell/backofficeShell.d.ts +1 -1
- package/dist/shell/identity.d.ts +1 -1
- package/dist/shell/index.js +476 -532
- package/dist/state/Badge.vue.d.ts +17 -10
- package/dist/state/ProgressTrack.vue.d.ts +1 -1
- package/dist/state/hue.d.ts +8 -0
- package/dist/state/index.d.ts +2 -0
- package/dist/state/index.js +34 -31
- package/dist/state/useLoad.d.ts +41 -0
- package/dist/status-C9aXR-Jb.js +33 -0
- package/dist/styles.css +1 -1
- package/dist/suggestions-BJAqOj4c.js +138 -0
- package/dist/testing/app.d.ts +61 -0
- package/dist/testing/async.d.ts +12 -0
- package/dist/testing/collection.d.ts +18 -0
- package/dist/testing/format.d.ts +9 -0
- package/dist/testing/i18n.d.ts +16 -0
- package/dist/testing/index.d.ts +14 -0
- package/dist/testing/index.js +178 -0
- package/dist/testing/media.d.ts +23 -0
- package/dist/testing/platform.d.ts +40 -0
- package/dist/testing/transport.d.ts +40 -0
- package/dist/toast-D9Z5To38.js +13 -0
- package/dist/useCommand-BgRwnYlV.js +135 -0
- package/dist/{useDialog-wmyNx2j_.js → useDialog-CXR3hN0G.js} +1 -1
- package/dist/useLoad-CYRVx6HW.js +39 -0
- package/dist/useResourceForm-Bgc9jMcu.js +52 -0
- package/dist/useSaveChrome-chi6D3HY.js +25 -0
- package/dist/useSheetDrag-OsD6Eb6I.js +72 -0
- package/package.json +26 -5
- package/src/styles/theme.css +60 -0
- package/dist/Badge.vue_vue_type_script_setup_true_lang-DKc6ugmr.js +0 -31
- package/dist/Button.vue_vue_type_script_setup_true_lang-3f0emVNU.js +0 -141
- package/dist/NoAccess.vue_vue_type_script_setup_true_lang-OKW8pKYU.js +0 -78
- package/dist/SectionList.vue_vue_type_script_setup_true_lang-DGcKX_OJ.js +0 -230
- package/dist/SelectField.vue_vue_type_script_setup_true_lang-SyFWE33A.js +0 -422
- package/dist/Sheet.vue_vue_type_script_setup_true_lang-BLBD5ps8.js +0 -210
- package/dist/SwipeActions.vue_vue_type_script_setup_true_lang-CGTuEnTv.js +0 -243
- package/dist/chrome-D9pwD6iS.js +0 -101
- package/dist/dialogStack-DiTG1rZc.js +0 -26
- package/dist/environment-D3nozt9a.js +0 -75
- package/dist/feature-DyDtyMLU.js +0 -47
- package/dist/platform-jqlKVJ2e.js +0 -244
- package/dist/toast-BTeX0r66.js +0 -129
- /package/dist/{phone → internal}/flagLoaders.d.ts +0 -0
|
@@ -0,0 +1,691 @@
|
|
|
1
|
+
import { defineComponent as N, openBlock as v, createElementBlock as E, toDisplayString as _, unref as e, createCommentVNode as G, createBlock as C, withCtx as p, createTextVNode as P, createVNode as i, watch as X, mergeProps as R, useModel as fe, useId as me, useTemplateRef as J, ref as b, onMounted as ve, onBeforeUnmount as _e, computed as F, withModifiers as ge, createElementVNode as x, Fragment as oe, mergeModels as le } from "vue";
|
|
2
|
+
import { useI18n as U } from "vue-i18n";
|
|
3
|
+
import { a as ye } from "./AdaptivePageShell.vue_vue_type_script_setup_true_lang-CvAnzdc1.js";
|
|
4
|
+
import { u as L } from "./platform-hunMqFdB.js";
|
|
5
|
+
import { _ as Q } from "./AsyncSection.vue_vue_type_script_setup_true_lang-CCtthMRd.js";
|
|
6
|
+
import { u as Y } from "./useLoad-CYRVx6HW.js";
|
|
7
|
+
import { i as q, d as H } from "./index-BAcl44SC.js";
|
|
8
|
+
import { u as Z } from "./FormErrors.vue_vue_type_script_setup_true_lang-DVgNBQ8p.js";
|
|
9
|
+
import { _ as ee } from "./FormView.vue_vue_type_script_setup_true_lang-Bz2m3AtF.js";
|
|
10
|
+
import { _ as D } from "./TextField.vue_vue_type_script_setup_true_lang-C_FMf3Vc.js";
|
|
11
|
+
import { _ as O } from "./Panel.vue_vue_type_script_setup_true_lang-BCRxRK4D.js";
|
|
12
|
+
import { t as S } from "./toast-D9Z5To38.js";
|
|
13
|
+
import { u as W } from "./fieldMessages-C3Rpbktw.js";
|
|
14
|
+
import { _ as A } from "./Button.vue_vue_type_script_setup_true_lang-CYil8h9z.js";
|
|
15
|
+
import { a as re } from "./leaveGuard-Cc8yeLxM.js";
|
|
16
|
+
import { _ as we } from "./KeyValue.vue_vue_type_script_setup_true_lang-wcZcvnow.js";
|
|
17
|
+
import { u as ie } from "./format-B8mJm946.js";
|
|
18
|
+
import { _ as be } from "./Banner.vue_vue_type_script_setup_true_lang-Cib_YYpr.js";
|
|
19
|
+
import { a as K } from "./error-CD7x0Jrz.js";
|
|
20
|
+
import { _ as xe } from "./Modal.vue_vue_type_script_setup_true_lang-D7SwVPpL.js";
|
|
21
|
+
import { _ as he } from "./OtpInput.vue_vue_type_script_setup_true_lang-gp4FfWAH.js";
|
|
22
|
+
import { _ as $e } from "./AlertDialog.vue_vue_type_script_setup_true_lang-CJsMUIUg.js";
|
|
23
|
+
import { _ as ke } from "./SessionList.vue_vue_type_script_setup_true_lang-DUQpr7gb.js";
|
|
24
|
+
import { _ as qe } from "./PageBar.vue_vue_type_script_setup_true_lang-Cfr5xsJx.js";
|
|
25
|
+
import { _ as Ce } from "./SignInTable.vue_vue_type_script_setup_true_lang-Dnx3T_42.js";
|
|
26
|
+
import { _ as Pe } from "./ViewTabs.vue_vue_type_script_setup_true_lang-ByqTU2JT.js";
|
|
27
|
+
const Se = { class: "flex flex-wrap items-center justify-end gap-3" }, Ve = {
|
|
28
|
+
key: 0,
|
|
29
|
+
class: "mr-auto text-footnote text-content-muted",
|
|
30
|
+
"data-unsaved": ""
|
|
31
|
+
}, ne = /* @__PURE__ */ N({
|
|
32
|
+
__name: "PanelActions",
|
|
33
|
+
props: {
|
|
34
|
+
label: {},
|
|
35
|
+
processing: { type: Boolean },
|
|
36
|
+
dirty: { type: Boolean }
|
|
37
|
+
},
|
|
38
|
+
emits: ["submit", "cancel"],
|
|
39
|
+
setup(h, { emit: r }) {
|
|
40
|
+
const u = h, t = r, { t: s } = U();
|
|
41
|
+
return re(() => u.dirty), (c, l) => (v(), E("div", Se, [
|
|
42
|
+
u.dirty ? (v(), E("span", Ve, _(e(s)("core.form.unsaved_changes")), 1)) : G("", !0),
|
|
43
|
+
u.dirty ? (v(), C(e(A), {
|
|
44
|
+
key: 1,
|
|
45
|
+
disabled: u.processing,
|
|
46
|
+
onClick: l[0] || (l[0] = (n) => t("cancel"))
|
|
47
|
+
}, {
|
|
48
|
+
default: p(() => [
|
|
49
|
+
P(_(e(s)("core.actions.cancel")), 1)
|
|
50
|
+
]),
|
|
51
|
+
_: 1
|
|
52
|
+
}, 8, ["disabled"])) : G("", !0),
|
|
53
|
+
i(e(A), {
|
|
54
|
+
prominence: "primary",
|
|
55
|
+
processing: u.processing,
|
|
56
|
+
onClick: l[1] || (l[1] = (n) => t("submit"))
|
|
57
|
+
}, {
|
|
58
|
+
default: p(() => [
|
|
59
|
+
P(_(u.label), 1)
|
|
60
|
+
]),
|
|
61
|
+
_: 1
|
|
62
|
+
}, 8, ["processing"])
|
|
63
|
+
]));
|
|
64
|
+
}
|
|
65
|
+
}), Ee = /* @__PURE__ */ N({
|
|
66
|
+
__name: "DetailsPanel",
|
|
67
|
+
props: {
|
|
68
|
+
profile: {}
|
|
69
|
+
},
|
|
70
|
+
emits: ["updated"],
|
|
71
|
+
setup(h, { emit: r }) {
|
|
72
|
+
const u = h, t = r, { t: s } = U(), { http: c } = L(), l = {
|
|
73
|
+
safeParse(o) {
|
|
74
|
+
const { name: d, phone: y } = o;
|
|
75
|
+
return d.trim() === "" ? { success: !1, error: { issues: [{ path: ["name"], message: s("core.account.validation.required") }] } } : { success: !0, data: { name: d, phone: y.trim() === "" ? void 0 : y } };
|
|
76
|
+
}
|
|
77
|
+
}, n = Z({ ...W(), defaults: () => ({ name: "", phone: "" }), validator: l });
|
|
78
|
+
X(() => u.profile, (o) => n.hydrate({ name: o.name, phone: o.phone }), { immediate: !0 });
|
|
79
|
+
async function a() {
|
|
80
|
+
const o = await n.submit(async (d) => (await c.request(q.profileUpdate, d)).data);
|
|
81
|
+
o.status === "saved" && (S.success(s("core.profile.details.saved")), t("updated", o.value));
|
|
82
|
+
}
|
|
83
|
+
return (o, d) => (v(), C(e(O), {
|
|
84
|
+
title: e(s)("core.profile.details.title"),
|
|
85
|
+
icon: "user3Line",
|
|
86
|
+
"data-profile-details": ""
|
|
87
|
+
}, {
|
|
88
|
+
footer: p(() => [
|
|
89
|
+
i(ne, {
|
|
90
|
+
label: e(s)("core.profile.details.submit"),
|
|
91
|
+
processing: e(n).submitting.value,
|
|
92
|
+
dirty: e(n).dirty.value,
|
|
93
|
+
onSubmit: a,
|
|
94
|
+
onCancel: d[0] || (d[0] = (y) => e(n).reset())
|
|
95
|
+
}, null, 8, ["label", "processing", "dirty"])
|
|
96
|
+
]),
|
|
97
|
+
default: p(() => [
|
|
98
|
+
i(e(ee), {
|
|
99
|
+
form: e(n),
|
|
100
|
+
onSubmit: a
|
|
101
|
+
}, {
|
|
102
|
+
default: p(() => [
|
|
103
|
+
i(e(D), R(e(n).bind("name"), {
|
|
104
|
+
label: e(s)("core.users.fields.name"),
|
|
105
|
+
required: "",
|
|
106
|
+
autocomplete: "name"
|
|
107
|
+
}), null, 16, ["label"]),
|
|
108
|
+
i(e(D), R(e(n).bind("phone"), {
|
|
109
|
+
label: e(s)("core.users.fields.phone"),
|
|
110
|
+
type: "tel",
|
|
111
|
+
autocomplete: "tel"
|
|
112
|
+
}), null, 16, ["label"]),
|
|
113
|
+
i(e(D), {
|
|
114
|
+
"model-value": u.profile.login,
|
|
115
|
+
label: e(s)("core.users.fields.login"),
|
|
116
|
+
hint: e(s)("core.profile.details.login_hint"),
|
|
117
|
+
disabled: "",
|
|
118
|
+
mono: "",
|
|
119
|
+
"data-profile-login": ""
|
|
120
|
+
}, null, 8, ["model-value", "label", "hint"])
|
|
121
|
+
]),
|
|
122
|
+
_: 1
|
|
123
|
+
}, 8, ["form"])
|
|
124
|
+
]),
|
|
125
|
+
_: 1
|
|
126
|
+
}, 8, ["title"]));
|
|
127
|
+
}
|
|
128
|
+
}), Ae = {
|
|
129
|
+
key: 0,
|
|
130
|
+
class: "max-w-sm text-body text-content-muted"
|
|
131
|
+
}, Ne = ["id"], Ue = {
|
|
132
|
+
key: 2,
|
|
133
|
+
class: "mt-3 text-footnote text-content-muted",
|
|
134
|
+
"data-verify-expires": ""
|
|
135
|
+
}, Be = { class: "mt-6 flex w-full flex-col gap-2" }, Re = /* @__PURE__ */ N({
|
|
136
|
+
__name: "VerifyCode",
|
|
137
|
+
props: /* @__PURE__ */ le({
|
|
138
|
+
description: { default: void 0 },
|
|
139
|
+
length: { default: 6 },
|
|
140
|
+
resendAvailableAt: { default: null },
|
|
141
|
+
expiresAt: { default: null },
|
|
142
|
+
error: { default: "" },
|
|
143
|
+
expired: { type: Boolean, default: !1 },
|
|
144
|
+
verifying: { type: Boolean, default: !1 },
|
|
145
|
+
resending: { type: Boolean, default: !1 }
|
|
146
|
+
}, {
|
|
147
|
+
modelValue: { default: "" },
|
|
148
|
+
modelModifiers: {}
|
|
149
|
+
}),
|
|
150
|
+
emits: /* @__PURE__ */ le(["verify", "resend", "cancel"], ["update:modelValue"]),
|
|
151
|
+
setup(h, { expose: r, emit: u }) {
|
|
152
|
+
const t = h, s = fe(h, "modelValue"), c = u, { t: l } = U(), n = ie(), a = me(), o = J("otp"), d = b(Date.now());
|
|
153
|
+
let y;
|
|
154
|
+
ve(() => y = setInterval(() => d.value = Date.now(), 1e3)), _e(() => clearInterval(y));
|
|
155
|
+
const g = F(() => {
|
|
156
|
+
const k = t.resendAvailableAt ? Date.parse(t.resendAvailableAt) : Number.NaN;
|
|
157
|
+
return Number.isNaN(k) ? 0 : Math.max(0, Math.ceil((k - d.value) / 1e3));
|
|
158
|
+
}), V = F(() => `${Math.floor(g.value / 60)}:${String(g.value % 60).padStart(2, "0")}`), w = F(() => t.expiresAt && !t.expired ? n.time(t.expiresAt) : ""), $ = F(() => s.value.length === t.length), j = F(() => t.verifying || t.resending);
|
|
159
|
+
function I(k = s.value) {
|
|
160
|
+
k.length === t.length && !j.value && !t.expired && c("verify", k);
|
|
161
|
+
}
|
|
162
|
+
function z() {
|
|
163
|
+
g.value === 0 && !j.value && c("resend");
|
|
164
|
+
}
|
|
165
|
+
return X(() => t.error, (k) => {
|
|
166
|
+
k && (s.value = "", o.value?.focus());
|
|
167
|
+
}), r({ focus: () => o.value?.focus() }), (k, B) => (v(), E("form", {
|
|
168
|
+
class: "flex flex-col items-center text-center",
|
|
169
|
+
"data-verify-code": "",
|
|
170
|
+
novalidate: "",
|
|
171
|
+
onSubmit: B[2] || (B[2] = ge((M) => I(), ["prevent"]))
|
|
172
|
+
}, [
|
|
173
|
+
t.description ? (v(), E("p", Ae, _(t.description), 1)) : G("", !0),
|
|
174
|
+
i(e(he), {
|
|
175
|
+
ref_key: "otp",
|
|
176
|
+
ref: o,
|
|
177
|
+
modelValue: s.value,
|
|
178
|
+
"onUpdate:modelValue": B[0] || (B[0] = (M) => s.value = M),
|
|
179
|
+
class: "mt-6",
|
|
180
|
+
length: t.length,
|
|
181
|
+
invalid: !!t.error,
|
|
182
|
+
disabled: t.expired || t.verifying,
|
|
183
|
+
"described-by": t.error ? e(a) : void 0,
|
|
184
|
+
autofocus: "",
|
|
185
|
+
onComplete: I
|
|
186
|
+
}, null, 8, ["modelValue", "length", "invalid", "disabled", "described-by"]),
|
|
187
|
+
t.error ? (v(), E("p", {
|
|
188
|
+
key: 1,
|
|
189
|
+
id: e(a),
|
|
190
|
+
role: "alert",
|
|
191
|
+
class: "mt-3 text-footnote text-content-destructive",
|
|
192
|
+
"data-verify-error": ""
|
|
193
|
+
}, _(t.error), 9, Ne)) : w.value ? (v(), E("p", Ue, _(e(l)("core.profile.email.valid_until", { time: w.value })), 1)) : G("", !0),
|
|
194
|
+
x("div", Be, [
|
|
195
|
+
t.expired ? G("", !0) : (v(), C(e(A), {
|
|
196
|
+
key: 0,
|
|
197
|
+
type: "submit",
|
|
198
|
+
prominence: "primary",
|
|
199
|
+
size: "lg",
|
|
200
|
+
class: "w-full justify-center",
|
|
201
|
+
disabled: !$.value || t.resending,
|
|
202
|
+
processing: t.verifying,
|
|
203
|
+
"data-verify-submit": ""
|
|
204
|
+
}, {
|
|
205
|
+
default: p(() => [
|
|
206
|
+
P(_(e(l)("core.profile.email.verify")), 1)
|
|
207
|
+
]),
|
|
208
|
+
_: 1
|
|
209
|
+
}, 8, ["disabled", "processing"])),
|
|
210
|
+
i(e(A), {
|
|
211
|
+
prominence: t.expired ? "primary" : "standard",
|
|
212
|
+
size: "lg",
|
|
213
|
+
class: "w-full justify-center",
|
|
214
|
+
disabled: g.value > 0 || t.verifying,
|
|
215
|
+
processing: t.resending,
|
|
216
|
+
"data-verify-resend": "",
|
|
217
|
+
onClick: z
|
|
218
|
+
}, {
|
|
219
|
+
default: p(() => [
|
|
220
|
+
g.value > 0 ? (v(), E(oe, { key: 0 }, [
|
|
221
|
+
P(_(e(l)("core.profile.email.resend_in", { time: V.value })), 1)
|
|
222
|
+
], 64)) : (v(), E(oe, { key: 1 }, [
|
|
223
|
+
P(_(t.expired ? e(l)("core.profile.email.request_new") : e(l)("core.profile.email.resend")), 1)
|
|
224
|
+
], 64))
|
|
225
|
+
]),
|
|
226
|
+
_: 1
|
|
227
|
+
}, 8, ["prominence", "disabled", "processing"]),
|
|
228
|
+
i(e(A), {
|
|
229
|
+
prominence: "link",
|
|
230
|
+
class: "mt-1 self-center",
|
|
231
|
+
disabled: t.verifying,
|
|
232
|
+
"data-verify-cancel": "",
|
|
233
|
+
onClick: B[1] || (B[1] = (M) => c("cancel"))
|
|
234
|
+
}, {
|
|
235
|
+
default: p(() => [
|
|
236
|
+
P(_(e(l)("core.profile.email.cancel_change")), 1)
|
|
237
|
+
]),
|
|
238
|
+
_: 1
|
|
239
|
+
}, 8, ["disabled"])
|
|
240
|
+
])
|
|
241
|
+
], 32));
|
|
242
|
+
}
|
|
243
|
+
}), De = { class: "text-body text-content-muted" }, Ie = {
|
|
244
|
+
key: 1,
|
|
245
|
+
class: "px-2 py-4 sm:px-6"
|
|
246
|
+
}, Me = /* @__PURE__ */ N({
|
|
247
|
+
__name: "EmailChangeDialog",
|
|
248
|
+
emits: ["pending", "changed", "cancelled"],
|
|
249
|
+
setup(h, { expose: r, emit: u }) {
|
|
250
|
+
const t = u, { t: s } = U(), { http: c } = L(), l = W(), n = J("modal"), a = b("request"), o = b(null), d = b(!1), g = Z({ ...l, defaults: () => ({ email: "", password: "" }), validator: {
|
|
251
|
+
safeParse(f) {
|
|
252
|
+
const { email: m, password: T } = f, se = s("core.account.validation.required"), ae = [...m.trim() === "" ? [{ path: ["email"], message: se }] : [], ...T === "" ? [{ path: ["password"], message: se }] : []];
|
|
253
|
+
return ae.length > 0 ? { success: !1, error: { issues: ae } } : { success: !0, data: { email: m.trim(), current_password: T } };
|
|
254
|
+
}
|
|
255
|
+
}, serverField: (f) => f === "current_password" ? "password" : f }), { confirmDiscard: V } = re(() => d.value && a.value === "request" && g.dirty.value), w = b(""), $ = b(""), j = b(!1), I = b(!1), z = b(!1), k = b(!1), B = ["identity.code.expired", "identity.code.too_many_attempts", "identity.code.no_pending"];
|
|
256
|
+
function M() {
|
|
257
|
+
w.value = "", $.value = "", j.value = !1;
|
|
258
|
+
}
|
|
259
|
+
function ce(f) {
|
|
260
|
+
o.value = f, a.value = f ? "verify" : "request", g.hydrate({ email: "", password: "" }), M(), n.value?.present();
|
|
261
|
+
}
|
|
262
|
+
async function te() {
|
|
263
|
+
const f = await g.submit(async (m) => (await c.request(q.profileRequestEmail, m)).data);
|
|
264
|
+
f.status === "saved" && (o.value = f.value, M(), a.value = "verify", t("pending", f.value));
|
|
265
|
+
}
|
|
266
|
+
async function de(f) {
|
|
267
|
+
if (!I.value) {
|
|
268
|
+
I.value = !0, $.value = "";
|
|
269
|
+
try {
|
|
270
|
+
const m = (await c.request(q.profileConfirmEmail, { code: f })).data;
|
|
271
|
+
t("changed", m), S.success(s("core.profile.email.changed")), n.value?.dismiss();
|
|
272
|
+
} catch (m) {
|
|
273
|
+
if (H(m)) return;
|
|
274
|
+
if (K(m) && m.fields.email?.[0]) {
|
|
275
|
+
o.value = null, t("pending", null), a.value = "request", g.errors.set({ email: [l.translate(m.fields.email[0])] });
|
|
276
|
+
return;
|
|
277
|
+
}
|
|
278
|
+
j.value = K(m) && m.code !== null && B.includes(m.code), $.value = l.sentence(m, s("core.profile.email.verify_failed"));
|
|
279
|
+
} finally {
|
|
280
|
+
I.value = !1;
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
async function ue() {
|
|
285
|
+
if (!z.value) {
|
|
286
|
+
z.value = !0;
|
|
287
|
+
try {
|
|
288
|
+
o.value = (await c.request(q.profileResendEmail)).data, M(), t("pending", o.value), S.success(s("core.profile.email.code_sent", { email: o.value.email }));
|
|
289
|
+
} catch (f) {
|
|
290
|
+
if (H(f)) return;
|
|
291
|
+
if (K(f) && f.code === "identity.code.no_pending") {
|
|
292
|
+
o.value = null, t("pending", null), a.value = "request";
|
|
293
|
+
return;
|
|
294
|
+
}
|
|
295
|
+
$.value = l.sentence(f, s("core.profile.email.resend_failed"));
|
|
296
|
+
} finally {
|
|
297
|
+
z.value = !1;
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
async function pe() {
|
|
302
|
+
if (!k.value) {
|
|
303
|
+
k.value = !0;
|
|
304
|
+
try {
|
|
305
|
+
await c.request(q.profileCancelEmail), o.value = null, t("cancelled"), S.success(s("core.profile.email.cancelled")), n.value?.dismiss();
|
|
306
|
+
} catch (f) {
|
|
307
|
+
H(f) || S.error(l.sentence(f, s("core.profile.email.cancel_failed")));
|
|
308
|
+
} finally {
|
|
309
|
+
k.value = !1;
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
return r({ present: ce }), (f, m) => (v(), C(e(xe), {
|
|
314
|
+
ref_key: "modal",
|
|
315
|
+
ref: n,
|
|
316
|
+
size: "md",
|
|
317
|
+
title: a.value === "request" ? e(s)("core.profile.email.change_title") : e(s)("core.profile.email.verify_title"),
|
|
318
|
+
"primary-label": a.value === "request" ? e(s)("core.profile.email.send_code") : void 0,
|
|
319
|
+
"without-footer": a.value === "verify",
|
|
320
|
+
status: e(g).submitting.value ? "processing" : "idle",
|
|
321
|
+
"before-dismiss": e(V),
|
|
322
|
+
onPrimary: te,
|
|
323
|
+
onPresented: m[1] || (m[1] = (T) => d.value = !0),
|
|
324
|
+
onDismissed: m[2] || (m[2] = (T) => d.value = !1)
|
|
325
|
+
}, {
|
|
326
|
+
default: p(() => [
|
|
327
|
+
a.value === "request" ? (v(), C(e(ee), {
|
|
328
|
+
key: 0,
|
|
329
|
+
form: e(g),
|
|
330
|
+
onSubmit: te
|
|
331
|
+
}, {
|
|
332
|
+
default: p(() => [
|
|
333
|
+
x("p", De, _(e(s)("core.profile.email.request_hint")), 1),
|
|
334
|
+
i(e(D), R(e(g).bind("email"), {
|
|
335
|
+
label: e(s)("core.profile.email.new_email"),
|
|
336
|
+
type: "email",
|
|
337
|
+
required: "",
|
|
338
|
+
autocomplete: "email"
|
|
339
|
+
}), null, 16, ["label"]),
|
|
340
|
+
i(e(D), R(e(g).bind("password"), {
|
|
341
|
+
label: e(s)("core.profile.email.current_password"),
|
|
342
|
+
type: "password",
|
|
343
|
+
required: "",
|
|
344
|
+
autocomplete: "current-password"
|
|
345
|
+
}), null, 16, ["label"])
|
|
346
|
+
]),
|
|
347
|
+
_: 1
|
|
348
|
+
}, 8, ["form"])) : (v(), E("div", Ie, [
|
|
349
|
+
i(Re, {
|
|
350
|
+
modelValue: w.value,
|
|
351
|
+
"onUpdate:modelValue": m[0] || (m[0] = (T) => w.value = T),
|
|
352
|
+
description: e(s)("core.profile.email.verify_description", { email: o.value?.email ?? "" }),
|
|
353
|
+
"resend-available-at": o.value?.resend_available_at ?? null,
|
|
354
|
+
"expires-at": o.value?.expires_at ?? null,
|
|
355
|
+
error: $.value,
|
|
356
|
+
expired: j.value,
|
|
357
|
+
verifying: I.value,
|
|
358
|
+
resending: z.value,
|
|
359
|
+
onVerify: de,
|
|
360
|
+
onResend: ue,
|
|
361
|
+
onCancel: pe
|
|
362
|
+
}, null, 8, ["modelValue", "description", "resend-available-at", "expires-at", "error", "expired", "verifying", "resending"])
|
|
363
|
+
]))
|
|
364
|
+
]),
|
|
365
|
+
_: 1
|
|
366
|
+
}, 8, ["title", "primary-label", "without-footer", "status", "before-dismiss"]));
|
|
367
|
+
}
|
|
368
|
+
}), Fe = { class: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between" }, Le = { class: "text-footnote" }, je = { class: "mt-2 flex flex-wrap gap-2" }, ze = /* @__PURE__ */ N({
|
|
369
|
+
__name: "EmailPanel",
|
|
370
|
+
props: {
|
|
371
|
+
profile: {}
|
|
372
|
+
},
|
|
373
|
+
emits: ["updated"],
|
|
374
|
+
setup(h, { emit: r }) {
|
|
375
|
+
const u = h, t = r, { t: s } = U(), { http: c } = L(), l = ie(), n = W(), a = J("dialog"), o = b(!1), d = F(() => u.profile.pending_email), y = (V) => t("updated", { ...u.profile, pending_email: V });
|
|
376
|
+
async function g() {
|
|
377
|
+
if (!o.value) {
|
|
378
|
+
o.value = !0;
|
|
379
|
+
try {
|
|
380
|
+
await c.request(q.profileCancelEmail), S.success(s("core.profile.email.cancelled")), y(null);
|
|
381
|
+
} catch (V) {
|
|
382
|
+
H(V) || S.error(n.sentence(V, s("core.profile.email.cancel_failed")));
|
|
383
|
+
} finally {
|
|
384
|
+
o.value = !1;
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
return (V, w) => (v(), C(e(O), {
|
|
389
|
+
title: e(s)("core.profile.email.title"),
|
|
390
|
+
icon: "mailUnreadFill",
|
|
391
|
+
"data-profile-email": ""
|
|
392
|
+
}, {
|
|
393
|
+
default: p(() => [
|
|
394
|
+
x("div", Fe, [
|
|
395
|
+
x("dl", null, [
|
|
396
|
+
i(e(we), {
|
|
397
|
+
label: e(s)("core.profile.email.current"),
|
|
398
|
+
value: u.profile.email,
|
|
399
|
+
"data-profile-email-current": ""
|
|
400
|
+
}, null, 8, ["label", "value"])
|
|
401
|
+
]),
|
|
402
|
+
i(e(A), {
|
|
403
|
+
icon: "mailUnreadFill",
|
|
404
|
+
"data-email-change": "",
|
|
405
|
+
onClick: w[0] || (w[0] = ($) => a.value?.present(null))
|
|
406
|
+
}, {
|
|
407
|
+
default: p(() => [
|
|
408
|
+
P(_(e(s)("core.profile.email.change")), 1)
|
|
409
|
+
]),
|
|
410
|
+
_: 1
|
|
411
|
+
})
|
|
412
|
+
]),
|
|
413
|
+
d.value ? (v(), C(e(be), {
|
|
414
|
+
key: 0,
|
|
415
|
+
tone: "info",
|
|
416
|
+
class: "mt-4",
|
|
417
|
+
"data-email-pending": ""
|
|
418
|
+
}, {
|
|
419
|
+
default: p(() => [
|
|
420
|
+
x("p", null, _(e(s)("core.profile.email.pending", { email: d.value.email })), 1),
|
|
421
|
+
x("p", Le, _(e(s)("core.profile.email.valid_until", { time: e(l).time(d.value.expires_at) })), 1),
|
|
422
|
+
x("div", je, [
|
|
423
|
+
i(e(A), {
|
|
424
|
+
size: "sm",
|
|
425
|
+
prominence: "primary",
|
|
426
|
+
"data-email-enter-code": "",
|
|
427
|
+
onClick: w[1] || (w[1] = ($) => a.value?.present(d.value))
|
|
428
|
+
}, {
|
|
429
|
+
default: p(() => [
|
|
430
|
+
P(_(e(s)("core.profile.email.enter_code")), 1)
|
|
431
|
+
]),
|
|
432
|
+
_: 1
|
|
433
|
+
}),
|
|
434
|
+
i(e(A), {
|
|
435
|
+
size: "sm",
|
|
436
|
+
processing: o.value,
|
|
437
|
+
"data-email-cancel": "",
|
|
438
|
+
onClick: g
|
|
439
|
+
}, {
|
|
440
|
+
default: p(() => [
|
|
441
|
+
P(_(e(s)("core.profile.email.cancel_change")), 1)
|
|
442
|
+
]),
|
|
443
|
+
_: 1
|
|
444
|
+
}, 8, ["processing"])
|
|
445
|
+
])
|
|
446
|
+
]),
|
|
447
|
+
_: 1
|
|
448
|
+
})) : G("", !0),
|
|
449
|
+
i(Me, {
|
|
450
|
+
ref_key: "dialog",
|
|
451
|
+
ref: a,
|
|
452
|
+
onPending: y,
|
|
453
|
+
onChanged: w[2] || (w[2] = ($) => t("updated", $)),
|
|
454
|
+
onCancelled: w[3] || (w[3] = ($) => y(null))
|
|
455
|
+
}, null, 512)
|
|
456
|
+
]),
|
|
457
|
+
_: 1
|
|
458
|
+
}, 8, ["title"]));
|
|
459
|
+
}
|
|
460
|
+
}), Te = { class: "flex justify-end" }, Ge = /* @__PURE__ */ N({
|
|
461
|
+
__name: "PasswordPanel",
|
|
462
|
+
setup(h) {
|
|
463
|
+
const { t: r } = U(), { http: u } = L(), t = b(!1), s = {
|
|
464
|
+
safeParse(n) {
|
|
465
|
+
const a = n, o = r("core.account.validation.required"), d = [
|
|
466
|
+
...a.current === "" ? [{ path: ["current"], message: o }] : [],
|
|
467
|
+
...a.password === "" ? [{ path: ["password"], message: o }] : [],
|
|
468
|
+
...a.password !== "" && a.repeat !== a.password ? [{ path: ["repeat"], message: a.repeat === "" ? o : r("core.account.validation.mismatch") }] : []
|
|
469
|
+
];
|
|
470
|
+
return d.length > 0 ? { success: !1, error: { issues: d } } : { success: !0, data: { current_password: a.current, new_password: a.password, new_password_confirmation: a.repeat } };
|
|
471
|
+
}
|
|
472
|
+
}, c = Z({
|
|
473
|
+
...W(),
|
|
474
|
+
defaults: () => ({ current: "", password: "", repeat: "" }),
|
|
475
|
+
validator: s,
|
|
476
|
+
// The server names its fields; the draft's are shorter.
|
|
477
|
+
serverField: (n) => ({ current_password: "current", new_password: "password", new_password_confirmation: "repeat" })[n] ?? n
|
|
478
|
+
});
|
|
479
|
+
async function l() {
|
|
480
|
+
(await c.submit((a) => u.request(q.profileChangePassword, a))).status === "saved" && (c.hydrate({ current: "", password: "", repeat: "" }), t.value = !1, S.success(r("core.profile.password.changed")));
|
|
481
|
+
}
|
|
482
|
+
return (n, a) => (v(), C(e(O), {
|
|
483
|
+
title: e(r)("core.profile.password.title"),
|
|
484
|
+
icon: "key2Line",
|
|
485
|
+
"data-profile-password": ""
|
|
486
|
+
}, {
|
|
487
|
+
footer: p(() => [
|
|
488
|
+
i(ne, {
|
|
489
|
+
label: e(r)("core.profile.password.submit"),
|
|
490
|
+
processing: e(c).submitting.value,
|
|
491
|
+
dirty: e(c).dirty.value,
|
|
492
|
+
onSubmit: l,
|
|
493
|
+
onCancel: a[1] || (a[1] = (o) => e(c).reset())
|
|
494
|
+
}, null, 8, ["label", "processing", "dirty"])
|
|
495
|
+
]),
|
|
496
|
+
default: p(() => [
|
|
497
|
+
i(e(ee), {
|
|
498
|
+
form: e(c),
|
|
499
|
+
onSubmit: l
|
|
500
|
+
}, {
|
|
501
|
+
default: p(() => [
|
|
502
|
+
i(e(D), R(e(c).bind("current"), {
|
|
503
|
+
type: t.value ? "text" : "password",
|
|
504
|
+
label: e(r)("core.profile.password.current"),
|
|
505
|
+
required: "",
|
|
506
|
+
autocomplete: "current-password"
|
|
507
|
+
}), null, 16, ["type", "label"]),
|
|
508
|
+
i(e(D), R(e(c).bind("password"), {
|
|
509
|
+
type: t.value ? "text" : "password",
|
|
510
|
+
label: e(r)("core.profile.password.new"),
|
|
511
|
+
required: "",
|
|
512
|
+
autocomplete: "new-password"
|
|
513
|
+
}), null, 16, ["type", "label"]),
|
|
514
|
+
i(e(D), R(e(c).bind("repeat"), {
|
|
515
|
+
type: t.value ? "text" : "password",
|
|
516
|
+
label: e(r)("core.profile.password.repeat"),
|
|
517
|
+
required: "",
|
|
518
|
+
autocomplete: "new-password"
|
|
519
|
+
}), null, 16, ["type", "label"]),
|
|
520
|
+
x("div", Te, [
|
|
521
|
+
i(e(A), R({
|
|
522
|
+
prominence: "link",
|
|
523
|
+
size: "sm",
|
|
524
|
+
icon: t.value ? "eyeOff" : "eye"
|
|
525
|
+
}, { "aria-pressed": t.value }, {
|
|
526
|
+
"data-password-visibility": "",
|
|
527
|
+
onClick: a[0] || (a[0] = (o) => t.value = !t.value)
|
|
528
|
+
}), {
|
|
529
|
+
default: p(() => [
|
|
530
|
+
P(_(t.value ? e(r)("core.profile.password.hide") : e(r)("core.profile.password.show")), 1)
|
|
531
|
+
]),
|
|
532
|
+
_: 1
|
|
533
|
+
}, 16, ["icon"])
|
|
534
|
+
])
|
|
535
|
+
]),
|
|
536
|
+
_: 1
|
|
537
|
+
}, 8, ["form"])
|
|
538
|
+
]),
|
|
539
|
+
_: 1
|
|
540
|
+
}, 8, ["title"]));
|
|
541
|
+
}
|
|
542
|
+
}), He = { class: "p-3" }, Oe = /* @__PURE__ */ N({
|
|
543
|
+
__name: "SessionsPanel",
|
|
544
|
+
setup(h) {
|
|
545
|
+
const { t: r } = U(), { http: u } = L(), t = W(), s = Y(async ({ signal: o }) => (await u.request(q.profileSessions, void 0, { signal: o })).data), c = F(() => s.data.value?.sessions ?? []), l = J("dialog"), n = b(null);
|
|
546
|
+
async function a(o) {
|
|
547
|
+
try {
|
|
548
|
+
await u.request(q.profileRevokeSession, { session_id: o.id }), S.success(r("core.account.sessions.ended"));
|
|
549
|
+
} catch (d) {
|
|
550
|
+
H(d) || S.error(t.sentence(d, r("core.account.sessions.end_failed")));
|
|
551
|
+
}
|
|
552
|
+
await s.reload();
|
|
553
|
+
}
|
|
554
|
+
return (o, d) => (v(), C(e(O), {
|
|
555
|
+
title: e(r)("core.profile.sessions.title"),
|
|
556
|
+
icon: "deviceLine",
|
|
557
|
+
flush: "",
|
|
558
|
+
"data-profile-sessions": ""
|
|
559
|
+
}, {
|
|
560
|
+
default: p(() => [
|
|
561
|
+
i(e(Q), {
|
|
562
|
+
state: e(s).state.value,
|
|
563
|
+
"skeleton-rows": 3,
|
|
564
|
+
"is-empty": () => !1,
|
|
565
|
+
onRetry: d[1] || (d[1] = (y) => e(s).reload())
|
|
566
|
+
}, {
|
|
567
|
+
default: p(() => [
|
|
568
|
+
x("div", He, [
|
|
569
|
+
i(ke, {
|
|
570
|
+
sessions: c.value,
|
|
571
|
+
"can-end": "",
|
|
572
|
+
footer: e(r)("core.profile.sessions.footer"),
|
|
573
|
+
onEnd: d[0] || (d[0] = (y) => {
|
|
574
|
+
n.value = y, l.value?.present(y);
|
|
575
|
+
})
|
|
576
|
+
}, null, 8, ["sessions", "footer"])
|
|
577
|
+
])
|
|
578
|
+
]),
|
|
579
|
+
_: 1
|
|
580
|
+
}, 8, ["state"]),
|
|
581
|
+
i(e($e), {
|
|
582
|
+
ref_key: "dialog",
|
|
583
|
+
ref: l,
|
|
584
|
+
tone: "critical",
|
|
585
|
+
icon: "logoutBoxRLine",
|
|
586
|
+
title: e(r)("core.account.sessions.end_title"),
|
|
587
|
+
message: e(r)("core.account.sessions.end_body", { device: n.value?.device || e(r)("core.account.sessions.unknown_device") }),
|
|
588
|
+
"confirm-label": e(r)("core.account.sessions.end"),
|
|
589
|
+
action: a
|
|
590
|
+
}, null, 8, ["title", "message", "confirm-label"])
|
|
591
|
+
]),
|
|
592
|
+
_: 1
|
|
593
|
+
}, 8, ["title"]));
|
|
594
|
+
}
|
|
595
|
+
}), We = { class: "px-3 pt-3" }, Xe = { class: "px-3 pt-3" }, Je = { class: "py-3" }, Ke = { class: "px-4 pb-3 text-footnote text-content-muted" }, Qe = /* @__PURE__ */ N({
|
|
596
|
+
__name: "SignInsPanel",
|
|
597
|
+
setup(h) {
|
|
598
|
+
const { t: r } = U(), { http: u } = L(), t = ["all", "failed"], s = b("all"), c = b(1), l = Y(async ({ signal: n }) => (await u.request(q.profileSignins, { view: s.value, page: c.value, per_page: 20 }, { signal: n })).data);
|
|
599
|
+
return X(s, () => {
|
|
600
|
+
c.value = 1, l.reload();
|
|
601
|
+
}), X(c, () => void l.reload()), (n, a) => (v(), C(e(O), {
|
|
602
|
+
title: e(r)("core.profile.signins.title"),
|
|
603
|
+
icon: "timeFill",
|
|
604
|
+
flush: "",
|
|
605
|
+
"data-profile-signins": ""
|
|
606
|
+
}, {
|
|
607
|
+
default: p(() => [
|
|
608
|
+
x("div", We, [
|
|
609
|
+
i(Pe, {
|
|
610
|
+
modelValue: s.value,
|
|
611
|
+
"onUpdate:modelValue": a[0] || (a[0] = (o) => s.value = o),
|
|
612
|
+
views: t,
|
|
613
|
+
counts: e(l).data.value?.meta?.views,
|
|
614
|
+
"label-of": (o) => e(r)(`core.account.signins.views.${o}`),
|
|
615
|
+
label: e(r)("core.profile.signins.title")
|
|
616
|
+
}, null, 8, ["modelValue", "counts", "label-of", "label"])
|
|
617
|
+
]),
|
|
618
|
+
i(e(Q), {
|
|
619
|
+
state: e(l).state.value,
|
|
620
|
+
"skeleton-rows": 4,
|
|
621
|
+
"is-empty": () => !1,
|
|
622
|
+
onRetry: a[2] || (a[2] = (o) => e(l).reload())
|
|
623
|
+
}, {
|
|
624
|
+
default: p(({ value: o }) => [
|
|
625
|
+
x("div", Xe, [
|
|
626
|
+
i(Ce, {
|
|
627
|
+
rows: o.data
|
|
628
|
+
}, null, 8, ["rows"])
|
|
629
|
+
]),
|
|
630
|
+
x("div", Je, [
|
|
631
|
+
i(qe, {
|
|
632
|
+
page: c.value,
|
|
633
|
+
"onUpdate:page": a[1] || (a[1] = (d) => c.value = d),
|
|
634
|
+
"last-page": o.last_page,
|
|
635
|
+
total: o.total
|
|
636
|
+
}, null, 8, ["page", "last-page", "total"])
|
|
637
|
+
]),
|
|
638
|
+
x("p", Ke, _(e(r)("core.profile.signins.footer")), 1)
|
|
639
|
+
]),
|
|
640
|
+
_: 1
|
|
641
|
+
}, 8, ["state"])
|
|
642
|
+
]),
|
|
643
|
+
_: 1
|
|
644
|
+
}, 8, ["title"]));
|
|
645
|
+
}
|
|
646
|
+
}), Ye = { class: "grid grid-cols-1 items-start gap-4 lg:grid-cols-2" }, Ze = { class: "flex flex-col gap-4" }, Ct = /* @__PURE__ */ N({
|
|
647
|
+
__name: "ProfilePage",
|
|
648
|
+
setup(h) {
|
|
649
|
+
const { t: r } = U(), { http: u, session: t } = L(), s = Y(async ({ signal: l }) => (await u.request(q.profileShow, void 0, { signal: l })).data);
|
|
650
|
+
function c(l) {
|
|
651
|
+
s.update(l), t.refresh();
|
|
652
|
+
}
|
|
653
|
+
return (l, n) => (v(), C(e(ye), {
|
|
654
|
+
title: e(r)("core.profile.title"),
|
|
655
|
+
description: e(r)("core.profile.description"),
|
|
656
|
+
width: "content"
|
|
657
|
+
}, {
|
|
658
|
+
default: p(() => [
|
|
659
|
+
i(e(Q), {
|
|
660
|
+
state: e(s).state.value,
|
|
661
|
+
"skeleton-rows": 6,
|
|
662
|
+
"is-empty": () => !1,
|
|
663
|
+
onRetry: n[0] || (n[0] = (a) => e(s).reload())
|
|
664
|
+
}, {
|
|
665
|
+
default: p(({ value: a }) => [
|
|
666
|
+
x("div", Ye, [
|
|
667
|
+
x("div", Ze, [
|
|
668
|
+
i(Ee, {
|
|
669
|
+
profile: a,
|
|
670
|
+
onUpdated: c
|
|
671
|
+
}, null, 8, ["profile"]),
|
|
672
|
+
i(ze, {
|
|
673
|
+
profile: a,
|
|
674
|
+
onUpdated: c
|
|
675
|
+
}, null, 8, ["profile"])
|
|
676
|
+
]),
|
|
677
|
+
i(Ge),
|
|
678
|
+
i(Oe, { class: "lg:col-span-2" }),
|
|
679
|
+
i(Qe, { class: "lg:col-span-2" })
|
|
680
|
+
])
|
|
681
|
+
]),
|
|
682
|
+
_: 1
|
|
683
|
+
}, 8, ["state"])
|
|
684
|
+
]),
|
|
685
|
+
_: 1
|
|
686
|
+
}, 8, ["title", "description"]));
|
|
687
|
+
}
|
|
688
|
+
});
|
|
689
|
+
export {
|
|
690
|
+
Ct as default
|
|
691
|
+
};
|