@gem-sdk/core 1.23.8 → 1.23.12
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.
|
@@ -141,8 +141,7 @@ const useCurrentVariant = ()=>{
|
|
|
141
141
|
};
|
|
142
142
|
const useCurrentVariantInStock = ()=>{
|
|
143
143
|
const currentVariant = useCurrentVariant();
|
|
144
|
-
|
|
145
|
-
return isInStock;
|
|
144
|
+
return variant.checkInStock(currentVariant);
|
|
146
145
|
};
|
|
147
146
|
const useVariantOutStock = (optionId, optionValue)=>{
|
|
148
147
|
const { selectedOptions } = useSelectedOption();
|
|
@@ -139,8 +139,7 @@ const useCurrentVariant = ()=>{
|
|
|
139
139
|
};
|
|
140
140
|
const useCurrentVariantInStock = ()=>{
|
|
141
141
|
const currentVariant = useCurrentVariant();
|
|
142
|
-
|
|
143
|
-
return isInStock;
|
|
142
|
+
return checkInStock(currentVariant);
|
|
144
143
|
};
|
|
145
144
|
const useVariantOutStock = (optionId, optionValue)=>{
|
|
146
145
|
const { selectedOptions } = useSelectedOption();
|
package/dist/types/index.d.ts
CHANGED
|
@@ -774,6 +774,10 @@ type SwatchesLinkControlType<T> = SharedControlType<T> & {
|
|
|
774
774
|
id?: string;
|
|
775
775
|
type: 'swatchesLink';
|
|
776
776
|
};
|
|
777
|
+
type VariantSwatchesPresetControlType<T> = SharedControlType<T> & {
|
|
778
|
+
id?: string;
|
|
779
|
+
type: 'variant:presets';
|
|
780
|
+
};
|
|
777
781
|
|
|
778
782
|
type LayoutControlType<T> = SharedControlType<T> & {
|
|
779
783
|
type: 'layout';
|
|
@@ -880,7 +884,7 @@ type GridArrange<T> = SharedControlType<T> & {
|
|
|
880
884
|
readonly?: boolean;
|
|
881
885
|
};
|
|
882
886
|
|
|
883
|
-
type ControlProp<T> = AngleControlType<T> | CheckboxControlType<T> | ColorPickerControlType<T> | GroupControlType<T> | IconControlType<T> | InputFixContentControlType<T> | InputNumberControlType<T> | InputUnitControlType<T> | InputUnitSpacingControlType<T> | InputUnitWidthControlType<T> | InputControlType<T> | MarginControlType<T> | PaddingControlType<T> | PositionControlType<T> | RadioGroupControlType | RangeControlType<T> | SegmentControlType<T> | SelectControlType<T> | TextareaControlType<T> | ToggleControlType<T> | ImageControlType<T> | ChildrensControlType | GridControlType<T> | FlexControlType<T> | TextEditorControlType<T> | ProductControlType<T> | TypographyControlType<T> | TypographyV2ControlType<T> | MenuControlType<T> | BehaviorStateControlType<T> | PickLinkControlType<T> | BoxShadowControlType<T> | TextShadowControlType<T> | BorderControlType<T> | BorderRadiusControlType<T> | RadiusPresetControlType<T> | SizeControlType<T> | ChildItemType<T> | PickMultiProductControlType<T> | CollectionControlType<T> | BackgroundControlType<T> | VisibilityControlType<T> | SelectVariantControlType | CountdownEvergreenType | Timezone<T> | CustomContentControlType<T> | DateTimePickerControlType | CountdownDailyType | KlaviyoCodes | YotpoLoyaltyCodes | InputWidthControlType<T> | LayoutSegmentControlType<T> | InputSpacing<T> | UniqueIdControlType<T> | PositionSquareControlType<T> | CustomCodeEditor | LayoutControlType<T> | SwatchesLinkControlType<T> | ProductListControlType<T> | CollectionBannerControlType<T> | Ratio<T> | StickyDisplayControlType<T> | SyncProductPropertiesControlType<T> | StepsGuide<T> | ImageShape<T> | GridArrange<T>;
|
|
887
|
+
type ControlProp<T> = AngleControlType<T> | CheckboxControlType<T> | ColorPickerControlType<T> | GroupControlType<T> | IconControlType<T> | InputFixContentControlType<T> | InputNumberControlType<T> | InputUnitControlType<T> | InputUnitSpacingControlType<T> | InputUnitWidthControlType<T> | InputControlType<T> | MarginControlType<T> | PaddingControlType<T> | PositionControlType<T> | RadioGroupControlType | RangeControlType<T> | SegmentControlType<T> | SelectControlType<T> | TextareaControlType<T> | ToggleControlType<T> | ImageControlType<T> | ChildrensControlType | GridControlType<T> | FlexControlType<T> | TextEditorControlType<T> | ProductControlType<T> | TypographyControlType<T> | TypographyV2ControlType<T> | MenuControlType<T> | BehaviorStateControlType<T> | PickLinkControlType<T> | BoxShadowControlType<T> | TextShadowControlType<T> | BorderControlType<T> | BorderRadiusControlType<T> | RadiusPresetControlType<T> | SizeControlType<T> | ChildItemType<T> | PickMultiProductControlType<T> | CollectionControlType<T> | BackgroundControlType<T> | VisibilityControlType<T> | SelectVariantControlType | CountdownEvergreenType | Timezone<T> | CustomContentControlType<T> | DateTimePickerControlType | CountdownDailyType | KlaviyoCodes | YotpoLoyaltyCodes | InputWidthControlType<T> | LayoutSegmentControlType<T> | InputSpacing<T> | UniqueIdControlType<T> | PositionSquareControlType<T> | CustomCodeEditor | LayoutControlType<T> | SwatchesLinkControlType<T> | VariantSwatchesPresetControlType<T> | ProductListControlType<T> | CollectionBannerControlType<T> | Ratio<T> | StickyDisplayControlType<T> | SyncProductPropertiesControlType<T> | StepsGuide<T> | ImageShape<T> | GridArrange<T>;
|
|
884
888
|
type Setting<P extends BaseProps> = {
|
|
885
889
|
id: 'setting';
|
|
886
890
|
note?: string;
|