@spiffcommerce/theme-bridge 1.27.0 → 1.27.1-alpha.1
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/configurationTypes-6D808idm.js.map +1 -1
- package/dist/configurationTypes-Bt8NVGKp.cjs.map +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +76 -1
- package/dist/index.js.map +1 -1
- package/dist/plugin.cjs +1 -1
- package/dist/plugin.cjs.map +1 -1
- package/dist/plugin.js +130 -33
- package/dist/plugin.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -12,6 +12,69 @@ interface ThemeConfigurationFile {
|
|
|
12
12
|
* An object that describes information that's configurable by a Partner when they install your theme.
|
|
13
13
|
*/
|
|
14
14
|
configurationSchema?: ThemeConfigurationSchema;
|
|
15
|
+
/**
|
|
16
|
+
* Optional: Settings for how the Spiff Hub displays your theme's configuration fields.
|
|
17
|
+
* If this is not present, all of your fields will be placed in an auto-generated `Misc` page.
|
|
18
|
+
*/
|
|
19
|
+
pageSettings?: ThemeConfigurationPageSettings;
|
|
20
|
+
}
|
|
21
|
+
interface ThemeConfigurationPageSettings {
|
|
22
|
+
/**
|
|
23
|
+
* Settings for each page to display in the Spiff Hub. Use this to group large sections of fields together.
|
|
24
|
+
* Any fields not configured into these pages will be placed in an auto-generated `Misc` page.
|
|
25
|
+
*/
|
|
26
|
+
items: ThemeConfigurationPageItem[];
|
|
27
|
+
/**
|
|
28
|
+
* Optional: configuration for which pages can be reordered.
|
|
29
|
+
* All pages which fall between `start` and `end` (inclusive) will be reorderable by the user.
|
|
30
|
+
*/
|
|
31
|
+
reorderablePageSettings?: {
|
|
32
|
+
/** The key of the first page which can be reordered. */
|
|
33
|
+
start: string;
|
|
34
|
+
/** The key of the final page which can be reordered. */
|
|
35
|
+
end: string;
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
interface ThemeConfigurationPageItem {
|
|
39
|
+
/**
|
|
40
|
+
* An identifier used for the system to reference this page by.
|
|
41
|
+
* You may also use this to reference the page in your theme at runtime.
|
|
42
|
+
*/
|
|
43
|
+
key: string;
|
|
44
|
+
/**
|
|
45
|
+
* The heading to display in the configuration page.
|
|
46
|
+
* This will also be displayed in summary views.
|
|
47
|
+
*/
|
|
48
|
+
title: string;
|
|
49
|
+
/**
|
|
50
|
+
* Optional: A sub-heading to display in the configuration page.
|
|
51
|
+
*/
|
|
52
|
+
subtitle?: string | null;
|
|
53
|
+
/**
|
|
54
|
+
* Groups of configuration fields to be editable on this page.
|
|
55
|
+
*/
|
|
56
|
+
sections: ThemeConfigurationPageSection[];
|
|
57
|
+
/**
|
|
58
|
+
* Whether this page can be disabled/enabled/hidden/visible.
|
|
59
|
+
* Note that fields on page will still be configurable by the user.
|
|
60
|
+
*/
|
|
61
|
+
toggleable: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* When true, this page will not be active by default.
|
|
64
|
+
* Note that if you specify `toggleable: true`, this only acts as a default value.
|
|
65
|
+
*/
|
|
66
|
+
disabled?: boolean;
|
|
67
|
+
}
|
|
68
|
+
interface ThemeConfigurationPageSection {
|
|
69
|
+
/** A heading to group these fields by. */
|
|
70
|
+
title: string;
|
|
71
|
+
/** Optional: Sub-heading to display underneath the heading. */
|
|
72
|
+
subtitle?: string | null;
|
|
73
|
+
/**
|
|
74
|
+
* The `key` names of the fields to display in this section.
|
|
75
|
+
* These **must** be static fields.
|
|
76
|
+
*/
|
|
77
|
+
fields: string[];
|
|
15
78
|
}
|
|
16
79
|
declare enum ThemeFileType {
|
|
17
80
|
Javascript = "Javascript",
|
|
@@ -288,6 +351,7 @@ interface ThemeVersionResource {
|
|
|
288
351
|
updatedAt: string;
|
|
289
352
|
configurationSchema: ThemeConfigurationSchemaResource;
|
|
290
353
|
launchData: ThemeLaunchDataResource;
|
|
354
|
+
pageSettings?: ThemeConfigurationPageSettings;
|
|
291
355
|
}
|
|
292
356
|
interface ThemeConfigurationSchemaResource {
|
|
293
357
|
fields: ThemeConfigurationSchemaFieldResource[];
|
|
@@ -346,6 +410,17 @@ interface ThemeInstallConfigurationResource {
|
|
|
346
410
|
createdAt: string;
|
|
347
411
|
updatedAt: string;
|
|
348
412
|
fields: ThemeInstallConfigurationFieldResource[];
|
|
413
|
+
pageSettings?: ThemeInstallPageSettings;
|
|
414
|
+
}
|
|
415
|
+
/** The user-configured values for the given theme's page settings */
|
|
416
|
+
interface ThemeInstallPageSettings {
|
|
417
|
+
pageOrder?: string[];
|
|
418
|
+
items: ThemeInstallPageSettingsItem[];
|
|
419
|
+
}
|
|
420
|
+
interface ThemeInstallPageSettingsItem {
|
|
421
|
+
key: string;
|
|
422
|
+
/** Only provided if the user actually changed the default value. */
|
|
423
|
+
enabled?: boolean;
|
|
349
424
|
}
|
|
350
425
|
/**
|
|
351
426
|
* Defines the locations at which a conversion attempt can take place.
|
|
@@ -609,4 +684,4 @@ declare function setSpiffDevOptions(container: HTMLElement | string, context: Sp
|
|
|
609
684
|
declare function exampleThemeInstallConfig(opts?: Partial<ThemeInstallConfigurationResource>): ThemeInstallConfigurationResource;
|
|
610
685
|
declare function getDefaultsForSchema(schema: ThemeConfigurationSchema, ...excludeKeys: string[]): ThemeInstallConfigurationFieldResource[];
|
|
611
686
|
|
|
612
|
-
export { type AssetResource, AssetType, type CompleteQuoteMessage, type ConversionConfiguration, type ConversionData, ConversionLocation, CustomSchemaType, FieldType, MetafieldConfigurationEntityType, type MetafieldConfigurationResource, type ProductCollectionResource, type SpiffDevOptions, type SpiffThemeLoader, type ThemeConfigurationConfigurableFields, type ThemeConfigurationFile, type ThemeConfigurationLaunchData, type ThemeConfigurationLaunchDataTargetFile, type ThemeConfigurationSchema, type ThemeConfigurationSchemaCustomSchema, type ThemeConfigurationSchemaCustomSchemaGraphQl, type ThemeConfigurationSchemaCustomSchemaResource, type ThemeConfigurationSchemaField, type ThemeConfigurationSchemaFieldGraphQl, type ThemeConfigurationSchemaFieldResource, type ThemeConfigurationSchemaGraphQl, type ThemeConfigurationSchemaResource, type ThemeContext, type ThemeContextBundle, type ThemeContextBundleOptions, type ThemeContextBundleOptionsExisting, type ThemeContextBundleOptionsNew, type ThemeContextTransaction, type ThemeContextWorkflowOptions, type ThemeContextWorkflowOptionsExternalProduct, type ThemeContextWorkflowOptionsIntegrationProduct, type ThemeContextWorkflowOptionsNewBase, type ThemeContextWorkflowOptionsTransaction, ThemeFileType, type ThemeInstallConfigurationField, type ThemeInstallConfigurationFieldGraphQl, type ThemeInstallConfigurationFieldResource, type ThemeInstallConfigurationResource, type ThemeLaunchDataResource, type ThemeLaunchDataTargetFileResource, type ThemeResource, type ThemeVersionGraphQl, type ThemeVersionResource, exampleThemeInstallConfig, getDefaultsForSchema, setSpiffDevOptions, themeInstallConfigurationFieldsToRecordObject, themeInstallConfigurationGraphQlToResource, themeInstallConfigurationToRecordObject, themeVersionConfigurationGraphQlToResource, themeVersionGraphQlToResource };
|
|
687
|
+
export { type AssetResource, AssetType, type CompleteQuoteMessage, type ConversionConfiguration, type ConversionData, ConversionLocation, CustomSchemaType, FieldType, MetafieldConfigurationEntityType, type MetafieldConfigurationResource, type ProductCollectionResource, type SpiffDevOptions, type SpiffThemeLoader, type ThemeConfigurationConfigurableFields, type ThemeConfigurationFile, type ThemeConfigurationLaunchData, type ThemeConfigurationLaunchDataTargetFile, type ThemeConfigurationPageItem, type ThemeConfigurationPageSection, type ThemeConfigurationPageSettings, type ThemeConfigurationSchema, type ThemeConfigurationSchemaCustomSchema, type ThemeConfigurationSchemaCustomSchemaGraphQl, type ThemeConfigurationSchemaCustomSchemaResource, type ThemeConfigurationSchemaField, type ThemeConfigurationSchemaFieldGraphQl, type ThemeConfigurationSchemaFieldResource, type ThemeConfigurationSchemaGraphQl, type ThemeConfigurationSchemaResource, type ThemeContext, type ThemeContextBundle, type ThemeContextBundleOptions, type ThemeContextBundleOptionsExisting, type ThemeContextBundleOptionsNew, type ThemeContextTransaction, type ThemeContextWorkflowOptions, type ThemeContextWorkflowOptionsExternalProduct, type ThemeContextWorkflowOptionsIntegrationProduct, type ThemeContextWorkflowOptionsNewBase, type ThemeContextWorkflowOptionsTransaction, ThemeFileType, type ThemeInstallConfigurationField, type ThemeInstallConfigurationFieldGraphQl, type ThemeInstallConfigurationFieldResource, type ThemeInstallConfigurationResource, type ThemeInstallPageSettings, type ThemeInstallPageSettingsItem, type ThemeLaunchDataResource, type ThemeLaunchDataTargetFileResource, type ThemeResource, type ThemeVersionGraphQl, type ThemeVersionResource, exampleThemeInstallConfig, getDefaultsForSchema, setSpiffDevOptions, themeInstallConfigurationFieldsToRecordObject, themeInstallConfigurationGraphQlToResource, themeInstallConfigurationToRecordObject, themeVersionConfigurationGraphQlToResource, themeVersionGraphQlToResource };
|