@protobase/schema 0.21.8 → 0.21.10

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/model.d.ts CHANGED
@@ -232,10 +232,11 @@ export type AppAddress = {
232
232
  page: string;
233
233
  };
234
234
  /**
235
- * How a value is shown: `badge` as a coloured badge, `code` in monospace, `percent` with a % sign. `relative`,
235
+ * How a value is shown: `badge` as a coloured badge, `code` in monospace, `percent` with a % sign; a text field's
236
+ * `email`, `phone` and `url` as a link that writes, calls or opens it, edited with the keyboard for it. `relative`,
236
237
  * `absolute` and `compact` are carried in `/meta` for apps that render their own lists.
237
238
  */
238
- export type FieldFormat = 'relative' | 'absolute' | 'compact' | 'percent' | 'badge' | 'code';
239
+ export type FieldFormat = 'relative' | 'absolute' | 'compact' | 'percent' | 'badge' | 'code' | 'email' | 'phone' | 'url';
239
240
  /** A view's hints for one field (`.fields((r) => ...)`); see [Names and columns](website/src/content/docs/reference/ui-config.mdx#names-and-columns). */
240
241
  export type FieldViewModel = {
241
242
  /** What the field is called, instead of its name in words. */
@@ -26,7 +26,10 @@ export declare class FieldView<N extends string = string, V = unknown> {
26
26
  * view and locked form; `always` when omitted. Its lists, cards and filters show it either way.
27
27
  */
28
28
  when(when: ShowWhen): FieldView<N, V>;
29
- /** How the value shows: `badge` for statuses, `code` in monospace, `percent` with a % sign. */
29
+ /**
30
+ * How the value shows: `badge` for statuses, `code` in monospace, `percent` with a % sign; for a text field, `email`,
31
+ * `phone` and `url` as a mail, call or open link, edited with an email, phone or address keyboard on a mobile screen.
32
+ */
30
33
  format(format: FieldFormat): FieldView<N, V>;
31
34
  /**
32
35
  * A text of several lines, such as a description: forms edit it in a box that grows with the text, and the record
@@ -30,7 +30,10 @@ var FieldView = class FieldView {
30
30
  when(when) {
31
31
  return this.with({ when });
32
32
  }
33
- /** How the value shows: `badge` for statuses, `code` in monospace, `percent` with a % sign. */
33
+ /**
34
+ * How the value shows: `badge` for statuses, `code` in monospace, `percent` with a % sign; for a text field, `email`,
35
+ * `phone` and `url` as a mail, call or open link, edited with an email, phone or address keyboard on a mobile screen.
36
+ */
34
37
  format(format) {
35
38
  return this.with({ format });
36
39
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@protobase/schema",
3
- "version": "0.21.8",
3
+ "version": "0.21.10",
4
4
  "description": "Resource, field, view and access definitions for Protobase configs.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {