@websolutespa/payload-plugin-bowl 1.3.1 → 1.3.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
@@ -1,126 +1,132 @@
1
- # @websolutespa/payload-plugin-bowl
2
-
3
- ## 1.3.1
4
-
5
- ### Patch Changes
6
-
7
- - Added: configuration option plugins
8
-
9
- ## 1.3.0
10
-
11
- ### Minor Changes
12
-
13
- - c7a99a2b: Added tests
14
-
15
- ### Patch Changes
16
-
17
- - dad63747: Added defaultMarket, defaultLocale
18
- - 11b63e3b: Fixed test config
19
- - c7a99a2b: Fixed collection bulk patch handler
20
- - Updated dependencies [dad63747]
21
- - @websolutespa/bom-core@0.6.1
22
-
23
- ## 1.2.0
24
-
25
- ### Minor Changes
26
-
27
- - Added: MenuItem extra
28
-
29
- ## 1.1.0
30
-
31
- ### Minor Changes
32
-
33
- - Updating: dependencies
34
-
35
- ## 1.0.6
36
-
37
- ### Patch Changes
38
-
39
- - Fixing: validateHexColor import
40
-
41
- ## 1.0.5
42
-
43
- ### Patch Changes
44
-
45
- - Fixing: check redirects by pattern
46
-
47
- ## 1.0.4
48
-
49
- ### Patch Changes
50
-
51
- - Fixing: storeGet endpoint locale
52
-
53
- ## 1.0.3
54
-
55
- ### Patch Changes
56
-
57
- - Modified: withPage preview, getApiUrl
58
-
59
- ## 1.0.2
60
-
61
- ### Patch Changes
62
-
63
- - Added: duration to withStaticCollection
64
- - Fixing: eachField
65
-
66
- ## 1.0.1
67
-
68
- ### Minor Changes
69
-
70
- - Added: CategoryTree
71
- - Fixing: sass
72
-
73
- ## 0.5.0
74
-
75
- ### Minor Changes
76
-
77
- - Modified routes, added redirects
78
-
79
- ## 0.4.0
80
-
81
- ### Minor Changes
82
-
83
- - Removed: external dependency @websolutespa/payload-plugin-localization
84
-
85
- ## 0.3.2
86
-
87
- ### Patch Changes
88
-
89
- - Fixing: avoid categories circular reference
90
-
91
- ## 0.3.1
92
-
93
- ### Patch Changes
94
-
95
- - Modified: ILocalizable
96
-
97
- ## 0.3.0
98
-
99
- ### Minor Changes
100
-
101
- - Added: splat routes
102
-
103
- ## 0.2.0
104
-
105
- ### Minor Changes
106
-
107
- - Added: menu, @websolutespa/bom-core
108
-
109
- ## 0.1.1
110
-
111
- ### Patch Changes
112
-
113
- - Modified: route service
114
- - Added: white label
115
-
116
- ## 0.1.0
117
-
118
- ### Minor Changes
119
-
120
- - mock refactor
121
-
122
- ## 0.0.1
123
-
124
- ### Patch Changes
125
-
126
- - Added: first release
1
+ # @websolutespa/payload-plugin-bowl
2
+
3
+ ## 1.3.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 8776e50b: Modified: PageService decorators
8
+
9
+ ## 1.3.1
10
+
11
+ ### Patch Changes
12
+
13
+ - Added: configuration option plugins
14
+
15
+ ## 1.3.0
16
+
17
+ ### Minor Changes
18
+
19
+ - c7a99a2b: Added tests
20
+
21
+ ### Patch Changes
22
+
23
+ - dad63747: Added defaultMarket, defaultLocale
24
+ - 11b63e3b: Fixed test config
25
+ - c7a99a2b: Fixed collection bulk patch handler
26
+ - Updated dependencies [dad63747]
27
+ - @websolutespa/bom-core@0.6.1
28
+
29
+ ## 1.2.0
30
+
31
+ ### Minor Changes
32
+
33
+ - Added: MenuItem extra
34
+
35
+ ## 1.1.0
36
+
37
+ ### Minor Changes
38
+
39
+ - Updating: dependencies
40
+
41
+ ## 1.0.6
42
+
43
+ ### Patch Changes
44
+
45
+ - Fixing: validateHexColor import
46
+
47
+ ## 1.0.5
48
+
49
+ ### Patch Changes
50
+
51
+ - Fixing: check redirects by pattern
52
+
53
+ ## 1.0.4
54
+
55
+ ### Patch Changes
56
+
57
+ - Fixing: storeGet endpoint locale
58
+
59
+ ## 1.0.3
60
+
61
+ ### Patch Changes
62
+
63
+ - Modified: withPage preview, getApiUrl
64
+
65
+ ## 1.0.2
66
+
67
+ ### Patch Changes
68
+
69
+ - Added: duration to withStaticCollection
70
+ - Fixing: eachField
71
+
72
+ ## 1.0.1
73
+
74
+ ### Minor Changes
75
+
76
+ - Added: CategoryTree
77
+ - Fixing: sass
78
+
79
+ ## 0.5.0
80
+
81
+ ### Minor Changes
82
+
83
+ - Modified routes, added redirects
84
+
85
+ ## 0.4.0
86
+
87
+ ### Minor Changes
88
+
89
+ - Removed: external dependency @websolutespa/payload-plugin-localization
90
+
91
+ ## 0.3.2
92
+
93
+ ### Patch Changes
94
+
95
+ - Fixing: avoid categories circular reference
96
+
97
+ ## 0.3.1
98
+
99
+ ### Patch Changes
100
+
101
+ - Modified: ILocalizable
102
+
103
+ ## 0.3.0
104
+
105
+ ### Minor Changes
106
+
107
+ - Added: splat routes
108
+
109
+ ## 0.2.0
110
+
111
+ ### Minor Changes
112
+
113
+ - Added: menu, @websolutespa/bom-core
114
+
115
+ ## 0.1.1
116
+
117
+ ### Patch Changes
118
+
119
+ - Modified: route service
120
+ - Added: white label
121
+
122
+ ## 0.1.0
123
+
124
+ ### Minor Changes
125
+
126
+ - mock refactor
127
+
128
+ ## 0.0.1
129
+
130
+ ### Patch Changes
131
+
132
+ - Added: first release
package/dist/index.d.ts CHANGED
@@ -1,10 +1,10 @@
1
- import { Endpoint, AdminRoute, Config } from 'payload/config';
2
1
  import { Resource } from 'i18next';
2
+ import { Endpoint, AdminRoute, Config } from 'payload/config';
3
3
  import * as payload_dist_fields_config_types from 'payload/dist/fields/config/types';
4
4
  import { Field, FieldHookArgs, Tab, JSONField, Block as Block$1, FieldAffectingData, HookName, FieldHook as FieldHook$1, FieldBase, UIField as UIField$1 } from 'payload/dist/fields/config/types';
5
5
  import * as payload_types from 'payload/types';
6
6
  import { PayloadRequest, CollectionAfterChangeHook, CollectionAfterDeleteHook, Block, CollectionConfig, 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
- import { IEntity, ILocale, ILocalizable, IEquatable, IMedia, ICategory, IPageRelation, IMenu, IRoute, IMenuItem, ISchema, ICategorized, IMarket, IMemoryStore } from '@websolutespa/bom-core';
7
+ import { IEntity, ILocale, ILocalizable, IEquatable, IMedia, ICategory, IPageRelation, IMenu, IRoute, IMenuItem, ICategorized, IMarket, IMemoryStore, ISchema } from '@websolutespa/bom-core';
8
8
  import * as payload_dist_admin_components_forms_FieldDescription_types from 'payload/dist/admin/components/forms/FieldDescription/types';
9
9
  import * as React from 'react';
10
10
  import React__default, { ReactNode } from 'react';
@@ -189,20 +189,14 @@ declare function decorateMenuRoute(item: IRoute): IMenuItem;
189
189
  declare function decorateMenuItem(item: IUndecoratedMenuItem, categories: ICategory[], routes: IRoute[], market: string, depth?: number): IMenuItem;
190
190
  declare function hasMarket(item: IUndecoratedMenuItem, market: string): boolean;
191
191
 
192
- declare function decorateHref<T extends ISchema = ISchema>(req: PayloadRequest<any>, item: T, slug: string, market: string, locale: string): Promise<T & {
193
- href: string | null;
194
- }>;
195
- declare function decorateHrefs<T extends ISchema = ISchema>(req: PayloadRequest<any>, items: T[], slug: string, market: string, locale: string): Promise<(T & {
196
- href: string | null;
197
- })[]>;
198
- /**
199
- * Rest api page collection get handler.
200
- */
201
- declare const pageIndexGet: ((slug: string) => Endpoint);
202
192
  /**
203
193
  * Rest api page collection detail get handler.
204
194
  */
205
195
  declare const pageDetailGet: ((slug: string) => Endpoint);
196
+ /**
197
+ * Rest api page collection get handler.
198
+ */
199
+ declare const pageIndexGet: ((slug: string) => Endpoint);
206
200
  /**
207
201
  * Create a record of the pages collection related to the created document.
208
202
  */
@@ -356,6 +350,29 @@ declare const StaticCollectionDefault: Partial<CollectionConfig>;
356
350
  */
357
351
  declare const withStaticCollection: ({ src, map, duration, ...config }: WithStaticProps) => CollectionConfig;
358
352
 
353
+ declare function decorateHref_<T extends ISchema = ISchema>(req: PayloadRequest<any>, item: T, slug: string, market: string, locale: string, categories: ICategory[], routes: IRoute[]): Promise<T & {
354
+ href: string | null;
355
+ }>;
356
+ declare function decorateHrefs_<T extends ISchema = ISchema>(req: PayloadRequest<any>, items: T[], slug: string, market: string, locale: string, categories: ICategory[], routes: IRoute[]): Promise<(T & {
357
+ href: string | null;
358
+ })[]>;
359
+
360
+ declare function decorateNav_<T extends ISchema = ISchema>(req: PayloadRequest<any>, item: T, slug: string, market: string, locale: string, categories: ICategory[], routes: IRoute[]): Promise<T>;
361
+ declare function decorateNavs_<T extends ISchema = ISchema>(req: PayloadRequest<any>, items: T[], slug: string, market: string, locale: string, categories: ICategory[], routes: IRoute[]): Promise<T[]>;
362
+ declare function isUndecoratedMenuItem(item: unknown): item is IUndecoratedMenuItem;
363
+ declare function isRelation(item: unknown): item is IRelation;
364
+ type IRelation = {
365
+ relationTo: string;
366
+ value: IEntity | IEntity[];
367
+ };
368
+
369
+ declare function decorateSchema_<T extends ISchema = ISchema>(req: PayloadRequest<any>, item: T, slug: string, market: string, locale: string, categories: ICategory[], routes: IRoute[]): Promise<T & {
370
+ schema: string;
371
+ }>;
372
+ declare function decorateSchemas_<T extends ISchema = ISchema>(req: PayloadRequest<any>, items: T[], slug: string, market: string, locale: string, categories: ICategory[], routes: IRoute[]): Promise<(T & {
373
+ schema: string;
374
+ })[]>;
375
+
359
376
  type WithAbstractProps = (Omit<RichTextField, 'type' | 'name'> & {
360
377
  name?: string;
361
378
  });
@@ -845,6 +862,8 @@ type BowlInitOptions = {
845
862
  };
846
863
  type BowlPlugin = (config: BowlConfig) => BowlConfig;
847
864
 
865
+ declare const MenuItem: (pages: string[], customBlocks?: BowlBlock[], depth?: number, maxDepth?: number) => BowlBlock;
866
+
848
867
  declare const bowl: (sourceOptions?: BowlInitOptions) => (sourceConfig: BowlConfig) => Config;
849
868
 
850
869
  type CategoryListProps = Props$4;
@@ -955,4 +974,4 @@ declare const Logo: React__default.FC;
955
974
 
956
975
  declare function webpack(sourceConfig: BowlConfig): (config: any) => any;
957
976
 
958
- export { BlockDefaults, BowlArrayField, BowlBlock, BowlBlockField, BowlCollapsibleField, BowlCollection, BowlConfig, BowlField, BowlGlobal, BowlGroup, BowlGroupField, BowlInitOptions, BowlOptions, BowlPlugin, BowlRowField, BowlSlug, BowlTab, BowlTabsField, CategoryDefaults, CategoryList, CategoryListProps, CategoryTree, CategoryTreeProps, CheckboxDefaults, CollectionDefault, CollectionHelper, CollectionHook, CollectionHookName, CollectionHooks, ColorCell, ColorConfig, ColorField, ComponentsDefaults, DataField, DataTree, DataTreeDragItem, DataTreeItem, DataTreeItemLi, DataTreeItemProps, DataTreeProps, DataTreeProvider, DataTreeRenameItem, DateDefaults, DebugField, DecoratedList, DecoratedListProps, EditModal, EditModalProps, GlobalDefault, GlobalHelper, GlobalHook, GlobalHookName, GlobalHooks, IBulkAction, IBulkRecord, ICache, IImportItem, IPage, IPageFull, IPagination, 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, Option, OrderDefaults, PRESENTATION_FIELDS, PageDefault, PresentationField, Publish, RelatedDefaults, RichTextDefaults, Save, SaveDraft, SelectDefaults, StaticCollectionConfig, StaticCollectionDefault, TemplateDefaults, TextDefaults, TreeItems, UIStaticCell, UIStaticField, WithAbstract, WithAbstractProps, 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, WithSelect, WithSelectProps, WithSlug, WithSlugProps, WithStatic, WithStaticProps, WithTemplate, WithTemplateProps, WithText, WithTextProps, WithTitle, WithTitleProps, afterCategoryChangeHook, afterCategoryDeleteHook, afterPageChangeHook, afterPageDeleteHook, appearanceOptions, beforeValidate, bowl, collectionBulkPatch, collectionExportGet, collectionImportPost, collectionIndexGet, collectionUpdatePatch, debugField, decorateHref, decorateHrefs, decorateMenu, decorateMenuCategory, decorateMenuGroup, decorateMenuItem, decorateMenuLink, decorateMenuPage, decorateMenuRoute, decorateMenus, deepMerge, bowl as default, defaultGroup, defaultLocale, defaultLocales, defaultMarket, defaultSlug, eachDataField, eachField, fetchCollection, fetchCollectionItems, fetchEachMarketLocale, fetchEndpoint, fetchGlobal, fetchGlobalItems, fetchPages, formatSlug, getApiUrl, getCollectionItem, getCollectionItems, getLocale, getLocales, getMarkets, getNumericParam, getObjectParam, getPagination, getRoute, getRouteByCategoryAndLocale, getRouteByItemAndLocale, getRoutes, getSearchUrl, getStaticLoader, getStore, getStringParam, getTranslation, getTranslations, getTreeItemClassName, hasMarket, importExportListWithParser, internalSlugs, isAdmin, isDataField, isObject, isPresentationField, keyWithRequest, localeGet, localizeCollection, log, logMissingTranslations, menuDetailGet, menuIndexGet, modalSlug, options, pageDetailGet, pageIndexGet, parseDepth, populateStaticFields, redirectParser, richTextAfterReadHook, richTextSerialize, routeGet, routePost, routePostHandler, slugToLabel, slugToLabels, sortCollection, storeGet, textToSlug, toBlock, toCollection, toField, toGlobal, toTab, translateBlock, translateBlocks, translateCollection, translateField, translateFields, translateGlobal, translateTab, translateTabs, webpack, whereCollection, withAbstract, withAbstractRequired, 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, withSelect, withSelectRequired, withSlug, withSlugRequired, withStaticCollection, withTemplate, withTemplateRequired, withText, withTextRequired, withTitle, withTitleRequired, withUIStatic };
977
+ export { BlockDefaults, BowlArrayField, BowlBlock, BowlBlockField, BowlCollapsibleField, BowlCollection, BowlConfig, BowlField, BowlGlobal, BowlGroup, BowlGroupField, BowlInitOptions, BowlOptions, BowlPlugin, BowlRowField, BowlSlug, BowlTab, BowlTabsField, CategoryDefaults, CategoryList, CategoryListProps, CategoryTree, CategoryTreeProps, CheckboxDefaults, CollectionDefault, CollectionHelper, CollectionHook, CollectionHookName, CollectionHooks, ColorCell, ColorConfig, ColorField, ComponentsDefaults, DataField, DataTree, DataTreeDragItem, DataTreeItem, DataTreeItemLi, DataTreeItemProps, DataTreeProps, DataTreeProvider, DataTreeRenameItem, DateDefaults, DebugField, DecoratedList, DecoratedListProps, EditModal, EditModalProps, GlobalDefault, GlobalHelper, GlobalHook, GlobalHookName, GlobalHooks, 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, Option, OrderDefaults, PRESENTATION_FIELDS, PageDefault, PresentationField, Publish, RelatedDefaults, RichTextDefaults, Save, SaveDraft, SelectDefaults, StaticCollectionConfig, StaticCollectionDefault, TemplateDefaults, TextDefaults, TreeItems, UIStaticCell, UIStaticField, WithAbstract, WithAbstractProps, 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, WithSelect, WithSelectProps, WithSlug, WithSlugProps, WithStatic, WithStaticProps, WithTemplate, WithTemplateProps, WithText, WithTextProps, WithTitle, WithTitleProps, afterCategoryChangeHook, afterCategoryDeleteHook, afterPageChangeHook, afterPageDeleteHook, 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, fetchCollection, fetchCollectionItems, fetchEachMarketLocale, fetchEndpoint, fetchGlobal, fetchGlobalItems, fetchPages, formatSlug, getApiUrl, getCollectionItem, getCollectionItems, getLocale, getLocales, getMarkets, getNumericParam, getObjectParam, getPagination, getRoute, getRouteByCategoryAndLocale, getRouteByItemAndLocale, getRoutes, getSearchUrl, getStaticLoader, getStore, getStringParam, getTranslation, getTranslations, getTreeItemClassName, hasMarket, importExportListWithParser, internalSlugs, isAdmin, isDataField, isObject, isPresentationField, isRelation, isUndecoratedMenuItem, keyWithRequest, localeGet, localizeCollection, log, logMissingTranslations, menuDetailGet, menuIndexGet, modalSlug, options, pageDetailGet, pageIndexGet, parseDepth, populateStaticFields, redirectParser, richTextAfterReadHook, richTextSerialize, routeGet, routePost, routePostHandler, slugToLabel, slugToLabels, sortCollection, storeGet, textToSlug, toBlock, toCollection, toField, toGlobal, toTab, translateBlock, translateBlocks, translateCollection, translateField, translateFields, translateGlobal, translateTab, translateTabs, webpack, whereCollection, withAbstract, withAbstractRequired, 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, withSelect, withSelectRequired, withSlug, withSlugRequired, withStaticCollection, withTemplate, withTemplateRequired, withText, withTextRequired, withTitle, withTitleRequired, withUIStatic };