@propeller-commerce/propeller-v2-react-ui 0.20.1 → 0.22.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/CHANGELOG.md +101 -0
- package/dist/index.cjs +108 -53
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +592 -525
- package/dist/index.d.ts +592 -525
- package/dist/index.js +110 -55
- package/dist/index.js.map +1 -1
- package/dist/pure.cjs +6 -14
- package/dist/pure.cjs.map +1 -1
- package/dist/pure.d.cts +12 -0
- package/dist/pure.d.ts +12 -0
- package/dist/pure.js +7 -15
- package/dist/pure.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +2 -2
package/dist/pure.cjs
CHANGED
|
@@ -635,7 +635,7 @@ function OrderTotals(props) {
|
|
|
635
635
|
var OrderTotals_default = OrderTotals;
|
|
636
636
|
function ProductBulkPrices(props) {
|
|
637
637
|
const includeTax = !!props.includeTax;
|
|
638
|
-
const isHidden = propellerV2CoreUi.isContentHidden(props.portalMode, props.user);
|
|
638
|
+
const isHidden = propellerV2CoreUi.isContentHidden(props.portalMode, props.user, props.isAuthenticated);
|
|
639
639
|
function getTierQuantity(tier) {
|
|
640
640
|
const discount = tier.discount;
|
|
641
641
|
return discount?.quantityFrom ?? tier.quantity ?? null;
|
|
@@ -737,14 +737,10 @@ function ProductDownloads(props) {
|
|
|
737
737
|
const hasItems = items.length > 0;
|
|
738
738
|
const lang = props.language || "NL";
|
|
739
739
|
function getDocumentUrl(doc) {
|
|
740
|
-
|
|
741
|
-
const match = docs.find((d) => d.language === lang);
|
|
742
|
-
return match?.originalUrl || docs?.[0]?.originalUrl || "";
|
|
740
|
+
return propellerV2CoreUi.resolveLanguageEntry(doc.documents, lang)?.originalUrl || "";
|
|
743
741
|
}
|
|
744
742
|
function getDocumentName(doc) {
|
|
745
|
-
|
|
746
|
-
const match = alts.find((a) => a.language === lang);
|
|
747
|
-
return match?.value || alts?.[0]?.value || "Download";
|
|
743
|
+
return propellerV2CoreUi.getLanguageString(doc.alt, lang, "Download");
|
|
748
744
|
}
|
|
749
745
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn(`propeller-product-downloads ${props.className || ""}`), children: [
|
|
750
746
|
hasItems ? /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "propeller-product-downloads__title text-base font-semibold text-foreground mb-3", children: propellerV2CoreUi.getLabel(props.labels, "title", "Downloads") }) : null,
|
|
@@ -802,7 +798,7 @@ function ProductDownloads(props) {
|
|
|
802
798
|
var ProductDownloads_default = ProductDownloads;
|
|
803
799
|
function ProductPriceDisplay(props) {
|
|
804
800
|
function isHidden() {
|
|
805
|
-
return propellerV2CoreUi.isContentHidden(props.portalMode, props.user);
|
|
801
|
+
return propellerV2CoreUi.isContentHidden(props.portalMode, props.user, props.isAuthenticated);
|
|
806
802
|
}
|
|
807
803
|
function formatPrice5(value) {
|
|
808
804
|
if (value === null || value === void 0) return "";
|
|
@@ -893,14 +889,10 @@ function ProductVideos(props) {
|
|
|
893
889
|
const hasItems = items.length > 0;
|
|
894
890
|
const lang = props.language || "NL";
|
|
895
891
|
function getVideoUri(video) {
|
|
896
|
-
|
|
897
|
-
const match = vids.find((v) => v.language === lang);
|
|
898
|
-
return match?.uri || vids?.[0]?.uri || "";
|
|
892
|
+
return propellerV2CoreUi.getLanguageUri(video.videos, lang, "");
|
|
899
893
|
}
|
|
900
894
|
function getVideoTitle(video) {
|
|
901
|
-
|
|
902
|
-
const match = alts.find((a) => a.language === lang);
|
|
903
|
-
return match?.value || alts?.[0]?.value || "Video";
|
|
895
|
+
return propellerV2CoreUi.getLanguageString(video.alt, lang, "Video");
|
|
904
896
|
}
|
|
905
897
|
function isEmbeddable(uri) {
|
|
906
898
|
return uri.includes("youtube.com") || uri.includes("youtu.be") || uri.includes("vimeo.com");
|