solid-ui 5.0.2-5 → 5.0.2-7

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.
Files changed (173) hide show
  1. package/dist/chunks/{DialogProvider-CdesAsw-.js → DialogProvider-CcyasSmM.js} +3 -3
  2. package/dist/chunks/{DialogProvider-CdesAsw-.js.map → DialogProvider-CcyasSmM.js.map} +1 -1
  3. package/dist/chunks/{ResourceActionsMenu-Bx7YWY3E.js → ResourceActionsMenu-Dm1hvIj5.js} +57 -48
  4. package/dist/chunks/ResourceActionsMenu-Dm1hvIj5.js.map +1 -0
  5. package/dist/chunks/{access-control-modal-B1mFFIyz.js → access-control-modal-XJm3Czd5.js} +10 -10
  6. package/dist/chunks/{access-control-modal-B1mFFIyz.js.map → access-control-modal-XJm3Czd5.js.map} +1 -1
  7. package/dist/chunks/{account-DWmMJre6.js → account-BqJdA0tO.js} +10 -10
  8. package/dist/chunks/{account-DWmMJre6.js.map → account-BqJdA0tO.js.map} +1 -1
  9. package/dist/chunks/{auth-EK-iYNYZ.js → auth-CCrvazv_.js} +9 -9
  10. package/dist/chunks/{auth-EK-iYNYZ.js.map → auth-CCrvazv_.js.map} +1 -1
  11. package/dist/chunks/{avatar-BBgvMlqv.js → avatar-DHC_B7vJ.js} +3 -3
  12. package/dist/chunks/{avatar-BBgvMlqv.js.map → avatar-DHC_B7vJ.js.map} +1 -1
  13. package/dist/chunks/{button-D6qO2idW.js → button-DFgsOHBh.js} +2 -2
  14. package/dist/chunks/{button-D6qO2idW.js.map → button-DFgsOHBh.js.map} +1 -1
  15. package/dist/chunks/{chunk.UEBQI7VV-lcP-fpUk.js → chunk.UEBQI7VV-DVcxHNfV.js} +2 -2
  16. package/dist/chunks/{chunk.UEBQI7VV-lcP-fpUk.js.map → chunk.UEBQI7VV-DVcxHNfV.js.map} +1 -1
  17. package/dist/chunks/{combobox-DS6byaf1.js → combobox-CtFy7qwi.js} +3 -3
  18. package/dist/chunks/{combobox-DS6byaf1.js.map → combobox-CtFy7qwi.js.map} +1 -1
  19. package/dist/chunks/{combobox-option-DOtGuKel.js → combobox-option-B8b1khQy.js} +2 -2
  20. package/dist/chunks/{combobox-option-DOtGuKel.js.map → combobox-option-B8b1khQy.js.map} +1 -1
  21. package/dist/chunks/{components-C8c2Ucm5.js → components-CmnPlcEi.js} +2 -2
  22. package/dist/chunks/{components-C8c2Ucm5.js.map → components-CmnPlcEi.js.map} +1 -1
  23. package/dist/chunks/{context-BDrfQ9bN.js → context-Dr-MkMP6.js} +2 -2
  24. package/dist/chunks/{context-BDrfQ9bN.js.map → context-Dr-MkMP6.js.map} +1 -1
  25. package/dist/chunks/{dialog-CgYK767T.js → dialog-BY_pM7CM.js} +4 -4
  26. package/dist/chunks/{dialog-CgYK767T.js.map → dialog-BY_pM7CM.js.map} +1 -1
  27. package/dist/chunks/{dialog-content-DjwRH1ci.js → dialog-content-DfTs9gaK.js} +2 -2
  28. package/dist/chunks/{dialog-content-DjwRH1ci.js.map → dialog-content-DfTs9gaK.js.map} +1 -1
  29. package/dist/chunks/{dialog-footer-GQWi8lfB.js → dialog-footer-oZsrnodi.js} +2 -2
  30. package/dist/chunks/{dialog-footer-GQWi8lfB.js.map → dialog-footer-oZsrnodi.js.map} +1 -1
  31. package/dist/chunks/{dialog-header-c3qOMQfb.js → dialog-header-_6It5zCM.js} +2 -2
  32. package/dist/chunks/{dialog-header-c3qOMQfb.js.map → dialog-header-_6It5zCM.js.map} +1 -1
  33. package/dist/chunks/{dialogs-BmtLjMzg.js → dialogs-DP4-6e8A.js} +2 -2
  34. package/dist/chunks/{dialogs-BmtLjMzg.js.map → dialogs-DP4-6e8A.js.map} +1 -1
  35. package/dist/chunks/{dialogs-root-BNF3_SA8.js → dialogs-root-B-yfITRL.js} +3 -3
  36. package/dist/chunks/{dialogs-root-BNF3_SA8.js.map → dialogs-root-B-yfITRL.js.map} +1 -1
  37. package/dist/chunks/{error-state-jV9dlFX2.js → error-state-CaxNmA0L.js} +3 -3
  38. package/dist/chunks/{error-state-jV9dlFX2.js.map → error-state-CaxNmA0L.js.map} +1 -1
  39. package/dist/chunks/{file-explorer-header-Djp_eFuT.js → file-explorer-header-Bu06_N7G.js} +163 -135
  40. package/dist/chunks/file-explorer-header-Bu06_N7G.js.map +1 -0
  41. package/dist/chunks/{file-explorer-provider-DpjC7uds.js → file-explorer-provider-DqZDDpUX.js} +4 -4
  42. package/dist/chunks/{file-explorer-provider-DpjC7uds.js.map → file-explorer-provider-DqZDDpUX.js.map} +1 -1
  43. package/dist/chunks/{guard-SxVT1xr4.js → guard-R26Y08Rq.js} +3 -3
  44. package/dist/chunks/{guard-SxVT1xr4.js.map → guard-R26Y08Rq.js.map} +1 -1
  45. package/dist/chunks/{input-Bz3l514j.js → input-BlwhSsYC.js} +2 -2
  46. package/dist/chunks/{input-Bz3l514j.js.map → input-BlwhSsYC.js.map} +1 -1
  47. package/dist/chunks/{login-button-Dd0rwZJk.js → login-button-BZH27kcX.js} +4 -4
  48. package/dist/chunks/{login-button-Dd0rwZJk.js.map → login-button-BZH27kcX.js.map} +1 -1
  49. package/dist/chunks/{logout-button-Da34Lrnq.js → logout-button-CrTKHw_t.js} +4 -4
  50. package/dist/chunks/{logout-button-Da34Lrnq.js.map → logout-button-CrTKHw_t.js.map} +1 -1
  51. package/dist/chunks/{menu-BNJU654v.js → menu-clQ0N3ba.js} +3 -3
  52. package/dist/chunks/{menu-BNJU654v.js.map → menu-clQ0N3ba.js.map} +1 -1
  53. package/dist/chunks/{menu-item-nfPpH4dN.js → menu-item-DmQ4ZQQ2.js} +3 -3
  54. package/dist/chunks/menu-item-DmQ4ZQQ2.js.map +1 -0
  55. package/dist/chunks/{photo-capture-hJaJm4TM.js → photo-capture-KYEqSWFH.js} +4 -4
  56. package/dist/chunks/{photo-capture-hJaJm4TM.js.map → photo-capture-KYEqSWFH.js.map} +1 -1
  57. package/dist/chunks/{photo-capture-modal-BsHv6wmh.js → photo-capture-modal-YmzRHhUg.js} +6 -6
  58. package/dist/chunks/{photo-capture-modal-BsHv6wmh.js.map → photo-capture-modal-YmzRHhUg.js.map} +1 -1
  59. package/dist/chunks/{provide-z9U64q4m.js → provide-1sJJkgCO.js} +2 -2
  60. package/dist/chunks/{provide-z9U64q4m.js.map → provide-1sJJkgCO.js.map} +1 -1
  61. package/dist/chunks/{provider-B3FoP2qW.js → provider-DC-qEkao.js} +5 -5
  62. package/dist/chunks/{provider-B3FoP2qW.js.map → provider-DC-qEkao.js.map} +1 -1
  63. package/dist/chunks/{rdf-form-BkKDmFPD.js → rdf-form-BhevRpHy.js} +3 -3
  64. package/dist/chunks/{rdf-form-BkKDmFPD.js.map → rdf-form-BhevRpHy.js.map} +1 -1
  65. package/dist/chunks/{rdf-input-BPePtqfS.js → rdf-input-2s3O54hm.js} +3 -3
  66. package/dist/chunks/{rdf-input-BPePtqfS.js.map → rdf-input-2s3O54hm.js.map} +1 -1
  67. package/dist/chunks/{select-ClPkDkGl.js → select-DQtYJhLc.js} +2 -2
  68. package/dist/chunks/{select-ClPkDkGl.js.map → select-DQtYJhLc.js.map} +1 -1
  69. package/dist/chunks/{select-option-DQan7rcB.js → select-option-BdE45Q3h.js} +2 -2
  70. package/dist/chunks/{select-option-DQan7rcB.js.map → select-option-BdE45Q3h.js.map} +1 -1
  71. package/dist/chunks/{signup-button-DOInssOu.js → signup-button-yONuztWR.js} +4 -4
  72. package/dist/chunks/{signup-button-DOInssOu.js.map → signup-button-yONuztWR.js.map} +1 -1
  73. package/dist/chunks/{solid-emblem-DwLdkGuO.js → solid-emblem-Dc1cwhXb.js} +2 -2
  74. package/dist/chunks/{solid-emblem-DwLdkGuO.js.map → solid-emblem-Dc1cwhXb.js.map} +1 -1
  75. package/dist/chunks/square-arrow-out-up-right-DaALlpHo.js +9 -0
  76. package/dist/chunks/square-arrow-out-up-right-DaALlpHo.js.map +1 -0
  77. package/dist/chunks/{src-akaVfkuf.js → src-BUfVUeNt.js} +2949 -2932
  78. package/dist/chunks/src-BUfVUeNt.js.map +1 -0
  79. package/dist/chunks/{widgets-B1hBVhRL.js → widgets-C92ihtlF.js} +483 -487
  80. package/dist/chunks/widgets-C92ihtlF.js.map +1 -0
  81. package/dist/components/access-control-modal.js +1 -1
  82. package/dist/components/account.js +1 -1
  83. package/dist/components/avatar.js +1 -1
  84. package/dist/components/button.js +1 -1
  85. package/dist/components/combobox-option.js +1 -1
  86. package/dist/components/combobox.js +1 -1
  87. package/dist/components/dialog-content.js +1 -1
  88. package/dist/components/dialog-footer.js +1 -1
  89. package/dist/components/dialog-header.js +1 -1
  90. package/dist/components/dialog-provider.js +1 -1
  91. package/dist/components/dialog.js +1 -1
  92. package/dist/components/dialogs-root.js +1 -1
  93. package/dist/components/error-state.js +1 -1
  94. package/dist/components/file-explorer-header/FileExplorerHeader.cjs.js +3 -2
  95. package/dist/components/file-explorer-header/FileExplorerHeader.cjs.js.map +1 -1
  96. package/dist/components/file-explorer-header/FileExplorerHeader.d.ts +1 -0
  97. package/dist/components/file-explorer-header/FileExplorerHeader.d.ts.map +1 -1
  98. package/dist/components/file-explorer-header/FileExplorerHeader.esm.js +57 -45
  99. package/dist/components/file-explorer-header/FileExplorerHeader.esm.js.map +1 -1
  100. package/dist/components/file-explorer-header/FileExplorerHeaderControls.cjs.js +1 -1
  101. package/dist/components/file-explorer-header/FileExplorerHeaderControls.cjs.js.map +1 -1
  102. package/dist/components/file-explorer-header/FileExplorerHeaderControls.esm.js +5 -2
  103. package/dist/components/file-explorer-header/FileExplorerHeaderControls.esm.js.map +1 -1
  104. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.cjs.js +12 -10
  105. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.cjs.js.map +1 -1
  106. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.d.ts +1 -0
  107. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.d.ts.map +1 -1
  108. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.esm.js +72 -59
  109. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.esm.js.map +1 -1
  110. package/dist/components/file-explorer-header.js +1 -1
  111. package/dist/components/file-explorer-provider.js +1 -1
  112. package/dist/components/guard.js +1 -1
  113. package/dist/components/input.js +1 -1
  114. package/dist/components/login-button.js +1 -1
  115. package/dist/components/login-modal.js +1 -1
  116. package/dist/components/logout-button.js +1 -1
  117. package/dist/components/menu-item/MenuItem.styles.cjs.js +1 -1
  118. package/dist/components/menu-item/MenuItem.styles.cjs.js.map +1 -1
  119. package/dist/components/menu-item/MenuItem.styles.esm.js +1 -1
  120. package/dist/components/menu-item/MenuItem.styles.esm.js.map +1 -1
  121. package/dist/components/menu-item.js +1 -1
  122. package/dist/components/menu.js +1 -1
  123. package/dist/components/photo-capture-modal.js +1 -1
  124. package/dist/components/photo-capture.js +1 -1
  125. package/dist/components/provider.js +1 -1
  126. package/dist/components/rdf-form.js +1 -1
  127. package/dist/components/rdf-input.js +1 -1
  128. package/dist/components/resource-actions-menu/ResourceActionsMenu.cjs.js +7 -1
  129. package/dist/components/resource-actions-menu/ResourceActionsMenu.cjs.js.map +1 -1
  130. package/dist/components/resource-actions-menu/ResourceActionsMenu.d.ts +1 -0
  131. package/dist/components/resource-actions-menu/ResourceActionsMenu.d.ts.map +1 -1
  132. package/dist/components/resource-actions-menu/ResourceActionsMenu.esm.js +11 -2
  133. package/dist/components/resource-actions-menu/ResourceActionsMenu.esm.js.map +1 -1
  134. package/dist/components/resource-actions-menu.js +1 -1
  135. package/dist/components/select-option.js +1 -1
  136. package/dist/components/select.js +1 -1
  137. package/dist/components/signup-button.js +1 -1
  138. package/dist/components/solid-emblem.js +1 -1
  139. package/dist/components.js +30 -30
  140. package/dist/index.cjs.js +1 -1
  141. package/dist/index.cjs.js.map +1 -1
  142. package/dist/index.esm.js +4 -3
  143. package/dist/index.esm.js.map +1 -1
  144. package/dist/index.js +9 -9
  145. package/dist/lib/components/web-component/WebComponent.styles.cjs.js +1 -1
  146. package/dist/lib/components/web-component/WebComponent.styles.esm.js +1 -1
  147. package/dist/lib/file-explorer/compose-explorer.cjs.js +1 -1
  148. package/dist/lib/file-explorer/compose-explorer.cjs.js.map +1 -1
  149. package/dist/lib/file-explorer/compose-explorer.d.ts +1 -1
  150. package/dist/lib/file-explorer/compose-explorer.d.ts.map +1 -1
  151. package/dist/lib/file-explorer/compose-explorer.esm.js +1 -1
  152. package/dist/lib/file-explorer/compose-explorer.esm.js.map +1 -1
  153. package/dist/lib/file-explorer/index.cjs.js +1 -1
  154. package/dist/lib/file-explorer/index.d.ts +1 -0
  155. package/dist/lib/file-explorer/index.d.ts.map +1 -1
  156. package/dist/lib/file-explorer/index.esm.js +2 -1
  157. package/dist/lib/file-explorer/pane-menu-items.cjs.js +2 -0
  158. package/dist/lib/file-explorer/pane-menu-items.cjs.js.map +1 -0
  159. package/dist/lib/file-explorer/pane-menu-items.d.ts +22 -0
  160. package/dist/lib/file-explorer/pane-menu-items.d.ts.map +1 -0
  161. package/dist/lib/file-explorer/pane-menu-items.esm.js +20 -0
  162. package/dist/lib/file-explorer/pane-menu-items.esm.js.map +1 -0
  163. package/dist/loader.js +7 -7
  164. package/dist/solid-ui.js +72 -63
  165. package/dist/solid-ui.min.js +72 -63
  166. package/dist/solid-ui.min.js.map +1 -1
  167. package/dist/theme.css +1 -1
  168. package/package.json +1 -1
  169. package/dist/chunks/ResourceActionsMenu-Bx7YWY3E.js.map +0 -1
  170. package/dist/chunks/file-explorer-header-Djp_eFuT.js.map +0 -1
  171. package/dist/chunks/menu-item-nfPpH4dN.js.map +0 -1
  172. package/dist/chunks/src-akaVfkuf.js.map +0 -1
  173. package/dist/chunks/widgets-B1hBVhRL.js.map +0 -1
@@ -7,7 +7,7 @@ import "../../_virtual/~icons/lucide/pencil.esm.js";
7
7
  import n from "./FileExplorerHeaderControls.styles.esm.js";
8
8
  import "../resource-actions-menu/ResourceActionsMenu.esm.js";
9
9
  import { DEFAULT_FILE_EXPLORER_CONTEXT as r, fileExplorerContext as i } from "../../lib/file-explorer/context.esm.js";
10
- import { FILE_EXPLORER_MANAGE_ACCESS_EVENT as a } from "../../lib/file-explorer/events.esm.js";
10
+ import { FILE_EXPLORER_OPEN_PANE_EVENT as a } from "../../lib/file-explorer/events.esm.js";
11
11
  import { isContainerSubject as o } from "../../utils/podUtils.esm.js";
12
12
  import { consume as s } from "@lit/context";
13
13
  import { html as c, nothing as l } from "lit";
@@ -199,7 +199,10 @@ new (M = (m = /*#__PURE__*/ new WeakMap(), h = /*#__PURE__*/ new WeakMap(), g =
199
199
  e && this.dispatchEvent(new CustomEvent(a, {
200
200
  bubbles: !0,
201
201
  composed: !0,
202
- detail: { subjectUri: e }
202
+ detail: {
203
+ subjectUri: e,
204
+ paneName: "sharing"
205
+ }
203
206
  }));
204
207
  });
205
208
  }
@@ -1 +1 @@
1
- {"version":3,"file":"FileExplorerHeaderControls.esm.js","names":["customElement","WebComponent","property","state","consume","html","nothing","styles","DEFAULT_FILE_EXPLORER_CONTEXT","fileExplorerContext","FILE_EXPLORER_MANAGE_ACCESS_EVENT","isContainerSubject","_classDecs","_FileExplorerHeaderCo","_FileExplorerHeaderCo2","_A","WeakMap","_B","_C","_D","_E","_ref","_fileExplorerContextDecs","context","subscribe","_menuItemsDecs","attribute","_canEditDecs","type","Boolean","_canManageAccessDecs","_isMobileDecs","_FileExplorerHeaderControls","FileExplorerHeaderControls","constructor","args","_defineProperty","_initProto","event","isMobile","matches","_classPrivateFieldInitSpec","_init_fileExplorerContext","_init_menuItems","_init_canEdit","_init_canManageAccess","_init_isMobile","window","matchMedia","subjectUri","dispatchEvent","CustomEvent","bubbles","composed","detail","_classPrivateFieldGet","v","_classPrivateFieldSet","menuItems","canEdit","canManageAccess","connectedCallback","mobileMediaQuery","mobileQuery","addEventListener","handleMobileMediaChange","disconnectedCallback","removeEventListener","undefined","getEditTooltip","renderDirtyIndicator","isDirty","render","isContainerResource","store","supportsEditing","handleManageAccess","beginEditing","e","c","_initClass","_applyDecs","_Class","_identity","default","styles","WebComponent","FileExplorerHeaderControls_styles_default","_Class","_FileExplorerHeaderControls","_A","_B","_C","_D","_E","_initProto","_initClass","_classDecs","_fileExplorerContextDecs","_init_fileExplorerContext","_menuItemsDecs","_init_menuItems","_canEditDecs","_init_canEdit","_canManageAccessDecs","_init_canManageAccess","_isMobileDecs","_init_isMobile","_FileExplorerHeaderCo2","_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","customElement","_FileExplorerHeaderCo","consume","fileExplorerContext","property","state","args","event","DEFAULT_FILE_EXPLORER_CONTEXT","subjectUri","FILE_EXPLORER_MANAGE_ACCESS_EVENT","nothing","isContainerResource","isContainerSubject","supportsEditing"],"sources":["../../../src/components/file-explorer-header/FileExplorerHeaderControls.ts"],"sourcesContent":["import { customElement, WebComponent } from '@/lib/components'\nimport { property, state } from 'lit/decorators.js'\nimport { consume } from '@lit/context'\nimport { html, nothing } from 'lit'\nimport '@/components/button'\nimport '~icons/lucide/user-round-cog'\nimport '~icons/lucide/pencil'\nimport styles from './FileExplorerHeaderControls.styles.css'\nimport '@/components/resource-actions-menu/ResourceActionsMenu'\nimport { DEFAULT_FILE_EXPLORER_CONTEXT, fileExplorerContext } from '@/lib/file-explorer/context'\nimport { FILE_EXPLORER_MANAGE_ACCESS_EVENT } from '@/lib/file-explorer/events'\nimport { isContainerSubject } from '@/utils/podUtils'\n\n@customElement('solid-ui-file-explorer-header-controls')\nexport default class FileExplorerHeaderControls extends WebComponent {\n static styles = styles\n\n private mobileMediaQuery: MediaQueryList | undefined\n private readonly mobileQuery = '(max-width: 600px)'\n private readonly handleMobileMediaChange = (event: MediaQueryListEvent) => {\n this.isMobile = event.matches\n }\n\n @consume({ context: fileExplorerContext, subscribe: true })\n accessor fileExplorerContext = DEFAULT_FILE_EXPLORER_CONTEXT\n\n @property({ attribute: false })\n accessor menuItems: Array<{ label: string, action: (event: Event) => void, icon?: HTMLElement }> = []\n\n @property({ type: Boolean })\n accessor canEdit: boolean = false\n\n @property({ type: Boolean })\n accessor canManageAccess = false\n\n @state()\n accessor isMobile = typeof window !== 'undefined' && typeof window.matchMedia === 'function'\n ? window.matchMedia('(max-width: 600px)').matches\n : false\n\n connectedCallback () {\n super.connectedCallback()\n\n if (typeof window === 'undefined' || typeof window.matchMedia !== 'function') {\n return\n }\n\n this.mobileMediaQuery = window.matchMedia(this.mobileQuery)\n this.isMobile = this.mobileMediaQuery.matches\n this.mobileMediaQuery.addEventListener('change', this.handleMobileMediaChange)\n }\n\n disconnectedCallback () {\n this.mobileMediaQuery?.removeEventListener('change', this.handleMobileMediaChange)\n this.mobileMediaQuery = undefined\n super.disconnectedCallback()\n }\n\n // TODO: Add broken then use this function to set tooltip and disable edit button\n /* private setEditable() {\n const sourcePaneState = this.sourceContext?.sourcePaneState\n const { canEdit } = this.sourceContext?.headerMetadata ?? { canEdit: false }\n const subject = this.sourceContext?.subject\n if (!sourcePaneState || !canEdit || sourcePaneState.broken || (subject && subject.endsWith('/'))) return\n\n this.sourceContext?.setEditing?.()\n } */\n\n private getEditTooltip () {\n if (!this.canEdit) return 'No Access'\n return 'Edit'\n }\n\n private handleManageAccess = () => {\n const subjectUri = this.fileExplorerContext.subjectUri\n if (!subjectUri) return\n\n this.dispatchEvent(new CustomEvent(FILE_EXPLORER_MANAGE_ACCESS_EVENT, {\n bubbles: true,\n composed: true,\n detail: { subjectUri }\n }))\n }\n\n private renderDirtyIndicator () {\n if (!this.fileExplorerContext.isDirty) return nothing\n\n return html`<span class=\"dirtyIndicator\" title=\"This file has unsaved changes\">Unsaved</span>`\n }\n\n render () {\n const isContainerResource = isContainerSubject(this.fileExplorerContext.store, this.fileExplorerContext.subjectUri)\n const supportsEditing = this.fileExplorerContext.canEdit\n\n return html`\n <div>\n ${this.renderDirtyIndicator()}\n ${!isContainerResource && !this.isMobile && this.canManageAccess\n ? html`\n <solid-ui-button class=\"file-explorer-header-action-button\" variant=\"ghost\" title=\"Manage Access\" @click=${this.handleManageAccess}>\n <icon-lucide-user-round-cog slot=\"icon\"></icon-lucide-user-round-cog>\n <span class=\"sr-only\">Manage access</span>\n </solid-ui-button>\n ${supportsEditing\n ? html`\n <solid-ui-button\n class=\"file-explorer-header-action-button\"\n variant=\"ghost\"\n title=${this.getEditTooltip()}\n ?disabled=${!this.canEdit}\n @click=${this.fileExplorerContext.beginEditing}\n >\n <icon-lucide-pencil slot=\"icon\"></icon-lucide-pencil>\n <span class=\"sr-only\">Edit</span>\n </solid-ui-button>\n `\n : nothing}\n `\n : nothing}\n <solid-ui-resource-actions-menu\n .store=${this.fileExplorerContext.store}\n .handleAccessClick=${this.handleManageAccess}\n .handleEditingClick=${this.fileExplorerContext.beginEditing}\n .paneSupportsEditing=${this.fileExplorerContext.canEdit}\n .canEdit=${this.canEdit}\n .canManageAccess=${this.canManageAccess}\n .subjectUri=${this.fileExplorerContext.subjectUri}\n .menuItems=${this.menuItems}\n .isMobile=${this.isMobile}\n ></solid-ui-resource-actions-menu>\n </div>\n `\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWqDY,IAAA,CAEpDZ,EAAc,wCAAwC,CAAC;AAAA,IAAAa;AAAA,KAAAC,KAAAC,kBAAA,IAAAC,QAAA,GAAAC,kBAAA,IAAAD,QAAA,GAAAE,kBAAA,IAAAF,QAAA,GAAAG,kBAAA,IAAAH,QAAA,GAAAI,kBAAA,IAAAJ,QAAA,GAAAK,KAAAC,IAUrDlB,EAAQ;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vD,CAAI;yHACyG,KAAKuE,mBAAkB;;;;gBAIhID,IACEtE,CAAI;;;;8BAIQ,KAAKgE,eAAe,EAAC;kCACjB,CAAC,KAAKV,QAAO;+BAChB,KAAKlD,oBAAoBoE,aAAY;;;;;sBAMlDvE,EAAO;gBAEbA,EAAO;;mBAEA,KAAKG,oBAAoBiE,MAAK;+BAClB,KAAKE,mBAAkB;gCACtB,KAAKnE,oBAAoBoE,aAAY;iCACpC,KAAKpE,oBAAoBkD,QAAO;qBAC5C,KAAKA,QAAO;6BACJ,KAAKC,gBAAe;wBACzB,KAAKnD,oBAAoBwC,WAAU;uBACpC,KAAKS,UAAS;sBACf,KAAKnB,SAAQ;;;;CAIjC;AACF,GAAC,CAAAuC,GAAA,CAAApC,GAAAC,GAAAC,GAAAC,GAAAC,GAAAT,IAAA0C,GAAA,CAAAlE,GAAAmE,MAAAC,EAAAjD,GAAA;CAAA;EAAAV;EAAA;EAAA;CAAA;CAAA;EAAAG;EAAA;EAAA;CAAA;CAAA;EAAAE;EAAA;EAAA;CAAA;CAAA;EAAAG;EAAA;EAAA;CAAA;CAAA;EAAAC;EAAA;EAAA;CAAA;AAAA,GAAAnB,GAAA,GAAA,KAAA,GAvHuDX,CAAY,GAAA+B,IAAAkD,IAAA,cAAAC,EAAA;CAAAjD,cAAA;EAAA,MAAArB,CAAA,GAAAuB,EAAA,MAAA,UAClD7B,CAAM,GAAAyE,EAAA;CAAA;AAAA,GAAA5C,EAAA8C,GAAApE,GAAA,KAAA,CAAA,GAAAoE,GAAA"}
1
+ {"version":3,"file":"FileExplorerHeaderControls.esm.js","names":["customElement","WebComponent","property","state","consume","html","nothing","styles","DEFAULT_FILE_EXPLORER_CONTEXT","fileExplorerContext","FILE_EXPLORER_OPEN_PANE_EVENT","isContainerSubject","_classDecs","_FileExplorerHeaderCo","_FileExplorerHeaderCo2","_A","WeakMap","_B","_C","_D","_E","_ref","_fileExplorerContextDecs","context","subscribe","_menuItemsDecs","attribute","_canEditDecs","type","Boolean","_canManageAccessDecs","_isMobileDecs","_FileExplorerHeaderControls","FileExplorerHeaderControls","constructor","args","_defineProperty","_initProto","event","isMobile","matches","_classPrivateFieldInitSpec","_init_fileExplorerContext","_init_menuItems","_init_canEdit","_init_canManageAccess","_init_isMobile","window","matchMedia","subjectUri","dispatchEvent","CustomEvent","bubbles","composed","detail","paneName","_classPrivateFieldGet","v","_classPrivateFieldSet","menuItems","canEdit","canManageAccess","connectedCallback","mobileMediaQuery","mobileQuery","addEventListener","handleMobileMediaChange","disconnectedCallback","removeEventListener","undefined","getEditTooltip","renderDirtyIndicator","isDirty","render","isContainerResource","store","supportsEditing","handleManageAccess","beginEditing","e","c","_initClass","_applyDecs","_Class","_identity","default","styles","WebComponent","FileExplorerHeaderControls_styles_default","_Class","_FileExplorerHeaderControls","_A","_B","_C","_D","_E","_initProto","_initClass","_classDecs","_fileExplorerContextDecs","_init_fileExplorerContext","_menuItemsDecs","_init_menuItems","_canEditDecs","_init_canEdit","_canManageAccessDecs","_init_canManageAccess","_isMobileDecs","_init_isMobile","_FileExplorerHeaderCo2","_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","customElement","_FileExplorerHeaderCo","consume","fileExplorerContext","property","state","args","event","DEFAULT_FILE_EXPLORER_CONTEXT","subjectUri","FILE_EXPLORER_OPEN_PANE_EVENT","nothing","isContainerResource","isContainerSubject","supportsEditing"],"sources":["../../../src/components/file-explorer-header/FileExplorerHeaderControls.ts"],"sourcesContent":["import { customElement, WebComponent } from '@/lib/components'\nimport { property, state } from 'lit/decorators.js'\nimport { consume } from '@lit/context'\nimport { html, nothing } from 'lit'\nimport '@/components/button'\nimport '~icons/lucide/user-round-cog'\nimport '~icons/lucide/pencil'\nimport styles from './FileExplorerHeaderControls.styles.css'\nimport '@/components/resource-actions-menu/ResourceActionsMenu'\nimport { DEFAULT_FILE_EXPLORER_CONTEXT, fileExplorerContext } from '@/lib/file-explorer/context'\nimport { FILE_EXPLORER_OPEN_PANE_EVENT } from '@/lib/file-explorer/events'\nimport { isContainerSubject } from '@/utils/podUtils'\n\n@customElement('solid-ui-file-explorer-header-controls')\nexport default class FileExplorerHeaderControls extends WebComponent {\n static styles = styles\n\n private mobileMediaQuery: MediaQueryList | undefined\n private readonly mobileQuery = '(max-width: 600px)'\n private readonly handleMobileMediaChange = (event: MediaQueryListEvent) => {\n this.isMobile = event.matches\n }\n\n @consume({ context: fileExplorerContext, subscribe: true })\n accessor fileExplorerContext = DEFAULT_FILE_EXPLORER_CONTEXT\n\n @property({ attribute: false })\n accessor menuItems: Array<{ label: string, action: (event: Event) => void, icon?: HTMLElement }> = []\n\n @property({ type: Boolean })\n accessor canEdit: boolean = false\n\n @property({ type: Boolean })\n accessor canManageAccess = false\n\n @state()\n accessor isMobile = typeof window !== 'undefined' && typeof window.matchMedia === 'function'\n ? window.matchMedia('(max-width: 600px)').matches\n : false\n\n connectedCallback () {\n super.connectedCallback()\n\n if (typeof window === 'undefined' || typeof window.matchMedia !== 'function') {\n return\n }\n\n this.mobileMediaQuery = window.matchMedia(this.mobileQuery)\n this.isMobile = this.mobileMediaQuery.matches\n this.mobileMediaQuery.addEventListener('change', this.handleMobileMediaChange)\n }\n\n disconnectedCallback () {\n this.mobileMediaQuery?.removeEventListener('change', this.handleMobileMediaChange)\n this.mobileMediaQuery = undefined\n super.disconnectedCallback()\n }\n\n // TODO: Add broken then use this function to set tooltip and disable edit button\n /* private setEditable() {\n const sourcePaneState = this.sourceContext?.sourcePaneState\n const { canEdit } = this.sourceContext?.headerMetadata ?? { canEdit: false }\n const subject = this.sourceContext?.subject\n if (!sourcePaneState || !canEdit || sourcePaneState.broken || (subject && subject.endsWith('/'))) return\n\n this.sourceContext?.setEditing?.()\n } */\n\n private getEditTooltip () {\n if (!this.canEdit) return 'No Access'\n return 'Edit'\n }\n\n private handleManageAccess = () => {\n const subjectUri = this.fileExplorerContext.subjectUri\n if (!subjectUri) return\n\n this.dispatchEvent(new CustomEvent(FILE_EXPLORER_OPEN_PANE_EVENT, {\n bubbles: true,\n composed: true,\n detail: { subjectUri, paneName: 'sharing' }\n }))\n }\n\n private renderDirtyIndicator () {\n if (!this.fileExplorerContext.isDirty) return nothing\n\n return html`<span class=\"dirtyIndicator\" title=\"This file has unsaved changes\">Unsaved</span>`\n }\n\n render () {\n const isContainerResource = isContainerSubject(this.fileExplorerContext.store, this.fileExplorerContext.subjectUri)\n const supportsEditing = this.fileExplorerContext.canEdit\n\n return html`\n <div>\n ${this.renderDirtyIndicator()}\n ${!isContainerResource && !this.isMobile && this.canManageAccess\n ? html`\n <solid-ui-button class=\"file-explorer-header-action-button\" variant=\"ghost\" title=\"Manage Access\" @click=${this.handleManageAccess}>\n <icon-lucide-user-round-cog slot=\"icon\"></icon-lucide-user-round-cog>\n <span class=\"sr-only\">Manage access</span>\n </solid-ui-button>\n ${supportsEditing\n ? html`\n <solid-ui-button\n class=\"file-explorer-header-action-button\"\n variant=\"ghost\"\n title=${this.getEditTooltip()}\n ?disabled=${!this.canEdit}\n @click=${this.fileExplorerContext.beginEditing}\n >\n <icon-lucide-pencil slot=\"icon\"></icon-lucide-pencil>\n <span class=\"sr-only\">Edit</span>\n </solid-ui-button>\n `\n : nothing}\n `\n : nothing}\n <solid-ui-resource-actions-menu\n .store=${this.fileExplorerContext.store}\n .handleAccessClick=${this.handleManageAccess}\n .handleEditingClick=${this.fileExplorerContext.beginEditing}\n .paneSupportsEditing=${this.fileExplorerContext.canEdit}\n .canEdit=${this.canEdit}\n .canManageAccess=${this.canManageAccess}\n .subjectUri=${this.fileExplorerContext.subjectUri}\n .menuItems=${this.menuItems}\n .isMobile=${this.isMobile}\n ></solid-ui-resource-actions-menu>\n </div>\n `\n }\n}\n"],"mappings":";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AvHuDX,CAAY,GAAA+B,IAAAmD,IAAA,cAAAC,EAAA;CAAAlD,cAAA;EAAA,MAAArB,CAAA,GAAAuB,EAAA,MAAA,UAClD7B,CAAM,GAAA0E,EAAA;CAAA;AAAA,GAAA7C,EAAA+C,GAAArE,GAAA,KAAA,CAAA,GAAAqE,GAAA"}
@@ -1,4 +1,4 @@
1
- const e=require("../../utils/label.cjs.js");require("../../lib/components/index.cjs.js");const t=require("../../widgets/dragAndDrop.cjs.js");require("../../utils/index.cjs.js");const n=require("../../lib/components/decorators.cjs.js"),r=require("../../lib/components/web-component/WebComponent.cjs.js");require("../../widgets/index.cjs.js");const i=require("../../lib/file-explorer/context.cjs.js");require("../button/index.cjs.js"),require("../../_virtual/~icons/lucide/globe.cjs.js"),require("../../_virtual/~icons/lucide/lock-keyhole.cjs.js"),require("../../_virtual/~icons/lucide/arrow-left.cjs.js"),require("../../_virtual/~icons/lucide/folder.cjs.js");const a=require("./FileExplorerHeaderSummary.styles.cjs.js"),o=require("../../utils/podUtils.cjs.js");let s=require("rdflib"),c=require("@lit/context"),l=require("lit"),u=require("lit/decorators.js");var d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,k,A,j,M,N,P,F;function I(e,t,n){L(e,t),t.set(e,n)}function L(e,t){if(t.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function R(e,t,n){return e.set(B(e,t),n),n}function z(e,t){return e.get(B(e,t))}function B(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 V(e,t,n){return(t=U(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function H(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:G(function(){return v(this)},r,`get`),set:function(e){t[4](this,e)}}:b[S]=v,f||G(b[S],r,i===2?``:S)):f||(b=Object.getOwnPropertyDescriptor(e,r))}for(var C=e,w=_.length-1;w>=0;w-=n?2:1){var T=_[w],E=n?_[w-1]:void 0,D={},O={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,D)};try{if(y)(g=c(T.call(E,C,O),`class decorators`,`return`))&&(C=g);else{var k,A;O.static=u,O.private=d,d?i===2?k=function(e){return h(e),b.value}:(i<4&&(k=o(b,`get`,h)),i!==3&&(A=o(b,`set`,h))):(k=function(e){return e[r]},(i<2||i===4)&&(A=function(e,t){e[r]=t}));var j=O.access={has:d?m.bind():function(e){return r in e}};if(k&&(j.get=k),A&&(j.set=A),C=T.call(E,p?{get:b.get,set:b.set}:b[S],O),p){if(typeof C==`object`&&C)(g=c(C.get,`accessor.get`))&&(b.get=g),(g=c(C.set,`accessor.set`))&&(b.set=g),(g=c(C.init,`accessor.init`))&&x.push(g);else if(C!==void 0)throw TypeError(`accessor decorators must return an object with get, set, or init properties or void 0`)}else c(C,(f?`field`:`method`)+` decorators`,`return`)&&(f?x.push(C):b[S]=C)}}finally{D.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)),C}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 K(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 x=u.get(b);if(!0===x||x===3&&m!==4||x===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:U(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 U(e){var t=W(e,`string`);return typeof t==`symbol`?t:t+``}function W(e,t){if(typeof e!=`object`||!e)return e;var n;if(typeof Symbol<`u`&&(n=e[Symbol.toPrimitive])!==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 G(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 K(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 q(e){return e}x=[n.customElement(`solid-ui-file-explorer-header-summary`)];var J;new(P=(p=new WeakMap,m=new WeakMap,h=new WeakMap,g=new WeakMap,_=new WeakMap,v=new WeakMap,F=(S=(0,c.consume)({context:i.fileExplorerContext,subscribe:!0}),w=(0,u.property)({attribute:!1}),E=(0,u.property)({attribute:!1}),O=(0,u.property)({attribute:!1}),A=(0,u.state)(),M=(0,u.query)(`h1`),`_draggableSubjectUri`),f=class extends r.default{constructor(...e){super(...e),V(this,F,void y(this)),V(this,`_paneIconGeneration`,0),I(this,p,C(this,i.DEFAULT_FILE_EXPLORER_CONTEXT)),I(this,m,T(this)),I(this,h,D(this)),I(this,g,k(this,{modified:void 0,isPublic:!1})),I(this,_,j(this,void 0)),I(this,v,N(this,null))}get fileExplorerContext(){return z(p,this)}set fileExplorerContext(e){R(p,this,e)}get paneIcon(){return z(m,this)}set paneIcon(e){R(m,this,e)}get onBackClick(){return z(h,this)}set onBackClick(e){R(h,this,e)}get responseMetadata(){return z(g,this)}set responseMetadata(e){R(g,this,e)}get resolvedPaneIcon(){return z(_,this)}set resolvedPaneIcon(e){R(_,this,e)}get titleHeading(){return z(v,this)}set titleHeading(e){R(v,this,e)}formatModifiedDate(e){if(!e)return``;let t=new Date(e);if(Number.isNaN(t.getTime()))return e;let n=new Intl.DateTimeFormat(`en-GB`,{day:`2-digit`,month:`short`,year:`numeric`,hour:`2-digit`,minute:`2-digit`,hour12:!0}).formatToParts(t),r=e=>n.find(t=>t.type===e)?.value??``;return`${r(`day`)} ${r(`month`)}, ${r(`year`)} at ${r(`hour`)}:${r(`minute`)} ${r(`dayPeriod`).toUpperCase()}`}willUpdate(e){if(e.has(`paneIcon`)){let e=++this._paneIconGeneration;this.resolvedPaneIcon=void 0,this.resolvePaneIcon(this.paneIcon,e)}}updated(){this.titleHeading&&this.fileExplorerContext?.subjectUri&&this._draggableSubjectUri!==this.fileExplorerContext.subjectUri&&(t.makeDraggable(this.titleHeading,(0,s.sym)(this.fileExplorerContext.subjectUri)),this._draggableSubjectUri=this.fileExplorerContext.subjectUri)}async resolvePaneIcon(e,t){try{if(e==null)return;let n=await e;t===this._paneIconGeneration&&(this.resolvedPaneIcon=n??void 0)}catch(e){t===this._paneIconGeneration&&(this.resolvedPaneIcon=void 0,console.warn(`file-explorer-header-summary: failed to resolve pane icon`,e))}}renderContainerResourceHeader(e,t){let n=o.getContainerItemCount(this.fileExplorerContext?.store,this.fileExplorerContext?.subjectUri)??0;return l.html`
1
+ const e=require("../../utils/label.cjs.js");require("../../lib/components/index.cjs.js");const t=require("../../widgets/dragAndDrop.cjs.js");require("../../utils/index.cjs.js");const n=require("../../lib/components/decorators.cjs.js"),r=require("../../lib/components/web-component/WebComponent.cjs.js");require("../../widgets/index.cjs.js");const i=require("../../lib/file-explorer/context.cjs.js");require("../button/index.cjs.js"),require("../../_virtual/~icons/lucide/globe.cjs.js"),require("../../_virtual/~icons/lucide/lock-keyhole.cjs.js"),require("../../_virtual/~icons/lucide/arrow-left.cjs.js"),require("../../_virtual/~icons/lucide/folder.cjs.js");const a=require("./FileExplorerHeaderSummary.styles.cjs.js"),o=require("../../utils/podUtils.cjs.js");let s=require("rdflib"),c=require("@lit/context"),l=require("lit"),u=require("lit/decorators.js");var d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,k,A,j,M,N,P,F,I,L,R;function z(e,t,n){B(e,t),t.set(e,n)}function B(e,t){if(t.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function V(e,t,n){return e.set(U(e,t),n),n}function H(e,t){return e.get(U(e,t))}function U(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 W(e,t,n){return(t=K(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function G(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:J(function(){return v(this)},r,`get`),set:function(e){t[4](this,e)}}:b[S]=v,f||J(b[S],r,i===2?``:S)):f||(b=Object.getOwnPropertyDescriptor(e,r))}for(var C=e,w=_.length-1;w>=0;w-=n?2:1){var T=_[w],E=n?_[w-1]:void 0,D={},O={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,D)};try{if(y)(g=c(T.call(E,C,O),`class decorators`,`return`))&&(C=g);else{var k,A;O.static=u,O.private=d,d?i===2?k=function(e){return h(e),b.value}:(i<4&&(k=o(b,`get`,h)),i!==3&&(A=o(b,`set`,h))):(k=function(e){return e[r]},(i<2||i===4)&&(A=function(e,t){e[r]=t}));var j=O.access={has:d?m.bind():function(e){return r in e}};if(k&&(j.get=k),A&&(j.set=A),C=T.call(E,p?{get:b.get,set:b.set}:b[S],O),p){if(typeof C==`object`&&C)(g=c(C.get,`accessor.get`))&&(b.get=g),(g=c(C.set,`accessor.set`))&&(b.set=g),(g=c(C.init,`accessor.init`))&&x.push(g);else if(C!==void 0)throw TypeError(`accessor decorators must return an object with get, set, or init properties or void 0`)}else c(C,(f?`field`:`method`)+` decorators`,`return`)&&(f?x.push(C):b[S]=C)}}finally{D.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)),C}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 Y(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 x=u.get(b);if(!0===x||x===3&&m!==4||x===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:K(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 K(e){var t=q(e,`string`);return typeof t==`symbol`?t:t+``}function q(e,t){if(typeof e!=`object`||!e)return e;var n;if(typeof Symbol<`u`&&(n=e[Symbol.toPrimitive])!==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 J(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 Y(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 X(e){return e}S=[n.customElement(`solid-ui-file-explorer-header-summary`)];var Z;new(L=(p=new WeakMap,m=new WeakMap,h=new WeakMap,g=new WeakMap,_=new WeakMap,v=new WeakMap,y=new WeakMap,R=(C=(0,c.consume)({context:i.fileExplorerContext,subscribe:!0}),T=(0,u.property)({attribute:!1}),D=(0,u.property)({attribute:!1}),k=(0,u.property)({type:Boolean}),j=(0,u.property)({attribute:!1}),N=(0,u.state)(),F=(0,u.query)(`h1`),`_draggableSubjectUri`),f=class extends r.default{constructor(...e){super(...e),W(this,R,void b(this)),W(this,`_paneIconGeneration`,0),z(this,p,w(this,i.DEFAULT_FILE_EXPLORER_CONTEXT)),z(this,m,E(this)),z(this,h,O(this)),z(this,g,A(this,!0)),z(this,_,M(this,{modified:void 0,isPublic:!1})),z(this,v,P(this,void 0)),z(this,y,I(this,null))}get fileExplorerContext(){return H(p,this)}set fileExplorerContext(e){V(p,this,e)}get paneIcon(){return H(m,this)}set paneIcon(e){V(m,this,e)}get onBackClick(){return H(h,this)}set onBackClick(e){V(h,this,e)}get showBack(){return H(g,this)}set showBack(e){V(g,this,e)}get responseMetadata(){return H(_,this)}set responseMetadata(e){V(_,this,e)}get resolvedPaneIcon(){return H(v,this)}set resolvedPaneIcon(e){V(v,this,e)}get titleHeading(){return H(y,this)}set titleHeading(e){V(y,this,e)}formatModifiedDate(e){if(!e)return``;let t=new Date(e);if(Number.isNaN(t.getTime()))return e;let n=new Intl.DateTimeFormat(`en-GB`,{day:`2-digit`,month:`short`,year:`numeric`,hour:`2-digit`,minute:`2-digit`,hour12:!0}).formatToParts(t),r=e=>n.find(t=>t.type===e)?.value??``;return`${r(`day`)} ${r(`month`)}, ${r(`year`)} at ${r(`hour`)}:${r(`minute`)} ${r(`dayPeriod`).toUpperCase()}`}willUpdate(e){if(e.has(`paneIcon`)){let e=++this._paneIconGeneration;this.resolvedPaneIcon=void 0,this.resolvePaneIcon(this.paneIcon,e)}}updated(){this.titleHeading&&this.fileExplorerContext?.subjectUri&&this._draggableSubjectUri!==this.fileExplorerContext.subjectUri&&(t.makeDraggable(this.titleHeading,(0,s.sym)(this.fileExplorerContext.subjectUri)),this._draggableSubjectUri=this.fileExplorerContext.subjectUri)}async resolvePaneIcon(e,t){try{if(e==null)return;let n=await e;t===this._paneIconGeneration&&(this.resolvedPaneIcon=n??void 0)}catch(e){t===this._paneIconGeneration&&(this.resolvedPaneIcon=void 0,console.warn(`file-explorer-header-summary: failed to resolve pane icon`,e))}}renderContainerResourceHeader(e,t){let n=o.getContainerItemCount(this.fileExplorerContext?.store,this.fileExplorerContext?.subjectUri)??0;return l.html`
2
2
  <div class="container-info">
3
3
  <h1>
4
4
  <span>${e}</span>
@@ -17,19 +17,21 @@ const e=require("../../utils/label.cjs.js");require("../../lib/components/index.
17
17
  </div>
18
18
  `}render(){let t=this.fileExplorerContext?.subjectUri?(0,s.sym)(this.fileExplorerContext.subjectUri):void 0,n=t?e.label(t):``,r=this.responseMetadata.isPublic,i=o.isContainerSubject(this.fileExplorerContext?.store,this.fileExplorerContext?.subjectUri);return l.html`
19
19
  <div class="file-explorer-header-summary">
20
- <solid-ui-button
21
- variant="ghost"
22
- @click=${this.onBackClick}
23
- title="Back"
24
- >
25
- <icon-lucide-arrow-left></icon-lucide-arrow-left>
26
- <span class="sr-only">Back</span>
27
- </solid-ui-button>
20
+ ${this.showBack?l.html`
21
+ <solid-ui-button
22
+ variant="ghost"
23
+ @click=${this.onBackClick}
24
+ title="Back"
25
+ >
26
+ <icon-lucide-arrow-left></icon-lucide-arrow-left>
27
+ <span class="sr-only">Back</span>
28
+ </solid-ui-button>
29
+ `:``}
28
30
  <span class="pane-icon">
29
31
  ${this.resolvedPaneIcon?l.html`<img src=${this.resolvedPaneIcon} alt="" />`:``}
30
32
  </span>
31
33
  ${i?this.renderContainerResourceHeader(n,r):this.renderResourceHeader(n,r)}
32
34
  </div>
33
35
  </div>
34
- `}},{e:[C,T,D,k,j,N,y],c:[J,b]}=H(f,[[S,1,`fileExplorerContext`],[w,1,`paneIcon`],[E,1,`onBackClick`],[O,1,`responseMetadata`],[A,1,`resolvedPaneIcon`],[M,1,`titleHeading`]],x,0,void 0,r.default),f),d=class extends q{constructor(){super(J),V(this,`styles`,a.default),b()}},V(d,P,void 0),d),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return J}});
36
+ `}},{e:[w,E,O,A,M,P,I,b],c:[Z,x]}=G(f,[[C,1,`fileExplorerContext`],[T,1,`paneIcon`],[D,1,`onBackClick`],[k,1,`showBack`],[j,1,`responseMetadata`],[N,1,`resolvedPaneIcon`],[F,1,`titleHeading`]],S,0,void 0,r.default),f),d=class extends X{constructor(){super(Z),W(this,`styles`,a.default),x()}},W(d,L,void 0),d),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return Z}});
35
37
  //# sourceMappingURL=FileExplorerHeaderSummary.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FileExplorerHeaderSummary.cjs.js","names":["sym","customElement","WebComponent","utils","widgets","DEFAULT_FILE_EXPLORER_CONTEXT","fileExplorerContext","property","query","state","html","consume","styles","getContainerItemCount","isContainerSubject","_classDecs","_FileExplorerHeaderSu","_FileExplorerHeaderSu2","_A","WeakMap","_B","_C","_D","_E","_F","_ref","_fileExplorerContextDecs","context","subscribe","_paneIconDecs","attribute","_onBackClickDecs","_responseMetadataDecs","_resolvedPaneIconDecs","_titleHeadingDecs","_FileExplorerHeaderSummary","FileExplorerHeaderSummary","constructor","args","_defineProperty","_initProto","_classPrivateFieldInitSpec","_init_fileExplorerContext","_init_paneIcon","_init_onBackClick","_init_responseMetadata","modified","undefined","isPublic","_init_resolvedPaneIcon","_init_titleHeading","_classPrivateFieldGet","v","_classPrivateFieldSet","paneIcon","onBackClick","responseMetadata","resolvedPaneIcon","titleHeading","formatModifiedDate","date","Date","Number","isNaN","getTime","parts","Intl","DateTimeFormat","day","month","year","hour","minute","hour12","formatToParts","getPart","type","find","part","value","dayPeriod","toUpperCase","willUpdate","changedProperties","has","generation","_paneIconGeneration","resolvePaneIcon","updated","subjectUri","_draggableSubjectUri","makeDraggable","icon","error","console","warn","renderContainerResourceHeader","label","itemCount","store","renderResourceHeader","render","subject","isContainerResource","e","c","_initClass","_applyDecs","_Class","_identity","default","customElement","consume","fileExplorerContext","property","state","query","WebComponent","DEFAULT_FILE_EXPLORER_CONTEXT","sym","getContainerItemCount","label","isContainerSubject","styles","require_label","require_dragAndDrop","require_decorators","require_WebComponent","require_context","require_FileExplorerHeaderSummary_styles","require_podUtils","rdflib","_lit_context","lit","lit_decorators_js","_Class","_FileExplorerHeaderSummary","_A","_B","_C","_D","_E","_F","_initProto","_initClass","_classDecs","_fileExplorerContextDecs","_init_fileExplorerContext","_paneIconDecs","_init_paneIcon","_onBackClickDecs","_init_onBackClick","_responseMetadataDecs","_init_responseMetadata","_resolvedPaneIconDecs","_init_resolvedPaneIcon","_titleHeadingDecs","_init_titleHeading","_FileExplorerHeaderSu2","_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","_FileExplorerHeaderSu","args","modified","date","parts","getPart","part","type","changedProperties","generation","paneIcon","icon","error","itemCount","label","isPublic","subject","label$1","isContainerResource"],"sources":["../../../src/components/file-explorer-header/FileExplorerHeaderSummary.ts"],"sourcesContent":["import { sym } from 'rdflib'\nimport { customElement, WebComponent } from '@/lib/components'\nimport * as utils from '@/utils'\nimport * as widgets from '@/widgets/index'\nimport { DEFAULT_FILE_EXPLORER_CONTEXT, fileExplorerContext } from '@/lib/file-explorer/context'\nimport '@/components/button'\nimport { property, query, state } from 'lit/decorators.js'\nimport type { PropertyValues } from 'lit'\nimport { html } from 'lit'\nimport { consume } from '@lit/context'\nimport { PaneIcon } from './types'\nimport '~icons/lucide/globe'\nimport '~icons/lucide/lock-keyhole'\nimport '~icons/lucide/arrow-left'\nimport '~icons/lucide/folder'\nimport styles from './FileExplorerHeaderSummary.styles.css'\nimport { getContainerItemCount, isContainerSubject } from '@/utils/podUtils'\nimport type { FileExplorerResourceMetadata } from './types'\n\n@customElement('solid-ui-file-explorer-header-summary')\nexport default class FileExplorerHeaderSummary extends WebComponent {\n static styles = styles\n\n private _draggableSubjectUri: string | undefined\n private _paneIconGeneration = 0\n\n @consume({ context: fileExplorerContext, subscribe: true })\n accessor fileExplorerContext = DEFAULT_FILE_EXPLORER_CONTEXT\n\n @property({ attribute: false })\n accessor paneIcon: PaneIcon | undefined\n\n @property({ attribute: false })\n accessor onBackClick: (() => void) | undefined\n\n @property({ attribute: false })\n accessor responseMetadata: Pick<FileExplorerResourceMetadata, 'modified' | 'isPublic'> = {\n modified: undefined,\n isPublic: false\n }\n\n @state()\n accessor resolvedPaneIcon: string | undefined = undefined\n\n @query('h1')\n private accessor titleHeading: HTMLHeadingElement | null = null\n\n private formatModifiedDate (modified: string | undefined) {\n if (!modified) return ''\n\n const date = new Date(modified)\n if (Number.isNaN(date.getTime())) return modified\n\n const parts = new Intl.DateTimeFormat('en-GB', {\n day: '2-digit',\n month: 'short',\n year: 'numeric',\n hour: '2-digit',\n minute: '2-digit',\n hour12: true\n }).formatToParts(date)\n\n const getPart = (type: Intl.DateTimeFormatPartTypes) => parts.find(part => part.type === type)?.value ?? ''\n const day = getPart('day')\n const month = getPart('month')\n const year = getPart('year')\n const hour = getPart('hour')\n const minute = getPart('minute')\n const dayPeriod = getPart('dayPeriod').toUpperCase()\n\n return `${day} ${month}, ${year} at ${hour}:${minute} ${dayPeriod}`\n }\n\n protected willUpdate (changedProperties: PropertyValues<this>) {\n if (changedProperties.has('paneIcon')) {\n const generation = ++this._paneIconGeneration\n this.resolvedPaneIcon = undefined\n this.resolvePaneIcon(this.paneIcon, generation)\n }\n }\n\n protected updated () {\n if (!this.titleHeading || !this.fileExplorerContext?.subjectUri || this._draggableSubjectUri === this.fileExplorerContext.subjectUri) return\n\n widgets.makeDraggable(this.titleHeading, sym(this.fileExplorerContext.subjectUri)) // doing it this way for now, just to keep the same functionality\n this._draggableSubjectUri = this.fileExplorerContext.subjectUri\n }\n\n // Needed because humanReadable pane can return a promise for an icon.\n private async resolvePaneIcon (paneIcon: PaneIcon | undefined, generation: number) {\n try {\n if (paneIcon == null) return\n\n const icon = await paneIcon\n if (generation === this._paneIconGeneration) {\n this.resolvedPaneIcon = icon ?? undefined\n }\n } catch (error) {\n if (generation === this._paneIconGeneration) {\n this.resolvedPaneIcon = undefined\n console.warn('file-explorer-header-summary: failed to resolve pane icon', error)\n }\n }\n }\n\n private renderContainerResourceHeader (label: string, isPublic: boolean) {\n const itemCount = getContainerItemCount(this.fileExplorerContext?.store, this.fileExplorerContext?.subjectUri) ?? 0\n return html`\n <div class=\"container-info\">\n <h1>\n <span>${label}</span>\n </h1>\n <p>\n ${itemCount} items\n ${isPublic\n ? html`<span class=\"public\"><icon-lucide-globe aria-hidden=\"true\"></icon-lucide-globe><span class=\"sr-only\">Public</span></span>`\n : html`<span class=\"private\"><icon-lucide-lock-keyhole aria-hidden=\"true\"></icon-lucide-lock-keyhole><span class=\"sr-only\">Private</span></span>`}\n </p>\n </div>\n `\n }\n\n private renderResourceHeader (label: string, isPublic: boolean) {\n const modified = this.formatModifiedDate(this.responseMetadata.modified)\n\n return html`\n <div class=\"resource-info\">\n <h1>\n <span>${label}</span>\n </h1>\n <p><span class=\"resource-date\">${modified}</span> ${isPublic ? html`<span class=\"public\"><icon-lucide-globe></icon-lucide-globe> Public</span>` : html`<span class=\"private\"><icon-lucide-lock-keyhole></icon-lucide-lock-keyhole> Private</span>`}</p>\n </div>\n `\n }\n\n render () {\n const subject = this.fileExplorerContext?.subjectUri ? sym(this.fileExplorerContext.subjectUri) : undefined\n const label = subject ? utils.label(subject) : ''\n const isPublic = this.responseMetadata.isPublic\n const isContainerResource = isContainerSubject(this.fileExplorerContext?.store, this.fileExplorerContext?.subjectUri)\n\n return html`\n <div class=\"file-explorer-header-summary\">\n <solid-ui-button\n variant=\"ghost\"\n @click=${this.onBackClick}\n title=\"Back\"\n >\n <icon-lucide-arrow-left></icon-lucide-arrow-left>\n <span class=\"sr-only\">Back</span>\n </solid-ui-button>\n <span class=\"pane-icon\">\n ${this.resolvedPaneIcon ? html`<img src=${this.resolvedPaneIcon} alt=\"\" />` : ''}\n </span>\n ${isContainerResource ? this.renderContainerResourceHeader(label, isPublic) : this.renderResourceHeader(label, isPublic)}\n </div>\n </div>\n `\n }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ileExplorerHeaderSummary.cjs.js","names":["sym","customElement","WebComponent","utils","widgets","DEFAULT_FILE_EXPLORER_CONTEXT","fileExplorerContext","property","query","state","html","consume","styles","getContainerItemCount","isContainerSubject","_classDecs","_FileExplorerHeaderSu","_FileExplorerHeaderSu2","_A","WeakMap","_B","_C","_D","_E","_F","_G","_ref","_fileExplorerContextDecs","context","subscribe","_paneIconDecs","attribute","_onBackClickDecs","_showBackDecs","type","Boolean","_responseMetadataDecs","_resolvedPaneIconDecs","_titleHeadingDecs","_FileExplorerHeaderSummary","FileExplorerHeaderSummary","constructor","args","_defineProperty","_initProto","_classPrivateFieldInitSpec","_init_fileExplorerContext","_init_paneIcon","_init_onBackClick","_init_showBack","_init_responseMetadata","modified","undefined","isPublic","_init_resolvedPaneIcon","_init_titleHeading","_classPrivateFieldGet","v","_classPrivateFieldSet","paneIcon","onBackClick","showBack","responseMetadata","resolvedPaneIcon","titleHeading","formatModifiedDate","date","Date","Number","isNaN","getTime","parts","Intl","DateTimeFormat","day","month","year","hour","minute","hour12","formatToParts","getPart","find","part","value","dayPeriod","toUpperCase","willUpdate","changedProperties","has","generation","_paneIconGeneration","resolvePaneIcon","updated","subjectUri","_draggableSubjectUri","makeDraggable","icon","error","console","warn","renderContainerResourceHeader","label","itemCount","store","renderResourceHeader","render","subject","isContainerResource","e","c","_initClass","_applyDecs","_Class","_identity","default","customElement","consume","fileExplorerContext","property","state","query","WebComponent","DEFAULT_FILE_EXPLORER_CONTEXT","sym","getContainerItemCount","label","isContainerSubject","styles","require_label","require_dragAndDrop","require_decorators","require_WebComponent","require_context","require_FileExplorerHeaderSummary_styles","require_podUtils","rdflib","_lit_context","lit","lit_decorators_js","_Class","_FileExplorerHeaderSummary","_A","_B","_C","_D","_E","_F","_G","_initProto","_initClass","_classDecs","_fileExplorerContextDecs","_init_fileExplorerContext","_paneIconDecs","_init_paneIcon","_onBackClickDecs","_init_onBackClick","_showBackDecs","_init_showBack","_responseMetadataDecs","_init_responseMetadata","_resolvedPaneIconDecs","_init_resolvedPaneIcon","_titleHeadingDecs","_init_titleHeading","_FileExplorerHeaderSu2","_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","_FileExplorerHeaderSu","args","modified","date","parts","getPart","part","type","changedProperties","generation","paneIcon","icon","error","itemCount","label","isPublic","subject","label$1","isContainerResource"],"sources":["../../../src/components/file-explorer-header/FileExplorerHeaderSummary.ts"],"sourcesContent":["import { sym } from 'rdflib'\nimport { customElement, WebComponent } from '@/lib/components'\nimport * as utils from '@/utils'\nimport * as widgets from '@/widgets/index'\nimport { DEFAULT_FILE_EXPLORER_CONTEXT, fileExplorerContext } from '@/lib/file-explorer/context'\nimport '@/components/button'\nimport { property, query, state } from 'lit/decorators.js'\nimport type { PropertyValues } from 'lit'\nimport { html } from 'lit'\nimport { consume } from '@lit/context'\nimport { PaneIcon } from './types'\nimport '~icons/lucide/globe'\nimport '~icons/lucide/lock-keyhole'\nimport '~icons/lucide/arrow-left'\nimport '~icons/lucide/folder'\nimport styles from './FileExplorerHeaderSummary.styles.css'\nimport { getContainerItemCount, isContainerSubject } from '@/utils/podUtils'\nimport type { FileExplorerResourceMetadata } from './types'\n\n@customElement('solid-ui-file-explorer-header-summary')\nexport default class FileExplorerHeaderSummary extends WebComponent {\n static styles = styles\n\n private _draggableSubjectUri: string | undefined\n private _paneIconGeneration = 0\n\n @consume({ context: fileExplorerContext, subscribe: true })\n accessor fileExplorerContext = DEFAULT_FILE_EXPLORER_CONTEXT\n\n @property({ attribute: false })\n accessor paneIcon: PaneIcon | undefined\n\n @property({ attribute: false })\n accessor onBackClick: (() => void) | undefined\n\n @property({ type: Boolean })\n accessor showBack = true\n\n @property({ attribute: false })\n accessor responseMetadata: Pick<FileExplorerResourceMetadata, 'modified' | 'isPublic'> = {\n modified: undefined,\n isPublic: false\n }\n\n @state()\n accessor resolvedPaneIcon: string | undefined = undefined\n\n @query('h1')\n private accessor titleHeading: HTMLHeadingElement | null = null\n\n private formatModifiedDate (modified: string | undefined) {\n if (!modified) return ''\n\n const date = new Date(modified)\n if (Number.isNaN(date.getTime())) return modified\n\n const parts = new Intl.DateTimeFormat('en-GB', {\n day: '2-digit',\n month: 'short',\n year: 'numeric',\n hour: '2-digit',\n minute: '2-digit',\n hour12: true\n }).formatToParts(date)\n\n const getPart = (type: Intl.DateTimeFormatPartTypes) => parts.find(part => part.type === type)?.value ?? ''\n const day = getPart('day')\n const month = getPart('month')\n const year = getPart('year')\n const hour = getPart('hour')\n const minute = getPart('minute')\n const dayPeriod = getPart('dayPeriod').toUpperCase()\n\n return `${day} ${month}, ${year} at ${hour}:${minute} ${dayPeriod}`\n }\n\n protected willUpdate (changedProperties: PropertyValues<this>) {\n if (changedProperties.has('paneIcon')) {\n const generation = ++this._paneIconGeneration\n this.resolvedPaneIcon = undefined\n this.resolvePaneIcon(this.paneIcon, generation)\n }\n }\n\n protected updated () {\n if (!this.titleHeading || !this.fileExplorerContext?.subjectUri || this._draggableSubjectUri === this.fileExplorerContext.subjectUri) return\n\n widgets.makeDraggable(this.titleHeading, sym(this.fileExplorerContext.subjectUri)) // doing it this way for now, just to keep the same functionality\n this._draggableSubjectUri = this.fileExplorerContext.subjectUri\n }\n\n // Needed because humanReadable pane can return a promise for an icon.\n private async resolvePaneIcon (paneIcon: PaneIcon | undefined, generation: number) {\n try {\n if (paneIcon == null) return\n\n const icon = await paneIcon\n if (generation === this._paneIconGeneration) {\n this.resolvedPaneIcon = icon ?? undefined\n }\n } catch (error) {\n if (generation === this._paneIconGeneration) {\n this.resolvedPaneIcon = undefined\n console.warn('file-explorer-header-summary: failed to resolve pane icon', error)\n }\n }\n }\n\n private renderContainerResourceHeader (label: string, isPublic: boolean) {\n const itemCount = getContainerItemCount(this.fileExplorerContext?.store, this.fileExplorerContext?.subjectUri) ?? 0\n return html`\n <div class=\"container-info\">\n <h1>\n <span>${label}</span>\n </h1>\n <p>\n ${itemCount} items\n ${isPublic\n ? html`<span class=\"public\"><icon-lucide-globe aria-hidden=\"true\"></icon-lucide-globe><span class=\"sr-only\">Public</span></span>`\n : html`<span class=\"private\"><icon-lucide-lock-keyhole aria-hidden=\"true\"></icon-lucide-lock-keyhole><span class=\"sr-only\">Private</span></span>`}\n </p>\n </div>\n `\n }\n\n private renderResourceHeader (label: string, isPublic: boolean) {\n const modified = this.formatModifiedDate(this.responseMetadata.modified)\n\n return html`\n <div class=\"resource-info\">\n <h1>\n <span>${label}</span>\n </h1>\n <p><span class=\"resource-date\">${modified}</span> ${isPublic ? html`<span class=\"public\"><icon-lucide-globe></icon-lucide-globe> Public</span>` : html`<span class=\"private\"><icon-lucide-lock-keyhole></icon-lucide-lock-keyhole> Private</span>`}</p>\n </div>\n `\n }\n\n render () {\n const subject = this.fileExplorerContext?.subjectUri ? sym(this.fileExplorerContext.subjectUri) : undefined\n const label = subject ? utils.label(subject) : ''\n const isPublic = this.responseMetadata.isPublic\n const isContainerResource = isContainerSubject(this.fileExplorerContext?.store, this.fileExplorerContext?.subjectUri)\n\n return html`\n <div class=\"file-explorer-header-summary\">\n ${this.showBack\n ? html`\n <solid-ui-button\n variant=\"ghost\"\n @click=${this.onBackClick}\n title=\"Back\"\n >\n <icon-lucide-arrow-left></icon-lucide-arrow-left>\n <span class=\"sr-only\">Back</span>\n </solid-ui-button>\n `\n : ''}\n <span class=\"pane-icon\">\n ${this.resolvedPaneIcon ? html`<img src=${this.resolvedPaneIcon} alt=\"\" />` : ''}\n </span>\n ${isContainerResource ? this.renderContainerResourceHeader(label, isPublic) : this.renderResourceHeader(label, isPublic)}\n </div>\n </div>\n `\n }\n}\n"],"mappings":"A,+9JAgB4Ee,EAAA,CAG3Ed,EAAAA,cAAc,uCAAuC,CAAC,EAAA,IAAAe,EAAA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AAA,cAAA,CAAA,EAAAvB,EAAA,EAAA,IAAA,GAlJsDb,EAAAA,OAAY,EAAAqC,GAAA0E,EAAA,cAAAC,CAAA,CAAAzE,aAAA,CAAA,MAAAzB,CAAA,EAAA2B,EAAA,KAAA,SACjD/B,EAAAA,OAAM,EAAAmG,EAAA,CAAA,CAAA,EAAApE,EAAAsE,EAAAhG,EAAA,IAAA,EAAA,EAAAgG,G"}
@@ -8,6 +8,7 @@ export default class FileExplorerHeaderSummary extends WebComponent {
8
8
  accessor fileExplorerContext: import('../../lib/file-explorer/context').FileExplorerContext;
9
9
  accessor paneIcon: PaneIcon | undefined;
10
10
  accessor onBackClick: (() => void) | undefined;
11
+ accessor showBack: boolean;
11
12
  accessor responseMetadata: Pick<FileExplorerResourceMetadata, 'modified' | 'isPublic'>;
12
13
  accessor resolvedPaneIcon: string | undefined;
13
14
  private accessor titleHeading;
@@ -1 +1 @@
1
- {"version":3,"file":"FileExplorerHeaderSummary.d.ts","sourceRoot":"","sources":["../../../src/components/file-explorer-header/FileExplorerHeaderSummary.ts"],"names":[],"mappings":"AACA,OAAO,EAAiB,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAI9D,OAAO,qBAAqB,CAAA;AAE5B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,KAAK,CAAA;AAGzC,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAClC,OAAO,qBAAqB,CAAA;AAC5B,OAAO,4BAA4B,CAAA;AACnC,OAAO,0BAA0B,CAAA;AACjC,OAAO,sBAAsB,CAAA;AAG7B,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,SAAS,CAAA;AAG3D,MAAM,CAAC,OAAO,OAAO,yBAA0B,SAAQ,YAAY;IACjE,MAAM,CAAC,MAAM,0BAAS;IAEtB,OAAO,CAAC,oBAAoB,CAAoB;IAChD,OAAO,CAAC,mBAAmB,CAAI;IAG/B,QAAQ,CAAC,mBAAmB,4DAAgC;IAG5D,QAAQ,CAAC,Q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AGvC,QAAQ,CAAC,WAAW,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,CAAA;IAG9C,QAAQ,CAAC,QAAQ,UAAO;IAGxB,QAAQ,CAAC,gBAAgB,EAAE,IAAI,CAAC,4BAA4B,EAAE,UAAU,GAAG,UAAU,CAAC,CAGrF;IAGD,QAAQ,CAAC,gBAAgB,EAAE,MAAM,GAAG,SAAS,CAAY;IAGzD,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAkC;IAE/D,OAAO,CAAC,kBAAkB;IA0B1B,SAAS,CAAC,UAAU,CAAE,iBAAiB,EAAE,cAAc,CAAC,IAAI,CAAC;IAQ7D,SAAS,CAAC,OAAO;YAQH,eAAe;IAgB7B,OAAO,CAAC,6BAA6B;IAiBrC,OAAO,CAAC,oBAAoB;IAa5B,MAAM;CA4BP"}
@@ -18,32 +18,32 @@ import { consume as u } from "@lit/context";
18
18
  import { html as d } from "lit";
19
19
  import { property as f, query as p, state as m } from "lit/decorators.js";
20
20
  // src/components/file-explorer-header/FileExplorerHeaderSummary.ts
21
- var h, g, _, v, y, b, x, S, C, w, T, E, D, O, k, A, j, M, N, P, F, I, L, R, z;
22
- function B(e, t, n) {
23
- V(e, t), t.set(e, n);
21
+ var h, g, _, v, y, b, x, S, C, w, T, E, D, O, k, A, j, M, N, P, F, I, L, R, z, B, V, H;
22
+ function U(e, t, n) {
23
+ W(e, t), t.set(e, n);
24
24
  }
25
- function V(e, t) {
25
+ function W(e, t) {
26
26
  if (t.has(e)) throw TypeError("Cannot initialize the same private elements twice on an object");
27
27
  }
28
- function H(e, t, n) {
29
- return e.set(W(e, t), n), n;
28
+ function G(e, t, n) {
29
+ return e.set(q(e, t), n), n;
30
30
  }
31
- function U(e, t) {
32
- return e.get(W(e, t));
31
+ function K(e, t) {
32
+ return e.get(q(e, t));
33
33
  }
34
- function W(e, t, n) {
34
+ function q(e, t, n) {
35
35
  if (typeof e == "function" ? e === t : e.has(t)) return arguments.length < 3 ? t : n;
36
36
  throw TypeError("Private element is not present on this object");
37
37
  }
38
- function G(e, t, n) {
39
- return (t = q(t)) in e ? Object.defineProperty(e, t, {
38
+ function J(e, t, n) {
39
+ return (t = X(t)) in e ? Object.defineProperty(e, t, {
40
40
  value: n,
41
41
  enumerable: !0,
42
42
  configurable: !0,
43
43
  writable: !0
44
44
  }) : e[t] = n, e;
45
45
  }
46
- function K(e, t, n, r, i, a) {
46
+ function Y(e, t, n, r, i, a) {
47
47
  function o(e, t, n) {
48
48
  return function(r, i) {
49
49
  return n && n(r), e[t].call(r, i);
@@ -66,13 +66,13 @@ function K(e, t, n, r, i, a) {
66
66
  n || Array.isArray(_) || (_ = [_]);
67
67
  var b = {}, x = [], S = i === 3 ? "get" : i === 4 || p ? "set" : "value";
68
68
  d ? (f || p ? b = {
69
- get: Y(function() {
69
+ get: Q(function() {
70
70
  return v(this);
71
71
  }, r, "get"),
72
72
  set: function(e) {
73
73
  t[4](this, e);
74
74
  }
75
- } : b[S] = v, f || Y(b[S], r, i === 2 ? "" : S)) : f || (b = Object.getOwnPropertyDescriptor(e, r));
75
+ } : b[S] = v, f || Q(b[S], r, i === 2 ? "" : S)) : f || (b = Object.getOwnPropertyDescriptor(e, r));
76
76
  }
77
77
  for (var C = e, w = _.length - 1; w >= 0; w -= n ? 2 : 1) {
78
78
  var T = _[w], E = n ? _[w - 1] : void 0, D = {}, O = {
@@ -132,7 +132,7 @@ function K(e, t, n, r, i, a) {
132
132
  if (arguments.length >= 6) var d = a[Symbol.metadata || Symbol.for("Symbol.metadata")];
133
133
  var f = Object.create(d ?? null), p = function(e, t, n, r) {
134
134
  var i, a, o = [], c = function(t) {
135
- return X(t) === e;
135
+ return ee(t) === e;
136
136
  }, u = /* @__PURE__ */ new Map();
137
137
  function d(e) {
138
138
  e && o.push(s.bind(null, e));
@@ -146,7 +146,7 @@ function K(e, t, n, r, i, a) {
146
146
  if (!0 === x || x === 3 && m !== 4 || x === 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);
147
147
  u.set(b, !(m > 2) || m);
148
148
  }
149
- l(v ? e : e.prototype, p, _, g ? "#" + h : q(h), m, r, v ? a ||= [] : i ||= [], o, v, g, y, m === 1, v && g ? c : n);
149
+ 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);
150
150
  }
151
151
  }
152
152
  return d(i), d(a), o;
@@ -159,11 +159,11 @@ function K(e, t, n, r, i, a) {
159
159
  }
160
160
  };
161
161
  }
162
- function q(e) {
163
- var t = J(e, "string");
162
+ function X(e) {
163
+ var t = Z(e, "string");
164
164
  return typeof t == "symbol" ? t : t + "";
165
165
  }
166
- function J(e, t) {
166
+ function Z(e, t) {
167
167
  if (typeof e != "object" || !e) return e;
168
168
  var n;
169
169
  if (typeof Symbol < "u" && (n = e[Symbol.toPrimitive]) !== void 0) {
@@ -173,7 +173,7 @@ function J(e, t) {
173
173
  }
174
174
  return (t === "string" ? String : Number)(e);
175
175
  }
176
- function Y(e, t, n) {
176
+ function Q(e, t, n) {
177
177
  typeof t == "symbol" && (t = (t = t.description) ? "[" + t + "]" : "");
178
178
  try {
179
179
  Object.defineProperty(e, "name", {
@@ -183,60 +183,66 @@ function Y(e, t, n) {
183
183
  } catch {}
184
184
  return e;
185
185
  }
186
- function X(e) {
186
+ function ee(e) {
187
187
  if (Object(e) !== e) throw TypeError("right-hand side of 'in' should be an object, got " + (e === null ? "null" : typeof e));
188
188
  return e;
189
189
  }
190
- function Z(e) {
190
+ function te(e) {
191
191
  return e;
192
192
  }
193
- T = [n("solid-ui-file-explorer-header-summary")];
194
- var Q;
195
- new (R = (_ = /*#__PURE__*/ new WeakMap(), v = /*#__PURE__*/ new WeakMap(), y = /*#__PURE__*/ new WeakMap(), b = /*#__PURE__*/ new WeakMap(), x = /*#__PURE__*/ new WeakMap(), S = /*#__PURE__*/ new WeakMap(), z = (E = u({
193
+ E = [n("solid-ui-file-explorer-header-summary")];
194
+ var $;
195
+ new (V = (_ = /*#__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(), H = (D = u({
196
196
  context: a,
197
197
  subscribe: !0
198
- }), O = f({ attribute: !1 }), A = f({ attribute: !1 }), M = f({ attribute: !1 }), P = m(), I = p("h1"), "_draggableSubjectUri"), g = class extends r {
198
+ }), k = f({ attribute: !1 }), j = f({ attribute: !1 }), N = f({ type: Boolean }), F = f({ attribute: !1 }), L = m(), z = p("h1"), "_draggableSubjectUri"), g = class extends r {
199
199
  constructor(...e) {
200
- super(...e), G(this, z, void C(this)), G(this, "_paneIconGeneration", 0), B(this, _, D(this, i)), B(this, v, k(this)), B(this, y, j(this)), B(this, b, N(this, {
200
+ super(...e), J(this, H, void w(this)), J(this, "_paneIconGeneration", 0), U(this, _, O(this, i)), U(this, v, A(this)), U(this, y, M(this)), U(this, b, P(this, !0)), U(this, x, I(this, {
201
201
  modified: void 0,
202
202
  isPublic: !1
203
- })), B(this, x, F(this, void 0)), B(this, S, L(this, null));
203
+ })), U(this, S, R(this, void 0)), U(this, C, B(this, null));
204
204
  }
205
205
  get fileExplorerContext() {
206
- return U(_, this);
206
+ return K(_, this);
207
207
  }
208
208
  set fileExplorerContext(e) {
209
- H(_, this, e);
209
+ G(_, this, e);
210
210
  }
211
211
  get paneIcon() {
212
- return U(v, this);
212
+ return K(v, this);
213
213
  }
214
214
  set paneIcon(e) {
215
- H(v, this, e);
215
+ G(v, this, e);
216
216
  }
217
217
  get onBackClick() {
218
- return U(y, this);
218
+ return K(y, this);
219
219
  }
220
220
  set onBackClick(e) {
221
- H(y, this, e);
221
+ G(y, this, e);
222
+ }
223
+ get showBack() {
224
+ return K(b, this);
225
+ }
226
+ set showBack(e) {
227
+ G(b, this, e);
222
228
  }
223
229
  get responseMetadata() {
224
- return U(b, this);
230
+ return K(x, this);
225
231
  }
226
232
  set responseMetadata(e) {
227
- H(b, this, e);
233
+ G(x, this, e);
228
234
  }
229
235
  get resolvedPaneIcon() {
230
- return U(x, this);
236
+ return K(S, this);
231
237
  }
232
238
  set resolvedPaneIcon(e) {
233
- H(x, this, e);
239
+ G(S, this, e);
234
240
  }
235
241
  get titleHeading() {
236
- return U(S, this);
242
+ return K(C, this);
237
243
  }
238
244
  set titleHeading(e) {
239
- H(S, this, e);
245
+ G(C, this, e);
240
246
  }
241
247
  formatModifiedDate(e) {
242
248
  if (!e) return "";
@@ -299,14 +305,16 @@ new (R = (_ = /*#__PURE__*/ new WeakMap(), v = /*#__PURE__*/ new WeakMap(), y =
299
305
  let t = this.fileExplorerContext?.subjectUri ? l(this.fileExplorerContext.subjectUri) : void 0, n = t ? e(t) : "", r = this.responseMetadata.isPublic, i = c(this.fileExplorerContext?.store, this.fileExplorerContext?.subjectUri);
300
306
  return d`
301
307
  <div class="file-explorer-header-summary">
302
- <solid-ui-button
303
- variant="ghost"
304
- @click=${this.onBackClick}
305
- title="Back"
306
- >
307
- <icon-lucide-arrow-left></icon-lucide-arrow-left>
308
- <span class="sr-only">Back</span>
309
- </solid-ui-button>
308
+ ${this.showBack ? d`
309
+ <solid-ui-button
310
+ variant="ghost"
311
+ @click=${this.onBackClick}
312
+ title="Back"
313
+ >
314
+ <icon-lucide-arrow-left></icon-lucide-arrow-left>
315
+ <span class="sr-only">Back</span>
316
+ </solid-ui-button>
317
+ ` : ""}
310
318
  <span class="pane-icon">
311
319
  ${this.resolvedPaneIcon ? d`<img src=${this.resolvedPaneIcon} alt="" />` : ""}
312
320
  </span>
@@ -315,42 +323,47 @@ new (R = (_ = /*#__PURE__*/ new WeakMap(), v = /*#__PURE__*/ new WeakMap(), y =
315
323
  </div>
316
324
  `;
317
325
  }
318
- }, {e: [D, k, j, N, F, L, C], c: [Q, w]} = K(g, [
326
+ }, {e: [O, A, M, P, I, R, B, w], c: [$, T]} = Y(g, [
319
327
  [
320
- E,
328
+ D,
321
329
  1,
322
330
  "fileExplorerContext"
323
331
  ],
324
332
  [
325
- O,
333
+ k,
326
334
  1,
327
335
  "paneIcon"
328
336
  ],
329
337
  [
330
- A,
338
+ j,
331
339
  1,
332
340
  "onBackClick"
333
341
  ],
334
342
  [
335
- M,
343
+ N,
344
+ 1,
345
+ "showBack"
346
+ ],
347
+ [
348
+ F,
336
349
  1,
337
350
  "responseMetadata"
338
351
  ],
339
352
  [
340
- P,
353
+ L,
341
354
  1,
342
355
  "resolvedPaneIcon"
343
356
  ],
344
357
  [
345
- I,
358
+ z,
346
359
  1,
347
360
  "titleHeading"
348
361
  ]
349
- ], T, 0, void 0, r), g), h = class extends Z {
362
+ ], E, 0, void 0, r), g), h = class extends te {
350
363
  constructor() {
351
- super(Q), G(this, "styles", o), w();
364
+ super($), J(this, "styles", o), T();
352
365
  }
353
- }, G(h, R, void 0), h)();
354
- export { Q as default };
366
+ }, J(h, V, void 0), h)();
367
+ export { $ as default };
355
368
 
356
369
  //# sourceMappingURL=FileExplorerHeaderSummary.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FileExplorerHeaderSummary.esm.js","names":["sym","customElement","WebComponent","utils","widgets","DEFAULT_FILE_EXPLORER_CONTEXT","fileExplorerContext","property","query","state","html","consume","styles","getContainerItemCount","isContainerSubject","_classDecs","_FileExplorerHeaderSu","_FileExplorerHeaderSu2","_A","WeakMap","_B","_C","_D","_E","_F","_ref","_fileExplorerContextDecs","context","subscribe","_paneIconDecs","attribute","_onBackClickDecs","_responseMetadataDecs","_resolvedPaneIconDecs","_titleHeadingDecs","_FileExplorerHeaderSummary","FileExplorerHeaderSummary","constructor","args","_defineProperty","_initProto","_classPrivateFieldInitSpec","_init_fileExplorerContext","_init_paneIcon","_init_onBackClick","_init_responseMetadata","modified","undefined","isPublic","_init_resolvedPaneIcon","_init_titleHeading","_classPrivateFieldGet","v","_classPrivateFieldSet","paneIcon","onBackClick","responseMetadata","resolvedPaneIcon","titleHeading","formatModifiedDate","date","Date","Number","isNaN","getTime","parts","Intl","DateTimeFormat","day","month","year","hour","minute","hour12","formatToParts","getPart","type","find","part","value","dayPeriod","toUpperCase","willUpdate","changedProperties","has","generation","_paneIconGeneration","resolvePaneIcon","updated","subjectUri","_draggableSubjectUri","makeDraggable","icon","error","console","warn","renderContainerResourceHeader","label","itemCount","store","renderResourceHeader","render","subject","isContainerResource","e","c","_initClass","_applyDecs","_Class","_identity","default","label","utils.label","styles","WebComponent","FileExplorerHeaderSummary_styles_default","_Class","_FileExplorerHeaderSummary","_A","_B","_C","_D","_E","_F","_initProto","_initClass","_classDecs","_fileExplorerContextDecs","_init_fileExplorerContext","_paneIconDecs","_init_paneIcon","_onBackClickDecs","_init_onBackClick","_responseMetadataDecs","_init_responseMetadata","_resolvedPaneIconDecs","_init_resolvedPaneIcon","_titleHeadingDecs","_init_titleHeading","_FileExplorerHeaderSu2","_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","customElement","_FileExplorerHeaderSu","consume","fileExplorerContext","property","state","query","args","DEFAULT_FILE_EXPLORER_CONTEXT","modified","date","parts","getPart","part","type","changedProperties","generation","makeDraggable","sym","paneIcon","icon","error","itemCount","getContainerItemCount","label","isPublic","subject","label$1","isContainerResource","isContainerSubject"],"sources":["../../../src/components/file-explorer-header/FileExplorerHeaderSummary.ts"],"sourcesContent":["import { sym } from 'rdflib'\nimport { customElement, WebComponent } from '@/lib/components'\nimport * as utils from '@/utils'\nimport * as widgets from '@/widgets/index'\nimport { DEFAULT_FILE_EXPLORER_CONTEXT, fileExplorerContext } from '@/lib/file-explorer/context'\nimport '@/components/button'\nimport { property, query, state } from 'lit/decorators.js'\nimport type { PropertyValues } from 'lit'\nimport { html } from 'lit'\nimport { consume } from '@lit/context'\nimport { PaneIcon } from './types'\nimport '~icons/lucide/globe'\nimport '~icons/lucide/lock-keyhole'\nimport '~icons/lucide/arrow-left'\nimport '~icons/lucide/folder'\nimport styles from './FileExplorerHeaderSummary.styles.css'\nimport { getContainerItemCount, isContainerSubject } from '@/utils/podUtils'\nimport type { FileExplorerResourceMetadata } from './types'\n\n@customElement('solid-ui-file-explorer-header-summary')\nexport default class FileExplorerHeaderSummary extends WebComponent {\n static styles = styles\n\n private _draggableSubjectUri: string | undefined\n private _paneIconGeneration = 0\n\n @consume({ context: fileExplorerContext, subscribe: true })\n accessor fileExplorerContext = DEFAULT_FILE_EXPLORER_CONTEXT\n\n @property({ attribute: false })\n accessor paneIcon: PaneIcon | undefined\n\n @property({ attribute: false })\n accessor onBackClick: (() => void) | undefined\n\n @property({ attribute: false })\n accessor responseMetadata: Pick<FileExplorerResourceMetadata, 'modified' | 'isPublic'> = {\n modified: undefined,\n isPublic: false\n }\n\n @state()\n accessor resolvedPaneIcon: string | undefined = undefined\n\n @query('h1')\n private accessor titleHeading: HTMLHeadingElement | null = null\n\n private formatModifiedDate (modified: string | undefined) {\n if (!modified) return ''\n\n const date = new Date(modified)\n if (Number.isNaN(date.getTime())) return modified\n\n const parts = new Intl.DateTimeFormat('en-GB', {\n day: '2-digit',\n month: 'short',\n year: 'numeric',\n hour: '2-digit',\n minute: '2-digit',\n hour12: true\n }).formatToParts(date)\n\n const getPart = (type: Intl.DateTimeFormatPartTypes) => parts.find(part => part.type === type)?.value ?? ''\n const day = getPart('day')\n const month = getPart('month')\n const year = getPart('year')\n const hour = getPart('hour')\n const minute = getPart('minute')\n const dayPeriod = getPart('dayPeriod').toUpperCase()\n\n return `${day} ${month}, ${year} at ${hour}:${minute} ${dayPeriod}`\n }\n\n protected willUpdate (changedProperties: PropertyValues<this>) {\n if (changedProperties.has('paneIcon')) {\n const generation = ++this._paneIconGeneration\n this.resolvedPaneIcon = undefined\n this.resolvePaneIcon(this.paneIcon, generation)\n }\n }\n\n protected updated () {\n if (!this.titleHeading || !this.fileExplorerContext?.subjectUri || this._draggableSubjectUri === this.fileExplorerContext.subjectUri) return\n\n widgets.makeDraggable(this.titleHeading, sym(this.fileExplorerContext.subjectUri)) // doing it this way for now, just to keep the same functionality\n this._draggableSubjectUri = this.fileExplorerContext.subjectUri\n }\n\n // Needed because humanReadable pane can return a promise for an icon.\n private async resolvePaneIcon (paneIcon: PaneIcon | undefined, generation: number) {\n try {\n if (paneIcon == null) return\n\n const icon = await paneIcon\n if (generation === this._paneIconGeneration) {\n this.resolvedPaneIcon = icon ?? undefined\n }\n } catch (error) {\n if (generation === this._paneIconGeneration) {\n this.resolvedPaneIcon = undefined\n console.warn('file-explorer-header-summary: failed to resolve pane icon', error)\n }\n }\n }\n\n private renderContainerResourceHeader (label: string, isPublic: boolean) {\n const itemCount = getContainerItemCount(this.fileExplorerContext?.store, this.fileExplorerContext?.subjectUri) ?? 0\n return html`\n <div class=\"container-info\">\n <h1>\n <span>${label}</span>\n </h1>\n <p>\n ${itemCount} items\n ${isPublic\n ? html`<span class=\"public\"><icon-lucide-globe aria-hidden=\"true\"></icon-lucide-globe><span class=\"sr-only\">Public</span></span>`\n : html`<span class=\"private\"><icon-lucide-lock-keyhole aria-hidden=\"true\"></icon-lucide-lock-keyhole><span class=\"sr-only\">Private</span></span>`}\n </p>\n </div>\n `\n }\n\n private renderResourceHeader (label: string, isPublic: boolean) {\n const modified = this.formatModifiedDate(this.responseMetadata.modified)\n\n return html`\n <div class=\"resource-info\">\n <h1>\n <span>${label}</span>\n </h1>\n <p><span class=\"resource-date\">${modified}</span> ${isPublic ? html`<span class=\"public\"><icon-lucide-globe></icon-lucide-globe> Public</span>` : html`<span class=\"private\"><icon-lucide-lock-keyhole></icon-lucide-lock-keyhole> Private</span>`}</p>\n </div>\n `\n }\n\n render () {\n const subject = this.fileExplorerContext?.subjectUri ? sym(this.fileExplorerContext.subjectUri) : undefined\n const label = subject ? utils.label(subject) : ''\n const isPublic = this.responseMetadata.isPublic\n const isContainerResource = isContainerSubject(this.fileExplorerContext?.store, this.fileExplorerContext?.subjectUri)\n\n return html`\n <div class=\"file-explorer-header-summary\">\n <solid-ui-button\n variant=\"ghost\"\n @click=${this.onBackClick}\n title=\"Back\"\n >\n <icon-lucide-arrow-left></icon-lucide-arrow-left>\n <span class=\"sr-only\">Back</span>\n </solid-ui-button>\n <span class=\"pane-icon\">\n ${this.resolvedPaneIcon ? html`<img src=${this.resolvedPaneIcon} alt=\"\" />` : ''}\n </span>\n ${isContainerResource ? this.renderContainerResourceHeader(label, isPublic) : this.renderResourceHeader(label, isPublic)}\n </div>\n </div>\n `\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgB4Ee,IAAA,CAG3Ed,EAAc,uCAAuC,CAAC;AAAA,IAAAe;AAAA,KAAAC,KAAAC,kBAAA,IAAAC,QAAA,GAAAC,kBAAA,IAAAD,QAAA,GAAAE,kBAAA,IAAAF,QAAA,GAAAG,kBAAA,IAAAH,QAAA,GAAAI,kBAAA,IAAAJ,QAAA,GAAAK,kBAAA,IAAAL,QAAA,GAAAM,KAAAC,IAOpDf,EAAQ;CAAEgB,SAASrB;CAAqBsB,WAAW;AAAK,CAAC,GAACC,IAG1DtB,EAAS,EAAEuB,WAAW,GAAM,CAAC,GAACC,IAG9BxB,EAAS,EAAEuB,WAAW,GAAM,CAAC,GAACE,IAG9BzB,EAAS,EAAEuB,WAAW,GAAM,CAAC,GAACG,IAM9BxB,EAAM,GAACyB,IAGP1B,EAA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AA,CAAAzF,GAAA0F,MAAAC,EAAAxE,GAAA;CAAA;EAAAT;EAAA;EAAA;CAAA;CAAA;EAAAG;EAAA;EAAA;CAAA;CAAA;EAAAE;EAAA;EAAA;CAAA;CAAA;EAAAC;EAAA;EAAA;CAAA;CAAA;EAAAC;EAAA;EAAA;CAAA;CAAA;EAAAC;EAAA;EAAA;CAAA;AAAA,GAAAnB,GAAA,GAAA,KAAA,GA3IsDb,CAAY,GAAAiC,IAAAyE,IAAA,cAAAC,EAAA;CAAAxE,cAAA;EAAA,MAAArB,CAAA,GAAAuB,EAAA,MAAA,UACjD3B,CAAM,GAAA8F,EAAA;CAAA;AAAA,GAAAnE,EAAAqE,GAAA3F,GAAA,KAAA,CAAA,GAAA2F,GAAA"}
1
+ {"version":3,"file":"FileExplorerHeaderSummary.esm.js","names":["sym","customElement","WebComponent","utils","widgets","DEFAULT_FILE_EXPLORER_CONTEXT","fileExplorerContext","property","query","state","html","consume","styles","getContainerItemCount","isContainerSubject","_classDecs","_FileExplorerHeaderSu","_FileExplorerHeaderSu2","_A","WeakMap","_B","_C","_D","_E","_F","_G","_ref","_fileExplorerContextDecs","context","subscribe","_paneIconDecs","attribute","_onBackClickDecs","_showBackDecs","type","Boolean","_responseMetadataDecs","_resolvedPaneIconDecs","_titleHeadingDecs","_FileExplorerHeaderSummary","FileExplorerHeaderSummary","constructor","args","_defineProperty","_initProto","_classPrivateFieldInitSpec","_init_fileExplorerContext","_init_paneIcon","_init_onBackClick","_init_showBack","_init_responseMetadata","modified","undefined","isPublic","_init_resolvedPaneIcon","_init_titleHeading","_classPrivateFieldGet","v","_classPrivateFieldSet","paneIcon","onBackClick","showBack","responseMetadata","resolvedPaneIcon","titleHeading","formatModifiedDate","date","Date","Number","isNaN","getTime","parts","Intl","DateTimeFormat","day","month","year","hour","minute","hour12","formatToParts","getPart","find","part","value","dayPeriod","toUpperCase","willUpdate","changedProperties","has","generation","_paneIconGeneration","resolvePaneIcon","updated","subjectUri","_draggableSubjectUri","makeDraggable","icon","error","console","warn","renderContainerResourceHeader","label","itemCount","store","renderResourceHeader","render","subject","isContainerResource","e","c","_initClass","_applyDecs","_Class","_identity","default","label","utils.label","styles","WebComponent","FileExplorerHeaderSummary_styles_default","_Class","_FileExplorerHeaderSummary","_A","_B","_C","_D","_E","_F","_G","_initProto","_initClass","_classDecs","_fileExplorerContextDecs","_init_fileExplorerContext","_paneIconDecs","_init_paneIcon","_onBackClickDecs","_init_onBackClick","_showBackDecs","_init_showBack","_responseMetadataDecs","_init_responseMetadata","_resolvedPaneIconDecs","_init_resolvedPaneIcon","_titleHeadingDecs","_init_titleHeading","_FileExplorerHeaderSu2","_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","customElement","_FileExplorerHeaderSu","consume","fileExplorerContext","property","state","query","args","DEFAULT_FILE_EXPLORER_CONTEXT","modified","date","parts","getPart","part","type","changedProperties","generation","makeDraggable","sym","paneIcon","icon","error","itemCount","getContainerItemCount","label","isPublic","subject","label$1","isContainerResource","isContainerSubject"],"sources":["../../../src/components/file-explorer-header/FileExplorerHeaderSummary.ts"],"sourcesContent":["import { sym } from 'rdflib'\nimport { customElement, WebComponent } from '@/lib/components'\nimport * as utils from '@/utils'\nimport * as widgets from '@/widgets/index'\nimport { DEFAULT_FILE_EXPLORER_CONTEXT, fileExplorerContext } from '@/lib/file-explorer/context'\nimport '@/components/button'\nimport { property, query, state } from 'lit/decorators.js'\nimport type { PropertyValues } from 'lit'\nimport { html } from 'lit'\nimport { consume } from '@lit/context'\nimport { PaneIcon } from './types'\nimport '~icons/lucide/globe'\nimport '~icons/lucide/lock-keyhole'\nimport '~icons/lucide/arrow-left'\nimport '~icons/lucide/folder'\nimport styles from './FileExplorerHeaderSummary.styles.css'\nimport { getContainerItemCount, isContainerSubject } from '@/utils/podUtils'\nimport type { FileExplorerResourceMetadata } from './types'\n\n@customElement('solid-ui-file-explorer-header-summary')\nexport default class FileExplorerHeaderSummary extends WebComponent {\n static styles = styles\n\n private _draggableSubjectUri: string | undefined\n private _paneIconGeneration = 0\n\n @consume({ context: fileExplorerContext, subscribe: true })\n accessor fileExplorerContext = DEFAULT_FILE_EXPLORER_CONTEXT\n\n @property({ attribute: false })\n accessor paneIcon: PaneIcon | undefined\n\n @property({ attribute: false })\n accessor onBackClick: (() => void) | undefined\n\n @property({ type: Boolean })\n accessor showBack = true\n\n @property({ attribute: false })\n accessor responseMetadata: Pick<FileExplorerResourceMetadata, 'modified' | 'isPublic'> = {\n modified: undefined,\n isPublic: false\n }\n\n @state()\n accessor resolvedPaneIcon: string | undefined = undefined\n\n @query('h1')\n private accessor titleHeading: HTMLHeadingElement | null = null\n\n private formatModifiedDate (modified: string | undefined) {\n if (!modified) return ''\n\n const date = new Date(modified)\n if (Number.isNaN(date.getTime())) return modified\n\n const parts = new Intl.DateTimeFormat('en-GB', {\n day: '2-digit',\n month: 'short',\n year: 'numeric',\n hour: '2-digit',\n minute: '2-digit',\n hour12: true\n }).formatToParts(date)\n\n const getPart = (type: Intl.DateTimeFormatPartTypes) => parts.find(part => part.type === type)?.value ?? ''\n const day = getPart('day')\n const month = getPart('month')\n const year = getPart('year')\n const hour = getPart('hour')\n const minute = getPart('minute')\n const dayPeriod = getPart('dayPeriod').toUpperCase()\n\n return `${day} ${month}, ${year} at ${hour}:${minute} ${dayPeriod}`\n }\n\n protected willUpdate (changedProperties: PropertyValues<this>) {\n if (changedProperties.has('paneIcon')) {\n const generation = ++this._paneIconGeneration\n this.resolvedPaneIcon = undefined\n this.resolvePaneIcon(this.paneIcon, generation)\n }\n }\n\n protected updated () {\n if (!this.titleHeading || !this.fileExplorerContext?.subjectUri || this._draggableSubjectUri === this.fileExplorerContext.subjectUri) return\n\n widgets.makeDraggable(this.titleHeading, sym(this.fileExplorerContext.subjectUri)) // doing it this way for now, just to keep the same functionality\n this._draggableSubjectUri = this.fileExplorerContext.subjectUri\n }\n\n // Needed because humanReadable pane can return a promise for an icon.\n private async resolvePaneIcon (paneIcon: PaneIcon | undefined, generation: number) {\n try {\n if (paneIcon == null) return\n\n const icon = await paneIcon\n if (generation === this._paneIconGeneration) {\n this.resolvedPaneIcon = icon ?? undefined\n }\n } catch (error) {\n if (generation === this._paneIconGeneration) {\n this.resolvedPaneIcon = undefined\n console.warn('file-explorer-header-summary: failed to resolve pane icon', error)\n }\n }\n }\n\n private renderContainerResourceHeader (label: string, isPublic: boolean) {\n const itemCount = getContainerItemCount(this.fileExplorerContext?.store, this.fileExplorerContext?.subjectUri) ?? 0\n return html`\n <div class=\"container-info\">\n <h1>\n <span>${label}</span>\n </h1>\n <p>\n ${itemCount} items\n ${isPublic\n ? html`<span class=\"public\"><icon-lucide-globe aria-hidden=\"true\"></icon-lucide-globe><span class=\"sr-only\">Public</span></span>`\n : html`<span class=\"private\"><icon-lucide-lock-keyhole aria-hidden=\"true\"></icon-lucide-lock-keyhole><span class=\"sr-only\">Private</span></span>`}\n </p>\n </div>\n `\n }\n\n private renderResourceHeader (label: string, isPublic: boolean) {\n const modified = this.formatModifiedDate(this.responseMetadata.modified)\n\n return html`\n <div class=\"resource-info\">\n <h1>\n <span>${label}</span>\n </h1>\n <p><span class=\"resource-date\">${modified}</span> ${isPublic ? html`<span class=\"public\"><icon-lucide-globe></icon-lucide-globe> Public</span>` : html`<span class=\"private\"><icon-lucide-lock-keyhole></icon-lucide-lock-keyhole> Private</span>`}</p>\n </div>\n `\n }\n\n render () {\n const subject = this.fileExplorerContext?.subjectUri ? sym(this.fileExplorerContext.subjectUri) : undefined\n const label = subject ? utils.label(subject) : ''\n const isPublic = this.responseMetadata.isPublic\n const isContainerResource = isContainerSubject(this.fileExplorerContext?.store, this.fileExplorerContext?.subjectUri)\n\n return html`\n <div class=\"file-explorer-header-summary\">\n ${this.showBack\n ? html`\n <solid-ui-button\n variant=\"ghost\"\n @click=${this.onBackClick}\n title=\"Back\"\n >\n <icon-lucide-arrow-left></icon-lucide-arrow-left>\n <span class=\"sr-only\">Back</span>\n </solid-ui-button>\n `\n : ''}\n <span class=\"pane-icon\">\n ${this.resolvedPaneIcon ? html`<img src=${this.resolvedPaneIcon} alt=\"\" />` : ''}\n </span>\n ${isContainerResource ? this.renderContainerResourceHeader(label, isPublic) : this.renderResourceHeader(label, isPublic)}\n </div>\n </div>\n `\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgB4Ee,IAAA,CAG3Ed,EAAc,uCAAuC,CAAC;AAAA,IAAAe;AAAA,KAAAC,KAAAC,kBAAA,IAAAC,QAAA,GAAAC,kBAAA,IAAAD,QAAA,GAAAE,kBAAA,IAAAF,QAAA,GAAAG,kBAAA,IAAAH,QAAA,GAAAI,kBAAA,IAAAJ,QAAA,GAAAK,kBAAA,IAAAL,QAAA,GAAAM,kBAAA,IAAAN,QAAA,GAAAO,KAAAC,IAOpDhB,EAAQ;CAAEiB,SAAStB;CAAqBuB,WAAW;AAAK,CAAC,GAACC,IAG1DvB,EAAS,EAAEwB,WAAW,GAAM,CAAC,GAACC,IAG9BzB,EAAS,EAAEwB,WAAW,GAAM,CAAC,GAACE,IAG9B1B,EAAS,EAAE2B,MAAMC,QAAQ,CAAC,GAACC,IAG3B7B,EAAS,EAAEwB,WAAW,GAAM,CAAC,GAACM,IAM9B5B,EAAM,GAAC6B,IAGP9B,EAAM,IAAI,GAAC,yBAAA+B,IA5Bd,cACuDrC,EAAa;CAAAuC,YAAA,GAAAC,GAAA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OjD,CAAQ,IAAI,KAAKoD,qBAAqBH,GAAOjD,CAAQ,EAAC;;;;CAI9H;AACF,GAAC,CAAAwD,GAAA,CAAA/D,GAAAC,GAAAC,GAAAC,GAAAC,GAAAI,GAAAC,GAAAX,IAAAkE,GAAA,CAAA9F,GAAA+F,MAAAC,EAAAzE,GAAA;CAAA;EAAAZ;EAAA;EAAA;CAAA;CAAA;EAAAG;EAAA;EAAA;CAAA;CAAA;EAAAE;EAAA;EAAA;CAAA;CAAA;EAAAC;EAAA;EAAA;CAAA;CAAA;EAAAG;EAAA;EAAA;CAAA;CAAA;EAAAC;EAAA;EAAA;CAAA;CAAA;EAAAC;EAAA;EAAA;CAAA;AAAA,GAAAvB,GAAA,GAAA,KAAA,GAlJsDb,CAAY,GAAAqC,IAAA0E,IAAA,cAAAC,GAAA;CAAAzE,cAAA;EAAA,MAAAzB,CAAA,GAAA2B,EAAA,MAAA,UACjD/B,CAAM,GAAAmG,EAAA;CAAA;AAAA,GAAApE,EAAAsE,GAAAhG,GAAA,KAAA,CAAA,GAAAgG,GAAA"}
@@ -1 +1 @@
1
- export { n as FileExplorerHeader, t as default } from "../chunks/file-explorer-header-Djp_eFuT.js";
1
+ export { n as FileExplorerHeader, t as default } from "../chunks/file-explorer-header-Bu06_N7G.js";
@@ -1 +1 @@
1
- export { n as FileExplorerProvider, t as default } from "../chunks/file-explorer-provider-DpjC7uds.js";
1
+ export { n as FileExplorerProvider, t as default } from "../chunks/file-explorer-provider-DqZDDpUX.js";