@bygghammar/cms-platform 0.90.0-m7.1 → 0.90.0-m7.2
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
CHANGED
|
@@ -8,6 +8,14 @@ matches `package.json` exactly. See
|
|
|
8
8
|
Versions 0.1.0 through 0.78.0 predate this repository and were reconstructed
|
|
9
9
|
from the published npm tarballs.
|
|
10
10
|
|
|
11
|
+
## 0.90.0-m7.2
|
|
12
|
+
|
|
13
|
+
- `backofficePaths` gains `popups` and `popupDestinations`, and both popup
|
|
14
|
+
mount points supply them to the package's navigation. The destinations screen
|
|
15
|
+
was reachable only by typing its address.
|
|
16
|
+
- Requires `@bygghammar/lightweight-popup@>=0.2.0-m7.2`, which is where the
|
|
17
|
+
navigation itself lives.
|
|
18
|
+
|
|
11
19
|
## 0.90.0-m7.1
|
|
12
20
|
|
|
13
21
|
First version published to npm rather than vendored as a tarball. Same code as
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bygghammar/cms-platform",
|
|
3
|
-
"version": "0.90.0-m7.
|
|
3
|
+
"version": "0.90.0-m7.2",
|
|
4
4
|
"description": "Shared CMS platform: blocks, block types, i18n core, UI primitives and design-token contract used by every Bygghammar/Voyara site.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": [
|
|
@@ -263,7 +263,7 @@
|
|
|
263
263
|
"@dnd-kit/sortable": ">=3",
|
|
264
264
|
"@dnd-kit/utilities": ">=3",
|
|
265
265
|
"zod": ">=3",
|
|
266
|
-
"@bygghammar/lightweight-popup": ">=0.2.0-m7.
|
|
266
|
+
"@bygghammar/lightweight-popup": ">=0.2.0-m7.2"
|
|
267
267
|
},
|
|
268
268
|
"peerDependenciesMeta": {
|
|
269
269
|
"@supabase/supabase-js": {
|
|
@@ -328,7 +328,7 @@
|
|
|
328
328
|
"check": "bun run typecheck && bun run test && bun run verify:pack"
|
|
329
329
|
},
|
|
330
330
|
"devDependencies": {
|
|
331
|
-
"@bygghammar/lightweight-popup": "file:./vendor/bygghammar-lightweight-popup-0.
|
|
331
|
+
"@bygghammar/lightweight-popup": "file:./vendor/bygghammar-lightweight-popup-0.2.0-m7.2.tgz",
|
|
332
332
|
"@dnd-kit/core": "^6.3.1",
|
|
333
333
|
"@dnd-kit/sortable": "^10.0.0",
|
|
334
334
|
"@dnd-kit/utilities": "^3.2.2",
|
|
@@ -317,6 +317,8 @@ export function backofficePaths(host: BackofficeHost = backofficeHost()) {
|
|
|
317
317
|
formDeliveries: `${base}/forms/deliveries`,
|
|
318
318
|
pagesBuilder: `${base}/pages-builder`,
|
|
319
319
|
resetPassword: `${base}/reset-password`,
|
|
320
|
+
popups: `${base}/popups`,
|
|
321
|
+
popupDestinations: `${base}/popups/destinations`,
|
|
320
322
|
};
|
|
321
323
|
}
|
|
322
324
|
|
package/src/popups/admin.tsx
CHANGED
|
@@ -22,6 +22,7 @@ import "@bygghammar/lightweight-popup/admin.css";
|
|
|
22
22
|
import type { AdminAdapters } from "@bygghammar/lightweight-popup/adapters";
|
|
23
23
|
|
|
24
24
|
import { useFeatureGate } from "../backoffice/shell/use-resolved-config";
|
|
25
|
+
import { cmsPopupNavigation } from "./cms-bridges";
|
|
25
26
|
import { cmsMediaPicker } from "./media-bridge";
|
|
26
27
|
import { ManagedForm } from "../forms/FormRenderer";
|
|
27
28
|
import {
|
|
@@ -49,6 +50,7 @@ function PopupsRouteInner(): ReactNode {
|
|
|
49
50
|
// popup editor falls back to typing an address, which is what an
|
|
50
51
|
// administrator was left with before.
|
|
51
52
|
media: cmsMediaPicker(),
|
|
53
|
+
navigation: cmsPopupNavigation("popups"),
|
|
52
54
|
forms: {
|
|
53
55
|
// The builder preview renders the site's real form, so what an editor
|
|
54
56
|
// checks is what a visitor will see.
|
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
* this itself.
|
|
8
8
|
*/
|
|
9
9
|
import type {
|
|
10
|
+
AdminNavigationPort,
|
|
11
|
+
AdminScreen,
|
|
10
12
|
FormDirectoryPort,
|
|
11
13
|
HostFormField,
|
|
12
14
|
HostFormSchema,
|
|
@@ -16,6 +18,7 @@ import type {
|
|
|
16
18
|
PageDirectoryPort,
|
|
17
19
|
} from "@bygghammar/lightweight-popup/adapters";
|
|
18
20
|
import { fieldTypes } from "../forms/field-sets";
|
|
21
|
+
import { backofficePaths } from "../backoffice/routes/host";
|
|
19
22
|
import { DEFAULT_LOCALE, t } from "../i18n";
|
|
20
23
|
import { backofficeHost } from "../backoffice/routes/host";
|
|
21
24
|
|
|
@@ -198,3 +201,20 @@ export function cmsOptInDestinations(): OptInDestinationPort {
|
|
|
198
201
|
},
|
|
199
202
|
};
|
|
200
203
|
}
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* Where this site mounted the popup screens.
|
|
208
|
+
*
|
|
209
|
+
* Derived from the backoffice base the site configured, like every other
|
|
210
|
+
* backoffice path — so a site that moves its backoffice moves these with it,
|
|
211
|
+
* and the popup package never learns either address.
|
|
212
|
+
*/
|
|
213
|
+
export function cmsPopupNavigation(current: AdminScreen): AdminNavigationPort {
|
|
214
|
+
const paths = backofficePaths();
|
|
215
|
+
return {
|
|
216
|
+
popupsHref: paths.popups,
|
|
217
|
+
destinationsHref: paths.popupDestinations,
|
|
218
|
+
current,
|
|
219
|
+
};
|
|
220
|
+
}
|
|
@@ -23,6 +23,7 @@ import type {
|
|
|
23
23
|
} from "@bygghammar/lightweight-popup/adapters";
|
|
24
24
|
|
|
25
25
|
import { backofficeHost } from "../backoffice/routes/host";
|
|
26
|
+
import { cmsPopupNavigation } from "./cms-bridges";
|
|
26
27
|
|
|
27
28
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
28
29
|
type Fn = (...args: any[]) => Promise<any>;
|
|
@@ -135,7 +136,12 @@ export function cmsDestinationAdmin(): OptInDestinationAdminPort {
|
|
|
135
136
|
|
|
136
137
|
/** The screen, ready to mount on a route. */
|
|
137
138
|
export function PopupDestinationsView(): ReactNode {
|
|
138
|
-
return
|
|
139
|
+
return (
|
|
140
|
+
<DestinationsAdmin
|
|
141
|
+
destinations={cmsDestinationAdmin()}
|
|
142
|
+
navigation={cmsPopupNavigation("destinations")}
|
|
143
|
+
/>
|
|
144
|
+
);
|
|
139
145
|
}
|
|
140
146
|
|
|
141
147
|
export default PopupDestinationsView;
|