@sprucelabs/spruce-form-utils 24.0.1 → 24.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/completing/FormPlayerCard.vc.d.ts +3 -1
- package/build/completing/FormPlayerCard.vc.js +3 -1
- package/build/esm/completing/FormPlayerCard.vc.d.ts +3 -1
- package/build/esm/completing/FormPlayerCard.vc.js +3 -1
- package/build/esm/viewControllers/RemoteFormCard.vc.d.ts +3 -2
- package/build/viewControllers/RemoteFormCard.vc.d.ts +3 -2
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AbstractViewController, FormViewController, SwipeCardViewController, ViewControllerOptions, Button, Router } from '@sprucelabs/heartwood-view-controllers';
|
|
1
|
+
import { AbstractViewController, FormViewController, SwipeCardViewController, ViewControllerOptions, Button, Router, CardFooterLayout } from '@sprucelabs/heartwood-view-controllers';
|
|
2
2
|
import { SpruceSchemas } from '@sprucelabs/spruce-core-schemas';
|
|
3
3
|
export default class FormPlayerCardViewController extends AbstractViewController<SpruceSchemas.HeartwoodViewControllers.v2021_02_11.Card> {
|
|
4
4
|
private swipeVc;
|
|
@@ -13,6 +13,7 @@ export default class FormPlayerCardViewController extends AbstractViewController
|
|
|
13
13
|
protected doneButtonLabel: string;
|
|
14
14
|
protected shouldRenderSaveProgressButton: boolean;
|
|
15
15
|
protected additionalButtons: Button[];
|
|
16
|
+
private footerLayout?;
|
|
16
17
|
constructor(options: FormPlayerCardViewControllerOptions & ViewControllerOptions);
|
|
17
18
|
private SwipeVc;
|
|
18
19
|
private handleSlideChange;
|
|
@@ -53,6 +54,7 @@ export type FormPlayerCardViewControllerOptions = Partial<FormPlayerImportObject
|
|
|
53
54
|
doneButtonLabel?: string;
|
|
54
55
|
shouldRenderSaveProgressButton?: boolean;
|
|
55
56
|
additionalButtons?: Button[];
|
|
57
|
+
footerLayout?: CardFooterLayout;
|
|
56
58
|
};
|
|
57
59
|
export type PlayerLoadOptions = Partial<FormPlayerImportObject> & {
|
|
58
60
|
router?: Router;
|
|
@@ -8,7 +8,8 @@ class FormPlayerCardViewController extends heartwood_view_controllers_1.Abstract
|
|
|
8
8
|
super(options);
|
|
9
9
|
this.shouldIgnoreChanges = false;
|
|
10
10
|
this.uploads = {};
|
|
11
|
-
const { onChange, isBusy, id, onSaveAndBeDone, doneButtonLabel, shouldRenderSaveProgressButton, additionalButtons, ...builderSource } = options;
|
|
11
|
+
const { onChange, isBusy, id, onSaveAndBeDone, doneButtonLabel, shouldRenderSaveProgressButton, additionalButtons, footerLayout, ...builderSource } = options;
|
|
12
|
+
this.footerLayout = footerLayout;
|
|
12
13
|
this.builderSource = (0, heartwood_view_controllers_1.removeUniversalViewOptions)(builderSource);
|
|
13
14
|
this.doneButtonLabel = doneButtonLabel ?? 'Save and be done';
|
|
14
15
|
this.shouldRenderSaveProgressButton =
|
|
@@ -65,6 +66,7 @@ class FormPlayerCardViewController extends heartwood_view_controllers_1.Abstract
|
|
|
65
66
|
}
|
|
66
67
|
return {
|
|
67
68
|
buttons,
|
|
69
|
+
layout: this.footerLayout,
|
|
68
70
|
isSticky: true,
|
|
69
71
|
};
|
|
70
72
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AbstractViewController, FormViewController, SwipeCardViewController, ViewControllerOptions, Button, Router } from '@sprucelabs/heartwood-view-controllers';
|
|
1
|
+
import { AbstractViewController, FormViewController, SwipeCardViewController, ViewControllerOptions, Button, Router, CardFooterLayout } from '@sprucelabs/heartwood-view-controllers';
|
|
2
2
|
import { SpruceSchemas } from '@sprucelabs/spruce-core-schemas';
|
|
3
3
|
export default class FormPlayerCardViewController extends AbstractViewController<SpruceSchemas.HeartwoodViewControllers.v2021_02_11.Card> {
|
|
4
4
|
private swipeVc;
|
|
@@ -13,6 +13,7 @@ export default class FormPlayerCardViewController extends AbstractViewController
|
|
|
13
13
|
protected doneButtonLabel: string;
|
|
14
14
|
protected shouldRenderSaveProgressButton: boolean;
|
|
15
15
|
protected additionalButtons: Button[];
|
|
16
|
+
private footerLayout?;
|
|
16
17
|
constructor(options: FormPlayerCardViewControllerOptions & ViewControllerOptions);
|
|
17
18
|
private SwipeVc;
|
|
18
19
|
private handleSlideChange;
|
|
@@ -53,6 +54,7 @@ export type FormPlayerCardViewControllerOptions = Partial<FormPlayerImportObject
|
|
|
53
54
|
doneButtonLabel?: string;
|
|
54
55
|
shouldRenderSaveProgressButton?: boolean;
|
|
55
56
|
additionalButtons?: Button[];
|
|
57
|
+
footerLayout?: CardFooterLayout;
|
|
56
58
|
};
|
|
57
59
|
export type PlayerLoadOptions = Partial<FormPlayerImportObject> & {
|
|
58
60
|
router?: Router;
|
|
@@ -26,7 +26,8 @@ class FormPlayerCardViewController extends AbstractViewController {
|
|
|
26
26
|
super(options);
|
|
27
27
|
this.shouldIgnoreChanges = false;
|
|
28
28
|
this.uploads = {};
|
|
29
|
-
const { onChange, isBusy, id, onSaveAndBeDone, doneButtonLabel, shouldRenderSaveProgressButton, additionalButtons } = options, builderSource = __rest(options, ["onChange", "isBusy", "id", "onSaveAndBeDone", "doneButtonLabel", "shouldRenderSaveProgressButton", "additionalButtons"]);
|
|
29
|
+
const { onChange, isBusy, id, onSaveAndBeDone, doneButtonLabel, shouldRenderSaveProgressButton, additionalButtons, footerLayout } = options, builderSource = __rest(options, ["onChange", "isBusy", "id", "onSaveAndBeDone", "doneButtonLabel", "shouldRenderSaveProgressButton", "additionalButtons", "footerLayout"]);
|
|
30
|
+
this.footerLayout = footerLayout;
|
|
30
31
|
this.builderSource = removeUniversalViewOptions(builderSource);
|
|
31
32
|
this.doneButtonLabel = doneButtonLabel !== null && doneButtonLabel !== void 0 ? doneButtonLabel : 'Save and be done';
|
|
32
33
|
this.shouldRenderSaveProgressButton =
|
|
@@ -84,6 +85,7 @@ class FormPlayerCardViewController extends AbstractViewController {
|
|
|
84
85
|
}
|
|
85
86
|
return {
|
|
86
87
|
buttons,
|
|
88
|
+
layout: this.footerLayout,
|
|
87
89
|
isSticky: true,
|
|
88
90
|
};
|
|
89
91
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AbstractViewController, ViewControllerOptions, Card, Router, SpruceSchemas, ViewController, Button } from '@sprucelabs/heartwood-view-controllers';
|
|
1
|
+
import { AbstractViewController, ViewControllerOptions, Card, Router, SpruceSchemas, ViewController, Button, CardFooterLayout } from '@sprucelabs/heartwood-view-controllers';
|
|
2
2
|
import FormPlayerCardViewController from '../completing/FormPlayerCard.vc';
|
|
3
3
|
export default class RemoteFormCardViewController extends AbstractViewController<Card> {
|
|
4
4
|
static id: string;
|
|
@@ -12,7 +12,7 @@ export default class RemoteFormCardViewController extends AbstractViewController
|
|
|
12
12
|
private onErrorHandler;
|
|
13
13
|
constructor(options: ViewControllerOptions & RemoteFormCardViewControllerOptions);
|
|
14
14
|
private FormPlayerCard;
|
|
15
|
-
load(options: RemoteFormCardLoadOptions): Promise<Pick<import("@sprucelabs/schema").SchemaStaticValues<SpruceSchemas.Forms.v2021_07_02.GetFormResponsePayloadSchema, false, import("@sprucelabs/schema").SchemaOptionalFieldNames<SpruceSchemas.Forms.v2021_07_02.GetFormResponsePayloadSchema>, import("@sprucelabs/schema").StaticSchemaAllValues<SpruceSchemas.Forms.v2021_07_02.GetFormResponsePayloadSchema, false>>, "id" | "target" | "typeSlug" | "form" | "shouldRenderNav" | "roleToAddWhenCompleting" | "whereToSendOnCompletion" | "canEditCompletedForm" | "canCompleteMultipleTimes" | "roles" | "
|
|
15
|
+
load(options: RemoteFormCardLoadOptions): Promise<Pick<import("@sprucelabs/schema").SchemaStaticValues<SpruceSchemas.Forms.v2021_07_02.GetFormResponsePayloadSchema, false, import("@sprucelabs/schema").SchemaOptionalFieldNames<SpruceSchemas.Forms.v2021_07_02.GetFormResponsePayloadSchema>, import("@sprucelabs/schema").StaticSchemaAllValues<SpruceSchemas.Forms.v2021_07_02.GetFormResponsePayloadSchema, false>>, "id" | "target" | "typeSlug" | "form" | "shouldRenderNav" | "roleToAddWhenCompleting" | "whereToSendOnCompletion" | "canEditCompletedForm" | "canCompleteMultipleTimes" | "roles" | "percentComplete" | "values"> | null>;
|
|
16
16
|
private loadForm;
|
|
17
17
|
protected handleSaveAndBeDone(): Promise<void>;
|
|
18
18
|
private handlePlayerChange;
|
|
@@ -24,6 +24,7 @@ export interface RemoteFormCardViewControllerOptions {
|
|
|
24
24
|
doneButtonLabel?: string;
|
|
25
25
|
shouldRenderSaveProgressButton?: boolean;
|
|
26
26
|
additionalButtons?: Button[];
|
|
27
|
+
footerLayout?: CardFooterLayout;
|
|
27
28
|
}
|
|
28
29
|
export type RemoteFormCardOnDoneHandler = () => void | Promise<void>;
|
|
29
30
|
export type RemoteFormCardOnErrorHandler = (error: Error) => void | Promise<void>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AbstractViewController, ViewControllerOptions, Card, Router, SpruceSchemas, ViewController, Button } from '@sprucelabs/heartwood-view-controllers';
|
|
1
|
+
import { AbstractViewController, ViewControllerOptions, Card, Router, SpruceSchemas, ViewController, Button, CardFooterLayout } from '@sprucelabs/heartwood-view-controllers';
|
|
2
2
|
import FormPlayerCardViewController from '../completing/FormPlayerCard.vc';
|
|
3
3
|
export default class RemoteFormCardViewController extends AbstractViewController<Card> {
|
|
4
4
|
static id: string;
|
|
@@ -12,7 +12,7 @@ export default class RemoteFormCardViewController extends AbstractViewController
|
|
|
12
12
|
private onErrorHandler;
|
|
13
13
|
constructor(options: ViewControllerOptions & RemoteFormCardViewControllerOptions);
|
|
14
14
|
private FormPlayerCard;
|
|
15
|
-
load(options: RemoteFormCardLoadOptions): Promise<Pick<import("@sprucelabs/schema").SchemaStaticValues<SpruceSchemas.Forms.v2021_07_02.GetFormResponsePayloadSchema, false, import("@sprucelabs/schema").SchemaOptionalFieldNames<SpruceSchemas.Forms.v2021_07_02.GetFormResponsePayloadSchema>, import("@sprucelabs/schema").StaticSchemaAllValues<SpruceSchemas.Forms.v2021_07_02.GetFormResponsePayloadSchema, false>>, "id" | "target" | "typeSlug" | "form" | "shouldRenderNav" | "roleToAddWhenCompleting" | "whereToSendOnCompletion" | "canEditCompletedForm" | "canCompleteMultipleTimes" | "roles" | "
|
|
15
|
+
load(options: RemoteFormCardLoadOptions): Promise<Pick<import("@sprucelabs/schema").SchemaStaticValues<SpruceSchemas.Forms.v2021_07_02.GetFormResponsePayloadSchema, false, import("@sprucelabs/schema").SchemaOptionalFieldNames<SpruceSchemas.Forms.v2021_07_02.GetFormResponsePayloadSchema>, import("@sprucelabs/schema").StaticSchemaAllValues<SpruceSchemas.Forms.v2021_07_02.GetFormResponsePayloadSchema, false>>, "id" | "target" | "typeSlug" | "form" | "shouldRenderNav" | "roleToAddWhenCompleting" | "whereToSendOnCompletion" | "canEditCompletedForm" | "canCompleteMultipleTimes" | "roles" | "percentComplete" | "values"> | null>;
|
|
16
16
|
private loadForm;
|
|
17
17
|
protected handleSaveAndBeDone(): Promise<void>;
|
|
18
18
|
private handlePlayerChange;
|
|
@@ -24,6 +24,7 @@ export interface RemoteFormCardViewControllerOptions {
|
|
|
24
24
|
doneButtonLabel?: string;
|
|
25
25
|
shouldRenderSaveProgressButton?: boolean;
|
|
26
26
|
additionalButtons?: Button[];
|
|
27
|
+
footerLayout?: CardFooterLayout;
|
|
27
28
|
}
|
|
28
29
|
export type RemoteFormCardOnDoneHandler = () => void | Promise<void>;
|
|
29
30
|
export type RemoteFormCardOnErrorHandler = (error: Error) => void | Promise<void>;
|