@prezly/theme-kit-nextjs 2.0.1-1 → 2.1.0
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/README.md +15 -15
- package/build/adapter-nextjs/api-handlers/fetchGalleries.js +21 -31
- package/build/adapter-nextjs/api-handlers/fetchGalleries.js.map +1 -1
- package/build/adapter-nextjs/api-handlers/fetchStories.js +23 -41
- package/build/adapter-nextjs/api-handlers/fetchStories.js.map +1 -1
- package/build/adapter-nextjs/api-handlers/index.js +7 -18
- package/build/adapter-nextjs/api-handlers/index.js.map +1 -1
- package/build/adapter-nextjs/getNewsroomServerSideProps.js +13 -20
- package/build/adapter-nextjs/getNewsroomServerSideProps.js.map +1 -1
- package/build/adapter-nextjs/getNewsroomStaticProps.js +13 -19
- package/build/adapter-nextjs/getNewsroomStaticProps.js.map +1 -1
- package/build/adapter-nextjs/index.js +21 -69
- package/build/adapter-nextjs/index.js.map +1 -1
- package/build/adapter-nextjs/page-props/category.js +96 -122
- package/build/adapter-nextjs/page-props/category.js.map +1 -1
- package/build/adapter-nextjs/page-props/gallery.js +65 -91
- package/build/adapter-nextjs/page-props/gallery.js.map +1 -1
- package/build/adapter-nextjs/page-props/galleryAlbum.js +49 -68
- package/build/adapter-nextjs/page-props/galleryAlbum.js.map +1 -1
- package/build/adapter-nextjs/page-props/home.js +66 -87
- package/build/adapter-nextjs/page-props/home.js.map +1 -1
- package/build/adapter-nextjs/page-props/index.js +40 -136
- package/build/adapter-nextjs/page-props/index.js.map +1 -1
- package/build/adapter-nextjs/page-props/lib/types.js +3 -1
- package/build/adapter-nextjs/page-props/search.js +28 -29
- package/build/adapter-nextjs/page-props/search.js.map +1 -1
- package/build/adapter-nextjs/page-props/sitemap/SitemapBuilder.js +46 -32
- package/build/adapter-nextjs/page-props/sitemap/SitemapBuilder.js.map +1 -1
- package/build/adapter-nextjs/page-props/sitemap/createPaths.js +17 -17
- package/build/adapter-nextjs/page-props/sitemap/createPaths.js.map +1 -1
- package/build/adapter-nextjs/page-props/sitemap/getServerSideProps.js +33 -37
- package/build/adapter-nextjs/page-props/sitemap/getServerSideProps.js.map +1 -1
- package/build/adapter-nextjs/page-props/sitemap/index.js +23 -41
- package/build/adapter-nextjs/page-props/sitemap/index.js.map +1 -1
- package/build/adapter-nextjs/page-props/sitemap/types.js +3 -1
- package/build/adapter-nextjs/page-props/story.js +60 -81
- package/build/adapter-nextjs/page-props/story.js.map +1 -1
- package/build/adapter-nextjs/page-props/storyPreview.js +24 -31
- package/build/adapter-nextjs/page-props/storyPreview.js.map +1 -1
- package/build/adapter-nextjs/processRequest.js +23 -38
- package/build/adapter-nextjs/processRequest.js.map +1 -1
- package/build/adapter-nextjs/processStaticRequest.js +14 -23
- package/build/adapter-nextjs/processStaticRequest.js.map +1 -1
- package/build/components-nextjs/PageSeo/PageSeo.js +77 -89
- package/build/components-nextjs/PageSeo/PageSeo.js.map +1 -1
- package/build/components-nextjs/PageSeo/index.js +19 -25
- package/build/components-nextjs/PageSeo/index.js.map +1 -1
- package/build/components-nextjs/PageSeo/lib/getAbsoluteUrl.js +8 -9
- package/build/components-nextjs/PageSeo/lib/getAbsoluteUrl.js.map +1 -1
- package/build/components-nextjs/PageSeo/lib/types.js +3 -1
- package/build/components-nextjs/StorySeo/StorySeo.js +46 -74
- package/build/components-nextjs/StorySeo/StorySeo.js.map +1 -1
- package/build/components-nextjs/StorySeo/index.js +5 -11
- package/build/components-nextjs/StorySeo/index.js.map +1 -1
- package/build/components-nextjs/document.js +44 -36
- package/build/components-nextjs/document.js.map +1 -1
- package/build/components-nextjs/index.js +9 -25
- package/build/components-nextjs/index.js.map +1 -1
- package/build/data-fetching/api/PrezlyApi.js +187 -210
- package/build/data-fetching/api/PrezlyApi.js.map +1 -1
- package/build/data-fetching/api/getPrezlyApi.js +19 -25
- package/build/data-fetching/api/getPrezlyApi.js.map +1 -1
- package/build/data-fetching/api/index.js +16 -14
- package/build/data-fetching/api/index.js.map +1 -1
- package/build/data-fetching/api/queries.js +41 -80
- package/build/data-fetching/api/queries.js.map +1 -1
- package/build/data-fetching/index.js +18 -36
- package/build/data-fetching/index.js.map +1 -1
- package/build/data-fetching/lib/getAlgoliaSettings.js +20 -26
- package/build/data-fetching/lib/getAlgoliaSettings.js.map +1 -1
- package/build/data-fetching/lib/getEnvVariables.js +36 -40
- package/build/data-fetching/lib/getEnvVariables.js.map +1 -1
- package/build/data-fetching/lib/index.js +11 -32
- package/build/data-fetching/lib/index.js.map +1 -1
- package/build/data-fetching/lib/isSdkError.js +6 -7
- package/build/data-fetching/lib/isSdkError.js.map +1 -1
- package/build/data-fetching/lib/isUuid.js +6 -7
- package/build/data-fetching/lib/isUuid.js.map +1 -1
- package/build/data-fetching/types.js +3 -1
- package/build/index.js +25 -103
- package/build/index.js.map +1 -1
- package/build/infinite-loading/index.js +23 -41
- package/build/infinite-loading/index.js.map +1 -1
- package/build/infinite-loading/types.js +3 -1
- package/build/infinite-loading/useInfiniteGalleriesLoading.js +35 -46
- package/build/infinite-loading/useInfiniteGalleriesLoading.js.map +1 -1
- package/build/infinite-loading/useInfiniteLoading.js +41 -54
- package/build/infinite-loading/useInfiniteLoading.js.map +1 -1
- package/build/infinite-loading/useInfiniteStoriesLoading.js +48 -60
- package/build/infinite-loading/useInfiniteStoriesLoading.js.map +1 -1
- package/build/intl/index.d.ts +1 -1
- package/build/intl/index.js +24 -47
- package/build/intl/index.js.map +1 -1
- package/build/intl/languages.js +110 -150
- package/build/intl/languages.js.map +1 -1
- package/build/intl/locale.d.ts +1 -0
- package/build/intl/locale.js +104 -58
- package/build/intl/locale.js.map +1 -1
- package/build/intl/localeConfig.d.ts +2 -3
- package/build/intl/localeConfig.js +13 -28
- package/build/intl/localeConfig.js.map +1 -1
- package/build/intl/localeList.d.ts +2 -4
- package/build/intl/localeList.js +108 -7
- package/build/intl/localeList.js.map +1 -1
- package/build/intl/localeObject.js +78 -83
- package/build/intl/localeObject.js.map +1 -1
- package/build/newsroom-context/context.js +24 -42
- package/build/newsroom-context/context.js.map +1 -1
- package/build/newsroom-context/hooks/index.js +27 -125
- package/build/newsroom-context/hooks/index.js.map +1 -1
- package/build/newsroom-context/hooks/useAlgoliaSettings.js +8 -9
- package/build/newsroom-context/hooks/useAlgoliaSettings.js.map +1 -1
- package/build/newsroom-context/hooks/useCategories.js +8 -9
- package/build/newsroom-context/hooks/useCategories.js.map +1 -1
- package/build/newsroom-context/hooks/useCompanyInformation.js +8 -9
- package/build/newsroom-context/hooks/useCompanyInformation.js.map +1 -1
- package/build/newsroom-context/hooks/useCurrentCategory.js +8 -9
- package/build/newsroom-context/hooks/useCurrentCategory.js.map +1 -1
- package/build/newsroom-context/hooks/useCurrentLocale.js +8 -9
- package/build/newsroom-context/hooks/useCurrentLocale.js.map +1 -1
- package/build/newsroom-context/hooks/useCurrentStory.js +8 -9
- package/build/newsroom-context/hooks/useCurrentStory.js.map +1 -1
- package/build/newsroom-context/hooks/useGetLinkLocaleSlug.js +19 -21
- package/build/newsroom-context/hooks/useGetLinkLocaleSlug.js.map +1 -1
- package/build/newsroom-context/hooks/useGetTranslationUrl.js +54 -56
- package/build/newsroom-context/hooks/useGetTranslationUrl.js.map +1 -1
- package/build/newsroom-context/hooks/useLanguages.js +8 -9
- package/build/newsroom-context/hooks/useLanguages.js.map +1 -1
- package/build/newsroom-context/hooks/useNewsroom.js +8 -9
- package/build/newsroom-context/hooks/useNewsroom.js.map +1 -1
- package/build/newsroom-context/hooks/useNewsroomContext.js +14 -15
- package/build/newsroom-context/hooks/useNewsroomContext.js.map +1 -1
- package/build/newsroom-context/index.d.ts +1 -2
- package/build/newsroom-context/index.js +20 -32
- package/build/newsroom-context/index.js.map +1 -1
- package/build/sentry/client.js +7 -8
- package/build/sentry/client.js.map +1 -1
- package/build/sentry/common.js +27 -30
- package/build/sentry/common.js.map +1 -1
- package/build/sentry/index.js +7 -18
- package/build/sentry/index.js.map +1 -1
- package/build/sentry/server.js +7 -8
- package/build/sentry/server.js.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -0
- package/build/types.js +3 -1
- package/build/utils/boilerplate.js +18 -11
- package/build/utils/boilerplate.js.map +1 -1
- package/build/utils/constants.js +6 -11
- package/build/utils/constants.js.map +1 -1
- package/build/utils/getAssetsUrl.js +7 -8
- package/build/utils/getAssetsUrl.js.map +1 -1
- package/build/utils/getDataRequestLink.js +10 -10
- package/build/utils/getDataRequestLink.js.map +1 -1
- package/build/utils/getLocalizedCategoryData.js +29 -37
- package/build/utils/getLocalizedCategoryData.js.map +1 -1
- package/build/utils/getNewsroomLogoUrl.js +18 -19
- package/build/utils/getNewsroomLogoUrl.js.map +1 -1
- package/build/utils/getPrivacyPortalUrl.js +11 -15
- package/build/utils/getPrivacyPortalUrl.js.map +1 -1
- package/build/utils/getStoryPublicationDate.js +12 -13
- package/build/utils/getStoryPublicationDate.js.map +1 -1
- package/build/utils/getUploadcareGroupUrl.js +8 -9
- package/build/utils/getUploadcareGroupUrl.js.map +1 -1
- package/build/utils/index.js +26 -114
- package/build/utils/index.js.map +1 -1
- package/build/utils/isEmbargoStory.js +6 -7
- package/build/utils/isEmbargoStory.js.map +1 -1
- package/package.json +12 -26
- package/src/@types/global.d.ts +7 -0
- package/src/__mocks__/languages.ts +416 -0
- package/src/__mocks__/story.ts +359 -0
- package/src/adapter-nextjs/api-handlers/fetchGalleries.ts +24 -0
- package/src/adapter-nextjs/api-handlers/fetchStories.ts +26 -0
- package/src/adapter-nextjs/api-handlers/index.ts +2 -0
- package/src/adapter-nextjs/getNewsroomServerSideProps.ts +29 -0
- package/src/adapter-nextjs/getNewsroomStaticProps.ts +29 -0
- package/src/adapter-nextjs/index.ts +6 -0
- package/src/adapter-nextjs/page-props/category.ts +157 -0
- package/src/adapter-nextjs/page-props/gallery.ts +114 -0
- package/src/adapter-nextjs/page-props/galleryAlbum.ts +89 -0
- package/src/adapter-nextjs/page-props/home.ts +113 -0
- package/src/adapter-nextjs/page-props/index.ts +26 -0
- package/src/adapter-nextjs/page-props/lib/types.ts +8 -0
- package/src/adapter-nextjs/page-props/search.ts +53 -0
- package/src/adapter-nextjs/page-props/sitemap/SitemapBuilder.ts +56 -0
- package/src/adapter-nextjs/page-props/sitemap/createPaths.ts +21 -0
- package/src/adapter-nextjs/page-props/sitemap/getServerSideProps.ts +43 -0
- package/src/adapter-nextjs/page-props/sitemap/index.ts +5 -0
- package/src/adapter-nextjs/page-props/sitemap/types.ts +5 -0
- package/src/adapter-nextjs/page-props/story.ts +94 -0
- package/src/adapter-nextjs/page-props/storyPreview.ts +33 -0
- package/src/adapter-nextjs/processRequest.ts +49 -0
- package/src/adapter-nextjs/processStaticRequest.ts +32 -0
- package/src/components-nextjs/PageSeo/PageSeo.tsx +131 -0
- package/src/components-nextjs/PageSeo/index.ts +2 -0
- package/src/components-nextjs/PageSeo/lib/getAbsoluteUrl.ts +7 -0
- package/src/components-nextjs/PageSeo/lib/types.ts +4 -0
- package/src/components-nextjs/StorySeo/StorySeo.tsx +80 -0
- package/src/components-nextjs/StorySeo/index.ts +1 -0
- package/src/components-nextjs/document.tsx +38 -0
- package/src/components-nextjs/index.ts +3 -0
- package/src/data-fetching/api/PrezlyApi.ts +304 -0
- package/src/data-fetching/api/getPrezlyApi.ts +24 -0
- package/src/data-fetching/api/index.ts +1 -0
- package/src/data-fetching/api/queries.ts +51 -0
- package/src/data-fetching/index.ts +3 -0
- package/src/data-fetching/lib/getAlgoliaSettings.ts +29 -0
- package/src/data-fetching/lib/getEnvVariables.ts +46 -0
- package/src/data-fetching/lib/index.ts +4 -0
- package/src/data-fetching/lib/isSdkError.ts +5 -0
- package/src/data-fetching/lib/isUuid.ts +5 -0
- package/src/data-fetching/types.ts +14 -0
- package/src/index.ts +9 -0
- package/src/infinite-loading/index.ts +4 -0
- package/src/infinite-loading/types.ts +5 -0
- package/src/infinite-loading/useInfiniteGalleriesLoading.ts +53 -0
- package/src/infinite-loading/useInfiniteLoading.ts +66 -0
- package/src/infinite-loading/useInfiniteStoriesLoading.ts +81 -0
- package/src/intl/index.ts +4 -0
- package/src/intl/languages.test.ts +232 -0
- package/src/intl/languages.ts +233 -0
- package/src/intl/locale.test.ts +95 -0
- package/src/intl/locale.ts +140 -0
- package/src/intl/localeConfig.js +23 -0
- package/src/intl/localeList.js +110 -0
- package/src/intl/localeObject.test.ts +81 -0
- package/src/intl/localeObject.ts +99 -0
- package/src/newsroom-context/context.tsx +115 -0
- package/src/newsroom-context/hooks/index.ts +11 -0
- package/src/newsroom-context/hooks/useAlgoliaSettings.ts +7 -0
- package/src/newsroom-context/hooks/useCategories.ts +7 -0
- package/src/newsroom-context/hooks/useCompanyInformation.ts +7 -0
- package/src/newsroom-context/hooks/useCurrentCategory.ts +7 -0
- package/src/newsroom-context/hooks/useCurrentLocale.ts +7 -0
- package/src/newsroom-context/hooks/useCurrentStory.ts +7 -0
- package/src/newsroom-context/hooks/useGetLinkLocaleSlug.ts +37 -0
- package/src/newsroom-context/hooks/useGetTranslationUrl.ts +97 -0
- package/src/newsroom-context/hooks/useLanguages.ts +7 -0
- package/src/newsroom-context/hooks/useNewsroom.ts +7 -0
- package/src/newsroom-context/hooks/useNewsroomContext.ts +15 -0
- package/src/newsroom-context/index.ts +2 -0
- package/src/sentry/client.ts +7 -0
- package/src/sentry/common.ts +27 -0
- package/src/sentry/index.ts +2 -0
- package/src/sentry/server.ts +7 -0
- package/src/types.ts +51 -0
- package/src/utils/boilerplate.ts +27 -0
- package/src/utils/constants.ts +3 -0
- package/src/utils/getAssetsUrl.test.ts +9 -0
- package/src/utils/getAssetsUrl.ts +9 -0
- package/src/utils/getDataRequestLink.ts +14 -0
- package/src/utils/getLocalizedCategoryData.ts +47 -0
- package/src/utils/getNewsroomLogoUrl.ts +22 -0
- package/src/utils/getPrivacyPortalUrl.ts +25 -0
- package/src/utils/getStoryPublicationDate.tsx +15 -0
- package/src/utils/getUploadcareGroupUrl.ts +13 -0
- package/src/utils/index.ts +10 -0
- package/src/utils/isEmbargoStory.ts +10 -0
- package/build/@types/global.d.js +0 -1
package/build/intl/localeList.js
CHANGED
|
@@ -1,11 +1,112 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.localeList = void 0;
|
|
7
2
|
/**
|
|
8
3
|
* This list is pulled from the main Prezly application. The underscores are replaced with dashes.
|
|
9
4
|
*/
|
|
10
|
-
|
|
11
|
-
|
|
5
|
+
module.exports = [
|
|
6
|
+
'af-ZA',
|
|
7
|
+
'ar',
|
|
8
|
+
'ar-AE',
|
|
9
|
+
'ar-BH',
|
|
10
|
+
'ar-QA',
|
|
11
|
+
'ar-SA',
|
|
12
|
+
'az',
|
|
13
|
+
'be',
|
|
14
|
+
'bg-BG',
|
|
15
|
+
'ca',
|
|
16
|
+
'cs-CZ',
|
|
17
|
+
'da-DK',
|
|
18
|
+
'de',
|
|
19
|
+
'de-DE',
|
|
20
|
+
'de-BE',
|
|
21
|
+
'de-AT',
|
|
22
|
+
'de-CH',
|
|
23
|
+
'el-GR',
|
|
24
|
+
'en',
|
|
25
|
+
'en-US',
|
|
26
|
+
'en-AE',
|
|
27
|
+
'en-AU',
|
|
28
|
+
'en-BD',
|
|
29
|
+
'en-BE',
|
|
30
|
+
'en-BH',
|
|
31
|
+
'en-CA',
|
|
32
|
+
'en-CN',
|
|
33
|
+
'en-DE',
|
|
34
|
+
'en-DK',
|
|
35
|
+
'en-GB',
|
|
36
|
+
'en-HK',
|
|
37
|
+
'en-ID',
|
|
38
|
+
'en-IE',
|
|
39
|
+
'en-IL',
|
|
40
|
+
'en-IN',
|
|
41
|
+
'en-JM',
|
|
42
|
+
'en-JP',
|
|
43
|
+
'en-KH',
|
|
44
|
+
'en-KR',
|
|
45
|
+
'en-LK',
|
|
46
|
+
'en-MV',
|
|
47
|
+
'en-MM',
|
|
48
|
+
'en-MY',
|
|
49
|
+
'en-NP',
|
|
50
|
+
'en-NZ',
|
|
51
|
+
'en-PH',
|
|
52
|
+
'en-PK',
|
|
53
|
+
'en-QA',
|
|
54
|
+
'en-SA',
|
|
55
|
+
'en-SG',
|
|
56
|
+
'en-TH',
|
|
57
|
+
'en-TW',
|
|
58
|
+
'en-VN',
|
|
59
|
+
'en-ZA',
|
|
60
|
+
'es',
|
|
61
|
+
'es-ES',
|
|
62
|
+
'es-MX',
|
|
63
|
+
'et-EE',
|
|
64
|
+
'es-419',
|
|
65
|
+
'fi-FI',
|
|
66
|
+
'fil',
|
|
67
|
+
'fr',
|
|
68
|
+
'fr-BE',
|
|
69
|
+
'fr-FR',
|
|
70
|
+
'fr-CA',
|
|
71
|
+
'fr-LU',
|
|
72
|
+
'ga-IE',
|
|
73
|
+
'he-IL',
|
|
74
|
+
'hi-IN',
|
|
75
|
+
'hr-HR',
|
|
76
|
+
'hu-HU',
|
|
77
|
+
'id-ID',
|
|
78
|
+
'it-IT',
|
|
79
|
+
'ja-JP',
|
|
80
|
+
'kk',
|
|
81
|
+
'ko-KR',
|
|
82
|
+
'ky',
|
|
83
|
+
'lt-LT',
|
|
84
|
+
'lv-LV',
|
|
85
|
+
'mt-MT',
|
|
86
|
+
'ms-MY',
|
|
87
|
+
'nb-NO',
|
|
88
|
+
'nl',
|
|
89
|
+
'nl-BE',
|
|
90
|
+
'nl-NL',
|
|
91
|
+
'pl-PL',
|
|
92
|
+
'pt',
|
|
93
|
+
'pt-BR',
|
|
94
|
+
'pt-PT',
|
|
95
|
+
'ro-RO',
|
|
96
|
+
'ru-RU',
|
|
97
|
+
'sk-SK',
|
|
98
|
+
'sl-SI',
|
|
99
|
+
'sv-SE',
|
|
100
|
+
'sw',
|
|
101
|
+
'th-TH',
|
|
102
|
+
'tr-TR',
|
|
103
|
+
'uk-UA',
|
|
104
|
+
'ur-PK',
|
|
105
|
+
'uz',
|
|
106
|
+
'vi-VN',
|
|
107
|
+
'zh-Hant',
|
|
108
|
+
'zh-HK',
|
|
109
|
+
'zh-TW',
|
|
110
|
+
'zh-CN',
|
|
111
|
+
];
|
|
112
|
+
//# sourceMappingURL=localeList.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"localeList.js","sourceRoot":"","sources":["../../src/intl/localeList.
|
|
1
|
+
{"version":3,"file":"localeList.js","sourceRoot":"","sources":["../../src/intl/localeList.js"],"names":[],"mappings":";AAAA;;GAEG;AACH,MAAM,CAAC,OAAO,GAAG;IACb,OAAO;IACP,IAAI;IACJ,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,IAAI;IACJ,IAAI;IACJ,OAAO;IACP,IAAI;IACJ,OAAO;IACP,OAAO;IACP,IAAI;IACJ,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,IAAI;IACJ,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,IAAI;IACJ,OAAO;IACP,OAAO;IACP,OAAO;IACP,QAAQ;IACR,OAAO;IACP,KAAK;IACL,IAAI;IACJ,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,IAAI;IACJ,OAAO;IACP,IAAI;IACJ,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,IAAI;IACJ,OAAO;IACP,OAAO;IACP,OAAO;IACP,IAAI;IACJ,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,IAAI;IACJ,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,IAAI;IACJ,OAAO;IACP,SAAS;IACT,OAAO;IACP,OAAO;IACP,OAAO;CACV,CAAC"}
|
|
@@ -1,96 +1,91 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
});
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.LocaleObject = void 0;
|
|
7
|
-
|
|
7
|
+
const localeConfig_1 = __importDefault(require("./localeConfig"));
|
|
8
8
|
/**
|
|
9
9
|
* This class is created to simplify working with locales and transforming between different locale code formats.
|
|
10
10
|
* Prezly API uses underscore-codes, while most frontend application tend to use hyphen-codes or slugs.
|
|
11
11
|
* Note that `fromAnyCode` constructor only accepts locales supported by Prezly backend. See `localeConfig` for reference.
|
|
12
12
|
*/
|
|
13
13
|
class LocaleObject {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
14
|
+
/**
|
|
15
|
+
* Hyphen-separated locale code.
|
|
16
|
+
* Examples: `nl-BE`, `en-US`, `fr`, `fil`
|
|
17
|
+
*/
|
|
18
|
+
localeCode;
|
|
19
|
+
constructor(localeCode) {
|
|
20
|
+
if (!/^([a-z]{2,3})(-[a-z\d]{1,4})?$/i.test(localeCode)) {
|
|
21
|
+
throw new Error('Invalid locale code provided!');
|
|
22
|
+
}
|
|
23
|
+
const [language, region] = localeCode.split('-');
|
|
24
|
+
if (region) {
|
|
25
|
+
// Workaround for `zh-Hant` locale, which is the only locale with non-uppercase region part
|
|
26
|
+
const regionSuffix = region === 'hant' ? 'Hant' : region.toUpperCase();
|
|
27
|
+
this.localeCode = [language, regionSuffix].join('-');
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
this.localeCode = language;
|
|
31
|
+
}
|
|
22
32
|
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
33
|
+
/**
|
|
34
|
+
* @param localeCode Locale code in any of the formats below.
|
|
35
|
+
* Examples:
|
|
36
|
+
* - Hyphen-codes: `nl-BE`, `en-US`, `fr`, `fil`
|
|
37
|
+
* - Underscore-codes: `nl_BE`, `en_US`, `fr`, `fil`
|
|
38
|
+
* - Slugs: `nl-be`, `en-us`, `fr`, `fil`
|
|
39
|
+
*/
|
|
40
|
+
static fromAnyCode(localeCode) {
|
|
41
|
+
const lowercaseCode = localeCode.toLowerCase().replace('_', '-');
|
|
42
|
+
const foundCode = localeConfig_1.default.find((code) => code === lowercaseCode);
|
|
43
|
+
if (!foundCode) {
|
|
44
|
+
throw new Error(`Unsupported locale code provided: "${lowercaseCode}"`);
|
|
45
|
+
}
|
|
46
|
+
return new LocaleObject(foundCode);
|
|
30
47
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
* - Hyphen-codes: `nl-BE`, `en-US`, `fr`, `fil`
|
|
37
|
-
* - Underscore-codes: `nl_BE`, `en_US`, `fr`, `fil`
|
|
38
|
-
* - Slugs: `nl-be`, `en-us`, `fr`, `fil`
|
|
39
|
-
*/
|
|
40
|
-
static fromAnyCode(localeCode) {
|
|
41
|
-
const lowercaseCode = localeCode.toLowerCase().replace('_', '-');
|
|
42
|
-
const foundCode = _localeConfig.localeConfig.locales.find(code => code === lowercaseCode);
|
|
43
|
-
if (!foundCode) {
|
|
44
|
-
throw new Error(`Unsupported locale code provided: "${lowercaseCode}"`);
|
|
48
|
+
/**
|
|
49
|
+
* @returns Code formatted into hyphen format: `nl-BE`, `en-US`, `fr`, `fil`
|
|
50
|
+
*/
|
|
51
|
+
toHyphenCode() {
|
|
52
|
+
return this.localeCode;
|
|
45
53
|
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
*/
|
|
81
|
-
toRegionCode() {
|
|
82
|
-
const [language, region] = this.localeCode.split('-');
|
|
83
|
-
if (!region) {
|
|
84
|
-
return language.toUpperCase();
|
|
54
|
+
/**
|
|
55
|
+
* @returns Code formatted into underscore format, as expected by Prezly API: `nl_BE`, `en_US`, `fr`, `fil`
|
|
56
|
+
*/
|
|
57
|
+
toUnderscoreCode() {
|
|
58
|
+
return this.localeCode.replace('-', '_');
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* @returns Code formatted to a URL-friendly lowercase slug format: `nl-be`, `en-us`, `fr`, `fil`
|
|
62
|
+
*/
|
|
63
|
+
toUrlSlug() {
|
|
64
|
+
return this.localeCode.toLowerCase();
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* @returns Only the language part of the code without culture/region part: `nl`, `en`, `fr`
|
|
68
|
+
*/
|
|
69
|
+
toNeutralLanguageCode() {
|
|
70
|
+
const [language] = this.localeCode.split('-');
|
|
71
|
+
return language;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* @returns Only the culture/regtion part without the language part: `be`, `us`, `fr`
|
|
75
|
+
*/
|
|
76
|
+
toRegionCode() {
|
|
77
|
+
const [language, region] = this.localeCode.split('-');
|
|
78
|
+
if (!region) {
|
|
79
|
+
return language.toUpperCase();
|
|
80
|
+
}
|
|
81
|
+
return region.toUpperCase();
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Check if two LocaleObject instances are representing the same locale code.
|
|
85
|
+
*/
|
|
86
|
+
isEqual(anotherLocale) {
|
|
87
|
+
return anotherLocale.toHyphenCode() === this.localeCode;
|
|
85
88
|
}
|
|
86
|
-
return region.toUpperCase();
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* Check if two LocaleObject instances are representing the same locale code.
|
|
91
|
-
*/
|
|
92
|
-
isEqual(anotherLocale) {
|
|
93
|
-
return anotherLocale.toHyphenCode() === this.localeCode;
|
|
94
|
-
}
|
|
95
89
|
}
|
|
96
|
-
exports.LocaleObject = LocaleObject;
|
|
90
|
+
exports.LocaleObject = LocaleObject;
|
|
91
|
+
//# sourceMappingURL=localeObject.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"localeObject.js","sourceRoot":"","sources":["../../src/intl/localeObject.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"localeObject.js","sourceRoot":"","sources":["../../src/intl/localeObject.ts"],"names":[],"mappings":";;;;;;AAAA,kEAA0C;AAE1C;;;;GAIG;AACH,MAAa,YAAY;IACrB;;;OAGG;IACK,UAAU,CAAS;IAE3B,YAAoB,UAAkB;QAClC,IAAI,CAAC,iCAAiC,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE;YACrD,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAC;SACpD;QAED,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,GAAG,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAEjD,IAAI,MAAM,EAAE;YACR,2FAA2F;YAC3F,MAAM,YAAY,GAAG,MAAM,KAAK,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC;YAEvE,IAAI,CAAC,UAAU,GAAG,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SACxD;aAAM;YACH,IAAI,CAAC,UAAU,GAAG,QAAQ,CAAC;SAC9B;IACL,CAAC;IAED;;;;;;OAMG;IACI,MAAM,CAAC,WAAW,CAAC,UAAkB;QACxC,MAAM,aAAa,GAAG,UAAU,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;QACjE,MAAM,SAAS,GAAG,sBAAY,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,KAAK,aAAa,CAAC,CAAC;QAEtE,IAAI,CAAC,SAAS,EAAE;YACZ,MAAM,IAAI,KAAK,CAAC,sCAAsC,aAAa,GAAG,CAAC,CAAC;SAC3E;QAED,OAAO,IAAI,YAAY,CAAC,SAAS,CAAC,CAAC;IACvC,CAAC;IAED;;OAEG;IACI,YAAY;QACf,OAAO,IAAI,CAAC,UAAU,CAAC;IAC3B,CAAC;IAED;;OAEG;IACI,gBAAgB;QACnB,OAAO,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IAC7C,CAAC;IAED;;OAEG;IACI,SAAS;QACZ,OAAO,IAAI,CAAC,UAAU,CAAC,WAAW,EAAE,CAAC;IACzC,CAAC;IAED;;OAEG;IACI,qBAAqB;QACxB,MAAM,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAE9C,OAAO,QAAQ,CAAC;IACpB,CAAC;IAED;;OAEG;IACI,YAAY;QACf,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAEtD,IAAI,CAAC,MAAM,EAAE;YACT,OAAO,QAAQ,CAAC,WAAW,EAAE,CAAC;SACjC;QAED,OAAO,MAAM,CAAC,WAAW,EAAE,CAAC;IAChC,CAAC;IAED;;OAEG;IACI,OAAO,CAAC,aAA2B;QACtC,OAAO,aAAa,CAAC,YAAY,EAAE,KAAK,IAAI,CAAC,UAAU,CAAC;IAC5D,CAAC;CACJ;AA3FD,oCA2FC"}
|
|
@@ -1,47 +1,29 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
exports.
|
|
8
|
-
var _react = require("react");
|
|
9
|
-
var _index = require("../intl/index.js");
|
|
10
|
-
const NewsroomContext = /*#__PURE__*/(0, _react.createContext)(undefined);
|
|
11
|
-
|
|
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);
|
|
12
8
|
/**
|
|
13
9
|
* This context provides common Newsroom information retrieved by `getNewsroomServerSideProps` helper.
|
|
14
10
|
* Please refer to the `NewsroomContextType` definition for more info on what's exposed from the context.
|
|
15
11
|
*/
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
})
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
categories,
|
|
35
|
-
contacts,
|
|
36
|
-
newsroom,
|
|
37
|
-
currentCategory,
|
|
38
|
-
currentStory,
|
|
39
|
-
companyInformation,
|
|
40
|
-
languages,
|
|
41
|
-
locale,
|
|
42
|
-
notifications,
|
|
43
|
-
themePreset,
|
|
44
|
-
algoliaSettings
|
|
45
|
-
}
|
|
46
|
-
}, children);
|
|
47
|
-
}
|
|
12
|
+
function NewsroomContextProvider({ categories, contacts, newsroom, currentCategory, currentStory, companyInformation, languages, localeCode, notifications, 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: {
|
|
15
|
+
categories,
|
|
16
|
+
contacts,
|
|
17
|
+
newsroom,
|
|
18
|
+
currentCategory,
|
|
19
|
+
currentStory,
|
|
20
|
+
companyInformation,
|
|
21
|
+
languages,
|
|
22
|
+
locale,
|
|
23
|
+
notifications,
|
|
24
|
+
themePreset,
|
|
25
|
+
algoliaSettings,
|
|
26
|
+
}, children: children }));
|
|
27
|
+
}
|
|
28
|
+
exports.NewsroomContextProvider = NewsroomContextProvider;
|
|
29
|
+
//# 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":";;;;AAWA,iCAA+C;AAG/C,kCAAuD;AAwD1C,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,aAAa,EACb,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,aAAa;YACb,WAAW;YACX,eAAe;SAClB,YAEA,QAAQ,GACc,CAC9B,CAAC;AACN,CAAC;AAtCD,0DAsCC"}
|
|
@@ -1,126 +1,28 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
Object.keys(_useCompanyInformation).forEach(function (key) {
|
|
30
|
-
if (key === "default" || key === "__esModule") return;
|
|
31
|
-
if (key in exports && exports[key] === _useCompanyInformation[key]) return;
|
|
32
|
-
Object.defineProperty(exports, key, {
|
|
33
|
-
enumerable: true,
|
|
34
|
-
get: function () {
|
|
35
|
-
return _useCompanyInformation[key];
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
});
|
|
39
|
-
var _useCurrentCategory = require("./useCurrentCategory.js");
|
|
40
|
-
Object.keys(_useCurrentCategory).forEach(function (key) {
|
|
41
|
-
if (key === "default" || key === "__esModule") return;
|
|
42
|
-
if (key in exports && exports[key] === _useCurrentCategory[key]) return;
|
|
43
|
-
Object.defineProperty(exports, key, {
|
|
44
|
-
enumerable: true,
|
|
45
|
-
get: function () {
|
|
46
|
-
return _useCurrentCategory[key];
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
});
|
|
50
|
-
var _useCurrentLocale = require("./useCurrentLocale.js");
|
|
51
|
-
Object.keys(_useCurrentLocale).forEach(function (key) {
|
|
52
|
-
if (key === "default" || key === "__esModule") return;
|
|
53
|
-
if (key in exports && exports[key] === _useCurrentLocale[key]) return;
|
|
54
|
-
Object.defineProperty(exports, key, {
|
|
55
|
-
enumerable: true,
|
|
56
|
-
get: function () {
|
|
57
|
-
return _useCurrentLocale[key];
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
});
|
|
61
|
-
var _useCurrentStory = require("./useCurrentStory.js");
|
|
62
|
-
Object.keys(_useCurrentStory).forEach(function (key) {
|
|
63
|
-
if (key === "default" || key === "__esModule") return;
|
|
64
|
-
if (key in exports && exports[key] === _useCurrentStory[key]) return;
|
|
65
|
-
Object.defineProperty(exports, key, {
|
|
66
|
-
enumerable: true,
|
|
67
|
-
get: function () {
|
|
68
|
-
return _useCurrentStory[key];
|
|
69
|
-
}
|
|
70
|
-
});
|
|
71
|
-
});
|
|
72
|
-
var _useGetLinkLocaleSlug = require("./useGetLinkLocaleSlug.js");
|
|
73
|
-
Object.keys(_useGetLinkLocaleSlug).forEach(function (key) {
|
|
74
|
-
if (key === "default" || key === "__esModule") return;
|
|
75
|
-
if (key in exports && exports[key] === _useGetLinkLocaleSlug[key]) return;
|
|
76
|
-
Object.defineProperty(exports, key, {
|
|
77
|
-
enumerable: true,
|
|
78
|
-
get: function () {
|
|
79
|
-
return _useGetLinkLocaleSlug[key];
|
|
80
|
-
}
|
|
81
|
-
});
|
|
82
|
-
});
|
|
83
|
-
var _useGetTranslationUrl = require("./useGetTranslationUrl.js");
|
|
84
|
-
Object.keys(_useGetTranslationUrl).forEach(function (key) {
|
|
85
|
-
if (key === "default" || key === "__esModule") return;
|
|
86
|
-
if (key in exports && exports[key] === _useGetTranslationUrl[key]) return;
|
|
87
|
-
Object.defineProperty(exports, key, {
|
|
88
|
-
enumerable: true,
|
|
89
|
-
get: function () {
|
|
90
|
-
return _useGetTranslationUrl[key];
|
|
91
|
-
}
|
|
92
|
-
});
|
|
93
|
-
});
|
|
94
|
-
var _useLanguages = require("./useLanguages.js");
|
|
95
|
-
Object.keys(_useLanguages).forEach(function (key) {
|
|
96
|
-
if (key === "default" || key === "__esModule") return;
|
|
97
|
-
if (key in exports && exports[key] === _useLanguages[key]) return;
|
|
98
|
-
Object.defineProperty(exports, key, {
|
|
99
|
-
enumerable: true,
|
|
100
|
-
get: function () {
|
|
101
|
-
return _useLanguages[key];
|
|
102
|
-
}
|
|
103
|
-
});
|
|
104
|
-
});
|
|
105
|
-
var _useNewsroom = require("./useNewsroom.js");
|
|
106
|
-
Object.keys(_useNewsroom).forEach(function (key) {
|
|
107
|
-
if (key === "default" || key === "__esModule") return;
|
|
108
|
-
if (key in exports && exports[key] === _useNewsroom[key]) return;
|
|
109
|
-
Object.defineProperty(exports, key, {
|
|
110
|
-
enumerable: true,
|
|
111
|
-
get: function () {
|
|
112
|
-
return _useNewsroom[key];
|
|
113
|
-
}
|
|
114
|
-
});
|
|
115
|
-
});
|
|
116
|
-
var _useNewsroomContext = require("./useNewsroomContext.js");
|
|
117
|
-
Object.keys(_useNewsroomContext).forEach(function (key) {
|
|
118
|
-
if (key === "default" || key === "__esModule") return;
|
|
119
|
-
if (key in exports && exports[key] === _useNewsroomContext[key]) return;
|
|
120
|
-
Object.defineProperty(exports, key, {
|
|
121
|
-
enumerable: true,
|
|
122
|
-
get: function () {
|
|
123
|
-
return _useNewsroomContext[key];
|
|
124
|
-
}
|
|
125
|
-
});
|
|
126
|
-
});
|
|
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);
|
|
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,11 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
});
|
|
6
|
-
exports.useAlgoliaSettings = useAlgoliaSettings;
|
|
7
|
-
var _useNewsroomContext = require("./useNewsroomContext.js");
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useAlgoliaSettings = void 0;
|
|
4
|
+
const useNewsroomContext_1 = require("./useNewsroomContext");
|
|
8
5
|
function useAlgoliaSettings() {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
6
|
+
const context = (0, useNewsroomContext_1.useNewsroomContext)();
|
|
7
|
+
return context.algoliaSettings;
|
|
8
|
+
}
|
|
9
|
+
exports.useAlgoliaSettings = useAlgoliaSettings;
|
|
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,11 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
});
|
|
6
|
-
exports.useCategories = useCategories;
|
|
7
|
-
var _useNewsroomContext = require("./useNewsroomContext.js");
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useCategories = void 0;
|
|
4
|
+
const useNewsroomContext_1 = require("./useNewsroomContext");
|
|
8
5
|
function useCategories() {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
6
|
+
const context = (0, useNewsroomContext_1.useNewsroomContext)();
|
|
7
|
+
return context.categories;
|
|
8
|
+
}
|
|
9
|
+
exports.useCategories = useCategories;
|
|
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,11 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
});
|
|
6
|
-
exports.useCompanyInformation = useCompanyInformation;
|
|
7
|
-
var _useNewsroomContext = require("./useNewsroomContext.js");
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useCompanyInformation = void 0;
|
|
4
|
+
const useNewsroomContext_1 = require("./useNewsroomContext");
|
|
8
5
|
function useCompanyInformation() {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
6
|
+
const context = (0, useNewsroomContext_1.useNewsroomContext)();
|
|
7
|
+
return context.companyInformation;
|
|
8
|
+
}
|
|
9
|
+
exports.useCompanyInformation = useCompanyInformation;
|
|
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"}
|