@websolutespa/bom-core 1.8.10 → 1.8.11
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 +6 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.js +10 -0
- package/dist/index.mjs +8 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1267,6 +1267,8 @@ declare function isUnresolvedRelation(item: unknown): item is IPageUnresolvedRel
|
|
|
1267
1267
|
* @returns True if the item is a relation, false otherwise.
|
|
1268
1268
|
*/
|
|
1269
1269
|
declare function isRelation(item: unknown): item is IPageRelation;
|
|
1270
|
+
declare function isUnresolvedCategory(category?: IEquatable | ICategory): category is IEquatable;
|
|
1271
|
+
declare function isUndecoratedCategory(category: unknown): category is Omit<ICategory, 'href'>;
|
|
1270
1272
|
/**
|
|
1271
1273
|
* Checks if the given item is an undecorated menu item.
|
|
1272
1274
|
* @param item The item to check.
|
|
@@ -1311,4 +1313,4 @@ declare function asServerProps(props: any): any;
|
|
|
1311
1313
|
declare function awaitAll(array: any, callback: (item: any, index: number) => Promise<any>): Promise<any[]>;
|
|
1312
1314
|
declare function merge(target: any, source: any): any;
|
|
1313
1315
|
|
|
1314
|
-
export { DeepPartial, Dynamic, FetchError, FetchRequestOptions, FetchService, FindParams, FindWhereParams, IAction, IActionEmailData, IAnchor, ICategorized, ICategory, ICategoryItem, IClassName, IClassNameCollection, IClassNameValue, ICollectionDescription, IComponent, IConfig, IConsentPreference, IContextBaseParams, IContextParams, IDecoratedNav, IEmailConfig, IEndUser, IEntity, IEquatable, IFeature, IFeatureType, IImageResize, ILabel, ILayout, ILegalNotice, ILetter, ILocale, ILocaleId, ILocalizable, ILocalized, ILocalizedMenu, ILocalizedString, IMarket, IMedia, IMediaImage, IMediaInfo, IMediaJson, IMediaPdf, IMediaType, IMediaVideo, IMemoryStore, IMenu, IMenuBase, IMenuCategory, IMenuCustom, IMenuGroup, IMenuHref, IMenuItem, IMenuLink, IMenuPage, IMenuRoute, INamedEntity, IOption, IOverride, IOverrideReturnValue, IOverrideValue, IPackages, IPage, IPageItem, IPageRelation, IPageRelationResult, IPageUnresolvedRelation, IPagedResult, IPaginationResult, IPartial, IPreference, IPrettify, IQuerable, IRedirect, IRoute, IRouteCanonical, IRouteLink, IRouteParams, ISchema, ISerializedCollection, ISerializedStore, IServerSideContext, IServerSideSplatContext, IStaticContext, IStore, ITemplate, ITitledEntity, IUndecoratedMenu, IUndecoratedMenuBase, IUndecoratedMenuCategory, IUndecoratedMenuCustom, IUndecoratedMenuGroup, IUndecoratedMenuItem, IUndecoratedMenuLink, IUndecoratedMenuPage, IUndecoratedNav, ImageStrategy, Json, JsonService, LiteralUnion, Logger, LoggerLevel, MenuCategoryStrategy, NextApiRequestCookies, Operator, PageProps, Pagination, PreviewData, Primitive, QueryParams, RedirectReason, RequireAtLeastOne, RouteStrategy, SchemaType, ServerSidePropsContext, StaticPropsContext, User, UserRole, UserWithRoles, ValueOf, Where, WhereAndOr, WhereBase, WhereField, arrayShuffle, asCategoryId, asEntityId, asEquatable, asEquatableNumber, asEquatableString, asServerProps, asSortedOptions, awaitAll, base64ToString, camelToSnakeCase, cloneItem, collectFeatureTypes, collectFeatureTypes__, collectOptions, collectRoutes, consoleWarn, decryptImageResize, deepMerge, defaultLocale, defaultMarket, eachCategorized, eachMarketLocale, encryptImageToken, enumToList, findCategoryInCategories, findChildCategories, findRouteOfCategory, findRoutesOfCategory, getCategorySegments, getCategorySegmentsByCategory, getClassNames, getCollectionDescription, getEnv, getHost, getIsDevelopment, getIsProduction, getOrigin, getParentCategoriesById, getParentCategory, getProto, getRootCategory, getRouteHref, httpDelete, httpFetch, httpGet, httpPatch, httpPost, httpPut, isArray, isBrowser, isDevelopment, isEntity, isEquatable, isHeaders, isIncomingHttpHeaders, isLocalizedString, isMediaImage, isMediaJson, isMediaPdf, isMediaVideo, isMenuCategory, isMenuGroup, isMenuHref, isMenuLink, isMenuPage, isMenuRoute, isNotNullString, isNumber, isObject, isProduction, isPromise, isRelation, isReservedCollectionDescription, isStage, isString, isUndecoratedMenuCategory, isUndecoratedMenuItem, isUndecoratedMenuPage, isUndecoratedNav, isUnresolvedRelation, isValidCollectionDescription, isValidString, localize, localizeItem, localizeValue, localizedToString, merge, pascalCaseToCamelCase, pascalCaseToCharCase, pascalCaseToKebabCase, pascalCaseToSnakeCase, qsDeserialize, qsDeserializeRaw, qsSerialize, qsSerializeRaw, resolveMediaType, stringToBase64, toCamelCase, toCharCase, toDisplayName, toFindParams, toKebabCase, toPascalCase, toPluralName, toSnakeCase, toTitleCase, toValidCollectionName, unknownCaseToPascalCase, uuidv4, withSchema };
|
|
1316
|
+
export { DeepPartial, Dynamic, FetchError, FetchRequestOptions, FetchService, FindParams, FindWhereParams, IAction, IActionEmailData, IAnchor, ICategorized, ICategory, ICategoryItem, IClassName, IClassNameCollection, IClassNameValue, ICollectionDescription, IComponent, IConfig, IConsentPreference, IContextBaseParams, IContextParams, IDecoratedNav, IEmailConfig, IEndUser, IEntity, IEquatable, IFeature, IFeatureType, IImageResize, ILabel, ILayout, ILegalNotice, ILetter, ILocale, ILocaleId, ILocalizable, ILocalized, ILocalizedMenu, ILocalizedString, IMarket, IMedia, IMediaImage, IMediaInfo, IMediaJson, IMediaPdf, IMediaType, IMediaVideo, IMemoryStore, IMenu, IMenuBase, IMenuCategory, IMenuCustom, IMenuGroup, IMenuHref, IMenuItem, IMenuLink, IMenuPage, IMenuRoute, INamedEntity, IOption, IOverride, IOverrideReturnValue, IOverrideValue, IPackages, IPage, IPageItem, IPageRelation, IPageRelationResult, IPageUnresolvedRelation, IPagedResult, IPaginationResult, IPartial, IPreference, IPrettify, IQuerable, IRedirect, IRoute, IRouteCanonical, IRouteLink, IRouteParams, ISchema, ISerializedCollection, ISerializedStore, IServerSideContext, IServerSideSplatContext, IStaticContext, IStore, ITemplate, ITitledEntity, IUndecoratedMenu, IUndecoratedMenuBase, IUndecoratedMenuCategory, IUndecoratedMenuCustom, IUndecoratedMenuGroup, IUndecoratedMenuItem, IUndecoratedMenuLink, IUndecoratedMenuPage, IUndecoratedNav, ImageStrategy, Json, JsonService, LiteralUnion, Logger, LoggerLevel, MenuCategoryStrategy, NextApiRequestCookies, Operator, PageProps, Pagination, PreviewData, Primitive, QueryParams, RedirectReason, RequireAtLeastOne, RouteStrategy, SchemaType, ServerSidePropsContext, StaticPropsContext, User, UserRole, UserWithRoles, ValueOf, Where, WhereAndOr, WhereBase, WhereField, arrayShuffle, asCategoryId, asEntityId, asEquatable, asEquatableNumber, asEquatableString, asServerProps, asSortedOptions, awaitAll, base64ToString, camelToSnakeCase, cloneItem, collectFeatureTypes, collectFeatureTypes__, collectOptions, collectRoutes, consoleWarn, decryptImageResize, deepMerge, defaultLocale, defaultMarket, eachCategorized, eachMarketLocale, encryptImageToken, enumToList, findCategoryInCategories, findChildCategories, findRouteOfCategory, findRoutesOfCategory, getCategorySegments, getCategorySegmentsByCategory, getClassNames, getCollectionDescription, getEnv, getHost, getIsDevelopment, getIsProduction, getOrigin, getParentCategoriesById, getParentCategory, getProto, getRootCategory, getRouteHref, httpDelete, httpFetch, httpGet, httpPatch, httpPost, httpPut, isArray, isBrowser, isDevelopment, isEntity, isEquatable, isHeaders, isIncomingHttpHeaders, isLocalizedString, isMediaImage, isMediaJson, isMediaPdf, isMediaVideo, isMenuCategory, isMenuGroup, isMenuHref, isMenuLink, isMenuPage, isMenuRoute, isNotNullString, isNumber, isObject, isProduction, isPromise, isRelation, isReservedCollectionDescription, isStage, isString, isUndecoratedCategory, isUndecoratedMenuCategory, isUndecoratedMenuItem, isUndecoratedMenuPage, isUndecoratedNav, isUnresolvedCategory, isUnresolvedRelation, isValidCollectionDescription, isValidString, localize, localizeItem, localizeValue, localizedToString, merge, pascalCaseToCamelCase, pascalCaseToCharCase, pascalCaseToKebabCase, pascalCaseToSnakeCase, qsDeserialize, qsDeserializeRaw, qsSerialize, qsSerializeRaw, resolveMediaType, stringToBase64, toCamelCase, toCharCase, toDisplayName, toFindParams, toKebabCase, toPascalCase, toPluralName, toSnakeCase, toTitleCase, toValidCollectionName, unknownCaseToPascalCase, uuidv4, withSchema };
|
package/dist/index.js
CHANGED
|
@@ -113,10 +113,12 @@ __export(src_exports, {
|
|
|
113
113
|
isReservedCollectionDescription: () => isReservedCollectionDescription,
|
|
114
114
|
isStage: () => isStage,
|
|
115
115
|
isString: () => isString,
|
|
116
|
+
isUndecoratedCategory: () => isUndecoratedCategory,
|
|
116
117
|
isUndecoratedMenuCategory: () => isUndecoratedMenuCategory,
|
|
117
118
|
isUndecoratedMenuItem: () => isUndecoratedMenuItem,
|
|
118
119
|
isUndecoratedMenuPage: () => isUndecoratedMenuPage,
|
|
119
120
|
isUndecoratedNav: () => isUndecoratedNav,
|
|
121
|
+
isUnresolvedCategory: () => isUnresolvedCategory,
|
|
120
122
|
isUnresolvedRelation: () => isUnresolvedRelation,
|
|
121
123
|
isValidCollectionDescription: () => isValidCollectionDescription,
|
|
122
124
|
isValidString: () => isValidString,
|
|
@@ -190,6 +192,12 @@ function isUnresolvedRelation(item) {
|
|
|
190
192
|
function isRelation(item) {
|
|
191
193
|
return isObject(item) && isNotNullString(item.relationTo) && isEntity(item.value);
|
|
192
194
|
}
|
|
195
|
+
function isUnresolvedCategory(category) {
|
|
196
|
+
return category ? typeof category === "string" : false;
|
|
197
|
+
}
|
|
198
|
+
function isUndecoratedCategory(category) {
|
|
199
|
+
return isObject(category) && !category.href;
|
|
200
|
+
}
|
|
193
201
|
function isUndecoratedMenuItem(item) {
|
|
194
202
|
return isObject(item) && (item.type === "category" && isEquatable(item.category) || item.type === "page" && isEquatable(item.page.value));
|
|
195
203
|
}
|
|
@@ -1689,10 +1697,12 @@ var RedirectReason = /* @__PURE__ */ ((RedirectReason2) => {
|
|
|
1689
1697
|
isReservedCollectionDescription,
|
|
1690
1698
|
isStage,
|
|
1691
1699
|
isString,
|
|
1700
|
+
isUndecoratedCategory,
|
|
1692
1701
|
isUndecoratedMenuCategory,
|
|
1693
1702
|
isUndecoratedMenuItem,
|
|
1694
1703
|
isUndecoratedMenuPage,
|
|
1695
1704
|
isUndecoratedNav,
|
|
1705
|
+
isUnresolvedCategory,
|
|
1696
1706
|
isUnresolvedRelation,
|
|
1697
1707
|
isValidCollectionDescription,
|
|
1698
1708
|
isValidString,
|
package/dist/index.mjs
CHANGED
|
@@ -37,6 +37,12 @@ function isUnresolvedRelation(item) {
|
|
|
37
37
|
function isRelation(item) {
|
|
38
38
|
return isObject(item) && isNotNullString(item.relationTo) && isEntity(item.value);
|
|
39
39
|
}
|
|
40
|
+
function isUnresolvedCategory(category) {
|
|
41
|
+
return category ? typeof category === "string" : false;
|
|
42
|
+
}
|
|
43
|
+
function isUndecoratedCategory(category) {
|
|
44
|
+
return isObject(category) && !category.href;
|
|
45
|
+
}
|
|
40
46
|
function isUndecoratedMenuItem(item) {
|
|
41
47
|
return isObject(item) && (item.type === "category" && isEquatable(item.category) || item.type === "page" && isEquatable(item.page.value));
|
|
42
48
|
}
|
|
@@ -1535,10 +1541,12 @@ export {
|
|
|
1535
1541
|
isReservedCollectionDescription,
|
|
1536
1542
|
isStage,
|
|
1537
1543
|
isString,
|
|
1544
|
+
isUndecoratedCategory,
|
|
1538
1545
|
isUndecoratedMenuCategory,
|
|
1539
1546
|
isUndecoratedMenuItem,
|
|
1540
1547
|
isUndecoratedMenuPage,
|
|
1541
1548
|
isUndecoratedNav,
|
|
1549
|
+
isUnresolvedCategory,
|
|
1542
1550
|
isUnresolvedRelation,
|
|
1543
1551
|
isValidCollectionDescription,
|
|
1544
1552
|
isValidString,
|