solid-panes 5.0.0-0 → 5.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/dist/RDFXMLPane.d.ts.map +1 -1
- package/dist/RDFXMLPane2.cjs.js +1 -2
- package/dist/RDFXMLPane2.cjs.js.map +1 -1
- package/dist/RDFXMLPane2.esm.js +15 -42
- package/dist/RDFXMLPane2.esm.js.map +1 -1
- package/dist/_virtual/~icons/lucide/arrow-left.cjs.js.map +1 -1
- package/dist/_virtual/~icons/lucide/arrow-left.esm.js.map +1 -1
- package/dist/_virtual/~icons/lucide/ellipsis-vertical.cjs.js.map +1 -1
- package/dist/_virtual/~icons/lucide/ellipsis-vertical.esm.js.map +1 -1
- package/dist/_virtual/~icons/lucide/folder-open.cjs.js.map +1 -1
- package/dist/_virtual/~icons/lucide/folder-open.esm.js.map +1 -1
- package/dist/_virtual/~icons/lucide/folder.cjs.js +2 -0
- package/dist/_virtual/~icons/lucide/folder.cjs.js.map +1 -0
- package/dist/_virtual/~icons/lucide/{trash-2.esm.js → folder.esm.js} +4 -4
- package/dist/_virtual/~icons/lucide/folder.esm.js.map +1 -0
- package/dist/_virtual/~icons/lucide/globe.cjs.js.map +1 -1
- package/dist/_virtual/~icons/lucide/globe.esm.js.map +1 -1
- package/dist/_virtual/~icons/lucide/help-circle.cjs.js.map +1 -1
- package/dist/_virtual/~icons/lucide/help-circle.esm.js.map +1 -1
- package/dist/_virtual/~icons/lucide/layout-dashboard.cjs.js.map +1 -1
- package/dist/_virtual/~icons/lucide/layout-dashboard.esm.js.map +1 -1
- package/dist/_virtual/~icons/lucide/lock-keyhole.cjs.js.map +1 -1
- package/dist/_virtual/~icons/lucide/lock-keyhole.esm.js.map +1 -1
- package/dist/_virtual/~icons/lucide/pencil.cjs.js.map +1 -1
- package/dist/_virtual/~icons/lucide/pencil.esm.js.map +1 -1
- package/dist/_virtual/~icons/lucide/settings-2.cjs.js.map +1 -1
- package/dist/_virtual/~icons/lucide/settings-2.esm.js.map +1 -1
- package/dist/_virtual/~icons/lucide/share-2.cjs.js.map +1 -1
- package/dist/_virtual/~icons/lucide/share-2.esm.js.map +1 -1
- package/dist/_virtual/~icons/lucide/user-round-cog.cjs.js +2 -0
- package/dist/_virtual/~icons/lucide/user-round-cog.cjs.js.map +1 -0
- package/dist/_virtual/~icons/lucide/user-round-cog.esm.js +11 -0
- package/dist/_virtual/~icons/lucide/user-round-cog.esm.js.map +1 -0
- package/dist/_virtual/~icons/lucide/user.cjs.js.map +1 -1
- package/dist/_virtual/~icons/lucide/user.esm.js.map +1 -1
- package/dist/_virtual/~icons/lucide/users.cjs.js.map +1 -1
- package/dist/_virtual/~icons/lucide/users.esm.js.map +1 -1
- package/dist/audio/audioPane.cjs.js.map +1 -1
- package/dist/audio/audioPane.esm.js.map +1 -1
- package/dist/classInstancePane.cjs.js.map +1 -1
- package/dist/classInstancePane.esm.js.map +1 -1
- package/dist/components/editor-card/EditorCard.cjs.js +6 -0
- package/dist/components/editor-card/EditorCard.cjs.js.map +1 -0
- package/dist/components/editor-card/EditorCard.d.ts +16 -0
- package/dist/components/editor-card/EditorCard.d.ts.map +1 -0
- package/dist/components/editor-card/EditorCard.esm.js +268 -0
- package/dist/components/editor-card/EditorCard.esm.js.map +1 -0
- package/dist/components/editor-card/EditorCard.styles.cjs.js +2 -0
- package/dist/components/editor-card/EditorCard.styles.cjs.js.map +1 -0
- package/dist/components/editor-card/EditorCard.styles.esm.js +7 -0
- package/dist/components/editor-card/EditorCard.styles.esm.js.map +1 -0
- package/dist/components/editor-card/index.cjs.js +1 -0
- package/dist/components/editor-card/index.d.ts +4 -0
- package/dist/components/editor-card/index.d.ts.map +1 -0
- package/dist/components/editor-card/index.esm.js +1 -0
- package/dist/components/file-explorer-header/FileExplorerHeader.cjs.js +2 -2
- package/dist/components/file-explorer-header/FileExplorerHeader.cjs.js.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeader.d.ts +1 -2
- package/dist/components/file-explorer-header/FileExplorerHeader.d.ts.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeader.esm.js +16 -16
- package/dist/components/file-explorer-header/FileExplorerHeader.esm.js.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeader.styles.cjs.js +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeader.styles.cjs.js.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeader.styles.esm.js +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeader.styles.esm.js.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.cjs.js +24 -14
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.cjs.js.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.d.ts +7 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.d.ts.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.esm.js +94 -66
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.esm.js.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.styles.cjs.js +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.styles.cjs.js.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.styles.esm.js +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.styles.esm.js.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.cjs.js +22 -7
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.cjs.js.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.d.ts +3 -2
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.d.ts.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.esm.js +90 -65
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.esm.js.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.styles.cjs.js +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.styles.cjs.js.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.styles.esm.js +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.styles.esm.js.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerProvider.cjs.js +4 -4
- package/dist/components/file-explorer-header/FileExplorerProvider.cjs.js.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerProvider.d.ts +1 -1
- package/dist/components/file-explorer-header/FileExplorerProvider.d.ts.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerProvider.esm.js +17 -16
- package/dist/components/file-explorer-header/FileExplorerProvider.esm.js.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerProvider.styles.cjs.js.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerProvider.styles.esm.js.map +1 -1
- package/dist/components/file-explorer-header/index.cjs.js +1 -0
- package/dist/components/file-explorer-header/index.d.ts +3 -0
- package/dist/components/file-explorer-header/index.d.ts.map +1 -0
- package/dist/components/file-explorer-header/index.esm.js +2 -0
- package/dist/components/file-explorer-header/types.d.ts +8 -0
- package/dist/components/file-explorer-header/types.d.ts.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 +4 -4
- package/dist/components/header/Header.esm.js.map +1 -1
- 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 +2 -2
- package/dist/components/navbar/Navbar.cjs.js.map +1 -1
- package/dist/components/navbar/Navbar.esm.js +5 -5
- package/dist/components/navbar/Navbar.esm.js.map +1 -1
- package/dist/components/navbar/Navbar.styles.cjs.js.map +1 -1
- package/dist/components/navbar/Navbar.styles.esm.js.map +1 -1
- package/dist/components/resource-actions-menu/ResourceActionsMenu.cjs.js +23 -9
- package/dist/components/resource-actions-menu/ResourceActionsMenu.cjs.js.map +1 -1
- package/dist/components/resource-actions-menu/ResourceActionsMenu.d.ts +7 -4
- package/dist/components/resource-actions-menu/ResourceActionsMenu.d.ts.map +1 -1
- package/dist/components/resource-actions-menu/ResourceActionsMenu.esm.js +146 -84
- package/dist/components/resource-actions-menu/ResourceActionsMenu.esm.js.map +1 -1
- package/dist/components/resource-actions-menu/ResourceActionsMenu.styles.cjs.js +2 -0
- package/dist/components/resource-actions-menu/ResourceActionsMenu.styles.cjs.js.map +1 -0
- package/dist/components/resource-actions-menu/ResourceActionsMenu.styles.esm.js +7 -0
- package/dist/components/resource-actions-menu/ResourceActionsMenu.styles.esm.js.map +1 -0
- package/dist/dashboard/basicPreferences.cjs.js.map +1 -1
- package/dist/dashboard/basicPreferences.esm.js.map +1 -1
- package/dist/dashboard/dashboardPane.cjs.js.map +1 -1
- package/dist/dashboard/dashboardPane.esm.js.map +1 -1
- package/dist/dashboard/homepage.cjs.js.map +1 -1
- package/dist/dashboard/homepage.esm.js.map +1 -1
- package/dist/dashboard/ontologyData.cjs.js.map +1 -1
- package/dist/dashboard/ontologyData.esm.js.map +1 -1
- package/dist/dashboard/preferencesFormText.cjs.js.map +1 -1
- package/dist/dashboard/preferencesFormText.esm.js.map +1 -1
- package/dist/dataContentPane2.cjs.js +1 -1
- package/dist/dataContentPane2.cjs.js.map +1 -1
- package/dist/dataContentPane2.esm.js +1 -1
- package/dist/dataContentPane2.esm.js.map +1 -1
- package/dist/defaultPane2.cjs.js +1 -1
- package/dist/defaultPane2.cjs.js.map +1 -1
- package/dist/defaultPane2.esm.js +2 -2
- package/dist/defaultPane2.esm.js.map +1 -1
- package/dist/dokieli/dokieliPane.cjs.js.map +1 -1
- package/dist/dokieli/dokieliPane.esm.js.map +1 -1
- package/dist/dokieli/new.cjs.js.map +1 -1
- package/dist/dokieli/new.esm.js.map +1 -1
- package/dist/form/pane.cjs.js.map +1 -1
- package/dist/form/pane.esm.js.map +1 -1
- package/dist/home/homePane.cjs.js +1 -1
- package/dist/home/homePane.cjs.js.map +1 -1
- package/dist/home/homePane.esm.js +1 -1
- package/dist/home/homePane.esm.js.map +1 -1
- package/dist/humanReadablePane.d.ts +1 -1
- package/dist/humanReadablePane.d.ts.map +1 -1
- package/dist/humanReadablePane2.cjs.js +1 -1
- package/dist/humanReadablePane2.cjs.js.map +1 -1
- package/dist/humanReadablePane2.esm.js +2 -2
- package/dist/humanReadablePane2.esm.js.map +1 -1
- package/dist/icons/folder.cjs.js.map +1 -1
- package/dist/icons/folder.esm.js.map +1 -1
- package/dist/icons/friends.cjs.js.map +1 -1
- package/dist/icons/friends.esm.js.map +1 -1
- package/dist/icons/person.cjs.js.map +1 -1
- package/dist/icons/person.esm.js.map +1 -1
- package/dist/imagePane2.cjs.js +1 -1
- package/dist/imagePane2.cjs.js.map +1 -1
- package/dist/imagePane2.esm.js +1 -1
- package/dist/imagePane2.esm.js.map +1 -1
- package/dist/index.cjs.js.map +1 -1
- 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 -2
- package/dist/internal/internalPane2.esm.js.map +1 -1
- package/dist/mainPage/header.cjs.js.map +1 -1
- package/dist/mainPage/header.esm.js.map +1 -1
- package/dist/mainPage/index.cjs.js.map +1 -1
- package/dist/mainPage/index.esm.js.map +1 -1
- package/dist/mainPage/navbar.cjs.js.map +1 -1
- package/dist/mainPage/navbar.esm.js.map +1 -1
- package/dist/n3Pane.d.ts.map +1 -1
- package/dist/n3Pane2.cjs.js +1 -2
- package/dist/n3Pane2.cjs.js.map +1 -1
- package/dist/n3Pane2.esm.js +10 -34
- package/dist/n3Pane2.esm.js.map +1 -1
- package/dist/outline/context.cjs.js.map +1 -1
- package/dist/outline/context.esm.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 +9 -12
- package/dist/outline/manager2.esm.js.map +1 -1
- package/dist/outline/outlineIcons.cjs.js.map +1 -1
- package/dist/outline/outlineIcons.esm.js.map +1 -1
- package/dist/outline/propertyViews.cjs.js.map +1 -1
- package/dist/outline/propertyViews.esm.js.map +1 -1
- package/dist/outline/queryByExample.cjs.js +1 -1
- package/dist/outline/queryByExample.cjs.js.map +1 -1
- package/dist/outline/queryByExample.esm.js +4 -4
- package/dist/outline/queryByExample.esm.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 +2 -2
- package/dist/outline/userInput.esm.js.map +1 -1
- package/dist/outline/viewAsImage.cjs.js.map +1 -1
- package/dist/outline/viewAsImage.esm.js.map +1 -1
- package/dist/outline/viewAsMbox.cjs.js.map +1 -1
- package/dist/outline/viewAsMbox.esm.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 +3 -3
- package/dist/pad/padPane2.esm.js.map +1 -1
- package/dist/playlist/playlistPane.cjs.js +1 -1
- package/dist/playlist/playlistPane.cjs.js.map +1 -1
- package/dist/playlist/playlistPane.esm.js +1 -1
- package/dist/playlist/playlistPane.esm.js.map +1 -1
- package/dist/registerPanes.cjs.js.map +1 -1
- package/dist/registerPanes.esm.js.map +1 -1
- package/dist/schedule/formsForSchedule.cjs.js.map +1 -1
- package/dist/schedule/formsForSchedule.esm.js.map +1 -1
- package/dist/schedule/schedulePane2.cjs.js.map +1 -1
- package/dist/schedule/schedulePane2.esm.js.map +1 -1
- package/dist/sharing/sharingPane.cjs.js +1 -1
- package/dist/sharing/sharingPane.cjs.js.map +1 -1
- package/dist/sharing/sharingPane.esm.js +1 -1
- package/dist/sharing/sharingPane.esm.js.map +1 -1
- package/dist/slideshow/slideshowPane.cjs.js.map +1 -1
- package/dist/slideshow/slideshowPane.esm.js.map +1 -1
- package/dist/social/editProfileDetails.cjs.js.map +1 -1
- package/dist/social/editProfileDetails.esm.js.map +1 -1
- package/dist/social/icons.cjs.js.map +1 -1
- package/dist/social/icons.esm.js.map +1 -1
- package/dist/social/socialPane2.cjs.js +2 -2
- package/dist/social/socialPane2.cjs.js.map +1 -1
- package/dist/social/socialPane2.esm.js +3 -3
- package/dist/social/socialPane2.esm.js.map +1 -1
- package/dist/social/socialSections.cjs.js.map +1 -1
- package/dist/social/socialSections.esm.js.map +1 -1
- package/dist/social/triage.cjs.js +1 -1
- package/dist/social/triage.cjs.js.map +1 -1
- package/dist/social/triage.esm.js +1 -1
- package/dist/social/triage.esm.js.map +1 -1
- package/dist/tabbed/tabbedPane.cjs.js.map +1 -1
- package/dist/tabbed/tabbedPane.esm.js.map +1 -1
- package/dist/tableViewPane.cjs.js.map +1 -1
- package/dist/tableViewPane.esm.js.map +1 -1
- package/dist/transaction/pane.cjs.js.map +1 -1
- package/dist/transaction/pane.esm.js.map +1 -1
- package/dist/transaction/period.cjs.js +1 -1
- package/dist/transaction/period.cjs.js.map +1 -1
- package/dist/transaction/period.esm.js +1 -1
- package/dist/transaction/period.esm.js.map +1 -1
- package/dist/trip/tripPane.cjs.js.map +1 -1
- package/dist/trip/tripPane.esm.js.map +1 -1
- package/dist/trustedApplications/trustedApplications.dom.cjs.js.map +1 -1
- package/dist/trustedApplications/trustedApplications.dom.esm.js.map +1 -1
- package/dist/trustedApplications/trustedApplications.utils.cjs.js.map +1 -1
- package/dist/trustedApplications/trustedApplications.utils.esm.js.map +1 -1
- package/dist/trustedApplications/trustedApplications.view.cjs.js.map +1 -1
- package/dist/trustedApplications/trustedApplications.view.esm.js.map +1 -1
- package/dist/ui/pane.cjs.js.map +1 -1
- package/dist/ui/pane.esm.js.map +1 -1
- package/dist/utils/paneUtils.cjs.js.map +1 -1
- package/dist/utils/paneUtils.esm.js.map +1 -1
- package/dist/utils/podUtils.cjs.js +1 -1
- package/dist/utils/podUtils.cjs.js.map +1 -1
- package/dist/utils/podUtils.d.ts +6 -1
- package/dist/utils/podUtils.d.ts.map +1 -1
- package/dist/utils/podUtils.esm.js +93 -22
- package/dist/utils/podUtils.esm.js.map +1 -1
- package/dist/utils/webIdUtils.cjs.js.map +1 -1
- 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 +3 -3
- package/dist/versionInfo.esm.js.map +1 -1
- package/dist/video/videoPane.cjs.js.map +1 -1
- package/dist/video/videoPane.esm.js.map +1 -1
- package/package.json +13 -13
- package/dist/_virtual/~icons/lucide/trash-2.cjs.js +0 -2
- package/dist/_virtual/~icons/lucide/trash-2.cjs.js.map +0 -1
- package/dist/_virtual/~icons/lucide/trash-2.esm.js.map +0 -1
- package/dist/components/file-explorer-header/helper.cjs.js +0 -2
- package/dist/components/file-explorer-header/helper.cjs.js.map +0 -1
- package/dist/components/file-explorer-header/helper.d.ts +0 -15
- package/dist/components/file-explorer-header/helper.d.ts.map +0 -1
- package/dist/components/file-explorer-header/helper.esm.js +0 -64
- package/dist/components/file-explorer-header/helper.esm.js.map +0 -1
- package/dist/components/resource-actions-menu/DeleteResourceDialog.cjs.js +0 -16
- package/dist/components/resource-actions-menu/DeleteResourceDialog.cjs.js.map +0 -1
- package/dist/components/resource-actions-menu/DeleteResourceDialog.esm.js +0 -215
- package/dist/components/resource-actions-menu/DeleteResourceDialog.esm.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileExplorerProvider.cjs.js","names":["html","nothing","utils","WebComponent","provide","fileExplorerContext","customElement","property","state","styles","personIcon","friendsIcon","PERSON_ICON","FRIENDS_ICON","createFileExplorerContextValue","value","store","subjectUri","pane","soloPane","onBack","openPane","handleSharingClick","paneSupportsEditing","edit","_classDecs","_FileExplorerProvider","_FileExplorerProvider2","_A","WeakMap","_B","_C","_D","_E","_F","_G","_H","_I","_J","_K","_L","_M","_N","_O","_P","_ref","_contextDecs","attribute","_subjectUriDecs","_onBackDecs","_relevantPanesDecs","_paneDecs","_paneRenderOptionsDecs","_showHeaderDecs","_handleSharingClickDecs","_soloPaneDecs","_openPaneDecs","_menuItemsDecs","_isEditingDecs","_isDirtyDecs","_paneSupportsEditingDecs","_editDecs","_fileExplorerContextValueDecs","context","_FileExplorerProvider3","FileExplorerProvider","constructor","args","_classPrivateFieldInitSpec","_initProto","_init_context","undefined","_init_subjectUri","_init_onBack","_init_relevantPanes","_init_pane","_init_paneRenderOptions","_init_showHeader","_init_handleSharingClick","_init_soloPane","_init_openPane","_init_menuItems","_init_isEditing","_init_isDirty","_init_paneSupportsEditing","_defineProperty","sourceProvider","querySelector","beginEditing","_init_edit","onEdit","beginEditingInSourcePane","isDirty","updateDirtyState","dirty","refreshFileExplorerContextValue","_init_fileExplorerContextValue","session","_classPrivateFieldGet","v","_classPrivateFieldSet","relevantPanes","paneRenderOptions","showHeader","menuItems","isEditing","fileExplorerContextValue","openSelectedPane","name","getPaneIcon","subject","icon","getPaneItems","dom","Promise","all","map","label","iconSrc","AJARImage","setAttribute","action","refreshMenuItems","sym","willUpdate","changedProperties","Error","has","catch","error","console","warn","render","e","c","_initClass","_applyDecs","_Class","_identity","default"],"sources":["../../../src/components/file-explorer-header/FileExplorerProvider.ts"],"sourcesContent":["import { html, nothing, type PropertyValues } from 'lit'\nimport type { NamedNode, LiveStore } from 'rdflib'\nimport { DataBrowserContext, type PaneDefinition } from 'pane-registry'\nimport { utils, WebComponent } from 'solid-ui'\nimport { provide } from '@lit/context'\nimport { fileExplorerContext, type FileExplorerContext, type FileExplorerEdit } from 'solid-ui'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport './FileExplorerHeader'\nimport styles from './FileExplorerProvider.styles.css'\nimport personIcon from '../../icons/person.svg'\nimport friendsIcon from '../../icons/friends.svg'\n\nconst PERSON_ICON = personIcon\nconst FRIENDS_ICON = friendsIcon\n\nfunction createFileExplorerContextValue (value: {\n store: LiveStore | undefined\n subjectUri: string | undefined\n pane?: PaneDefinition\n soloPane?: boolean\n onBack?: () => void\n openPane?: (subject: NamedNode, paneName: string) => void\n handleSharingClick?: () => void\n paneSupportsEditing?: boolean\n edit?: {\n onEdit?: () => void\n isDirty?: boolean\n updateDirtyState?: (dirty: boolean) => void\n }\n}): FileExplorerContext {\n return {\n store: value.store as LiveStore,\n subjectUri: value.subjectUri,\n pane: value.pane,\n soloPane: value.soloPane,\n onBack: value.onBack,\n openPane: value.openPane,\n handleSharingClick: value.handleSharingClick,\n paneSupportsEditing: value.paneSupportsEditing,\n edit: value.edit\n }\n}\n@customElement('file-explorer-provider')\nexport default class FileExplorerProvider extends WebComponent {\n static styles = styles\n\n @property({ attribute: false })\n accessor context: DataBrowserContext | undefined = undefined\n\n @property({ attribute: false })\n accessor subjectUri: string | undefined = undefined\n\n @property({ attribute: false })\n accessor onBack: (() => void) | undefined = undefined\n\n @property({ attribute: false })\n accessor relevantPanes: PaneDefinition[] = []\n\n @property({ attribute: false })\n accessor pane: PaneDefinition | undefined = undefined\n\n @property({ attribute: false })\n accessor paneRenderOptions: Record<string, unknown> = {}\n\n @property({ attribute: false })\n accessor showHeader: boolean = true\n\n @property({ attribute: false })\n accessor handleSharingClick: (() => void) | undefined = undefined\n\n // TODO: Need to research this more, brought it over from manager.\n @property({ attribute: false })\n accessor soloPane: boolean | undefined = undefined\n\n @property({ attribute: false })\n accessor openPane: ((subject: NamedNode, paneName: string) => void) | undefined = undefined\n\n @state()\n accessor menuItems: Array<{ label: string, icon?: HTMLElement, action: (event: Event) => void }> = []\n\n @state()\n accessor isEditing: boolean = false\n\n @state()\n accessor isDirty: boolean = false\n\n @state()\n accessor paneSupportsEditing: boolean = false\n\n // TODO: For now this works, but check if there is a better way.\n // because this means file explorer will know about the pane.\n // what if other panes want to use this. If so maybe we should\n // add more to the context to capture the provider for the pane that\n // will be editing... anyway this shouldn't be just for source pane.\n private beginEditingInSourcePane = () => {\n const sourceProvider = this.querySelector('source-pane-source-provider') as {\n beginEditing?: () => void\n } | null\n\n sourceProvider?.beginEditing?.()\n }\n\n // TODO: same as below. on Edit should be something more generic\n @state()\n accessor edit: FileExplorerEdit = {\n onEdit: this.beginEditingInSourcePane,\n isDirty: false,\n updateDirtyState: (dirty: boolean) => {\n if (this.isDirty === dirty) return\n\n this.isDirty = dirty\n this.edit = {\n ...this.edit,\n isDirty: dirty\n }\n this.refreshFileExplorerContextValue()\n }\n }\n\n @provide({ context: fileExplorerContext })\n accessor fileExplorerContextValue: FileExplorerContext = createFileExplorerContextValue({\n store: this.context?.session.store as LiveStore,\n subjectUri: this.subjectUri,\n pane: this.pane,\n soloPane: this.soloPane,\n onBack: this.onBack,\n openPane: this.openPane,\n handleSharingClick: this.handleSharingClick,\n paneSupportsEditing: false,\n edit: this.edit\n })\n\n // Change the state for the pane so it can show the new icon.\n openSelectedPane (pane: PaneDefinition) {\n const store = this.context?.session.store as LiveStore\n if (!store || !this.subjectUri) return\n this.paneSupportsEditing = pane.name === 'source'\n this.pane = pane\n }\n\n private getPaneIcon (pane, subject, context) {\n if (!pane) return undefined\n\n const icon = typeof pane.icon === 'function'\n ? pane.icon(subject, context)\n : pane.icon\n return icon\n }\n\n private async getPaneItems (subject, context, relevantPanes) {\n const dom = context.dom\n const menuItems = await Promise.all(relevantPanes.map(async pane => {\n const label = pane.label(subject, context)\n\n let iconSrc = ''\n if (pane.name === 'profile') {\n iconSrc = PERSON_ICON\n } else if (pane.name === 'social') {\n iconSrc = FRIENDS_ICON\n } else {\n iconSrc = await this.getPaneIcon(pane, subject, context)\n }\n\n const icon = utils.AJARImage(iconSrc, label, label, dom)\n icon.setAttribute('slot', 'left-icon')\n\n return {\n label,\n icon,\n action: () => this.openPane?.(subject, pane.name)\n }\n }))\n return menuItems\n }\n\n private refreshFileExplorerContextValue () {\n this.fileExplorerContextValue = createFileExplorerContextValue({\n store: this.context?.session.store as LiveStore,\n subjectUri: this.subjectUri,\n pane: this.pane,\n soloPane: this.soloPane,\n onBack: this.onBack,\n openPane: this.openPane,\n handleSharingClick: this.handleSharingClick,\n paneSupportsEditing: this.paneSupportsEditing,\n edit: this.edit\n })\n }\n\n private async refreshMenuItems () {\n const store = this.context?.session.store as LiveStore\n if (!store || !this.subjectUri) return\n\n const subject = store.sym(this.subjectUri)\n const menuItems = await this.getPaneItems(subject, this.context as DataBrowserContext, this.relevantPanes)\n\n this.menuItems = menuItems\n }\n\n protected willUpdate (changedProperties: PropertyValues<this>) {\n super.willUpdate(changedProperties)\n const store = this.context?.session.store as LiveStore\n if (!store) {\n throw new Error('The element is missing the required `context.session.store` value. Ensure the `context` property is set.')\n }\n if (!this.subjectUri) {\n throw new Error('The element is missing the required `subjectUri` property.')\n }\n\n if (\n changedProperties.has('subjectUri') ||\n changedProperties.has('relevantPanes') ||\n changedProperties.has('context')\n ) {\n this.refreshMenuItems().catch(error => {\n console.warn('Failed to refresh menu items', error)\n })\n }\n\n if (changedProperties.has('pane') || changedProperties.has('subjectUri') || changedProperties.has('context')) {\n this.paneSupportsEditing = this.pane?.name === 'source'\n }\n\n if (\n changedProperties.has('context') ||\n changedProperties.has('subjectUri') ||\n changedProperties.has('pane') ||\n changedProperties.has('soloPane') ||\n changedProperties.has('onBack') ||\n changedProperties.has('openPane') ||\n changedProperties.has('handleSharingClick') ||\n changedProperties.has('pane') ||\n changedProperties.has('isDirty')\n ) {\n this.refreshFileExplorerContextValue()\n }\n }\n\n render () {\n const store = this.context?.session.store as LiveStore\n const subject = store.sym(this.subjectUri as string)\n return html`\n <div class=\"file-explorer-provider\">\n ${this.showHeader\n ? html`\n <file-explorer-header\n .paneIcon=${this.getPaneIcon(this.pane, subject, this.context as DataBrowserContext)}\n .menuItems=${this.menuItems}\n .paneSupportsEditing=${this.paneSupportsEditing}\n ></file-explorer-header>\n `\n : nothing}\n <slot class=\"pane\"></slot>\n </div>\n `\n }\n}\n"],"mappings":"s9IAYA,IAAMY,GAAcF,EAAAA,QACdG,GAAeF,EAAAA,QAErB,SAASG,GAAgCC,EAcjB,CACtB,MAAO,CACLC,MAAOD,EAA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C5C5E,EAAAA,OAAM,EAAA8H,EAAA,CAAA,CAAA,EAAAlD,EAAAoD,EAAA9G,GAAA,IAAA,EAAA,EAAA8G"}
|
|
1
|
+
{"version":3,"file":"FileExplorerProvider.cjs.js","names":["html","nothing","utils","WebComponent","provide","fileExplorerContext","customElement","property","state","styles","personIcon","friendsIcon","PERSON_ICON","FRIENDS_ICON","createFileExplorerContextValue","value","store","subjectUri","pane","soloPane","onBack","openPane","handleAccessClick","paneSupportsEditing","edit","_classDecs","_FileExplorerProvider","_FileExplorerProvider2","_A","WeakMap","_B","_C","_D","_E","_F","_G","_H","_I","_J","_K","_L","_M","_N","_O","_P","_ref","_contextDecs","attribute","_subjectUriDecs","_onBackDecs","_relevantPanesDecs","_paneDecs","_paneRenderOptionsDecs","_showHeaderDecs","_handleAccessClickDecs","_soloPaneDecs","_openPaneDecs","_menuItemsDecs","_isEditingDecs","_isDirtyDecs","_paneSupportsEditingDecs","_editDecs","_fileExplorerContextValueDecs","context","_FileExplorerProvider3","FileExplorerProvider","constructor","args","_classPrivateFieldInitSpec","_initProto","_init_context","undefined","_init_subjectUri","_init_onBack","_init_relevantPanes","_init_pane","_init_paneRenderOptions","_init_showHeader","_init_handleAccessClick","_init_soloPane","_init_openPane","_init_menuItems","_init_isEditing","_init_isDirty","_init_paneSupportsEditing","_defineProperty","sourceProvider","querySelector","beginEditing","_init_edit","onEdit","beginEditingInSourcePane","isDirty","updateDirtyState","dirty","refreshFileExplorerContextValue","_init_fileExplorerContextValue","session","_classPrivateFieldGet","v","_classPrivateFieldSet","relevantPanes","paneRenderOptions","showHeader","menuItems","isEditing","fileExplorerContextValue","openSelectedPane","name","getPaneIcon","subject","icon","getPaneItems","dom","Promise","all","map","label","iconSrc","AJARImage","setAttribute","action","refreshMenuItems","sym","willUpdate","changedProperties","Error","has","catch","error","console","warn","render","e","c","_initClass","_applyDecs","_Class","_identity","default","personIcon","friendsIcon","customElement","property","state","provide","fileExplorerContext","WebComponent","utils","nothing","styles","require_FileExplorerProvider_styles","require_person","require_friends","solid_ui","lit_decorators_js","_lit_context","lit","_Class","_FileExplorerProvider3","_A","_B","_C","_D","_E","_F","_G","_H","_I","_J","_K","_L","_M","_N","_O","_P","_initProto","_initClass","_classDecs","_contextDecs","_init_context","_subjectUriDecs","_init_subjectUri","_onBackDecs","_init_onBack","_relevantPanesDecs","_init_relevantPanes","_paneDecs","_init_pane","_paneRenderOptionsDecs","_init_paneRenderOptions","_showHeaderDecs","_init_showHeader","_handleAccessClickDecs","_init_handleAccessClick","_soloPaneDecs","_init_soloPane","_openPaneDecs","_init_openPane","_menuItemsDecs","_init_menuItems","_isEditingDecs","_init_isEditing","_isDirtyDecs","_init_isDirty","_paneSupportsEditingDecs","_init_paneSupportsEditing","_editDecs","_init_edit","_fileExplorerContextValueDecs","_init_fileExplorerContextValue","_FileExplorerProvider2","_ref","_classPrivateFieldInitSpec","_checkPrivateRedeclaration","a","_classPrivateFieldSet","s","_assertClassBrand","r","_classPrivateFieldGet","_defineProperty","_toPropertyKey","t","_applyDecs","i","n","o","c","applyDec","m","h","y","v","g","b","u","w","S","A","d","f","p","_setFunctionName","P","j","D","I","F","l","N","_checkInRHS","_toPrimitive","e","_identity","PERSON_ICON","FRIENDS_ICON","createFileExplorerContextValue","value","_FileExplorerProvider","args","dirty","pane","subject","context","dom","relevantPanes","label","iconSrc","icon","store","menuItems","changedProperties","error"],"sources":["../../../src/components/file-explorer-header/FileExplorerProvider.ts"],"sourcesContent":["import { html, nothing, type PropertyValues } from 'lit'\nimport type { NamedNode, LiveStore } from 'rdflib'\nimport { DataBrowserContext, type PaneDefinition } from 'pane-registry'\nimport { utils, WebComponent } from 'solid-ui'\nimport { provide } from '@lit/context'\nimport { fileExplorerContext, type FileExplorerContext, type FileExplorerEdit } from 'solid-ui'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport './FileExplorerHeader'\nimport styles from './FileExplorerProvider.styles.css'\nimport personIcon from '../../icons/person.svg'\nimport friendsIcon from '../../icons/friends.svg'\nimport '~icons/lucide/share-2'\n\nconst PERSON_ICON = personIcon\nconst FRIENDS_ICON = friendsIcon\n\nfunction createFileExplorerContextValue (value: {\n store: LiveStore | undefined\n subjectUri: string | undefined\n pane?: PaneDefinition\n soloPane?: boolean\n onBack?: () => void\n openPane?: (subject: NamedNode, paneName: string) => void\n handleAccessClick?: () => void\n paneSupportsEditing?: boolean\n edit?: {\n onEdit?: () => void\n isDirty?: boolean\n updateDirtyState?: (dirty: boolean) => void\n }\n}): FileExplorerContext {\n return {\n store: value.store as LiveStore,\n subjectUri: value.subjectUri,\n pane: value.pane,\n soloPane: value.soloPane,\n onBack: value.onBack,\n openPane: value.openPane,\n handleAccessClick: value.handleAccessClick,\n paneSupportsEditing: value.paneSupportsEditing,\n edit: value.edit\n }\n}\n@customElement('file-explorer-provider')\nexport default class FileExplorerProvider extends WebComponent {\n static styles = styles\n\n @property({ attribute: false })\n accessor context: DataBrowserContext | undefined = undefined\n\n @property({ attribute: false })\n accessor subjectUri: string | undefined = undefined\n\n @property({ attribute: false })\n accessor onBack: (() => void) | undefined = undefined\n\n @property({ attribute: false })\n accessor relevantPanes: PaneDefinition[] = []\n\n @property({ attribute: false })\n accessor pane: PaneDefinition | undefined = undefined\n\n @property({ attribute: false })\n accessor paneRenderOptions: Record<string, unknown> = {}\n\n @property({ attribute: false })\n accessor showHeader: boolean = true\n\n @property({ attribute: false })\n accessor handleAccessClick: (() => void) | undefined = undefined\n\n // TODO: Need to research this more, brought it over from manager.\n @property({ attribute: false })\n accessor soloPane: boolean | undefined = undefined\n\n @property({ attribute: false })\n accessor openPane: ((subject: NamedNode, paneName: string) => void) | undefined = undefined\n\n @state()\n accessor menuItems: Array<{ label: string, icon?: HTMLElement, action: (event: Event) => void }> = []\n\n @state()\n accessor isEditing: boolean = false\n\n @state()\n accessor isDirty: boolean = false\n\n @state()\n accessor paneSupportsEditing: boolean = false\n\n // TODO: For now this works, but check if there is a better way.\n // because this means file explorer will know about the pane.\n // what if other panes want to use this. If so maybe we should\n // add more to the context to capture the provider for the pane that\n // will be editing... anyway this shouldn't be just for source pane.\n private beginEditingInSourcePane = () => {\n const sourceProvider = this.querySelector('source-pane-source-provider') as {\n beginEditing?: () => void\n } | null\n\n sourceProvider?.beginEditing?.()\n }\n\n // TODO: same as below. on Edit should be something more generic\n @state()\n accessor edit: FileExplorerEdit = {\n onEdit: this.beginEditingInSourcePane,\n isDirty: false,\n updateDirtyState: (dirty: boolean) => {\n if (this.isDirty === dirty) return\n\n this.isDirty = dirty\n this.edit = {\n ...this.edit,\n isDirty: dirty\n }\n this.refreshFileExplorerContextValue()\n }\n }\n\n @provide({ context: fileExplorerContext })\n accessor fileExplorerContextValue: FileExplorerContext = createFileExplorerContextValue({\n store: this.context?.session.store as LiveStore,\n subjectUri: this.subjectUri,\n pane: this.pane,\n soloPane: this.soloPane,\n onBack: this.onBack,\n openPane: this.openPane,\n handleAccessClick: this.handleAccessClick,\n paneSupportsEditing: false,\n edit: this.edit\n })\n\n // Change the state for the pane so it can show the new icon.\n openSelectedPane (pane: PaneDefinition) {\n const store = this.context?.session.store as LiveStore\n if (!store || !this.subjectUri) return\n this.paneSupportsEditing = pane.name === 'source'\n this.pane = pane\n }\n\n private getPaneIcon (pane, subject, context) {\n if (!pane) return undefined\n\n const icon = typeof pane.icon === 'function'\n ? pane.icon(subject, context)\n : pane.icon\n return icon\n }\n\n private async getPaneItems (subject, context, relevantPanes) {\n const dom = context.dom\n const menuItems = await Promise.all(relevantPanes.map(async pane => {\n const label = pane.label(subject, context)\n\n let iconSrc = ''\n if (pane.name === 'profile') {\n iconSrc = PERSON_ICON\n } else if (pane.name === 'social') {\n iconSrc = FRIENDS_ICON\n } else {\n iconSrc = await this.getPaneIcon(pane, subject, context)\n }\n\n const icon = utils.AJARImage(iconSrc, label, label, dom)\n icon.setAttribute('slot', 'left-icon')\n\n return {\n label,\n icon,\n action: () => this.openPane?.(subject, pane.name)\n }\n }))\n return menuItems\n }\n\n private refreshFileExplorerContextValue () {\n this.fileExplorerContextValue = createFileExplorerContextValue({\n store: this.context?.session.store as LiveStore,\n subjectUri: this.subjectUri,\n pane: this.pane,\n soloPane: this.soloPane,\n onBack: this.onBack,\n openPane: this.openPane,\n handleAccessClick: this.handleAccessClick,\n paneSupportsEditing: this.paneSupportsEditing,\n edit: this.edit\n })\n }\n\n private async refreshMenuItems () {\n const store = this.context?.session.store as LiveStore\n if (!store || !this.subjectUri) return\n\n const subject = store.sym(this.subjectUri)\n const menuItems = await this.getPaneItems(subject, this.context as DataBrowserContext, this.relevantPanes)\n\n this.menuItems = menuItems\n }\n\n protected willUpdate (changedProperties: PropertyValues<this>) {\n super.willUpdate(changedProperties)\n const store = this.context?.session.store as LiveStore\n if (!store) {\n throw new Error('The element is missing the required `context.session.store` value. Ensure the `context` property is set.')\n }\n if (!this.subjectUri) {\n throw new Error('The element is missing the required `subjectUri` property.')\n }\n\n if (\n changedProperties.has('subjectUri') ||\n changedProperties.has('relevantPanes') ||\n changedProperties.has('context')\n ) {\n this.refreshMenuItems().catch(error => {\n console.warn('Failed to refresh menu items', error)\n })\n }\n\n if (changedProperties.has('pane') || changedProperties.has('subjectUri') || changedProperties.has('context')) {\n this.paneSupportsEditing = this.pane?.name === 'source'\n }\n\n if (\n changedProperties.has('context') ||\n changedProperties.has('subjectUri') ||\n changedProperties.has('pane') ||\n changedProperties.has('soloPane') ||\n changedProperties.has('onBack') ||\n changedProperties.has('openPane') ||\n changedProperties.has('handleAccessClick') ||\n changedProperties.has('pane') ||\n changedProperties.has('isDirty')\n ) {\n this.refreshFileExplorerContextValue()\n }\n }\n\n render () {\n const store = this.context?.session.store as LiveStore\n const subject = store.sym(this.subjectUri as string)\n return html`\n <div class=\"file-explorer-provider\">\n ${this.showHeader\n ? html`\n <file-explorer-header\n .paneIcon=${this.getPaneIcon(this.pane, subject, this.context as DataBrowserContext)}\n .menuItems=${this.menuItems}\n .paneSupportsEditing=${this.paneSupportsEditing}\n ></file-explorer-header>\n `\n : nothing}\n <sl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AA,EAAArC,EAAA,EAAA,IAAA,GArNiDtB,EAAAA,YAAY,EAAA6D,GAAAyE,EAAA,cAAAC,EAAA,CAAAxE,aAAA,CAAA,MAAAxC,CAAA,EAAA2D,EAAA,KAAA,SAC5C5E,EAAAA,OAAM,EAAA8H,EAAA,CAAA,CAAA,EAAAlD,EAAAoD,EAAA9G,GAAA,IAAA,EAAA,EAAA8G"}
|
|
@@ -11,7 +11,7 @@ export default class FileExplorerProvider extends WebComponent {
|
|
|
11
11
|
accessor pane: PaneDefinition | undefined;
|
|
12
12
|
accessor paneRenderOptions: Record<string, unknown>;
|
|
13
13
|
accessor showHeader: boolean;
|
|
14
|
-
accessor
|
|
14
|
+
accessor handleAccessClick: (() => void) | undefined;
|
|
15
15
|
accessor soloPane: boolean | undefined;
|
|
16
16
|
accessor openPane: ((subject: NamedNode, paneName: string) => void) | undefined;
|
|
17
17
|
accessor menuItems: Array<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileExplorerProvider.d.ts","sourceRoot":"","sources":["../../../src/components/file-explorer-header/FileExplorerProvider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,cAAc,EAAE,MAAM,KAAK,CAAA;AACxD,OAAO,KAAK,EAAE,SAAS,EAAa,MAAM,QAAQ,CAAA;AAClD,OAAO,EAAE,kBAAkB,EAAE,KAAK,cAAc,EAAE,MAAM,eAAe,CAAA;AACvE,OAAO,EAAS,YAAY,EAAE,MAAM,UAAU,CAAA;AAE9C,OAAO,EAAuB,KAAK,mBAAmB,EAAE,KAAK,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAE/F,OAAO,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"FileExplorerProvider.d.ts","sourceRoot":"","sources":["../../../src/components/file-explorer-header/FileExplorerProvider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,cAAc,EAAE,MAAM,KAAK,CAAA;AACxD,OAAO,KAAK,EAAE,SAAS,EAAa,MAA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,CAAC,SAAS,EAAE,OAAO,CAAQ;IAGnC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAQ;IAGjC,QAAQ,CAAC,mBAAmB,EAAE,OAAO,CAAQ;IAO7C,OAAO,CAAC,wBAAwB,CAM/B;IAID,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAa9B;IAGD,QAAQ,CAAC,wBAAwB,EAAE,mBAAmB,CAUpD;IAGF,gBAAgB,CAAE,IAAI,EAAE,cAAc;IAOtC,OAAO,CAAC,WAAW;YASL,YAAY;IA0B1B,OAAO,CAAC,+BAA+B;YAczB,gBAAgB;IAU9B,SAAS,CAAC,UAAU,CAAE,iBAAiB,EAAE,cAAc,CAAC,IAAI,CAAC;IAuC7D,MAAM;CAkBP"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
+
import "../../_virtual/~icons/lucide/share-2.esm.js";
|
|
1
2
|
import "./FileExplorerHeader.esm.js";
|
|
2
3
|
import e from "./FileExplorerProvider.styles.esm.js";
|
|
3
4
|
import t from "../../icons/person.esm.js";
|
|
4
5
|
import n from "../../icons/friends.esm.js";
|
|
5
6
|
import { WebComponent as r, fileExplorerContext as i, utils as a } from "solid-ui";
|
|
6
|
-
import {
|
|
7
|
-
import { provide as
|
|
8
|
-
import {
|
|
7
|
+
import { customElement as o, property as s, state as c } from "lit/decorators.js";
|
|
8
|
+
import { provide as l } from "@lit/context";
|
|
9
|
+
import { html as u, nothing as d } from "lit";
|
|
9
10
|
//#region src/components/file-explorer-header/FileExplorerProvider.ts
|
|
10
11
|
var f, p, m, h, g, _, v, y, b, x, S, C, w, T, E, D, O, k, A, j, ee, te, ne, re, ie, ae, oe, M, N, P, F, I, L, R, z, B, V, H, U, W, G, K, q, se, ce, le, ue, de, fe, pe, me, he, ge, _e, ve;
|
|
11
12
|
function J(e, t, n) {
|
|
@@ -188,14 +189,14 @@ function Oe(e) {
|
|
|
188
189
|
soloPane: e.soloPane,
|
|
189
190
|
onBack: e.onBack,
|
|
190
191
|
openPane: e.openPane,
|
|
191
|
-
|
|
192
|
+
handleAccessClick: e.handleAccessClick,
|
|
192
193
|
paneSupportsEditing: e.paneSupportsEditing,
|
|
193
194
|
edit: e.edit
|
|
194
195
|
};
|
|
195
196
|
}
|
|
196
|
-
ee = [
|
|
197
|
+
ee = [o("file-explorer-provider")];
|
|
197
198
|
var $;
|
|
198
|
-
new (_e = (m = /*#__PURE__*/ new WeakMap(), h = /*#__PURE__*/ new WeakMap(), g = /*#__PURE__*/ new WeakMap(), _ = /*#__PURE__*/ new WeakMap(), v = /*#__PURE__*/ new WeakMap(), y = /*#__PURE__*/ new WeakMap(), b = /*#__PURE__*/ new WeakMap(), x = /*#__PURE__*/ new WeakMap(), S = /*#__PURE__*/ new WeakMap(), C = /*#__PURE__*/ new WeakMap(), w = /*#__PURE__*/ new WeakMap(), T = /*#__PURE__*/ new WeakMap(), E = /*#__PURE__*/ new WeakMap(), D = /*#__PURE__*/ new WeakMap(), O = /*#__PURE__*/ new WeakMap(), k = /*#__PURE__*/ new WeakMap(), ve = (te =
|
|
199
|
+
new (_e = (m = /*#__PURE__*/ new WeakMap(), h = /*#__PURE__*/ new WeakMap(), g = /*#__PURE__*/ new WeakMap(), _ = /*#__PURE__*/ new WeakMap(), v = /*#__PURE__*/ new WeakMap(), y = /*#__PURE__*/ new WeakMap(), b = /*#__PURE__*/ new WeakMap(), x = /*#__PURE__*/ new WeakMap(), S = /*#__PURE__*/ new WeakMap(), C = /*#__PURE__*/ new WeakMap(), w = /*#__PURE__*/ new WeakMap(), T = /*#__PURE__*/ new WeakMap(), E = /*#__PURE__*/ new WeakMap(), D = /*#__PURE__*/ new WeakMap(), O = /*#__PURE__*/ new WeakMap(), k = /*#__PURE__*/ new WeakMap(), ve = (te = s({ attribute: !1 }), re = s({ attribute: !1 }), ae = s({ attribute: !1 }), M = s({ attribute: !1 }), P = s({ attribute: !1 }), I = s({ attribute: !1 }), R = s({ attribute: !1 }), B = s({ attribute: !1 }), H = s({ attribute: !1 }), W = s({ attribute: !1 }), K = c(), se = c(), le = c(), de = c(), pe = c(), he = l({ context: i }), "context"), p = class extends r {
|
|
199
200
|
constructor(...e) {
|
|
200
201
|
super(...e), J(this, m, (A(this), ne(this, void 0))), J(this, h, ie(this, void 0)), J(this, g, oe(this, void 0)), J(this, _, N(this, [])), J(this, v, F(this, void 0)), J(this, y, L(this, {})), J(this, b, z(this, !0)), J(this, x, V(this, void 0)), J(this, S, U(this, void 0)), J(this, C, G(this, void 0)), J(this, w, q(this, [])), J(this, T, ce(this, !1)), J(this, E, ue(this, !1)), J(this, D, fe(this, !1)), Z(this, "beginEditingInSourcePane", () => {
|
|
201
202
|
this.querySelector("source-pane-source-provider")?.beginEditing?.();
|
|
@@ -215,7 +216,7 @@ new (_e = (m = /*#__PURE__*/ new WeakMap(), h = /*#__PURE__*/ new WeakMap(), g =
|
|
|
215
216
|
soloPane: this.soloPane,
|
|
216
217
|
onBack: this.onBack,
|
|
217
218
|
openPane: this.openPane,
|
|
218
|
-
|
|
219
|
+
handleAccessClick: this.handleAccessClick,
|
|
219
220
|
paneSupportsEditing: !1,
|
|
220
221
|
edit: this.edit
|
|
221
222
|
})));
|
|
@@ -262,10 +263,10 @@ new (_e = (m = /*#__PURE__*/ new WeakMap(), h = /*#__PURE__*/ new WeakMap(), g =
|
|
|
262
263
|
set showHeader(e) {
|
|
263
264
|
Y(b, this, e);
|
|
264
265
|
}
|
|
265
|
-
get
|
|
266
|
+
get handleAccessClick() {
|
|
266
267
|
return X(x, this);
|
|
267
268
|
}
|
|
268
|
-
set
|
|
269
|
+
set handleAccessClick(e) {
|
|
269
270
|
Y(x, this, e);
|
|
270
271
|
}
|
|
271
272
|
get soloPane() {
|
|
@@ -317,7 +318,7 @@ new (_e = (m = /*#__PURE__*/ new WeakMap(), h = /*#__PURE__*/ new WeakMap(), g =
|
|
|
317
318
|
Y(k, this, e);
|
|
318
319
|
}
|
|
319
320
|
openSelectedPane(e) {
|
|
320
|
-
|
|
321
|
+
this.context?.session.store && this.subjectUri && (this.paneSupportsEditing = e.name === "source", this.pane = e);
|
|
321
322
|
}
|
|
322
323
|
getPaneIcon(e, t, n) {
|
|
323
324
|
if (e) return typeof e.icon == "function" ? e.icon(t, n) : e.icon;
|
|
@@ -343,7 +344,7 @@ new (_e = (m = /*#__PURE__*/ new WeakMap(), h = /*#__PURE__*/ new WeakMap(), g =
|
|
|
343
344
|
soloPane: this.soloPane,
|
|
344
345
|
onBack: this.onBack,
|
|
345
346
|
openPane: this.openPane,
|
|
346
|
-
|
|
347
|
+
handleAccessClick: this.handleAccessClick,
|
|
347
348
|
paneSupportsEditing: this.paneSupportsEditing,
|
|
348
349
|
edit: this.edit
|
|
349
350
|
});
|
|
@@ -359,19 +360,19 @@ new (_e = (m = /*#__PURE__*/ new WeakMap(), h = /*#__PURE__*/ new WeakMap(), g =
|
|
|
359
360
|
if (!this.subjectUri) throw Error("The element is missing the required `subjectUri` property.");
|
|
360
361
|
(e.has("subjectUri") || e.has("relevantPanes") || e.has("context")) && this.refreshMenuItems().catch((e) => {
|
|
361
362
|
console.warn("Failed to refresh menu items", e);
|
|
362
|
-
}), (e.has("pane") || e.has("subjectUri") || e.has("context")) && (this.paneSupportsEditing = this.pane?.name === "source"), (e.has("context") || e.has("subjectUri") || e.has("pane") || e.has("soloPane") || e.has("onBack") || e.has("openPane") || e.has("
|
|
363
|
+
}), (e.has("pane") || e.has("subjectUri") || e.has("context")) && (this.paneSupportsEditing = this.pane?.name === "source"), (e.has("context") || e.has("subjectUri") || e.has("pane") || e.has("soloPane") || e.has("onBack") || e.has("openPane") || e.has("handleAccessClick") || e.has("pane") || e.has("isDirty")) && this.refreshFileExplorerContextValue();
|
|
363
364
|
}
|
|
364
365
|
render() {
|
|
365
366
|
let e = (this.context?.session.store).sym(this.subjectUri);
|
|
366
|
-
return
|
|
367
|
+
return u`
|
|
367
368
|
<div class="file-explorer-provider">
|
|
368
|
-
${this.showHeader ?
|
|
369
|
+
${this.showHeader ? u`
|
|
369
370
|
<file-explorer-header
|
|
370
371
|
.paneIcon=${this.getPaneIcon(this.pane, e, this.context)}
|
|
371
372
|
.menuItems=${this.menuItems}
|
|
372
373
|
.paneSupportsEditing=${this.paneSupportsEditing}
|
|
373
374
|
></file-explorer-header>
|
|
374
|
-
` :
|
|
375
|
+
` : d}
|
|
375
376
|
<slot class="pane"></slot>
|
|
376
377
|
</div>
|
|
377
378
|
`;
|
|
@@ -415,7 +416,7 @@ new (_e = (m = /*#__PURE__*/ new WeakMap(), h = /*#__PURE__*/ new WeakMap(), g =
|
|
|
415
416
|
[
|
|
416
417
|
B,
|
|
417
418
|
1,
|
|
418
|
-
"
|
|
419
|
+
"handleAccessClick"
|
|
419
420
|
],
|
|
420
421
|
[
|
|
421
422
|
H,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileExplorerProvider.esm.js","names":["html","nothing","utils","WebComponent","provide","fileExplorerContext","customElement","property","state","styles","personIcon","friendsIcon","PERSON_ICON","FRIENDS_ICON","createFileExplorerContextValue","value","store","subjectUri","pane","soloPane","onBack","openPane","handleSharingClick","paneSupportsEditing","edit","_classDecs","_FileExplorerProvider","_FileExplorerProvider2","_A","WeakMap","_B","_C","_D","_E","_F","_G","_H","_I","_J","_K","_L","_M","_N","_O","_P","_ref","_contextDecs","attribute","_subjectUriDecs","_onBackDecs","_relevantPanesDecs","_paneDecs","_paneRenderOptionsDecs","_showHeaderDecs","_handleSharingClickDecs","_soloPaneDecs","_openPaneDecs","_menuItemsDecs","_isEditingDecs","_isDirtyDecs","_paneSupportsEditingDecs","_editDecs","_fileExplorerContextValueDecs","context","_FileExplorerProvider3","FileExplorerProvider","constructor","args","_classPrivateFieldInitSpec","_initProto","_init_context","undefined","_init_subjectUri","_init_onBack","_init_relevantPanes","_init_pane","_init_paneRenderOptions","_init_showHeader","_init_handleSharingClick","_init_soloPane","_init_openPane","_init_menuItems","_init_isEditing","_init_isDirty","_init_paneSupportsEditing","_defineProperty","sourceProvider","querySelector","beginEditing","_init_edit","onEdit","beginEditingInSourcePane","isDirty","updateDirtyState","dirty","refreshFileExplorerContextValue","_init_fileExplorerContextValue","session","_classPrivateFieldGet","v","_classPrivateFieldSet","relevantPanes","paneRenderOptions","showHeader","menuItems","isEditing","fileExplorerContextValue","openSelectedPane","name","getPaneIcon","subject","icon","getPaneItems","dom","Promise","all","map","label","iconSrc","AJARImage","setAttribute","action","refreshMenuItems","sym","willUpdate","changedProperties","Error","has","catch","error","console","warn","render","e","c","_initClass","_applyDecs","_Class","_identity","default"],"sources":["../../../src/components/file-explorer-header/FileExplorerProvider.ts"],"sourcesContent":["import { html, nothing, type PropertyValues } from 'lit'\nimport type { NamedNode, LiveStore } from 'rdflib'\nimport { DataBrowserContext, type PaneDefinition } from 'pane-registry'\nimport { utils, WebComponent } from 'solid-ui'\nimport { provide } from '@lit/context'\nimport { fileExplorerContext, type FileExplorerContext, type FileExplorerEdit } from 'solid-ui'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport './FileExplorerHeader'\nimport styles from './FileExplorerProvider.styles.css'\nimport personIcon from '../../icons/person.svg'\nimport friendsIcon from '../../icons/friends.svg'\n\nconst PERSON_ICON = personIcon\nconst FRIENDS_ICON = friendsIcon\n\nfunction createFileExplorerContextValue (value: {\n store: LiveStore | undefined\n subjectUri: string | undefined\n pane?: PaneDefinition\n soloPane?: boolean\n onBack?: () => void\n openPane?: (subject: NamedNode, paneName: string) => void\n handleSharingClick?: () => void\n paneSupportsEditing?: boolean\n edit?: {\n onEdit?: () => void\n isDirty?: boolean\n updateDirtyState?: (dirty: boolean) => void\n }\n}): FileExplorerContext {\n return {\n store: value.store as LiveStore,\n subjectUri: value.subjectUri,\n pane: value.pane,\n soloPane: value.soloPane,\n onBack: value.onBack,\n openPane: value.openPane,\n handleSharingClick: value.handleSharingClick,\n paneSupportsEditing: value.paneSupportsEditing,\n edit: value.edit\n }\n}\n@customElement('file-explorer-provider')\nexport default class FileExplorerProvider extends WebComponent {\n static styles = styles\n\n @property({ attribute: false })\n accessor context: DataBrowserContext | undefined = undefined\n\n @property({ attribute: false })\n accessor subjectUri: string | undefined = undefined\n\n @property({ attribute: false })\n accessor onBack: (() => void) | undefined = undefined\n\n @property({ attribute: false })\n accessor relevantPanes: PaneDefinition[] = []\n\n @property({ attribute: false })\n accessor pane: PaneDefinition | undefined = undefined\n\n @property({ attribute: false })\n accessor paneRenderOptions: Record<string, unknown> = {}\n\n @property({ attribute: false })\n accessor showHeader: boolean = true\n\n @property({ attribute: false })\n accessor handleSharingClick: (() => void) | undefined = undefined\n\n // TODO: Need to research this more, brought it over from manager.\n @property({ attribute: false })\n accessor soloPane: boolean | undefined = undefined\n\n @property({ attribute: false })\n accessor openPane: ((subject: NamedNode, paneName: string) => void) | undefined = undefined\n\n @state()\n accessor menuItems: Array<{ label: string, icon?: HTMLElement, action: (event: Event) => void }> = []\n\n @state()\n accessor isEditing: boolean = false\n\n @state()\n accessor isDirty: boolean = false\n\n @state()\n accessor paneSupportsEditing: boolean = false\n\n // TODO: For now this works, but check if there is a better way.\n // because this means file explorer will know about the pane.\n // what if other panes want to use this. If so maybe we should\n // add more to the context to capture the provider for the pane that\n // will be editing... anyway this shouldn't be just for source pane.\n private beginEditingInSourcePane = () => {\n const sourceProvider = this.querySelector('source-pane-source-provider') as {\n beginEditing?: () => void\n } | null\n\n sourceProvider?.beginEditing?.()\n }\n\n // TODO: same as below. on Edit should be something more generic\n @state()\n accessor edit: FileExplorerEdit = {\n onEdit: this.beginEditingInSourcePane,\n isDirty: false,\n updateDirtyState: (dirty: boolean) => {\n if (this.isDirty === dirty) return\n\n this.isDirty = dirty\n this.edit = {\n ...this.edit,\n isDirty: dirty\n }\n this.refreshFileExplorerContextValue()\n }\n }\n\n @provide({ context: fileExplorerContext })\n accessor fileExplorerContextValue: FileExplorerContext = createFileExplorerContextValue({\n store: this.context?.session.store as LiveStore,\n subjectUri: this.subjectUri,\n pane: this.pane,\n soloPane: this.soloPane,\n onBack: this.onBack,\n openPane: this.openPane,\n handleSharingClick: this.handleSharingClick,\n paneSupportsEditing: false,\n edit: this.edit\n })\n\n // Change the state for the pane so it can show the new icon.\n openSelectedPane (pane: PaneDefinition) {\n const store = this.context?.session.store as LiveStore\n if (!store || !this.subjectUri) return\n this.paneSupportsEditing = pane.name === 'source'\n this.pane = pane\n }\n\n private getPaneIcon (pane, subject, context) {\n if (!pane) return undefined\n\n const icon = typeof pane.icon === 'function'\n ? pane.icon(subject, context)\n : pane.icon\n return icon\n }\n\n private async getPaneItems (subject, context, relevantPanes) {\n const dom = context.dom\n const menuItems = await Promise.all(relevantPanes.map(async pane => {\n const label = pane.label(subject, context)\n\n let iconSrc = ''\n if (pane.name === 'profile') {\n iconSrc = PERSON_ICON\n } else if (pane.name === 'social') {\n iconSrc = FRIENDS_ICON\n } else {\n iconSrc = await this.getPaneIcon(pane, subject, context)\n }\n\n const icon = utils.AJARImage(iconSrc, label, label, dom)\n icon.setAttribute('slot', 'left-icon')\n\n return {\n label,\n icon,\n action: () => this.openPane?.(subject, pane.name)\n }\n }))\n return menuItems\n }\n\n private refreshFileExplorerContextValue () {\n this.fileExplorerContextValue = createFileExplorerContextValue({\n store: this.context?.session.store as LiveStore,\n subjectUri: this.subjectUri,\n pane: this.pane,\n soloPane: this.soloPane,\n onBack: this.onBack,\n openPane: this.openPane,\n handleSharingClick: this.handleSharingClick,\n paneSupportsEditing: this.paneSupportsEditing,\n edit: this.edit\n })\n }\n\n private async refreshMenuItems () {\n const store = this.context?.session.store as LiveStore\n if (!store || !this.subjectUri) return\n\n const subject = store.sym(this.subjectUri)\n const menuItems = await this.getPaneItems(subject, this.context as DataBrowserContext, this.relevantPanes)\n\n this.menuItems = menuItems\n }\n\n protected willUpdate (changedProperties: PropertyValues<this>) {\n super.willUpdate(changedProperties)\n const store = this.context?.session.store as LiveStore\n if (!store) {\n throw new Error('The element is missing the required `context.session.store` value. Ensure the `context` property is set.')\n }\n if (!this.subjectUri) {\n throw new Error('The element is missing the required `subjectUri` property.')\n }\n\n if (\n changedProperties.has('subjectUri') ||\n changedProperties.has('relevantPanes') ||\n changedProperties.has('context')\n ) {\n this.refreshMenuItems().catch(error => {\n console.warn('Failed to refresh menu items', error)\n })\n }\n\n if (changedProperties.has('pane') || changedProperties.has('subjectUri') || changedProperties.has('context')) {\n this.paneSupportsEditing = this.pane?.name === 'source'\n }\n\n if (\n changedProperties.has('context') ||\n changedProperties.has('subjectUri') ||\n changedProperties.has('pane') ||\n changedProperties.has('soloPane') ||\n changedProperties.has('onBack') ||\n changedProperties.has('openPane') ||\n changedProperties.has('handleSharingClick') ||\n changedProperties.has('pane') ||\n changedProperties.has('isDirty')\n ) {\n this.refreshFileExplorerContextValue()\n }\n }\n\n render () {\n const store = this.context?.session.store as LiveStore\n const subject = store.sym(this.subjectUri as string)\n return html`\n <div class=\"file-explorer-provider\">\n ${this.showHeader\n ? html`\n <file-explorer-header\n .paneIcon=${this.getPaneIcon(this.pane, subject, this.context as DataBrowserContext)}\n .menuItems=${this.menuItems}\n .paneSupportsEditing=${this.paneSupportsEditing}\n ></file-explorer-header>\n `\n : nothing}\n <slot class=\"pane\"></slot>\n </div>\n `\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,IAAMY,KAAcF,GACdG,KAAeF;AAErB,SAASG,GAAgCC,GAcjB;CACtB,OAAO;EACLC,OAAOD,EAAMC;EACbC,YAAYF,EAAME;EAClBC,MAAMH,EAAMG;EACZC,UAAUJ,EAAMI;EAChBC,QAAQL,EAAMK;EACdC,UAAUN,EAAMM;EAChBC,oBAAoBP,EAAMO;EAC1BC,qBAAqBR,EAAMQ;EAC3BC,MAAMT,EAAMS;CACd;AACF;AAACC,KA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AAAC,IAAAC,IAAAC,IAAAK,IAAAO,IAAA3B,IAAAiE,GAAA,CAAA5G,GAAA6G,MAAAC,GAAAxE,GAAA;CAAA;EAAAlB;EAAA;EAAA;CAAA;CAAA;EAAAE;EAAA;EAAA;CAAA;CAAA;EAAAC;EAAA;EAAA;CAAA;CAAA;EAAAC;EAAA;EAAA;CAAA;CAAA;EAAAC;EAAA;EAAA;CAAA;CAAA;EAAAC;EAAA;EAAA;CAAA;CAAA;EAAAC;EAAA;EAAA;CAAA;CAAA;EAAAC;EAAA;EAAA;CAAA;CAAA;EAAAC;EAAA;EAAA;CAAA;CAAA;EAAAC;EAAA;EAAA;CAAA;CAAA;EAAAC;EAAA;EAAA;CAAA;CAAA;EAAAC;EAAA;EAAA;CAAA;CAAA;EAAAC;EAAA;EAAA;CAAA;CAAA;EAAAC;EAAA;EAAA;CAAA;CAAA;EAAAC;EAAA;EAAA;CAAA;CAAA;EAAAC;EAAA;EAAA;CAAA;AAAA,GAAArC,IAAA,GAAA,KAAA,GArNiDtB,CAAY,GAAA6D,IAAAyE,IAAA,cAAAC,GAAA;CAAAxE,cAAA;EAAA,MAAAxC,CAAA,GAAA2D,EAAA,MAAA,UAC5C5E,CAAM,GAAA8H,EAAA;CAAA;AAAA,GAAAlD,EAAAoD,GAAA9G,IAAA,KAAA,CAAA,GAAA8G,GAAA"}
|
|
1
|
+
{"version":3,"file":"FileExplorerProvider.esm.js","names":["html","nothing","utils","WebComponent","provide","fileExplorerContext","customElement","property","state","styles","personIcon","friendsIcon","PERSON_ICON","FRIENDS_ICON","createFileExplorerContextValue","value","store","subjectUri","pane","soloPane","onBack","openPane","handleAccessClick","paneSupportsEditing","edit","_classDecs","_FileExplorerProvider","_FileExplorerProvider2","_A","WeakMap","_B","_C","_D","_E","_F","_G","_H","_I","_J","_K","_L","_M","_N","_O","_P","_ref","_contextDecs","attribute","_subjectUriDecs","_onBackDecs","_relevantPanesDecs","_paneDecs","_paneRenderOptionsDecs","_showHeaderDecs","_handleAccessClickDecs","_soloPaneDecs","_openPaneDecs","_menuItemsDecs","_isEditingDecs","_isDirtyDecs","_paneSupportsEditingDecs","_editDecs","_fileExplorerContextValueDecs","context","_FileExplorerProvider3","FileExplorerProvider","constructor","args","_classPrivateFieldInitSpec","_initProto","_init_context","undefined","_init_subjectUri","_init_onBack","_init_relevantPanes","_init_pane","_init_paneRenderOptions","_init_showHeader","_init_handleAccessClick","_init_soloPane","_init_openPane","_init_menuItems","_init_isEditing","_init_isDirty","_init_paneSupportsEditing","_defineProperty","sourceProvider","querySelector","beginEditing","_init_edit","onEdit","beginEditingInSourcePane","isDirty","updateDirtyState","dirty","refreshFileExplorerContextValue","_init_fileExplorerContextValue","session","_classPrivateFieldGet","v","_classPrivateFieldSet","relevantPanes","paneRenderOptions","showHeader","menuItems","isEditing","fileExplorerContextValue","openSelectedPane","name","getPaneIcon","subject","icon","getPaneItems","dom","Promise","all","map","label","iconSrc","AJARImage","setAttribute","action","refreshMenuItems","sym","willUpdate","changedProperties","Error","has","catch","error","console","warn","render","e","c","_initClass","_applyDecs","_Class","_identity","default","personIcon","friendsIcon","customElement","styles","FileExplorerProvider_styles_default","person_default","friends_default","customElement$1","_Class","_FileExplorerProvider3","_A","_B","_C","_D","_E","_F","_G","_H","_I","_J","_K","_L","_M","_N","_O","_P","_initProto","_initClass","_classDecs","_contextDecs","_init_context","_subjectUriDecs","_init_subjectUri","_onBackDecs","_init_onBack","_relevantPanesDecs","_init_relevantPanes","_paneDecs","_init_pane","_paneRenderOptionsDecs","_init_paneRenderOptions","_showHeaderDecs","_init_showHeader","_handleAccessClickDecs","_init_handleAccessClick","_soloPaneDecs","_init_soloPane","_openPaneDecs","_init_openPane","_menuItemsDecs","_init_menuItems","_isEditingDecs","_init_isEditing","_isDirtyDecs","_init_isDirty","_paneSupportsEditingDecs","_init_paneSupportsEditing","_editDecs","_init_edit","_fileExplorerContextValueDecs","_init_fileExplorerContextValue","_FileExplorerProvider2","_ref","_classPrivateFieldInitSpec","a","_checkPrivateRedeclaration","_classPrivateFieldSet","s","_assertClassBrand","r","_classPrivateFieldGet","_defineProperty","_toPropertyKey","t","_applyDecs","i","n","o","c","applyDec","m","h","y","v","g","b","u","w","S","A","d","p","_setFunctionName","P","j","D","I","F","l","f","N","_checkInRHS","_toPrimitive","e","_identity","PERSON_ICON","FRIENDS_ICON","createFileExplorerContextValue","value","_FileExplorerProvider","property","state","provide","fileExplorerContext","WebComponent","args","dirty","pane","subject","context","dom","relevantPanes","label","iconSrc","icon","utils","store","menuItems","changedProperties","error","nothing"],"sources":["../../../src/components/file-explorer-header/FileExplorerProvider.ts"],"sourcesContent":["import { html, nothing, type PropertyValues } from 'lit'\nimport type { NamedNode, LiveStore } from 'rdflib'\nimport { DataBrowserContext, type PaneDefinition } from 'pane-registry'\nimport { utils, WebComponent } from 'solid-ui'\nimport { provide } from '@lit/context'\nimport { fileExplorerContext, type FileExplorerContext, type FileExplorerEdit } from 'solid-ui'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport './FileExplorerHeader'\nimport styles from './FileExplorerProvider.styles.css'\nimport personIcon from '../../icons/person.svg'\nimport friendsIcon from '../../icons/friends.svg'\nimport '~icons/lucide/share-2'\n\nconst PERSON_ICON = personIcon\nconst FRIENDS_ICON = friendsIcon\n\nfunction createFileExplorerContextValue (value: {\n store: LiveStore | undefined\n subjectUri: string | undefined\n pane?: PaneDefinition\n soloPane?: boolean\n onBack?: () => void\n openPane?: (subject: NamedNode, paneName: string) => void\n handleAccessClick?: () => void\n paneSupportsEditing?: boolean\n edit?: {\n onEdit?: () => void\n isDirty?: boolean\n updateDirtyState?: (dirty: boolean) => void\n }\n}): FileExplorerContext {\n return {\n store: value.store as LiveStore,\n subjectUri: value.subjectUri,\n pane: value.pane,\n soloPane: value.soloPane,\n onBack: value.onBack,\n openPane: value.openPane,\n handleAccessClick: value.handleAccessClick,\n paneSupportsEditing: value.paneSupportsEditing,\n edit: value.edit\n }\n}\n@customElement('file-explorer-provider')\nexport default class FileExplorerProvider extends WebComponent {\n static styles = styles\n\n @property({ attribute: false })\n accessor context: DataBrowserContext | undefined = undefined\n\n @property({ attribute: false })\n accessor subjectUri: string | undefined = undefined\n\n @property({ attribute: false })\n accessor onBack: (() => void) | undefined = undefined\n\n @property({ attribute: false })\n accessor relevantPanes: PaneDefinition[] = []\n\n @property({ attribute: false })\n accessor pane: PaneDefinition | undefined = undefined\n\n @property({ attribute: false })\n accessor paneRenderOptions: Record<string, unknown> = {}\n\n @property({ attribute: false })\n accessor showHeader: boolean = true\n\n @property({ attribute: false })\n accessor handleAccessClick: (() => void) | undefined = undefined\n\n // TODO: Need to research this more, brought it over from manager.\n @property({ attribute: false })\n accessor soloPane: boolean | undefined = undefined\n\n @property({ attribute: false })\n accessor openPane: ((subject: NamedNode, paneName: string) => void) | undefined = undefined\n\n @state()\n accessor menuItems: Array<{ label: string, icon?: HTMLElement, action: (event: Event) => void }> = []\n\n @state()\n accessor isEditing: boolean = false\n\n @state()\n accessor isDirty: boolean = false\n\n @state()\n accessor paneSupportsEditing: boolean = false\n\n // TODO: For now this works, but check if there is a better way.\n // because this means file explorer will know about the pane.\n // what if other panes want to use this. If so maybe we should\n // add more to the context to capture the provider for the pane that\n // will be editing... anyway this shouldn't be just for source pane.\n private beginEditingInSourcePane = () => {\n const sourceProvider = this.querySelector('source-pane-source-provider') as {\n beginEditing?: () => void\n } | null\n\n sourceProvider?.beginEditing?.()\n }\n\n // TODO: same as below. on Edit should be something more generic\n @state()\n accessor edit: FileExplorerEdit = {\n onEdit: this.beginEditingInSourcePane,\n isDirty: false,\n updateDirtyState: (dirty: boolean) => {\n if (this.isDirty === dirty) return\n\n this.isDirty = dirty\n this.edit = {\n ...this.edit,\n isDirty: dirty\n }\n this.refreshFileExplorerContextValue()\n }\n }\n\n @provide({ context: fileExplorerContext })\n accessor fileExplorerContextValue: FileExplorerContext = createFileExplorerContextValue({\n store: this.context?.session.store as LiveStore,\n subjectUri: this.subjectUri,\n pane: this.pane,\n soloPane: this.soloPane,\n onBack: this.onBack,\n openPane: this.openPane,\n handleAccessClick: this.handleAccessClick,\n paneSupportsEditing: false,\n edit: this.edit\n })\n\n // Change the state for the pane so it can show the new icon.\n openSelectedPane (pane: PaneDefinition) {\n const store = this.context?.session.store as LiveStore\n if (!store || !this.subjectUri) return\n this.paneSupportsEditing = pane.name === 'source'\n this.pane = pane\n }\n\n private getPaneIcon (pane, subject, context) {\n if (!pane) return undefined\n\n const icon = typeof pane.icon === 'function'\n ? pane.icon(subject, context)\n : pane.icon\n return icon\n }\n\n private async getPaneItems (subject, context, relevantPanes) {\n const dom = context.dom\n const menuItems = await Promise.all(relevantPanes.map(async pane => {\n const label = pane.label(subject, context)\n\n let iconSrc = ''\n if (pane.name === 'profile') {\n iconSrc = PERSON_ICON\n } else if (pane.name === 'social') {\n iconSrc = FRIENDS_ICON\n } else {\n iconSrc = await this.getPaneIcon(pane, subject, context)\n }\n\n const icon = utils.AJARImage(iconSrc, label, label, dom)\n icon.setAttribute('slot', 'left-icon')\n\n return {\n label,\n icon,\n action: () => this.openPane?.(subject, pane.name)\n }\n }))\n return menuItems\n }\n\n private refreshFileExplorerContextValue () {\n this.fileExplorerContextValue = createFileExplorerContextValue({\n store: this.context?.session.store as LiveStore,\n subjectUri: this.subjectUri,\n pane: this.pane,\n soloPane: this.soloPane,\n onBack: this.onBack,\n openPane: this.openPane,\n handleAccessClick: this.handleAccessClick,\n paneSupportsEditing: this.paneSupportsEditing,\n edit: this.edit\n })\n }\n\n private async refreshMenuItems () {\n const store = this.context?.session.store as LiveStore\n if (!store || !this.subjectUri) return\n\n const subject = store.sym(this.subjectUri)\n const menuItems = await this.getPaneItems(subject, this.context as DataBrowserContext, this.relevantPanes)\n\n this.menuItems = menuItems\n }\n\n protected willUpdate (changedProperties: PropertyValues<this>) {\n super.willUpdate(changedProperties)\n const store = this.context?.session.store as LiveStore\n if (!store) {\n throw new Error('The element is missing the required `context.session.store` value. Ensure the `context` property is set.')\n }\n if (!this.subjectUri) {\n throw new Error('The element is missing the required `subjectUri` property.')\n }\n\n if (\n changedProperties.has('subjectUri') ||\n changedProperties.has('relevantPanes') ||\n changedProperties.has('context')\n ) {\n this.refreshMenuItems().catch(error => {\n console.warn('Failed to refresh menu items', error)\n })\n }\n\n if (changedProperties.has('pane') || changedProperties.has('subjectUri') || changedProperties.has('context')) {\n this.paneSupportsEditing = this.pane?.name === 'source'\n }\n\n if (\n changedProperties.has('context') ||\n changedProperties.has('subjectUri') ||\n changedProperties.has('pane') ||\n changedProperties.has('soloPane') ||\n changedProperties.has('onBack') ||\n changedProperties.has('openPane') ||\n changedProperties.has('handleAccessClick') ||\n changedProperties.has('pane') ||\n changedProperties.has('isDirty')\n ) {\n this.refreshFileExplorerContextValue()\n }\n }\n\n render () {\n const store = this.context?.session.store as LiveStore\n const subject = store.sym(this.subjectUri as string)\n return html`\n <div class=\"file-explorer-provider\">\n ${this.showHeader\n ? html`\n <file-explorer-header\n .paneIcon=${this.getPaneIcon(this.pane, subject, this.context as DataBrowserContext)}\n .menuItems=${this.menuItems}\n .paneSupportsEditing=${this.paneSupportsEditing}\n ></file-explorer-header>\n `\n : nothing}\n <slot class=\"pane\"></slot>\n </div>\n `\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAaA,IAAMY,KAAcF,GACdG,KAAeF;AAErB,SAASG,GAAgCC,GAcjB;CACtB,OAAO;EACLC,OAAOD,EAAMC;EACbC,YAAYF,EAAME;EAClBC,MAAMH,EAAMG;EACZC,UAAUJ,EAAMI;EAChBC,QAAQL,EAAMK;EACdC,UAAUN,EAAMM;EAChBC,mBAAmBP,EAAMO;EACzBC,qBAAqBR,EAAMQ;EAC3BC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AC,GAAAC,GAAAC,GAAAC,GAAAC,GAAAC,GAAAC,IAAAC,IAAAC,IAAAK,IAAAO,IAAA3B,IAAAiE,GAAA,CAAA5G,GAAA6G,MAAAC,GAAAxE,GAAA;CAAA;EAAAlB;EAAA;EAAA;CAAA;CAAA;EAAAE;EAAA;EAAA;CAAA;CAAA;EAAAC;EAAA;EAAA;CAAA;CAAA;EAAAC;EAAA;EAAA;CAAA;CAAA;EAAAC;EAAA;EAAA;CAAA;CAAA;EAAAC;EAAA;EAAA;CAAA;CAAA;EAAAC;EAAA;EAAA;CAAA;CAAA;EAAAC;EAAA;EAAA;CAAA;CAAA;EAAAC;EAAA;EAAA;CAAA;CAAA;EAAAC;EAAA;EAAA;CAAA;CAAA;EAAAC;EAAA;EAAA;CAAA;CAAA;EAAAC;EAAA;EAAA;CAAA;CAAA;EAAAC;EAAA;EAAA;CAAA;CAAA;EAAAC;EAAA;EAAA;CAAA;CAAA;EAAAC;EAAA;EAAA;CAAA;CAAA;EAAAC;EAAA;EAAA;CAAA;AAAA,GAAArC,IAAA,GAAA,KAAA,GArNiDtB,CAAY,GAAA6D,IAAAyE,IAAA,cAAAC,GAAA;CAAAxE,cAAA;EAAA,MAAAxC,CAAA,GAAA2D,EAAA,MAAA,UAC5C5E,CAAM,GAAA8H,EAAA;CAAA;AAAA,GAAAlD,EAAAoD,GAAA9G,IAAA,KAAA,CAAA,GAAA8G,GAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileExplorerProvider.styles.cjs.js","names":[],"sources":["../../../src/components/file-explorer-header/FileExplorerProvider.styles.css"],"sourcesContent":[":host {\n display: block;\n width: 100%;\n min-width: 0;\n\n .file-explorer-provider {\n display: flex;\n flex-direction: column;\n width: 100%;\n min-width: 0;\n }\n\n slot.pane {\n display: block;\n flex: 1 1 auto;\n width: 100%;\n min-width: 0;\n overflow: auto;\n }\n}\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"FileExplorerProvider.styles.cjs.js","names":["FileExplorerProvider_styles_default"],"sources":["../../../src/components/file-explorer-header/FileExplorerProvider.styles.css"],"sourcesContent":[":host {\n display: block;\n width: 100%;\n min-width: 0;\n\n .file-explorer-provider {\n display: flex;\n flex-direction: column;\n width: 100%;\n min-width: 0;\n }\n\n slot.pane {\n display: block;\n flex: 1 1 auto;\n width: 100%;\n min-width: 0;\n overflow: auto;\n }\n}\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileExplorerProvider.styles.esm.js","names":[],"sources":["../../../src/components/file-explorer-header/FileExplorerProvider.styles.css"],"sourcesContent":[":host {\n display: block;\n width: 100%;\n min-width: 0;\n\n .file-explorer-provider {\n display: flex;\n flex-direction: column;\n width: 100%;\n min-width: 0;\n }\n\n slot.pane {\n display: block;\n flex: 1 1 auto;\n width: 100%;\n min-width: 0;\n overflow: auto;\n }\n}\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"FileExplorerProvider.styles.esm.js","names":["FileExplorerProvider_styles_default"],"sources":["../../../src/components/file-explorer-header/FileExplorerProvider.styles.css"],"sourcesContent":[":host {\n display: block;\n width: 100%;\n min-width: 0;\n\n .file-explorer-provider {\n display: flex;\n flex-direction: column;\n width: 100%;\n min-width: 0;\n }\n\n slot.pane {\n display: block;\n flex: 1 1 auto;\n width: 100%;\n min-width: 0;\n overflow: auto;\n }\n}\n"],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require("./FileExplorerHeader.cjs.js"),require("./FileExplorerProvider.cjs.js");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/file-explorer-header/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AACpE,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,wBAAwB,CAAA"}
|
|
@@ -1,2 +1,10 @@
|
|
|
1
1
|
export type PaneIcon = string | Promise<string> | null | undefined;
|
|
2
|
+
export type FileExplorerResourceMetadata = {
|
|
3
|
+
contentType: string | undefined;
|
|
4
|
+
canEdit: boolean;
|
|
5
|
+
isPublic: boolean;
|
|
6
|
+
aclUri: string | undefined;
|
|
7
|
+
eTag: string | undefined;
|
|
8
|
+
modified: string | undefined;
|
|
9
|
+
};
|
|
2
10
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/file-explorer-header/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,GAAG,IAAI,GAAG,SAAS,CAAA"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/file-explorer-header/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,GAAG,IAAI,GAAG,SAAS,CAAA;AAElE,MAAM,MAAM,4BAA4B,GAAG;IACzC,WAAW,EAAE,MAAM,GAAG,SAAS,CAAA;IAC/B,OAAO,EAAE,OAAO,CAAA;IAChB,QAAQ,EAAE,OAAO,CAAA;IACjB,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,IAAI,EAAE,MAAM,GAAG,SAAS,CAAA;IACxB,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAA;CAC7B,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
require("../../_virtual/~icons/lucide/help-circle.cjs.js");const e=require("./Header.styles.cjs.js");let t=require("solid-ui"),n=require("lit"),r=require("lit
|
|
1
|
+
require("../../_virtual/~icons/lucide/help-circle.cjs.js");const e=require("./Header.styles.cjs.js");let t=require("solid-ui"),n=require("lit/decorators.js"),r=require("lit");require("solid-ui/components/button"),require("solid-ui/components/menu"),require("solid-ui/components/menu-item"),require("solid-ui/components/account"),require("solid-ui/components/solid-emblem");var i,a,o,s,c,l,u,d,f,p;function m(e,t,n){h(e,t),t.set(e,n)}function h(e,t){if(t.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function g(e,t,n){return e.set(v(e,t),n),n}function _(e,t){return e.get(v(e,t))}function v(e,t,n){if(typeof e==`function`?e===t:e.has(t))return arguments.length<3?t:n;throw TypeError(`Private element is not present on this object`)}function y(e,t,n){return(t=x(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function b(e,t,n,r,i,a){function o(e,t,n){return function(r,i){return n&&n(r),e[t].call(r,i)}}function s(e,t){for(var n=0;n<e.length;n++)e[n].call(t);return t}function c(e,t,n,r){if(typeof e!=`function`&&(r||e!==void 0))throw TypeError(t+` must `+(n||`be`)+` a function`+(r?``:` or undefined`));return e}function l(e,t,n,r,i,a,s,l,u,d,f,p,m){function h(e){if(!m(e))throw TypeError(`Attempted to access private element on non-instance`)}var g,_=t[0],v=t[3],y=!l;if(!y){n||Array.isArray(_)||(_=[_]);var b={},x=[],S=i===3?`get`:i===4||p?`set`:`value`;d?(f||p?b={get:C(function(){return v(this)},r,`get`),set:function(e){t[4](this,e)}}:b[S]=v,f||C(b[S],r,i===2?``:S)):f||(b=Object.getOwnPropertyDescriptor(e,r))}for(var w=e,T=_.length-1;T>=0;T-=n?2:1){var E=_[T],D=n?_[T-1]:void 0,O={},k={kind:[`field`,`accessor`,`method`,`getter`,`setter`,`class`][i],name:r,metadata:a,addInitializer:function(e,t){if(e.v)throw Error(`attempted to call addInitializer after decoration was finished`);c(t,`An initializer`,`be`,!0),s.push(t)}.bind(null,O)};try{if(y)(g=c(E.call(D,w,k),`class decorators`,`return`))&&(w=g);else{var A,j;k.static=u,k.private=d,d?i===2?A=function(e){return h(e),b.value}:(i<4&&(A=o(b,`get`,h)),i!==3&&(j=o(b,`set`,h))):(A=function(e){return e[r]},(i<2||i===4)&&(j=function(e,t){e[r]=t}));var M=k.access={has:d?m.bind():function(e){return r in e}};if(A&&(M.get=A),j&&(M.set=j),w=E.call(D,p?{get:b.get,set:b.set}:b[S],k),p){if(typeof w==`object`&&w)(g=c(w.get,`accessor.get`))&&(b.get=g),(g=c(w.set,`accessor.set`))&&(b.set=g),(g=c(w.init,`accessor.init`))&&x.push(g);else if(w!==void 0)throw TypeError(`accessor decorators must return an object with get, set, or init properties or void 0`)}else c(w,(f?`field`:`method`)+` decorators`,`return`)&&(f?x.push(w):b[S]=w)}}finally{O.v=!0}}return(f||p)&&l.push(function(e,t){for(var n=x.length-1;n>=0;n--)t=x[n].call(e,t);return t}),f||y||(d?p?l.push(o(b,`get`),o(b,`set`)):l.push(i===2?b[S]:o.call.bind(b[S])):Object.defineProperty(e,r,b)),w}function u(e,t){return Object.defineProperty(e,Symbol.metadata||Symbol.for(`Symbol.metadata`),{configurable:!0,enumerable:!0,value:t})}if(arguments.length>=6)var d=a[Symbol.metadata||Symbol.for(`Symbol.metadata`)];var f=Object.create(d??null),p=function(e,t,n,r){var i,a,o=[],c=function(t){return w(t)===e},u=new Map;function d(e){e&&o.push(s.bind(null,e))}for(var f=0;f<t.length;f++){var p=t[f];if(Array.isArray(p)){var m=p[1],h=p[2],g=p.length>3,_=16&m,v=!!(8&m),y=(m&=7)==0,b=h+`/`+v;if(!y&&!g){var S=u.get(b);if(!0===S||S===3&&m!==4||S===4&&m!==3)throw Error(`Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: `+h);u.set(b,!(m>2)||m)}l(v?e:e.prototype,p,_,g?`#`+h:x(h),m,r,v?a||=[]:i||=[],o,v,g,y,m===1,v&&g?c:n)}}return d(i),d(a),o}(e,t,i,f);return n.length||u(e,f),{e:p,get c(){var t=[];return n.length&&[u(l(e,[n],r,e.name,5,f,t),f),s.bind(null,t,e)]}}}function x(e){var t=S(e,`string`);return typeof t==`symbol`?t:t+``}function S(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function C(e,t,n){typeof t==`symbol`&&(t=(t=t.description)?`[`+t+`]`:``);try{Object.defineProperty(e,"name",{configurable:!0,value:n?n+` `+t:t})}catch{}return e}function w(e){if(Object(e)!==e)throw TypeError(`right-hand side of 'in' should be an object, got `+(e===null?`null`:typeof e));return e}function T(e){return e}l=[(0,t.customElement)(`solid-panes-header`)];var E;new(f=(o=new WeakMap,p=(u=(0,n.property)({type:Array}),`menuItems`),a=class extends t.WebComponent{constructor(...e){super(...e),m(this,o,(s(this),d(this,[])))}get[p](){return _(o,this)}set menuItems(e){g(o,this,e)}render(){return r.html`
|
|
2
2
|
<a href="/" class="logo">
|
|
3
3
|
<span class="sr-only">Home</span>
|
|
4
4
|
<solid-ui-solid-emblem></solid-ui-solid-emblem>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Header.cjs.js","names":["customElement","WebComponent","html","property","styles","_classDecs","_Header","_Header2","_A","WeakMap","_ref","_menuItemsDecs","type","Array","_Header3","Header","constructor","args","_classPrivateFieldInitSpec","_initProto","_init_menuItems","_classPrivateFieldGet","menuItems","v","_classPrivateFieldSet","render","e","c","_initClass","_applyDecs","_Class","_identity","_defineProperty","default"],"sources":["../../../src/components/header/Header.ts"],"sourcesContent":["import { customElement, WebComponent } from 'solid-ui'\nimport { html } from 'lit'\nimport { property } from 'lit/decorators.js'\nimport type { AccountMenuItem } from 'solid-ui/components/account'\n\nimport 'solid-ui/components/account'\nimport 'solid-ui/components/button'\nimport 'solid-ui/components/menu-item'\nimport 'solid-ui/components/menu'\nimport 'solid-ui/components/solid-emblem'\nimport '~icons/lucide/help-circle'\n\nimport styles from './Header.styles.css'\n\n@customElement('solid-panes-header')\nexport default class Header extends WebComponent {\n static styles = styles\n\n @property({ type: Array })\n accessor menuItems: AccountMenuItem[] = []\n\n render () {\n return html`\n <a href=\"/\" class=\"logo\">\n <span class=\"sr-only\">Home</span>\n <solid-ui-solid-emblem></solid-ui-solid-emblem>\n </a>\n <div class=\"spacer\"></div>\n <solid-ui-account .menuItems=${this.menuItems}></solid-ui-account>\n <span class=\"separator\"></span>\n <solid-ui-menu placement=\"bottom-end\" distance=\"5\">\n <solid-ui-button slot=\"trigger\" variant=\"ghost\" title=\"Open help\">\n <span class=\"sr-only\">Open help</span>\n <icon-lucide-help-circle slot=\"icon\"></icon-lucide-help-circle>\n </solid-ui-button>\n\n <solid-ui-menu-item href=\"https://solidos.github.io/userguide/\">User guide</solid-ui-menu-item>\n <solid-ui-menu-item href=\"https://github.com/solidos/solidos/issues\">Report a problem</solid-ui-menu-item>\n </solid-ui-menu>\n `\n }\n}\n"],"mappings":"i8IAYwCK,EAAA,EAAA,EAEvCL,EAAAA,cAAAA,CAAc,oBAAoB,CAAC,EAAA,IAAAM,EAAA,IAAAC,GAAAC,EAAA,IAAAC,QAAAC,GAAAC,GAAAA,EAIjCR,EAAAA,SAAAA,CAAS,CAAES,KAAMC,KAAM,CAAC,EAAC,aAAAC,EAJ5B,cACoCb,EAAAA,YAAa,CAAAe,YAAA,GAAAC,EAAA,CAAA,MAAA,GAAAA,CAAA,EAAAC,EAAA,KAAAV,GAAAW,EAAA,IAAA,EAAAC,EAAA,KAIP,CAAA,CAAE,EAAA,CAAA,CAAA,IAAAV,IAAA,CAAA,OAAAW,EAAAb,EAAA,IAAA,CAAA,CAAA,IAAjCc,UAASC,EAAA,CAAAC,EAAAhB,EAAA,KAAAe,CAAA,CAAA,CAElBE,QAAU,CACR,MAAOvB,GAAAA,IAAI;;;;;;uCAMwB,KAAKoB,UAAS;;;;;;;;;;;KAYnD,CACF,EAAC,CAAAI,EAAA,CAAAN,EAAAD,GAAAQ,EAAA,CAAArB,EAAAsB,IAAAC,EAAAf,EAAA,CAAA,CAAAH,EAAA,EAAA,WAAA,CAAA,EAAAN,EAAA,EAAA,IAAA,GA1BmCJ,EAAAA,YAAY,EAAAa,GAAAgB,EAAA,cAAAC,CAAA,CAAAf,aAAA,CAAA,MAAAV,CAAA,EAAA0B,EAAA,KAAA,SAC9B5B,EAAAA,OAAM,EAAAwB,EAAA,CAAA,CAAA,EAAAI,EAAAF,EAAAvB,EAAA,IAAA,EAAA,EAAAuB"}
|
|
1
|
+
{"version":3,"file":"Header.cjs.js","names":["customElement","WebComponent","html","property","styles","_classDecs","_Header","_Header2","_A","WeakMap","_ref","_menuItemsDecs","type","Array","_Header3","Header","constructor","args","_classPrivateFieldInitSpec","_initProto","_init_menuItems","_classPrivateFieldGet","menuItems","v","_classPrivateFieldSet","render","e","c","_initClass","_applyDecs","_Class","_identity","_defineProperty","default","customElement","property","WebComponent","styles","require_Header_styles","solid_ui","lit_decorators_js","lit","_Class","_Header3","_A","_initProto","_initClass","_classDecs","_menuItemsDecs","_init_menuItems","_Header2","_ref","_classPrivateFieldInitSpec","_checkPrivateRedeclaration","a","_classPrivateFieldSet","s","_assertClassBrand","r","_classPrivateFieldGet","_defineProperty","_toPropertyKey","t","_applyDecs","i","n","o","c","applyDec","m","h","y","v","g","b","u","w","S","A","d","f","p","_setFunctionName","P","j","D","E","I","O","k","F","l","N","_checkInRHS","_toPrimitive","e","_identity","_Header","args"],"sources":["../../../src/components/header/Header.ts"],"sourcesContent":["import { customElement, WebComponent } from 'solid-ui'\nimport { html } from 'lit'\nimport { property } from 'lit/decorators.js'\nimport type { AccountMenuItem } from 'solid-ui/components/account'\n\nimport 'solid-ui/components/account'\nimport 'solid-ui/components/button'\nimport 'solid-ui/components/menu-item'\nimport 'solid-ui/components/menu'\nimport 'solid-ui/components/solid-emblem'\nimport '~icons/lucide/help-circle'\n\nimport styles from './Header.styles.css'\n\n@customElement('solid-panes-header')\nexport default class Header extends WebComponent {\n static styles = styles\n\n @property({ type: Array })\n accessor menuItems: AccountMenuItem[] = []\n\n render () {\n return html`\n <a href=\"/\" class=\"logo\">\n <span class=\"sr-only\">Home</span>\n <solid-ui-solid-emblem></solid-ui-solid-emblem>\n </a>\n <div class=\"spacer\"></div>\n <solid-ui-account .menuItems=${this.menuItems}></solid-ui-account>\n <span class=\"separator\"></span>\n <solid-ui-menu placement=\"bottom-end\" distance=\"5\">\n <solid-ui-button slot=\"trigger\" variant=\"ghost\" title=\"Open help\">\n <span class=\"sr-only\">Open help</span>\n <icon-lucide-help-circle slot=\"icon\"></icon-lucide-help-circle>\n </solid-ui-button>\n\n <solid-ui-menu-item href=\"https://solidos.github.io/userguide/\">User guide</solid-ui-menu-item>\n <solid-ui-menu-item href=\"https://github.com/solidos/solidos/issues\">Report a problem</solid-ui-menu-item>\n </solid-ui-menu>\n `\n }\n}\n"],"mappings":"i8IAYwCK,EAAA,EAAA,EAEvCL,EAAAA,cAAAA,CAAc,oBAAoB,CAAC,EAAA,IAAAM,EAAA,IAAAC,GAAAC,EAAA,IAAAC,QAAAC,GAAAC,GAAAA,EAIjCR,EAAAA,SAAAA,CAAS,CAAES,KAAMC,KAAM,CAAC,EAAC,aAAAC,EAJ5B,cACoCb,EAAAA,YAAa,CAAAe,YAAA,GAAAC,EAAA,CAAA,MAAA,GAAAA,CAAA,EAAAC,EAAA,KAAAV,GAAAW,EAAA,IAAA,EAAAC,EAAA,KAIP,CAAA,CAAE,EAAA,CAAA,CAAA,IAAAV,IAAA,CAAA,OAAAW,EAAAb,EAAA,IAAA,CAAA,CAAA,IAAjCc,UAASC,EAAA,CAAAC,EAAAhB,EAAA,KAAAe,CAAA,CAAA,CAElBE,QAAU,CACR,MAAOvB,GAAAA,IAAI;;;;;;uCAMwB,KAAKoB,UAAS;;;;;;;;;;;KAYnD,CACF,EAAC,CAAAI,EAAA,CAAAN,EAAAD,GAAAQ,EAAA,CAAArB,EAAAsB,IAAAC,EAAAf,EAAA,CAAA,CAAAH,EAAA,EAAA,WAAA,CAAA,EAAAN,EAAA,EAAA,IAAA,GA1BmCJ,EAAAA,YAAY,EAAAa,GAAAgB,EAAA,cAAAC,CAAA,CAAAf,aAAA,CAAA,MAAAV,CAAA,EAAA0B,EAAA,KAAA,SAC9B5B,EAAAA,OAAM,EAAAwB,EAAA,CAAA,CAAA,EAAAI,EAAAF,EAAAvB,EAAA,IAAA,EAAA,EAAAuB"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "../../_virtual/~icons/lucide/help-circle.esm.js";
|
|
2
2
|
import e from "./Header.styles.esm.js";
|
|
3
3
|
import { WebComponent as t, customElement as n } from "solid-ui";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { property as r } from "lit/decorators.js";
|
|
5
|
+
import { html as i } from "lit";
|
|
6
6
|
import "solid-ui/components/button";
|
|
7
7
|
import "solid-ui/components/menu";
|
|
8
8
|
import "solid-ui/components/menu-item";
|
|
@@ -183,7 +183,7 @@ function E(e) {
|
|
|
183
183
|
}
|
|
184
184
|
u = [n("solid-panes-header")];
|
|
185
185
|
var D;
|
|
186
|
-
new (p = (s = /*#__PURE__*/ new WeakMap(), m = (d =
|
|
186
|
+
new (p = (s = /*#__PURE__*/ new WeakMap(), m = (d = r({ type: Array }), "menuItems"), o = class extends t {
|
|
187
187
|
constructor(...e) {
|
|
188
188
|
super(...e), h(this, s, (c(this), f(this, [])));
|
|
189
189
|
}
|
|
@@ -194,7 +194,7 @@ new (p = (s = /*#__PURE__*/ new WeakMap(), m = (d = i({ type: Array }), "menuIte
|
|
|
194
194
|
_(s, this, e);
|
|
195
195
|
}
|
|
196
196
|
render() {
|
|
197
|
-
return
|
|
197
|
+
return i`
|
|
198
198
|
<a href="/" class="logo">
|
|
199
199
|
<span class="sr-only">Home</span>
|
|
200
200
|
<solid-ui-solid-emblem></solid-ui-solid-emblem>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Header.esm.js","names":["customElement","WebComponent","html","property","styles","_classDecs","_Header","_Header2","_A","WeakMap","_ref","_menuItemsDecs","type","Array","_Header3","Header","constructor","args","_classPrivateFieldInitSpec","_initProto","_init_menuItems","_classPrivateFieldGet","menuItems","v","_classPrivateFieldSet","render","e","c","_initClass","_applyDecs","_Class","_identity","_defineProperty","default"],"sources":["../../../src/components/header/Header.ts"],"sourcesContent":["import { customElement, WebComponent } from 'solid-ui'\nimport { html } from 'lit'\nimport { property } from 'lit/decorators.js'\nimport type { AccountMenuItem } from 'solid-ui/components/account'\n\nimport 'solid-ui/components/account'\nimport 'solid-ui/components/button'\nimport 'solid-ui/components/menu-item'\nimport 'solid-ui/components/menu'\nimport 'solid-ui/components/solid-emblem'\nimport '~icons/lucide/help-circle'\n\nimport styles from './Header.styles.css'\n\n@customElement('solid-panes-header')\nexport default class Header extends WebComponent {\n static styles = styles\n\n @property({ type: Array })\n accessor menuItems: AccountMenuItem[] = []\n\n render () {\n return html`\n <a href=\"/\" class=\"logo\">\n <span class=\"sr-only\">Home</span>\n <solid-ui-solid-emblem></solid-ui-solid-emblem>\n </a>\n <div class=\"spacer\"></div>\n <solid-ui-account .menuItems=${this.menuItems}></solid-ui-account>\n <span class=\"separator\"></span>\n <solid-ui-menu placement=\"bottom-end\" distance=\"5\">\n <solid-ui-button slot=\"trigger\" variant=\"ghost\" title=\"Open help\">\n <span class=\"sr-only\">Open help</span>\n <icon-lucide-help-circle slot=\"icon\"></icon-lucide-help-circle>\n </solid-ui-button>\n\n <solid-ui-menu-item href=\"https://solidos.github.io/userguide/\">User guide</solid-ui-menu-item>\n <solid-ui-menu-item href=\"https://github.com/solidos/solidos/issues\">Report a problem</solid-ui-menu-item>\n </solid-ui-menu>\n `\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYwCK,IAAA,CAEvCL,EAAc,oBAAoB,CAAC;AAAA,IAAAM;AAAA,KAAAC,KAAAC,kBAAA,IAAAC,QAAA,GAAAC,KAAAC,IAIjCR,EAAS,EAAES,MAAMC,MAAM,CAAC,GAAC,cAAAC,IAJ5B,cACoCb,EAAa;CAAAe,YAAA,GAAAC,GAAA;EAAAC,AAAA,MAAA,GAAAD,CAAA,GAAAC,EAAA,MAAAV,IAAAW,EAAA,IAAA,GAAAC,EAAA,MAIP,CAAA,CAAE,EAAA;CAAA;CAAA,KAAAV,KAAA;EAAA,OAAAW,EAAAb,GAAA,IAAA;CAAA;CAAA,IAAjCc,UAASC,GAAA;EAAAC,EAAAhB,GAAA,MAAAe,CAAA;CAAA;CAElBE,SAAU;EACR,OAAOvB,CAAI;;;;;;uCAMwB,KAAKoB,UAAS;;;;;;;;;;;;CAYnD;AACF,GAAC,CAAAI,GAAA,CAAAN,GAAAD,IAAAQ,GAAA,CAAArB,GAAAsB,MAAAC,EAAAf,GAAA,CAAA;CAAAH;CAAA;CAAA;AAAA,CAAA,GAAAN,GAAA,GAAA,KAAA,GA1BmCJ,CAAY,GAAAa,IAAAgB,IAAA,cAAAC,EAAA;CAAAf,cAAA;EAAA,MAAAV,CAAA,GAAA0B,EAAA,MAAA,UAC9B5B,CAAM,GAAAwB,EAAA;CAAA;AAAA,GAAAI,EAAAF,GAAAvB,GAAA,KAAA,CAAA,GAAAuB,GAAA"}
|
|
1
|
+
{"version":3,"file":"Header.esm.js","names":["customElement","WebComponent","html","property","styles","_classDecs","_Header","_Header2","_A","WeakMap","_ref","_menuItemsDecs","type","Array","_Header3","Header","constructor","args","_classPrivateFieldInitSpec","_initProto","_init_menuItems","_classPrivateFieldGet","menuItems","v","_classPrivateFieldSet","render","e","c","_initClass","_applyDecs","_Class","_identity","_defineProperty","default","styles","Header_styles_default","_Class","_Header3","_A","_initProto","_initClass","_classDecs","_menuItemsDecs","_init_menuItems","_Header2","_ref","_classPrivateFieldInitSpec","a","_checkPrivateRedeclaration","_classPrivateFieldSet","s","_assertClassBrand","r","_classPrivateFieldGet","_defineProperty","_toPropertyKey","t","_applyDecs","i","n","o","c","applyDec","m","h","y","v","g","b","u","w","S","A","d","p","_setFunctionName","P","j","D","E","I","O","k","F","l","f","N","_checkInRHS","_toPrimitive","e","_identity","customElement","_Header","property","WebComponent","args"],"sources":["../../../src/components/header/Header.ts"],"sourcesContent":["import { customElement, WebComponent } from 'solid-ui'\nimport { html } from 'lit'\nimport { property } from 'lit/decorators.js'\nimport type { AccountMenuItem } from 'solid-ui/components/account'\n\nimport 'solid-ui/components/account'\nimport 'solid-ui/components/button'\nimport 'solid-ui/components/menu-item'\nimport 'solid-ui/components/menu'\nimport 'solid-ui/components/solid-emblem'\nimport '~icons/lucide/help-circle'\n\nimport styles from './Header.styles.css'\n\n@customElement('solid-panes-header')\nexport default class Header extends WebComponent {\n static styles = styles\n\n @property({ type: Array })\n accessor menuItems: AccountMenuItem[] = []\n\n render () {\n return html`\n <a href=\"/\" class=\"logo\">\n <span class=\"sr-only\">Home</span>\n <solid-ui-solid-emblem></solid-ui-solid-emblem>\n </a>\n <div class=\"spacer\"></div>\n <solid-ui-account .menuItems=${this.menuItems}></solid-ui-account>\n <span class=\"separator\"></span>\n <solid-ui-menu placement=\"bottom-end\" distance=\"5\">\n <solid-ui-button slot=\"trigger\" variant=\"ghost\" title=\"Open help\">\n <span class=\"sr-only\">Open help</span>\n <icon-lucide-help-circle slot=\"icon\"></icon-lucide-help-circle>\n </solid-ui-button>\n\n <solid-ui-menu-item href=\"https://solidos.github.io/userguide/\">User guide</solid-ui-menu-item>\n <solid-ui-menu-item href=\"https://github.com/solidos/solidos/issues\">Report a problem</solid-ui-menu-item>\n </solid-ui-menu>\n `\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYwCK,IAAA,CAEvCL,EAAc,oBAAoB,CAAC;AAAA,IAAAM;AAAA,KAAAC,KAAAC,kBAAA,IAAAC,QAAA,GAAAC,KAAAC,IAIjCR,EAAS,EAAES,MAAMC,MAAM,CAAC,GAAC,cAAAC,IAJ5B,cACoCb,EAAa;CAAAe,YAAA,GAAAC,GAAA;EAAAC,AAAA,MAAA,GAAAD,CAAA,GAAAC,EAAA,MAAAV,IAAAW,EAAA,IAAA,GAAAC,EAAA,MAIP,CAAA,CAAE,EAAA;CAAA;CAAA,KAAAV,KAAA;EAAA,OAAAW,EAAAb,GAAA,IAAA;CAAA;CAAA,IAAjCc,UAASC,GAAA;EAAAC,EAAAhB,GAAA,MAAAe,CAAA;CAAA;CAElBE,SAAU;EACR,OAAOvB,CAAI;;;;;;uCAMwB,KAAKoB,UAAS;;;;;;;;;;;;CAYnD;AACF,GAAC,CAAAI,GAAA,CAAAN,GAAAD,IAAAQ,GAAA,CAAArB,GAAAsB,MAAAC,EAAAf,GAAA,CAAA;CAAAH;CAAA;CAAA;AAAA,CAAA,GAAAN,GAAA,GAAA,KAAA,GA1BmCJ,CAAY,GAAAa,IAAAgB,IAAA,cAAAC,EAAA;CAAAf,cAAA;EAAA,MAAAV,CAAA,GAAA0B,EAAA,MAAA,UAC9B5B,CAAM,GAAAwB,EAAA;CAAA;AAAA,GAAAI,EAAAF,GAAAvB,GAAA,KAAA,CAAA,GAAAuB,GAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e=require("lit").css`:host{background:var(--solid-ui-color-slate-800);color:var(--solid-ui-color-white);flex-direction:row;justify-content:space-between;align-items:center;gap:10px;padding:7px 20px;display:flex}:host a.logo{height:40px}:host a.logo solid-ui-solid-emblem{height:100%}:host .spacer{flex:1}:host .separator{background:var(--solid-ui-color-body-grey);align-self:stretch;width:1px}@media (width<=48rem){:host a.logo,:host solid-ui-menu,:host .separator{display:none}}`;exports.default=e;
|
|
1
|
+
var e=require("lit").css`:host{box-sizing:border-box;background:var(--solid-ui-color-slate-800);color:var(--solid-ui-color-white);flex-direction:row;justify-content:space-between;align-items:center;gap:10px;padding:7px 20px;display:flex}:host a.logo{height:40px}:host a.logo solid-ui-solid-emblem{height:100%}:host .spacer{flex:1}:host .separator{background:var(--solid-ui-color-body-grey);align-self:stretch;width:1px}@media (width<=48rem){:host{padding:0 16px 10px}:host a.logo,:host solid-ui-menu,:host .separator{display:none}}`;exports.default=e;
|
|
2
2
|
//# sourceMappingURL=Header.styles.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Header.styles.cjs.js","names":[],"sources":["../../../src/components/header/Header.styles.css"],"sourcesContent":["@import \"solid-ui/breakpoints.css\";\n\n:host {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n background: var(--solid-ui-color-slate-800);\n color: var(--solid-ui-color-white);\n padding: 7px 20px;\n gap: 10px;\n\n a.logo {\n height: 40px;\n\n solid-ui-solid-emblem {\n height: 100%;\n }\n }\n\n .spacer {\n flex: 1;\n }\n\n .separator {\n background: var(--solid-ui-color-body-grey);\n width: 1px;\n align-self: stretch;\n }\n\n @media (--solid-ui-mobile) {\n a.logo,\n solid-ui-menu,\n .separator {\n display: none;\n }\n }\n}\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"Header.styles.cjs.js","names":["Header_styles_default"],"sources":["../../../src/components/header/Header.styles.css"],"sourcesContent":["@import \"solid-ui/breakpoints.css\";\n\n:host {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n box-sizing: border-box;\n background: var(--solid-ui-color-slate-800);\n color: var(--solid-ui-color-white);\n padding: 7px 20px;\n gap: 10px;\n\n a.logo {\n height: 40px;\n\n solid-ui-solid-emblem {\n height: 100%;\n }\n }\n\n .spacer {\n flex: 1;\n }\n\n .separator {\n background: var(--solid-ui-color-body-grey);\n width: 1px;\n align-self: stretch;\n }\n\n @media (--solid-ui-mobile) {\n padding: 0 16px 10px 16px;\n\n a.logo,\n solid-ui-menu,\n .separator {\n display: none;\n }\n }\n}\n"],"mappings":""}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { css as e } from "lit";
|
|
2
2
|
//#region src/components/header/Header.styles.css
|
|
3
|
-
var t = e`:host{background:var(--solid-ui-color-slate-800);color:var(--solid-ui-color-white);flex-direction:row;justify-content:space-between;align-items:center;gap:10px;padding:7px 20px;display:flex}:host a.logo{height:40px}:host a.logo solid-ui-solid-emblem{height:100%}:host .spacer{flex:1}:host .separator{background:var(--solid-ui-color-body-grey);align-self:stretch;width:1px}@media (width<=48rem){:host a.logo,:host solid-ui-menu,:host .separator{display:none}}`;
|
|
3
|
+
var t = e`:host{box-sizing:border-box;background:var(--solid-ui-color-slate-800);color:var(--solid-ui-color-white);flex-direction:row;justify-content:space-between;align-items:center;gap:10px;padding:7px 20px;display:flex}:host a.logo{height:40px}:host a.logo solid-ui-solid-emblem{height:100%}:host .spacer{flex:1}:host .separator{background:var(--solid-ui-color-body-grey);align-self:stretch;width:1px}@media (width<=48rem){:host{padding:0 16px 10px}:host a.logo,:host solid-ui-menu,:host .separator{display:none}}`;
|
|
4
4
|
//#endregion
|
|
5
5
|
export { t as default };
|
|
6
6
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Header.styles.esm.js","names":[],"sources":["../../../src/components/header/Header.styles.css"],"sourcesContent":["@import \"solid-ui/breakpoints.css\";\n\n:host {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n background: var(--solid-ui-color-slate-800);\n color: var(--solid-ui-color-white);\n padding: 7px 20px;\n gap: 10px;\n\n a.logo {\n height: 40px;\n\n solid-ui-solid-emblem {\n height: 100%;\n }\n }\n\n .spacer {\n flex: 1;\n }\n\n .separator {\n background: var(--solid-ui-color-body-grey);\n width: 1px;\n align-self: stretch;\n }\n\n @media (--solid-ui-mobile) {\n a.logo,\n solid-ui-menu,\n .separator {\n display: none;\n }\n }\n}\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"Header.styles.esm.js","names":["Header_styles_default"],"sources":["../../../src/components/header/Header.styles.css"],"sourcesContent":["@import \"solid-ui/breakpoints.css\";\n\n:host {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n box-sizing: border-box;\n background: var(--solid-ui-color-slate-800);\n color: var(--solid-ui-color-white);\n padding: 7px 20px;\n gap: 10px;\n\n a.logo {\n height: 40px;\n\n solid-ui-solid-emblem {\n height: 100%;\n }\n }\n\n .spacer {\n flex: 1;\n }\n\n .separator {\n background: var(--solid-ui-color-body-grey);\n width: 1px;\n align-self: stretch;\n }\n\n @media (--solid-ui-mobile) {\n padding: 0 16px 10px 16px;\n\n a.logo,\n solid-ui-menu,\n .separator {\n display: none;\n }\n }\n}\n"],"mappings":""}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
require("../../_virtual/~icons/lucide/help-circle.cjs.js");const e=require("./Navbar.styles.cjs.js");let t=require("solid-ui"),n=require("lit"),r=require("lit
|
|
1
|
+
require("../../_virtual/~icons/lucide/help-circle.cjs.js");const e=require("./Navbar.styles.cjs.js");let t=require("solid-ui"),n=require("lit/decorators.js"),r=require("lit");require("solid-ui/components/button"),require("solid-ui/components/menu"),require("solid-ui/components/menu-item"),require("solid-ui/components/account"),require("solid-ui/components/solid-emblem");var i,a,o,s,c,l,u,d,f,p;function m(e,t,n){h(e,t),t.set(e,n)}function h(e,t){if(t.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function g(e,t,n){return e.set(v(e,t),n),n}function _(e,t){return e.get(v(e,t))}function v(e,t,n){if(typeof e==`function`?e===t:e.has(t))return arguments.length<3?t:n;throw TypeError(`Private element is not present on this object`)}function y(e,t,n){return(t=x(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function b(e,t,n,r,i,a){function o(e,t,n){return function(r,i){return n&&n(r),e[t].call(r,i)}}function s(e,t){for(var n=0;n<e.length;n++)e[n].call(t);return t}function c(e,t,n,r){if(typeof e!=`function`&&(r||e!==void 0))throw TypeError(t+` must `+(n||`be`)+` a function`+(r?``:` or undefined`));return e}function l(e,t,n,r,i,a,s,l,u,d,f,p,m){function h(e){if(!m(e))throw TypeError(`Attempted to access private element on non-instance`)}var g,_=t[0],v=t[3],y=!l;if(!y){n||Array.isArray(_)||(_=[_]);var b={},x=[],S=i===3?`get`:i===4||p?`set`:`value`;d?(f||p?b={get:C(function(){return v(this)},r,`get`),set:function(e){t[4](this,e)}}:b[S]=v,f||C(b[S],r,i===2?``:S)):f||(b=Object.getOwnPropertyDescriptor(e,r))}for(var w=e,T=_.length-1;T>=0;T-=n?2:1){var E=_[T],D=n?_[T-1]:void 0,O={},k={kind:[`field`,`accessor`,`method`,`getter`,`setter`,`class`][i],name:r,metadata:a,addInitializer:function(e,t){if(e.v)throw Error(`attempted to call addInitializer after decoration was finished`);c(t,`An initializer`,`be`,!0),s.push(t)}.bind(null,O)};try{if(y)(g=c(E.call(D,w,k),`class decorators`,`return`))&&(w=g);else{var A,j;k.static=u,k.private=d,d?i===2?A=function(e){return h(e),b.value}:(i<4&&(A=o(b,`get`,h)),i!==3&&(j=o(b,`set`,h))):(A=function(e){return e[r]},(i<2||i===4)&&(j=function(e,t){e[r]=t}));var M=k.access={has:d?m.bind():function(e){return r in e}};if(A&&(M.get=A),j&&(M.set=j),w=E.call(D,p?{get:b.get,set:b.set}:b[S],k),p){if(typeof w==`object`&&w)(g=c(w.get,`accessor.get`))&&(b.get=g),(g=c(w.set,`accessor.set`))&&(b.set=g),(g=c(w.init,`accessor.init`))&&x.push(g);else if(w!==void 0)throw TypeError(`accessor decorators must return an object with get, set, or init properties or void 0`)}else c(w,(f?`field`:`method`)+` decorators`,`return`)&&(f?x.push(w):b[S]=w)}}finally{O.v=!0}}return(f||p)&&l.push(function(e,t){for(var n=x.length-1;n>=0;n--)t=x[n].call(e,t);return t}),f||y||(d?p?l.push(o(b,`get`),o(b,`set`)):l.push(i===2?b[S]:o.call.bind(b[S])):Object.defineProperty(e,r,b)),w}function u(e,t){return Object.defineProperty(e,Symbol.metadata||Symbol.for(`Symbol.metadata`),{configurable:!0,enumerable:!0,value:t})}if(arguments.length>=6)var d=a[Symbol.metadata||Symbol.for(`Symbol.metadata`)];var f=Object.create(d??null),p=function(e,t,n,r){var i,a,o=[],c=function(t){return w(t)===e},u=new Map;function d(e){e&&o.push(s.bind(null,e))}for(var f=0;f<t.length;f++){var p=t[f];if(Array.isArray(p)){var m=p[1],h=p[2],g=p.length>3,_=16&m,v=!!(8&m),y=(m&=7)==0,b=h+`/`+v;if(!y&&!g){var S=u.get(b);if(!0===S||S===3&&m!==4||S===4&&m!==3)throw Error(`Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: `+h);u.set(b,!(m>2)||m)}l(v?e:e.prototype,p,_,g?`#`+h:x(h),m,r,v?a||=[]:i||=[],o,v,g,y,m===1,v&&g?c:n)}}return d(i),d(a),o}(e,t,i,f);return n.length||u(e,f),{e:p,get c(){var t=[];return n.length&&[u(l(e,[n],r,e.name,5,f,t),f),s.bind(null,t,e)]}}}function x(e){var t=S(e,`string`);return typeof t==`symbol`?t:t+``}function S(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function C(e,t,n){typeof t==`symbol`&&(t=(t=t.description)?`[`+t+`]`:``);try{Object.defineProperty(e,"name",{configurable:!0,value:n?n+` `+t:t})}catch{}return e}function w(e){if(Object(e)!==e)throw TypeError(`right-hand side of 'in' should be an object, got `+(e===null?`null`:typeof e));return e}function T(e){return e}l=[(0,t.customElement)(`solid-panes-navbar`)];var E;new(f=(o=new WeakMap,p=(u=(0,n.property)({type:Array}),`navbarItems`),a=class extends t.WebComponent{constructor(...e){super(...e),m(this,o,(s(this),d(this,[])))}get[p](){return _(o,this)}set navbarItems(e){g(o,this,e)}selectItem(e){this.dispatchEvent(new CustomEvent(`solid-ui-select`,{detail:e,bubbles:!0,composed:!0,cancelable:!0}))}render(){return r.html`
|
|
2
2
|
<nav class="navbar">
|
|
3
|
-
${this.navbarItems.map(e=>
|
|
3
|
+
${this.navbarItems.map(e=>r.html`
|
|
4
4
|
<button
|
|
5
5
|
type="button"
|
|
6
6
|
class=${e.selected?`selected`:``}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Navbar.cjs.js","names":["customElement","WebComponent","html","property","styles","_classDecs","_Navbar","_Navbar2","_A","WeakMap","_ref","_navbarItemsDecs","type","Array","_Navbar3","Navbar","constructor","args","_classPrivateFieldInitSpec","_initProto","_init_navbarItems","_classPrivateFieldGet","navbarItems","v","_classPrivateFieldSet","selectItem","item","dispatchEvent","CustomEvent","detail","bubbles","composed","cancelable","render","map","menuItem","selected","label","e","c","_initClass","_applyDecs","_Class","_identity","_defineProperty","default"],"sources":["../../../src/components/navbar/Navbar.ts"],"sourcesContent":["import { customElement, WebComponent } from 'solid-ui'\nimport { html, TemplateResult } from 'lit'\nimport { property } from 'lit/decorators.js'\n\nimport 'solid-ui/components/account'\nimport 'solid-ui/components/button'\nimport 'solid-ui/components/menu-item'\nimport 'solid-ui/components/menu'\nimport 'solid-ui/components/solid-emblem'\nimport '~icons/lucide/help-circle'\n\nimport styles from './Navbar.styles.css'\n\nexport interface NavbarMenuItem {\n label: string | TemplateResult\n selected?: boolean\n onSelected?(): void | Promise<void>\n}\n\n@customElement('solid-panes-navbar')\nexport default class Navbar extends WebComponent {\n static styles = styles\n\n @property({ type: Array })\n accessor navbarItems: NavbarMenuItem[] = []\n\n private selectItem (item: NavbarMenuItem) {\n this.dispatchEvent(new CustomEvent('solid-ui-select', {\n detail: item,\n bubbles: true,\n composed: true,\n cancelable: true\n }))\n }\n\n render () {\n return html`\n <nav class=\"navbar\">\n ${this.navbarItems.map(menuItem => html`\n <button\n type=\"button\"\n class=${menuItem.selected ? 'selected' : ''}\n @click=${() => this.selectItem(menuItem)}\n title=${typeof menuItem.label === 'string' ? menuItem.label : ''}\n >\n ${menuItem.label}\n </button>\n `)}\n </nav>\n `\n }\n}\n"],"mappings":"i8IAWwCK,EAAA,EAAA,EAQvCL,EAAAA,cAAAA,CAAc,oBAAoB,CAAC,EAAA,IAAAM,EAAA,IAAAC,GAAAC,EAAA,IAAAC,QAAAC,GAAAC,GAAAA,EAIjCR,EAAAA,SAAAA,CAAS,CAAES,KAAMC,KAAM,CAAC,EAAC,eAAAC,EAJ5B,cACoCb,EAAAA,YAAa,CAAAe,YAAA,GAAAC,EAAA,CAAA,MAAA,GAAAA,CAAA,EAAAC,EAAA,KAAAV,GAAAW,EAAA,IAAA,EAAAC,EAAA,KAIN,CAAA,CAAE,EAAA,CAAA,CAAA,IAAAV,IAAA,CAAA,OAAAW,EAAAb,EAAA,IAAA,CAAA,CAAA,IAAlCc,YAAWC,EAAA,CAAAC,EAAAhB,EAAA,KAAAe,CAAA,CAAA,CAEZE,WAAYC,EAAsB,CACxC,KAAKC,cAAc,IAAIC,YAAY,kBAAmB,CACpDC,OAAQH,EACRI,QAAS,GACTC,SAAU,GACVC,WAAY,EACd,CAAC,CAAC,CACJ,CAEAC,QAAU,CACR,MAAO/B,GAAAA,IAAI;;SAEN,KAAKoB,YAAYY,IAAIC,GAAYjC,EAAAA,IAAI;;;kBAG5BiC,EAASC,SAAW,WAAa,GAAE;uBAC5B,KAAKX,WAAWU,CAAQ,EAAC;kBAChC,OAAOA,EAASE,OAAU,SAAWF,EAASE,MAAQ,GAAE;;YAE9DF,EAASE,MAAK;;OAEnB,EAAC;;KAGN,CACF,EAAC,CAAAC,EAAA,CAAAlB,EAAAD,GAAAoB,EAAA,CAAAjC,EAAAkC,IAAAC,EAAA3B,EAAA,CAAA,CAAAH,EAAA,EAAA,aAAA,CAAA,EAAAN,EAAA,EAAA,IAAA,GA/BmCJ,EAAAA,YAAY,EAAAa,GAAA4B,EAAA,cAAAC,CAAA,CAAA3B,aAAA,CAAA,MAAAV,CAAA,EAAAsC,EAAA,KAAA,SAC9BxC,EAAAA,OAAM,EAAAoC,EAAA,CAAA,CAAA,EAAAI,EAAAF,EAAAnC,EAAA,IAAA,EAAA,EAAAmC"}
|
|
1
|
+
{"version":3,"file":"Navbar.cjs.js","names":["customElement","WebComponent","html","property","styles","_classDecs","_Navbar","_Navbar2","_A","WeakMap","_ref","_navbarItemsDecs","type","Array","_Navbar3","Navbar","constructor","args","_classPrivateFieldInitSpec","_initProto","_init_navbarItems","_classPrivateFieldGet","navbarItems","v","_classPrivateFieldSet","selectItem","item","dispatchEvent","CustomEvent","detail","bubbles","composed","cancelable","render","map","menuItem","selected","label","e","c","_initClass","_applyDecs","_Class","_identity","_defineProperty","default","customElement","property","WebComponent","styles","require_Navbar_styles","solid_ui","lit_decorators_js","lit","_Class","_Navbar3","_A","_initProto","_initClass","_classDecs","_navbarItemsDecs","_init_navbarItems","_Navbar2","_ref","_classPrivateFieldInitSpec","_checkPrivateRedeclaration","a","_classPrivateFieldSet","s","_assertClassBrand","r","_classPrivateFieldGet","_defineProperty","_toPropertyKey","t","_applyDecs","i","n","o","c","applyDec","m","h","y","v","g","b","u","w","S","A","d","f","p","_setFunctionName","P","j","D","E","I","O","k","F","l","N","_checkInRHS","_toPrimitive","e","_identity","_Navbar","args","item","menuItem"],"sources":["../../../src/components/navbar/Navbar.ts"],"sourcesContent":["import { customElement, WebComponent } from 'solid-ui'\nimport { html, TemplateResult } from 'lit'\nimport { property } from 'lit/decorators.js'\n\nimport 'solid-ui/components/account'\nimport 'solid-ui/components/button'\nimport 'solid-ui/components/menu-item'\nimport 'solid-ui/components/menu'\nimport 'solid-ui/components/solid-emblem'\nimport '~icons/lucide/help-circle'\n\nimport styles from './Navbar.styles.css'\n\nexport interface NavbarMenuItem {\n label: string | TemplateResult\n selected?: boolean\n onSelected?(): void | Promise<void>\n}\n\n@customElement('solid-panes-navbar')\nexport default class Navbar extends WebComponent {\n static styles = styles\n\n @property({ type: Array })\n accessor navbarItems: NavbarMenuItem[] = []\n\n private selectItem (item: NavbarMenuItem) {\n this.dispatchEvent(new CustomEvent('solid-ui-select', {\n detail: item,\n bubbles: true,\n composed: true,\n cancelable: true\n }))\n }\n\n render () {\n return html`\n <nav class=\"navbar\">\n ${this.navbarItems.map(menuItem => html`\n <button\n type=\"button\"\n class=${menuItem.selected ? 'selected' : ''}\n @click=${() => this.selectItem(menuItem)}\n title=${typeof menuItem.label === 'string' ? menuItem.label : ''}\n >\n ${menuItem.label}\n </button>\n `)}\n </nav>\n `\n }\n}\n"],"mappings":"i8IAWwCK,EAAA,EAAA,EAQvCL,EAAAA,cAAAA,CAAc,oBAAoB,CAAC,EAAA,IAAAM,EAAA,IAAAC,GAAAC,EAAA,IAAAC,QAAAC,GAAAC,GAAAA,EAIjCR,EAAAA,SAAAA,CAAS,CAAES,KAAMC,KAAM,CAAC,EAAC,eAAAC,EAJ5B,cACoCb,EAAAA,YAAa,CAAAe,YAAA,GAAAC,EAAA,CAAA,MAAA,GAAAA,CAAA,EAAAC,EAAA,KAAAV,GAAAW,EAAA,IAAA,EAAAC,EAAA,KAIN,CAAA,CAAE,EAAA,CAAA,CAAA,IAAAV,IAAA,CAAA,OAAAW,EAAAb,EAAA,IAAA,CAAA,CAAA,IAAlCc,YAAWC,EAAA,CAAAC,EAAAhB,EAAA,KAAAe,CAAA,CAAA,CAEZE,WAAYC,EAAsB,CACxC,KAAKC,cAAc,IAAIC,YAAY,kBAAmB,CACpDC,OAAQH,EACRI,QAAS,GACTC,SAAU,GACVC,WAAY,EACd,CAAC,CAAC,CACJ,CAEAC,QAAU,CACR,MAAO/B,GAAAA,IAAI;;SAEN,KAAKoB,YAAYY,IAAIC,GAAYjC,EAAAA,IAAI;;;kBAG5BiC,EAASC,SAAW,WAAa,GAAE;uBAC5B,KAAKX,WAAWU,CAAQ,EAAC;kBAChC,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