@protobase/ui 0.117.4 → 0.117.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/account/messages.d.ts +2 -2
- package/dist/app/app.js +40 -34
- package/dist/app/charts/messages.d.ts +2 -2
- package/dist/app/comments/messages.d.ts +2 -2
- package/dist/app/delete/messages.d.ts +2 -2
- package/dist/app/displays/messages.d.ts +2 -2
- package/dist/app/export/messages.d.ts +2 -2
- package/dist/app/field-messages.d.ts +2 -2
- package/dist/app/field-types/runner-install/messages.d.ts +2 -2
- package/dist/app/field-types/workflow/messages.d.ts +2 -2
- package/dist/app/field-types/workflow-page/messages.d.ts +2 -2
- package/dist/app/field-types/workflow-run/messages.d.ts +2 -2
- package/dist/app/field-types/workflow-status/messages.d.ts +2 -2
- package/dist/app/file-viewers/messages.d.ts +2 -2
- package/dist/app/focus/messages.d.ts +2 -2
- package/dist/app/gallery/gallery-layout.d.ts +2 -2
- package/dist/app/gallery/messages.d.ts +2 -2
- package/dist/app/history/messages.d.ts +2 -2
- package/dist/app/import/messages.d.ts +2 -2
- package/dist/app/list-messages.d.ts +2 -2
- package/dist/app/messages.d.ts +2 -2
- package/dist/app/meta-gate-messages.d.ts +2 -2
- package/dist/app/new-version/messages.d.ts +2 -2
- package/dist/app/pages/messages.d.ts +2 -2
- package/dist/app/record-chart/messages.d.ts +2 -2
- package/dist/app/record-messages.d.ts +2 -2
- package/dist/app/record-mode/shown-layout.d.ts +1 -1
- package/dist/app/record-row/messages.d.ts +2 -2
- package/dist/app/router.d.ts +2 -0
- package/dist/app/router.js +23 -10
- package/dist/app/runtime/messages.d.ts +2 -2
- package/dist/app/saved/messages.d.ts +2 -2
- package/dist/app/saved/use-favorite.d.ts +1 -1
- package/dist/app/search/messages.d.ts +2 -2
- package/dist/app/searches/messages.d.ts +2 -2
- package/dist/app/searches/use-save-search.d.ts +1 -1
- package/dist/app/use-app-address.d.ts +3 -1
- package/dist/app/use-app-address.js +5 -3
- package/dist/app-shell/app-shell.d.ts +3 -1
- package/dist/app-shell/app-shell.js +38 -5
- package/dist/app-shell/drawer.d.ts +10 -2
- package/dist/app-shell/drawer.js +16 -4
- package/dist/app-shell/edge-swipe.d.ts +49 -0
- package/dist/app-shell/edge-swipe.js +39 -0
- package/dist/app-shell/messages.d.ts +2 -2
- package/dist/app-shell/top-bar.js +1 -1
- package/dist/app-shell/use-edge-swipe.d.ts +25 -0
- package/dist/app-shell/use-edge-swipe.js +128 -0
- package/dist/assistant-dock/messages.d.ts +2 -2
- package/dist/auth/messages.d.ts +2 -2
- package/dist/calls/messages.d.ts +2 -2
- package/dist/chat/messages.d.ts +2 -2
- package/dist/data-grid/messages.d.ts +2 -2
- package/dist/filter-panel/messages.d.ts +2 -2
- package/dist/invitations/messages.d.ts +2 -2
- package/dist/notifications/bell/messages.d.ts +2 -2
- package/dist/organizations/messages.d.ts +2 -2
- package/dist/package.js +1 -1
- package/dist/primitives/messages.d.ts +2 -2
- package/dist/primitives/use-drawer-drag.d.ts +2 -0
- package/dist/primitives/use-drawer-drag.js +18 -6
- package/dist/record-view/messages.d.ts +2 -2
- package/dist/shell/assets/{account-page-BKgO5U-X.js → account-page-BPtyska2.js} +2 -2
- package/dist/shell/assets/app-DKn-6fgf.js +34 -0
- package/dist/shell/assets/{assistant-shell-DuqVM626.js → assistant-shell-BW59by36.js} +2 -2
- package/dist/shell/assets/{board-display-DddxG38M.js → board-display-uC4sMccF.js} +2 -2
- package/dist/shell/assets/{calendar-display-zLyE7rhF.js → calendar-display-BZhTapxV.js} +2 -2
- package/dist/shell/assets/{call-rings-uudxTLcY.js → call-rings-DwyQO_zl.js} +2 -2
- package/dist/shell/assets/{calls-7JJIY2v0.js → calls-DeHPxZSF.js} +2 -2
- package/dist/shell/assets/{circle-alert-CoX9nLsD.js → circle-alert-mtPRl_1e.js} +2 -2
- package/dist/shell/assets/{composed-page-DnCccgH0.js → composed-page-CqjAO9Zv.js} +2 -2
- package/dist/shell/assets/{composer-section-84NNbJ4X.js → composer-section-D16PrwJe.js} +2 -2
- package/dist/shell/assets/{connect-route-DXEPuBjl.js → connect-route-BHjM-n0c.js} +2 -2
- package/dist/shell/assets/{copy-field-BlooSgn7.js → copy-field-C7SgGBWe.js} +2 -2
- package/dist/shell/assets/{create-route-BNcDypty.js → create-route-CV6sScUu.js} +2 -2
- package/dist/shell/assets/{custom-step-container-field-CyvWLsF0.js → custom-step-container-field-DbXZzPJp.js} +2 -2
- package/dist/shell/assets/{embedded-list-B8K84K5b.js → embedded-list-CG1SyUtd.js} +3 -3
- package/dist/shell/assets/{export-dialog-IWSkZoEf.js → export-dialog-CMPyzZa3.js} +2 -2
- package/dist/shell/assets/{graph-view-D6ueoFs9.js → graph-view-CfO5HJXO.js} +2 -2
- package/dist/shell/assets/{group-donut-BnDzQhIS.js → group-donut-UrNllcKD.js} +2 -2
- package/dist/shell/assets/{guest-call-page-IwcmjkTm.js → guest-call-page-CgISSPNH.js} +3 -3
- package/dist/shell/assets/{html-viewer-DjlpP883.js → html-viewer-GgauWEUE.js} +2 -2
- package/dist/shell/assets/{import-dialog-DrDyc76O.js → import-dialog-BppJUUoF.js} +2 -2
- package/dist/shell/assets/{import-table-dialog-DYBhyBp7.js → import-table-dialog-cfWZMJfg.js} +2 -2
- package/dist/shell/assets/{index-fxThWO9s.js → index-C6CE4Yqt.js} +1 -1
- package/dist/shell/assets/{invitations-page-BmkBa0fB.js → invitations-page-Cx960zfb.js} +2 -2
- package/dist/shell/assets/{layout-grid-DGOCHAPH.js → layout-grid-IdJUsNk6.js} +2 -2
- package/dist/shell/assets/{legend-item-DxdIZ1pf.js → legend-item-FRGENXpR.js} +2 -2
- package/dist/shell/assets/{list-page-BhWOEaP6.js → list-page-Di8ApAmU.js} +4 -4
- package/dist/shell/assets/{maplibre-k6sh-ts2.js → maplibre-B0oPa_5e.js} +2 -2
- package/dist/shell/assets/{markdown-content-vMCleJqq.js → markdown-content-CA74ofB3.js} +2 -2
- package/dist/shell/assets/{members-page-NrAKIuOb.js → members-page-UO-o4WSG.js} +2 -2
- package/dist/shell/assets/{messages-Cjox3dPW.js → messages-CjRWJI05.js} +2 -2
- package/dist/shell/assets/{organization-page-HRjNwewQ.js → organization-page-DaGSJbur.js} +2 -2
- package/dist/shell/assets/{organizations-page-D-Is15Iq.js → organizations-page-C5oK_zsd.js} +2 -2
- package/dist/shell/assets/{pending-invitation-row-MATld1YG.js → pending-invitation-row-BEvgmW-N.js} +2 -2
- package/dist/shell/assets/{period-chart-xv3RhzW9.js → period-chart-CW2NUL07.js} +2 -2
- package/dist/shell/assets/{person-row-DPsUV5XA.js → person-row-5VQjyq5t.js} +2 -2
- package/dist/shell/assets/{public-form-page-CK0NgO4L.js → public-form-page-CqU7Cg33.js} +2 -2
- package/dist/shell/assets/{record-lines-CDGK7ZyR.js → record-lines-CJgNIVFS.js} +2 -2
- package/dist/shell/assets/{record-map-C8QpQBwW.js → record-map-DHkY7hYE.js} +2 -2
- package/dist/shell/assets/{record-opens-jhy0UcRX.js → record-opens-B0MlYjrH.js} +2 -2
- package/dist/shell/assets/{record-page-BQtAOfUN.js → record-page-whDNzf71.js} +3 -3
- package/dist/shell/assets/{record-preview-Cnz2q7jF.js → record-preview-BUnzkT7g.js} +2 -2
- package/dist/shell/assets/{records-map-Cpt0N4k2.js → records-map-DjcDdJBM.js} +2 -2
- package/dist/shell/assets/{render-node-CQddajXn.js → render-node-DGmdm-wr.js} +3 -3
- package/dist/shell/assets/{reorder-button-2tg9wf42.js → reorder-button-q4oqy3UR.js} +2 -2
- package/dist/shell/assets/{run-trace-view-C8KR_auS.js → run-trace-view-DjtMSojN.js} +2 -2
- package/dist/shell/assets/{runner-install-field-Dfnq3Rqy.js → runner-install-field-Ddxc9XB0.js} +2 -2
- package/dist/shell/assets/{runtime-update-BkP2MEsM.js → runtime-update-CKEA5P-k.js} +2 -2
- package/dist/shell/assets/{shared-protobase-ui-CbwI3ULn.js → shared-protobase-ui-tTqz9hwW.js} +1 -1
- package/dist/shell/assets/{sheet-source-Bsx98FTk.js → sheet-source-CAIVzfnw.js} +2 -2
- package/dist/shell/assets/{sign-in-policy-page-hgTJtin9.js → sign-in-policy-page-CdTIudi-.js} +2 -2
- package/dist/shell/assets/{start-block-queries-Cmx56hgU.js → start-block-queries-DjQjQ2Ef.js} +2 -2
- package/dist/shell/assets/{step-catalog-BJyr7gmH.js → step-catalog-Dit0IJvs.js} +2 -2
- package/dist/shell/assets/{step-panel-D-jkWWLs.js → step-panel-9kx6xfm1.js} +2 -2
- package/dist/shell/assets/{timeline-display-FKWlqzyN.js → timeline-display-CoQETrmW.js} +2 -2
- package/dist/shell/assets/{trash-BNguTSbA.js → trash-DJwJPifF.js} +2 -2
- package/dist/shell/assets/{update-set-CaKid6Bl.js → update-set-DPSGWrcI.js} +2 -2
- package/dist/shell/assets/{use-calendar-move-UCTCC4Mu.js → use-calendar-move-CgXeokRh.js} +2 -2
- package/dist/shell/assets/{use-display-rows-BeUN0NEn.js → use-display-rows-DFSNvNWx.js} +2 -2
- package/dist/shell/assets/{use-paged-search-33KMMcrt.js → use-paged-search-B52iaj1D.js} +2 -2
- package/dist/shell/assets/{use-run-trace-Bx9X8OOk.js → use-run-trace-KAufJAqD.js} +2 -2
- package/dist/shell/assets/{use-workflow-page-BiyvMPJr.js → use-workflow-page-171SXJ7G.js} +2 -2
- package/dist/shell/assets/{use-workflow-types-Dv4j1fdw.js → use-workflow-types-ZGEaDrEJ.js} +2 -2
- package/dist/shell/assets/{workflow-canvas-CXQvv_wT.js → workflow-canvas-CCu4twlF.js} +2 -2
- package/dist/shell/assets/{workflow-field-f3yIRcdj.js → workflow-field-BFNHwCjK.js} +3 -3
- package/dist/shell/assets/{workflow-graph-editor-Dkn-LYZl.js → workflow-graph-editor-DTSyabCd.js} +2 -2
- package/dist/shell/assets/{workflow-run-field-Btst6LE9.js → workflow-run-field-D2fpm1Vk.js} +3 -3
- package/dist/shell/assets/{workflow-status-field-DwvvkBQe.js → workflow-status-field-D_4-8JIF.js} +2 -2
- package/dist/shell/assets/{workflow-workbench-KEqXjmsY.js → workflow-workbench-CN5-OYpd.js} +2 -2
- package/dist/shell/index.html +3 -3
- package/dist/shell/protobase.shell.json +2 -2
- package/dist/shell/protobase.sw.js +2 -2
- package/dist/shell-source-maps/assets/{account-page-BKgO5U-X.js.map → account-page-BPtyska2.js.map} +1 -1
- package/dist/shell-source-maps/assets/app-DKn-6fgf.js.map +1 -0
- package/dist/shell-source-maps/assets/{assistant-shell-DuqVM626.js.map → assistant-shell-BW59by36.js.map} +1 -1
- package/dist/shell-source-maps/assets/{board-display-DddxG38M.js.map → board-display-uC4sMccF.js.map} +1 -1
- package/dist/shell-source-maps/assets/{calendar-display-zLyE7rhF.js.map → calendar-display-BZhTapxV.js.map} +1 -1
- package/dist/shell-source-maps/assets/{call-rings-uudxTLcY.js.map → call-rings-DwyQO_zl.js.map} +1 -1
- package/dist/shell-source-maps/assets/{calls-7JJIY2v0.js.map → calls-DeHPxZSF.js.map} +1 -1
- package/dist/shell-source-maps/assets/{circle-alert-CoX9nLsD.js.map → circle-alert-mtPRl_1e.js.map} +1 -1
- package/dist/shell-source-maps/assets/{composed-page-DnCccgH0.js.map → composed-page-CqjAO9Zv.js.map} +1 -1
- package/dist/shell-source-maps/assets/{composer-section-84NNbJ4X.js.map → composer-section-D16PrwJe.js.map} +1 -1
- package/dist/shell-source-maps/assets/{connect-route-DXEPuBjl.js.map → connect-route-BHjM-n0c.js.map} +1 -1
- package/dist/shell-source-maps/assets/{copy-field-BlooSgn7.js.map → copy-field-C7SgGBWe.js.map} +1 -1
- package/dist/shell-source-maps/assets/{create-route-BNcDypty.js.map → create-route-CV6sScUu.js.map} +1 -1
- package/dist/shell-source-maps/assets/{custom-step-container-field-CyvWLsF0.js.map → custom-step-container-field-DbXZzPJp.js.map} +1 -1
- package/dist/shell-source-maps/assets/{embedded-list-B8K84K5b.js.map → embedded-list-CG1SyUtd.js.map} +1 -1
- package/dist/shell-source-maps/assets/{export-dialog-IWSkZoEf.js.map → export-dialog-CMPyzZa3.js.map} +1 -1
- package/dist/shell-source-maps/assets/{graph-view-D6ueoFs9.js.map → graph-view-CfO5HJXO.js.map} +1 -1
- package/dist/shell-source-maps/assets/{group-donut-BnDzQhIS.js.map → group-donut-UrNllcKD.js.map} +1 -1
- package/dist/shell-source-maps/assets/{guest-call-page-IwcmjkTm.js.map → guest-call-page-CgISSPNH.js.map} +1 -1
- package/dist/shell-source-maps/assets/{html-viewer-DjlpP883.js.map → html-viewer-GgauWEUE.js.map} +1 -1
- package/dist/shell-source-maps/assets/{import-dialog-DrDyc76O.js.map → import-dialog-BppJUUoF.js.map} +1 -1
- package/dist/shell-source-maps/assets/{import-table-dialog-DYBhyBp7.js.map → import-table-dialog-cfWZMJfg.js.map} +1 -1
- package/dist/shell-source-maps/assets/{invitations-page-BmkBa0fB.js.map → invitations-page-Cx960zfb.js.map} +1 -1
- package/dist/shell-source-maps/assets/{layout-grid-DGOCHAPH.js.map → layout-grid-IdJUsNk6.js.map} +1 -1
- package/dist/shell-source-maps/assets/{legend-item-DxdIZ1pf.js.map → legend-item-FRGENXpR.js.map} +1 -1
- package/dist/shell-source-maps/assets/{list-page-BhWOEaP6.js.map → list-page-Di8ApAmU.js.map} +1 -1
- package/dist/shell-source-maps/assets/{maplibre-k6sh-ts2.js.map → maplibre-B0oPa_5e.js.map} +1 -1
- package/dist/shell-source-maps/assets/{markdown-content-vMCleJqq.js.map → markdown-content-CA74ofB3.js.map} +1 -1
- package/dist/shell-source-maps/assets/{members-page-NrAKIuOb.js.map → members-page-UO-o4WSG.js.map} +1 -1
- package/dist/shell-source-maps/assets/{messages-Cjox3dPW.js.map → messages-CjRWJI05.js.map} +1 -1
- package/dist/shell-source-maps/assets/{organization-page-HRjNwewQ.js.map → organization-page-DaGSJbur.js.map} +1 -1
- package/dist/shell-source-maps/assets/{organizations-page-D-Is15Iq.js.map → organizations-page-C5oK_zsd.js.map} +1 -1
- package/dist/shell-source-maps/assets/{pending-invitation-row-MATld1YG.js.map → pending-invitation-row-BEvgmW-N.js.map} +1 -1
- package/dist/shell-source-maps/assets/{period-chart-xv3RhzW9.js.map → period-chart-CW2NUL07.js.map} +1 -1
- package/dist/shell-source-maps/assets/{person-row-DPsUV5XA.js.map → person-row-5VQjyq5t.js.map} +1 -1
- package/dist/shell-source-maps/assets/{public-form-page-CK0NgO4L.js.map → public-form-page-CqU7Cg33.js.map} +1 -1
- package/dist/shell-source-maps/assets/{record-lines-CDGK7ZyR.js.map → record-lines-CJgNIVFS.js.map} +1 -1
- package/dist/shell-source-maps/assets/{record-map-C8QpQBwW.js.map → record-map-DHkY7hYE.js.map} +1 -1
- package/dist/shell-source-maps/assets/{record-opens-jhy0UcRX.js.map → record-opens-B0MlYjrH.js.map} +1 -1
- package/dist/shell-source-maps/assets/{record-page-BQtAOfUN.js.map → record-page-whDNzf71.js.map} +1 -1
- package/dist/shell-source-maps/assets/{record-preview-Cnz2q7jF.js.map → record-preview-BUnzkT7g.js.map} +1 -1
- package/dist/shell-source-maps/assets/{records-map-Cpt0N4k2.js.map → records-map-DjcDdJBM.js.map} +1 -1
- package/dist/shell-source-maps/assets/{render-node-CQddajXn.js.map → render-node-DGmdm-wr.js.map} +1 -1
- package/dist/shell-source-maps/assets/{reorder-button-2tg9wf42.js.map → reorder-button-q4oqy3UR.js.map} +1 -1
- package/dist/shell-source-maps/assets/{run-trace-view-C8KR_auS.js.map → run-trace-view-DjtMSojN.js.map} +1 -1
- package/dist/shell-source-maps/assets/{runner-install-field-Dfnq3Rqy.js.map → runner-install-field-Ddxc9XB0.js.map} +1 -1
- package/dist/shell-source-maps/assets/{runtime-update-BkP2MEsM.js.map → runtime-update-CKEA5P-k.js.map} +1 -1
- package/dist/shell-source-maps/assets/{sheet-source-Bsx98FTk.js.map → sheet-source-CAIVzfnw.js.map} +1 -1
- package/dist/shell-source-maps/assets/{sign-in-policy-page-hgTJtin9.js.map → sign-in-policy-page-CdTIudi-.js.map} +1 -1
- package/dist/shell-source-maps/assets/{start-block-queries-Cmx56hgU.js.map → start-block-queries-DjQjQ2Ef.js.map} +1 -1
- package/dist/shell-source-maps/assets/{step-catalog-BJyr7gmH.js.map → step-catalog-Dit0IJvs.js.map} +1 -1
- package/dist/shell-source-maps/assets/{step-panel-D-jkWWLs.js.map → step-panel-9kx6xfm1.js.map} +1 -1
- package/dist/shell-source-maps/assets/{timeline-display-FKWlqzyN.js.map → timeline-display-CoQETrmW.js.map} +1 -1
- package/dist/shell-source-maps/assets/{trash-BNguTSbA.js.map → trash-DJwJPifF.js.map} +1 -1
- package/dist/shell-source-maps/assets/{update-set-CaKid6Bl.js.map → update-set-DPSGWrcI.js.map} +1 -1
- package/dist/shell-source-maps/assets/{use-calendar-move-UCTCC4Mu.js.map → use-calendar-move-CgXeokRh.js.map} +1 -1
- package/dist/shell-source-maps/assets/{use-display-rows-BeUN0NEn.js.map → use-display-rows-DFSNvNWx.js.map} +1 -1
- package/dist/shell-source-maps/assets/{use-paged-search-33KMMcrt.js.map → use-paged-search-B52iaj1D.js.map} +1 -1
- package/dist/shell-source-maps/assets/{use-run-trace-Bx9X8OOk.js.map → use-run-trace-KAufJAqD.js.map} +1 -1
- package/dist/shell-source-maps/assets/{use-workflow-page-BiyvMPJr.js.map → use-workflow-page-171SXJ7G.js.map} +1 -1
- package/dist/shell-source-maps/assets/{use-workflow-types-Dv4j1fdw.js.map → use-workflow-types-ZGEaDrEJ.js.map} +1 -1
- package/dist/shell-source-maps/assets/{workflow-canvas-CXQvv_wT.js.map → workflow-canvas-CCu4twlF.js.map} +1 -1
- package/dist/shell-source-maps/assets/{workflow-field-f3yIRcdj.js.map → workflow-field-BFNHwCjK.js.map} +1 -1
- package/dist/shell-source-maps/assets/{workflow-graph-editor-Dkn-LYZl.js.map → workflow-graph-editor-DTSyabCd.js.map} +1 -1
- package/dist/shell-source-maps/assets/{workflow-run-field-Btst6LE9.js.map → workflow-run-field-D2fpm1Vk.js.map} +1 -1
- package/dist/shell-source-maps/assets/{workflow-status-field-DwvvkBQe.js.map → workflow-status-field-D_4-8JIF.js.map} +1 -1
- package/dist/shell-source-maps/assets/{workflow-workbench-KEqXjmsY.js.map → workflow-workbench-CN5-OYpd.js.map} +1 -1
- package/dist/status/messages.d.ts +2 -2
- package/dist/users/messages.d.ts +2 -2
- package/package.json +5 -5
- package/dist/shell/assets/app-D5KGkwJq.js +0 -34
- package/dist/shell-source-maps/assets/app-D5KGkwJq.js.map +0 -1
package/dist/app/messages.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MessageValue } from "../locale/messages.js";
|
|
2
2
|
//#region src/app/messages.d.ts
|
|
3
3
|
export declare const text: {
|
|
4
|
-
(id: "
|
|
5
|
-
rich(id: "
|
|
4
|
+
(id: "replace" | "pages" | "open" | "reload" | "new" | "account" | "menu" | "refreshing" | "leave" | "remove" | "noMatches" | "loading" | "assistant" | "noAnswer" | "cannotReach" | "tryAgain" | "admin" | "fileMissing" | "notFound" | "hr" | "average" | "show" | "noValue" | "noComponent" | "signInPolicy" | "noResource" | "somethingWentWrong" | "adminsOnly" | "onlyAdminPolicy" | "ownersOnly" | "onlyOwners" | "chooseResource" | "pickFromSidebar" | "nothingHere" | "pageNotLoaded" | "pageNotLoadedHelp" | "signOutQuestion" | "signOutHelp" | "signOutCancel" | "signOutConfirm" | "noPage" | "operationFailed" | "nothingSaved" | "loadingRecord" | "choose" | "chooseFileFor" | "notUploaded" | "uploadingLabel" | "uploading" | "dropFile" | "chooseFile" | "sales" | "crm" | "catalog" | "inventory" | "tables" | "searchPlural" | "couldNotLoadOptions" | "refreshFailedTitle" | "refreshFailedHelp" | "refreshRetry" | "refreshClose" | "refreshWhy" | "refreshFailed" | "leaveTitle" | "leaveDescription" | "leaveInputLost" | "stay" | "reloadTitle" | "reloadDraftKept" | "reloadInputLost" | "keepEditing" | "hide" | "couldNotShow" | "setNewValue" | "signInRefused" | "loadingFrom" | "restWorks" | "staffSession" | "staffSignedIn" | "stopStaffSession" | "openLabel" | "opensNewTab", values?: Record<string, MessageValue>): string;
|
|
5
|
+
rich(id: "replace" | "pages" | "open" | "reload" | "new" | "account" | "menu" | "refreshing" | "leave" | "remove" | "noMatches" | "loading" | "assistant" | "noAnswer" | "cannotReach" | "tryAgain" | "admin" | "fileMissing" | "notFound" | "hr" | "average" | "show" | "noValue" | "noComponent" | "signInPolicy" | "noResource" | "somethingWentWrong" | "adminsOnly" | "onlyAdminPolicy" | "ownersOnly" | "onlyOwners" | "chooseResource" | "pickFromSidebar" | "nothingHere" | "pageNotLoaded" | "pageNotLoadedHelp" | "signOutQuestion" | "signOutHelp" | "signOutCancel" | "signOutConfirm" | "noPage" | "operationFailed" | "nothingSaved" | "loadingRecord" | "choose" | "chooseFileFor" | "notUploaded" | "uploadingLabel" | "uploading" | "dropFile" | "chooseFile" | "sales" | "crm" | "catalog" | "inventory" | "tables" | "searchPlural" | "couldNotLoadOptions" | "refreshFailedTitle" | "refreshFailedHelp" | "refreshRetry" | "refreshClose" | "refreshWhy" | "refreshFailed" | "leaveTitle" | "leaveDescription" | "leaveInputLost" | "stay" | "reloadTitle" | "reloadDraftKept" | "reloadInputLost" | "keepEditing" | "hide" | "couldNotShow" | "setNewValue" | "signInRefused" | "loadingFrom" | "restWorks" | "staffSession" | "staffSignedIn" | "stopStaffSession" | "openLabel" | "opensNewTab", values: Record<string, MessageValue | import("react").ReactNode>): import("react").ReactNode;
|
|
6
6
|
};
|
|
7
7
|
//#endregion
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MessageValue } from "../locale/messages.js";
|
|
2
2
|
//#region src/app/meta-gate-messages.d.ts
|
|
3
3
|
export declare const text: {
|
|
4
|
-
(id: "loading" | "
|
|
5
|
-
rich(id: "loading" | "
|
|
4
|
+
(id: "loading" | "noAnswer" | "cannotReach", values?: Record<string, MessageValue>): string;
|
|
5
|
+
rich(id: "loading" | "noAnswer" | "cannotReach", values: Record<string, MessageValue | import("react").ReactNode>): import("react").ReactNode;
|
|
6
6
|
};
|
|
7
7
|
//#endregion
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MessageValue } from "../../locale/messages.js";
|
|
2
2
|
//#region src/app/new-version/messages.d.ts
|
|
3
3
|
export declare const text: {
|
|
4
|
-
(id: "title" | "
|
|
5
|
-
rich(id: "title" | "
|
|
4
|
+
(id: "title" | "reload" | "description" | "reloadPage" | "reloadPageHint" | "bannerTitle" | "bannerLine", values?: Record<string, MessageValue>): string;
|
|
5
|
+
rich(id: "title" | "reload" | "description" | "reloadPage" | "reloadPageHint" | "bannerTitle" | "bannerLine", values: Record<string, MessageValue | import("react").ReactNode>): import("react").ReactNode;
|
|
6
6
|
};
|
|
7
7
|
//#endregion
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MessageValue } from "../../locale/messages.js";
|
|
2
2
|
//#region src/app/pages/messages.d.ts
|
|
3
3
|
export declare const text: {
|
|
4
|
-
(id: "number" | "
|
|
5
|
-
rich(id: "number" | "
|
|
4
|
+
(id: "number" | "create" | "saved" | "failed" | "tabs" | "couldNotLoad" | "save" | "cancel" | "couldNotDraw" | "required" | "done" | "notFound" | "nothingYet" | "notSaved" | "wholeNumber" | "somethingWrong" | "noComponent" | "noPage" | "settings" | "noTab" | "unknownBlock" | "needsRecord" | "cannotChange" | "cannotDelete" | "doesNotApply" | "noHandler" | "noInputComponent" | "doneOn" | "refusedOn" | "noAction" | "loadMore" | "timelineCut" | "couldNotCount" | "dateFormat" | "atMost" | "tickEvery" | "nothingToTick" | "forRecords" | "timelineRange" | "timelineNow" | "timelinePoint", values?: Record<string, MessageValue>): string;
|
|
5
|
+
rich(id: "number" | "create" | "saved" | "failed" | "tabs" | "couldNotLoad" | "save" | "cancel" | "couldNotDraw" | "required" | "done" | "notFound" | "nothingYet" | "notSaved" | "wholeNumber" | "somethingWrong" | "noComponent" | "noPage" | "settings" | "noTab" | "unknownBlock" | "needsRecord" | "cannotChange" | "cannotDelete" | "doesNotApply" | "noHandler" | "noInputComponent" | "doneOn" | "refusedOn" | "noAction" | "loadMore" | "timelineCut" | "couldNotCount" | "dateFormat" | "atMost" | "tickEvery" | "nothingToTick" | "forRecords" | "timelineRange" | "timelineNow" | "timelinePoint", values: Record<string, MessageValue | import("react").ReactNode>): import("react").ReactNode;
|
|
6
6
|
};
|
|
7
7
|
//#endregion
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MessageValue } from "../../locale/messages.js";
|
|
2
2
|
//#region src/app/record-chart/messages.d.ts
|
|
3
3
|
export declare const text: {
|
|
4
|
-
(id: "
|
|
5
|
-
rich(id: "
|
|
4
|
+
(id: "couldNotLoad" | "maximum" | "day" | "hour" | "week" | "range" | "measure" | "average" | "noSamples", values?: Record<string, MessageValue>): string;
|
|
5
|
+
rich(id: "couldNotLoad" | "maximum" | "day" | "hour" | "week" | "range" | "measure" | "average" | "noSamples", values: Record<string, MessageValue | import("react").ReactNode>): import("react").ReactNode;
|
|
6
6
|
};
|
|
7
7
|
//#endregion
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MessageValue } from "../locale/messages.js";
|
|
2
2
|
//#region src/app/record-messages.d.ts
|
|
3
3
|
export declare const text: {
|
|
4
|
-
(id: "
|
|
5
|
-
rich(id: "
|
|
4
|
+
(id: "edit" | "saved" | "history" | "comments" | "fetching" | "loading" | "couldNotLoad" | "save" | "cancel" | "couldNotSave" | "delete" | "justNow" | "details" | "summary" | "nothingYet" | "notSaved" | "lineNumber" | "noRecord" | "openingElsewhere" | "someoneElse" | "unsavedChanges" | "linesChanged" | "linesReloaded" | "unsavedKept" | "continueEditing" | "discard" | "unsavedRestored" | "keep" | "savingSubject" | "subjectSaved" | "changedBySomeoneElse" | "recordActions" | "relatedRecords" | "lineField" | "tooManyLines", values?: Record<string, MessageValue>): string;
|
|
5
|
+
rich(id: "edit" | "saved" | "history" | "comments" | "fetching" | "loading" | "couldNotLoad" | "save" | "cancel" | "couldNotSave" | "delete" | "justNow" | "details" | "summary" | "nothingYet" | "notSaved" | "lineNumber" | "noRecord" | "openingElsewhere" | "someoneElse" | "unsavedChanges" | "linesChanged" | "linesReloaded" | "unsavedKept" | "continueEditing" | "discard" | "unsavedRestored" | "keep" | "savingSubject" | "subjectSaved" | "changedBySomeoneElse" | "recordActions" | "relatedRecords" | "lineField" | "tooManyLines", values: Record<string, MessageValue | import("react").ReactNode>): import("react").ReactNode;
|
|
6
6
|
};
|
|
7
7
|
//#endregion
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CustomSectionModel, LayoutItemModel } from "@protobase/schema";
|
|
2
2
|
//#region src/app/record-mode/shown-layout.d.ts
|
|
3
|
-
export declare const whenOf: (item: LayoutItemModel) => (string & {}) | "
|
|
3
|
+
export declare const whenOf: (item: LayoutItemModel) => "always" | (string & {}) | "editing" | "reading" | undefined;
|
|
4
4
|
/** The items with a record condition in `when`, those inside tabs, groups and fallbacks too, whose conditions the page evaluates: a group before its items. */
|
|
5
5
|
export declare const conditionalItems: (items: LayoutItemModel[]) => LayoutItemModel[];
|
|
6
6
|
/** A shown custom section: `fallbackAt` holds each shown fallback item's place in the whole fallback. */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MessageValue } from "../../locale/messages.js";
|
|
2
2
|
//#region src/app/record-row/messages.d.ts
|
|
3
3
|
export declare const text: {
|
|
4
|
-
(id: "new" | "couldNotLoad" | "viewAll" | "noneMatch" | "
|
|
5
|
-
rich(id: "new" | "couldNotLoad" | "viewAll" | "noneMatch" | "
|
|
4
|
+
(id: "new" | "couldNotLoad" | "viewAll" | "noneMatch" | "noneYet" | "couldNotLoadYour", values?: Record<string, MessageValue>): string;
|
|
5
|
+
rich(id: "new" | "couldNotLoad" | "viewAll" | "noneMatch" | "noneYet" | "couldNotLoadYour", values: Record<string, MessageValue | import("react").ReactNode>): import("react").ReactNode;
|
|
6
6
|
};
|
|
7
7
|
//#endregion
|
package/dist/app/router.d.ts
CHANGED
|
@@ -15,6 +15,8 @@ type RouterValue = {
|
|
|
15
15
|
navigate: (to: string, options?: NavigateOptions) => void;
|
|
16
16
|
/** Goes back to a path below the base path: as the browser's Back when the page before is that path, else as `navigate`. */
|
|
17
17
|
back: (to: string) => void;
|
|
18
|
+
/** Whether `back` to that path takes the browser's Back: whether the entry behind this one in history is that page. */
|
|
19
|
+
backIsHistory: (to: string) => boolean;
|
|
18
20
|
/**
|
|
19
21
|
* Asks to be told before the page changes, or one of the page parameters `params` whose content the guard sits in;
|
|
20
22
|
* returns how to stop asking. Used by `useNavigationGuard`.
|
package/dist/app/router.js
CHANGED
|
@@ -49,6 +49,8 @@ const Router = ({ basePath = "", initialUrl, children }) => {
|
|
|
49
49
|
const losesInput = () => [...guards.current.values()].some((guard) => guard.kind === "input-lost");
|
|
50
50
|
const current = useRef(page);
|
|
51
51
|
current.current = page;
|
|
52
|
+
const entryUrls = useRef(/* @__PURE__ */ new Map());
|
|
53
|
+
entryUrls.current.set(page.entry, page.url);
|
|
52
54
|
const position = useRef(memory ? 0 : historyIndex());
|
|
53
55
|
const undoing = useRef(false);
|
|
54
56
|
const proceeding = useRef(false);
|
|
@@ -57,7 +59,7 @@ const Router = ({ basePath = "", initialUrl, children }) => {
|
|
|
57
59
|
const [pending, setPending] = useState();
|
|
58
60
|
const rememberScroll = useCallback(() => places.save(current.current.entry, window.scrollY), [places]);
|
|
59
61
|
useLayoutEffect(() => restoreScroll(places.placeOf(page.entry)), [places, page.entry]);
|
|
60
|
-
|
|
62
|
+
useLayoutEffect(() => {
|
|
61
63
|
if (memory) return;
|
|
62
64
|
window.history.scrollRestoration = "manual";
|
|
63
65
|
window.history.replaceState({
|
|
@@ -115,15 +117,23 @@ const Router = ({ basePath = "", initialUrl, children }) => {
|
|
|
115
117
|
const entry = replace ? current.current.entry : newEntry();
|
|
116
118
|
if (!memory) {
|
|
117
119
|
position.current += replace ? 0 : 1;
|
|
118
|
-
const
|
|
120
|
+
const state = historyState();
|
|
121
|
+
const previous = replace ? {
|
|
122
|
+
protobasePrevious: state.protobasePrevious,
|
|
123
|
+
protobasePreviousEntry: state.protobasePreviousEntry
|
|
124
|
+
} : {
|
|
125
|
+
protobasePrevious: current.current.url,
|
|
126
|
+
protobasePreviousEntry: current.current.entry
|
|
127
|
+
};
|
|
119
128
|
window.history[replace ? "replaceState" : "pushState"]({
|
|
120
129
|
protobaseIndex: position.current,
|
|
121
130
|
protobaseEntry: entry,
|
|
122
|
-
|
|
131
|
+
...previous
|
|
123
132
|
}, "", full);
|
|
124
133
|
}
|
|
125
134
|
rememberScroll();
|
|
126
135
|
if (keepScroll) places.save(entry, window.scrollY);
|
|
136
|
+
entryUrls.current.set(entry, full);
|
|
127
137
|
setPage({
|
|
128
138
|
url: full,
|
|
129
139
|
entry
|
|
@@ -141,15 +151,16 @@ const Router = ({ basePath = "", initialUrl, children }) => {
|
|
|
141
151
|
});
|
|
142
152
|
followLink(link, go);
|
|
143
153
|
}, [basePath, go]);
|
|
154
|
+
const backIsHistory = useCallback((to) => {
|
|
155
|
+
if (memory) return false;
|
|
156
|
+
const state = historyState();
|
|
157
|
+
const previous = (state.protobasePreviousEntry && entryUrls.current.get(state.protobasePreviousEntry)) ?? state.protobasePrevious;
|
|
158
|
+
return previous !== void 0 && pathOf(previous) === pathOf(`${basePath}${to}`);
|
|
159
|
+
}, [memory, basePath]);
|
|
144
160
|
const back = useCallback((to) => {
|
|
145
|
-
|
|
146
|
-
if (previous !== void 0 && pathOf(previous) === pathOf(`${basePath}${to}`)) return window.history.back();
|
|
161
|
+
if (backIsHistory(to)) return window.history.back();
|
|
147
162
|
navigate(to);
|
|
148
|
-
}, [
|
|
149
|
-
memory,
|
|
150
|
-
basePath,
|
|
151
|
-
navigate
|
|
152
|
-
]);
|
|
163
|
+
}, [backIsHistory, navigate]);
|
|
153
164
|
const registerGuard = useCallback((kind = "draft-kept", params = []) => {
|
|
154
165
|
const token = Symbol("guard");
|
|
155
166
|
guards.current.set(token, {
|
|
@@ -188,6 +199,7 @@ const Router = ({ basePath = "", initialUrl, children }) => {
|
|
|
188
199
|
entry: page.entry,
|
|
189
200
|
navigate,
|
|
190
201
|
back,
|
|
202
|
+
backIsHistory,
|
|
191
203
|
registerGuard,
|
|
192
204
|
reload,
|
|
193
205
|
reloadConfirmed,
|
|
@@ -198,6 +210,7 @@ const Router = ({ basePath = "", initialUrl, children }) => {
|
|
|
198
210
|
basePath,
|
|
199
211
|
navigate,
|
|
200
212
|
back,
|
|
213
|
+
backIsHistory,
|
|
201
214
|
registerGuard,
|
|
202
215
|
reload,
|
|
203
216
|
reloadConfirmed,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MessageValue } from "../../locale/messages.js";
|
|
2
2
|
//#region src/app/runtime/messages.d.ts
|
|
3
3
|
export declare const text: {
|
|
4
|
-
(id: "
|
|
5
|
-
rich(id: "
|
|
4
|
+
(id: "failed" | "close" | "update" | "immediate" | "weekly" | "scheduled" | "manual" | "job" | "build" | "updatingNow" | "started" | "nextOn" | "succeeded" | "unchanged" | "alreadyLatest" | "onlyAdmin" | "couldNotStart" | "runtimeUpdate" | "updating" | "updateNow" | "currentVersion" | "latestVersion" | "checkFailed" | "updateAvailable", values?: Record<string, MessageValue>): string;
|
|
5
|
+
rich(id: "failed" | "close" | "update" | "immediate" | "weekly" | "scheduled" | "manual" | "job" | "build" | "updatingNow" | "started" | "nextOn" | "succeeded" | "unchanged" | "alreadyLatest" | "onlyAdmin" | "couldNotStart" | "runtimeUpdate" | "updating" | "updateNow" | "currentVersion" | "latestVersion" | "checkFailed" | "updateAvailable", values: Record<string, MessageValue | import("react").ReactNode>): import("react").ReactNode;
|
|
6
6
|
};
|
|
7
7
|
//#endregion
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MessageValue } from "../../locale/messages.js";
|
|
2
2
|
//#region src/app/saved/messages.d.ts
|
|
3
3
|
export declare const text: {
|
|
4
|
-
(id: "couldNotSave" | "somethingWrong" | "
|
|
5
|
-
rich(id: "couldNotSave" | "somethingWrong" | "
|
|
4
|
+
(id: "couldNotSave" | "somethingWrong" | "noneYet" | "couldNotLoadYour" | "favorite" | "couldNotTakeOff", values?: Record<string, MessageValue>): string;
|
|
5
|
+
rich(id: "couldNotSave" | "somethingWrong" | "noneYet" | "couldNotLoadYour" | "favorite" | "couldNotTakeOff", values: Record<string, MessageValue | import("react").ReactNode>): import("react").ReactNode;
|
|
6
6
|
};
|
|
7
7
|
//#endregion
|
|
@@ -6,7 +6,7 @@ import { CardFavoriteModel, KeyValue } from "@protobase/schema";
|
|
|
6
6
|
* or takes it off, at once on screen; a refused write puts it back and says why.
|
|
7
7
|
*/
|
|
8
8
|
export declare const useFavorite: (favorite: CardFavoriteModel, key: string, target: KeyValue) => {
|
|
9
|
-
mode: "
|
|
9
|
+
mode: "save" | "sign-in" | undefined;
|
|
10
10
|
prompt: import("@protobase/schema").SignInPromptModel | undefined;
|
|
11
11
|
saved: boolean;
|
|
12
12
|
ready: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MessageValue } from "../../locale/messages.js";
|
|
2
2
|
//#region src/app/search/messages.d.ts
|
|
3
3
|
export declare const text: {
|
|
4
|
-
(id: "
|
|
5
|
-
rich(id: "
|
|
4
|
+
(id: "create" | "search" | "searchOne" | "searchTwo" | "searchMore" | "goTo", values?: Record<string, MessageValue>): string;
|
|
5
|
+
rich(id: "create" | "search" | "searchOne" | "searchTwo" | "searchMore" | "goTo", values: Record<string, MessageValue | import("react").ReactNode>): import("react").ReactNode;
|
|
6
6
|
};
|
|
7
7
|
//#endregion
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MessageValue } from "../../locale/messages.js";
|
|
2
2
|
//#region src/app/searches/messages.d.ts
|
|
3
3
|
export declare const text: {
|
|
4
|
-
(id: "
|
|
5
|
-
rich(id: "
|
|
4
|
+
(id: "saved" | "removed" | "changed" | "more" | "viewAll" | "save" | "cancel" | "couldNotSave" | "optional" | "update" | "filters" | "notFound" | "deleteTitle" | "off" | "on" | "noPlural" | "somethingWrong" | "noneMatch" | "firstOf" | "noResource" | "unreadableFilter" | "noneYet" | "couldNotChange" | "couldNotLoadYour" | "couldNotTakeOff" | "saveSearch" | "saveAsNew" | "updateName" | "updateNameQuestion" | "updateNounQuestion" | "couldNotRename" | "renameTitle" | "noSavedYet" | "asMany" | "fewer" | "added" | "filterChanges" | "addedRemoved" | "noRecordsDiff" | "searchSaved" | "openPlural" | "searchUpdated" | "couldNotUpdate" | "noNew", values?: Record<string, MessageValue>): string;
|
|
5
|
+
rich(id: "saved" | "removed" | "changed" | "more" | "viewAll" | "save" | "cancel" | "couldNotSave" | "optional" | "update" | "filters" | "notFound" | "deleteTitle" | "off" | "on" | "noPlural" | "somethingWrong" | "noneMatch" | "firstOf" | "noResource" | "unreadableFilter" | "noneYet" | "couldNotChange" | "couldNotLoadYour" | "couldNotTakeOff" | "saveSearch" | "saveAsNew" | "updateName" | "updateNameQuestion" | "updateNounQuestion" | "couldNotRename" | "renameTitle" | "noSavedYet" | "asMany" | "fewer" | "added" | "filterChanges" | "addedRemoved" | "noRecordsDiff" | "searchSaved" | "openPlural" | "searchUpdated" | "couldNotUpdate" | "noNew", values: Record<string, MessageValue | import("react").ReactNode>): import("react").ReactNode;
|
|
6
6
|
};
|
|
7
7
|
//#endregion
|
|
@@ -8,7 +8,7 @@ import { SaveSearchModel } from "@protobase/schema";
|
|
|
8
8
|
* filter differs, `update` gives that search the list's filter.
|
|
9
9
|
*/
|
|
10
10
|
export declare const useSaveSearch: (search: SaveSearchModel, filter: string) => {
|
|
11
|
-
mode: "
|
|
11
|
+
mode: "save" | "sign-in" | undefined;
|
|
12
12
|
prompt: import("@protobase/schema").SignInPromptModel | undefined;
|
|
13
13
|
saved: boolean;
|
|
14
14
|
/** The search the list was opened from and differs from: its filter, and its name when it has one. */
|
|
@@ -7,7 +7,8 @@ import { AppAddress } from "@protobase/schema";
|
|
|
7
7
|
/**
|
|
8
8
|
* The app's address as logical values, and the ways to change it: `set` changes the list in place, `listTo` is the
|
|
9
9
|
* list after a change for a link to it, `go` moves to
|
|
10
|
-
* another address, `href` is an address for an `<a href>`, `open` follows such an href and `back` goes back to one
|
|
10
|
+
* another address, `href` is an address for an `<a href>`, `open` follows such an href and `back` goes back to one,
|
|
11
|
+
* as the browser's Back where `backIsHistory` says the entry behind is that page.
|
|
11
12
|
* Every component reads and writes the address through this hook, never the query string or a path of its own.
|
|
12
13
|
*/
|
|
13
14
|
export declare const useAppAddress: () => {
|
|
@@ -18,6 +19,7 @@ export declare const useAppAddress: () => {
|
|
|
18
19
|
href: (to: AppAddress) => string;
|
|
19
20
|
open: (target: string) => void;
|
|
20
21
|
back: (target: string) => void;
|
|
22
|
+
backIsHistory: (target: string) => boolean;
|
|
21
23
|
};
|
|
22
24
|
/** A link to an address in the app: an ordinary anchor that the router follows without reloading the page. */
|
|
23
25
|
export declare const AppLink: ({ to, ...rest }: AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
@@ -9,11 +9,12 @@ import { appPath, readAppPath } from "@protobase/schema";
|
|
|
9
9
|
/**
|
|
10
10
|
* The app's address as logical values, and the ways to change it: `set` changes the list in place, `listTo` is the
|
|
11
11
|
* list after a change for a link to it, `go` moves to
|
|
12
|
-
* another address, `href` is an address for an `<a href>`, `open` follows such an href and `back` goes back to one
|
|
12
|
+
* another address, `href` is an address for an `<a href>`, `open` follows such an href and `back` goes back to one,
|
|
13
|
+
* as the browser's Back where `backIsHistory` says the entry behind is that page.
|
|
13
14
|
* Every component reads and writes the address through this hook, never the query string or a path of its own.
|
|
14
15
|
*/
|
|
15
16
|
const useAppAddress = () => {
|
|
16
|
-
const { path, params, basePath, navigate, back: backTo } = useRouter();
|
|
17
|
+
const { path, params, basePath, navigate, back: backTo, backIsHistory: isHistory } = useRouter();
|
|
17
18
|
const { pages, resources, views } = useAdminMeta();
|
|
18
19
|
const xs = useIsXs();
|
|
19
20
|
const pageNames = useMemo(() => new Set(Object.keys(pages)), [pages]);
|
|
@@ -47,7 +48,8 @@ const useAppAddress = () => {
|
|
|
47
48
|
go,
|
|
48
49
|
href,
|
|
49
50
|
open: useCallback((target) => navigate(below(target)), [below, navigate]),
|
|
50
|
-
back: useCallback((target) => backTo(below(target)), [below, backTo])
|
|
51
|
+
back: useCallback((target) => backTo(below(target)), [below, backTo]),
|
|
52
|
+
backIsHistory: useCallback((target) => isHistory(below(target)), [below, isHistory])
|
|
51
53
|
};
|
|
52
54
|
};
|
|
53
55
|
/** A link to an address in the app: an ordinary anchor that the router follows without reloading the page. */
|
|
@@ -49,6 +49,8 @@ export type AppShellProps = {
|
|
|
49
49
|
onNavigate?: (href: string) => void;
|
|
50
50
|
/** Follows the top bar's back button, as the browser's Back where the page before is where it leads; without it `onNavigate`. */
|
|
51
51
|
onBack?: (href: string) => void;
|
|
52
|
+
/** Whether `onBack` to that href is the browser's Back, the history entry behind being that page; the host app's back swipe is used only then. */
|
|
53
|
+
backIsHistory?: (href: string) => boolean;
|
|
52
54
|
/** Adds "Sign out" to the profile menu. */
|
|
53
55
|
onSignOut?: () => void;
|
|
54
56
|
/** The sign-in page, a "Sign in" link in the sidebar for a visitor, who has no `user`. */
|
|
@@ -80,5 +82,5 @@ export type AppShellProps = {
|
|
|
80
82
|
overlays?: ReactNode;
|
|
81
83
|
children: ReactNode;
|
|
82
84
|
};
|
|
83
|
-
export declare const AppShell: ({ sidebarMode, activeItem, breadcrumb, titleStatus, staleContent, user, workspace, appName, appIcon, logo, actions, rightPanel, sidebarNotice, banner, forceExpanded, profileMenuOpen, navGroups, userMenu, account, bottomBar, menuPage, bottomBarSearch, onNavigate, onBack, onSignOut, signIn, organizations, roles, theme, status, search, pageScroll: scrollsByDefault, className, overlays, children }: AppShellProps) => import("react").JSX.Element;
|
|
85
|
+
export declare const AppShell: ({ sidebarMode, activeItem, breadcrumb, titleStatus, staleContent, user, workspace, appName, appIcon, logo, actions, rightPanel, sidebarNotice, banner, forceExpanded, profileMenuOpen, navGroups, userMenu, account, bottomBar, menuPage, bottomBarSearch, onNavigate, onBack, backIsHistory, onSignOut, signIn, organizations, roles, theme, status, search, pageScroll: scrollsByDefault, className, overlays, children }: AppShellProps) => import("react").JSX.Element;
|
|
84
86
|
//#endregion
|
|
@@ -4,6 +4,9 @@ import { useIsDesktop } from "../lib/use-media-query.js";
|
|
|
4
4
|
import { BottomBar } from "./bottom-bar.js";
|
|
5
5
|
import { useCloseSidebarEvent } from "./close-sidebar.js";
|
|
6
6
|
import { Drawer } from "./drawer.js";
|
|
7
|
+
import { backTarget } from "./back-target.js";
|
|
8
|
+
import { declaredEdgeSwipe, edgeSwipeAction, useDeclaredEdgeSwipe, useNativeBackSwipe } from "./edge-swipe.js";
|
|
9
|
+
import { useEdgeSwipe } from "./use-edge-swipe.js";
|
|
7
10
|
import { PageScrollContext, usePageGutter, usePageInsets } from "./page-scroll.js";
|
|
8
11
|
import { Logo } from "./logo.js";
|
|
9
12
|
import { tellLogoTap } from "./logo-tap.js";
|
|
@@ -23,14 +26,20 @@ const staleLook = {
|
|
|
23
26
|
refreshing: "[animation:pb-stale_1.4s_ease-in-out_infinite] motion-reduce:[animation:none] motion-reduce:opacity-60",
|
|
24
27
|
failed: "opacity-60"
|
|
25
28
|
};
|
|
26
|
-
const AppShell = ({ sidebarMode, activeItem, breadcrumb, titleStatus, staleContent, user, workspace, appName, appIcon, logo, actions, rightPanel, sidebarNotice, banner, forceExpanded, profileMenuOpen, navGroups, userMenu, account, bottomBar, menuPage, bottomBarSearch, onNavigate, onBack, onSignOut, signIn, organizations, roles, theme, status, search, pageScroll: scrollsByDefault = false, className, overlays, children }) => {
|
|
29
|
+
const AppShell = ({ sidebarMode, activeItem, breadcrumb, titleStatus, staleContent, user, workspace, appName, appIcon, logo, actions, rightPanel, sidebarNotice, banner, forceExpanded, profileMenuOpen, navGroups, userMenu, account, bottomBar, menuPage, bottomBarSearch, onNavigate, onBack, backIsHistory, onSignOut, signIn, organizations, roles, theme, status, search, pageScroll: scrollsByDefault = false, className, overlays, children }) => {
|
|
27
30
|
const desktop = useIsDesktop();
|
|
28
31
|
const noticeShown = useSidebarNoticeShown(sidebarMode);
|
|
29
32
|
const [drawerOpen, setDrawerOpen] = useState(false);
|
|
33
|
+
const [drawerUnderFinger, setDrawerUnderFinger] = useState(false);
|
|
34
|
+
const drawerControl = useRef(null);
|
|
35
|
+
const closeDrawer = useCallback(() => {
|
|
36
|
+
setDrawerOpen(false);
|
|
37
|
+
setDrawerUnderFinger(false);
|
|
38
|
+
}, []);
|
|
30
39
|
useEffect(() => {
|
|
31
|
-
if (desktop)
|
|
32
|
-
}, [desktop]);
|
|
33
|
-
useCloseSidebarEvent(
|
|
40
|
+
if (desktop) closeDrawer();
|
|
41
|
+
}, [desktop, closeDrawer]);
|
|
42
|
+
useCloseSidebarEvent(closeDrawer);
|
|
34
43
|
const tabs = !desktop && bottomBar && bottomBar.length > 0 ? bottomBar : void 0;
|
|
35
44
|
const more = useMorePageMode(tabs, menuPage);
|
|
36
45
|
const accountOnTop = accountInTopBar(desktop);
|
|
@@ -54,9 +63,31 @@ const AppShell = ({ sidebarMode, activeItem, breadcrumb, titleStatus, staleConte
|
|
|
54
63
|
href: more.href
|
|
55
64
|
}, ...breadcrumb];
|
|
56
65
|
const firstTabShown = more.on && Boolean(tabs?.[0]?.shown);
|
|
66
|
+
const back = backTarget(trail);
|
|
67
|
+
const edgeSwipe = edgeSwipeAction({
|
|
68
|
+
desktop,
|
|
69
|
+
back: Boolean(back),
|
|
70
|
+
bottomBar: Boolean(tabs),
|
|
71
|
+
drawerOpen
|
|
72
|
+
});
|
|
73
|
+
const declared = declaredEdgeSwipe(edgeSwipe, {
|
|
74
|
+
nativeBack: useNativeBackSwipe(),
|
|
75
|
+
behindIsBack: back !== void 0 && Boolean(backIsHistory?.(back.href))
|
|
76
|
+
});
|
|
77
|
+
useDeclaredEdgeSwipe(declared, JSON.stringify(trail));
|
|
57
78
|
const [chosen, setPageScroll] = useState();
|
|
58
79
|
const pageScroll = chosen ?? scrollsByDefault;
|
|
59
80
|
const topBarRef = useRef(null);
|
|
81
|
+
useEdgeSwipe({
|
|
82
|
+
action: declared,
|
|
83
|
+
onBack: () => back && (onBack ?? onNavigate)?.(back.href),
|
|
84
|
+
openDrawer: () => {
|
|
85
|
+
setDrawerUnderFinger(true);
|
|
86
|
+
setDrawerOpen(true);
|
|
87
|
+
},
|
|
88
|
+
closeDrawer,
|
|
89
|
+
drawer: drawerControl
|
|
90
|
+
});
|
|
60
91
|
const [topBarSlot, setTopBarSlot] = useState(null);
|
|
61
92
|
const bottomBarRef = useRef(null);
|
|
62
93
|
usePageInsets(pageScroll, topBarRef, bottomBarRef, Boolean(tabs));
|
|
@@ -100,7 +131,9 @@ const AppShell = ({ sidebarMode, activeItem, breadcrumb, titleStatus, staleConte
|
|
|
100
131
|
}) : /* @__PURE__ */ jsx(Drawer, {
|
|
101
132
|
id: drawerId,
|
|
102
133
|
open: drawerOpen,
|
|
103
|
-
onClose:
|
|
134
|
+
onClose: closeDrawer,
|
|
135
|
+
underFinger: drawerUnderFinger,
|
|
136
|
+
control: drawerControl,
|
|
104
137
|
children: sidebar({
|
|
105
138
|
mode: "text-large",
|
|
106
139
|
fill: true
|
|
@@ -1,10 +1,18 @@
|
|
|
1
|
-
import { ReactNode } from "react";
|
|
1
|
+
import { ReactNode, RefObject } from "react";
|
|
2
2
|
//#region src/app-shell/drawer.d.ts
|
|
3
|
+
/** Moves the drawer from a drag that starts elsewhere, such as a swipe from the screen's edge (`useEdgeSwipe`). */
|
|
4
|
+
export type DrawerControl = {
|
|
5
|
+
follow: (progress: number) => void;
|
|
6
|
+
settle: (progress: number, velocity: number) => void;
|
|
7
|
+
};
|
|
3
8
|
export type DrawerProps = {
|
|
4
9
|
id: string;
|
|
5
10
|
open: boolean;
|
|
6
11
|
onClose: () => void;
|
|
7
12
|
children: ReactNode;
|
|
13
|
+
/** Opened by a finger from the edge, which it then follows (`control`), rather than sliding in by itself. */
|
|
14
|
+
underFinger?: boolean;
|
|
15
|
+
control?: RefObject<DrawerControl | null>;
|
|
8
16
|
};
|
|
9
17
|
/** How long the drawer takes to slide in and out, and its backdrop to fade. */
|
|
10
18
|
export declare const drawerSlideMs = 200;
|
|
@@ -14,5 +22,5 @@ export declare const drawerSlideMs = 200;
|
|
|
14
22
|
* slides in as it opens and out as it closes, however it is closed, such as a host's `protobase:close-sidebar`; with
|
|
15
23
|
* less motion asked for it shows and goes at once.
|
|
16
24
|
*/
|
|
17
|
-
export declare const Drawer: ({ id, open, onClose, children }: DrawerProps) => import("react").JSX.Element | null;
|
|
25
|
+
export declare const Drawer: ({ id, open, onClose, children, underFinger, control }: DrawerProps) => import("react").JSX.Element | null;
|
|
18
26
|
//#endregion
|
package/dist/app-shell/drawer.js
CHANGED
|
@@ -13,7 +13,7 @@ const drawerSlideMs = 200;
|
|
|
13
13
|
* slides in as it opens and out as it closes, however it is closed, such as a host's `protobase:close-sidebar`; with
|
|
14
14
|
* less motion asked for it shows and goes at once.
|
|
15
15
|
*/
|
|
16
|
-
const Drawer = ({ id, open, onClose, children }) => {
|
|
16
|
+
const Drawer = ({ id, open, onClose, children, underFinger, control }) => {
|
|
17
17
|
const panel = useRef(null);
|
|
18
18
|
const backdrop = useRef(null);
|
|
19
19
|
useLayoutEffect(() => {
|
|
@@ -23,7 +23,7 @@ const Drawer = ({ id, open, onClose, children }) => {
|
|
|
23
23
|
}, [open]);
|
|
24
24
|
useFocusTrap(panel, open, onClose);
|
|
25
25
|
const draggedOut = useRef(false);
|
|
26
|
-
const { panelHandlers, backdropHandlers, dragged } = useDrawerDrag({
|
|
26
|
+
const { panelHandlers, backdropHandlers, dragged, follow, settle } = useDrawerDrag({
|
|
27
27
|
axis: "x",
|
|
28
28
|
panel,
|
|
29
29
|
backdrop,
|
|
@@ -32,6 +32,16 @@ const Drawer = ({ id, open, onClose, children }) => {
|
|
|
32
32
|
onClose();
|
|
33
33
|
}
|
|
34
34
|
});
|
|
35
|
+
useLayoutEffect(() => {
|
|
36
|
+
if (!control || !open) return;
|
|
37
|
+
control.current = {
|
|
38
|
+
follow,
|
|
39
|
+
settle
|
|
40
|
+
};
|
|
41
|
+
return () => {
|
|
42
|
+
control.current = null;
|
|
43
|
+
};
|
|
44
|
+
});
|
|
35
45
|
const [leaving, setLeaving] = useState(false);
|
|
36
46
|
const [wasOpen, setWasOpen] = useState(open);
|
|
37
47
|
if (open !== wasOpen) {
|
|
@@ -49,7 +59,8 @@ const Drawer = ({ id, open, onClose, children }) => {
|
|
|
49
59
|
className: cn("fixed inset-0 z-50 md:hidden", leaving && "pointer-events-none"),
|
|
50
60
|
children: [/* @__PURE__ */ jsx("div", {
|
|
51
61
|
ref: backdrop,
|
|
52
|
-
className: cn("absolute inset-0 touch-none bg-backdrop/40 motion-reduce:[animation:none]", leaving ? "[animation:pb-fade-out_200ms_ease-in_forwards]" : "[animation:pb-fade-in_200ms_ease-out]"),
|
|
62
|
+
className: cn("absolute inset-0 touch-none bg-backdrop/40 motion-reduce:[animation:none]", leaving ? "[animation:pb-fade-out_200ms_ease-in_forwards]" : !underFinger && "[animation:pb-fade-in_200ms_ease-out]"),
|
|
63
|
+
style: underFinger && !leaving ? { opacity: 0 } : void 0,
|
|
53
64
|
onClick: () => !dragged() && onClose(),
|
|
54
65
|
...backdropHandlers,
|
|
55
66
|
"aria-hidden": true
|
|
@@ -61,7 +72,8 @@ const Drawer = ({ id, open, onClose, children }) => {
|
|
|
61
72
|
"aria-label": text("navigation"),
|
|
62
73
|
"aria-hidden": leaving || void 0,
|
|
63
74
|
tabIndex: -1,
|
|
64
|
-
className: cn("absolute inset-y-0 left-0 flex w-[min(88vw,384px)] touch-pan-y bg-sidebar pl-[var(--pb-safe-left)] shadow-pop outline-none motion-reduce:[animation:none] before:absolute before:inset-y-0 before:right-full before:w-10 before:bg-sidebar", leaving ? "[animation:pb-drawer-out_200ms_ease-in_forwards]" : "[animation:pb-drawer-in_200ms_ease-out]"),
|
|
75
|
+
className: cn("absolute inset-y-0 left-0 flex w-[min(88vw,384px)] touch-pan-y bg-sidebar pl-[var(--pb-safe-left)] shadow-pop outline-none motion-reduce:[animation:none] before:absolute before:inset-y-0 before:right-full before:w-10 before:bg-sidebar", leaving ? "[animation:pb-drawer-out_200ms_ease-in_forwards]" : !underFinger && "[animation:pb-drawer-in_200ms_ease-out]"),
|
|
76
|
+
style: underFinger && !leaving ? { transform: "translateX(-100%)" } : void 0,
|
|
65
77
|
onClick: (event) => event.target.closest("a") && onClose(),
|
|
66
78
|
...panelHandlers,
|
|
67
79
|
children
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { NativeBridge } from "../app/native-auth-fetch.js";
|
|
2
|
+
//#region src/app-shell/edge-swipe.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* What a swipe from the left edge does: goes `back` a step, with a round back mark beside the finger; opens the
|
|
5
|
+
* `sidebar` drawer, which follows the finger; or `none`, which leaves the edge free, for a host app around the page to
|
|
6
|
+
* take for a gesture of its own.
|
|
7
|
+
*/
|
|
8
|
+
export type EdgeSwipeAction = 'back' | 'sidebar' | 'none';
|
|
9
|
+
/**
|
|
10
|
+
* The one place the edge swipe is decided, on a phone: back where the trail has a step back, the sidebar where there is
|
|
11
|
+
* neither a step back nor a bottom bar and the drawer is closed, and nothing otherwise, as on a tab's page in More page
|
|
12
|
+
* mode or with the drawer open. A desktop has no edge swipe.
|
|
13
|
+
*/
|
|
14
|
+
export declare const edgeSwipeAction: ({ desktop, back, bottomBar, drawerOpen }: {
|
|
15
|
+
desktop: boolean;
|
|
16
|
+
back: boolean;
|
|
17
|
+
bottomBar: boolean;
|
|
18
|
+
drawerOpen: boolean;
|
|
19
|
+
}) => EdgeSwipeAction;
|
|
20
|
+
/** The native plugin a host app offers to learn the page's edge swipe ahead of each gesture, as its own uses the edge. */
|
|
21
|
+
export declare const edgeSwipePlugin = "ProtobaseEdgeSwipe";
|
|
22
|
+
/**
|
|
23
|
+
* What the host app is told: `back` is its own back swipe, which shows the entry behind from its snapshot, so only
|
|
24
|
+
* where that entry is the trail's step back; `sidebar` and `page` the page does itself, the drawer or its own way back;
|
|
25
|
+
* `none` leaves the edge to the app.
|
|
26
|
+
*/
|
|
27
|
+
export type DeclaredEdgeSwipe = 'back' | 'sidebar' | 'page' | 'none';
|
|
28
|
+
/** The edge swipe the host app is told, where it does the back swipe itself (`nativeBack`) and what history has behind. */
|
|
29
|
+
export declare const declaredEdgeSwipe: (action: EdgeSwipeAction, { nativeBack, behindIsBack }: {
|
|
30
|
+
nativeBack: boolean;
|
|
31
|
+
behindIsBack: boolean;
|
|
32
|
+
}) => DeclaredEdgeSwipe;
|
|
33
|
+
export type NativeEdgeSwipe = {
|
|
34
|
+
set: (action: DeclaredEdgeSwipe) => Promise<unknown>;
|
|
35
|
+
};
|
|
36
|
+
/** The host app's edge swipe plugin, when its bridge offers one; `undefined` otherwise. */
|
|
37
|
+
export declare const nativeEdgeSwipe: (bridge: NativeBridge | undefined) => NativeEdgeSwipe | undefined;
|
|
38
|
+
export declare const NativeEdgeSwipeContext: import("react").Context<NativeEdgeSwipe | undefined>;
|
|
39
|
+
/**
|
|
40
|
+
* Whether a host app around the page can do the back swipe itself, such as with its web view's own back gesture, which
|
|
41
|
+
* shows the page behind; the shell then draws none where the entry behind is the trail's step back (`declaredEdgeSwipe`).
|
|
42
|
+
*/
|
|
43
|
+
export declare const useNativeBackSwipe: () => boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Tells the host app the page's edge swipe as desired state, again on every navigation (`at`) and change, so the app
|
|
46
|
+
* knows at a gesture's start whether the edge is the page's, with no round trip.
|
|
47
|
+
*/
|
|
48
|
+
export declare const useDeclaredEdgeSwipe: (action: DeclaredEdgeSwipe, at: string) => void;
|
|
49
|
+
//#endregion
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { createContext, useContext, useEffect } from "react";
|
|
2
|
+
//#region src/app-shell/edge-swipe.ts
|
|
3
|
+
/**
|
|
4
|
+
* The one place the edge swipe is decided, on a phone: back where the trail has a step back, the sidebar where there is
|
|
5
|
+
* neither a step back nor a bottom bar and the drawer is closed, and nothing otherwise, as on a tab's page in More page
|
|
6
|
+
* mode or with the drawer open. A desktop has no edge swipe.
|
|
7
|
+
*/
|
|
8
|
+
const edgeSwipeAction = ({ desktop, back, bottomBar, drawerOpen }) => desktop ? "none" : back ? "back" : !bottomBar && !drawerOpen ? "sidebar" : "none";
|
|
9
|
+
/** The native plugin a host app offers to learn the page's edge swipe ahead of each gesture, as its own uses the edge. */
|
|
10
|
+
const edgeSwipePlugin = "ProtobaseEdgeSwipe";
|
|
11
|
+
/** The edge swipe the host app is told, where it does the back swipe itself (`nativeBack`) and what history has behind. */
|
|
12
|
+
const declaredEdgeSwipe = (action, { nativeBack, behindIsBack }) => action !== "back" ? action : nativeBack && behindIsBack ? "back" : "page";
|
|
13
|
+
/** The host app's edge swipe plugin, when its bridge offers one; `undefined` otherwise. */
|
|
14
|
+
const nativeEdgeSwipe = (bridge) => {
|
|
15
|
+
if (!bridge?.isPluginAvailable("ProtobaseEdgeSwipe")) return;
|
|
16
|
+
return { set: (action) => bridge.nativePromise(edgeSwipePlugin, "set", { action }) };
|
|
17
|
+
};
|
|
18
|
+
const NativeEdgeSwipeContext = createContext(void 0);
|
|
19
|
+
/**
|
|
20
|
+
* Whether a host app around the page can do the back swipe itself, such as with its web view's own back gesture, which
|
|
21
|
+
* shows the page behind; the shell then draws none where the entry behind is the trail's step back (`declaredEdgeSwipe`).
|
|
22
|
+
*/
|
|
23
|
+
const useNativeBackSwipe = () => Boolean(useContext(NativeEdgeSwipeContext));
|
|
24
|
+
/**
|
|
25
|
+
* Tells the host app the page's edge swipe as desired state, again on every navigation (`at`) and change, so the app
|
|
26
|
+
* knows at a gesture's start whether the edge is the page's, with no round trip.
|
|
27
|
+
*/
|
|
28
|
+
const useDeclaredEdgeSwipe = (action, at) => {
|
|
29
|
+
const native = useContext(NativeEdgeSwipeContext);
|
|
30
|
+
useEffect(() => {
|
|
31
|
+
native?.set(action).catch(() => void 0);
|
|
32
|
+
}, [
|
|
33
|
+
native,
|
|
34
|
+
action,
|
|
35
|
+
at
|
|
36
|
+
]);
|
|
37
|
+
};
|
|
38
|
+
//#endregion
|
|
39
|
+
export { NativeEdgeSwipeContext, declaredEdgeSwipe, edgeSwipeAction, edgeSwipePlugin, nativeEdgeSwipe, useDeclaredEdgeSwipe, useNativeBackSwipe };
|