@sprucelabs/heartwood-view-controllers 123.0.1 → 123.0.3
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/build/.spruce/schemas/heartwoodViewControllers/v2021_02_11/bigForm.schema.js +5 -6
- package/build/.spruce/schemas/heartwoodViewControllers/v2021_02_11/navigationButton.schema.js +0 -6
- package/build/.spruce/schemas/schemas.types.d.ts +7 -24
- package/build/esm/.spruce/schemas/heartwoodViewControllers/v2021_02_11/bigForm.schema.js +5 -6
- package/build/esm/.spruce/schemas/heartwoodViewControllers/v2021_02_11/navigationButton.schema.js +0 -6
- package/build/esm/.spruce/schemas/schemas.types.d.ts +7 -24
- package/build/esm/schemas/v2021_02_11/cards/card.builder.d.ts +3 -10
- package/build/esm/schemas/v2021_02_11/cards/cardBody.builder.d.ts +3 -10
- package/build/esm/schemas/v2021_02_11/cards/cardSection.builder.d.ts +3 -10
- package/build/esm/schemas/v2021_02_11/dialog.builder.d.ts +3 -10
- package/build/esm/schemas/v2021_02_11/forms/bigForm.builder.d.ts +3 -10
- package/build/esm/schemas/v2021_02_11/forms/bigForm.builder.js +3 -13
- package/build/esm/schemas/v2021_02_11/navigationButton.builder.d.ts +0 -1
- package/build/esm/schemas/v2021_02_11/navigationButton.builder.js +1 -1
- package/build/esm/schemas/v2021_02_11/toolBelt.builder.d.ts +3 -10
- package/build/esm/types/heartwood.types.d.ts +5 -2
- package/build/esm/viewControllers/BigForm.vc.d.ts +2 -2
- package/build/esm/viewControllers/BigForm.vc.js +2 -2
- package/build/esm/viewControllers/card/Card.vc.d.ts +3 -1
- package/build/esm/viewControllers/card/Card.vc.js +11 -0
- package/build/schemas/v2021_02_11/cards/card.builder.d.ts +3 -10
- package/build/schemas/v2021_02_11/cards/cardBody.builder.d.ts +3 -10
- package/build/schemas/v2021_02_11/cards/cardSection.builder.d.ts +3 -10
- package/build/schemas/v2021_02_11/dialog.builder.d.ts +3 -10
- package/build/schemas/v2021_02_11/forms/bigForm.builder.d.ts +3 -10
- package/build/schemas/v2021_02_11/forms/bigForm.builder.js +3 -13
- package/build/schemas/v2021_02_11/navigationButton.builder.d.ts +0 -1
- package/build/schemas/v2021_02_11/navigationButton.builder.js +1 -1
- package/build/schemas/v2021_02_11/toolBelt.builder.d.ts +3 -10
- package/build/types/heartwood.types.d.ts +5 -2
- package/build/viewControllers/BigForm.vc.d.ts +2 -2
- package/build/viewControllers/BigForm.vc.js +2 -2
- package/build/viewControllers/card/Card.vc.d.ts +3 -1
- package/build/viewControllers/card/Card.vc.js +10 -0
- package/package.json +1 -1
|
@@ -155,12 +155,11 @@ const bigFormSchema = {
|
|
|
155
155
|
type: 'schema',
|
|
156
156
|
options: { schema: talkingSprucebot_schema_1.default, }
|
|
157
157
|
},
|
|
158
|
-
/**
|
|
159
|
-
'
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
options: { choices: [{ "value": "topOfSlide", "label": "Top of slide" }, { "value": "headerAltTitle", "label": "Header alternative title" }], }
|
|
158
|
+
/** Render slide titles. */
|
|
159
|
+
'shouldRenderSlideTitles': {
|
|
160
|
+
label: 'Render slide titles',
|
|
161
|
+
type: 'boolean',
|
|
162
|
+
options: undefined
|
|
164
163
|
},
|
|
165
164
|
/** Present slide. The slide showing now! */
|
|
166
165
|
'presentSlide': {
|
package/build/.spruce/schemas/heartwoodViewControllers/v2021_02_11/navigationButton.schema.js
CHANGED
|
@@ -57,12 +57,6 @@ const navigationButtonSchema = {
|
|
|
57
57
|
type: 'raw',
|
|
58
58
|
options: { valueType: `() => Promise<any> | any`, }
|
|
59
59
|
},
|
|
60
|
-
/** Image. */
|
|
61
|
-
'image': {
|
|
62
|
-
label: 'Image',
|
|
63
|
-
type: 'text',
|
|
64
|
-
options: undefined
|
|
65
|
-
},
|
|
66
60
|
/** Dropdown. */
|
|
67
61
|
'dropdown': {
|
|
68
62
|
label: 'Dropdown',
|
|
@@ -3440,8 +3440,6 @@ declare module '@sprucelabs/spruce-core-schemas/build/.spruce/schemas/core.schem
|
|
|
3440
3440
|
'label'?: string | undefined | null;
|
|
3441
3441
|
/** Click handler. */
|
|
3442
3442
|
'onClick'?: (() => Promise<any> | any) | undefined | null;
|
|
3443
|
-
/** Image. */
|
|
3444
|
-
'image'?: string | undefined | null;
|
|
3445
3443
|
/** Dropdown. */
|
|
3446
3444
|
'dropdown'?: SpruceSchemas.HeartwoodViewControllers.v2021_02_11.NavigationButtonDropdown | undefined | null;
|
|
3447
3445
|
}
|
|
@@ -3914,12 +3912,6 @@ declare module '@sprucelabs/spruce-core-schemas/build/.spruce/schemas/core.schem
|
|
|
3914
3912
|
valueType: `() => Promise<any> | any`;
|
|
3915
3913
|
};
|
|
3916
3914
|
};
|
|
3917
|
-
/** Image. */
|
|
3918
|
-
'image': {
|
|
3919
|
-
label: 'Image';
|
|
3920
|
-
type: 'text';
|
|
3921
|
-
options: undefined;
|
|
3922
|
-
};
|
|
3923
3915
|
/** Dropdown. */
|
|
3924
3916
|
'dropdown': {
|
|
3925
3917
|
label: 'Dropdown';
|
|
@@ -9000,8 +8992,8 @@ declare module '@sprucelabs/spruce-core-schemas/build/.spruce/schemas/core.schem
|
|
|
9000
8992
|
'sprucebotAvatar'?: SpruceSchemas.HeartwoodViewControllers.v2021_02_11.SprucebotAvatar | undefined | null;
|
|
9001
8993
|
'shouldRenderFirstFieldsLabel'?: boolean | undefined | null;
|
|
9002
8994
|
'talkingSprucebot'?: SpruceSchemas.HeartwoodViewControllers.v2021_02_11.TalkingSprucebot | undefined | null;
|
|
9003
|
-
/**
|
|
9004
|
-
'
|
|
8995
|
+
/** Render slide titles. */
|
|
8996
|
+
'shouldRenderSlideTitles'?: boolean | undefined | null;
|
|
9005
8997
|
/** Present slide. The slide showing now! */
|
|
9006
8998
|
'presentSlide'?: number | undefined | null;
|
|
9007
8999
|
/** Submit handler. */
|
|
@@ -9181,20 +9173,11 @@ declare module '@sprucelabs/spruce-core-schemas/build/.spruce/schemas/core.schem
|
|
|
9181
9173
|
schema: SpruceSchemas.HeartwoodViewControllers.v2021_02_11.TalkingSprucebotSchema;
|
|
9182
9174
|
};
|
|
9183
9175
|
};
|
|
9184
|
-
/**
|
|
9185
|
-
'
|
|
9186
|
-
|
|
9187
|
-
|
|
9188
|
-
|
|
9189
|
-
options: {
|
|
9190
|
-
choices: [{
|
|
9191
|
-
"value": "topOfSlide";
|
|
9192
|
-
"label": "Top of slide";
|
|
9193
|
-
}, {
|
|
9194
|
-
"value": "headerAltTitle";
|
|
9195
|
-
"label": "Header alternative title";
|
|
9196
|
-
}];
|
|
9197
|
-
};
|
|
9176
|
+
/** Render slide titles. */
|
|
9177
|
+
'shouldRenderSlideTitles': {
|
|
9178
|
+
label: 'Render slide titles';
|
|
9179
|
+
type: 'boolean';
|
|
9180
|
+
options: undefined;
|
|
9198
9181
|
};
|
|
9199
9182
|
/** Present slide. The slide showing now! */
|
|
9200
9183
|
'presentSlide': {
|
|
@@ -150,12 +150,11 @@ const bigFormSchema = {
|
|
|
150
150
|
type: 'schema',
|
|
151
151
|
options: { schema: talkingSprucebotSchema_v2021_02_11, }
|
|
152
152
|
},
|
|
153
|
-
/**
|
|
154
|
-
'
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
options: { choices: [{ "value": "topOfSlide", "label": "Top of slide" }, { "value": "headerAltTitle", "label": "Header alternative title" }], }
|
|
153
|
+
/** Render slide titles. */
|
|
154
|
+
'shouldRenderSlideTitles': {
|
|
155
|
+
label: 'Render slide titles',
|
|
156
|
+
type: 'boolean',
|
|
157
|
+
options: undefined
|
|
159
158
|
},
|
|
160
159
|
/** Present slide. The slide showing now! */
|
|
161
160
|
'presentSlide': {
|
package/build/esm/.spruce/schemas/heartwoodViewControllers/v2021_02_11/navigationButton.schema.js
CHANGED
|
@@ -52,12 +52,6 @@ const navigationButtonSchema = {
|
|
|
52
52
|
type: 'raw',
|
|
53
53
|
options: { valueType: `() => Promise<any> | any`, }
|
|
54
54
|
},
|
|
55
|
-
/** Image. */
|
|
56
|
-
'image': {
|
|
57
|
-
label: 'Image',
|
|
58
|
-
type: 'text',
|
|
59
|
-
options: undefined
|
|
60
|
-
},
|
|
61
55
|
/** Dropdown. */
|
|
62
56
|
'dropdown': {
|
|
63
57
|
label: 'Dropdown',
|
|
@@ -3440,8 +3440,6 @@ declare module '@sprucelabs/spruce-core-schemas/build/.spruce/schemas/core.schem
|
|
|
3440
3440
|
'label'?: string | undefined | null;
|
|
3441
3441
|
/** Click handler. */
|
|
3442
3442
|
'onClick'?: (() => Promise<any> | any) | undefined | null;
|
|
3443
|
-
/** Image. */
|
|
3444
|
-
'image'?: string | undefined | null;
|
|
3445
3443
|
/** Dropdown. */
|
|
3446
3444
|
'dropdown'?: SpruceSchemas.HeartwoodViewControllers.v2021_02_11.NavigationButtonDropdown | undefined | null;
|
|
3447
3445
|
}
|
|
@@ -3914,12 +3912,6 @@ declare module '@sprucelabs/spruce-core-schemas/build/.spruce/schemas/core.schem
|
|
|
3914
3912
|
valueType: `() => Promise<any> | any`;
|
|
3915
3913
|
};
|
|
3916
3914
|
};
|
|
3917
|
-
/** Image. */
|
|
3918
|
-
'image': {
|
|
3919
|
-
label: 'Image';
|
|
3920
|
-
type: 'text';
|
|
3921
|
-
options: undefined;
|
|
3922
|
-
};
|
|
3923
3915
|
/** Dropdown. */
|
|
3924
3916
|
'dropdown': {
|
|
3925
3917
|
label: 'Dropdown';
|
|
@@ -9000,8 +8992,8 @@ declare module '@sprucelabs/spruce-core-schemas/build/.spruce/schemas/core.schem
|
|
|
9000
8992
|
'sprucebotAvatar'?: SpruceSchemas.HeartwoodViewControllers.v2021_02_11.SprucebotAvatar | undefined | null;
|
|
9001
8993
|
'shouldRenderFirstFieldsLabel'?: boolean | undefined | null;
|
|
9002
8994
|
'talkingSprucebot'?: SpruceSchemas.HeartwoodViewControllers.v2021_02_11.TalkingSprucebot | undefined | null;
|
|
9003
|
-
/**
|
|
9004
|
-
'
|
|
8995
|
+
/** Render slide titles. */
|
|
8996
|
+
'shouldRenderSlideTitles'?: boolean | undefined | null;
|
|
9005
8997
|
/** Present slide. The slide showing now! */
|
|
9006
8998
|
'presentSlide'?: number | undefined | null;
|
|
9007
8999
|
/** Submit handler. */
|
|
@@ -9181,20 +9173,11 @@ declare module '@sprucelabs/spruce-core-schemas/build/.spruce/schemas/core.schem
|
|
|
9181
9173
|
schema: SpruceSchemas.HeartwoodViewControllers.v2021_02_11.TalkingSprucebotSchema;
|
|
9182
9174
|
};
|
|
9183
9175
|
};
|
|
9184
|
-
/**
|
|
9185
|
-
'
|
|
9186
|
-
|
|
9187
|
-
|
|
9188
|
-
|
|
9189
|
-
options: {
|
|
9190
|
-
choices: [{
|
|
9191
|
-
"value": "topOfSlide";
|
|
9192
|
-
"label": "Top of slide";
|
|
9193
|
-
}, {
|
|
9194
|
-
"value": "headerAltTitle";
|
|
9195
|
-
"label": "Header alternative title";
|
|
9196
|
-
}];
|
|
9197
|
-
};
|
|
9176
|
+
/** Render slide titles. */
|
|
9177
|
+
'shouldRenderSlideTitles': {
|
|
9178
|
+
label: 'Render slide titles';
|
|
9179
|
+
type: 'boolean';
|
|
9180
|
+
options: undefined;
|
|
9198
9181
|
};
|
|
9199
9182
|
/** Present slide. The slide showing now! */
|
|
9200
9183
|
'presentSlide': {
|
|
@@ -21317,16 +21317,9 @@ declare const _default: {
|
|
|
21317
21317
|
isRequired: true;
|
|
21318
21318
|
isArray: true;
|
|
21319
21319
|
};
|
|
21320
|
-
|
|
21321
|
-
type: "
|
|
21322
|
-
|
|
21323
|
-
choices: {
|
|
21324
|
-
value: string;
|
|
21325
|
-
label: string;
|
|
21326
|
-
}[];
|
|
21327
|
-
};
|
|
21328
|
-
hint: string;
|
|
21329
|
-
defaultValue: string;
|
|
21320
|
+
shouldRenderSlideTitles: {
|
|
21321
|
+
type: "boolean";
|
|
21322
|
+
label: string;
|
|
21330
21323
|
};
|
|
21331
21324
|
controller: {
|
|
21332
21325
|
type: "raw";
|
|
@@ -14155,16 +14155,9 @@ declare const _default: {
|
|
|
14155
14155
|
isRequired: true;
|
|
14156
14156
|
isArray: true;
|
|
14157
14157
|
};
|
|
14158
|
-
|
|
14159
|
-
type: "
|
|
14160
|
-
|
|
14161
|
-
choices: {
|
|
14162
|
-
value: string;
|
|
14163
|
-
label: string;
|
|
14164
|
-
}[];
|
|
14165
|
-
};
|
|
14166
|
-
hint: string;
|
|
14167
|
-
defaultValue: string;
|
|
14158
|
+
shouldRenderSlideTitles: {
|
|
14159
|
+
type: "boolean";
|
|
14160
|
+
label: string;
|
|
14168
14161
|
};
|
|
14169
14162
|
controller: {
|
|
14170
14163
|
type: "raw";
|
|
@@ -14105,16 +14105,9 @@ declare const _default: {
|
|
|
14105
14105
|
isRequired: true;
|
|
14106
14106
|
isArray: true;
|
|
14107
14107
|
};
|
|
14108
|
-
|
|
14109
|
-
type: "
|
|
14110
|
-
|
|
14111
|
-
choices: {
|
|
14112
|
-
value: string;
|
|
14113
|
-
label: string;
|
|
14114
|
-
}[];
|
|
14115
|
-
};
|
|
14116
|
-
hint: string;
|
|
14117
|
-
defaultValue: string;
|
|
14108
|
+
shouldRenderSlideTitles: {
|
|
14109
|
+
type: "boolean";
|
|
14110
|
+
label: string;
|
|
14118
14111
|
};
|
|
14119
14112
|
controller: {
|
|
14120
14113
|
type: "raw";
|
|
@@ -21348,16 +21348,9 @@ declare const _default: {
|
|
|
21348
21348
|
isRequired: true;
|
|
21349
21349
|
isArray: true;
|
|
21350
21350
|
};
|
|
21351
|
-
|
|
21352
|
-
type: "
|
|
21353
|
-
|
|
21354
|
-
choices: {
|
|
21355
|
-
value: string;
|
|
21356
|
-
label: string;
|
|
21357
|
-
}[];
|
|
21358
|
-
};
|
|
21359
|
-
hint: string;
|
|
21360
|
-
defaultValue: string;
|
|
21351
|
+
shouldRenderSlideTitles: {
|
|
21352
|
+
type: "boolean";
|
|
21353
|
+
label: string;
|
|
21361
21354
|
};
|
|
21362
21355
|
controller: {
|
|
21363
21356
|
type: "raw";
|
|
@@ -6919,16 +6919,9 @@ declare const _default: {
|
|
|
6919
6919
|
isRequired: true;
|
|
6920
6920
|
isArray: true;
|
|
6921
6921
|
};
|
|
6922
|
-
|
|
6923
|
-
type: "
|
|
6924
|
-
|
|
6925
|
-
choices: {
|
|
6926
|
-
value: string;
|
|
6927
|
-
label: string;
|
|
6928
|
-
}[];
|
|
6929
|
-
};
|
|
6930
|
-
hint: string;
|
|
6931
|
-
defaultValue: string;
|
|
6922
|
+
shouldRenderSlideTitles: {
|
|
6923
|
+
type: "boolean";
|
|
6924
|
+
label: string;
|
|
6932
6925
|
};
|
|
6933
6926
|
controller: {
|
|
6934
6927
|
type: "raw";
|
|
@@ -24,19 +24,9 @@ export default buildSchema({
|
|
|
24
24
|
},
|
|
25
25
|
}, sections: Object.assign(Object.assign({}, formBuilder.fields.sections), { options: Object.assign(Object.assign({}, formBuilder.fields.sections.options), { schema: Object.assign(Object.assign({}, formSectionBuilder), { id: 'bigFormSection', fields: Object.assign(Object.assign({}, formSectionBuilder.fields), { shouldRenderSubmitButton: {
|
|
26
26
|
type: 'boolean',
|
|
27
|
-
} }) }) }) }),
|
|
28
|
-
type: '
|
|
29
|
-
|
|
30
|
-
choices: [
|
|
31
|
-
{ value: 'topOfSlide', label: 'Top of slide' },
|
|
32
|
-
{
|
|
33
|
-
value: 'headerAltTitle',
|
|
34
|
-
label: 'Header alternative title',
|
|
35
|
-
},
|
|
36
|
-
],
|
|
37
|
-
},
|
|
38
|
-
hint: 'Where should the slide title render? By default it is at the top of each slide using a Talking Sprucebot. If you set to "Header alternative title", it will render in the header as an alternative title.',
|
|
39
|
-
defaultValue: 'topOfSlide',
|
|
27
|
+
} }) }) }) }), shouldRenderSlideTitles: {
|
|
28
|
+
type: 'boolean',
|
|
29
|
+
label: 'Render slide titles',
|
|
40
30
|
}, controller: {
|
|
41
31
|
type: 'raw',
|
|
42
32
|
label: 'Controller',
|
|
@@ -90,7 +90,6 @@ declare const _default: {
|
|
|
90
90
|
};
|
|
91
91
|
};
|
|
92
92
|
};
|
|
93
|
-
image: import("@sprucelabs/schema").FieldDefinitions;
|
|
94
93
|
label: import("@sprucelabs/schema").FieldDefinitions;
|
|
95
94
|
isEnabled: import("@sprucelabs/schema").FieldDefinitions;
|
|
96
95
|
onClick: import("@sprucelabs/schema").FieldDefinitions;
|
|
@@ -21,7 +21,7 @@ export default buildSchema({
|
|
|
21
21
|
options: {
|
|
22
22
|
schema: routerDestinationBuilder,
|
|
23
23
|
},
|
|
24
|
-
} }, pickFields(buttonFields, ['isEnabled', 'label', 'onClick'
|
|
24
|
+
} }, pickFields(buttonFields, ['isEnabled', 'label', 'onClick'])), { dropdown: {
|
|
25
25
|
type: 'schema',
|
|
26
26
|
label: 'Dropdown',
|
|
27
27
|
options: {
|
|
@@ -21389,16 +21389,9 @@ declare const _default: {
|
|
|
21389
21389
|
isRequired: true;
|
|
21390
21390
|
isArray: true;
|
|
21391
21391
|
};
|
|
21392
|
-
|
|
21393
|
-
type: "
|
|
21394
|
-
|
|
21395
|
-
choices: {
|
|
21396
|
-
value: string;
|
|
21397
|
-
label: string;
|
|
21398
|
-
}[];
|
|
21399
|
-
};
|
|
21400
|
-
hint: string;
|
|
21401
|
-
defaultValue: string;
|
|
21392
|
+
shouldRenderSlideTitles: {
|
|
21393
|
+
type: "boolean";
|
|
21394
|
+
label: string;
|
|
21402
21395
|
};
|
|
21403
21396
|
controller: {
|
|
21404
21397
|
type: "raw";
|
|
@@ -236,16 +236,19 @@ export type LockScreen = SpruceSchemas.HeartwoodViewControllers.v2021_02_11.Lock
|
|
|
236
236
|
export type Calendar = SpruceSchemas.HeartwoodViewControllers.v2021_02_11.Calendar;
|
|
237
237
|
export type CalendarPerson = SpruceSchemas.HeartwoodViewControllers.v2021_02_11.CalendarPerson;
|
|
238
238
|
export type CardFooter = SpruceSchemas.HeartwoodViewControllers.v2021_02_11.CardFooter;
|
|
239
|
+
export type CardFooterLayout = NonNullable<CardFooter['layout']>;
|
|
239
240
|
export type FormBuilder<S extends Schema = Schema> = SpruceSchemas.HeartwoodViewControllers.v2021_02_11.FormBuilderImportExportObject<S>;
|
|
240
241
|
export type FormBuilderPage = SpruceSchemas.HeartwoodViewControllers.v2021_02_11.FormBuilderImportExportPage;
|
|
241
242
|
export type Navigation = SpruceSchemas.HeartwoodViewControllers.v2021_02_11.Navigation;
|
|
242
243
|
export type NavigationButton = SpruceSchemas.HeartwoodViewControllers.v2021_02_11.NavigationButton;
|
|
243
|
-
export type NavigationItem = NavigationButton | NavigationSpacer;
|
|
244
|
+
export type NavigationItem = NavigationButton | NavigationSpacer | NavigationImage;
|
|
244
245
|
export interface NavigationSpacer {
|
|
245
246
|
isSpacer: true;
|
|
246
247
|
}
|
|
248
|
+
export interface NavigationImage {
|
|
249
|
+
image: string;
|
|
250
|
+
}
|
|
247
251
|
export type BigForm<S extends Schema> = SpruceSchemas.HeartwoodViewControllers.v2021_02_11.BigForm<S>;
|
|
248
|
-
export type BigFormSlideTitleRenderPosition = NonNullable<BigForm<Schema>['slideTitleRenderPosition']>;
|
|
249
252
|
export type CountdownTimer = SpruceSchemas.HeartwoodViewControllers.v2021_02_11.CountdownTimer;
|
|
250
253
|
export type ProgressNavigator = SpruceSchemas.HeartwoodViewControllers.v2021_02_11.ProgressNavigator;
|
|
251
254
|
export type ProgressNavigatorStep = SpruceSchemas.HeartwoodViewControllers.v2021_02_11.ProgressNavigatorStep;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Schema } from '@sprucelabs/schema';
|
|
2
|
-
import { BigForm
|
|
2
|
+
import { BigForm } from '../types/heartwood.types';
|
|
3
3
|
import FormViewController, { FormViewControllerOptions } from './form/Form.vc';
|
|
4
4
|
export default class BigFormViewController<S extends Schema, V extends ViewModel<S> = ViewModel<S>> extends FormViewController<S, V> {
|
|
5
|
-
|
|
5
|
+
setShouldRenderSlideTitles(shouldRender: boolean): void;
|
|
6
6
|
isSlideValid(idx: number): boolean;
|
|
7
7
|
setOnSubmit(cb: V['onSubmit']): void;
|
|
8
8
|
setOnSubmitSlide(cb: V['onSubmitSlide']): void;
|
|
@@ -11,8 +11,8 @@ import { areSchemaValuesValid } from '@sprucelabs/schema';
|
|
|
11
11
|
import normalizeFormSectionFieldNamesUtil from '../utilities/normalizeFieldNames.utility.js';
|
|
12
12
|
import FormViewController from './form/Form.vc.js';
|
|
13
13
|
export default class BigFormViewController extends FormViewController {
|
|
14
|
-
|
|
15
|
-
this.model.
|
|
14
|
+
setShouldRenderSlideTitles(shouldRender) {
|
|
15
|
+
this.model.shouldRenderSlideTitles = shouldRender;
|
|
16
16
|
this.triggerRender();
|
|
17
17
|
}
|
|
18
18
|
isSlideValid(idx) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Card, CardBody, CardHeader, CardSection, CriticalError, ViewController, ViewControllerOptions } from '../../types/heartwood.types';
|
|
1
|
+
import { Card, CardBody, CardFooterLayout, CardHeader, CardSection, CriticalError, ViewController, ViewControllerOptions } from '../../types/heartwood.types';
|
|
2
2
|
import AbstractViewController from '../Abstract.vc';
|
|
3
3
|
export default class CardViewController<V extends Card = Card> extends AbstractViewController<V> implements ViewController<V> {
|
|
4
4
|
protected model: V;
|
|
@@ -6,6 +6,7 @@ export default class CardViewController<V extends Card = Card> extends AbstractV
|
|
|
6
6
|
private triggerRenderHeader?;
|
|
7
7
|
private triggerRenderSections;
|
|
8
8
|
private sectionVcs;
|
|
9
|
+
private footerLayout?;
|
|
9
10
|
constructor(options: V & ViewControllerOptions);
|
|
10
11
|
setFooter(footer: V['footer']): void;
|
|
11
12
|
getHasCriticalError(): boolean;
|
|
@@ -48,6 +49,7 @@ export default class CardViewController<V extends Card = Card> extends AbstractV
|
|
|
48
49
|
getBody(): import("@sprucelabs/mercury-types").SpruceSchemas.HeartwoodViewControllers.v2021_02_11.CardBody | null | undefined;
|
|
49
50
|
payAttentionToMe(): void;
|
|
50
51
|
setHeader(header: CardHeader | null | undefined): void;
|
|
52
|
+
setFooterLayout(layout: CardFooterLayout): void;
|
|
51
53
|
render(): V;
|
|
52
54
|
}
|
|
53
55
|
export type CardViewControllerOptions = Card;
|
|
@@ -12,6 +12,9 @@ export default class CardViewController extends AbstractViewController {
|
|
|
12
12
|
var _a;
|
|
13
13
|
const hadFooter = !!this.model.footer;
|
|
14
14
|
this.model.footer = footer;
|
|
15
|
+
if (this.model.footer && this.footerLayout) {
|
|
16
|
+
this.model.footer.layout = this.footerLayout;
|
|
17
|
+
}
|
|
15
18
|
if (!footer || !hadFooter) {
|
|
16
19
|
this.triggerRender();
|
|
17
20
|
}
|
|
@@ -318,6 +321,14 @@ export default class CardViewController extends AbstractViewController {
|
|
|
318
321
|
this.triggerRender();
|
|
319
322
|
}
|
|
320
323
|
}
|
|
324
|
+
setFooterLayout(layout) {
|
|
325
|
+
var _a;
|
|
326
|
+
this.footerLayout = layout;
|
|
327
|
+
if (this.model.footer) {
|
|
328
|
+
this.model.footer.layout = layout;
|
|
329
|
+
}
|
|
330
|
+
(_a = this.triggerRenderFooter) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
331
|
+
}
|
|
321
332
|
render() {
|
|
322
333
|
var _a;
|
|
323
334
|
const model = Object.assign(Object.assign({}, this.model), { controller: this });
|
|
@@ -21317,16 +21317,9 @@ declare const _default: {
|
|
|
21317
21317
|
isRequired: true;
|
|
21318
21318
|
isArray: true;
|
|
21319
21319
|
};
|
|
21320
|
-
|
|
21321
|
-
type: "
|
|
21322
|
-
|
|
21323
|
-
choices: {
|
|
21324
|
-
value: string;
|
|
21325
|
-
label: string;
|
|
21326
|
-
}[];
|
|
21327
|
-
};
|
|
21328
|
-
hint: string;
|
|
21329
|
-
defaultValue: string;
|
|
21320
|
+
shouldRenderSlideTitles: {
|
|
21321
|
+
type: "boolean";
|
|
21322
|
+
label: string;
|
|
21330
21323
|
};
|
|
21331
21324
|
controller: {
|
|
21332
21325
|
type: "raw";
|
|
@@ -14155,16 +14155,9 @@ declare const _default: {
|
|
|
14155
14155
|
isRequired: true;
|
|
14156
14156
|
isArray: true;
|
|
14157
14157
|
};
|
|
14158
|
-
|
|
14159
|
-
type: "
|
|
14160
|
-
|
|
14161
|
-
choices: {
|
|
14162
|
-
value: string;
|
|
14163
|
-
label: string;
|
|
14164
|
-
}[];
|
|
14165
|
-
};
|
|
14166
|
-
hint: string;
|
|
14167
|
-
defaultValue: string;
|
|
14158
|
+
shouldRenderSlideTitles: {
|
|
14159
|
+
type: "boolean";
|
|
14160
|
+
label: string;
|
|
14168
14161
|
};
|
|
14169
14162
|
controller: {
|
|
14170
14163
|
type: "raw";
|
|
@@ -14105,16 +14105,9 @@ declare const _default: {
|
|
|
14105
14105
|
isRequired: true;
|
|
14106
14106
|
isArray: true;
|
|
14107
14107
|
};
|
|
14108
|
-
|
|
14109
|
-
type: "
|
|
14110
|
-
|
|
14111
|
-
choices: {
|
|
14112
|
-
value: string;
|
|
14113
|
-
label: string;
|
|
14114
|
-
}[];
|
|
14115
|
-
};
|
|
14116
|
-
hint: string;
|
|
14117
|
-
defaultValue: string;
|
|
14108
|
+
shouldRenderSlideTitles: {
|
|
14109
|
+
type: "boolean";
|
|
14110
|
+
label: string;
|
|
14118
14111
|
};
|
|
14119
14112
|
controller: {
|
|
14120
14113
|
type: "raw";
|
|
@@ -21348,16 +21348,9 @@ declare const _default: {
|
|
|
21348
21348
|
isRequired: true;
|
|
21349
21349
|
isArray: true;
|
|
21350
21350
|
};
|
|
21351
|
-
|
|
21352
|
-
type: "
|
|
21353
|
-
|
|
21354
|
-
choices: {
|
|
21355
|
-
value: string;
|
|
21356
|
-
label: string;
|
|
21357
|
-
}[];
|
|
21358
|
-
};
|
|
21359
|
-
hint: string;
|
|
21360
|
-
defaultValue: string;
|
|
21351
|
+
shouldRenderSlideTitles: {
|
|
21352
|
+
type: "boolean";
|
|
21353
|
+
label: string;
|
|
21361
21354
|
};
|
|
21362
21355
|
controller: {
|
|
21363
21356
|
type: "raw";
|
|
@@ -6919,16 +6919,9 @@ declare const _default: {
|
|
|
6919
6919
|
isRequired: true;
|
|
6920
6920
|
isArray: true;
|
|
6921
6921
|
};
|
|
6922
|
-
|
|
6923
|
-
type: "
|
|
6924
|
-
|
|
6925
|
-
choices: {
|
|
6926
|
-
value: string;
|
|
6927
|
-
label: string;
|
|
6928
|
-
}[];
|
|
6929
|
-
};
|
|
6930
|
-
hint: string;
|
|
6931
|
-
defaultValue: string;
|
|
6922
|
+
shouldRenderSlideTitles: {
|
|
6923
|
+
type: "boolean";
|
|
6924
|
+
label: string;
|
|
6932
6925
|
};
|
|
6933
6926
|
controller: {
|
|
6934
6927
|
type: "raw";
|
|
@@ -48,19 +48,9 @@ exports.default = (0, schema_1.buildSchema)({
|
|
|
48
48
|
},
|
|
49
49
|
},
|
|
50
50
|
},
|
|
51
|
-
|
|
52
|
-
type: '
|
|
53
|
-
|
|
54
|
-
choices: [
|
|
55
|
-
{ value: 'topOfSlide', label: 'Top of slide' },
|
|
56
|
-
{
|
|
57
|
-
value: 'headerAltTitle',
|
|
58
|
-
label: 'Header alternative title',
|
|
59
|
-
},
|
|
60
|
-
],
|
|
61
|
-
},
|
|
62
|
-
hint: 'Where should the slide title render? By default it is at the top of each slide using a Talking Sprucebot. If you set to "Header alternative title", it will render in the header as an alternative title.',
|
|
63
|
-
defaultValue: 'topOfSlide',
|
|
51
|
+
shouldRenderSlideTitles: {
|
|
52
|
+
type: 'boolean',
|
|
53
|
+
label: 'Render slide titles',
|
|
64
54
|
},
|
|
65
55
|
controller: {
|
|
66
56
|
type: 'raw',
|
|
@@ -90,7 +90,6 @@ declare const _default: {
|
|
|
90
90
|
};
|
|
91
91
|
};
|
|
92
92
|
};
|
|
93
|
-
image: import("@sprucelabs/schema").FieldDefinitions;
|
|
94
93
|
label: import("@sprucelabs/schema").FieldDefinitions;
|
|
95
94
|
isEnabled: import("@sprucelabs/schema").FieldDefinitions;
|
|
96
95
|
onClick: import("@sprucelabs/schema").FieldDefinitions;
|
|
@@ -34,7 +34,7 @@ exports.default = (0, schema_1.buildSchema)({
|
|
|
34
34
|
schema: routerDestination_builder_1.default,
|
|
35
35
|
},
|
|
36
36
|
},
|
|
37
|
-
...(0, schema_1.pickFields)(constants_1.buttonFields, ['isEnabled', 'label', 'onClick'
|
|
37
|
+
...(0, schema_1.pickFields)(constants_1.buttonFields, ['isEnabled', 'label', 'onClick']),
|
|
38
38
|
dropdown: {
|
|
39
39
|
type: 'schema',
|
|
40
40
|
label: 'Dropdown',
|
|
@@ -21389,16 +21389,9 @@ declare const _default: {
|
|
|
21389
21389
|
isRequired: true;
|
|
21390
21390
|
isArray: true;
|
|
21391
21391
|
};
|
|
21392
|
-
|
|
21393
|
-
type: "
|
|
21394
|
-
|
|
21395
|
-
choices: {
|
|
21396
|
-
value: string;
|
|
21397
|
-
label: string;
|
|
21398
|
-
}[];
|
|
21399
|
-
};
|
|
21400
|
-
hint: string;
|
|
21401
|
-
defaultValue: string;
|
|
21392
|
+
shouldRenderSlideTitles: {
|
|
21393
|
+
type: "boolean";
|
|
21394
|
+
label: string;
|
|
21402
21395
|
};
|
|
21403
21396
|
controller: {
|
|
21404
21397
|
type: "raw";
|
|
@@ -236,16 +236,19 @@ export type LockScreen = SpruceSchemas.HeartwoodViewControllers.v2021_02_11.Lock
|
|
|
236
236
|
export type Calendar = SpruceSchemas.HeartwoodViewControllers.v2021_02_11.Calendar;
|
|
237
237
|
export type CalendarPerson = SpruceSchemas.HeartwoodViewControllers.v2021_02_11.CalendarPerson;
|
|
238
238
|
export type CardFooter = SpruceSchemas.HeartwoodViewControllers.v2021_02_11.CardFooter;
|
|
239
|
+
export type CardFooterLayout = NonNullable<CardFooter['layout']>;
|
|
239
240
|
export type FormBuilder<S extends Schema = Schema> = SpruceSchemas.HeartwoodViewControllers.v2021_02_11.FormBuilderImportExportObject<S>;
|
|
240
241
|
export type FormBuilderPage = SpruceSchemas.HeartwoodViewControllers.v2021_02_11.FormBuilderImportExportPage;
|
|
241
242
|
export type Navigation = SpruceSchemas.HeartwoodViewControllers.v2021_02_11.Navigation;
|
|
242
243
|
export type NavigationButton = SpruceSchemas.HeartwoodViewControllers.v2021_02_11.NavigationButton;
|
|
243
|
-
export type NavigationItem = NavigationButton | NavigationSpacer;
|
|
244
|
+
export type NavigationItem = NavigationButton | NavigationSpacer | NavigationImage;
|
|
244
245
|
export interface NavigationSpacer {
|
|
245
246
|
isSpacer: true;
|
|
246
247
|
}
|
|
248
|
+
export interface NavigationImage {
|
|
249
|
+
image: string;
|
|
250
|
+
}
|
|
247
251
|
export type BigForm<S extends Schema> = SpruceSchemas.HeartwoodViewControllers.v2021_02_11.BigForm<S>;
|
|
248
|
-
export type BigFormSlideTitleRenderPosition = NonNullable<BigForm<Schema>['slideTitleRenderPosition']>;
|
|
249
252
|
export type CountdownTimer = SpruceSchemas.HeartwoodViewControllers.v2021_02_11.CountdownTimer;
|
|
250
253
|
export type ProgressNavigator = SpruceSchemas.HeartwoodViewControllers.v2021_02_11.ProgressNavigator;
|
|
251
254
|
export type ProgressNavigatorStep = SpruceSchemas.HeartwoodViewControllers.v2021_02_11.ProgressNavigatorStep;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Schema } from '@sprucelabs/schema';
|
|
2
|
-
import { BigForm
|
|
2
|
+
import { BigForm } from '../types/heartwood.types';
|
|
3
3
|
import FormViewController, { FormViewControllerOptions } from './form/Form.vc';
|
|
4
4
|
export default class BigFormViewController<S extends Schema, V extends ViewModel<S> = ViewModel<S>> extends FormViewController<S, V> {
|
|
5
|
-
|
|
5
|
+
setShouldRenderSlideTitles(shouldRender: boolean): void;
|
|
6
6
|
isSlideValid(idx: number): boolean;
|
|
7
7
|
setOnSubmit(cb: V['onSubmit']): void;
|
|
8
8
|
setOnSubmitSlide(cb: V['onSubmitSlide']): void;
|
|
@@ -7,8 +7,8 @@ const schema_1 = require("@sprucelabs/schema");
|
|
|
7
7
|
const normalizeFieldNames_utility_1 = __importDefault(require("../utilities/normalizeFieldNames.utility"));
|
|
8
8
|
const Form_vc_1 = __importDefault(require("./form/Form.vc"));
|
|
9
9
|
class BigFormViewController extends Form_vc_1.default {
|
|
10
|
-
|
|
11
|
-
this.model.
|
|
10
|
+
setShouldRenderSlideTitles(shouldRender) {
|
|
11
|
+
this.model.shouldRenderSlideTitles = shouldRender;
|
|
12
12
|
this.triggerRender();
|
|
13
13
|
}
|
|
14
14
|
isSlideValid(idx) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Card, CardBody, CardHeader, CardSection, CriticalError, ViewController, ViewControllerOptions } from '../../types/heartwood.types';
|
|
1
|
+
import { Card, CardBody, CardFooterLayout, CardHeader, CardSection, CriticalError, ViewController, ViewControllerOptions } from '../../types/heartwood.types';
|
|
2
2
|
import AbstractViewController from '../Abstract.vc';
|
|
3
3
|
export default class CardViewController<V extends Card = Card> extends AbstractViewController<V> implements ViewController<V> {
|
|
4
4
|
protected model: V;
|
|
@@ -6,6 +6,7 @@ export default class CardViewController<V extends Card = Card> extends AbstractV
|
|
|
6
6
|
private triggerRenderHeader?;
|
|
7
7
|
private triggerRenderSections;
|
|
8
8
|
private sectionVcs;
|
|
9
|
+
private footerLayout?;
|
|
9
10
|
constructor(options: V & ViewControllerOptions);
|
|
10
11
|
setFooter(footer: V['footer']): void;
|
|
11
12
|
getHasCriticalError(): boolean;
|
|
@@ -48,6 +49,7 @@ export default class CardViewController<V extends Card = Card> extends AbstractV
|
|
|
48
49
|
getBody(): import("@sprucelabs/mercury-types").SpruceSchemas.HeartwoodViewControllers.v2021_02_11.CardBody | null | undefined;
|
|
49
50
|
payAttentionToMe(): void;
|
|
50
51
|
setHeader(header: CardHeader | null | undefined): void;
|
|
52
|
+
setFooterLayout(layout: CardFooterLayout): void;
|
|
51
53
|
render(): V;
|
|
52
54
|
}
|
|
53
55
|
export type CardViewControllerOptions = Card;
|
|
@@ -16,6 +16,9 @@ class CardViewController extends Abstract_vc_1.default {
|
|
|
16
16
|
setFooter(footer) {
|
|
17
17
|
const hadFooter = !!this.model.footer;
|
|
18
18
|
this.model.footer = footer;
|
|
19
|
+
if (this.model.footer && this.footerLayout) {
|
|
20
|
+
this.model.footer.layout = this.footerLayout;
|
|
21
|
+
}
|
|
19
22
|
if (!footer || !hadFooter) {
|
|
20
23
|
this.triggerRender();
|
|
21
24
|
}
|
|
@@ -329,6 +332,13 @@ class CardViewController extends Abstract_vc_1.default {
|
|
|
329
332
|
this.triggerRender();
|
|
330
333
|
}
|
|
331
334
|
}
|
|
335
|
+
setFooterLayout(layout) {
|
|
336
|
+
this.footerLayout = layout;
|
|
337
|
+
if (this.model.footer) {
|
|
338
|
+
this.model.footer.layout = layout;
|
|
339
|
+
}
|
|
340
|
+
this.triggerRenderFooter?.();
|
|
341
|
+
}
|
|
332
342
|
render() {
|
|
333
343
|
const model = {
|
|
334
344
|
...this.model,
|
package/package.json
CHANGED