@bettercms-ai/sdk 1.27.0 → 1.28.0
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.cjs +1 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -527,7 +527,7 @@ declare class BetterCMSError extends Error {
|
|
|
527
527
|
* every published site while the builder happily offers it. `radio`/`checkboxes`
|
|
528
528
|
* were exactly that gap.
|
|
529
529
|
*/
|
|
530
|
-
type DeliveryFormFieldType = "text" | "email" | "phone" | "url" | "number" | "date" | "textarea" | "select" | "radio" | "checkboxes" | "checkbox" | "consent" | "hidden";
|
|
530
|
+
type DeliveryFormFieldType = "text" | "email" | "phone" | "url" | "number" | "date" | "textarea" | "select" | "radio" | "checkboxes" | "checkbox" | "consent" | "hidden" | "step";
|
|
531
531
|
interface DeliveryFormField {
|
|
532
532
|
key: string;
|
|
533
533
|
label: string;
|
|
@@ -792,6 +792,8 @@ interface ManagedComponentInput {
|
|
|
792
792
|
* variant family, which is started from it when it has none.
|
|
793
793
|
*/
|
|
794
794
|
variantOf?: string;
|
|
795
|
+
/** Create only: a built-in section id (`builtin:<key>`) to copy in; the fields you send win. */
|
|
796
|
+
from?: string;
|
|
795
797
|
/** Update only: prop chrome by prop path (`cta.label`). Any of these, or `override`, needs `ifMatch`. */
|
|
796
798
|
propUi?: Record<string, Record<string, unknown> | null>;
|
|
797
799
|
propGroup?: Record<string, Record<string, unknown> | null>;
|
package/dist/index.d.ts
CHANGED
|
@@ -527,7 +527,7 @@ declare class BetterCMSError extends Error {
|
|
|
527
527
|
* every published site while the builder happily offers it. `radio`/`checkboxes`
|
|
528
528
|
* were exactly that gap.
|
|
529
529
|
*/
|
|
530
|
-
type DeliveryFormFieldType = "text" | "email" | "phone" | "url" | "number" | "date" | "textarea" | "select" | "radio" | "checkboxes" | "checkbox" | "consent" | "hidden";
|
|
530
|
+
type DeliveryFormFieldType = "text" | "email" | "phone" | "url" | "number" | "date" | "textarea" | "select" | "radio" | "checkboxes" | "checkbox" | "consent" | "hidden" | "step";
|
|
531
531
|
interface DeliveryFormField {
|
|
532
532
|
key: string;
|
|
533
533
|
label: string;
|
|
@@ -792,6 +792,8 @@ interface ManagedComponentInput {
|
|
|
792
792
|
* variant family, which is started from it when it has none.
|
|
793
793
|
*/
|
|
794
794
|
variantOf?: string;
|
|
795
|
+
/** Create only: a built-in section id (`builtin:<key>`) to copy in; the fields you send win. */
|
|
796
|
+
from?: string;
|
|
795
797
|
/** Update only: prop chrome by prop path (`cta.label`). Any of these, or `override`, needs `ifMatch`. */
|
|
796
798
|
propUi?: Record<string, Record<string, unknown> | null>;
|
|
797
799
|
propGroup?: Record<string, Record<string, unknown> | null>;
|
package/dist/index.js
CHANGED
|
@@ -1862,6 +1862,7 @@ function shouldShowField(field, values) {
|
|
|
1862
1862
|
function formInitialValues(form, prefill = {}) {
|
|
1863
1863
|
const values = {};
|
|
1864
1864
|
for (const field of form.fields) {
|
|
1865
|
+
if (field.type === "step") continue;
|
|
1865
1866
|
if (field.type === "checkbox" || field.type === "consent") {
|
|
1866
1867
|
values[field.key] = false;
|
|
1867
1868
|
} else if (field.type === "checkboxes") {
|