@gem-sdk/core 1.48.0-dev.2 → 1.48.0-dev.4
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/third-party/appConfig.js +21 -0
- package/dist/cjs/helpers/third-party/appSetting.js +22 -0
- package/dist/cjs/helpers/third-party/constant.js +4 -1
- package/dist/cjs/helpers/typography.js +4 -1
- package/dist/esm/helpers/third-party/appConfig.js +19 -1
- package/dist/esm/helpers/third-party/appSetting.js +22 -0
- package/dist/esm/helpers/third-party/constant.js +5 -2
- package/dist/esm/helpers/typography.js +4 -1
- package/dist/types/index.d.ts +7 -0
- package/package.json +3 -3
|
@@ -60,14 +60,35 @@ const UnlimitedBundlesDiscountsConfig = {
|
|
|
60
60
|
appId: 'd33d0f48-dee0-42a0-b156-2a5dce91814a'
|
|
61
61
|
}
|
|
62
62
|
};
|
|
63
|
+
const KiteFreeGiftDiscountConfig = {
|
|
64
|
+
KiteFreeGiftDiscount: {
|
|
65
|
+
appName: 'kite-free-gift-discounts',
|
|
66
|
+
appId: '2c7302c4-455d-4078-a829-48563ba26089'
|
|
67
|
+
}
|
|
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
|
+
};
|
|
63
81
|
|
|
64
82
|
exports.BonLoyaltyRewardsReferralsConfig = BonLoyaltyRewardsReferralsConfig;
|
|
83
|
+
exports.FastBundleBundlesDiscountsConfig = FastBundleBundlesDiscountsConfig;
|
|
84
|
+
exports.KiteFreeGiftDiscountConfig = KiteFreeGiftDiscountConfig;
|
|
65
85
|
exports.LoopSubscriptionsConfig = LoopSubscriptionsConfig;
|
|
66
86
|
exports.PumperBundlesVolumeDiscountConfig = PumperBundlesVolumeDiscountConfig;
|
|
67
87
|
exports.RechargeSubscriptionsConfig = RechargeSubscriptionsConfig;
|
|
68
88
|
exports.ReviewxpoProductReviewsAppConfig = ReviewxpoProductReviewsAppConfig;
|
|
69
89
|
exports.SelleasyConfig = SelleasyConfig;
|
|
70
90
|
exports.ShopifyFormsConfig = ShopifyFormsConfig;
|
|
91
|
+
exports.SimpleBundlesKitsConfig = SimpleBundlesKitsConfig;
|
|
71
92
|
exports.SkioSubscriptionsYcS20Config = SkioSubscriptionsYcS20Config;
|
|
72
93
|
exports.SubifySubscriptionsConfig = SubifySubscriptionsConfig;
|
|
73
94
|
exports.UnlimitedBundlesDiscountsConfig = UnlimitedBundlesDiscountsConfig;
|
|
@@ -110,8 +110,30 @@ const UnlimitedBundlesDiscounts = {
|
|
|
110
110
|
'product-page-placeholder': null
|
|
111
111
|
}
|
|
112
112
|
};
|
|
113
|
+
const KiteFreeGiftDiscount = {
|
|
114
|
+
KiteFreeGiftDiscount: {
|
|
115
|
+
'app-block': null
|
|
116
|
+
}
|
|
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
|
+
};
|
|
113
132
|
const composeSettingsByWidgetType = {
|
|
133
|
+
...FastBundleBundlesDiscounts,
|
|
134
|
+
...KiteFreeGiftDiscount,
|
|
114
135
|
...UnlimitedBundlesDiscounts,
|
|
136
|
+
...SimpleBundlesKits,
|
|
115
137
|
...PumperBundlesVolumeDiscount,
|
|
116
138
|
...ReviewxpoProductReviewsApp,
|
|
117
139
|
...ShopifyForms,
|
|
@@ -12,7 +12,10 @@ const mapShopifyAppMeta = {
|
|
|
12
12
|
...appConfig.ShopifyFormsConfig,
|
|
13
13
|
...appConfig.ReviewxpoProductReviewsAppConfig,
|
|
14
14
|
...appConfig.PumperBundlesVolumeDiscountConfig,
|
|
15
|
-
...appConfig.UnlimitedBundlesDiscountsConfig
|
|
15
|
+
...appConfig.UnlimitedBundlesDiscountsConfig,
|
|
16
|
+
...appConfig.KiteFreeGiftDiscountConfig,
|
|
17
|
+
...appConfig.FastBundleBundlesDiscountsConfig,
|
|
18
|
+
...appConfig.SimpleBundlesKitsConfig
|
|
16
19
|
};
|
|
17
20
|
const THIRD_PARTY_APP_BLOCK_ID_PREFIX = 'gp_app';
|
|
18
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;
|
|
@@ -58,5 +58,23 @@ const UnlimitedBundlesDiscountsConfig = {
|
|
|
58
58
|
appId: 'd33d0f48-dee0-42a0-b156-2a5dce91814a'
|
|
59
59
|
}
|
|
60
60
|
};
|
|
61
|
+
const KiteFreeGiftDiscountConfig = {
|
|
62
|
+
KiteFreeGiftDiscount: {
|
|
63
|
+
appName: 'kite-free-gift-discounts',
|
|
64
|
+
appId: '2c7302c4-455d-4078-a829-48563ba26089'
|
|
65
|
+
}
|
|
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
|
+
};
|
|
61
79
|
|
|
62
|
-
export { BonLoyaltyRewardsReferralsConfig, LoopSubscriptionsConfig, PumperBundlesVolumeDiscountConfig, RechargeSubscriptionsConfig, ReviewxpoProductReviewsAppConfig, SelleasyConfig, ShopifyFormsConfig, SkioSubscriptionsYcS20Config, SubifySubscriptionsConfig, UnlimitedBundlesDiscountsConfig };
|
|
80
|
+
export { BonLoyaltyRewardsReferralsConfig, FastBundleBundlesDiscountsConfig, KiteFreeGiftDiscountConfig, LoopSubscriptionsConfig, PumperBundlesVolumeDiscountConfig, RechargeSubscriptionsConfig, ReviewxpoProductReviewsAppConfig, SelleasyConfig, ShopifyFormsConfig, SimpleBundlesKitsConfig, SkioSubscriptionsYcS20Config, SubifySubscriptionsConfig, UnlimitedBundlesDiscountsConfig };
|
|
@@ -108,8 +108,30 @@ const UnlimitedBundlesDiscounts = {
|
|
|
108
108
|
'product-page-placeholder': null
|
|
109
109
|
}
|
|
110
110
|
};
|
|
111
|
+
const KiteFreeGiftDiscount = {
|
|
112
|
+
KiteFreeGiftDiscount: {
|
|
113
|
+
'app-block': null
|
|
114
|
+
}
|
|
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
|
+
};
|
|
111
130
|
const composeSettingsByWidgetType = {
|
|
131
|
+
...FastBundleBundlesDiscounts,
|
|
132
|
+
...KiteFreeGiftDiscount,
|
|
112
133
|
...UnlimitedBundlesDiscounts,
|
|
134
|
+
...SimpleBundlesKits,
|
|
113
135
|
...PumperBundlesVolumeDiscount,
|
|
114
136
|
...ReviewxpoProductReviewsApp,
|
|
115
137
|
...ShopifyForms,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RechargeSubscriptionsConfig, BonLoyaltyRewardsReferralsConfig, SubifySubscriptionsConfig, SelleasyConfig, LoopSubscriptionsConfig, SkioSubscriptionsYcS20Config, ShopifyFormsConfig, ReviewxpoProductReviewsAppConfig, PumperBundlesVolumeDiscountConfig, UnlimitedBundlesDiscountsConfig } 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,
|
|
@@ -10,7 +10,10 @@ const mapShopifyAppMeta = {
|
|
|
10
10
|
...ShopifyFormsConfig,
|
|
11
11
|
...ReviewxpoProductReviewsAppConfig,
|
|
12
12
|
...PumperBundlesVolumeDiscountConfig,
|
|
13
|
-
...UnlimitedBundlesDiscountsConfig
|
|
13
|
+
...UnlimitedBundlesDiscountsConfig,
|
|
14
|
+
...KiteFreeGiftDiscountConfig,
|
|
15
|
+
...FastBundleBundlesDiscountsConfig,
|
|
16
|
+
...SimpleBundlesKitsConfig
|
|
14
17
|
};
|
|
15
18
|
const THIRD_PARTY_APP_BLOCK_ID_PREFIX = 'gp_app';
|
|
16
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;
|
|
@@ -7741,6 +7747,7 @@ type TypographyV2ControlType<T> = SharedControlType<T> & {
|
|
|
7741
7747
|
hiddenSetting?: {
|
|
7742
7748
|
color?: boolean;
|
|
7743
7749
|
transform?: boolean;
|
|
7750
|
+
fontWeight?: boolean;
|
|
7744
7751
|
};
|
|
7745
7752
|
disableCollapse?: boolean;
|
|
7746
7753
|
};
|
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.4",
|
|
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": {
|