@gem-sdk/core 1.48.0-dev.5 → 1.48.0-dev.6
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/cjs/helpers/queries/get-product.js +1 -1
- package/dist/cjs/helpers/third-party/appConfig.js +14 -0
- package/dist/cjs/helpers/third-party/appSetting.js +16 -0
- package/dist/cjs/helpers/third-party/constant.js +3 -1
- package/dist/cjs/helpers/typography.js +4 -1
- package/dist/esm/helpers/queries/get-product.js +1 -1
- package/dist/esm/helpers/third-party/appConfig.js +13 -1
- package/dist/esm/helpers/third-party/appSetting.js +16 -0
- package/dist/esm/helpers/third-party/constant.js +4 -2
- package/dist/esm/helpers/typography.js +4 -1
- package/dist/types/index.d.ts +6 -0
- package/package.json +3 -3
|
@@ -36,7 +36,7 @@ const getProduct = async (fetcher, { id, isSample, isStorefront })=>{
|
|
|
36
36
|
};
|
|
37
37
|
};
|
|
38
38
|
const orderBy = {
|
|
39
|
-
field: '
|
|
39
|
+
field: 'PLATFORM_CREATED_AT',
|
|
40
40
|
direction: 'DESC'
|
|
41
41
|
};
|
|
42
42
|
const fetchProduct = async (fetcher, { id, isSample, isStorefront })=>{
|
|
@@ -66,8 +66,21 @@ const KiteFreeGiftDiscountConfig = {
|
|
|
66
66
|
appId: '2c7302c4-455d-4078-a829-48563ba26089'
|
|
67
67
|
}
|
|
68
68
|
};
|
|
69
|
+
const FastBundleBundlesDiscountsConfig = {
|
|
70
|
+
FastBundleBundlesDiscounts: {
|
|
71
|
+
appName: 'fast-bundle',
|
|
72
|
+
appId: '9e87fbe2-9041-4c23-acf5-322413994cef'
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
const SimpleBundlesKitsConfig = {
|
|
76
|
+
SimpleBundlesKits: {
|
|
77
|
+
appName: 'simple-bundles-kits',
|
|
78
|
+
appId: 'e553276b-36b2-446d-b80a-aa47fe5f96ac'
|
|
79
|
+
}
|
|
80
|
+
};
|
|
69
81
|
|
|
70
82
|
exports.BonLoyaltyRewardsReferralsConfig = BonLoyaltyRewardsReferralsConfig;
|
|
83
|
+
exports.FastBundleBundlesDiscountsConfig = FastBundleBundlesDiscountsConfig;
|
|
71
84
|
exports.KiteFreeGiftDiscountConfig = KiteFreeGiftDiscountConfig;
|
|
72
85
|
exports.LoopSubscriptionsConfig = LoopSubscriptionsConfig;
|
|
73
86
|
exports.PumperBundlesVolumeDiscountConfig = PumperBundlesVolumeDiscountConfig;
|
|
@@ -75,6 +88,7 @@ exports.RechargeSubscriptionsConfig = RechargeSubscriptionsConfig;
|
|
|
75
88
|
exports.ReviewxpoProductReviewsAppConfig = ReviewxpoProductReviewsAppConfig;
|
|
76
89
|
exports.SelleasyConfig = SelleasyConfig;
|
|
77
90
|
exports.ShopifyFormsConfig = ShopifyFormsConfig;
|
|
91
|
+
exports.SimpleBundlesKitsConfig = SimpleBundlesKitsConfig;
|
|
78
92
|
exports.SkioSubscriptionsYcS20Config = SkioSubscriptionsYcS20Config;
|
|
79
93
|
exports.SubifySubscriptionsConfig = SubifySubscriptionsConfig;
|
|
80
94
|
exports.UnlimitedBundlesDiscountsConfig = UnlimitedBundlesDiscountsConfig;
|
|
@@ -115,9 +115,25 @@ const KiteFreeGiftDiscount = {
|
|
|
115
115
|
'app-block': null
|
|
116
116
|
}
|
|
117
117
|
};
|
|
118
|
+
const FastBundleBundlesDiscounts = {
|
|
119
|
+
FastBundleBundlesDiscounts: {
|
|
120
|
+
all_bundles: null,
|
|
121
|
+
fbt_position: null,
|
|
122
|
+
product_bundles: null,
|
|
123
|
+
product_bundle_with_ids: null,
|
|
124
|
+
volume_position: null
|
|
125
|
+
}
|
|
126
|
+
};
|
|
127
|
+
const SimpleBundlesKits = {
|
|
128
|
+
SimpleBundlesKits: {
|
|
129
|
+
'infinite-options-selector': null
|
|
130
|
+
}
|
|
131
|
+
};
|
|
118
132
|
const composeSettingsByWidgetType = {
|
|
133
|
+
...FastBundleBundlesDiscounts,
|
|
119
134
|
...KiteFreeGiftDiscount,
|
|
120
135
|
...UnlimitedBundlesDiscounts,
|
|
136
|
+
...SimpleBundlesKits,
|
|
121
137
|
...PumperBundlesVolumeDiscount,
|
|
122
138
|
...ReviewxpoProductReviewsApp,
|
|
123
139
|
...ShopifyForms,
|
|
@@ -13,7 +13,9 @@ const mapShopifyAppMeta = {
|
|
|
13
13
|
...appConfig.ReviewxpoProductReviewsAppConfig,
|
|
14
14
|
...appConfig.PumperBundlesVolumeDiscountConfig,
|
|
15
15
|
...appConfig.UnlimitedBundlesDiscountsConfig,
|
|
16
|
-
...appConfig.KiteFreeGiftDiscountConfig
|
|
16
|
+
...appConfig.KiteFreeGiftDiscountConfig,
|
|
17
|
+
...appConfig.FastBundleBundlesDiscountsConfig,
|
|
18
|
+
...appConfig.SimpleBundlesKitsConfig
|
|
17
19
|
};
|
|
18
20
|
const THIRD_PARTY_APP_BLOCK_ID_PREFIX = 'gp_app';
|
|
19
21
|
|
|
@@ -116,7 +116,7 @@ const composeTypographyAttr = (attrs)=>{
|
|
|
116
116
|
});
|
|
117
117
|
};
|
|
118
118
|
const composeTypographyClassName = (typo, typography)=>{
|
|
119
|
-
return typo ? typo?.type && !typo.custom ? genTypoClass(typo.type) : '' : typography?.type && genTypoClass(typography?.type);
|
|
119
|
+
return typo ? typo?.type && !isCustomTypo(typo.custom) ? genTypoClass(typo.type) : '' : typography?.type && genTypoClass(typography?.type);
|
|
120
120
|
};
|
|
121
121
|
const composeFallbackTypographyStyle = (tag)=>{
|
|
122
122
|
if ([
|
|
@@ -148,6 +148,9 @@ const composeTypographyStyle = (typo, typography, disableAttr)=>{
|
|
|
148
148
|
...!typography?.type ? composeTypography(typography?.custom) : {}
|
|
149
149
|
};
|
|
150
150
|
};
|
|
151
|
+
const isCustomTypo = (typoProps)=>{
|
|
152
|
+
return typoProps && Object.keys(typoProps).length > 1 || typoProps && Object.keys(typoProps).length === 1 && !typoProps.fontSize;
|
|
153
|
+
};
|
|
151
154
|
|
|
152
155
|
exports.composeFallbackTypographyStyle = composeFallbackTypographyStyle;
|
|
153
156
|
exports.composeFontFamilyTypographyV2 = composeFontFamilyTypographyV2;
|
|
@@ -34,7 +34,7 @@ const getProduct = async (fetcher, { id, isSample, isStorefront })=>{
|
|
|
34
34
|
};
|
|
35
35
|
};
|
|
36
36
|
const orderBy = {
|
|
37
|
-
field: '
|
|
37
|
+
field: 'PLATFORM_CREATED_AT',
|
|
38
38
|
direction: 'DESC'
|
|
39
39
|
};
|
|
40
40
|
const fetchProduct = async (fetcher, { id, isSample, isStorefront })=>{
|
|
@@ -64,5 +64,17 @@ const KiteFreeGiftDiscountConfig = {
|
|
|
64
64
|
appId: '2c7302c4-455d-4078-a829-48563ba26089'
|
|
65
65
|
}
|
|
66
66
|
};
|
|
67
|
+
const FastBundleBundlesDiscountsConfig = {
|
|
68
|
+
FastBundleBundlesDiscounts: {
|
|
69
|
+
appName: 'fast-bundle',
|
|
70
|
+
appId: '9e87fbe2-9041-4c23-acf5-322413994cef'
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
const SimpleBundlesKitsConfig = {
|
|
74
|
+
SimpleBundlesKits: {
|
|
75
|
+
appName: 'simple-bundles-kits',
|
|
76
|
+
appId: 'e553276b-36b2-446d-b80a-aa47fe5f96ac'
|
|
77
|
+
}
|
|
78
|
+
};
|
|
67
79
|
|
|
68
|
-
export { BonLoyaltyRewardsReferralsConfig, KiteFreeGiftDiscountConfig, LoopSubscriptionsConfig, PumperBundlesVolumeDiscountConfig, RechargeSubscriptionsConfig, ReviewxpoProductReviewsAppConfig, SelleasyConfig, ShopifyFormsConfig, SkioSubscriptionsYcS20Config, SubifySubscriptionsConfig, UnlimitedBundlesDiscountsConfig };
|
|
80
|
+
export { BonLoyaltyRewardsReferralsConfig, FastBundleBundlesDiscountsConfig, KiteFreeGiftDiscountConfig, LoopSubscriptionsConfig, PumperBundlesVolumeDiscountConfig, RechargeSubscriptionsConfig, ReviewxpoProductReviewsAppConfig, SelleasyConfig, ShopifyFormsConfig, SimpleBundlesKitsConfig, SkioSubscriptionsYcS20Config, SubifySubscriptionsConfig, UnlimitedBundlesDiscountsConfig };
|
|
@@ -113,9 +113,25 @@ const KiteFreeGiftDiscount = {
|
|
|
113
113
|
'app-block': null
|
|
114
114
|
}
|
|
115
115
|
};
|
|
116
|
+
const FastBundleBundlesDiscounts = {
|
|
117
|
+
FastBundleBundlesDiscounts: {
|
|
118
|
+
all_bundles: null,
|
|
119
|
+
fbt_position: null,
|
|
120
|
+
product_bundles: null,
|
|
121
|
+
product_bundle_with_ids: null,
|
|
122
|
+
volume_position: null
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
const SimpleBundlesKits = {
|
|
126
|
+
SimpleBundlesKits: {
|
|
127
|
+
'infinite-options-selector': null
|
|
128
|
+
}
|
|
129
|
+
};
|
|
116
130
|
const composeSettingsByWidgetType = {
|
|
131
|
+
...FastBundleBundlesDiscounts,
|
|
117
132
|
...KiteFreeGiftDiscount,
|
|
118
133
|
...UnlimitedBundlesDiscounts,
|
|
134
|
+
...SimpleBundlesKits,
|
|
119
135
|
...PumperBundlesVolumeDiscount,
|
|
120
136
|
...ReviewxpoProductReviewsApp,
|
|
121
137
|
...ShopifyForms,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RechargeSubscriptionsConfig, BonLoyaltyRewardsReferralsConfig, SubifySubscriptionsConfig, SelleasyConfig, LoopSubscriptionsConfig, SkioSubscriptionsYcS20Config, ShopifyFormsConfig, ReviewxpoProductReviewsAppConfig, PumperBundlesVolumeDiscountConfig, UnlimitedBundlesDiscountsConfig, KiteFreeGiftDiscountConfig } from './appConfig.js';
|
|
1
|
+
import { RechargeSubscriptionsConfig, BonLoyaltyRewardsReferralsConfig, SubifySubscriptionsConfig, SelleasyConfig, LoopSubscriptionsConfig, SkioSubscriptionsYcS20Config, ShopifyFormsConfig, ReviewxpoProductReviewsAppConfig, PumperBundlesVolumeDiscountConfig, UnlimitedBundlesDiscountsConfig, KiteFreeGiftDiscountConfig, FastBundleBundlesDiscountsConfig, SimpleBundlesKitsConfig } from './appConfig.js';
|
|
2
2
|
|
|
3
3
|
const mapShopifyAppMeta = {
|
|
4
4
|
...RechargeSubscriptionsConfig,
|
|
@@ -11,7 +11,9 @@ const mapShopifyAppMeta = {
|
|
|
11
11
|
...ReviewxpoProductReviewsAppConfig,
|
|
12
12
|
...PumperBundlesVolumeDiscountConfig,
|
|
13
13
|
...UnlimitedBundlesDiscountsConfig,
|
|
14
|
-
...KiteFreeGiftDiscountConfig
|
|
14
|
+
...KiteFreeGiftDiscountConfig,
|
|
15
|
+
...FastBundleBundlesDiscountsConfig,
|
|
16
|
+
...SimpleBundlesKitsConfig
|
|
15
17
|
};
|
|
16
18
|
const THIRD_PARTY_APP_BLOCK_ID_PREFIX = 'gp_app';
|
|
17
19
|
|
|
@@ -114,7 +114,7 @@ const composeTypographyAttr = (attrs)=>{
|
|
|
114
114
|
});
|
|
115
115
|
};
|
|
116
116
|
const composeTypographyClassName = (typo, typography)=>{
|
|
117
|
-
return typo ? typo?.type && !typo.custom ? genTypoClass(typo.type) : '' : typography?.type && genTypoClass(typography?.type);
|
|
117
|
+
return typo ? typo?.type && !isCustomTypo(typo.custom) ? genTypoClass(typo.type) : '' : typography?.type && genTypoClass(typography?.type);
|
|
118
118
|
};
|
|
119
119
|
const composeFallbackTypographyStyle = (tag)=>{
|
|
120
120
|
if ([
|
|
@@ -146,5 +146,8 @@ const composeTypographyStyle = (typo, typography, disableAttr)=>{
|
|
|
146
146
|
...!typography?.type ? composeTypography(typography?.custom) : {}
|
|
147
147
|
};
|
|
148
148
|
};
|
|
149
|
+
const isCustomTypo = (typoProps)=>{
|
|
150
|
+
return typoProps && Object.keys(typoProps).length > 1 || typoProps && Object.keys(typoProps).length === 1 && !typoProps.fontSize;
|
|
151
|
+
};
|
|
149
152
|
|
|
150
153
|
export { composeFallbackTypographyStyle, composeFontFamilyTypographyV2, composeTypography, composeTypographyAttr, composeTypographyClassName, composeTypographyCss, composeTypographyStyle, composeTypographyV2, composeTypographyV2Css, genTypoClass };
|
package/dist/types/index.d.ts
CHANGED
|
@@ -7187,6 +7187,11 @@ type InputControlType<T> = SharedControlType<T> & {
|
|
|
7187
7187
|
action?: {
|
|
7188
7188
|
clear?: boolean;
|
|
7189
7189
|
};
|
|
7190
|
+
actionChangeControls?: {
|
|
7191
|
+
controlID: string;
|
|
7192
|
+
condition?: string;
|
|
7193
|
+
newValue: any;
|
|
7194
|
+
}[];
|
|
7190
7195
|
};
|
|
7191
7196
|
|
|
7192
7197
|
type InputFixContentControlType<T> = SharedControlType<T> & {
|
|
@@ -7383,6 +7388,7 @@ type TextareaControlType<T> = SharedControlType<T> & {
|
|
|
7383
7388
|
readonly?: boolean;
|
|
7384
7389
|
minHeight?: number;
|
|
7385
7390
|
maxWidth?: number;
|
|
7391
|
+
inputClass?: string;
|
|
7386
7392
|
autoHeight?: boolean;
|
|
7387
7393
|
defaultRows?: number;
|
|
7388
7394
|
showPlusBtn?: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gem-sdk/core",
|
|
3
|
-
"version": "1.48.0-dev.
|
|
3
|
+
"version": "1.48.0-dev.6",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"type-check": "yarn tsc --noEmit"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@gem-sdk/adapter-shopify": "1.48.0-dev.
|
|
31
|
-
"@gem-sdk/styles": "1.48.0-dev.
|
|
30
|
+
"@gem-sdk/adapter-shopify": "1.48.0-dev.3",
|
|
31
|
+
"@gem-sdk/styles": "1.48.0-dev.3",
|
|
32
32
|
"@types/classnames": "^2.3.1"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|