viewkitjs 0.20.0 → 0.22.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/CHANGELOG.md +39 -0
- package/MIGRATION.md +2 -1
- package/README.md +1 -1
- package/fields/dist/conventions.d.ts +15 -3
- package/fields/dist/conventions.js +25 -0
- package/fields/dist/design/category-colors.d.ts +12 -5
- package/fields/dist/design/category-colors.js +7 -7
- package/fields/dist/query/buckets.js +42 -35
- package/fields/dist/query/date.js +2 -13
- package/fields/docs/guides/conventions.md +1 -1
- package/fields/docs/guides/options.md +2 -1
- package/fields/docs/reference/design-category-colors.md +2 -2
- package/fields/docs/reference/design-status-slots.md +1 -1
- package/fields/docs/reference/fields.md +1 -1
- package/package.json +19 -1
- package/views/README.md +2 -1
- package/views/dist/atoms/StatusBadge.js +1 -1
- package/views/dist/atoms/tones.js +7 -7
- package/views/dist/atoms/types.d.ts +3 -2
- package/views/dist/contract.d.ts +295 -2
- package/views/dist/contract.js +129 -0
- package/views/dist/controls/button/button.d.ts +40 -0
- package/views/dist/controls/button/button.js +40 -0
- package/views/dist/controls/button/looks.d.ts +4 -0
- package/views/dist/controls/button/looks.js +20 -0
- package/views/dist/controls/button/map-button.d.ts +11 -0
- package/views/dist/controls/button/map-button.js +20 -0
- package/views/dist/controls/button/own-look.d.ts +59 -0
- package/views/dist/controls/button/own-look.js +33 -0
- package/views/dist/controls/button.css +530 -0
- package/views/dist/controls/controls.d.ts +5 -0
- package/views/dist/controls/controls.js +2 -0
- package/views/dist/controls/index.d.ts +11 -0
- package/views/dist/controls/index.js +6 -0
- package/views/dist/controls/smooth.css +101 -0
- package/views/dist/controls/spinner/looks.d.ts +4 -0
- package/views/dist/controls/spinner/looks.js +32 -0
- package/views/dist/controls/spinner/spinner.d.ts +23 -0
- package/views/dist/controls/spinner/spinner.js +16 -0
- package/views/dist/controls/spinner.css +147 -0
- package/views/dist/display/date.js +15 -2
- package/views/dist/display/fit-values.d.ts +3 -2
- package/views/dist/display/link.d.ts +1 -1
- package/views/dist/display/location.js +2 -1
- package/views/dist/display/multi-value.js +1 -1
- package/views/dist/display/name.js +3 -1
- package/views/dist/display/select.js +1 -1
- package/views/dist/display/value-list.d.ts +1 -1
- package/views/dist/grid/chrome/GridStructure.js +2 -1
- package/views/dist/grid/looks.d.ts +45 -0
- package/views/dist/grid/looks.js +74 -0
- package/views/dist/looks/index.d.ts +9 -0
- package/views/dist/looks/index.js +5 -0
- package/views/dist/looks/looks.d.ts +47 -0
- package/views/dist/looks/looks.js +25 -0
- package/views/dist/looks/pieces.d.ts +3 -0
- package/views/dist/looks/pieces.js +4 -0
- package/views/dist/panels/react/views-row/FoldingViewRow.js +8 -8
- package/views/dist/provider/ViewsProvider.d.ts +3 -3
- package/views/dist/provider/ViewsProvider.js +1 -1
- package/views/dist/provider/context.d.ts +1 -1
- package/views/dist/styles.css +1000 -119
- package/views/dist/styles.unlayered.css +1017 -119
- package/views/docs/contract.md +172 -7
- package/views/docs/guides/display.md +11 -7
- package/views/docs/guides/looks.md +29 -0
- package/views/docs/guides/the-provider.md +2 -2
- package/views/docs/index.md +3 -0
- package/views/docs/install.md +7 -5
- package/views/docs/reference/controls.md +36 -0
- package/views/docs/reference/display.md +2 -2
- package/views/docs/reference/looks.md +41 -0
- package/views/docs/reference/react.md +2 -2
- package/views/docs/reference/views.md +5 -2
- package/views/skills/views/SKILL.md +2 -2
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { lookWorn, lookWornOf } from "../looks/looks.js";
|
|
2
|
+
const options = [
|
|
3
|
+
{ id: "header", name: "Header", device: "desktop", def: "words", values: [{ id: "words", name: "Words" }, { id: "quiet", name: "Quiet" }] },
|
|
4
|
+
{ id: "lines", name: "Row lines", def: "on", values: [{ id: "on", name: "On" }, { id: "off", name: "Off" }] },
|
|
5
|
+
{ id: "columns", name: "Column lines", def: "pinned", values: [{ id: "all", name: "All" }, { id: "none", name: "None" }, { id: "pinned", name: "Pinned only" }] },
|
|
6
|
+
{ id: "density", name: "Density", def: "default", values: [{ id: "compact", name: "Compact" }, { id: "default", name: "Default" }, { id: "roomy", name: "Roomy" }] },
|
|
7
|
+
{ id: "phone", name: "Size", device: "phone", def: "attio", values: [{ id: "attio", name: "Attio's" }, { id: "computer", name: "The computer's" }] },
|
|
8
|
+
{ id: "name", name: "Name column", def: "pinned", values: [{ id: "pinned", name: "Pinned" }, { id: "scrolls", name: "Scrolls" }] },
|
|
9
|
+
{ id: "edge", name: "Pinned edge", def: "fade", values: [{ id: "shadow", name: "Shadow" }, { id: "fade", name: "Fade" }, { id: "line", name: "Line" }, { id: "divider", name: "Divider" }, { id: "mask", name: "Fade out" }] },
|
|
10
|
+
{ id: "boxes", name: "Checkboxes", def: "hover", values: [{ id: "hover", name: "On hover" }, { id: "always", name: "Always" }] },
|
|
11
|
+
{ id: "icon", name: "Row icon", def: "on", values: [{ id: "on", name: "On" }, { id: "off", name: "Off" }] },
|
|
12
|
+
{ id: "picked", name: "Picked rows", def: "tint", values: [{ id: "tint", name: "Tint" }, { id: "line", name: "Tint and line" }] },
|
|
13
|
+
{ id: "cell", name: "Picked cell", def: "wash", values: [{ id: "wash", name: "Wash" }, { id: "ring", name: "Ring" }] },
|
|
14
|
+
{ id: "corners", name: "Cell corners", def: "square", values: [{ id: "square", name: "Square" }, { id: "round", name: "Round" }] },
|
|
15
|
+
{ id: "hover", name: "Hover frame", def: "subtle", values: [{ id: "none", name: "None" }, { id: "subtle", name: "Subtle" }, { id: "strong", name: "Strong" }] },
|
|
16
|
+
{ id: "frame", name: "Picked cell frame", def: "brand", values: [{ id: "brand", name: "Brand" }, { id: "neutral", name: "Neutral" }] },
|
|
17
|
+
{ id: "groups", name: "Groups", def: "compact", values: [{ id: "compact", name: "Compact" }, { id: "titles", name: "Own titles" }] },
|
|
18
|
+
{ id: "names", name: "Names", def: "underline", values: [{ id: "underline", name: "Underlined" }, { id: "hover", name: "On hover" }] },
|
|
19
|
+
{ id: "phones", name: "Phones", def: "link", values: [{ id: "link", name: "Link" }, { id: "text", name: "As text" }] },
|
|
20
|
+
{ id: "typed", name: "Phones as typed", def: "dotted", values: [{ id: "none", name: "None" }, { id: "dotted", name: "Dotted line" }, { id: "subtle", name: "Subtle" }, { id: "dot", name: "Dot" }, { id: "tint", name: "Tinted" }] },
|
|
21
|
+
{ id: "figures", name: "Figures", def: "value", values: [{ id: "value", name: "Value first" }, { id: "word", name: "Word first" }] },
|
|
22
|
+
{ id: "width", name: "Width", def: "own", values: [{ id: "own", name: "The columns' own" }, { id: "fill", name: "Fill" }] },
|
|
23
|
+
{ id: "more", name: "More rows", def: "scroll", values: [{ id: "scroll", name: "As you scroll" }, { id: "pages", name: "In pages" }] },
|
|
24
|
+
{ id: "wait", name: "Rows changing", def: "kept", values: [{ id: "kept", name: "Kept" }, { id: "cleared", name: "Cleared" }] },
|
|
25
|
+
{ id: "foot", name: "Footer", device: "phone", def: "pinned", values: [{ id: "pinned", name: "At the foot" }, { id: "rows", name: "After the rows" }] },
|
|
26
|
+
{ id: "add", name: "Add column", device: "phone", def: "name", values: [{ id: "name", name: "In the name's header" }, { id: "end", name: "At the end" }] },
|
|
27
|
+
{ id: "picking", name: "Picking rows", device: "phone", def: "press", values: [{ id: "press", name: "Long press" }, { id: "rail", name: "In the rail" }] },
|
|
28
|
+
];
|
|
29
|
+
const defs = Object.fromEntries(options.map((o) => [o.id, o.def]));
|
|
30
|
+
export const GRID_LOOKS = {
|
|
31
|
+
id: "grid",
|
|
32
|
+
name: "Grid",
|
|
33
|
+
options,
|
|
34
|
+
looks: [
|
|
35
|
+
{ id: "attio", name: "Attio", picks: { ...defs } },
|
|
36
|
+
{
|
|
37
|
+
id: "portal",
|
|
38
|
+
name: "The portal's",
|
|
39
|
+
picks: {
|
|
40
|
+
header: "quiet", lines: "on", columns: "all", density: "default", phone: "computer", name: "pinned", edge: "shadow",
|
|
41
|
+
boxes: "hover", icon: "off", picked: "line", cell: "ring", corners: "square", hover: "strong", frame: "brand",
|
|
42
|
+
groups: "titles", names: "hover", phones: "text", typed: "subtle", figures: "word", width: "own", more: "scroll",
|
|
43
|
+
wait: "kept", foot: "rows", add: "end", picking: "rail",
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
],
|
|
47
|
+
};
|
|
48
|
+
export const GRID_LOOK_READ = [
|
|
49
|
+
"columns", "density", "phone", "name", "boxes", "icon", "groups", "figures", "width", "more", "wait", "foot", "add", "picking",
|
|
50
|
+
];
|
|
51
|
+
export function gridLookWorn(picks) {
|
|
52
|
+
return lookWorn(GRID_LOOKS, picks, GRID_LOOK_READ);
|
|
53
|
+
}
|
|
54
|
+
export function gridLookWornOf(el) {
|
|
55
|
+
return lookWornOf(GRID_LOOKS, el, GRID_LOOK_READ);
|
|
56
|
+
}
|
|
57
|
+
const SCALE = { compact: 0.85, default: 1, roomy: 1.15 };
|
|
58
|
+
const PHONE = 1.25;
|
|
59
|
+
export function gridLookProps(worn, phone) {
|
|
60
|
+
return {
|
|
61
|
+
verticalBorders: worn.columns === "all",
|
|
62
|
+
headerVerticalBorders: worn.columns === "all",
|
|
63
|
+
scale: SCALE[worn.density] * (phone && worn.phone === "attio" ? PHONE : 1),
|
|
64
|
+
freezeIdentity: worn.name === "pinned",
|
|
65
|
+
alwaysCheckboxes: worn.boxes === "always",
|
|
66
|
+
showRowIcon: worn.icon === "on",
|
|
67
|
+
oneHeader: worn.groups === "compact",
|
|
68
|
+
groupMenu: worn.groups === "compact" ? ["select", "sort"] : ["sort"],
|
|
69
|
+
fillWidth: worn.width === "fill",
|
|
70
|
+
pinFooter: phone && worn.foot === "pinned",
|
|
71
|
+
addColumnAt: phone && worn.add === "name" ? "title" : "end",
|
|
72
|
+
phonePicking: phone && worn.picking === "press",
|
|
73
|
+
};
|
|
74
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A PIECE'S LOOKS. Each piece's options and looks, declared beside the piece, and the helpers that wear one:
|
|
3
|
+
* the frame's `data-<piece>-<option>` attributes and the values read back from them. No React.
|
|
4
|
+
*/
|
|
5
|
+
export { lookAttrs, lookPicks, lookWorn, lookWornOf, type Look, type LookDevice, type LookOption, type LookPicks, type LookValue, type PieceLooks, } from "./looks.js";
|
|
6
|
+
export { LOOKS } from "./pieces.js";
|
|
7
|
+
export { GRID_LOOKS, GRID_LOOK_READ, gridLookProps, gridLookWorn, gridLookWornOf, type GridLookOptionId, type GridLookProps, type GridLookWorn, } from "../grid/looks.js";
|
|
8
|
+
export { BUTTON_LOOKS, type ButtonLookOptionId } from "../controls/button/looks.js";
|
|
9
|
+
export { SPINNER_LOOKS, type SpinnerLookOptionId } from "../controls/spinner/looks.js";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { lookAttrs, lookPicks, lookWorn, lookWornOf, } from "./looks.js";
|
|
2
|
+
export { LOOKS } from "./pieces.js";
|
|
3
|
+
export { GRID_LOOKS, GRID_LOOK_READ, gridLookProps, gridLookWorn, gridLookWornOf, } from "../grid/looks.js";
|
|
4
|
+
export { BUTTON_LOOKS } from "../controls/button/looks.js";
|
|
5
|
+
export { SPINNER_LOOKS } from "../controls/spinner/looks.js";
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/** The device an option or a look is for, when it is for one: nothing means both. */
|
|
2
|
+
export type LookDevice = "phone" | "desktop";
|
|
3
|
+
/** One value an option can hold. */
|
|
4
|
+
export type LookValue = {
|
|
5
|
+
readonly id: string;
|
|
6
|
+
readonly name: string;
|
|
7
|
+
};
|
|
8
|
+
/** One option of a piece: its id is public, as are its values' ids. */
|
|
9
|
+
export type LookOption<Id extends string = string> = {
|
|
10
|
+
readonly id: Id;
|
|
11
|
+
readonly name: string;
|
|
12
|
+
/** The value worn when nothing is picked, or when the pick is a value the option doesn't have. */
|
|
13
|
+
readonly def: string;
|
|
14
|
+
readonly device?: LookDevice;
|
|
15
|
+
/** How a picker draws it: "steps" for an ordered scale, "list" for a long list. Nothing means chips. */
|
|
16
|
+
readonly kind?: "steps" | "list";
|
|
17
|
+
/** Means nothing while that option holds that value, or one of several. */
|
|
18
|
+
readonly unless?: readonly [Id, string | readonly string[]];
|
|
19
|
+
/** false: the option changes nothing a whole list draws, so a list-wide picker may leave it out. */
|
|
20
|
+
readonly demo?: false;
|
|
21
|
+
readonly values: readonly LookValue[];
|
|
22
|
+
};
|
|
23
|
+
/** A named set of picks, one value for every option. */
|
|
24
|
+
export type Look<Id extends string = string> = {
|
|
25
|
+
readonly id: string;
|
|
26
|
+
readonly name: string;
|
|
27
|
+
readonly device?: LookDevice;
|
|
28
|
+
readonly picks: Readonly<Record<Id, string>>;
|
|
29
|
+
};
|
|
30
|
+
/** A piece's options and looks. Nothing picked wears each option's default (`def`), My preset's pick, which no look need
|
|
31
|
+
* match whole. */
|
|
32
|
+
export type PieceLooks<Id extends string = string> = {
|
|
33
|
+
readonly id: string;
|
|
34
|
+
readonly name: string;
|
|
35
|
+
readonly options: readonly LookOption<Id>[];
|
|
36
|
+
readonly looks: readonly Look<Id>[];
|
|
37
|
+
};
|
|
38
|
+
/** Some options' picks, by option id. */
|
|
39
|
+
export type LookPicks<Id extends string = string> = Partial<Record<Id, string>>;
|
|
40
|
+
/** `data-<piece>-<option>` for every option: the pick when the option has that value, else its default. */
|
|
41
|
+
export declare function lookAttrs<Id extends string>(piece: PieceLooks<Id>, picks?: LookPicks<Id>): Record<string, string>;
|
|
42
|
+
/** A look's picks by its id; undefined for an id the piece has no look by. */
|
|
43
|
+
export declare function lookPicks<Id extends string>(piece: PieceLooks<Id>, look: string): LookPicks<Id> | undefined;
|
|
44
|
+
/** The named options' values from picks, each the option's default when missing or unknown. */
|
|
45
|
+
export declare function lookWorn<Id extends string, K extends Id>(piece: PieceLooks<Id>, picks: LookPicks<Id> | undefined, ids: readonly K[]): Record<K, string>;
|
|
46
|
+
/** The same, read from the closest frame round `el` carrying each `data-<piece>-<option>`; outside any frame, the defaults. */
|
|
47
|
+
export declare function lookWornOf<Id extends string, K extends Id>(piece: PieceLooks<Id>, el: Element | null, ids: readonly K[]): Record<K, string>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
function valueOf(option, pick) {
|
|
2
|
+
return pick != null && option.values.some((v) => v.id === pick) ? pick : option.def;
|
|
3
|
+
}
|
|
4
|
+
function optionOf(piece, id) {
|
|
5
|
+
const option = piece.options.find((o) => o.id === id);
|
|
6
|
+
if (!option)
|
|
7
|
+
throw new Error(`${piece.id} has no option ${id}`);
|
|
8
|
+
return option;
|
|
9
|
+
}
|
|
10
|
+
export function lookAttrs(piece, picks = {}) {
|
|
11
|
+
return Object.fromEntries(piece.options.map((o) => [`data-${piece.id}-${o.id}`, valueOf(o, picks[o.id])]));
|
|
12
|
+
}
|
|
13
|
+
export function lookPicks(piece, look) {
|
|
14
|
+
const found = piece.looks.find((l) => l.id === look);
|
|
15
|
+
return found ? { ...found.picks } : undefined;
|
|
16
|
+
}
|
|
17
|
+
export function lookWorn(piece, picks, ids) {
|
|
18
|
+
return Object.fromEntries(ids.map((id) => [id, valueOf(optionOf(piece, id), picks?.[id])]));
|
|
19
|
+
}
|
|
20
|
+
export function lookWornOf(piece, el, ids) {
|
|
21
|
+
return Object.fromEntries(ids.map((id) => {
|
|
22
|
+
const attr = `data-${piece.id}-${id}`;
|
|
23
|
+
return [id, valueOf(optionOf(piece, id), el?.closest(`[${attr}]`)?.getAttribute(attr))];
|
|
24
|
+
}));
|
|
25
|
+
}
|
|
@@ -89,14 +89,14 @@ export function FoldingViewRow({ axis, folded: told }) {
|
|
|
89
89
|
const ordered = pills.filter(inBlock).map((pill) => (visibleValues.has(pill.value) ? dealt.shift() : pill.value));
|
|
90
90
|
axis.onReorder(ordered);
|
|
91
91
|
};
|
|
92
|
-
return (_jsxs("div", { ref: hostRef, "data-slot": "vk-views-row", className: isTold ? "relative flex flex-none items-center gap-0.5" : "relative flex min-w-0 flex-1 items-center gap-0.5", children: [_jsx(PillGroup, { value: axis.value, options: shown, onChange: axis.onChange, variant: "plain", onReorder: axis.onReorder ? onPillReorder : undefined, canDrag: axis.canDrag }), folded.length > 0 && _jsx(FoldedViews, { axis: axis, options: foldedOptions }), axis.onCreate && _jsx(ViewCreatePill, { label: axis.createLabel, onClick: axis.onCreate }), !isTold && (
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
92
|
+
return (_jsxs("div", { ref: hostRef, "data-slot": "vk-views-row", className: isTold ? "relative flex flex-none items-center gap-0.5" : "relative flex min-w-0 flex-1 items-center gap-0.5", children: [_jsx(PillGroup, { value: axis.value, options: shown, onChange: axis.onChange, variant: "plain", onReorder: axis.onReorder ? onPillReorder : undefined, canDrag: axis.canDrag }), folded.length > 0 && _jsx(FoldedViews, { axis: axis, options: foldedOptions }), axis.onCreate && _jsx(ViewCreatePill, { label: axis.createLabel, onClick: axis.onCreate }), !isTold && (_jsx("div", { "aria-hidden": true, inert: true, className: "pointer-events-none absolute inset-0 overflow-hidden", style: { visibility: "hidden" }, children: _jsxs("div", { ref: measureRef, "data-slot": "vk-views-row", className: "pointer-events-none absolute left-0 top-0 flex items-center gap-0.5 whitespace-nowrap", children: [_jsx("div", { "data-measure-pills": true, className: "contents", children: _jsx(PillGroup, { value: axis.value, options: pills, onChange: () => { }, variant: "plain" }) }), inFrame ? (_jsx("span", { "data-measure-more": true, className: "inline-flex", children: _jsx(MoreButton, { count: 99 }) })) : views.panelButtons === "button" ? (_jsx("span", { "data-measure-more": true, className: "inline-flex", children: drawPanelButton(views, {
|
|
93
|
+
own: MORE_CHIP_CLASS,
|
|
94
|
+
frame: MORE_CHIP_FRAME,
|
|
95
|
+
variant: "ghost",
|
|
96
|
+
size: "sm",
|
|
97
|
+
"data-slot": "vk-views-more",
|
|
98
|
+
children: _jsx(MoreChipInner, { count: 99 }),
|
|
99
|
+
}) })) : (_jsx("span", { "data-measure-more": true, "data-slot": "vk-views-more", className: MORE_CHIP_CLASS, children: _jsx(MoreChipInner, { count: 99 }) })), axis.onCreate && (_jsx("span", { "data-measure-ghost": true, children: _jsx(ViewCreatePill, { label: axis.createLabel, onClick: () => { } }) }))] }) }))] }));
|
|
100
100
|
}
|
|
101
101
|
const MORE_CHIP_CLASS = "inline-flex h-8 shrink-0 items-center gap-0.5 whitespace-nowrap rounded-full px-2.5 text-sm font-medium text-(color:--vk-fg-subtle) transition-colors duration-(--vk-duration,150ms) hover:bg-(color:--vk-hovered) hover:text-(color:--vk-fg) data-[state=open]:bg-(color:--vk-pressed) data-[state=open]:text-(color:--vk-fg)";
|
|
102
102
|
const MORE_CHIP_FRAME = "h-8 shrink-0 gap-0.5 whitespace-nowrap px-2.5";
|
|
@@ -55,9 +55,9 @@ export type ViewsProviderProps = {
|
|
|
55
55
|
* `aria-expanded`, `data-slot` and `data-open` to forward to its element. */
|
|
56
56
|
gridButtons?: ViewsGridButtons;
|
|
57
57
|
/** How a cell of several values draws on one line: a multiselect's options, several emails, phones, links or
|
|
58
|
-
* domains, several records, a lookup's names or places. `
|
|
59
|
-
* width,
|
|
60
|
-
* first
|
|
58
|
+
* domains, several records, a lookup's names or places. `fit` (the default): as many whole values as fit its
|
|
59
|
+
* width, then a count, following a column resize; the first shows cut when even it doesn't fit. `first`: its
|
|
60
|
+
* first value and a count, at any width, as on 0.5.0. A wrapped row shows three either way. */
|
|
61
61
|
severalValues?: ViewsSeveralValues;
|
|
62
62
|
/** Who draws a yes/no cell's box in the grid (the checkbox style). `own` (the default): ViewKit's tick box in its
|
|
63
63
|
* own button, as on 0.5.0. `checkbox`: your `Checkbox`, the box your rail draws, handed `checked`, the column's
|
|
@@ -12,7 +12,7 @@ import { browserConfirm } from "./ports.js";
|
|
|
12
12
|
export { useViews } from "./context.js";
|
|
13
13
|
const MISSING_COMMAND_PARTS = missingParts("Command");
|
|
14
14
|
const MISSING_CALENDAR_COMPONENT = missingComponent("Calendar");
|
|
15
|
-
export function ViewsProvider({ children, components, conventions, icons, ports, atoms, messages = resolveViewsMessage, presentation, desktopQuery = DEFAULT_DESKTOP_QUERY, sheetActions = "bar", escape, oneValue, sayRefusals = false, menus = "popover", gridButtons = "own", severalValues = "
|
|
15
|
+
export function ViewsProvider({ children, components, conventions, icons, ports, atoms, messages = resolveViewsMessage, presentation, desktopQuery = DEFAULT_DESKTOP_QUERY, sheetActions = "bar", escape, oneValue, sayRefusals = false, menus = "popover", gridButtons = "own", severalValues = "fit", gridCheckboxes = "own", fieldRowButtons = "own", fieldRowCheckboxes = "own", panelButtons = "own", bodyFrame = "views", gridBodyPlace = "under", selectionBar, datePicks, }) {
|
|
16
16
|
const merged = useMemo(() => ({ ...DEFAULT_VIEWS_ATOMS, ...atoms }), [atoms]);
|
|
17
17
|
const settled = useMemo(() => ({
|
|
18
18
|
...components,
|
|
@@ -34,7 +34,7 @@ export type ViewsContextValue = {
|
|
|
34
34
|
menus?: ViewsMenuRoute;
|
|
35
35
|
/** Who draws the buttons the grid draws itself (`ViewsProvider`'s `gridButtons`). Absent means `own`. */
|
|
36
36
|
gridButtons?: ViewsGridButtons;
|
|
37
|
-
/** How a cell of several values draws on one line (`ViewsProvider`'s `severalValues`). Absent means `
|
|
37
|
+
/** How a cell of several values draws on one line (`ViewsProvider`'s `severalValues`). Absent means `fit`. */
|
|
38
38
|
severalValues?: ViewsSeveralValues;
|
|
39
39
|
/** Who draws a yes/no cell's box in the grid (`ViewsProvider`'s `gridCheckboxes`). Absent means `own`. */
|
|
40
40
|
gridCheckboxes?: ViewsGridCheckboxes;
|