solid-ui 5.0.2-3 → 5.0.2-4

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 (185) hide show
  1. package/dist/chunks/{DialogProvider-dagk2fHm.js → DialogProvider-CdesAsw-.js} +5 -6
  2. package/dist/chunks/{DialogProvider-dagk2fHm.js.map → DialogProvider-CdesAsw-.js.map} +1 -1
  3. package/dist/chunks/{ResourceActionsMenu-o-8kWx8z.js → ResourceActionsMenu-Bllpr4M5.js} +15 -16
  4. package/dist/chunks/{ResourceActionsMenu-o-8kWx8z.js.map → ResourceActionsMenu-Bllpr4M5.js.map} +1 -1
  5. package/dist/chunks/{access-control-modal-CWH98HX3.js → access-control-modal-CwmY_Dod.js} +74 -75
  6. package/dist/chunks/{access-control-modal-CWH98HX3.js.map → access-control-modal-CwmY_Dod.js.map} +1 -1
  7. package/dist/chunks/{account-Cocvv0H3.js → account-CoHPKKDu.js} +20 -21
  8. package/dist/chunks/{account-Cocvv0H3.js.map → account-CoHPKKDu.js.map} +1 -1
  9. package/dist/chunks/{auth-Df5uYksz.js → auth-CocCqS1p.js} +18 -19
  10. package/dist/chunks/{auth-Df5uYksz.js.map → auth-CocCqS1p.js.map} +1 -1
  11. package/dist/chunks/{avatar-DeotTinS.js → avatar-sNdKdWVO.js} +10 -11
  12. package/dist/chunks/{avatar-DeotTinS.js.map → avatar-sNdKdWVO.js.map} +1 -1
  13. package/dist/chunks/{button-Dy1aFjqG.js → button-D6qO2idW.js} +10 -11
  14. package/dist/chunks/{button-Dy1aFjqG.js.map → button-D6qO2idW.js.map} +1 -1
  15. package/dist/chunks/{chunk.UEBQI7VV-9M5gO7Ew.js → chunk.UEBQI7VV-lcP-fpUk.js} +12 -9
  16. package/dist/chunks/chunk.UEBQI7VV-lcP-fpUk.js.map +1 -0
  17. package/dist/chunks/{combobox-BL0-8wef.js → combobox-fSTp9qoT.js} +17 -18
  18. package/dist/chunks/{combobox-BL0-8wef.js.map → combobox-fSTp9qoT.js.map} +1 -1
  19. package/dist/chunks/{combobox-option-DjlmXt1O.js → combobox-option-DOtGuKel.js} +7 -8
  20. package/dist/chunks/{combobox-option-DjlmXt1O.js.map → combobox-option-DOtGuKel.js.map} +1 -1
  21. package/dist/chunks/{components-LxiwG5ae.js → components-C8c2Ucm5.js} +201 -190
  22. package/dist/chunks/components-C8c2Ucm5.js.map +1 -0
  23. package/dist/chunks/{context-By_u12WA.js → context-BDrfQ9bN.js} +2 -2
  24. package/dist/chunks/{context-By_u12WA.js.map → context-BDrfQ9bN.js.map} +1 -1
  25. package/dist/chunks/{dialog-CrmftB9c.js → dialog-CgYK767T.js} +15 -16
  26. package/dist/chunks/{dialog-CrmftB9c.js.map → dialog-CgYK767T.js.map} +1 -1
  27. package/dist/chunks/{dialog-content-Cw3xqJ45.js → dialog-content-DjwRH1ci.js} +5 -6
  28. package/dist/chunks/{dialog-content-Cw3xqJ45.js.map → dialog-content-DjwRH1ci.js.map} +1 -1
  29. package/dist/chunks/{dialog-footer-sFQf-2zD.js → dialog-footer-GQWi8lfB.js} +5 -6
  30. package/dist/chunks/{dialog-footer-sFQf-2zD.js.map → dialog-footer-GQWi8lfB.js.map} +1 -1
  31. package/dist/chunks/{dialog-header-xIWIqfZK.js → dialog-header-c3qOMQfb.js} +5 -6
  32. package/dist/chunks/{dialog-header-xIWIqfZK.js.map → dialog-header-c3qOMQfb.js.map} +1 -1
  33. package/dist/chunks/{dialogs-B3tHtjMf.js → dialogs-BmtLjMzg.js} +2 -2
  34. package/dist/chunks/{dialogs-B3tHtjMf.js.map → dialogs-BmtLjMzg.js.map} +1 -1
  35. package/dist/chunks/{dialogs-root-Lh2u-3Cs.js → dialogs-root-BNF3_SA8.js} +8 -9
  36. package/dist/chunks/{dialogs-root-Lh2u-3Cs.js.map → dialogs-root-BNF3_SA8.js.map} +1 -1
  37. package/dist/chunks/{error-state-DnsXVj1z.js → error-state-BD4_Wrkz.js} +10 -11
  38. package/dist/chunks/{error-state-DnsXVj1z.js.map → error-state-BD4_Wrkz.js.map} +1 -1
  39. package/dist/chunks/{file-explorer-header-B6-Q0i6V.js → file-explorer-header-D0TebSYR.js} +33 -34
  40. package/dist/chunks/file-explorer-header-D0TebSYR.js.map +1 -0
  41. package/dist/chunks/{file-explorer-provider-B3gUBkHg.js → file-explorer-provider-DpjC7uds.js} +8 -9
  42. package/dist/chunks/{file-explorer-provider-B3gUBkHg.js.map → file-explorer-provider-DpjC7uds.js.map} +1 -1
  43. package/dist/chunks/{guard-C39y81In.js → guard-BOicu9dt.js} +10 -11
  44. package/dist/chunks/{guard-C39y81In.js.map → guard-BOicu9dt.js.map} +1 -1
  45. package/dist/chunks/{input-Bi6ZBZQw.js → input-Bz3l514j.js} +11 -12
  46. package/dist/chunks/{input-Bi6ZBZQw.js.map → input-Bz3l514j.js.map} +1 -1
  47. package/dist/chunks/{login-button-fo0P8vym.js → login-button-clTw_9tX.js} +9 -10
  48. package/dist/chunks/{login-button-fo0P8vym.js.map → login-button-clTw_9tX.js.map} +1 -1
  49. package/dist/chunks/{logout-button-CF2YFgID.js → logout-button-CP-Pz70O.js} +9 -10
  50. package/dist/chunks/{logout-button-CF2YFgID.js.map → logout-button-CP-Pz70O.js.map} +1 -1
  51. package/dist/chunks/{menu-RumUciM-.js → menu-D0k2fkiE.js} +47 -49
  52. package/dist/chunks/{menu-RumUciM-.js.map → menu-D0k2fkiE.js.map} +1 -1
  53. package/dist/chunks/{menu-item-CVAZyipz.js → menu-item-nfPpH4dN.js} +10 -11
  54. package/dist/chunks/{menu-item-CVAZyipz.js.map → menu-item-nfPpH4dN.js.map} +1 -1
  55. package/dist/chunks/{photo-capture-CAfo7y6-.js → photo-capture-hJaJm4TM.js} +20 -21
  56. package/dist/chunks/photo-capture-hJaJm4TM.js.map +1 -0
  57. package/dist/chunks/{photo-capture-modal-DWmDE_Ws.js → photo-capture-modal-BsHv6wmh.js} +28 -29
  58. package/dist/chunks/{photo-capture-modal-DWmDE_Ws.js.map → photo-capture-modal-BsHv6wmh.js.map} +1 -1
  59. package/dist/chunks/{provide-B5NeVMM_.js → provide-z9U64q4m.js} +2 -2
  60. package/dist/chunks/{provide-B5NeVMM_.js.map → provide-z9U64q4m.js.map} +1 -1
  61. package/dist/chunks/{provider-BbT2duMy.js → provider-Cuv3Kp6G.js} +10 -11
  62. package/dist/chunks/{provider-BbT2duMy.js.map → provider-Cuv3Kp6G.js.map} +1 -1
  63. package/dist/chunks/{rdf-form-CH9bDx98.js → rdf-form-DVmTw3RG.js} +23 -24
  64. package/dist/chunks/{rdf-form-CH9bDx98.js.map → rdf-form-DVmTw3RG.js.map} +1 -1
  65. package/dist/chunks/{rdf-input-C_V0pIS5.js → rdf-input-CRYLK-27.js} +15 -16
  66. package/dist/chunks/{rdf-input-C_V0pIS5.js.map → rdf-input-CRYLK-27.js.map} +1 -1
  67. package/dist/chunks/{select-y1Z6fwmh.js → select-ClPkDkGl.js} +9 -10
  68. package/dist/chunks/{select-y1Z6fwmh.js.map → select-ClPkDkGl.js.map} +1 -1
  69. package/dist/chunks/{select-option-U4ALXL20.js → select-option-DQan7rcB.js} +7 -8
  70. package/dist/chunks/{select-option-U4ALXL20.js.map → select-option-DQan7rcB.js.map} +1 -1
  71. package/dist/chunks/{signup-button-DicFpAjD.js → signup-button-CexdMWj6.js} +9 -10
  72. package/dist/chunks/{signup-button-DicFpAjD.js.map → signup-button-CexdMWj6.js.map} +1 -1
  73. package/dist/chunks/{solid-emblem-CeCXTpve.js → solid-emblem-DwLdkGuO.js} +7 -8
  74. package/dist/chunks/{solid-emblem-CeCXTpve.js.map → solid-emblem-DwLdkGuO.js.map} +1 -1
  75. package/dist/chunks/{src-Bhtor0ZC.js → src-DQgHAH3d.js} +2934 -2926
  76. package/dist/chunks/src-DQgHAH3d.js.map +1 -0
  77. package/dist/components/access-control-modal/AccessControlAddAccess.esm.js.map +1 -1
  78. package/dist/components/access-control-modal/AccessControlErrors.esm.js.map +1 -1
  79. package/dist/components/access-control-modal/AccessControlGeneralAccess.esm.js.map +1 -1
  80. package/dist/components/access-control-modal/AccessControlModal.esm.js.map +1 -1
  81. package/dist/components/access-control-modal/AccessControlSharedAccess.esm.js.map +1 -1
  82. package/dist/components/access-control-modal.js +1 -1
  83. package/dist/components/account/Account.esm.js.map +1 -1
  84. package/dist/components/account.js +1 -1
  85. package/dist/components/avatar.js +1 -1
  86. package/dist/components/button/Button.esm.js.map +1 -1
  87. package/dist/components/button.js +1 -1
  88. package/dist/components/combobox/Combobox.esm.js.map +1 -1
  89. package/dist/components/combobox-option/ComboboxOption.esm.js.map +1 -1
  90. package/dist/components/combobox-option.js +1 -1
  91. package/dist/components/combobox.js +1 -1
  92. package/dist/components/dialog/Dialog.esm.js.map +1 -1
  93. package/dist/components/dialog-content.js +1 -1
  94. package/dist/components/dialog-footer.js +1 -1
  95. package/dist/components/dialog-header.js +1 -1
  96. package/dist/components/dialog-provider/DialogProvider.esm.js.map +1 -1
  97. package/dist/components/dialog-provider.js +1 -1
  98. package/dist/components/dialog.js +1 -1
  99. package/dist/components/dialogs-root/DialogsRoot.esm.js.map +1 -1
  100. package/dist/components/dialogs-root.js +1 -1
  101. package/dist/components/error-state/ErrorState.esm.js.map +1 -1
  102. package/dist/components/error-state.js +1 -1
  103. package/dist/components/file-explorer-header/FileExplorerHeader.cjs.js +2 -2
  104. package/dist/components/file-explorer-header/FileExplorerHeader.cjs.js.map +1 -1
  105. package/dist/components/file-explorer-header/FileExplorerHeader.d.ts.map +1 -1
  106. package/dist/components/file-explorer-header/FileExplorerHeader.esm.js +20 -19
  107. package/dist/components/file-explorer-header/FileExplorerHeader.esm.js.map +1 -1
  108. package/dist/components/file-explorer-header/FileExplorerHeaderControls.cjs.js +6 -6
  109. package/dist/components/file-explorer-header/FileExplorerHeaderControls.cjs.js.map +1 -1
  110. package/dist/components/file-explorer-header/FileExplorerHeaderControls.d.ts.map +1 -1
  111. package/dist/components/file-explorer-header/FileExplorerHeaderControls.esm.js +24 -23
  112. package/dist/components/file-explorer-header/FileExplorerHeaderControls.esm.js.map +1 -1
  113. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.cjs.js +7 -7
  114. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.cjs.js.map +1 -1
  115. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.d.ts.map +1 -1
  116. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.esm.js +25 -24
  117. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.esm.js.map +1 -1
  118. package/dist/components/file-explorer-header.js +1 -1
  119. package/dist/components/file-explorer-provider/FileExplorerProvider.cjs.js +1 -1
  120. package/dist/components/file-explorer-provider/FileExplorerProvider.cjs.js.map +1 -1
  121. package/dist/components/file-explorer-provider/FileExplorerProvider.d.ts +1 -1
  122. package/dist/components/file-explorer-provider/FileExplorerProvider.d.ts.map +1 -1
  123. package/dist/components/file-explorer-provider/FileExplorerProvider.esm.js +8 -7
  124. package/dist/components/file-explorer-provider/FileExplorerProvider.esm.js.map +1 -1
  125. package/dist/components/file-explorer-provider.js +1 -1
  126. package/dist/components/guard.js +1 -1
  127. package/dist/components/input/Input.esm.js.map +1 -1
  128. package/dist/components/input.js +1 -1
  129. package/dist/components/login-button.js +1 -1
  130. package/dist/components/login-modal/LoginModal.esm.js.map +1 -1
  131. package/dist/components/login-modal.js +1 -1
  132. package/dist/components/logout-button.js +1 -1
  133. package/dist/components/menu/Menu.esm.js.map +1 -1
  134. package/dist/components/menu-item/MenuItem.esm.js.map +1 -1
  135. package/dist/components/menu-item.js +1 -1
  136. package/dist/components/menu.js +1 -1
  137. package/dist/components/photo-capture/PhotoCapture.esm.js.map +1 -1
  138. package/dist/components/photo-capture-modal/PhotoCaptureModal.esm.js.map +1 -1
  139. package/dist/components/photo-capture-modal.js +1 -1
  140. package/dist/components/photo-capture.js +1 -1
  141. package/dist/components/provider/Provider.esm.js.map +1 -1
  142. package/dist/components/provider.js +1 -1
  143. package/dist/components/rdf-form/RDFForm.esm.js.map +1 -1
  144. package/dist/components/rdf-form.js +1 -1
  145. package/dist/components/rdf-input/RDFInput.esm.js.map +1 -1
  146. package/dist/components/rdf-input.js +1 -1
  147. package/dist/components/resource-actions-menu/ResourceActionsMenu.cjs.js +8 -8
  148. package/dist/components/resource-actions-menu/ResourceActionsMenu.cjs.js.map +1 -1
  149. package/dist/components/resource-actions-menu/ResourceActionsMenu.d.ts.map +1 -1
  150. package/dist/components/resource-actions-menu/ResourceActionsMenu.esm.js +18 -17
  151. package/dist/components/resource-actions-menu/ResourceActionsMenu.esm.js.map +1 -1
  152. package/dist/components/resource-actions-menu.js +1 -1
  153. package/dist/components/select/Select.esm.js.map +1 -1
  154. package/dist/components/select-option/SelectOption.esm.js.map +1 -1
  155. package/dist/components/select-option.js +1 -1
  156. package/dist/components/select.js +1 -1
  157. package/dist/components/signup-button.js +1 -1
  158. package/dist/components/solid-emblem.js +1 -1
  159. package/dist/components.js +30 -30
  160. package/dist/index.cjs.js +1 -1
  161. package/dist/index.esm.js +5 -5
  162. package/dist/index.esm.js.map +1 -1
  163. package/dist/index.js +8 -9
  164. package/dist/lib/file-explorer/index.cjs.js +1 -1
  165. package/dist/lib/file-explorer/index.esm.js +3 -3
  166. package/dist/lib/file-explorer/relevant-panes.cjs.js +1 -1
  167. package/dist/lib/file-explorer/relevant-panes.cjs.js.map +1 -1
  168. package/dist/lib/file-explorer/relevant-panes.d.ts +7 -0
  169. package/dist/lib/file-explorer/relevant-panes.d.ts.map +1 -1
  170. package/dist/lib/file-explorer/relevant-panes.esm.js +14 -5
  171. package/dist/lib/file-explorer/relevant-panes.esm.js.map +1 -1
  172. package/dist/loader.js +8 -9
  173. package/dist/solid-ui.js +28 -28
  174. package/dist/solid-ui.min.js +28 -28
  175. package/dist/solid-ui.min.js.map +1 -1
  176. package/package.json +1 -1
  177. package/dist/chunks/chunk.UEBQI7VV-9M5gO7Ew.js.map +0 -1
  178. package/dist/chunks/components-LxiwG5ae.js.map +0 -1
  179. package/dist/chunks/custom-element-BW8Ua4c7.js +0 -9
  180. package/dist/chunks/custom-element-BW8Ua4c7.js.map +0 -1
  181. package/dist/chunks/decorators-V-B013l9.js +0 -12
  182. package/dist/chunks/decorators-V-B013l9.js.map +0 -1
  183. package/dist/chunks/file-explorer-header-B6-Q0i6V.js.map +0 -1
  184. package/dist/chunks/photo-capture-CAfo7y6-.js.map +0 -1
  185. package/dist/chunks/src-Bhtor0ZC.js.map +0 -1
@@ -1,18 +1,19 @@
1
- import e from "../../lib/components/web-component/WebComponent.esm.js";
1
+ import { customElement as e } from "../../lib/components/decorators.esm.js";
2
+ import t from "../../lib/components/web-component/WebComponent.esm.js";
2
3
  import "../../lib/components/index.esm.js";
3
- import { DEFAULT_FILE_EXPLORER_CONTEXT as t, fileExplorerContext as n } from "../../lib/file-explorer/context.esm.js";
4
- import { FILE_EXPLORER_BACK_EVENT as r } from "../../lib/file-explorer/events.esm.js";
4
+ import { DEFAULT_FILE_EXPLORER_CONTEXT as n, fileExplorerContext as r } from "../../lib/file-explorer/context.esm.js";
5
+ import { FILE_EXPLORER_BACK_EVENT as i } from "../../lib/file-explorer/events.esm.js";
5
6
  import "../../_virtual/~icons/lucide/share-2.esm.js";
6
7
  import "../../_virtual/~icons/lucide/pencil.esm.js";
7
8
  import "../../_virtual/~icons/lucide/ellipsis-vertical.esm.js";
8
- import i from "./FileExplorerHeader.styles.esm.js";
9
+ import a from "./FileExplorerHeader.styles.esm.js";
9
10
  import "./FileExplorerHeaderSummary.esm.js";
10
11
  import "./FileExplorerHeaderControls.esm.js";
11
- import { sym as a } from "rdflib";
12
- import { solidLogicSingleton as o } from "solid-logic";
13
- import { consume as s } from "@lit/context";
14
- import { html as c } from "lit";
15
- import { customElement as l, property as u, state as d } from "lit/decorators.js";
12
+ import { sym as o } from "rdflib";
13
+ import { solidLogicSingleton as s } from "solid-logic";
14
+ import { consume as c } from "@lit/context";
15
+ import { html as l } from "lit";
16
+ import { property as u, state as d } from "lit/decorators.js";
16
17
  // src/components/file-explorer-header/FileExplorerHeader.ts
17
18
  var f, p, m, h, g, _, v, y, b, x, S, C, w, T, E, D, O, k, A;
18
19
  function j(e, t, n) {
@@ -186,21 +187,21 @@ function V(e) {
186
187
  function H(e) {
187
188
  return e;
188
189
  }
189
- b = [l("solid-ui-file-explorer-header")];
190
+ b = [e("solid-ui-file-explorer-header")];
190
191
  var U;
191
- new (k = (m = /*#__PURE__*/ new WeakMap(), h = /*#__PURE__*/ new WeakMap(), g = /*#__PURE__*/ new WeakMap(), _ = /*#__PURE__*/ new WeakMap(), A = (x = s({
192
- context: n,
192
+ new (k = (m = /*#__PURE__*/ new WeakMap(), h = /*#__PURE__*/ new WeakMap(), g = /*#__PURE__*/ new WeakMap(), _ = /*#__PURE__*/ new WeakMap(), A = (x = c({
193
+ context: r,
193
194
  subscribe: !0
194
- }), C = u({ attribute: !1 }), T = u({ attribute: !1 }), D = d(), "_loadedMetadataForUri"), p = class extends e {
195
+ }), C = u({ attribute: !1 }), T = u({ attribute: !1 }), D = d(), "_loadedMetadataForUri"), p = class extends t {
195
196
  constructor(...e) {
196
- super(...e), I(this, A, void v(this)), I(this, "_metadataGeneration", 0), j(this, m, S(this, t)), j(this, h, w(this, [])), j(this, g, E(this, void 0)), j(this, _, O(this, {
197
+ super(...e), I(this, A, void v(this)), I(this, "_metadataGeneration", 0), j(this, m, S(this, n)), j(this, h, w(this, [])), j(this, g, E(this, void 0)), j(this, _, O(this, {
197
198
  modified: void 0,
198
199
  isPublic: !1,
199
200
  canEdit: !1,
200
201
  canManageAccess: !1,
201
202
  aclUri: void 0
202
203
  })), I(this, "handleBack", () => {
203
- this.dispatchEvent(new CustomEvent(r, {
204
+ this.dispatchEvent(new CustomEvent(i, {
204
205
  bubbles: !0,
205
206
  composed: !0,
206
207
  detail: { subjectUri: this.fileExplorerContext.subjectUri }
@@ -250,7 +251,7 @@ new (k = (m = /*#__PURE__*/ new WeakMap(), h = /*#__PURE__*/ new WeakMap(), g =
250
251
  }
251
252
  async loadResponseMetadata(e, t) {
252
253
  try {
253
- let n = await o.resource.fetchMetadata(a(e));
254
+ let n = await s.resource.fetchMetadata(o(e));
254
255
  t === this._metadataGeneration && this.fileExplorerContext.subjectUri === e && (this.responseMetadata = {
255
256
  modified: n.modified,
256
257
  isPublic: n.access.isPublic,
@@ -263,7 +264,7 @@ new (k = (m = /*#__PURE__*/ new WeakMap(), h = /*#__PURE__*/ new WeakMap(), g =
263
264
  }
264
265
  }
265
266
  render() {
266
- return c`
267
+ return l`
267
268
  <header>
268
269
  <solid-ui-file-explorer-header-summary
269
270
  .paneIcon=${this.paneIcon}
@@ -299,9 +300,9 @@ new (k = (m = /*#__PURE__*/ new WeakMap(), h = /*#__PURE__*/ new WeakMap(), g =
299
300
  1,
300
301
  "responseMetadata"
301
302
  ]
302
- ], b, 0, void 0, e), p), f = class extends H {
303
+ ], b, 0, void 0, t), p), f = class extends H {
303
304
  constructor() {
304
- super(U), I(this, "styles", i), y();
305
+ super(U), I(this, "styles", a), y();
305
306
  }
306
307
  }, I(f, k, void 0), f)();
307
308
  export { U as default };
@@ -1 +1 @@
1
- {"version":3,"file":"FileExplorerHeader.esm.js","names":["sym","solidLogicSingleton","WebComponent","DEFAULT_FILE_EXPLORER_CONTEXT","fileExplorerContext","FILE_EXPLORER_BACK_EVENT","customElement","property","state","consume","html","styles","_classDecs","_FileExplorerHeader","_FileExplorerHeader2","_A","WeakMap","_B","_C","_D","_ref","_fileExplorerContextDecs","context","subscribe","_menuItemsDecs","attribute","_paneIconDecs","_responseMetadataDecs","_FileExplorerHeader3","FileExplorerHeader","constructor","args","_defineProperty","_initProto","_classPrivateFieldInitSpec","_init_fileExplorerContext","_init_menuItems","_init_paneIcon","undefined","_init_responseMetadata","modified","isPublic","canEdit","canManageAccess","aclUri","dispatchEvent","CustomEvent","bubbles","composed","detail","subjectUri","_classPrivateFieldGet","v","_classPrivateFieldSet","menuItems","paneIcon","responseMetadata","getDefaultResponseMetadata","willUpdate","store","_loadedMetadataForUri","generation","_metadataGeneration","loadResponseMetadata","metadata","resource","fetchMetadata","access","error","console","warn","render","handleBack","e","c","_initClass","_applyDecs","_Class","_identity","default","styles","WebComponent","FileExplorerHeader_styles_default","_Class","_FileExplorerHeader3","_A","_B","_C","_D","_initProto","_initClass","_classDecs","_fileExplorerContextDecs","_init_fileExplorerContext","_menuItemsDecs","_init_menuItems","_paneIconDecs","_init_paneIcon","_responseMetadataDecs","_init_responseMetadata","_FileExplorerHeader2","_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","_FileExplorerHeader","consume","fileExplorerContext","property","state","args","DEFAULT_FILE_EXPLORER_CONTEXT","FILE_EXPLORER_BACK_EVENT","subjectUri","generation","metadata","solidLogicSingleton","sym","error"],"sources":["../../../src/components/file-explorer-header/FileExplorerHeader.ts"],"sourcesContent":["import { sym } from 'rdflib'\nimport { solidLogicSingleton } from 'solid-logic'\nimport { WebComponent } from '@/lib/components'\nimport { DEFAULT_FILE_EXPLORER_CONTEXT, fileExplorerContext } from '@/lib/file-explorer/context'\nimport { FILE_EXPLORER_BACK_EVENT } from '@/lib/file-explorer/events'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { consume } from '@lit/context'\nimport { html } from 'lit'\nimport '~icons/lucide/share-2'\nimport '~icons/lucide/pencil'\nimport '~icons/lucide/ellipsis-vertical'\nimport styles from './FileExplorerHeader.styles.css'\nimport './FileExplorerHeaderSummary'\nimport './FileExplorerHeaderControls'\nimport { PaneIcon } from './types'\nimport { type FileExplorerResourceMetadata } from './types'\n\n@customElement('solid-ui-file-explorer-header')\nexport default class FileExplorerHeader extends WebComponent {\n static styles = styles\n\n private _loadedMetadataForUri: string | undefined\n private _metadataGeneration = 0\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 }> = []\n\n @property({ attribute: false })\n accessor paneIcon: PaneIcon = undefined as unknown as PaneIcon\n\n @state()\n accessor responseMetadata: Pick<FileExplorerResourceMetadata, 'modified' | 'isPublic' | 'canEdit' | 'canManageAccess' | 'aclUri'> = {\n modified: undefined,\n isPublic: false,\n canEdit: false,\n canManageAccess: false,\n aclUri: undefined\n }\n\n private handleBack = () => {\n this.dispatchEvent(new CustomEvent(FILE_EXPLORER_BACK_EVENT, {\n bubbles: true,\n composed: true,\n detail: {\n subjectUri: this.fileExplorerContext.subjectUri\n }\n }))\n }\n\n private getDefaultResponseMetadata (): Pick<FileExplorerResourceMetadata, 'modified' | 'isPublic' | 'canEdit' | 'canManageAccess' | 'aclUri'> {\n return {\n modified: undefined,\n isPublic: false,\n canEdit: false,\n canManageAccess: false,\n aclUri: undefined\n }\n }\n\n protected willUpdate () {\n const subjectUri = this.fileExplorerContext?.subjectUri\n if (this.fileExplorerContext?.store && subjectUri && this._loadedMetadataForUri !== subjectUri) {\n this._loadedMetadataForUri = subjectUri\n const generation = ++this._metadataGeneration\n this.responseMetadata = this.getDefaultResponseMetadata()\n this.loadResponseMetadata(subjectUri, generation)\n }\n }\n\n private async loadResponseMetadata (subjectUri: string, generation: number) {\n try {\n const metadata = await solidLogicSingleton.resource.fetchMetadata(sym(subjectUri))\n if (generation === this._metadataGeneration && this.fileExplorerContext.subjectUri === subjectUri) {\n this.responseMetadata = {\n modified: metadata.modified,\n isPublic: metadata.access.isPublic,\n canEdit: metadata.access.canEdit,\n canManageAccess: metadata.access.canManageAccess,\n aclUri: metadata.aclUri\n }\n }\n } catch (error) {\n if (generation === this._metadataGeneration && this.fileExplorerContext.subjectUri === subjectUri) {\n this.responseMetadata = this.getDefaultResponseMetadata()\n console.warn('Failed to load response metadata', error)\n }\n }\n }\n\n render () {\n return html`\n <header>\n <solid-ui-file-explorer-header-summary\n .paneIcon=${this.paneIcon}\n .onBackClick=${this.handleBack}\n .responseMetadata=${this.responseMetadata}\n ></solid-ui-file-explorer-header-summary>\n <solid-ui-file-explorer-header-controls\n .menuItems=${this.menuItems}\n .canEdit=${this.responseMetadata.canEdit}\n .canManageAccess=${this.responseMetadata.canManageAccess}\n ></solid-ui-file-explorer-header-controls>\n </header>\n `\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAaqCY,IAAA,CAIpCN,EAAc,+BAA+B,CAAC;AAAA,IAAAO;AAAA,KAAAC,KAAAC,kBAAA,IAAAC,QAAA,GAAAC,kBAAA,IAAAD,QAAA,GAAAE,kBAAA,IAAAF,QAAA,GAAAG,kBAAA,IAAAH,QAAA,GAAAI,KAAAC,IAO5CZ,EAAQ;CAAEa,SAASlB;CAAqBmB,WAAW;AAAK,CAAC,GAACC,IAG1DjB,EAAS,EAAEkB,WAAW,GAAM,CAAC,GAACC,IAG9BnB,EAAS,EAAEkB,WAAW,GAAM,CAAC,GAACE,IAG9BnB,EAAM,GAAC,0BAAAoB,IAhBV,cACgD1B,EAAa;CAAA4B,YAAA,GAAAC,GAAA;EAsB1DC,AAtB0D,MAAA,GAAAD,CAAA,GAAAC,EAAA,MAAAZ,GAAA,KAAAa,EAAA,IAAA,CAAA,GAAAD,EAAA,MAAA,uBAI7B,CAAC,GAAAE,EAAA,MAAAnB,GAAAoB,EAAA,MAGAhC,CAA6B,CAAA,GAAA+B,EAAA,MAAAjB,GAAAmB,EAAA,MAGmB,CAAA,CAAE,CAAA,GAAAF,EAAA,MAAAhB,GAAAmB,EAAA,MAGnDC,K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{"version":3,"file":"FileExplorerHeader.esm.js","names":["sym","solidLogicSingleton","customElement","WebComponent","DEFAULT_FILE_EXPLORER_CONTEXT","fileExplorerContext","FILE_EXPLORER_BACK_EVENT","property","state","consume","html","styles","_classDecs","_FileExplorerHeader","_FileExplorerHeader2","_A","WeakMap","_B","_C","_D","_ref","_fileExplorerContextDecs","context","subscribe","_menuItemsDecs","attribute","_paneIconDecs","_responseMetadataDecs","_FileExplorerHeader3","FileExplorerHeader","constructor","args","_defineProperty","_initProto","_classPrivateFieldInitSpec","_init_fileExplorerContext","_init_menuItems","_init_paneIcon","undefined","_init_responseMetadata","modified","isPublic","canEdit","canManageAccess","aclUri","dispatchEvent","CustomEvent","bubbles","composed","detail","subjectUri","_classPrivateFieldGet","v","_classPrivateFieldSet","menuItems","paneIcon","responseMetadata","getDefaultResponseMetadata","willUpdate","store","_loadedMetadataForUri","generation","_metadataGeneration","loadResponseMetadata","metadata","resource","fetchMetadata","access","error","console","warn","render","handleBack","e","c","_initClass","_applyDecs","_Class","_identity","default","styles","WebComponent","FileExplorerHeader_styles_default","_Class","_FileExplorerHeader3","_A","_B","_C","_D","_initProto","_initClass","_classDecs","_fileExplorerContextDecs","_init_fileExplorerContext","_menuItemsDecs","_init_menuItems","_paneIconDecs","_init_paneIcon","_responseMetadataDecs","_init_responseMetadata","_FileExplorerHeader2","_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","_FileExplorerHeader","consume","fileExplorerContext","property","state","args","DEFAULT_FILE_EXPLORER_CONTEXT","FILE_EXPLORER_BACK_EVENT","subjectUri","generation","metadata","solidLogicSingleton","sym","error"],"sources":["../../../src/components/file-explorer-header/FileExplorerHeader.ts"],"sourcesContent":["import { sym } from 'rdflib'\nimport { solidLogicSingleton } from 'solid-logic'\nimport { customElement, WebComponent } from '@/lib/components'\nimport { DEFAULT_FILE_EXPLORER_CONTEXT, fileExplorerContext } from '@/lib/file-explorer/context'\nimport { FILE_EXPLORER_BACK_EVENT } from '@/lib/file-explorer/events'\nimport { property, state } from 'lit/decorators.js'\nimport { consume } from '@lit/context'\nimport { html } from 'lit'\nimport '~icons/lucide/share-2'\nimport '~icons/lucide/pencil'\nimport '~icons/lucide/ellipsis-vertical'\nimport styles from './FileExplorerHeader.styles.css'\nimport './FileExplorerHeaderSummary'\nimport './FileExplorerHeaderControls'\nimport { PaneIcon } from './types'\nimport { type FileExplorerResourceMetadata } from './types'\n\n@customElement('solid-ui-file-explorer-header')\nexport default class FileExplorerHeader extends WebComponent {\n static styles = styles\n\n private _loadedMetadataForUri: string | undefined\n private _metadataGeneration = 0\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 }> = []\n\n @property({ attribute: false })\n accessor paneIcon: PaneIcon = undefined as unknown as PaneIcon\n\n @state()\n accessor responseMetadata: Pick<FileExplorerResourceMetadata, 'modified' | 'isPublic' | 'canEdit' | 'canManageAccess' | 'aclUri'> = {\n modified: undefined,\n isPublic: false,\n canEdit: false,\n canManageAccess: false,\n aclUri: undefined\n }\n\n private handleBack = () => {\n this.dispatchEvent(new CustomEvent(FILE_EXPLORER_BACK_EVENT, {\n bubbles: true,\n composed: true,\n detail: {\n subjectUri: this.fileExplorerContext.subjectUri\n }\n }))\n }\n\n private getDefaultResponseMetadata (): Pick<FileExplorerResourceMetadata, 'modified' | 'isPublic' | 'canEdit' | 'canManageAccess' | 'aclUri'> {\n return {\n modified: undefined,\n isPublic: false,\n canEdit: false,\n canManageAccess: false,\n aclUri: undefined\n }\n }\n\n protected willUpdate () {\n const subjectUri = this.fileExplorerContext?.subjectUri\n if (this.fileExplorerContext?.store && subjectUri && this._loadedMetadataForUri !== subjectUri) {\n this._loadedMetadataForUri = subjectUri\n const generation = ++this._metadataGeneration\n this.responseMetadata = this.getDefaultResponseMetadata()\n this.loadResponseMetadata(subjectUri, generation)\n }\n }\n\n private async loadResponseMetadata (subjectUri: string, generation: number) {\n try {\n const metadata = await solidLogicSingleton.resource.fetchMetadata(sym(subjectUri))\n if (generation === this._metadataGeneration && this.fileExplorerContext.subjectUri === subjectUri) {\n this.responseMetadata = {\n modified: metadata.modified,\n isPublic: metadata.access.isPublic,\n canEdit: metadata.access.canEdit,\n canManageAccess: metadata.access.canManageAccess,\n aclUri: metadata.aclUri\n }\n }\n } catch (error) {\n if (generation === this._metadataGeneration && this.fileExplorerContext.subjectUri === subjectUri) {\n this.responseMetadata = this.getDefaultResponseMetadata()\n console.warn('Failed to load response metadata', error)\n }\n }\n }\n\n render () {\n return html`\n <header>\n <solid-ui-file-explorer-header-summary\n .paneIcon=${this.paneIcon}\n .onBackClick=${this.handleBack}\n .responseMetadata=${this.responseMetadata}\n ></solid-ui-file-explorer-header-summary>\n <solid-ui-file-explorer-header-controls\n .menuItems=${this.menuItems}\n .canEdit=${this.responseMetadata.canEdit}\n .canManageAccess=${this.responseMetadata.canManageAccess}\n ></solid-ui-file-explorer-header-controls>\n </header>\n `\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAaqCY,IAAA,CAIpCV,EAAc,+BAA+B,CAAC;AAAA,IAAAW;AAAA,KAAAC,KAAAC,kBAAA,IAAAC,QAAA,GAAAC,kBAAA,IAAAD,QAAA,GAAAE,kBAAA,IAAAF,QAAA,GAAAG,kB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UAAS;qBAChB,KAAKE,iBAAiBd,QAAO;6BACrB,KAAKc,iBAAiBb,gBAAe;;;;CAIhE;AACF,GAAC,CAAA8B,GAAA,CAAAtC,GAAAC,GAAAC,GAAAE,GAAAN,IAAAyC,GAAA,CAAA7D,GAAA8D,MAAAC,EAAAhD,GAAA;CAAA;EAAAP;EAAA;EAAA;CAAA;CAAA;EAAAG;EAAA;EAAA;CAAA;CAAA;EAAAE;EAAA;EAAA;CAAA;CAAA;EAAAC;EAAA;EAAA;CAAA;AAAA,GAAAf,GAAA,GAAA,KAAA,GA1F+CT,CAAY,GAAAyB,IAAAiD,IAAA,cAAAC,EAAA;CAAAhD,cAAA;EAAA,MAAAjB,CAAA,GAAAmB,EAAA,MAAA,UAC1CrB,CAAM,GAAAgE,EAAA;CAAA;AAAA,GAAA3C,EAAA6C,GAAA/D,GAAA,KAAA,CAAA,GAAA+D,GAAA"}
@@ -1,12 +1,12 @@
1
- const e=require("../../lib/components/web-component/WebComponent.cjs.js");require("../../lib/components/index.cjs.js"),require("../button/index.cjs.js");const t=require("../../lib/file-explorer/context.cjs.js"),n=require("../../lib/file-explorer/events.cjs.js");require("../../_virtual/~icons/lucide/pencil.cjs.js");const r=require("../../utils/podUtils.cjs.js");require("../../_virtual/~icons/lucide/user-round-cog.cjs.js");const i=require("./FileExplorerHeaderControls.styles.cjs.js");require("../resource-actions-menu/ResourceActionsMenu.cjs.js");let a=require("@lit/context"),o=require("lit"),s=require("lit/decorators.js");var c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,k;function A(e,t,n){j(e,t),t.set(e,n)}function j(e,t){if(t.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function M(e,t,n){return e.set(P(e,t),n),n}function N(e,t){return e.get(P(e,t))}function P(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 F(e,t,n){return(t=L(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function I(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:z(function(){return v(this)},r,`get`),set:function(e){t[4](this,e)}}:b[S]=v,f||z(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 B(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:L(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 L(e){var t=R(e,`string`);return typeof t==`symbol`?t:t+``}function R(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 z(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 B(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 V(e){return e}_=[(0,s.customElement)(`solid-ui-file-explorer-header-controls`)];var H;new(O=(u=new WeakMap,d=new WeakMap,f=new WeakMap,p=new WeakMap,m=new WeakMap,k=(v=(0,a.consume)({context:t.fileExplorerContext,subscribe:!0}),b=(0,s.property)({attribute:!1}),S=(0,s.property)({type:Boolean}),w=(0,s.property)({type:Boolean}),E=(0,s.state)(),`mobileMediaQuery`),l=class extends e.default{constructor(...e){super(...e),F(this,k,void h(this)),F(this,`mobileQuery`,`(max-width: 600px)`),F(this,`handleMobileMediaChange`,e=>{this.isMobile=e.matches}),A(this,u,y(this,t.DEFAULT_FILE_EXPLORER_CONTEXT)),A(this,d,x(this,[])),A(this,f,C(this,!1)),A(this,p,T(this,!1)),A(this,m,D(this,typeof window<`u`&&typeof window.matchMedia==`function`&&window.matchMedia(`(max-width: 600px)`).matches)),F(this,`handleManageAccess`,()=>{let e=this.fileExplorerContext.subjectUri;e&&this.dispatchEvent(new CustomEvent(n.FILE_EXPLORER_MANAGE_ACCESS_EVENT,{bubbles:!0,composed:!0,detail:{subjectUri:e}}))})}get fileExplorerContext(){return N(u,this)}set fileExplorerContext(e){M(u,this,e)}get menuItems(){return N(d,this)}set menuItems(e){M(d,this,e)}get canEdit(){return N(f,this)}set canEdit(e){M(f,this,e)}get canManageAccess(){return N(p,this)}set canManageAccess(e){M(p,this,e)}get isMobile(){return N(m,this)}set isMobile(e){M(m,this,e)}connectedCallback(){super.connectedCallback(),typeof window<`u`&&typeof window.matchMedia==`function`&&(this.mobileMediaQuery=window.matchMedia(this.mobileQuery),this.isMobile=this.mobileMediaQuery.matches,this.mobileMediaQuery.addEventListener(`change`,this.handleMobileMediaChange))}disconnectedCallback(){this.mobileMediaQuery?.removeEventListener(`change`,this.handleMobileMediaChange),this.mobileMediaQuery=void 0,super.disconnectedCallback()}getEditTooltip(){return this.canEdit?`Edit`:`No Access`}renderDirtyIndicator(){return this.fileExplorerContext.isDirty?o.html`<span class="dirtyIndicator" title="This file has unsaved changes">Unsaved</span>`:o.nothing}render(){let e=r.isContainerSubject(this.fileExplorerContext.store,this.fileExplorerContext.subjectUri),t=this.fileExplorerContext.canEdit;return o.html`
1
+ const e=require("../../lib/components/decorators.cjs.js"),t=require("../../lib/components/web-component/WebComponent.cjs.js");require("../../lib/components/index.cjs.js"),require("../button/index.cjs.js");const n=require("../../lib/file-explorer/context.cjs.js"),r=require("../../lib/file-explorer/events.cjs.js");require("../../_virtual/~icons/lucide/pencil.cjs.js");const i=require("../../utils/podUtils.cjs.js");require("../../_virtual/~icons/lucide/user-round-cog.cjs.js");const a=require("./FileExplorerHeaderControls.styles.cjs.js");require("../resource-actions-menu/ResourceActionsMenu.cjs.js");let o=require("@lit/context"),s=require("lit"),c=require("lit/decorators.js");var l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,k,A;function j(e,t,n){M(e,t),t.set(e,n)}function M(e,t){if(t.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function N(e,t,n){return e.set(F(e,t),n),n}function P(e,t){return e.get(F(e,t))}function F(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 I(e,t,n){return(t=R(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function L(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:B(function(){return v(this)},r,`get`),set:function(e){t[4](this,e)}}:b[S]=v,f||B(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 V(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:R(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 R(e){var t=z(e,`string`);return typeof t==`symbol`?t:t+``}function z(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 B(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 V(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 H(e){return e}v=[e.customElement(`solid-ui-file-explorer-header-controls`)];var U;new(k=(d=new WeakMap,f=new WeakMap,p=new WeakMap,m=new WeakMap,h=new WeakMap,A=(y=(0,o.consume)({context:n.fileExplorerContext,subscribe:!0}),x=(0,c.property)({attribute:!1}),C=(0,c.property)({type:Boolean}),T=(0,c.property)({type:Boolean}),D=(0,c.state)(),`mobileMediaQuery`),u=class extends t.default{constructor(...e){super(...e),I(this,A,void g(this)),I(this,`mobileQuery`,`(max-width: 600px)`),I(this,`handleMobileMediaChange`,e=>{this.isMobile=e.matches}),j(this,d,b(this,n.DEFAULT_FILE_EXPLORER_CONTEXT)),j(this,f,S(this,[])),j(this,p,w(this,!1)),j(this,m,E(this,!1)),j(this,h,O(this,typeof window<`u`&&typeof window.matchMedia==`function`&&window.matchMedia(`(max-width: 600px)`).matches)),I(this,`handleManageAccess`,()=>{let e=this.fileExplorerContext.subjectUri;e&&this.dispatchEvent(new CustomEvent(r.FILE_EXPLORER_MANAGE_ACCESS_EVENT,{bubbles:!0,composed:!0,detail:{subjectUri:e}}))})}get fileExplorerContext(){return P(d,this)}set fileExplorerContext(e){N(d,this,e)}get menuItems(){return P(f,this)}set menuItems(e){N(f,this,e)}get canEdit(){return P(p,this)}set canEdit(e){N(p,this,e)}get canManageAccess(){return P(m,this)}set canManageAccess(e){N(m,this,e)}get isMobile(){return P(h,this)}set isMobile(e){N(h,this,e)}connectedCallback(){super.connectedCallback(),typeof window<`u`&&typeof window.matchMedia==`function`&&(this.mobileMediaQuery=window.matchMedia(this.mobileQuery),this.isMobile=this.mobileMediaQuery.matches,this.mobileMediaQuery.addEventListener(`change`,this.handleMobileMediaChange))}disconnectedCallback(){this.mobileMediaQuery?.removeEventListener(`change`,this.handleMobileMediaChange),this.mobileMediaQuery=void 0,super.disconnectedCallback()}getEditTooltip(){return this.canEdit?`Edit`:`No Access`}renderDirtyIndicator(){return this.fileExplorerContext.isDirty?s.html`<span class="dirtyIndicator" title="This file has unsaved changes">Unsaved</span>`:s.nothing}render(){let e=i.isContainerSubject(this.fileExplorerContext.store,this.fileExplorerContext.subjectUri),t=this.fileExplorerContext.canEdit;return s.html`
2
2
  <div>
3
3
  ${this.renderDirtyIndicator()}
4
- ${!e&&!this.isMobile&&this.canManageAccess?o.html`
4
+ ${!e&&!this.isMobile&&this.canManageAccess?s.html`
5
5
  <solid-ui-button class="file-explorer-header-action-button" variant="ghost" title="Manage Access" @click=${this.handleManageAccess}>
6
6
  <icon-lucide-user-round-cog slot="icon"></icon-lucide-user-round-cog>
7
7
  <span class="sr-only">Manage access</span>
8
8
  </solid-ui-button>
9
- ${t?o.html`
9
+ ${t?s.html`
10
10
  <solid-ui-button
11
11
  class="file-explorer-header-action-button"
12
12
  variant="ghost"
@@ -17,8 +17,8 @@ const e=require("../../lib/components/web-component/WebComponent.cjs.js");requir
17
17
  <icon-lucide-pencil slot="icon"></icon-lucide-pencil>
18
18
  <span class="sr-only">Edit</span>
19
19
  </solid-ui-button>
20
- `:o.nothing}
21
- `:o.nothing}
20
+ `:s.nothing}
21
+ `:s.nothing}
22
22
  <solid-ui-resource-actions-menu
23
23
  .store=${this.fileExplorerContext.store}
24
24
  .handleAccessClick=${this.handleManageAccess}
@@ -31,5 +31,5 @@ const e=require("../../lib/components/web-component/WebComponent.cjs.js");requir
31
31
  .isMobile=${this.isMobile}
32
32
  ></solid-ui-resource-actions-menu>
33
33
  </div>
34
- `}},{e:[y,x,C,T,D,h],c:[H,g]}=I(l,[[v,1,`fileExplorerContext`],[b,1,`menuItems`],[S,1,`canEdit`],[w,1,`canManageAccess`],[E,1,`isMobile`]],_,0,void 0,e.default),l),c=class extends V{constructor(){super(H),F(this,`styles`,i.default),g()}},F(c,O,void 0),c),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return H}});
34
+ `}},{e:[b,S,w,E,O,g],c:[U,_]}=L(u,[[y,1,`fileExplorerContext`],[x,1,`menuItems`],[C,1,`canEdit`],[T,1,`canManageAccess`],[D,1,`isMobile`]],v,0,void 0,t.default),u),l=class extends H{constructor(){super(U),I(this,`styles`,a.default),_()}},I(l,k,void 0),l),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return U}});
35
35
  //# sourceMappingURL=FileExplorerHeaderControls.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FileExplorerHeaderControls.cjs.js","names":["WebComponent","customElement","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","customElement","consume","fileExplorerContext","property","state","WebComponent","DEFAULT_FILE_EXPLORER_CONTEXT","FILE_EXPLORER_MANAGE_ACCESS_EVENT","nothing","isContainerSubject","styles","require_WebComponent","require_context","require_events","require_podUtils","require_FileExplorerHeaderControls_styles","_lit_context","lit","lit_decorators_js","_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","_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","_FileExplorerHeaderCo","args","event","subjectUri","isContainerResource","supportsEditing"],"sources":["../../../src/components/file-explorer-header/FileExplorerHeaderControls.ts"],"sourcesContent":["import { WebComponent } from '@/lib/components'\nimport { customElement, 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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AA,CAAAjD,aAAA,CAAA,MAAArB,CAAA,EAAAuB,EAAA,KAAA,SAClD7B,EAAAA,OAAM,EAAAyE,EAAA,CAAA,CAAA,EAAA5C,EAAA8C,EAAApE,EAAA,IAAA,EAAA,EAAAoE,G"}
1
+ {"version":3,"file":"FileExplorerHeaderControls.cjs.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","customElement","consume","fileExplorerContext","property","state","WebComponent","DEFAULT_FILE_EXPLORER_CONTEXT","FILE_EXPLORER_MANAGE_ACCESS_EVENT","nothing","isContainerSubject","styles","require_decorators","require_WebComponent","require_context","require_events","require_podUtils","require_FileExplorerHeaderControls_styles","_lit_context","lit","lit_decorators_js","_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","_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","_FileExplorerHeaderCo","args","event","subjectUri","isContainerResource","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":"A,iyJAWqDY,EAAA,CAEpDZ,EAAAA,cAAc,wCAAwC,CAAC,EAAA,IAAAa,EAAA,IAAAC,GAAAC,EAAA,IAAAC,QAAAC,EAAA,IAAAD,QAAAE,EAAA,IAAAF,QAAAG,EAAA,IAAAH,QAAAI,EAAA,IAAAJ,QAAAK,GAAAC,GAAAA,EAUrDlB,EAAAA,QAAAA,CAAQ,CAAEmB,QAASd,EAAAA,oBAAqBe,UAAW,EAAK,CAAC,EAACC,GAAAA,EAG1DvB,EAAAA,SAAAA,CAAS,CAAEwB,UAAW,EAAM,CAAC,EAACC,GAAAA,EAG9BzB,EAAAA,SAAAA,CAAS,CAAE0B,KAAMC,OAAQ,CAAC,EAACC,GAAAA,EAG3B5B,EAAAA,SAAAA,CAAS,CAAE0B,KAAMC,OAAQ,CAAC,EAACE,GAAAA,EAG3B5B,EAAAA,MAAAA,CAAM,EAAC,oBAAA6B,EAtBV,cACwD/B,EAAAA,OAAa,CAAAiC,YAAA,GAAAC,EAAA,CAAA,MAAA,GAAAA,CAAA,EAAAC,EAAA,KAAAf,EAAA,KAAAgB,EAAA,IAAA,CAAA,EAAAD,EAAA,KAAA,cAIpC,oBAAoB,EAAA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zB,KAAKnD,oBAAoBwC,WAAU;uBACpC,KAAKS,UAAS;sBACf,KAAKnB,SAAQ;;;KAIjC,CACF,EAAC,CAAAuC,EAAA,CAAApC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAT,GAAA0C,EAAA,CAAAlE,EAAAmE,IAAAC,EAAAjD,EAAA,CAAA,CAAAV,EAAA,EAAA,qBAAA,EAAA,CAAAG,EAAA,EAAA,WAAA,EAAA,CAAAE,EAAA,EAAA,SAAA,EAAA,CAAAG,EAAA,EAAA,iBAAA,EAAA,CAAAC,EAAA,EAAA,UAAA,CAAA,EAAAnB,EAAA,EAAA,IAAA,GAvHuDX,EAAAA,OAAY,EAAA+B,GAAAkD,EAAA,cAAAC,CAAA,CAAAjD,aAAA,CAAA,MAAArB,CAAA,EAAAuB,EAAA,KAAA,SAClD7B,EAAAA,OAAM,EAAAyE,EAAA,CAAA,CAAA,EAAA5C,EAAA8C,EAAApE,EAAA,IAAA,EAAA,EAAAoE,G"}
@@ -1 +1 @@
1
- {"version":3,"file":"FileExplorerHeaderControls.d.ts","sourceRoot":"","sources":["../../../src/components/file-explorer-header/FileExplorerHeaderControls.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAI/C,OAAO,qBAAqB,CAAA;AAC5B,OAAO,8BAA8B,CAAA;AACrC,OAAO,sBAAsB,CAAA;AAE7B,OAAO,wDAAwD,CAAA;AAM/D,MAAM,CAAC,OAAO,OAAO,0BAA2B,SAAQ,YAAY;IAClE,MAAM,CAAC,MAAM,0BAAS;IAEtB,OAAO,CAAC,gBAAgB,CAA4B;IACpD,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAuB;IACnD,OAAO,CAAC,QAAQ,CAAC,uBAAuB,CAEvC;IAGD,QAAQ,CAAC,mBAAmB,4DAAgC;IAG5D,QAAQ,CAAC,SAAS,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,CAA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BAAkB,CASzB;IAED,OAAO,CAAC,oBAAoB;IAM5B,MAAM;CA2CP"}
@@ -1,16 +1,17 @@
1
- import e from "../../lib/components/web-component/WebComponent.esm.js";
1
+ import { customElement as e } from "../../lib/components/decorators.esm.js";
2
+ import t from "../../lib/components/web-component/WebComponent.esm.js";
2
3
  import "../../lib/components/index.esm.js";
3
4
  import "../button/index.esm.js";
4
- import { DEFAULT_FILE_EXPLORER_CONTEXT as t, fileExplorerContext as n } from "../../lib/file-explorer/context.esm.js";
5
- import { FILE_EXPLORER_MANAGE_ACCESS_EVENT as r } from "../../lib/file-explorer/events.esm.js";
5
+ import { DEFAULT_FILE_EXPLORER_CONTEXT as n, fileExplorerContext as r } from "../../lib/file-explorer/context.esm.js";
6
+ import { FILE_EXPLORER_MANAGE_ACCESS_EVENT as i } from "../../lib/file-explorer/events.esm.js";
6
7
  import "../../_virtual/~icons/lucide/pencil.esm.js";
7
- import { isContainerSubject as i } from "../../utils/podUtils.esm.js";
8
+ import { isContainerSubject as a } from "../../utils/podUtils.esm.js";
8
9
  import "../../_virtual/~icons/lucide/user-round-cog.esm.js";
9
- import a from "./FileExplorerHeaderControls.styles.esm.js";
10
+ import o from "./FileExplorerHeaderControls.styles.esm.js";
10
11
  import "../resource-actions-menu/ResourceActionsMenu.esm.js";
11
- import { consume as o } from "@lit/context";
12
- import { html as s, nothing as c } from "lit";
13
- import { customElement as l, property as u, state as d } from "lit/decorators.js";
12
+ import { consume as s } from "@lit/context";
13
+ import { html as c, nothing as l } from "lit";
14
+ import { property as u, state as d } from "lit/decorators.js";
14
15
  // src/components/file-explorer-header/FileExplorerHeaderControls.ts
15
16
  var f, p, m, h, g, _, v, y, b, x, S, C, w, T, E, D, O, k, A, j, M, N;
16
17
  function P(e, t, n) {
@@ -184,18 +185,18 @@ function W(e) {
184
185
  function G(e) {
185
186
  return e;
186
187
  }
187
- x = [l("solid-ui-file-explorer-header-controls")];
188
+ x = [e("solid-ui-file-explorer-header-controls")];
188
189
  var K;
189
- new (M = (m = /*#__PURE__*/ new WeakMap(), h = /*#__PURE__*/ new WeakMap(), g = /*#__PURE__*/ new WeakMap(), _ = /*#__PURE__*/ new WeakMap(), v = /*#__PURE__*/ new WeakMap(), N = (S = o({
190
- context: n,
190
+ new (M = (m = /*#__PURE__*/ new WeakMap(), h = /*#__PURE__*/ new WeakMap(), g = /*#__PURE__*/ new WeakMap(), _ = /*#__PURE__*/ new WeakMap(), v = /*#__PURE__*/ new WeakMap(), N = (S = s({
191
+ context: r,
191
192
  subscribe: !0
192
- }), w = u({ attribute: !1 }), E = u({ type: Boolean }), O = u({ type: Boolean }), A = d(), "mobileMediaQuery"), p = class extends e {
193
+ }), w = u({ attribute: !1 }), E = u({ type: Boolean }), O = u({ type: Boolean }), A = d(), "mobileMediaQuery"), p = class extends t {
193
194
  constructor(...e) {
194
195
  super(...e), z(this, N, void y(this)), z(this, "mobileQuery", "(max-width: 600px)"), z(this, "handleMobileMediaChange", (e) => {
195
196
  this.isMobile = e.matches;
196
- }), P(this, m, C(this, t)), P(this, h, T(this, [])), P(this, g, D(this, !1)), P(this, _, k(this, !1)), P(this, v, j(this, typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(max-width: 600px)").matches)), z(this, "handleManageAccess", () => {
197
+ }), P(this, m, C(this, n)), P(this, h, T(this, [])), P(this, g, D(this, !1)), P(this, _, k(this, !1)), P(this, v, j(this, typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(max-width: 600px)").matches)), z(this, "handleManageAccess", () => {
197
198
  let e = this.fileExplorerContext.subjectUri;
198
- e && this.dispatchEvent(new CustomEvent(r, {
199
+ e && this.dispatchEvent(new CustomEvent(i, {
199
200
  bubbles: !0,
200
201
  composed: !0,
201
202
  detail: { subjectUri: e }
@@ -242,19 +243,19 @@ new (M = (m = /*#__PURE__*/ new WeakMap(), h = /*#__PURE__*/ new WeakMap(), g =
242
243
  return this.canEdit ? "Edit" : "No Access";
243
244
  }
244
245
  renderDirtyIndicator() {
245
- return this.fileExplorerContext.isDirty ? s`<span class="dirtyIndicator" title="This file has unsaved changes">Unsaved</span>` : c;
246
+ return this.fileExplorerContext.isDirty ? c`<span class="dirtyIndicator" title="This file has unsaved changes">Unsaved</span>` : l;
246
247
  }
247
248
  render() {
248
- let e = i(this.fileExplorerContext.store, this.fileExplorerContext.subjectUri), t = this.fileExplorerContext.canEdit;
249
- return s`
249
+ let e = a(this.fileExplorerContext.store, this.fileExplorerContext.subjectUri), t = this.fileExplorerContext.canEdit;
250
+ return c`
250
251
  <div>
251
252
  ${this.renderDirtyIndicator()}
252
- ${!e && !this.isMobile && this.canManageAccess ? s`
253
+ ${!e && !this.isMobile && this.canManageAccess ? c`
253
254
  <solid-ui-button class="file-explorer-header-action-button" variant="ghost" title="Manage Access" @click=${this.handleManageAccess}>
254
255
  <icon-lucide-user-round-cog slot="icon"></icon-lucide-user-round-cog>
255
256
  <span class="sr-only">Manage access</span>
256
257
  </solid-ui-button>
257
- ${t ? s`
258
+ ${t ? c`
258
259
  <solid-ui-button
259
260
  class="file-explorer-header-action-button"
260
261
  variant="ghost"
@@ -265,8 +266,8 @@ new (M = (m = /*#__PURE__*/ new WeakMap(), h = /*#__PURE__*/ new WeakMap(), g =
265
266
  <icon-lucide-pencil slot="icon"></icon-lucide-pencil>
266
267
  <span class="sr-only">Edit</span>
267
268
  </solid-ui-button>
268
- ` : c}
269
- ` : c}
269
+ ` : l}
270
+ ` : l}
270
271
  <solid-ui-resource-actions-menu
271
272
  .store=${this.fileExplorerContext.store}
272
273
  .handleAccessClick=${this.handleManageAccess}
@@ -307,9 +308,9 @@ new (M = (m = /*#__PURE__*/ new WeakMap(), h = /*#__PURE__*/ new WeakMap(), g =
307
308
  1,
308
309
  "isMobile"
309
310
  ]
310
- ], x, 0, void 0, e), p), f = class extends G {
311
+ ], x, 0, void 0, t), p), f = class extends G {
311
312
  constructor() {
312
- super(K), z(this, "styles", a), b();
313
+ super(K), z(this, "styles", o), b();
313
314
  }
314
315
  }, z(f, M, void 0), f)();
315
316
  export { K as default };
@@ -1 +1 @@
1
- {"version":3,"file":"FileExplorerHeaderControls.esm.js","names":["WebComponent","customElement","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 { WebComponent } from '@/lib/components'\nimport { customElement, 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,CAEpDX,EAAc,wCAAwC,CAAC;AAAA,IAAAY;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;CAAEmB,SAASd;CAAqBe,WAAW;AAAK,CAAC,GAACC,IAG1DvB,EAAS,EAAEwB,WAAW,GAAM,CAAC,GAACC,IAG9BzB,EAAS,EAAE0B,MAAMC,QAAQ,CAAC,GAACC,IAG3B5B,EAAS,EAAE0B,MAAMC,QAAQ,CAAC,GAACE,IAG3B5B,EAAM,GAAC,qBAAA6B,IAtBV,cACwDhC,EAAa;CAAAkC,YAAA,GAAAC,GAAA;EAwB1DC,AAxB0D,MAAA,GAAAD,CAAA,GAAAC,EAAA,MAAAf,GAAA,KAAAgB,EAAA,IAAA,CAAA,GAAAD,EAAA,MAAA,eAIpC,oBAAoB,GAAAA,EAAA,MAAA,4BACPE,MAA+B;GACzE,KAAKC,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AAuC,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,GAvHuDZ,CAAY,GAAAgC,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_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,IA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AAKqB,kBAC7CvD,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,21 +1,21 @@
1
- const e=require("../../utils/label.cjs.js");require("../../utils/index.cjs.js");const t=require("../../widgets/dragAndDrop.cjs.js");require("../../widgets/index.cjs.js");const n=require("../../lib/components/web-component/WebComponent.cjs.js");require("../../lib/components/index.cjs.js"),require("../button/index.cjs.js");const r=require("../../lib/file-explorer/context.cjs.js");require("../../_virtual/~icons/lucide/folder.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");const i=require("./FileExplorerHeaderSummary.styles.cjs.js"),a=require("../../utils/podUtils.cjs.js");let o=require("rdflib"),s=require("@lit/context"),c=require("lit"),l=require("lit/decorators.js");var u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,k,A,j,M,N,P;function F(e,t,n){I(e,t),t.set(e,n)}function I(e,t){if(t.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function L(e,t,n){return e.set(z(e,t),n),n}function R(e,t){return e.get(z(e,t))}function z(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 B(e,t,n){return(t=H(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function V(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:W(function(){return v(this)},r,`get`),set:function(e){t[4](this,e)}}:b[S]=v,f||W(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 G(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:H(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 H(e){var t=U(e,`string`);return typeof t==`symbol`?t:t+``}function U(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 W(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 G(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 K(e){return e}b=[(0,l.customElement)(`solid-ui-file-explorer-header-summary`)];var q;new(N=(f=new WeakMap,p=new WeakMap,m=new WeakMap,h=new WeakMap,g=new WeakMap,_=new WeakMap,P=(x=(0,s.consume)({context:r.fileExplorerContext,subscribe:!0}),C=(0,l.property)({attribute:!1}),T=(0,l.property)({attribute:!1}),D=(0,l.property)({attribute:!1}),k=(0,l.state)(),j=(0,l.query)(`h1`),`_draggableSubjectUri`),d=class extends n.default{constructor(...e){super(...e),B(this,P,void v(this)),B(this,`_paneIconGeneration`,0),F(this,f,S(this,r.DEFAULT_FILE_EXPLORER_CONTEXT)),F(this,p,w(this)),F(this,m,E(this)),F(this,h,O(this,{modified:void 0,isPublic:!1})),F(this,g,A(this,void 0)),F(this,_,M(this,null))}get fileExplorerContext(){return R(f,this)}set fileExplorerContext(e){L(f,this,e)}get paneIcon(){return R(p,this)}set paneIcon(e){L(p,this,e)}get onBackClick(){return R(m,this)}set onBackClick(e){L(m,this,e)}get responseMetadata(){return R(h,this)}set responseMetadata(e){L(h,this,e)}get resolvedPaneIcon(){return R(g,this)}set resolvedPaneIcon(e){L(g,this,e)}get titleHeading(){return R(_,this)}set titleHeading(e){L(_,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,o.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=a.getContainerItemCount(this.fileExplorerContext?.store,this.fileExplorerContext?.subjectUri)??0;return c.html`
1
+ const e=require("../../utils/label.cjs.js");require("../../utils/index.cjs.js");const t=require("../../widgets/dragAndDrop.cjs.js");require("../../widgets/index.cjs.js");const n=require("../../lib/components/decorators.cjs.js"),r=require("../../lib/components/web-component/WebComponent.cjs.js");require("../../lib/components/index.cjs.js"),require("../button/index.cjs.js");const i=require("../../lib/file-explorer/context.cjs.js");require("../../_virtual/~icons/lucide/folder.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");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`
2
2
  <div class="container-info">
3
3
  <h1>
4
4
  <span>${e}</span>
5
5
  </h1>
6
6
  <p>
7
7
  ${n} items
8
- ${t?c.html`<span class="public"><icon-lucide-globe aria-hidden="true"></icon-lucide-globe><span class="sr-only">Public</span></span>`:c.html`<span class="private"><icon-lucide-lock-keyhole aria-hidden="true"></icon-lucide-lock-keyhole><span class="sr-only">Private</span></span>`}
8
+ ${t?l.html`<span class="public"><icon-lucide-globe aria-hidden="true"></icon-lucide-globe><span class="sr-only">Public</span></span>`:l.html`<span class="private"><icon-lucide-lock-keyhole aria-hidden="true"></icon-lucide-lock-keyhole><span class="sr-only">Private</span></span>`}
9
9
  </p>
10
10
  </div>
11
- `}renderResourceHeader(e,t){let n=this.formatModifiedDate(this.responseMetadata.modified);return c.html`
11
+ `}renderResourceHeader(e,t){let n=this.formatModifiedDate(this.responseMetadata.modified);return l.html`
12
12
  <div class="resource-info">
13
13
  <h1>
14
14
  <span>${e}</span>
15
15
  </h1>
16
- <p><span class="resource-date">${n}</span> ${t?c.html`<span class="public"><icon-lucide-globe></icon-lucide-globe> Public</span>`:c.html`<span class="private"><icon-lucide-lock-keyhole></icon-lucide-lock-keyhole> Private</span>`}</p>
16
+ <p><span class="resource-date">${n}</span> ${t?l.html`<span class="public"><icon-lucide-globe></icon-lucide-globe> Public</span>`:l.html`<span class="private"><icon-lucide-lock-keyhole></icon-lucide-lock-keyhole> Private</span>`}</p>
17
17
  </div>
18
- `}render(){let t=this.fileExplorerContext?.subjectUri?(0,o.sym)(this.fileExplorerContext.subjectUri):void 0,n=t?e.label(t):``,r=this.responseMetadata.isPublic,i=a.isContainerSubject(this.fileExplorerContext?.store,this.fileExplorerContext?.subjectUri);return c.html`
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
20
  <solid-ui-button
21
21
  variant="ghost"
@@ -26,10 +26,10 @@ const e=require("../../utils/label.cjs.js");require("../../utils/index.cjs.js");
26
26
  <span class="sr-only">Back</span>
27
27
  </solid-ui-button>
28
28
  <span class="pane-icon">
29
- ${this.resolvedPaneIcon?c.html`<img src=${this.resolvedPaneIcon} alt="" />`:``}
29
+ ${this.resolvedPaneIcon?l.html`<img src=${this.resolvedPaneIcon} alt="" />`:``}
30
30
  </span>
31
31
  ${i?this.renderContainerResourceHeader(n,r):this.renderResourceHeader(n,r)}
32
32
  </div>
33
33
  </div>
34
- `}},{e:[S,w,E,O,A,M,v],c:[q,y]}=V(d,[[x,1,`fileExplorerContext`],[C,1,`paneIcon`],[T,1,`onBackClick`],[D,1,`responseMetadata`],[k,1,`resolvedPaneIcon`],[j,1,`titleHeading`]],b,0,void 0,n.default),d),u=class extends K{constructor(){super(q),B(this,`styles`,i.default),y()}},B(u,N,void 0),u),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return q}});
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}});
35
35
  //# sourceMappingURL=FileExplorerHeaderSummary.cjs.js.map