@mercurjs/dashboard-sdk 2.3.8-canary.0 → 2.3.8-canary.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/index.d.cts +23 -3
- package/dist/index.d.ts +23 -3
- package/dist/vite.cjs +2 -2
- package/dist/vite.js +2 -2
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -58,11 +58,31 @@ type CustomFormZone<TModel> = ModelShape<TModel>["formZones"];
|
|
|
58
58
|
* onboarding steps) and for unknown models.
|
|
59
59
|
*/
|
|
60
60
|
type CustomFormTab<TModel, TZone> = TZone extends keyof ModelShape<TModel>["formTabs"] ? ModelShape<TModel>["formTabs"][TZone] : string;
|
|
61
|
-
|
|
61
|
+
/**
|
|
62
|
+
* Onboarding wizard step settings, read only for `zone: "onboarding"`. A tab id
|
|
63
|
+
* the wizard doesn't ship becomes a new step; on a built-in step these override
|
|
64
|
+
* its defaults. Built-in ranks: store 10, address 20, company 30, payment 40.
|
|
65
|
+
*/
|
|
66
|
+
type OnboardingStepOptions = {
|
|
67
|
+
/** Step heading. Required in practice for new steps. */
|
|
68
|
+
label?: string;
|
|
69
|
+
/** Sort position. New steps without a rank go last. */
|
|
70
|
+
rank?: number;
|
|
71
|
+
/** Shows a Skip button on the step. */
|
|
72
|
+
optional?: boolean;
|
|
73
|
+
};
|
|
74
|
+
type CustomFormEntry<TModel> = CustomFormZone<TModel> extends infer TZone ? TZone extends CustomFormZone<TModel> ? ({
|
|
62
75
|
zone: TZone;
|
|
63
76
|
/** TabbedForm tab id, or onboarding wizard step id for `zone: "onboarding"`. */
|
|
64
77
|
tab?: CustomFormTab<TModel, TZone>;
|
|
65
|
-
fields
|
|
78
|
+
fields?: Record<string, CustomFormField>;
|
|
79
|
+
disabled?: false;
|
|
80
|
+
} & OnboardingStepOptions) | {
|
|
81
|
+
zone: TZone;
|
|
82
|
+
tab: CustomFormTab<TModel, TZone>;
|
|
83
|
+
/** Removes a built-in onboarding step. The store step can't be removed. */
|
|
84
|
+
disabled: true;
|
|
85
|
+
fields?: never;
|
|
66
86
|
} : never : never;
|
|
67
87
|
/**
|
|
68
88
|
* ADD (unknown id + component), REPLACE (built-in id + component), or REMOVE
|
|
@@ -164,4 +184,4 @@ declare function defineWidgetConfig(config: WidgetConfig): WidgetConfig;
|
|
|
164
184
|
declare function defineNavigationConfig<TGroup extends string = never>(config: NavigationConfig<TGroup>): NavigationConfig<TGroup>;
|
|
165
185
|
declare function defineCustomFieldsConfig<TModel extends CustomFieldModel>(config: CustomFieldsConfig<TModel>): CustomFieldsConfig<TModel>;
|
|
166
186
|
|
|
167
|
-
export { type ActivityEntry, type CustomColumn, type CustomDisplayEntry, type CustomDisplayField, type CustomFieldAction, type CustomFieldActionRegistry, type CustomFieldModel, type CustomFieldsConfig, type CustomFieldsRegistry, type CustomFormEntry, type CustomFormField, type CustomFormTab, type CustomFormZone, type CustomListExtension, type CustomListFilter, type CustomListFilterOption, type FieldValidation, NavigationConfig, type SectionAction, WidgetConfig, defineCustomFieldsConfig, defineNavigationConfig, defineWidgetConfig };
|
|
187
|
+
export { type ActivityEntry, type CustomColumn, type CustomDisplayEntry, type CustomDisplayField, type CustomFieldAction, type CustomFieldActionRegistry, type CustomFieldModel, type CustomFieldsConfig, type CustomFieldsRegistry, type CustomFormEntry, type CustomFormField, type CustomFormTab, type CustomFormZone, type CustomListExtension, type CustomListFilter, type CustomListFilterOption, type FieldValidation, NavigationConfig, type OnboardingStepOptions, type SectionAction, WidgetConfig, defineCustomFieldsConfig, defineNavigationConfig, defineWidgetConfig };
|
package/dist/index.d.ts
CHANGED
|
@@ -58,11 +58,31 @@ type CustomFormZone<TModel> = ModelShape<TModel>["formZones"];
|
|
|
58
58
|
* onboarding steps) and for unknown models.
|
|
59
59
|
*/
|
|
60
60
|
type CustomFormTab<TModel, TZone> = TZone extends keyof ModelShape<TModel>["formTabs"] ? ModelShape<TModel>["formTabs"][TZone] : string;
|
|
61
|
-
|
|
61
|
+
/**
|
|
62
|
+
* Onboarding wizard step settings, read only for `zone: "onboarding"`. A tab id
|
|
63
|
+
* the wizard doesn't ship becomes a new step; on a built-in step these override
|
|
64
|
+
* its defaults. Built-in ranks: store 10, address 20, company 30, payment 40.
|
|
65
|
+
*/
|
|
66
|
+
type OnboardingStepOptions = {
|
|
67
|
+
/** Step heading. Required in practice for new steps. */
|
|
68
|
+
label?: string;
|
|
69
|
+
/** Sort position. New steps without a rank go last. */
|
|
70
|
+
rank?: number;
|
|
71
|
+
/** Shows a Skip button on the step. */
|
|
72
|
+
optional?: boolean;
|
|
73
|
+
};
|
|
74
|
+
type CustomFormEntry<TModel> = CustomFormZone<TModel> extends infer TZone ? TZone extends CustomFormZone<TModel> ? ({
|
|
62
75
|
zone: TZone;
|
|
63
76
|
/** TabbedForm tab id, or onboarding wizard step id for `zone: "onboarding"`. */
|
|
64
77
|
tab?: CustomFormTab<TModel, TZone>;
|
|
65
|
-
fields
|
|
78
|
+
fields?: Record<string, CustomFormField>;
|
|
79
|
+
disabled?: false;
|
|
80
|
+
} & OnboardingStepOptions) | {
|
|
81
|
+
zone: TZone;
|
|
82
|
+
tab: CustomFormTab<TModel, TZone>;
|
|
83
|
+
/** Removes a built-in onboarding step. The store step can't be removed. */
|
|
84
|
+
disabled: true;
|
|
85
|
+
fields?: never;
|
|
66
86
|
} : never : never;
|
|
67
87
|
/**
|
|
68
88
|
* ADD (unknown id + component), REPLACE (built-in id + component), or REMOVE
|
|
@@ -164,4 +184,4 @@ declare function defineWidgetConfig(config: WidgetConfig): WidgetConfig;
|
|
|
164
184
|
declare function defineNavigationConfig<TGroup extends string = never>(config: NavigationConfig<TGroup>): NavigationConfig<TGroup>;
|
|
165
185
|
declare function defineCustomFieldsConfig<TModel extends CustomFieldModel>(config: CustomFieldsConfig<TModel>): CustomFieldsConfig<TModel>;
|
|
166
186
|
|
|
167
|
-
export { type ActivityEntry, type CustomColumn, type CustomDisplayEntry, type CustomDisplayField, type CustomFieldAction, type CustomFieldActionRegistry, type CustomFieldModel, type CustomFieldsConfig, type CustomFieldsRegistry, type CustomFormEntry, type CustomFormField, type CustomFormTab, type CustomFormZone, type CustomListExtension, type CustomListFilter, type CustomListFilterOption, type FieldValidation, NavigationConfig, type SectionAction, WidgetConfig, defineCustomFieldsConfig, defineNavigationConfig, defineWidgetConfig };
|
|
187
|
+
export { type ActivityEntry, type CustomColumn, type CustomDisplayEntry, type CustomDisplayField, type CustomFieldAction, type CustomFieldActionRegistry, type CustomFieldModel, type CustomFieldsConfig, type CustomFieldsRegistry, type CustomFormEntry, type CustomFormField, type CustomFormTab, type CustomFormZone, type CustomListExtension, type CustomListFilter, type CustomListFilterOption, type FieldValidation, NavigationConfig, type OnboardingStepOptions, type SectionAction, WidgetConfig, defineCustomFieldsConfig, defineNavigationConfig, defineWidgetConfig };
|
package/dist/vite.cjs
CHANGED
|
@@ -852,8 +852,8 @@ function generateCustomFields({
|
|
|
852
852
|
(_, i) => ` ...(__plugin${i}.customFieldsModule?.configs ?? [])`
|
|
853
853
|
);
|
|
854
854
|
const configs = [
|
|
855
|
-
...
|
|
856
|
-
...
|
|
855
|
+
...pluginSpreads,
|
|
856
|
+
...localRefs.map((ref) => ` ${ref}`)
|
|
857
857
|
];
|
|
858
858
|
if (configs.length === 0 && pluginDeclarations.length === 0) {
|
|
859
859
|
return `export default { configs: [] }`;
|
package/dist/vite.js
CHANGED
|
@@ -832,8 +832,8 @@ function generateCustomFields({
|
|
|
832
832
|
(_, i) => ` ...(__plugin${i}.customFieldsModule?.configs ?? [])`
|
|
833
833
|
);
|
|
834
834
|
const configs = [
|
|
835
|
-
...
|
|
836
|
-
...
|
|
835
|
+
...pluginSpreads,
|
|
836
|
+
...localRefs.map((ref) => ` ${ref}`)
|
|
837
837
|
];
|
|
838
838
|
if (configs.length === 0 && pluginDeclarations.length === 0) {
|
|
839
839
|
return `export default { configs: [] }`;
|