@bayonai/mui-design 1.2.0 → 1.4.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 +10 -0
- package/README.md +51 -0
- package/dist/cjs/links/useLinkAddressPreview.js +17 -7
- package/dist/cjs/location/GeographicLocationField.js +49 -0
- package/dist/cjs/location/GoogleMapsAttribution.js +12 -0
- package/dist/cjs/location/MetadataFieldGroup.js +13 -0
- package/dist/cjs/location/MetadataValueField.js +27 -0
- package/dist/cjs/location/SearchInputAction.js +14 -0
- package/dist/cjs/location/TemplateBadge.js +9 -0
- package/dist/cjs/location/VenueSearchDialog.js +112 -0
- package/dist/cjs/location/index.js +20 -0
- package/dist/cjs/pending/PendingChangesDialogView.js +38 -28
- package/dist/esm/links/useLinkAddressPreview.js +17 -7
- package/dist/esm/location/GeographicLocationField.js +43 -0
- package/dist/esm/location/GoogleMapsAttribution.js +9 -0
- package/dist/esm/location/MetadataFieldGroup.js +9 -0
- package/dist/esm/location/MetadataValueField.js +23 -0
- package/dist/esm/location/SearchInputAction.js +8 -0
- package/dist/esm/location/TemplateBadge.js +6 -0
- package/dist/esm/location/VenueSearchDialog.js +109 -0
- package/dist/esm/location/index.js +7 -0
- package/dist/esm/pending/PendingChangesDialogView.js +38 -28
- package/dist/types/links/useLinkAddressPreview.d.ts +3 -1
- package/dist/types/location/GeographicLocationField.d.ts +26 -0
- package/dist/types/location/GoogleMapsAttribution.d.ts +1 -0
- package/dist/types/location/MetadataFieldGroup.d.ts +5 -0
- package/dist/types/location/MetadataValueField.d.ts +23 -0
- package/dist/types/location/SearchInputAction.d.ts +9 -0
- package/dist/types/location/TemplateBadge.d.ts +5 -0
- package/dist/types/location/VenueSearchDialog.d.ts +33 -0
- package/dist/types/location/index.d.ts +6 -0
- package/dist/types/pending/types.d.ts +2 -0
- package/package.json +6 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `@bayonai/mui-design` will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## 1.4.0 - 2026-11-12
|
|
6
|
+
|
|
7
|
+
- Add reusable metadata value-row/group spacing, neutral template badge, and explicit venue-search presentation.
|
|
8
|
+
|
|
9
|
+
## 1.2.1 - 2026-11-12
|
|
10
|
+
|
|
11
|
+
- Pending group titles wrap without redundant tooltips, and each row accepts a host-owned `endAction`; open actions remain separate.
|
|
12
|
+
|
|
13
|
+
- A source link enters editing when its preview is already visible; a click on a closed preview opens it first, including when that click triggers focus.
|
|
14
|
+
|
|
5
15
|
## 1.2.0 - 2026-11-08
|
|
6
16
|
|
|
7
17
|
- Pending change rows accept host-formatted `elapsedText` and display it in a compact secondary style. Navigation aligns with the first change and the title spacing is tighter.
|
package/README.md
CHANGED
|
@@ -202,3 +202,54 @@ persist changes. An optional `onDiscardRequest` displays a summary icon (customi
|
|
|
202
202
|
its accessible label with `discardLabel`). The host owns selecting an item,
|
|
203
203
|
confirmation, safe cancellation, and error reporting. A supplied `contentHeader`
|
|
204
204
|
replaces the default summary and is responsible for its own actions.
|
|
205
|
+
|
|
206
|
+
Pending-change rows may provide `endAction` for a host-owned control, such as
|
|
207
|
+
a discard button. The host owns the action label, confirmation, authorization,
|
|
208
|
+
and persistence. Full group titles wrap without a redundant title tooltip; the
|
|
209
|
+
open action retains its accessible label and tooltip.
|
|
210
|
+
|
|
211
|
+
### Location presentation
|
|
212
|
+
|
|
213
|
+
`@bayonai/mui-design/location` exposes `MetadataValueField`,
|
|
214
|
+
`VenueSearchDialog`, `GeographicLocationField`, `MetadataFieldGroup`,
|
|
215
|
+
`TemplateBadge`, and `SearchInputAction`. `MetadataFieldGroup` and the exported
|
|
216
|
+
spacing constants preserve the close-label / separated-field rhythm. The exported
|
|
217
|
+
`metadataFieldLabelSx` and `metadataValueRowSx` recipes let hosts apply the same
|
|
218
|
+
layout to custom field controls. Supply an authorized `searchVenues`
|
|
219
|
+
callback to the dialog; its result labels and addresses are transient. The user
|
|
220
|
+
must explicitly search and select a result. Hosts provide credential handling,
|
|
221
|
+
rate limits, persistence, billing configuration, safe error policy, clipboard
|
|
222
|
+
behavior, and Maps attribution compliance. The dialog retains visible Google Maps
|
|
223
|
+
attribution for its Google predictions. Use `@bayonai/location` for portable
|
|
224
|
+
reference validation and server-side Google lookup.
|
|
225
|
+
|
|
226
|
+
```tsx
|
|
227
|
+
import { GeographicLocationField } from "@bayonai/mui-design/location";
|
|
228
|
+
import { placeLocationMapsUrl } from "@bayonai/location";
|
|
229
|
+
|
|
230
|
+
<GeographicLocationField
|
|
231
|
+
value={location ? { label: venueName, mapsUrl: placeLocationMapsUrl(location, venueName) } : undefined}
|
|
232
|
+
placeName={venueName}
|
|
233
|
+
searchVenues={authorizedVenueSearch}
|
|
234
|
+
copyAction={copyControl}
|
|
235
|
+
onChange={saveLocationToDraft}
|
|
236
|
+
/>
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
The field calls the host-provided search function only after explicit action;
|
|
240
|
+
`onChange` supplies a selected Google Place ID or `undefined` for Clear. Hosts
|
|
241
|
+
may override field and picker copy while the Google Maps logo remains unchanged.
|
|
242
|
+
Only HTTPS `google.com/maps`, `www.google.com/maps`, and `maps.google.com`
|
|
243
|
+
URLs are linked; invalid links display the label and a safe console diagnostic
|
|
244
|
+
instead. Hosts should retain prior values until their
|
|
245
|
+
own form's accepted save and implement any error/clipboard feedback policies.
|
|
246
|
+
|
|
247
|
+
The picker embeds the unmodified official Google Maps attribution logos from the
|
|
248
|
+
[Google attribution assets](https://developers.google.com/static/maps/documentation/images/Google_Maps_Attribution_Assets.zip).
|
|
249
|
+
Keep attribution visible and follow the [Places API policies](https://developers.google.com/maps/documentation/places/web-service/policies)
|
|
250
|
+
when presenting Google content. Applications using a restrictive Content Security
|
|
251
|
+
Policy must permit `data:` images in `img-src` so the embedded attribution logo
|
|
252
|
+
remains visible.
|
|
253
|
+
|
|
254
|
+
`TemplateBadge` is the compact neutral marker for host-identified template
|
|
255
|
+
types. Hosts decide which types have a template and may supply a localized label.
|
|
@@ -10,7 +10,7 @@ const react_dom_1 = require("react-dom");
|
|
|
10
10
|
* a validated destination. The source previews/edits; the card navigates. */
|
|
11
11
|
function useLinkAddressPreview(enabled = true, onEdit) {
|
|
12
12
|
const id = (0, react_1.useId)();
|
|
13
|
-
const
|
|
13
|
+
const pointerPreview = (0, react_1.useRef)(null);
|
|
14
14
|
const [preview, setPreview] = (0, react_1.useState)(null);
|
|
15
15
|
const closeTimer = (0, react_1.useRef)(null);
|
|
16
16
|
const focusFrame = (0, react_1.useRef)(null);
|
|
@@ -22,7 +22,7 @@ function useLinkAddressPreview(enabled = true, onEdit) {
|
|
|
22
22
|
function close() {
|
|
23
23
|
cancelClose();
|
|
24
24
|
setPreview(null);
|
|
25
|
-
|
|
25
|
+
pointerPreview.current = null;
|
|
26
26
|
}
|
|
27
27
|
function contains(target) {
|
|
28
28
|
var _a;
|
|
@@ -97,6 +97,12 @@ function useLinkAddressPreview(enabled = true, onEdit) {
|
|
|
97
97
|
? {
|
|
98
98
|
"aria-controls": (preview === null || preview === void 0 ? void 0 : preview.href) === href ? id : undefined,
|
|
99
99
|
"aria-keyshortcuts": "ArrowDown",
|
|
100
|
+
onPointerDown: (event) => {
|
|
101
|
+
pointerPreview.current = {
|
|
102
|
+
anchor: event.currentTarget,
|
|
103
|
+
visible: (preview === null || preview === void 0 ? void 0 : preview.anchor) === event.currentTarget,
|
|
104
|
+
};
|
|
105
|
+
},
|
|
100
106
|
onMouseEnter: (event) => show(event.currentTarget, href, label),
|
|
101
107
|
onMouseLeave: scheduleClose,
|
|
102
108
|
onFocus: (event) => show(event.currentTarget, href, label),
|
|
@@ -121,6 +127,7 @@ function useLinkAddressPreview(enabled = true, onEdit) {
|
|
|
121
127
|
: {};
|
|
122
128
|
},
|
|
123
129
|
onClick(event, href, label) {
|
|
130
|
+
var _a;
|
|
124
131
|
event.stopPropagation();
|
|
125
132
|
if (!enabled ||
|
|
126
133
|
event.metaKey ||
|
|
@@ -129,16 +136,19 @@ function useLinkAddressPreview(enabled = true, onEdit) {
|
|
|
129
136
|
event.altKey ||
|
|
130
137
|
event.button !== 0)
|
|
131
138
|
return;
|
|
132
|
-
//
|
|
139
|
+
// Product decision: an already visible preview makes its source editable.
|
|
140
|
+
// Capture pointer state before click-induced focus can reveal the preview.
|
|
141
|
+
const wasVisible = event.detail > 0 &&
|
|
142
|
+
((_a = pointerPreview.current) === null || _a === void 0 ? void 0 : _a.anchor) === event.currentTarget
|
|
143
|
+
? pointerPreview.current.visible
|
|
144
|
+
: (preview === null || preview === void 0 ? void 0 : preview.anchor) === event.currentTarget;
|
|
145
|
+
pointerPreview.current = null;
|
|
133
146
|
event.preventDefault();
|
|
134
|
-
if (
|
|
135
|
-
activated.current === event.currentTarget &&
|
|
136
|
-
onEdit) {
|
|
147
|
+
if (wasVisible && onEdit) {
|
|
137
148
|
close();
|
|
138
149
|
onEdit();
|
|
139
150
|
}
|
|
140
151
|
else {
|
|
141
|
-
activated.current = event.currentTarget;
|
|
142
152
|
show(event.currentTarget, href, label);
|
|
143
153
|
}
|
|
144
154
|
},
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
|
+
};
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.GeographicLocationField = GeographicLocationField;
|
|
8
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
9
|
+
const AddLocationAltOutlined_1 = __importDefault(require("@mui/icons-material/AddLocationAltOutlined"));
|
|
10
|
+
const EditLocationAltOutlined_1 = __importDefault(require("@mui/icons-material/EditLocationAltOutlined"));
|
|
11
|
+
const Clear_1 = __importDefault(require("@mui/icons-material/Clear"));
|
|
12
|
+
const material_1 = require("@mui/material");
|
|
13
|
+
const react_1 = require("react");
|
|
14
|
+
const MetadataValueField_js_1 = require("./MetadataValueField.js");
|
|
15
|
+
const VenueSearchDialog_js_1 = require("./VenueSearchDialog.js");
|
|
16
|
+
const defaultCopy = {
|
|
17
|
+
fieldLabel: "Geographic location",
|
|
18
|
+
empty: "No location selected",
|
|
19
|
+
choose: "Choose venue",
|
|
20
|
+
change: "Change venue",
|
|
21
|
+
clear: "Clear location",
|
|
22
|
+
openMaps: (label) => `Open in Google Maps: ${label}`,
|
|
23
|
+
};
|
|
24
|
+
function isGoogleMapsUrl(value) {
|
|
25
|
+
try {
|
|
26
|
+
const url = new URL(value);
|
|
27
|
+
return (url.protocol === "https:" &&
|
|
28
|
+
(url.hostname === "maps.google.com" ||
|
|
29
|
+
(["google.com", "www.google.com"].includes(url.hostname) &&
|
|
30
|
+
url.pathname.startsWith("/maps"))));
|
|
31
|
+
}
|
|
32
|
+
catch {
|
|
33
|
+
return false;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
/** Host adapters supply persisted values, copy behavior and an authorized lookup. */
|
|
37
|
+
function GeographicLocationField({ value, placeName = "", disabled = false, canSearch = true, copyAction, copy, pickerCopy, searchVenues, onChange, }) {
|
|
38
|
+
const [editing, setEditing] = (0, react_1.useState)(false);
|
|
39
|
+
const labels = { ...defaultCopy, ...copy };
|
|
40
|
+
const safeMapUrl = value && isGoogleMapsUrl(value.mapsUrl);
|
|
41
|
+
(0, react_1.useEffect)(() => {
|
|
42
|
+
if (value && !safeMapUrl)
|
|
43
|
+
console.error("[Geographic location] Invalid Maps URL; displaying the label without a link.");
|
|
44
|
+
}, [value, safeMapUrl]);
|
|
45
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(MetadataValueField_js_1.MetadataValueField, { label: labels.fieldLabel, actions: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [value && safeMapUrl ? copyAction : null, onChange ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Tooltip, { title: value ? labels.change : labels.choose, children: (0, jsx_runtime_1.jsx)("span", { children: (0, jsx_runtime_1.jsx)(material_1.IconButton, { size: "small", disabled: disabled, "aria-label": value ? labels.change : labels.choose, onClick: () => setEditing(true), children: value ? ((0, jsx_runtime_1.jsx)(EditLocationAltOutlined_1.default, { fontSize: "small" })) : ((0, jsx_runtime_1.jsx)(AddLocationAltOutlined_1.default, { fontSize: "small" })) }) }) }), value ? ((0, jsx_runtime_1.jsx)(material_1.Tooltip, { title: labels.clear, children: (0, jsx_runtime_1.jsx)("span", { children: (0, jsx_runtime_1.jsx)(material_1.IconButton, { size: "small", disabled: disabled, "aria-label": labels.clear, onClick: () => onChange(undefined), children: (0, jsx_runtime_1.jsx)(Clear_1.default, { fontSize: "small" }) }) }) })) : null] })) : null] }), children: value && safeMapUrl ? ((0, jsx_runtime_1.jsx)(material_1.Link, { href: value.mapsUrl, target: "_blank", rel: "noopener noreferrer", "aria-label": labels.openMaps(value.label), sx: { flex: 1, overflowWrap: "anywhere", minWidth: 0 }, children: value.label })) : ((0, jsx_runtime_1.jsx)(material_1.Typography, { sx: { flex: 1, minWidth: 0 }, color: value ? undefined : "text.secondary", children: value ? value.label : labels.empty })) }), editing && !disabled ? ((0, jsx_runtime_1.jsx)(VenueSearchDialog_js_1.VenueSearchDialog, { placeName: placeName, copy: pickerCopy, canSearch: canSearch, searchVenues: searchVenues, onClose: () => setEditing(false), onChange: (selected) => {
|
|
46
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(selected);
|
|
47
|
+
setEditing(false);
|
|
48
|
+
} })) : null] }));
|
|
49
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.GoogleMapsAttribution = GoogleMapsAttribution;
|
|
5
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
+
const material_1 = require("@mui/material");
|
|
7
|
+
// Official Google Maps attribution assets; bytes are kept unmodified.
|
|
8
|
+
const whiteLogo = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI2LjUuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHdpZHRoPSI5OHB4IiBoZWlnaHQ9IjE4cHgiIHZpZXdCb3g9IjAgMCA5OCAxOCIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgOTggMTgiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8Zz4KCTxwYXRoIGZpbGw9IiNGRkZGRkYiIGQ9Ik03LjA4LDEzLjk2Yy0xLjkzLDAtMy41OS0wLjY4LTQuOTktMi4wNUMwLjcsMTAuNTQsMCw4LjksMCw2Ljk4YzAtMS45MiwwLjctMy41NiwyLjA5LTQuOTMKCQlDMy40OSwwLjY4LDUuMTUsMCw3LjA4LDBjMS44NSwwLDMuNDUsMC42NCw0Ljc5LDEuOTJsLTEuMzUsMS4zNUM5LjU2LDIuMzYsOC40MSwxLjkxLDcuMDgsMS45MWMtMS40LDAtMi41OCwwLjQ5LTMuNTUsMS40OAoJCUMyLjU2LDQuMzgsMi4wOCw1LjU3LDIuMDgsNi45OGMwLDEuNDEsMC40OSwyLjYxLDEuNDYsMy41OWMwLjk3LDAuOTksMi4xNSwxLjQ4LDMuNTUsMS40OGMxLjQyLDAsMi41OS0wLjQ3LDMuNTMtMS40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GMtMC4zMS0wLjc0LTAuOTQtMS4xMS0xLjkxLTEuMTFjLTAuNDcsMC0wLjg2LDAuMS0xLjE4LDAuMjkKCQljLTAuMzIsMC4xOS0wLjQ4LDAuNDUtMC40OCwwLjc4YzAsMC40OCwwLjM3LDAuOCwxLjExLDAuOTdsMS42NSwwLjM5YzAuNzgsMC4xOCwxLjM2LDAuNDksMS43NCwwLjk0YzAuMzcsMC40NCwwLjU2LDAuOTQsMC41NiwxLjUKCQljMCwwLjc1LTAuMzEsMS4zNy0wLjkyLDEuODdDOTYuNDcsMTMuNzEsOTUuNjgsMTMuOTYsOTQuNzEsMTMuOTZ6Ii8+CjwvZz4KPC9zdmc+Cg==";
|
|
10
|
+
function GoogleMapsAttribution() {
|
|
11
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.Box, { component: "span", "data-google-maps-attribution": "true", sx: { display: "block", pt: "10px", px: "10px", pb: "5px" }, children: [(0, jsx_runtime_1.jsx)(material_1.Box, { component: "img", alt: "Google Maps", src: darkLogo, sx: { display: (theme) => theme.palette.mode === "light" ? "block" : "none", width: "auto", height: 16 } }), (0, jsx_runtime_1.jsx)(material_1.Box, { component: "img", alt: "Google Maps", src: whiteLogo, sx: { display: (theme) => theme.palette.mode === "dark" ? "block" : "none", width: "auto", height: 16 } })] }));
|
|
12
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.METADATA_FIELD_GROUP_SPACING = exports.METADATA_FIELD_LABEL_SPACING = void 0;
|
|
5
|
+
exports.MetadataFieldGroup = MetadataFieldGroup;
|
|
6
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
+
const material_1 = require("@mui/material");
|
|
8
|
+
/** Keep each label close to its value and separate neighboring fields. */
|
|
9
|
+
exports.METADATA_FIELD_LABEL_SPACING = 0.25;
|
|
10
|
+
exports.METADATA_FIELD_GROUP_SPACING = 2.5;
|
|
11
|
+
function MetadataFieldGroup(props) {
|
|
12
|
+
return (0, jsx_runtime_1.jsx)(material_1.Stack, { spacing: exports.METADATA_FIELD_GROUP_SPACING, ...props });
|
|
13
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.metadataValueRowSx = exports.metadataFieldLabelSx = void 0;
|
|
5
|
+
exports.MetadataValueField = MetadataValueField;
|
|
6
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
+
const material_1 = require("@mui/material");
|
|
8
|
+
const MetadataFieldGroup_js_1 = require("./MetadataFieldGroup.js");
|
|
9
|
+
// Shared recipes preserve the field's label rhythm and underlined value row.
|
|
10
|
+
exports.metadataFieldLabelSx = {
|
|
11
|
+
color: "text.secondary",
|
|
12
|
+
fontSize: "0.75rem",
|
|
13
|
+
fontWeight: 700,
|
|
14
|
+
letterSpacing: "0.04em",
|
|
15
|
+
lineHeight: 1.2,
|
|
16
|
+
textTransform: "uppercase",
|
|
17
|
+
};
|
|
18
|
+
exports.metadataValueRowSx = {
|
|
19
|
+
alignItems: "center",
|
|
20
|
+
borderBottom: 1,
|
|
21
|
+
borderColor: "divider",
|
|
22
|
+
minHeight: 40,
|
|
23
|
+
minWidth: 0,
|
|
24
|
+
};
|
|
25
|
+
function MetadataValueField({ label, children, actions, }) {
|
|
26
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.Stack, { spacing: MetadataFieldGroup_js_1.METADATA_FIELD_LABEL_SPACING, sx: { minWidth: 0 }, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { component: "span", variant: "caption", sx: exports.metadataFieldLabelSx, children: label }), (0, jsx_runtime_1.jsxs)(material_1.Stack, { direction: "row", spacing: 0.5, sx: exports.metadataValueRowSx, children: [(0, jsx_runtime_1.jsx)(material_1.Box, { sx: { flex: 1, minWidth: 0, overflowWrap: "anywhere" }, children: children }), actions] })] }));
|
|
27
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
|
+
};
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.SearchInputAction = SearchInputAction;
|
|
8
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
9
|
+
const Search_1 = __importDefault(require("@mui/icons-material/Search"));
|
|
10
|
+
const material_1 = require("@mui/material");
|
|
11
|
+
const LoadingIconButton_js_1 = require("../actions/LoadingIconButton.js");
|
|
12
|
+
function SearchInputAction({ label, loadingLabel, loading = false, disabled = false, onSearch, }) {
|
|
13
|
+
return ((0, jsx_runtime_1.jsx)(material_1.InputAdornment, { position: "end", children: (0, jsx_runtime_1.jsx)(material_1.Tooltip, { title: loading ? loadingLabel : label, children: (0, jsx_runtime_1.jsx)("span", { children: (0, jsx_runtime_1.jsx)(LoadingIconButton_js_1.LoadingIconButton, { "aria-label": label, loadingLabel: loadingLabel, loading: loading, disabled: disabled, onClick: onSearch, type: "button", edge: "end", children: (0, jsx_runtime_1.jsx)(Search_1.default, {}) }) }) }) }));
|
|
14
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.TemplateBadge = TemplateBadge;
|
|
5
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
+
const material_1 = require("@mui/material");
|
|
7
|
+
function TemplateBadge({ label = "Template" }) {
|
|
8
|
+
return ((0, jsx_runtime_1.jsx)(material_1.Chip, { component: "span", label: label, size: "small", sx: { flex: "0 0 auto", fontSize: "0.68rem", height: 20, ml: 1 } }));
|
|
9
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.VenueSearchDialog = VenueSearchDialog;
|
|
5
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
+
const material_1 = require("@mui/material");
|
|
7
|
+
const react_1 = require("react");
|
|
8
|
+
const DialogActionButtons_js_1 = require("../actions/DialogActionButtons.js");
|
|
9
|
+
const StatusNotice_js_1 = require("../feedback/StatusNotice.js");
|
|
10
|
+
const SearchInputAction_js_1 = require("./SearchInputAction.js");
|
|
11
|
+
const GoogleMapsAttribution_js_1 = require("./GoogleMapsAttribution.js");
|
|
12
|
+
const defaultCopy = {
|
|
13
|
+
title: "Choose a venue",
|
|
14
|
+
close: "Close venue search",
|
|
15
|
+
queryLabel: "Venue name",
|
|
16
|
+
queryHelp: "Add a city or country to narrow the matches.",
|
|
17
|
+
queryTooLong: "Use a shorter venue name (up to 200 characters).",
|
|
18
|
+
search: "Search venues",
|
|
19
|
+
searching: "Searching venues",
|
|
20
|
+
loading: "Finding venues…",
|
|
21
|
+
resultsLabel: "Matching venues",
|
|
22
|
+
chooseResult: "Select the right venue, or adjust the name and search again.",
|
|
23
|
+
noResults: "No venues found. Add a city or country to the name and search again.",
|
|
24
|
+
failure: "Couldn't load venues. Your current location is unchanged.",
|
|
25
|
+
};
|
|
26
|
+
function VenueSearchDialog({ placeName = "", canSearch = true, searchVenues, copy, onClose, onChange, }) {
|
|
27
|
+
const titleId = (0, react_1.useId)();
|
|
28
|
+
const labels = { ...defaultCopy, ...copy };
|
|
29
|
+
const [query, setQuery] = (0, react_1.useState)(placeName);
|
|
30
|
+
const [venues, setVenues] = (0, react_1.useState)(null);
|
|
31
|
+
const [pending, setPending] = (0, react_1.useState)(false);
|
|
32
|
+
const [message, setMessage] = (0, react_1.useState)(null);
|
|
33
|
+
const generation = (0, react_1.useRef)(0);
|
|
34
|
+
const busy = (0, react_1.useRef)(false);
|
|
35
|
+
(0, react_1.useEffect)(() => () => {
|
|
36
|
+
generation.current++;
|
|
37
|
+
}, []);
|
|
38
|
+
async function search() {
|
|
39
|
+
const name = query.trim();
|
|
40
|
+
if (busy.current || !canSearch || name.length < 2 || name.length > 200)
|
|
41
|
+
return;
|
|
42
|
+
const current = ++generation.current;
|
|
43
|
+
busy.current = true;
|
|
44
|
+
setPending(true);
|
|
45
|
+
setMessage(null);
|
|
46
|
+
setVenues(null);
|
|
47
|
+
try {
|
|
48
|
+
// A deliberate Search is one billable lookup. Never search per keystroke,
|
|
49
|
+
// auto-select the first prediction, or persist Google's returned address.
|
|
50
|
+
const result = await searchVenues(name);
|
|
51
|
+
if (!Array.isArray(result))
|
|
52
|
+
throw new Error("Venue search returned an invalid result list.");
|
|
53
|
+
// Keep the picker bounded and never allow malformed provider IDs to be selected.
|
|
54
|
+
const choices = result
|
|
55
|
+
.slice(0, 5)
|
|
56
|
+
.filter((venue) => venue &&
|
|
57
|
+
typeof venue.placeId === "string" &&
|
|
58
|
+
venue.placeId.length > 0 &&
|
|
59
|
+
venue.placeId.length <= 512 &&
|
|
60
|
+
!/[\s\u0000-\u001f\u007f]/u.test(venue.placeId) &&
|
|
61
|
+
typeof venue.name === "string" &&
|
|
62
|
+
venue.name.trim().length > 0 &&
|
|
63
|
+
(venue.address === undefined || typeof venue.address === "string"));
|
|
64
|
+
if (current === generation.current)
|
|
65
|
+
setVenues(choices);
|
|
66
|
+
}
|
|
67
|
+
catch (error) {
|
|
68
|
+
if (current === generation.current) {
|
|
69
|
+
console.error("[Place venue search] Could not load venue choices; the selected location is unchanged.", { error });
|
|
70
|
+
setMessage(labels.failure);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
finally {
|
|
74
|
+
if (current === generation.current) {
|
|
75
|
+
busy.current = false;
|
|
76
|
+
setPending(false);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.Dialog, { open: true, fullWidth: true, maxWidth: "sm", "aria-labelledby": titleId, onClose: onClose, children: [(0, jsx_runtime_1.jsxs)(material_1.DialogTitle, { sx: { pr: 7 }, children: [(0, jsx_runtime_1.jsx)("span", { id: titleId, children: labels.title }), (0, jsx_runtime_1.jsx)(GoogleMapsAttribution_js_1.GoogleMapsAttribution, {})] }), (0, jsx_runtime_1.jsx)(DialogActionButtons_js_1.DialogCloseButton, { label: labels.close, onClose: onClose }), (0, jsx_runtime_1.jsx)(material_1.DialogContent, { children: (0, jsx_runtime_1.jsxs)(material_1.Stack, { spacing: 2, sx: { pt: 1 }, children: [(0, jsx_runtime_1.jsx)(material_1.TextField, { autoFocus: true, fullWidth: true, label: labels.queryLabel, value: query, error: query.trim().length > 200, helperText: query.trim().length > 200 ? labels.queryTooLong : labels.queryHelp, slotProps: {
|
|
81
|
+
htmlInput: { maxLength: 200 },
|
|
82
|
+
input: {
|
|
83
|
+
// Product decision: explicit search lives inside the field;
|
|
84
|
+
// Enter and this icon share one guarded request path.
|
|
85
|
+
endAdornment: ((0, jsx_runtime_1.jsx)(SearchInputAction_js_1.SearchInputAction, { label: labels.search, loadingLabel: labels.searching, loading: pending, disabled: !canSearch ||
|
|
86
|
+
query.trim().length < 2 ||
|
|
87
|
+
query.trim().length > 200, onSearch: () => void search() })),
|
|
88
|
+
},
|
|
89
|
+
}, onChange: (event) => {
|
|
90
|
+
generation.current++;
|
|
91
|
+
busy.current = false;
|
|
92
|
+
setPending(false);
|
|
93
|
+
setQuery(event.target.value);
|
|
94
|
+
setVenues(null);
|
|
95
|
+
setMessage(null);
|
|
96
|
+
}, onKeyDown: (event) => {
|
|
97
|
+
if (event.key === "Enter" && !event.nativeEvent.isComposing) {
|
|
98
|
+
event.preventDefault();
|
|
99
|
+
void search();
|
|
100
|
+
}
|
|
101
|
+
} }), message ? (0, jsx_runtime_1.jsx)(StatusNotice_js_1.StatusNotice, { message: message, tone: "error" }) : null, (0, jsx_runtime_1.jsxs)("div", { "aria-live": "polite", "aria-busy": pending, children: [pending ? ((0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", color: "text.secondary", children: labels.loading })) : null, venues !== null ? ((0, jsx_runtime_1.jsx)(material_1.Stack, { spacing: 1, children: venues.length ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", children: labels.chooseResult }), (0, jsx_runtime_1.jsx)(material_1.List, { disablePadding: true, "aria-label": labels.resultsLabel, children: venues.map((venue) => ((0, jsx_runtime_1.jsx)(material_1.ListItemButton, { component: "button", type: "button", sx: {
|
|
102
|
+
width: "100%",
|
|
103
|
+
textAlign: "left",
|
|
104
|
+
borderRadius: 1,
|
|
105
|
+
}, onClick: () => onChange({
|
|
106
|
+
provider: "google",
|
|
107
|
+
placeId: venue.placeId,
|
|
108
|
+
}), children: (0, jsx_runtime_1.jsx)(material_1.ListItemText, { primary: venue.name, secondary: venue.address, slotProps: {
|
|
109
|
+
primary: { sx: { overflowWrap: "anywhere" } },
|
|
110
|
+
secondary: { sx: { overflowWrap: "anywhere" } },
|
|
111
|
+
} }) }, venue.placeId))) })] })) : ((0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", children: labels.noResults })) })) : null] })] }) })] }));
|
|
112
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.METADATA_FIELD_LABEL_SPACING = exports.METADATA_FIELD_GROUP_SPACING = exports.MetadataFieldGroup = exports.TemplateBadge = exports.GeographicLocationField = exports.metadataValueRowSx = exports.metadataFieldLabelSx = exports.MetadataValueField = exports.SearchInputAction = exports.VenueSearchDialog = void 0;
|
|
5
|
+
var VenueSearchDialog_js_1 = require("./VenueSearchDialog.js");
|
|
6
|
+
Object.defineProperty(exports, "VenueSearchDialog", { enumerable: true, get: function () { return VenueSearchDialog_js_1.VenueSearchDialog; } });
|
|
7
|
+
var SearchInputAction_js_1 = require("./SearchInputAction.js");
|
|
8
|
+
Object.defineProperty(exports, "SearchInputAction", { enumerable: true, get: function () { return SearchInputAction_js_1.SearchInputAction; } });
|
|
9
|
+
var MetadataValueField_js_1 = require("./MetadataValueField.js");
|
|
10
|
+
Object.defineProperty(exports, "MetadataValueField", { enumerable: true, get: function () { return MetadataValueField_js_1.MetadataValueField; } });
|
|
11
|
+
Object.defineProperty(exports, "metadataFieldLabelSx", { enumerable: true, get: function () { return MetadataValueField_js_1.metadataFieldLabelSx; } });
|
|
12
|
+
Object.defineProperty(exports, "metadataValueRowSx", { enumerable: true, get: function () { return MetadataValueField_js_1.metadataValueRowSx; } });
|
|
13
|
+
var GeographicLocationField_js_1 = require("./GeographicLocationField.js");
|
|
14
|
+
Object.defineProperty(exports, "GeographicLocationField", { enumerable: true, get: function () { return GeographicLocationField_js_1.GeographicLocationField; } });
|
|
15
|
+
var TemplateBadge_js_1 = require("./TemplateBadge.js");
|
|
16
|
+
Object.defineProperty(exports, "TemplateBadge", { enumerable: true, get: function () { return TemplateBadge_js_1.TemplateBadge; } });
|
|
17
|
+
var MetadataFieldGroup_js_1 = require("./MetadataFieldGroup.js");
|
|
18
|
+
Object.defineProperty(exports, "MetadataFieldGroup", { enumerable: true, get: function () { return MetadataFieldGroup_js_1.MetadataFieldGroup; } });
|
|
19
|
+
Object.defineProperty(exports, "METADATA_FIELD_GROUP_SPACING", { enumerable: true, get: function () { return MetadataFieldGroup_js_1.METADATA_FIELD_GROUP_SPACING; } });
|
|
20
|
+
Object.defineProperty(exports, "METADATA_FIELD_LABEL_SPACING", { enumerable: true, get: function () { return MetadataFieldGroup_js_1.METADATA_FIELD_LABEL_SPACING; } });
|
|
@@ -47,7 +47,12 @@ function PendingChangesDialogView({ groups, open, onClose, title, summary, empty
|
|
|
47
47
|
return ((0, jsx_runtime_1.jsxs)(Shell, { autoFocusInput: false, closeLabel: "Close pending changes", closeTooltip: "Close pending changes", contentHeader: contentHeader !== null && contentHeader !== void 0 ? contentHeader : (groups.length ? (
|
|
48
48
|
// Product decision: the sync summary remains distinct and visible
|
|
49
49
|
// while the user scrolls through pending groups.
|
|
50
|
-
(0, jsx_runtime_1.jsxs)(material_1.Stack, { component: "section", "aria-label": "Pending changes summary", direction: "row", spacing: 1, sx: {
|
|
50
|
+
(0, jsx_runtime_1.jsxs)(material_1.Stack, { component: "section", "aria-label": "Pending changes summary", direction: "row", spacing: 1, sx: {
|
|
51
|
+
p: 2,
|
|
52
|
+
borderRadius: 1,
|
|
53
|
+
bgcolor: "action.selected",
|
|
54
|
+
alignItems: "center",
|
|
55
|
+
}, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", sx: { fontWeight: 600, flex: 1 }, children: summary }), onDiscardRequest ? ((0, jsx_runtime_1.jsx)(material_1.Tooltip, { title: discardLabel, children: (0, jsx_runtime_1.jsx)(material_1.IconButton, { "aria-label": discardLabel, onClick: onDiscardRequest, sx: { width: 44, height: 44 }, children: (0, jsx_runtime_1.jsx)(DeleteOutlineRounded_1.default, {}) }) })) : null] })) : undefined), contentTouchHandlers: contentTouchHandlers, contentSx: { pt: 0.5, pb: 3, overscrollBehaviorY: "contain" }, exclusive: false, onClose: onClose, onEntered: () => {
|
|
51
56
|
// Entry focus runs after MUI settles its focus trap, including a reopen
|
|
52
57
|
// of the same inspector. A removed group retains the shell's fallback.
|
|
53
58
|
const target = returnItemButton.current;
|
|
@@ -71,16 +76,15 @@ function PendingChangesDialogView({ groups, open, onClose, title, summary, empty
|
|
|
71
76
|
}, children: (0, jsx_runtime_1.jsxs)(material_1.Stack, { spacing: 0, sx: { minWidth: 0, width: "100%" }, children: [(0, jsx_runtime_1.jsxs)(material_1.Stack, { direction: "row", spacing: 1, sx: {
|
|
72
77
|
alignItems: "center",
|
|
73
78
|
justifyContent: "space-between",
|
|
74
|
-
}, children: [(0, jsx_runtime_1.jsx)(material_1.
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
}, variant: "body2", children: title }) }), (0, jsx_runtime_1.jsx)(material_1.Stack, { direction: "row", spacing: 0.5, sx: { alignItems: "center", flexShrink: 0, position: "absolute", right: 8, top: group.rows.length ? 32 : 4 }, children: group.openLabel && onOpenItem ? ((0, jsx_runtime_1.jsx)(material_1.Tooltip, { title: unavailableReason || group.openLabel, children: (0, jsx_runtime_1.jsx)("span", { tabIndex: unavailableReason ? 0 : undefined, "aria-label": unavailableReason
|
|
79
|
+
}, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { component: "h3", sx: {
|
|
80
|
+
flex: 1,
|
|
81
|
+
minWidth: 0,
|
|
82
|
+
fontWeight: 600,
|
|
83
|
+
overflowWrap: "anywhere",
|
|
84
|
+
}, variant: "body2", children: title }), (0, jsx_runtime_1.jsx)(material_1.Stack, { direction: "row", spacing: 0.5, sx: {
|
|
85
|
+
alignItems: "center",
|
|
86
|
+
flexShrink: 0,
|
|
87
|
+
}, children: group.openLabel && onOpenItem ? ((0, jsx_runtime_1.jsx)(material_1.Tooltip, { title: unavailableReason || group.openLabel, children: (0, jsx_runtime_1.jsx)("span", { tabIndex: unavailableReason ? 0 : undefined, "aria-label": unavailableReason
|
|
84
88
|
? `${group.openLabel} unavailable. ${unavailableReason}`
|
|
85
89
|
: undefined, children: (0, jsx_runtime_1.jsx)(material_1.IconButton, { "aria-label": `${group.openLabel}: ${title}`, disabled: Boolean(unavailableReason), ref: focusGroupKey === group.key
|
|
86
90
|
? returnItemButton
|
|
@@ -93,27 +97,33 @@ function PendingChangesDialogView({ groups, open, onClose, title, summary, empty
|
|
|
93
97
|
!exception &&
|
|
94
98
|
!presentation.targetLabel &&
|
|
95
99
|
!presentation.elapsedText &&
|
|
96
|
-
presentation.attemptedText === undefined
|
|
100
|
+
presentation.attemptedText === undefined &&
|
|
101
|
+
!presentation.endAction)
|
|
97
102
|
return null;
|
|
98
|
-
return ((0, jsx_runtime_1.
|
|
99
|
-
display: "
|
|
103
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.ListItem, { disableGutters: true, sx: {
|
|
104
|
+
display: "flex",
|
|
105
|
+
alignItems: "center",
|
|
106
|
+
gap: 1,
|
|
100
107
|
py: 1,
|
|
101
108
|
borderTop: index > 0 ? 1 : 0,
|
|
102
109
|
borderColor: "divider",
|
|
103
|
-
}, children: (0, jsx_runtime_1.jsxs)(material_1.Stack, { spacing: 0.75, children: [(0, jsx_runtime_1.jsxs)(material_1.Stack, { direction: "row", spacing: 1, sx: {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
110
|
+
}, children: [(0, jsx_runtime_1.jsxs)(material_1.Stack, { spacing: 0.75, sx: { flex: 1, minWidth: 0 }, children: [(0, jsx_runtime_1.jsxs)(material_1.Stack, { direction: "row", spacing: 1, sx: {
|
|
111
|
+
alignItems: "baseline",
|
|
112
|
+
justifyContent: "space-between",
|
|
113
|
+
flexWrap: "wrap",
|
|
114
|
+
}, children: [presentation.action ? ((0, jsx_runtime_1.jsx)(material_1.Typography, { component: "h4", color: "text.secondary", variant: "caption", children: presentation.action })) : null, exception ? ((0, jsx_runtime_1.jsx)(material_1.Typography, { color: item.needsAttention
|
|
115
|
+
? "error"
|
|
116
|
+
: "text.secondary", variant: "caption", children: exception })) : null] }), presentation.elapsedText ? ((0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "caption", sx: {
|
|
117
|
+
fontSize: "0.6875rem",
|
|
118
|
+
color: "text.primary",
|
|
119
|
+
opacity: 0.78,
|
|
120
|
+
}, children: presentation.elapsedText })) : null, presentation.targetLabel ? ((0, jsx_runtime_1.jsx)(material_1.Typography, { color: "text.secondary", variant: "caption", sx: {
|
|
121
|
+
overflowWrap: "anywhere",
|
|
122
|
+
whiteSpace: "pre-wrap",
|
|
123
|
+
}, children: presentation.targetLabel })) : null, presentation.attemptedText !== undefined ? ((0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body1", sx: {
|
|
124
|
+
whiteSpace: "pre-wrap",
|
|
125
|
+
overflowWrap: "anywhere",
|
|
126
|
+
}, children: presentation.attemptedText })) : null] }), presentation.endAction] }, item.id));
|
|
117
127
|
}) }), actionPageCount > 1 ? ((0, jsx_runtime_1.jsx)(material_1.Pagination, { "aria-label": `Change pages for ${group.title}`, count: actionPageCount, page: actionPage, onChange: (_event, nextPage) => setActionPages((previous) => ({
|
|
118
128
|
...previous,
|
|
119
129
|
[group.key]: nextPage,
|
|
@@ -7,7 +7,7 @@ import { createPortal } from "react-dom";
|
|
|
7
7
|
* a validated destination. The source previews/edits; the card navigates. */
|
|
8
8
|
export function useLinkAddressPreview(enabled = true, onEdit) {
|
|
9
9
|
const id = useId();
|
|
10
|
-
const
|
|
10
|
+
const pointerPreview = useRef(null);
|
|
11
11
|
const [preview, setPreview] = useState(null);
|
|
12
12
|
const closeTimer = useRef(null);
|
|
13
13
|
const focusFrame = useRef(null);
|
|
@@ -19,7 +19,7 @@ export function useLinkAddressPreview(enabled = true, onEdit) {
|
|
|
19
19
|
function close() {
|
|
20
20
|
cancelClose();
|
|
21
21
|
setPreview(null);
|
|
22
|
-
|
|
22
|
+
pointerPreview.current = null;
|
|
23
23
|
}
|
|
24
24
|
function contains(target) {
|
|
25
25
|
var _a;
|
|
@@ -94,6 +94,12 @@ export function useLinkAddressPreview(enabled = true, onEdit) {
|
|
|
94
94
|
? {
|
|
95
95
|
"aria-controls": (preview === null || preview === void 0 ? void 0 : preview.href) === href ? id : undefined,
|
|
96
96
|
"aria-keyshortcuts": "ArrowDown",
|
|
97
|
+
onPointerDown: (event) => {
|
|
98
|
+
pointerPreview.current = {
|
|
99
|
+
anchor: event.currentTarget,
|
|
100
|
+
visible: (preview === null || preview === void 0 ? void 0 : preview.anchor) === event.currentTarget,
|
|
101
|
+
};
|
|
102
|
+
},
|
|
97
103
|
onMouseEnter: (event) => show(event.currentTarget, href, label),
|
|
98
104
|
onMouseLeave: scheduleClose,
|
|
99
105
|
onFocus: (event) => show(event.currentTarget, href, label),
|
|
@@ -118,6 +124,7 @@ export function useLinkAddressPreview(enabled = true, onEdit) {
|
|
|
118
124
|
: {};
|
|
119
125
|
},
|
|
120
126
|
onClick(event, href, label) {
|
|
127
|
+
var _a;
|
|
121
128
|
event.stopPropagation();
|
|
122
129
|
if (!enabled ||
|
|
123
130
|
event.metaKey ||
|
|
@@ -126,16 +133,19 @@ export function useLinkAddressPreview(enabled = true, onEdit) {
|
|
|
126
133
|
event.altKey ||
|
|
127
134
|
event.button !== 0)
|
|
128
135
|
return;
|
|
129
|
-
//
|
|
136
|
+
// Product decision: an already visible preview makes its source editable.
|
|
137
|
+
// Capture pointer state before click-induced focus can reveal the preview.
|
|
138
|
+
const wasVisible = event.detail > 0 &&
|
|
139
|
+
((_a = pointerPreview.current) === null || _a === void 0 ? void 0 : _a.anchor) === event.currentTarget
|
|
140
|
+
? pointerPreview.current.visible
|
|
141
|
+
: (preview === null || preview === void 0 ? void 0 : preview.anchor) === event.currentTarget;
|
|
142
|
+
pointerPreview.current = null;
|
|
130
143
|
event.preventDefault();
|
|
131
|
-
if (
|
|
132
|
-
activated.current === event.currentTarget &&
|
|
133
|
-
onEdit) {
|
|
144
|
+
if (wasVisible && onEdit) {
|
|
134
145
|
close();
|
|
135
146
|
onEdit();
|
|
136
147
|
}
|
|
137
148
|
else {
|
|
138
|
-
activated.current = event.currentTarget;
|
|
139
149
|
show(event.currentTarget, href, label);
|
|
140
150
|
}
|
|
141
151
|
},
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import AddLocationAltOutlinedIcon from "@mui/icons-material/AddLocationAltOutlined";
|
|
4
|
+
import EditLocationAltOutlinedIcon from "@mui/icons-material/EditLocationAltOutlined";
|
|
5
|
+
import ClearIcon from "@mui/icons-material/Clear";
|
|
6
|
+
import { IconButton, Link, Tooltip, Typography } from "@mui/material";
|
|
7
|
+
import { useEffect, useState } from "react";
|
|
8
|
+
import { MetadataValueField } from "./MetadataValueField.js";
|
|
9
|
+
import { VenueSearchDialog, } from "./VenueSearchDialog.js";
|
|
10
|
+
const defaultCopy = {
|
|
11
|
+
fieldLabel: "Geographic location",
|
|
12
|
+
empty: "No location selected",
|
|
13
|
+
choose: "Choose venue",
|
|
14
|
+
change: "Change venue",
|
|
15
|
+
clear: "Clear location",
|
|
16
|
+
openMaps: (label) => `Open in Google Maps: ${label}`,
|
|
17
|
+
};
|
|
18
|
+
function isGoogleMapsUrl(value) {
|
|
19
|
+
try {
|
|
20
|
+
const url = new URL(value);
|
|
21
|
+
return (url.protocol === "https:" &&
|
|
22
|
+
(url.hostname === "maps.google.com" ||
|
|
23
|
+
(["google.com", "www.google.com"].includes(url.hostname) &&
|
|
24
|
+
url.pathname.startsWith("/maps"))));
|
|
25
|
+
}
|
|
26
|
+
catch {
|
|
27
|
+
return false;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
/** Host adapters supply persisted values, copy behavior and an authorized lookup. */
|
|
31
|
+
export function GeographicLocationField({ value, placeName = "", disabled = false, canSearch = true, copyAction, copy, pickerCopy, searchVenues, onChange, }) {
|
|
32
|
+
const [editing, setEditing] = useState(false);
|
|
33
|
+
const labels = { ...defaultCopy, ...copy };
|
|
34
|
+
const safeMapUrl = value && isGoogleMapsUrl(value.mapsUrl);
|
|
35
|
+
useEffect(() => {
|
|
36
|
+
if (value && !safeMapUrl)
|
|
37
|
+
console.error("[Geographic location] Invalid Maps URL; displaying the label without a link.");
|
|
38
|
+
}, [value, safeMapUrl]);
|
|
39
|
+
return (_jsxs(_Fragment, { children: [_jsx(MetadataValueField, { label: labels.fieldLabel, actions: _jsxs(_Fragment, { children: [value && safeMapUrl ? copyAction : null, onChange ? (_jsxs(_Fragment, { children: [_jsx(Tooltip, { title: value ? labels.change : labels.choose, children: _jsx("span", { children: _jsx(IconButton, { size: "small", disabled: disabled, "aria-label": value ? labels.change : labels.choose, onClick: () => setEditing(true), children: value ? (_jsx(EditLocationAltOutlinedIcon, { fontSize: "small" })) : (_jsx(AddLocationAltOutlinedIcon, { fontSize: "small" })) }) }) }), value ? (_jsx(Tooltip, { title: labels.clear, children: _jsx("span", { children: _jsx(IconButton, { size: "small", disabled: disabled, "aria-label": labels.clear, onClick: () => onChange(undefined), children: _jsx(ClearIcon, { fontSize: "small" }) }) }) })) : null] })) : null] }), children: value && safeMapUrl ? (_jsx(Link, { href: value.mapsUrl, target: "_blank", rel: "noopener noreferrer", "aria-label": labels.openMaps(value.label), sx: { flex: 1, overflowWrap: "anywhere", minWidth: 0 }, children: value.label })) : (_jsx(Typography, { sx: { flex: 1, minWidth: 0 }, color: value ? undefined : "text.secondary", children: value ? value.label : labels.empty })) }), editing && !disabled ? (_jsx(VenueSearchDialog, { placeName: placeName, copy: pickerCopy, canSearch: canSearch, searchVenues: searchVenues, onClose: () => setEditing(false), onChange: (selected) => {
|
|
40
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(selected);
|
|
41
|
+
setEditing(false);
|
|
42
|
+
} })) : null] }));
|
|
43
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Box } from "@mui/material";
|
|
4
|
+
// Official Google Maps attribution assets; bytes are kept unmodified.
|
|
5
|
+
const whiteLogo = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI2LjUuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb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xLjUKCQljMCwwLjc1LTAuMzEsMS4zNy0wLjkyLDEuODdDOTYuNDcsMTMuNzEsOTUuNjgsMTMuOTYsOTQuNzEsMTMuOTZ6Ii8+CjwvZz4KPC9zdmc+Cg==";
|
|
7
|
+
export function GoogleMapsAttribution() {
|
|
8
|
+
return (_jsxs(Box, { component: "span", "data-google-maps-attribution": "true", sx: { display: "block", pt: "10px", px: "10px", pb: "5px" }, children: [_jsx(Box, { component: "img", alt: "Google Maps", src: darkLogo, sx: { display: (theme) => theme.palette.mode === "light" ? "block" : "none", width: "auto", height: 16 } }), _jsx(Box, { component: "img", alt: "Google Maps", src: whiteLogo, sx: { display: (theme) => theme.palette.mode === "dark" ? "block" : "none", width: "auto", height: 16 } })] }));
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Stack } from "@mui/material";
|
|
4
|
+
/** Keep each label close to its value and separate neighboring fields. */
|
|
5
|
+
export const METADATA_FIELD_LABEL_SPACING = 0.25;
|
|
6
|
+
export const METADATA_FIELD_GROUP_SPACING = 2.5;
|
|
7
|
+
export function MetadataFieldGroup(props) {
|
|
8
|
+
return _jsx(Stack, { spacing: METADATA_FIELD_GROUP_SPACING, ...props });
|
|
9
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Box, Stack, Typography } from "@mui/material";
|
|
4
|
+
import { METADATA_FIELD_LABEL_SPACING } from "./MetadataFieldGroup.js";
|
|
5
|
+
// Shared recipes preserve the field's label rhythm and underlined value row.
|
|
6
|
+
export const metadataFieldLabelSx = {
|
|
7
|
+
color: "text.secondary",
|
|
8
|
+
fontSize: "0.75rem",
|
|
9
|
+
fontWeight: 700,
|
|
10
|
+
letterSpacing: "0.04em",
|
|
11
|
+
lineHeight: 1.2,
|
|
12
|
+
textTransform: "uppercase",
|
|
13
|
+
};
|
|
14
|
+
export const metadataValueRowSx = {
|
|
15
|
+
alignItems: "center",
|
|
16
|
+
borderBottom: 1,
|
|
17
|
+
borderColor: "divider",
|
|
18
|
+
minHeight: 40,
|
|
19
|
+
minWidth: 0,
|
|
20
|
+
};
|
|
21
|
+
export function MetadataValueField({ label, children, actions, }) {
|
|
22
|
+
return (_jsxs(Stack, { spacing: METADATA_FIELD_LABEL_SPACING, sx: { minWidth: 0 }, children: [_jsx(Typography, { component: "span", variant: "caption", sx: metadataFieldLabelSx, children: label }), _jsxs(Stack, { direction: "row", spacing: 0.5, sx: metadataValueRowSx, children: [_jsx(Box, { sx: { flex: 1, minWidth: 0, overflowWrap: "anywhere" }, children: children }), actions] })] }));
|
|
23
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import SearchIcon from "@mui/icons-material/Search";
|
|
4
|
+
import { InputAdornment, Tooltip } from "@mui/material";
|
|
5
|
+
import { LoadingIconButton } from "../actions/LoadingIconButton.js";
|
|
6
|
+
export function SearchInputAction({ label, loadingLabel, loading = false, disabled = false, onSearch, }) {
|
|
7
|
+
return (_jsx(InputAdornment, { position: "end", children: _jsx(Tooltip, { title: loading ? loadingLabel : label, children: _jsx("span", { children: _jsx(LoadingIconButton, { "aria-label": label, loadingLabel: loadingLabel, loading: loading, disabled: disabled, onClick: onSearch, type: "button", edge: "end", children: _jsx(SearchIcon, {}) }) }) }) }));
|
|
8
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Chip } from "@mui/material";
|
|
4
|
+
export function TemplateBadge({ label = "Template" }) {
|
|
5
|
+
return (_jsx(Chip, { component: "span", label: label, size: "small", sx: { flex: "0 0 auto", fontSize: "0.68rem", height: 20, ml: 1 } }));
|
|
6
|
+
}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { Dialog, DialogContent, DialogTitle, List, ListItemButton, ListItemText, Stack, TextField, Typography, } from "@mui/material";
|
|
4
|
+
import { useEffect, useId, useRef, useState } from "react";
|
|
5
|
+
import { DialogCloseButton } from "../actions/DialogActionButtons.js";
|
|
6
|
+
import { StatusNotice } from "../feedback/StatusNotice.js";
|
|
7
|
+
import { SearchInputAction } from "./SearchInputAction.js";
|
|
8
|
+
import { GoogleMapsAttribution } from "./GoogleMapsAttribution.js";
|
|
9
|
+
const defaultCopy = {
|
|
10
|
+
title: "Choose a venue",
|
|
11
|
+
close: "Close venue search",
|
|
12
|
+
queryLabel: "Venue name",
|
|
13
|
+
queryHelp: "Add a city or country to narrow the matches.",
|
|
14
|
+
queryTooLong: "Use a shorter venue name (up to 200 characters).",
|
|
15
|
+
search: "Search venues",
|
|
16
|
+
searching: "Searching venues",
|
|
17
|
+
loading: "Finding venues…",
|
|
18
|
+
resultsLabel: "Matching venues",
|
|
19
|
+
chooseResult: "Select the right venue, or adjust the name and search again.",
|
|
20
|
+
noResults: "No venues found. Add a city or country to the name and search again.",
|
|
21
|
+
failure: "Couldn't load venues. Your current location is unchanged.",
|
|
22
|
+
};
|
|
23
|
+
export function VenueSearchDialog({ placeName = "", canSearch = true, searchVenues, copy, onClose, onChange, }) {
|
|
24
|
+
const titleId = useId();
|
|
25
|
+
const labels = { ...defaultCopy, ...copy };
|
|
26
|
+
const [query, setQuery] = useState(placeName);
|
|
27
|
+
const [venues, setVenues] = useState(null);
|
|
28
|
+
const [pending, setPending] = useState(false);
|
|
29
|
+
const [message, setMessage] = useState(null);
|
|
30
|
+
const generation = useRef(0);
|
|
31
|
+
const busy = useRef(false);
|
|
32
|
+
useEffect(() => () => {
|
|
33
|
+
generation.current++;
|
|
34
|
+
}, []);
|
|
35
|
+
async function search() {
|
|
36
|
+
const name = query.trim();
|
|
37
|
+
if (busy.current || !canSearch || name.length < 2 || name.length > 200)
|
|
38
|
+
return;
|
|
39
|
+
const current = ++generation.current;
|
|
40
|
+
busy.current = true;
|
|
41
|
+
setPending(true);
|
|
42
|
+
setMessage(null);
|
|
43
|
+
setVenues(null);
|
|
44
|
+
try {
|
|
45
|
+
// A deliberate Search is one billable lookup. Never search per keystroke,
|
|
46
|
+
// auto-select the first prediction, or persist Google's returned address.
|
|
47
|
+
const result = await searchVenues(name);
|
|
48
|
+
if (!Array.isArray(result))
|
|
49
|
+
throw new Error("Venue search returned an invalid result list.");
|
|
50
|
+
// Keep the picker bounded and never allow malformed provider IDs to be selected.
|
|
51
|
+
const choices = result
|
|
52
|
+
.slice(0, 5)
|
|
53
|
+
.filter((venue) => venue &&
|
|
54
|
+
typeof venue.placeId === "string" &&
|
|
55
|
+
venue.placeId.length > 0 &&
|
|
56
|
+
venue.placeId.length <= 512 &&
|
|
57
|
+
!/[\s\u0000-\u001f\u007f]/u.test(venue.placeId) &&
|
|
58
|
+
typeof venue.name === "string" &&
|
|
59
|
+
venue.name.trim().length > 0 &&
|
|
60
|
+
(venue.address === undefined || typeof venue.address === "string"));
|
|
61
|
+
if (current === generation.current)
|
|
62
|
+
setVenues(choices);
|
|
63
|
+
}
|
|
64
|
+
catch (error) {
|
|
65
|
+
if (current === generation.current) {
|
|
66
|
+
console.error("[Place venue search] Could not load venue choices; the selected location is unchanged.", { error });
|
|
67
|
+
setMessage(labels.failure);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
finally {
|
|
71
|
+
if (current === generation.current) {
|
|
72
|
+
busy.current = false;
|
|
73
|
+
setPending(false);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
return (_jsxs(Dialog, { open: true, fullWidth: true, maxWidth: "sm", "aria-labelledby": titleId, onClose: onClose, children: [_jsxs(DialogTitle, { sx: { pr: 7 }, children: [_jsx("span", { id: titleId, children: labels.title }), _jsx(GoogleMapsAttribution, {})] }), _jsx(DialogCloseButton, { label: labels.close, onClose: onClose }), _jsx(DialogContent, { children: _jsxs(Stack, { spacing: 2, sx: { pt: 1 }, children: [_jsx(TextField, { autoFocus: true, fullWidth: true, label: labels.queryLabel, value: query, error: query.trim().length > 200, helperText: query.trim().length > 200 ? labels.queryTooLong : labels.queryHelp, slotProps: {
|
|
78
|
+
htmlInput: { maxLength: 200 },
|
|
79
|
+
input: {
|
|
80
|
+
// Product decision: explicit search lives inside the field;
|
|
81
|
+
// Enter and this icon share one guarded request path.
|
|
82
|
+
endAdornment: (_jsx(SearchInputAction, { label: labels.search, loadingLabel: labels.searching, loading: pending, disabled: !canSearch ||
|
|
83
|
+
query.trim().length < 2 ||
|
|
84
|
+
query.trim().length > 200, onSearch: () => void search() })),
|
|
85
|
+
},
|
|
86
|
+
}, onChange: (event) => {
|
|
87
|
+
generation.current++;
|
|
88
|
+
busy.current = false;
|
|
89
|
+
setPending(false);
|
|
90
|
+
setQuery(event.target.value);
|
|
91
|
+
setVenues(null);
|
|
92
|
+
setMessage(null);
|
|
93
|
+
}, onKeyDown: (event) => {
|
|
94
|
+
if (event.key === "Enter" && !event.nativeEvent.isComposing) {
|
|
95
|
+
event.preventDefault();
|
|
96
|
+
void search();
|
|
97
|
+
}
|
|
98
|
+
} }), message ? _jsx(StatusNotice, { message: message, tone: "error" }) : null, _jsxs("div", { "aria-live": "polite", "aria-busy": pending, children: [pending ? (_jsx(Typography, { variant: "body2", color: "text.secondary", children: labels.loading })) : null, venues !== null ? (_jsx(Stack, { spacing: 1, children: venues.length ? (_jsxs(_Fragment, { children: [_jsx(Typography, { variant: "body2", children: labels.chooseResult }), _jsx(List, { disablePadding: true, "aria-label": labels.resultsLabel, children: venues.map((venue) => (_jsx(ListItemButton, { component: "button", type: "button", sx: {
|
|
99
|
+
width: "100%",
|
|
100
|
+
textAlign: "left",
|
|
101
|
+
borderRadius: 1,
|
|
102
|
+
}, onClick: () => onChange({
|
|
103
|
+
provider: "google",
|
|
104
|
+
placeId: venue.placeId,
|
|
105
|
+
}), children: _jsx(ListItemText, { primary: venue.name, secondary: venue.address, slotProps: {
|
|
106
|
+
primary: { sx: { overflowWrap: "anywhere" } },
|
|
107
|
+
secondary: { sx: { overflowWrap: "anywhere" } },
|
|
108
|
+
} }) }, venue.placeId))) })] })) : (_jsx(Typography, { variant: "body2", children: labels.noResults })) })) : null] })] }) })] }));
|
|
109
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
export { VenueSearchDialog, } from "./VenueSearchDialog.js";
|
|
3
|
+
export { SearchInputAction, } from "./SearchInputAction.js";
|
|
4
|
+
export { MetadataValueField, metadataFieldLabelSx, metadataValueRowSx, } from "./MetadataValueField.js";
|
|
5
|
+
export { GeographicLocationField, } from "./GeographicLocationField.js";
|
|
6
|
+
export { TemplateBadge } from "./TemplateBadge.js";
|
|
7
|
+
export { MetadataFieldGroup, METADATA_FIELD_GROUP_SPACING, METADATA_FIELD_LABEL_SPACING, } from "./MetadataFieldGroup.js";
|
|
@@ -41,7 +41,12 @@ export function PendingChangesDialogView({ groups, open, onClose, title, summary
|
|
|
41
41
|
return (_jsxs(Shell, { autoFocusInput: false, closeLabel: "Close pending changes", closeTooltip: "Close pending changes", contentHeader: contentHeader !== null && contentHeader !== void 0 ? contentHeader : (groups.length ? (
|
|
42
42
|
// Product decision: the sync summary remains distinct and visible
|
|
43
43
|
// while the user scrolls through pending groups.
|
|
44
|
-
_jsxs(Stack, { component: "section", "aria-label": "Pending changes summary", direction: "row", spacing: 1, sx: {
|
|
44
|
+
_jsxs(Stack, { component: "section", "aria-label": "Pending changes summary", direction: "row", spacing: 1, sx: {
|
|
45
|
+
p: 2,
|
|
46
|
+
borderRadius: 1,
|
|
47
|
+
bgcolor: "action.selected",
|
|
48
|
+
alignItems: "center",
|
|
49
|
+
}, children: [_jsx(Typography, { variant: "body2", sx: { fontWeight: 600, flex: 1 }, children: summary }), onDiscardRequest ? (_jsx(Tooltip, { title: discardLabel, children: _jsx(IconButton, { "aria-label": discardLabel, onClick: onDiscardRequest, sx: { width: 44, height: 44 }, children: _jsx(DeleteOutlineRoundedIcon, {}) }) })) : null] })) : undefined), contentTouchHandlers: contentTouchHandlers, contentSx: { pt: 0.5, pb: 3, overscrollBehaviorY: "contain" }, exclusive: false, onClose: onClose, onEntered: () => {
|
|
45
50
|
// Entry focus runs after MUI settles its focus trap, including a reopen
|
|
46
51
|
// of the same inspector. A removed group retains the shell's fallback.
|
|
47
52
|
const target = returnItemButton.current;
|
|
@@ -65,16 +70,15 @@ export function PendingChangesDialogView({ groups, open, onClose, title, summary
|
|
|
65
70
|
}, children: _jsxs(Stack, { spacing: 0, sx: { minWidth: 0, width: "100%" }, children: [_jsxs(Stack, { direction: "row", spacing: 1, sx: {
|
|
66
71
|
alignItems: "center",
|
|
67
72
|
justifyContent: "space-between",
|
|
68
|
-
}, children: [_jsx(
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
}, variant: "body2", children: title }) }), _jsx(Stack, { direction: "row", spacing: 0.5, sx: { alignItems: "center", flexShrink: 0, position: "absolute", right: 8, top: group.rows.length ? 32 : 4 }, children: group.openLabel && onOpenItem ? (_jsx(Tooltip, { title: unavailableReason || group.openLabel, children: _jsx("span", { tabIndex: unavailableReason ? 0 : undefined, "aria-label": unavailableReason
|
|
73
|
+
}, children: [_jsx(Typography, { component: "h3", sx: {
|
|
74
|
+
flex: 1,
|
|
75
|
+
minWidth: 0,
|
|
76
|
+
fontWeight: 600,
|
|
77
|
+
overflowWrap: "anywhere",
|
|
78
|
+
}, variant: "body2", children: title }), _jsx(Stack, { direction: "row", spacing: 0.5, sx: {
|
|
79
|
+
alignItems: "center",
|
|
80
|
+
flexShrink: 0,
|
|
81
|
+
}, children: group.openLabel && onOpenItem ? (_jsx(Tooltip, { title: unavailableReason || group.openLabel, children: _jsx("span", { tabIndex: unavailableReason ? 0 : undefined, "aria-label": unavailableReason
|
|
78
82
|
? `${group.openLabel} unavailable. ${unavailableReason}`
|
|
79
83
|
: undefined, children: _jsx(IconButton, { "aria-label": `${group.openLabel}: ${title}`, disabled: Boolean(unavailableReason), ref: focusGroupKey === group.key
|
|
80
84
|
? returnItemButton
|
|
@@ -87,27 +91,33 @@ export function PendingChangesDialogView({ groups, open, onClose, title, summary
|
|
|
87
91
|
!exception &&
|
|
88
92
|
!presentation.targetLabel &&
|
|
89
93
|
!presentation.elapsedText &&
|
|
90
|
-
presentation.attemptedText === undefined
|
|
94
|
+
presentation.attemptedText === undefined &&
|
|
95
|
+
!presentation.endAction)
|
|
91
96
|
return null;
|
|
92
|
-
return (
|
|
93
|
-
display: "
|
|
97
|
+
return (_jsxs(ListItem, { disableGutters: true, sx: {
|
|
98
|
+
display: "flex",
|
|
99
|
+
alignItems: "center",
|
|
100
|
+
gap: 1,
|
|
94
101
|
py: 1,
|
|
95
102
|
borderTop: index > 0 ? 1 : 0,
|
|
96
103
|
borderColor: "divider",
|
|
97
|
-
}, children: _jsxs(Stack, { spacing: 0.75, children: [_jsxs(Stack, { direction: "row", spacing: 1, sx: {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
104
|
+
}, children: [_jsxs(Stack, { spacing: 0.75, sx: { flex: 1, minWidth: 0 }, children: [_jsxs(Stack, { direction: "row", spacing: 1, sx: {
|
|
105
|
+
alignItems: "baseline",
|
|
106
|
+
justifyContent: "space-between",
|
|
107
|
+
flexWrap: "wrap",
|
|
108
|
+
}, children: [presentation.action ? (_jsx(Typography, { component: "h4", color: "text.secondary", variant: "caption", children: presentation.action })) : null, exception ? (_jsx(Typography, { color: item.needsAttention
|
|
109
|
+
? "error"
|
|
110
|
+
: "text.secondary", variant: "caption", children: exception })) : null] }), presentation.elapsedText ? (_jsx(Typography, { variant: "caption", sx: {
|
|
111
|
+
fontSize: "0.6875rem",
|
|
112
|
+
color: "text.primary",
|
|
113
|
+
opacity: 0.78,
|
|
114
|
+
}, children: presentation.elapsedText })) : null, presentation.targetLabel ? (_jsx(Typography, { color: "text.secondary", variant: "caption", sx: {
|
|
115
|
+
overflowWrap: "anywhere",
|
|
116
|
+
whiteSpace: "pre-wrap",
|
|
117
|
+
}, children: presentation.targetLabel })) : null, presentation.attemptedText !== undefined ? (_jsx(Typography, { variant: "body1", sx: {
|
|
118
|
+
whiteSpace: "pre-wrap",
|
|
119
|
+
overflowWrap: "anywhere",
|
|
120
|
+
}, children: presentation.attemptedText })) : null] }), presentation.endAction] }, item.id));
|
|
111
121
|
}) }), actionPageCount > 1 ? (_jsx(Pagination, { "aria-label": `Change pages for ${group.title}`, count: actionPageCount, page: actionPage, onChange: (_event, nextPage) => setActionPages((previous) => ({
|
|
112
122
|
...previous,
|
|
113
123
|
[group.key]: nextPage,
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { type FocusEvent, type KeyboardEvent, type MouseEvent } from "react";
|
|
1
|
+
import { type FocusEvent, type KeyboardEvent, type MouseEvent, type PointerEvent as ReactPointerEvent } from "react";
|
|
2
2
|
/** Product decision: hosts own link interaction; the shared UI card only displays
|
|
3
3
|
* a validated destination. The source previews/edits; the card navigates. */
|
|
4
4
|
export declare function useLinkAddressPreview(enabled?: boolean, onEdit?: () => void): {
|
|
5
5
|
linkProps(href: string, label: string): {
|
|
6
6
|
"aria-controls": string | undefined;
|
|
7
7
|
"aria-keyshortcuts": string;
|
|
8
|
+
onPointerDown: (event: ReactPointerEvent<HTMLAnchorElement>) => void;
|
|
8
9
|
onMouseEnter: (event: MouseEvent<HTMLAnchorElement>) => void;
|
|
9
10
|
onMouseLeave: () => void;
|
|
10
11
|
onFocus: (event: FocusEvent<HTMLAnchorElement>) => void;
|
|
@@ -13,6 +14,7 @@ export declare function useLinkAddressPreview(enabled?: boolean, onEdit?: () =>
|
|
|
13
14
|
} | {
|
|
14
15
|
"aria-controls"?: undefined;
|
|
15
16
|
"aria-keyshortcuts"?: undefined;
|
|
17
|
+
onPointerDown?: undefined;
|
|
16
18
|
onMouseEnter?: undefined;
|
|
17
19
|
onMouseLeave?: undefined;
|
|
18
20
|
onFocus?: undefined;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import { type GoogleVenueReference, type VenueSuggestion, type VenueSearchCopy } from "./VenueSearchDialog.js";
|
|
3
|
+
export type GeographicLocationCopy = {
|
|
4
|
+
fieldLabel: string;
|
|
5
|
+
empty: string;
|
|
6
|
+
choose: string;
|
|
7
|
+
change: string;
|
|
8
|
+
clear: string;
|
|
9
|
+
openMaps: (label: string) => string;
|
|
10
|
+
};
|
|
11
|
+
export type GeographicLocationFieldProps = {
|
|
12
|
+
value?: {
|
|
13
|
+
label: string;
|
|
14
|
+
mapsUrl: string;
|
|
15
|
+
};
|
|
16
|
+
placeName?: string;
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
canSearch?: boolean;
|
|
19
|
+
copyAction?: ReactNode;
|
|
20
|
+
copy?: Partial<GeographicLocationCopy>;
|
|
21
|
+
pickerCopy?: Partial<VenueSearchCopy>;
|
|
22
|
+
searchVenues: (query: string) => Promise<VenueSuggestion[]>;
|
|
23
|
+
onChange?: (value: GoogleVenueReference | undefined) => void;
|
|
24
|
+
};
|
|
25
|
+
/** Host adapters supply persisted values, copy behavior and an authorized lookup. */
|
|
26
|
+
export declare function GeographicLocationField({ value, placeName, disabled, canSearch, copyAction, copy, pickerCopy, searchVenues, onChange, }: GeographicLocationFieldProps): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function GoogleMapsAttribution(): import("react").JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type StackProps } from "@mui/material";
|
|
2
|
+
/** Keep each label close to its value and separate neighboring fields. */
|
|
3
|
+
export declare const METADATA_FIELD_LABEL_SPACING = 0.25;
|
|
4
|
+
export declare const METADATA_FIELD_GROUP_SPACING = 2.5;
|
|
5
|
+
export declare function MetadataFieldGroup(props: StackProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
export declare const metadataFieldLabelSx: {
|
|
3
|
+
readonly color: "text.secondary";
|
|
4
|
+
readonly fontSize: "0.75rem";
|
|
5
|
+
readonly fontWeight: 700;
|
|
6
|
+
readonly letterSpacing: "0.04em";
|
|
7
|
+
readonly lineHeight: 1.2;
|
|
8
|
+
readonly textTransform: "uppercase";
|
|
9
|
+
};
|
|
10
|
+
export declare const metadataValueRowSx: {
|
|
11
|
+
readonly alignItems: "center";
|
|
12
|
+
readonly borderBottom: 1;
|
|
13
|
+
readonly borderColor: "divider";
|
|
14
|
+
readonly minHeight: 40;
|
|
15
|
+
readonly minWidth: 0;
|
|
16
|
+
};
|
|
17
|
+
/** Compact label/value row; consumers own actions, wording and persistence. */
|
|
18
|
+
export type MetadataValueFieldProps = {
|
|
19
|
+
label: ReactNode;
|
|
20
|
+
children: ReactNode;
|
|
21
|
+
actions?: ReactNode;
|
|
22
|
+
};
|
|
23
|
+
export declare function MetadataValueField({ label, children, actions, }: MetadataValueFieldProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** Shared trailing action for search text fields; typing never starts a lookup. */
|
|
2
|
+
export type SearchInputActionProps = {
|
|
3
|
+
label: string;
|
|
4
|
+
loadingLabel: string;
|
|
5
|
+
loading?: boolean;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
onSearch: () => void;
|
|
8
|
+
};
|
|
9
|
+
export declare function SearchInputAction({ label, loadingLabel, loading, disabled, onSearch, }: SearchInputActionProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export type VenueSuggestion = {
|
|
2
|
+
placeId: string;
|
|
3
|
+
name: string;
|
|
4
|
+
address?: string;
|
|
5
|
+
};
|
|
6
|
+
export type GoogleVenueReference = {
|
|
7
|
+
provider: "google";
|
|
8
|
+
placeId: string;
|
|
9
|
+
};
|
|
10
|
+
/** Hosts can localize all product copy; Google Maps attribution remains fixed. */
|
|
11
|
+
export type VenueSearchCopy = {
|
|
12
|
+
title: string;
|
|
13
|
+
close: string;
|
|
14
|
+
queryLabel: string;
|
|
15
|
+
queryHelp: string;
|
|
16
|
+
queryTooLong: string;
|
|
17
|
+
search: string;
|
|
18
|
+
searching: string;
|
|
19
|
+
loading: string;
|
|
20
|
+
resultsLabel: string;
|
|
21
|
+
chooseResult: string;
|
|
22
|
+
noResults: string;
|
|
23
|
+
failure: string;
|
|
24
|
+
};
|
|
25
|
+
export type VenueSearchDialogProps = {
|
|
26
|
+
placeName?: string;
|
|
27
|
+
canSearch?: boolean;
|
|
28
|
+
searchVenues: (query: string) => Promise<VenueSuggestion[]>;
|
|
29
|
+
copy?: Partial<VenueSearchCopy>;
|
|
30
|
+
onClose: () => void;
|
|
31
|
+
onChange: (pin: GoogleVenueReference) => void;
|
|
32
|
+
};
|
|
33
|
+
export declare function VenueSearchDialog({ placeName, canSearch, searchVenues, copy, onClose, onChange, }: VenueSearchDialogProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { VenueSearchDialog, type VenueSuggestion, type VenueSearchCopy, type VenueSearchDialogProps, type GoogleVenueReference, } from "./VenueSearchDialog.js";
|
|
2
|
+
export { SearchInputAction, type SearchInputActionProps, } from "./SearchInputAction.js";
|
|
3
|
+
export { MetadataValueField, metadataFieldLabelSx, metadataValueRowSx, type MetadataValueFieldProps, } from "./MetadataValueField.js";
|
|
4
|
+
export { GeographicLocationField, type GeographicLocationFieldProps, type GeographicLocationCopy, } from "./GeographicLocationField.js";
|
|
5
|
+
export { TemplateBadge, type TemplateBadgeProps } from "./TemplateBadge.js";
|
|
6
|
+
export { MetadataFieldGroup, METADATA_FIELD_GROUP_SPACING, METADATA_FIELD_LABEL_SPACING, } from "./MetadataFieldGroup.js";
|
|
@@ -10,6 +10,8 @@ export type PendingChangeRow = {
|
|
|
10
10
|
/** Host-formatted age of this change, refreshed by the host as needed. */
|
|
11
11
|
elapsedText?: string;
|
|
12
12
|
attemptedText?: string;
|
|
13
|
+
/** Host-owned action for this individual change. */
|
|
14
|
+
endAction?: ReactNode;
|
|
13
15
|
};
|
|
14
16
|
export type PendingChangeViewGroup = {
|
|
15
17
|
key: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bayonai/mui-design",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "Shared Bayon AI Material UI theme, style recipes, and reusable design components.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|
|
@@ -67,6 +67,11 @@
|
|
|
67
67
|
"types": "./dist/types/pricing/index.d.ts",
|
|
68
68
|
"import": "./dist/esm/pricing/index.js",
|
|
69
69
|
"require": "./dist/cjs/pricing/index.js"
|
|
70
|
+
},
|
|
71
|
+
"./location": {
|
|
72
|
+
"types": "./dist/types/location/index.d.ts",
|
|
73
|
+
"import": "./dist/esm/location/index.js",
|
|
74
|
+
"require": "./dist/cjs/location/index.js"
|
|
70
75
|
}
|
|
71
76
|
},
|
|
72
77
|
"files": [
|