solid-panes 5.0.0 → 5.1.0-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 +67 -2
- package/dist/RDFXMLPane2.cjs.js.map +1 -1
- package/dist/_virtual/~icons/lucide/cake.cjs.js +2 -0
- package/dist/_virtual/~icons/lucide/cake.cjs.js.map +1 -0
- package/dist/_virtual/~icons/lucide/cake.esm.js +11 -0
- package/dist/_virtual/~icons/lucide/cake.esm.js.map +1 -0
- package/dist/_virtual/~icons/lucide/camera.cjs.js +2 -0
- package/dist/_virtual/~icons/lucide/camera.cjs.js.map +1 -0
- package/dist/_virtual/~icons/lucide/camera.esm.js +11 -0
- package/dist/_virtual/~icons/lucide/camera.esm.js.map +1 -0
- package/dist/_virtual/~icons/lucide/circle-user-round.cjs.js +2 -0
- package/dist/_virtual/~icons/lucide/circle-user-round.cjs.js.map +1 -0
- package/dist/_virtual/~icons/lucide/circle-user-round.esm.js +11 -0
- package/dist/_virtual/~icons/lucide/circle-user-round.esm.js.map +1 -0
- package/dist/_virtual/~icons/lucide/mail.cjs.js +2 -0
- package/dist/_virtual/~icons/lucide/mail.cjs.js.map +1 -0
- package/dist/_virtual/~icons/lucide/mail.esm.js +11 -0
- package/dist/_virtual/~icons/lucide/mail.esm.js.map +1 -0
- package/dist/_virtual/~icons/lucide/map-pin.cjs.js +2 -0
- package/dist/_virtual/~icons/lucide/map-pin.cjs.js.map +1 -0
- package/dist/_virtual/~icons/lucide/map-pin.esm.js +11 -0
- package/dist/_virtual/~icons/lucide/map-pin.esm.js.map +1 -0
- package/dist/_virtual/~icons/lucide/phone.cjs.js +2 -0
- package/dist/_virtual/~icons/lucide/phone.cjs.js.map +1 -0
- package/dist/_virtual/~icons/lucide/phone.esm.js +11 -0
- package/dist/_virtual/~icons/lucide/phone.esm.js.map +1 -0
- package/dist/_virtual/~icons/lucide/user-round-plus.cjs.js +2 -0
- package/dist/_virtual/~icons/lucide/user-round-plus.cjs.js.map +1 -0
- package/dist/_virtual/~icons/lucide/user-round-plus.esm.js +11 -0
- package/dist/_virtual/~icons/lucide/user-round-plus.esm.js.map +1 -0
- package/dist/_virtual/~icons/lucide/x.cjs.js +2 -0
- package/dist/_virtual/~icons/lucide/x.cjs.js.map +1 -0
- package/dist/_virtual/~icons/lucide/x.esm.js +11 -0
- package/dist/_virtual/~icons/lucide/x.esm.js.map +1 -0
- package/dist/audio/audioPane.cjs.js +1 -1
- package/dist/audio/audioPane.cjs.js.map +1 -1
- package/dist/audio/audioPane.esm.js +1 -5
- package/dist/audio/audioPane.esm.js.map +1 -1
- package/dist/classInstancePane.cjs.js.map +1 -1
- package/dist/components/editor-card/EditorCard.cjs.js +1 -1
- package/dist/components/editor-card/EditorCard.cjs.js.map +1 -1
- package/dist/components/editor-card/EditorCard.esm.js +4 -7
- package/dist/components/editor-card/EditorCard.esm.js.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeader.cjs.js +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeader.cjs.js.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeader.esm.js +2 -2
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.cjs.js +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.cjs.js.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.esm.js +2 -2
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.cjs.js +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.cjs.js.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.esm.js +2 -2
- package/dist/components/file-explorer-header/FileExplorerProvider.cjs.js +5 -5
- package/dist/components/file-explorer-header/FileExplorerProvider.cjs.js.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerProvider.d.ts.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerProvider.esm.js +97 -96
- package/dist/components/file-explorer-header/FileExplorerProvider.esm.js.map +1 -1
- package/dist/components/header/Header.cjs.js +1 -1
- package/dist/components/header/Header.cjs.js.map +1 -1
- package/dist/components/header/Header.esm.js +2 -2
- package/dist/components/header/Header.styles.cjs.js +1 -1
- package/dist/components/header/Header.styles.cjs.js.map +1 -1
- package/dist/components/header/Header.styles.esm.js +1 -1
- package/dist/components/header/Header.styles.esm.js.map +1 -1
- package/dist/components/navbar/Navbar.cjs.js +1 -1
- package/dist/components/navbar/Navbar.cjs.js.map +1 -1
- package/dist/components/navbar/Navbar.d.ts +2 -0
- package/dist/components/navbar/Navbar.d.ts.map +1 -1
- package/dist/components/navbar/Navbar.esm.js +2 -2
- package/dist/components/navbar/Navbar.esm.js.map +1 -1
- package/dist/components/navbar/Navbar.styles.cjs.js +1 -1
- package/dist/components/navbar/Navbar.styles.cjs.js.map +1 -1
- package/dist/components/navbar/Navbar.styles.esm.js +1 -1
- package/dist/components/navbar/Navbar.styles.esm.js.map +1 -1
- package/dist/components/profile-heading/ProfileHeading.cjs.js +95 -0
- package/dist/components/profile-heading/ProfileHeading.cjs.js.map +1 -0
- package/dist/components/profile-heading/ProfileHeading.d.ts +45 -0
- package/dist/components/profile-heading/ProfileHeading.d.ts.map +1 -0
- package/dist/components/profile-heading/ProfileHeading.esm.js +480 -0
- package/dist/components/profile-heading/ProfileHeading.esm.js.map +1 -0
- package/dist/components/profile-heading/ProfileHeading.styles.cjs.js +2 -0
- package/dist/components/profile-heading/ProfileHeading.styles.cjs.js.map +1 -0
- package/dist/components/profile-heading/ProfileHeading.styles.esm.js +7 -0
- package/dist/components/profile-heading/ProfileHeading.styles.esm.js.map +1 -0
- package/dist/components/profile-heading/editor/index.d.ts +3 -0
- package/dist/components/profile-heading/editor/index.d.ts.map +1 -0
- package/dist/components/profile-heading/editor/sections/contactInfo/types.d.ts +44 -0
- package/dist/components/profile-heading/editor/sections/contactInfo/types.d.ts.map +1 -0
- package/dist/components/profile-heading/editor/sections/heading/HeadingEditDialog.cjs.js +297 -0
- package/dist/components/profile-heading/editor/sections/heading/HeadingEditDialog.cjs.js.map +1 -0
- package/dist/components/profile-heading/editor/sections/heading/HeadingEditDialog.d.ts +5 -0
- package/dist/components/profile-heading/editor/sections/heading/HeadingEditDialog.d.ts.map +1 -0
- package/dist/components/profile-heading/editor/sections/heading/HeadingEditDialog.esm.js +642 -0
- package/dist/components/profile-heading/editor/sections/heading/HeadingEditDialog.esm.js.map +1 -0
- package/dist/components/profile-heading/editor/sections/heading/dateHelpers.cjs.js +2 -0
- package/dist/components/profile-heading/editor/sections/heading/dateHelpers.cjs.js.map +1 -0
- package/dist/components/profile-heading/editor/sections/heading/dateHelpers.d.ts +4 -0
- package/dist/components/profile-heading/editor/sections/heading/dateHelpers.d.ts.map +1 -0
- package/dist/components/profile-heading/editor/sections/heading/dateHelpers.esm.js +16 -0
- package/dist/components/profile-heading/editor/sections/heading/dateHelpers.esm.js.map +1 -0
- package/dist/components/profile-heading/editor/sections/heading/imageHelpers.cjs.js +2 -0
- package/dist/components/profile-heading/editor/sections/heading/imageHelpers.cjs.js.map +1 -0
- package/dist/components/profile-heading/editor/sections/heading/imageHelpers.d.ts +5 -0
- package/dist/components/profile-heading/editor/sections/heading/imageHelpers.d.ts.map +1 -0
- package/dist/components/profile-heading/editor/sections/heading/imageHelpers.esm.js +76 -0
- package/dist/components/profile-heading/editor/sections/heading/imageHelpers.esm.js.map +1 -0
- package/dist/components/profile-heading/editor/sections/heading/imagePreview.cjs.js +19 -0
- package/dist/components/profile-heading/editor/sections/heading/imagePreview.cjs.js.map +1 -0
- package/dist/components/profile-heading/editor/sections/heading/imagePreview.d.ts +2 -0
- package/dist/components/profile-heading/editor/sections/heading/imagePreview.d.ts.map +1 -0
- package/dist/components/profile-heading/editor/sections/heading/imagePreview.esm.js +28 -0
- package/dist/components/profile-heading/editor/sections/heading/imagePreview.esm.js.map +1 -0
- package/dist/components/profile-heading/editor/sections/heading/mutations.cjs.js +2 -0
- package/dist/components/profile-heading/editor/sections/heading/mutations.cjs.js.map +1 -0
- package/dist/components/profile-heading/editor/sections/heading/mutations.d.ts +4 -0
- package/dist/components/profile-heading/editor/sections/heading/mutations.d.ts.map +1 -0
- package/dist/components/profile-heading/editor/sections/heading/mutations.esm.js +151 -0
- package/dist/components/profile-heading/editor/sections/heading/mutations.esm.js.map +1 -0
- package/dist/components/profile-heading/editor/sections/heading/types.d.ts +34 -0
- package/dist/components/profile-heading/editor/sections/heading/types.d.ts.map +1 -0
- package/dist/components/profile-heading/editor/sections/shared/contactTypeUtils.cjs.js +2 -0
- package/dist/components/profile-heading/editor/sections/shared/contactTypeUtils.cjs.js.map +1 -0
- package/dist/components/profile-heading/editor/sections/shared/contactTypeUtils.d.ts +7 -0
- package/dist/components/profile-heading/editor/sections/shared/contactTypeUtils.d.ts.map +1 -0
- package/dist/components/profile-heading/editor/sections/shared/contactTypeUtils.esm.js +20 -0
- package/dist/components/profile-heading/editor/sections/shared/contactTypeUtils.esm.js.map +1 -0
- package/dist/components/profile-heading/editor/sections/shared/idNodeFactory.cjs.js +2 -0
- package/dist/components/profile-heading/editor/sections/shared/idNodeFactory.cjs.js.map +1 -0
- package/dist/components/profile-heading/editor/sections/shared/idNodeFactory.d.ts +3 -0
- package/dist/components/profile-heading/editor/sections/shared/idNodeFactory.d.ts.map +1 -0
- package/dist/components/profile-heading/editor/sections/shared/idNodeFactory.esm.js +11 -0
- package/dist/components/profile-heading/editor/sections/shared/idNodeFactory.esm.js.map +1 -0
- package/dist/components/profile-heading/editor/sections/shared/phoneCountries.cjs.js +2 -0
- package/dist/components/profile-heading/editor/sections/shared/phoneCountries.cjs.js.map +1 -0
- package/dist/components/profile-heading/editor/sections/shared/phoneCountries.d.ts +20 -0
- package/dist/components/profile-heading/editor/sections/shared/phoneCountries.d.ts.map +1 -0
- package/dist/components/profile-heading/editor/sections/shared/phoneCountries.esm.js +1291 -0
- package/dist/components/profile-heading/editor/sections/shared/phoneCountries.esm.js.map +1 -0
- package/dist/components/profile-heading/editor/sections/shared/rdfMutationHelpers.cjs.js +2 -0
- package/dist/components/profile-heading/editor/sections/shared/rdfMutationHelpers.cjs.js.map +1 -0
- package/dist/components/profile-heading/editor/sections/shared/rdfMutationHelpers.d.ts +45 -0
- package/dist/components/profile-heading/editor/sections/shared/rdfMutationHelpers.d.ts.map +1 -0
- package/dist/components/profile-heading/editor/sections/shared/rdfMutationHelpers.esm.js +211 -0
- package/dist/components/profile-heading/editor/sections/shared/rdfMutationHelpers.esm.js.map +1 -0
- package/dist/components/profile-heading/editor/sections/shared/rowState.cjs.js +2 -0
- package/dist/components/profile-heading/editor/sections/shared/rowState.cjs.js.map +1 -0
- package/dist/components/profile-heading/editor/sections/shared/rowState.d.ts +21 -0
- package/dist/components/profile-heading/editor/sections/shared/rowState.d.ts.map +1 -0
- package/dist/components/profile-heading/editor/sections/shared/rowState.esm.js +18 -0
- package/dist/components/profile-heading/editor/sections/shared/rowState.esm.js.map +1 -0
- package/dist/components/profile-heading/editor/sections/shared/sanitizeUtils.cjs.js +2 -0
- package/dist/components/profile-heading/editor/sections/shared/sanitizeUtils.cjs.js.map +1 -0
- package/dist/components/profile-heading/editor/sections/shared/sanitizeUtils.d.ts +5 -0
- package/dist/components/profile-heading/editor/sections/shared/sanitizeUtils.d.ts.map +1 -0
- package/dist/components/profile-heading/editor/sections/shared/sanitizeUtils.esm.js +18 -0
- package/dist/components/profile-heading/editor/sections/shared/sanitizeUtils.esm.js.map +1 -0
- package/dist/components/profile-heading/editor/sections/shared/types.d.ts +31 -0
- package/dist/components/profile-heading/editor/sections/shared/types.d.ts.map +1 -0
- package/dist/components/profile-heading/editor/textUtils.cjs.js +2 -0
- package/dist/components/profile-heading/editor/textUtils.cjs.js.map +1 -0
- package/dist/components/profile-heading/editor/textUtils.d.ts +6 -0
- package/dist/components/profile-heading/editor/textUtils.d.ts.map +1 -0
- package/dist/components/profile-heading/editor/textUtils.esm.js +26 -0
- package/dist/components/profile-heading/editor/textUtils.esm.js.map +1 -0
- package/dist/components/profile-heading/editor/texts/buttonTexts.d.ts +9 -0
- package/dist/components/profile-heading/editor/texts/buttonTexts.d.ts.map +1 -0
- package/dist/components/profile-heading/editor/texts/dialogTexts.cjs.js +2 -0
- package/dist/components/profile-heading/editor/texts/dialogTexts.cjs.js.map +1 -0
- package/dist/components/profile-heading/editor/texts/dialogTexts.d.ts +14 -0
- package/dist/components/profile-heading/editor/texts/dialogTexts.d.ts.map +1 -0
- package/dist/components/profile-heading/editor/texts/dialogTexts.esm.js +6 -0
- package/dist/components/profile-heading/editor/texts/dialogTexts.esm.js.map +1 -0
- package/dist/components/profile-heading/editor/texts/messageTexts.cjs.js +2 -0
- package/dist/components/profile-heading/editor/texts/messageTexts.cjs.js.map +1 -0
- package/dist/components/profile-heading/editor/texts/messageTexts.d.ts +42 -0
- package/dist/components/profile-heading/editor/texts/messageTexts.d.ts.map +1 -0
- package/dist/components/profile-heading/editor/texts/messageTexts.esm.js +6 -0
- package/dist/components/profile-heading/editor/texts/messageTexts.esm.js.map +1 -0
- package/dist/components/profile-heading/editor/texts/profileTexts.d.ts +14 -0
- package/dist/components/profile-heading/editor/texts/profileTexts.d.ts.map +1 -0
- package/dist/components/profile-heading/editor/texts/qrCodeTexts.d.ts +2 -0
- package/dist/components/profile-heading/editor/texts/qrCodeTexts.d.ts.map +1 -0
- package/dist/components/profile-heading/editor/texts.d.ts +6 -0
- package/dist/components/profile-heading/editor/texts.d.ts.map +1 -0
- package/dist/components/profile-heading/editor/ui/dialog.d.ts +41 -0
- package/dist/components/profile-heading/editor/ui/dialog.d.ts.map +1 -0
- package/dist/components/profile-heading/editor/ui/dialog2.cjs.js +17 -0
- package/dist/components/profile-heading/editor/ui/dialog2.cjs.js.map +1 -0
- package/dist/components/profile-heading/editor/ui/dialog2.esm.js +263 -0
- package/dist/components/profile-heading/editor/ui/dialog2.esm.js.map +1 -0
- package/dist/components/profile-heading/editor/ui/spinner.cjs.js +5 -0
- package/dist/components/profile-heading/editor/ui/spinner.cjs.js.map +1 -0
- package/dist/components/profile-heading/editor/ui/spinner.d.ts +3 -0
- package/dist/components/profile-heading/editor/ui/spinner.d.ts.map +1 -0
- package/dist/components/profile-heading/editor/ui/spinner.esm.js +12 -0
- package/dist/components/profile-heading/editor/ui/spinner.esm.js.map +1 -0
- package/dist/components/profile-heading/editor/utils/errorDisplay.cjs.js +2 -0
- package/dist/components/profile-heading/editor/utils/errorDisplay.cjs.js.map +1 -0
- package/dist/components/profile-heading/editor/utils/errorDisplay.d.ts +2 -0
- package/dist/components/profile-heading/editor/utils/errorDisplay.d.ts.map +1 -0
- package/dist/components/profile-heading/editor/utils/errorDisplay.esm.js +18 -0
- package/dist/components/profile-heading/editor/utils/errorDisplay.esm.js.map +1 -0
- package/dist/components/profile-heading/friendActions.cjs.js +2 -0
- package/dist/components/profile-heading/friendActions.cjs.js.map +1 -0
- package/dist/components/profile-heading/friendActions.d.ts +11 -0
- package/dist/components/profile-heading/friendActions.d.ts.map +1 -0
- package/dist/components/profile-heading/friendActions.esm.js +32 -0
- package/dist/components/profile-heading/friendActions.esm.js.map +1 -0
- package/dist/components/profile-heading/index.cjs.js +1 -0
- package/dist/components/profile-heading/index.d.ts +5 -0
- package/dist/components/profile-heading/index.d.ts.map +1 -0
- package/dist/components/profile-heading/index.esm.js +1 -0
- package/dist/components/profile-heading/profileHeadingData.cjs.js +2 -0
- package/dist/components/profile-heading/profileHeadingData.cjs.js.map +1 -0
- package/dist/components/profile-heading/profileHeadingData.d.ts +6 -0
- package/dist/components/profile-heading/profileHeadingData.d.ts.map +1 -0
- package/dist/components/profile-heading/profileHeadingData.esm.js +81 -0
- package/dist/components/profile-heading/profileHeadingData.esm.js.map +1 -0
- package/dist/components/resource-actions-menu/ResourceActionsMenu.cjs.js +1 -1
- package/dist/components/resource-actions-menu/ResourceActionsMenu.cjs.js.map +1 -1
- package/dist/components/resource-actions-menu/ResourceActionsMenu.esm.js +2 -2
- package/dist/dashboard/basicPreferences.cjs.js.map +1 -1
- package/dist/dashboard/dashboardPane.cjs.js.map +1 -1
- package/dist/dashboard/homepage.cjs.js.map +1 -1
- package/dist/dataContentPane2.cjs.js.map +1 -1
- package/dist/defaultPane2.cjs.js.map +1 -1
- package/dist/dokieli/dokieliPane.cjs.js.map +1 -1
- package/dist/form/pane.cjs.js.map +1 -1
- package/dist/home/homePane.cjs.js.map +1 -1
- package/dist/humanReadablePane2.cjs.js.map +1 -1
- package/dist/icons/folder.cjs.js.map +1 -1
- package/dist/icons/friends.cjs.js.map +1 -1
- package/dist/icons/person.cjs.js.map +1 -1
- package/dist/imagePane2.cjs.js.map +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +15 -14
- package/dist/index.esm.js.map +1 -1
- package/dist/internal/internalPane2.cjs.js +1 -1
- package/dist/internal/internalPane2.cjs.js.map +1 -1
- package/dist/internal/internalPane2.esm.js +2 -5
- package/dist/internal/internalPane2.esm.js.map +1 -1
- package/dist/mainPage/header.cjs.js +1 -1
- package/dist/mainPage/header.cjs.js.map +1 -1
- package/dist/mainPage/header.d.ts +2 -2
- package/dist/mainPage/header.d.ts.map +1 -1
- package/dist/mainPage/header.esm.js +48 -44
- package/dist/mainPage/header.esm.js.map +1 -1
- package/dist/mainPage/index.cjs.js +1 -1
- package/dist/mainPage/index.cjs.js.map +1 -1
- package/dist/mainPage/index.d.ts.map +1 -1
- package/dist/mainPage/index.esm.js +27 -21
- package/dist/mainPage/index.esm.js.map +1 -1
- package/dist/mainPage/navbar.cjs.js +1 -1
- package/dist/mainPage/navbar.cjs.js.map +1 -1
- package/dist/mainPage/navbar.d.ts +3 -2
- package/dist/mainPage/navbar.d.ts.map +1 -1
- package/dist/mainPage/navbar.esm.js +77 -42
- package/dist/mainPage/navbar.esm.js.map +1 -1
- package/dist/mainPage/navigation.cjs.js +2 -0
- package/dist/mainPage/navigation.cjs.js.map +1 -0
- package/dist/mainPage/navigation.d.ts +6 -0
- package/dist/mainPage/navigation.d.ts.map +1 -0
- package/dist/mainPage/navigation.esm.js +22 -0
- package/dist/mainPage/navigation.esm.js.map +1 -0
- package/dist/mainPage/profileHeading.d.ts +5 -0
- package/dist/mainPage/profileHeading.d.ts.map +1 -0
- package/dist/mainPage/profileHeading2.cjs.js +2 -0
- package/dist/mainPage/profileHeading2.cjs.js.map +1 -0
- package/dist/mainPage/profileHeading2.esm.js +158 -0
- package/dist/mainPage/profileHeading2.esm.js.map +1 -0
- package/dist/n3Pane2.cjs.js.map +1 -1
- package/dist/navigation/browserEvents.cjs.js +2 -0
- package/dist/navigation/browserEvents.cjs.js.map +1 -0
- package/dist/navigation/browserEvents.d.ts +15 -0
- package/dist/navigation/browserEvents.d.ts.map +1 -0
- package/dist/navigation/browserEvents.esm.js +32 -0
- package/dist/navigation/browserEvents.esm.js.map +1 -0
- package/dist/navigation/chrome.cjs.js +2 -0
- package/dist/navigation/chrome.cjs.js.map +1 -0
- package/dist/navigation/chrome.d.ts +69 -0
- package/dist/navigation/chrome.d.ts.map +1 -0
- package/dist/navigation/chrome.esm.js +43 -0
- package/dist/navigation/chrome.esm.js.map +1 -0
- package/dist/navigation/controller.cjs.js +2 -0
- package/dist/navigation/controller.cjs.js.map +1 -0
- package/dist/navigation/controller.d.ts +51 -0
- package/dist/navigation/controller.d.ts.map +1 -0
- package/dist/navigation/controller.esm.js +45 -0
- package/dist/navigation/controller.esm.js.map +1 -0
- package/dist/navigation/events.cjs.js +2 -0
- package/dist/navigation/events.cjs.js.map +1 -0
- package/dist/navigation/events.d.ts +17 -0
- package/dist/navigation/events.d.ts.map +1 -0
- package/dist/navigation/events.esm.js +18 -0
- package/dist/navigation/events.esm.js.map +1 -0
- package/dist/navigation/navbarVisibility.cjs.js +2 -0
- package/dist/navigation/navbarVisibility.cjs.js.map +1 -0
- package/dist/navigation/navbarVisibility.d.ts +5 -0
- package/dist/navigation/navbarVisibility.d.ts.map +1 -0
- package/dist/navigation/navbarVisibility.esm.js +26 -0
- package/dist/navigation/navbarVisibility.esm.js.map +1 -0
- package/dist/navigation/options.cjs.js +2 -0
- package/dist/navigation/options.cjs.js.map +1 -0
- package/dist/navigation/options.d.ts +16 -0
- package/dist/navigation/options.d.ts.map +1 -0
- package/dist/navigation/options.esm.js +8 -0
- package/dist/navigation/options.esm.js.map +1 -0
- package/dist/navigation/podContext.cjs.js +2 -0
- package/dist/navigation/podContext.cjs.js.map +1 -0
- package/dist/navigation/podContext.d.ts +21 -0
- package/dist/navigation/podContext.d.ts.map +1 -0
- package/dist/navigation/podContext.esm.js +62 -0
- package/dist/navigation/podContext.esm.js.map +1 -0
- package/dist/navigation/state.cjs.js +2 -0
- package/dist/navigation/state.cjs.js.map +1 -0
- package/dist/navigation/state.d.ts +40 -0
- package/dist/navigation/state.d.ts.map +1 -0
- package/dist/navigation/state.esm.js +41 -0
- package/dist/navigation/state.esm.js.map +1 -0
- package/dist/outline/context.cjs.js.map +1 -1
- package/dist/outline/manager2.cjs.js +1 -1
- package/dist/outline/manager2.cjs.js.map +1 -1
- package/dist/outline/manager2.esm.js +387 -353
- package/dist/outline/manager2.esm.js.map +1 -1
- package/dist/outline/outlineIcons.cjs.js.map +1 -1
- package/dist/outline/propertyViews.cjs.js.map +1 -1
- package/dist/outline/queryByExample.cjs.js.map +1 -1
- package/dist/outline/userInput.cjs.js +1 -1
- package/dist/outline/userInput.cjs.js.map +1 -1
- package/dist/outline/userInput.esm.js +12 -13
- package/dist/outline/userInput.esm.js.map +1 -1
- package/dist/outline/viewAsImage.cjs.js.map +1 -1
- package/dist/outline/viewAsMbox.cjs.js.map +1 -1
- package/dist/pad/padPane2.cjs.js +1 -1
- package/dist/pad/padPane2.cjs.js.map +1 -1
- package/dist/pad/padPane2.esm.js +2 -6
- package/dist/pad/padPane2.esm.js.map +1 -1
- package/dist/playlist/playlistPane.cjs.js.map +1 -1
- package/dist/registerPanes.cjs.js.map +1 -1
- package/dist/schedule/schedulePane2.cjs.js +1 -1
- package/dist/schedule/schedulePane2.cjs.js.map +1 -1
- package/dist/schedule/schedulePane2.esm.js +1 -5
- package/dist/schedule/schedulePane2.esm.js.map +1 -1
- package/dist/sharing/sharingPane.cjs.js.map +1 -1
- package/dist/slideshow/slideshowPane.cjs.js.map +1 -1
- package/dist/social/editProfileDetails.cjs.js +1 -1
- package/dist/social/editProfileDetails.cjs.js.map +1 -1
- package/dist/social/editProfileDetails.esm.js +0 -2
- package/dist/social/editProfileDetails.esm.js.map +1 -1
- package/dist/social/icons.cjs.js +4 -4
- package/dist/social/icons.cjs.js.map +1 -1
- package/dist/social/icons.esm.js +5 -5
- package/dist/social/icons.esm.js.map +1 -1
- package/dist/social/socialPane.d.ts +0 -1
- package/dist/social/socialPane.d.ts.map +1 -1
- package/dist/social/socialPane2.cjs.js +3 -3
- package/dist/social/socialPane2.cjs.js.map +1 -1
- package/dist/social/socialPane2.esm.js +97 -154
- package/dist/social/socialPane2.esm.js.map +1 -1
- package/dist/social/socialSections.cjs.js +1 -1
- package/dist/social/socialSections.cjs.js.map +1 -1
- package/dist/social/socialSections.d.ts +2 -1
- package/dist/social/socialSections.d.ts.map +1 -1
- package/dist/social/socialSections.esm.js +54 -129
- package/dist/social/socialSections.esm.js.map +1 -1
- package/dist/social/triage.cjs.js.map +1 -1
- package/dist/tabbed/tabbedPane.cjs.js.map +1 -1
- package/dist/tableViewPane.cjs.js.map +1 -1
- package/dist/transaction/pane.cjs.js.map +1 -1
- package/dist/transaction/pane.esm.js +1 -1
- package/dist/transaction/pane.esm.js.map +1 -1
- package/dist/transaction/period.cjs.js.map +1 -1
- package/dist/trip/tripPane.cjs.js.map +1 -1
- package/dist/trustedApplications/trustedApplications.dom.cjs.js.map +1 -1
- package/dist/trustedApplications/trustedApplications.utils.cjs.js.map +1 -1
- package/dist/trustedApplications/trustedApplications.view.cjs.js.map +1 -1
- package/dist/types.d.ts +3 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/ui/pane.cjs.js +1 -1
- package/dist/ui/pane.cjs.js.map +1 -1
- package/dist/ui/pane.esm.js +2 -5
- package/dist/ui/pane.esm.js.map +1 -1
- package/dist/utils/paneUtils.cjs.js +1 -1
- package/dist/utils/paneUtils.cjs.js.map +1 -1
- package/dist/utils/paneUtils.esm.js +4 -4
- package/dist/utils/paneUtils.esm.js.map +1 -1
- package/dist/utils/podUtils.cjs.js.map +1 -1
- package/dist/utils/viewerUtils.cjs.js +2 -0
- package/dist/utils/viewerUtils.cjs.js.map +1 -0
- package/dist/utils/viewerUtils.d.ts +5 -0
- package/dist/utils/viewerUtils.d.ts.map +1 -0
- package/dist/utils/viewerUtils.esm.js +13 -0
- package/dist/utils/viewerUtils.esm.js.map +1 -0
- package/dist/utils/webIdUtils.cjs.js +1 -1
- package/dist/utils/webIdUtils.cjs.js.map +1 -1
- package/dist/utils/webIdUtils.d.ts +1 -0
- package/dist/utils/webIdUtils.d.ts.map +1 -1
- package/dist/utils/webIdUtils.esm.js +23 -19
- package/dist/utils/webIdUtils.esm.js.map +1 -1
- package/dist/versionInfo.cjs.js +1 -1
- package/dist/versionInfo.cjs.js.map +1 -1
- package/dist/versionInfo.esm.js +11 -11
- package/dist/versionInfo.esm.js.map +1 -1
- package/dist/video/videoPane.cjs.js.map +1 -1
- package/package.json +6 -5
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
(function(){try{if(typeof document<`u`){var e=document.createElement(`style`);e.appendChild(document.createTextNode(`#profile-modal .modal:has(#modal-desc>.profile__edit-form solid-ui-combobox:focus-within) #modal-desc{padding-bottom:calc(var(--profile-modal-panel-inline-padding) + 30px)}@media (width<=576px){#profile-modal{--profile-modal-panel-max-height:calc(100dvh - 4 * 15px);padding-top:max(15px, env(safe-area-inset-top));padding-right:0;padding-bottom:max(15px, env(safe-area-inset-bottom));place-items:center;padding-left:0}#profile-modal .modal{width:var(--profile-modal-panel-width);max-width:var(--profile-modal-panel-max-width);overscroll-behavior:contain;border-radius:5px;place-self:center;min-width:0;margin:0;padding:0}#profile-modal .modal .modal-header{gap:25px;padding:15px}#profile-modal .modal #modal-title{font-size:var(--solid-ui-font-size-lg,1.125rem);line-height:1.4}#profile-modal .modal #modal-desc{padding:15px 15px 25px}#profile-modal #modal-buttons{justify-content:flex-end;align-items:center;gap:var(--profile-modal-button-gap);padding:var(--profile-modal-compact-padding);flex-direction:row;width:100%}#profile-modal #modal-buttons>solid-ui-button{flex:1 0 0;width:auto;min-width:0}}html[data-layout=mobile] #profile-modal{--profile-modal-panel-max-height:calc(100dvh - 4 * 15px);padding-top:max(15px, env(safe-area-inset-top));padding-right:0;padding-bottom:max(15px, env(safe-area-inset-bottom));place-items:center;padding-left:0}html[data-layout=mobile] #profile-modal .modal{width:var(--profile-modal-panel-width);height:auto;max-height:var(--profile-modal-panel-max-height);max-width:var(--profile-modal-panel-max-width);overscroll-behavior:contain;border-radius:5px;place-self:center;min-width:0;margin:0;padding:0}html[data-layout=mobile] #profile-modal .modal .modal-header{gap:25px;padding:15px}html[data-layout=mobile] #profile-modal .modal #modal-title{font-size:var(--solid-ui-font-size-lg,1.125rem);line-height:1.4}html[data-layout=mobile] #profile-modal .modal #modal-desc{padding:15px 15px 25px}html[data-layout=mobile] #profile-modal #modal-buttons{justify-content:flex-end;align-items:center;gap:var(--profile-modal-button-gap);padding:var(--profile-modal-compact-padding);flex-direction:row;width:100%}html[data-layout=mobile] #profile-modal #modal-buttons>solid-ui-button{flex:1 0 0;width:auto;min-width:0}#profile-modal{--profile-modal-backdrop:var(--overlay-bg-muted,#00000080);--profile-modal-panel-inline-padding:25px;--profile-modal-panel-block-padding:20px;--profile-modal-compact-padding:15px;--profile-modal-button-gap:15px;--profile-modal-error-padding:12px;--profile-modal-panel-width:min(600px, calc(100vw - 32px));--profile-modal-panel-max-width:600px;--profile-modal-panel-max-height:calc(100dvh - 32px);background:var(--profile-modal-backdrop);z-index:9999;overscroll-behavior:contain;width:100%;max-width:none;height:100%;max-height:none;padding:0;padding-top:max(25px, env(safe-area-inset-top));padding-right:0;padding-bottom:max(25px, env(safe-area-inset-bottom));border:none;place-items:center;margin:0;padding-left:0;display:grid;position:fixed;inset:0;overflow:hidden}#profile-modal:not([open]){display:none}#profile-modal::backdrop{background:var(--profile-modal-backdrop)}#profile-modal .modal{box-sizing:border-box;background:var(--color-background);max-width:var(--profile-modal-panel-max-width);width:var(--profile-modal-panel-width);max-height:var(--profile-modal-panel-max-height);box-shadow:var(--box-shadow-modal,0 2px 10px #0000004d);border-radius:5px;grid-template-rows:auto minmax(0,1fr) auto auto;place-self:center;margin:0;display:grid;position:relative;overflow:hidden}#profile-modal .modal .modal-header{gap:var(--spacing-lg);width:100%;min-width:0;padding:var(--profile-modal-panel-block-padding) var(--profile-modal-panel-inline-padding);box-sizing:border-box;border-bottom:1px solid var(--solid-ui-color-slate-200,#e2e8f0);background:var(--solid-ui-color-slate-50,#f8fafc);border-radius:5px 5px 0 0}#profile-modal .modal #modal-desc{overscroll-behavior:contain;width:100%;min-width:0;min-height:0;padding:var(--profile-modal-panel-inline-padding);box-sizing:border-box;overflow:auto}#profile-modal .modal #modal-desc:has(>.profile__edit-form--projects){padding:10px var(--profile-modal-panel-inline-padding)}#profile-modal .modal #modal-desc:has(>#contacts-addressbook-picker-dialog){padding-top:0}#profile-modal #modal-desc>.profile__edit-form--projects{flex-direction:column;gap:10px;display:flex}#profile-modal .modal #modal-title{color:var(--color-text-subheading,var(--gray-900,#101828));margin:0}:is(#profile-modal .modal:has(#modal-desc>.profile__edit-form--projects) #modal-header-action,#profile-modal .modal:has(#modal-desc>.profile__edit-form--contact-info) #modal-header-action){display:none}#profile-modal #modal-buttons{width:100%;min-width:0;padding:var(--profile-modal-panel-block-padding) calc(var(--profile-modal-panel-inline-padding) + var(--spacing-xxs,.3125rem)) var(--profile-modal-compact-padding);gap:var(--profile-modal-button-gap);box-sizing:border-box;border-top:1px solid var(--solid-ui-color-slate-200,#e2e8f0);background:var(--color-surface-tertiary,var(--gray-50,#f9fafb));align-self:stretch}#profile-modal #modal-buttons[hidden]{display:none!important}#profile-modal #modal-buttons>solid-ui-button{width:10.8rem}#profile-modal .modal__error-section{margin-top:var(--spacing-sm);padding:var(--profile-modal-error-padding);border:1px solid var(--dialog-error-border,var(--pink-700,#ff98b3));background:var(--dialog-error-background,var(--pink-500,#ffdde6));color:var(--solid-ui-color-error,#b00020);text-align:center;white-space:pre-wrap;overflow-wrap:anywhere;border-radius:5px;margin-bottom:0}#profile-modal .modal__error-section[hidden]{display:none!important}#profile-modal #modal-saving-overlay{z-index:10;background:#ffffffc7;place-items:center;display:grid;position:absolute;inset:0}#profile-modal #modal-saving-overlay[hidden]{display:none}#profile-modal.modal--saving #modal-desc{opacity:.45;pointer-events:none}#profile-modal .modal__saving-indicator{gap:0}`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();
|
|
2
|
+
import "../../../../_virtual/~icons/lucide/x.esm.js";
|
|
3
|
+
import { createSpinner as e } from "./spinner.esm.js";
|
|
4
|
+
import { formatDisplayError as t } from "../utils/errorDisplay.esm.js";
|
|
5
|
+
import "solid-ui/components/button";
|
|
6
|
+
import { html as n, render as r } from "lit-html";
|
|
7
|
+
//#region src/components/profile-heading/editor/ui/dialog.ts
|
|
8
|
+
var i = n`<icon-lucide-x aria-hidden="true" focusable="false" style="width:12px;height:12px;color:#667085"></icon-lucide-x>`, a = null, o = /* @__PURE__ */ new WeakMap();
|
|
9
|
+
function s(e) {
|
|
10
|
+
return e instanceof HTMLElement ? e : e instanceof Node ? e.parentElement : null;
|
|
11
|
+
}
|
|
12
|
+
function c(e) {
|
|
13
|
+
return typeof e.composedPath == "function" ? e.composedPath() : e.target ? [e.target] : [];
|
|
14
|
+
}
|
|
15
|
+
function l(e) {
|
|
16
|
+
let t = c(e), n = a?.querySelector("#modal-desc");
|
|
17
|
+
if (n && t.includes(n) || a && t.includes(a)) return !0;
|
|
18
|
+
let r = s(e.target);
|
|
19
|
+
return !r || !a || !a.contains(r) ? !1 : !!r.closest("#modal-desc");
|
|
20
|
+
}
|
|
21
|
+
function u(e) {
|
|
22
|
+
let t = o.get(e);
|
|
23
|
+
return t || (t = {
|
|
24
|
+
count: 0,
|
|
25
|
+
previousHtmlOverflow: e.documentElement.style.overflow,
|
|
26
|
+
previousBodyOverflow: e.body.style.overflow,
|
|
27
|
+
removeScrollGuard: null
|
|
28
|
+
}, o.set(e, t)), t;
|
|
29
|
+
}
|
|
30
|
+
function d(e) {
|
|
31
|
+
let t = u(e);
|
|
32
|
+
if (t.removeScrollGuard) return;
|
|
33
|
+
let n = (e) => {
|
|
34
|
+
l(e) || e.preventDefault();
|
|
35
|
+
};
|
|
36
|
+
e.addEventListener("wheel", n, {
|
|
37
|
+
capture: !0,
|
|
38
|
+
passive: !1
|
|
39
|
+
}), e.addEventListener("touchmove", n, {
|
|
40
|
+
capture: !0,
|
|
41
|
+
passive: !1
|
|
42
|
+
}), t.removeScrollGuard = () => {
|
|
43
|
+
e.removeEventListener("wheel", n, !0), e.removeEventListener("touchmove", n, !0), t.removeScrollGuard = null;
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
function f(e) {
|
|
47
|
+
let t = u(e);
|
|
48
|
+
t.count === 0 && (t.previousHtmlOverflow = e.documentElement.style.overflow, t.previousBodyOverflow = e.body.style.overflow, e.documentElement.style.overflow = "hidden", e.body.style.overflow = "hidden", d(e)), t.count += 1;
|
|
49
|
+
}
|
|
50
|
+
function p(e) {
|
|
51
|
+
let t = u(e);
|
|
52
|
+
t.count !== 0 && (--t.count, !(t.count > 0) && (e.documentElement.style.overflow = t.previousHtmlOverflow, e.body.style.overflow = t.previousBodyOverflow, t.removeScrollGuard?.(), t.removeScrollGuard = null));
|
|
53
|
+
}
|
|
54
|
+
function m(e) {
|
|
55
|
+
return e.body;
|
|
56
|
+
}
|
|
57
|
+
function h(e) {
|
|
58
|
+
return e?.tagName === "SOLID-UI-BUTTON";
|
|
59
|
+
}
|
|
60
|
+
function g(e, t) {
|
|
61
|
+
e && (e.disabled = t, e.toggleAttribute("disabled", t));
|
|
62
|
+
}
|
|
63
|
+
function _(e, t) {
|
|
64
|
+
e && (h(e) && (e.label = t, e.setAttribute("label", t)), e.textContent = t);
|
|
65
|
+
}
|
|
66
|
+
function v(e) {
|
|
67
|
+
return e.querySelector("#modal-buttons [data-dialog-primary=\"true\"]");
|
|
68
|
+
}
|
|
69
|
+
function y(e) {
|
|
70
|
+
return e.querySelector("#modal-buttons [data-cancel=\"true\"]");
|
|
71
|
+
}
|
|
72
|
+
function b(e) {
|
|
73
|
+
let t = m(e);
|
|
74
|
+
return a && e.body.contains(a) ? (a.parentElement !== t && t.appendChild(a), a) : (a = null, a = e.createElement("dialog"), a.id = "profile-modal", a.setAttribute("aria-modal", "true"), a.setAttribute("aria-labelledby", "modal-title"), a.setAttribute("aria-describedby", "modal-desc"), a.innerHTML = "\n <div class=\"modal\">\n <div class=\"modal-header flex-row align-center justify-between\">\n <h2 id=\"modal-title\"></h2>\n <div id=\"modal-header-action\" class=\"flex-row align-center\"></div>\n </div>\n <div id=\"modal-desc\"></div>\n <section id=\"modal-error\" class=\"modal__error-section\" aria-live=\"assertive\" aria-atomic=\"true\" aria-hidden=\"true\" role=\"alert\" tabindex=\"-1\" hidden></section>\n <div id=\"modal-buttons\" class=\"flex-row align-center justify-end\"></div>\n <div id=\"modal-saving-overlay\" hidden></div>\n </div>\n ", t.appendChild(a), a);
|
|
75
|
+
}
|
|
76
|
+
function x(e) {
|
|
77
|
+
return {
|
|
78
|
+
dialog: e,
|
|
79
|
+
title: e.querySelector("#modal-title"),
|
|
80
|
+
headerAction: e.querySelector("#modal-header-action"),
|
|
81
|
+
description: e.querySelector("#modal-desc"),
|
|
82
|
+
error: e.querySelector("#modal-error"),
|
|
83
|
+
buttons: e.querySelector("#modal-buttons"),
|
|
84
|
+
savingOverlay: e.querySelector("#modal-saving-overlay")
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
function S(e) {
|
|
88
|
+
let t = "modal-desc", n = e.error.hidden || !e.error.textContent?.trim() ? t : `${t} modal-error`;
|
|
89
|
+
e.dialog.setAttribute("aria-describedby", n);
|
|
90
|
+
}
|
|
91
|
+
function C(e) {
|
|
92
|
+
e.error.textContent = "", e.error.setAttribute("aria-hidden", "true"), e.error.hidden = !0, S(e);
|
|
93
|
+
}
|
|
94
|
+
function w(e, n, r) {
|
|
95
|
+
e.error.textContent = t(n, r), e.error.setAttribute("aria-hidden", "false"), e.error.hidden = !1, S(e);
|
|
96
|
+
}
|
|
97
|
+
function T(e) {
|
|
98
|
+
if (f(e.ownerDocument), typeof e.showModal == "function") try {
|
|
99
|
+
e.open || e.showModal();
|
|
100
|
+
return;
|
|
101
|
+
} catch {}
|
|
102
|
+
e.setAttribute("open", "");
|
|
103
|
+
}
|
|
104
|
+
function E(e) {
|
|
105
|
+
try {
|
|
106
|
+
if (typeof e.close == "function" && e.open) {
|
|
107
|
+
e.close();
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
e.removeAttribute("open");
|
|
111
|
+
} finally {
|
|
112
|
+
p(e.ownerDocument);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
function D(e) {
|
|
116
|
+
return !!e.querySelector("[data-layout='mobile']");
|
|
117
|
+
}
|
|
118
|
+
function O(e) {
|
|
119
|
+
return !(e.hasAttribute("disabled") || e.getAttribute("aria-hidden") === "true" || e.getAttribute("hidden") !== null || e.tabIndex < 0);
|
|
120
|
+
}
|
|
121
|
+
function k(e) {
|
|
122
|
+
let t = e.querySelectorAll([
|
|
123
|
+
"input:not([type=\"hidden\"]):not([disabled])",
|
|
124
|
+
"textarea:not([disabled])",
|
|
125
|
+
"select:not([disabled])",
|
|
126
|
+
"solid-ui-select:not([disabled])",
|
|
127
|
+
"solid-ui-combobox:not([disabled])",
|
|
128
|
+
"[contenteditable=\"true\"]",
|
|
129
|
+
"button:not([disabled])",
|
|
130
|
+
"solid-ui-button:not([disabled])",
|
|
131
|
+
"[tabindex]:not([tabindex=\"-1\"])"
|
|
132
|
+
].join(","));
|
|
133
|
+
for (let e of t) if (e instanceof HTMLElement && O(e)) return e;
|
|
134
|
+
return null;
|
|
135
|
+
}
|
|
136
|
+
function A(e, t, n) {
|
|
137
|
+
if (D(e.ownerDocument)) {
|
|
138
|
+
e.tabIndex = -1, e.focus();
|
|
139
|
+
return;
|
|
140
|
+
}
|
|
141
|
+
let r = k(t);
|
|
142
|
+
if (r) {
|
|
143
|
+
r.focus(), (r instanceof HTMLInputElement || r instanceof HTMLTextAreaElement) && r.select();
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
let i = k(n);
|
|
147
|
+
i && i.focus();
|
|
148
|
+
}
|
|
149
|
+
function j(e) {
|
|
150
|
+
let t = new FormData(e), n = {};
|
|
151
|
+
return t.forEach((e, t) => {
|
|
152
|
+
n[t] = String(e);
|
|
153
|
+
}), n;
|
|
154
|
+
}
|
|
155
|
+
function M({ title: e, message: t, buttons: n, headerAction: a, dom: o }) {
|
|
156
|
+
let s = b(o), c = x(s);
|
|
157
|
+
return T(s), c.title.textContent = e || "", c.description.innerHTML = "", typeof t == "string" ? c.description.textContent = t : t && c.description.appendChild(t), c.buttons.innerHTML = "", C(c), new Promise((e) => {
|
|
158
|
+
let t = (t) => {
|
|
159
|
+
N(t), e(t);
|
|
160
|
+
}, l = () => {
|
|
161
|
+
let e = y(s);
|
|
162
|
+
e ? e.click() : t(!1);
|
|
163
|
+
};
|
|
164
|
+
s.oncancel = (e) => {
|
|
165
|
+
e.preventDefault(), l();
|
|
166
|
+
}, c.headerAction.innerHTML = "";
|
|
167
|
+
let u = a || { type: "close" };
|
|
168
|
+
if (u.type === "close") {
|
|
169
|
+
let e = o.createElement("solid-ui-button");
|
|
170
|
+
e.setAttribute("variant", "ghost"), e.setAttribute("aria-label", "Close dialog");
|
|
171
|
+
let t = o.createElement("span");
|
|
172
|
+
t.setAttribute("slot", "icon"), r(i, t), e.appendChild(t), e.onclick = () => l(), c.headerAction.appendChild(e);
|
|
173
|
+
} else if (u.type === "button") {
|
|
174
|
+
let e = o.createElement("solid-ui-button");
|
|
175
|
+
e.setAttribute("variant", "tertiary"), e.className = u.className || "", e.textContent = u.label, e.setAttribute("label", u.label), e.setAttribute("aria-label", u.ariaLabel || u.label), e.onclick = async () => {
|
|
176
|
+
u.onClick && await u.onClick();
|
|
177
|
+
}, c.headerAction.appendChild(e);
|
|
178
|
+
}
|
|
179
|
+
n.forEach((e) => {
|
|
180
|
+
let n = o.createElement("solid-ui-button");
|
|
181
|
+
n.setAttribute("label", e.label), n.setAttribute("variant", e.primary ? "primary" : "secondary"), n.textContent = e.label, e.primary && n.setAttribute("data-dialog-primary", "true"), e.cancel && n.setAttribute("data-cancel", "true"), n.addEventListener("click", async () => {
|
|
182
|
+
(!e.beforeClose || await e.beforeClose()) && t(e.value);
|
|
183
|
+
}), c.buttons.appendChild(n);
|
|
184
|
+
}), (o.defaultView?.requestAnimationFrame ? (e) => o.defaultView?.requestAnimationFrame(() => e()) : (e) => setTimeout(e, 0))(() => {
|
|
185
|
+
A(s, c.description, c.buttons);
|
|
186
|
+
});
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
function N(e) {
|
|
190
|
+
if (a) {
|
|
191
|
+
C(x(a)), E(a), a.oncancel = null;
|
|
192
|
+
let e = a.querySelector("#modal-header-action button");
|
|
193
|
+
e && (e.onclick = null);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
function P(t, i, a) {
|
|
197
|
+
let o = x(t), s = v(t), c = y(t);
|
|
198
|
+
if (t.classList.toggle("modal--saving", a), t.setAttribute("aria-busy", String(a)), o.description.toggleAttribute("inert", a), a) {
|
|
199
|
+
let e = t.ownerDocument.activeElement;
|
|
200
|
+
e && t.contains(e) && e.blur();
|
|
201
|
+
}
|
|
202
|
+
s && (g(s, a), s.setAttribute("aria-busy", String(a)), _(s, i)), c && g(c, a), o.savingOverlay.hidden = !a, r(a ? n`
|
|
203
|
+
<div class="modal__saving-indicator inline-flex-row justify-center" aria-live="polite" aria-label="Saving changes">
|
|
204
|
+
${e()}
|
|
205
|
+
</div>
|
|
206
|
+
` : n``, o.savingOverlay);
|
|
207
|
+
}
|
|
208
|
+
function F(e) {
|
|
209
|
+
let t = e.submitLabel || "Save Changes", n = e.cancelLabel || "Cancel", r = b(e.dom), i = x(r), a = (e) => e.replace(/^\s*edit\s+/i, "").replace(/^\s*add\s+/i, "").replace(/^\s*create\s+/i, "").trim();
|
|
210
|
+
(() => {
|
|
211
|
+
let t = a(e.title);
|
|
212
|
+
if (!t) return;
|
|
213
|
+
let n = Array.from(e.form.querySelectorAll([
|
|
214
|
+
"input:not([type=\"hidden\"])",
|
|
215
|
+
"textarea",
|
|
216
|
+
"select"
|
|
217
|
+
].join(",")));
|
|
218
|
+
if (n.length !== 1) return;
|
|
219
|
+
let [r] = n, i = r.hasAttribute("aria-label") || r.hasAttribute("aria-labelledby"), o = !!r.closest("label");
|
|
220
|
+
i || o || r.getAttribute("type") === "hidden" || r.getAttribute("aria-label") || r.setAttribute("aria-label", t);
|
|
221
|
+
})();
|
|
222
|
+
let o = (e) => {
|
|
223
|
+
e.preventDefault(), v(r)?.click();
|
|
224
|
+
};
|
|
225
|
+
e.form.addEventListener("submit", o);
|
|
226
|
+
let s = M({
|
|
227
|
+
title: e.title,
|
|
228
|
+
message: e.form,
|
|
229
|
+
headerAction: e.headerAction,
|
|
230
|
+
buttons: [{
|
|
231
|
+
label: n,
|
|
232
|
+
value: null,
|
|
233
|
+
cancel: !0
|
|
234
|
+
}, {
|
|
235
|
+
label: t,
|
|
236
|
+
value: "save",
|
|
237
|
+
primary: !0,
|
|
238
|
+
beforeClose: async () => {
|
|
239
|
+
if (C(i), e.shouldCloseWithoutSave && await e.shouldCloseWithoutSave()) return !0;
|
|
240
|
+
if (e.validate) {
|
|
241
|
+
let t = await e.validate();
|
|
242
|
+
if (t) return w(i, t), !1;
|
|
243
|
+
}
|
|
244
|
+
if (!e.onSave) return !0;
|
|
245
|
+
try {
|
|
246
|
+
return P(r, t, !0), await e.onSave(), !0;
|
|
247
|
+
} catch (n) {
|
|
248
|
+
P(r, t, !1);
|
|
249
|
+
let a = e.formatSaveError ? e.formatSaveError(n) : void 0;
|
|
250
|
+
return w(i, n, a), !1;
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
}],
|
|
254
|
+
dom: e.dom
|
|
255
|
+
}), c = e.dom.defaultView?.requestAnimationFrame ? (t) => e.dom.defaultView?.requestAnimationFrame(() => t()) : (e) => setTimeout(e, 0);
|
|
256
|
+
return e.onOpen && c(e.onOpen), i.buttons.hidden = !!e.hideFooterButtons, s.then((t) => t === "save" ? j(e.form) : null).finally(() => {
|
|
257
|
+
i.buttons.hidden = !1, P(r, t, !1), e.form.removeEventListener("submit", o);
|
|
258
|
+
});
|
|
259
|
+
}
|
|
260
|
+
//#endregion
|
|
261
|
+
export { y as getSharedDialogCancelButton, v as getSharedDialogSaveButton, F as openInputDialog };
|
|
262
|
+
|
|
263
|
+
//# sourceMappingURL=dialog2.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dialog2.esm.js","names":["html","render","createSpinner","formatDisplayError","closeIcon","modalDialog","scrollLockState","WeakMap","getEventTargetElement","target","HTMLElement","Node","parentElement","getEventPath","event","composedPath","isDialogScrollRegionTarget","path","description","querySelector","includes","targetElement","contains","Boolean","closest","getDocumentScrollLockState","dom","state","get","count","previousHtmlOverflow","documentElement","style","overflow","previousBodyOverflow","body","removeScrollGuard","set","installDocumentScrollGuard","preventBackgroundScroll","preventDefault","addEventListener","capture","passive","removeEventListener","lockDocumentScroll","unlockDocumentScroll","getDialogMountTarget","isSolidUiButton","control","tagName","setDialogActionDisabled","disabled","toggleAttribute","setDialogActionLabel","label","setAttribute","textContent","getSharedDialogSaveButton","root","getSharedDialogCancelButton","ensureModalDialog","mountTarget","appendChild","createElement","id","innerHTML","getDialogElements","dialog","title","headerAction","error","buttons","savingOverlay","syncDialogErrorDescription","elements","defaultDescription","describedBy","hidden","trim","clearModalError","setModalError","fallbackMessage","openDialogElement","ownerDocument","showModal","open","closeDialogElement","close","removeAttribute","isMobileDialogLayout","isFocusableElement","element","hasAttribute","getAttribute","tabIndex","findPreferredInitialFocusTarget","container","focusableControls","querySelectorAll","join","match","focusInitialDialogTarget","focus","initialTarget","HTMLInputElement","HTMLTextAreaElement","select","firstButton","collectFormValues","form","data","FormData","values","forEach","value","key","String","openModal","message","Promise","resolve","finish","closeModal","requestCancel","cancelBtn","click","oncancel","resolvedHeaderAction","type","closeButton","iconSlot","onclick","actionButton","className","ariaLabel","onClick","btn","b","primary","cancel","beforeClose","shouldClose","scheduleInitialFocus","defaultView","requestAnimationFrame","callback","setTimeout","_result","headerActionButton","closeSharedDialog","alertDialog","updateSavingUI","submitLabel","isSaving","saveButton","cancelButton","classList","toggle","activeElement","blur","setSharedDialogSavingState","openInputDialog","options","cancelLabel","deriveDefaultFieldLabel","replace","ensureFormControlsHaveAccessibleNames","titleLabel","controls","Array","from","length","hasExplicitLabel","hasNativeLabel","handleSubmit","dialogPromise","shouldCloseWithoutSave","validate","validationMessage","onSave","fallback","formatSaveError","undefined","scheduleOpenCallback","onOpen","hideFooterButtons","then","result","finally","closeIcon","modalDialog","scrollLockState","getEventTargetElement","target","getEventPath","event","isDialogScrollRegionTarget","path","description","targetElement","getDocumentScrollLockState","state","dom","installDocumentScrollGuard","preventBackgroundScroll","lockDocumentScroll","unlockDocumentScroll","getDialogMountTarget","isSolidUiButton","control","setDialogActionDisabled","disabled","setDialogActionLabel","label","getSharedDialogSaveButton","root","getSharedDialogCancelButton","ensureModalDialog","mountTarget","getDialogElements","dialog","syncDialogErrorDescription","defaultDescription","describedBy","elements","clearModalError","setModalError","formatDisplayError","error","fallbackMessage","openDialogElement","closeDialogElement","isMobileDialogLayout","isFocusableElement","element","findPreferredInitialFocusTarget","focusableControls","container","match","focusInitialDialogTarget","initialTarget","firstButton","buttons","collectFormValues","data","form","values","key","value","openModal","title","message","finish","closeModal","resolve","requestCancel","cancelBtn","resolvedHeaderAction","headerAction","closeButton","iconSlot","render","actionButton","b","btn","callback","headerActionButton","updateSavingUI","saveButton","cancelButton","isSaving","activeElement","submitLabel","createSpinner","openInputDialog","options","cancelLabel","deriveDefaultFieldLabel","titleLabel","controls","hasExplicitLabel","hasNativeLabel","handleSubmit","dialogPromise","validationMessage","fallback","scheduleOpenCallback","result"],"sources":["../../../../../src/components/profile-heading/editor/ui/dialog.ts"],"sourcesContent":["import './dialog.css'\nimport 'solid-ui/components/button'\nimport '~icons/lucide/x'\nimport { html, render } from 'lit-html'\nimport { createSpinner } from './spinner'\nimport { formatDisplayError } from '../utils/errorDisplay'\n\nconst closeIcon = html`<icon-lucide-x aria-hidden=\"true\" focusable=\"false\" style=\"width:12px;height:12px;color:#667085\"></icon-lucide-x>`\n\n/* Copied from issue-pane, minor typescript adjustments */\n/* Changed modal from div to dialog element */\nlet modalDialog: HTMLDialogElement | null = null\n\nconst scrollLockState = new WeakMap<Document, {\n count: number,\n previousHtmlOverflow: string,\n previousBodyOverflow: string,\n removeScrollGuard: (() => void) | null\n}>()\n\nfunction getEventTargetElement (target: EventTarget | null): HTMLElement | null {\n if (target instanceof HTMLElement) return target\n if (target instanceof Node) return target.parentElement\n return null\n}\n\nfunction getEventPath (event: Event): EventTarget[] {\n if (typeof event.composedPath === 'function') {\n return event.composedPath()\n }\n\n return event.target ? [event.target] : []\n}\n\nfunction isDialogScrollRegionTarget (event: Event): boolean {\n const path = getEventPath(event)\n const description = modalDialog?.querySelector('#modal-desc')\n\n if (description && path.includes(description)) {\n return true\n }\n\n if (modalDialog && path.includes(modalDialog)) {\n return true\n }\n\n const targetElement = getEventTargetElement(event.target)\n if (!targetElement || !modalDialog || !modalDialog.contains(targetElement)) {\n return false\n }\n\n return Boolean(targetElement.closest('#modal-desc'))\n}\n\nfunction getDocumentScrollLockState (dom: Document) {\n let state = scrollLockState.get(dom)\n if (!state) {\n state = {\n count: 0,\n previousHtmlOverflow: dom.documentElement.style.overflow,\n previousBodyOverflow: dom.body.style.overflow,\n removeScrollGuard: null\n }\n scrollLockState.set(dom, state)\n }\n return state\n}\n\nfunction installDocumentScrollGuard (dom: Document): void {\n const state = getDocumentScrollLockState(dom)\n if (state.removeScrollGuard) return\n\n const preventBackgroundScroll = (event: Event) => {\n if (!isDialogScrollRegionTarget(event)) {\n event.preventDefault()\n }\n }\n\n dom.addEventListener('wheel', preventBackgroundScroll, { capture: true, passive: false })\n dom.addEventListener('touchmove', preventBackgroundScroll, { capture: true, passive: false })\n state.removeScrollGuard = () => {\n dom.removeEventListener('wheel', preventBackgroundScroll, true)\n dom.removeEventListener('touchmove', preventBackgroundScroll, true)\n state.removeScrollGuard = null\n }\n}\n\nfunction lockDocumentScroll (dom: Document): void {\n const state = getDocumentScrollLockState(dom)\n\n if (state.count === 0) {\n state.previousHtmlOverflow = dom.documentElement.style.overflow\n state.previousBodyOverflow = dom.body.style.overflow\n\n dom.documentElement.style.overflow = 'hidden'\n dom.body.style.overflow = 'hidden'\n installDocumentScrollGuard(dom)\n }\n\n state.count += 1\n}\n\nfunction unlockDocumentScroll (dom: Document): void {\n const state = getDocumentScrollLockState(dom)\n if (state.count === 0) return\n\n state.count -= 1\n if (state.count > 0) return\n\n dom.documentElement.style.overflow = state.previousHtmlOverflow\n dom.body.style.overflow = state.previousBodyOverflow\n state.removeScrollGuard?.()\n state.removeScrollGuard = null\n}\n\nfunction getDialogMountTarget (dom: Document): HTMLElement {\n return dom.body\n}\n\ntype DialogButtonValue = boolean | 'save' | null\ntype DialogButton = {\n label: string,\n value: DialogButtonValue,\n primary?: boolean,\n cancel?: boolean,\n beforeClose?: () => Promise<boolean> | boolean\n}\n\ntype DialogHeaderAction =\n | { type: 'close' }\n | { type: 'none' }\n | {\n type: 'button',\n label: string,\n ariaLabel?: string,\n className?: string,\n onClick?: () => Promise<void> | void\n }\n\ntype DialogElements = {\n dialog: HTMLDialogElement,\n title: HTMLHeadingElement,\n headerAction: HTMLDivElement,\n description: HTMLDivElement,\n error: HTMLElement,\n buttons: HTMLDivElement,\n savingOverlay: HTMLDivElement\n}\n\ntype DialogActionControl = HTMLElement & {\n disabled?: boolean,\n label?: string,\n click: () => void,\n shadowRoot?: ShadowRoot | null\n}\n\nfunction isSolidUiButton (control: Element | null): control is DialogActionControl {\n return control?.tagName === 'SOLID-UI-BUTTON'\n}\n\nfunction setDialogActionDisabled (control: DialogActionControl | null, disabled: boolean): void {\n if (!control) return\n control.disabled = disabled\n control.toggleAttribute('disabled', disabled)\n}\n\nfunction setDialogActionLabel (control: DialogActionControl | null, label: string): void {\n if (!control) return\n\n if (isSolidUiButton(control)) {\n control.label = label\n control.setAttribute('label', label)\n control.textContent = label\n return\n }\n\n ;(control as HTMLElement).textContent = label\n}\n\nexport function getSharedDialogSaveButton (root: ParentNode): DialogActionControl | null {\n return root.querySelector('#modal-buttons [data-dialog-primary=\"true\"]') as DialogActionControl | null\n}\n\nexport function getSharedDialogCancelButton (root: ParentNode): DialogActionControl | null {\n return root.querySelector('#modal-buttons [data-cancel=\"true\"]') as DialogActionControl | null\n}\n\nfunction ensureModalDialog (dom: Document): HTMLDialogElement {\n const mountTarget = getDialogMountTarget(dom)\n\n // if we previously created a dialog but it was removed from the document\n // (tests clear body), rebuild it. Checking presence ensures our reference\n // doesn't point at a detached element.\n if (modalDialog && dom.body.contains(modalDialog)) {\n if (modalDialog.parentElement !== mountTarget) {\n mountTarget.appendChild(modalDialog)\n }\n return modalDialog\n }\n\n modalDialog = null\n modalDialog = dom.createElement('dialog')\n modalDialog.id = 'profile-modal'\n modalDialog.setAttribute('aria-modal', 'true')\n modalDialog.setAttribute('aria-labelledby', 'modal-title')\n modalDialog.setAttribute('aria-describedby', 'modal-desc')\n\n modalDialog.innerHTML = `\n <div class=\"modal\">\n <div class=\"modal-header flex-row align-center justify-between\">\n <h2 id=\"modal-title\"></h2>\n <div id=\"modal-header-action\" class=\"flex-row align-center\"></div>\n </div>\n <div id=\"modal-desc\"></div>\n <section id=\"modal-error\" class=\"modal__error-section\" aria-live=\"assertive\" aria-atomic=\"true\" aria-hidden=\"true\" role=\"alert\" tabindex=\"-1\" hidden></section>\n <div id=\"modal-buttons\" class=\"flex-row align-center justify-end\"></div>\n <div id=\"modal-saving-overlay\" hidden></div>\n </div>\n `\n\n mountTarget.appendChild(modalDialog)\n return modalDialog\n}\n\nfunction getDialogElements (dialog: HTMLDialogElement): DialogElements {\n return {\n dialog,\n title: dialog.querySelector('#modal-title') as HTMLHeadingElement,\n headerAction: dialog.querySelector('#modal-header-action') as HTMLDivElement,\n description: dialog.querySelector('#modal-desc') as HTMLDivElement,\n error: dialog.querySelector('#modal-error') as HTMLElement,\n buttons: dialog.querySelector('#modal-buttons') as HTMLDivElement,\n savingOverlay: dialog.querySelector('#modal-saving-overlay') as HTMLDivElement\n }\n}\n\nfunction syncDialogErrorDescription (elements: DialogElements): void {\n const defaultDescription = 'modal-desc'\n const describedBy = elements.error.hidden || !elements.error.textContent?.trim()\n ? defaultDescription\n : `${defaultDescription} modal-error`\n\n elements.dialog.setAttribute('aria-describedby', describedBy)\n}\n\nfunction clearModalError (elements: DialogElements): void {\n elements.error.textContent = ''\n elements.error.setAttribute('aria-hidden', 'true')\n elements.error.hidden = true\n syncDialogErrorDescription(elements)\n}\n\nfunction setModalError (elements: DialogElements, error: unknown, fallbackMessage?: string): void {\n elements.error.textContent = formatDisplayError(error, fallbackMessage)\n elements.error.setAttribute('aria-hidden', 'false')\n elements.error.hidden = false\n syncDialogErrorDescription(elements)\n}\n\nfunction openDialogElement (dialog: HTMLDialogElement): void {\n lockDocumentScroll(dialog.ownerDocument)\n\n if (typeof dialog.showModal === 'function') {\n try {\n if (!dialog.open) dialog.showModal()\n return\n } catch {\n // Fall back for jsdom or partial dialog implementations.\n }\n }\n\n dialog.setAttribute('open', '')\n}\n\nfunction closeDialogElement (dialog: HTMLDialogElement): void {\n try {\n if (typeof dialog.close === 'function' && dialog.open) {\n dialog.close()\n return\n }\n\n dialog.removeAttribute('open')\n } finally {\n unlockDocumentScroll(dialog.ownerDocument)\n }\n}\n\nfunction isMobileDialogLayout (dom: Document): boolean {\n return Boolean(dom.querySelector('[data-layout=\\'mobile\\']'))\n}\n\nfunction isFocusableElement (element: HTMLElement): boolean {\n if (element.hasAttribute('disabled')) return false\n if (element.getAttribute('aria-hidden') === 'true') return false\n if (element.getAttribute('hidden') !== null) return false\n if (element.tabIndex < 0) return false\n return true\n}\n\nfunction findPreferredInitialFocusTarget (container: ParentNode): HTMLElement | null {\n const focusableControls = container.querySelectorAll([\n 'input:not([type=\"hidden\"]):not([disabled])',\n 'textarea:not([disabled])',\n 'select:not([disabled])',\n 'solid-ui-select:not([disabled])',\n 'solid-ui-combobox:not([disabled])',\n '[contenteditable=\"true\"]',\n 'button:not([disabled])',\n 'solid-ui-button:not([disabled])',\n '[tabindex]:not([tabindex=\"-1\"])'\n ].join(','))\n\n for (const match of focusableControls) {\n if (match instanceof HTMLElement && isFocusableElement(match)) return match\n }\n\n return null\n}\n\nfunction focusInitialDialogTarget (dialog: HTMLDialogElement, description: HTMLDivElement, buttons: HTMLDivElement): void {\n if (isMobileDialogLayout(dialog.ownerDocument)) {\n dialog.tabIndex = -1\n dialog.focus()\n return\n }\n\n const initialTarget = findPreferredInitialFocusTarget(description)\n if (initialTarget) {\n initialTarget.focus()\n if (initialTarget instanceof HTMLInputElement || initialTarget instanceof HTMLTextAreaElement) {\n initialTarget.select()\n }\n return\n }\n\n const firstButton = findPreferredInitialFocusTarget(buttons)\n if (firstButton) {\n firstButton.focus()\n }\n}\n\nfunction collectFormValues (form: HTMLFormElement): InputDialogValues {\n const data = new FormData(form)\n const values: InputDialogValues = {}\n data.forEach((value, key) => {\n values[key] = String(value)\n })\n return values\n}\n\nfunction openModal ({\n title,\n message,\n buttons,\n headerAction,\n dom\n}: {\n title?: string,\n message?: string | Node,\n buttons: DialogButton[],\n headerAction?: DialogHeaderAction,\n dom: Document\n}) {\n const dialog = ensureModalDialog(dom)\n const elements = getDialogElements(dialog)\n\n openDialogElement(dialog)\n\n elements.title.textContent = title || ''\n elements.description.innerHTML = ''\n if (typeof message === 'string') {\n elements.description.textContent = message\n } else if (message) {\n elements.description.appendChild(message)\n }\n\n elements.buttons.innerHTML = ''\n clearModalError(elements)\n\n return new Promise<DialogButtonValue>((resolve) => {\n const finish = (value: DialogButtonValue) => {\n closeModal(value)\n resolve(value)\n }\n\n const requestCancel = () => {\n const cancelBtn = getSharedDialogCancelButton(dialog)\n if (cancelBtn) {\n cancelBtn.click()\n return\n }\n\n finish(false)\n }\n\n dialog.oncancel = (event: Event) => {\n event.preventDefault()\n requestCancel()\n }\n\n elements.headerAction.innerHTML = ''\n const resolvedHeaderAction = headerAction || { type: 'close' as const }\n if (resolvedHeaderAction.type === 'close') {\n const closeButton = dom.createElement('solid-ui-button') as DialogActionControl\n closeButton.setAttribute('variant', 'ghost')\n closeButton.setAttribute('aria-label', 'Close dialog')\n const iconSlot = dom.createElement('span')\n iconSlot.setAttribute('slot', 'icon')\n render(closeIcon, iconSlot)\n closeButton.appendChild(iconSlot)\n closeButton.onclick = () => requestCancel()\n elements.headerAction.appendChild(closeButton)\n } else if (resolvedHeaderAction.type === 'button') {\n const actionButton = dom.createElement('solid-ui-button') as DialogActionControl\n actionButton.setAttribute('variant', 'tertiary')\n actionButton.className = resolvedHeaderAction.className || ''\n actionButton.textContent = resolvedHeaderAction.label\n actionButton.setAttribute('label', resolvedHeaderAction.label)\n actionButton.setAttribute('aria-label', resolvedHeaderAction.ariaLabel || resolvedHeaderAction.label)\n actionButton.onclick = async () => {\n if (resolvedHeaderAction.onClick) {\n await resolvedHeaderAction.onClick()\n }\n }\n elements.headerAction.appendChild(actionButton)\n }\n\n buttons.forEach((btn) => {\n const b = dom.createElement('solid-ui-button') as DialogActionControl\n b.setAttribute('label', btn.label)\n b.setAttribute('variant', btn.primary ? 'primary' : 'secondary')\n b.textContent = btn.label\n if (btn.primary) {\n b.setAttribute('data-dialog-primary', 'true')\n }\n if (btn.cancel) {\n b.setAttribute('data-cancel', 'true')\n }\n b.addEventListener('click', async () => {\n if (btn.beforeClose) {\n const shouldClose = await btn.beforeClose()\n if (!shouldClose) return\n }\n finish(btn.value)\n })\n elements.buttons.appendChild(b)\n })\n\n const scheduleInitialFocus = dom.defaultView?.requestAnimationFrame\n ? (callback: () => void) => dom.defaultView?.requestAnimationFrame(() => callback())\n : (callback: () => void) => setTimeout(callback, 0)\n\n scheduleInitialFocus(() => {\n focusInitialDialogTarget(dialog, elements.description, elements.buttons)\n })\n })\n}\n\nfunction closeModal (_result: DialogButtonValue): void {\n if (modalDialog) {\n const elements = getDialogElements(modalDialog)\n clearModalError(elements)\n closeDialogElement(modalDialog)\n modalDialog.oncancel = null\n const headerActionButton = modalDialog.querySelector('#modal-header-action button') as HTMLButtonElement | null\n if (headerActionButton) headerActionButton.onclick = null\n }\n}\n\nexport function closeSharedDialog (): void {\n closeModal(null)\n}\n\nexport function alertDialog (message: string, title = 'Information', dom: Document) {\n return openModal({\n title,\n message,\n buttons: [{ label: 'OK', value: true, primary: true }],\n dom\n })\n}\n\nfunction updateSavingUI (dialog: HTMLDialogElement, submitLabel: string, isSaving: boolean) {\n const elements = getDialogElements(dialog)\n const saveButton = getSharedDialogSaveButton(dialog)\n const cancelButton = getSharedDialogCancelButton(dialog)\n\n dialog.classList.toggle('modal--saving', isSaving)\n dialog.setAttribute('aria-busy', String(isSaving))\n elements.description.toggleAttribute('inert', isSaving)\n\n if (isSaving) {\n const activeElement = dialog.ownerDocument.activeElement as HTMLElement | null\n if (activeElement && dialog.contains(activeElement)) {\n activeElement.blur()\n }\n }\n\n if (saveButton) {\n setDialogActionDisabled(saveButton, isSaving)\n saveButton.setAttribute('aria-busy', String(isSaving))\n setDialogActionLabel(saveButton, submitLabel)\n }\n\n if (cancelButton) {\n setDialogActionDisabled(cancelButton, isSaving)\n }\n\n elements.savingOverlay.hidden = !isSaving\n if (isSaving) {\n render(html`\n <div class=\"modal__saving-indicator inline-flex-row justify-center\" aria-live=\"polite\" aria-label=\"Saving changes\">\n ${createSpinner()}\n </div>\n `, elements.savingOverlay)\n } else {\n render(html``, elements.savingOverlay)\n }\n}\n\nexport function setSharedDialogSavingState (dom: Document, isSaving: boolean, submitLabel = 'Saving Changes'): void {\n const dialog = ensureModalDialog(dom)\n updateSavingUI(dialog, submitLabel, isSaving)\n}\n\ntype OpenInputDialogCustom = {\n title: string,\n dom: Document,\n form: HTMLFormElement,\n submitLabel?: string,\n cancelLabel?: string,\n headerAction?: DialogHeaderAction,\n hideFooterButtons?: boolean,\n onOpen?: () => void,\n shouldCloseWithoutSave?: () => Promise<boolean> | boolean,\n validate?: () => Promise<string | null> | string | null,\n onSave?: () => Promise<void> | void,\n formatSaveError?: (error: unknown) => string\n}\n\ntype InputDialogValues = Record<string, string>\n/* Function below generated by AI Model: GPT-5.3-Codex */\n/* Prompt: write me a reusable function to open a dialog with a form and return the form values on submit.\nThe function should also support validation and display error messages in the dialog.\nIt should reuse the OpenModal function for consistency. Done in 2 passes */\nexport function openInputDialog (options: OpenInputDialogCustom): Promise<InputDialogValues | null> {\n const submitLabel = options.submitLabel || 'Save Changes'\n const cancelLabel = options.cancelLabel || 'Cancel'\n const dialog = ensureModalDialog(options.dom)\n const elements = getDialogElements(dialog)\n\n const deriveDefaultFieldLabel = (value: string): string => value\n .replace(/^\\s*edit\\s+/i, '')\n .replace(/^\\s*add\\s+/i, '')\n .replace(/^\\s*create\\s+/i, '')\n .trim()\n\n const ensureFormControlsHaveAccessibleNames = () => {\n const titleLabel = deriveDefaultFieldLabel(options.title)\n if (!titleLabel) return\n\n const controls = Array.from(options.form.querySelectorAll<HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement>([\n 'input:not([type=\"hidden\"])',\n 'textarea',\n 'select'\n ].join(',')))\n\n if (controls.length !== 1) return\n\n const [control] = controls\n const hasExplicitLabel = control.hasAttribute('aria-label') || control.hasAttribute('aria-labelledby')\n const hasNativeLabel = Boolean(control.closest('label'))\n if (hasExplicitLabel || hasNativeLabel || control.getAttribute('type') === 'hidden') {\n return\n }\n\n if (!control.getAttribute('aria-label')) {\n control.setAttribute('aria-label', titleLabel)\n }\n }\n\n ensureFormControlsHaveAccessibleNames()\n\n const handleSubmit = (event: SubmitEvent) => {\n event.preventDefault()\n const saveButton = getSharedDialogSaveButton(dialog)\n saveButton?.click()\n }\n\n options.form.addEventListener('submit', handleSubmit)\n\n const dialogPromise = openModal({\n title: options.title,\n message: options.form,\n headerAction: options.headerAction,\n buttons: [\n { label: cancelLabel, value: null, cancel: true },\n {\n label: submitLabel,\n value: 'save',\n primary: true,\n beforeClose: async () => {\n clearModalError(elements)\n\n if (options.shouldCloseWithoutSave && await options.shouldCloseWithoutSave()) {\n return true\n }\n\n if (options.validate) {\n const validationMessage = await options.validate()\n if (validationMessage) {\n setModalError(elements, validationMessage)\n return false\n }\n }\n\n if (!options.onSave) return true\n\n try {\n updateSavingUI(dialog, submitLabel, true)\n\n await options.onSave()\n return true\n } catch (error) {\n updateSavingUI(dialog, submitLabel, false)\n const fallback = options.formatSaveError ? options.formatSaveError(error) : undefined\n setModalError(elements, error, fallback)\n return false\n }\n }\n }\n ],\n dom: options.dom\n })\n\n const scheduleOpenCallback = options.dom.defaultView?.requestAnimationFrame\n ? (callback: () => void) => options.dom.defaultView?.requestAnimationFrame(() => callback())\n : (callback: () => void) => setTimeout(callback, 0)\n\n if (options.onOpen) {\n scheduleOpenCallback(options.onOpen)\n }\n\n elements.buttons.hidden = Boolean(options.hideFooterButtons)\n\n return dialogPromise\n .then((result) => {\n if (result !== 'save') return null\n return collectFormValues(options.form)\n })\n .finally(() => {\n elements.buttons.hidden = false\n updateSavingUI(dialog, submitLabel, false)\n options.form.removeEventListener('submit', handleSubmit)\n })\n}\n"],"mappings":";;;;;;;AAOA,IAAMI,IAAYJ,CAAI,qHAIlBK,IAAwC,MAEtCC,oBAAkB,IAAIC,QAKzB;AAEH,SAASC,EAAuBC,GAAgD;CAG9E,OAFIA,aAAkBC,cAAoBD,IACtCA,aAAkBE,OAAaF,EAAOG,gBACnC;AACT;AAEA,SAASC,EAA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CAAiB,GAClC;IAEX;IAEA,IAAI,CAAChB,EAAQiB,QAAQ,OAAO;IAE5B,IAAI;KAIF,OAHA5B,EAAepF,GAAQqF,GAAa,EAAI,GAExC,MAAMU,EAAQiB,OAAO,GACd;IACT,SAAS7G,GAAO;KACdiF,EAAepF,GAAQqF,GAAa,EAAK;KACzC,IAAM4B,IAAWlB,EAAQmB,kBAAkBnB,EAAQmB,gBAAgB/G,CAAK,IAAIgH,KAAAA;KAE5E,OADAtG,EAAcN,GAAUJ,GAAO8G,CAAQ,GAChC;IACT;GACF;EACF,CAAC;EAEH3J,KAAKyI,EAAQzI;CACf,CAAC,GAEK8J,IAAuBrB,EAAQzI,IAAIsH,aAAaC,yBACjDC,MAAyBiB,EAAQzI,IAAIsH,aAAaC,4BAA4BC,EAAS,CAAC,KACxFA,MAAyBC,WAAWD,GAAU,CAAC;CAQpD,OANIiB,EAAQsB,UACVD,EAAqBrB,EAAQsB,MAAM,GAGrC9G,EAASH,QAAQM,SAASvD,EAAQ4I,EAAQuB,mBAEnCV,EACJW,MAAMC,MACDA,MAAW,SACR/E,EAAkBsD,EAAQrD,IAAI,IADP,IAE/B,CAAC,CACD+E,cAAc;EAGb1B,AAFAxF,EAASH,QAAQM,SAAS,IAC1B0E,EAAepF,GAAQqF,GAAa,EAAK,GACzCU,EAAQrD,KAAKlE,oBAAoB,UAAUmI,CAAY;CACzD,CAAC;AACL"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spinner.cjs.js","names":["html","createSpinner","lit_html","createSpinner"],"sources":["../../../../../src/components/profile-heading/editor/ui/spinner.ts"],"sourcesContent":["import { html, TemplateResult } from 'lit-html'\n\nexport function createSpinner (): TemplateResult {\n return html`\n <span class=\"loading-spinner\" aria-hidden=\"true\"></span>\n <span class=\"sr-only\">Saving...</span>\n `\n}\n"],"mappings":"A,0BAEA,SAAgBC,GAAiC,CAC/C,MAAOD,GAAAA,IAAI;;;GAIb,C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spinner.d.ts","sourceRoot":"","sources":["../../../../../src/components/profile-heading/editor/ui/spinner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,cAAc,EAAE,MAAM,UAAU,CAAA;AAE/C,wBAAgB,aAAa,IAAK,cAAc,CAK/C"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { html as e } from "lit-html";
|
|
2
|
+
//#region src/components/profile-heading/editor/ui/spinner.ts
|
|
3
|
+
function t() {
|
|
4
|
+
return e`
|
|
5
|
+
<span class="loading-spinner" aria-hidden="true"></span>
|
|
6
|
+
<span class="sr-only">Saving...</span>
|
|
7
|
+
`;
|
|
8
|
+
}
|
|
9
|
+
//#endregion
|
|
10
|
+
export { t as createSpinner };
|
|
11
|
+
|
|
12
|
+
//# sourceMappingURL=spinner.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spinner.esm.js","names":["html","createSpinner","createSpinner"],"sources":["../../../../../src/components/profile-heading/editor/ui/spinner.ts"],"sourcesContent":["import { html, TemplateResult } from 'lit-html'\n\nexport function createSpinner (): TemplateResult {\n return html`\n <span class=\"loading-spinner\" aria-hidden=\"true\"></span>\n <span class=\"sr-only\">Saving...</span>\n `\n}\n"],"mappings":";;AAEA,SAAgBC,IAAiC;CAC/C,OAAOD,CAAI;;;;AAIb"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
function e(e){if(typeof e==`string`)return e;if(e instanceof Error)return e.message||e.name;if(e==null)return``;try{return JSON.stringify(e)}catch{return String(e)}}function t(t,n){return(n||e(t)||`Something went wrong.`).trim()}exports.formatDisplayError=t;
|
|
2
|
+
//# sourceMappingURL=errorDisplay.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errorDisplay.cjs.js","names":["stringifyUnknown","value","Error","message","name","JSON","stringify","String","formatDisplayError","error","fallbackMessage","trim","stringifyUnknown","value","formatDisplayError","fallbackMessage","error"],"sources":["../../../../../src/components/profile-heading/editor/utils/errorDisplay.ts"],"sourcesContent":["function stringifyUnknown (value: unknown): string {\n if (typeof value === 'string') return value\n if (value instanceof Error) return value.message || value.name\n if (value == null) return ''\n\n try {\n return JSON.stringify(value)\n } catch {\n return String(value)\n }\n}\n\nexport function formatDisplayError (error: unknown, fallbackMessage?: string): string {\n return (fallbackMessage || stringifyUnknown(error) || 'Something went wrong.').trim()\n}\n"],"mappings":"AAAA,SAASA,EAAkBC,EAAwB,CACjD,GAAI,OAAOA,GAAU,SAAU,OAAOA,EACtC,GAAIA,aAAiBC,MAAO,OAAOD,EAAME,SAAWF,EAAMG,KAC1D,GAAIH,GAAS,KAAM,MAAO,GAE1B,GAAI,CACF,OAAOI,KAAKC,UAAUL,CAAK,CAC7B,MAAQ,CACN,OAAOM,OAAON,CAAK,CACrB,CACF,CAEA,SAAgBO,EAAoBC,EAAgBC,EAAkC,CACpF,OAAQA,GAAmBV,EAAiBS,CAAK,GAAK,wBAAA,CAAyBE,KAAK,CACtF,C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errorDisplay.d.ts","sourceRoot":"","sources":["../../../../../src/components/profile-heading/editor/utils/errorDisplay.ts"],"names":[],"mappings":"AAYA,wBAAgB,kBAAkB,CAAE,KAAK,EAAE,OAAO,EAAE,eAAe,CAAC,EAAE,MAAM,GAAG,MAAM,CAEpF"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
//#region src/components/profile-heading/editor/utils/errorDisplay.ts
|
|
2
|
+
function e(e) {
|
|
3
|
+
if (typeof e == "string") return e;
|
|
4
|
+
if (e instanceof Error) return e.message || e.name;
|
|
5
|
+
if (e == null) return "";
|
|
6
|
+
try {
|
|
7
|
+
return JSON.stringify(e);
|
|
8
|
+
} catch {
|
|
9
|
+
return String(e);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
function t(t, n) {
|
|
13
|
+
return (n || e(t) || "Something went wrong.").trim();
|
|
14
|
+
}
|
|
15
|
+
//#endregion
|
|
16
|
+
export { t as formatDisplayError };
|
|
17
|
+
|
|
18
|
+
//# sourceMappingURL=errorDisplay.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errorDisplay.esm.js","names":["stringifyUnknown","value","Error","message","name","JSON","stringify","String","formatDisplayError","error","fallbackMessage","trim","stringifyUnknown","value","formatDisplayError","fallbackMessage","error"],"sources":["../../../../../src/components/profile-heading/editor/utils/errorDisplay.ts"],"sourcesContent":["function stringifyUnknown (value: unknown): string {\n if (typeof value === 'string') return value\n if (value instanceof Error) return value.message || value.name\n if (value == null) return ''\n\n try {\n return JSON.stringify(value)\n } catch {\n return String(value)\n }\n}\n\nexport function formatDisplayError (error: unknown, fallbackMessage?: string): string {\n return (fallbackMessage || stringifyUnknown(error) || 'Something went wrong.').trim()\n}\n"],"mappings":";AAAA,SAASA,EAAkBC,GAAwB;CACjD,IAAI,OAAOA,KAAU,UAAU,OAAOA;CACtC,IAAIA,aAAiBC,OAAO,OAAOD,EAAME,WAAWF,EAAMG;CAC1D,IAAIH,KAAS,MAAM,OAAO;CAE1B,IAAI;EACF,OAAOI,KAAKC,UAAUL,CAAK;CAC7B,QAAQ;EACN,OAAOM,OAAON,CAAK;CACrB;AACF;AAEA,SAAgBO,EAAoBC,GAAgBC,GAAkC;CACpF,QAAQA,KAAmBV,EAAiBS,CAAK,KAAK,wBAAA,CAAyBE,KAAK;AACtF"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const e=require("./editor/utils/errorDisplay.cjs.js"),t=require("./editor/sections/shared/rdfMutationHelpers.cjs.js");let n=require("solid-ui"),r=require("solid-logic"),i=require("rdflib");var a={add:`Add as friend`,exists:`Already a friend`,success:`Friend was added!`,duplicate:`Friend already exists`,loginRequired:`Current user not found! Not logged in?`};function o(e){if(!r.authn.currentUser()?.sameTerm(e))throw Error(a.loginRequired)}async function s(e,t){return await r.store.fetcher.load(e),o(e),r.store.whether(e,n.ns.foaf(`knows`),t,e.doc())>0}async function c(c,l){if(o(c),await s(c,l))throw Error(a.duplicate);t.ensureStandardMutationPrefixes(r.store);try{await r.store.updater.update([],[(0,i.st)(c,n.ns.foaf(`knows`),l,c.doc())])}catch(t){throw e.formatDisplayError(t).includes(`Unauthenticated`)?Error(a.loginRequired):t}}exports.addFriend=c,exports.checkFriend=s,exports.friendTexts=a;
|
|
2
|
+
//# sourceMappingURL=friendActions.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"friendActions.cjs.js","names":["authn","store","st","ns","ensureStandardMutationPrefixes","formatDisplayError","friendTexts","add","exists","success","duplicate","loginRequired","requireViewer","viewer","currentUser","sameTerm","Error","checkFriend","subject","fetcher","load","whether","foaf","doc","addFriend","updater","update","error","includes","authn","store","ns","st","formatDisplayError","require_errorDisplay","require_rdfMutationHelpers","solid_ui","solid_logic","rdflib","friendTexts","requireViewer","viewer","checkFriend","subject","addFriend","error"],"sources":["../../../src/components/profile-heading/friendActions.ts"],"sourcesContent":["import { authn, store } from 'solid-logic'\nimport { st, type NamedNode } from 'rdflib'\nimport { ns } from 'solid-ui'\nimport { ensureStandardMutationPrefixes } from './editor/sections/shared/rdfMutationHelpers'\nimport { formatDisplayError } from './editor/utils/errorDisplay'\n\nexport const friendTexts = {\n add: 'Add as friend',\n exists: 'Already a friend',\n success: 'Friend was added!',\n duplicate: 'Friend already exists',\n loginRequired: 'Current user not found! Not logged in?'\n}\n\nfunction requireViewer (viewer: NamedNode): void {\n if (!authn.currentUser()?.sameTerm(viewer)) {\n throw new Error(friendTexts.loginRequired)\n }\n}\n\nexport async function checkFriend (viewer: NamedNode, subject: NamedNode): Promise<boolean> {\n await store.fetcher.load(viewer)\n requireViewer(viewer)\n return store.whether(viewer, ns.foaf('knows'), subject, viewer.doc()) > 0\n}\n\nexport async function addFriend (viewer: NamedNode, subject: NamedNode): Promise<void> {\n requireViewer(viewer)\n if (await checkFriend(viewer, subject)) throw new Error(friendTexts.duplicate)\n ensureStandardMutationPrefixes(store)\n try {\n await store.updater.update([], [st(viewer, ns.foaf('knows'), subject, viewer.doc())])\n } catch (error: unknown) {\n if (formatDisplayError(error).includes('Unauthenticated')) {\n throw new Error(friendTexts.loginRequired)\n }\n throw error\n }\n}\n"],"mappings":"A,6LAMA,IAAaM,EAAc,CACzBC,IAAK,gBACLC,OAAQ,mBACRC,QAAS,oBACTC,UAAW,wBACXC,cAAe,wCACjB,EAEA,SAASC,EAAeC,EAAyB,CAC/C,GAAI,CAACb,EAAAA,MAAMc,YAAY,CAAC,EAAEC,SAASF,CAAM,EACvC,MAAUG,MAAMV,EAAYK,aAAa,CAE7C,CAEA,eAAsBM,EAAaJ,EAAmBK,EAAsC,CAG1F,OAFA,MAAMjB,EAAAA,MAAMkB,QAAQC,KAAKP,CAAM,EAC/BD,EAAcC,CAAM,EACbZ,EAAAA,MAAMoB,QAAQR,EAAQV,EAAAA,GAAGmB,KAAK,OAAO,EAAGJ,EAASL,EAAOU,IAAI,CAAC,EAAI,CAC1E,CAEA,eAAsBC,EAAWX,EAAmBK,EAAmC,CAErF,GADAN,EAAcC,CAAM,EAChB,MAAMI,EAAYJ,EAAQK,CAAO,EAAG,MAAUF,MAAMV,EAAYI,SAAS,EAC7EN,EAAAA,+BAA+BH,EAAAA,KAAK,EACpC,GAAI,CACF,MAAMA,EAAAA,MAAMwB,QAAQC,OAAO,CAAA,EAAI,EAAA,EAACxB,EAAAA,GAAAA,CAAGW,EAAQV,EAAAA,GAAGmB,KAAK,OAAO,EAAGJ,EAASL,EAAOU,IAAI,CAAC,CAAC,CAAC,CACtF,OAASI,EAAgB,CAIvB,MAHItB,EAAAA,mBAAmBsB,CAAK,CAAC,CAACC,SAAS,iBAAiB,EAC5CZ,MAAMV,EAAYK,aAAa,EAErCgB,CACR,CACF,C"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { NamedNode } from '../../../node_modules/rdflib';
|
|
2
|
+
export declare const friendTexts: {
|
|
3
|
+
add: string;
|
|
4
|
+
exists: string;
|
|
5
|
+
success: string;
|
|
6
|
+
duplicate: string;
|
|
7
|
+
loginRequired: string;
|
|
8
|
+
};
|
|
9
|
+
export declare function checkFriend(viewer: NamedNode, subject: NamedNode): Promise<boolean>;
|
|
10
|
+
export declare function addFriend(viewer: NamedNode, subject: NamedNode): Promise<void>;
|
|
11
|
+
//# sourceMappingURL=friendActions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"friendActions.d.ts","sourceRoot":"","sources":["../../../src/components/profile-heading/friendActions.ts"],"names":[],"mappings":"AACA,OAAO,EAAM,KAAK,SAAS,EAAE,MAAM,QAAQ,CAAA;AAK3C,eAAO,MAAM,WAAW;;;;;;CAMvB,CAAA;AAQD,wBAAsB,WAAW,CAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,GAAG,OAAO,CAAC,OAAO,CAAC,CAI1F;AAED,wBAAsB,SAAS,CAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAYrF"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { formatDisplayError as e } from "./editor/utils/errorDisplay.esm.js";
|
|
2
|
+
import { ensureStandardMutationPrefixes as t } from "./editor/sections/shared/rdfMutationHelpers.esm.js";
|
|
3
|
+
import { ns as n } from "solid-ui";
|
|
4
|
+
import { authn as r, store as i } from "solid-logic";
|
|
5
|
+
import { st as a } from "rdflib";
|
|
6
|
+
//#region src/components/profile-heading/friendActions.ts
|
|
7
|
+
var o = {
|
|
8
|
+
add: "Add as friend",
|
|
9
|
+
exists: "Already a friend",
|
|
10
|
+
success: "Friend was added!",
|
|
11
|
+
duplicate: "Friend already exists",
|
|
12
|
+
loginRequired: "Current user not found! Not logged in?"
|
|
13
|
+
};
|
|
14
|
+
function s(e) {
|
|
15
|
+
if (!r.currentUser()?.sameTerm(e)) throw Error(o.loginRequired);
|
|
16
|
+
}
|
|
17
|
+
async function c(e, t) {
|
|
18
|
+
return await i.fetcher.load(e), s(e), i.whether(e, n.foaf("knows"), t, e.doc()) > 0;
|
|
19
|
+
}
|
|
20
|
+
async function l(r, l) {
|
|
21
|
+
if (s(r), await c(r, l)) throw Error(o.duplicate);
|
|
22
|
+
t(i);
|
|
23
|
+
try {
|
|
24
|
+
await i.updater.update([], [a(r, n.foaf("knows"), l, r.doc())]);
|
|
25
|
+
} catch (t) {
|
|
26
|
+
throw e(t).includes("Unauthenticated") ? Error(o.loginRequired) : t;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
//#endregion
|
|
30
|
+
export { l as addFriend, c as checkFriend, o as friendTexts };
|
|
31
|
+
|
|
32
|
+
//# sourceMappingURL=friendActions.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"friendActions.esm.js","names":["authn","store","st","ns","ensureStandardMutationPrefixes","formatDisplayError","friendTexts","add","exists","success","duplicate","loginRequired","requireViewer","viewer","currentUser","sameTerm","Error","checkFriend","subject","fetcher","load","whether","foaf","doc","addFriend","updater","update","error","includes","friendTexts","requireViewer","authn","viewer","checkFriend","store","ns","subject","addFriend","st","error","formatDisplayError"],"sources":["../../../src/components/profile-heading/friendActions.ts"],"sourcesContent":["import { authn, store } from 'solid-logic'\nimport { st, type NamedNode } from 'rdflib'\nimport { ns } from 'solid-ui'\nimport { ensureStandardMutationPrefixes } from './editor/sections/shared/rdfMutationHelpers'\nimport { formatDisplayError } from './editor/utils/errorDisplay'\n\nexport const friendTexts = {\n add: 'Add as friend',\n exists: 'Already a friend',\n success: 'Friend was added!',\n duplicate: 'Friend already exists',\n loginRequired: 'Current user not found! Not logged in?'\n}\n\nfunction requireViewer (viewer: NamedNode): void {\n if (!authn.currentUser()?.sameTerm(viewer)) {\n throw new Error(friendTexts.loginRequired)\n }\n}\n\nexport async function checkFriend (viewer: NamedNode, subject: NamedNode): Promise<boolean> {\n await store.fetcher.load(viewer)\n requireViewer(viewer)\n return store.whether(viewer, ns.foaf('knows'), subject, viewer.doc()) > 0\n}\n\nexport async function addFriend (viewer: NamedNode, subject: NamedNode): Promise<void> {\n requireViewer(viewer)\n if (await checkFriend(viewer, subject)) throw new Error(friendTexts.duplicate)\n ensureStandardMutationPrefixes(store)\n try {\n await store.updater.update([], [st(viewer, ns.foaf('knows'), subject, viewer.doc())])\n } catch (error: unknown) {\n if (formatDisplayError(error).includes('Unauthenticated')) {\n throw new Error(friendTexts.loginRequired)\n }\n throw error\n }\n}\n"],"mappings":";;;;;;AAMA,IAAaM,IAAc;CACzBC,KAAK;CACLC,QAAQ;CACRC,SAAS;CACTC,WAAW;CACXC,eAAe;AACjB;AAEA,SAASC,EAAeC,GAAyB;CAC/C,IAAI,CAACb,EAAMc,YAAY,CAAC,EAAEC,SAASF,CAAM,GACvC,MAAUG,MAAMV,EAAYK,aAAa;AAE7C;AAEA,eAAsBM,EAAaJ,GAAmBK,GAAsC;CAG1F,OAFA,MAAMjB,EAAMkB,QAAQC,KAAKP,CAAM,GAC/BD,EAAcC,CAAM,GACbZ,EAAMoB,QAAQR,GAAQV,EAAGmB,KAAK,OAAO,GAAGJ,GAASL,EAAOU,IAAI,CAAC,IAAI;AAC1E;AAEA,eAAsBC,EAAWX,GAAmBK,GAAmC;CAErF,IADAN,EAAcC,CAAM,GAChB,MAAMI,EAAYJ,GAAQK,CAAO,GAAG,MAAUF,MAAMV,EAAYI,SAAS;CAC7EN,EAA+BH,CAAK;CACpC,IAAI;EACF,MAAMA,EAAMwB,QAAQC,OAAO,CAAA,GAAI,CAACxB,EAAGW,GAAQV,EAAGmB,KAAK,OAAO,GAAGJ,GAASL,EAAOU,IAAI,CAAC,CAAC,CAAC;CACtF,SAASI,GAAgB;EAIvB,MAHItB,EAAmBsB,CAAK,CAAC,CAACC,SAAS,iBAAiB,IAC5CZ,MAAMV,EAAYK,aAAa,IAErCgB;CACR;AACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require("./ProfileHeading.cjs.js");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/profile-heading/index.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,kBAAkB,CAAA;AAE7C,OAAO,EAAE,cAAc,EAAE,CAAA;AACzB,YAAY,EAAE,kBAAkB,EAAE,yBAAyB,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAA;AAC1G,eAAe,cAAc,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./ProfileHeading.esm.js";
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const e=require("../../utils/viewerUtils.cjs.js");let t=require("solid-ui"),n=require("solid-logic");async function r(t){let r=e.getViewerRelation(t);if(r!==`owner`)return r;try{return n.store.updater?.editable?.(t.doc())?`owner`:`anonymous`}catch(e){return console.warn(`Failed to check profile edit permissions.`,e),`anonymous`}}function i(e,r=n.store){let i=e.doc(),s=r.anyValue(e,t.ns.vcard(`nickname`))||r.anyValue(e,t.ns.foaf(`nick`))||void 0,c=r.anyValue(e,t.ns.vcard(`bday`))||void 0,l=t.widgets.findImage(e)||void 0,u=o(r,e,t.ns.vcard(`hasTelephone`),i,`phone`),d=o(r,e,t.ns.vcard(`hasEmail`),i,`email`),f=a(r,e,i),p=r.any(e,t.ns.vcard(`hasAddress`),null,i)||void 0,m=p,h=p?{entryNode:p,type:r.any(m,t.ns.rdf(`type`),null,i)||void 0,streetAddress:r.anyValue(m,t.ns.vcard(`street-address`))||void 0,locality:r.anyValue(m,t.ns.vcard(`locality`))||void 0,region:r.anyValue(m,t.ns.vcard(`region`))||void 0,postalCode:r.anyValue(m,t.ns.vcard(`postal-code`))||void 0,countryName:r.anyValue(m,t.ns.vcard(`country-name`))||void 0}:void 0,g=h?.countryName,_=h?.locality,v=r.anyValue(e,t.ns.solid(`preferredSubjectPronoun`))||``,y=r.anyValue(e,t.ns.solid(`preferredObjectPronoun`))||``,b=v?`${v}${y?`/${y}`:``}`:void 0;return{name:t.utils.label(e),nickname:s,imageSrc:l,dateOfBirth:c,jobTitle:f,primaryPhone:u,primaryEmail:d,primaryAddress:h,location:g&&_?`${_}, ${g}`:g||_||void 0,pronouns:b,entryNode:e}}function a(e,n,r){let i=e.each(null,t.ns.org(`member`),n,r).filter(n=>!e.holds(n,t.ns.rdf(`type`),t.ns.schema(`EducationalOccupationalCredential`),r)).map(n=>{let i=n,a=e.each(i,t.ns.rdf(`type`),null,r).find(e=>e.value.startsWith(t.ns.solid(``).value))?.value.split(/[#/]/).pop()?.toLowerCase(),o=e.anyValue(i,t.ns.vcard(`role`),null,r)||void 0,s=e.any(i,t.ns.org(`role`),null,r),c=s&&e.anyValue(s,t.ns.schema(`name`),null,r)||void 0,l=e.any(i,t.ns.schema(`endDate`),null,r);return{title:c&&o?`${c} - ${o}`:o||c,roleType:a,isCurrent:!l||a===`currentrole`}});return(i.find(e=>e.isCurrent)||i.find(e=>e.roleType!==`currentrole`&&e.roleType!==`futurerole`))?.title}function o(e,n,r,i,a){let o=[],c=[...e.statementsMatching(n,r,null,i),...e.statementsMatching(n,r)].map(e=>e.object),u=new Set;for(let n of c){if(u.has(n.value))continue;u.add(n.value);let r=s(e,n,i,a);if(!r)continue;let c=n.termType===`NamedNode`?[...e.each(n,t.ns.rdf(`type`),null,i),...e.each(n,t.ns.rdf(`type`))]:[],d={entryNode:n,type:c[0]||(a===`email`?t.ns.vcard(`Internet`):t.ns.vcard(`Voice`)),valueNode:r};if(c.some(e=>l(e.value)))return d;o.push(d)}return o[0]}function s(e,n,r,i){if(c(n.value,i))return n;if(n.termType===`NamedNode`)return[...e.each(n,t.ns.vcard(`value`),null,r),...e.each(n,t.ns.vcard(`value`))].find(e=>c(e.value,i))}function c(e,t){let n=e.trim();return t===`email`?/^mailto:/i.test(n)||/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(n):/^tel:/i.test(n)||/^[+()\-\s\d]{5,}$/.test(n)}function l(e){let t=e.trim().toLowerCase();return t===`work`||t.endsWith(`#work`)||t.endsWith(`/work`)}exports.getViewerMode=r,exports.presentProfile=i;
|
|
2
|
+
//# sourceMappingURL=profileHeadingData.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profileHeadingData.cjs.js","names":["store","getViewerRelation","ns","utils","widgets","getViewerMode","subject","relation","updater","editable","doc","error","console","warn","presentProfile","profileStore","nickname","anyValue","vcard","foaf","undefined","dateOfBirth","imageSrc","findImage","primaryPhone","selectPrimaryPoint","primaryEmail","jobTitle","selectHeadingJobTitle","addressNode","any","addressSubject","primaryAddress","entryNode","type","rdf","streetAddress","locality","region","postalCode","countryName","country","subjectPronoun","solid","objectPronoun","pronouns","name","label","location","roles","each","org","filter","membership","holds","schema","map","membershipNode","types","roleType","find","value","startsWith","split","pop","toLowerCase","roleText","escoRole","escoRoleName","endDate","title","isCurrent","selected","role","predicate","kind","candidates","nodes","statementsMatching","statement","object","seen","Set","has","add","valueNode","resolvePointValue","termType","candidate","some","typeNode","isWorkType","push","isContactValue","values","normalized","trim","test","endsWith","getViewerRelation","store","ns","widgets","utils","require_viewerUtils","solid_ui","solid_logic","getViewerMode","relation","subject","error","presentProfile","doc","nickname","profileStore","dateOfBirth","imageSrc","primaryPhone","selectPrimaryPoint","primaryEmail","jobTitle","selectHeadingJobTitle","addressNode","addressSubject","primaryAddress","country","locality","subjectPronoun","objectPronoun","pronouns","roles","membership","membershipNode","roleType","type","roleText","escoRole","escoRoleName","endDate","role","candidates","nodes","predicate","statement","seen","entryNode","valueNode","resolvePointValue","kind","types","candidate","isWorkType","typeNode","isContactValue","value","normalized"],"sources":["../../../src/components/profile-heading/profileHeadingData.ts"],"sourcesContent":["import { store } from 'solid-logic'\nimport { getViewerRelation } from '../../utils/viewerUtils'\nimport { NamedNode, type LiveStore, type Node } from 'rdflib'\nimport { ns, utils, widgets } from 'solid-ui'\nimport type { AddressDetails, PointDetails } from './editor/sections/contactInfo/types'\nimport type { ProfileDetails } from './editor/sections/heading/types'\nimport type { ViewerMode } from '../../types'\n\nexport async function getViewerMode (subject: NamedNode): Promise<ViewerMode> {\n const relation = getViewerRelation(subject)\n if (relation !== 'owner') return relation\n\n try {\n return store.updater?.editable?.(subject.doc()) ? 'owner' : 'anonymous'\n } catch (error) {\n console.warn('Failed to check profile edit permissions.', error)\n return 'anonymous'\n }\n}\n\nexport function presentProfile (subject: NamedNode, profileStore: LiveStore = store): ProfileDetails {\n const doc = subject.doc()\n const nickname = profileStore.anyValue(subject, ns.vcard('nickname')) ||\n profileStore.anyValue(subject, ns.foaf('nick')) || undefined\n const dateOfBirth = profileStore.anyValue(subject, ns.vcard('bday')) || undefined\n const imageSrc = widgets.findImage(subject) || undefined\n const primaryPhone = selectPrimaryPoint(profileStore, subject, ns.vcard('hasTelephone'), doc, 'phone')\n const primaryEmail = selectPrimaryPoint(profileStore, subject, ns.vcard('hasEmail'), doc, 'email')\n const jobTitle = selectHeadingJobTitle(profileStore, subject, doc)\n\n const addressNode = profileStore.any(subject, ns.vcard('hasAddress'), null, doc) || undefined\n const addressSubject = addressNode as NamedNode | undefined\n const primaryAddress: AddressDetails | undefined = addressNode\n ? {\n entryNode: addressNode,\n type: profileStore.any(addressSubject, ns.rdf('type'), null, doc) || undefined,\n streetAddress: profileStore.anyValue(addressSubject, ns.vcard('street-address')) || undefined,\n locality: profileStore.anyValue(addressSubject, ns.vcard('locality')) || undefined,\n region: profileStore.anyValue(addressSubject, ns.vcard('region')) || undefined,\n postalCode: profileStore.anyValue(addressSubject, ns.vcard('postal-code')) || undefined,\n countryName: profileStore.anyValue(addressSubject, ns.vcard('country-name')) || undefined\n }\n : undefined\n const country = primaryAddress?.countryName\n const locality = primaryAddress?.locality\n const subjectPronoun = profileStore.anyValue(subject, ns.solid('preferredSubjectPronoun')) || ''\n const objectPronoun = profileStore.anyValue(subject, ns.solid('preferredObjectPronoun')) || ''\n const pronouns = subjectPronoun ? `${subjectPronoun}${objectPronoun ? `/${objectPronoun}` : ''}` : undefined\n\n return {\n name: utils.label(subject),\n nickname,\n imageSrc,\n dateOfBirth,\n jobTitle,\n primaryPhone,\n primaryEmail,\n primaryAddress,\n location: country && locality ? `${locality}, ${country}` : country || locality || undefined,\n pronouns,\n entryNode: subject\n }\n}\n\nfunction selectHeadingJobTitle (profileStore: LiveStore, subject: NamedNode, doc: NamedNode): string | undefined {\n const roles = profileStore.each(null, ns.org('member'), subject, doc)\n .filter(membership =>\n !profileStore.holds(\n membership as NamedNode,\n ns.rdf('type'),\n ns.schema('EducationalOccupationalCredential'),\n doc\n )\n )\n .map(membership => {\n const membershipNode = membership as NamedNode\n const types = profileStore.each(membershipNode, ns.rdf('type'), null, doc)\n const roleType = types.find(type => type.value.startsWith(ns.solid('').value))?.value.split(/[#/]/).pop()?.toLowerCase()\n const roleText = profileStore.anyValue(membershipNode, ns.vcard('role'), null, doc) || undefined\n const escoRole = profileStore.any(membershipNode, ns.org('role'), null, doc)\n const escoRoleName = escoRole\n ? profileStore.anyValue(escoRole as NamedNode, ns.schema('name'), null, doc) || undefined\n : undefined\n const endDate = profileStore.any(membershipNode, ns.schema('endDate'), null, doc)\n const title = escoRoleName && roleText\n ? `${escoRoleName} - ${roleText}`\n : roleText || escoRoleName\n\n return {\n title,\n roleType,\n isCurrent: !endDate || roleType === 'currentrole'\n }\n })\n const selected = roles.find(role => role.isCurrent) ||\n roles.find(role => role.roleType !== 'currentrole' && role.roleType !== 'futurerole')\n return selected?.title\n}\n\nfunction selectPrimaryPoint (\n profileStore: LiveStore,\n subject: NamedNode,\n predicate: NamedNode,\n doc: NamedNode,\n kind: 'email' | 'phone'\n): PointDetails | undefined {\n const candidates: PointDetails[] = []\n const nodes = [\n ...profileStore.statementsMatching(subject, predicate, null, doc),\n ...profileStore.statementsMatching(subject, predicate)\n ].map(statement => statement.object as Node)\n const seen = new Set<string>()\n\n for (const entryNode of nodes) {\n if (seen.has(entryNode.value)) continue\n seen.add(entryNode.value)\n\n const valueNode = resolvePointValue(profileStore, entryNode, doc, kind)\n if (!valueNode) continue\n\n const types = entryNode.termType === 'NamedNode'\n ? [\n ...profileStore.each(entryNode as NamedNode, ns.rdf('type'), null, doc),\n ...profileStore.each(entryNode as NamedNode, ns.rdf('type'))\n ]\n : []\n const type = types[0] || (kind === 'email' ? ns.vcard('Internet') : ns.vcard('Voice'))\n const candidate = { entryNode, type: type as Node, valueNode }\n if (types.some(typeNode => isWorkType(typeNode.value))) return candidate\n candidates.push(candidate)\n }\n\n return candidates[0]\n}\n\nfunction resolvePointValue (\n profileStore: LiveStore,\n entryNode: Node,\n doc: NamedNode,\n kind: 'email' | 'phone'\n): Node | undefined {\n if (isContactValue(entryNode.value, kind)) return entryNode\n if (entryNode.termType !== 'NamedNode') return undefined\n\n const values = [\n ...profileStore.each(entryNode as NamedNode, ns.vcard('value'), null, doc),\n ...profileStore.each(entryNode as NamedNode, ns.vcard('value'))\n ]\n return values.find(value => isContactValue(value.value, kind))\n}\n\nfunction isContactValue (value: string, kind: 'email' | 'phone'): boolean {\n const normalized = value.trim()\n if (kind === 'email') {\n return /^mailto:/i.test(normalized) || /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/.test(normalized)\n }\n return /^tel:/i.test(normalized) || /^[+()\\-\\s\\d]{5,}$/.test(normalized)\n}\n\nfunction isWorkType (value: string): boolean {\n const normalized = value.trim().toLowerCase()\n return normalized === 'work' || normalized.endsWith('#work') || normalized.endsWith('/work')\n}\n"],"mappings":"A,qGAQA,eAAsBK,EAAeC,EAAyC,CAC5E,IAAMC,EAAWN,EAAAA,kBAAkBK,CAAO,EAC1C,GAAIC,IAAa,QAAS,OAAOA,EAEjC,GAAI,CACF,OAAOP,EAAAA,MAAMQ,SAASC,WAAWH,EAAQI,IAAI,CAAC,EAAI,QAAU,WAC9D,OAASC,EAAO,CAEd,OADAC,QAAQC,KAAK,4CAA6CF,CAAK,EACxD,WACT,CACF,CAEA,SAAgBG,EAAgBR,EAAoBS,EAA0Bf,EAAA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,MAAM,CAAC,CAAC,EAE9D,CAAA,EAEEqD,EAAY,CAAEvD,YAAiBC,KADxBwB,EAAM,KAAOiB,IAAS,QAAUzE,EAAAA,GAAGgB,MAAM,UAAU,EAAIhB,EAAAA,GAAGgB,MAAM,OAAO,GACjCmE,WAAU,EAC7D,GAAI3B,EAAM+B,KAAKC,GAAYC,EAAWD,EAAS7B,KAAK,CAAC,EAAG,OAAO2B,EAC/DZ,EAAWgB,KAAKJ,CAAS,CAC3B,CAEA,OAAOZ,EAAW,EACpB,CAEA,SAASU,EACPvE,EACAkB,EACAvB,EACAiE,EACkB,CAClB,GAAIkB,EAAe5D,EAAU4B,MAAOc,CAAI,EAAG,OAAO1C,EAClD,GAAIA,EAAUsD,WAAa,YAM3B,MAAOO,CAHL,GAAG/E,EAAamC,KAAKjB,EAAwB/B,EAAAA,GAAGgB,MAAM,OAAO,EAAG,KAAMR,CAAG,EACzE,GAAGK,EAAamC,KAAKjB,EAAwB/B,EAAAA,GAAGgB,MAAM,OAAO,CAAC,CAEzD4E,CAAAA,CAAOlC,KAAKC,GAASgC,EAAehC,EAAMA,MAAOc,CAAI,CAAC,CAC/D,CAEA,SAASkB,EAAgBhC,EAAec,EAAkC,CACxE,IAAMoB,EAAalC,EAAMmC,KAAK,EAI9B,OAHIrB,IAAS,QACJ,YAAYsB,KAAKF,CAAU,GAAK,6BAA6BE,KAAKF,CAAU,EAE9E,SAASE,KAAKF,CAAU,GAAK,oBAAoBE,KAAKF,CAAU,CACzE,CAEA,SAASJ,EAAY9B,EAAwB,CAC3C,IAAMkC,EAAalC,EAAMmC,KAAK,CAAC,CAAC/B,YAAY,EAC5C,OAAO8B,IAAe,QAAUA,EAAWG,SAAS,OAAO,GAAKH,EAAWG,SAAS,OAAO,CAC7F,C"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { NamedNode, LiveStore } from '../../../node_modules/rdflib';
|
|
2
|
+
import { ProfileDetails } from './editor/sections/heading/types';
|
|
3
|
+
import { ViewerMode } from '../../types';
|
|
4
|
+
export declare function getViewerMode(subject: NamedNode): Promise<ViewerMode>;
|
|
5
|
+
export declare function presentProfile(subject: NamedNode, profileStore?: LiveStore): ProfileDetails;
|
|
6
|
+
//# sourceMappingURL=profileHeadingData.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profileHeadingData.d.ts","sourceRoot":"","sources":["../../../src/components/profile-heading/profileHeadingData.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,KAAK,SAAS,EAAa,MAAM,QAAQ,CAAA;AAG7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AACrE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAE7C,wBAAsB,aAAa,CAAE,OAAO,EAAE,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,CAU5E;AAED,wBAAgB,cAAc,CAAE,OAAO,EAAE,SAAS,EAAE,YAAY,GAAE,SAAiB,GAAG,cAAc,CA0CnG"}
|