arky-sdk 0.5.65 → 0.5.67
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.cjs +1 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -7
- package/dist/index.js.map +1 -1
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +22 -9
- package/dist/types.d.ts +22 -9
- package/dist/types.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -597,11 +597,8 @@ var createPromoCodeApi = (apiConfig) => {
|
|
|
597
597
|
};
|
|
598
598
|
|
|
599
599
|
// src/utils/blocks.ts
|
|
600
|
-
function getBlockLabel(block
|
|
600
|
+
function getBlockLabel(block) {
|
|
601
601
|
if (!block) return "";
|
|
602
|
-
const label = block.properties?.label;
|
|
603
|
-
if (typeof label === "string") return label;
|
|
604
|
-
if (label && typeof label === "object") return label[locale] ?? label["en"] ?? "";
|
|
605
602
|
return block.key?.replace(/_/g, " ").replace(/\b\w/g, (l) => l.toUpperCase()) ?? "";
|
|
606
603
|
}
|
|
607
604
|
function formatBlockValue(block) {
|
|
@@ -678,9 +675,6 @@ function unwrapBlock(block, locale) {
|
|
|
678
675
|
}
|
|
679
676
|
return parsed;
|
|
680
677
|
}
|
|
681
|
-
if (block.type === "text_filter" || block.type === "number_filter") {
|
|
682
|
-
return block.value;
|
|
683
|
-
}
|
|
684
678
|
if (block.type === "localized_text" || block.type === "markdown") {
|
|
685
679
|
return block.value?.[locale];
|
|
686
680
|
}
|