@protobase/ui 0.113.0 → 0.114.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/account/messages.d.ts +2 -2
- package/dist/app/app.d.ts +4 -1
- package/dist/app/app.js +9 -7
- package/dist/app/change-confirm/messages.d.ts +2 -2
- package/dist/app/charts/messages.d.ts +2 -2
- package/dist/app/confirm-sign-in-messages.d.ts +2 -2
- package/dist/app/create/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/displays/virtual-cards.js +1 -0
- package/dist/app/embedded-list/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/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/first-frame.d.ts +13 -0
- package/dist/app/first-frame.js +23 -0
- 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/hand-order/messages.d.ts +2 -2
- package/dist/app/import/messages.d.ts +2 -2
- package/dist/app/index.html +0 -17
- package/dist/app/list-messages.d.ts +2 -2
- package/dist/app/main.js +19 -7
- package/dist/app/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/record-row/record-row.d.ts +3 -2
- package/dist/app/record-row/record-row.js +43 -27
- package/dist/app/record-row/row-window.d.ts +11 -0
- package/dist/app/record-row/row-window.js +15 -2
- package/dist/app/refresh-mark.d.ts +2 -1
- package/dist/app/refresh-mark.js +3 -1
- package/dist/app/related-cards/messages.d.ts +2 -2
- package/dist/app/reveal-when-loaded.d.ts +8 -2
- package/dist/app/reveal-when-loaded.js +12 -5
- package/dist/app/runtime/messages.d.ts +2 -2
- package/dist/app/saved/messages.d.ts +2 -2
- package/dist/app/searches/messages.d.ts +2 -2
- package/dist/app/splash-hold.d.ts +0 -1
- package/dist/app/splash-hold.js +1 -1
- package/dist/app/start-screen.d.ts +0 -9
- package/dist/app/start-screen.js +1 -10
- package/dist/app/ui-ready.d.ts +11 -0
- package/dist/app/ui-ready.js +12 -0
- package/dist/app-shell/app-shell.js +3 -1
- package/dist/app-shell/close-sidebar.d.ts +10 -0
- package/dist/app-shell/close-sidebar.js +17 -0
- package/dist/app-shell/drawer.d.ts +7 -1
- package/dist/app-shell/drawer.js +26 -7
- package/dist/app-shell/index.d.ts +2 -1
- package/dist/app-shell/index.js +2 -1
- package/dist/app-shell/messages.d.ts +2 -2
- package/dist/app-shell/top-bar.js +4 -4
- 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/compact-table/messages.d.ts +2 -2
- package/dist/data/query-keys.d.ts +6 -0
- package/dist/data/query-keys.js +10 -0
- package/dist/data/start-cache/cached-plugins.d.ts +6 -0
- package/dist/data/start-cache/cached-plugins.js +10 -0
- package/dist/data-grid/column-spec.d.ts +1 -1
- package/dist/data-grid/data-grid.js +1 -0
- package/dist/data-grid/messages.d.ts +2 -2
- package/dist/data-grid/row-source.d.ts +5 -0
- package/dist/data-grid/use-paged-rows.d.ts +5 -3
- package/dist/data-grid/use-paged-rows.js +21 -6
- package/dist/filter-panel/messages.d.ts +2 -2
- package/dist/focus-page/messages.d.ts +2 -2
- package/dist/index.d.ts +4 -1
- package/dist/index.js +4 -1
- package/dist/invitations/messages.d.ts +2 -2
- package/dist/live/grid-loader.d.ts +1 -0
- package/dist/live/grid-loader.js +3 -1
- package/dist/live/use-live-rows.js +1 -0
- package/dist/mailbox/messages.d.ts +2 -2
- package/dist/mocks/customers.d.ts +1 -1
- package/dist/mocks/invoices.d.ts +1 -1
- package/dist/mocks/orders.d.ts +3 -3
- package/dist/notifications/bell/messages.d.ts +2 -2
- package/dist/organizations/members-page.js +13 -7
- package/dist/organizations/messages.d.ts +2 -2
- package/dist/organizations/use-organizations.d.ts +4 -1
- package/dist/organizations/use-organizations.js +25 -19
- package/dist/package.js +1 -1
- package/dist/plugins/plugin-source.d.ts +24 -4
- package/dist/plugins/plugin-source.js +48 -14
- package/dist/plugins/use-plugin-loads.d.ts +3 -1
- package/dist/plugins/use-plugin-loads.js +24 -7
- package/dist/primitives/messages.d.ts +2 -2
- package/dist/primitives/skeleton.js +1 -0
- package/dist/record-view/messages.d.ts +2 -2
- package/dist/roles/use-active-role.d.ts +4 -1
- package/dist/roles/use-active-role.js +18 -13
- package/dist/shell/assets/api-provider-BJJrOoO4.js +2 -0
- package/dist/shell/assets/app-VoTi41IN.js +16 -0
- package/dist/shell/assets/badge-OU9hb6yQ.js +2 -0
- package/dist/shell/assets/checkbox-DFfK432Y.js +2 -0
- package/dist/shell/assets/createLucideIcon-DGm8SdFI.js +2 -0
- package/dist/shell/assets/display-value-CIH2qfgQ.js +2 -0
- package/dist/shell/assets/{field-badge-3QmjR1r3.js → field-badge-DX2Mc_fH.js} +2 -2
- package/dist/shell/assets/{graph-view-BcbWbnHO.js → graph-view-CY9LPr0B.js} +2 -2
- package/dist/shell/assets/{html-viewer-tGtSpy9M.js → html-viewer-BPGMH_GA.js} +2 -2
- package/dist/shell/assets/{in-place-form-B0EkP4B1.js → in-place-form-RWSQGEg4.js} +2 -2
- package/dist/shell/assets/index-Bzb-O7ER.js +2 -0
- package/dist/shell/assets/index-HnFovy2Q.css +2 -0
- package/dist/shell/assets/{intl-cache-bXVNV0Yq.js → intl-cache-D4doUjK1.js} +2 -2
- package/dist/shell/assets/{lib-d3-interpolate-Cl0dHO4f.js → lib-d3-interpolate-D3u38iyJ.js} +2 -2
- package/dist/shell/assets/{lib-d3-transition-DUHAGQ8z.js → lib-d3-transition-BUpPvFvt.js} +2 -2
- package/dist/shell/assets/{lib-d3-zoom-gQh2osrj.js → lib-d3-zoom-BF7SPKNh.js} +2 -2
- package/dist/shell/assets/{lib-vis.gl-react-maplibre-CU7gWYjg.js → lib-vis.gl-react-maplibre-C7-0xNFC.js} +2 -2
- package/dist/shell/assets/{lib-xyflow-react-DGg_5r7u.js → lib-xyflow-react-CKyW7szC.js} +2 -2
- package/dist/shell/assets/maplibre-9ViQO48S.js +2 -0
- package/dist/shell/assets/{markdown-content-DHKbAJjx.js → markdown-content-DTB9RQDs.js} +2 -2
- package/dist/shell/assets/{record-map-nGRmsk6x.js → record-map-CVqCWtfe.js} +2 -2
- package/dist/shell/assets/{records-map-D2flyaz3.js → records-map-ClYSxrVR.js} +2 -2
- package/dist/shell/assets/{run-trace-view-DfrAPeum.js → run-trace-view-CN16MiXg.js} +2 -2
- package/dist/shell/assets/search-picker-BGpvJQRD.js +2 -0
- package/dist/shell/assets/shared-protobase-ui-BC8LqGQB.js +2 -0
- package/dist/shell/assets/step-catalog-CZY0ZpCC.js +2 -0
- package/dist/shell/assets/step-panel-DhD80lsJ.js +2 -0
- package/dist/shell/assets/use-app-address-B4Uk3nWy.js +2 -0
- package/dist/shell/assets/{use-meta-BqEqOLNe.js → use-meta-D5kYywHm.js} +2 -2
- package/dist/shell/assets/{use-sibling-page-CiuiG-Tz.js → use-sibling-page-BJ81HcOP.js} +3 -3
- package/dist/shell/assets/value-badge-Dpd8dRqq.js +2 -0
- package/dist/shell/assets/{vendor-WWp_xlp2.js → vendor-3etemhgS.js} +4 -4
- package/dist/shell/assets/{workflow-canvas-DMP7SDWX.js → workflow-canvas-C1nGpi5w.js} +2 -2
- package/dist/shell/assets/{workflow-graph-editor-xpV8_qEl.js → workflow-graph-editor-DAJa4lq6.js} +2 -2
- package/dist/shell/assets/workflow-workbench-HramVZEJ.js +4 -0
- package/dist/shell/assets/{workflows-Bku4o2su.js → workflows-DlvOln9v.js} +2 -2
- package/dist/shell/assets/{workflows-start-kl7rSSay.js → workflows-start-QUKfwFqf.js} +2 -2
- package/dist/shell/index.html +16 -19
- package/dist/shell/protobase.shell.json +2 -2
- package/dist/shell/protobase.sw.js +2 -2
- package/dist/shell-source-maps/assets/api-provider-BJJrOoO4.js.map +1 -0
- package/dist/shell-source-maps/assets/app-VoTi41IN.js.map +1 -0
- package/dist/shell-source-maps/assets/{badge-ChHXC28D.js.map → badge-OU9hb6yQ.js.map} +1 -1
- package/dist/shell-source-maps/assets/{checkbox-COOOlJPG.js.map → checkbox-DFfK432Y.js.map} +1 -1
- package/dist/shell-source-maps/assets/createLucideIcon-DGm8SdFI.js.map +1 -0
- package/dist/shell-source-maps/assets/display-value-CIH2qfgQ.js.map +1 -0
- package/dist/shell-source-maps/assets/{field-badge-3QmjR1r3.js.map → field-badge-DX2Mc_fH.js.map} +1 -1
- package/dist/shell-source-maps/assets/{graph-view-BcbWbnHO.js.map → graph-view-CY9LPr0B.js.map} +1 -1
- package/dist/shell-source-maps/assets/{html-viewer-tGtSpy9M.js.map → html-viewer-BPGMH_GA.js.map} +1 -1
- package/dist/shell-source-maps/assets/{in-place-form-B0EkP4B1.js.map → in-place-form-RWSQGEg4.js.map} +1 -1
- package/dist/shell-source-maps/assets/index-Bzb-O7ER.js.map +1 -0
- package/dist/shell-source-maps/assets/{intl-cache-bXVNV0Yq.js.map → intl-cache-D4doUjK1.js.map} +1 -1
- package/dist/shell-source-maps/assets/{lib-d3-interpolate-Cl0dHO4f.js.map → lib-d3-interpolate-D3u38iyJ.js.map} +1 -1
- package/dist/shell-source-maps/assets/{lib-d3-transition-DUHAGQ8z.js.map → lib-d3-transition-BUpPvFvt.js.map} +1 -1
- package/dist/shell-source-maps/assets/{lib-d3-zoom-gQh2osrj.js.map → lib-d3-zoom-BF7SPKNh.js.map} +1 -1
- package/dist/shell-source-maps/assets/{lib-vis.gl-react-maplibre-CU7gWYjg.js.map → lib-vis.gl-react-maplibre-C7-0xNFC.js.map} +1 -1
- package/dist/shell-source-maps/assets/{lib-xyflow-react-DGg_5r7u.js.map → lib-xyflow-react-CKyW7szC.js.map} +1 -1
- package/dist/shell-source-maps/assets/{maplibre-Y7X50Jfk.js.map → maplibre-9ViQO48S.js.map} +1 -1
- package/dist/shell-source-maps/assets/{markdown-content-DHKbAJjx.js.map → markdown-content-DTB9RQDs.js.map} +1 -1
- package/dist/shell-source-maps/assets/{record-map-nGRmsk6x.js.map → record-map-CVqCWtfe.js.map} +1 -1
- package/dist/shell-source-maps/assets/{records-map-D2flyaz3.js.map → records-map-ClYSxrVR.js.map} +1 -1
- package/dist/shell-source-maps/assets/{run-trace-view-DfrAPeum.js.map → run-trace-view-CN16MiXg.js.map} +1 -1
- package/dist/shell-source-maps/assets/{search-picker-CJcJetBh.js.map → search-picker-BGpvJQRD.js.map} +1 -1
- package/dist/shell-source-maps/assets/shared-protobase-ui-BC8LqGQB.js.map +1 -0
- package/dist/shell-source-maps/assets/{step-catalog-ZvQOXfSh.js.map → step-catalog-CZY0ZpCC.js.map} +1 -1
- package/dist/shell-source-maps/assets/{step-panel-B1yHz7OC.js.map → step-panel-DhD80lsJ.js.map} +1 -1
- package/dist/shell-source-maps/assets/{use-app-address-B6k3dkV0.js.map → use-app-address-B4Uk3nWy.js.map} +1 -1
- package/dist/shell-source-maps/assets/{use-meta-BqEqOLNe.js.map → use-meta-D5kYywHm.js.map} +1 -1
- package/dist/shell-source-maps/assets/{use-sibling-page-CiuiG-Tz.js.map → use-sibling-page-BJ81HcOP.js.map} +1 -1
- package/dist/shell-source-maps/assets/{value-badge-BKLV4otJ.js.map → value-badge-Dpd8dRqq.js.map} +1 -1
- package/dist/shell-source-maps/assets/{vendor-WWp_xlp2.js.map → vendor-3etemhgS.js.map} +1 -1
- package/dist/shell-source-maps/assets/{workflow-canvas-DMP7SDWX.js.map → workflow-canvas-C1nGpi5w.js.map} +1 -1
- package/dist/shell-source-maps/assets/{workflow-graph-editor-xpV8_qEl.js.map → workflow-graph-editor-DAJa4lq6.js.map} +1 -1
- package/dist/shell-source-maps/assets/{workflow-workbench-Djdd_ODh.js.map → workflow-workbench-HramVZEJ.js.map} +1 -1
- package/dist/shell-source-maps/assets/{workflows-Bku4o2su.js.map → workflows-DlvOln9v.js.map} +1 -1
- package/dist/shell-source-maps/assets/{workflows-start-kl7rSSay.js.map → workflows-start-QUKfwFqf.js.map} +1 -1
- package/dist/status/messages.d.ts +2 -2
- package/dist/styles.css +14 -0
- package/dist/users/messages.d.ts +2 -2
- package/package.json +5 -5
- package/dist/app/hold-start-for-first-loads.d.ts +0 -12
- package/dist/app/hold-start-for-first-loads.js +0 -43
- package/dist/shell/assets/api-provider-CcDtTh0D.js +0 -2
- package/dist/shell/assets/app-DG30qs8Q.js +0 -16
- package/dist/shell/assets/badge-ChHXC28D.js +0 -2
- package/dist/shell/assets/checkbox-COOOlJPG.js +0 -2
- package/dist/shell/assets/display-value-fDiKbfJO.js +0 -2
- package/dist/shell/assets/index-BkCaPeOq.css +0 -2
- package/dist/shell/assets/index-CZ013UoE.js +0 -2
- package/dist/shell/assets/maplibre-Y7X50Jfk.js +0 -2
- package/dist/shell/assets/messages-ClKBpZlk.js +0 -2
- package/dist/shell/assets/search-picker-CJcJetBh.js +0 -2
- package/dist/shell/assets/shared-protobase-ui-CVwqj5Cp.js +0 -2
- package/dist/shell/assets/step-catalog-ZvQOXfSh.js +0 -2
- package/dist/shell/assets/step-panel-B1yHz7OC.js +0 -2
- package/dist/shell/assets/use-app-address-B6k3dkV0.js +0 -2
- package/dist/shell/assets/value-badge-BKLV4otJ.js +0 -2
- package/dist/shell/assets/workflow-workbench-Djdd_ODh.js +0 -4
- package/dist/shell-source-maps/assets/api-provider-CcDtTh0D.js.map +0 -1
- package/dist/shell-source-maps/assets/app-DG30qs8Q.js.map +0 -1
- package/dist/shell-source-maps/assets/display-value-fDiKbfJO.js.map +0 -1
- package/dist/shell-source-maps/assets/index-CZ013UoE.js.map +0 -1
- package/dist/shell-source-maps/assets/messages-ClKBpZlk.js.map +0 -1
- package/dist/shell-source-maps/assets/shared-protobase-ui-CVwqj5Cp.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MessageValue } from "../../locale/messages.js";
|
|
2
2
|
//#region src/app/import/messages.d.ts
|
|
3
3
|
export declare const text: {
|
|
4
|
-
(id: "create" | "file" | "back" | "download" | "
|
|
5
|
-
rich(id: "create" | "file" | "back" | "download" | "
|
|
4
|
+
(id: "create" | "file" | "back" | "download" | "column" | "saving" | "row" | "line" | "field" | "check" | "failed" | "cancel" | "update" | "next" | "columns" | "rows" | "cancelled" | "done" | "created" | "updated" | "unreadable" | "checking" | "reading" | "upsert" | "import" | "importPlural" | "couldNotReadFile" | "couldNotCheck" | "checkRows" | "importRows" | "cancelImport" | "fileHint" | "theFile" | "sheet" | "createHint" | "updateHint" | "upsertHint" | "doNotImport" | "whatEachRowDoes" | "findBy" | "chooseField" | "findByHint" | "foundInColumn" | "chooseColumn" | "numbers" | "dates" | "dayFirst" | "monthFirst" | "datesHint" | "requiredMarked" | "emptyInFirstRows" | "fieldFor" | "foundBy" | "pluralFoundBy" | "noColumnFills" | "rowsNotImported" | "rowProblems" | "andMore" | "checkingRows" | "toCreate" | "toUpdate" | "withProblems" | "firstRows" | "problemRows" | "batches" | "stopping" | "rowsSaved" | "stopped" | "summary" | "skipped" | "notWrittenHint" | "notImportedFile" | "problems" | "notNumber" | "notWholeNumber" | "tooLarge" | "notBoolean" | "notDate" | "hasTime" | "severalValues" | "notOneOf" | "notText" | "nestedValue" | "emptyRequired" | "noneHas" | "severalHave" | "notOneRecord" | "nothingToUpdate" | "fileNotUtf8" | "noSheets" | "missingSheetPart" | "notZip" | "zip64" | "compression" | "notWorkbook" | "noSheetCalled" | "jsonInvalid" | "jsonNotList" | "fromFile" | "tableFromFile" | "newTable" | "noTitle" | "needed" | "nameForm" | "nameReservedWord" | "nameReservedField" | "nameTaken" | "nameTwice" | "noFields" | "typeFor" | "labelFor" | "nameFor" | "decimalSize" | "typesFromCells" | "couldNotMakeTable" | "makeTable" | "openTable" | "labelTooLong", values?: Record<string, MessageValue>): string;
|
|
5
|
+
rich(id: "create" | "file" | "back" | "download" | "column" | "saving" | "row" | "line" | "field" | "check" | "failed" | "cancel" | "update" | "next" | "columns" | "rows" | "cancelled" | "done" | "created" | "updated" | "unreadable" | "checking" | "reading" | "upsert" | "import" | "importPlural" | "couldNotReadFile" | "couldNotCheck" | "checkRows" | "importRows" | "cancelImport" | "fileHint" | "theFile" | "sheet" | "createHint" | "updateHint" | "upsertHint" | "doNotImport" | "whatEachRowDoes" | "findBy" | "chooseField" | "findByHint" | "foundInColumn" | "chooseColumn" | "numbers" | "dates" | "dayFirst" | "monthFirst" | "datesHint" | "requiredMarked" | "emptyInFirstRows" | "fieldFor" | "foundBy" | "pluralFoundBy" | "noColumnFills" | "rowsNotImported" | "rowProblems" | "andMore" | "checkingRows" | "toCreate" | "toUpdate" | "withProblems" | "firstRows" | "problemRows" | "batches" | "stopping" | "rowsSaved" | "stopped" | "summary" | "skipped" | "notWrittenHint" | "notImportedFile" | "problems" | "notNumber" | "notWholeNumber" | "tooLarge" | "notBoolean" | "notDate" | "hasTime" | "severalValues" | "notOneOf" | "notText" | "nestedValue" | "emptyRequired" | "noneHas" | "severalHave" | "notOneRecord" | "nothingToUpdate" | "fileNotUtf8" | "noSheets" | "missingSheetPart" | "notZip" | "zip64" | "compression" | "notWorkbook" | "noSheetCalled" | "jsonInvalid" | "jsonNotList" | "fromFile" | "tableFromFile" | "newTable" | "noTitle" | "needed" | "nameForm" | "nameReservedWord" | "nameReservedField" | "nameTaken" | "nameTwice" | "noFields" | "typeFor" | "labelFor" | "nameFor" | "decimalSize" | "typesFromCells" | "couldNotMakeTable" | "makeTable" | "openTable" | "labelTooLong", values: Record<string, MessageValue | import("react").ReactNode>): import("react").ReactNode;
|
|
6
6
|
};
|
|
7
7
|
//#endregion
|
package/dist/app/index.html
CHANGED
|
@@ -64,20 +64,6 @@
|
|
|
64
64
|
transform: rotate(360deg);
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
|
-
/* A host's snapshot of the page shown last (start-screen.ts), in place of the spinner, inert, until the app draws */
|
|
68
|
-
#pb-snapshot {
|
|
69
|
-
position: absolute;
|
|
70
|
-
inset: 0;
|
|
71
|
-
overflow: hidden;
|
|
72
|
-
pointer-events: none;
|
|
73
|
-
user-select: none;
|
|
74
|
-
}
|
|
75
|
-
#pb-snapshot:empty {
|
|
76
|
-
display: none;
|
|
77
|
-
}
|
|
78
|
-
#pb-start:has(#pb-snapshot:not(:empty)) svg {
|
|
79
|
-
display: none;
|
|
80
|
-
}
|
|
81
67
|
/* A start that failed: index.html's own words, as the app's translations never loaded */
|
|
82
68
|
#pb-start [role='alert'] {
|
|
83
69
|
display: flex;
|
|
@@ -107,7 +93,6 @@
|
|
|
107
93
|
<!-- As tall as the screen shows, browser toolbars aside, so a page that fills it, such as a map, keeps the bottom bar in view. The page reaches under the status bar and the home indicator, which the shell's bars keep clear of; the sides keep clear of the notch. -->
|
|
108
94
|
<div id="root" class="h-dvh" style="padding-left: var(--pb-safe-left); padding-right: var(--pb-safe-right)"></div>
|
|
109
95
|
<div id="pb-start" aria-hidden="true">
|
|
110
|
-
<div id="pb-snapshot"></div>
|
|
111
96
|
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 12a9 9 0 1 1-6.219-8.56" /></svg>
|
|
112
97
|
<div role="alert" hidden>
|
|
113
98
|
<p style="margin: 0">The app did not load. Check your connection, then try again.</p>
|
|
@@ -132,8 +117,6 @@
|
|
|
132
117
|
// A stylesheet or an image that does not load leaves the app to start
|
|
133
118
|
if (event && event.type === 'error' && event.target !== window && event.target.tagName !== 'SCRIPT') return
|
|
134
119
|
stop()
|
|
135
|
-
var snapshot = document.getElementById('pb-snapshot')
|
|
136
|
-
if (snapshot) snapshot.remove()
|
|
137
120
|
start.removeAttribute('aria-hidden')
|
|
138
121
|
start.querySelector('svg').remove()
|
|
139
122
|
start.querySelector('[role="alert"]').hidden = false
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MessageValue } from "../locale/messages.js";
|
|
2
2
|
//#region src/app/list-messages.d.ts
|
|
3
3
|
export declare const text: {
|
|
4
|
-
(id: "
|
|
5
|
-
rich(id: "
|
|
4
|
+
(id: "sort" | "search" | "clearSearch" | "delete" | "filters" | "created" | "deleteCount" | "couldNotLoadRows" | "export" | "searchPlural" | "noList" | "filtersCount" | "newRecord" | "openRecord" | "exportCount" | "actionCount" | "dragToSort" | "unreadableFilter" | "noMatchSearch" | "noMatchFilters" | "noMatch" | "noneYet" | "clearFilters", values?: Record<string, MessageValue>): string;
|
|
5
|
+
rich(id: "sort" | "search" | "clearSearch" | "delete" | "filters" | "created" | "deleteCount" | "couldNotLoadRows" | "export" | "searchPlural" | "noList" | "filtersCount" | "newRecord" | "openRecord" | "exportCount" | "actionCount" | "dragToSort" | "unreadableFilter" | "noMatchSearch" | "noMatchFilters" | "noMatch" | "noneYet" | "clearFilters", values: Record<string, MessageValue | import("react").ReactNode>): import("react").ReactNode;
|
|
6
6
|
};
|
|
7
7
|
//#endregion
|
package/dist/app/main.js
CHANGED
|
@@ -3,8 +3,13 @@ import { restorePage } from "./live-update/kept-page.js";
|
|
|
3
3
|
import { browserLocale } from "../locale/active-locale.js";
|
|
4
4
|
import { nativeBridgeOf } from "./native-auth-fetch.js";
|
|
5
5
|
import { uiFromModule } from "./pages/ui-from-module.js";
|
|
6
|
+
import { browserLoader } from "../plugins/load-plugin.js";
|
|
7
|
+
import { createPluginSource, preloadPlugins } from "../plugins/plugin-source.js";
|
|
8
|
+
import { pluginWaitMs } from "../plugins/use-plugin-loads.js";
|
|
6
9
|
import { App } from "./app.js";
|
|
10
|
+
import { judgesFirstFrame, showFirstFrame } from "./first-frame.js";
|
|
7
11
|
import { listenForPresses } from "../lib/press-feedback.js";
|
|
12
|
+
import { cachedPlugins } from "../data/start-cache/cached-plugins.js";
|
|
8
13
|
import { openStartCache } from "../data/start-cache/open-start-cache.js";
|
|
9
14
|
import { showKeyboardAccessoryBar } from "./native-keyboard.js";
|
|
10
15
|
import { applyNativeTextSize } from "./native-text-size.js";
|
|
@@ -27,11 +32,18 @@ if (nativeBridge) {
|
|
|
27
32
|
const storage = guarded(() => window.sessionStorage, void 0);
|
|
28
33
|
if (storage) restorePage(storage, window.history);
|
|
29
34
|
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
const plugins = createPluginSource(browserLoader);
|
|
36
|
+
openStartCache().then(async (startCache) => {
|
|
37
|
+
await preloadPlugins(plugins, cachedPlugins(startCache), pluginWaitMs);
|
|
38
|
+
const app = /* @__PURE__ */ jsx(StrictMode, { children: /* @__PURE__ */ jsx(App, {
|
|
39
|
+
baseUrl: `${pageApiOrigin() ?? ""}/api/v1`,
|
|
40
|
+
ui: uiFromModule(projectUi),
|
|
41
|
+
locale: browserLocale(),
|
|
42
|
+
nativeBridge,
|
|
43
|
+
startCache,
|
|
44
|
+
pluginSource: plugins
|
|
45
|
+
}) });
|
|
46
|
+
if (judgesFirstFrame(window)) return showFirstFrame(root, app);
|
|
47
|
+
createRoot(root).render(app);
|
|
48
|
+
});
|
|
37
49
|
//#endregion
|
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: "pages" | "open" | "replace" | "reload" | "leave" | "account" | "remove" | "refreshing" | "noMatches" | "loading" | "new" | "fileMissing" | "assistant" | "noAnswer" | "admin" | "cannotReach" | "tryAgain" | "notFound" | "hr" | "show" | "noValue" | "noComponent" | "couldNotShow" | "noPage" | "signInPolicy" | "noResource" | "somethingWentWrong" | "adminsOnly" | "onlyAdminPolicy" | "ownersOnly" | "onlyOwners" | "chooseResource" | "pickFromSidebar" | "nothingHere" | "operationFailed" | "nothingSaved" | "loadingRecord" | "choose" | "chooseFileFor" | "notUploaded" | "uploadingLabel" | "uploading" | "dropFile" | "chooseFile" | "average" | "sales" | "crm" | "catalog" | "inventory" | "tables" | "searchPlural" | "couldNotLoadOptions" | "refreshFailed" | "leaveTitle" | "leaveDescription" | "leaveInputLost" | "stay" | "reloadTitle" | "reloadDraftKept" | "reloadInputLost" | "keepEditing" | "hide" | "setNewValue" | "signInRefused" | "loadingFrom" | "restWorks" | "staffSession" | "staffSignedIn" | "stopStaffSession" | "openLabel" | "opensNewTab", values?: Record<string, MessageValue>): string;
|
|
5
|
+
rich(id: "pages" | "open" | "replace" | "reload" | "leave" | "account" | "remove" | "refreshing" | "noMatches" | "loading" | "new" | "fileMissing" | "assistant" | "noAnswer" | "admin" | "cannotReach" | "tryAgain" | "notFound" | "hr" | "show" | "noValue" | "noComponent" | "couldNotShow" | "noPage" | "signInPolicy" | "noResource" | "somethingWentWrong" | "adminsOnly" | "onlyAdminPolicy" | "ownersOnly" | "onlyOwners" | "chooseResource" | "pickFromSidebar" | "nothingHere" | "operationFailed" | "nothingSaved" | "loadingRecord" | "choose" | "chooseFileFor" | "notUploaded" | "uploadingLabel" | "uploading" | "dropFile" | "chooseFile" | "average" | "sales" | "crm" | "catalog" | "inventory" | "tables" | "searchPlural" | "couldNotLoadOptions" | "refreshFailed" | "leaveTitle" | "leaveDescription" | "leaveInputLost" | "stay" | "reloadTitle" | "reloadDraftKept" | "reloadInputLost" | "keepEditing" | "hide" | "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/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" | "somethingWrong" | "noComponent" | "nothingYet" | "settings" | "notSaved" | "noPage" | "noTab" | "unknownBlock" | "needsRecord" | "cannotChange" | "cannotDelete" | "doesNotApply" | "noHandler" | "noInputComponent" | "doneOn" | "refusedOn" | "noAction" | "loadMore" | "timelineCut" | "couldNotCount" | "wholeNumber" | "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" | "somethingWrong" | "noComponent" | "nothingYet" | "settings" | "notSaved" | "noPage" | "noTab" | "unknownBlock" | "needsRecord" | "cannotChange" | "cannotDelete" | "doesNotApply" | "noHandler" | "noInputComponent" | "doneOn" | "refusedOn" | "noAction" | "loadMore" | "timelineCut" | "couldNotCount" | "wholeNumber" | "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" | "day" | "hour" | "maximum" | "week" | "range" | "average" | "measure" | "noSamples", values?: Record<string, MessageValue>): string;
|
|
5
|
+
rich(id: "couldNotLoad" | "day" | "hour" | "maximum" | "week" | "range" | "average" | "measure" | "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: "edit" | "
|
|
5
|
-
rich(id: "edit" | "
|
|
4
|
+
(id: "edit" | "fetching" | "saved" | "history" | "comments" | "loading" | "couldNotLoad" | "save" | "cancel" | "couldNotSave" | "delete" | "justNow" | "details" | "nothingYet" | "notSaved" | "keep" | "discard" | "summary" | "changedBySomeoneElse" | "lineNumber" | "noRecord" | "openingElsewhere" | "someoneElse" | "unsavedChanges" | "linesChanged" | "linesReloaded" | "unsavedKept" | "continueEditing" | "unsavedRestored" | "savingSubject" | "subjectSaved" | "recordActions" | "relatedRecords" | "lineField" | "tooManyLines", values?: Record<string, MessageValue>): string;
|
|
5
|
+
rich(id: "edit" | "fetching" | "saved" | "history" | "comments" | "loading" | "couldNotLoad" | "save" | "cancel" | "couldNotSave" | "delete" | "justNow" | "details" | "nothingYet" | "notSaved" | "keep" | "discard" | "summary" | "changedBySomeoneElse" | "lineNumber" | "noRecord" | "openingElsewhere" | "someoneElse" | "unsavedChanges" | "linesChanged" | "linesReloaded" | "unsavedKept" | "continueEditing" | "unsavedRestored" | "savingSubject" | "subjectSaved" | "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) => "always" | (string & {}) | "
|
|
3
|
+
export declare const whenOf: (item: LayoutItemModel) => "always" | (string & {}) | "reading" | "editing" | 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: "couldNotLoad" | "viewAll" | "new" | "
|
|
5
|
-
rich(id: "couldNotLoad" | "viewAll" | "new" | "
|
|
4
|
+
(id: "couldNotLoad" | "viewAll" | "new" | "noneMatch" | "noneYet" | "couldNotLoadYour", values?: Record<string, MessageValue>): string;
|
|
5
|
+
rich(id: "couldNotLoad" | "viewAll" | "new" | "noneMatch" | "noneYet" | "couldNotLoadYour", values: Record<string, MessageValue | import("react").ReactNode>): import("react").ReactNode;
|
|
6
6
|
};
|
|
7
7
|
//#endregion
|
|
@@ -18,8 +18,9 @@ type RecordRowProps = {
|
|
|
18
18
|
};
|
|
19
19
|
/**
|
|
20
20
|
* Records as the cards of their list, in a `SnapRow`: only the cards near the view are drawn, and the records are loaded
|
|
21
|
-
* through the list API in pages as the row scrolls to them. Each card links to its record. Every record
|
|
22
|
-
* an empty one until it is drawn, so the row snaps to
|
|
21
|
+
* through the list API in pages as the row scrolls to them. Each card links to its record. Every record near the view has
|
|
22
|
+
* its place, an empty one until it is drawn, so the row snaps to a card a fast swipe reaches before it is drawn; the
|
|
23
|
+
* records further away stand together in a spacer at each end, so a row of a large list draws a few hundred elements.
|
|
23
24
|
*/
|
|
24
25
|
export declare const RecordRow: ({ model, view, display, source, label, isNew }: RecordRowProps) => import("react").JSX.Element;
|
|
25
26
|
//#endregion
|
|
@@ -4,14 +4,23 @@ import { SnapRow } from "../../primitives/snap-row.js";
|
|
|
4
4
|
import { useSnapScroll } from "../../primitives/use-snap-scroll.js";
|
|
5
5
|
import { usePagedRows } from "../../data-grid/use-paged-rows.js";
|
|
6
6
|
import { RecordCard } from "../displays/record-card.js";
|
|
7
|
-
import { rowWindow } from "./row-window.js";
|
|
7
|
+
import { rowPlaces, rowSpan, rowWindow } from "./row-window.js";
|
|
8
8
|
import { text } from "./messages.js";
|
|
9
|
-
import { jsx } from "react/jsx-runtime";
|
|
9
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
10
|
//#region src/app/record-row/record-row.tsx
|
|
11
|
+
const Spacer = ({ count }) => /* @__PURE__ */ jsx("li", {
|
|
12
|
+
"aria-hidden": true,
|
|
13
|
+
style: {
|
|
14
|
+
width: rowSpan(count),
|
|
15
|
+
minWidth: 0,
|
|
16
|
+
scrollSnapAlign: "none"
|
|
17
|
+
}
|
|
18
|
+
});
|
|
11
19
|
/**
|
|
12
20
|
* Records as the cards of their list, in a `SnapRow`: only the cards near the view are drawn, and the records are loaded
|
|
13
|
-
* through the list API in pages as the row scrolls to them. Each card links to its record. Every record
|
|
14
|
-
* an empty one until it is drawn, so the row snaps to
|
|
21
|
+
* through the list API in pages as the row scrolls to them. Each card links to its record. Every record near the view has
|
|
22
|
+
* its place, an empty one until it is drawn, so the row snaps to a card a fast swipe reaches before it is drawn; the
|
|
23
|
+
* records further away stand together in a spacer at each end, so a row of a large list draws a few hundred elements.
|
|
15
24
|
*/
|
|
16
25
|
const RecordRow = ({ model, view, display, source, label, isNew }) => {
|
|
17
26
|
const { total } = source;
|
|
@@ -21,38 +30,45 @@ const RecordRow = ({ model, view, display, source, label, isNew }) => {
|
|
|
21
30
|
return `${start}-${end}`;
|
|
22
31
|
});
|
|
23
32
|
const { start, end } = shown(scroll.view);
|
|
33
|
+
const places = rowPlaces(start, end, total);
|
|
24
34
|
const getRow = usePagedRows({
|
|
25
35
|
total,
|
|
26
36
|
rowAt: source.rowAt,
|
|
27
37
|
loadRows: source.loadRows,
|
|
38
|
+
cachedRows: source.cachedRows,
|
|
28
39
|
revision: source.revision,
|
|
29
40
|
latencyMs: 0
|
|
30
41
|
}, start, Math.max(start, end - 1));
|
|
31
|
-
return /* @__PURE__ */
|
|
42
|
+
return /* @__PURE__ */ jsxs(SnapRow, {
|
|
32
43
|
scroll,
|
|
33
44
|
label,
|
|
34
|
-
children:
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
"aria-hidden": true,
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
45
|
+
children: [
|
|
46
|
+
places.from > 0 && /* @__PURE__ */ jsx(Spacer, { count: places.from }),
|
|
47
|
+
Array.from({ length: places.to - places.from }, (_, offset) => {
|
|
48
|
+
const index = places.from + offset;
|
|
49
|
+
if (index < start || index >= end) return /* @__PURE__ */ jsx("li", { "aria-hidden": true }, `place-${index}`);
|
|
50
|
+
const loaded = getRow(index);
|
|
51
|
+
if (!loaded) return /* @__PURE__ */ jsx("li", {
|
|
52
|
+
"aria-hidden": true,
|
|
53
|
+
children: /* @__PURE__ */ jsx(Skeleton, { className: "h-full min-h-24 rounded-lg" })
|
|
54
|
+
}, `skeleton-${index}`);
|
|
55
|
+
const row = displayRow(model, loaded);
|
|
56
|
+
return /* @__PURE__ */ jsx("li", {
|
|
57
|
+
"aria-posinset": index + 1,
|
|
58
|
+
"aria-setsize": total,
|
|
59
|
+
className: "grid grid-cols-[minmax(0,1fr)]",
|
|
60
|
+
children: /* @__PURE__ */ jsx(RecordCard, {
|
|
61
|
+
model,
|
|
62
|
+
view,
|
|
63
|
+
display,
|
|
64
|
+
row,
|
|
65
|
+
swipe: false,
|
|
66
|
+
mark: isNew?.(row) ? text("new") : void 0
|
|
67
|
+
})
|
|
68
|
+
}, row.key);
|
|
69
|
+
}),
|
|
70
|
+
places.to < total && /* @__PURE__ */ jsx(Spacer, { count: total - places.to })
|
|
71
|
+
]
|
|
56
72
|
});
|
|
57
73
|
};
|
|
58
74
|
//#endregion
|
|
@@ -8,4 +8,15 @@ export declare const rowWindow: (scrollLeft: number, width: number, total: numbe
|
|
|
8
8
|
start: number;
|
|
9
9
|
end: number;
|
|
10
10
|
};
|
|
11
|
+
/**
|
|
12
|
+
* The cards of a row of `total` that have a place of their own while `start` up to `end` are drawn: those and
|
|
13
|
+
* `placesAround` more on each side. The rest stand together in one spacer at each end (`rowSpan`), so a row of a hundred
|
|
14
|
+
* thousand records draws a few hundred elements, not one for each.
|
|
15
|
+
*/
|
|
16
|
+
export declare const rowPlaces: (start: number, end: number, total: number) => {
|
|
17
|
+
from: number;
|
|
18
|
+
to: number;
|
|
19
|
+
};
|
|
20
|
+
/** The width of `count` cards of a row and the gaps between them, as a `SnapRow` sizes its cards, for a spacer that stands in for them. */
|
|
21
|
+
export declare const rowSpan: (count: number) => string;
|
|
11
22
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../../primitives/snap-row-width.js";
|
|
1
|
+
import { snapRowGap } from "../../primitives/snap-row-width.js";
|
|
2
2
|
//#region src/app/record-row/row-window.ts
|
|
3
3
|
/** The gap after a card of a record row, in pixels. */
|
|
4
4
|
const rowCardGap = 12;
|
|
@@ -18,5 +18,18 @@ const rowWindow = (scrollLeft, width, total) => {
|
|
|
18
18
|
end: Math.min(total, last + overscan)
|
|
19
19
|
};
|
|
20
20
|
};
|
|
21
|
+
/** How many cards beyond the drawn ones keep a place of their own, which a swipe snaps to before it is drawn. */
|
|
22
|
+
const placesAround = 50;
|
|
23
|
+
/**
|
|
24
|
+
* The cards of a row of `total` that have a place of their own while `start` up to `end` are drawn: those and
|
|
25
|
+
* `placesAround` more on each side. The rest stand together in one spacer at each end (`rowSpan`), so a row of a hundred
|
|
26
|
+
* thousand records draws a few hundred elements, not one for each.
|
|
27
|
+
*/
|
|
28
|
+
const rowPlaces = (start, end, total) => ({
|
|
29
|
+
from: Math.max(0, start - placesAround),
|
|
30
|
+
to: Math.min(total, end + placesAround)
|
|
31
|
+
});
|
|
32
|
+
/** The width of `count` cards of a row and the gaps between them, as a `SnapRow` sizes its cards, for a spacer that stands in for them. */
|
|
33
|
+
const rowSpan = (count) => `calc(${count} * (min(256px, 100%) + ${snapRowGap}) - ${snapRowGap})`;
|
|
21
34
|
//#endregion
|
|
22
|
-
export { rowWindow };
|
|
35
|
+
export { rowPlaces, rowSpan, rowWindow };
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* Beside the page's title while the page shows data from the start cache: a small spinner while it refreshes, blank for
|
|
4
4
|
* its first 180 ms, or a warning, in the same spot, once the refresh failed and the cached data stays. One status region
|
|
5
|
-
* says which, so a screen reader hears when the refresh failed.
|
|
5
|
+
* says which, so a screen reader hears when the refresh failed. It is the one thing a refresh shows: the page itself
|
|
6
|
+
* stays as it was drawn (`data-fetching` names it so).
|
|
6
7
|
*/
|
|
7
8
|
export declare const RefreshMark: ({ failed }: {
|
|
8
9
|
failed: boolean;
|
package/dist/app/refresh-mark.js
CHANGED
|
@@ -8,9 +8,11 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
8
8
|
/**
|
|
9
9
|
* Beside the page's title while the page shows data from the start cache: a small spinner while it refreshes, blank for
|
|
10
10
|
* its first 180 ms, or a warning, in the same spot, once the refresh failed and the cached data stays. One status region
|
|
11
|
-
* says which, so a screen reader hears when the refresh failed.
|
|
11
|
+
* says which, so a screen reader hears when the refresh failed. It is the one thing a refresh shows: the page itself
|
|
12
|
+
* stays as it was drawn (`data-fetching` names it so).
|
|
12
13
|
*/
|
|
13
14
|
const RefreshMark = ({ failed }) => /* @__PURE__ */ jsxs("span", {
|
|
15
|
+
"data-fetching": true,
|
|
14
16
|
className: "inline-flex items-center text-muted-foreground",
|
|
15
17
|
children: [/* @__PURE__ */ jsx("span", {
|
|
16
18
|
role: "status",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MessageValue } from "../../locale/messages.js";
|
|
2
2
|
//#region src/app/related-cards/messages.d.ts
|
|
3
3
|
export declare const text: {
|
|
4
|
-
(id: "open" | "
|
|
5
|
-
rich(id: "open" | "
|
|
4
|
+
(id: "open" | "left" | "couldNotLoad" | "add" | "showMore" | "nothingYet" | "showLess", values?: Record<string, MessageValue>): string;
|
|
5
|
+
rich(id: "open" | "left" | "couldNotLoad" | "add" | "showMore" | "nothingYet" | "showLess", values: Record<string, MessageValue | import("react").ReactNode>): import("react").ReactNode;
|
|
6
6
|
};
|
|
7
7
|
//#endregion
|
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
|
+
import { Query } from "@tanstack/react-query";
|
|
2
3
|
//#region src/app/reveal-when-loaded.d.ts
|
|
3
4
|
/** How long a page waits at most for its first data before it shows what it has. */
|
|
4
5
|
export declare const revealWaitMs = 2000;
|
|
6
|
+
/**
|
|
7
|
+
* Whether the page is the one the app starts with from the start cache: the client holds restored answers and has
|
|
8
|
+
* fetched nothing of its own yet. A page opened later waits for its data as before.
|
|
9
|
+
*/
|
|
10
|
+
export declare const startsFromCache: (queries: readonly Pick<Query, "state">[], startedAt: number) => boolean;
|
|
5
11
|
/**
|
|
6
12
|
* Draws a page out of sight until the data it asks for when it opens has come, with a skeleton over it meanwhile, so its
|
|
7
13
|
* parts appear together where they stay instead of each moving the others as it loads. Data asked for in turn, such as
|
|
8
14
|
* a band shown only when a count has come, is waited for too. It shows what it has after `revealWaitMs` at most, and
|
|
9
|
-
* once shown it stays shown: later loads draw in place. Data the page already holds is not waited for,
|
|
10
|
-
* from the start cache
|
|
15
|
+
* once shown it stays shown: later loads draw in place. Data the page already holds is not waited for, and a page the
|
|
16
|
+
* app starts with from the start cache is shown in its first frame, drawn from what the cache holds.
|
|
11
17
|
*/
|
|
12
18
|
export declare const RevealWhenLoaded: ({ children }: {
|
|
13
19
|
children: ReactNode;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { cn } from "../lib/cn.js";
|
|
2
2
|
import { Skeleton } from "../primitives/skeleton.js";
|
|
3
3
|
import { text } from "./messages.js";
|
|
4
|
-
import {
|
|
4
|
+
import { ClientStartContext, isRestored } from "../data/start-cache/restored-state.js";
|
|
5
|
+
import { useContext, useEffect, useState } from "react";
|
|
5
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
7
|
import { useIsFetching, useQueryClient } from "@tanstack/react-query";
|
|
7
8
|
//#region src/app/reveal-when-loaded.tsx
|
|
@@ -12,16 +13,22 @@ const firstLoad = {
|
|
|
12
13
|
predicate: (query) => query.state.data === void 0
|
|
13
14
|
};
|
|
14
15
|
/**
|
|
16
|
+
* Whether the page is the one the app starts with from the start cache: the client holds restored answers and has
|
|
17
|
+
* fetched nothing of its own yet. A page opened later waits for its data as before.
|
|
18
|
+
*/
|
|
19
|
+
const startsFromCache = (queries, startedAt) => queries.some((query) => isRestored(query.state, startedAt)) && !queries.some((query) => query.state.dataUpdatedAt >= startedAt);
|
|
20
|
+
/**
|
|
15
21
|
* Draws a page out of sight until the data it asks for when it opens has come, with a skeleton over it meanwhile, so its
|
|
16
22
|
* parts appear together where they stay instead of each moving the others as it loads. Data asked for in turn, such as
|
|
17
23
|
* a band shown only when a count has come, is waited for too. It shows what it has after `revealWaitMs` at most, and
|
|
18
|
-
* once shown it stays shown: later loads draw in place. Data the page already holds is not waited for,
|
|
19
|
-
* from the start cache
|
|
24
|
+
* once shown it stays shown: later loads draw in place. Data the page already holds is not waited for, and a page the
|
|
25
|
+
* app starts with from the start cache is shown in its first frame, drawn from what the cache holds.
|
|
20
26
|
*/
|
|
21
27
|
const RevealWhenLoaded = ({ children }) => {
|
|
22
28
|
const client = useQueryClient();
|
|
29
|
+
const startedAt = useContext(ClientStartContext);
|
|
23
30
|
const fetching = useIsFetching(firstLoad);
|
|
24
|
-
const [shown, setShown] = useState(
|
|
31
|
+
const [shown, setShown] = useState(() => startsFromCache(client.getQueryCache().getAll(), startedAt));
|
|
25
32
|
useEffect(() => {
|
|
26
33
|
if (shown) return;
|
|
27
34
|
const latest = setTimeout(() => setShown(true), revealWaitMs);
|
|
@@ -57,4 +64,4 @@ const PageSkeleton = () => /* @__PURE__ */ jsxs("div", {
|
|
|
57
64
|
]
|
|
58
65
|
});
|
|
59
66
|
//#endregion
|
|
60
|
-
export { RevealWhenLoaded, revealWaitMs };
|
|
67
|
+
export { RevealWhenLoaded, revealWaitMs, startsFromCache };
|
|
@@ -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: "failed" | "update" | "
|
|
5
|
-
rich(id: "failed" | "update" | "
|
|
4
|
+
(id: "close" | "failed" | "update" | "succeeded" | "immediate" | "weekly" | "scheduled" | "manual" | "job" | "build" | "updatingNow" | "started" | "nextOn" | "unchanged" | "alreadyLatest" | "onlyAdmin" | "couldNotStart" | "runtimeUpdate" | "updating" | "updateNow" | "currentVersion" | "latestVersion" | "checkFailed" | "updateAvailable", values?: Record<string, MessageValue>): string;
|
|
5
|
+
rich(id: "close" | "failed" | "update" | "succeeded" | "immediate" | "weekly" | "scheduled" | "manual" | "job" | "build" | "updatingNow" | "started" | "nextOn" | "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" | "
|
|
5
|
-
rich(id: "couldNotSave" | "
|
|
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
|
|
@@ -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" | "changed" | "removed" | "more" | "viewAll" | "save" | "cancel" | "couldNotSave" | "optional" | "update" | "filters" | "notFound" | "deleteTitle" | "off" | "on" | "noPlural" | "somethingWrong" | "noneMatch" | "firstOf" | "couldNotChange" | "noResource" | "unreadableFilter" | "noneYet" | "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" | "changed" | "removed" | "more" | "viewAll" | "save" | "cancel" | "couldNotSave" | "optional" | "update" | "filters" | "notFound" | "deleteTitle" | "off" | "on" | "noPlural" | "somethingWrong" | "noneMatch" | "firstOf" | "couldNotChange" | "noResource" | "unreadableFilter" | "noneYet" | "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
|
|
@@ -13,7 +13,6 @@ export type SplashHold = {
|
|
|
13
13
|
* effects, so the splash stays up from the auth check through `/meta` to the plugins without a gap.
|
|
14
14
|
*/
|
|
15
15
|
export declare const createSplashHold: (hide: () => void) => SplashHold;
|
|
16
|
-
export declare const SplashHoldContext: import("react").Context<SplashHold | undefined>;
|
|
17
16
|
export declare const SplashHoldProvider: ({ value, children }: {
|
|
18
17
|
value: SplashHold;
|
|
19
18
|
children: ReactNode;
|
package/dist/app/splash-hold.js
CHANGED
|
@@ -1,15 +1,6 @@
|
|
|
1
1
|
//#region src/app/start-screen.d.ts
|
|
2
2
|
/** The id of the start screen index.html draws over the app until it has drawn its first page. */
|
|
3
3
|
export declare const startScreenId = "pb-start";
|
|
4
|
-
/**
|
|
5
|
-
* The empty element on the start screen a host may fill, as it serves index.html, with the markup of the page the app
|
|
6
|
-
* showed last, for example the official app on a switch back to a workspace. It then shows in place of the spinner,
|
|
7
|
-
* inert, until the app has drawn its first page with its first data, so the screen changes once. A plain string
|
|
8
|
-
* replace of exactly this text fills it; with nothing in it the start is as before.
|
|
9
|
-
*/
|
|
10
|
-
export declare const snapshotPlaceholder = "<div id=\"pb-snapshot\"></div>";
|
|
11
|
-
/** Whether the start screen shows a host's snapshot (`snapshotPlaceholder` filled). */
|
|
12
|
-
export declare const startsFromSnapshot: (document: Pick<Document, "getElementById">) => boolean;
|
|
13
4
|
/** The event the app fires at the start screen as it takes it away, which ends index.html's watch for a failed start. */
|
|
14
5
|
export declare const startScreenHandOff = "pb-start-hand-off";
|
|
15
6
|
/**
|
package/dist/app/start-screen.js
CHANGED
|
@@ -1,15 +1,6 @@
|
|
|
1
1
|
//#region src/app/start-screen.ts
|
|
2
2
|
/** The id of the start screen index.html draws over the app until it has drawn its first page. */
|
|
3
3
|
const startScreenId = "pb-start";
|
|
4
|
-
/**
|
|
5
|
-
* The empty element on the start screen a host may fill, as it serves index.html, with the markup of the page the app
|
|
6
|
-
* showed last, for example the official app on a switch back to a workspace. It then shows in place of the spinner,
|
|
7
|
-
* inert, until the app has drawn its first page with its first data, so the screen changes once. A plain string
|
|
8
|
-
* replace of exactly this text fills it; with nothing in it the start is as before.
|
|
9
|
-
*/
|
|
10
|
-
const snapshotPlaceholder = "<div id=\"pb-snapshot\"></div>";
|
|
11
|
-
/** Whether the start screen shows a host's snapshot (`snapshotPlaceholder` filled). */
|
|
12
|
-
const startsFromSnapshot = (document) => (document.getElementById("pb-snapshot")?.childNodes.length ?? 0) > 0;
|
|
13
4
|
/** The event the app fires at the start screen as it takes it away, which ends index.html's watch for a failed start. */
|
|
14
5
|
const startScreenHandOff = "pb-start-hand-off";
|
|
15
6
|
/**
|
|
@@ -24,4 +15,4 @@ const removeStartScreen = (document) => {
|
|
|
24
15
|
start.remove();
|
|
25
16
|
};
|
|
26
17
|
//#endregion
|
|
27
|
-
export { removeStartScreen,
|
|
18
|
+
export { removeStartScreen, startScreenHandOff, startScreenId };
|