@websolutespa/bom-mixer-models 1.9.0 → 1.9.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 +12 -0
- package/dist/index.d.ts +6 -3
- package/dist/index.js +2 -1
- package/dist/index.mjs +2 -1
- package/package.json +1 -1
- package/src/meta-data/open-graph.ts +5 -0
- package/src/page/page.service.ts +2 -1
package/CHANGELOG.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -234,6 +234,9 @@ interface OpenGraphProduct extends OpenGraphBase {
|
|
|
234
234
|
pattern?: string;
|
|
235
235
|
size?: string;
|
|
236
236
|
}
|
|
237
|
+
interface OpenGraphProductGroup extends OpenGraphBase {
|
|
238
|
+
type: 'product.group';
|
|
239
|
+
}
|
|
237
240
|
interface OpenGraphPlace extends OpenGraphBase {
|
|
238
241
|
type: 'place';
|
|
239
242
|
latitude?: number;
|
|
@@ -279,7 +282,7 @@ interface OpenGraphBusiness extends OpenGraphBase {
|
|
|
279
282
|
end: string;
|
|
280
283
|
}[];
|
|
281
284
|
}
|
|
282
|
-
type OpenGraphType = OpenGraphArticle | OpenGraphBook | OpenGraphBusiness | OpenGraphMusic | OpenGraphPlace | OpenGraphProduct | OpenGraphProfile | OpenGraphRestaurant | OpenGraphVideo | OpenGraphWebsite;
|
|
285
|
+
type OpenGraphType = OpenGraphArticle | OpenGraphBook | OpenGraphBusiness | OpenGraphMusic | OpenGraphPlace | OpenGraphProduct | OpenGraphProductGroup | OpenGraphProfile | OpenGraphRestaurant | OpenGraphVideo | OpenGraphWebsite;
|
|
283
286
|
|
|
284
287
|
type StructuredDataType = StructuredData.Article | StructuredData.AudioObject | StructuredData.BlogPosting | StructuredData.BreadcrumbList | StructuredData.Course | StructuredData.Event | StructuredData.FAQPage | StructuredData.HowTo | StructuredData.ItemList | StructuredData.JobPosting | StructuredData.ListItem | StructuredData.LocalBusiness | StructuredData.NewsArticle | StructuredData.Organization | StructuredData.Person | StructuredData.Place | StructuredData.Product | StructuredData.Recipe | StructuredData.VideoObject | StructuredData.WebPage | StructuredData.WebSite;
|
|
285
288
|
|
|
@@ -381,7 +384,7 @@ declare function getErrorPageLayout(): Promise<{
|
|
|
381
384
|
type PartialPageProps<T extends ICategorized, B> = Omit<PageProps<T>, 'page'> & Partial<Pick<PageProps<T>, 'page'>> & B;
|
|
382
385
|
declare function getPageProps<T extends ICategorized, B = any>(props: PartialPageProps<T, B>, extraComponents?: IComponent[]): Promise<PageProps<T> & B>;
|
|
383
386
|
declare function getPublicUrl(): string;
|
|
384
|
-
declare function resolveHref(href?: string): string;
|
|
387
|
+
declare function resolveHref(href?: string | null): string;
|
|
385
388
|
|
|
386
389
|
declare const getPreviewProps: GetServerSideProps;
|
|
387
390
|
|
|
@@ -485,4 +488,4 @@ type IModelStore = {
|
|
|
485
488
|
|
|
486
489
|
declare function getUtmz(request: NextApiRequest): string;
|
|
487
490
|
|
|
488
|
-
export { IAddress, IAddressOptions, IAppProps, IApplication, IApplicationProps, IBrand, ICompanyAddress, IConsentPreference, ILazyComponent, ILazyComponentFunc, ILazyComponentProps, ILazyFuncProps, ILazyModules, ILazyProps, ILazyStaticProps, ILazyStaticPropsFunc, ILazyableProps, ILazyedProps, ILegalNotice, IMeta, IMetaData, IModelStore, INullableLazyableProps, ISiteMap, LAZY_PROPS, NotFound, OpenGraphArticle, OpenGraphAudio, OpenGraphBase, OpenGraphBook, OpenGraphBusiness, OpenGraphImage, OpenGraphMusic, OpenGraphPlace, OpenGraphProduct, OpenGraphProfile, OpenGraphRestaurant, OpenGraphType, OpenGraphVideo, OpenGraphWebsite, PartialPageProps, SeoWeight, SessionWithToken, StaticPath, StructuredDataType, TwitterCardApp, TwitterCardBase, TwitterCardPlayer, TwitterCardSummary, TwitterCardSummaryLargeImage, TwitterCardType, categoryToRouteLink, escapeHtml, findManyPages, findOnePage, getAddressOptions, getBreadcrumbFromSegments, getCaptionsVttProps, getCategories, getCategory, getConsentPreference, getConsentPreferences, getConsentPreferencesPagination, getCountries, getCountriesPagination, getCountry, getDecoratedComponents, getErrorPageLayout, getLabel, getLabels, getLayout, getLink, getLocale, getLocaleFromProps, getLocales, getMarket, getMarkets, getMenu, getMenus, getPage, getPageCategory, getPageProps, getPageRoutes, getPreviewProps, getProvince, getProvinces, getProvincesPagination, getPublicUrl, getRedirect, getRedirects, getRedirectsPagination, getRegion, getRegions, getRegionsPagination, getRoute, getRouteLinkTree, getRoutes, getRoutesForSchemas, getRoutesForTemplates, getSegments, getSeoWeight, getSession, getSessionToken, getSiteMapIndex, getSiteMapIndexProps, getSiteMapXML, getSiteMapXMLProps, getSiteMapXSL, getSiteMapXSLProps, getStaticPathsForSchema, getStaticPathsForSchemaAndFallback, getUtmz, newRouteLink, pushDataLayer, redirectTo, resolveHref, resolveLabel, resolveRoute, routeInterceptor, routeRevalidateHandler, routeToRouteLink, withLazyProps };
|
|
491
|
+
export { IAddress, IAddressOptions, IAppProps, IApplication, IApplicationProps, IBrand, ICompanyAddress, IConsentPreference, ILazyComponent, ILazyComponentFunc, ILazyComponentProps, ILazyFuncProps, ILazyModules, ILazyProps, ILazyStaticProps, ILazyStaticPropsFunc, ILazyableProps, ILazyedProps, ILegalNotice, IMeta, IMetaData, IModelStore, INullableLazyableProps, ISiteMap, LAZY_PROPS, NotFound, OpenGraphArticle, OpenGraphAudio, OpenGraphBase, OpenGraphBook, OpenGraphBusiness, OpenGraphImage, OpenGraphMusic, OpenGraphPlace, OpenGraphProduct, OpenGraphProductGroup, OpenGraphProfile, OpenGraphRestaurant, OpenGraphType, OpenGraphVideo, OpenGraphWebsite, PartialPageProps, SeoWeight, SessionWithToken, StaticPath, StructuredDataType, TwitterCardApp, TwitterCardBase, TwitterCardPlayer, TwitterCardSummary, TwitterCardSummaryLargeImage, TwitterCardType, categoryToRouteLink, escapeHtml, findManyPages, findOnePage, getAddressOptions, getBreadcrumbFromSegments, getCaptionsVttProps, getCategories, getCategory, getConsentPreference, getConsentPreferences, getConsentPreferencesPagination, getCountries, getCountriesPagination, getCountry, getDecoratedComponents, getErrorPageLayout, getLabel, getLabels, getLayout, getLink, getLocale, getLocaleFromProps, getLocales, getMarket, getMarkets, getMenu, getMenus, getPage, getPageCategory, getPageProps, getPageRoutes, getPreviewProps, getProvince, getProvinces, getProvincesPagination, getPublicUrl, getRedirect, getRedirects, getRedirectsPagination, getRegion, getRegions, getRegionsPagination, getRoute, getRouteLinkTree, getRoutes, getRoutesForSchemas, getRoutesForTemplates, getSegments, getSeoWeight, getSession, getSessionToken, getSiteMapIndex, getSiteMapIndexProps, getSiteMapXML, getSiteMapXMLProps, getSiteMapXSL, getSiteMapXSLProps, getStaticPathsForSchema, getStaticPathsForSchemaAndFallback, getUtmz, newRouteLink, pushDataLayer, redirectTo, resolveHref, resolveLabel, resolveRoute, routeInterceptor, routeRevalidateHandler, routeToRouteLink, withLazyProps };
|
package/dist/index.js
CHANGED
|
@@ -744,7 +744,8 @@ function getPublicUrl() {
|
|
|
744
744
|
const publicUrl = process.env && process.env.NEXT_PUBLIC_URL ? process.env.NEXT_PUBLIC_URL : "";
|
|
745
745
|
return publicUrl;
|
|
746
746
|
}
|
|
747
|
-
function resolveHref(href
|
|
747
|
+
function resolveHref(href) {
|
|
748
|
+
href = href || "";
|
|
748
749
|
return href.startsWith("http") ? href : `${getPublicUrl()}${href}`;
|
|
749
750
|
}
|
|
750
751
|
|
package/dist/index.mjs
CHANGED
|
@@ -646,7 +646,8 @@ function getPublicUrl() {
|
|
|
646
646
|
const publicUrl = process.env && process.env.NEXT_PUBLIC_URL ? process.env.NEXT_PUBLIC_URL : "";
|
|
647
647
|
return publicUrl;
|
|
648
648
|
}
|
|
649
|
-
function resolveHref(href
|
|
649
|
+
function resolveHref(href) {
|
|
650
|
+
href = href || "";
|
|
650
651
|
return href.startsWith("http") ? href : `${getPublicUrl()}${href}`;
|
|
651
652
|
}
|
|
652
653
|
|
package/package.json
CHANGED
|
@@ -99,6 +99,10 @@ export interface OpenGraphProduct extends OpenGraphBase {
|
|
|
99
99
|
size?: string;
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
+
export interface OpenGraphProductGroup extends OpenGraphBase {
|
|
103
|
+
type: 'product.group';
|
|
104
|
+
}
|
|
105
|
+
|
|
102
106
|
export interface OpenGraphPlace extends OpenGraphBase {
|
|
103
107
|
type: 'place';
|
|
104
108
|
latitude?: number;
|
|
@@ -154,6 +158,7 @@ export type OpenGraphType =
|
|
|
154
158
|
| OpenGraphMusic
|
|
155
159
|
| OpenGraphPlace
|
|
156
160
|
| OpenGraphProduct
|
|
161
|
+
| OpenGraphProductGroup
|
|
157
162
|
| OpenGraphProfile
|
|
158
163
|
| OpenGraphRestaurant
|
|
159
164
|
| OpenGraphVideo
|
package/src/page/page.service.ts
CHANGED
|
@@ -212,6 +212,7 @@ export function getPublicUrl() {
|
|
|
212
212
|
return publicUrl;
|
|
213
213
|
}
|
|
214
214
|
|
|
215
|
-
export function resolveHref(href
|
|
215
|
+
export function resolveHref(href?: string | null) {
|
|
216
|
+
href = href || '';
|
|
216
217
|
return href.startsWith('http') ? href : `${getPublicUrl()}${href}`;
|
|
217
218
|
}
|