@stapel/listings-react 0.8.0 → 0.9.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 +56 -0
- package/dist/api/generated/schema.d.ts +66 -3
- package/dist/api/generated/schema.d.ts.map +1 -1
- package/dist/default/ListingComposerPage.d.ts +21 -7
- package/dist/default/ListingComposerPage.d.ts.map +1 -1
- package/dist/default/ListingComposerPage.js.map +1 -1
- package/dist/headless/ListingComposer.d.ts.map +1 -1
- package/dist/headless/ListingComposer.js +31 -11
- package/dist/headless/ListingComposer.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/model/features.d.ts.map +1 -1
- package/dist/model/features.js +9 -1
- package/dist/model/features.js.map +1 -1
- package/llms.txt +4 -3
- package/manifest.json +10 -2
- package/nav-manifest.json +1 -1
- package/package.json +8 -8
- package/src/analytics/generated/events.json +1 -1
- package/src/api/generated/schema.ts +66 -3
- package/src/default/ListingComposerPage.tsx +21 -7
- package/src/headless/ListingComposer.tsx +36 -12
- 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 +9 -0
- package/src/i18n/generated/errors.ru.gen.ts +1 -1
- package/src/model/features.ts +10 -1
package/src/model/features.ts
CHANGED
|
@@ -56,6 +56,11 @@ const ENVELOPE = new Set(["slug", "value", "name", "order", "title", "badge"]);
|
|
|
56
56
|
* the path with " / " and never consults an option table at all. */
|
|
57
57
|
const OPTION_VALUED = new Set(["select"]);
|
|
58
58
|
|
|
59
|
+
/** The canon's `FeatureDef.translate` vocabulary — three values, closed. */
|
|
60
|
+
function isTranslateMode(value: unknown): value is "all" | "title" | "none" {
|
|
61
|
+
return value === "all" || value === "title" || value === "none";
|
|
62
|
+
}
|
|
63
|
+
|
|
59
64
|
/**
|
|
60
65
|
* The identity option table for a stored `select` — see the module header.
|
|
61
66
|
*
|
|
@@ -100,7 +105,11 @@ export function featureFromDao(
|
|
|
100
105
|
slug: dao.slug,
|
|
101
106
|
config,
|
|
102
107
|
name: dao.name ?? null,
|
|
103
|
-
|
|
108
|
+
// `translate` is a CLOSED vocabulary in the canon (`all` / `title` /
|
|
109
|
+
// `none`), and the stored row types it as a loose string. A value outside
|
|
110
|
+
// the three is dropped rather than smuggled through: `FeatureDef`'s own
|
|
111
|
+
// default is `all`, which is what the engine falls back to anyway.
|
|
112
|
+
...(isTranslateMode(dao.translate) ? { translate: dao.translate } : {}),
|
|
104
113
|
};
|
|
105
114
|
|
|
106
115
|
const value: FeatureValueDto | undefined =
|