@stapel/listings-react 0.7.0 → 0.8.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 +78 -0
- package/dist/api/generated/schema.d.ts +92 -2
- package/dist/api/generated/schema.d.ts.map +1 -1
- package/dist/default/ListingCard.d.ts +56 -0
- package/dist/default/ListingCard.d.ts.map +1 -1
- package/dist/default/ListingCard.js +92 -29
- package/dist/default/ListingCard.js.map +1 -1
- package/dist/headless/Favorites.d.ts.map +1 -1
- package/dist/headless/Favorites.js +19 -7
- package/dist/headless/Favorites.js.map +1 -1
- package/dist/headless/ListingDetail.d.ts.map +1 -1
- package/dist/headless/ListingDetail.js +7 -5
- package/dist/headless/ListingDetail.js.map +1 -1
- package/dist/headless/useMandateGate.d.ts +33 -2
- package/dist/headless/useMandateGate.d.ts.map +1 -1
- package/dist/headless/useMandateGate.js +42 -4
- package/dist/headless/useMandateGate.js.map +1 -1
- package/dist/i18n/es.d.ts.map +1 -1
- package/dist/i18n/es.js +2 -1
- package/dist/i18n/es.js.map +1 -1
- package/dist/i18n/generated/errors.es.gen.d.ts +1 -1
- package/dist/i18n/generated/errors.es.gen.js +1 -1
- package/dist/i18n/generated/errors.gen.d.ts +6 -0
- package/dist/i18n/generated/errors.gen.d.ts.map +1 -1
- package/dist/i18n/generated/errors.gen.js +3 -0
- package/dist/i18n/generated/errors.gen.js.map +1 -1
- package/dist/i18n/generated/errors.ru.gen.d.ts +1 -1
- package/dist/i18n/generated/errors.ru.gen.js +1 -1
- package/dist/i18n/keys.d.ts +11 -1
- package/dist/i18n/keys.d.ts.map +1 -1
- package/dist/i18n/keys.js +12 -2
- package/dist/i18n/keys.js.map +1 -1
- package/dist/i18n/ru.d.ts.map +1 -1
- package/dist/i18n/ru.js +2 -1
- package/dist/i18n/ru.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/llms.txt +3 -3
- package/manifest.json +30 -21
- package/nav-manifest.json +1 -1
- package/package.json +6 -6
- package/src/analytics/generated/events.json +1 -1
- package/src/api/generated/schema.ts +92 -2
- package/src/default/ListingCard.tsx +233 -108
- package/src/headless/Favorites.tsx +26 -7
- package/src/headless/ListingDetail.tsx +12 -5
- package/src/headless/useMandateGate.ts +49 -5
- package/src/i18n/es.ts +3 -1
- package/src/i18n/generated/errors.es.gen.ts +1 -1
- package/src/i18n/generated/errors.gen.ts +3 -0
- package/src/i18n/generated/errors.json +7 -0
- package/src/i18n/generated/errors.ru.gen.ts +1 -1
- package/src/i18n/keys.ts +12 -2
- package/src/i18n/ru.ts +3 -1
- package/src/index.ts +5 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Button, Card, Flex, Typography } from "antd";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { Button, Card, Flex, Typography, theme as antdTheme } from "antd";
|
|
3
3
|
import { GatedControl, SkinTheme } from "@stapel/tokens-antd/skin";
|
|
4
4
|
import { useActionGate, useT } from "@stapel/core";
|
|
5
5
|
import { spacing } from "@stapel/tokens";
|
|
@@ -12,42 +12,84 @@ import { HeartIcon } from "./icons.js";
|
|
|
12
12
|
import { SignInLink } from "./SignInLink.js";
|
|
13
13
|
import { ListingPhoto } from "./ListingPhoto.js";
|
|
14
14
|
import { ListingPrice } from "./ListingPrice.js";
|
|
15
|
+
/** The class the whole-card target carries, for {@link cardTargetCss}. */
|
|
16
|
+
export const CARD_TARGET_CLASS = "stapel-listing-card-target";
|
|
17
|
+
/** The `href` the hoisted card stylesheet is deduplicated by. */
|
|
18
|
+
export const CARD_TARGET_STYLE_HREF = "stapel-listings-card-target";
|
|
15
19
|
/**
|
|
16
|
-
* The one
|
|
20
|
+
* The one rule an inline style cannot express: `:focus-visible`.
|
|
21
|
+
*
|
|
22
|
+
* A whole-card link is the largest focus target on a results page and it must
|
|
23
|
+
* SHOW that it has focus — a keyboard visitor tabbing a grid of forty cards
|
|
24
|
+
* with no ring has no idea which one Enter will open. The outline is drawn
|
|
25
|
+
* from the theme's own focus colour, which arrives as a custom property on the
|
|
26
|
+
* element (the sheet is static, so one hoisted copy serves either theme).
|
|
27
|
+
*
|
|
28
|
+
* `--listing-*` rather than `--stapel-*`: the `--stapel-` namespace is the
|
|
29
|
+
* design system's ROLE catalogue and this is a component's private plumbing.
|
|
30
|
+
*/
|
|
31
|
+
export function cardTargetCss() {
|
|
32
|
+
return [
|
|
33
|
+
`.${CARD_TARGET_CLASS}{display:block;color:inherit;text-decoration:none}`,
|
|
34
|
+
`.${CARD_TARGET_CLASS}:focus-visible{outline:2px solid var(--listing-card-focus);outline-offset:2px}`,
|
|
35
|
+
].join("");
|
|
36
|
+
}
|
|
37
|
+
/** The anchor: a block that inherits the card's own type colour rather than
|
|
38
|
+
* painting every card's contents link-blue. */
|
|
39
|
+
const TARGET_STYLE = {
|
|
40
|
+
display: "block",
|
|
41
|
+
color: "inherit",
|
|
42
|
+
textDecoration: "none",
|
|
43
|
+
};
|
|
44
|
+
/** The callback arm's button, reset to look like the anchor does. A card that
|
|
45
|
+
* is a target on one deployment and a card-plus-a-button on another would be
|
|
46
|
+
* two different products. */
|
|
47
|
+
const BUTTON_TARGET_STYLE = {
|
|
48
|
+
...TARGET_STYLE,
|
|
49
|
+
width: "100%",
|
|
50
|
+
padding: 0,
|
|
51
|
+
border: "none",
|
|
52
|
+
background: "none",
|
|
53
|
+
font: "inherit",
|
|
54
|
+
textAlign: "start",
|
|
55
|
+
cursor: "pointer",
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* The card's own body, wrapped in whatever makes it openable: an anchor, a
|
|
59
|
+
* button, or nothing at all.
|
|
17
60
|
*
|
|
18
61
|
* Exactly one of the three renders, so exactly one navigation happens per
|
|
19
|
-
* click
|
|
20
|
-
*
|
|
62
|
+
* click — the branch below has no arm in which both a handler and an `href`
|
|
63
|
+
* reach the DOM.
|
|
21
64
|
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
65
|
+
* The BUTTON arm exists for a container that routes by callback. It wraps the
|
|
66
|
+
* same content in a `<button>` reset to look like nothing, rather than drawing
|
|
67
|
+
* a separate captioned control: a card that is a target on one deployment and
|
|
68
|
+
* a card-plus-a-button on another would be two different products.
|
|
26
69
|
*/
|
|
27
|
-
function
|
|
28
|
-
const
|
|
29
|
-
const label = t(LISTINGS_I18N_KEYS.cardOpen);
|
|
70
|
+
function CardTarget(props) {
|
|
71
|
+
const { label, children } = props;
|
|
30
72
|
if (props.href !== undefined) {
|
|
31
73
|
const Link = props.linkComponent;
|
|
32
74
|
// The host's component is rendered as it comes: this pair has no CSS and
|
|
33
|
-
// no way to hand
|
|
34
|
-
//
|
|
35
|
-
|
|
36
|
-
// written once, and it is already the thing that knows the design system.
|
|
37
|
-
return Link !== undefined ? (_jsx(Link, { href: props.href, "aria-label": label, "data-testid": "listings-card-open", "data-analytics": "none", "data-analytics-reason": "business action \u2014 host app wraps with its own tracked()", children: label })) : (_jsx(Button, { type: "primary", block: true, href: props.href, "data-testid": "listings-card-open", "data-analytics": "none", "data-analytics-reason": "business action \u2014 host app wraps with its own tracked()", children: label }));
|
|
75
|
+
// no way to hand its own styling to a foreign element. A wrapper element
|
|
76
|
+
// around a link would be a click target that is not the link.
|
|
77
|
+
return Link !== undefined ? (_jsx(Link, { href: props.href, "aria-label": label, className: CARD_TARGET_CLASS, "data-testid": "listings-card-open", "data-analytics": "none", "data-analytics-reason": "business action \u2014 host app wraps with its own tracked()", children: children })) : (_jsx("a", { href: props.href, "aria-label": label, className: CARD_TARGET_CLASS, style: TARGET_STYLE, "data-testid": "listings-card-open", "data-analytics": "none", "data-analytics-reason": "business action \u2014 host app wraps with its own tracked()", children: children }));
|
|
38
78
|
}
|
|
39
79
|
if (props.onOpen !== undefined) {
|
|
40
80
|
const onOpen = props.onOpen;
|
|
41
|
-
return (_jsx(
|
|
81
|
+
return (_jsx("button", { type: "button", "aria-label": label, className: CARD_TARGET_CLASS, style: BUTTON_TARGET_STYLE, "data-testid": "listings-card-open", "data-analytics": "none", "data-analytics-reason": "business action \u2014 host app wraps with its own tracked()", onClick: () => {
|
|
42
82
|
onOpen(props.listingId);
|
|
43
|
-
}, children:
|
|
83
|
+
}, children: children }));
|
|
44
84
|
}
|
|
45
|
-
|
|
85
|
+
// No open control at all — a card inside a screen that IS the listing.
|
|
86
|
+
return _jsx("div", { "data-testid": "listings-card-body", children: children });
|
|
46
87
|
}
|
|
47
88
|
export function ListingCard(props) {
|
|
48
89
|
const t = useT();
|
|
49
90
|
const { listing } = props;
|
|
50
91
|
const favorite = useFavoriteToggle(listing.id, listing.is_favorited);
|
|
92
|
+
const { token } = antdTheme.useToken();
|
|
51
93
|
const badgeDaos = asFeatureDaoList(listing.features_badges);
|
|
52
94
|
const badgeFeatures = featuresFromDaoList(badgeDaos);
|
|
53
95
|
const badgeValues = featuresDtoFromDaoList(badgeDaos);
|
|
@@ -58,14 +100,35 @@ export function ListingCard(props) {
|
|
|
58
100
|
const favoriteLabel = t(favorite.favorited
|
|
59
101
|
? LISTINGS_I18N_KEYS.cardFavoriteRemove
|
|
60
102
|
: LISTINGS_I18N_KEYS.cardFavoriteAdd);
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
103
|
+
const title = listing.title ?? "";
|
|
104
|
+
// The anchor's name is the TITLE and nothing else. A card with no title is
|
|
105
|
+
// still a link, and a link announced as nothing is worse than one announced
|
|
106
|
+
// as untitled.
|
|
107
|
+
const targetLabel = title.length > 0 ? title : t(LISTINGS_I18N_KEYS.cardUntitled);
|
|
108
|
+
/**
|
|
109
|
+
* Everything a person reads on the card, in the order a classified reads it:
|
|
110
|
+
* photo, price, title, the seller's own spec line, the badges, the place.
|
|
111
|
+
*
|
|
112
|
+
* The search projection carries `title`, `price`, `currency`,
|
|
113
|
+
* `location_label`, `image` and `published_at` and NO feature badges — so
|
|
114
|
+
* every line below is conditional and the card has to look deliberate with
|
|
115
|
+
* all of them absent. That is why the photo and the price carry the layout:
|
|
116
|
+
* they are the two fields a result always has.
|
|
117
|
+
*/
|
|
118
|
+
const content = (_jsxs(_Fragment, { children: [_jsx(ListingPhoto, { imageRef: listing.images?.[0], alt: title.length > 0 ? title : String(listing.id) }), _jsxs(Flex, { vertical: true, gap: spacing[1], style: { minWidth: 0, padding: token.paddingSM }, children: [props.badge, _jsx(Typography.Text, { strong: true, "data-testid": "listings-card-price", children: _jsx(ListingPrice, { amount: listing.price, ...(listing.currency !== undefined ? { currency: listing.currency } : {}) }) }), _jsx(Typography.Text, { ellipsis: true, "data-testid": "listings-card-title", children: title }), titleDaos.length > 0 ? (_jsx(Typography.Text, { type: "secondary", ellipsis: true, children: _jsx(FeatureBadges, { features: featuresFromDaoList(titleDaos).map((view) => view.feature), values: featuresDtoFromDaoList(titleDaos) }) })) : null, badgeFeatures.length > 0 ? (_jsx(FeatureBadges, { features: badgeFeatures.map((view) => view.feature), values: badgeValues })) : null, listing.location_label !== undefined &&
|
|
119
|
+
listing.location_label.length > 0 ? (_jsx(Typography.Text, { type: "secondary", "data-testid": "listings-card-location", children: listing.location_label })) : null] })] }));
|
|
120
|
+
return (_jsxs(SkinTheme, { surface: "bare", ...(props.mode !== undefined ? { mode: props.mode } : {}), children: [_jsx("style", { href: CARD_TARGET_STYLE_HREF, precedence: "default", children: cardTargetCss() }), _jsxs(Card, { size: "small", "data-testid": "listings-card", "data-listing-id": listing.id, ...(status !== undefined
|
|
121
|
+
? { "data-listing-status": status.status }
|
|
122
|
+
: {}),
|
|
123
|
+
// The body's own padding is zero because the ANCHOR fills the card:
|
|
124
|
+
// padding outside it would be a strip of card that looks pressable and
|
|
125
|
+
// is not. The text block inside the anchor carries the same padding
|
|
126
|
+
// back, from the same token.
|
|
127
|
+
styles: { body: { minWidth: 0, padding: 0 } }, style: { ["--listing-card-focus"]: token.colorPrimary }, children: [_jsx(CardTarget, { ...props, listingId: listing.id, label: targetLabel, children: content }), props.showFavorite === false ? null : (_jsxs("div", { style: {
|
|
128
|
+
paddingInline: token.paddingSM,
|
|
129
|
+
paddingBlockEnd: token.paddingSM,
|
|
130
|
+
}, children: [_jsx(GatedControl, { gate: favorite.gate, testId: "listings-card-actions", style: { width: "100%" }, children: (bind) => (_jsx(Flex, { justify: "flex-end", style: { width: "100%" }, children: _jsx(Button, { disabled: bind.disabled, "data-disabled-reason": "the enclosing <GatedControl> renders the gate's reason beside this button", ...(bind["aria-describedby"] !== undefined
|
|
131
|
+
? { "aria-describedby": bind["aria-describedby"] }
|
|
132
|
+
: {}), "aria-label": favoriteLabel, "aria-pressed": favorite.favorited, "data-testid": "listings-card-favorite", "data-favorited": String(favorite.favorited), "data-analytics": "none", "data-analytics-reason": "business action \u2014 host app wraps with its own tracked()", onClick: favorite.toggle, icon: _jsx(HeartIcon, { filled: favorite.favorited }) }) })) }), favoriteGate.reason === undefined || blockedReason === "line" ? null : (_jsx(Typography.Text, { type: "secondary", "data-testid": "listings-card-favorite-blocked", children: _jsx(SignInLink, { cta: props.signIn, testId: "listings-card-sign-in" }) }))] }))] })] }));
|
|
70
133
|
}
|
|
71
134
|
//# sourceMappingURL=ListingCard.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListingCard.js","sourceRoot":"","sources":["../../src/default/ListingCard.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"ListingCard.js","sourceRoot":"","sources":["../../src/default/ListingCard.tsx"],"names":[],"mappings":";AA4EA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,MAAM,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,S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AAC;IACtC,MAAM,IAAI,IAAI,CAAC;IACf,MAAM,IAAI,IAAI,CAAC;IACf,QAAQ,CAAC,IAAI,EAAE,kBAAkB,CAAC;IAClC,OAAO,IAAI,IAAI,CAAC;CACjB;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;yDACyD;AACzD,wBAAgB,YAAY,CAAC,OAAO,GAAE,mBAAwB,GAAG,YAAY,CAsD5E;AAED,oDAAoD;AACpD,wBAAgB,SAAS,CACvB,KAAK,EAAE,mBAAmB,GAAG;IAC3B,QAAQ,EAAE,CAAC,GAAG,EAAE,YAAY,KAAK,SAAS,CAAC;CAC5C,GACA,YAAY,CAGd"}
|
|
@@ -4,7 +4,7 @@ import { actionAvailable, actionBlocked, firstBlock, loadFailed, loadLoading, lo
|
|
|
4
4
|
import { useMyFavorites } from "../model/queries.js";
|
|
5
5
|
import { useFavoriteListing } from "../model/mutations.js";
|
|
6
6
|
import { LISTINGS_I18N_KEYS } from "../i18n/keys.js";
|
|
7
|
-
import {
|
|
7
|
+
import { LISTINGS_ELEVATION_ACTIONS, useElevatableMandateGate, } from "./useMandateGate.js";
|
|
8
8
|
/**
|
|
9
9
|
* The heart on one card.
|
|
10
10
|
*
|
|
@@ -15,27 +15,39 @@ import { useMandateGate } from "./useMandateGate.js";
|
|
|
15
15
|
* renders it, so the distinction never has to be squeezed into the boolean.
|
|
16
16
|
*/
|
|
17
17
|
export function useFavoriteToggle(id, favorited) {
|
|
18
|
-
const mandate =
|
|
18
|
+
const { gate: mandate, elevation } = useElevatableMandateGate(LISTINGS_ELEVATION_ACTIONS.favorite);
|
|
19
19
|
const mutation = useFavoriteListing();
|
|
20
|
-
const gate = firstBlock(mandate, mutation.isPending
|
|
20
|
+
const gate = firstBlock(mandate, mutation.isPending || elevation.pending
|
|
21
21
|
? actionBlocked(LISTINGS_I18N_KEYS.blockedInFlight)
|
|
22
22
|
: actionAvailable());
|
|
23
23
|
return {
|
|
24
24
|
favorited: favorited === true,
|
|
25
25
|
gate,
|
|
26
|
+
// On a host with auto-anonymous wired, the first heart an anonymous
|
|
27
|
+
// visitor presses mints their account and then saves — one press, no
|
|
28
|
+
// form, nothing said about it. Everywhere else `run` performs directly.
|
|
26
29
|
toggle: () => {
|
|
27
30
|
if (!gate.available)
|
|
28
31
|
return;
|
|
29
|
-
mutation.mutate({ id, favorited: favorited !== true });
|
|
32
|
+
elevation.run(() => mutation.mutate({ id, favorited: favorited !== true }));
|
|
30
33
|
},
|
|
31
|
-
inFlight: mutation.isPending,
|
|
32
|
-
error: mutation.error,
|
|
34
|
+
inFlight: mutation.isPending || elevation.pending,
|
|
35
|
+
error: mutation.error ?? elevation.error,
|
|
33
36
|
};
|
|
34
37
|
}
|
|
35
38
|
/** The favourites page: a real keyset list, unlike the owner's own listings
|
|
36
39
|
* (see `MyListings.tsx` for why those are different). */
|
|
37
40
|
export function useFavorites(options = {}) {
|
|
38
|
-
|
|
41
|
+
// The READ side of elevation, and the one place `identified` is the right
|
|
42
|
+
// question. A guest who saved listings must be able to come back and see
|
|
43
|
+
// them — an account that can save and cannot re-read is worse than the
|
|
44
|
+
// refusal it replaced — but a visitor who has never elevated has nothing
|
|
45
|
+
// here, so this page must not mint just to render. `covers` alone would
|
|
46
|
+
// open it for them and buy a 401.
|
|
47
|
+
const { gate: mandateGate, elevation } = useElevatableMandateGate(LISTINGS_ELEVATION_ACTIONS.favorite);
|
|
48
|
+
const gate = elevation.covers && !elevation.identified
|
|
49
|
+
? actionBlocked(LISTINGS_I18N_KEYS.blockedSignIn)
|
|
50
|
+
: mandateGate;
|
|
39
51
|
const [page, setPage] = useState(options.limit !== undefined ? { limit: options.limit } : {});
|
|
40
52
|
const [pageNumber, setPageNumber] = useState(1);
|
|
41
53
|
const query = useMyFavorites(page, { enabled: gate.available });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Favorites.js","sourceRoot":"","sources":["../../src/headless/Favorites.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EACL,eAAe,EACf,aAAa,EACb,UAAU,EACV,UAAU,EACV,WAAW,EACX,SAAS,GACV,MAAM,cAAc,CAAC;AAGtB,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,
|
|
1
|
+
{"version":3,"file":"Favorites.js","sourceRoot":"","sources":["../../src/headless/Favorites.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EACL,eAAe,EACf,aAAa,EACb,UAAU,EACV,UAAU,EACV,WAAW,EACX,SAAS,GACV,MAAM,cAAc,CAAC;AAGtB,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EACL,0BAA0B,EAC1B,wBAAwB,GACzB,MAAM,qBAAqB,CAAC;AAsB7B;;;;;;;;GAQG;AACH,MAAM,UAAU,iBAAiB,CAC/B,EAAU,EACV,SAAqC;IAErC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,wBAAwB,CAC3D,0BAA0B,CAAC,QAAQ,CACpC,CAAC;IACF,MAAM,QAAQ,GAAG,kBAAkB,EAAE,CAAC;IACtC,MAAM,IAAI,GAAG,UAAU,CACrB,OAAO,EACP,QAAQ,CAAC,SAAS,IAAI,SAAS,CAAC,OAAO;QACrC,CAAC,CAAC,aAAa,CAAC,kBAAkB,CAAC,eAAe,CAAC;QACnD,CAAC,CAAC,eAAe,EAAE,CACtB,CAAC;IACF,OAAO;QACL,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,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;YAClE,aAAa,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC;QACvD,CAAC;QACD,IAAI;QACJ,OAAO,EAAE,GAAG,EAAE;YACZ,KAAK,KAAK,CAAC,OAAO,EAAE,CAAC;QACvB,CAAC;KACF,CAAC;AACJ,CAAC;AAED,oDAAoD;AACpD,MAAM,UAAU,SAAS,CACvB,KAEC;IAED,MAAM,GAAG,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC;IAChC,OAAO,4BAAG,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAI,CAAC;AACpC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListingDetail.d.ts","sourceRoot":"","sources":["../../src/headless/ListingDetail.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAUrD,OAAO,KAAK,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAClE,OAAO,KAAK,EACV,aAAa,IAAI,iBAAiB,EAClC,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,iBAAiB,CAAC;AAKzB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"ListingDetail.d.ts","sourceRoot":"","sources":["../../src/headless/ListingDetail.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAUrD,OAAO,KAAK,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAClE,OAAO,KAAK,EACV,aAAa,IAAI,iBAAiB,EAClC,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,iBAAiB,CAAC;AAKzB,OAA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C+E;IAC/E,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,wBAAgB,gBAAgB,CAC9B,EAAE,EAAE,MAAM,EACV,OAAO,GAAE,uBAA4B,GACpC,gBAAgB,CAgHlB;AAED;oDACoD;AACpD,wBAAgB,aAAa,CAAC,KAAK,EAAE;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,CAAC,GAAG,EAAE,gBAAgB,KAAK,SAAS,CAAC;CAChD,GAAG,YAAY,CAMf"}
|
|
@@ -6,7 +6,7 @@ import { useFavoriteListing } from "../model/mutations.js";
|
|
|
6
6
|
import { asFeatureDaoList, featuresFromDaoList, unreadableFeatureCount } from "../model/features.js";
|
|
7
7
|
import { listingStatusView } from "../model/status.js";
|
|
8
8
|
import { LISTINGS_I18N_KEYS } from "../i18n/keys.js";
|
|
9
|
-
import {
|
|
9
|
+
import { LISTINGS_ELEVATION_ACTIONS, useElevatableMandateGate, } from "./useMandateGate.js";
|
|
10
10
|
/**
|
|
11
11
|
* `images` is `string[] | NULL` on the wire, and the null is the SERVER
|
|
12
12
|
* saying "this listing has no photos" — not this pair saying "we do not
|
|
@@ -20,7 +20,7 @@ export function useListingDetail(id, options = {}) {
|
|
|
20
20
|
const detail = useListing(id);
|
|
21
21
|
const probe = useListingStatus(id);
|
|
22
22
|
const favorite = useFavoriteListing();
|
|
23
|
-
const mandate =
|
|
23
|
+
const { gate: mandate, elevation } = useElevatableMandateGate(LISTINGS_ELEVATION_ACTIONS.favorite);
|
|
24
24
|
const state = detail.status === "error"
|
|
25
25
|
? loadFailed(detail.error)
|
|
26
26
|
: detail.data !== undefined
|
|
@@ -59,7 +59,7 @@ export function useListingDetail(id, options = {}) {
|
|
|
59
59
|
const titleFeatures = useMemo(() => featuresFromDaoList(asFeatureDaoList(detail.data?.features_title)), [detail.data]);
|
|
60
60
|
const badgeFeatures = useMemo(() => featuresFromDaoList(asFeatureDaoList(detail.data?.features_badges)), [detail.data]);
|
|
61
61
|
const isFavorited = detail.data?.is_favorited ?? undefined;
|
|
62
|
-
const favoriteGate = firstBlock(mandate, favorite.isPending
|
|
62
|
+
const favoriteGate = firstBlock(mandate, favorite.isPending || elevation.pending
|
|
63
63
|
? actionBlocked(LISTINGS_I18N_KEYS.blockedInFlight)
|
|
64
64
|
: actionAvailable(), detail.data === undefined
|
|
65
65
|
? actionBlocked(LISTINGS_I18N_KEYS.detailLoading)
|
|
@@ -83,9 +83,11 @@ export function useListingDetail(id, options = {}) {
|
|
|
83
83
|
toggleFavorite: () => {
|
|
84
84
|
if (!favoriteGate.available)
|
|
85
85
|
return;
|
|
86
|
-
|
|
86
|
+
// Mints the anonymous account first where the host permits it for this
|
|
87
|
+
// action; a direct call everywhere else.
|
|
88
|
+
elevation.run(() => favorite.mutate({ id, favorited: isFavorited !== true }));
|
|
87
89
|
},
|
|
88
|
-
favoriteInFlight: favorite.isPending,
|
|
90
|
+
favoriteInFlight: favorite.isPending || elevation.pending,
|
|
89
91
|
refetch: () => {
|
|
90
92
|
void detail.refetch();
|
|
91
93
|
void probe.refetch();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListingDetail.js","sourceRoot":"","sources":["../../src/headless/ListingDetail.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,EACL,eAAe,EACf,aAAa,EACb,WAAW,EACX,UAAU,EACV,UAAU,EACV,WAAW,EACX,SAAS,GACV,MAAM,cAAc,CAAC;AAOtB,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AACrG,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CA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|
|
|
1
|
-
import type { ActionAvailability } from "@stapel/core";
|
|
1
|
+
import type { ActionAvailability, Elevation } from "@stapel/core";
|
|
2
|
+
/**
|
|
3
|
+
* The names this pair's gated writes use when asking core's elevation seam
|
|
4
|
+
* whether an anonymous visitor may be given an identity instead of a
|
|
5
|
+
* refusal. A host lists the ones it permits (see `ElevationSource.actions`);
|
|
6
|
+
* anything it leaves out keeps its wall.
|
|
7
|
+
*
|
|
8
|
+
* Only `favorite` is named. Publishing a listing is deliberately absent and
|
|
9
|
+
* stays absent: a seller who cannot be reached again is not a seller, and an
|
|
10
|
+
* automatically-minted account is exactly that. Saving something for later
|
|
11
|
+
* is the opposite case — losing a shortlist because a stranger had not
|
|
12
|
+
* registered is friction with nothing behind it.
|
|
13
|
+
*/
|
|
14
|
+
export declare const LISTINGS_ELEVATION_ACTIONS: {
|
|
15
|
+
readonly favorite: "listings.favorite";
|
|
16
|
+
};
|
|
2
17
|
/**
|
|
3
18
|
* "May this person act at all?" — the first gate on every write in the pair.
|
|
4
19
|
*
|
|
@@ -24,5 +39,21 @@ import type { ActionAvailability } from "@stapel/core";
|
|
|
24
39
|
* than throwing, so a pair rendered in a host that never wired the axis
|
|
25
40
|
* degrades to "we could not check" — visible, fixable, and not a blank page.
|
|
26
41
|
*/
|
|
27
|
-
export declare function useMandateGate(): ActionAvailability;
|
|
42
|
+
export declare function useMandateGate(action?: string): ActionAvailability;
|
|
43
|
+
/**
|
|
44
|
+
* The same gate, with the elevation handle the caller needs to ACT on it.
|
|
45
|
+
*
|
|
46
|
+
* A control that passes an `action` is saying "for this one act, an
|
|
47
|
+
* anonymous visitor may be given an identity rather than a refusal" — and
|
|
48
|
+
* then it must run its write through `elevation.run`, or the write goes out
|
|
49
|
+
* before the account exists and buys a 401. The two halves are returned
|
|
50
|
+
* together so a caller cannot take the unblocked gate and forget the mint.
|
|
51
|
+
*
|
|
52
|
+
* Passing no `action` is the default and the majority: publishing, saving a
|
|
53
|
+
* draft, marking something sold. Those keep the wall.
|
|
54
|
+
*/
|
|
55
|
+
export declare function useElevatableMandateGate(action?: string): {
|
|
56
|
+
readonly gate: ActionAvailability;
|
|
57
|
+
readonly elevation: Elevation;
|
|
58
|
+
};
|
|
28
59
|
//# sourceMappingURL=useMandateGate.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMandateGate.d.ts","sourceRoot":"","sources":["../../src/headless/useMandateGate.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"useMandateGate.d.ts","sourceRoot":"","sources":["../../src/headless/useMandateGate.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAIlE;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,0BAA0B;;CAE7B,CAAC;AAEX;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,cAAc,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,kBAAkB,CAElE;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG;IACzD,QAAQ,CAAC,IAAI,EAAE,kBAAkB,CAAC;IAClC,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;CAC/B,CAkBA"}
|
|
@@ -1,6 +1,21 @@
|
|
|
1
|
-
import { matchMandate, useMandate } from "@stapel/core";
|
|
1
|
+
import { matchMandate, useElevation, useMandate } from "@stapel/core";
|
|
2
2
|
import { actionAvailable, actionBlocked } from "@stapel/core";
|
|
3
3
|
import { LISTINGS_I18N_KEYS } from "../i18n/keys.js";
|
|
4
|
+
/**
|
|
5
|
+
* The names this pair's gated writes use when asking core's elevation seam
|
|
6
|
+
* whether an anonymous visitor may be given an identity instead of a
|
|
7
|
+
* refusal. A host lists the ones it permits (see `ElevationSource.actions`);
|
|
8
|
+
* anything it leaves out keeps its wall.
|
|
9
|
+
*
|
|
10
|
+
* Only `favorite` is named. Publishing a listing is deliberately absent and
|
|
11
|
+
* stays absent: a seller who cannot be reached again is not a seller, and an
|
|
12
|
+
* automatically-minted account is exactly that. Saving something for later
|
|
13
|
+
* is the opposite case — losing a shortlist because a stranger had not
|
|
14
|
+
* registered is friction with nothing behind it.
|
|
15
|
+
*/
|
|
16
|
+
export const LISTINGS_ELEVATION_ACTIONS = {
|
|
17
|
+
favorite: "listings.favorite",
|
|
18
|
+
};
|
|
4
19
|
/**
|
|
5
20
|
* "May this person act at all?" — the first gate on every write in the pair.
|
|
6
21
|
*
|
|
@@ -26,14 +41,37 @@ import { LISTINGS_I18N_KEYS } from "../i18n/keys.js";
|
|
|
26
41
|
* than throwing, so a pair rendered in a host that never wired the axis
|
|
27
42
|
* degrades to "we could not check" — visible, fixable, and not a blank page.
|
|
28
43
|
*/
|
|
29
|
-
export function useMandateGate() {
|
|
44
|
+
export function useMandateGate(action) {
|
|
45
|
+
return useElevatableMandateGate(action).gate;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* The same gate, with the elevation handle the caller needs to ACT on it.
|
|
49
|
+
*
|
|
50
|
+
* A control that passes an `action` is saying "for this one act, an
|
|
51
|
+
* anonymous visitor may be given an identity rather than a refusal" — and
|
|
52
|
+
* then it must run its write through `elevation.run`, or the write goes out
|
|
53
|
+
* before the account exists and buys a 401. The two halves are returned
|
|
54
|
+
* together so a caller cannot take the unblocked gate and forget the mint.
|
|
55
|
+
*
|
|
56
|
+
* Passing no `action` is the default and the majority: publishing, saving a
|
|
57
|
+
* draft, marking something sold. Those keep the wall.
|
|
58
|
+
*/
|
|
59
|
+
export function useElevatableMandateGate(action) {
|
|
30
60
|
const mandate = useMandate();
|
|
31
|
-
|
|
61
|
+
const elevation = useElevation(action);
|
|
62
|
+
const gate = matchMandate(mandate, {
|
|
32
63
|
member: () => actionAvailable(),
|
|
33
64
|
guest: () => actionBlocked(LISTINGS_I18N_KEYS.blockedGuest),
|
|
34
|
-
|
|
65
|
+
// The one arm elevation changes. An identity can be minted at the moment
|
|
66
|
+
// of the act for the actions the host listed, so the control is offered
|
|
67
|
+
// rather than refused — and the mandate axis itself is untouched, which
|
|
68
|
+
// is what keeps the composer's wall standing for the same visitor.
|
|
69
|
+
anonymous: () => elevation.covers
|
|
70
|
+
? actionAvailable()
|
|
71
|
+
: actionBlocked(LISTINGS_I18N_KEYS.blockedSignIn),
|
|
35
72
|
asking: () => actionBlocked(LISTINGS_I18N_KEYS.blockedMandateUnknown),
|
|
36
73
|
unavailable: () => actionBlocked(LISTINGS_I18N_KEYS.blockedMandateUnknown),
|
|
37
74
|
});
|
|
75
|
+
return { gate, elevation };
|
|
38
76
|
}
|
|
39
77
|
//# sourceMappingURL=useMandateGate.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMandateGate.js","sourceRoot":"","sources":["../../src/headless/useMandateGate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"useMandateGate.js","sourceRoot":"","sources":["../../src/headless/useMandateGate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAEtE,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAErD;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,QAAQ,EAAE,mBAAmB;CACrB,CAAC;AAEX;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,UAAU,cAAc,CAAC,MAAe;IAC5C,OAAO,wBAAwB,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC;AAC/C,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,wBAAwB,CAAC,MAAe;IAItD,MAAM,OAAO,GAAG,UAAU,EAAE,CAAC;IAC7B,MAAM,SAAS,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC;IACvC,MAAM,IAAI,GAAG,YAAY,CAAqB,OAAO,EAAE;QACrD,MAAM,EAAE,GAAG,EAAE,CAAC,eAAe,EAAE;QAC/B,KAAK,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,kBAAkB,CAAC,YAAY,CAAC;QAC3D,yEAAyE;QACzE,wEAAwE;QACxE,wEAAwE;QACxE,mEAAmE;QACnE,SAAS,EAAE,GAAG,EAAE,CACd,SAAS,CAAC,MAAM;YACd,CAAC,CAAC,eAAe,EAAE;YACnB,CAAC,CAAC,aAAa,CAAC,kBAAkB,CAAC,aAAa,CAAC;QACrD,MAAM,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,kBAAkB,CAAC,qBAAqB,CAAC;QACrE,WAAW,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,kBAAkB,CAAC,qBAAqB,CAAC;KAC3E,CAAC,CAAC;IACH,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;AAC7B,CAAC"}
|
package/dist/i18n/es.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"es.d.ts","sourceRoot":"","sources":["../../src/i18n/es.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAI/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAErE;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,oBAAoB,EAAE,
|
|
1
|
+
{"version":3,"file":"es.d.ts","sourceRoot":"","sources":["../../src/i18n/es.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAI/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAErE;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,oBAAoB,EAAE,cAqMlC,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI,CAG7D"}
|
package/dist/i18n/es.js
CHANGED
|
@@ -24,6 +24,7 @@ export const listingsI18nBundleEs = {
|
|
|
24
24
|
"error.400.listing_feature_not_allowed": "El detalle «{feature}» no pertenece a esta categoría",
|
|
25
25
|
"error.400.listing_invalid_status_filter": "Estado de anuncio desconocido: «{status}»",
|
|
26
26
|
"error.400.publish_validation_failed": "El anuncio no pasó la revisión y no se publicó",
|
|
27
|
+
"error.403.listing_anonymous_not_allowed": "Para publicar un anuncio, inicia sesión o crea una cuenta",
|
|
27
28
|
"error.403.listing_not_owner": "Este anuncio no es tuyo",
|
|
28
29
|
"error.404.listing_not_found": "No se encontró el anuncio",
|
|
29
30
|
"error.409.already_favorited": "El anuncio ya está en favoritos",
|
|
@@ -51,7 +52,7 @@ export const listingsI18nBundleEs = {
|
|
|
51
52
|
"listings.card.price_absent": "Precio a consultar",
|
|
52
53
|
"listings.card.favorite_add": "Guardar en favoritos",
|
|
53
54
|
"listings.card.favorite_remove": "Quitar de favoritos",
|
|
54
|
-
"listings.card.
|
|
55
|
+
"listings.card.untitled": "Anuncio sin título",
|
|
55
56
|
"listings.card.sign_in": "Iniciar sesión",
|
|
56
57
|
"listings.detail.loading": "Cargando el anuncio…",
|
|
57
58
|
"listings.detail.load_failed": "No pudimos cargar este anuncio",
|
package/dist/i18n/es.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"es.js","sourceRoot":"","sources":["../../src/i18n/es.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AAC5E,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAErE,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAErE;;;;;;;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,EACtB,wEAAwE;IAC1E,kCAAkC,EAChC,yEAAyE;IAC3E,6BAA6B,EAC3B,4DAA4D;IAC9D,gCAAgC,EAC9B,8DAA8D;IAChE,4BAA4B,EAAE,oCAAoC;IAClE,4BAA4B,EAC1B,sEAAsE;IAExE,oBAAoB,EAAE,UAAU;IAChC,oBAAoB,EAAE,WAAW;IACjC,yBAAyB,EAAE,eAAe;IAE1C,qBAAqB,EAAE,SAAS;IAChC,sBAAsB,EAAE,kBAAkB;IAC1C,mBAAmB,EAAE,cAAc;IACnC,wBAAwB,EAAE,WAAW;CACtC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,UAAU,sBAAsB,CAAC,IAAgB;IACrD,wBAAwB,CAAC,IAAI,CAAC,CAAC;IAC/B,IAAI,CAAC,cAAc,CAAC,IAAI,EAAE,oBAAoB,CAAC,CAAC;AAClD,CAAC"}
|
|
@@ -2,7 +2,7 @@ import type { ListingsErrorCode } from "./errors.gen.js";
|
|
|
2
2
|
/**
|
|
3
3
|
* `es` texts for the backend error codes this catalog carries.
|
|
4
4
|
*
|
|
5
|
-
* PARTIAL, and deliberately typed to say so:
|
|
5
|
+
* PARTIAL, and deliberately typed to say so: 23 key(s) owned by
|
|
6
6
|
* stapel_attributes, stapel_listings are absent, because that owner ships no locale catalog
|
|
7
7
|
* (ERRORS_LOCALE_EXEMPT_OWNERS). English for them still comes from the registry
|
|
8
8
|
* artifact via the en bundle; the pair layers its own authored `es`
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* `es` texts for the backend error codes this catalog carries.
|
|
3
3
|
*
|
|
4
|
-
* PARTIAL, and deliberately typed to say so:
|
|
4
|
+
* PARTIAL, and deliberately typed to say so: 23 key(s) owned by
|
|
5
5
|
* stapel_attributes, stapel_listings are absent, because that owner ships no locale catalog
|
|
6
6
|
* (ERRORS_LOCALE_EXEMPT_OWNERS). English for them still comes from the registry
|
|
7
7
|
* artifact via the en bundle; the pair layers its own authored `es`
|
|
@@ -256,6 +256,12 @@ export declare const LISTINGS_ERRORS: {
|
|
|
256
256
|
readonly remediation: "retry";
|
|
257
257
|
readonly en: "You do not have permission to perform this action";
|
|
258
258
|
};
|
|
259
|
+
readonly "error.403.listing_anonymous_not_allowed": {
|
|
260
|
+
readonly status: 403;
|
|
261
|
+
readonly params: readonly [];
|
|
262
|
+
readonly remediation: "retry";
|
|
263
|
+
readonly en: "A guest account may not publish a listing";
|
|
264
|
+
};
|
|
259
265
|
readonly "error.403.listing_not_owner": {
|
|
260
266
|
readonly status: 403;
|
|
261
267
|
readonly params: readonly [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.gen.d.ts","sourceRoot":"","sources":["../../../src/i18n/generated/errors.gen.ts"],"names":[],"mappings":"AAIA;;;;;;GAMG;AACH,MAAM,MAAM,WAAW,GACnB,OAAO,GACP,gBAAgB,GAChB,gBAAgB,GAChB,QAAQ,GACR,WAAW,GACX,iBAAiB,GACjB,KAAK,CAAC;AAEV,MAAM,WAAW,iBAAiB;IAChC,oDAAoD;IACpD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,4DAA4D;IAC5D,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC,0EAA0E;IAC1E,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC;IAClC,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;CACrB;AAED;;;;GAIG;AACH,eAAO,MAAM,eAAe
|
|
1
|
+
{"version":3,"file":"errors.gen.d.ts","sourceRoot":"","sources":["../../../src/i18n/generated/errors.gen.ts"],"names":[],"mappings":"AAIA;;;;;;GAMG;AACH,MAAM,MAAM,WAAW,GACnB,OAAO,GACP,gBAAgB,GAChB,gBAAgB,GAChB,QAAQ,GACR,WAAW,GACX,iBAAiB,GACjB,KAAK,CAAC;AAEV,MAAM,WAAW,iBAAiB;IAChC,oDAAoD;IACpD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,4DAA4D;IAC5D,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC,0EAA0E;IAC1E,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC;IAClC,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;CACrB;AAED;;;;GAIG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkElB,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,MAAM,OAAO,eAAe,CAAC;AAE7D,gEAAgE;AAChE,eAAO,MAAM,oBAAoB,EAAE,SAAS,iBAAiB,EAkE5D,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,iBAAiB,EAAE,MAAM,CAkEnE,CAAC"}
|
|
@@ -46,6 +46,7 @@ export const LISTINGS_ERRORS = {
|
|
|
46
46
|
"error.401.unauthorized": { status: 401, params: [], remediation: "reauthenticate", en: "Authentication required" },
|
|
47
47
|
"error.402.payment_required": { status: 402, params: [], remediation: "retry", en: "Payment required" },
|
|
48
48
|
"error.403.forbidden": { status: 403, params: [], remediation: "retry", en: "You do not have permission to perform this action" },
|
|
49
|
+
"error.403.listing_anonymous_not_allowed": { status: 403, params: [], remediation: "retry", en: "A guest account may not publish a listing" },
|
|
49
50
|
"error.403.listing_not_owner": { status: 403, params: [], remediation: "retry", en: "Not your listing" },
|
|
50
51
|
"error.403.network_blocked": { status: 403, params: [], remediation: "contact_support", en: "Requests from this network are not allowed" },
|
|
51
52
|
"error.403.verification_enrollment_required": { status: 403, params: [], remediation: "verify", en: "Verification factor enrollment required" },
|
|
@@ -113,6 +114,7 @@ export const LISTINGS_ERROR_CODES = [
|
|
|
113
114
|
"error.401.unauthorized",
|
|
114
115
|
"error.402.payment_required",
|
|
115
116
|
"error.403.forbidden",
|
|
117
|
+
"error.403.listing_anonymous_not_allowed",
|
|
116
118
|
"error.403.listing_not_owner",
|
|
117
119
|
"error.403.network_blocked",
|
|
118
120
|
"error.403.verification_enrollment_required",
|
|
@@ -184,6 +186,7 @@ export const listingsErrorBundleEn = {
|
|
|
184
186
|
"error.401.unauthorized": "Authentication required",
|
|
185
187
|
"error.402.payment_required": "Payment required",
|
|
186
188
|
"error.403.forbidden": "You do not have permission to perform this action",
|
|
189
|
+
"error.403.listing_anonymous_not_allowed": "A guest account may not publish a listing",
|
|
187
190
|
"error.403.listing_not_owner": "Not your listing",
|
|
188
191
|
"error.403.network_blocked": "Requests from this network are not allowed",
|
|
189
192
|
"error.403.verification_enrollment_required": "Verification factor enrollment required",
|