@websolutespa/payload-plugin-bowl 1.8.0 → 1.8.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 +13 -0
- package/dist/index.d.ts +13 -8
- package/dist/index.js +927 -834
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @websolutespa/payload-plugin-bowl
|
|
2
2
|
|
|
3
|
+
## 1.8.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Modified: Media collection
|
|
8
|
+
- Fixing: destructuring request query
|
|
9
|
+
|
|
10
|
+
## 1.8.1
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Modified: static decorator
|
|
15
|
+
|
|
3
16
|
## 1.8.0
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Resource } from 'i18next';
|
|
2
2
|
import { Endpoint, AdminView, Locale as Locale$1, Config } from 'payload/config';
|
|
3
|
-
import {
|
|
3
|
+
import { FieldBase, Tab, JSONField, Block as Block$1, FieldAffectingData, HookName, FieldHook as FieldHook$1, UIField as UIField$1 } from 'payload/dist/fields/config/types';
|
|
4
4
|
import * as payload_types from 'payload/types';
|
|
5
5
|
import { PayloadRequest, SanitizedCollectionConfig, Field, CollectionAfterChangeHook, CollectionAfterDeleteHook, TypeWithID, CollectionConfig, BeforeDuplicate, Where, Block, GlobalConfig, RichTextField, RelationshipField, CheckboxField, BlockField, DateField, TextField, GroupField, UploadField, ArrayField, NumberField, FieldHook, SelectField, CollapsibleField, RowField, TabsField, UIField, EmailField, TextareaField, RadioField, CodeField, PointField } from 'payload/types';
|
|
6
|
-
import * as _websolutespa_bom_core from '@websolutespa/bom-core';
|
|
7
|
-
import { IRoute, IEquatable, ICategory, IEntity, ILocale, ICategorized, IMarket, IMemoryStore, ILocalizable, IMedia, MenuCategoryStrategy, IPageRelation, ISchema, IMenuItem, IMenuGroup, IMenuLink, IMenuPage, IMenuRoute, IMenu } from '@websolutespa/bom-core';
|
|
8
6
|
import * as payload_dist_admin_components_forms_FieldDescription_types from 'payload/dist/admin/components/forms/FieldDescription/types';
|
|
9
7
|
import * as React from 'react';
|
|
10
8
|
import React__default, { ReactNode } from 'react';
|
|
9
|
+
import * as _websolutespa_bom_core from '@websolutespa/bom-core';
|
|
10
|
+
import { IRoute, IEquatable, ICategory, IEntity, ILocale, ICategorized, IMarket, IMemoryStore, ILocalizable, IMedia, MenuCategoryStrategy, IPageRelation, ISchema, IMenuItem, IMenuGroup, IMenuLink, IMenuPage, IMenuRoute, IMenu } from '@websolutespa/bom-core';
|
|
11
11
|
import { DocumentDrawerProps } from 'payload/dist/admin/components/elements/DocumentDrawer/types';
|
|
12
12
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
13
13
|
import { TreeDataProvider, TreeItemIndex, TreeItem, Disposable, TreeItemRenderContext, TreeInformation } from 'react-complex-tree';
|
|
@@ -291,7 +291,7 @@ declare enum ImportMode {
|
|
|
291
291
|
*/
|
|
292
292
|
declare const collectionImportPost: ((slug: string) => Endpoint);
|
|
293
293
|
/**
|
|
294
|
-
* Decorate record
|
|
294
|
+
* Decorate record with static collection data.
|
|
295
295
|
*/
|
|
296
296
|
declare const afterCollectionReadHook: (collectionConfig: CollectionConfig) => CollectionConfig['hooks']['afterRead'][number];
|
|
297
297
|
/**
|
|
@@ -313,7 +313,7 @@ declare const menuDetailGet: ((options: BowlOptions) => Endpoint);
|
|
|
313
313
|
/**
|
|
314
314
|
* Decorate record for Mixer when queried by market and locale.
|
|
315
315
|
*/
|
|
316
|
-
declare const afterMenuReadHook: (
|
|
316
|
+
declare const afterMenuReadHook: (collectionConfig: CollectionConfig) => CollectionConfig['hooks']['afterRead'][number];
|
|
317
317
|
|
|
318
318
|
/**
|
|
319
319
|
* Rest api page collection get handler.
|
|
@@ -326,7 +326,7 @@ declare const pageDetailGet: ((slug: string) => Endpoint);
|
|
|
326
326
|
/**
|
|
327
327
|
* Decorate record for Mixer when queried by market and locale.
|
|
328
328
|
*/
|
|
329
|
-
declare const afterPageReadHook: (
|
|
329
|
+
declare const afterPageReadHook: (collectionConfig: CollectionConfig) => CollectionConfig['hooks']['afterRead'][number];
|
|
330
330
|
/**
|
|
331
331
|
* Create a record of the pages collection related to the created document.
|
|
332
332
|
*/
|
|
@@ -370,6 +370,12 @@ type KeyMapper = {
|
|
|
370
370
|
};
|
|
371
371
|
declare const staticCollections: string[];
|
|
372
372
|
declare const staticCollectionLoaders: Record<string, () => Promise<Option[]>>;
|
|
373
|
+
/**
|
|
374
|
+
* Decorate record with static collection data.
|
|
375
|
+
*/
|
|
376
|
+
declare const afterStaticReadHook: (collectionConfig: CollectionConfig) => CollectionConfig['hooks']['afterRead'][number];
|
|
377
|
+
declare const afterReadItem: (req: PayloadRequest, collectionConfig: CollectionConfig, item: Option) => Promise<Option>;
|
|
378
|
+
declare const afterReadItems: (req: PayloadRequest, collectionConfig: CollectionConfig, items: Option[]) => Promise<Option[]>;
|
|
373
379
|
/**
|
|
374
380
|
* Rest api static collection get handler.
|
|
375
381
|
*/
|
|
@@ -378,7 +384,6 @@ declare const staticIndexGet: ((collectionConfig: CollectionConfig) => Endpoint)
|
|
|
378
384
|
* Rest api static collection detail get handler.
|
|
379
385
|
*/
|
|
380
386
|
declare const staticDetailGet: ((collectionConfig: CollectionConfig) => Endpoint);
|
|
381
|
-
declare function populateStaticFields<T = IEntity>(item: T, fields: Field$1[], locale: string): Promise<T>;
|
|
382
387
|
declare function getStaticLoader(slug: string): () => Promise<Option[]>;
|
|
383
388
|
|
|
384
389
|
type FindOptions = {
|
|
@@ -1236,4 +1241,4 @@ declare const Logo: React__default.FC;
|
|
|
1236
1241
|
|
|
1237
1242
|
declare function webpack(sourceConfig: BowlConfig): (config: any) => any;
|
|
1238
1243
|
|
|
1239
|
-
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, CategoryTreeConflictProps, CategoryTreeItem, CategoryTreeItems, CategoryTreeProps, CheckboxDefaults, CollectionDefault, CollectionHelper, CollectionHook, CollectionHookName, CollectionHooks, ColorCell, ColorConfig, ColorField, ComponentsDefaults, CustomEditModal, CustomEditModalProps, DataField, DataTree, DataTreeDragItem, DataTreeInstance, DataTreeItem, DataTreeItemLi, DataTreeItemProps, DataTreeProps, DataTreeProvider, DataTreeRenameItem, DateDefaults, DebugField, DecoratedList, DecoratedListProps, FindOptions, GlobalDefault, GlobalHelper, GlobalHook, GlobalHookName, GlobalHooks, GroupKey, IBulkAction, IBulkRecord, ICache, IImportItem, IPage, IPageFull, IPagination, IRelation, IUndecoratedMenu, IUndecoratedMenuBase, IUndecoratedMenuCategory, IUndecoratedMenuCustom, IUndecoratedMenuGroup, IUndecoratedMenuItem, IUndecoratedMenuLink, IUndecoratedMenuPage, IUndecoratedNavItem, Icon, ImportExportList, ImportExportListProps, ImportExportRedirectList, ImportLogInvalidTypes, ImportLogType, ImportMode, InMemoryCache, InMemoryCacheOptions, KeyMapper, LeaveModal, LeaveWithoutSavingModal, LeaveWithoutSavingModalProps, LocalizedDescription, LocalizedDescriptionProps, Logo, MAX_INT, MarketDefaults, MediaDefaults, MediasDefaults, MenuItem, MixerContext, Option, OrderDefaults, PRESENTATION_FIELDS, PageDefault, PresentationField, PublicURL, Publish, ROOT_ITEM, RelatedDefaults, RichTextDefaults, RouteConflict, Save, SaveDraft, SelectDefaults, StaticCollectionConfig, StaticCollectionDefault, TemplateDefaults, TenantsDefault, TextDefaults, TreeItemData, 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, WithTenants, WithTenantsProps, WithText, WithTextProps, WithTitle, WithTitleProps, afterCategoryChangeHook, afterCategoryDeleteHook, afterCollectionReadHook, afterMenuReadHook, afterPageChangeHook, afterPageDeleteHook, afterPageReadHook, appearanceOptions, beforeDuplicateCollectionHook, beforeValidate, bowl, collectionBulkPatch, collectionExportGet, collectionImportPost, collectionIndexGet, collectionUpdatePatch, debugField, decorateCategories_, decorateCategory_, decorateHref_, decorateHrefs_, decorateMenuCategory_, decorateMenuGroup_, decorateMenuItem_, decorateMenuLink_, decorateMenuPage_, decorateMenuRoute_, decorateMenu_, decorateNavItem_, decorateNav_, decorateNavs_, decorateSchema_, decorateSchemas_, deepMerge, bowl as default, defaultGroup, defaultLocale, defaultLocales, defaultMarket, defaultSlug, eachDataField, eachField, encryptData, findCollection, formatSlug, getApiUrl, getCollectionItem, getCollectionItems, getEachMarketLocale, getGlobalItems, getLivePreviewURL, getLocale, getNewCategoriesFromChanges, getNumericParam, getObjectParam, getPages, getPagination, getPreviewURL, getPublicURL, getRoute, getRouteByCategoryAndLocale, getRouteByItemAndLocale, getRoutes, getSearchUrl, getStaticLoader, getStringParam, getSubRequest, getTranslation, getTranslations, getTreeItemClassName, hasMarket, hasRole, importExportListWithParser, internalSlugs, isAdmin, isAdminOrSelf, isDataField, isObject, isPresentationField, isRelation, isRole, isTenant, isUndecoratedNavItem, keyWithRequest, localeGet, localizeCollection, localizeItem, log, logMissingTranslations, menuDetailGet, menuIndexGet, modalSlug, optinGet, options, optoutGet, pageDetailGet, pageIndexGet, parseDepth,
|
|
1244
|
+
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, CategoryTreeConflictProps, CategoryTreeItem, CategoryTreeItems, CategoryTreeProps, CheckboxDefaults, CollectionDefault, CollectionHelper, CollectionHook, CollectionHookName, CollectionHooks, ColorCell, ColorConfig, ColorField, ComponentsDefaults, CustomEditModal, CustomEditModalProps, DataField, DataTree, DataTreeDragItem, DataTreeInstance, DataTreeItem, DataTreeItemLi, DataTreeItemProps, DataTreeProps, DataTreeProvider, DataTreeRenameItem, DateDefaults, DebugField, DecoratedList, DecoratedListProps, FindOptions, GlobalDefault, GlobalHelper, GlobalHook, GlobalHookName, GlobalHooks, GroupKey, IBulkAction, IBulkRecord, ICache, IImportItem, IPage, IPageFull, IPagination, IRelation, IUndecoratedMenu, IUndecoratedMenuBase, IUndecoratedMenuCategory, IUndecoratedMenuCustom, IUndecoratedMenuGroup, IUndecoratedMenuItem, IUndecoratedMenuLink, IUndecoratedMenuPage, IUndecoratedNavItem, Icon, ImportExportList, ImportExportListProps, ImportExportRedirectList, ImportLogInvalidTypes, ImportLogType, ImportMode, InMemoryCache, InMemoryCacheOptions, KeyMapper, LeaveModal, LeaveWithoutSavingModal, LeaveWithoutSavingModalProps, LocalizedDescription, LocalizedDescriptionProps, Logo, MAX_INT, MarketDefaults, MediaDefaults, MediasDefaults, MenuItem, MixerContext, Option, OrderDefaults, PRESENTATION_FIELDS, PageDefault, PresentationField, PublicURL, Publish, ROOT_ITEM, RelatedDefaults, RichTextDefaults, RouteConflict, Save, SaveDraft, SelectDefaults, StaticCollectionConfig, StaticCollectionDefault, TemplateDefaults, TenantsDefault, TextDefaults, TreeItemData, 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, WithTenants, WithTenantsProps, WithText, WithTextProps, WithTitle, WithTitleProps, afterCategoryChangeHook, afterCategoryDeleteHook, afterCollectionReadHook, afterMenuReadHook, afterPageChangeHook, afterPageDeleteHook, afterPageReadHook, afterReadItem, afterReadItems, afterStaticReadHook, appearanceOptions, beforeDuplicateCollectionHook, beforeValidate, bowl, collectionBulkPatch, collectionExportGet, collectionImportPost, collectionIndexGet, collectionUpdatePatch, debugField, decorateCategories_, decorateCategory_, decorateHref_, decorateHrefs_, decorateMenuCategory_, decorateMenuGroup_, decorateMenuItem_, decorateMenuLink_, decorateMenuPage_, decorateMenuRoute_, decorateMenu_, decorateNavItem_, decorateNav_, decorateNavs_, decorateSchema_, decorateSchemas_, deepMerge, bowl as default, defaultGroup, defaultLocale, defaultLocales, defaultMarket, defaultSlug, eachDataField, eachField, encryptData, findCollection, formatSlug, getApiUrl, getCollectionItem, getCollectionItems, getEachMarketLocale, getGlobalItems, getLivePreviewURL, getLocale, getNewCategoriesFromChanges, getNumericParam, getObjectParam, getPages, getPagination, getPreviewURL, getPublicURL, getRoute, getRouteByCategoryAndLocale, getRouteByItemAndLocale, getRoutes, getSearchUrl, getStaticLoader, getStringParam, getSubRequest, getTranslation, getTranslations, getTreeItemClassName, hasMarket, hasRole, importExportListWithParser, internalSlugs, isAdmin, isAdminOrSelf, isDataField, isObject, isPresentationField, isRelation, isRole, isTenant, isUndecoratedNavItem, keyWithRequest, localeGet, localizeCollection, localizeItem, log, logMissingTranslations, menuDetailGet, menuIndexGet, modalSlug, optinGet, options, optoutGet, pageDetailGet, pageIndexGet, parseDepth, redirectParser, richTextAfterReadHook, richTextSerialize, roles, routeChangesPost, routeGet, routePost, routePostHandler, setMixerContext, slugToLabel, slugToLabels, sortByGroup, sortCollection, staticCollectionLoaders, staticCollections, staticDetailGet, staticIndexGet, 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, withTenants, withText, withTextRequired, withTitle, withTitleRequired, withUIStatic };
|