@rebuy/rebuy 3.23.0-rc.1 → 3.23.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.cjs +9 -3
- package/dist/index.mjs +9 -3
- package/dist/server/index.cjs +9 -3
- package/dist/server/index.mjs +9 -3
- package/dist/transforms/index.cjs +9 -3
- package/dist/transforms/index.mjs +9 -3
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -4740,8 +4740,10 @@ var buildVariants = (settings) => {
|
|
|
4740
4740
|
hideOutOfStockVariants: !!settings.productOptions?.hideOutOfStockVariants,
|
|
4741
4741
|
...revealsVariants(settings) && {
|
|
4742
4742
|
mutators: [
|
|
4743
|
+
contentMutator("set_true", SHOW_VARIANTS, "is_empty"),
|
|
4743
4744
|
contentMutator("set_false", REVEAL_PENDING, "is_empty"),
|
|
4744
|
-
contentMutator("set_true", REVEAL_PENDING, "is_not_empty")
|
|
4745
|
+
contentMutator("set_true", REVEAL_PENDING, "is_not_empty"),
|
|
4746
|
+
contentMutator("set_false", SHOW_VARIANTS, "is_not_empty")
|
|
4745
4747
|
]
|
|
4746
4748
|
},
|
|
4747
4749
|
...selector && { selector: VARIANT_SELECTOR[selector] },
|
|
@@ -4811,6 +4813,7 @@ var buttonKind = (settings) => {
|
|
|
4811
4813
|
var buildRevealButton = (settings) => revealsVariants(settings) ? [
|
|
4812
4814
|
{
|
|
4813
4815
|
buttonStyle: buttonKind(settings),
|
|
4816
|
+
name: "reveal",
|
|
4814
4817
|
sections: [
|
|
4815
4818
|
{ buttonField: "buttonLabel", content: { en: "{{variantOptionsLabel}}" }, sectionType: "text" }
|
|
4816
4819
|
],
|
|
@@ -4840,7 +4843,7 @@ var buildAddButton = (settings) => {
|
|
|
4840
4843
|
slot("redirectToCheckout", settings.language?.redirectToCheckout)
|
|
4841
4844
|
],
|
|
4842
4845
|
sectionType: "button",
|
|
4843
|
-
...revealsVariants(settings) && { visibility: { variable:
|
|
4846
|
+
...revealsVariants(settings) && { visibility: { variable: SHOW_VARIANTS, visibleWhen: true } }
|
|
4844
4847
|
};
|
|
4845
4848
|
};
|
|
4846
4849
|
var buildOfferCard = (settings, horizontal) => {
|
|
@@ -4866,7 +4869,10 @@ var buildOfferCard = (settings, horizontal) => {
|
|
|
4866
4869
|
sectionType: "layout",
|
|
4867
4870
|
spacing: "base",
|
|
4868
4871
|
...revealsVariants(settings) && {
|
|
4869
|
-
variables: [
|
|
4872
|
+
variables: [
|
|
4873
|
+
{ defaultValue: true, name: SHOW_VARIANTS },
|
|
4874
|
+
{ defaultValue: false, name: REVEAL_PENDING }
|
|
4875
|
+
]
|
|
4870
4876
|
}
|
|
4871
4877
|
}
|
|
4872
4878
|
];
|
package/dist/index.mjs
CHANGED
|
@@ -4446,8 +4446,10 @@ var buildVariants = (settings) => {
|
|
|
4446
4446
|
hideOutOfStockVariants: !!settings.productOptions?.hideOutOfStockVariants,
|
|
4447
4447
|
...revealsVariants(settings) && {
|
|
4448
4448
|
mutators: [
|
|
4449
|
+
contentMutator("set_true", SHOW_VARIANTS, "is_empty"),
|
|
4449
4450
|
contentMutator("set_false", REVEAL_PENDING, "is_empty"),
|
|
4450
|
-
contentMutator("set_true", REVEAL_PENDING, "is_not_empty")
|
|
4451
|
+
contentMutator("set_true", REVEAL_PENDING, "is_not_empty"),
|
|
4452
|
+
contentMutator("set_false", SHOW_VARIANTS, "is_not_empty")
|
|
4451
4453
|
]
|
|
4452
4454
|
},
|
|
4453
4455
|
...selector && { selector: VARIANT_SELECTOR[selector] },
|
|
@@ -4517,6 +4519,7 @@ var buttonKind = (settings) => {
|
|
|
4517
4519
|
var buildRevealButton = (settings) => revealsVariants(settings) ? [
|
|
4518
4520
|
{
|
|
4519
4521
|
buttonStyle: buttonKind(settings),
|
|
4522
|
+
name: "reveal",
|
|
4520
4523
|
sections: [
|
|
4521
4524
|
{ buttonField: "buttonLabel", content: { en: "{{variantOptionsLabel}}" }, sectionType: "text" }
|
|
4522
4525
|
],
|
|
@@ -4546,7 +4549,7 @@ var buildAddButton = (settings) => {
|
|
|
4546
4549
|
slot("redirectToCheckout", settings.language?.redirectToCheckout)
|
|
4547
4550
|
],
|
|
4548
4551
|
sectionType: "button",
|
|
4549
|
-
...revealsVariants(settings) && { visibility: { variable:
|
|
4552
|
+
...revealsVariants(settings) && { visibility: { variable: SHOW_VARIANTS, visibleWhen: true } }
|
|
4550
4553
|
};
|
|
4551
4554
|
};
|
|
4552
4555
|
var buildOfferCard = (settings, horizontal) => {
|
|
@@ -4572,7 +4575,10 @@ var buildOfferCard = (settings, horizontal) => {
|
|
|
4572
4575
|
sectionType: "layout",
|
|
4573
4576
|
spacing: "base",
|
|
4574
4577
|
...revealsVariants(settings) && {
|
|
4575
|
-
variables: [
|
|
4578
|
+
variables: [
|
|
4579
|
+
{ defaultValue: true, name: SHOW_VARIANTS },
|
|
4580
|
+
{ defaultValue: false, name: REVEAL_PENDING }
|
|
4581
|
+
]
|
|
4576
4582
|
}
|
|
4577
4583
|
}
|
|
4578
4584
|
];
|
package/dist/server/index.cjs
CHANGED
|
@@ -3325,8 +3325,10 @@ var buildVariants = (settings) => {
|
|
|
3325
3325
|
hideOutOfStockVariants: !!settings.productOptions?.hideOutOfStockVariants,
|
|
3326
3326
|
...revealsVariants(settings) && {
|
|
3327
3327
|
mutators: [
|
|
3328
|
+
contentMutator("set_true", SHOW_VARIANTS, "is_empty"),
|
|
3328
3329
|
contentMutator("set_false", REVEAL_PENDING, "is_empty"),
|
|
3329
|
-
contentMutator("set_true", REVEAL_PENDING, "is_not_empty")
|
|
3330
|
+
contentMutator("set_true", REVEAL_PENDING, "is_not_empty"),
|
|
3331
|
+
contentMutator("set_false", SHOW_VARIANTS, "is_not_empty")
|
|
3330
3332
|
]
|
|
3331
3333
|
},
|
|
3332
3334
|
...selector && { selector: VARIANT_SELECTOR[selector] },
|
|
@@ -3396,6 +3398,7 @@ var buttonKind = (settings) => {
|
|
|
3396
3398
|
var buildRevealButton = (settings) => revealsVariants(settings) ? [
|
|
3397
3399
|
{
|
|
3398
3400
|
buttonStyle: buttonKind(settings),
|
|
3401
|
+
name: "reveal",
|
|
3399
3402
|
sections: [
|
|
3400
3403
|
{ buttonField: "buttonLabel", content: { en: "{{variantOptionsLabel}}" }, sectionType: "text" }
|
|
3401
3404
|
],
|
|
@@ -3425,7 +3428,7 @@ var buildAddButton = (settings) => {
|
|
|
3425
3428
|
slot("redirectToCheckout", settings.language?.redirectToCheckout)
|
|
3426
3429
|
],
|
|
3427
3430
|
sectionType: "button",
|
|
3428
|
-
...revealsVariants(settings) && { visibility: { variable:
|
|
3431
|
+
...revealsVariants(settings) && { visibility: { variable: SHOW_VARIANTS, visibleWhen: true } }
|
|
3429
3432
|
};
|
|
3430
3433
|
};
|
|
3431
3434
|
var buildOfferCard = (settings, horizontal) => {
|
|
@@ -3451,7 +3454,10 @@ var buildOfferCard = (settings, horizontal) => {
|
|
|
3451
3454
|
sectionType: "layout",
|
|
3452
3455
|
spacing: "base",
|
|
3453
3456
|
...revealsVariants(settings) && {
|
|
3454
|
-
variables: [
|
|
3457
|
+
variables: [
|
|
3458
|
+
{ defaultValue: true, name: SHOW_VARIANTS },
|
|
3459
|
+
{ defaultValue: false, name: REVEAL_PENDING }
|
|
3460
|
+
]
|
|
3455
3461
|
}
|
|
3456
3462
|
}
|
|
3457
3463
|
];
|
package/dist/server/index.mjs
CHANGED
|
@@ -3274,8 +3274,10 @@ var buildVariants = (settings) => {
|
|
|
3274
3274
|
hideOutOfStockVariants: !!settings.productOptions?.hideOutOfStockVariants,
|
|
3275
3275
|
...revealsVariants(settings) && {
|
|
3276
3276
|
mutators: [
|
|
3277
|
+
contentMutator("set_true", SHOW_VARIANTS, "is_empty"),
|
|
3277
3278
|
contentMutator("set_false", REVEAL_PENDING, "is_empty"),
|
|
3278
|
-
contentMutator("set_true", REVEAL_PENDING, "is_not_empty")
|
|
3279
|
+
contentMutator("set_true", REVEAL_PENDING, "is_not_empty"),
|
|
3280
|
+
contentMutator("set_false", SHOW_VARIANTS, "is_not_empty")
|
|
3279
3281
|
]
|
|
3280
3282
|
},
|
|
3281
3283
|
...selector && { selector: VARIANT_SELECTOR[selector] },
|
|
@@ -3345,6 +3347,7 @@ var buttonKind = (settings) => {
|
|
|
3345
3347
|
var buildRevealButton = (settings) => revealsVariants(settings) ? [
|
|
3346
3348
|
{
|
|
3347
3349
|
buttonStyle: buttonKind(settings),
|
|
3350
|
+
name: "reveal",
|
|
3348
3351
|
sections: [
|
|
3349
3352
|
{ buttonField: "buttonLabel", content: { en: "{{variantOptionsLabel}}" }, sectionType: "text" }
|
|
3350
3353
|
],
|
|
@@ -3374,7 +3377,7 @@ var buildAddButton = (settings) => {
|
|
|
3374
3377
|
slot("redirectToCheckout", settings.language?.redirectToCheckout)
|
|
3375
3378
|
],
|
|
3376
3379
|
sectionType: "button",
|
|
3377
|
-
...revealsVariants(settings) && { visibility: { variable:
|
|
3380
|
+
...revealsVariants(settings) && { visibility: { variable: SHOW_VARIANTS, visibleWhen: true } }
|
|
3378
3381
|
};
|
|
3379
3382
|
};
|
|
3380
3383
|
var buildOfferCard = (settings, horizontal) => {
|
|
@@ -3400,7 +3403,10 @@ var buildOfferCard = (settings, horizontal) => {
|
|
|
3400
3403
|
sectionType: "layout",
|
|
3401
3404
|
spacing: "base",
|
|
3402
3405
|
...revealsVariants(settings) && {
|
|
3403
|
-
variables: [
|
|
3406
|
+
variables: [
|
|
3407
|
+
{ defaultValue: true, name: SHOW_VARIANTS },
|
|
3408
|
+
{ defaultValue: false, name: REVEAL_PENDING }
|
|
3409
|
+
]
|
|
3404
3410
|
}
|
|
3405
3411
|
}
|
|
3406
3412
|
];
|
|
@@ -3140,8 +3140,10 @@ var buildVariants = (settings) => {
|
|
|
3140
3140
|
hideOutOfStockVariants: !!settings.productOptions?.hideOutOfStockVariants,
|
|
3141
3141
|
...revealsVariants(settings) && {
|
|
3142
3142
|
mutators: [
|
|
3143
|
+
contentMutator("set_true", SHOW_VARIANTS, "is_empty"),
|
|
3143
3144
|
contentMutator("set_false", REVEAL_PENDING, "is_empty"),
|
|
3144
|
-
contentMutator("set_true", REVEAL_PENDING, "is_not_empty")
|
|
3145
|
+
contentMutator("set_true", REVEAL_PENDING, "is_not_empty"),
|
|
3146
|
+
contentMutator("set_false", SHOW_VARIANTS, "is_not_empty")
|
|
3145
3147
|
]
|
|
3146
3148
|
},
|
|
3147
3149
|
...selector && { selector: VARIANT_SELECTOR[selector] },
|
|
@@ -3211,6 +3213,7 @@ var buttonKind = (settings) => {
|
|
|
3211
3213
|
var buildRevealButton = (settings) => revealsVariants(settings) ? [
|
|
3212
3214
|
{
|
|
3213
3215
|
buttonStyle: buttonKind(settings),
|
|
3216
|
+
name: "reveal",
|
|
3214
3217
|
sections: [
|
|
3215
3218
|
{ buttonField: "buttonLabel", content: { en: "{{variantOptionsLabel}}" }, sectionType: "text" }
|
|
3216
3219
|
],
|
|
@@ -3240,7 +3243,7 @@ var buildAddButton = (settings) => {
|
|
|
3240
3243
|
slot("redirectToCheckout", settings.language?.redirectToCheckout)
|
|
3241
3244
|
],
|
|
3242
3245
|
sectionType: "button",
|
|
3243
|
-
...revealsVariants(settings) && { visibility: { variable:
|
|
3246
|
+
...revealsVariants(settings) && { visibility: { variable: SHOW_VARIANTS, visibleWhen: true } }
|
|
3244
3247
|
};
|
|
3245
3248
|
};
|
|
3246
3249
|
var buildOfferCard = (settings, horizontal) => {
|
|
@@ -3266,7 +3269,10 @@ var buildOfferCard = (settings, horizontal) => {
|
|
|
3266
3269
|
sectionType: "layout",
|
|
3267
3270
|
spacing: "base",
|
|
3268
3271
|
...revealsVariants(settings) && {
|
|
3269
|
-
variables: [
|
|
3272
|
+
variables: [
|
|
3273
|
+
{ defaultValue: true, name: SHOW_VARIANTS },
|
|
3274
|
+
{ defaultValue: false, name: REVEAL_PENDING }
|
|
3275
|
+
]
|
|
3270
3276
|
}
|
|
3271
3277
|
}
|
|
3272
3278
|
];
|
|
@@ -3081,8 +3081,10 @@ var buildVariants = (settings) => {
|
|
|
3081
3081
|
hideOutOfStockVariants: !!settings.productOptions?.hideOutOfStockVariants,
|
|
3082
3082
|
...revealsVariants(settings) && {
|
|
3083
3083
|
mutators: [
|
|
3084
|
+
contentMutator("set_true", SHOW_VARIANTS, "is_empty"),
|
|
3084
3085
|
contentMutator("set_false", REVEAL_PENDING, "is_empty"),
|
|
3085
|
-
contentMutator("set_true", REVEAL_PENDING, "is_not_empty")
|
|
3086
|
+
contentMutator("set_true", REVEAL_PENDING, "is_not_empty"),
|
|
3087
|
+
contentMutator("set_false", SHOW_VARIANTS, "is_not_empty")
|
|
3086
3088
|
]
|
|
3087
3089
|
},
|
|
3088
3090
|
...selector && { selector: VARIANT_SELECTOR[selector] },
|
|
@@ -3152,6 +3154,7 @@ var buttonKind = (settings) => {
|
|
|
3152
3154
|
var buildRevealButton = (settings) => revealsVariants(settings) ? [
|
|
3153
3155
|
{
|
|
3154
3156
|
buttonStyle: buttonKind(settings),
|
|
3157
|
+
name: "reveal",
|
|
3155
3158
|
sections: [
|
|
3156
3159
|
{ buttonField: "buttonLabel", content: { en: "{{variantOptionsLabel}}" }, sectionType: "text" }
|
|
3157
3160
|
],
|
|
@@ -3181,7 +3184,7 @@ var buildAddButton = (settings) => {
|
|
|
3181
3184
|
slot("redirectToCheckout", settings.language?.redirectToCheckout)
|
|
3182
3185
|
],
|
|
3183
3186
|
sectionType: "button",
|
|
3184
|
-
...revealsVariants(settings) && { visibility: { variable:
|
|
3187
|
+
...revealsVariants(settings) && { visibility: { variable: SHOW_VARIANTS, visibleWhen: true } }
|
|
3185
3188
|
};
|
|
3186
3189
|
};
|
|
3187
3190
|
var buildOfferCard = (settings, horizontal) => {
|
|
@@ -3207,7 +3210,10 @@ var buildOfferCard = (settings, horizontal) => {
|
|
|
3207
3210
|
sectionType: "layout",
|
|
3208
3211
|
spacing: "base",
|
|
3209
3212
|
...revealsVariants(settings) && {
|
|
3210
|
-
variables: [
|
|
3213
|
+
variables: [
|
|
3214
|
+
{ defaultValue: true, name: SHOW_VARIANTS },
|
|
3215
|
+
{ defaultValue: false, name: REVEAL_PENDING }
|
|
3216
|
+
]
|
|
3211
3217
|
}
|
|
3212
3218
|
}
|
|
3213
3219
|
];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rebuy/rebuy",
|
|
3
|
-
"version": "3.23.0
|
|
3
|
+
"version": "3.23.0",
|
|
4
4
|
"description": "Shared zod schemas, legacy-to-CAB widget transforms, and server orchestrators for Rebuy's Shopify consumers (rebuy-api, admin-nextjs, rebuy-shopify-extensions)",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Rebuy, Inc.",
|