@prezly/theme-kit-nextjs 1.16.0-1 → 1.16.1
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/build/adapter-nextjs/api-handlers/fetchGalleries.js +7 -3
- package/build/adapter-nextjs/api-handlers/fetchGalleries.js.map +1 -1
- package/build/adapter-nextjs/api-handlers/fetchStories.js +7 -3
- package/build/adapter-nextjs/api-handlers/fetchStories.js.map +1 -1
- package/build/adapter-nextjs/api-handlers/index.js +7 -2
- package/build/adapter-nextjs/api-handlers/index.js.map +1 -1
- package/build/adapter-nextjs/getNewsroomServerSideProps.js +7 -3
- package/build/adapter-nextjs/getNewsroomServerSideProps.js.map +1 -1
- package/build/adapter-nextjs/getNewsroomStaticProps.js +7 -3
- package/build/adapter-nextjs/getNewsroomStaticProps.js.map +1 -1
- package/build/adapter-nextjs/index.js +22 -6
- package/build/adapter-nextjs/index.js.map +1 -1
- package/build/adapter-nextjs/page-props/category.js +27 -27
- package/build/adapter-nextjs/page-props/category.js.map +1 -1
- package/build/adapter-nextjs/page-props/gallery.js +18 -13
- package/build/adapter-nextjs/page-props/gallery.js.map +1 -1
- package/build/adapter-nextjs/page-props/galleryAlbum.js +19 -13
- package/build/adapter-nextjs/page-props/galleryAlbum.js.map +1 -1
- package/build/adapter-nextjs/page-props/home.js +18 -13
- package/build/adapter-nextjs/page-props/home.js.map +1 -1
- package/build/adapter-nextjs/page-props/index.js +41 -8
- package/build/adapter-nextjs/page-props/index.js.map +1 -1
- package/build/adapter-nextjs/page-props/lib/types.js +2 -1
- package/build/adapter-nextjs/page-props/search.js +15 -10
- package/build/adapter-nextjs/page-props/search.js.map +1 -1
- package/build/adapter-nextjs/page-props/sitemap/SitemapBuilder.js +5 -1
- package/build/adapter-nextjs/page-props/sitemap/SitemapBuilder.js.map +1 -1
- package/build/adapter-nextjs/page-props/sitemap/createPaths.js +5 -1
- package/build/adapter-nextjs/page-props/sitemap/createPaths.js.map +1 -1
- package/build/adapter-nextjs/page-props/sitemap/getServerSideProps.js +11 -7
- package/build/adapter-nextjs/page-props/sitemap/getServerSideProps.js.map +1 -1
- package/build/adapter-nextjs/page-props/sitemap/index.js +24 -4
- package/build/adapter-nextjs/page-props/sitemap/index.js.map +1 -1
- package/build/adapter-nextjs/page-props/sitemap/types.js +2 -1
- package/build/adapter-nextjs/page-props/story.js +25 -25
- package/build/adapter-nextjs/page-props/story.js.map +1 -1
- package/build/adapter-nextjs/page-props/storyPreview.js +12 -11
- package/build/adapter-nextjs/page-props/storyPreview.js.map +1 -1
- package/build/adapter-nextjs/processRequest.js +9 -5
- package/build/adapter-nextjs/processRequest.js.map +1 -1
- package/build/adapter-nextjs/processStaticRequest.js +5 -1
- package/build/adapter-nextjs/processStaticRequest.js.map +1 -1
- package/build/components-nextjs/PageSeo/PageSeo.js +28 -24
- package/build/components-nextjs/PageSeo/PageSeo.js.map +1 -1
- package/build/components-nextjs/PageSeo/index.js +20 -2
- package/build/components-nextjs/PageSeo/index.js.map +1 -1
- package/build/components-nextjs/PageSeo/lib/getAbsoluteUrl.js +5 -1
- package/build/components-nextjs/PageSeo/lib/getAbsoluteUrl.js.map +1 -1
- package/build/components-nextjs/PageSeo/lib/types.js +2 -1
- package/build/components-nextjs/StorySeo/StorySeo.js +11 -7
- package/build/components-nextjs/StorySeo/StorySeo.js.map +1 -1
- package/build/components-nextjs/StorySeo/index.js +5 -1
- package/build/components-nextjs/StorySeo/index.js.map +1 -1
- package/build/components-nextjs/document.js +35 -8
- package/build/components-nextjs/document.js.map +1 -1
- package/build/components-nextjs/index.js +9 -3
- package/build/components-nextjs/index.js.map +1 -1
- package/build/data-fetching/api/PrezlyApi.js +36 -29
- package/build/data-fetching/api/PrezlyApi.js.map +1 -1
- package/build/data-fetching/api/getPrezlyApi.js +9 -5
- package/build/data-fetching/api/getPrezlyApi.js.map +1 -1
- package/build/data-fetching/api/index.js +17 -1
- package/build/data-fetching/api/index.js.map +1 -1
- package/build/data-fetching/api/queries.js +13 -5
- package/build/data-fetching/api/queries.js.map +1 -1
- package/build/data-fetching/index.js +19 -3
- package/build/data-fetching/index.js.map +1 -1
- package/build/data-fetching/lib/getAlgoliaSettings.js +7 -3
- package/build/data-fetching/lib/getAlgoliaSettings.js.map +1 -1
- package/build/data-fetching/lib/getEnvVariables.js +10 -3
- package/build/data-fetching/lib/getEnvVariables.js.map +1 -1
- package/build/data-fetching/lib/index.js +11 -4
- package/build/data-fetching/lib/index.js.map +1 -1
- package/build/data-fetching/lib/isSdkError.js +5 -1
- package/build/data-fetching/lib/isSdkError.js.map +1 -1
- package/build/data-fetching/lib/isUuid.js +5 -1
- package/build/data-fetching/lib/isUuid.js.map +1 -1
- package/build/data-fetching/types.js +2 -1
- package/build/index.js +25 -9
- package/build/index.js.map +1 -1
- package/build/infinite-loading/index.js +24 -4
- package/build/infinite-loading/index.js.map +1 -1
- package/build/infinite-loading/types.js +2 -1
- package/build/infinite-loading/useInfiniteGalleriesLoading.js +7 -3
- package/build/infinite-loading/useInfiniteGalleriesLoading.js.map +1 -1
- package/build/infinite-loading/useInfiniteLoading.js +13 -9
- package/build/infinite-loading/useInfiniteLoading.js.map +1 -1
- package/build/infinite-loading/useInfiniteStoriesLoading.js +11 -7
- package/build/infinite-loading/useInfiniteStoriesLoading.js.map +1 -1
- package/build/intl/index.js +25 -4
- package/build/intl/index.js.map +1 -1
- package/build/intl/languages.js +35 -22
- package/build/intl/languages.js.map +1 -1
- package/build/intl/locale.js +17 -11
- package/build/intl/locale.js.map +1 -1
- package/build/intl/localeObject.js +10 -3
- package/build/intl/localeObject.js.map +1 -1
- package/build/newsroom-context/context.js +11 -7
- package/build/newsroom-context/context.js.map +1 -1
- package/build/newsroom-context/hooks/index.js +27 -11
- package/build/newsroom-context/hooks/index.js.map +1 -1
- package/build/newsroom-context/hooks/useAlgoliaSettings.js +7 -3
- package/build/newsroom-context/hooks/useAlgoliaSettings.js.map +1 -1
- package/build/newsroom-context/hooks/useCategories.js +7 -3
- package/build/newsroom-context/hooks/useCategories.js.map +1 -1
- package/build/newsroom-context/hooks/useCompanyInformation.js +7 -3
- package/build/newsroom-context/hooks/useCompanyInformation.js.map +1 -1
- package/build/newsroom-context/hooks/useCurrentCategory.js +7 -3
- package/build/newsroom-context/hooks/useCurrentCategory.js.map +1 -1
- package/build/newsroom-context/hooks/useCurrentLocale.js +7 -3
- package/build/newsroom-context/hooks/useCurrentLocale.js.map +1 -1
- package/build/newsroom-context/hooks/useCurrentStory.js +7 -3
- package/build/newsroom-context/hooks/useCurrentStory.js.map +1 -1
- package/build/newsroom-context/hooks/useGetLinkLocaleSlug.js +14 -10
- package/build/newsroom-context/hooks/useGetLinkLocaleSlug.js.map +1 -1
- package/build/newsroom-context/hooks/useGetTranslationUrl.js +16 -12
- package/build/newsroom-context/hooks/useGetTranslationUrl.js.map +1 -1
- package/build/newsroom-context/hooks/useLanguages.js +7 -3
- package/build/newsroom-context/hooks/useLanguages.js.map +1 -1
- package/build/newsroom-context/hooks/useNewsroom.js +7 -3
- package/build/newsroom-context/hooks/useNewsroom.js.map +1 -1
- package/build/newsroom-context/hooks/useNewsroomContext.js +8 -4
- package/build/newsroom-context/hooks/useNewsroomContext.js.map +1 -1
- package/build/newsroom-context/index.js +21 -2
- package/build/newsroom-context/index.js.map +1 -1
- package/build/sentry/client.js +7 -3
- package/build/sentry/client.js.map +1 -1
- package/build/sentry/common.js +5 -1
- package/build/sentry/common.js.map +1 -1
- package/build/sentry/index.js +7 -2
- package/build/sentry/index.js.map +1 -1
- package/build/sentry/server.js +7 -3
- package/build/sentry/server.js.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/build/types.js +2 -1
- package/build/utils/boilerplate.js +9 -3
- package/build/utils/boilerplate.js.map +1 -1
- package/build/utils/constants.js +6 -3
- package/build/utils/constants.js.map +1 -1
- package/build/utils/getAssetsUrl.js +7 -3
- package/build/utils/getAssetsUrl.js.map +1 -1
- package/build/utils/getDataRequestLink.js +7 -3
- package/build/utils/getDataRequestLink.js.map +1 -1
- package/build/utils/getLocalizedCategoryData.js +9 -3
- package/build/utils/getLocalizedCategoryData.js.map +1 -1
- package/build/utils/getNewsroomLogoUrl.js +10 -5
- package/build/utils/getNewsroomLogoUrl.js.map +1 -1
- package/build/utils/getPrivacyPortalUrl.js +5 -1
- package/build/utils/getPrivacyPortalUrl.js.map +1 -1
- package/build/utils/getStoryPublicationDate.js +5 -1
- package/build/utils/getStoryPublicationDate.js.map +1 -1
- package/build/utils/getUploadcareGroupUrl.js +7 -3
- package/build/utils/getUploadcareGroupUrl.js.map +1 -1
- package/build/utils/index.js +26 -10
- package/build/utils/index.js.map +1 -1
- package/build/utils/isEmbargoStory.js +5 -1
- package/build/utils/isEmbargoStory.js.map +1 -1
- package/package.json +2 -2
- package/src/adapter-nextjs/page-props/category.ts +4 -8
- package/src/adapter-nextjs/page-props/story.ts +4 -8
- package/src/adapter-nextjs/page-props/storyPreview.ts +2 -4
|
@@ -1,14 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NewsroomContextProvider = exports.NewsroomContext = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const intl_1 = require("../intl");
|
|
7
|
+
exports.NewsroomContext = (0, react_1.createContext)(undefined);
|
|
5
8
|
/**
|
|
6
9
|
* This context provides common Newsroom information retrieved by `getNewsroomServerSideProps` helper.
|
|
7
10
|
* Please refer to the `NewsroomContextType` definition for more info on what's exposed from the context.
|
|
8
11
|
*/
|
|
9
|
-
|
|
10
|
-
const locale = useMemo(() => LocaleObject.fromAnyCode(localeCode || DEFAULT_LOCALE), [localeCode]);
|
|
11
|
-
return (
|
|
12
|
+
function NewsroomContextProvider({ categories, contacts, newsroom, currentCategory, currentStory, companyInformation, languages, localeCode, themePreset, algoliaSettings, children, }) {
|
|
13
|
+
const locale = (0, react_1.useMemo)(() => intl_1.LocaleObject.fromAnyCode(localeCode || intl_1.DEFAULT_LOCALE), [localeCode]);
|
|
14
|
+
return ((0, jsx_runtime_1.jsx)(exports.NewsroomContext.Provider, { value: {
|
|
12
15
|
categories,
|
|
13
16
|
contacts,
|
|
14
17
|
newsroom,
|
|
@@ -21,4 +24,5 @@ export function NewsroomContextProvider({ categories, contacts, newsroom, curren
|
|
|
21
24
|
algoliaSettings,
|
|
22
25
|
}, children: children }));
|
|
23
26
|
}
|
|
27
|
+
exports.NewsroomContextProvider = NewsroomContextProvider;
|
|
24
28
|
//# sourceMappingURL=context.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../src/newsroom-context/context.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../src/newsroom-context/context.tsx"],"names":[],"mappings":";;;;AAUA,iCAA+C;AAG/C,kCAAuD;AAoD1C,QAAA,eAAe,GAAG,IAAA,qBAAa,EAAkC,SAAS,CAAC,CAAC;AAEzF;;;GAGG;AACH,SAAgB,uBAAuB,CAAC,EACpC,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,eAAe,EACf,YAAY,EACZ,kBAAkB,EAClB,SAAS,EACT,UAAU,EACV,WAAW,EACX,eAAe,EACf,QAAQ,GAC8B;IACtC,MAAM,MAAM,GAAG,IAAA,eAAO,EAClB,GAAG,EAAE,CAAC,mBAAY,CAAC,WAAW,CAAC,UAAU,IAAI,qBAAc,CAAC,EAC5D,CAAC,UAAU,CAAC,CACf,CAAC;IAEF,OAAO,CACH,uBAAC,uBAAe,CAAC,QAAQ,IACrB,KAAK,EAAE;YACH,UAAU;YACV,QAAQ;YACR,QAAQ;YACR,eAAe;YACf,YAAY;YACZ,kBAAkB;YAClB,SAAS;YACT,MAAM;YACN,WAAW;YACX,eAAe;SAClB,YAEA,QAAQ,GACc,CAC9B,CAAC;AACN,CAAC;AApCD,0DAoCC"}
|
|
@@ -1,12 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./useAlgoliaSettings"), exports);
|
|
18
|
+
__exportStar(require("./useCategories"), exports);
|
|
19
|
+
__exportStar(require("./useCompanyInformation"), exports);
|
|
20
|
+
__exportStar(require("./useCurrentCategory"), exports);
|
|
21
|
+
__exportStar(require("./useCurrentLocale"), exports);
|
|
22
|
+
__exportStar(require("./useCurrentStory"), exports);
|
|
23
|
+
__exportStar(require("./useGetLinkLocaleSlug"), exports);
|
|
24
|
+
__exportStar(require("./useGetTranslationUrl"), exports);
|
|
25
|
+
__exportStar(require("./useLanguages"), exports);
|
|
26
|
+
__exportStar(require("./useNewsroom"), exports);
|
|
27
|
+
__exportStar(require("./useNewsroomContext"), exports);
|
|
12
28
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/newsroom-context/hooks/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/newsroom-context/hooks/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAqC;AACrC,kDAAgC;AAChC,0DAAwC;AACxC,uDAAqC;AACrC,qDAAmC;AACnC,oDAAkC;AAClC,yDAAuC;AACvC,yDAAuC;AACvC,iDAA+B;AAC/B,gDAA8B;AAC9B,uDAAqC"}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useAlgoliaSettings = void 0;
|
|
4
|
+
const useNewsroomContext_1 = require("./useNewsroomContext");
|
|
5
|
+
function useAlgoliaSettings() {
|
|
6
|
+
const context = (0, useNewsroomContext_1.useNewsroomContext)();
|
|
4
7
|
return context.algoliaSettings;
|
|
5
8
|
}
|
|
9
|
+
exports.useAlgoliaSettings = useAlgoliaSettings;
|
|
6
10
|
//# sourceMappingURL=useAlgoliaSettings.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAlgoliaSettings.js","sourceRoot":"","sources":["../../../src/newsroom-context/hooks/useAlgoliaSettings.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"useAlgoliaSettings.js","sourceRoot":"","sources":["../../../src/newsroom-context/hooks/useAlgoliaSettings.ts"],"names":[],"mappings":";;;AAAA,6DAA0D;AAE1D,SAAgB,kBAAkB;IAC9B,MAAM,OAAO,GAAG,IAAA,uCAAkB,GAAE,CAAC;IAErC,OAAO,OAAO,CAAC,eAAe,CAAC;AACnC,CAAC;AAJD,gDAIC"}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useCategories = void 0;
|
|
4
|
+
const useNewsroomContext_1 = require("./useNewsroomContext");
|
|
5
|
+
function useCategories() {
|
|
6
|
+
const context = (0, useNewsroomContext_1.useNewsroomContext)();
|
|
4
7
|
return context.categories;
|
|
5
8
|
}
|
|
9
|
+
exports.useCategories = useCategories;
|
|
6
10
|
//# sourceMappingURL=useCategories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCategories.js","sourceRoot":"","sources":["../../../src/newsroom-context/hooks/useCategories.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"useCategories.js","sourceRoot":"","sources":["../../../src/newsroom-context/hooks/useCategories.ts"],"names":[],"mappings":";;;AAAA,6DAA0D;AAE1D,SAAgB,aAAa;IACzB,MAAM,OAAO,GAAG,IAAA,uCAAkB,GAAE,CAAC;IAErC,OAAO,OAAO,CAAC,UAAU,CAAC;AAC9B,CAAC;AAJD,sCAIC"}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useCompanyInformation = void 0;
|
|
4
|
+
const useNewsroomContext_1 = require("./useNewsroomContext");
|
|
5
|
+
function useCompanyInformation() {
|
|
6
|
+
const context = (0, useNewsroomContext_1.useNewsroomContext)();
|
|
4
7
|
return context.companyInformation;
|
|
5
8
|
}
|
|
9
|
+
exports.useCompanyInformation = useCompanyInformation;
|
|
6
10
|
//# sourceMappingURL=useCompanyInformation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCompanyInformation.js","sourceRoot":"","sources":["../../../src/newsroom-context/hooks/useCompanyInformation.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"useCompanyInformation.js","sourceRoot":"","sources":["../../../src/newsroom-context/hooks/useCompanyInformation.ts"],"names":[],"mappings":";;;AAAA,6DAA0D;AAE1D,SAAgB,qBAAqB;IACjC,MAAM,OAAO,GAAG,IAAA,uCAAkB,GAAE,CAAC;IAErC,OAAO,OAAO,CAAC,kBAAkB,CAAC;AACtC,CAAC;AAJD,sDAIC"}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useCurrentCategory = void 0;
|
|
4
|
+
const useNewsroomContext_1 = require("./useNewsroomContext");
|
|
5
|
+
function useCurrentCategory() {
|
|
6
|
+
const context = (0, useNewsroomContext_1.useNewsroomContext)();
|
|
4
7
|
return context.currentCategory;
|
|
5
8
|
}
|
|
9
|
+
exports.useCurrentCategory = useCurrentCategory;
|
|
6
10
|
//# sourceMappingURL=useCurrentCategory.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCurrentCategory.js","sourceRoot":"","sources":["../../../src/newsroom-context/hooks/useCurrentCategory.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"useCurrentCategory.js","sourceRoot":"","sources":["../../../src/newsroom-context/hooks/useCurrentCategory.ts"],"names":[],"mappings":";;;AAAA,6DAA0D;AAE1D,SAAgB,kBAAkB;IAC9B,MAAM,OAAO,GAAG,IAAA,uCAAkB,GAAE,CAAC;IAErC,OAAO,OAAO,CAAC,eAAe,CAAC;AACnC,CAAC;AAJD,gDAIC"}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useCurrentLocale = void 0;
|
|
4
|
+
const useNewsroomContext_1 = require("./useNewsroomContext");
|
|
5
|
+
function useCurrentLocale() {
|
|
6
|
+
const context = (0, useNewsroomContext_1.useNewsroomContext)();
|
|
4
7
|
return context.locale;
|
|
5
8
|
}
|
|
9
|
+
exports.useCurrentLocale = useCurrentLocale;
|
|
6
10
|
//# sourceMappingURL=useCurrentLocale.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCurrentLocale.js","sourceRoot":"","sources":["../../../src/newsroom-context/hooks/useCurrentLocale.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"useCurrentLocale.js","sourceRoot":"","sources":["../../../src/newsroom-context/hooks/useCurrentLocale.ts"],"names":[],"mappings":";;;AAAA,6DAA0D;AAE1D,SAAgB,gBAAgB;IAC5B,MAAM,OAAO,GAAG,IAAA,uCAAkB,GAAE,CAAC;IAErC,OAAO,OAAO,CAAC,MAAM,CAAC;AAC1B,CAAC;AAJD,4CAIC"}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useCurrentStory = void 0;
|
|
4
|
+
const useNewsroomContext_1 = require("./useNewsroomContext");
|
|
5
|
+
function useCurrentStory() {
|
|
6
|
+
const context = (0, useNewsroomContext_1.useNewsroomContext)();
|
|
4
7
|
return context.currentStory;
|
|
5
8
|
}
|
|
9
|
+
exports.useCurrentStory = useCurrentStory;
|
|
6
10
|
//# sourceMappingURL=useCurrentStory.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCurrentStory.js","sourceRoot":"","sources":["../../../src/newsroom-context/hooks/useCurrentStory.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"useCurrentStory.js","sourceRoot":"","sources":["../../../src/newsroom-context/hooks/useCurrentStory.ts"],"names":[],"mappings":";;;AAAA,6DAA0D;AAE1D,SAAgB,eAAe;IAC3B,MAAM,OAAO,GAAG,IAAA,uCAAkB,GAAE,CAAC;IAErC,OAAO,OAAO,CAAC,YAAY,CAAC;AAChC,CAAC;AAJD,0CAIC"}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useGetLinkLocaleSlug = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const intl_1 = require("../../intl");
|
|
6
|
+
const useCurrentLocale_1 = require("./useCurrentLocale");
|
|
7
|
+
const useLanguages_1 = require("./useLanguages");
|
|
5
8
|
/**
|
|
6
9
|
* Determines correct locale slug for the link (trying to shorten the locale code if possible).
|
|
7
10
|
* E.g. if newsroom has a single locale for Dutch (`nl_BE`), it will be shortened to `nl`.
|
|
@@ -9,17 +12,18 @@ import { useLanguages } from './useLanguages';
|
|
|
9
12
|
* `false` means that a default locale should be used (no locale in URL required).
|
|
10
13
|
*/
|
|
11
14
|
function getLinkLocaleSlug(languages, locale) {
|
|
12
|
-
const shortestLocaleCode = getShortestLocaleCode(languages, locale);
|
|
15
|
+
const shortestLocaleCode = (0, intl_1.getShortestLocaleCode)(languages, locale);
|
|
13
16
|
// When navigating to default language, we don't append the locale to the URL.
|
|
14
17
|
if (!shortestLocaleCode) {
|
|
15
18
|
return shortestLocaleCode;
|
|
16
19
|
}
|
|
17
|
-
return LocaleObject.fromAnyCode(shortestLocaleCode).toUrlSlug();
|
|
20
|
+
return intl_1.LocaleObject.fromAnyCode(shortestLocaleCode).toUrlSlug();
|
|
18
21
|
}
|
|
19
|
-
|
|
20
|
-
const currentLocale = useCurrentLocale();
|
|
21
|
-
const languages = useLanguages();
|
|
22
|
+
function useGetLinkLocaleSlug() {
|
|
23
|
+
const currentLocale = (0, useCurrentLocale_1.useCurrentLocale)();
|
|
24
|
+
const languages = (0, useLanguages_1.useLanguages)();
|
|
22
25
|
// The `locale` parameter is mainly used for Language Dropdown
|
|
23
|
-
return useCallback((locale) => getLinkLocaleSlug(languages, locale || currentLocale), [languages, currentLocale]);
|
|
26
|
+
return (0, react_1.useCallback)((locale) => getLinkLocaleSlug(languages, locale || currentLocale), [languages, currentLocale]);
|
|
24
27
|
}
|
|
28
|
+
exports.useGetLinkLocaleSlug = useGetLinkLocaleSlug;
|
|
25
29
|
//# sourceMappingURL=useGetLinkLocaleSlug.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useGetLinkLocaleSlug.js","sourceRoot":"","sources":["../../../src/newsroom-context/hooks/useGetLinkLocaleSlug.ts"],"names":[],"mappings":"AACA,
|
|
1
|
+
{"version":3,"file":"useGetLinkLocaleSlug.js","sourceRoot":"","sources":["../../../src/newsroom-context/hooks/useGetLinkLocaleSlug.ts"],"names":[],"mappings":";;;AACA,iCAAoC;AAEpC,qCAAiE;AAEjE,yDAAsD;AACtD,iDAA8C;AAE9C;;;;;GAKG;AACH,SAAS,iBAAiB,CACtB,SAAqC,EACrC,MAAoB;IAEpB,MAAM,kBAAkB,GAAG,IAAA,4BAAqB,EAAC,SAAS,EAAE,MAAM,CAAC,CAAC;IACpE,8EAA8E;IAC9E,IAAI,CAAC,kBAAkB,EAAE;QACrB,OAAO,kBAAkB,CAAC;KAC7B;IAED,OAAO,mBAAY,CAAC,WAAW,CAAC,kBAAkB,CAAC,CAAC,SAAS,EAAE,CAAC;AACpE,CAAC;AAED,SAAgB,oBAAoB;IAChC,MAAM,aAAa,GAAG,IAAA,mCAAgB,GAAE,CAAC;IACzC,MAAM,SAAS,GAAG,IAAA,2BAAY,GAAE,CAAC;IAEjC,8DAA8D;IAC9D,OAAO,IAAA,mBAAW,EACd,CAAC,MAAqB,EAAE,EAAE,CAAC,iBAAiB,CAAC,SAAS,EAAE,MAAM,IAAI,aAAa,CAAC,EAChF,CAAC,SAAS,EAAE,aAAa,CAAC,CAC7B,CAAC;AACN,CAAC;AATD,oDASC"}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useGetTranslationUrl = void 0;
|
|
4
|
+
const router_1 = require("next/router");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const utils_1 = require("../../utils");
|
|
7
|
+
const useCurrentCategory_1 = require("./useCurrentCategory");
|
|
8
|
+
const useCurrentStory_1 = require("./useCurrentStory");
|
|
6
9
|
// Pulled from SDK types to not leak the `@prezly/sdk` dependency into the client bundle
|
|
7
10
|
var StoryVisibility;
|
|
8
11
|
(function (StoryVisibility) {
|
|
@@ -32,8 +35,8 @@ function getAllowedTranslationVisibilityValues(story) {
|
|
|
32
35
|
*/
|
|
33
36
|
function getTranslationUrl(locale, path, currentCategory, currentStory, noFallback) {
|
|
34
37
|
if (currentCategory) {
|
|
35
|
-
if (getCategoryHasTranslation(currentCategory, locale)) {
|
|
36
|
-
return getCategoryUrl(currentCategory, locale);
|
|
38
|
+
if ((0, utils_1.getCategoryHasTranslation)(currentCategory, locale)) {
|
|
39
|
+
return (0, utils_1.getCategoryUrl)(currentCategory, locale);
|
|
37
40
|
}
|
|
38
41
|
if (noFallback) {
|
|
39
42
|
return '';
|
|
@@ -58,10 +61,11 @@ function getTranslationUrl(locale, path, currentCategory, currentStory, noFallba
|
|
|
58
61
|
* This hook returns a function that is meant to be used in language pickers and alternate locales list for the pages.
|
|
59
62
|
* `noFallback` parameter is useful for alternate language links in the `head` section of the document (so that there are no unwanted links to the homepage).
|
|
60
63
|
*/
|
|
61
|
-
|
|
62
|
-
const { asPath } = useRouter();
|
|
63
|
-
const currentCategory = useCurrentCategory();
|
|
64
|
-
const currentStory = useCurrentStory();
|
|
65
|
-
return useCallback((locale, noFallback) => getTranslationUrl(locale, asPath, currentCategory, currentStory, noFallback), [asPath, currentCategory, currentStory]);
|
|
64
|
+
function useGetTranslationUrl() {
|
|
65
|
+
const { asPath } = (0, router_1.useRouter)();
|
|
66
|
+
const currentCategory = (0, useCurrentCategory_1.useCurrentCategory)();
|
|
67
|
+
const currentStory = (0, useCurrentStory_1.useCurrentStory)();
|
|
68
|
+
return (0, react_1.useCallback)((locale, noFallback) => getTranslationUrl(locale, asPath, currentCategory, currentStory, noFallback), [asPath, currentCategory, currentStory]);
|
|
66
69
|
}
|
|
70
|
+
exports.useGetTranslationUrl = useGetTranslationUrl;
|
|
67
71
|
//# sourceMappingURL=useGetTranslationUrl.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useGetTranslationUrl.js","sourceRoot":"","sources":["../../../src/newsroom-context/hooks/useGetTranslationUrl.ts"],"names":[],"mappings":"AACA,
|
|
1
|
+
{"version":3,"file":"useGetTranslationUrl.js","sourceRoot":"","sources":["../../../src/newsroom-context/hooks/useGetTranslationUrl.ts"],"names":[],"mappings":";;;AACA,wCAAwC;AACxC,iCAAoC;AAGpC,uCAAwE;AAExE,6DAA0D;AAC1D,uDAAoD;AAEpD,wFAAwF;AACxF,IAAK,eAKJ;AALD,WAAK,eAAe;IAChB,oCAAiB,CAAA;IACjB,sCAAmB,CAAA;IACnB,sCAAmB,CAAA;IACnB,gDAA6B,CAAA;AACjC,CAAC,EALI,eAAe,KAAf,eAAe,QAKnB;AAED,SAAS,qCAAqC,CAAC,KAAoB;IAC/D,MAAM,EAAE,UAAU,EAAE,GAAG,KAAK,CAAC;IAE7B,QAAQ,UAAU,EAAE;QAChB,KAAK,eAAe,CAAC,OAAO;YACxB,OAAO,CAAC,eAAe,CAAC,OAAO,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC;QAC7D,KAAK,eAAe,CAAC,OAAO;YACxB,OAAO,CAAC,eAAe,CAAC,OAAO,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC;QAC7D,KAAK,eAAe,CAAC,YAAY;YAC7B,OAAO,CAAC,eAAe,CAAC,YAAY,EAAE,eAAe,CAAC,OAAO,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC;QAC3F;YACI,OAAO,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;KACvC;AACL,CAAC;AAED;;;;;GAKG;AACH,SAAS,iBAAiB,CACtB,MAAoB,EACpB,IAAY,EACZ,eAA0B,EAC1B,YAA4B,EAC5B,UAAoB;IAEpB,IAAI,eAAe,EAAE;QACjB,IAAI,IAAA,iCAAyB,EAAC,eAAe,EAAE,MAAM,CAAC,EAAE;YACpD,OAAO,IAAA,sBAAc,EAAC,eAAe,EAAE,MAAM,CAAC,CAAC;SAClD;QAED,IAAI,UAAU,EAAE;YACZ,OAAO,EAAE,CAAC;SACb;QAED,OAAO,GAAG,CAAC;KACd;IAED,MAAM,UAAU,GAAG,MAAM,CAAC,gBAAgB,EAAE,CAAC;IAE7C,IAAI,YAAY,IAAI,YAAY,CAAC,OAAO,CAAC,MAAM,KAAK,UAAU,EAAE;QAC5D,MAAM,uBAAuB,GAAG,qCAAqC,CAAC,YAAY,CAAC,CAAC;QAEpF,MAAM,eAAe,GAAG,YAAY,CAAC,YAAY,CAAC,IAAI,CAClD,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,EAAE,EAAE,CACxB,OAAO,CAAC,MAAM,KAAK,UAAU,IAAI,uBAAuB,CAAC,QAAQ,CAAC,UAAU,CAAC,CACpF,CAAC;QACF,IAAI,eAAe,EAAE;YACjB,OAAO,IAAI,eAAe,CAAC,IAAI,EAAE,CAAC;SACrC;QAED,IAAI,UAAU,EAAE;YACZ,OAAO,EAAE,CAAC;SACb;QAED,OAAO,GAAG,CAAC;KACd;IAED,OAAO,IAAI,CAAC;AAChB,CAAC;AAED;;;GAGG;AACH,SAAgB,oBAAoB;IAChC,MAAM,EAAE,MAAM,EAAE,GAAG,IAAA,kBAAS,GAAE,CAAC;IAC/B,MAAM,eAAe,GAAG,IAAA,uCAAkB,GAAE,CAAC;IAC7C,MAAM,YAAY,GAAG,IAAA,iCAAe,GAAE,CAAC;IAEvC,OAAO,IAAA,mBAAW,EACd,CAAC,MAAoB,EAAE,UAAoB,EAAE,EAAE,CAC3C,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,eAAe,EAAE,YAAY,EAAE,UAAU,CAAC,EAChF,CAAC,MAAM,EAAE,eAAe,EAAE,YAAY,CAAC,CAC1C,CAAC;AACN,CAAC;AAVD,oDAUC"}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useLanguages = void 0;
|
|
4
|
+
const useNewsroomContext_1 = require("./useNewsroomContext");
|
|
5
|
+
function useLanguages() {
|
|
6
|
+
const context = (0, useNewsroomContext_1.useNewsroomContext)();
|
|
4
7
|
return context.languages;
|
|
5
8
|
}
|
|
9
|
+
exports.useLanguages = useLanguages;
|
|
6
10
|
//# sourceMappingURL=useLanguages.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLanguages.js","sourceRoot":"","sources":["../../../src/newsroom-context/hooks/useLanguages.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"useLanguages.js","sourceRoot":"","sources":["../../../src/newsroom-context/hooks/useLanguages.ts"],"names":[],"mappings":";;;AAAA,6DAA0D;AAE1D,SAAgB,YAAY;IACxB,MAAM,OAAO,GAAG,IAAA,uCAAkB,GAAE,CAAC;IAErC,OAAO,OAAO,CAAC,SAAS,CAAC;AAC7B,CAAC;AAJD,oCAIC"}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useNewsroom = void 0;
|
|
4
|
+
const useNewsroomContext_1 = require("./useNewsroomContext");
|
|
5
|
+
function useNewsroom() {
|
|
6
|
+
const context = (0, useNewsroomContext_1.useNewsroomContext)();
|
|
4
7
|
return context.newsroom;
|
|
5
8
|
}
|
|
9
|
+
exports.useNewsroom = useNewsroom;
|
|
6
10
|
//# sourceMappingURL=useNewsroom.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useNewsroom.js","sourceRoot":"","sources":["../../../src/newsroom-context/hooks/useNewsroom.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"useNewsroom.js","sourceRoot":"","sources":["../../../src/newsroom-context/hooks/useNewsroom.ts"],"names":[],"mappings":";;;AAAA,6DAA0D;AAE1D,SAAgB,WAAW;IACvB,MAAM,OAAO,GAAG,IAAA,uCAAkB,GAAE,CAAC;IAErC,OAAO,OAAO,CAAC,QAAQ,CAAC;AAC5B,CAAC;AAJD,kCAIC"}
|
|
@@ -1,12 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useNewsroomContext = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const context_1 = require("../context");
|
|
6
|
+
function useNewsroomContext() {
|
|
4
7
|
// TS Compiler is having a hard time figuring this type implicitly, so we have to set it explicitly
|
|
5
8
|
// See https://github.com/microsoft/TypeScript/issues/5711#issuecomment-340283439
|
|
6
|
-
const newsroomContext = useContext(NewsroomContext);
|
|
9
|
+
const newsroomContext = (0, react_1.useContext)(context_1.NewsroomContext);
|
|
7
10
|
if (!newsroomContext) {
|
|
8
11
|
throw new Error('No `NewsroomContextProvider` found when calling `useNewsroomContext`');
|
|
9
12
|
}
|
|
10
13
|
return newsroomContext;
|
|
11
14
|
}
|
|
15
|
+
exports.useNewsroomContext = useNewsroomContext;
|
|
12
16
|
//# sourceMappingURL=useNewsroomContext.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useNewsroomContext.js","sourceRoot":"","sources":["../../../src/newsroom-context/hooks/useNewsroomContext.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"useNewsroomContext.js","sourceRoot":"","sources":["../../../src/newsroom-context/hooks/useNewsroomContext.ts"],"names":[],"mappings":";;;AAAA,iCAAmC;AAGnC,wCAA6C;AAE7C,SAAgB,kBAAkB;IAC9B,mGAAmG;IACnG,iFAAiF;IACjF,MAAM,eAAe,GAAoC,IAAA,kBAAU,EAAC,yBAAe,CAAC,CAAC;IACrF,IAAI,CAAC,eAAe,EAAE;QAClB,MAAM,IAAI,KAAK,CAAC,sEAAsE,CAAC,CAAC;KAC3F;IAED,OAAO,eAAe,CAAC;AAC3B,CAAC;AATD,gDASC"}
|
|
@@ -1,3 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.NewsroomContextProvider = exports.NewsroomContext = void 0;
|
|
18
|
+
var context_1 = require("./context");
|
|
19
|
+
Object.defineProperty(exports, "NewsroomContext", { enumerable: true, get: function () { return context_1.NewsroomContext; } });
|
|
20
|
+
Object.defineProperty(exports, "NewsroomContextProvider", { enumerable: true, get: function () { return context_1.NewsroomContextProvider; } });
|
|
21
|
+
__exportStar(require("./hooks"), exports);
|
|
3
22
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/newsroom-context/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/newsroom-context/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,qCAA2F;AAAlF,0GAAA,eAAe,OAAA;AAAE,kHAAA,uBAAuB,OAAA;AACjD,0CAAwB"}
|
package/build/sentry/client.js
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getSentryClientOptions = void 0;
|
|
4
|
+
const common_1 = require("./common");
|
|
5
|
+
function getSentryClientOptions(dsn, themeName) {
|
|
6
|
+
return (0, common_1.getCommonClientOptions)(dsn, themeName);
|
|
4
7
|
}
|
|
8
|
+
exports.getSentryClientOptions = getSentryClientOptions;
|
|
5
9
|
//# sourceMappingURL=client.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/sentry/client.ts"],"names":[],"mappings":"AAEA,
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/sentry/client.ts"],"names":[],"mappings":";;;AAEA,qCAAkD;AAElD,SAAgB,sBAAsB,CAAC,GAAW,EAAE,SAAiB;IACjE,OAAO,IAAA,+BAAsB,EAAC,GAAG,EAAE,SAAS,CAAC,CAAC;AAClD,CAAC;AAFD,wDAEC"}
|
package/build/sentry/common.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getCommonClientOptions = void 0;
|
|
4
|
+
function getCommonClientOptions(dsn, themeName) {
|
|
2
5
|
return {
|
|
3
6
|
dsn,
|
|
4
7
|
// Adjust this value in production, or use tracesSampler for greater control
|
|
@@ -22,4 +25,5 @@ export function getCommonClientOptions(dsn, themeName) {
|
|
|
22
25
|
},
|
|
23
26
|
};
|
|
24
27
|
}
|
|
28
|
+
exports.getCommonClientOptions = getCommonClientOptions;
|
|
25
29
|
//# sourceMappingURL=common.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../src/sentry/common.ts"],"names":[],"mappings":"AAEA,
|
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../src/sentry/common.ts"],"names":[],"mappings":";;;AAEA,SAAgB,sBAAsB,CAAC,GAAW,EAAE,SAAiB;IACjE,OAAO;QACH,GAAG;QACH,4EAA4E;QAC5E,gBAAgB,EAAE,IAAI;QACtB,MAAM;QACN,0EAA0E;QAC1E,2EAA2E;QAC3E,qDAAqD;QAErD,YAAY,EAAE;YACV,2EAA2E;YAC3E,kGAAkG;YAClG,yGAAyG;YACzG,8BAA8B;YAC9B,oIAAoI;YACpI,oBAAoB;SACvB;QACD,iCAAiC;QACjC,YAAY,EAAE,CAAC,KAAK,EAAE,EAAE;YACpB,KAAK,CAAC,OAAO,CAAC,EAAE,YAAY,EAAE,SAAS,EAAE,CAAC,CAAC;YAC3C,OAAO,KAAK,CAAC;QACjB,CAAC;KACJ,CAAC;AACN,CAAC;AAxBD,wDAwBC"}
|
package/build/sentry/index.js
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getSentryServerOptions = exports.getSentryClientOptions = void 0;
|
|
4
|
+
var client_1 = require("./client");
|
|
5
|
+
Object.defineProperty(exports, "getSentryClientOptions", { enumerable: true, get: function () { return client_1.getSentryClientOptions; } });
|
|
6
|
+
var server_1 = require("./server");
|
|
7
|
+
Object.defineProperty(exports, "getSentryServerOptions", { enumerable: true, get: function () { return server_1.getSentryServerOptions; } });
|
|
3
8
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/sentry/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/sentry/index.ts"],"names":[],"mappings":";;;AAAA,mCAAkD;AAAzC,gHAAA,sBAAsB,OAAA;AAC/B,mCAAkD;AAAzC,gHAAA,sBAAsB,OAAA"}
|
package/build/sentry/server.js
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getSentryServerOptions = void 0;
|
|
4
|
+
const common_1 = require("./common");
|
|
5
|
+
function getSentryServerOptions(dsn, themeName) {
|
|
6
|
+
return (0, common_1.getCommonClientOptions)(dsn, themeName);
|
|
4
7
|
}
|
|
8
|
+
exports.getSentryServerOptions = getSentryServerOptions;
|
|
5
9
|
//# sourceMappingURL=server.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../../src/sentry/server.ts"],"names":[],"mappings":"AAEA,
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../../src/sentry/server.ts"],"names":[],"mappings":";;;AAEA,qCAAkD;AAElD,SAAgB,sBAAsB,CAAC,GAAW,EAAE,SAAiB;IACjE,OAAO,IAAA,+BAAsB,EAAC,GAAG,EAAE,SAAS,CAAC,CAAC;AAClD,CAAC;AAFD,wDAEC"}
|