@treely/strapi-slices 5.17.4 → 6.0.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/dist/index.d.ts CHANGED
@@ -45,8 +45,6 @@ import PageProps from './models/PageProps';
45
45
  import PortfolioProject from './models/PortfolioProject';
46
46
  import getAllSlugsFromStrapi from './integrations/strapi/getAllSlugsFromStrapi';
47
47
  import getPortfolioProjects from './integrations/strapi/getPortfolioProjects';
48
- import getStaticPathsFromStrapi from './integrations/strapi/getStaticPathsFromStrapi';
49
- import getStaticPropsFromStrapi from './integrations/strapi/getStaticPropsFromStrapi';
50
48
  import getStrapiCollectionType from './integrations/strapi/getStrapiCollectionType';
51
49
  import getStrapiSingleType from './integrations/strapi/getStrapiSingleType';
52
50
  import mergeGlobalAndStrapiBlogPostData from './utils/mergeGlobalAndStrapiBlogPostData';
@@ -58,5 +56,5 @@ import strapiMediaUrl from './utils/strapiMediaUrl';
58
56
  export * from './components/PreviewAlert';
59
57
  export * from './components/SEOTags';
60
58
  export * from './components/SliceRenderer';
61
- export { mergeGlobalAndStrapiBlogPostData, mergeGlobalAndStrapiCustomerStoryData, mergeGlobalAndStrapiPageData, mergeGlobalAndStrapiProjectData, strapiLinkUrl, strapiMediaUrl, getAllSlugsFromStrapi, getPortfolioProjects, getStaticPathsFromStrapi, getStaticPropsFromStrapi, getStrapiCollectionType, getStrapiSingleType, };
59
+ export { mergeGlobalAndStrapiBlogPostData, mergeGlobalAndStrapiCustomerStoryData, mergeGlobalAndStrapiPageData, mergeGlobalAndStrapiProjectData, strapiLinkUrl, strapiMediaUrl, getAllSlugsFromStrapi, getPortfolioProjects, getStrapiCollectionType, getStrapiSingleType, };
62
60
  export type { IStrapi, IStrapiData, IStrapiResponse, StrapiAuthor, StrapiAvatarWithName, StrapiBanner, StrapiBlogPost, StrapiBlogPostProps, StrapiButtonWithVariant, StrapiCategory, StrapiContactArea, StrapiCustomerStory, StrapiCustomerStoryProps, StrapiDefaultHeader, StrapiGlobal, StrapiGlossaryItem, StrapiHeroCard, StrapiImage, StrapiImageFormat, StrapiImageWithLink, StrapiLink, StrapiLinkList, StrapiLinkPage, StrapiLinkWithIcon, StrapiLocalization, StrapiMedia, StrapiMetadata, StrapiNavMenu, StrapiPage, StrapiPageProps, StrapiPortfolio, StrapiPortfolioCard, StrapiProject, StrapiProjectCard, StrapiProjectProps, StrapiQuoteCard, StrapiShapesCard, StrapiTextCardWithIcons, StrapiTopBanner, HeaderType, Image, Locale, PageMetadata, PageProps, PortfolioProject, };
@@ -553,72 +553,6 @@ var getPortfolioProjects = /*#__PURE__*/function () {
553
553
  };
554
554
  }();
555
555
 
556
- /** @deprecated Migrate to getAllSlugsFromStrapi */
557
- var getStaticPathsFromStrapi = /*#__PURE__*/function () {
558
- var _ref = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(path, _temp) {
559
- var _ref2, _ref2$filters, filters, params;
560
- return _regeneratorRuntime().wrap(function _callee$(_context) {
561
- while (1) switch (_context.prev = _context.next) {
562
- case 0:
563
- _ref2 = _temp === void 0 ? {
564
- filters: {}
565
- } : _temp, _ref2$filters = _ref2.filters, filters = _ref2$filters === void 0 ? {} : _ref2$filters;
566
- params = {
567
- locale: 'all',
568
- 'pagination[pageSize]': STRAPI_DEFAULT_PAGE_SIZE,
569
- filters: filters
570
- };
571
- return _context.abrupt("return", strapiClient.get(path, {
572
- params: params
573
- }));
574
- case 3:
575
- case "end":
576
- return _context.stop();
577
- }
578
- }, _callee);
579
- }));
580
- return function getStaticPathsFromStrapi(_x, _x2) {
581
- return _ref.apply(this, arguments);
582
- };
583
- }();
584
-
585
- /** @deprecated Migrate to getStrapiSingleType or getStrapiCollectionType */
586
- var getStaticPropsFromStrapi = /*#__PURE__*/function () {
587
- var _ref2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(path, _ref) {
588
- var _ref$locale, locale, slug, _ref$preview, preview, _ref$filters, filters, cache, enrichedFilters, params;
589
- return _regeneratorRuntime().wrap(function _callee$(_context) {
590
- while (1) switch (_context.prev = _context.next) {
591
- case 0:
592
- _ref$locale = _ref.locale, locale = _ref$locale === void 0 ? 'en' : _ref$locale, slug = _ref.slug, _ref$preview = _ref.preview, preview = _ref$preview === void 0 ? false : _ref$preview, _ref$filters = _ref.filters, filters = _ref$filters === void 0 ? {} : _ref$filters;
593
- cache = preview ? false : undefined;
594
- enrichedFilters = filters;
595
- if (slug) {
596
- enrichedFilters.slug = slug;
597
- }
598
- params = {
599
- populate: 'deep,6',
600
- locale: locale,
601
- 'pagination[pageSize]': STRAPI_DEFAULT_PAGE_SIZE,
602
- filters: enrichedFilters
603
- };
604
- if (preview) {
605
- params.publicationState = 'preview';
606
- }
607
- return _context.abrupt("return", strapiClient.get(path, {
608
- params: params,
609
- cache: cache
610
- }));
611
- case 7:
612
- case "end":
613
- return _context.stop();
614
- }
615
- }, _callee);
616
- }));
617
- return function getStaticPropsFromStrapi(_x, _x2) {
618
- return _ref2.apply(this, arguments);
619
- };
620
- }();
621
-
622
556
  var getStrapiCollectionType = /*#__PURE__*/function () {
623
557
  var _ref2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(path, key, _ref) {
624
558
  var _ref$locale, locale, _ref$preview, preview, _ref$filters, filters, cache, params, _yield$strapiClient$g, data, localizedResponses, fallbackResponses, responses;
@@ -5841,8 +5775,6 @@ exports.SEOTags = SEOTags;
5841
5775
  exports.SliceRenderer = SliceRenderer;
5842
5776
  exports.getAllSlugsFromStrapi = getAllSlugsFromStrapi;
5843
5777
  exports.getPortfolioProjects = getPortfolioProjects;
5844
- exports.getStaticPathsFromStrapi = getStaticPathsFromStrapi;
5845
- exports.getStaticPropsFromStrapi = getStaticPropsFromStrapi;
5846
5778
  exports.getStrapiCollectionType = getStrapiCollectionType;
5847
5779
  exports.getStrapiSingleType = getStrapiSingleType;
5848
5780
  exports.mergeGlobalAndStrapiBlogPostData = mergeGlobalAndStrapiBlogPostData;