solid-ui 5.0.2-3 → 5.0.2-5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/acl/access-controller.cjs.js +1 -1
- package/dist/acl/access-controller.cjs.js.map +1 -1
- package/dist/acl/access-controller.esm.js +37 -37
- package/dist/acl/access-groups.cjs.js +2 -2
- package/dist/acl/access-groups.cjs.js.map +1 -1
- package/dist/acl/access-groups.esm.js +78 -78
- package/dist/acl/acl-control.cjs.js +1 -1
- package/dist/acl/acl-control.cjs.js.map +1 -1
- package/dist/acl/acl-control.esm.js +19 -19
- package/dist/acl/add-agent-buttons.cjs.js +1 -1
- package/dist/acl/add-agent-buttons.cjs.js.map +1 -1
- package/dist/acl/add-agent-buttons.esm.js +51 -51
- package/dist/chat/bookmarks.cjs.js +1 -1
- package/dist/chat/bookmarks.cjs.js.map +1 -1
- package/dist/chat/bookmarks.esm.js +44 -44
- package/dist/chat/bookmarks.esm.js.map +1 -1
- package/dist/chat/chatLogic.cjs.js +2 -2
- package/dist/chat/chatLogic.cjs.js.map +1 -1
- package/dist/chat/chatLogic.esm.js +54 -54
- package/dist/chat/dateFolder.cjs.js +1 -1
- package/dist/chat/dateFolder.cjs.js.map +1 -1
- package/dist/chat/dateFolder.esm.js +30 -30
- package/dist/chat/infinite.cjs.js +1 -1
- package/dist/chat/infinite.cjs.js.map +1 -1
- package/dist/chat/infinite.esm.js +49 -49
- package/dist/chat/keys.cjs.js +2 -2
- package/dist/chat/keys.cjs.js.map +1 -1
- package/dist/chat/keys.esm.js +17 -17
- package/dist/chat/message.cjs.js +4 -4
- package/dist/chat/message.cjs.js.map +1 -1
- package/dist/chat/message.esm.js +114 -114
- package/dist/chat/message.esm.js.map +1 -1
- package/dist/chat/messageTools.cjs.js +1 -1
- package/dist/chat/messageTools.cjs.js.map +1 -1
- package/dist/chat/messageTools.esm.js +51 -51
- package/dist/chunks/{DialogProvider-dagk2fHm.js → DialogProvider-CdesAsw-.js} +5 -6
- package/dist/chunks/{DialogProvider-dagk2fHm.js.map → DialogProvider-CdesAsw-.js.map} +1 -1
- package/dist/chunks/{ResourceActionsMenu-o-8kWx8z.js → ResourceActionsMenu-Bx7YWY3E.js} +31 -32
- package/dist/chunks/{ResourceActionsMenu-o-8kWx8z.js.map → ResourceActionsMenu-Bx7YWY3E.js.map} +1 -1
- package/dist/chunks/{access-control-modal-CWH98HX3.js → access-control-modal-B1mFFIyz.js} +169 -170
- package/dist/chunks/{access-control-modal-CWH98HX3.js.map → access-control-modal-B1mFFIyz.js.map} +1 -1
- package/dist/chunks/{account-Cocvv0H3.js → account-DWmMJre6.js} +16 -17
- package/dist/chunks/{account-Cocvv0H3.js.map → account-DWmMJre6.js.map} +1 -1
- package/dist/chunks/{auth-Df5uYksz.js → auth-EK-iYNYZ.js} +42 -43
- package/dist/chunks/{auth-Df5uYksz.js.map → auth-EK-iYNYZ.js.map} +1 -1
- package/dist/chunks/{avatar-DeotTinS.js → avatar-BBgvMlqv.js} +8 -9
- package/dist/chunks/{avatar-DeotTinS.js.map → avatar-BBgvMlqv.js.map} +1 -1
- package/dist/chunks/{button-Dy1aFjqG.js → button-D6qO2idW.js} +10 -11
- package/dist/chunks/{button-Dy1aFjqG.js.map → button-D6qO2idW.js.map} +1 -1
- package/dist/chunks/{chunk.UEBQI7VV-9M5gO7Ew.js → chunk.UEBQI7VV-lcP-fpUk.js} +12 -9
- package/dist/chunks/chunk.UEBQI7VV-lcP-fpUk.js.map +1 -0
- package/dist/chunks/{combobox-BL0-8wef.js → combobox-DS6byaf1.js} +18 -19
- package/dist/chunks/{combobox-BL0-8wef.js.map → combobox-DS6byaf1.js.map} +1 -1
- package/dist/chunks/{combobox-option-DjlmXt1O.js → combobox-option-DOtGuKel.js} +7 -8
- package/dist/chunks/{combobox-option-DjlmXt1O.js.map → combobox-option-DOtGuKel.js.map} +1 -1
- package/dist/chunks/{components-LxiwG5ae.js → components-C8c2Ucm5.js} +201 -190
- package/dist/chunks/components-C8c2Ucm5.js.map +1 -0
- package/dist/chunks/{context-By_u12WA.js → context-BDrfQ9bN.js} +2 -2
- package/dist/chunks/{context-By_u12WA.js.map → context-BDrfQ9bN.js.map} +1 -1
- package/dist/chunks/{dialog-CrmftB9c.js → dialog-CgYK767T.js} +15 -16
- package/dist/chunks/{dialog-CrmftB9c.js.map → dialog-CgYK767T.js.map} +1 -1
- package/dist/chunks/{dialog-content-Cw3xqJ45.js → dialog-content-DjwRH1ci.js} +5 -6
- package/dist/chunks/{dialog-content-Cw3xqJ45.js.map → dialog-content-DjwRH1ci.js.map} +1 -1
- package/dist/chunks/{dialog-footer-sFQf-2zD.js → dialog-footer-GQWi8lfB.js} +5 -6
- package/dist/chunks/{dialog-footer-sFQf-2zD.js.map → dialog-footer-GQWi8lfB.js.map} +1 -1
- package/dist/chunks/{dialog-header-xIWIqfZK.js → dialog-header-c3qOMQfb.js} +5 -6
- package/dist/chunks/{dialog-header-xIWIqfZK.js.map → dialog-header-c3qOMQfb.js.map} +1 -1
- package/dist/chunks/{dialogs-B3tHtjMf.js → dialogs-BmtLjMzg.js} +2 -2
- package/dist/chunks/{dialogs-B3tHtjMf.js.map → dialogs-BmtLjMzg.js.map} +1 -1
- package/dist/chunks/{dialogs-root-Lh2u-3Cs.js → dialogs-root-BNF3_SA8.js} +8 -9
- package/dist/chunks/{dialogs-root-Lh2u-3Cs.js.map → dialogs-root-BNF3_SA8.js.map} +1 -1
- package/dist/chunks/{error-state-DnsXVj1z.js → error-state-jV9dlFX2.js} +10 -11
- package/dist/chunks/{error-state-DnsXVj1z.js.map → error-state-jV9dlFX2.js.map} +1 -1
- package/dist/chunks/{file-explorer-header-B6-Q0i6V.js → file-explorer-header-Djp_eFuT.js} +33 -34
- package/dist/chunks/file-explorer-header-Djp_eFuT.js.map +1 -0
- package/dist/chunks/{file-explorer-provider-B3gUBkHg.js → file-explorer-provider-DpjC7uds.js} +8 -9
- package/dist/chunks/{file-explorer-provider-B3gUBkHg.js.map → file-explorer-provider-DpjC7uds.js.map} +1 -1
- package/dist/chunks/{guard-C39y81In.js → guard-SxVT1xr4.js} +8 -9
- package/dist/chunks/{guard-C39y81In.js.map → guard-SxVT1xr4.js.map} +1 -1
- package/dist/chunks/{index.esm-C9oV3H3X.js → index.esm-BQrkxchZ.js} +2 -2
- package/dist/chunks/{index.esm-C9oV3H3X.js.map → index.esm-BQrkxchZ.js.map} +1 -1
- package/dist/chunks/{input-Bi6ZBZQw.js → input-Bz3l514j.js} +11 -12
- package/dist/chunks/{input-Bi6ZBZQw.js.map → input-Bz3l514j.js.map} +1 -1
- package/dist/chunks/{jsonld-D-TE94B0.js → jsonld-C6IOQ1Tg.js} +2 -2
- package/dist/chunks/{jsonld-D-TE94B0.js.map → jsonld-C6IOQ1Tg.js.map} +1 -1
- package/dist/chunks/{login-button-fo0P8vym.js → login-button-Dd0rwZJk.js} +9 -10
- package/dist/chunks/{login-button-fo0P8vym.js.map → login-button-Dd0rwZJk.js.map} +1 -1
- package/dist/chunks/{logout-button-CF2YFgID.js → logout-button-Da34Lrnq.js} +9 -10
- package/dist/chunks/{logout-button-CF2YFgID.js.map → logout-button-Da34Lrnq.js.map} +1 -1
- package/dist/chunks/{menu-RumUciM-.js → menu-BNJU654v.js} +48 -50
- package/dist/chunks/{menu-RumUciM-.js.map → menu-BNJU654v.js.map} +1 -1
- package/dist/chunks/{menu-item-CVAZyipz.js → menu-item-nfPpH4dN.js} +10 -11
- package/dist/chunks/{menu-item-CVAZyipz.js.map → menu-item-nfPpH4dN.js.map} +1 -1
- package/dist/chunks/{photo-capture-CAfo7y6-.js → photo-capture-hJaJm4TM.js} +20 -21
- package/dist/chunks/photo-capture-hJaJm4TM.js.map +1 -0
- package/dist/chunks/{photo-capture-modal-DWmDE_Ws.js → photo-capture-modal-BsHv6wmh.js} +28 -29
- package/dist/chunks/{photo-capture-modal-DWmDE_Ws.js.map → photo-capture-modal-BsHv6wmh.js.map} +1 -1
- package/dist/chunks/{provide-B5NeVMM_.js → provide-z9U64q4m.js} +2 -2
- package/dist/chunks/{provide-B5NeVMM_.js.map → provide-z9U64q4m.js.map} +1 -1
- package/dist/chunks/{provider-BbT2duMy.js → provider-B3FoP2qW.js} +12 -13
- package/dist/chunks/{provider-BbT2duMy.js.map → provider-B3FoP2qW.js.map} +1 -1
- package/dist/chunks/{rdf-form-CH9bDx98.js → rdf-form-BkKDmFPD.js} +30 -31
- package/dist/chunks/{rdf-form-CH9bDx98.js.map → rdf-form-BkKDmFPD.js.map} +1 -1
- package/dist/chunks/{rdf-input-C_V0pIS5.js → rdf-input-BPePtqfS.js} +62 -63
- package/dist/chunks/{rdf-input-C_V0pIS5.js.map → rdf-input-BPePtqfS.js.map} +1 -1
- package/dist/chunks/{select-y1Z6fwmh.js → select-ClPkDkGl.js} +9 -10
- package/dist/chunks/{select-y1Z6fwmh.js.map → select-ClPkDkGl.js.map} +1 -1
- package/dist/chunks/{select-option-U4ALXL20.js → select-option-DQan7rcB.js} +7 -8
- package/dist/chunks/{select-option-U4ALXL20.js.map → select-option-DQan7rcB.js.map} +1 -1
- package/dist/chunks/{signup-button-DicFpAjD.js → signup-button-DOInssOu.js} +9 -10
- package/dist/chunks/{signup-button-DicFpAjD.js.map → signup-button-DOInssOu.js.map} +1 -1
- package/dist/chunks/{solid-emblem-CeCXTpve.js → solid-emblem-DwLdkGuO.js} +7 -8
- package/dist/chunks/{solid-emblem-CeCXTpve.js.map → solid-emblem-DwLdkGuO.js.map} +1 -1
- package/dist/chunks/{solidLogicSingleton.esm-BXyHD7mn.js → solidLogicSingleton.esm-Bvt7E7Vl.js} +50 -29
- package/dist/chunks/solidLogicSingleton.esm-Bvt7E7Vl.js.map +1 -0
- package/dist/chunks/{src-Bhtor0ZC.js → src-akaVfkuf.js} +2739 -2719
- package/dist/chunks/src-akaVfkuf.js.map +1 -0
- package/dist/chunks/{style-CXaw5EYi.js → style-Dlw9-wPn.js} +3 -3
- package/dist/chunks/{style-CXaw5EYi.js.map → style-Dlw9-wPn.js.map} +1 -1
- package/dist/chunks/{widgets-BBEQu0CS.js → widgets-B1hBVhRL.js} +309 -309
- package/dist/chunks/widgets-B1hBVhRL.js.map +1 -0
- package/dist/components/access-control-modal/AccessControlAddAccess.cjs.js +1 -1
- package/dist/components/access-control-modal/AccessControlAddAccess.esm.js +5 -5
- package/dist/components/access-control-modal/AccessControlAddAccess.esm.js.map +1 -1
- package/dist/components/access-control-modal/AccessControlErrors.esm.js.map +1 -1
- package/dist/components/access-control-modal/AccessControlGeneralAccess.cjs.js +2 -2
- package/dist/components/access-control-modal/AccessControlGeneralAccess.cjs.js.map +1 -1
- package/dist/components/access-control-modal/AccessControlGeneralAccess.esm.js +12 -12
- package/dist/components/access-control-modal/AccessControlGeneralAccess.esm.js.map +1 -1
- package/dist/components/access-control-modal/AccessControlModal.cjs.js +2 -2
- package/dist/components/access-control-modal/AccessControlModal.cjs.js.map +1 -1
- package/dist/components/access-control-modal/AccessControlModal.esm.js +35 -35
- package/dist/components/access-control-modal/AccessControlModal.esm.js.map +1 -1
- package/dist/components/access-control-modal/AccessControlSharedAccess.cjs.js +1 -1
- package/dist/components/access-control-modal/AccessControlSharedAccess.esm.js +2 -2
- package/dist/components/access-control-modal/AccessControlSharedAccess.esm.js.map +1 -1
- package/dist/components/access-control-modal/accessTargetResolver.cjs.js +1 -1
- package/dist/components/access-control-modal/accessTargetResolver.cjs.js.map +1 -1
- package/dist/components/access-control-modal/accessTargetResolver.esm.js +21 -21
- package/dist/components/access-control-modal.js +1 -1
- package/dist/components/account/Account.cjs.js +1 -1
- package/dist/components/account/Account.esm.js +3 -3
- package/dist/components/account/Account.esm.js.map +1 -1
- package/dist/components/account.js +1 -1
- package/dist/components/all.cjs.js +1 -1
- package/dist/components/all.esm.js +16 -16
- package/dist/components/avatar.js +1 -1
- package/dist/components/button/Button.esm.js.map +1 -1
- package/dist/components/button.js +1 -1
- package/dist/components/combobox/Combobox.cjs.js +1 -1
- package/dist/components/combobox/Combobox.esm.js +1 -1
- package/dist/components/combobox/Combobox.esm.js.map +1 -1
- package/dist/components/combobox-option/ComboboxOption.esm.js.map +1 -1
- package/dist/components/combobox-option.js +1 -1
- package/dist/components/combobox.js +1 -1
- package/dist/components/dialog/Dialog.cjs.js +2 -2
- package/dist/components/dialog/Dialog.cjs.js.map +1 -1
- package/dist/components/dialog/Dialog.esm.js +9 -9
- package/dist/components/dialog/Dialog.esm.js.map +1 -1
- package/dist/components/dialog-content.js +1 -1
- package/dist/components/dialog-footer.js +1 -1
- package/dist/components/dialog-header.js +1 -1
- package/dist/components/dialog-provider/DialogProvider.cjs.js +1 -1
- package/dist/components/dialog-provider/DialogProvider.cjs.js.map +1 -1
- package/dist/components/dialog-provider/DialogProvider.esm.js +6 -6
- package/dist/components/dialog-provider/DialogProvider.esm.js.map +1 -1
- package/dist/components/dialog-provider.js +1 -1
- package/dist/components/dialog.js +1 -1
- package/dist/components/dialogs-root/DialogsRoot.cjs.js +2 -2
- package/dist/components/dialogs-root/DialogsRoot.cjs.js.map +1 -1
- package/dist/components/dialogs-root/DialogsRoot.esm.js +7 -7
- package/dist/components/dialogs-root/DialogsRoot.esm.js.map +1 -1
- package/dist/components/dialogs-root.js +1 -1
- package/dist/components/error-state/ErrorState.cjs.js +1 -1
- package/dist/components/error-state/ErrorState.esm.js +1 -1
- package/dist/components/error-state/ErrorState.esm.js.map +1 -1
- package/dist/components/error-state.js +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeader.cjs.js +2 -2
- package/dist/components/file-explorer-header/FileExplorerHeader.cjs.js.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeader.d.ts.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeader.esm.js +20 -19
- package/dist/components/file-explorer-header/FileExplorerHeader.esm.js.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.cjs.js +6 -6
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.cjs.js.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.d.ts.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.esm.js +25 -24
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.esm.js.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.cjs.js +7 -7
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.cjs.js.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.d.ts.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.esm.js +28 -27
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.esm.js.map +1 -1
- package/dist/components/file-explorer-header.js +1 -1
- package/dist/components/file-explorer-provider/FileExplorerProvider.cjs.js +1 -1
- package/dist/components/file-explorer-provider/FileExplorerProvider.cjs.js.map +1 -1
- package/dist/components/file-explorer-provider/FileExplorerProvider.d.ts +1 -1
- package/dist/components/file-explorer-provider/FileExplorerProvider.d.ts.map +1 -1
- package/dist/components/file-explorer-provider/FileExplorerProvider.esm.js +8 -7
- package/dist/components/file-explorer-provider/FileExplorerProvider.esm.js.map +1 -1
- package/dist/components/file-explorer-provider.js +1 -1
- package/dist/components/guard.js +1 -1
- package/dist/components/input/Input.esm.js.map +1 -1
- package/dist/components/input.js +1 -1
- package/dist/components/login-button/LoginButton.cjs.js +1 -1
- package/dist/components/login-button/LoginButton.esm.js +1 -1
- package/dist/components/login-button.js +1 -1
- package/dist/components/login-modal/LoginModal.cjs.js +1 -1
- package/dist/components/login-modal/LoginModal.esm.js +2 -2
- package/dist/components/login-modal/LoginModal.esm.js.map +1 -1
- package/dist/components/login-modal.js +1 -1
- package/dist/components/logout-button/LogoutButton.cjs.js +1 -1
- package/dist/components/logout-button/LogoutButton.esm.js +1 -1
- package/dist/components/logout-button.js +1 -1
- package/dist/components/menu/Menu.cjs.js +1 -1
- package/dist/components/menu/Menu.cjs.js.map +1 -1
- package/dist/components/menu/Menu.esm.js +1 -1
- package/dist/components/menu/Menu.esm.js.map +1 -1
- package/dist/components/menu-item/MenuItem.esm.js.map +1 -1
- package/dist/components/menu-item.js +1 -1
- package/dist/components/menu.js +1 -1
- package/dist/components/photo-capture/PhotoCapture.esm.js.map +1 -1
- package/dist/components/photo-capture-modal/PhotoCaptureModal.esm.js.map +1 -1
- package/dist/components/photo-capture-modal.js +1 -1
- package/dist/components/photo-capture.js +1 -1
- package/dist/components/provider/Provider.esm.js.map +1 -1
- package/dist/components/provider.js +1 -1
- package/dist/components/rdf-form/RDFForm.cjs.js +3 -3
- package/dist/components/rdf-form/RDFForm.cjs.js.map +1 -1
- package/dist/components/rdf-form/RDFForm.esm.js +13 -13
- package/dist/components/rdf-form/RDFForm.esm.js.map +1 -1
- package/dist/components/rdf-form.js +1 -1
- package/dist/components/rdf-input/RDFInput.cjs.js +2 -2
- package/dist/components/rdf-input/RDFInput.cjs.js.map +1 -1
- package/dist/components/rdf-input/RDFInput.esm.js +4 -4
- package/dist/components/rdf-input/RDFInput.esm.js.map +1 -1
- package/dist/components/rdf-input.js +1 -1
- package/dist/components/resource-actions-menu/ResourceActionsMenu.cjs.js +8 -8
- package/dist/components/resource-actions-menu/ResourceActionsMenu.cjs.js.map +1 -1
- package/dist/components/resource-actions-menu/ResourceActionsMenu.d.ts.map +1 -1
- package/dist/components/resource-actions-menu/ResourceActionsMenu.esm.js +18 -17
- package/dist/components/resource-actions-menu/ResourceActionsMenu.esm.js.map +1 -1
- package/dist/components/resource-actions-menu.js +1 -1
- package/dist/components/select/Select.cjs.js +1 -1
- package/dist/components/select/Select.cjs.js.map +1 -1
- package/dist/components/select/Select.esm.js +1 -1
- package/dist/components/select/Select.esm.js.map +1 -1
- package/dist/components/select-option/SelectOption.esm.js.map +1 -1
- package/dist/components/select-option.js +1 -1
- package/dist/components/select.js +1 -1
- package/dist/components/signup-button/SignupButton.cjs.js +1 -1
- package/dist/components/signup-button/SignupButton.esm.js +1 -1
- package/dist/components/signup-button.js +1 -1
- package/dist/components/solid-emblem.js +1 -1
- package/dist/components.js +30 -30
- package/dist/create/create.cjs.js +1 -1
- package/dist/create/create.cjs.js.map +1 -1
- package/dist/create/create.esm.js +23 -23
- package/dist/header/index.cjs.js +1 -1
- package/dist/header/index.cjs.js.map +1 -1
- package/dist/header/index.esm.js +53 -53
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +24 -24
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +11 -12
- package/dist/lib/auth/SolidAuth.cjs.js +1 -1
- package/dist/lib/auth/SolidAuth.cjs.js.map +1 -1
- package/dist/lib/auth/SolidAuth.esm.js +8 -8
- package/dist/lib/auth/SolidAuth.esm.js.map +1 -1
- package/dist/lib/code-editor/CodeEditor.cjs.js +1 -1
- package/dist/lib/code-editor/CodeEditor.cjs.js.map +1 -1
- package/dist/lib/code-editor/CodeEditor.d.ts.map +1 -1
- package/dist/lib/code-editor/CodeEditor.esm.js +34 -30
- package/dist/lib/code-editor/CodeEditor.esm.js.map +1 -1
- package/dist/lib/components/dialog-component/DialogComponent.cjs.js +1 -1
- package/dist/lib/components/dialog-component/DialogComponent.cjs.js.map +1 -1
- package/dist/lib/components/dialog-component/DialogComponent.esm.js +4 -4
- package/dist/lib/components/index.cjs.js +1 -1
- package/dist/lib/components/index.esm.js +3 -3
- package/dist/lib/dialogs/helpers.cjs.js +1 -1
- package/dist/lib/dialogs/helpers.cjs.js.map +1 -1
- package/dist/lib/dialogs/helpers.esm.js +4 -4
- package/dist/lib/file-explorer/index.cjs.js +1 -1
- package/dist/lib/file-explorer/index.esm.js +3 -3
- package/dist/lib/file-explorer/relevant-panes.cjs.js +1 -1
- package/dist/lib/file-explorer/relevant-panes.cjs.js.map +1 -1
- package/dist/lib/file-explorer/relevant-panes.d.ts +7 -0
- package/dist/lib/file-explorer/relevant-panes.d.ts.map +1 -1
- package/dist/lib/file-explorer/relevant-panes.esm.js +11 -2
- package/dist/lib/file-explorer/relevant-panes.esm.js.map +1 -1
- package/dist/lib/messageArea.cjs.js +1 -1
- package/dist/lib/messageArea.cjs.js.map +1 -1
- package/dist/lib/messageArea.esm.js +27 -27
- package/dist/lib/pad.cjs.js +1 -1
- package/dist/lib/pad.cjs.js.map +1 -1
- package/dist/lib/pad.esm.js +15 -15
- package/dist/lib/participation.cjs.js +1 -1
- package/dist/lib/participation.cjs.js.map +1 -1
- package/dist/lib/participation.esm.js +59 -59
- package/dist/lib/preferences.cjs.js +1 -1
- package/dist/lib/preferences.cjs.js.map +1 -1
- package/dist/lib/preferences.esm.js +28 -28
- package/dist/lib/table.cjs.js +3 -3
- package/dist/lib/table.cjs.js.map +1 -1
- package/dist/lib/table.esm.js +123 -123
- package/dist/lib/table.esm.js.map +1 -1
- package/dist/lib/tabs.cjs.js +1 -1
- package/dist/lib/tabs.cjs.js.map +1 -1
- package/dist/lib/tabs.esm.js +16 -16
- package/dist/loader.js +11 -12
- package/dist/login/login.cjs.js +6 -6
- package/dist/login/login.cjs.js.map +1 -1
- package/dist/login/login.esm.js +142 -142
- package/dist/media/media-capture.cjs.js +1 -1
- package/dist/media/media-capture.cjs.js.map +1 -1
- package/dist/media/media-capture.esm.js +6 -6
- package/dist/solid-ui.js +32 -32
- package/dist/solid-ui.min.js +32 -32
- package/dist/solid-ui.min.js.map +1 -1
- package/dist/utils/index.cjs.js +1 -1
- package/dist/utils/index.cjs.js.map +1 -1
- package/dist/utils/index.esm.js +4 -4
- package/dist/utils/keyHelpers/accessData.cjs.js +1 -1
- package/dist/utils/keyHelpers/accessData.cjs.js.map +1 -1
- package/dist/utils/keyHelpers/accessData.esm.js +15 -15
- package/dist/utils/label.cjs.js +1 -1
- package/dist/utils/label.cjs.js.map +1 -1
- package/dist/utils/label.esm.js +4 -4
- package/dist/widgets/buttons.cjs.js +12 -12
- package/dist/widgets/buttons.cjs.js.map +1 -1
- package/dist/widgets/buttons.esm.js +179 -179
- package/dist/widgets/error.cjs.js +1 -1
- package/dist/widgets/error.cjs.js.map +1 -1
- package/dist/widgets/error.esm.js +5 -5
- package/dist/widgets/forms/autocomplete/autocompleteBar.cjs.js +1 -1
- package/dist/widgets/forms/autocomplete/autocompleteBar.cjs.js.map +1 -1
- package/dist/widgets/forms/autocomplete/autocompleteBar.esm.js +17 -17
- package/dist/widgets/forms/autocomplete/autocompleteField.cjs.js +1 -1
- package/dist/widgets/forms/autocomplete/autocompleteField.cjs.js.map +1 -1
- package/dist/widgets/forms/autocomplete/autocompleteField.esm.js +23 -23
- package/dist/widgets/forms/autocomplete/autocompletePicker.cjs.js +1 -1
- package/dist/widgets/forms/autocomplete/autocompletePicker.cjs.js.map +1 -1
- package/dist/widgets/forms/autocomplete/autocompletePicker.esm.js +26 -26
- package/dist/widgets/forms/autocomplete/language.cjs.js +1 -1
- package/dist/widgets/forms/autocomplete/language.cjs.js.map +1 -1
- package/dist/widgets/forms/autocomplete/language.esm.js +9 -9
- package/dist/widgets/forms/autocomplete/publicData.cjs.js +5 -5
- package/dist/widgets/forms/autocomplete/publicData.cjs.js.map +1 -1
- package/dist/widgets/forms/autocomplete/publicData.esm.js +67 -67
- package/dist/widgets/forms/basic.cjs.js +1 -1
- package/dist/widgets/forms/basic.cjs.js.map +1 -1
- package/dist/widgets/forms/basic.esm.js +11 -11
- package/dist/widgets/forms.cjs.js +4 -4
- package/dist/widgets/forms.cjs.js.map +1 -1
- package/dist/widgets/forms.esm.js +561 -561
- package/dist/widgets/forms.esm.js.map +1 -1
- package/dist/widgets/index.cjs.js +1 -1
- package/dist/widgets/index.cjs.js.map +1 -1
- package/dist/widgets/index.esm.js +82 -82
- package/dist/widgets/peoplePicker.cjs.js +2 -2
- package/dist/widgets/peoplePicker.cjs.js.map +1 -1
- package/dist/widgets/peoplePicker.esm.js +82 -82
- package/package.json +3 -3
- package/dist/chunks/chunk.UEBQI7VV-9M5gO7Ew.js.map +0 -1
- package/dist/chunks/components-LxiwG5ae.js.map +0 -1
- package/dist/chunks/custom-element-BW8Ua4c7.js +0 -9
- package/dist/chunks/custom-element-BW8Ua4c7.js.map +0 -1
- package/dist/chunks/decorators-V-B013l9.js +0 -12
- package/dist/chunks/decorators-V-B013l9.js.map +0 -1
- package/dist/chunks/file-explorer-header-B6-Q0i6V.js.map +0 -1
- package/dist/chunks/photo-capture-CAfo7y6-.js.map +0 -1
- package/dist/chunks/solidLogicSingleton.esm-BXyHD7mn.js.map +0 -1
- package/dist/chunks/src-Bhtor0ZC.js.map +0 -1
- package/dist/chunks/widgets-BBEQu0CS.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.cjs.js","names":["solidLogicSingleton","icons","ns","selectWorkspace","require_ns","require_label","require_debug","require_iconBase","require_buttons","require_login","kb","newThingUI","dom","createContext","div","iconStyle","star","visible","complain","pre","message","styleTheIcons","i","iconArray","st","style","selectTool","icon","selectNewTool","makeNewAppInstance","selectUI","callbackWS","newPaneOptions","options","ws","opt","dataBrowserContext","isPackage","p","err","reject","pa","name","uri","mintingPanes","thePanes","pane","mintingClassMap","classMap","noun","e"],"sources":["../../src/create/create.ts"],"sourcesContent":["/* create.js UI to craete new objects in the solid-app-set world\n **\n */\n\nimport { DataBrowserContext, NewPaneOptions, PaneDefinition } from 'pane-registry'\nimport { solidLogicSingleton } from 'solid-logic'\nimport * as debug from '../lib/debug'\nimport { icons } from '../lib/iconBase'\nimport { ensureLoadedProfile, selectWorkspace } from '../login/login'\nimport ns from '../lib/ns'\nimport * as utils from '../utils'\nimport * as widgets from '../widgets'\nimport { CreateContext, NewAppInstanceOptions } from './types'\n\nconst kb = solidLogicSingleton.store\n\n/* newThingUI -- return UI for user to select a new object, folder, etc\n **\n ** context must include: dom, div,\n ** optional: folder: NamedNode -- the folder where the thing is bring put\n ** (suppresses asking for a full URI or workspace)\n **\n */\nexport function newThingUI (\n createContext: CreateContext,\n dataBrowserContext: DataBrowserContext,\n thePanes: Array<PaneDefinition>\n): void {\n const dom = createContext.dom\n const div = createContext.div\n if (createContext.me && !createContext.me.uri) {\n throw new Error('newThingUI: Invalid userid: ' + createContext.me)\n }\n\n const iconStyle = 'padding: 0.7em; width: 2em; height: 2em;' // was: 'padding: 1em; width: 3em; height: 3em;'\n const star = div.appendChild(dom.createElement('img'))\n let visible = false // the inividual tools tools\n // noun_272948.svg = black star\n // noun_34653_green.svg = green plus\n star.setAttribute('src', icons.iconBase + 'noun_34653_green.svg')\n star.setAttribute('style', iconStyle)\n star.setAttribute('title', 'Add another tool')\n\n const complain = function complain (message) {\n const pre = div.appendChild(dom.createElement('pre'))\n pre.setAttribute('style', 'background-color: pink')\n pre.appendChild(dom.createTextNode(message))\n }\n\n function styleTheIcons (style) {\n for (let i = 0; i < iconArray.length; i++) {\n let st = iconStyle + style\n if (iconArray[i].disabled) {\n // @@ unused\n st += 'opacity: 0.3;'\n }\n iconArray[i].setAttribute('style', st) // eg 'background-color: #ccc;'\n }\n }\n\n function selectTool (icon) {\n styleTheIcons('display: none;') // 'background-color: #ccc;'\n icon.setAttribute('style', iconStyle + 'background-color: yellow;')\n }\n\n function selectNewTool (_event?) {\n visible = !visible\n star.setAttribute(\n 'style',\n iconStyle + (visible ? 'background-color: yellow;' : '')\n )\n styleTheIcons(visible ? '' : 'display: none;')\n }\n\n star.addEventListener('click', selectNewTool)\n\n function makeNewAppInstance (options: NewAppInstanceOptions) {\n return new Promise(function (resolve, reject) {\n let selectUI // , selectUIParent\n function callbackWS (ws, newBase) {\n ensureLoadedProfile(createContext).then(\n _context => {\n const newPaneOptions: NewPaneOptions = Object.assign({\n newBase,\n folder: options.folder || undefined,\n workspace: ws\n }, options)\n for (const opt in options) {\n // get div, dom, me, folder, pane, refreshTable\n newPaneOptions[opt] = options[opt]\n }\n debug.log(`newThingUI: Minting new ${newPaneOptions.pane.name} at ${newPaneOptions.newBase}`)\n options.pane\n .mintNew!(dataBrowserContext, newPaneOptions)\n .then(function (newPaneOptions) {\n if (!newPaneOptions || !newPaneOptions.newInstance) {\n throw new Error('Cannot mint new - missing newInstance')\n }\n if (newPaneOptions.folder) {\n const tail = newPaneOptions.newInstance.uri.slice(\n newPaneOptions.folder.uri.length\n )\n const isPackage = tail.includes('/')\n debug.log(' new thing is packge? ' + isPackage)\n if (isPackage) {\n kb.add(\n newPaneOptions.folder,\n ns.ldp('contains'),\n kb.sym(newPaneOptions.newBase),\n newPaneOptions.folder.doc()\n )\n } else {\n // single file\n kb.add(\n newPaneOptions.folder,\n ns.ldp('contains'),\n newPaneOptions.newInstance,\n newPaneOptions.folder.doc()\n ) // Ping the patch system?\n }\n // @ts-ignore @@ TODO check whether refresh can exist here. Either fix type or remove unreachable code\n if (newPaneOptions.refreshTarget && newPaneOptions.refreshTarget.refresh) {\n // @@ TODO Remove the need to cast as any\n ;(newPaneOptions.refreshTarget as any).refresh() // Refresh the containing display\n }\n // selectUI.parentNode.removeChild(selectUI) It removes itself\n } else {\n const p = options.div.appendChild(dom.createElement('p'))\n p.setAttribute('style', 'font-size: 120%;')\n // Make link to new thing\n p.innerHTML =\n 'Your <a target=\\'_blank\\' href=\\'' +\n newPaneOptions.newInstance.uri +\n '\\'><b>new ' +\n options.noun +\n '</b></a> is ready to be set up. ' +\n '<br/><br/><a target=\\'_blank\\' href=\\'' +\n newPaneOptions.newInstance.uri +\n '\\'>Go to your new ' +\n options.noun +\n '.</a>'\n // selectUI.parentNode.removeChild(selectUI) // Clean up\n // selectUIParent.removeChild(selectUI) // Clean up\n }\n selectNewTool() // toggle star to plain and menu vanish again\n })\n .catch(function (err) {\n complain(err)\n reject(err)\n })\n },\n err => {\n // login fails\n complain('Error logging on: ' + err)\n }\n )\n } // callbackWS\n\n const pa = options.pane\n // options.appPathSegment = pa.name // was 'edu.mit.solid.pane.'\n options.noun = pa.mintClass ? utils.label(pa.mintClass) : pa.name\n options.appPathSegment = options.noun.slice(0, 1).toUpperCase() + options.noun.slice(1)\n\n if (!options.folder) {\n // No folder given? Ask user for full URI\n selectUI = selectWorkspace(dom, {\n noun: options.noun,\n appPathSegment: options.appPathSegment\n }, callbackWS)\n options.div.appendChild(selectUI)\n // selectUIParent = options.div\n } else {\n const gotName = function (name) {\n if (!name) {\n // selectUIParent.removeChild(selectUI) itremves itself if cancelled\n selectNewTool() // toggle star to plain and menu vanish again\n } else {\n let uri = options.folder!.uri\n if (!uri.endsWith('/')) {\n uri = uri + '/'\n }\n uri = uri + encodeURIComponent(name) + '/'\n callbackWS(null, uri)\n }\n }\n widgets\n .askName(\n dom,\n kb,\n options.div,\n ns.foaf('name'),\n null,\n options.noun\n )\n .then(gotName)\n // selectUI = getNameForm(dom, kb, options.noun, gotName)\n // options.div.appendChild(selectUI)\n // selectUIParent = options.div\n }\n })\n } // makeNewAppInstance\n\n const iconArray: Array<any> = []\n const mintingPanes = Object.values(thePanes).filter(pane => pane.mintNew)\n const mintingClassMap = mintingPanes.reduce((classMap, pane) => {\n if (pane.mintClass) {\n classMap[pane.mintClass.uri] = (classMap[pane.mintClass.uri] || 0) + 1\n }\n return classMap\n }, {})\n mintingPanes.forEach(pane => {\n // @@ TODO Remove the need to cast to any\n const icon: any = createContext.div.appendChild(dom.createElement('img'))\n icon.setAttribute('src', pane.icon)\n const noun = pane.mintClass\n ? mintingClassMap[pane.mintClass.uri] > 1\n ? `${utils.label(pane.mintClass)} (using ${pane.name} pane)`\n : utils.label(pane.mintClass)\n : pane.name + ' @@'\n icon.setAttribute('title', 'Make new ' + noun)\n icon.setAttribute('style', iconStyle + 'display: none;')\n iconArray.push(icon)\n if (!icon.disabled) {\n icon.addEventListener('click', function (e) {\n selectTool(icon)\n makeNewAppInstance({\n event: e,\n folder: createContext.folder || null,\n iconEle: icon,\n pane,\n noun,\n noIndexHTML: true, // do NOT @@ for now write a HTML file\n div: createContext.div,\n me: createContext.me,\n dom: createContext.dom,\n refreshTarget: createContext.refreshTarget\n })\n })\n }\n })\n}\n\n// Form to get the name of a new thing before we create it\n//\n// Used in contacts for new groups, individuals.\n//\n/*\nfunction getNameForm (dom, kb, classLabel, gotNameCallback) {\n const form = dom.createElement('div') // form is broken as HTML behaviour can resurface on js error\n form.innerHTML = '<p>Name of new ' + classLabel + ':</p>'\n const namefield = dom.createElement('input')\n namefield.setAttribute('type', 'text')\n namefield.setAttribute('size', '30')\n namefield.setAttribute('style', style.textInputStyle)\n namefield.setAttribute('maxLength', '2048') // No arbitrary limits\n namefield.select() // focus next user input\n\n const gotName = function () {\n namefield.setAttribute('class', 'pendingedit')\n namefield.disabled = true\n continueButton.disabled = true\n cancel.disabled = true\n gotNameCallback(true, namefield.value)\n }\n\n namefield.addEventListener('keyup', function (e) {\n if (e.keyCode === 13) {\n gotName()\n }\n }, false)\n form.appendChild(namefield)\n\n form.appendChild(dom.createElement('br'))\n\n const cancel = form.appendChild(widgets.cancelButton(dom))\n cancel.addEventListener('click', function (e) {\n form.parentNode.removeChild(form)\n gotNameCallback(false)\n }, false)\n\n const continueButton = form.appendChild(widgets.continueButton(dom))\n continueButton.addEventListener('click', function (e) {\n gotName()\n }, false)\n\n return form\n}\n*/\n"],"mappings":"A,sSAcA,IAAMU,E,qBAAKV,CAAAA,CAAAA,oBAAoB,MAS/B,SAAgBW,EACd,EACA,EACA,EACM,CACN,IAAMC,EAAMC,EAAc,IACpBC,EAAMD,EAAc,IAC1B,GAAIA,EAAc,IAAM,CAACA,EAAc,GAAG,IACxC,MAAU,MAAM,gCAAkCA,EAAc,EAAE,EAGpE,IAAME,EAAY,2CACZC,EAAOF,EAAI,YAAYF,EAAI,cAAc,KAAK,CAAC,EACjDK,EAAU,GAGdD,EAAK,aAAa,MAAOf,EAAAA,MAAM,SAAW,sBAAsB,EAChEe,EAAK,aAAa,QAASD,CAAS,EACpCC,EAAK,aAAa,QAAS,kBAAkB,EAE7C,IAAME,EAAW,SAAmB,EAAS,CAC3C,IAAMC,EAAML,EAAI,YAAYF,EAAI,cAAc,KAAK,CAAC,EACpDO,EAAI,aAAa,QAAS,wBAAwB,EAClDA,EAAI,YAAYP,EAAI,eAAeQ,CAAO,CAAC,CAC7C,EAEA,SAASC,EAAe,EAAO,CAC7B,IAAK,IAAIC,EAAI,EAAGA,EAAIC,EAAU,OAAQ,IAAK,CAC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,EA8BpC,CAAC,CACH,CAEA,IAAMP,EAAwB,CAAC,EACzBqB,EAAe,OAAO,OAAOC,CAAQ,CAAC,CAAC,OAAO,GAAQC,EAAK,OAAO,EAClEC,EAAkBH,EAAa,QAAQ,EAAU,KACjDE,EAAK,YACP,EAASA,EAAK,UAAU,MAAQE,EAASF,EAAK,UAAU,MAAQ,GAAK,GAEhEE,GACN,CAAC,CAAC,EACLJ,EAAa,QAAQ,GAAQ,CAE3B,IAAMjB,EAAYd,EAAc,IAAI,YAAYD,EAAI,cAAc,KAAK,CAAC,EACxEe,EAAK,aAAa,MAAOmB,EAAK,IAAI,EAClC,IAAMG,EAAOH,EAAK,UACdC,EAAgBD,EAAK,UAAU,KAAO,EACpC,GAAAzC,EAAA,MAAeyC,EAAK,SAAS,EAAE,UAAUA,EAAK,KAAK,QAAAzC,EAAA,MACvCyC,EAAK,SAAS,EAC5BA,EAAK,KAAO,MAChBnB,EAAK,aAAa,QAAS,YAAcsB,CAAI,EAC7CtB,EAAK,aAAa,QAASZ,EAAY,gBAAgB,EACvDQ,EAAU,KAAKI,CAAI,EACdA,EAAK,UACRA,EAAK,iBAAiB,QAAS,SAAU,EAAG,CAC1CD,EAAWC,CAAI,EACfE,EAAmB,CACjB,MAAOqB,EACP,OAAQrC,EAAc,QAAU,KAChC,QAASc,EACT,OACA,OACA,YAAa,GACb,IAAKd,EAAc,IACnB,GAAIA,EAAc,GAClB,IAAKA,EAAc,IACnB,cAAeA,EAAc,aAC/B,CAAC,CACH,CAAC,CAEL,CAAC,CACH,C"}
|
|
1
|
+
{"version":3,"file":"create.cjs.js","names":["solidLogicSingleton","icons","ns","selectWorkspace","require_debug","require_label","require_iconBase","require_login","require_ns","require_buttons","kb","newThingUI","dom","createContext","div","iconStyle","star","visible","complain","pre","message","styleTheIcons","i","iconArray","st","style","selectTool","icon","selectNewTool","makeNewAppInstance","selectUI","callbackWS","newPaneOptions","options","ws","opt","dataBrowserContext","isPackage","p","err","reject","pa","name","uri","mintingPanes","thePanes","pane","mintingClassMap","classMap","noun","e"],"sources":["../../src/create/create.ts"],"sourcesContent":["/* create.js UI to craete new objects in the solid-app-set world\n **\n */\n\nimport { DataBrowserContext, NewPaneOptions, PaneDefinition } from 'pane-registry'\nimport { solidLogicSingleton } from 'solid-logic'\nimport * as debug from '../lib/debug'\nimport { icons } from '../lib/iconBase'\nimport { ensureLoadedProfile, selectWorkspace } from '../login/login'\nimport ns from '../lib/ns'\nimport * as utils from '../utils'\nimport * as widgets from '../widgets'\nimport { CreateContext, NewAppInstanceOptions } from './types'\n\nconst kb = solidLogicSingleton.store\n\n/* newThingUI -- return UI for user to select a new object, folder, etc\n **\n ** context must include: dom, div,\n ** optional: folder: NamedNode -- the folder where the thing is bring put\n ** (suppresses asking for a full URI or workspace)\n **\n */\nexport function newThingUI (\n createContext: CreateContext,\n dataBrowserContext: DataBrowserContext,\n thePanes: Array<PaneDefinition>\n): void {\n const dom = createContext.dom\n const div = createContext.div\n if (createContext.me && !createContext.me.uri) {\n throw new Error('newThingUI: Invalid userid: ' + createContext.me)\n }\n\n const iconStyle = 'padding: 0.7em; width: 2em; height: 2em;' // was: 'padding: 1em; width: 3em; height: 3em;'\n const star = div.appendChild(dom.createElement('img'))\n let visible = false // the inividual tools tools\n // noun_272948.svg = black star\n // noun_34653_green.svg = green plus\n star.setAttribute('src', icons.iconBase + 'noun_34653_green.svg')\n star.setAttribute('style', iconStyle)\n star.setAttribute('title', 'Add another tool')\n\n const complain = function complain (message) {\n const pre = div.appendChild(dom.createElement('pre'))\n pre.setAttribute('style', 'background-color: pink')\n pre.appendChild(dom.createTextNode(message))\n }\n\n function styleTheIcons (style) {\n for (let i = 0; i < iconArray.length; i++) {\n let st = iconStyle + style\n if (iconArray[i].disabled) {\n // @@ unused\n st += 'opacity: 0.3;'\n }\n iconArray[i].setAttribute('style', st) // eg 'background-color: #ccc;'\n }\n }\n\n function selectTool (icon) {\n styleTheIcons('display: none;') // 'background-color: #ccc;'\n icon.setAttribute('style', iconStyle + 'background-color: yellow;')\n }\n\n function selectNewTool (_event?) {\n visible = !visible\n star.setAttribute(\n 'style',\n iconStyle + (visible ? 'background-color: yellow;' : '')\n )\n styleTheIcons(visible ? '' : 'display: none;')\n }\n\n star.addEventListener('click', selectNewTool)\n\n function makeNewAppInstance (options: NewAppInstanceOptions) {\n return new Promise(function (resolve, reject) {\n let selectUI // , selectUIParent\n function callbackWS (ws, newBase) {\n ensureLoadedProfile(createContext).then(\n _context => {\n const newPaneOptions: NewPaneOptions = Object.assign({\n newBase,\n folder: options.folder || undefined,\n workspace: ws\n }, options)\n for (const opt in options) {\n // get div, dom, me, folder, pane, refreshTable\n newPaneOptions[opt] = options[opt]\n }\n debug.log(`newThingUI: Minting new ${newPaneOptions.pane.name} at ${newPaneOptions.newBase}`)\n options.pane\n .mintNew!(dataBrowserContext, newPaneOptions)\n .then(function (newPaneOptions) {\n if (!newPaneOptions || !newPaneOptions.newInstance) {\n throw new Error('Cannot mint new - missing newInstance')\n }\n if (newPaneOptions.folder) {\n const tail = newPaneOptions.newInstance.uri.slice(\n newPaneOptions.folder.uri.length\n )\n const isPackage = tail.includes('/')\n debug.log(' new thing is packge? ' + isPackage)\n if (isPackage) {\n kb.add(\n newPaneOptions.folder,\n ns.ldp('contains'),\n kb.sym(newPaneOptions.newBase),\n newPaneOptions.folder.doc()\n )\n } else {\n // single file\n kb.add(\n newPaneOptions.folder,\n ns.ldp('contains'),\n newPaneOptions.newInstance,\n newPaneOptions.folder.doc()\n ) // Ping the patch system?\n }\n // @ts-ignore @@ TODO check whether refresh can exist here. Either fix type or remove unreachable code\n if (newPaneOptions.refreshTarget && newPaneOptions.refreshTarget.refresh) {\n // @@ TODO Remove the need to cast as any\n ;(newPaneOptions.refreshTarget as any).refresh() // Refresh the containing display\n }\n // selectUI.parentNode.removeChild(selectUI) It removes itself\n } else {\n const p = options.div.appendChild(dom.createElement('p'))\n p.setAttribute('style', 'font-size: 120%;')\n // Make link to new thing\n p.innerHTML =\n 'Your <a target=\\'_blank\\' href=\\'' +\n newPaneOptions.newInstance.uri +\n '\\'><b>new ' +\n options.noun +\n '</b></a> is ready to be set up. ' +\n '<br/><br/><a target=\\'_blank\\' href=\\'' +\n newPaneOptions.newInstance.uri +\n '\\'>Go to your new ' +\n options.noun +\n '.</a>'\n // selectUI.parentNode.removeChild(selectUI) // Clean up\n // selectUIParent.removeChild(selectUI) // Clean up\n }\n selectNewTool() // toggle star to plain and menu vanish again\n })\n .catch(function (err) {\n complain(err)\n reject(err)\n })\n },\n err => {\n // login fails\n complain('Error logging on: ' + err)\n }\n )\n } // callbackWS\n\n const pa = options.pane\n // options.appPathSegment = pa.name // was 'edu.mit.solid.pane.'\n options.noun = pa.mintClass ? utils.label(pa.mintClass) : pa.name\n options.appPathSegment = options.noun.slice(0, 1).toUpperCase() + options.noun.slice(1)\n\n if (!options.folder) {\n // No folder given? Ask user for full URI\n selectUI = selectWorkspace(dom, {\n noun: options.noun,\n appPathSegment: options.appPathSegment\n }, callbackWS)\n options.div.appendChild(selectUI)\n // selectUIParent = options.div\n } else {\n const gotName = function (name) {\n if (!name) {\n // selectUIParent.removeChild(selectUI) itremves itself if cancelled\n selectNewTool() // toggle star to plain and menu vanish again\n } else {\n let uri = options.folder!.uri\n if (!uri.endsWith('/')) {\n uri = uri + '/'\n }\n uri = uri + encodeURIComponent(name) + '/'\n callbackWS(null, uri)\n }\n }\n widgets\n .askName(\n dom,\n kb,\n options.div,\n ns.foaf('name'),\n null,\n options.noun\n )\n .then(gotName)\n // selectUI = getNameForm(dom, kb, options.noun, gotName)\n // options.div.appendChild(selectUI)\n // selectUIParent = options.div\n }\n })\n } // makeNewAppInstance\n\n const iconArray: Array<any> = []\n const mintingPanes = Object.values(thePanes).filter(pane => pane.mintNew)\n const mintingClassMap = mintingPanes.reduce((classMap, pane) => {\n if (pane.mintClass) {\n classMap[pane.mintClass.uri] = (classMap[pane.mintClass.uri] || 0) + 1\n }\n return classMap\n }, {})\n mintingPanes.forEach(pane => {\n // @@ TODO Remove the need to cast to any\n const icon: any = createContext.div.appendChild(dom.createElement('img'))\n icon.setAttribute('src', pane.icon)\n const noun = pane.mintClass\n ? mintingClassMap[pane.mintClass.uri] > 1\n ? `${utils.label(pane.mintClass)} (using ${pane.name} pane)`\n : utils.label(pane.mintClass)\n : pane.name + ' @@'\n icon.setAttribute('title', 'Make new ' + noun)\n icon.setAttribute('style', iconStyle + 'display: none;')\n iconArray.push(icon)\n if (!icon.disabled) {\n icon.addEventListener('click', function (e) {\n selectTool(icon)\n makeNewAppInstance({\n event: e,\n folder: createContext.folder || null,\n iconEle: icon,\n pane,\n noun,\n noIndexHTML: true, // do NOT @@ for now write a HTML file\n div: createContext.div,\n me: createContext.me,\n dom: createContext.dom,\n refreshTarget: createContext.refreshTarget\n })\n })\n }\n })\n}\n\n// Form to get the name of a new thing before we create it\n//\n// Used in contacts for new groups, individuals.\n//\n/*\nfunction getNameForm (dom, kb, classLabel, gotNameCallback) {\n const form = dom.createElement('div') // form is broken as HTML behaviour can resurface on js error\n form.innerHTML = '<p>Name of new ' + classLabel + ':</p>'\n const namefield = dom.createElement('input')\n namefield.setAttribute('type', 'text')\n namefield.setAttribute('size', '30')\n namefield.setAttribute('style', style.textInputStyle)\n namefield.setAttribute('maxLength', '2048') // No arbitrary limits\n namefield.select() // focus next user input\n\n const gotName = function () {\n namefield.setAttribute('class', 'pendingedit')\n namefield.disabled = true\n continueButton.disabled = true\n cancel.disabled = true\n gotNameCallback(true, namefield.value)\n }\n\n namefield.addEventListener('keyup', function (e) {\n if (e.keyCode === 13) {\n gotName()\n }\n }, false)\n form.appendChild(namefield)\n\n form.appendChild(dom.createElement('br'))\n\n const cancel = form.appendChild(widgets.cancelButton(dom))\n cancel.addEventListener('click', function (e) {\n form.parentNode.removeChild(form)\n gotNameCallback(false)\n }, false)\n\n const continueButton = form.appendChild(widgets.continueButton(dom))\n continueButton.addEventListener('click', function (e) {\n gotName()\n }, false)\n\n return form\n}\n*/\n"],"mappings":"A,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C5BA,EAAK,KAAO,MAChBnB,EAAK,aAAa,QAAS,YAAcsB,CAAI,EAC7CtB,EAAK,aAAa,QAASZ,EAAY,gBAAgB,EACvDQ,EAAU,KAAKI,CAAI,EACdA,EAAK,UACRA,EAAK,iBAAiB,QAAS,SAAU,EAAG,CAC1CD,EAAWC,CAAI,EACfE,EAAmB,CACjB,MAAOqB,EACP,OAAQrC,EAAc,QAAU,KAChC,QAASc,EACT,OACA,OACA,YAAa,GACb,IAAKd,EAAc,IACnB,GAAIA,EAAc,GAClB,IAAKA,EAAc,IACnB,cAAeA,EAAc,aAC/B,CAAC,CACH,CAAC,CAEL,CAAC,CACH,C"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import e from "../lib/
|
|
1
|
+
import { log as e } from "../lib/debug.esm.js";
|
|
2
2
|
import { label as t } from "../utils/label.esm.js";
|
|
3
|
+
import { icons as n } from "../lib/iconBase.esm.js";
|
|
4
|
+
import { ensureLoadedProfile as r, selectWorkspace as i } from "../login/login.esm.js";
|
|
5
|
+
import a from "../lib/ns.esm.js";
|
|
6
|
+
import { askName as o } from "../widgets/buttons.esm.js";
|
|
3
7
|
import "../utils/index.esm.js";
|
|
4
|
-
import { log as n } from "../lib/debug.esm.js";
|
|
5
|
-
import { icons as r } from "../lib/iconBase.esm.js";
|
|
6
|
-
import { askName as i } from "../widgets/buttons.esm.js";
|
|
7
8
|
import "../widgets/index.esm.js";
|
|
8
|
-
import { ensureLoadedProfile as a, selectWorkspace as o } from "../login/login.esm.js";
|
|
9
9
|
import { solidLogicSingleton as s } from "solid-logic";
|
|
10
10
|
// src/create/create.ts
|
|
11
11
|
var c = s.store;
|
|
@@ -13,7 +13,7 @@ function l(s, l, u) {
|
|
|
13
13
|
let d = s.dom, f = s.div;
|
|
14
14
|
if (s.me && !s.me.uri) throw Error("newThingUI: Invalid userid: " + s.me);
|
|
15
15
|
let p = "padding: 0.7em; width: 2em; height: 2em;", m = f.appendChild(d.createElement("img")), h = !1;
|
|
16
|
-
m.setAttribute("src",
|
|
16
|
+
m.setAttribute("src", n.iconBase + "noun_34653_green.svg"), m.setAttribute("style", p), m.setAttribute("title", "Add another tool");
|
|
17
17
|
let g = function(e) {
|
|
18
18
|
let t = f.appendChild(d.createElement("pre"));
|
|
19
19
|
t.setAttribute("style", "background-color: pink"), t.appendChild(d.createTextNode(e));
|
|
@@ -31,25 +31,25 @@ function l(s, l, u) {
|
|
|
31
31
|
h = !h, m.setAttribute("style", p + (h ? "background-color: yellow;" : "")), _(h ? "" : "display: none;");
|
|
32
32
|
}
|
|
33
33
|
m.addEventListener("click", y);
|
|
34
|
-
function b(
|
|
34
|
+
function b(n) {
|
|
35
35
|
return new Promise(function(u, f) {
|
|
36
36
|
let p;
|
|
37
37
|
function m(t, i) {
|
|
38
|
-
|
|
38
|
+
r(s).then((r) => {
|
|
39
39
|
let o = Object.assign({
|
|
40
40
|
newBase: i,
|
|
41
|
-
folder:
|
|
41
|
+
folder: n.folder || void 0,
|
|
42
42
|
workspace: t
|
|
43
|
-
},
|
|
44
|
-
for (let e in
|
|
45
|
-
|
|
43
|
+
}, n);
|
|
44
|
+
for (let e in n) o[e] = n[e];
|
|
45
|
+
e(`newThingUI: Minting new ${o.pane.name} at ${o.newBase}`), n.pane.mintNew(l, o).then(function(t) {
|
|
46
46
|
if (!t || !t.newInstance) throw Error("Cannot mint new - missing newInstance");
|
|
47
47
|
if (t.folder) {
|
|
48
|
-
let
|
|
49
|
-
|
|
48
|
+
let n = t.newInstance.uri.slice(t.folder.uri.length).includes("/");
|
|
49
|
+
e(" new thing is packge? " + n), n ? c.add(t.folder, a.ldp("contains"), c.sym(t.newBase), t.folder.doc()) : c.add(t.folder, a.ldp("contains"), t.newInstance, t.folder.doc()), t.refreshTarget && t.refreshTarget.refresh && t.refreshTarget.refresh();
|
|
50
50
|
} else {
|
|
51
|
-
let e =
|
|
52
|
-
e.setAttribute("style", "font-size: 120%;"), e.innerHTML = "Your <a target='_blank' href='" + t.newInstance.uri + "'><b>new " +
|
|
51
|
+
let e = n.div.appendChild(d.createElement("p"));
|
|
52
|
+
e.setAttribute("style", "font-size: 120%;"), e.innerHTML = "Your <a target='_blank' href='" + t.newInstance.uri + "'><b>new " + n.noun + "</b></a> is ready to be set up. <br/><br/><a target='_blank' href='" + t.newInstance.uri + "'>Go to your new " + n.noun + ".</a>";
|
|
53
53
|
}
|
|
54
54
|
y();
|
|
55
55
|
}).catch(function(e) {
|
|
@@ -59,17 +59,17 @@ function l(s, l, u) {
|
|
|
59
59
|
g("Error logging on: " + e);
|
|
60
60
|
});
|
|
61
61
|
}
|
|
62
|
-
let h =
|
|
63
|
-
|
|
62
|
+
let h = n.pane;
|
|
63
|
+
n.noun = h.mintClass ? t(h.mintClass) : h.name, n.appPathSegment = n.noun.slice(0, 1).toUpperCase() + n.noun.slice(1), n.folder ? o(d, c, n.div, a.foaf("name"), null, n.noun).then(function(e) {
|
|
64
64
|
if (!e) y();
|
|
65
65
|
else {
|
|
66
|
-
let t =
|
|
66
|
+
let t = n.folder.uri;
|
|
67
67
|
t.endsWith("/") || (t += "/"), t = t + encodeURIComponent(e) + "/", m(null, t);
|
|
68
68
|
}
|
|
69
|
-
}) : (p =
|
|
70
|
-
noun:
|
|
71
|
-
appPathSegment:
|
|
72
|
-
}, m),
|
|
69
|
+
}) : (p = i(d, {
|
|
70
|
+
noun: n.noun,
|
|
71
|
+
appPathSegment: n.appPathSegment
|
|
72
|
+
}, m), n.div.appendChild(p));
|
|
73
73
|
});
|
|
74
74
|
}
|
|
75
75
|
let x = [], S = Object.values(u).filter((e) => e.mintNew), C = S.reduce((e, t) => (t.mintClass && (e[t.mintClass.uri] = (e[t.mintClass.uri] || 0) + 1), e), {});
|
package/dist/header/index.cjs.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require("../lib/
|
|
1
|
+
const e=require("../lib/iconBase.cjs.js"),t=require("../login/login.cjs.js"),n=require("../widgets/buttons.cjs.js");require("../widgets/index.cjs.js");const r=require("../lib/style.cjs.js"),i=require("./empty-profile.cjs.js"),a=require("../utils/headerFooterHelpers.cjs.js");let o=require("solid-logic");var s=e.icons.iconBase+`noun_help.svg`,c=`https://solidproject.org/assets/img/solid-emblem.svg`;async function l(e,t,n){let r=document.getElementById(`PageHeader`);if(!r)return;let i=a.getPod();u(r,e,i,t,n)(),o.authSession.events.on(`logout`,u(r,e,i,t,n)),o.authSession.events.on(`login`,u(r,e,i,t,n))}function u(e,t,n,r,i){return async()=>{let a=o.authn.currentUser();e.innerHTML=``,e.appendChild(await d(t,n,a,r,i))}}async function d(e,t,n,i,a){let o=document.createElement(`a`);o.href=t.uri,o.setAttribute(`style`,r.style.headerBannerLink);let s=document.createElement(`img`);a&&(s.src=a.logo?a.logo:c),s.setAttribute(`style`,r.style.headerBannerIcon),o.appendChild(s);let l=n?await g(e,n,i):p(),u=document.createElement(`div`);u.setAttribute(`style`,r.style.headerBanner),u.appendChild(o);let d=document.createElement(`div`);if(d.setAttribute(`style`,r.style.headerBannerRightMenu),d.appendChild(l),a&&a.helpMenuList){let e=f(a,a.helpMenuList);d.appendChild(e)}return u.appendChild(d),u}function f(t,n){if(!n)return;let i=document.createElement(`ul`);i.setAttribute(`style`,r.style.headerUserMenuList),n.forEach(function(e){(e.url?`url`:`onclick`)==`url`?i.appendChild(_(h(e.label,e.url,e.target))):i.appendChild(_(m(e.label,e.onclick)))});let o=document.createElement(`nav`);o.setAttribute(`style`,r.style.headerUserMenuNavigationMenuNotDisplayed),o.setAttribute(`aria-hidden`,`true`),o.setAttribute(`id`,`helperNav`),o.appendChild(i);let c=document.createElement(`div`);c.setAttribute(`style`,r.style.headerBannerUserMenu),c.appendChild(o);let l=document.createElement(`button`);l.setAttribute(`style`,r.style.headerUserMenuTrigger),l.type=`button`;let u=document.createElement(`img`);u.src=t&&t.helpIcon?t.helpIcon:e.icons.iconBase+s,u.setAttribute(`style`,r.style.headerUserMenuTriggerImg),c.appendChild(l),l.appendChild(u);let d=a.throttle(e=>y(e,l,o),50);l.addEventListener(`click`,d);let f=setTimeout(()=>null,0);return c.addEventListener(`mouseover`,e=>{clearTimeout(f),d(e),document.getElementById(`helperNav`)?.setAttribute(`style`,r.style.headerUserMenuNavigationMenu)}),c.addEventListener(`mouseout`,e=>{f=setTimeout(()=>d(e),200),document.getElementById(`helperNav`)?.setAttribute(`style`,r.style.headerUserMenuNavigationMenuNotDisplayed)}),c}function p(){let e=document.createElement(`div`);return e.setAttribute(`style`,r.style.headerBannerLogin),e.appendChild(t.loginStatusBox(document,null,{})),e}function m(e,t){let n=document.createElement(`button`);return n.setAttribute(`style`,r.style.headerUserMenuButton),n.onmouseover=function(){n.setAttribute(`style`,r.style.headerUserMenuButtonHover)},n.onmouseout=function(){n.setAttribute(`style`,r.style.headerUserMenuButton)},n.addEventListener(`click`,t),n.innerText=e,n}function h(e,t,n){let i=document.createElement(`a`);return i.setAttribute(`style`,r.style.headerUserMenuLink),i.onmouseover=function(){i.setAttribute(`style`,r.style.headerUserMenuLinkHover)},i.onmouseout=function(){i.setAttribute(`style`,r.style.headerUserMenuLink)},i.href=t,i.innerText=e,n&&(i.target=n),i}async function g(e,t,n){let i=e.fetcher;i&&await i.load(t);let o=document.createElement(`ul`);o.setAttribute(`style`,r.style.headerUserMenuList),n&&n.forEach(function(e){(e.url?`url`:`onclick`)==`url`?o.appendChild(_(h(e.label,e.url,e.target))):o.appendChild(_(m(e.label,e.onclick)))});let s=document.createElement(`nav`);s.setAttribute(`style`,r.style.headerUserMenuNavigationMenuNotDisplayed),s.setAttribute(`aria-hidden`,`true`),s.setAttribute(`id`,`loggedInNav`),s.appendChild(o);let c=document.createElement(`button`);c.setAttribute(`style`,r.style.headerUserMenuTrigger),c.type=`button`;let l=v(e,t);typeof l==`string`?c.innerHTML=l:c.appendChild(l);let u=document.createElement(`div`);u.setAttribute(`style`,r.style.headerBannerUserMenuNotDisplayed),u.appendChild(c),u.appendChild(s);let d=a.throttle(e=>y(e,c,s),50);c.addEventListener(`click`,d);let f=setTimeout(()=>null,0);return u.addEventListener(`mouseover`,e=>{clearTimeout(f),d(e),document.getElementById(`loggedInNav`)?.setAttribute(`style`,r.style.headerUserMenuNavigationMenu)}),u.addEventListener(`mouseout`,e=>{f=setTimeout(()=>d(e),200),document.getElementById(`loggedInNav`)?.setAttribute(`style`,r.style.headerUserMenuNavigationMenuNotDisplayed)}),u}function _(e){let t=document.createElement(`li`);return t.setAttribute(`style`,r.style.headerUserMenuListItem),t.appendChild(e),t}function v(e,t){let a=null;try{if(a=n.findImage(t),!a)return i.emptyProfile}catch{return i.emptyProfile}let o=document.createElement(`div`);return o.setAttribute(`style`,r.style.headerUserMenuPhoto),o.style.backgroundImage=`url(${a})`,o}function y(e,t,n){let r=t.getAttribute(`aria-expanded`)===`true`,i=e.type===`mouseover`,a=e.type===`mouseout`;r&&i||!r&&a||(t.setAttribute(`aria-expanded`,(!r).toString()),n.setAttribute(`aria-hidden`,r.toString()))}exports.createBanner=d,exports.createHelpMenu=f,exports.createLoginSignUpButtons=p,exports.createUserMenu=g,exports.createUserMenuButton=m,exports.createUserMenuItem=_,exports.createUserMenuLink=h,exports.getProfileImg=v,exports.initHeader=l,exports.rebuildHeader=u;
|
|
2
2
|
//# sourceMappingURL=index.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs.js","names":["icons","getPod","authn","style","throttle","loginStatusBox","emptyProfile","require_style","require_iconBase","require_buttons","require_login","require_empty_profile","require_headerFooterHelpers","solid_logic","DEFAULT_HELP_MENU_ICON","DEFAUL_SOLID_ICON_URL","initHeader","header","pod","rebuildHeader","store","userMenuList","options","user","createBanner","podLink","image","userMenu","createUserMenu","createLoginSignUpButtons","banner","leftSideOfHeader","helpMenu","createHelpMenu","helpMenuItems","helpMenuList","menuItem","createUserMenuItem","createUserMenuLink","createUserMenuButton","helpMenuContainer","helpMenuTrigger","helpMenuIcon","throttledMenuToggle","toggleMenu","event","timer","profileLoginButtonPre","button","onClick","label","link","href","target","fetcher","loggedInMenuList","loggedInMenu","loggedInMenuTrigger","profileImg","getProfileImg","loggedInMenuContainer","menuProfileItem","child","profileUrl","profileImage","isExpanded","trigger","expand","close","menu"],"sources":["../../src/header/index.ts"],"sourcesContent":["/* global EventListenerOrEventListenerObject */\n/*\n This file was copied from mashlib/src/global/header.ts file. It is modified to\n work in solid-ui by adjusting where imported functions are found.\n */\nimport { IndexedFormula, NamedNode } from 'rdflib'\nimport { icons } from '../lib/iconBase'\nimport { authn, authSession } from 'solid-logic'\nimport { loginStatusBox } from '../login/login'\n// import { loginStatusBox, authSession, currentUser } from '../authn/authn'\nimport * as widgets from '../widgets'\nimport { style } from '../lib/style'\nimport { emptyProfile } from './empty-profile'\nimport { getPod, throttle } from '../utils/headerFooterHelpers'\n\n/**\n * menu icons\n*/\nconst DEFAULT_HELP_MENU_ICON = icons.iconBase + 'noun_help.svg'\nconst DEFAUL_SOLID_ICON_URL = 'https://solidproject.org/assets/img/solid-emblem.svg'\n\nexport type MenuItemLink = {\n label: string,\n url: string,\n target?: string\n}\n\nexport type MenuItemButton = {\n label: string,\n onclick: () => void\n}\n\nexport type MenuItems = MenuItemLink | MenuItemButton\n\n/*\n HeaderOptions allow for customizing the logo and menu list. If a logo is not provided the default\n is solid. Menulist will always show a link to logout and to the users profile.\n */\nexport type HeaderOptions = {\n logo?: string,\n helpIcon?: string,\n helpMenuList?: MenuItems[]\n}\n\n/**\n * Initialize header component, the header object returned depends on whether the user is authenticated.\n * @param store the data store\n * @param userMenuList a list of menu items when the user is logged in\n * @param options allow the header to be customized with a personalized logo, help icon and a help menu list of links or buttons.\n * @returns a header for an authenticated user with menu items given or a login screen\n */\nexport async function initHeader (store: IndexedFormula, userMenuList: MenuItems[], options?: HeaderOptions) {\n const header = document.getElementById('PageHeader')\n if (!header) {\n return\n }\n\n const pod = getPod()\n rebuildHeader(header, store, pod, userMenuList, options)()\n authSession.events.on('logout', rebuildHeader(header, store, pod, userMenuList, options))\n authSession.events.on('login', rebuildHeader(header, store, pod, userMenuList, options))\n}\n/**\n * @ignore exporting this only for the unit test\n */\nexport function rebuildHeader (header: HTMLElement, store: IndexedFormula, pod: NamedNode, userMenuList: MenuItems[], options?: HeaderOptions) {\n return async () => {\n const user = authn.currentUser()\n header.innerHTML = ''\n header.appendChild(await createBanner(store, pod, user, userMenuList, options))\n }\n}\n/**\n * @ignore exporting this only for the unit test\n */\nexport async function createBanner (store: IndexedFormula, pod: NamedNode, user: NamedNode | null, userMenuList: MenuItems[], options?: HeaderOptions): Promise<HTMLElement> {\n const podLink = document.createElement('a')\n podLink.href = pod.uri\n podLink.setAttribute('style', style.headerBannerLink)\n const image = document.createElement('img')\n if (options) {\n image.src = options.logo ? options.logo : DEFAUL_SOLID_ICON_URL\n }\n image.setAttribute('style', style.headerBannerIcon)\n podLink.appendChild(image)\n\n const userMenu = user\n ? await createUserMenu(store, user, userMenuList)\n : createLoginSignUpButtons()\n\n const banner = document.createElement('div')\n banner.setAttribute('style', style.headerBanner)\n banner.appendChild(podLink)\n\n const leftSideOfHeader = document.createElement('div')\n leftSideOfHeader.setAttribute('style', style.headerBannerRightMenu)\n leftSideOfHeader.appendChild(userMenu)\n\n if (options && options.helpMenuList) {\n const helpMenu = createHelpMenu(options, options.helpMenuList)\n leftSideOfHeader.appendChild(helpMenu as HTMLDivElement)\n }\n\n banner.appendChild(leftSideOfHeader)\n\n return banner\n}\n/**\n * @ignore exporting this only for the unit test\n */\nexport function createHelpMenu (options: HeaderOptions, helpMenuItems: MenuItems[]) {\n if (!helpMenuItems) return\n const helpMenuList = document.createElement('ul')\n helpMenuList.setAttribute('style', style.headerUserMenuList)\n helpMenuItems.forEach(function (menuItem) {\n const menuItemType: string = (menuItem as MenuItemLink).url ? 'url' : 'onclick'\n if (menuItemType === 'url') {\n helpMenuList.appendChild(createUserMenuItem(createUserMenuLink(menuItem.label, (menuItem as MenuItemLink).url, (menuItem as MenuItemLink).target)))\n } else {\n helpMenuList.appendChild(createUserMenuItem(createUserMenuButton(menuItem.label, (menuItem as MenuItemButton).onclick)))\n }\n })\n\n const helpMenu = document.createElement('nav')\n\n helpMenu.setAttribute('style', style.headerUserMenuNavigationMenuNotDisplayed)\n helpMenu.setAttribute('aria-hidden', 'true')\n helpMenu.setAttribute('id', 'helperNav')\n helpMenu.appendChild(helpMenuList)\n\n const helpMenuContainer = document.createElement('div')\n helpMenuContainer.setAttribute('style', style.headerBannerUserMenu)\n helpMenuContainer.appendChild(helpMenu)\n\n const helpMenuTrigger = document.createElement('button')\n helpMenuTrigger.setAttribute('style', style.headerUserMenuTrigger)\n helpMenuTrigger.type = 'button'\n\n const helpMenuIcon = document.createElement('img')\n helpMenuIcon.src = (options && options.helpIcon) ? options.helpIcon : icons.iconBase + DEFAULT_HELP_MENU_ICON\n helpMenuIcon.setAttribute('style', style.headerUserMenuTriggerImg)\n helpMenuContainer.appendChild(helpMenuTrigger)\n helpMenuTrigger.appendChild(helpMenuIcon)\n\n const throttledMenuToggle = throttle((event: Event) => toggleMenu(event, helpMenuTrigger, helpMenu), 50)\n helpMenuTrigger.addEventListener('click', throttledMenuToggle)\n let timer = setTimeout(() => null, 0)\n helpMenuContainer.addEventListener('mouseover', event => {\n clearTimeout(timer)\n throttledMenuToggle(event)\n const nav = document.getElementById('helperNav')\n nav?.setAttribute('style', style.headerUserMenuNavigationMenu)\n })\n helpMenuContainer.addEventListener('mouseout', event => {\n timer = setTimeout(() => throttledMenuToggle(event), 200)\n const nav = document.getElementById('helperNav')\n nav?.setAttribute('style', style.headerUserMenuNavigationMenuNotDisplayed)\n })\n\n return helpMenuContainer\n}\n/**\n * @ignore exporting this only for the unit test\n */\nexport function createLoginSignUpButtons () {\n const profileLoginButtonPre = document.createElement('div')\n profileLoginButtonPre.setAttribute('style', style.headerBannerLogin)\n profileLoginButtonPre.appendChild(loginStatusBox(document, null, {}))\n return profileLoginButtonPre\n}\n/**\n * @ignore exporting this only for the unit test\n */\nexport function createUserMenuButton (label: string, onClick: EventListenerOrEventListenerObject): HTMLElement {\n const button = document.createElement('button')\n button.setAttribute('style', style.headerUserMenuButton)\n button.onmouseover = function () {\n button.setAttribute('style', style.headerUserMenuButtonHover)\n }\n button.onmouseout = function () {\n button.setAttribute('style', style.headerUserMenuButton)\n }\n button.addEventListener('click', onClick)\n button.innerText = label\n return button\n}\n/**\n * @ignore exporting this only for the unit test\n */\nexport function createUserMenuLink (label: string, href: string, target?: string): HTMLElement {\n const link = document.createElement('a')\n link.setAttribute('style', style.headerUserMenuLink)\n link.onmouseover = function () {\n link.setAttribute('style', style.headerUserMenuLinkHover)\n }\n link.onmouseout = function () {\n link.setAttribute('style', style.headerUserMenuLink)\n }\n link.href = href\n link.innerText = label\n if (target) link.target = target\n return link\n}\n\n/**\n * @ignore exporting this only for the unit test\n */\nexport async function createUserMenu (store: IndexedFormula, user: NamedNode, userMenuList: MenuItems[]): Promise<HTMLElement> {\n const fetcher = (<any>store).fetcher\n if (fetcher) {\n // Making sure that Profile is loaded before building menu\n await fetcher.load(user)\n }\n\n const loggedInMenuList = document.createElement('ul')\n loggedInMenuList.setAttribute('style', style.headerUserMenuList)\n if (userMenuList) {\n userMenuList.forEach(function (menuItem) {\n const menuItemType: string = (menuItem as MenuItemLink).url ? 'url' : 'onclick'\n if (menuItemType === 'url') {\n loggedInMenuList.appendChild(createUserMenuItem(createUserMenuLink(menuItem.label, (menuItem as MenuItemLink).url, (menuItem as MenuItemLink).target)))\n } else {\n loggedInMenuList.appendChild(createUserMenuItem(createUserMenuButton(menuItem.label, (menuItem as MenuItemButton).onclick)))\n }\n })\n }\n const loggedInMenu = document.createElement('nav')\n\n loggedInMenu.setAttribute('style', style.headerUserMenuNavigationMenuNotDisplayed)\n loggedInMenu.setAttribute('aria-hidden', 'true')\n loggedInMenu.setAttribute('id', 'loggedInNav')\n loggedInMenu.appendChild(loggedInMenuList)\n\n const loggedInMenuTrigger = document.createElement('button')\n loggedInMenuTrigger.setAttribute('style', style.headerUserMenuTrigger)\n loggedInMenuTrigger.type = 'button'\n const profileImg = getProfileImg(store, user)\n if (typeof profileImg === 'string') {\n loggedInMenuTrigger.innerHTML = profileImg\n } else {\n loggedInMenuTrigger.appendChild(profileImg)\n }\n\n const loggedInMenuContainer = document.createElement('div')\n loggedInMenuContainer.setAttribute('style', style.headerBannerUserMenuNotDisplayed)\n loggedInMenuContainer.appendChild(loggedInMenuTrigger)\n loggedInMenuContainer.appendChild(loggedInMenu)\n\n const throttledMenuToggle = throttle((event: Event) => toggleMenu(event, loggedInMenuTrigger, loggedInMenu), 50)\n loggedInMenuTrigger.addEventListener('click', throttledMenuToggle)\n let timer = setTimeout(() => null, 0)\n loggedInMenuContainer.addEventListener('mouseover', event => {\n clearTimeout(timer)\n throttledMenuToggle(event)\n const nav = document.getElementById('loggedInNav')\n nav?.setAttribute('style', style.headerUserMenuNavigationMenu)\n })\n loggedInMenuContainer.addEventListener('mouseout', event => {\n timer = setTimeout(() => throttledMenuToggle(event), 200)\n const nav = document.getElementById('loggedInNav')\n nav?.setAttribute('style', style.headerUserMenuNavigationMenuNotDisplayed)\n })\n\n return loggedInMenuContainer\n}\n\n/**\n * @ignore exporting this only for the unit test\n */\nexport function createUserMenuItem (child: HTMLElement): HTMLElement {\n const menuProfileItem = document.createElement('li')\n menuProfileItem.setAttribute('style', style.headerUserMenuListItem)\n menuProfileItem.appendChild(child)\n return menuProfileItem\n}\n/**\n * @ignore exporting this only for the unit test\n */\nexport function getProfileImg (store: IndexedFormula, user: NamedNode): string | HTMLElement {\n let profileUrl = null\n try {\n profileUrl = widgets.findImage(user)\n if (!profileUrl) {\n return emptyProfile\n }\n } catch {\n return emptyProfile\n }\n\n const profileImage = document.createElement('div')\n profileImage.setAttribute('style', style.headerUserMenuPhoto)\n profileImage.style.backgroundImage = `url(${profileUrl})`\n return profileImage\n}\n\n/**\n * @internal\n */\nfunction toggleMenu (event: Event, trigger: HTMLButtonElement, menu: HTMLElement): void {\n const isExpanded = trigger.getAttribute('aria-expanded') === 'true'\n const expand = event.type === 'mouseover'\n const close = event.type === 'mouseout'\n if ((isExpanded && expand) || (!isExpanded && close)) {\n return\n }\n trigger.setAttribute('aria-expanded', (!isExpanded).toString())\n menu.setAttribute('aria-hidden', isExpanded.toString())\n}\n"],"mappings":"A,gTAkBA,IAAMc,EAAyBd,EAAAA,MAAM,SAAW,gBAC1Ce,EAAwB,uDAgC9B,eAAsBC,EAAY,EAAuB,EAA2B,EAAyB,CAC3G,IAAMC,EAAS,SAAS,eAAe,YAAY,EACnD,GAAI,CAACA,EACH,OAGF,IAAMC,EAAMjB,EAAAA,OAAO,EACnBkB,EAAcF,EAAQG,EAAOF,EAAKG,EAAcC,CAAO,CAAC,CAAC,EACzDT,EAAA,YAAY,OAAO,GAAG,SAAUM,EAAcF,EAAQG,EAAOF,EAAKG,EAAcC,CAAO,CAAC,EACxFT,EAAA,YAAY,OAAO,GAAG,QAASM,EAAcF,EAAQG,EAAOF,EAAKG,EAAcC,CAAO,CAAC,CACzF,CAIA,SAAgBH,EAAe,EAAqB,EAAuB,EAAgB,EAA2B,EAAyB,CAC7I,OAAO,SAAY,CACjB,IAAMI,EAAOrB,EAAAA,MAAM,YAAY,EAC/B,EAAO,UAAY,GACnBe,EAAO,YAAY,MAAMO,EAAaJ,EAAOF,EAAKK,EAAMF,EAAcC,CAAO,CAAC,CAChF,CACF,CAIA,eAAsBE,EAAc,EAAuB,EAAgB,EAAwB,EAA2B,EAA+C,CAC3K,IAAMC,EAAU,SAAS,cAAc,GAAG,EAC1C,EAAQ,KAAOP,EAAI,IACnBO,EAAQ,aAAa,QAAStB,EAAAA,MAAM,gBAAgB,EACpD,IAAMuB,EAAQ,SAAS,cAAc,KAAK,EACtCJ,IACF,EAAM,IAAMA,EAAQ,KAAOA,EAAQ,KAAOP,GAE5CW,EAAM,aAAa,QAASvB,EAAAA,MAAM,gBAAgB,EAClDsB,EAAQ,YAAYC,CAAK,EAEzB,IAAMC,EAAWJ,EACb,MAAMK,EAAeR,EAAOG,EAAMF,CAAY,EAC9CQ,EAAyB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Y,EAAc,EAA4B,EAAyB,CACtF,IAAMqB,EAAaC,EAAQ,aAAa,eAAe,IAAM,OACvDC,EAAStB,EAAM,OAAS,YACxBuB,EAAQvB,EAAM,OAAS,WACxBoB,GAAcE,GAAY,CAACF,GAAcG,IAG9CF,EAAQ,aAAa,iBAAkB,CAACD,EAAA,CAAY,SAAS,CAAC,EAC9DI,EAAK,aAAa,cAAeJ,EAAW,SAAS,CAAC,EACxD,C"}
|
|
1
|
+
{"version":3,"file":"index.cjs.js","names":["icons","getPod","authn","style","throttle","loginStatusBox","emptyProfile","require_iconBase","require_login","require_buttons","require_style","require_empty_profile","require_headerFooterHelpers","solid_logic","DEFAULT_HELP_MENU_ICON","DEFAUL_SOLID_ICON_URL","initHeader","header","pod","rebuildHeader","store","userMenuList","options","user","createBanner","podLink","image","userMenu","createUserMenu","createLoginSignUpButtons","banner","leftSideOfHeader","helpMenu","createHelpMenu","helpMenuItems","helpMenuList","menuItem","createUserMenuItem","createUserMenuLink","createUserMenuButton","helpMenuContainer","helpMenuTrigger","helpMenuIcon","throttledMenuToggle","toggleMenu","event","timer","profileLoginButtonPre","button","onClick","label","link","href","target","fetcher","loggedInMenuList","loggedInMenu","loggedInMenuTrigger","profileImg","getProfileImg","loggedInMenuContainer","menuProfileItem","child","profileUrl","profileImage","isExpanded","trigger","expand","close","menu"],"sources":["../../src/header/index.ts"],"sourcesContent":["/* global EventListenerOrEventListenerObject */\n/*\n This file was copied from mashlib/src/global/header.ts file. It is modified to\n work in solid-ui by adjusting where imported functions are found.\n */\nimport { IndexedFormula, NamedNode } from 'rdflib'\nimport { icons } from '../lib/iconBase'\nimport { authn, authSession } from 'solid-logic'\nimport { loginStatusBox } from '../login/login'\n// import { loginStatusBox, authSession, currentUser } from '../authn/authn'\nimport * as widgets from '../widgets'\nimport { style } from '../lib/style'\nimport { emptyProfile } from './empty-profile'\nimport { getPod, throttle } from '../utils/headerFooterHelpers'\n\n/**\n * menu icons\n*/\nconst DEFAULT_HELP_MENU_ICON = icons.iconBase + 'noun_help.svg'\nconst DEFAUL_SOLID_ICON_URL = 'https://solidproject.org/assets/img/solid-emblem.svg'\n\nexport type MenuItemLink = {\n label: string,\n url: string,\n target?: string\n}\n\nexport type MenuItemButton = {\n label: string,\n onclick: () => void\n}\n\nexport type MenuItems = MenuItemLink | MenuItemButton\n\n/*\n HeaderOptions allow for customizing the logo and menu list. If a logo is not provided the default\n is solid. Menulist will always show a link to logout and to the users profile.\n */\nexport type HeaderOptions = {\n logo?: string,\n helpIcon?: string,\n helpMenuList?: MenuItems[]\n}\n\n/**\n * Initialize header component, the header object returned depends on whether the user is authenticated.\n * @param store the data store\n * @param userMenuList a list of menu items when the user is logged in\n * @param options allow the header to be customized with a personalized logo, help icon and a help menu list of links or buttons.\n * @returns a header for an authenticated user with menu items given or a login screen\n */\nexport async function initHeader (store: IndexedFormula, userMenuList: MenuItems[], options?: HeaderOptions) {\n const header = document.getElementById('PageHeader')\n if (!header) {\n return\n }\n\n const pod = getPod()\n rebuildHeader(header, store, pod, userMenuList, options)()\n authSession.events.on('logout', rebuildHeader(header, store, pod, userMenuList, options))\n authSession.events.on('login', rebuildHeader(header, store, pod, userMenuList, options))\n}\n/**\n * @ignore exporting this only for the unit test\n */\nexport function rebuildHeader (header: HTMLElement, store: IndexedFormula, pod: NamedNode, userMenuList: MenuItems[], options?: HeaderOptions) {\n return async () => {\n const user = authn.currentUser()\n header.innerHTML = ''\n header.appendChild(await createBanner(store, pod, user, userMenuList, options))\n }\n}\n/**\n * @ignore exporting this only for the unit test\n */\nexport async function createBanner (store: IndexedFormula, pod: NamedNode, user: NamedNode | null, userMenuList: MenuItems[], options?: HeaderOptions): Promise<HTMLElement> {\n const podLink = document.createElement('a')\n podLink.href = pod.uri\n podLink.setAttribute('style', style.headerBannerLink)\n const image = document.createElement('img')\n if (options) {\n image.src = options.logo ? options.logo : DEFAUL_SOLID_ICON_URL\n }\n image.setAttribute('style', style.headerBannerIcon)\n podLink.appendChild(image)\n\n const userMenu = user\n ? await createUserMenu(store, user, userMenuList)\n : createLoginSignUpButtons()\n\n const banner = document.createElement('div')\n banner.setAttribute('style', style.headerBanner)\n banner.appendChild(podLink)\n\n const leftSideOfHeader = document.createElement('div')\n leftSideOfHeader.setAttribute('style', style.headerBannerRightMenu)\n leftSideOfHeader.appendChild(userMenu)\n\n if (options && options.helpMenuList) {\n const helpMenu = createHelpMenu(options, options.helpMenuList)\n leftSideOfHeader.appendChild(helpMenu as HTMLDivElement)\n }\n\n banner.appendChild(leftSideOfHeader)\n\n return banner\n}\n/**\n * @ignore exporting this only for the unit test\n */\nexport function createHelpMenu (options: HeaderOptions, helpMenuItems: MenuItems[]) {\n if (!helpMenuItems) return\n const helpMenuList = document.createElement('ul')\n helpMenuList.setAttribute('style', style.headerUserMenuList)\n helpMenuItems.forEach(function (menuItem) {\n const menuItemType: string = (menuItem as MenuItemLink).url ? 'url' : 'onclick'\n if (menuItemType === 'url') {\n helpMenuList.appendChild(createUserMenuItem(createUserMenuLink(menuItem.label, (menuItem as MenuItemLink).url, (menuItem as MenuItemLink).target)))\n } else {\n helpMenuList.appendChild(createUserMenuItem(createUserMenuButton(menuItem.label, (menuItem as MenuItemButton).onclick)))\n }\n })\n\n const helpMenu = document.createElement('nav')\n\n helpMenu.setAttribute('style', style.headerUserMenuNavigationMenuNotDisplayed)\n helpMenu.setAttribute('aria-hidden', 'true')\n helpMenu.setAttribute('id', 'helperNav')\n helpMenu.appendChild(helpMenuList)\n\n const helpMenuContainer = document.createElement('div')\n helpMenuContainer.setAttribute('style', style.headerBannerUserMenu)\n helpMenuContainer.appendChild(helpMenu)\n\n const helpMenuTrigger = document.createElement('button')\n helpMenuTrigger.setAttribute('style', style.headerUserMenuTrigger)\n helpMenuTrigger.type = 'button'\n\n const helpMenuIcon = document.createElement('img')\n helpMenuIcon.src = (options && options.helpIcon) ? options.helpIcon : icons.iconBase + DEFAULT_HELP_MENU_ICON\n helpMenuIcon.setAttribute('style', style.headerUserMenuTriggerImg)\n helpMenuContainer.appendChild(helpMenuTrigger)\n helpMenuTrigger.appendChild(helpMenuIcon)\n\n const throttledMenuToggle = throttle((event: Event) => toggleMenu(event, helpMenuTrigger, helpMenu), 50)\n helpMenuTrigger.addEventListener('click', throttledMenuToggle)\n let timer = setTimeout(() => null, 0)\n helpMenuContainer.addEventListener('mouseover', event => {\n clearTimeout(timer)\n throttledMenuToggle(event)\n const nav = document.getElementById('helperNav')\n nav?.setAttribute('style', style.headerUserMenuNavigationMenu)\n })\n helpMenuContainer.addEventListener('mouseout', event => {\n timer = setTimeout(() => throttledMenuToggle(event), 200)\n const nav = document.getElementById('helperNav')\n nav?.setAttribute('style', style.headerUserMenuNavigationMenuNotDisplayed)\n })\n\n return helpMenuContainer\n}\n/**\n * @ignore exporting this only for the unit test\n */\nexport function createLoginSignUpButtons () {\n const profileLoginButtonPre = document.createElement('div')\n profileLoginButtonPre.setAttribute('style', style.headerBannerLogin)\n profileLoginButtonPre.appendChild(loginStatusBox(document, null, {}))\n return profileLoginButtonPre\n}\n/**\n * @ignore exporting this only for the unit test\n */\nexport function createUserMenuButton (label: string, onClick: EventListenerOrEventListenerObject): HTMLElement {\n const button = document.createElement('button')\n button.setAttribute('style', style.headerUserMenuButton)\n button.onmouseover = function () {\n button.setAttribute('style', style.headerUserMenuButtonHover)\n }\n button.onmouseout = function () {\n button.setAttribute('style', style.headerUserMenuButton)\n }\n button.addEventListener('click', onClick)\n button.innerText = label\n return button\n}\n/**\n * @ignore exporting this only for the unit test\n */\nexport function createUserMenuLink (label: string, href: string, target?: string): HTMLElement {\n const link = document.createElement('a')\n link.setAttribute('style', style.headerUserMenuLink)\n link.onmouseover = function () {\n link.setAttribute('style', style.headerUserMenuLinkHover)\n }\n link.onmouseout = function () {\n link.setAttribute('style', style.headerUserMenuLink)\n }\n link.href = href\n link.innerText = label\n if (target) link.target = target\n return link\n}\n\n/**\n * @ignore exporting this only for the unit test\n */\nexport async function createUserMenu (store: IndexedFormula, user: NamedNode, userMenuList: MenuItems[]): Promise<HTMLElement> {\n const fetcher = (<any>store).fetcher\n if (fetcher) {\n // Making sure that Profile is loaded before building menu\n await fetcher.load(user)\n }\n\n const loggedInMenuList = document.createElement('ul')\n loggedInMenuList.setAttribute('style', style.headerUserMenuList)\n if (userMenuList) {\n userMenuList.forEach(function (menuItem) {\n const menuItemType: string = (menuItem as MenuItemLink).url ? 'url' : 'onclick'\n if (menuItemType === 'url') {\n loggedInMenuList.appendChild(createUserMenuItem(createUserMenuLink(menuItem.label, (menuItem as MenuItemLink).url, (menuItem as MenuItemLink).target)))\n } else {\n loggedInMenuList.appendChild(createUserMenuItem(createUserMenuButton(menuItem.label, (menuItem as MenuItemButton).onclick)))\n }\n })\n }\n const loggedInMenu = document.createElement('nav')\n\n loggedInMenu.setAttribute('style', style.headerUserMenuNavigationMenuNotDisplayed)\n loggedInMenu.setAttribute('aria-hidden', 'true')\n loggedInMenu.setAttribute('id', 'loggedInNav')\n loggedInMenu.appendChild(loggedInMenuList)\n\n const loggedInMenuTrigger = document.createElement('button')\n loggedInMenuTrigger.setAttribute('style', style.headerUserMenuTrigger)\n loggedInMenuTrigger.type = 'button'\n const profileImg = getProfileImg(store, user)\n if (typeof profileImg === 'string') {\n loggedInMenuTrigger.innerHTML = profileImg\n } else {\n loggedInMenuTrigger.appendChild(profileImg)\n }\n\n const loggedInMenuContainer = document.createElement('div')\n loggedInMenuContainer.setAttribute('style', style.headerBannerUserMenuNotDisplayed)\n loggedInMenuContainer.appendChild(loggedInMenuTrigger)\n loggedInMenuContainer.appendChild(loggedInMenu)\n\n const throttledMenuToggle = throttle((event: Event) => toggleMenu(event, loggedInMenuTrigger, loggedInMenu), 50)\n loggedInMenuTrigger.addEventListener('click', throttledMenuToggle)\n let timer = setTimeout(() => null, 0)\n loggedInMenuContainer.addEventListener('mouseover', event => {\n clearTimeout(timer)\n throttledMenuToggle(event)\n const nav = document.getElementById('loggedInNav')\n nav?.setAttribute('style', style.headerUserMenuNavigationMenu)\n })\n loggedInMenuContainer.addEventListener('mouseout', event => {\n timer = setTimeout(() => throttledMenuToggle(event), 200)\n const nav = document.getElementById('loggedInNav')\n nav?.setAttribute('style', style.headerUserMenuNavigationMenuNotDisplayed)\n })\n\n return loggedInMenuContainer\n}\n\n/**\n * @ignore exporting this only for the unit test\n */\nexport function createUserMenuItem (child: HTMLElement): HTMLElement {\n const menuProfileItem = document.createElement('li')\n menuProfileItem.setAttribute('style', style.headerUserMenuListItem)\n menuProfileItem.appendChild(child)\n return menuProfileItem\n}\n/**\n * @ignore exporting this only for the unit test\n */\nexport function getProfileImg (store: IndexedFormula, user: NamedNode): string | HTMLElement {\n let profileUrl = null\n try {\n profileUrl = widgets.findImage(user)\n if (!profileUrl) {\n return emptyProfile\n }\n } catch {\n return emptyProfile\n }\n\n const profileImage = document.createElement('div')\n profileImage.setAttribute('style', style.headerUserMenuPhoto)\n profileImage.style.backgroundImage = `url(${profileUrl})`\n return profileImage\n}\n\n/**\n * @internal\n */\nfunction toggleMenu (event: Event, trigger: HTMLButtonElement, menu: HTMLElement): void {\n const isExpanded = trigger.getAttribute('aria-expanded') === 'true'\n const expand = event.type === 'mouseover'\n const close = event.type === 'mouseout'\n if ((isExpanded && expand) || (!isExpanded && close)) {\n return\n }\n trigger.setAttribute('aria-expanded', (!isExpanded).toString())\n menu.setAttribute('aria-hidden', isExpanded.toString())\n}\n"],"mappings":"A,gTAkBA,IAAMc,EAAyBd,EAAAA,MAAM,SAAW,gBAC1Ce,EAAwB,uDAgC9B,eAAsBC,EAAY,EAAuB,EAA2B,EAAyB,CAC3G,IAAMC,EAAS,SAAS,eAAe,YAAY,EACnD,GAAI,CAACA,EACH,OAGF,IAAMC,EAAMjB,EAAAA,OAAO,EACnBkB,EAAcF,EAAQG,EAAOF,EAAKG,EAAcC,CAAO,CAAC,CAAC,EACzDT,EAAA,YAAY,OAAO,GAAG,SAAUM,EAAcF,EAAQG,EAAOF,EAAKG,EAAcC,CAAO,CAAC,EACxFT,EAAA,YAAY,OAA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B,CAC/D,CAAC,EACDyD,EAAsB,iBAAiB,WAAY,GAAS,CAC1D,EAAQ,eAAiBjB,EAAoBE,CAAK,EAAG,GAAG,EAExD,SADqB,eAAe,aACpC,CAAA,EAAK,aAAa,QAAS1C,EAAAA,MAAM,wCAAwC,CAC3E,CAAC,EAEMyD,CACT,CAKA,SAAgBvB,EAAoB,EAAiC,CACnE,IAAMwB,EAAkB,SAAS,cAAc,IAAI,EAGnD,OAFAA,EAAgB,aAAa,QAAS1D,EAAAA,MAAM,sBAAsB,EAClE0D,EAAgB,YAAYC,CAAK,EAC1BD,CACT,CAIA,SAAgBF,EAAe,EAAuB,EAAuC,CAC3F,IAAII,EAAa,KACjB,GAAI,CAEF,GADA,EAAAtD,EAAA,UAA+Bc,CAAI,EAC/B,CAACwC,EACH,OAAOzD,EAAAA,YAEX,MAAQ,CACN,OAAOA,EAAAA,YACT,CAEA,IAAM0D,EAAe,SAAS,cAAc,KAAK,EAGjD,OAFAA,EAAa,aAAa,QAAS7D,EAAAA,MAAM,mBAAmB,EAC5D,EAAa,MAAM,gBAAkB,OAAO4D,EAAW,GAChDC,CACT,CAKA,SAASpB,EAAY,EAAc,EAA4B,EAAyB,CACtF,IAAMqB,EAAaC,EAAQ,aAAa,eAAe,IAAM,OACvDC,EAAStB,EAAM,OAAS,YACxBuB,EAAQvB,EAAM,OAAS,WACxBoB,GAAcE,GAAY,CAACF,GAAcG,IAG9CF,EAAQ,aAAa,iBAAkB,CAACD,EAAA,CAAY,SAAS,CAAC,EAC9DI,EAAK,aAAa,cAAeJ,EAAW,SAAS,CAAC,EACxD,C"}
|
package/dist/header/index.esm.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { icons as e } from "../lib/iconBase.esm.js";
|
|
2
|
+
import { loginStatusBox as t } from "../login/login.esm.js";
|
|
3
3
|
import { findImage as n } from "../widgets/buttons.esm.js";
|
|
4
4
|
import "../widgets/index.esm.js";
|
|
5
|
-
import {
|
|
5
|
+
import { style as r } from "../lib/style.esm.js";
|
|
6
6
|
import { emptyProfile as i } from "./empty-profile.esm.js";
|
|
7
7
|
import { getPod as a, throttle as o } from "../utils/headerFooterHelpers.esm.js";
|
|
8
8
|
import { authSession as s, authn as c } from "solid-logic";
|
|
9
9
|
// src/header/index.ts
|
|
10
|
-
var l =
|
|
10
|
+
var l = e.iconBase + "noun_help.svg", u = "https://solidproject.org/assets/img/solid-emblem.svg";
|
|
11
11
|
async function d(e, t, n) {
|
|
12
12
|
let r = document.getElementById("PageHeader");
|
|
13
13
|
if (!r) return;
|
|
@@ -20,100 +20,100 @@ function f(e, t, n, r, i) {
|
|
|
20
20
|
e.innerHTML = "", e.appendChild(await p(t, n, a, r, i));
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
|
-
async function p(t, n,
|
|
23
|
+
async function p(e, t, n, i, a) {
|
|
24
24
|
let o = document.createElement("a");
|
|
25
|
-
o.href =
|
|
25
|
+
o.href = t.uri, o.setAttribute("style", r.headerBannerLink);
|
|
26
26
|
let s = document.createElement("img");
|
|
27
|
-
a && (s.src = a.logo ? a.logo : u), s.setAttribute("style",
|
|
28
|
-
let c =
|
|
29
|
-
l.setAttribute("style",
|
|
27
|
+
a && (s.src = a.logo ? a.logo : u), s.setAttribute("style", r.headerBannerIcon), o.appendChild(s);
|
|
28
|
+
let c = n ? await v(e, n, i) : h(), l = document.createElement("div");
|
|
29
|
+
l.setAttribute("style", r.headerBanner), l.appendChild(o);
|
|
30
30
|
let d = document.createElement("div");
|
|
31
|
-
if (d.setAttribute("style",
|
|
31
|
+
if (d.setAttribute("style", r.headerBannerRightMenu), d.appendChild(c), a && a.helpMenuList) {
|
|
32
32
|
let e = m(a, a.helpMenuList);
|
|
33
33
|
d.appendChild(e);
|
|
34
34
|
}
|
|
35
35
|
return l.appendChild(d), l;
|
|
36
36
|
}
|
|
37
|
-
function m(
|
|
38
|
-
if (!
|
|
37
|
+
function m(t, n) {
|
|
38
|
+
if (!n) return;
|
|
39
39
|
let i = document.createElement("ul");
|
|
40
|
-
i.setAttribute("style",
|
|
40
|
+
i.setAttribute("style", r.headerUserMenuList), n.forEach(function(e) {
|
|
41
41
|
(e.url ? "url" : "onclick") == "url" ? i.appendChild(y(_(e.label, e.url, e.target))) : i.appendChild(y(g(e.label, e.onclick)));
|
|
42
42
|
});
|
|
43
43
|
let a = document.createElement("nav");
|
|
44
|
-
a.setAttribute("style",
|
|
44
|
+
a.setAttribute("style", r.headerUserMenuNavigationMenuNotDisplayed), a.setAttribute("aria-hidden", "true"), a.setAttribute("id", "helperNav"), a.appendChild(i);
|
|
45
45
|
let s = document.createElement("div");
|
|
46
|
-
s.setAttribute("style",
|
|
46
|
+
s.setAttribute("style", r.headerBannerUserMenu), s.appendChild(a);
|
|
47
47
|
let c = document.createElement("button");
|
|
48
|
-
c.setAttribute("style",
|
|
48
|
+
c.setAttribute("style", r.headerUserMenuTrigger), c.type = "button";
|
|
49
49
|
let u = document.createElement("img");
|
|
50
|
-
u.src =
|
|
50
|
+
u.src = t && t.helpIcon ? t.helpIcon : e.iconBase + l, u.setAttribute("style", r.headerUserMenuTriggerImg), s.appendChild(c), c.appendChild(u);
|
|
51
51
|
let d = o((e) => x(e, c, a), 50);
|
|
52
52
|
c.addEventListener("click", d);
|
|
53
53
|
let f = setTimeout(() => null, 0);
|
|
54
|
-
return s.addEventListener("mouseover", (
|
|
55
|
-
clearTimeout(f), d(
|
|
56
|
-
}), s.addEventListener("mouseout", (
|
|
57
|
-
f = setTimeout(() => d(
|
|
54
|
+
return s.addEventListener("mouseover", (e) => {
|
|
55
|
+
clearTimeout(f), d(e), document.getElementById("helperNav")?.setAttribute("style", r.headerUserMenuNavigationMenu);
|
|
56
|
+
}), s.addEventListener("mouseout", (e) => {
|
|
57
|
+
f = setTimeout(() => d(e), 200), document.getElementById("helperNav")?.setAttribute("style", r.headerUserMenuNavigationMenuNotDisplayed);
|
|
58
58
|
}), s;
|
|
59
59
|
}
|
|
60
60
|
function h() {
|
|
61
|
-
let
|
|
62
|
-
return
|
|
61
|
+
let e = document.createElement("div");
|
|
62
|
+
return e.setAttribute("style", r.headerBannerLogin), e.appendChild(t(document, null, {})), e;
|
|
63
63
|
}
|
|
64
|
-
function g(
|
|
65
|
-
let
|
|
66
|
-
return
|
|
67
|
-
|
|
68
|
-
},
|
|
69
|
-
|
|
70
|
-
},
|
|
64
|
+
function g(e, t) {
|
|
65
|
+
let n = document.createElement("button");
|
|
66
|
+
return n.setAttribute("style", r.headerUserMenuButton), n.onmouseover = function() {
|
|
67
|
+
n.setAttribute("style", r.headerUserMenuButtonHover);
|
|
68
|
+
}, n.onmouseout = function() {
|
|
69
|
+
n.setAttribute("style", r.headerUserMenuButton);
|
|
70
|
+
}, n.addEventListener("click", t), n.innerText = e, n;
|
|
71
71
|
}
|
|
72
|
-
function _(t, n
|
|
72
|
+
function _(e, t, n) {
|
|
73
73
|
let i = document.createElement("a");
|
|
74
|
-
return i.setAttribute("style",
|
|
75
|
-
i.setAttribute("style",
|
|
74
|
+
return i.setAttribute("style", r.headerUserMenuLink), i.onmouseover = function() {
|
|
75
|
+
i.setAttribute("style", r.headerUserMenuLinkHover);
|
|
76
76
|
}, i.onmouseout = function() {
|
|
77
|
-
i.setAttribute("style",
|
|
78
|
-
}, i.href =
|
|
77
|
+
i.setAttribute("style", r.headerUserMenuLink);
|
|
78
|
+
}, i.href = t, i.innerText = e, n && (i.target = n), i;
|
|
79
79
|
}
|
|
80
|
-
async function v(t, n
|
|
81
|
-
let i =
|
|
82
|
-
i && await i.load(
|
|
80
|
+
async function v(e, t, n) {
|
|
81
|
+
let i = e.fetcher;
|
|
82
|
+
i && await i.load(t);
|
|
83
83
|
let a = document.createElement("ul");
|
|
84
|
-
a.setAttribute("style",
|
|
84
|
+
a.setAttribute("style", r.headerUserMenuList), n && n.forEach(function(e) {
|
|
85
85
|
(e.url ? "url" : "onclick") == "url" ? a.appendChild(y(_(e.label, e.url, e.target))) : a.appendChild(y(g(e.label, e.onclick)));
|
|
86
86
|
});
|
|
87
87
|
let s = document.createElement("nav");
|
|
88
|
-
s.setAttribute("style",
|
|
88
|
+
s.setAttribute("style", r.headerUserMenuNavigationMenuNotDisplayed), s.setAttribute("aria-hidden", "true"), s.setAttribute("id", "loggedInNav"), s.appendChild(a);
|
|
89
89
|
let c = document.createElement("button");
|
|
90
|
-
c.setAttribute("style",
|
|
91
|
-
let l = b(
|
|
90
|
+
c.setAttribute("style", r.headerUserMenuTrigger), c.type = "button";
|
|
91
|
+
let l = b(e, t);
|
|
92
92
|
typeof l == "string" ? c.innerHTML = l : c.appendChild(l);
|
|
93
93
|
let u = document.createElement("div");
|
|
94
|
-
u.setAttribute("style",
|
|
94
|
+
u.setAttribute("style", r.headerBannerUserMenuNotDisplayed), u.appendChild(c), u.appendChild(s);
|
|
95
95
|
let d = o((e) => x(e, c, s), 50);
|
|
96
96
|
c.addEventListener("click", d);
|
|
97
97
|
let f = setTimeout(() => null, 0);
|
|
98
|
-
return u.addEventListener("mouseover", (
|
|
99
|
-
clearTimeout(f), d(
|
|
100
|
-
}), u.addEventListener("mouseout", (
|
|
101
|
-
f = setTimeout(() => d(
|
|
98
|
+
return u.addEventListener("mouseover", (e) => {
|
|
99
|
+
clearTimeout(f), d(e), document.getElementById("loggedInNav")?.setAttribute("style", r.headerUserMenuNavigationMenu);
|
|
100
|
+
}), u.addEventListener("mouseout", (e) => {
|
|
101
|
+
f = setTimeout(() => d(e), 200), document.getElementById("loggedInNav")?.setAttribute("style", r.headerUserMenuNavigationMenuNotDisplayed);
|
|
102
102
|
}), u;
|
|
103
103
|
}
|
|
104
|
-
function y(
|
|
105
|
-
let
|
|
106
|
-
return
|
|
104
|
+
function y(e) {
|
|
105
|
+
let t = document.createElement("li");
|
|
106
|
+
return t.setAttribute("style", r.headerUserMenuListItem), t.appendChild(e), t;
|
|
107
107
|
}
|
|
108
|
-
function b(
|
|
108
|
+
function b(e, t) {
|
|
109
109
|
let a = null;
|
|
110
110
|
try {
|
|
111
|
-
if (a = n(
|
|
111
|
+
if (a = n(t), !a) return i;
|
|
112
112
|
} catch {
|
|
113
113
|
return i;
|
|
114
114
|
}
|
|
115
115
|
let o = document.createElement("div");
|
|
116
|
-
return o.setAttribute("style",
|
|
116
|
+
return o.setAttribute("style", r.headerUserMenuPhoto), o.style.backgroundImage = `url(${a})`, o;
|
|
117
117
|
}
|
|
118
118
|
function x(e, t, n) {
|
|
119
119
|
let r = t.getAttribute("aria-expanded") === "true", i = e.type === "mouseover", a = e.type === "mouseout";
|
package/dist/index.cjs.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./lib/ns.cjs.js"),t=require("./
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./lib/ns.cjs.js"),t=require("./acl/index.cjs.js"),n=require("./create/index.cjs.js"),r=require("./lib/iconBase.cjs.js"),i=require("./widgets/forms/autocomplete/language.cjs.js"),a=require("./lib/log.cjs.js"),o=require("./matrix/index.cjs.js"),s=require("./media/index.cjs.js"),c=require("./lib/messageArea.cjs.js"),l=require("./chat/infinite.cjs.js"),u=require("./lib/pad.cjs.js"),d=require("./lib/participation.cjs.js"),f=require("./lib/preferences.cjs.js"),p=require("./lib/style.cjs.js"),m=require("./lib/table.cjs.js"),h=require("./lib/tabs.cjs.js"),g=require("./utils/index.cjs.js"),_=require("./login/login.cjs.js"),v=require("./widgets/index.cjs.js"),y=require("./header/index.cjs.js"),b=require("./footer/index.cjs.js"),x=require("./create/types.cjs.js"),S=require("./lib/auth/Account.cjs.js"),C=require("./lib/auth/NoopAuth.cjs.js"),w=require("./lib/auth/context.cjs.js"),T=require("./lib/components/ids.cjs.js"),E=require("./lib/dialogs/context.cjs.js"),D=require("./lib/components/decorators.cjs.js"),O=require("./lib/dialogs/events/close-dialog.cjs.js"),k=require("./lib/components/traits/DialogTrait.cjs.js"),A=require("./lib/components/web-component/WebComponent.cjs.js"),j=require("./lib/components/dialog-component/DialogComponent.cjs.js"),M=require("./lib/components/traits/FormControlTrait.cjs.js"),N=require("./lib/components/form-control-component/FormControlComponent.cjs.js");require("./lib/auth/index.cjs.js");const P=require("./lib/dialogs/Dialog.cjs.js"),F=require("./lib/dialogs/events/show-dialog.cjs.js"),I=require("./lib/dialogs/helpers.cjs.js");require("./lib/components/index.cjs.js");const L=require("./lib/auth/SolidAuth.cjs.js");require("./lib/dialogs/index.cjs.js");const R=require("./lib/file-explorer/context.cjs.js"),z=require("./lib/file-explorer/events.cjs.js"),B=require("./lib/file-explorer/relevant-panes.cjs.js"),V=require("./lib/file-explorer/compose-explorer.cjs.js");require("./lib/file-explorer/index.cjs.js");const H=require("./lib/code-editor/CodeEditor.cjs.js");require("./lib/code-editor/index.cjs.js");var U=typeof window<`u`?window.document:null;exports.Account=S.default,exports.CloseDialogEvent=O.CloseDialogEvent,exports.CodeEditor=H.CodeEditor,exports.DEFAULT_AUTH_CONTEXT=w.DEFAULT_AUTH_CONTEXT,exports.DEFAULT_DIALOG_CONTEXT=E.DEFAULT_DIALOG_CONTEXT,exports.DEFAULT_FILE_EXPLORER_CONTEXT=R.DEFAULT_FILE_EXPLORER_CONTEXT,exports.DEFAULT_SIGNUP_URL=L.DEFAULT_SIGNUP_URL,exports.Dialog=P.default,exports.DialogComponent=j.default,exports.DialogTrait=k.default,exports.FILE_EXPLORER_BACK_EVENT=z.FILE_EXPLORER_BACK_EVENT,exports.FILE_EXPLORER_MANAGE_ACCESS_EVENT=z.FILE_EXPLORER_MANAGE_ACCESS_EVENT,exports.FILE_EXPLORER_OPEN_PANE_EVENT=z.FILE_EXPLORER_OPEN_PANE_EVENT,exports.FormControlComponent=N.default,exports.FormControlTrait=M.default,exports.NoopAuth=C.default,exports.ShowDialogEvent=F.ShowDialogEvent,exports.SolidAuth=L.default,exports.WebComponent=A.default,exports.acl=t.acl,exports.aclControl=t.aclControl,exports.authContext=w.authContext,exports.composeExplorer=V.composeExplorer,exports.create=n.create,Object.defineProperty(exports,"createTypes",{enumerable:!0,get:function(){return x.types_exports}}),exports.customElement=D.customElement,exports.dialogContext=E.dialogContext,exports.dom=U,exports.fileExplorerContext=R.fileExplorerContext,exports.generateId=T.generateId,exports.getPreferredPane=B.getPreferredPane,exports.getRelevantPanes=B.getRelevantPanes,exports.icons=r.icons,exports.infiniteMessageArea=l.infiniteMessageArea,exports.initFooter=b.initFooter,exports.initHeader=y.initHeader,exports.isExplorerEvent=z.isExplorerEvent,Object.defineProperty(exports,"language",{enumerable:!0,get:function(){return i.language_exports}}),Object.defineProperty(exports,"log",{enumerable:!0,get:function(){return a.log_exports}}),Object.defineProperty(exports,"login",{enumerable:!0,get:function(){return _.login_exports}}),exports.matrix=o.matrix,exports.media=s.media,exports.messageArea=c.messageArea,exports.ns=e.default,Object.defineProperty(exports,"pad",{enumerable:!0,get:function(){return u.pad_exports}}),Object.defineProperty(exports,"participation",{enumerable:!0,get:function(){return d.participation_exports}}),Object.defineProperty(exports,"preferences",{enumerable:!0,get:function(){return f.preferences_exports}}),exports.showDialog=I.showDialog,exports.style=p.style,exports.table=m.renderTableViewPane,Object.defineProperty(exports,"tabs",{enumerable:!0,get:function(){return h.tabs_exports}}),Object.defineProperty(exports,"utils",{enumerable:!0,get:function(){return g.utils_exports}}),Object.defineProperty(exports,"widgets",{enumerable:!0,get:function(){return v.widgets_exports}});
|
|
2
2
|
//# sourceMappingURL=index.cjs.js.map
|
package/dist/index.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs.js","names":["require_ns","
|
|
1
|
+
{"version":3,"file":"index.cjs.js","names":["require_ns","require_index","require_index$1","require_iconBase","require_language","require_log","require_index$2","require_index$3","require_messageArea","require_infinite","require_pad","require_participation","require_preferences","require_style","require_table","require_tabs","require_index$4","require_login","require_index$5","require_index$6","require_index$7","require_types","require_Account","require_NoopAuth","require_context","require_ids","require_context$1","require_decorators","require_close_dialog","require_DialogTrait","require_WebComponent","require_DialogComponent","require_FormControlTrait","require_FormControlComponent","require_Dialog","require_show_dialog","require_helpers","require_SolidAuth","require_context$2","require_events","require_relevant_panes","require_compose_explorer","require_CodeEditor","dom"],"sources":["../src/index.ts"],"sourcesContent":["// REMOVE @ts-ignore as you migrate files to TypeScript\n// @ts-ignore\nimport ns from './lib/ns'\nimport { acl, aclControl } from './acl/index'\nimport { create } from './create/index'\n// @ts-ignore\nimport { icons } from './lib/iconBase'\nimport * as language from './widgets/forms/autocomplete/language'\nimport * as log from './lib/log'\nimport { matrix } from './matrix/index'\nimport { media } from './media/index'\n// @ts-ignore\nimport { messageArea } from './lib/messageArea'\n// @ts-ignore\nimport { infiniteMessageArea } from './chat/infinite'\n// @ts-ignore\nimport * as pad from './lib/pad'\n// @ts-ignore\nimport * as participation from './lib/participation'\n// @ts-ignore\nimport * as preferences from './lib/preferences'\n// @ts-ignore\nimport { style } from './lib/style'\n// @ts-ignore\nimport { renderTableViewPane as table } from './lib/table'\nimport * as tabs from './lib/tabs'\n// @ts-ignore\nimport * as utils from './utils'\nimport * as login from './login/login'\nimport * as widgets from './widgets/index'\nimport { initHeader } from './header'\nimport { initFooter } from './footer'\nimport * as createTypes from './create/types'\n\nexport const dom = typeof window !== 'undefined' ? window.document : null // Idea that UI.dom can be adapted in non-browser environments\n\n// this variables are directly used in the storybook\nexport {\n ns,\n acl,\n aclControl,\n create,\n createTypes,\n icons,\n language,\n log,\n login,\n matrix,\n media,\n messageArea,\n infiniteMessageArea,\n pad,\n participation,\n preferences,\n style,\n table,\n tabs,\n utils,\n widgets,\n initHeader,\n initFooter\n}\n// uses in solid-panes\nexport type { CreateContext, NewAppInstanceOptions } from './create/types'\n\nexport * from './lib/auth'\nexport * from './lib/components'\nexport * from './lib/dialogs'\nexport * from './lib/file-explorer'\nexport * from './lib/code-editor'\n"],"mappings":"A,2lEAkCA,IAAa2C,EAAM,OAAO,OAAW,IAAc,OAAO,SAAW,K"}
|
package/dist/index.esm.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import e from "./lib/ns.esm.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { style as r } from "./lib/style.esm.js";
|
|
2
|
+
import { acl as t, aclControl as n } from "./acl/index.esm.js";
|
|
3
|
+
import { create as r } from "./create/index.esm.js";
|
|
5
4
|
import { icons as i } from "./lib/iconBase.esm.js";
|
|
6
5
|
import { language_exports as a } from "./widgets/forms/autocomplete/language.esm.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
6
|
+
import { log_exports as o } from "./lib/log.esm.js";
|
|
7
|
+
import { matrix as s } from "./matrix/index.esm.js";
|
|
8
|
+
import { media as c } from "./media/index.esm.js";
|
|
9
|
+
import { messageArea as l } from "./lib/messageArea.esm.js";
|
|
10
|
+
import { infiniteMessageArea as u } from "./chat/infinite.esm.js";
|
|
11
|
+
import { pad_exports as d } from "./lib/pad.esm.js";
|
|
12
|
+
import { participation_exports as f } from "./lib/participation.esm.js";
|
|
13
|
+
import { preferences_exports as p } from "./lib/preferences.esm.js";
|
|
14
|
+
import { style as m } from "./lib/style.esm.js";
|
|
15
|
+
import { renderTableViewPane as h } from "./lib/table.esm.js";
|
|
16
|
+
import { tabs_exports as g } from "./lib/tabs.esm.js";
|
|
17
|
+
import { utils_exports as _ } from "./utils/index.esm.js";
|
|
18
|
+
import { login_exports as v } from "./login/login.esm.js";
|
|
19
|
+
import { widgets_exports as y } from "./widgets/index.esm.js";
|
|
20
20
|
import { initHeader as b } from "./header/index.esm.js";
|
|
21
21
|
import { initFooter as x } from "./footer/index.esm.js";
|
|
22
22
|
import { types_exports as S } from "./create/types.esm.js";
|
|
@@ -32,22 +32,22 @@ import N from "./lib/components/web-component/WebComponent.esm.js";
|
|
|
32
32
|
import P from "./lib/components/dialog-component/DialogComponent.esm.js";
|
|
33
33
|
import F from "./lib/components/traits/FormControlTrait.esm.js";
|
|
34
34
|
import I from "./lib/components/form-control-component/FormControlComponent.esm.js";
|
|
35
|
-
import "./lib/
|
|
35
|
+
import "./lib/auth/index.esm.js";
|
|
36
36
|
import L from "./lib/dialogs/Dialog.esm.js";
|
|
37
37
|
import { ShowDialogEvent as R } from "./lib/dialogs/events/show-dialog.esm.js";
|
|
38
38
|
import { showDialog as z } from "./lib/dialogs/helpers.esm.js";
|
|
39
|
-
import "./lib/
|
|
39
|
+
import "./lib/components/index.esm.js";
|
|
40
40
|
import B, { DEFAULT_SIGNUP_URL as V } from "./lib/auth/SolidAuth.esm.js";
|
|
41
|
-
import "./lib/
|
|
41
|
+
import "./lib/dialogs/index.esm.js";
|
|
42
42
|
import { DEFAULT_FILE_EXPLORER_CONTEXT as H, fileExplorerContext as U } from "./lib/file-explorer/context.esm.js";
|
|
43
43
|
import { FILE_EXPLORER_BACK_EVENT as W, FILE_EXPLORER_MANAGE_ACCESS_EVENT as G, FILE_EXPLORER_OPEN_PANE_EVENT as K, isExplorerEvent as q } from "./lib/file-explorer/events.esm.js";
|
|
44
|
-
import {
|
|
45
|
-
import { composeExplorer as
|
|
44
|
+
import { getPreferredPane as J, getRelevantPanes as Y } from "./lib/file-explorer/relevant-panes.esm.js";
|
|
45
|
+
import { composeExplorer as X } from "./lib/file-explorer/compose-explorer.esm.js";
|
|
46
46
|
import "./lib/file-explorer/index.esm.js";
|
|
47
|
-
import { CodeEditor as
|
|
47
|
+
import { CodeEditor as Z } from "./lib/code-editor/CodeEditor.esm.js";
|
|
48
48
|
import "./lib/code-editor/index.esm.js";
|
|
49
49
|
// src/index.ts
|
|
50
|
-
var
|
|
51
|
-
export { C as Account, j as CloseDialogEvent,
|
|
50
|
+
var Q = typeof window < "u" ? window.document : null;
|
|
51
|
+
export { C as Account, j as CloseDialogEvent, Z as CodeEditor, T as DEFAULT_AUTH_CONTEXT, O as DEFAULT_DIALOG_CONTEXT, H as DEFAULT_FILE_EXPLORER_CONTEXT, V as DEFAULT_SIGNUP_URL, L as Dialog, P as DialogComponent, M as DialogTrait, W as FILE_EXPLORER_BACK_EVENT, G as FILE_EXPLORER_MANAGE_ACCESS_EVENT, K as FILE_EXPLORER_OPEN_PANE_EVENT, I as FormControlComponent, F as FormControlTrait, w as NoopAuth, R as ShowDialogEvent, B as SolidAuth, N as WebComponent, t as acl, n as aclControl, E as authContext, X as composeExplorer, r as create, S as createTypes, A as customElement, k as dialogContext, Q as dom, U as fileExplorerContext, D as generateId, J as getPreferredPane, Y as getRelevantPanes, i as icons, u as infiniteMessageArea, x as initFooter, b as initHeader, q as isExplorerEvent, a as language, o as log, v as login, s as matrix, c as media, l as messageArea, e as ns, d as pad, f as participation, p as preferences, z as showDialog, m as style, h as table, g as tabs, _ as utils, y as widgets };
|
|
52
52
|
|
|
53
53
|
//# sourceMappingURL=index.esm.js.map
|