@websolutespa/payload-plugin-bowl 1.3.6 → 1.6.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 +12 -0
- package/dist/index.css +24 -22
- package/dist/index.d.ts +100 -71
- package/dist/index.js +1638 -1761
- package/package.json +4 -2
- package/scss/styles.scss +38 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @websolutespa/payload-plugin-bowl
|
|
2
2
|
|
|
3
|
+
## 1.6.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 6707ca2: Upgrading Payload 2.11.2
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- f664993: Added: useLivePreview
|
|
12
|
+
- Updated dependencies [6cbf4cb]
|
|
13
|
+
- @websolutespa/bom-core@0.6.7
|
|
14
|
+
|
|
3
15
|
## 1.3.6
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/index.css
CHANGED
|
@@ -1,24 +1,3 @@
|
|
|
1
|
-
/* src/components/Category/CategoryList.scss */
|
|
2
|
-
.category-list__actions {
|
|
3
|
-
position: sticky;
|
|
4
|
-
top: 0;
|
|
5
|
-
display: flex;
|
|
6
|
-
align-items: center;
|
|
7
|
-
justify-content: flex-end;
|
|
8
|
-
column-gap: 10px;
|
|
9
|
-
padding: 10px;
|
|
10
|
-
z-index: 30;
|
|
11
|
-
border-bottom: 1px solid var(--theme-elevation-100);
|
|
12
|
-
background: var(--theme-elevation-0);
|
|
13
|
-
}
|
|
14
|
-
.category-list__actions .btn {
|
|
15
|
-
margin: 0;
|
|
16
|
-
padding: 1px 6px;
|
|
17
|
-
}
|
|
18
|
-
.category-list .eyebrow {
|
|
19
|
-
top: 48px;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
1
|
/* src/components/DataTree/DataTree.scss */
|
|
23
2
|
:root {
|
|
24
3
|
--rct-item-height: 32px;
|
|
@@ -311,10 +290,11 @@ html[data-theme=dark],
|
|
|
311
290
|
align-items: center;
|
|
312
291
|
justify-content: flex-end;
|
|
313
292
|
column-gap: 10px;
|
|
314
|
-
padding:
|
|
293
|
+
padding: 13.5px 18.75px;
|
|
315
294
|
}
|
|
316
295
|
.category-tree__actions .btn {
|
|
317
296
|
margin: 0;
|
|
297
|
+
background-color: var(--theme-elevation-200);
|
|
318
298
|
}
|
|
319
299
|
.category-tree__foot {
|
|
320
300
|
display: flex;
|
|
@@ -374,6 +354,23 @@ html[data-theme=dark],
|
|
|
374
354
|
min-height: 0;
|
|
375
355
|
height: auto;
|
|
376
356
|
}
|
|
357
|
+
.category-edit__modal .collection-edit__header {
|
|
358
|
+
width: 100%;
|
|
359
|
+
}
|
|
360
|
+
.category-edit__modal .collection-edit__header-content {
|
|
361
|
+
display: flex;
|
|
362
|
+
justify-content: space-between;
|
|
363
|
+
width: 100%;
|
|
364
|
+
align-items: center;
|
|
365
|
+
margin: 0 0 2rem;
|
|
366
|
+
}
|
|
367
|
+
.category-edit__modal .collection-edit__header-content h2 {
|
|
368
|
+
margin: 0;
|
|
369
|
+
}
|
|
370
|
+
.category-edit__modal .collection-edit__header-content .icon--x {
|
|
371
|
+
width: 44px;
|
|
372
|
+
height: 44px;
|
|
373
|
+
}
|
|
377
374
|
.category-edit__modal .collection-edit__edit {
|
|
378
375
|
padding: 0;
|
|
379
376
|
margin: 0;
|
|
@@ -384,6 +381,7 @@ html[data-theme=dark],
|
|
|
384
381
|
.category-edit__modal .collection-edit__form {
|
|
385
382
|
width: 100%;
|
|
386
383
|
height: auto;
|
|
384
|
+
z-index: 1000;
|
|
387
385
|
}
|
|
388
386
|
.category-edit__header {
|
|
389
387
|
width: 100%;
|
|
@@ -521,6 +519,7 @@ html[data-theme=dark],
|
|
|
521
519
|
.import-modal__dropzone {
|
|
522
520
|
text-align: center;
|
|
523
521
|
padding: 20px;
|
|
522
|
+
margin-top: var(--base);
|
|
524
523
|
border: 3px #2f2f2f dashed;
|
|
525
524
|
width: 100%;
|
|
526
525
|
height: 150px;
|
|
@@ -597,6 +596,9 @@ html[data-theme=dark],
|
|
|
597
596
|
.custom-color-picker__input:not(:disabled):focus {
|
|
598
597
|
box-shadow: 0 2px 3px 0 rgba(0, 2, 4, 0.16), 0 6px 4px -4px rgba(0, 2, 4, 0.13);
|
|
599
598
|
}
|
|
599
|
+
.custom-color-picker__input[data-rtl=true] {
|
|
600
|
+
direction: rtl;
|
|
601
|
+
}
|
|
600
602
|
.custom-color-picker__input::-webkit-input-placeholder {
|
|
601
603
|
color: var(--theme-elevation-400);
|
|
602
604
|
font-weight: normal;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
import { Resource } from 'i18next';
|
|
2
|
-
import { Endpoint,
|
|
3
|
-
import * as payload_dist_fields_config_types from 'payload/dist/fields/config/types';
|
|
2
|
+
import { Endpoint, AdminView, Locale as Locale$1, Config } from 'payload/config';
|
|
4
3
|
import { Field, FieldBase, Tab, JSONField, Block as Block$1, FieldAffectingData, HookName, FieldHook as FieldHook$1, UIField as UIField$1 } from 'payload/dist/fields/config/types';
|
|
5
4
|
import * as payload_types from 'payload/types';
|
|
6
|
-
import { PayloadRequest, CollectionAfterChangeHook, CollectionAfterDeleteHook, CollectionConfig, Block, GlobalConfig, RichTextField, RelationshipField, CheckboxField, BlockField, DateField, TextField, GroupField, Field as Field$1, UploadField, ArrayField, NumberField, FieldHook, SelectField, CollapsibleField, RowField, TabsField, UIField, EmailField, TextareaField, RadioField, CodeField, PointField, SanitizedCollectionConfig } from 'payload/types';
|
|
5
|
+
import { PayloadRequest, CollectionAfterChangeHook, CollectionAfterDeleteHook, TypeWithID, CollectionConfig, Block, GlobalConfig, RichTextField, RelationshipField, CheckboxField, BlockField, DateField, TextField, GroupField, Field as Field$1, UploadField, ArrayField, NumberField, FieldHook, SelectField, CollapsibleField, RowField, TabsField, UIField, EmailField, TextareaField, RadioField, CodeField, PointField, SanitizedCollectionConfig } from 'payload/types';
|
|
7
6
|
import { IEntity, ILocale, ILocalizable, IEquatable, IMedia, ICategory, IPageRelation, IRoute, IMenu, IMenuItem, ICategorized, IMarket, IMemoryStore, ISchema } from '@websolutespa/bom-core';
|
|
8
7
|
import * as payload_dist_admin_components_forms_FieldDescription_types from 'payload/dist/admin/components/forms/FieldDescription/types';
|
|
9
8
|
import * as React from 'react';
|
|
10
9
|
import React__default, { ReactNode } from 'react';
|
|
11
|
-
import {
|
|
10
|
+
import { DocumentDrawerProps } from 'payload/dist/admin/components/elements/DocumentDrawer/types';
|
|
12
11
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
13
12
|
import { TreeItemIndex, TreeItem, TreeItemRenderContext, TreeInformation, TreeDataProvider, Disposable } from 'react-complex-tree';
|
|
14
|
-
import {
|
|
13
|
+
import { Props as Props$4 } from 'payload/dist/admin/components/views/collections/List/types';
|
|
15
14
|
import { User } from 'payload/dist/auth';
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
15
|
+
import { PaginatedDocs } from 'payload/database';
|
|
16
|
+
import { ContextType } from 'payload/dist/admin/components/utilities/DocumentInfo/types';
|
|
18
17
|
import { Props as Props$2 } from 'payload/components/views/Cell';
|
|
19
18
|
import { Props as Props$3 } from 'payload/components/fields/Text';
|
|
20
19
|
import { FieldTypes } from 'payload/dist/admin/components/forms/field-types';
|
|
@@ -61,8 +60,8 @@ declare const afterCategoryChangeHook: CollectionAfterChangeHook;
|
|
|
61
60
|
declare const afterCategoryDeleteHook: CollectionAfterDeleteHook;
|
|
62
61
|
|
|
63
62
|
declare function parseDepth(depth?: unknown): number;
|
|
64
|
-
declare function getCollectionItems<T extends TypeWithID
|
|
65
|
-
declare function getCollectionItem<T extends TypeWithID
|
|
63
|
+
declare function getCollectionItems<T extends TypeWithID & Record<string, unknown>>(req: PayloadRequest, slug: string, depth?: number): Promise<T[]>;
|
|
64
|
+
declare function getCollectionItem<T extends TypeWithID & Record<string, unknown>>(req: PayloadRequest, slug: string, id: string, depth?: number): Promise<T>;
|
|
66
65
|
declare function getGlobalItems<T extends TypeWithID = any>(req: PayloadRequest, slug: string, depth?: number): Promise<T[]>;
|
|
67
66
|
/**
|
|
68
67
|
* Rest api collection index get handler.
|
|
@@ -83,6 +82,7 @@ type IBulkRecord = {
|
|
|
83
82
|
declare const collectionBulkPatch: ((slug: string) => Endpoint);
|
|
84
83
|
/**
|
|
85
84
|
* Rest api collection update patch handler.
|
|
85
|
+
* known issue: collectionUpdatePatch() does not work, needs to be fixed
|
|
86
86
|
*/
|
|
87
87
|
declare const collectionUpdatePatch: ((slug: string) => Endpoint);
|
|
88
88
|
/**
|
|
@@ -275,7 +275,12 @@ declare function getStringParam(value: unknown): string | undefined;
|
|
|
275
275
|
|
|
276
276
|
type WithActionProps = (Omit<CollectionConfig, 'fields'> & {
|
|
277
277
|
fields: BowlField[];
|
|
278
|
-
|
|
278
|
+
views?: Record<string, AdminView>;
|
|
279
|
+
custom?: {
|
|
280
|
+
updateEndUser?: boolean;
|
|
281
|
+
createCredentials?: boolean;
|
|
282
|
+
[key: string]: unknown;
|
|
283
|
+
};
|
|
279
284
|
});
|
|
280
285
|
type WithAction = WithActionProps & {
|
|
281
286
|
type: 'withAction';
|
|
@@ -303,7 +308,7 @@ declare const withBlock: (options: BowlBlock) => Block;
|
|
|
303
308
|
|
|
304
309
|
type WithCollectionProps = (Omit<CollectionConfig, 'fields'> & {
|
|
305
310
|
fields: BowlField[];
|
|
306
|
-
|
|
311
|
+
views?: Record<string, AdminView>;
|
|
307
312
|
});
|
|
308
313
|
type WithCollection = WithCollectionProps & {
|
|
309
314
|
type: 'withCollection';
|
|
@@ -318,7 +323,7 @@ declare const withCollection: (config: WithCollectionProps) => CollectionConfig;
|
|
|
318
323
|
|
|
319
324
|
type WithGlobalProps = (Omit<GlobalConfig, 'fields'> & {
|
|
320
325
|
fields: BowlField[];
|
|
321
|
-
|
|
326
|
+
views?: Record<string, AdminView>;
|
|
322
327
|
});
|
|
323
328
|
type WithGlobal = WithGlobalProps & {
|
|
324
329
|
type: 'withGlobal';
|
|
@@ -333,7 +338,7 @@ declare const withGlobal: (config: WithGlobalProps) => GlobalConfig;
|
|
|
333
338
|
|
|
334
339
|
type WithMenuProps = (Omit<CollectionConfig, 'fields'> & {
|
|
335
340
|
fields: BowlField[];
|
|
336
|
-
|
|
341
|
+
views?: Record<string, AdminView>;
|
|
337
342
|
});
|
|
338
343
|
type WithMenu = WithMenuProps & {
|
|
339
344
|
type: 'withMenu';
|
|
@@ -342,7 +347,7 @@ declare const withMenu: (config: WithMenuProps) => CollectionConfig;
|
|
|
342
347
|
|
|
343
348
|
type WithPageProps = (Omit<CollectionConfig, 'fields'> & {
|
|
344
349
|
fields: BowlField[];
|
|
345
|
-
|
|
350
|
+
views?: Record<string, AdminView>;
|
|
346
351
|
});
|
|
347
352
|
type WithPage = WithPageProps & {
|
|
348
353
|
type: 'withPage';
|
|
@@ -357,7 +362,7 @@ declare const withPage: (config: CollectionConfig) => CollectionConfig;
|
|
|
357
362
|
|
|
358
363
|
type WithStaticProps = (Omit<CollectionConfig, 'fields'> & StaticCollectionConfig & {
|
|
359
364
|
fields: BowlField[];
|
|
360
|
-
|
|
365
|
+
views?: Record<string, AdminView>;
|
|
361
366
|
});
|
|
362
367
|
type WithStatic = WithStaticProps & {
|
|
363
368
|
type: 'withStatic';
|
|
@@ -390,15 +395,15 @@ declare const StaticCollectionDefault: Partial<CollectionConfig>;
|
|
|
390
395
|
*/
|
|
391
396
|
declare const withStaticCollection: ({ src, map, duration, ...config }: WithStaticProps) => CollectionConfig;
|
|
392
397
|
|
|
393
|
-
declare function decorateHref_<T extends ISchema = ISchema>(item: T, slug: string,
|
|
398
|
+
declare function decorateHref_<T extends ISchema = ISchema>(item: T, slug: string, context: MixerContext): Promise<T & {
|
|
394
399
|
href: string | null;
|
|
395
400
|
}>;
|
|
396
|
-
declare function decorateHrefs_<T extends ISchema = ISchema>(items: T[], slug: string,
|
|
401
|
+
declare function decorateHrefs_<T extends ISchema = ISchema>(items: T[], slug: string, context: MixerContext): Promise<(T & {
|
|
397
402
|
href: string | null;
|
|
398
403
|
})[]>;
|
|
399
404
|
|
|
400
|
-
declare function decorateNav_<T extends ISchema = ISchema>(item: T, slug: string,
|
|
401
|
-
declare function decorateNavs_<T extends ISchema = ISchema>(items: T[], slug: string,
|
|
405
|
+
declare function decorateNav_<T extends ISchema = ISchema>(item: T, slug: string, context: MixerContext): Promise<T>;
|
|
406
|
+
declare function decorateNavs_<T extends ISchema = ISchema>(items: T[], slug: string, context: MixerContext): Promise<T[]>;
|
|
402
407
|
declare function isUndecoratedMenuItem(item: unknown): item is IUndecoratedMenuItem;
|
|
403
408
|
declare function isRelation(item: unknown): item is IRelation;
|
|
404
409
|
type IRelation = {
|
|
@@ -406,10 +411,10 @@ type IRelation = {
|
|
|
406
411
|
value: IEntity | IEntity[];
|
|
407
412
|
};
|
|
408
413
|
|
|
409
|
-
declare function decorateSchema_<T extends ISchema = ISchema>(item: T, slug: string,
|
|
414
|
+
declare function decorateSchema_<T extends ISchema = ISchema>(item: T, slug: string, context: MixerContext): Promise<T & {
|
|
410
415
|
schema: string;
|
|
411
416
|
}>;
|
|
412
|
-
declare function decorateSchemas_<T extends ISchema = ISchema>(items: T[], slug: string,
|
|
417
|
+
declare function decorateSchemas_<T extends ISchema = ISchema>(items: T[], slug: string, context: MixerContext): Promise<(T & {
|
|
413
418
|
schema: string;
|
|
414
419
|
})[]>;
|
|
415
420
|
|
|
@@ -473,7 +478,7 @@ type WithDescription = WithDescriptionProps & {
|
|
|
473
478
|
declare const withDescription: (options?: WithDescriptionProps) => RichTextField;
|
|
474
479
|
declare const withDescriptionRequired: (options?: WithDescriptionProps) => RichTextField;
|
|
475
480
|
|
|
476
|
-
type WithIdProps = (Omit<TextField, 'type' | 'name'> & {
|
|
481
|
+
type WithIdProps = (Omit<TextField, 'type' | 'name' | 'hasMany'> & {
|
|
477
482
|
name?: string;
|
|
478
483
|
});
|
|
479
484
|
type WithId = WithIdProps & {
|
|
@@ -522,29 +527,29 @@ declare const appearanceOptions: {
|
|
|
522
527
|
value: string;
|
|
523
528
|
};
|
|
524
529
|
};
|
|
525
|
-
declare const withLink: ({ appearances, disableLabel, ...props }?: WithLinkProps) => Omit<
|
|
526
|
-
type: "group";
|
|
527
|
-
fields: Field$1[];
|
|
530
|
+
declare const withLink: ({ appearances, disableLabel, ...props }?: WithLinkProps) => Omit<payload_types.FieldBase, "required" | "validation"> & {
|
|
528
531
|
admin?: {
|
|
529
|
-
position?: "sidebar";
|
|
530
|
-
width?: string;
|
|
531
|
-
style?: React.CSSProperties;
|
|
532
532
|
className?: string;
|
|
533
|
-
readOnly?: boolean;
|
|
534
|
-
disabled?: boolean;
|
|
535
|
-
condition?: payload_dist_fields_config_types.Condition<any, any>;
|
|
536
|
-
description?: payload_dist_admin_components_forms_FieldDescription_types.Description;
|
|
537
533
|
components?: {
|
|
538
|
-
Filter?: React.ComponentType<any>;
|
|
539
534
|
Cell?: React.ComponentType<any>;
|
|
540
535
|
Field?: React.ComponentType<any>;
|
|
536
|
+
Filter?: React.ComponentType<any>;
|
|
541
537
|
};
|
|
538
|
+
condition?: payload_types.Condition<any, any>;
|
|
539
|
+
description?: payload_dist_admin_components_forms_FieldDescription_types.Description;
|
|
542
540
|
disableBulkEdit?: boolean;
|
|
541
|
+
disabled?: boolean;
|
|
543
542
|
hidden?: boolean;
|
|
543
|
+
position?: "sidebar";
|
|
544
|
+
readOnly?: boolean;
|
|
545
|
+
style?: React.CSSProperties;
|
|
546
|
+
width?: string;
|
|
544
547
|
} & {
|
|
545
548
|
hideGutter?: boolean;
|
|
546
549
|
};
|
|
550
|
+
fields: Field$1[];
|
|
547
551
|
interfaceName?: string;
|
|
552
|
+
type: "group";
|
|
548
553
|
};
|
|
549
554
|
|
|
550
555
|
type WithMarketsProps = (Omit<RelationshipField, 'type' | 'name' | 'relationTo'> & {
|
|
@@ -577,7 +582,7 @@ declare const MediasDefaults: ArrayField;
|
|
|
577
582
|
declare const withMedias: (options?: WithMediasProps) => ArrayField;
|
|
578
583
|
declare const withMediasRequired: (options?: WithMediasProps) => ArrayField;
|
|
579
584
|
|
|
580
|
-
type WithNameProps = (Omit<TextField, 'type' | 'name'> & {
|
|
585
|
+
type WithNameProps = (Omit<TextField, 'type' | 'name' | 'hasMany'> & {
|
|
581
586
|
name?: string;
|
|
582
587
|
});
|
|
583
588
|
type WithName = WithNameProps & {
|
|
@@ -620,6 +625,16 @@ declare const withRichText: (options?: Partial<RichTextField>) => RichTextField;
|
|
|
620
625
|
declare const withRichTextRequired: (options?: Partial<RichTextField>) => RichTextField;
|
|
621
626
|
declare function richTextSerialize(children?: any[]): string;
|
|
622
627
|
|
|
628
|
+
type WithRolesProps = (Omit<SelectField, 'type' | 'name' | 'options'> & {
|
|
629
|
+
name?: string;
|
|
630
|
+
roles?: BowlRole[];
|
|
631
|
+
});
|
|
632
|
+
type WithRoles = WithRolesProps & {
|
|
633
|
+
type: 'withRoles';
|
|
634
|
+
};
|
|
635
|
+
declare const UserRolesDefaults: SelectField;
|
|
636
|
+
declare const withRoles: ({ roles, ...fieldOptions }?: WithRolesProps) => SelectField;
|
|
637
|
+
|
|
623
638
|
type WithSelectProps = (Omit<SelectField, 'type' | 'name'> & {
|
|
624
639
|
name?: string;
|
|
625
640
|
});
|
|
@@ -630,7 +645,7 @@ declare const SelectDefaults: SelectField;
|
|
|
630
645
|
declare const withSelect: (options?: Partial<SelectField>) => SelectField;
|
|
631
646
|
declare const withSelectRequired: (options?: Partial<SelectField>) => SelectField;
|
|
632
647
|
|
|
633
|
-
type WithSlugProps = (Omit<TextField, 'type' | 'name'> & {
|
|
648
|
+
type WithSlugProps = (Omit<TextField, 'type' | 'name' | 'hasMany'> & {
|
|
634
649
|
fieldToUse: string;
|
|
635
650
|
});
|
|
636
651
|
type WithSlug = WithSlugProps & {
|
|
@@ -649,7 +664,7 @@ declare const TemplateDefaults: RelationshipField;
|
|
|
649
664
|
declare const withTemplate: ({ slugToUse, ...options }: WithTemplateProps) => RelationshipField;
|
|
650
665
|
declare const withTemplateRequired: ({ slugToUse, ...options }: WithTemplateProps) => RelationshipField;
|
|
651
666
|
|
|
652
|
-
type WithTextProps = (Omit<TextField, 'type' | 'name'> & {
|
|
667
|
+
type WithTextProps = (Omit<TextField, 'type' | 'name' | 'hasMany'> & {
|
|
653
668
|
name?: string;
|
|
654
669
|
});
|
|
655
670
|
type WithText = WithTextProps & {
|
|
@@ -659,7 +674,7 @@ declare const TextDefaults: TextField;
|
|
|
659
674
|
declare const withText: (options?: WithTextProps) => TextField;
|
|
660
675
|
declare const withTextRequired: (options?: WithTextProps) => TextField;
|
|
661
676
|
|
|
662
|
-
type WithTitleProps = (Omit<TextField, 'type' | 'name'> & {
|
|
677
|
+
type WithTitleProps = (Omit<TextField, 'type' | 'name' | 'hasMany'> & {
|
|
663
678
|
name?: string;
|
|
664
679
|
});
|
|
665
680
|
type WithTitle = WithTitleProps & {
|
|
@@ -668,26 +683,10 @@ type WithTitle = WithTitleProps & {
|
|
|
668
683
|
declare const withTitle: (options?: WithTitleProps) => TextField;
|
|
669
684
|
declare const withTitleRequired: (options?: WithTitleProps) => TextField;
|
|
670
685
|
|
|
671
|
-
type WithUserRolesProps = (Omit<SelectField, 'type' | 'name' | 'options'> & {
|
|
672
|
-
name?: string;
|
|
673
|
-
});
|
|
674
|
-
type WithUserRoles = WithUserRolesProps & {
|
|
675
|
-
type: 'withUserRoles';
|
|
676
|
-
};
|
|
677
|
-
declare const UserRolesDefaults: SelectField;
|
|
678
|
-
declare const withUserRoles: (srcOptions?: Partial<SelectField>) => SelectField;
|
|
679
|
-
|
|
680
686
|
declare function log(...rest: unknown[]): void;
|
|
681
687
|
|
|
682
|
-
declare const
|
|
683
|
-
|
|
684
|
-
declare const defaultLocales: string[];
|
|
685
|
-
declare const defaultLocale: string;
|
|
686
|
-
declare const defaultMarket: string;
|
|
687
|
-
declare const options: BowlOptions;
|
|
688
|
-
declare const internalSlugs: string[];
|
|
689
|
-
|
|
690
|
-
type Locale = typeof options.locales[number];
|
|
688
|
+
declare const locales: any[];
|
|
689
|
+
type Locale = typeof locales[number];
|
|
691
690
|
type LocalizedText = {
|
|
692
691
|
[key in Locale]?: string;
|
|
693
692
|
};
|
|
@@ -704,7 +703,7 @@ declare function translateTab(tab: Tab): Tab;
|
|
|
704
703
|
declare function translateTabs(tabs: Tab[]): Tab[];
|
|
705
704
|
declare function translateBlock(block: Block): Block;
|
|
706
705
|
declare function translateBlocks(blocks: Block[]): Block[];
|
|
707
|
-
declare function translateField(field: Field$1): payload_types.
|
|
706
|
+
declare function translateField(field: Field$1): payload_types.CollapsibleField | payload_types.RowField | payload_types.TabsField | payload_types.UIField | payload_types.ArrayField | BlockField | payload_types.CheckboxField | payload_types.CodeField | payload_types.DateField | payload_types.EmailField | payload_types.GroupField | payload_types.JSONField | payload_types.NumberField | payload_types.PointField | payload_types.RadioField | payload_types.RelationshipField | payload_types.RichTextField<any, any, {}> | payload_types.SelectField | payload_types.TextField | payload_types.TextareaField | payload_types.UploadField;
|
|
708
707
|
declare function translateFields(fields: Field$1[]): Field$1[];
|
|
709
708
|
declare function translateCollection(config: CollectionConfig): CollectionConfig;
|
|
710
709
|
declare function translateGlobal(config: GlobalConfig): GlobalConfig;
|
|
@@ -740,6 +739,23 @@ declare function eachDataField(fields: Field$1[], callback: (field: DataField, p
|
|
|
740
739
|
declare function textToSlug(value: string): string;
|
|
741
740
|
declare const formatSlug: (fallback: string) => FieldHook;
|
|
742
741
|
|
|
742
|
+
type PublicURL = {
|
|
743
|
+
marketId: string;
|
|
744
|
+
localeId: string;
|
|
745
|
+
templateId: string;
|
|
746
|
+
documentId: string;
|
|
747
|
+
_status?: string;
|
|
748
|
+
_live?: boolean;
|
|
749
|
+
_token?: string;
|
|
750
|
+
};
|
|
751
|
+
declare function getPublicURL({ marketId, localeId, ...qs }: PublicURL): string;
|
|
752
|
+
declare function getPreviewURL(doc: Record<string, any>, locale: string, _token?: string): string;
|
|
753
|
+
declare function getLivePreviewURL(args: {
|
|
754
|
+
data: Record<string, any>;
|
|
755
|
+
documentInfo: ContextType;
|
|
756
|
+
locale: Locale$1;
|
|
757
|
+
}): string;
|
|
758
|
+
|
|
743
759
|
type CollectionHooks = Omit<CollectionConfig['hooks'], 'afterError'>;
|
|
744
760
|
type CollectionHookName = keyof CollectionHooks;
|
|
745
761
|
type CollectionHook<N extends CollectionHookName> = CollectionHooks[N][number];
|
|
@@ -764,7 +780,7 @@ type WithNewsletterSubscription = WithNewsletterSubscriptionProps & {
|
|
|
764
780
|
type: 'withNewsletterSubscription';
|
|
765
781
|
};
|
|
766
782
|
|
|
767
|
-
type WithColorProps = (Omit<TextField, 'type' | 'name'> & {
|
|
783
|
+
type WithColorProps = (Omit<TextField, 'type' | 'name' | 'hasMany'> & {
|
|
768
784
|
name?: string;
|
|
769
785
|
});
|
|
770
786
|
type WithColor = WithColorProps & {
|
|
@@ -858,15 +874,15 @@ type BowlRowField = Omit<RowField, 'fields'> & {
|
|
|
858
874
|
type BowlTabsField = Omit<TabsField, 'tabs'> & {
|
|
859
875
|
tabs: BowlTab[];
|
|
860
876
|
};
|
|
861
|
-
type BowlField = Exclude<Field$1, ArrayField | BlockField | CollapsibleField | GroupField | RowField | TabsField> | BowlArrayField | BowlBlockField | BowlCollapsibleField | BowlGroupField | BowlRowField | BowlTabsField | WithAbstract | WithCategory | WithCheckbox | WithColor | WithComponents | WithDate | WithDescription | WithId | WithIsActive | WithIsDefault | WithLink | WithMarkets | WithMedia | WithMedias | WithName | WithNewsletterSubscription | WithOrder | WithRelated | WithRichText | WithSelect | WithSlug | WithTemplate | WithText | WithTitle |
|
|
877
|
+
type BowlField = Exclude<Field$1, ArrayField | BlockField | CollapsibleField | GroupField | RowField | TabsField> | BowlArrayField | BowlBlockField | BowlCollapsibleField | BowlGroupField | BowlRowField | BowlTabsField | WithAbstract | WithCategory | WithCheckbox | WithColor | WithComponents | WithDate | WithDescription | WithId | WithIsActive | WithIsDefault | WithLink | WithMarkets | WithMedia | WithMedias | WithName | WithNewsletterSubscription | WithOrder | WithRelated | WithRichText | WithSelect | WithSlug | WithTemplate | WithText | WithTitle | WithRoles;
|
|
862
878
|
type BowlBlock = Block | WithBlock;
|
|
863
879
|
type BowlCollection = WithCollection | WithPage | WithStatic | WithMenu | WithAction | CollectionConfig & {
|
|
864
880
|
type?: string;
|
|
865
|
-
|
|
881
|
+
views?: Record<string, AdminView>;
|
|
866
882
|
};
|
|
867
883
|
type BowlGlobal = WithGlobal | GlobalConfig & {
|
|
868
884
|
type?: string;
|
|
869
|
-
|
|
885
|
+
views?: Record<string, AdminView>;
|
|
870
886
|
};
|
|
871
887
|
type CollectionHelper = (options: BowlOptions) => BowlCollection;
|
|
872
888
|
type GlobalHelper = (options: BowlOptions) => BowlGlobal;
|
|
@@ -921,7 +937,7 @@ type BowlOptions = {
|
|
|
921
937
|
defaultLocale: string;
|
|
922
938
|
defaultMarket: string;
|
|
923
939
|
group: BowlGroup;
|
|
924
|
-
locales: string[];
|
|
940
|
+
locales: string[] | Locale$1[];
|
|
925
941
|
menu: {
|
|
926
942
|
blocks: BowlBlock[];
|
|
927
943
|
};
|
|
@@ -952,14 +968,21 @@ declare const MenuItem: (pages: string[], customBlocks?: BowlBlock[], depth?: nu
|
|
|
952
968
|
|
|
953
969
|
declare const bowl: (sourceOptions?: BowlInitOptions) => (sourceConfig: BowlConfig) => Config;
|
|
954
970
|
|
|
955
|
-
type
|
|
956
|
-
|
|
971
|
+
type CategoryMenuProps = {
|
|
972
|
+
collection: SanitizedCollectionConfig;
|
|
973
|
+
};
|
|
974
|
+
declare const CategoryMenu: React__default.FC<CategoryMenuProps>;
|
|
957
975
|
|
|
958
976
|
type CategoryTreeProps = {
|
|
959
977
|
collection: SanitizedCollectionConfig;
|
|
960
978
|
};
|
|
961
979
|
declare const CategoryTree: React__default.FC<CategoryTreeProps>;
|
|
962
980
|
|
|
981
|
+
type CustomEditModalProps = DocumentDrawerProps & {
|
|
982
|
+
filter?: (fields: Field$1[]) => Field$1[];
|
|
983
|
+
};
|
|
984
|
+
declare const CustomEditModal: React__default.FC<CustomEditModalProps>;
|
|
985
|
+
|
|
963
986
|
type TreeItems<T = any> = Record<TreeItemIndex, TreeItem<T>>;
|
|
964
987
|
type DataTreeItemProps<T = any, C extends string = never> = {
|
|
965
988
|
item: TreeItem<T>;
|
|
@@ -1007,11 +1030,6 @@ type DecoratedListProps = {
|
|
|
1007
1030
|
};
|
|
1008
1031
|
declare const DecoratedList: React__default.FC<DecoratedListProps>;
|
|
1009
1032
|
|
|
1010
|
-
type EditModalProps = IndexProps & {
|
|
1011
|
-
filter?: (fields: Field[]) => Field[];
|
|
1012
|
-
};
|
|
1013
|
-
declare const EditModal: React__default.FC<EditModalProps>;
|
|
1014
|
-
|
|
1015
1033
|
type IImportItem = Record<string, string | number | boolean | Date>;
|
|
1016
1034
|
|
|
1017
1035
|
type ImportExportListProps<T = any> = Props$4 & {
|
|
@@ -1034,11 +1052,14 @@ declare const LeaveModal: (props: {
|
|
|
1034
1052
|
}) => react_jsx_runtime.JSX.Element;
|
|
1035
1053
|
|
|
1036
1054
|
type LocalizedDescriptionProps = {
|
|
1037
|
-
value
|
|
1055
|
+
value?: unknown;
|
|
1038
1056
|
callback: (value?: unknown) => string;
|
|
1039
1057
|
};
|
|
1040
1058
|
declare const LocalizedDescription: React__default.FC<LocalizedDescriptionProps>;
|
|
1041
|
-
declare function withLocalizedDescription(callback: (value?: unknown) => string): React__default.
|
|
1059
|
+
declare function withLocalizedDescription(callback: (value?: unknown) => string): React__default.FunctionComponent<{
|
|
1060
|
+
path: string;
|
|
1061
|
+
value?: unknown;
|
|
1062
|
+
}>;
|
|
1042
1063
|
|
|
1043
1064
|
type Props$1 = {};
|
|
1044
1065
|
declare const Publish: React__default.FC<Props$1>;
|
|
@@ -1054,10 +1075,18 @@ declare function toField(item: BowlField): Field$1;
|
|
|
1054
1075
|
declare function toBlock(item: BowlBlock): Block;
|
|
1055
1076
|
declare function toTab(item: BowlTab): Tab;
|
|
1056
1077
|
|
|
1078
|
+
declare const defaultSlug: BowlSlug;
|
|
1079
|
+
declare const defaultGroup: BowlGroup;
|
|
1080
|
+
declare const defaultLocales: string[];
|
|
1081
|
+
declare const defaultLocale: string;
|
|
1082
|
+
declare const defaultMarket: string;
|
|
1083
|
+
declare const options: BowlOptions;
|
|
1084
|
+
declare const internalSlugs: string[];
|
|
1085
|
+
|
|
1057
1086
|
declare const Icon: React__default.FC;
|
|
1058
1087
|
|
|
1059
1088
|
declare const Logo: React__default.FC;
|
|
1060
1089
|
|
|
1061
1090
|
declare function webpack(sourceConfig: BowlConfig): (config: any) => any;
|
|
1062
1091
|
|
|
1063
|
-
export { ActionDefault, BlockDefaults, BowlArrayField, BowlBlock, BowlBlockField, BowlCollapsibleField, BowlCollection, BowlConfig, BowlField, BowlGlobal, BowlGroup, BowlGroupField, BowlInitOptions, BowlOptions, BowlPlugin, BowlRole, BowlRowField, BowlSlug, BowlTab, BowlTabsField, CategoryDefaults,
|
|
1092
|
+
export { ActionDefault, BlockDefaults, BowlArrayField, BowlBlock, BowlBlockField, BowlCollapsibleField, BowlCollection, BowlConfig, BowlField, BowlGlobal, BowlGroup, BowlGroupField, BowlInitOptions, BowlOptions, BowlPlugin, BowlRole, BowlRowField, BowlSlug, BowlTab, BowlTabsField, CategoryDefaults, CategoryMenu, CategoryMenuProps, CategoryTree, CategoryTreeProps, CheckboxDefaults, CollectionDefault, CollectionHelper, CollectionHook, CollectionHookName, CollectionHooks, ColorCell, ColorConfig, ColorField, ComponentsDefaults, CustomEditModal, CustomEditModalProps, DataField, DataTree, DataTreeDragItem, DataTreeItem, DataTreeItemLi, DataTreeItemProps, DataTreeProps, DataTreeProvider, DataTreeRenameItem, DateDefaults, DebugField, DecoratedList, DecoratedListProps, GlobalDefault, GlobalHelper, GlobalHook, GlobalHookName, GlobalHooks, GroupKey, IBulkAction, IBulkRecord, ICache, IImportItem, IPage, IPageFull, IPagination, IRelation, IUndecoratedMenu, IUndecoratedMenuBase, IUndecoratedMenuCategory, IUndecoratedMenuCustom, IUndecoratedMenuGroup, IUndecoratedMenuItem, IUndecoratedMenuLink, IUndecoratedMenuPage, Icon, ImportExportList, ImportExportListProps, ImportExportRedirectList, ImportLogInvalidTypes, ImportLogType, ImportMode, InMemoryCache, InMemoryCacheOptions, LeaveModal, LeaveWithoutSavingModal, LeaveWithoutSavingModalProps, LocalizedDescription, LocalizedDescriptionProps, Logo, MAX_INT, MarketDefaults, MediaDefaults, MediasDefaults, MenuItem, MixerContext, Option, OrderDefaults, PRESENTATION_FIELDS, PageDefault, PresentationField, PublicURL, Publish, RelatedDefaults, RichTextDefaults, Save, SaveDraft, SelectDefaults, StaticCollectionConfig, StaticCollectionDefault, TemplateDefaults, TextDefaults, TreeItems, UIStaticCell, UIStaticField, UserRolesDefaults, WithAbstract, WithAbstractProps, WithAction, WithActionProps, WithBlock, WithBlockProps, WithCategory, WithCategoryProps, WithCheckbox, WithCheckboxProps, WithCollection, WithCollectionProps, WithColor, WithColorProps, WithComponents, WithComponentsProps, WithDate, WithDateProps, WithDescription, WithDescriptionProps, WithGlobal, WithGlobalProps, WithId, WithIdProps, WithIsActive, WithIsActiveProps, WithIsDefault, WithIsDefaultProps, WithLink, WithLinkOptions, WithLinkProps, WithMarkets, WithMarketsProps, WithMedia, WithMediaProps, WithMedias, WithMediasProps, WithMenu, WithMenuProps, WithName, WithNameProps, WithOrder, WithOrderProps, WithPage, WithPageProps, WithRelated, WithRelatedProps, WithRichText, WithRichTextProps, WithRoles, WithRolesProps, WithSelect, WithSelectProps, WithSlug, WithSlugProps, WithStatic, WithStaticProps, WithTemplate, WithTemplateProps, WithText, WithTextProps, WithTitle, WithTitleProps, afterCategoryChangeHook, afterCategoryDeleteHook, afterPageChangeHook, afterPageDeleteHook, afterPageReadHook, appearanceOptions, beforeValidate, bowl, collectionBulkPatch, collectionExportGet, collectionImportPost, collectionIndexGet, collectionUpdatePatch, debugField, decorateHref_, decorateHrefs_, decorateMenu, decorateMenuCategory, decorateMenuGroup, decorateMenuItem, decorateMenuLink, decorateMenuPage, decorateMenuRoute, decorateMenus, decorateNav_, decorateNavs_, decorateSchema_, decorateSchemas_, deepMerge, bowl as default, defaultGroup, defaultLocale, defaultLocales, defaultMarket, defaultSlug, eachDataField, eachField, encryptData, fetchCollection, fetchCollectionItems, fetchEachMarketLocale, fetchEndpoint, fetchGlobal, fetchGlobalItems, fetchPages, formatSlug, getApiUrl, getCollectionItem, getCollectionItems, getGlobalItems, getLivePreviewURL, getLocale, getLocales, getMarkets, getNumericParam, getObjectParam, getPagination, getPreviewURL, getPublicURL, getRoute, getRouteByCategoryAndLocale, getRouteByItemAndLocale, getRoutes, getSearchUrl, getStaticLoader, getStore, getStringParam, getTranslation, getTranslations, getTreeItemClassName, hasMarket, hasRole, importExportListWithParser, internalSlugs, isAdmin, isDataField, isObject, isPresentationField, isRelation, isRole, isUndecoratedMenuItem, keyWithRequest, localeGet, localizeCollection, log, logMissingTranslations, menuDetailGet, menuIndexGet, modalSlug, optinPost, options, pageDetailGet, pageIndexGet, parseDepth, populateStaticFields, redirectParser, richTextAfterReadHook, richTextSerialize, roles, routeGet, routePost, routePostHandler, slugToLabel, slugToLabels, sortByGroup, sortCollection, storeGet, textToSlug, toBlock, toCollection, toField, toGlobal, toTab, translateBlock, translateBlocks, translateCollection, translateField, translateFields, translateGlobal, translateTab, translateTabs, webpack, whereCollection, withAbstract, withAbstractRequired, withAction, withBlock, withCategory, withCategoryRequired, withCheckbox, withCheckboxRequired, withCollection, withCollectionHook, withColor, withColorRequired, withComponents, withDate, withDateRequired, withDescription, withDescriptionRequired, withFieldHook, withGlobal, withGlobalHook, withId, withIdRequired, withIsActive, withIsActiveRequired, withIsDefault, withIsDefaultRequired, withLink, withLocalizedDescription, withMarkets, withMarketsRequired, withMedia, withMediaRequired, withMedias, withMediasRequired, withMenu, withName, withNameRequired, withOrder, withOrderRequired, withPage, withRelated, withRichText, withRichTextRequired, withRoles, withSelect, withSelectRequired, withSlug, withSlugRequired, withStaticCollection, withTemplate, withTemplateRequired, withText, withTextRequired, withTitle, withTitleRequired, withUIStatic };
|