@orion-studios/payload-studio 0.6.0-beta.7 → 0.6.0-beta.71
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/dist/admin/client.js +2076 -618
- package/dist/admin/client.mjs +2037 -590
- package/dist/admin/index.d.mts +2 -2
- package/dist/admin/index.d.ts +2 -2
- package/dist/admin/index.js +140 -17
- package/dist/admin/index.mjs +2 -2
- package/dist/admin-app/client.js +11 -4
- package/dist/admin-app/client.mjs +1 -1
- package/dist/admin-app/index.d.mts +2 -2
- package/dist/admin-app/index.d.ts +2 -2
- package/dist/admin-app/styles.css +343 -41
- package/dist/admin.css +18 -2
- package/dist/builder-v2/client.d.mts +18 -0
- package/dist/builder-v2/client.d.ts +18 -0
- package/dist/builder-v2/client.js +1673 -0
- package/dist/builder-v2/client.mjs +1548 -0
- package/dist/builder-v2/index.d.mts +241 -0
- package/dist/builder-v2/index.d.ts +241 -0
- package/dist/builder-v2/index.js +760 -0
- package/dist/builder-v2/index.mjs +710 -0
- package/dist/builder-v2/styles.css +1524 -0
- package/dist/{chunk-XKUTZ7IU.mjs → chunk-276KAPGM.mjs} +56 -5
- package/dist/{chunk-KPIX7OSV.mjs → chunk-2XH7X34N.mjs} +11 -4
- package/dist/{chunk-PF3EBZXF.mjs → chunk-7ZMXZRBP.mjs} +39 -3
- package/dist/{chunk-5FNTVRCR.mjs → chunk-KHK6RTGC.mjs} +143 -20
- package/dist/{chunk-OTHERBGX.mjs → chunk-ZADL33R6.mjs} +1 -1
- package/dist/{index-QPDAedIX.d.ts → index-BV0vEGl6.d.ts} +4 -2
- package/dist/{index-Cv-6qnrw.d.mts → index-D5zrOdyv.d.mts} +3 -1
- package/dist/{index-52HdVLQq.d.ts → index-DAdN56fM.d.ts} +1 -1
- package/dist/{index-DyMmaRfI.d.mts → index-DLfPOqYA.d.mts} +4 -2
- package/dist/{index-Crx_MtPw.d.ts → index-Dv-Alx4h.d.ts} +3 -1
- package/dist/{index-DEQC3Dwj.d.mts → index-G_uTNffQ.d.mts} +1 -1
- package/dist/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +231 -21
- package/dist/index.mjs +10 -10
- package/dist/nextjs/index.js +39 -3
- package/dist/nextjs/index.mjs +2 -2
- package/dist/{sitePreviewTypes-BkHCWxNW.d.mts → sitePreviewTypes-BrJwGzJj.d.mts} +1 -1
- package/dist/{sitePreviewTypes-BkHCWxNW.d.ts → sitePreviewTypes-BrJwGzJj.d.ts} +1 -1
- package/dist/studio-pages/builder.css +24 -5
- package/dist/studio-pages/client.js +574 -64
- package/dist/studio-pages/client.mjs +574 -64
- package/dist/studio-pages/index.d.mts +1 -1
- package/dist/studio-pages/index.d.ts +1 -1
- package/dist/studio-pages/index.js +91 -4
- package/dist/studio-pages/index.mjs +3 -3
- package/package.json +22 -3
package/dist/admin/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as AdminConfig, a as AdminStudioConfig, b as AdminStudioFooterPreviewConfig, c as AdminStudioHeaderPreviewConfig, d as AdminStudioSitePreviewConfig, C as CreateSocialMediaConnectionsFieldOptions, e as CreateSocialMediaGlobalOptions, R as ResolvedStudioDashboardPanel, f as ResolvedStudioSection, S as StudioDashboardPanel, g as StudioDashboardPanelSpan, h as StudioGlobalLink, j as StudioSection, k as StudioSectionCard, l as StudioSectionComponent, m as StudioSectionRole, n as StudioSectionView, o as configureAdmin, p as createHeaderNavItemsField, q as createSocialMediaConnectionsField, r as createSocialMediaGlobal, s as createThemePreferenceField, t as socialMediaConnectionsField, u as themePreferenceField, w as withTooltips } from '../index-
|
|
1
|
+
export { A as AdminConfig, a as AdminStudioConfig, b as AdminStudioFooterPreviewConfig, c as AdminStudioHeaderPreviewConfig, d as AdminStudioSitePreviewConfig, C as CreateSocialMediaConnectionsFieldOptions, e as CreateSocialMediaGlobalOptions, R as ResolvedStudioDashboardPanel, f as ResolvedStudioSection, S as StudioDashboardPanel, g as StudioDashboardPanelSpan, h as StudioGlobalLink, j as StudioSection, k as StudioSectionCard, l as StudioSectionComponent, m as StudioSectionRole, n as StudioSectionView, o as configureAdmin, p as createHeaderNavItemsField, q as createSocialMediaConnectionsField, r as createSocialMediaGlobal, s as createThemePreferenceField, t as socialMediaConnectionsField, u as themePreferenceField, w as withTooltips } from '../index-DLfPOqYA.mjs';
|
|
2
2
|
export { b as SOCIAL_MEDIA_DEFAULT_ICON_BY_PLATFORM, c as SOCIAL_MEDIA_ICON_OPTIONS, d as SOCIAL_MEDIA_PLATFORMS, e as SOCIAL_MEDIA_PLATFORM_LABELS, S as SocialMediaGlobalData, f as SocialMediaIconLibrary, g as SocialMediaIconOption, a as SocialMediaPlatform, h as SocialMediaProfileData, i as SocialMediaProfilesData } from '../socialMedia-C05Iy-SV.mjs';
|
|
3
3
|
import 'payload';
|
|
4
|
-
import '../sitePreviewTypes-
|
|
4
|
+
import '../sitePreviewTypes-BrJwGzJj.mjs';
|
package/dist/admin/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as AdminConfig, a as AdminStudioConfig, b as AdminStudioFooterPreviewConfig, c as AdminStudioHeaderPreviewConfig, d as AdminStudioSitePreviewConfig, C as CreateSocialMediaConnectionsFieldOptions, e as CreateSocialMediaGlobalOptions, R as ResolvedStudioDashboardPanel, f as ResolvedStudioSection, S as StudioDashboardPanel, g as StudioDashboardPanelSpan, h as StudioGlobalLink, j as StudioSection, k as StudioSectionCard, l as StudioSectionComponent, m as StudioSectionRole, n as StudioSectionView, o as configureAdmin, p as createHeaderNavItemsField, q as createSocialMediaConnectionsField, r as createSocialMediaGlobal, s as createThemePreferenceField, t as socialMediaConnectionsField, u as themePreferenceField, w as withTooltips } from '../index-
|
|
1
|
+
export { A as AdminConfig, a as AdminStudioConfig, b as AdminStudioFooterPreviewConfig, c as AdminStudioHeaderPreviewConfig, d as AdminStudioSitePreviewConfig, C as CreateSocialMediaConnectionsFieldOptions, e as CreateSocialMediaGlobalOptions, R as ResolvedStudioDashboardPanel, f as ResolvedStudioSection, S as StudioDashboardPanel, g as StudioDashboardPanelSpan, h as StudioGlobalLink, j as StudioSection, k as StudioSectionCard, l as StudioSectionComponent, m as StudioSectionRole, n as StudioSectionView, o as configureAdmin, p as createHeaderNavItemsField, q as createSocialMediaConnectionsField, r as createSocialMediaGlobal, s as createThemePreferenceField, t as socialMediaConnectionsField, u as themePreferenceField, w as withTooltips } from '../index-BV0vEGl6.js';
|
|
2
2
|
export { b as SOCIAL_MEDIA_DEFAULT_ICON_BY_PLATFORM, c as SOCIAL_MEDIA_ICON_OPTIONS, d as SOCIAL_MEDIA_PLATFORMS, e as SOCIAL_MEDIA_PLATFORM_LABELS, S as SocialMediaGlobalData, f as SocialMediaIconLibrary, g as SocialMediaIconOption, a as SocialMediaPlatform, h as SocialMediaProfileData, i as SocialMediaProfilesData } from '../socialMedia-C05Iy-SV.js';
|
|
3
3
|
import 'payload';
|
|
4
|
-
import '../sitePreviewTypes-
|
|
4
|
+
import '../sitePreviewTypes-BrJwGzJj.js';
|
package/dist/admin/index.js
CHANGED
|
@@ -81,7 +81,7 @@ var adminNavIcons = [
|
|
|
81
81
|
];
|
|
82
82
|
|
|
83
83
|
// src/shared/studioSections.ts
|
|
84
|
-
var studioRoles = /* @__PURE__ */ new Set(["admin", "editor", "client"]);
|
|
84
|
+
var studioRoles = /* @__PURE__ */ new Set(["admin", "developer", "editor", "client"]);
|
|
85
85
|
var studioIcons = new Set(adminNavIcons);
|
|
86
86
|
var isRecord = (value) => Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
87
87
|
var isAbsoluteExternalURL = (value) => /^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(value) || value.startsWith("//");
|
|
@@ -215,8 +215,10 @@ function configureAdmin(config) {
|
|
|
215
215
|
brandPrimary = "#3b82f6",
|
|
216
216
|
brandSecondary = "#8b5cf6",
|
|
217
217
|
defaultTheme = "brand-light",
|
|
218
|
+
logoOnDarkUrl,
|
|
218
219
|
logoUrl,
|
|
219
|
-
allowThemePreference = false
|
|
220
|
+
allowThemePreference = false,
|
|
221
|
+
userSessionDurationSeconds = 60 * 60 * 24
|
|
220
222
|
} = config;
|
|
221
223
|
const studioEnabled = config.studio?.enabled ?? true;
|
|
222
224
|
const formsEnabled = config.studio?.forms?.enabled ?? false;
|
|
@@ -321,6 +323,49 @@ function configureAdmin(config) {
|
|
|
321
323
|
}
|
|
322
324
|
};
|
|
323
325
|
};
|
|
326
|
+
const attachStudioEditRedirectToCollection = (collection, options) => {
|
|
327
|
+
if (!studioEnabled) {
|
|
328
|
+
return collection;
|
|
329
|
+
}
|
|
330
|
+
const collectionWithBreadcrumb = attachStudioBackBreadcrumbToCollection(collection);
|
|
331
|
+
const existingViews = collectionWithBreadcrumb.admin?.components?.views;
|
|
332
|
+
const existingEditViews = existingViews?.edit;
|
|
333
|
+
const hasCustomEditView = Boolean(
|
|
334
|
+
existingEditViews?.root || existingEditViews?.default && typeof existingEditViews.default === "object" && existingEditViews.default.Component
|
|
335
|
+
);
|
|
336
|
+
if (hasCustomEditView) {
|
|
337
|
+
return collectionWithBreadcrumb;
|
|
338
|
+
}
|
|
339
|
+
return {
|
|
340
|
+
...collectionWithBreadcrumb,
|
|
341
|
+
admin: {
|
|
342
|
+
...collectionWithBreadcrumb.admin,
|
|
343
|
+
components: {
|
|
344
|
+
...collectionWithBreadcrumb.admin?.components,
|
|
345
|
+
views: {
|
|
346
|
+
...existingViews,
|
|
347
|
+
edit: {
|
|
348
|
+
...existingEditViews,
|
|
349
|
+
default: {
|
|
350
|
+
...typeof existingEditViews?.default === "object" ? existingEditViews.default : {},
|
|
351
|
+
Component: {
|
|
352
|
+
exportName: "StudioDocumentRedirect",
|
|
353
|
+
path: clientPath,
|
|
354
|
+
clientProps: {
|
|
355
|
+
description: options.description,
|
|
356
|
+
...options.emptyHref ? { emptyHref: options.emptyHref } : {},
|
|
357
|
+
...options.emptyLabel ? { emptyLabel: options.emptyLabel } : {},
|
|
358
|
+
pathBase: options.pathBase,
|
|
359
|
+
title: options.title
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
};
|
|
368
|
+
};
|
|
324
369
|
return {
|
|
325
370
|
admin: {
|
|
326
371
|
css: cssPath,
|
|
@@ -338,6 +383,7 @@ function configureAdmin(config) {
|
|
|
338
383
|
path: clientPath,
|
|
339
384
|
clientProps: {
|
|
340
385
|
brandName,
|
|
386
|
+
logoOnDarkUrl,
|
|
341
387
|
logoUrl
|
|
342
388
|
}
|
|
343
389
|
},
|
|
@@ -346,6 +392,7 @@ function configureAdmin(config) {
|
|
|
346
392
|
path: clientPath,
|
|
347
393
|
clientProps: {
|
|
348
394
|
brandName,
|
|
395
|
+
logoOnDarkUrl,
|
|
349
396
|
logoUrl
|
|
350
397
|
}
|
|
351
398
|
}
|
|
@@ -360,6 +407,7 @@ function configureAdmin(config) {
|
|
|
360
407
|
},
|
|
361
408
|
...studioEnabled ? {
|
|
362
409
|
studioGlobals: {
|
|
410
|
+
exact: true,
|
|
363
411
|
path: globalsBasePath,
|
|
364
412
|
Component: {
|
|
365
413
|
exportName: "AdminStudioGlobalsView",
|
|
@@ -371,10 +419,11 @@ function configureAdmin(config) {
|
|
|
371
419
|
}
|
|
372
420
|
}
|
|
373
421
|
},
|
|
374
|
-
|
|
375
|
-
|
|
422
|
+
studioPageNew: {
|
|
423
|
+
exact: true,
|
|
424
|
+
path: `${pagesBasePath}/new`,
|
|
376
425
|
Component: {
|
|
377
|
-
exportName: "
|
|
426
|
+
exportName: "AdminStudioNewPageView",
|
|
378
427
|
path: clientPath,
|
|
379
428
|
clientProps: {
|
|
380
429
|
...studioNavClientProps,
|
|
@@ -383,6 +432,7 @@ function configureAdmin(config) {
|
|
|
383
432
|
}
|
|
384
433
|
},
|
|
385
434
|
studioPageEditor: {
|
|
435
|
+
exact: true,
|
|
386
436
|
path: `${pagesBasePath}/:id`,
|
|
387
437
|
Component: {
|
|
388
438
|
exportName: "AdminStudioPageEditView",
|
|
@@ -393,10 +443,11 @@ function configureAdmin(config) {
|
|
|
393
443
|
}
|
|
394
444
|
}
|
|
395
445
|
},
|
|
396
|
-
|
|
397
|
-
|
|
446
|
+
studioPages: {
|
|
447
|
+
exact: true,
|
|
448
|
+
path: pagesBasePath,
|
|
398
449
|
Component: {
|
|
399
|
-
exportName: "
|
|
450
|
+
exportName: "AdminStudioPagesListView",
|
|
400
451
|
path: clientPath,
|
|
401
452
|
clientProps: {
|
|
402
453
|
...studioNavClientProps,
|
|
@@ -405,6 +456,7 @@ function configureAdmin(config) {
|
|
|
405
456
|
}
|
|
406
457
|
},
|
|
407
458
|
studioContactForm: {
|
|
459
|
+
exact: true,
|
|
408
460
|
path: contactFormStudioPath,
|
|
409
461
|
Component: {
|
|
410
462
|
exportName: "AdminStudioContactFormView",
|
|
@@ -417,7 +469,47 @@ function configureAdmin(config) {
|
|
|
417
469
|
}
|
|
418
470
|
},
|
|
419
471
|
...formsEnabled ? {
|
|
472
|
+
studioFormSubmission: {
|
|
473
|
+
exact: true,
|
|
474
|
+
path: `${formsBasePath}/submissions/:id`,
|
|
475
|
+
Component: {
|
|
476
|
+
exportName: "AdminStudioFormSubmissionView",
|
|
477
|
+
path: clientPath,
|
|
478
|
+
clientProps: {
|
|
479
|
+
...studioNavClientProps,
|
|
480
|
+
formsCollectionSlug,
|
|
481
|
+
formSubmissionsCollectionSlug,
|
|
482
|
+
formUploadsCollectionSlug
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
},
|
|
486
|
+
studioFormUpload: {
|
|
487
|
+
exact: true,
|
|
488
|
+
path: `${formsBasePath}/uploads/:id`,
|
|
489
|
+
Component: {
|
|
490
|
+
exportName: "AdminStudioFormUploadView",
|
|
491
|
+
path: clientPath,
|
|
492
|
+
clientProps: {
|
|
493
|
+
...studioNavClientProps,
|
|
494
|
+
formUploadsCollectionSlug
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
},
|
|
498
|
+
studioFormDetail: {
|
|
499
|
+
exact: true,
|
|
500
|
+
path: `${formsBasePath}/:id`,
|
|
501
|
+
Component: {
|
|
502
|
+
exportName: "AdminStudioFormDetailView",
|
|
503
|
+
path: clientPath,
|
|
504
|
+
clientProps: {
|
|
505
|
+
...studioNavClientProps,
|
|
506
|
+
formsCollectionSlug,
|
|
507
|
+
formSubmissionsCollectionSlug
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
},
|
|
420
511
|
studioForms: {
|
|
512
|
+
exact: true,
|
|
421
513
|
path: formsBasePath,
|
|
422
514
|
Component: {
|
|
423
515
|
exportName: "AdminStudioFormsView",
|
|
@@ -431,10 +523,11 @@ function configureAdmin(config) {
|
|
|
431
523
|
}
|
|
432
524
|
}
|
|
433
525
|
} : {},
|
|
434
|
-
|
|
435
|
-
|
|
526
|
+
studioMediaItem: {
|
|
527
|
+
exact: true,
|
|
528
|
+
path: `${mediaBasePath}/:id`,
|
|
436
529
|
Component: {
|
|
437
|
-
exportName: "
|
|
530
|
+
exportName: "AdminStudioMediaItemView",
|
|
438
531
|
path: clientPath,
|
|
439
532
|
clientProps: {
|
|
440
533
|
...studioNavClientProps,
|
|
@@ -442,10 +535,11 @@ function configureAdmin(config) {
|
|
|
442
535
|
}
|
|
443
536
|
}
|
|
444
537
|
},
|
|
445
|
-
|
|
446
|
-
|
|
538
|
+
studioMedia: {
|
|
539
|
+
exact: true,
|
|
540
|
+
path: mediaBasePath,
|
|
447
541
|
Component: {
|
|
448
|
-
exportName: "
|
|
542
|
+
exportName: "AdminStudioMediaView",
|
|
449
543
|
path: clientPath,
|
|
450
544
|
clientProps: {
|
|
451
545
|
...studioNavClientProps,
|
|
@@ -454,6 +548,7 @@ function configureAdmin(config) {
|
|
|
454
548
|
}
|
|
455
549
|
},
|
|
456
550
|
studioTools: {
|
|
551
|
+
exact: true,
|
|
457
552
|
path: toolsBasePath,
|
|
458
553
|
Component: {
|
|
459
554
|
exportName: "AdminStudioToolsView",
|
|
@@ -498,6 +593,7 @@ function configureAdmin(config) {
|
|
|
498
593
|
path: clientPath,
|
|
499
594
|
clientProps: {
|
|
500
595
|
brandName,
|
|
596
|
+
logoOnDarkUrl,
|
|
501
597
|
logoUrl
|
|
502
598
|
}
|
|
503
599
|
}
|
|
@@ -534,8 +630,17 @@ function configureAdmin(config) {
|
|
|
534
630
|
const hasThemePreference = existingFields.some(
|
|
535
631
|
(field) => typeof field === "object" && field !== null && "name" in field && field.name === "themePreference"
|
|
536
632
|
);
|
|
633
|
+
const normalizedAuth = usersCollection.auth === true ? {
|
|
634
|
+
tokenExpiration: userSessionDurationSeconds,
|
|
635
|
+
useSessions: true
|
|
636
|
+
} : usersCollection.auth && typeof usersCollection.auth === "object" ? {
|
|
637
|
+
...usersCollection.auth,
|
|
638
|
+
tokenExpiration: usersCollection.auth.tokenExpiration ?? userSessionDurationSeconds,
|
|
639
|
+
useSessions: usersCollection.auth.useSessions ?? true
|
|
640
|
+
} : usersCollection.auth;
|
|
537
641
|
const nextCollection = {
|
|
538
642
|
...usersCollection,
|
|
643
|
+
auth: normalizedAuth,
|
|
539
644
|
fields: !allowThemePreference || hasThemePreference ? existingFields : [...existingFields, createThemePreferenceField(defaultTheme)]
|
|
540
645
|
};
|
|
541
646
|
return attachStudioBackBreadcrumbToCollection(nextCollection);
|
|
@@ -597,13 +702,31 @@ function configureAdmin(config) {
|
|
|
597
702
|
return attachStudioBackBreadcrumbToCollection(mediaCollection);
|
|
598
703
|
},
|
|
599
704
|
wrapFormsCollection(formsCollection) {
|
|
600
|
-
return
|
|
705
|
+
return attachStudioEditRedirectToCollection(formsCollection, {
|
|
706
|
+
description: "Redirecting to the Studio form workspace.",
|
|
707
|
+
emptyHref: formsBasePath,
|
|
708
|
+
emptyLabel: "Open Forms",
|
|
709
|
+
pathBase: formsBasePath,
|
|
710
|
+
title: "Opening Form..."
|
|
711
|
+
});
|
|
601
712
|
},
|
|
602
713
|
wrapFormSubmissionsCollection(formSubmissionsCollection) {
|
|
603
|
-
return
|
|
714
|
+
return attachStudioEditRedirectToCollection(formSubmissionsCollection, {
|
|
715
|
+
description: "Redirecting to the Studio submission workspace.",
|
|
716
|
+
emptyHref: formsBasePath,
|
|
717
|
+
emptyLabel: "Open Forms",
|
|
718
|
+
pathBase: `${formsBasePath}/submissions`,
|
|
719
|
+
title: "Opening Submission..."
|
|
720
|
+
});
|
|
604
721
|
},
|
|
605
722
|
wrapFormUploadsCollection(formUploadsCollection) {
|
|
606
|
-
return
|
|
723
|
+
return attachStudioEditRedirectToCollection(formUploadsCollection, {
|
|
724
|
+
description: "Redirecting to the Studio upload workspace.",
|
|
725
|
+
emptyHref: formsBasePath,
|
|
726
|
+
emptyLabel: "Open Forms",
|
|
727
|
+
pathBase: `${formsBasePath}/uploads`,
|
|
728
|
+
title: "Opening Upload..."
|
|
729
|
+
});
|
|
607
730
|
},
|
|
608
731
|
wrapGlobals(globals2) {
|
|
609
732
|
const labelMap = {
|
package/dist/admin/index.mjs
CHANGED
|
@@ -7,14 +7,14 @@ import {
|
|
|
7
7
|
socialMediaConnectionsField,
|
|
8
8
|
themePreferenceField,
|
|
9
9
|
withTooltips
|
|
10
|
-
} from "../chunk-
|
|
11
|
-
import "../chunk-W2UOCJDX.mjs";
|
|
10
|
+
} from "../chunk-KHK6RTGC.mjs";
|
|
12
11
|
import {
|
|
13
12
|
SOCIAL_MEDIA_DEFAULT_ICON_BY_PLATFORM,
|
|
14
13
|
SOCIAL_MEDIA_ICON_OPTIONS,
|
|
15
14
|
SOCIAL_MEDIA_PLATFORMS,
|
|
16
15
|
SOCIAL_MEDIA_PLATFORM_LABELS
|
|
17
16
|
} from "../chunk-ZTXJG4K5.mjs";
|
|
17
|
+
import "../chunk-W2UOCJDX.mjs";
|
|
18
18
|
import "../chunk-6BWS3CLP.mjs";
|
|
19
19
|
export {
|
|
20
20
|
SOCIAL_MEDIA_DEFAULT_ICON_BY_PLATFORM,
|
package/dist/admin-app/client.js
CHANGED
|
@@ -122,14 +122,21 @@ function AdminShellClient({
|
|
|
122
122
|
onLogout,
|
|
123
123
|
storageKey = "orion-admin-shell-collapsed"
|
|
124
124
|
}) {
|
|
125
|
-
const [collapsed, setCollapsed] = (0, import_react.useState)(
|
|
125
|
+
const [collapsed, setCollapsed] = (0, import_react.useState)(() => {
|
|
126
|
+
if (typeof window === "undefined") {
|
|
127
|
+
return true;
|
|
128
|
+
}
|
|
129
|
+
try {
|
|
130
|
+
return window.localStorage.getItem(storageKey) === "1";
|
|
131
|
+
} catch {
|
|
132
|
+
return false;
|
|
133
|
+
}
|
|
134
|
+
});
|
|
126
135
|
const [loggingOut, setLoggingOut] = (0, import_react.useState)(false);
|
|
127
136
|
(0, import_react.useEffect)(() => {
|
|
128
137
|
try {
|
|
129
138
|
const stored = window.localStorage.getItem(storageKey);
|
|
130
|
-
|
|
131
|
-
setCollapsed(true);
|
|
132
|
-
}
|
|
139
|
+
setCollapsed(stored === "1");
|
|
133
140
|
} catch {
|
|
134
141
|
}
|
|
135
142
|
}, [storageKey]);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as AdminBreadcrumbs, a as AdminNavInput, b as AdminNavLinkItem, c as AdminPage, d as AdminPageLinkOption, e as AdminPageRecord, M as MediaDetailPanelProps, f as MediaListItemProps, N as NestedNavItem, g as NestedNavItemInput, h as NestedNavTree, j as buildAdminPageLinkOptions, k as buildNestedNavTree, l as getAdminNavRows, n as normalizeAdminNavInputs, m as normalizeNestedNavItems, p as parseAdminHeaderNavFromForm } from '../index-
|
|
2
|
-
export { A as AdminBreadcrumbItem, a as AdminNavIcon, b as AdminNavItem, c as AdminRole, S as SiteFooterPreviewData, d as SiteHeaderPreviewData, e as SitePreviewLink, f as SitePreviewLocationSummary, g as SitePreviewSocialLink, n as navItemIsActive, r as roleCanAccessNav } from '../sitePreviewTypes-
|
|
1
|
+
export { A as AdminBreadcrumbs, a as AdminNavInput, b as AdminNavLinkItem, c as AdminPage, d as AdminPageLinkOption, e as AdminPageRecord, M as MediaDetailPanelProps, f as MediaListItemProps, N as NestedNavItem, g as NestedNavItemInput, h as NestedNavTree, j as buildAdminPageLinkOptions, k as buildNestedNavTree, l as getAdminNavRows, n as normalizeAdminNavInputs, m as normalizeNestedNavItems, p as parseAdminHeaderNavFromForm } from '../index-G_uTNffQ.mjs';
|
|
2
|
+
export { A as AdminBreadcrumbItem, a as AdminNavIcon, b as AdminNavItem, c as AdminRole, S as SiteFooterPreviewData, d as SiteHeaderPreviewData, e as SitePreviewLink, f as SitePreviewLocationSummary, g as SitePreviewSocialLink, n as navItemIsActive, r as roleCanAccessNav } from '../sitePreviewTypes-BrJwGzJj.mjs';
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
4
|
import 'react';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as AdminBreadcrumbs, a as AdminNavInput, b as AdminNavLinkItem, c as AdminPage, d as AdminPageLinkOption, e as AdminPageRecord, M as MediaDetailPanelProps, f as MediaListItemProps, N as NestedNavItem, g as NestedNavItemInput, h as NestedNavTree, j as buildAdminPageLinkOptions, k as buildNestedNavTree, l as getAdminNavRows, n as normalizeAdminNavInputs, m as normalizeNestedNavItems, p as parseAdminHeaderNavFromForm } from '../index-
|
|
2
|
-
export { A as AdminBreadcrumbItem, a as AdminNavIcon, b as AdminNavItem, c as AdminRole, S as SiteFooterPreviewData, d as SiteHeaderPreviewData, e as SitePreviewLink, f as SitePreviewLocationSummary, g as SitePreviewSocialLink, n as navItemIsActive, r as roleCanAccessNav } from '../sitePreviewTypes-
|
|
1
|
+
export { A as AdminBreadcrumbs, a as AdminNavInput, b as AdminNavLinkItem, c as AdminPage, d as AdminPageLinkOption, e as AdminPageRecord, M as MediaDetailPanelProps, f as MediaListItemProps, N as NestedNavItem, g as NestedNavItemInput, h as NestedNavTree, j as buildAdminPageLinkOptions, k as buildNestedNavTree, l as getAdminNavRows, n as normalizeAdminNavInputs, m as normalizeNestedNavItems, p as parseAdminHeaderNavFromForm } from '../index-DAdN56fM.js';
|
|
2
|
+
export { A as AdminBreadcrumbItem, a as AdminNavIcon, b as AdminNavItem, c as AdminRole, S as SiteFooterPreviewData, d as SiteHeaderPreviewData, e as SitePreviewLink, f as SitePreviewLocationSummary, g as SitePreviewSocialLink, n as navItemIsActive, r as roleCanAccessNav } from '../sitePreviewTypes-BrJwGzJj.js';
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
4
|
import 'react';
|