@protobase/ui 0.13.3 → 0.14.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/app/current-address.js +1 -1
- package/dist/app/custom-section.js +1 -1
- package/dist/app/displays/custom-display.js +1 -1
- package/dist/app/displays/list-displays.js +1 -1
- package/dist/app/error-reporting.js +1 -1
- package/dist/app/list-page.js +2 -1
- package/dist/app/nav-recent.js +2 -1
- package/dist/app/pages/blocks/link.js +2 -1
- package/dist/app/pages/render-node.js +1 -1
- package/dist/app/pages/use-layout-data.js +1 -1
- package/dist/app/pages/use-run-action.js +1 -1
- package/dist/app/search/search-model.js +2 -1
- package/dist/app/use-lines-draft.js +1 -1
- package/dist/assistant-dock/use-assistant.js +1 -1
- package/dist/data/use-record.js +1 -1
- package/dist/data/use-update-record.js +1 -1
- package/dist/package.js +1 -1
- package/dist/plugins/load-plugin.d.ts +1 -1
- package/dist/plugins/load-plugin.js +1 -1
- package/dist/shell/assets/{app-CfuMqqAY.js → app-DtPlcCA3.js} +8 -8
- package/dist/shell/assets/{index-DCTyUhH-.js → index-CwUFCDf9.js} +1 -1
- package/dist/shell/assets/{maplibre-gl-DP9hPAtI.js → maplibre-gl-QGc1hPKt.js} +1 -1
- package/dist/shell/assets/{record-map-Dgn4pFlE.js → record-map-D5vqYcYw.js} +2 -2
- package/dist/shell/assets/{records-map-3O6u05bx.js → records-map-DqqaK1rm.js} +1 -1
- package/dist/shell/assets/{shared-protobase-ui-C84DU2o6.js → shared-protobase-ui-0ozDlcDr.js} +1 -1
- package/dist/shell/index.html +3 -3
- package/dist/shell/protobase.shell.json +1 -1
- package/package.json +4 -4
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defaultDisplay } from "./displays/list-displays.js";
|
|
2
2
|
import { defaultOrderBy } from "./list-order.js";
|
|
3
|
-
import { encodeKey } from "@protobase/schema";
|
|
3
|
+
import { encodeKey } from "@protobase/schema/internal";
|
|
4
4
|
//#region src/app/current-address.ts
|
|
5
5
|
/** What a list shows when its address names nothing: its default display for the screen, the list's sort, the filters in a bar. */
|
|
6
6
|
const listDefaults = (model, view, xs = false) => ({
|
|
@@ -5,7 +5,7 @@ import { Section } from "../record-view/section.js";
|
|
|
5
5
|
import { SidebarCard } from "../record-view/record-sidebar.js";
|
|
6
6
|
import { RecordScope } from "./pages/record-scope.js";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
-
import { unmarkFieldRefs } from "@protobase/schema";
|
|
8
|
+
import { unmarkFieldRefs } from "@protobase/schema/internal";
|
|
9
9
|
//#region src/app/custom-section.tsx
|
|
10
10
|
/**
|
|
11
11
|
* A component of the record layout (`l.custom`), drawn with the record around it, so `useLayoutRecord()` gives it, in a
|
|
@@ -3,7 +3,7 @@ import { Problem } from "../pages/problem.js";
|
|
|
3
3
|
import { CustomBoundary } from "../pages/custom-boundary.js";
|
|
4
4
|
import { ListDisplayProvider } from "./display-context.js";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
-
import { unmarkFieldRefs } from "@protobase/schema";
|
|
6
|
+
import { unmarkFieldRefs } from "@protobase/schema/internal";
|
|
7
7
|
//#region src/app/displays/custom-display.tsx
|
|
8
8
|
/**
|
|
9
9
|
* A display the project draws: the component registered under its name gets the display's props, field references
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { recordKey, recordTitleField } from "../../live/model-helpers.js";
|
|
2
2
|
import { humanize } from "../../live/naming.js";
|
|
3
3
|
import { displayValue } from "../../live/display-value.js";
|
|
4
|
-
import { encodeKey, tableDisplay } from "@protobase/schema";
|
|
4
|
+
import { encodeKey, tableDisplay } from "@protobase/schema/internal";
|
|
5
5
|
//#region src/app/displays/list-displays.ts
|
|
6
6
|
const displaysOf = (view) => view?.list?.displays ?? [];
|
|
7
7
|
/**
|
package/dist/app/list-page.js
CHANGED
|
@@ -38,7 +38,8 @@ import { withFieldTypeCells } from "./field-types/field-type-cells.js";
|
|
|
38
38
|
import { useMemo, useState } from "react";
|
|
39
39
|
import { Plus, SlidersHorizontal } from "lucide-react";
|
|
40
40
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
41
|
-
import {
|
|
41
|
+
import { tableDisplay } from "@protobase/schema/internal";
|
|
42
|
+
import { createWhere } from "@protobase/schema";
|
|
42
43
|
//#region src/app/list-page.tsx
|
|
43
44
|
const where = createWhere();
|
|
44
45
|
const searchText = (extras) => extras.find((clause) => clause.kind === "search");
|
package/dist/app/nav-recent.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { recordKey, recordTitle, recordTitleField } from "../live/model-helpers.js";
|
|
2
2
|
import { defaultOrderBy } from "./list-order.js";
|
|
3
|
-
import {
|
|
3
|
+
import { defaultRecentLimit, encodeKey } from "@protobase/schema/internal";
|
|
4
|
+
import { appPath, enumLabel } from "@protobase/schema";
|
|
4
5
|
//#region src/app/nav-recent.ts
|
|
5
6
|
/** The list request behind a sidebar group: its filter, order (the list's sort when unset), size, and only the fields it shows. */
|
|
6
7
|
const recentRequest = (model, view, recent) => ({
|
|
@@ -2,7 +2,8 @@ import { AppLink } from "../../use-app-address.js";
|
|
|
2
2
|
import { useLayoutRecord } from "../record-scope.js";
|
|
3
3
|
import { propsOf } from "./block-props.js";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
|
-
import {
|
|
5
|
+
import { fillAddress } from "@protobase/schema/internal";
|
|
6
|
+
import { appPath } from "@protobase/schema";
|
|
6
7
|
//#region src/app/pages/blocks/link.tsx
|
|
7
8
|
const style = "font-medium text-primary-text hover:underline";
|
|
8
9
|
/**
|
|
@@ -16,7 +16,7 @@ import { StatBlock } from "./blocks/stat.js";
|
|
|
16
16
|
import { TableBlock } from "./blocks/table.js";
|
|
17
17
|
import { Fragment } from "react";
|
|
18
18
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
19
|
-
import { unmarkFieldRefs } from "@protobase/schema";
|
|
19
|
+
import { unmarkFieldRefs } from "@protobase/schema/internal";
|
|
20
20
|
import { isLayoutNode } from "@protobase/layout";
|
|
21
21
|
//#region src/app/pages/render-node.tsx
|
|
22
22
|
const blocks = {
|
|
@@ -3,7 +3,7 @@ import { useClient } from "../../data/api-provider.js";
|
|
|
3
3
|
import { recordKey } from "../../live/model-helpers.js";
|
|
4
4
|
import { useCallback } from "react";
|
|
5
5
|
import { keepPreviousData, useQuery, useQueryClient } from "@tanstack/react-query";
|
|
6
|
-
import { encodeKey } from "@protobase/schema";
|
|
6
|
+
import { encodeKey } from "@protobase/schema/internal";
|
|
7
7
|
//#region src/app/pages/use-layout-data.ts
|
|
8
8
|
/** A list item as a record scope: the key as the URL carries it, and the etag and permissions the item carries. */
|
|
9
9
|
const scopeOf = (model, row) => ({
|
|
@@ -7,7 +7,7 @@ import { can } from "../permissions.js";
|
|
|
7
7
|
import { fillHref } from "./action-href.js";
|
|
8
8
|
import { useRefreshResource } from "./use-layout-data.js";
|
|
9
9
|
import { useState } from "react";
|
|
10
|
-
import { fillAddress } from "@protobase/schema";
|
|
10
|
+
import { fillAddress } from "@protobase/schema/internal";
|
|
11
11
|
//#region src/app/pages/use-run-action.ts
|
|
12
12
|
const message = (error) => error instanceof Error ? error.message : "Something went wrong";
|
|
13
13
|
/**
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { recordKey, recordTitleField } from "../../live/model-helpers.js";
|
|
2
2
|
import { humanize } from "../../live/naming.js";
|
|
3
|
-
import {
|
|
3
|
+
import { encodeKey, matchedSearchField } from "@protobase/schema/internal";
|
|
4
|
+
import { appPath, createWhere, enumLabel, printFilter } from "@protobase/schema";
|
|
4
5
|
//#region src/app/search/search-model.ts
|
|
5
6
|
const where = createWhere();
|
|
6
7
|
const searchTargets = (meta) => Object.values(meta.resources).flatMap((model) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { recordKey } from "../live/model-helpers.js";
|
|
2
2
|
import { useCallback, useMemo, useState } from "react";
|
|
3
|
-
import { encodeKey } from "@protobase/schema";
|
|
3
|
+
import { encodeKey } from "@protobase/schema/internal";
|
|
4
4
|
//#region src/app/use-lines-draft.ts
|
|
5
5
|
/**
|
|
6
6
|
* The order the person has given the lines of a record, kept in the form until Save writes it, together with the
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useEffect, useState } from "react";
|
|
2
|
-
import { applyAssistantEvent, emptyAssistantState } from "@protobase/schema";
|
|
2
|
+
import { applyAssistantEvent, emptyAssistantState } from "@protobase/schema/internal";
|
|
3
3
|
//#region src/assistant-dock/use-assistant.ts
|
|
4
4
|
const messageOf = (error) => error instanceof Error ? error.message : "The assistant did not answer";
|
|
5
5
|
/** Follows an assistant backend's event stream into state, with its two requests; `undefined` client means not yet. */
|
package/dist/data/use-record.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { keys } from "./query-keys.js";
|
|
2
2
|
import { useClient } from "./api-provider.js";
|
|
3
3
|
import { useQuery } from "@tanstack/react-query";
|
|
4
|
-
import { encodeKey } from "@protobase/schema";
|
|
4
|
+
import { encodeKey } from "@protobase/schema/internal";
|
|
5
5
|
//#region src/data/use-record.ts
|
|
6
6
|
const useRecord = (resource, key, enabled = true) => {
|
|
7
7
|
const client = useClient();
|
|
@@ -2,7 +2,7 @@ import { keys } from "./query-keys.js";
|
|
|
2
2
|
import { useClient } from "./api-provider.js";
|
|
3
3
|
import { PreconditionFailedError } from "@protobase/client";
|
|
4
4
|
import { useMutation, useQueryClient } from "@tanstack/react-query";
|
|
5
|
-
import { encodeKey } from "@protobase/schema";
|
|
5
|
+
import { encodeKey } from "@protobase/schema/internal";
|
|
6
6
|
//#region src/data/use-update-record.ts
|
|
7
7
|
/**
|
|
8
8
|
* PATCH with `If-Match`. On success the cached record gets the new ETag and lists refetch;
|
package/dist/package.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../app/pages/project-ui.js";
|
|
2
2
|
import { PluginRef } from "@protobase/client";
|
|
3
|
-
import "@protobase/schema";
|
|
3
|
+
import "@protobase/schema/internal";
|
|
4
4
|
//#region src/plugins/load-plugin.d.ts
|
|
5
5
|
/** What loading a plugin needs from the page: reading its plugin.json, adding its stylesheet and importing its module. */
|
|
6
6
|
export type PluginLoader = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { parseManifest } from "./plugin-manifest.js";
|
|
2
2
|
import { pluginUi } from "./plugin-ui.js";
|
|
3
3
|
import { pluginApi, protobaseVersion } from "./plugin-api.js";
|
|
4
|
-
import { pluginProblem } from "@protobase/schema";
|
|
4
|
+
import { pluginProblem } from "@protobase/schema/internal";
|
|
5
5
|
//#region src/plugins/load-plugin.ts
|
|
6
6
|
/** The page's own: `fetch` without a cached copy, a `<link>` per stylesheet, and `import()`. */
|
|
7
7
|
const browserLoader = {
|