@swell/apps-sdk 1.0.13 → 1.0.14
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/src/api.d.ts +91 -0
- package/dist/src/cache.d.ts +17 -0
- package/dist/src/categories.d.ts +5 -0
- package/dist/src/compatibility/shopify-configs.d.ts +10 -0
- package/dist/src/compatibility/shopify-fonts.d.ts +1 -0
- package/dist/src/compatibility/shopify-objects/address.d.ts +6 -0
- package/dist/src/compatibility/shopify-objects/article.d.ts +5 -0
- package/dist/src/compatibility/shopify-objects/blog.d.ts +5 -0
- package/dist/src/compatibility/shopify-objects/cart.d.ts +5 -0
- package/dist/src/compatibility/shopify-objects/collection.d.ts +5 -0
- package/dist/src/compatibility/shopify-objects/collections.d.ts +3 -0
- package/dist/src/compatibility/shopify-objects/customer.d.ts +5 -0
- package/dist/src/compatibility/shopify-objects/filter.d.ts +5 -0
- package/dist/src/compatibility/shopify-objects/font.d.ts +4 -0
- package/dist/src/compatibility/shopify-objects/form.d.ts +28 -0
- package/dist/src/compatibility/shopify-objects/image.d.ts +6 -0
- package/dist/src/compatibility/shopify-objects/index.d.ts +26 -0
- package/dist/src/compatibility/shopify-objects/line_item.d.ts +6 -0
- package/dist/src/compatibility/shopify-objects/link.d.ts +4 -0
- package/dist/src/compatibility/shopify-objects/localization.d.ts +4 -0
- package/dist/src/compatibility/shopify-objects/media.d.ts +4 -0
- package/dist/src/compatibility/shopify-objects/order.d.ts +10 -0
- package/dist/src/compatibility/shopify-objects/page.d.ts +4 -0
- package/dist/src/compatibility/shopify-objects/paginate.d.ts +4 -0
- package/dist/src/compatibility/shopify-objects/predictive_search.d.ts +4 -0
- package/dist/src/compatibility/shopify-objects/product.d.ts +6 -0
- package/dist/src/compatibility/shopify-objects/resource.d.ts +23 -0
- package/dist/src/compatibility/shopify-objects/search.d.ts +4 -0
- package/dist/src/compatibility/shopify-objects/shop.d.ts +4 -0
- package/dist/src/compatibility/shopify-objects/variant.d.ts +5 -0
- package/dist/src/compatibility/shopify.d.ts +71 -0
- package/dist/src/constants.d.ts +1 -0
- package/dist/src/content.d.ts +8 -0
- package/dist/src/easyblocks/config.d.ts +136 -0
- package/dist/src/easyblocks/index.d.ts +2 -0
- package/dist/src/easyblocks/utils.d.ts +36 -0
- package/dist/src/fonts.d.ts +6 -0
- package/dist/src/index.d.ts +14 -0
- package/dist/src/liquid/color.d.ts +33 -0
- package/dist/src/liquid/filters/asset_url.d.ts +2 -0
- package/dist/src/liquid/filters/brightness_difference.d.ts +2 -0
- package/dist/src/liquid/filters/color_brightness.d.ts +2 -0
- package/dist/src/liquid/filters/color_contrast.d.ts +2 -0
- package/dist/src/liquid/filters/color_darken.d.ts +2 -0
- package/dist/src/liquid/filters/color_desaturate.d.ts +2 -0
- package/dist/src/liquid/filters/color_difference.d.ts +2 -0
- package/dist/src/liquid/filters/color_extract.d.ts +4 -0
- package/dist/src/liquid/filters/color_lighten.d.ts +2 -0
- package/dist/src/liquid/filters/color_mix.d.ts +2 -0
- package/dist/src/liquid/filters/color_modify.d.ts +4 -0
- package/dist/src/liquid/filters/color_saturate.d.ts +2 -0
- package/dist/src/liquid/filters/color_to_hex.d.ts +2 -0
- package/dist/src/liquid/filters/color_to_hsl.d.ts +2 -0
- package/dist/src/liquid/filters/color_to_rgb.d.ts +2 -0
- package/dist/src/liquid/filters/date.d.ts +10 -0
- package/dist/src/liquid/filters/default_errors.d.ts +2 -0
- package/dist/src/liquid/filters/font_face.d.ts +2 -0
- package/dist/src/liquid/filters/font_modify.d.ts +3 -0
- package/dist/src/liquid/filters/font_url.d.ts +2 -0
- package/dist/src/liquid/filters/format_address.d.ts +6 -0
- package/dist/src/liquid/filters/image_tag.d.ts +2 -0
- package/dist/src/liquid/filters/image_url.d.ts +6 -0
- package/dist/src/liquid/filters/index.d.ts +88 -0
- package/dist/src/liquid/filters/json.d.ts +2 -0
- package/dist/src/liquid/filters/json_pretty.d.ts +2 -0
- package/dist/src/liquid/filters/money.d.ts +2 -0
- package/dist/src/liquid/filters/money_with_currency.d.ts +2 -0
- package/dist/src/liquid/filters/money_without_currency.d.ts +2 -0
- package/dist/src/liquid/filters/money_without_trailing_zeros.d.ts +2 -0
- package/dist/src/liquid/filters/shopify/default_pagination.d.ts +3 -0
- package/dist/src/liquid/filters/shopify/hex_to_rgba.d.ts +2 -0
- package/dist/src/liquid/filters/shopify/item_count_for_variant.d.ts +6 -0
- package/dist/src/liquid/filters/shopify/payment_button.d.ts +2 -0
- package/dist/src/liquid/filters/shopify/payment_terms.d.ts +2 -0
- package/dist/src/liquid/filters/shopify/placeholder-svgs/blog-apparel-1.d.ts +2 -0
- package/dist/src/liquid/filters/shopify/placeholder-svgs/blog-apparel-2.d.ts +2 -0
- package/dist/src/liquid/filters/shopify/placeholder-svgs/blog-apparel-3.d.ts +2 -0
- package/dist/src/liquid/filters/shopify/placeholder-svgs/collection-1.d.ts +2 -0
- package/dist/src/liquid/filters/shopify/placeholder-svgs/collection-2.d.ts +2 -0
- package/dist/src/liquid/filters/shopify/placeholder-svgs/collection-3.d.ts +2 -0
- package/dist/src/liquid/filters/shopify/placeholder-svgs/collection-4.d.ts +2 -0
- package/dist/src/liquid/filters/shopify/placeholder-svgs/collection-5.d.ts +2 -0
- package/dist/src/liquid/filters/shopify/placeholder-svgs/collection-6.d.ts +2 -0
- package/dist/src/liquid/filters/shopify/placeholder-svgs/collection-apparel-1.d.ts +2 -0
- package/dist/src/liquid/filters/shopify/placeholder-svgs/collection-apparel-2.d.ts +2 -0
- package/dist/src/liquid/filters/shopify/placeholder-svgs/collection-apparel-3.d.ts +2 -0
- package/dist/src/liquid/filters/shopify/placeholder-svgs/collection-apparel-4.d.ts +2 -0
- package/dist/src/liquid/filters/shopify/placeholder-svgs/detailed-apparel-1.d.ts +2 -0
- package/dist/src/liquid/filters/shopify/placeholder-svgs/hero-apparel-1.d.ts +2 -0
- package/dist/src/liquid/filters/shopify/placeholder-svgs/hero-apparel-2.d.ts +2 -0
- package/dist/src/liquid/filters/shopify/placeholder-svgs/hero-apparel-3.d.ts +2 -0
- package/dist/src/liquid/filters/shopify/placeholder-svgs/image.d.ts +2 -0
- package/dist/src/liquid/filters/shopify/placeholder-svgs/index.d.ts +33 -0
- package/dist/src/liquid/filters/shopify/placeholder-svgs/lifestyle-1.d.ts +2 -0
- package/dist/src/liquid/filters/shopify/placeholder-svgs/lifestyle-2.d.ts +2 -0
- package/dist/src/liquid/filters/shopify/placeholder-svgs/product-1.d.ts +2 -0
- package/dist/src/liquid/filters/shopify/placeholder-svgs/product-2.d.ts +2 -0
- package/dist/src/liquid/filters/shopify/placeholder-svgs/product-3.d.ts +2 -0
- package/dist/src/liquid/filters/shopify/placeholder-svgs/product-4.d.ts +2 -0
- package/dist/src/liquid/filters/shopify/placeholder-svgs/product-5.d.ts +2 -0
- package/dist/src/liquid/filters/shopify/placeholder-svgs/product-6.d.ts +2 -0
- package/dist/src/liquid/filters/shopify/placeholder-svgs/product-apparel-1.d.ts +2 -0
- package/dist/src/liquid/filters/shopify/placeholder-svgs/product-apparel-2.d.ts +2 -0
- package/dist/src/liquid/filters/shopify/placeholder-svgs/product-apparel-3.d.ts +2 -0
- package/dist/src/liquid/filters/shopify/placeholder-svgs/product-apparel-4.d.ts +2 -0
- package/dist/src/liquid/filters/shopify/placeholder_svg_tag.d.ts +2 -0
- package/dist/src/liquid/filters/stylesheet_tag.d.ts +2 -0
- package/dist/src/liquid/filters/time_tag.d.ts +2 -0
- package/dist/src/liquid/filters/translate.d.ts +2 -0
- package/dist/src/liquid/filters/where.d.ts +2 -0
- package/dist/src/liquid/font.d.ts +50 -0
- package/dist/src/liquid/form.d.ts +17 -0
- package/dist/src/liquid/index.d.ts +67 -0
- package/dist/src/liquid/operators.d.ts +4 -0
- package/dist/src/liquid/tags/case.d.ts +3 -0
- package/dist/src/liquid/tags/for.d.ts +3 -0
- package/dist/src/liquid/tags/form.d.ts +3 -0
- package/dist/src/liquid/tags/index.d.ts +28 -0
- package/dist/src/liquid/tags/javascript.d.ts +3 -0
- package/dist/src/liquid/tags/layout.d.ts +3 -0
- package/dist/src/liquid/tags/paginate.d.ts +3 -0
- package/dist/src/liquid/tags/render.d.ts +3 -0
- package/dist/src/liquid/tags/section.d.ts +3 -0
- package/dist/src/liquid/tags/sections.d.ts +3 -0
- package/dist/src/liquid/tags/shopify/include.d.ts +3 -0
- package/dist/src/liquid/tags/shopify/schema.d.ts +3 -0
- package/dist/src/liquid/tags/style.d.ts +3 -0
- package/dist/src/liquid/utils.d.ts +50 -0
- package/dist/src/menus.d.ts +27 -0
- package/dist/src/products.d.ts +9 -0
- package/dist/src/resources.d.ts +99 -0
- package/dist/src/theme.d.ts +127 -0
- package/dist/src/utils/index.d.ts +19 -0
- package/dist/src/utils/md5.d.ts +1 -0
- package/dist/types/shopify.d.ts +126 -0
- package/dist/types/swell.d.ts +341 -0
- package/package.json +1 -1
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import SwellJS from 'swell-js';
|
|
2
|
+
import { Cache } from './cache';
|
|
3
|
+
export * from './resources';
|
|
4
|
+
import type { SwellAppConfig, SwellErrorOptions, SwellMenu, SwellData, CFThemeEnv } from '../types/swell';
|
|
5
|
+
export declare class Swell {
|
|
6
|
+
url: URL;
|
|
7
|
+
headers: SwellData;
|
|
8
|
+
swellHeaders: SwellData;
|
|
9
|
+
queryParams: SwellData;
|
|
10
|
+
workerEnv?: CFThemeEnv;
|
|
11
|
+
config?: SwellAppConfig;
|
|
12
|
+
backend?: SwellBackendAPI;
|
|
13
|
+
storefront: typeof SwellJS;
|
|
14
|
+
instanceId: string;
|
|
15
|
+
isPreview: boolean;
|
|
16
|
+
isEditor: boolean;
|
|
17
|
+
sentResponse: boolean;
|
|
18
|
+
static cache: Map<string, Cache>;
|
|
19
|
+
constructor(params: {
|
|
20
|
+
url: URL | string;
|
|
21
|
+
config?: SwellAppConfig;
|
|
22
|
+
headers?: SwellData;
|
|
23
|
+
swellHeaders?: SwellData;
|
|
24
|
+
serverHeaders?: Headers | SwellData;
|
|
25
|
+
queryParams?: URLSearchParams | SwellData;
|
|
26
|
+
workerEnv?: any;
|
|
27
|
+
getCookie?: (name: string) => string;
|
|
28
|
+
setCookie?: (name: string, value: string, options: any) => void;
|
|
29
|
+
[key: string]: any;
|
|
30
|
+
});
|
|
31
|
+
static formatHeaders(serverHeaders?: Headers | SwellData): {
|
|
32
|
+
headers: SwellData;
|
|
33
|
+
swellHeaders: SwellData;
|
|
34
|
+
};
|
|
35
|
+
static formatQueryParams(queryParams?: URLSearchParams | SwellData): SwellData;
|
|
36
|
+
getClientProps(): {
|
|
37
|
+
url: URL;
|
|
38
|
+
headers: SwellData;
|
|
39
|
+
swellHeaders: SwellData;
|
|
40
|
+
queryParams: SwellData;
|
|
41
|
+
instanceId: string;
|
|
42
|
+
isPreview: boolean;
|
|
43
|
+
isEditor: boolean;
|
|
44
|
+
cache: [string, any][];
|
|
45
|
+
storefrontSettingStates: {
|
|
46
|
+
state: any;
|
|
47
|
+
menuState: any;
|
|
48
|
+
paymentState: any;
|
|
49
|
+
subscriptionState: any;
|
|
50
|
+
sessionState: any;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
getStorefrontInstance(params: SwellData): swell;
|
|
54
|
+
isStorefrontRequestCacheable(method: string, url: string): boolean;
|
|
55
|
+
getCacheableStorefrontRequestHandler(storefront: typeof SwellJS): (method: string, url: string, id?: any, data?: any, opt?: any) => Promise<any>;
|
|
56
|
+
getCacheInstance(): Cache;
|
|
57
|
+
setCacheValues(values: Array<any>): void;
|
|
58
|
+
setCachedSync(key: string, args: Array<any>, value: any, timeout?: number, isSync?: boolean): void | Promise<void>;
|
|
59
|
+
getCachedSync(key: string, args?: Array<any> | Function, handler?: Function, timeout?: number, isSync?: boolean): any;
|
|
60
|
+
resolveCacheHandler(cacheInstance: Cache, cacheKey: string, cacheHandler: Function, timeout?: number, isSync?: boolean): any;
|
|
61
|
+
setCached(key: string, args: Array<any>, value: any, timeout?: number): Promise<any>;
|
|
62
|
+
getCached(key: string, args: Array<any> | Function, handler?: Function, timeout?: number): Promise<any>;
|
|
63
|
+
getCachedResource(key: string, args: Array<any> | Function, handler?: Function, timeout?: number): Promise<any>;
|
|
64
|
+
clearCache(): void;
|
|
65
|
+
getAppSettings(): Promise<SwellData>;
|
|
66
|
+
getStorefrontSettings(): Promise<SwellData>;
|
|
67
|
+
getStorefrontMenus(): SwellMenu[];
|
|
68
|
+
get(...args: Parameters<SwellBackendAPI['get']>): Promise<SwellData> | undefined;
|
|
69
|
+
put(...args: Parameters<SwellBackendAPI['put']>): Promise<SwellData> | undefined;
|
|
70
|
+
post(...args: Parameters<SwellBackendAPI['post']>): Promise<SwellData> | undefined;
|
|
71
|
+
delete(...args: Parameters<SwellBackendAPI['delete']>): Promise<SwellData> | undefined;
|
|
72
|
+
}
|
|
73
|
+
export declare class SwellBackendAPI {
|
|
74
|
+
apiHost: string;
|
|
75
|
+
apiAuth: string;
|
|
76
|
+
constructor({ storeId, accessToken, apiHost, }: {
|
|
77
|
+
storeId: string;
|
|
78
|
+
accessToken: string;
|
|
79
|
+
apiHost?: string;
|
|
80
|
+
});
|
|
81
|
+
makeRequest(method: string, url: string, data?: object): Promise<any>;
|
|
82
|
+
stringifyQuery(queryObject: object, prefix?: string): string;
|
|
83
|
+
get(url: string, query?: SwellData): Promise<SwellData>;
|
|
84
|
+
put(url: string, data: SwellData): Promise<SwellData>;
|
|
85
|
+
post(url: string, data: SwellData): Promise<SwellData>;
|
|
86
|
+
delete(url: string, data?: SwellData): Promise<SwellData>;
|
|
87
|
+
}
|
|
88
|
+
export declare class SwellError extends Error {
|
|
89
|
+
status: number;
|
|
90
|
+
constructor(message: string, options?: SwellErrorOptions);
|
|
91
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { CFWorkerKV } from 'types/swell';
|
|
2
|
+
export declare class Cache {
|
|
3
|
+
private map;
|
|
4
|
+
private kvStore?;
|
|
5
|
+
private timeoutDefault;
|
|
6
|
+
constructor(kvStore?: CFWorkerKV, timeoutDefault?: number);
|
|
7
|
+
setValues(values: Array<any>): void;
|
|
8
|
+
getValues(): [string, any][];
|
|
9
|
+
get(key: string): Promise<any>;
|
|
10
|
+
getSync(key: string): any;
|
|
11
|
+
set(key: string, value: any, timeout?: number): Promise<void>;
|
|
12
|
+
setSync(key: string, value: any, timeout?: number): void;
|
|
13
|
+
delete(key: string): Promise<void>;
|
|
14
|
+
deleteSync(key: string): void;
|
|
15
|
+
has(key: string): Promise<any>;
|
|
16
|
+
hasSync(key: string): boolean;
|
|
17
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Swell, SwellStorefrontCollection, SwellStorefrontRecord } from './api';
|
|
2
|
+
import type { SwellData } from '../types/swell';
|
|
3
|
+
export declare function getCategories(swell: Swell, query?: SwellData): SwellStorefrontCollection;
|
|
4
|
+
export declare function getCategory(swell: Swell, id: string, query?: SwellData): SwellStorefrontRecord;
|
|
5
|
+
export declare function getCategoryWithProducts(swell: Swell, id: string, query?: SwellData): Promise<SwellStorefrontRecord>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ShopifySectionBlockSchema, ShopifySectionPresetSchema, ShopifySectionSchema, ShopifySettingSchema, ShopifySettingsData, ShopifySettingSection, ShopifySettingsSchema } from 'types/shopify';
|
|
2
|
+
import type { ThemeBlockSchema, ThemeEditorSchema, ThemePresetSchema, ThemeSectionSchema, ThemeSettingFieldSchema, ThemeSettings, ThemeSettingSectionSchema } from 'types/swell';
|
|
3
|
+
export declare function convertShopifySettingsSchema(settingsSchema: ShopifySettingsSchema): ThemeEditorSchema;
|
|
4
|
+
export declare function convertShopifySettingsData(settingsData: ShopifySettingsData): ThemeSettings;
|
|
5
|
+
export declare function convertShopifySettingsPresets(settingsData: ShopifySettingsData): ThemePresetSchema[];
|
|
6
|
+
export declare function convertShopifySectionSchema(sectionSchema: ShopifySectionSchema): ThemeSectionSchema;
|
|
7
|
+
export declare function shopifySchemaBlockToSwellBlockSchema(block: ShopifySectionBlockSchema): ThemeBlockSchema;
|
|
8
|
+
export declare function shopifySchemaPresetToSwellPresetSchema(preset: ShopifySectionPresetSchema): ThemePresetSchema;
|
|
9
|
+
export declare function shopifySchemaSectionToSwellSettingSection(section: ShopifySettingSection): ThemeSettingSectionSchema;
|
|
10
|
+
export declare function shopifySchemaSettingToSwellSettingField(setting: ShopifySettingSchema): ThemeSettingFieldSchema;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function shopifyFontToThemeFront(shopifyFontSetting: string): string | null;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { StorefrontResource } from '../../resources';
|
|
2
|
+
import { ShopifyCompatibility } from '../shopify';
|
|
3
|
+
import { ShopifyResource } from './resource';
|
|
4
|
+
import type { SwellRecord } from 'types/swell';
|
|
5
|
+
export default function ShopifyAddress(instance: ShopifyCompatibility, address: StorefrontResource | SwellRecord): ShopifyResource;
|
|
6
|
+
export declare function ShopifyCountry(_instance: ShopifyCompatibility, countryCode: string): ShopifyResource;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { StorefrontResource } from '../../resources';
|
|
2
|
+
import { ShopifyCompatibility } from '../shopify';
|
|
3
|
+
import { ShopifyResource } from './resource';
|
|
4
|
+
import type { SwellRecord } from 'types/swell';
|
|
5
|
+
export default function ShopifyArticle(instance: ShopifyCompatibility, blog: StorefrontResource | SwellRecord, blogCategory?: StorefrontResource | SwellRecord): ShopifyResource;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { StorefrontResource } from '../../resources';
|
|
2
|
+
import { ShopifyCompatibility } from '../shopify';
|
|
3
|
+
import { ShopifyResource } from './resource';
|
|
4
|
+
import type { SwellRecord } from 'types/swell';
|
|
5
|
+
export default function ShopifyBlog(instance: ShopifyCompatibility, blogCategory: StorefrontResource | SwellRecord): ShopifyResource;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { StorefrontResource } from '../../resources';
|
|
2
|
+
import { ShopifyCompatibility } from '../shopify';
|
|
3
|
+
import { ShopifyResource } from './resource';
|
|
4
|
+
import type { SwellRecord } from 'types/swell';
|
|
5
|
+
export default function ShopifyCart(instance: ShopifyCompatibility, cart: StorefrontResource | SwellRecord): ShopifyResource;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { StorefrontResource } from '../../resources';
|
|
2
|
+
import { ShopifyCompatibility } from '../shopify';
|
|
3
|
+
import { ShopifyResource } from './resource';
|
|
4
|
+
import type { SwellRecord } from 'types/swell';
|
|
5
|
+
export default function ShopifyCollection(instance: ShopifyCompatibility, category: StorefrontResource | SwellRecord): ShopifyResource;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { StorefrontResource } from '../../resources';
|
|
2
|
+
import { ShopifyCompatibility } from '../shopify';
|
|
3
|
+
import { ShopifyResource } from './resource';
|
|
4
|
+
import type { SwellRecord } from 'types/swell';
|
|
5
|
+
export default function ShopifyCustomer(instance: ShopifyCompatibility, account: StorefrontResource | SwellRecord): ShopifyResource;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ShopifyCompatibility } from '../shopify';
|
|
2
|
+
import { ShopifyResource } from './resource';
|
|
3
|
+
import type { SwellData, SwellRecord } from 'types/swell';
|
|
4
|
+
export default function ShopifyFilter(instance: ShopifyCompatibility, filter: SwellRecord): ShopifyResource;
|
|
5
|
+
export declare function ShopifyFilterValue(instance: ShopifyCompatibility, filterOption: SwellData, filter: SwellRecord, paramSuffix?: string): ShopifyResource;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ShopifyCompatibility } from '../shopify';
|
|
2
|
+
import { ThemeForm } from '../../liquid/form';
|
|
3
|
+
import { ShopifyResource } from './resource';
|
|
4
|
+
export default function ShopifyForm(_instance: ShopifyCompatibility, form: ThemeForm): ShopifyResource;
|
|
5
|
+
export declare class ShopifyFormError {
|
|
6
|
+
code: string;
|
|
7
|
+
message: string;
|
|
8
|
+
field_name: string;
|
|
9
|
+
field_label: string;
|
|
10
|
+
type: string;
|
|
11
|
+
constructor(error: any);
|
|
12
|
+
getShopifyErrorType(error: any): "email" | "password" | "form";
|
|
13
|
+
valueOf(): string;
|
|
14
|
+
toString(): string;
|
|
15
|
+
}
|
|
16
|
+
export declare class ShopifyFormErrors {
|
|
17
|
+
private errors;
|
|
18
|
+
private pointer;
|
|
19
|
+
messages: ShopifyFormErrorArrayByType;
|
|
20
|
+
translated_fields: ShopifyFormErrorArrayByType;
|
|
21
|
+
constructor(errors: any);
|
|
22
|
+
[Symbol.iterator](): Generator<any, void, undefined>;
|
|
23
|
+
some(callbackFn: any, thisArg?: any): boolean;
|
|
24
|
+
}
|
|
25
|
+
export declare class ShopifyFormErrorArrayByType {
|
|
26
|
+
values: any[];
|
|
27
|
+
constructor(errors: any, values: any);
|
|
28
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { StorefrontResource } from '../../resources';
|
|
2
|
+
import { ShopifyCompatibility } from '../shopify';
|
|
3
|
+
import { ShopifyResource } from './resource';
|
|
4
|
+
import type { SwellData, SwellRecord } from 'types/swell';
|
|
5
|
+
export default function ShopifyImage(_instance: ShopifyCompatibility, image: SwellData, product?: StorefrontResource | SwellRecord, variant?: StorefrontResource | SwellRecord): ShopifyResource;
|
|
6
|
+
export declare function ShopifyImageSrc(file: SwellData): ShopifyResource;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ShopifyCompatibility } from '../shopify';
|
|
2
|
+
import { DeferredShopifyResource, ShopifyResource } from './resource';
|
|
3
|
+
import ShopifyArticle from './article';
|
|
4
|
+
import ShopifyBlog from './blog';
|
|
5
|
+
import ShopifyCart from './cart';
|
|
6
|
+
import ShopifyCollection from './collection';
|
|
7
|
+
import ShopifyCollections from './collections';
|
|
8
|
+
import ShopifyCustomer from './customer';
|
|
9
|
+
import ShopifyFont from './font';
|
|
10
|
+
import ShopifyForm from './form';
|
|
11
|
+
import ShopifyOrder from './order';
|
|
12
|
+
import ShopifyPaginate from './paginate';
|
|
13
|
+
import ShopifyPredictiveSearch from './predictive_search';
|
|
14
|
+
import ShopifyProduct from './product';
|
|
15
|
+
import ShopifyPage from './page';
|
|
16
|
+
import ShopifyLink from './link';
|
|
17
|
+
import ShopifyLocalization from './localization';
|
|
18
|
+
import ShopifySearch from './search';
|
|
19
|
+
import ShopifyVariant from './variant';
|
|
20
|
+
import type { ThemeFont } from '../../liquid/font';
|
|
21
|
+
import type { ThemeForm } from '../../liquid/form';
|
|
22
|
+
import type { SwellMenu, SwellData } from '../../../types/swell';
|
|
23
|
+
export { DeferredShopifyResource, ShopifyResource, ShopifyArticle, ShopifyBlog, ShopifyCart, ShopifyCollection, ShopifyCollections, ShopifyCustomer, ShopifyFont, ShopifyForm, ShopifyOrder, ShopifyPaginate, ShopifyPredictiveSearch, ShopifyProduct, ShopifyPage, ShopifyLink, ShopifyLocalization, ShopifySearch, ShopifyVariant, };
|
|
24
|
+
export declare function adaptShopifyMenuData(instance: ShopifyCompatibility, menu: SwellMenu): SwellData;
|
|
25
|
+
export declare function adaptShopifyFontData(instance: ShopifyCompatibility, font: ThemeFont): SwellData;
|
|
26
|
+
export declare function adaptShopifyFormData(instance: ShopifyCompatibility, form: ThemeForm): SwellData;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { StorefrontResource } from '../../resources';
|
|
2
|
+
import { ShopifyCompatibility } from '../shopify';
|
|
3
|
+
import { ShopifyResource } from './resource';
|
|
4
|
+
import type { SwellData, SwellRecord } from 'types/swell';
|
|
5
|
+
export default function ShopifyLineItem(instance: ShopifyCompatibility, item: StorefrontResource | SwellRecord, cart: StorefrontResource | SwellRecord, options?: SwellData): ShopifyResource;
|
|
6
|
+
export declare function countItemQuantity(items: any[], quantityField?: string): any;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ShopifyCompatibility } from '../shopify';
|
|
2
|
+
import { ShopifyResource } from './resource';
|
|
3
|
+
import type { SwellMenu, SwellMenuItem } from 'types/swell';
|
|
4
|
+
export default function ShopifyLink(instance: ShopifyCompatibility, parent: SwellMenu | SwellMenuItem, menuItem: SwellMenuItem): ShopifyResource;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ShopifyCompatibility } from '../shopify';
|
|
2
|
+
import { ShopifyResource } from './resource';
|
|
3
|
+
import type { SwellData } from 'types/swell';
|
|
4
|
+
export default function ShopifyLocalization(_instance: ShopifyCompatibility, store: SwellData, request: SwellData): ShopifyResource;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { StorefrontResource } from '../../resources';
|
|
2
|
+
import { ShopifyCompatibility } from '../shopify';
|
|
3
|
+
import { ShopifyResource } from './resource';
|
|
4
|
+
import type { SwellRecord } from 'types/swell';
|
|
5
|
+
export default function ShopifyOrder(instance: ShopifyCompatibility, order: StorefrontResource | SwellRecord, account?: StorefrontResource | SwellRecord): ShopifyResource;
|
|
6
|
+
export declare function shopifyFinancialStatus(order: any): "refund_due" | "partially_paid" | "partially_refunded" | "refunded" | "paid" | "authorized" | "unpaid" | "complete";
|
|
7
|
+
export declare function shopifyFulfillmentStatus(order: any): "complete" | "canceled" | "on_hold" | "returned" | "rartially_returned" | "fulfilled" | "partially_fulfilled" | "unfulfilled";
|
|
8
|
+
export declare function shopifyFinancialStatusLabel(order: any): string;
|
|
9
|
+
export declare function shopifyFulfillmentStatusLabel(order: any): string;
|
|
10
|
+
export declare function refundDue(order: any): any;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ShopifyCompatibility } from '../shopify';
|
|
2
|
+
import { SwellStorefrontPagination } from '../../resources';
|
|
3
|
+
import { ShopifyResource } from './resource';
|
|
4
|
+
export default function ShopifyPaginate(instance: ShopifyCompatibility, pagination: SwellStorefrontPagination): ShopifyResource;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ShopifyCompatibility } from '../shopify';
|
|
2
|
+
import { StorefrontResource } from '../../resources';
|
|
3
|
+
import { ShopifyResource } from './resource';
|
|
4
|
+
export default function ShopifyPredictiveSearch(instance: ShopifyCompatibility, search: StorefrontResource): ShopifyResource;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { StorefrontResource } from '../../resources';
|
|
2
|
+
import { ShopifyCompatibility } from '../shopify';
|
|
3
|
+
import { ShopifyResource } from './resource';
|
|
4
|
+
import type { SwellData, SwellRecord } from 'types/swell';
|
|
5
|
+
export default function ShopifyProduct(instance: ShopifyCompatibility, product: StorefrontResource | SwellRecord, depth?: number): ShopifyResource | null;
|
|
6
|
+
export declare function ShopifyProductOption(values: SwellData): ShopifyResource;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ShopifyCompatibility } from '../shopify';
|
|
2
|
+
export declare class ShopifyResource {
|
|
3
|
+
props: {
|
|
4
|
+
[key: string]: any;
|
|
5
|
+
};
|
|
6
|
+
stringProp?: string;
|
|
7
|
+
linkProps?: string[];
|
|
8
|
+
constructor(props: any, stringProp?: string, linkProps?: string[]);
|
|
9
|
+
valueOf(): any;
|
|
10
|
+
clone(): ShopifyResource;
|
|
11
|
+
}
|
|
12
|
+
export declare class DeferredShopifyResource<T> {
|
|
13
|
+
private handler;
|
|
14
|
+
private result;
|
|
15
|
+
constructor(handler: () => Promise<T> | T);
|
|
16
|
+
resolve(): Promise<T | (T & {}) | null>;
|
|
17
|
+
}
|
|
18
|
+
export declare function defer<T>(handler: () => Promise<T> | T): DeferredShopifyResource<T>;
|
|
19
|
+
export declare function isResolvable(asyncProp: unknown): boolean;
|
|
20
|
+
export declare function resolveAsyncProp<R>(asyncProp: unknown): Promise<R>;
|
|
21
|
+
export declare function handleDeferredProp<T, R>(asyncProp: unknown, handler: (...value: R[]) => T): Promise<T | null>;
|
|
22
|
+
export declare function deferWith<T, R>(asyncProp: unknown, handler: (...value: R[]) => T): DeferredShopifyResource<T | null>;
|
|
23
|
+
export declare function deferSwellCollectionWithShopifyResults(instance: ShopifyCompatibility, asyncProp: any, key: string, ShopifyObject: any, handler?: Function): DeferredShopifyResource<any>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { StorefrontResource } from '../../resources';
|
|
2
|
+
import { ShopifyCompatibility } from '../shopify';
|
|
3
|
+
import { ShopifyResource } from './resource';
|
|
4
|
+
import type { SwellRecord } from 'types/swell';
|
|
5
|
+
export default function ShopifyVariant(instance: ShopifyCompatibility, variant: StorefrontResource | SwellRecord, productIn?: StorefrontResource | SwellRecord, depth?: number): ShopifyResource;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { Swell } from '../api';
|
|
2
|
+
import { SwellTheme } from '../theme';
|
|
3
|
+
import { ThemeFont } from '../liquid/font';
|
|
4
|
+
import { ThemeForm } from '../liquid/form';
|
|
5
|
+
import type { ThemeGlobals, ThemeSettings, ThemePresetSchema, ThemeEditorSchema, ThemeSectionSchema, SwellData, SwellMenu, SwellRecord } from '../../types/swell';
|
|
6
|
+
import type { ShopifySettingsData, ShopifySettingsSchema, ShopifySectionSchema, ShopifyPageResourceMap, ShopifyObjectResourceMap, ShopifyFormResourceMap, ShopifyQueryParamsMap } from '../../types/shopify';
|
|
7
|
+
export declare class ShopifyCompatibility {
|
|
8
|
+
theme: SwellTheme;
|
|
9
|
+
swell: Swell;
|
|
10
|
+
pageId?: string;
|
|
11
|
+
pageResourceMap: ShopifyPageResourceMap;
|
|
12
|
+
objectResourceMap: ShopifyObjectResourceMap;
|
|
13
|
+
formResourceMap: ShopifyFormResourceMap;
|
|
14
|
+
queryParamsMap: ShopifyQueryParamsMap;
|
|
15
|
+
editorLocaleConfig: {
|
|
16
|
+
[key: string]: any;
|
|
17
|
+
} | undefined;
|
|
18
|
+
constructor(theme: SwellTheme);
|
|
19
|
+
adaptGlobals(globals: ThemeGlobals): void;
|
|
20
|
+
adaptPageData(pageData: SwellData): void;
|
|
21
|
+
adaptObjectData(objectData: SwellData): void;
|
|
22
|
+
adaptQueryParams(): void;
|
|
23
|
+
getAdaptedFormType(shopifyType: string): string | undefined;
|
|
24
|
+
getAdaptedFormClientParams(formType: string, scope: SwellData, arg?: any): Promise<SwellData | undefined>;
|
|
25
|
+
getAdaptedFormClientHtml(formType: string, scope: SwellData, arg?: any): Promise<string | undefined>;
|
|
26
|
+
getAdaptedFormServerParams(formType: string, context: SwellData): Promise<SwellData | undefined>;
|
|
27
|
+
getAdaptedFormServerResponse(formType: string, context: SwellData): Promise<SwellData | undefined>;
|
|
28
|
+
getShopData({ store }: ThemeGlobals): {};
|
|
29
|
+
getContentForHeader(): string;
|
|
30
|
+
getMenuData(menu: SwellMenu): SwellData;
|
|
31
|
+
getFontData(font: ThemeFont): SwellData;
|
|
32
|
+
getFormData(form: ThemeForm): SwellData;
|
|
33
|
+
getFontFromShopifySetting(fontSetting: string): string | null;
|
|
34
|
+
getThemeConfig(settingsData: ShopifySettingsData): ThemeSettings;
|
|
35
|
+
getPresetsConfig(settingsData: ShopifySettingsData): ThemePresetSchema[];
|
|
36
|
+
getEditorConfig(settingsSchema: ShopifySettingsSchema): ThemeEditorSchema;
|
|
37
|
+
getSectionConfigSchema(sectionSchema: ShopifySectionSchema): ThemeSectionSchema;
|
|
38
|
+
getLocaleConfig(theme: SwellTheme, localeCode?: string, suffix?: string): Promise<any>;
|
|
39
|
+
getEditorLocaleConfig(theme: SwellTheme, localeCode: string): Promise<any>;
|
|
40
|
+
renderSchemaTranslations(theme: SwellTheme, schema: SwellData, localeCode?: string): Promise<any>;
|
|
41
|
+
renderSchemaTranslationValue(theme: SwellTheme, schemaValue: any, localCode: string, editorLocaleConfig: any): Promise<any>;
|
|
42
|
+
getPageType(pageId: string): string;
|
|
43
|
+
getPageRouteUrl(pageId: string): string;
|
|
44
|
+
getPageRoutes(): {
|
|
45
|
+
account_addresses_url: string;
|
|
46
|
+
account_login_url: string;
|
|
47
|
+
account_logout_url: string;
|
|
48
|
+
account_recover_url: string;
|
|
49
|
+
account_register_url: string;
|
|
50
|
+
account_url: string;
|
|
51
|
+
all_products_collection_url: string;
|
|
52
|
+
cart_add_url: string;
|
|
53
|
+
cart_change_url: string;
|
|
54
|
+
cart_clear_url: string;
|
|
55
|
+
cart_update_url: string;
|
|
56
|
+
cart_url: string;
|
|
57
|
+
collections_url: string;
|
|
58
|
+
predictive_search_url: string;
|
|
59
|
+
product_recommendations_url: string;
|
|
60
|
+
root_url: string;
|
|
61
|
+
search_url: string;
|
|
62
|
+
};
|
|
63
|
+
getLocalizationObject(store: SwellData, request: SwellData): import("./shopify-objects").ShopifyResource;
|
|
64
|
+
getAdaptedPageUrl(url: string): string | undefined;
|
|
65
|
+
getThemeFilePath(type: string, name: string): string;
|
|
66
|
+
getPageResourceMap(): ShopifyPageResourceMap;
|
|
67
|
+
getObjectResourceMap(): ShopifyObjectResourceMap;
|
|
68
|
+
getFormResourceMap(): ShopifyFormResourceMap;
|
|
69
|
+
getQueryParamsMap(): ShopifyQueryParamsMap;
|
|
70
|
+
getAllCountryOptionTags(geoSettings: SwellRecord): any;
|
|
71
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const LANG_TO_COUNTRY_CODES: Record<string, string | undefined>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Swell } from './api';
|
|
2
|
+
import type { SwellData } from 'types/swell';
|
|
3
|
+
export declare function getContentModel(swell: Swell, name: string): Promise<any>;
|
|
4
|
+
export declare function getContentList(swell: Swell, type: string, query?: SwellData): Promise<any>;
|
|
5
|
+
export declare function getContentEntry(swell: Swell, type: string, id: string, query?: SwellData): Promise<any>;
|
|
6
|
+
export declare function getPage(swell: Swell, id: string, query?: object): Promise<any>;
|
|
7
|
+
export declare function getBlogs(swell: Swell, query?: object): Promise<any>;
|
|
8
|
+
export declare function getBlog(swell: Swell, id: string, query?: object): Promise<any>;
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { SwellTheme } from '../theme';
|
|
2
|
+
import type { Backend } from '@swell/easyblocks-core';
|
|
3
|
+
import type { SwellThemeConfig, ThemeGlobals, ThemeLayoutSectionGroupConfig, ThemePageSectionSchema, ThemeSectionConfig } from 'types/swell';
|
|
4
|
+
export declare function getEasyblocksPropsFromThemeConfigs(theme: SwellTheme, themeConfigs: SwellThemeConfig[], pageId: string): Promise<{
|
|
5
|
+
pageTemplate: string | import("types/swell").ThemePageTemplateConfig;
|
|
6
|
+
allSections: import("types/swell").ThemeSectionSchema[];
|
|
7
|
+
pageSections: ThemeSectionConfig[];
|
|
8
|
+
layoutSectionGroups: ThemeLayoutSectionGroupConfig[];
|
|
9
|
+
}>;
|
|
10
|
+
export declare function getEasyblocksPagePropsWithConfigs(themeGlobals: ThemeGlobals, allSections: ThemePageSectionSchema[], pageSections: ThemeSectionConfig[], layoutSectionGroups: ThemeLayoutSectionGroupConfig[], pageId: string): {
|
|
11
|
+
easyblocksConfig: {
|
|
12
|
+
components: any[];
|
|
13
|
+
templates: any[];
|
|
14
|
+
backend: Backend;
|
|
15
|
+
hideCloseButton: boolean;
|
|
16
|
+
allowSave: boolean;
|
|
17
|
+
readOnly: boolean;
|
|
18
|
+
locales: {
|
|
19
|
+
code: string;
|
|
20
|
+
isDefault: boolean;
|
|
21
|
+
}[];
|
|
22
|
+
types: {
|
|
23
|
+
swell_boolean: {
|
|
24
|
+
type: string;
|
|
25
|
+
widget: {
|
|
26
|
+
id: string;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
swell_color: {
|
|
30
|
+
type: string;
|
|
31
|
+
widget: {
|
|
32
|
+
id: string;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
swell_color_scheme: {
|
|
36
|
+
type: string;
|
|
37
|
+
widget: {
|
|
38
|
+
id: string;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
swell_color_scheme_group: {
|
|
42
|
+
type: string;
|
|
43
|
+
widget: {
|
|
44
|
+
id: string;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
swell_font: {
|
|
48
|
+
type: string;
|
|
49
|
+
widget: {
|
|
50
|
+
id: string;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
swell_header: {
|
|
54
|
+
type: string;
|
|
55
|
+
widget: {
|
|
56
|
+
id: string;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
swell_icon: {
|
|
60
|
+
type: string;
|
|
61
|
+
widget: {
|
|
62
|
+
id: string;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
swell_lookup: {
|
|
66
|
+
type: string;
|
|
67
|
+
widget: {
|
|
68
|
+
id: string;
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
swell_menu: {
|
|
72
|
+
type: string;
|
|
73
|
+
widget: {
|
|
74
|
+
id: string;
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
swell_url: {
|
|
78
|
+
type: string;
|
|
79
|
+
widget: {
|
|
80
|
+
id: string;
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
swell_number: {
|
|
84
|
+
type: string;
|
|
85
|
+
widget: {
|
|
86
|
+
id: string;
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
swell_select: {
|
|
90
|
+
type: string;
|
|
91
|
+
widget: {
|
|
92
|
+
id: string;
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
swell_short_text: {
|
|
96
|
+
type: string;
|
|
97
|
+
widget: {
|
|
98
|
+
id: string;
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
swell_long_text: {
|
|
102
|
+
type: string;
|
|
103
|
+
widget: {
|
|
104
|
+
id: string;
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
swell_editor: {
|
|
108
|
+
type: string;
|
|
109
|
+
widget: {
|
|
110
|
+
id: string;
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
swell_file: {
|
|
114
|
+
type: string;
|
|
115
|
+
widget: {
|
|
116
|
+
id: string;
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
swell_image: {
|
|
120
|
+
type: string;
|
|
121
|
+
widget: {
|
|
122
|
+
id: string;
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
};
|
|
126
|
+
tokens: {
|
|
127
|
+
colors: never[];
|
|
128
|
+
fonts: never[];
|
|
129
|
+
};
|
|
130
|
+
};
|
|
131
|
+
};
|
|
132
|
+
export declare function getEasyblocksComponentDefinitions(props: {
|
|
133
|
+
allSections: ThemePageSectionSchema[];
|
|
134
|
+
layoutSectionGroups: ThemeLayoutSectionGroupConfig[];
|
|
135
|
+
}, getComponent: (type: string, data?: any) => any): any;
|
|
136
|
+
export declare function getEasyblocksBackend(): Backend;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { SwellTheme } from '../theme';
|
|
2
|
+
import type { SwellRecord, SwellThemeConfig, ThemeLayoutSectionGroupConfig, ThemeSectionConfig, ThemeSectionGroup, ThemeSectionSchema, ThemeSettingFieldSchema } from 'types/swell';
|
|
3
|
+
export declare function getPageTemplate(theme: SwellTheme, pageId: string): Promise<string | import("types/swell").ThemePageTemplateConfig>;
|
|
4
|
+
export declare function getAllSections(theme: SwellTheme, themeConfigs: SwellThemeConfig[]): Promise<ThemeSectionSchema[]>;
|
|
5
|
+
export declare function getPageSections(theme: SwellTheme, sectionGroup: ThemeSectionGroup | SwellRecord, getSectionSchemaHandler?: any): Promise<ThemeSectionConfig[]>;
|
|
6
|
+
export declare function getLayoutSectionGroups(theme: SwellTheme, themeConfigs: SwellThemeConfig[]): Promise<ThemeLayoutSectionGroupConfig[]>;
|
|
7
|
+
export declare function getSectionSchema(theme: SwellTheme, sectionName: string): Promise<ThemeSectionSchema | undefined>;
|
|
8
|
+
export declare function renderTemplateSchema(theme: SwellTheme, config: SwellThemeConfig): Promise<any>;
|
|
9
|
+
export declare function filterSectionConfig(config: SwellRecord, themeConfigs: SwellThemeConfig[]): boolean;
|
|
10
|
+
export declare function filterAllLayoutSectionGroupConfigs(config: SwellRecord, themeConfigs: SwellThemeConfig[]): any;
|
|
11
|
+
export declare function filterLayoutSectionGroupConfig(config: SwellRecord, themeConfigs: SwellThemeConfig[], type: string): boolean;
|
|
12
|
+
export declare function isJsonOrLiquidConfig(config: SwellRecord, themeConfigs: SwellThemeConfig[]): boolean;
|
|
13
|
+
export declare function schemaToEasyblocksProps(field: ThemeSettingFieldSchema): {
|
|
14
|
+
type: string;
|
|
15
|
+
description: string | undefined;
|
|
16
|
+
defaultValue: any;
|
|
17
|
+
isLabelHidden: boolean;
|
|
18
|
+
layout: string;
|
|
19
|
+
params: ThemeSettingFieldSchema;
|
|
20
|
+
} | {
|
|
21
|
+
type: string;
|
|
22
|
+
defaultValue: string;
|
|
23
|
+
description: string | undefined;
|
|
24
|
+
isLabelHidden: boolean;
|
|
25
|
+
layout: string;
|
|
26
|
+
params: ThemeSettingFieldSchema;
|
|
27
|
+
};
|
|
28
|
+
export declare function schemaToEasyblocksValue(fields: ThemeSettingFieldSchema[] | undefined, fieldId: string, value: any): any;
|
|
29
|
+
export declare function getThemeSettingsFromProps(props: any, editorSchema: any): any;
|
|
30
|
+
export declare function getSectionSettingsFromProps(props: any, sectionSchema: any): {
|
|
31
|
+
settings: any;
|
|
32
|
+
blocks: any;
|
|
33
|
+
} | {
|
|
34
|
+
settings?: undefined;
|
|
35
|
+
blocks?: undefined;
|
|
36
|
+
};
|