datocms-react-ui 3.1.0-next.6 → 4.0.0-next.7
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/README.md +2 -1
- package/dist/DateInput.d.ts +2 -0
- package/dist/DateInput.js +2 -0
- package/dist/DateTimeInput.d.ts +2 -0
- package/dist/DateTimeInput.js +2 -0
- package/dist/DateTimeRangeInput.d.ts +2 -0
- package/dist/DateTimeRangeInput.js +2 -0
- package/dist/FilterBuilder.d.ts +2 -0
- package/dist/FilterBuilder.js +2 -0
- package/dist/RecordRow.d.ts +2 -0
- package/dist/RecordRow.js +2 -0
- package/dist/UploadCard.js +2 -2
- package/dist/UploadPreview.d.ts +2 -2
- package/dist/UploadPreview.js +1 -1
- package/dist/UserRow.d.ts +2 -0
- package/dist/UserRow.js +2 -0
- package/dist/react-ui/src/Canvas.d.ts +7 -1
- package/dist/react-ui/src/Canvas.js +26 -4
- package/dist/react-ui/src/ctxAnswer.js +21 -0
- package/dist/react-ui/src/ctxDateSettings.js +7 -5
- package/dist/react-ui/src/ctxRecordPresentation.js +34 -0
- package/dist/react-ui/src/ctxUploads.js +23 -0
- package/dist/styles.css +592 -11
- package/dist/ui-public/icons/index.js +79 -81
- package/dist/ui-public/locales/en.js +43 -5
- package/dist/ui-public/src/Message.d.ts +3 -4
- package/dist/ui-public/src/UiTextKey.d.ts +1 -1
- package/dist/ui-public/src/actions/Actions/ActionTooltip.js +1 -1
- package/dist/ui-public/src/actions/Actions/registry.d.ts +2 -2
- package/dist/ui-public/src/actions/Actions/registry.js +2 -2
- package/dist/ui-public/src/actions/Button.d.ts +10 -10
- package/dist/ui-public/src/actions/Button.js +1 -1
- package/dist/ui-public/src/actions/Dropdown/Menu.d.ts +2 -2
- package/dist/ui-public/src/actions/Dropdown/Option.d.ts +7 -7
- package/dist/ui-public/src/actions/Dropdown/index.d.ts +1 -1
- package/dist/ui-public/src/actions/Dropdown/triggers/ButtonTrigger.d.ts +5 -5
- package/dist/ui-public/src/actions/Dropdown/triggers/DropdownTriggerButton.d.ts +2 -2
- package/dist/ui-public/src/actions/Dropdown/triggers/IconTrigger.d.ts +6 -6
- package/dist/ui-public/src/actions/Dropdown/triggers/IconTrigger.js +1 -1
- package/dist/ui-public/src/actions/EditorToolbar/Button.d.ts +1 -1
- package/dist/ui-public/src/actions/MultipleSelectionActionBar.d.ts +1 -1
- package/dist/ui-public/src/actions/SplitButton/Caret.js +2 -2
- package/dist/ui-public/src/actions/SplitButton/Halves.js +1 -1
- package/dist/ui-public/src/actions/SplitButton/index.d.ts +3 -3
- package/dist/ui-public/src/actions/disabledReason.d.ts +4 -4
- package/dist/ui-public/src/content/Avatar.d.ts +3 -3
- package/dist/ui-public/src/content/Avatar.js +2 -2
- package/dist/ui-public/src/content/CodeSnippet.d.ts +1 -1
- package/dist/ui-public/src/content/CopyableValue.d.ts +1 -1
- package/dist/ui-public/src/content/EnvironmentPill.d.ts +1 -1
- package/dist/ui-public/src/content/EnvironmentPill.js +1 -1
- package/dist/ui-public/src/content/IconAvatar.d.ts +1 -1
- package/dist/ui-public/src/content/ItemStatus.d.ts +1 -1
- package/dist/ui-public/src/content/Pill.d.ts +1 -1
- package/dist/ui-public/src/content/SmartDate.d.ts +1 -1
- package/dist/ui-public/src/content/UploadPreview/asset.js +200 -0
- package/dist/ui-public/src/content/UploadPreview/audio.js +120 -0
- package/dist/ui-public/src/content/{UploadPreview.d.ts → UploadPreview/box.d.ts} +10 -10
- package/dist/ui-public/src/content/{UploadPreview.js → UploadPreview/box.js} +7 -7
- package/dist/ui-public/src/content/{uploadPreviewFit.d.ts → UploadPreview/fit.d.ts} +2 -2
- package/dist/ui-public/src/content/{uploadPreviewFit.js → UploadPreview/fit.js} +3 -3
- package/dist/ui-public/src/content/UploadPreview/index.d.ts +61 -0
- package/dist/ui-public/src/content/UploadPreview/index.js +36 -0
- package/dist/ui-public/src/content/UploadPreview/presentation.js +63 -0
- package/dist/ui-public/src/content/UploadPreview/thumbhash.js +91 -0
- package/dist/ui-public/src/content/UploadPreview/upload.d.ts +104 -0
- package/dist/ui-public/src/content/UploadPreview/upload.js +112 -0
- package/dist/ui-public/src/content/UsageMeter.d.ts +1 -1
- package/dist/ui-public/src/content/ValidityTriangles.d.ts +1 -1
- package/dist/ui-public/src/feedback/BlankSlate.d.ts +5 -5
- package/dist/ui-public/src/feedback/Callout.d.ts +5 -5
- package/dist/ui-public/src/feedback/Callout.js +1 -1
- package/dist/ui-public/src/feedback/ProgressBar.d.ts +4 -4
- package/dist/ui-public/src/feedback/Spinner.d.ts +6 -6
- package/dist/ui-public/src/feedback/Spinner.js +1 -1
- package/dist/ui-public/src/form/DateInput.d.ts +13 -0
- package/dist/ui-public/src/form/DateInput.js +16 -0
- package/dist/ui-public/src/form/DateTimeInput/Base.d.ts +89 -0
- package/dist/ui-public/src/form/DateTimeInput/Base.js +330 -0
- package/dist/ui-public/src/form/DateTimeInput/CalendarGrid.d.ts +29 -0
- package/dist/ui-public/src/form/DateTimeInput/CalendarGrid.js +195 -0
- package/dist/ui-public/src/form/DateTimeInput/dateText.js +38 -0
- package/dist/ui-public/src/form/DateTimeInput/index.d.ts +10 -0
- package/dist/ui-public/src/form/DateTimeInput/index.js +18 -0
- package/dist/ui-public/src/form/DateTimeInput/value.js +31 -0
- package/dist/ui-public/src/form/DateTimeRangeInput/Panel.js +167 -0
- package/dist/ui-public/src/form/DateTimeRangeInput/index.d.ts +123 -0
- package/dist/ui-public/src/form/DateTimeRangeInput/index.js +186 -0
- package/dist/ui-public/src/form/DateTimeRangeInput/rangeLabel.js +46 -0
- package/dist/ui-public/src/form/FieldHint.d.ts +2 -2
- package/dist/ui-public/src/form/FieldWrapper.d.ts +9 -9
- package/dist/ui-public/src/form/FieldWrapper.js +3 -3
- package/dist/ui-public/src/form/FilterBuilder/Editor.js +123 -0
- package/dist/ui-public/src/form/FilterBuilder/index.d.ts +9 -0
- package/dist/ui-public/src/form/FilterBuilder/index.js +294 -0
- package/dist/ui-public/src/form/FilterBuilder/types.d.ts +188 -0
- package/dist/ui-public/src/form/FilterBuilder/values.js +86 -0
- package/dist/ui-public/src/form/InputGroup.d.ts +2 -2
- package/dist/ui-public/src/form/InputGroup.js +1 -1
- package/dist/ui-public/src/form/KeyValueList.d.ts +1 -1
- package/dist/ui-public/src/form/Label.d.ts +2 -2
- package/dist/ui-public/src/form/RadioGroupInput.d.ts +2 -2
- package/dist/ui-public/src/form/RadioGroupInput.js +1 -1
- package/dist/ui-public/src/form/SelectInput/SelectMenu.d.ts +2 -2
- package/dist/ui-public/src/form/SelectInput/index.d.ts +3 -3
- package/dist/ui-public/src/form/SwitchInput.d.ts +2 -2
- package/dist/ui-public/src/form/SwitchList.d.ts +1 -1
- package/dist/ui-public/src/form/SwitchList.js +1 -1
- package/dist/ui-public/src/form/TableList.d.ts +2 -2
- package/dist/ui-public/src/form/TextareaInput.js +1 -1
- package/dist/ui-public/src/form/inputProps.d.ts +6 -6
- package/dist/ui-public/src/hooks/useAsyncSelectOptions.d.ts +1 -1
- package/dist/ui-public/src/hooks/useSmartRowClick.d.ts +1 -1
- package/dist/ui-public/src/hooks/useSmartRowClick.js +1 -1
- package/dist/ui-public/src/layout/Page/PageGroup.d.ts +2 -2
- package/dist/ui-public/src/layout/Page/PageGroup.js +1 -1
- package/dist/ui-public/src/layout/Pane/FormHeader.d.ts +1 -1
- package/dist/ui-public/src/layout/Pane/FormHeader.js +1 -1
- package/dist/ui-public/src/layout/Pane/ListFilter.d.ts +1 -1
- package/dist/ui-public/src/layout/Pane/ListPresets.d.ts +1 -1
- package/dist/ui-public/src/layout/Pane/PaneHeader.d.ts +1 -1
- package/dist/ui-public/src/layout/Pane/index.d.ts +2 -2
- package/dist/ui-public/src/layout/SidebarPanel.d.ts +1 -1
- package/dist/ui-public/src/layout/SplitPane/Rail.js +1 -1
- package/dist/ui-public/src/layout/SplitPane/index.d.ts +6 -6
- package/dist/ui-public/src/layout/Toolbar/AddNewButton.d.ts +2 -2
- package/dist/ui-public/src/layout/Toolbar/Help.d.ts +3 -3
- package/dist/ui-public/src/layout/Toolbar/Help.js +2 -2
- package/dist/ui-public/src/layout/Toolbar/Note.d.ts +1 -1
- package/dist/ui-public/src/layout/Toolbar/Note.js +1 -1
- package/dist/ui-public/src/layout/Toolbar/Pagination.d.ts +1 -1
- package/dist/ui-public/src/layout/Toolbar/Pagination.js +1 -1
- package/dist/ui-public/src/layout/Toolbar/PresetsTitle.d.ts +3 -3
- package/dist/ui-public/src/layout/Toolbar/PresetsTitle.js +2 -2
- package/dist/ui-public/src/layout/Toolbar/PrimaryButton.d.ts +3 -3
- package/dist/ui-public/src/layout/Toolbar/Root.d.ts +1 -1
- package/dist/ui-public/src/layout/Toolbar/Root.js +4 -1
- package/dist/ui-public/src/layout/Toolbar/ToolbarTitleTrigger.js +1 -1
- package/dist/ui-public/src/lists/CardList.d.ts +3 -3
- package/dist/ui-public/src/lists/EmptySlot.d.ts +1 -1
- package/dist/ui-public/src/lists/InfoList/User.d.ts +1 -1
- package/dist/ui-public/src/lists/InfoList/Value.d.ts +1 -1
- package/dist/ui-public/src/lists/InfoList/Value.js +1 -1
- package/dist/ui-public/src/lists/InfoList/index.d.ts +3 -3
- package/dist/ui-public/src/lists/InfoList/index.js +1 -1
- package/dist/ui-public/src/lists/MediaCard.d.ts +7 -7
- package/dist/ui-public/src/lists/RecordRow/Image.d.ts +24 -0
- package/dist/ui-public/src/lists/RecordRow/Image.js +22 -0
- package/dist/ui-public/src/lists/RecordRow/List.d.ts +26 -0
- package/dist/ui-public/src/lists/RecordRow/List.js +30 -0
- package/dist/ui-public/src/lists/RecordRow/context.js +31 -0
- package/dist/ui-public/src/lists/RecordRow/index.d.ts +94 -0
- package/dist/ui-public/src/lists/RecordRow/index.js +122 -0
- package/dist/ui-public/src/lists/RecordRow/presentation.js +73 -0
- package/dist/ui-public/src/lists/RecordRow/types.d.ts +58 -0
- package/dist/ui-public/src/lists/RowList.d.ts +5 -5
- package/dist/ui-public/src/lists/SettingsList.d.ts +3 -3
- package/dist/ui-public/src/lists/SettingsList.js +2 -2
- package/dist/ui-public/src/lists/Table/Row.d.ts +5 -5
- package/dist/ui-public/src/lists/Table/Table.d.ts +3 -3
- package/dist/ui-public/src/lists/Table/TreeToggle.d.ts +2 -2
- package/dist/ui-public/src/lists/Table/TreeToggle.js +1 -1
- package/dist/ui-public/src/lists/Table/cells/LinkCell.d.ts +1 -1
- package/dist/ui-public/src/lists/TreeRow/Action.d.ts +1 -1
- package/dist/ui-public/src/lists/TreeRow/Action.js +1 -1
- package/dist/ui-public/src/lists/TreeRow/Link.d.ts +1 -1
- package/dist/ui-public/src/lists/TreeRow/Link.js +1 -1
- package/dist/ui-public/src/lists/UploadCard.d.ts +66 -3
- package/dist/ui-public/src/lists/UploadCard.js +116 -7
- package/dist/ui-public/src/lists/UserRow.d.ts +122 -0
- package/dist/ui-public/src/lists/UserRow.js +104 -0
- package/dist/ui-public/src/lists/dnd/DragHandle.d.ts +2 -2
- package/dist/ui-public/src/lists/dnd/SortableList.d.ts +1 -1
- package/dist/ui-public/src/lists/dnd/dropTargetClassName.d.ts +1 -1
- package/dist/ui-public/src/lists/dnd/tree/SortableTree.d.ts +2 -2
- package/dist/ui-public/src/navigation/Chevron.d.ts +4 -4
- package/dist/ui-public/src/navigation/Chevron.js +1 -1
- package/dist/ui-public/src/navigation/Link.d.ts +5 -5
- package/dist/ui-public/src/navigation/Link.js +1 -1
- package/dist/ui-public/src/navigation/NavList.d.ts +1 -1
- package/dist/ui-public/src/navigation/NavList.js +1 -1
- package/dist/ui-public/src/navigation/NavigationProvider.d.ts +1 -1
- package/dist/ui-public/src/navigation/SegmentedControl.d.ts +2 -2
- package/dist/ui-public/src/navigation/SettingsMenu.d.ts +8 -8
- package/dist/ui-public/src/navigation/SettingsMenu.js +1 -1
- package/dist/ui-public/src/navigation/SidebarTree/SidebarTreeNode.d.ts +4 -4
- package/dist/ui-public/src/overlays/FullscreenModal/TitleContext.d.ts +1 -1
- package/dist/ui-public/src/overlays/FullscreenModal/TitleContext.js +1 -1
- package/dist/ui-public/src/overlays/NewZIndex.d.ts +1 -1
- package/dist/ui-public/src/overlays/NewZIndex.js +1 -1
- package/dist/ui-public/src/overlays/Popover.d.ts +1 -1
- package/dist/ui-public/src/overlays/PortalWrapper.js +1 -1
- package/dist/ui-public/src/overlays/useModalClose.js +3 -3
- package/dist/ui-public/src/patterns/ListDetail/FloatingDetail.js +2 -2
- package/dist/ui-public/src/patterns/ListDetail/Page.d.ts +8 -9
- package/dist/ui-public/src/patterns/ListDetail/Page.js +4 -5
- package/dist/ui-public/src/patterns/ListDetail/Panel.d.ts +2 -2
- package/dist/ui-public/src/patterns/ListDetail/Panel.js +1 -1
- package/dist/ui-public/src/patterns/ListDetail/Split.d.ts +9 -10
- package/dist/ui-public/src/patterns/ListDetail/Split.js +5 -5
- package/dist/ui-public/src/patterns/ListFormPage.d.ts +3 -3
- package/dist/ui-public/src/patterns/ListFormPage.js +1 -1
- package/dist/ui-public/src/semantic/Heading.d.ts +1 -1
- package/dist/ui-public/src/semantic/Heading.js +1 -1
- package/dist/ui-public/src/semantic/Image.js +1 -1
- package/dist/ui-public/src/semantic/Nav.d.ts +3 -3
- package/dist/ui-public/src/semantic/Nav.js +3 -3
- package/dist/ui-public/src/semantic/RawButton.d.ts +3 -3
- package/dist/ui-public/src/semantic/RawButton.js +1 -1
- package/dist/ui-public/src/semantic/Search.d.ts +1 -1
- package/dist/ui-public/src/semantic/Search.js +1 -1
- package/dist/ui-public/src/utils/format.d.ts +21 -0
- package/dist/ui-public/src/utils/format.js +20 -0
- package/dist/ui-public/src/utils/formatDate.d.ts +10 -2
- package/dist/ui-public/src/utils/formatDate.js +4 -4
- package/dist/ui-public/src/utils/tickBatcher.js +44 -0
- package/dist/ui-public/src/utils/timezones.js +277 -0
- package/dist/ui-public/src/utils/weekStartForLocale.js +25 -0
- package/dist/utils/format.d.ts +1 -0
- package/dist/utils/format.js +2 -0
- package/package.json +2 -2
- package/dist/ui-public/icons/lucide/receipt.js +0 -26
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import React, { type ReactNode } from 'react';
|
|
2
|
+
import { type RecordRowImage } from './Image.js';
|
|
3
|
+
import List from './List.js';
|
|
4
|
+
import type { RecordRowItem, RecordRowModel, RecordRowPresentation } from './types.js';
|
|
5
|
+
export type { RecordRowImageProps } from './Image.js';
|
|
6
|
+
export type { RecordRowListProps } from './List.js';
|
|
7
|
+
export type { RecordRowImage, RecordRowItem, RecordRowModel, RecordRowPresentation, };
|
|
8
|
+
type Content =
|
|
9
|
+
/** The data of the record, already resolved */
|
|
10
|
+
{
|
|
11
|
+
/**
|
|
12
|
+
* The data of the record, for example a result of
|
|
13
|
+
* `ctx.loadItemPresentationInfo`
|
|
14
|
+
*/
|
|
15
|
+
presentation: RecordRowPresentation;
|
|
16
|
+
/**
|
|
17
|
+
* The model of the record. The row shows its name above the title,
|
|
18
|
+
* and the status only when it has the draft mode. Without it, the row
|
|
19
|
+
* reads the model of `presentation.itemTypeId` from the host.
|
|
20
|
+
*/
|
|
21
|
+
model?: RecordRowModel | null;
|
|
22
|
+
item?: never;
|
|
23
|
+
preferredLocale?: never;
|
|
24
|
+
}
|
|
25
|
+
/** The record: the row loads its data from the host */
|
|
26
|
+
| {
|
|
27
|
+
/**
|
|
28
|
+
* The ID of the record, or the record. The row loads its presentation
|
|
29
|
+
* once, and again when `item` changes: it does not show the changes
|
|
30
|
+
* that somebody makes to the record later. While it loads, it shows a
|
|
31
|
+
* placeholder in place of the title, and the model and the status of
|
|
32
|
+
* a full record.
|
|
33
|
+
*/
|
|
34
|
+
item: string | RecordRowItem;
|
|
35
|
+
/** The locale of the title and of the image */
|
|
36
|
+
preferredLocale?: string;
|
|
37
|
+
presentation?: never;
|
|
38
|
+
model?: never;
|
|
39
|
+
};
|
|
40
|
+
type Layout = {
|
|
41
|
+
/**
|
|
42
|
+
* "row" shows the model above the title: a row of a list, an option
|
|
43
|
+
* of a menu.
|
|
44
|
+
*/
|
|
45
|
+
layout: 'row';
|
|
46
|
+
/**
|
|
47
|
+
* More lines below the title, small and in the subtle ink. For example
|
|
48
|
+
* the parents of the record, or the users that edit it.
|
|
49
|
+
*/
|
|
50
|
+
children?: ReactNode;
|
|
51
|
+
} | {
|
|
52
|
+
/**
|
|
53
|
+
* "inline" shows one line: a chip, the value of a select, a record in
|
|
54
|
+
* a text. It has no model and no lines below the title.
|
|
55
|
+
*/
|
|
56
|
+
layout: 'inline';
|
|
57
|
+
children?: never;
|
|
58
|
+
};
|
|
59
|
+
type Common = {
|
|
60
|
+
/**
|
|
61
|
+
* Shows the ID of the record. For example when the ID matches the text of
|
|
62
|
+
* a search.
|
|
63
|
+
* @default false
|
|
64
|
+
*/
|
|
65
|
+
showId?: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* The title shows on up to three lines, not on one line. Only for a list
|
|
68
|
+
* of records that is wide enough.
|
|
69
|
+
* @default false
|
|
70
|
+
*/
|
|
71
|
+
multilineTitle?: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* The row ignores the `RecordRow.List` around it (for example a chip of a
|
|
74
|
+
* select, when the list is the options of the menu). It shows an image
|
|
75
|
+
* only when it has one, and does not change the rows.
|
|
76
|
+
* @default false
|
|
77
|
+
*/
|
|
78
|
+
standalone?: boolean;
|
|
79
|
+
};
|
|
80
|
+
export type RecordRowProps = Content & Layout & Common;
|
|
81
|
+
/**
|
|
82
|
+
* A record in a row: the image, the model, the title, the validity
|
|
83
|
+
* triangles and the status, always in the same order and with the same
|
|
84
|
+
* sizes. It shows only the content: its container gives the surface, the
|
|
85
|
+
* hover and the click.
|
|
86
|
+
*/
|
|
87
|
+
declare function RecordRow(props: RecordRowProps): React.JSX.Element;
|
|
88
|
+
declare const _default: React.NamedExoticComponent<RecordRowProps> & {
|
|
89
|
+
readonly type: typeof RecordRow;
|
|
90
|
+
} & {
|
|
91
|
+
Image: React.MemoExoticComponent<({ image }: import("./Image.js").RecordRowImageProps) => React.JSX.Element>;
|
|
92
|
+
List: typeof List;
|
|
93
|
+
};
|
|
94
|
+
export default _default;
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { useTranslation } from "../../i18n.js";
|
|
2
|
+
import { useLoadedRecordPresentation, useRecordPresentationModel } from "./presentation.js";
|
|
3
|
+
import { ItemValidityTriangles } from "../../content/ValidityTriangles.js";
|
|
4
|
+
import EntityRow_default from "../EntityRow.js";
|
|
5
|
+
import IdText from "../../content/IdText.js";
|
|
6
|
+
import ItemStatus_default from "../../content/ItemStatus.js";
|
|
7
|
+
import { useRecordRowImageSlot, useRecordRowsShowModel } from "./context.js";
|
|
8
|
+
import Image_default from "./Image.js";
|
|
9
|
+
import List from "./List.js";
|
|
10
|
+
import React, { useMemo } from "react";
|
|
11
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
12
|
+
//#region ../ui-public/src/lists/RecordRow/index.tsx
|
|
13
|
+
var imageSizes = {
|
|
14
|
+
inline: 20,
|
|
15
|
+
row: 32
|
|
16
|
+
};
|
|
17
|
+
function PresentedRecordRow({ presentation, model: givenModel, layout, showId = false, multilineTitle, standalone, children }) {
|
|
18
|
+
const { t, tc } = useTranslation();
|
|
19
|
+
const modelOf = useRecordPresentationModel();
|
|
20
|
+
const { id, image, title, status, itemTypeId } = presentation;
|
|
21
|
+
const model = givenModel !== void 0 ? givenModel : itemTypeId ? modelOf(itemTypeId) : null;
|
|
22
|
+
const showImage = useRecordRowImageSlot(Boolean(image), standalone);
|
|
23
|
+
const showModel = useRecordRowsShowModel() && Boolean(model);
|
|
24
|
+
const idShown = showId && Boolean(id);
|
|
25
|
+
const common = {
|
|
26
|
+
multilineTitle,
|
|
27
|
+
image: showImage && /* @__PURE__ */ jsx(Image_default, { image }),
|
|
28
|
+
title,
|
|
29
|
+
afterTitle: /* @__PURE__ */ jsx(ItemValidityTriangles, {
|
|
30
|
+
currentValid: presentation.currentVersionValid,
|
|
31
|
+
publishedValid: presentation.publishedVersionValid,
|
|
32
|
+
draftModeActive: model?.draftModeActive
|
|
33
|
+
}),
|
|
34
|
+
trailing: model?.draftModeActive && status ? /* @__PURE__ */ jsx(ItemStatus_default, { status }) : void 0
|
|
35
|
+
};
|
|
36
|
+
if (layout === "inline") return /* @__PURE__ */ jsx(EntityRow_default, {
|
|
37
|
+
layout: "inline",
|
|
38
|
+
...common,
|
|
39
|
+
aside: idShown && id ? /* @__PURE__ */ jsx(IdText, {
|
|
40
|
+
id,
|
|
41
|
+
labeled: true
|
|
42
|
+
}) : void 0
|
|
43
|
+
});
|
|
44
|
+
return /* @__PURE__ */ jsx(EntityRow_default, {
|
|
45
|
+
layout: "row",
|
|
46
|
+
...common,
|
|
47
|
+
kicker: showModel || idShown ? /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
48
|
+
showModel && model && tc(model.name),
|
|
49
|
+
showModel && idShown && " ",
|
|
50
|
+
idShown && id && /* @__PURE__ */ jsxs(Fragment$1, { children: [!showModel && `${t("idText.label")} `, /* @__PURE__ */ jsx(IdText, {
|
|
51
|
+
id,
|
|
52
|
+
labeled: showModel
|
|
53
|
+
})] })
|
|
54
|
+
] }) : void 0,
|
|
55
|
+
children
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
function LoadingTitle() {
|
|
59
|
+
const { t } = useTranslation();
|
|
60
|
+
return /* @__PURE__ */ jsx("span", {
|
|
61
|
+
className: "RecordRow__loading",
|
|
62
|
+
"aria-busy": "true",
|
|
63
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
64
|
+
className: "visually-hidden",
|
|
65
|
+
children: t("recordRow.loading")
|
|
66
|
+
})
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
function LoadedRecordRow({ item, preferredLocale, ...rest }) {
|
|
70
|
+
const { t } = useTranslation();
|
|
71
|
+
const size = imageSizes[rest.layout];
|
|
72
|
+
const options = useMemo(() => ({
|
|
73
|
+
preferredLocale,
|
|
74
|
+
preferredImageSize: {
|
|
75
|
+
width: size,
|
|
76
|
+
height: size
|
|
77
|
+
}
|
|
78
|
+
}), [preferredLocale, size]);
|
|
79
|
+
const loaded = useLoadedRecordPresentation(item, options);
|
|
80
|
+
const fullItem = typeof item === "string" ? null : item;
|
|
81
|
+
const id = typeof item === "string" ? item : item.id;
|
|
82
|
+
const presentation = loaded ? {
|
|
83
|
+
...loaded,
|
|
84
|
+
id
|
|
85
|
+
} : {
|
|
86
|
+
id,
|
|
87
|
+
title: loaded === null ? t("recordRow.fallbackTitle", { id }) : /* @__PURE__ */ jsx(LoadingTitle, {}),
|
|
88
|
+
image: null,
|
|
89
|
+
itemTypeId: fullItem?.relationships.item_type.data.id,
|
|
90
|
+
status: fullItem ? fullItem.meta.status ?? "published" : void 0,
|
|
91
|
+
currentVersionValid: fullItem?.meta.is_current_version_valid ?? void 0,
|
|
92
|
+
publishedVersionValid: fullItem?.meta.is_published_version_valid ?? void 0
|
|
93
|
+
};
|
|
94
|
+
return /* @__PURE__ */ jsx(PresentedRecordRow, {
|
|
95
|
+
...rest,
|
|
96
|
+
presentation
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* A record in a row: the image, the model, the title, the validity
|
|
101
|
+
* triangles and the status, always in the same order and with the same
|
|
102
|
+
* sizes. It shows only the content: its container gives the surface, the
|
|
103
|
+
* hover and the click.
|
|
104
|
+
*/
|
|
105
|
+
function RecordRow(props) {
|
|
106
|
+
if (props.item !== void 0) return /* @__PURE__ */ jsx(LoadedRecordRow, {
|
|
107
|
+
...props,
|
|
108
|
+
item: props.item
|
|
109
|
+
});
|
|
110
|
+
const { presentation, model, ...rest } = props;
|
|
111
|
+
return /* @__PURE__ */ jsx(PresentedRecordRow, {
|
|
112
|
+
...rest,
|
|
113
|
+
presentation,
|
|
114
|
+
model
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
var RecordRow_default = Object.assign(React.memo(RecordRow), {
|
|
118
|
+
Image: Image_default,
|
|
119
|
+
List
|
|
120
|
+
});
|
|
121
|
+
//#endregion
|
|
122
|
+
export { RecordRow_default as default };
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { createTickBatcher } from "../../utils/tickBatcher.js";
|
|
2
|
+
import { createContext, useContext, useEffect, useMemo, useRef, useState } from "react";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
//#region ../ui-public/src/lists/RecordRow/presentation.tsx
|
|
5
|
+
var RecordPresentationContext = createContext({
|
|
6
|
+
request: async () => null,
|
|
7
|
+
model: () => null
|
|
8
|
+
});
|
|
9
|
+
function optionsKey(options) {
|
|
10
|
+
return JSON.stringify([
|
|
11
|
+
options.preferredLocale ?? null,
|
|
12
|
+
options.preferredImageSize?.width ?? null,
|
|
13
|
+
options.preferredImageSize?.height ?? null
|
|
14
|
+
]);
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Gives the loader of the presentation of records to the `RecordRow`s with
|
|
18
|
+
* `item`. The rows of one render ask for their records in the same tick:
|
|
19
|
+
* the provider sends them in one call to the loader, one call for each set
|
|
20
|
+
* of options. It keeps no cache, so a row that renders again with a new
|
|
21
|
+
* record asks again. A failed call gives null to its rows.
|
|
22
|
+
*/
|
|
23
|
+
function RecordPresentationProvider({ load, model, children }) {
|
|
24
|
+
const value = useMemo(() => ({
|
|
25
|
+
model,
|
|
26
|
+
request: createTickBatcher({
|
|
27
|
+
groupKey: optionsKey,
|
|
28
|
+
fallback: null,
|
|
29
|
+
load: async (options, itemsOrIds) => load ? load(itemsOrIds, options) : itemsOrIds.map(() => null)
|
|
30
|
+
})
|
|
31
|
+
}), [load, model]);
|
|
32
|
+
return /* @__PURE__ */ jsx(RecordPresentationContext.Provider, {
|
|
33
|
+
value,
|
|
34
|
+
children
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
function useRecordPresentationModel() {
|
|
38
|
+
return useContext(RecordPresentationContext).model;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* The presentation of a record from the loader of the provider. It is
|
|
42
|
+
* undefined while it loads, and null when the record does not exist or the
|
|
43
|
+
* loader failed. It loads again when the record changes, not when the record
|
|
44
|
+
* changes on the server.
|
|
45
|
+
*/
|
|
46
|
+
function useLoadedRecordPresentation(itemOrId, options) {
|
|
47
|
+
const { request } = useContext(RecordPresentationContext);
|
|
48
|
+
const [state, setState] = useState(null);
|
|
49
|
+
const key = `${typeof itemOrId === "string" ? itemOrId : JSON.stringify(itemOrId)}|${optionsKey(options)}`;
|
|
50
|
+
const latest = useRef({
|
|
51
|
+
itemOrId,
|
|
52
|
+
options
|
|
53
|
+
});
|
|
54
|
+
latest.current = {
|
|
55
|
+
itemOrId,
|
|
56
|
+
options
|
|
57
|
+
};
|
|
58
|
+
useEffect(() => {
|
|
59
|
+
let active = true;
|
|
60
|
+
request(latest.current.options, latest.current.itemOrId).then((value) => {
|
|
61
|
+
if (active) setState({
|
|
62
|
+
key,
|
|
63
|
+
value
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
return () => {
|
|
67
|
+
active = false;
|
|
68
|
+
};
|
|
69
|
+
}, [request, key]);
|
|
70
|
+
return state?.key === key ? state.value : void 0;
|
|
71
|
+
}
|
|
72
|
+
//#endregion
|
|
73
|
+
export { RecordPresentationProvider, useLoadedRecordPresentation, useRecordPresentationModel };
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { Message } from '../../Message.js';
|
|
2
|
+
import type { RecordRowImage } from './Image.js';
|
|
3
|
+
/**
|
|
4
|
+
* The data of a record that the row shows. A result of
|
|
5
|
+
* `ctx.loadItemPresentationInfo` is a `RecordRowPresentation`.
|
|
6
|
+
*/
|
|
7
|
+
export type RecordRowPresentation = {
|
|
8
|
+
/**
|
|
9
|
+
* The ID of the record. A block that is not saved yet has no ID. The row
|
|
10
|
+
* shows it only with `showId`.
|
|
11
|
+
*/
|
|
12
|
+
id?: string;
|
|
13
|
+
/** The title of the record */
|
|
14
|
+
title: Message;
|
|
15
|
+
/** The image of the record, or null when the record has no image */
|
|
16
|
+
image: RecordRowImage | null;
|
|
17
|
+
/**
|
|
18
|
+
* The ID of the model of the record. Without `model`, the row reads the
|
|
19
|
+
* model from the host with this ID.
|
|
20
|
+
*/
|
|
21
|
+
itemTypeId?: string;
|
|
22
|
+
/**
|
|
23
|
+
* The publishing status of the record. The row shows it only when the
|
|
24
|
+
* model has the draft mode: without it, a record is published every time
|
|
25
|
+
* that it is saved, and the status says nothing.
|
|
26
|
+
*/
|
|
27
|
+
status?: 'draft' | 'updated' | 'published';
|
|
28
|
+
/** False when the current version of the record does not pass the validations */
|
|
29
|
+
currentVersionValid?: boolean;
|
|
30
|
+
/** False when the published version of the record does not pass the validations */
|
|
31
|
+
publishedVersionValid?: boolean;
|
|
32
|
+
};
|
|
33
|
+
/** The model of the record */
|
|
34
|
+
export type RecordRowModel = {
|
|
35
|
+
/** The name of the model, with its emoji */
|
|
36
|
+
name: Message;
|
|
37
|
+
/** True when the model has the draft mode */
|
|
38
|
+
draftModeActive: boolean;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* A record as the API gives it. The row reads only these fields, for the
|
|
42
|
+
* model, the status and the validity while the presentation loads.
|
|
43
|
+
*/
|
|
44
|
+
export type RecordRowItem = {
|
|
45
|
+
id: string;
|
|
46
|
+
relationships: {
|
|
47
|
+
item_type: {
|
|
48
|
+
data: {
|
|
49
|
+
id: string;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
meta: {
|
|
54
|
+
status?: 'draft' | 'updated' | 'published' | null;
|
|
55
|
+
is_current_version_valid?: boolean | null;
|
|
56
|
+
is_published_version_valid?: boolean | null;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
@@ -10,7 +10,7 @@ export type RowListProps = {
|
|
|
10
10
|
* @default "default"
|
|
11
11
|
*/
|
|
12
12
|
density?: 'default' | 'compact';
|
|
13
|
-
/** Only for the
|
|
13
|
+
/** Only for the position of the list in its container (a margin), not for its look */
|
|
14
14
|
className?: string;
|
|
15
15
|
/** The rows (RowList.Item) */
|
|
16
16
|
children: ReactNode;
|
|
@@ -21,9 +21,9 @@ export type RowListProps = {
|
|
|
21
21
|
* of a section, use NavList: it adds the navigation landmark.
|
|
22
22
|
*/
|
|
23
23
|
declare function BaseRowList({ density, className, children, }: RowListProps): React.JSX.Element;
|
|
24
|
-
/** The row opens a page of
|
|
24
|
+
/** The row opens a page of DatoCMS. It is selected while the page is open. */
|
|
25
25
|
type LinkRow = {
|
|
26
|
-
/** The page of
|
|
26
|
+
/** The page of DatoCMS: the path with its query */
|
|
27
27
|
to: string;
|
|
28
28
|
/** Runs on a click, before the page opens */
|
|
29
29
|
onClick?: () => void;
|
|
@@ -53,13 +53,13 @@ export type RowListItemProps = RowListItemAction & {
|
|
|
53
53
|
/**
|
|
54
54
|
* The text of the row is subtle and its images fade, but the user can
|
|
55
55
|
* still open it. Use it for an element that is off (for example a
|
|
56
|
-
* disabled plugin), with a Pill that
|
|
56
|
+
* disabled plugin), with a Pill that says it.
|
|
57
57
|
* @default false
|
|
58
58
|
*/
|
|
59
59
|
muted?: boolean;
|
|
60
60
|
/**
|
|
61
61
|
* The user can drag the row to a new position. Give the argument of the
|
|
62
|
-
* children of SortableItem
|
|
62
|
+
* children of SortableItem , with `handle` on the SortableItem:
|
|
63
63
|
* the row shows a grip at its left.
|
|
64
64
|
*/
|
|
65
65
|
sortable?: SortableItemApi;
|
|
@@ -14,7 +14,7 @@ export type SettingsListRowProps = {
|
|
|
14
14
|
/**
|
|
15
15
|
* The current value. A long value gets an ellipsis (in a narrow list, it
|
|
16
16
|
* goes on more lines), and a value on more lines (an address) has each
|
|
17
|
-
* line
|
|
17
|
+
* line on the right. An action without a value (for example "Log out
|
|
18
18
|
* everywhere") has no value.
|
|
19
19
|
*/
|
|
20
20
|
value?: ReactNode;
|
|
@@ -25,11 +25,11 @@ export type SettingsListRowProps = {
|
|
|
25
25
|
*/
|
|
26
26
|
action?: ReactNode;
|
|
27
27
|
};
|
|
28
|
-
/** A setting or an action: the text
|
|
28
|
+
/** A setting or an action: the text on the left, the value and the control on the right */
|
|
29
29
|
declare function Row({ title, description, value, action }: SettingsListRowProps): React.JSX.Element;
|
|
30
30
|
/**
|
|
31
31
|
* The settings of a wide page: one row for each value that the user changes
|
|
32
|
-
* or for each action, with the control always visible
|
|
32
|
+
* or for each action, with the control always visible on the right. Put it
|
|
33
33
|
* in a Page.Group. For facts to read, use InfoList. For a list of items,
|
|
34
34
|
* use CardList.
|
|
35
35
|
*/
|
|
@@ -9,7 +9,7 @@ function BaseSettingsList({ className, children }) {
|
|
|
9
9
|
children
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
|
-
/** A setting or an action: the text
|
|
12
|
+
/** A setting or an action: the text on the left, the value and the control on the right */
|
|
13
13
|
function Row({ title, description, value, action }) {
|
|
14
14
|
const { tc } = useTranslation();
|
|
15
15
|
return /* @__PURE__ */ jsxs("li", {
|
|
@@ -38,7 +38,7 @@ function Row({ title, description, value, action }) {
|
|
|
38
38
|
}
|
|
39
39
|
/**
|
|
40
40
|
* The settings of a wide page: one row for each value that the user changes
|
|
41
|
-
* or for each action, with the control always visible
|
|
41
|
+
* or for each action, with the control always visible on the right. Put it
|
|
42
42
|
* in a Page.Group. For facts to read, use InfoList. For a list of items,
|
|
43
43
|
* use CardList.
|
|
44
44
|
*/
|
|
@@ -45,7 +45,7 @@ export type RowAction = {
|
|
|
45
45
|
openWithArrows?: never;
|
|
46
46
|
};
|
|
47
47
|
/**
|
|
48
|
-
* The drag handle
|
|
48
|
+
* The drag handle on the left of the row: the handle that the library listens
|
|
49
49
|
* to, or a disabled handle with the reason in a tooltip
|
|
50
50
|
*/
|
|
51
51
|
export type RowDragHandle =
|
|
@@ -61,7 +61,7 @@ export type RowDragHandle =
|
|
|
61
61
|
};
|
|
62
62
|
export type RowDrag = {
|
|
63
63
|
/**
|
|
64
|
-
* The element that the library moves. It has a position,
|
|
64
|
+
* The element that the library moves. It has a position, so the drop
|
|
65
65
|
* indicator can be in it.
|
|
66
66
|
*/
|
|
67
67
|
wrapperRef?: Ref<HTMLDivElement>;
|
|
@@ -91,7 +91,7 @@ type RowBaseProps<R> = {
|
|
|
91
91
|
/**
|
|
92
92
|
* The text of the row is subtle and its images fade, but the user can
|
|
93
93
|
* still open it. Use it for an element that is off (for example a
|
|
94
|
-
* deactivated user), with a Pill that
|
|
94
|
+
* deactivated user), with a Pill that says it.
|
|
95
95
|
* @default false
|
|
96
96
|
*/
|
|
97
97
|
muted?: boolean;
|
|
@@ -99,7 +99,7 @@ type RowBaseProps<R> = {
|
|
|
99
99
|
/** The element of the row, without the handle */
|
|
100
100
|
rowRef?: Ref<HTMLDivElement>;
|
|
101
101
|
/**
|
|
102
|
-
* The actions of the row (see `
|
|
102
|
+
* The actions of the row (see `Actions`): their keys work while the
|
|
103
103
|
* pointer or the focus is in the row, and a menu in the row runs them.
|
|
104
104
|
*/
|
|
105
105
|
actions?: readonly Action[];
|
|
@@ -117,7 +117,7 @@ type RowBaseProps<R> = {
|
|
|
117
117
|
* device with no hover. A click in them never opens the row.
|
|
118
118
|
*/
|
|
119
119
|
trailing?: ReactNode;
|
|
120
|
-
/** Cells
|
|
120
|
+
/** Cells instead of the cells of the columns. Use <Table.Cell>. */
|
|
121
121
|
children?: ReactNode;
|
|
122
122
|
};
|
|
123
123
|
export type RowProps<R = any> = RowBaseProps<R> & RowAction;
|
|
@@ -18,7 +18,7 @@ export type TableProps<R = any> = {
|
|
|
18
18
|
layout: TableLayout;
|
|
19
19
|
onLayoutChange: (layout: TableLayout) => void;
|
|
20
20
|
/**
|
|
21
|
-
* The order of the rows: `useClientSort` or a hook of
|
|
21
|
+
* The order of the rows: `useClientSort` or a hook of yours gives it.
|
|
22
22
|
* Without it, the user cannot sort from the header.
|
|
23
23
|
*/
|
|
24
24
|
sort?: TableSortState;
|
|
@@ -30,13 +30,13 @@ export type TableProps<R = any> = {
|
|
|
30
30
|
/**
|
|
31
31
|
* The width in pixels of a column at the end of each row, outside the columns
|
|
32
32
|
* of the layout and with no label: the controls of the row (see `trailing` of
|
|
33
|
-
* <Table.Row>). The header keeps the same space empty,
|
|
33
|
+
* <Table.Row>). The header keeps the same space empty, so the button of the
|
|
34
34
|
* columns menu sits over it.
|
|
35
35
|
*/
|
|
36
36
|
trailingWidth?: number;
|
|
37
37
|
/**
|
|
38
38
|
* The rows have a drag handle at their left. Set it with the `reorder` of
|
|
39
|
-
* <Table.Body>, or for rows that a library of
|
|
39
|
+
* <Table.Body>, or for rows that a library of yours moves (a tree).
|
|
40
40
|
*/
|
|
41
41
|
reorderable?: boolean;
|
|
42
42
|
/**
|
|
@@ -7,7 +7,7 @@ export type TableRowExpandable = {
|
|
|
7
7
|
/** Runs when the user clicks the toggle */
|
|
8
8
|
onToggle: () => void;
|
|
9
9
|
/**
|
|
10
|
-
* The child rows load: a spinner
|
|
10
|
+
* The child rows load: a spinner replaces the chevron, and the
|
|
11
11
|
* toggle does nothing
|
|
12
12
|
*/
|
|
13
13
|
busy?: boolean;
|
|
@@ -19,7 +19,7 @@ export type TableRowExpandable = {
|
|
|
19
19
|
};
|
|
20
20
|
/**
|
|
21
21
|
* The toggle column of a tree row. A row without child rows keeps the space
|
|
22
|
-
* of the toggle,
|
|
22
|
+
* of the toggle, so the contents of the rows align.
|
|
23
23
|
*/
|
|
24
24
|
export declare function TreeToggle({ expandable, nested, labelledBy, }: {
|
|
25
25
|
expandable: TableRowExpandable | undefined;
|
|
@@ -11,7 +11,7 @@ function stopPropagation(event) {
|
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
13
|
* The toggle column of a tree row. A row without child rows keeps the space
|
|
14
|
-
* of the toggle,
|
|
14
|
+
* of the toggle, so the contents of the rows align.
|
|
15
15
|
*/
|
|
16
16
|
function TreeToggle({ expandable, nested, labelledBy }) {
|
|
17
17
|
if (!expandable) return /* @__PURE__ */ jsx(TreeToggleSlot, { children: nested ? /* @__PURE__ */ jsx(Generic.DashIcon, { className: "Table__toggle__dash" }) : /* @__PURE__ */ jsx(DisclosureChevronPlaceholder, {}) });
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
export type LinkCellProps = {
|
|
3
3
|
/** The path of the link */
|
|
4
4
|
to: string;
|
|
5
|
-
/** The text of the link: a string,
|
|
5
|
+
/** The text of the link: a string, so the title can show it */
|
|
6
6
|
children: string;
|
|
7
7
|
};
|
|
8
8
|
/** A link in a cell. The title shows the full text when the column cuts it. */
|
|
@@ -13,7 +13,7 @@ export type TreeRowActionProps = {
|
|
|
13
13
|
};
|
|
14
14
|
/**
|
|
15
15
|
* The content of a `TreeRow` as a button, for example "Load more". The
|
|
16
|
-
* button starts in the column of the handle,
|
|
16
|
+
* button starts in the column of the handle, so a click there also runs
|
|
17
17
|
* it. Give it to a row with no `expandable` and no `drag.handle`. In a
|
|
18
18
|
* SortableTree, the button is a tree item: the arrow keys move the focus to
|
|
19
19
|
* it, and Enter or Space runs it.
|
|
@@ -6,7 +6,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
6
6
|
//#region ../ui-public/src/lists/TreeRow/Action.tsx
|
|
7
7
|
/**
|
|
8
8
|
* The content of a `TreeRow` as a button, for example "Load more". The
|
|
9
|
-
* button starts in the column of the handle,
|
|
9
|
+
* button starts in the column of the handle, so a click there also runs
|
|
10
10
|
* it. Give it to a row with no `expandable` and no `drag.handle`. In a
|
|
11
11
|
* SortableTree, the button is a tree item: the arrow keys move the focus to
|
|
12
12
|
* it, and Enter or Space runs it.
|
|
@@ -6,7 +6,7 @@ export type TreeRowLinkProps = Omit<LinkProps, 'className' | 'children'> & {
|
|
|
6
6
|
};
|
|
7
7
|
/**
|
|
8
8
|
* The content of a `TreeRow` as a link, for example the link that opens a
|
|
9
|
-
* record. Give it the `provided.treeItemProps` of SortableTree,
|
|
9
|
+
* record. Give it the `provided.treeItemProps` of SortableTree, so the
|
|
10
10
|
* arrow keys move the focus between the rows.
|
|
11
11
|
*/
|
|
12
12
|
export default function TreeRowLink({ children, ...props }: TreeRowLinkProps): React.JSX.Element;
|
|
@@ -4,7 +4,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
4
4
|
//#region ../ui-public/src/lists/TreeRow/Link.tsx
|
|
5
5
|
/**
|
|
6
6
|
* The content of a `TreeRow` as a link, for example the link that opens a
|
|
7
|
-
* record. Give it the `provided.treeItemProps` of SortableTree,
|
|
7
|
+
* record. Give it the `provided.treeItemProps` of SortableTree, so the
|
|
8
8
|
* arrow keys move the focus between the rows.
|
|
9
9
|
*/
|
|
10
10
|
function TreeRowLink({ children, ...props }) {
|