@pixelated-tech/components 3.1.4
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 +231 -0
- package/dist/components/buzzwordbingo/buzzwordbingo.css +42 -0
- package/dist/components/buzzwordbingo/buzzwordbingo.js +35 -0
- package/dist/components/callout/callout.js +95 -0
- package/dist/components/callout/callout.scss +331 -0
- package/dist/components/carousel/carousel.css +178 -0
- package/dist/components/carousel/carousel.drag.js +203 -0
- package/dist/components/carousel/carousel.js +124 -0
- package/dist/components/cms/calendly.js +20 -0
- package/dist/components/cms/cloudinary.image.js +132 -0
- package/dist/components/cms/cloudinary.js +106 -0
- package/dist/components/cms/contentful.delivery.js +247 -0
- package/dist/components/cms/contentful.items.components.js +243 -0
- package/dist/components/cms/contentful.items.css +131 -0
- package/dist/components/cms/contentful.management.js +254 -0
- package/dist/components/cms/flickr.js +160 -0
- package/dist/components/cms/google.reviews.components.js +36 -0
- package/dist/components/cms/google.reviews.functions.js +26 -0
- package/dist/components/cms/gravatar.components.js +41 -0
- package/dist/components/cms/gravatar.functions.js +52 -0
- package/dist/components/cms/hubspot.components.js +45 -0
- package/dist/components/cms/hubspot.js +34 -0
- package/dist/components/cms/instagram.components.js +40 -0
- package/dist/components/cms/instagram.functions.js +67 -0
- package/dist/components/cms/wordpress.components.js +47 -0
- package/dist/components/cms/wordpress.css +55 -0
- package/dist/components/cms/wordpress.functions.js +49 -0
- package/dist/components/config/config.client.js +22 -0
- package/dist/components/config/config.example.js +70 -0
- package/dist/components/config/config.js +53 -0
- package/dist/components/config/config.server.js +11 -0
- package/dist/components/config/config.types.js +2 -0
- package/dist/components/general/css.js +60 -0
- package/dist/components/general/headers.css +16 -0
- package/dist/components/general/headers.js +27 -0
- package/dist/components/general/image.js +81 -0
- package/dist/components/general/layout.js +147 -0
- package/dist/components/general/layout.scss +47 -0
- package/dist/components/general/loading.js +36 -0
- package/dist/components/general/loading.scss +80 -0
- package/dist/components/general/microinteractions.css +229 -0
- package/dist/components/general/microinteractions.js +87 -0
- package/dist/components/general/modal.css +65 -0
- package/dist/components/general/modal.js +52 -0
- package/dist/components/general/table.css +73 -0
- package/dist/components/general/table.js +108 -0
- package/dist/components/linkedin/pixelated.linkedin.js +180 -0
- package/dist/components/linkedin/pixelated.linkedin1.js +102 -0
- package/dist/components/linkedin/pixelated.linkedin2.js +92 -0
- package/dist/components/markdown/markdown.css +12 -0
- package/dist/components/markdown/markdown.js +39 -0
- package/dist/components/menu/menu-accordion.css +198 -0
- package/dist/components/menu/menu-accordion.js +183 -0
- package/dist/components/menu/menu-expando.css +127 -0
- package/dist/components/menu/menu-expando.js +48 -0
- package/dist/components/menu/menu-simple.css +76 -0
- package/dist/components/menu/menu-simple.js +56 -0
- package/dist/components/nerdjoke/nerdjoke.css +69 -0
- package/dist/components/nerdjoke/nerdjoke.js +95 -0
- package/dist/components/pagebuilder/components/ComponentPropertiesForm.js +15 -0
- package/dist/components/pagebuilder/components/ComponentSelector.js +67 -0
- package/dist/components/pagebuilder/components/ComponentTree.js +95 -0
- package/dist/components/pagebuilder/components/PageBuilderUI.js +48 -0
- package/dist/components/pagebuilder/components/PageEngine.js +97 -0
- package/dist/components/pagebuilder/components/SaveLoadSection.js +168 -0
- package/dist/components/pagebuilder/components/pagebuilder.scss +123 -0
- package/dist/components/pagebuilder/form/form.css +101 -0
- package/dist/components/pagebuilder/form/form.js +455 -0
- package/dist/components/pagebuilder/form/form.submit.js +65 -0
- package/dist/components/pagebuilder/form/formcomponents.js +359 -0
- package/dist/components/pagebuilder/form/formvalidations.js +80 -0
- package/dist/components/pagebuilder/lib/componentGeneration.js +105 -0
- package/dist/components/pagebuilder/lib/componentMap.js +32 -0
- package/dist/components/pagebuilder/lib/componentMetadata.js +146 -0
- package/dist/components/pagebuilder/lib/pageStorageContentful.js +142 -0
- package/dist/components/pagebuilder/lib/pageStorageLocal.js +143 -0
- package/dist/components/pagebuilder/lib/pageStorageTypes.js +1 -0
- package/dist/components/pagebuilder/lib/propTypeIntrospection.js +177 -0
- package/dist/components/pagebuilder/lib/types.js +4 -0
- package/dist/components/pagebuilder/lib/usePageBuilder.js +234 -0
- package/dist/components/recipe/recipe.css +107 -0
- package/dist/components/recipe/recipe.js +161 -0
- package/dist/components/resume/resume.css +162 -0
- package/dist/components/resume/resume.js +195 -0
- package/dist/components/seo/404.css +25 -0
- package/dist/components/seo/404.js +32 -0
- package/dist/components/seo/googleanalytics.js +70 -0
- package/dist/components/seo/googlemap.js +15 -0
- package/dist/components/seo/googlesearch.css +30 -0
- package/dist/components/seo/googlesearch.js +37 -0
- package/dist/components/seo/metadata.js +156 -0
- package/dist/components/seo/sitemap.js +171 -0
- package/dist/components/shoppingcart/ebay.components.js +203 -0
- package/dist/components/shoppingcart/ebay.css +131 -0
- package/dist/components/shoppingcart/ebay.functions.js +240 -0
- package/dist/components/shoppingcart/paypal.js +169 -0
- package/dist/components/shoppingcart/shoppingcart.components.js +257 -0
- package/dist/components/shoppingcart/shoppingcart.css +122 -0
- package/dist/components/shoppingcart/shoppingcart.functions.js +324 -0
- package/dist/components/sidepanel/sidepanel.css +129 -0
- package/dist/components/sidepanel/sidepanel.js +54 -0
- package/dist/components/socialcard/socialcard.css +118 -0
- package/dist/components/socialcard/socialcard.js +317 -0
- package/dist/components/tiles/tiles.css +77 -0
- package/dist/components/tiles/tiles.js +38 -0
- package/dist/components/timeline/timeline.css +139 -0
- package/dist/components/timeline/timeline.js +28 -0
- package/dist/components/utilities/api.js +36 -0
- package/dist/components/utilities/functions.js +98 -0
- package/dist/components/yelp/yelp.js +50 -0
- package/dist/css/pixelated.font.scss +68 -0
- package/dist/css/pixelated.global.css +548 -0
- package/dist/css/pixelated.grid.scss +82 -0
- package/dist/data/404-data.json +104 -0
- package/dist/data/buzzwords.js +28 -0
- package/dist/data/form.json +370 -0
- package/dist/data/recipes.json +1917 -0
- package/dist/data/references.json +139 -0
- package/dist/data/requests.json +137 -0
- package/dist/data/resume.json +2577 -0
- package/dist/data/routes.json +184 -0
- package/dist/data/routes2.json +117 -0
- package/dist/data/shipping.to.json +422 -0
- package/dist/index.js +78 -0
- package/dist/index.server.js +35 -0
- package/dist/types/components/buzzwordbingo/buzzwordbingo.d.ts +26 -0
- package/dist/types/components/buzzwordbingo/buzzwordbingo.d.ts.map +1 -0
- package/dist/types/components/callout/callout.d.ts +53 -0
- package/dist/types/components/callout/callout.d.ts.map +1 -0
- package/dist/types/components/carousel/carousel.d.ts +28 -0
- package/dist/types/components/carousel/carousel.d.ts.map +1 -0
- package/dist/types/components/carousel/carousel.drag.d.ts +12 -0
- package/dist/types/components/carousel/carousel.drag.d.ts.map +1 -0
- package/dist/types/components/cms/calendly.d.ts +11 -0
- package/dist/types/components/cms/calendly.d.ts.map +1 -0
- package/dist/types/components/cms/cloudinary.d.ts +27 -0
- package/dist/types/components/cms/cloudinary.d.ts.map +1 -0
- package/dist/types/components/cms/cloudinary.image.d.ts +56 -0
- package/dist/types/components/cms/cloudinary.image.d.ts.map +1 -0
- package/dist/types/components/cms/contentful.delivery.d.ts +149 -0
- package/dist/types/components/cms/contentful.delivery.d.ts.map +1 -0
- package/dist/types/components/cms/contentful.items.components.d.ts +38 -0
- package/dist/types/components/cms/contentful.items.components.d.ts.map +1 -0
- package/dist/types/components/cms/contentful.management.d.ts +71 -0
- package/dist/types/components/cms/contentful.management.d.ts.map +1 -0
- package/dist/types/components/cms/flickr.d.ts +39 -0
- package/dist/types/components/cms/flickr.d.ts.map +1 -0
- package/dist/types/components/cms/google.reviews.components.d.ts +7 -0
- package/dist/types/components/cms/google.reviews.components.d.ts.map +1 -0
- package/dist/types/components/cms/google.reviews.functions.d.ts +25 -0
- package/dist/types/components/cms/google.reviews.functions.d.ts.map +1 -0
- package/dist/types/components/cms/gravatar.components.d.ts +26 -0
- package/dist/types/components/cms/gravatar.components.d.ts.map +1 -0
- package/dist/types/components/cms/gravatar.functions.d.ts +53 -0
- package/dist/types/components/cms/gravatar.functions.d.ts.map +1 -0
- package/dist/types/components/cms/hubspot.components.d.ts +15 -0
- package/dist/types/components/cms/hubspot.components.d.ts.map +1 -0
- package/dist/types/components/cms/hubspot.d.ts +18 -0
- package/dist/types/components/cms/hubspot.d.ts.map +1 -0
- package/dist/types/components/cms/instagram.components.d.ts +10 -0
- package/dist/types/components/cms/instagram.components.d.ts.map +1 -0
- package/dist/types/components/cms/instagram.functions.d.ts +63 -0
- package/dist/types/components/cms/instagram.functions.d.ts.map +1 -0
- package/dist/types/components/cms/wordpress.components.d.ts +11 -0
- package/dist/types/components/cms/wordpress.components.d.ts.map +1 -0
- package/dist/types/components/cms/wordpress.functions.d.ts +28 -0
- package/dist/types/components/cms/wordpress.functions.d.ts.map +1 -0
- package/dist/types/components/config/config.client.d.ts +13 -0
- package/dist/types/components/config/config.client.d.ts.map +1 -0
- package/dist/types/components/config/config.d.ts +12 -0
- package/dist/types/components/config/config.d.ts.map +1 -0
- package/dist/types/components/config/config.example.d.ts +4 -0
- package/dist/types/components/config/config.example.d.ts.map +1 -0
- package/dist/types/components/config/config.server.d.ts +7 -0
- package/dist/types/components/config/config.server.d.ts.map +1 -0
- package/dist/types/components/config/config.types.d.ts +84 -0
- package/dist/types/components/config/config.types.d.ts.map +1 -0
- package/dist/types/components/general/css.d.ts +3 -0
- package/dist/types/components/general/css.d.ts.map +1 -0
- package/dist/types/components/general/headers.d.ts +19 -0
- package/dist/types/components/general/headers.d.ts.map +1 -0
- package/dist/types/components/general/image.d.ts +3 -0
- package/dist/types/components/general/image.d.ts.map +1 -0
- package/dist/types/components/general/layout.d.ts +73 -0
- package/dist/types/components/general/layout.d.ts.map +1 -0
- package/dist/types/components/general/loading.d.ts +11 -0
- package/dist/types/components/general/loading.d.ts.map +1 -0
- package/dist/types/components/general/microinteractions.d.ts +20 -0
- package/dist/types/components/general/microinteractions.d.ts.map +1 -0
- package/dist/types/components/general/modal.d.ts +8 -0
- package/dist/types/components/general/modal.d.ts.map +1 -0
- package/dist/types/components/general/table.d.ts +12 -0
- package/dist/types/components/general/table.d.ts.map +1 -0
- package/dist/types/components/linkedin/pixelated.linkedin.d.ts +2 -0
- package/dist/types/components/linkedin/pixelated.linkedin.d.ts.map +1 -0
- package/dist/types/components/linkedin/pixelated.linkedin1.d.ts +2 -0
- package/dist/types/components/linkedin/pixelated.linkedin1.d.ts.map +1 -0
- package/dist/types/components/linkedin/pixelated.linkedin2.d.ts +2 -0
- package/dist/types/components/linkedin/pixelated.linkedin2.d.ts.map +1 -0
- package/dist/types/components/markdown/markdown.d.ts +12 -0
- package/dist/types/components/markdown/markdown.d.ts.map +1 -0
- package/dist/types/components/menu/menu-accordion.d.ts +44 -0
- package/dist/types/components/menu/menu-accordion.d.ts.map +1 -0
- package/dist/types/components/menu/menu-expando.d.ts +20 -0
- package/dist/types/components/menu/menu-expando.d.ts.map +1 -0
- package/dist/types/components/menu/menu-simple.d.ts +28 -0
- package/dist/types/components/menu/menu-simple.d.ts.map +1 -0
- package/dist/types/components/nerdjoke/nerdjoke.d.ts +23 -0
- package/dist/types/components/nerdjoke/nerdjoke.d.ts.map +1 -0
- package/dist/types/components/pagebuilder/components/ComponentPropertiesForm.d.ts +11 -0
- package/dist/types/components/pagebuilder/components/ComponentPropertiesForm.d.ts.map +1 -0
- package/dist/types/components/pagebuilder/components/ComponentSelector.d.ts +15 -0
- package/dist/types/components/pagebuilder/components/ComponentSelector.d.ts.map +1 -0
- package/dist/types/components/pagebuilder/components/ComponentTree.d.ts +17 -0
- package/dist/types/components/pagebuilder/components/ComponentTree.d.ts.map +1 -0
- package/dist/types/components/pagebuilder/components/PageBuilderUI.d.ts +10 -0
- package/dist/types/components/pagebuilder/components/PageBuilderUI.d.ts.map +1 -0
- package/dist/types/components/pagebuilder/components/PageEngine.d.ts +23 -0
- package/dist/types/components/pagebuilder/components/PageEngine.d.ts.map +1 -0
- package/dist/types/components/pagebuilder/components/SaveLoadSection.d.ts +12 -0
- package/dist/types/components/pagebuilder/components/SaveLoadSection.d.ts.map +1 -0
- package/dist/types/components/pagebuilder/form/form.d.ts +46 -0
- package/dist/types/components/pagebuilder/form/form.d.ts.map +1 -0
- package/dist/types/components/pagebuilder/form/form.submit.d.ts +3 -0
- package/dist/types/components/pagebuilder/form/form.submit.d.ts.map +1 -0
- package/dist/types/components/pagebuilder/form/formcomponents.d.ts +205 -0
- package/dist/types/components/pagebuilder/form/formcomponents.d.ts.map +1 -0
- package/dist/types/components/pagebuilder/form/formvalidations.d.ts +29 -0
- package/dist/types/components/pagebuilder/form/formvalidations.d.ts.map +1 -0
- package/dist/types/components/pagebuilder/lib/componentGeneration.d.ts +17 -0
- package/dist/types/components/pagebuilder/lib/componentGeneration.d.ts.map +1 -0
- package/dist/types/components/pagebuilder/lib/componentMap.d.ts +25 -0
- package/dist/types/components/pagebuilder/lib/componentMap.d.ts.map +1 -0
- package/dist/types/components/pagebuilder/lib/componentMetadata.d.ts +22 -0
- package/dist/types/components/pagebuilder/lib/componentMetadata.d.ts.map +1 -0
- package/dist/types/components/pagebuilder/lib/pageStorageContentful.d.ts +25 -0
- package/dist/types/components/pagebuilder/lib/pageStorageContentful.d.ts.map +1 -0
- package/dist/types/components/pagebuilder/lib/pageStorageLocal.d.ts +23 -0
- package/dist/types/components/pagebuilder/lib/pageStorageLocal.d.ts.map +1 -0
- package/dist/types/components/pagebuilder/lib/pageStorageTypes.d.ts +25 -0
- package/dist/types/components/pagebuilder/lib/pageStorageTypes.d.ts.map +1 -0
- package/dist/types/components/pagebuilder/lib/propTypeIntrospection.d.ts +24 -0
- package/dist/types/components/pagebuilder/lib/propTypeIntrospection.d.ts.map +1 -0
- package/dist/types/components/pagebuilder/lib/types.d.ts +34 -0
- package/dist/types/components/pagebuilder/lib/types.d.ts.map +1 -0
- package/dist/types/components/pagebuilder/lib/usePageBuilder.d.ts +24 -0
- package/dist/types/components/pagebuilder/lib/usePageBuilder.d.ts.map +1 -0
- package/dist/types/components/recipe/recipe.d.ts +66 -0
- package/dist/types/components/recipe/recipe.d.ts.map +1 -0
- package/dist/types/components/resume/resume.d.ts +85 -0
- package/dist/types/components/resume/resume.d.ts.map +1 -0
- package/dist/types/components/seo/404.d.ts +10 -0
- package/dist/types/components/seo/404.d.ts.map +1 -0
- package/dist/types/components/seo/googleanalytics.d.ts +23 -0
- package/dist/types/components/seo/googleanalytics.d.ts.map +1 -0
- package/dist/types/components/seo/googlemap.d.ts +15 -0
- package/dist/types/components/seo/googlemap.d.ts.map +1 -0
- package/dist/types/components/seo/googlesearch.d.ts +10 -0
- package/dist/types/components/seo/googlesearch.d.ts.map +1 -0
- package/dist/types/components/seo/metadata.d.ts +35 -0
- package/dist/types/components/seo/metadata.d.ts.map +1 -0
- package/dist/types/components/seo/sitemap.d.ts +47 -0
- package/dist/types/components/seo/sitemap.d.ts.map +1 -0
- package/dist/types/components/shoppingcart/ebay.components.d.ts +46 -0
- package/dist/types/components/shoppingcart/ebay.components.d.ts.map +1 -0
- package/dist/types/components/shoppingcart/ebay.functions.d.ts +76 -0
- package/dist/types/components/shoppingcart/ebay.functions.d.ts.map +1 -0
- package/dist/types/components/shoppingcart/paypal.d.ts +16 -0
- package/dist/types/components/shoppingcart/paypal.d.ts.map +1 -0
- package/dist/types/components/shoppingcart/shoppingcart.components.d.ts +35 -0
- package/dist/types/components/shoppingcart/shoppingcart.components.d.ts.map +1 -0
- package/dist/types/components/shoppingcart/shoppingcart.functions.d.ts +89 -0
- package/dist/types/components/shoppingcart/shoppingcart.functions.d.ts.map +1 -0
- package/dist/types/components/sidepanel/sidepanel.d.ts +18 -0
- package/dist/types/components/sidepanel/sidepanel.d.ts.map +1 -0
- package/dist/types/components/socialcard/socialcard.d.ts +20 -0
- package/dist/types/components/socialcard/socialcard.d.ts.map +1 -0
- package/dist/types/components/tiles/tiles.d.ts +28 -0
- package/dist/types/components/tiles/tiles.d.ts.map +1 -0
- package/dist/types/components/timeline/timeline.d.ts +31 -0
- package/dist/types/components/timeline/timeline.d.ts.map +1 -0
- package/dist/types/components/utilities/api.d.ts +16 -0
- package/dist/types/components/utilities/api.d.ts.map +1 -0
- package/dist/types/components/utilities/functions.d.ts +11 -0
- package/dist/types/components/utilities/functions.d.ts.map +1 -0
- package/dist/types/components/yelp/yelp.d.ts +5 -0
- package/dist/types/components/yelp/yelp.d.ts.map +1 -0
- package/dist/types/data/buzzwords.d.ts +2 -0
- package/dist/types/data/buzzwords.d.ts.map +1 -0
- package/dist/types/index.d.ts +76 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.server.d.ts +30 -0
- package/dist/types/index.server.d.ts.map +1 -0
- package/dist/types/stories/buzzword-bingo.stories.d.ts +13 -0
- package/dist/types/stories/buzzword-bingo.stories.d.ts.map +1 -0
- package/dist/types/stories/callout.many.stories.d.ts +8 -0
- package/dist/types/stories/callout.many.stories.d.ts.map +1 -0
- package/dist/types/stories/callout.stories.d.ts +69 -0
- package/dist/types/stories/callout.stories.d.ts.map +1 -0
- package/dist/types/stories/carousel-hero.stories.d.ts +22 -0
- package/dist/types/stories/carousel-hero.stories.d.ts.map +1 -0
- package/dist/types/stories/carousel-reviews.stories.d.ts +38 -0
- package/dist/types/stories/carousel-reviews.stories.d.ts.map +1 -0
- package/dist/types/stories/carousel-workportfolio.stories.d.ts +22 -0
- package/dist/types/stories/carousel-workportfolio.stories.d.ts.map +1 -0
- package/dist/types/stories/carousel.stories.d.ts +41 -0
- package/dist/types/stories/carousel.stories.d.ts.map +1 -0
- package/dist/types/stories/cms.contentful.item.stories.d.ts +21 -0
- package/dist/types/stories/cms.contentful.item.stories.d.ts.map +1 -0
- package/dist/types/stories/cms.contentful.items.stories.d.ts +20 -0
- package/dist/types/stories/cms.contentful.items.stories.d.ts.map +1 -0
- package/dist/types/stories/cms.contentful.stories.d.ts +9 -0
- package/dist/types/stories/cms.contentful.stories.d.ts.map +1 -0
- package/dist/types/stories/cms.google.reviews.stories.d.ts +11 -0
- package/dist/types/stories/cms.google.reviews.stories.d.ts.map +1 -0
- package/dist/types/stories/cms.gravatar.stories.d.ts +88 -0
- package/dist/types/stories/cms.gravatar.stories.d.ts.map +1 -0
- package/dist/types/stories/cms.instagram.stories.d.ts +16 -0
- package/dist/types/stories/cms.instagram.stories.d.ts.map +1 -0
- package/dist/types/stories/cms.wordpress.stories.d.ts +26 -0
- package/dist/types/stories/cms.wordpress.stories.d.ts.map +1 -0
- package/dist/types/stories/general.headers.stories.d.ts +27 -0
- package/dist/types/stories/general.headers.stories.d.ts.map +1 -0
- package/dist/types/stories/general.loading.stories.d.ts +11 -0
- package/dist/types/stories/general.loading.stories.d.ts.map +1 -0
- package/dist/types/stories/general.microinteractions.stories.d.ts +9 -0
- package/dist/types/stories/general.microinteractions.stories.d.ts.map +1 -0
- package/dist/types/stories/general.modal.stories.d.ts +9 -0
- package/dist/types/stories/general.modal.stories.d.ts.map +1 -0
- package/dist/types/stories/general.table.stories.d.ts +15 -0
- package/dist/types/stories/general.table.stories.d.ts.map +1 -0
- package/dist/types/stories/layout.stories.d.ts +299 -0
- package/dist/types/stories/layout.stories.d.ts.map +1 -0
- package/dist/types/stories/markdown.stories.d.ts +13 -0
- package/dist/types/stories/markdown.stories.d.ts.map +1 -0
- package/dist/types/stories/menu-accordion.stories.d.ts +34 -0
- package/dist/types/stories/menu-accordion.stories.d.ts.map +1 -0
- package/dist/types/stories/menu-simple.stories.d.ts +43 -0
- package/dist/types/stories/menu-simple.stories.d.ts.map +1 -0
- package/dist/types/stories/nerdjoke.stories.d.ts +10 -0
- package/dist/types/stories/nerdjoke.stories.d.ts.map +1 -0
- package/dist/types/stories/pagebuilder.form-builder.stories.d.ts +10 -0
- package/dist/types/stories/pagebuilder.form-builder.stories.d.ts.map +1 -0
- package/dist/types/stories/pagebuilder.form-engine.stories.d.ts +16 -0
- package/dist/types/stories/pagebuilder.form-engine.stories.d.ts.map +1 -0
- package/dist/types/stories/pagebuilder.form-extractor.stories.d.ts +10 -0
- package/dist/types/stories/pagebuilder.form-extractor.stories.d.ts.map +1 -0
- package/dist/types/stories/pagebuilder.stories.d.ts +29 -0
- package/dist/types/stories/pagebuilder.stories.d.ts.map +1 -0
- package/dist/types/stories/pagebuilder.usageguide.stories.d.ts +29 -0
- package/dist/types/stories/pagebuilder.usageguide.stories.d.ts.map +1 -0
- package/dist/types/stories/pageengine.stories.d.ts +32 -0
- package/dist/types/stories/pageengine.stories.d.ts.map +1 -0
- package/dist/types/stories/recipe.stories.d.ts +16 -0
- package/dist/types/stories/recipe.stories.d.ts.map +1 -0
- package/dist/types/stories/resume.stories.d.ts +283 -0
- package/dist/types/stories/resume.stories.d.ts.map +1 -0
- package/dist/types/stories/seo.404.stories.d.ts +18 -0
- package/dist/types/stories/seo.404.stories.d.ts.map +1 -0
- package/dist/types/stories/seo.googleanalytics.stories.d.ts +12 -0
- package/dist/types/stories/seo.googleanalytics.stories.d.ts.map +1 -0
- package/dist/types/stories/seo.googlesearch.stories.d.ts +12 -0
- package/dist/types/stories/seo.googlesearch.stories.d.ts.map +1 -0
- package/dist/types/stories/seo.metadata.stories.d.ts +25 -0
- package/dist/types/stories/seo.metadata.stories.d.ts.map +1 -0
- package/dist/types/stories/seo.sitemap.stories.d.ts +8 -0
- package/dist/types/stories/seo.sitemap.stories.d.ts.map +1 -0
- package/dist/types/stories/shoppingcart.ebay.item.stories.d.ts +21 -0
- package/dist/types/stories/shoppingcart.ebay.item.stories.d.ts.map +1 -0
- package/dist/types/stories/shoppingcart.ebay.items.stories.d.ts +21 -0
- package/dist/types/stories/shoppingcart.ebay.items.stories.d.ts.map +1 -0
- package/dist/types/stories/shoppingcart.stories.d.ts +9 -0
- package/dist/types/stories/shoppingcart.stories.d.ts.map +1 -0
- package/dist/types/stories/sidepanel.stories.d.ts +85 -0
- package/dist/types/stories/sidepanel.stories.d.ts.map +1 -0
- package/dist/types/stories/socialcard.stories.d.ts +81 -0
- package/dist/types/stories/socialcard.stories.d.ts.map +1 -0
- package/dist/types/stories/tiles.stories.d.ts +9 -0
- package/dist/types/stories/tiles.stories.d.ts.map +1 -0
- package/dist/types/stories/timeline.stories.d.ts +19 -0
- package/dist/types/stories/timeline.stories.d.ts.map +1 -0
- package/dist/types/tests/pixelated.api.test.d.ts +2 -0
- package/dist/types/tests/pixelated.api.test.d.ts.map +1 -0
- package/dist/types/tests/pixelated.callout.test.d.ts +2 -0
- package/dist/types/tests/pixelated.callout.test.d.ts.map +1 -0
- package/dist/types/tests/pixelated.carousel.test.d.ts +2 -0
- package/dist/types/tests/pixelated.carousel.test.d.ts.map +1 -0
- package/dist/types/tests/pixelated.menu-accordion.test.d.ts +2 -0
- package/dist/types/tests/pixelated.menu-accordion.test.d.ts.map +1 -0
- package/dist/types/tests/pixelated.menu-simple.test.d.ts +2 -0
- package/dist/types/tests/pixelated.menu-simple.test.d.ts.map +1 -0
- package/dist/types/tests/pixelated.nerdjoke.test.d.ts +2 -0
- package/dist/types/tests/pixelated.nerdjoke.test.d.ts.map +1 -0
- package/dist/types/tests/pixelated.recipe.test.d.ts +2 -0
- package/dist/types/tests/pixelated.recipe.test.d.ts.map +1 -0
- package/dist/types/tests/pixelated.resume.test.d.ts +2 -0
- package/dist/types/tests/pixelated.resume.test.d.ts.map +1 -0
- package/dist/types/tests/pixelated.socialcard.test.d.ts +2 -0
- package/dist/types/tests/pixelated.socialcard.test.d.ts.map +1 -0
- package/package.json +136 -0
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
import PropTypes from "prop-types";
|
|
2
|
+
import { getCloudinaryRemoteFetchURL as getImg } from "../cms/cloudinary";
|
|
3
|
+
const debug = false;
|
|
4
|
+
/* ===== EBAY BROWSE API DOCUMENTATION =====
|
|
5
|
+
https://developer.ebay.com/api-docs/buy/browse/resources/item_summary/methods/search
|
|
6
|
+
https://developer.ebay.com/api-docs/buy/static/ref-buy-browse-filters.html
|
|
7
|
+
https://developer.ebay.com/api-docs/static/oauth-ui-tokens.html
|
|
8
|
+
https://developer.ebay.com/my/keys
|
|
9
|
+
https://developer.ebay.com/my/auth?env=production&index=0
|
|
10
|
+
*/
|
|
11
|
+
// category : 0 : {categoryId: '79720', categoryName: 'Sunglasses'}
|
|
12
|
+
// category : 0 : {categoryId: '179241', categoryName: 'Accessories'}
|
|
13
|
+
// categoryId : "79720"
|
|
14
|
+
export const ebaySunglassCategory = '79720'; // Ebay Sunglasses Category
|
|
15
|
+
getShoppingCartItem.propTypes = {
|
|
16
|
+
thisItem: PropTypes.any.isRequired,
|
|
17
|
+
cloudinaryProductEnv: PropTypes.string,
|
|
18
|
+
};
|
|
19
|
+
export function getShoppingCartItem(props) {
|
|
20
|
+
let qty = 0;
|
|
21
|
+
const thisItem = props.thisItem;
|
|
22
|
+
if (thisItem.categoryId && thisItem.categoryId == ebaySunglassCategory) {
|
|
23
|
+
qty = 1;
|
|
24
|
+
}
|
|
25
|
+
else if (thisItem.categories[0].categoryId && thisItem.categories[0].categoryId == ebaySunglassCategory) {
|
|
26
|
+
qty = 1;
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
qty = 10;
|
|
30
|
+
}
|
|
31
|
+
const shoppingCartItem = {
|
|
32
|
+
itemImageURL: (thisItem.thumbnailImages && props.cloudinaryProductEnv)
|
|
33
|
+
? getImg({ url: thisItem.thumbnailImages[0].imageUrl, product_env: props.cloudinaryProductEnv })
|
|
34
|
+
: (thisItem.thumbnailImages)
|
|
35
|
+
? thisItem.thumbnailImages[0].imageUrl
|
|
36
|
+
: (thisItem.image && props.cloudinaryProductEnv)
|
|
37
|
+
? getImg({ url: thisItem.image.imageUrl, product_env: props.cloudinaryProductEnv })
|
|
38
|
+
: thisItem.image.imageUrl,
|
|
39
|
+
itemID: thisItem.legacyItemId,
|
|
40
|
+
itemURL: thisItem.itemWebUrl,
|
|
41
|
+
itemTitle: thisItem.title,
|
|
42
|
+
itemQuantity: qty,
|
|
43
|
+
itemCost: thisItem.price.value,
|
|
44
|
+
};
|
|
45
|
+
return shoppingCartItem;
|
|
46
|
+
}
|
|
47
|
+
/*
|
|
48
|
+
search tokenScope: 'https://api.ebay.com/oauth/api_scope',
|
|
49
|
+
item tokenScope: 'https://api.ebay.com/oauth/api_scope/buy.item.bulk',
|
|
50
|
+
getItem tokenScope: 'https://api.ebay.com/oauth/api_scope',
|
|
51
|
+
*/
|
|
52
|
+
export const defaultEbayProps = {
|
|
53
|
+
proxyURL: "https://proxy.pixelated.tech/prod/proxy?url=",
|
|
54
|
+
baseTokenURL: 'https://api.ebay.com/identity/v1/oauth2/token',
|
|
55
|
+
tokenScope: 'https://api.ebay.com/oauth/api_scope',
|
|
56
|
+
baseSearchURL: 'https://api.ebay.com/buy/browse/v1/item_summary/search',
|
|
57
|
+
qsSearchURL: '?q=sunglasses&fieldgroups=full&category_ids=79720&aspect_filter=categoryId:79720&filter=sellers:{pixelatedtech}&sort=newlyListed&limit=200',
|
|
58
|
+
baseItemURL: 'https://api.ebay.com/buy/browse/v1/item',
|
|
59
|
+
qsItemURL: '/v1|295959752403|0?fieldgroups=PRODUCT,ADDITIONAL_SELLER_DETAILS',
|
|
60
|
+
appId: 'BrianWha-Pixelate-PRD-1fb4458de-1a8431fe', // clientId
|
|
61
|
+
appCertId: 'PRD-fb4458deef01-0d54-496a-b572-a04b', // clientSecret
|
|
62
|
+
sbxAppId: 'BrianWha-Pixelate-SBX-ad482b6ae-8cb8fead', // Sandbox
|
|
63
|
+
sbxAppCertId: '',
|
|
64
|
+
globalId: 'EBAY-US',
|
|
65
|
+
};
|
|
66
|
+
/* ========== GET TOKEN ========== */
|
|
67
|
+
getEbayAppToken.propTypes = {
|
|
68
|
+
apiProps: PropTypes.object.isRequired,
|
|
69
|
+
};
|
|
70
|
+
export function getEbayAppToken(props) {
|
|
71
|
+
const apiProps = { ...defaultEbayProps, ...props.apiProps };
|
|
72
|
+
const fetchToken = async () => {
|
|
73
|
+
if (debug)
|
|
74
|
+
console.log("Fetching Token");
|
|
75
|
+
try {
|
|
76
|
+
const response = await fetch(apiProps.proxyURL + apiProps.baseTokenURL, {
|
|
77
|
+
method: 'POST',
|
|
78
|
+
headers: {
|
|
79
|
+
'Content-Type': 'application/x-www-form-urlencoded',
|
|
80
|
+
'Authorization': 'Basic ' + btoa(`${apiProps.appId}:${apiProps.appCertId}`) // Base64 encoded
|
|
81
|
+
},
|
|
82
|
+
body: new URLSearchParams({
|
|
83
|
+
grant_type: 'client_credentials',
|
|
84
|
+
scope: apiProps.tokenScope
|
|
85
|
+
})
|
|
86
|
+
});
|
|
87
|
+
if (!response.ok) {
|
|
88
|
+
throw new Error(`HTTP error! status: ${response.status}`);
|
|
89
|
+
}
|
|
90
|
+
const data = await response.json();
|
|
91
|
+
const accessToken = data.access_token;
|
|
92
|
+
if (debug)
|
|
93
|
+
console.log("Fetched eBay Access Token:", accessToken);
|
|
94
|
+
return accessToken;
|
|
95
|
+
}
|
|
96
|
+
catch (error) {
|
|
97
|
+
console.error('Error fetching token:', error);
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
return fetchToken();
|
|
101
|
+
}
|
|
102
|
+
/* ========== ITEM SEARCH ========== */
|
|
103
|
+
getEbayBrowseSearch.propTypes = {
|
|
104
|
+
apiProps: PropTypes.object.isRequired,
|
|
105
|
+
token: PropTypes.string.isRequired,
|
|
106
|
+
};
|
|
107
|
+
export function getEbayBrowseSearch(props) {
|
|
108
|
+
const apiProps = { ...defaultEbayProps, ...props.apiProps };
|
|
109
|
+
const fetchData = async (token) => {
|
|
110
|
+
if (debug)
|
|
111
|
+
console.log("Fetching ebay API Browse Search Data");
|
|
112
|
+
try {
|
|
113
|
+
const response = await fetch(apiProps.proxyURL + encodeURIComponent(apiProps.baseSearchURL + apiProps.qsSearchURL), {
|
|
114
|
+
method: 'GET',
|
|
115
|
+
headers: {
|
|
116
|
+
'Authorization': 'Bearer ' + token,
|
|
117
|
+
'X-EBAY-C-MARKETPLACE-ID': 'EBAY_US',
|
|
118
|
+
'X-EBAY-C-ENDUSERCTX': 'affiliateCampaignId=<ePNCampaignId>,affiliateReferenceId=<referenceId>',
|
|
119
|
+
'X-EBAY-SOA-SECURITY-APPNAME': 'BrianWha-Pixelate-PRD-1fb4458de-1a8431fe',
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
if (!response.ok) {
|
|
123
|
+
throw new Error(`HTTP error! status: ${response.status}`);
|
|
124
|
+
}
|
|
125
|
+
const data = await response.json();
|
|
126
|
+
if (debug)
|
|
127
|
+
console.log("Fetched eBay API Browse Search Data:", await data);
|
|
128
|
+
return (await data);
|
|
129
|
+
}
|
|
130
|
+
catch (error) {
|
|
131
|
+
console.error('Error fetching data:', error);
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
return fetchData(props.token);
|
|
135
|
+
}
|
|
136
|
+
/* ========== GET ITEM ========== */
|
|
137
|
+
getEbayBrowseItem.propTypes = {
|
|
138
|
+
apiProps: PropTypes.object.isRequired,
|
|
139
|
+
token: PropTypes.string.isRequired,
|
|
140
|
+
};
|
|
141
|
+
export function getEbayBrowseItem(props) {
|
|
142
|
+
const apiProps = { ...defaultEbayProps, ...props.apiProps };
|
|
143
|
+
const fetchData = async (token) => {
|
|
144
|
+
if (debug)
|
|
145
|
+
console.log("Fetching ebay API Browse Item Data");
|
|
146
|
+
try {
|
|
147
|
+
const response = await fetch(apiProps.proxyURL + encodeURIComponent((apiProps.baseItemURL ?? '') + (apiProps.qsItemURL ?? '')), {
|
|
148
|
+
method: 'GET',
|
|
149
|
+
headers: {
|
|
150
|
+
'Authorization': 'Bearer ' + token,
|
|
151
|
+
'X-EBAY-C-MARKETPLACE-ID': 'EBAY_US',
|
|
152
|
+
'X-EBAY-C-ENDUSERCTX': 'affiliateCampaignId=<ePNCampaignId>,affiliateReferenceId=<referenceId>',
|
|
153
|
+
'X-EBAY-SOA-SECURITY-APPNAME': 'BrianWha-Pixelate-PRD-1fb4458de-1a8431fe',
|
|
154
|
+
}
|
|
155
|
+
});
|
|
156
|
+
if (!response.ok) {
|
|
157
|
+
throw new Error(`HTTP error! status: ${response.status}`);
|
|
158
|
+
}
|
|
159
|
+
const data = await response.json();
|
|
160
|
+
if (debug)
|
|
161
|
+
console.log("Fetched eBay Item Data:", await data);
|
|
162
|
+
return (await data);
|
|
163
|
+
}
|
|
164
|
+
catch (error) {
|
|
165
|
+
console.error('Error fetching data:', error);
|
|
166
|
+
}
|
|
167
|
+
};
|
|
168
|
+
return fetchData(props.token);
|
|
169
|
+
}
|
|
170
|
+
/* ========== EXPORTED FUNCTIONS ========== */
|
|
171
|
+
/* ========== GET EBAY ITEMS ========== */
|
|
172
|
+
getEbayItems.propTypes = {
|
|
173
|
+
apiProps: PropTypes.object.isRequired,
|
|
174
|
+
};
|
|
175
|
+
export async function getEbayItems(props) {
|
|
176
|
+
const apiProps = { ...defaultEbayProps, ...props.apiProps };
|
|
177
|
+
try {
|
|
178
|
+
const response = await getEbayAppToken({ apiProps: apiProps });
|
|
179
|
+
if (debug)
|
|
180
|
+
console.log("eBay App Token Response:", response);
|
|
181
|
+
const data = await getEbayBrowseSearch({ apiProps: apiProps, token: response });
|
|
182
|
+
if (debug)
|
|
183
|
+
console.log("eBay Browse Search Data:", data);
|
|
184
|
+
return data;
|
|
185
|
+
}
|
|
186
|
+
catch (error) {
|
|
187
|
+
console.error("Failed to fetch eBay Items:", error);
|
|
188
|
+
}
|
|
189
|
+
// Return an empty object if there's an error
|
|
190
|
+
return {};
|
|
191
|
+
}
|
|
192
|
+
/* ========== GET EBAY ITEMS ========== */
|
|
193
|
+
getEbayItem.propTypes = {
|
|
194
|
+
apiProps: PropTypes.object.isRequired,
|
|
195
|
+
};
|
|
196
|
+
export async function getEbayItem(props) {
|
|
197
|
+
const apiProps = { ...defaultEbayProps, ...props.apiProps };
|
|
198
|
+
try {
|
|
199
|
+
const response = await getEbayAppToken({ apiProps: apiProps });
|
|
200
|
+
if (debug)
|
|
201
|
+
console.log("eBay App Token Response:", response);
|
|
202
|
+
const data = await getEbayBrowseItem({ apiProps: apiProps, token: response });
|
|
203
|
+
if (debug)
|
|
204
|
+
console.log("eBay Browse Item Data:", data);
|
|
205
|
+
return data;
|
|
206
|
+
}
|
|
207
|
+
catch (error) {
|
|
208
|
+
console.error("Failed to fetch eBay Items:", error);
|
|
209
|
+
}
|
|
210
|
+
// Return an empty object if there's an error
|
|
211
|
+
return {};
|
|
212
|
+
}
|
|
213
|
+
/* ========== ITEM SEARCH ========== */
|
|
214
|
+
export function getEbayItemsSearch(props) {
|
|
215
|
+
const apiProps = { ...defaultEbayProps, ...props.apiProps };
|
|
216
|
+
const fetchData = async (token) => {
|
|
217
|
+
if (debug)
|
|
218
|
+
console.log("Fetching ebay API Data");
|
|
219
|
+
try {
|
|
220
|
+
const response = await fetch(apiProps.proxyURL + encodeURIComponent(apiProps.baseSearchURL + apiProps.qsSearchURL), {
|
|
221
|
+
method: 'GET',
|
|
222
|
+
headers: {
|
|
223
|
+
'Authorization': 'Bearer ' + token,
|
|
224
|
+
'X-EBAY-C-MARKETPLACE-ID': 'EBAY_US',
|
|
225
|
+
'X-EBAY-C-ENDUSERCTX': 'affiliateCampaignId=<ePNCampaignId>,affiliateReferenceId=<referenceId>',
|
|
226
|
+
'X-EBAY-SOA-SECURITY-APPNAME': 'BrianWha-Pixelate-PRD-1fb4458de-1a8431fe',
|
|
227
|
+
}
|
|
228
|
+
});
|
|
229
|
+
if (!response.ok) {
|
|
230
|
+
throw new Error(`HTTP error! status: ${response.status}`);
|
|
231
|
+
}
|
|
232
|
+
const data = await response.json();
|
|
233
|
+
return data;
|
|
234
|
+
}
|
|
235
|
+
catch (error) {
|
|
236
|
+
console.error('Error fetching data:', error);
|
|
237
|
+
}
|
|
238
|
+
};
|
|
239
|
+
return fetchData(props.token);
|
|
240
|
+
}
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
// @ts-nocheck
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import ReactDOM from "react-dom";
|
|
6
|
+
import PropTypes from 'prop-types';
|
|
7
|
+
const debug = false;
|
|
8
|
+
function isScriptSrc(scriptSrc) {
|
|
9
|
+
const scripts = document.querySelectorAll('script[src]');
|
|
10
|
+
for (let i = 0; i < scripts.length; i++) {
|
|
11
|
+
if (scripts[i].src.includes(scriptSrc)) {
|
|
12
|
+
return true;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
return false;
|
|
16
|
+
}
|
|
17
|
+
/*
|
|
18
|
+
https://www.freecodecamp.org/news/integrate-paypal-into-html-css-js-product-pages/
|
|
19
|
+
https://dev.to/evansifyke/how-to-integrate-paypal-with-html-css-and-javascript-2mnb
|
|
20
|
+
*/
|
|
21
|
+
PayPal.PropTypes = {
|
|
22
|
+
payPalClientID: PropTypes.string.isRequired,
|
|
23
|
+
checkoutData: PropTypes.object.isRequired,
|
|
24
|
+
onApprove: PropTypes.func.isRequired
|
|
25
|
+
};
|
|
26
|
+
export function PayPal(props) {
|
|
27
|
+
const paypalScript = document.createElement('script');
|
|
28
|
+
paypalScript.src = `https://www.paypal.com/sdk/js?client-id=${props.payPalClientID}¤cy=USD&components=buttons&enable-funding=venmo,applepay,card&disable-funding=paylater`;
|
|
29
|
+
paypalScript.onload = () => {
|
|
30
|
+
if (window.paypal) {
|
|
31
|
+
// Now you can access paypal object within the window scope
|
|
32
|
+
const PayPalButton = paypal.Buttons.driver("react", {
|
|
33
|
+
React,
|
|
34
|
+
ReactDOM
|
|
35
|
+
});
|
|
36
|
+
initPayPalButton({ checkoutData: props.checkoutData, onApprove: props.onApprove });
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
if (!isScriptSrc('https://www.paypal.com/sdk/js')) {
|
|
40
|
+
document.head.appendChild(paypalScript);
|
|
41
|
+
}
|
|
42
|
+
return (_jsxs(_Fragment, { children: [_jsx("link", { rel: "stylesheet", type: "text/css", href: "https://www.paypalobjects.com/webstatic/en_US/developer/docs/css/cardfields.css" }), _jsx("div", { id: "paypal-button-container", className: "paypal-button-container" })] }));
|
|
43
|
+
}
|
|
44
|
+
export function initPayPalButton(props) {
|
|
45
|
+
window.paypal.Buttons({
|
|
46
|
+
style: {
|
|
47
|
+
shape: "rect",
|
|
48
|
+
color: "gold",
|
|
49
|
+
layout: "vertical",
|
|
50
|
+
label: "paypal",
|
|
51
|
+
},
|
|
52
|
+
createOrder: function (data, actions) {
|
|
53
|
+
// const userInput = document.getElementById("donate-amount").value;
|
|
54
|
+
// const paypalAmount = parseFloat(userInput) / 100;
|
|
55
|
+
const checkoutData = props.checkoutData;
|
|
56
|
+
const orderObject = {
|
|
57
|
+
"purchase_units": [
|
|
58
|
+
{
|
|
59
|
+
"amount": {
|
|
60
|
+
"currency_code": "USD",
|
|
61
|
+
"value": checkoutData.total,
|
|
62
|
+
"breakdown": {
|
|
63
|
+
"item_total": { "currency_code": "USD", "value": checkoutData.subtotal },
|
|
64
|
+
"shipping": { "currency_code": "USD", "value": checkoutData.shippingCost },
|
|
65
|
+
"handling": { "currency_code": "USD", "value": checkoutData.handlingFee },
|
|
66
|
+
"tax_total": { "currency_code": "USD", "value": checkoutData.salesTax },
|
|
67
|
+
// "insurance": { "currency_code": "USD", "value": checkoutData.insuranceCost },
|
|
68
|
+
// "shipping_discount": { "currency_code": "USD", "value": checkoutData.shippingDiscount },
|
|
69
|
+
"discount": { "currency_code": "USD", "value": checkoutData.subtotal_discount },
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
"items": checkoutData.items.map((item) => {
|
|
73
|
+
return ({
|
|
74
|
+
"name": item.itemID,
|
|
75
|
+
"quantity": item.itemQuantity.toString(),
|
|
76
|
+
"unit_amount": {
|
|
77
|
+
"currency_code": "USD",
|
|
78
|
+
"value": item.itemCost.toString(),
|
|
79
|
+
},
|
|
80
|
+
"description": item.itemTitle,
|
|
81
|
+
"category": "PHYSICAL_GOODS",
|
|
82
|
+
"url": item.itemURL,
|
|
83
|
+
});
|
|
84
|
+
}),
|
|
85
|
+
"shipping": {
|
|
86
|
+
"name": {
|
|
87
|
+
"full_name": checkoutData.shippingTo.name,
|
|
88
|
+
},
|
|
89
|
+
"address": {
|
|
90
|
+
"address_line_1": checkoutData.shippingTo.street1,
|
|
91
|
+
"address_line_2": "",
|
|
92
|
+
"admin_area_2": checkoutData.shippingTo.city,
|
|
93
|
+
"admin_area_1": checkoutData.shippingTo.state,
|
|
94
|
+
"postal_code": checkoutData.shippingTo.zip,
|
|
95
|
+
"country_code": checkoutData.shippingTo.country,
|
|
96
|
+
},
|
|
97
|
+
"email_address": checkoutData.shippingTo.email,
|
|
98
|
+
"phone": {
|
|
99
|
+
"phone_number": checkoutData.shippingTo.phone,
|
|
100
|
+
},
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
],
|
|
104
|
+
"payment_source": {
|
|
105
|
+
"paypal": {
|
|
106
|
+
"name": {
|
|
107
|
+
"given_name": checkoutData.shippingTo.name.split(' ').slice(0, -1).join(' '),
|
|
108
|
+
"surname": checkoutData.shippingTo.name.split(' ').slice(-1).join(' '),
|
|
109
|
+
},
|
|
110
|
+
"address": {
|
|
111
|
+
"address_line_1": checkoutData.shippingTo.street1,
|
|
112
|
+
"address_line_2": "",
|
|
113
|
+
"admin_area_2": checkoutData.shippingTo.city,
|
|
114
|
+
"admin_area_1": checkoutData.shippingTo.state,
|
|
115
|
+
"postal_code": checkoutData.shippingTo.zip,
|
|
116
|
+
"country_code": checkoutData.shippingTo.country,
|
|
117
|
+
},
|
|
118
|
+
"email_address": checkoutData.shippingTo.email,
|
|
119
|
+
"phone": {
|
|
120
|
+
"phone_type": "OTHER",
|
|
121
|
+
"phone_number": {
|
|
122
|
+
"national_number": checkoutData.shippingTo.phone.replace(/\D/g, ''),
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
"payment_method_preference": "IMMEDIATE_PAYMENT_REQUIRED",
|
|
126
|
+
"experience_context": {
|
|
127
|
+
// return_url: "https://example.com/returnUrl",
|
|
128
|
+
// cancel_url: "https://example.com/cancelUrl",
|
|
129
|
+
// "shipping_preference": "SET_FROM_PROVIDER"
|
|
130
|
+
"shipping_preference": "SET_PROVIDED_ADDRESS",
|
|
131
|
+
"user_action": "PAY_NOW" // or "CONTINUE"
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
return actions.order.create(orderObject);
|
|
137
|
+
},
|
|
138
|
+
onApprove: function (data, actions) {
|
|
139
|
+
return actions.order.capture().then(function (orderData) {
|
|
140
|
+
if (debug)
|
|
141
|
+
console.log("Capture result", orderData, JSON.stringify(orderData, null, 2));
|
|
142
|
+
props.onApprove({ data: orderData });
|
|
143
|
+
// Show a success message within this page, for example:
|
|
144
|
+
/* const element = document.getElementById("paypal-button-container");
|
|
145
|
+
if(element){
|
|
146
|
+
element.innerHTML = "";
|
|
147
|
+
element.innerHTML = "<h3>Thank you for your payment!</h3>";
|
|
148
|
+
} */
|
|
149
|
+
// Or go to another URL: actions.redirect('thank_you.html');
|
|
150
|
+
});
|
|
151
|
+
},
|
|
152
|
+
onError: function (err) {
|
|
153
|
+
console.log(err);
|
|
154
|
+
switch (e.toString()) {
|
|
155
|
+
case 'Error: Detected popup close':
|
|
156
|
+
showInfoBanner('PayPal Payment cancelled'); // Or handle as needed
|
|
157
|
+
break;
|
|
158
|
+
default:
|
|
159
|
+
showError('PayPal error');
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
onCancel: function (data) {
|
|
163
|
+
// Show a cancel page or return to cart
|
|
164
|
+
// For example, redirect the user to a cancellation page:
|
|
165
|
+
window.location.href = "/cart";
|
|
166
|
+
}
|
|
167
|
+
})
|
|
168
|
+
.render("#paypal-button-container");
|
|
169
|
+
}
|
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { useState, useEffect } from 'react';
|
|
4
|
+
import PropTypes from 'prop-types';
|
|
5
|
+
import { PayPal } from "./paypal";
|
|
6
|
+
import { CalloutHeader } from "../callout/callout";
|
|
7
|
+
import { FormEngine } from "../pagebuilder/form/form";
|
|
8
|
+
import { FormButton } from '../pagebuilder/form/formcomponents';
|
|
9
|
+
import { emailJSON } from "../pagebuilder/form/form.submit";
|
|
10
|
+
import '../pagebuilder/form/form.css';
|
|
11
|
+
import { MicroInteractions } from '../general/microinteractions';
|
|
12
|
+
import { Modal, handleModalOpen } from '../general/modal';
|
|
13
|
+
import { Table } from "../general/table";
|
|
14
|
+
import { getCart, getShippingInfo, SetShippingInfo, setDiscountCodes, getRemoteDiscountCodes, getCheckoutData, RemoveFromShoppingCart, ClearShoppingCart, formatAsUSD, getCartItemCount } from "./shoppingcart.functions";
|
|
15
|
+
import { usePixelatedConfig } from '../config/config.client';
|
|
16
|
+
import { SmartImage } from '../cms/cloudinary.image';
|
|
17
|
+
import shippingToData from "../../data/shipping.to.json";
|
|
18
|
+
import "./shoppingcart.css";
|
|
19
|
+
const debug = false;
|
|
20
|
+
/* ================================================ */
|
|
21
|
+
/* ========== SHOPPING CART UI COMPONENT ========== */
|
|
22
|
+
/* ================================================ */
|
|
23
|
+
export function ShoppingCart(props) {
|
|
24
|
+
const [shoppingCart, setShoppingCart] = useState();
|
|
25
|
+
const [shippingInfo, setShippingInfo] = useState();
|
|
26
|
+
const [checkoutInfo, setCheckoutInfo] = useState();
|
|
27
|
+
const [orderData, setOrderData] = useState();
|
|
28
|
+
const [progressStep, setProgressStep] = useState("EmptyCart");
|
|
29
|
+
function SetProgressStep(step) {
|
|
30
|
+
if (step) {
|
|
31
|
+
setProgressStep(step);
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
const hasShoppingCart = getCart().length > 0;
|
|
35
|
+
if (debug)
|
|
36
|
+
console.log("hasShoppingCart", hasShoppingCart);
|
|
37
|
+
const hasShippingInfo = Object.keys(getShippingInfo()).length > 0;
|
|
38
|
+
if (debug)
|
|
39
|
+
console.log("hasShippingInfo", hasShippingInfo);
|
|
40
|
+
const hasOrderData = orderData && orderData.length > 0;
|
|
41
|
+
if (debug)
|
|
42
|
+
console.log("hasOrderData", hasOrderData);
|
|
43
|
+
if (debug)
|
|
44
|
+
console.log(orderData?.length);
|
|
45
|
+
if (hasOrderData) {
|
|
46
|
+
setProgressStep("ThankYou");
|
|
47
|
+
}
|
|
48
|
+
else if (hasShippingInfo && hasShoppingCart) {
|
|
49
|
+
setProgressStep("Checkout");
|
|
50
|
+
}
|
|
51
|
+
else if (hasShoppingCart) {
|
|
52
|
+
setProgressStep("ShippingInfo");
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
setProgressStep("EmptyCart");
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
/* useEffect(() => {
|
|
60
|
+
// UPDATE LOCALSTORAGE IF SHOPPINGCART STATE CHANGES
|
|
61
|
+
setCart(shoppingCart ?? []);
|
|
62
|
+
}, [shoppingCart]); */
|
|
63
|
+
/* useEffect(() => {
|
|
64
|
+
// UPDATE LOCALSTORAGE IF SHIPPINGINFO STATE CHANGES
|
|
65
|
+
setShippingInfo(shippingInfo);
|
|
66
|
+
}, [shippingInfo]); */
|
|
67
|
+
useEffect(() => {
|
|
68
|
+
// UPDATE DISCOUNT CODES ON EACH PAGE LOAD
|
|
69
|
+
(async () => {
|
|
70
|
+
setDiscountCodes(await getRemoteDiscountCodes());
|
|
71
|
+
})();
|
|
72
|
+
// UPDATE SHOPPINGCART AND SHIPPINGINFO STATES IF LOCALSTORAGE CHANGES
|
|
73
|
+
function handleStorageChange() {
|
|
74
|
+
setShoppingCart(getCart());
|
|
75
|
+
setShippingInfo(getShippingInfo());
|
|
76
|
+
setCheckoutInfo(getCheckoutData());
|
|
77
|
+
SetProgressStep();
|
|
78
|
+
}
|
|
79
|
+
window.addEventListener('storage', handleStorageChange);
|
|
80
|
+
window.dispatchEvent(new Event('storage'));
|
|
81
|
+
return () => {
|
|
82
|
+
window.removeEventListener('storage', handleStorageChange);
|
|
83
|
+
};
|
|
84
|
+
}, []);
|
|
85
|
+
useEffect(() => {
|
|
86
|
+
// LOAD THE SHIPPING INFO FORM WITH VALUES IF SHIPPING INFO HAS ALREADY BEEN SAVED
|
|
87
|
+
const form = document.getElementById("address_to");
|
|
88
|
+
if (shippingInfo && form) {
|
|
89
|
+
for (const key in shippingInfo) {
|
|
90
|
+
const input = form.elements[key];
|
|
91
|
+
if (input) { // Check if the form element exists
|
|
92
|
+
input.value = shippingInfo[key].toString();
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}, [progressStep]);
|
|
97
|
+
paintCartItems.PropTypes = {
|
|
98
|
+
items: PropTypes.array.isRequired
|
|
99
|
+
};
|
|
100
|
+
function paintCartItems(items) {
|
|
101
|
+
if (debug)
|
|
102
|
+
console.log("Painting Shopping Cart Items");
|
|
103
|
+
let newItems = [];
|
|
104
|
+
for (let key in items) {
|
|
105
|
+
const myItem = items[key];
|
|
106
|
+
const newItem = _jsx(ShoppingCartItem, { item: myItem }, myItem.itemID);
|
|
107
|
+
newItems.push(newItem);
|
|
108
|
+
}
|
|
109
|
+
return newItems;
|
|
110
|
+
}
|
|
111
|
+
function onShippingSubmit( /* event: Event */) {
|
|
112
|
+
const formID = 'address_to';
|
|
113
|
+
const formElement = document.getElementById(formID);
|
|
114
|
+
const formData = new FormData(formElement);
|
|
115
|
+
const formObject = Object.fromEntries(formData);
|
|
116
|
+
SetShippingInfo(formObject);
|
|
117
|
+
}
|
|
118
|
+
handleOnApprove.propTypes = {
|
|
119
|
+
data: PropTypes.object.isRequired
|
|
120
|
+
};
|
|
121
|
+
function handleOnApprove(props) {
|
|
122
|
+
if (debug)
|
|
123
|
+
console.log("Handling onApprove");
|
|
124
|
+
// eslint-disable-next-line react/prop-types
|
|
125
|
+
setOrderData(props.data);
|
|
126
|
+
ClearShoppingCart();
|
|
127
|
+
// SetProgressStep();
|
|
128
|
+
SetProgressStep("ThankYou");
|
|
129
|
+
}
|
|
130
|
+
if (progressStep === "ThankYou") {
|
|
131
|
+
// ========== SENDMAIL ==========
|
|
132
|
+
const json = {
|
|
133
|
+
'to': 'brian@pixelvivid.com',
|
|
134
|
+
'from': 'brian@pixelvivid.com',
|
|
135
|
+
'subject': 'PixelVivid Purchase',
|
|
136
|
+
'orderData': JSON.stringify(orderData, null, 2),
|
|
137
|
+
};
|
|
138
|
+
const sendMailResponse = emailJSON(json);
|
|
139
|
+
console.log("SendMail Response:", sendMailResponse);
|
|
140
|
+
// ========== THANK YOU ==========
|
|
141
|
+
const pmt = orderData.purchase_units[0].payments.captures[0];
|
|
142
|
+
return (_jsxs("div", { className: "pixCart", children: [_jsx(CalloutHeader, { title: "Shopping Cart : " }), _jsx("br", {}), _jsx("div", { id: "paypal-button-container", className: "paypal-button-container" }), _jsxs("div", { children: [_jsx("h3", { children: "Thank you for your payment!" }), "Payment ID : ", pmt.id, " ", _jsx("br", {}), "Status : ", pmt.status, " ", _jsx("br", {}), "Amount : $", pmt.amount.value + " " + pmt.amount.currency_code, " ", _jsx("br", {}), "Created : ", pmt.create_time, " ", _jsx("br", {})] })] }));
|
|
143
|
+
}
|
|
144
|
+
else if (progressStep === "Checkout") {
|
|
145
|
+
// ========== CHECKOUT ==========
|
|
146
|
+
return (_jsxs("div", { className: "pixCart", children: [_jsx(CalloutHeader, { title: "Checkout Summary : " }), checkoutInfo && _jsx(CheckoutItems, { checkoutData: checkoutInfo }), _jsx("br", {}), _jsx(FormButton, { className: "pixCartButton", type: "button", id: "backToCart", text: "<= Back To Cart", onClick: () => SetProgressStep("ShippingInfo") }), _jsx("br", {}), _jsx(PayPal, { payPalClientID: props.payPalClientID, checkoutData: getCheckoutData(), onApprove: handleOnApprove })] }));
|
|
147
|
+
}
|
|
148
|
+
else if (progressStep === "ShippingInfo") {
|
|
149
|
+
// ========== SHOPPING CART ==========
|
|
150
|
+
// ========== SHIPPING INFO ==========
|
|
151
|
+
return (_jsxs("div", { className: "pixCart", children: [_jsx(CalloutHeader, { title: "Shopping Cart : " }), paintCartItems(shoppingCart ?? []), _jsx("br", {}), _jsx("div", { children: _jsx(FormButton, { className: "pixCartButton", type: "button", id: "backToCart", text: "Clear Cart", onClick: () => ClearShoppingCart() }) }), _jsx("br", {}), _jsx("br", {}), _jsx("hr", {}), _jsx("br", {}), _jsx("br", {}), _jsxs("div", { children: [_jsx(CalloutHeader, { title: "Shipping To : " }), _jsx(FormEngine, { name: "address_to", id: "address_to", formData: shippingToData, onSubmitHandler: onShippingSubmit })] })] }));
|
|
152
|
+
}
|
|
153
|
+
else {
|
|
154
|
+
// ========== EMPTY SHOPPING CART ==========
|
|
155
|
+
return (_jsxs("div", { className: "pixCart", children: [_jsx(CalloutHeader, { title: "Shopping Cart : " }), _jsx("br", {}), _jsx("div", { className: "centered", children: "No items in your shopping cart" }), _jsx("div", { id: "paypal-button-container", className: "paypal-button-container" })] }));
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
ShoppingCartItem.PropTypes = {
|
|
159
|
+
item: PropTypes.object.isRequired
|
|
160
|
+
};
|
|
161
|
+
export function ShoppingCartItem(props) {
|
|
162
|
+
const thisItem = props.item;
|
|
163
|
+
const thisItemTarget = "_self"; // "_blank"
|
|
164
|
+
const config = usePixelatedConfig();
|
|
165
|
+
return (_jsxs("div", { className: "pixCartItem row-12col", children: [_jsx("div", { className: "pixCartItemPhoto grid-s1-e4", children: thisItem.itemURL && thisItem.itemImageURL
|
|
166
|
+
? _jsx("a", { href: thisItem.itemURL, target: thisItemTarget, rel: "noopener noreferrer", children: _jsx("img", { src: thisItem.itemImageURL, alt: thisItem.itemTitle }) })
|
|
167
|
+
: thisItem.itemImageURL
|
|
168
|
+
? (
|
|
169
|
+
/* <img src={thisItem.itemImageURL} title={thisItem.itemTitle} alt={thisItem.itemTitle} /> */
|
|
170
|
+
_jsx(SmartImage, { src: thisItem.itemImageURL, title: thisItem.itemTitle, alt: thisItem.itemTitle, cloudinaryEnv: config?.cloudinary?.product_env, cloudinaryDomain: config?.cloudinary?.baseUrl, cloudinaryTransforms: config?.cloudinary?.transforms }))
|
|
171
|
+
: _jsx(_Fragment, {}) }), _jsxs("div", { className: "grid-s4-e11", children: [_jsx("div", { className: "pixCartItemHeader", children: _jsx("span", { children: thisItem.itemURL
|
|
172
|
+
? _jsx("a", { href: thisItem.itemURL, target: thisItemTarget, rel: "noopener noreferrer", children: _jsx("h2", { className: "", children: thisItem.itemTitle }) })
|
|
173
|
+
: _jsx("h2", { className: "", children: thisItem.itemTitle }) }) }), _jsxs("div", { className: "pixCartItemDetails grid12", children: [_jsx("br", {}), _jsxs("div", { children: [_jsx("b", { children: "Item ID: " }), thisItem.itemID] }), _jsxs("div", { children: [_jsx("b", { children: "Quantity: " }), thisItem.itemQuantity] }), _jsx("br", {}), _jsx("div", { children: _jsx(FormButton, { className: "pixCartButton", type: "button", id: `btn-rm-${thisItem.itemID}`, text: "Remove Item From Cart", onClick: () => RemoveFromShoppingCart(thisItem) }) })] })] }), _jsx("div", { className: "grid-s11-e13", children: _jsx("div", { className: "pixCartItemPrice", children: formatAsUSD(thisItem.itemCost) }) })] }));
|
|
174
|
+
}
|
|
175
|
+
export function CheckoutItems(props) {
|
|
176
|
+
const items = props.checkoutData.items.map((item) => (_jsxs("div", { children: [item.itemQuantity, " X - ", item.itemTitle, " ( ", formatAsUSD(item.itemCost), " )"] }, item.itemID)));
|
|
177
|
+
const to = props.checkoutData.shippingTo;
|
|
178
|
+
const addr = _jsxs(_Fragment, { children: [_jsx("div", { children: to.name }), _jsx("div", { children: to.street1 }), _jsxs("div", { children: [to.city, ", ", to.state, " ", to.zip] })] });
|
|
179
|
+
let checkoutTableData = [{
|
|
180
|
+
"Name": "Shopping Cart Items : ",
|
|
181
|
+
"Value": items,
|
|
182
|
+
}, {
|
|
183
|
+
"Name": "Subtotal Discount : ",
|
|
184
|
+
"Value": formatAsUSD(props.checkoutData.subtotal_discount),
|
|
185
|
+
}, {
|
|
186
|
+
"Name": "Subtotal : ",
|
|
187
|
+
"Value": formatAsUSD(props.checkoutData.subtotal),
|
|
188
|
+
}, {
|
|
189
|
+
"Name": "Shipping Address : ",
|
|
190
|
+
"Value": addr,
|
|
191
|
+
}, {
|
|
192
|
+
"Name": "Shipping Cost : ",
|
|
193
|
+
"Value": formatAsUSD(props.checkoutData.shippingCost),
|
|
194
|
+
}, {
|
|
195
|
+
"Name": "Handling Fee : ",
|
|
196
|
+
"Value": formatAsUSD(props.checkoutData.handlingFee),
|
|
197
|
+
}, /* {
|
|
198
|
+
"Name": "Insurance Cost : ",
|
|
199
|
+
"Value": formatAsUSD(checkoutData.insuranceCost ?? 0),
|
|
200
|
+
}, */ /* {
|
|
201
|
+
"Name": "Shipping Discount : ",
|
|
202
|
+
"Value": formatAsUSD(checkoutData.shipping_discount ?? 0),
|
|
203
|
+
}, */
|
|
204
|
+
{
|
|
205
|
+
"Name": "Sales Tax : ",
|
|
206
|
+
"Value": formatAsUSD(props.checkoutData.salesTax),
|
|
207
|
+
}, {
|
|
208
|
+
"Name": "TOTAL : ",
|
|
209
|
+
"Value": formatAsUSD(props.checkoutData.total),
|
|
210
|
+
}];
|
|
211
|
+
if (props.checkoutData.subtotal_discount == 0) {
|
|
212
|
+
checkoutTableData = checkoutTableData.filter(obj => obj.Name !== "Subtotal Discount : ");
|
|
213
|
+
}
|
|
214
|
+
return (_jsx(Table, { id: "pixCheckout", data: checkoutTableData }));
|
|
215
|
+
}
|
|
216
|
+
export function CartButton(props) {
|
|
217
|
+
const config = usePixelatedConfig();
|
|
218
|
+
const [cartCount, setCartCount] = useState(0);
|
|
219
|
+
useEffect(() => {
|
|
220
|
+
// UPDATE CARTCOUNT STATES IF LOCALSTORAGE CHANGES
|
|
221
|
+
function handleStorageChange() {
|
|
222
|
+
setCartCount(getCartItemCount(getCart()));
|
|
223
|
+
}
|
|
224
|
+
window.addEventListener('storage', handleStorageChange);
|
|
225
|
+
window.dispatchEvent(new Event('storage'));
|
|
226
|
+
return () => {
|
|
227
|
+
window.removeEventListener('storage', handleStorageChange);
|
|
228
|
+
};
|
|
229
|
+
}, []);
|
|
230
|
+
useEffect(() => {
|
|
231
|
+
if (cartCount && cartCount > 0) {
|
|
232
|
+
MicroInteractions({ cartpulse: true });
|
|
233
|
+
}
|
|
234
|
+
else {
|
|
235
|
+
MicroInteractions({ cartpulse: false });
|
|
236
|
+
}
|
|
237
|
+
}, [cartCount]);
|
|
238
|
+
return (_jsx("div", { className: "pixCart", children: _jsxs("button", { className: "pixCartButton", type: "button", id: "pixCartButton", onClick: () => window.location.href = props.href, children: [_jsx(SmartImage, { src: "/images/icons/cart-icon.png", title: "View Shopping Cart", alt: "View Shopping Cart", cloudinaryEnv: config?.cloudinary?.product_env, cloudinaryDomain: config?.cloudinary?.baseUrl, cloudinaryTransforms: config?.cloudinary?.transforms }), _jsxs("span", { children: ["\u00A0", `(${cartCount})`] })] }) }));
|
|
239
|
+
}
|
|
240
|
+
export function ViewItemDetails(props) {
|
|
241
|
+
return (_jsx("div", { children: _jsx(FormButton, { className: "pixCartButton", type: "button", id: `btn-item-${props.itemID}`, text: "View Item Details", onClick: () => window.location.href = `${props.href}/${props.itemID}` }) }));
|
|
242
|
+
}
|
|
243
|
+
export function AddToCartButton(props) {
|
|
244
|
+
const [modalContent, setModalContent] = useState();
|
|
245
|
+
useEffect(() => {
|
|
246
|
+
const myContent = _jsxs("div", { className: "centered", children: [_jsx("br", {}), _jsx("br", {}), "Item ", props.itemID, " has been added to your cart.", _jsx("br", {}), _jsx("br", {}), GoToCartButton({ href: "/cart", itemID: props.itemID }), _jsx("br", {}), _jsx("br", {})] });
|
|
247
|
+
setModalContent(myContent);
|
|
248
|
+
}, []);
|
|
249
|
+
function handleClick(e) {
|
|
250
|
+
props.handler(props.item);
|
|
251
|
+
handleModalOpen(e.nativeEvent, "-" + props.itemID);
|
|
252
|
+
}
|
|
253
|
+
return (_jsxs("div", { children: [_jsx(FormButton, { className: "pixCartButton", type: "button", id: `btn-add-${props.itemID}`, text: "Add to Shopping Cart", onClick: (e) => handleClick(e) }), _jsx(Modal, { modalContent: modalContent, modalID: "-" + props.itemID })] }));
|
|
254
|
+
}
|
|
255
|
+
export function GoToCartButton(props) {
|
|
256
|
+
return (_jsx("div", { children: _jsx(FormButton, { className: "pixCartButton", type: "button", id: `btn-cart-${props.itemID}`, text: "Go to Shopping Cart", onClick: () => window.location.href = props.href }) }));
|
|
257
|
+
}
|