@nemme/js-sdk 0.10.0 → 1.0.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/chunks/{client-C7-LfdBd.js → client-BYPXJmEU.js} +2 -2
- package/dist/chunks/{client-C2tphX4E.js.map → client-BYPXJmEU.js.map} +1 -1
- package/dist/chunks/{client-C2tphX4E.js → client-D6k2IoC6.js} +11 -6
- package/dist/chunks/{client-C7-LfdBd.js.map → client-D6k2IoC6.js.map} +1 -1
- package/dist/chunks/form-manager-3PwpV6gK.js +12 -0
- package/dist/chunks/form-manager-3PwpV6gK.js.map +1 -0
- package/dist/chunks/{form-manager-B6ielB39.js → form-manager-BqtPAs-A.js} +12 -11
- package/dist/chunks/form-manager-BqtPAs-A.js.map +1 -0
- package/dist/forms/question-text/question-text.d.ts +1 -0
- package/dist/forms.cjs +1 -1
- package/dist/forms.esm.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/js-sdk.css +1 -1
- package/dist/nemme-sdk.umd.js +3 -3
- package/dist/nemme-sdk.umd.js.map +1 -1
- package/dist/react.cjs +1 -1
- package/dist/react.esm.js +1 -1
- package/dist/types/forms.d.ts +2 -0
- package/package.json +1 -1
- package/dist/chunks/form-manager-B6ielB39.js.map +0 -1
- package/dist/chunks/form-manager-CVog992B.js +0 -12
- package/dist/chunks/form-manager-CVog992B.js.map +0 -1
|
@@ -1495,7 +1495,7 @@ var $e = ({ step: e, form: t, formState: n, onDismiss: r, onNextStep: i, onPrevi
|
|
|
1495
1495
|
});
|
|
1496
1496
|
}
|
|
1497
1497
|
if (e.questionType === "text") {
|
|
1498
|
-
let { title: s, description: l, image: u, maxChars: d, limited: f, required: p } = e,
|
|
1498
|
+
let { title: s, description: l, image: u, maxChars: d, limited: f, required: p, customPlaceholder: h, placeholder: g } = e, _ = n.responses[e.id] || "", v = (f && d ? _.length <= d : !0) && (p ? _.length > 0 : !0);
|
|
1499
1499
|
return /* @__PURE__ */ m(Wn, {
|
|
1500
1500
|
title: s,
|
|
1501
1501
|
icon: t.icon,
|
|
@@ -1505,11 +1505,12 @@ var $e = ({ step: e, form: t, formState: n, onDismiss: r, onNextStep: i, onPrevi
|
|
|
1505
1505
|
onQuit: () => r(n),
|
|
1506
1506
|
image: u,
|
|
1507
1507
|
maxCharacters: f ? d : void 0,
|
|
1508
|
-
|
|
1508
|
+
placeholder: h && g ? g : void 0,
|
|
1509
|
+
inputText: _,
|
|
1509
1510
|
setInputText: (t) => {
|
|
1510
1511
|
f && d && t.length > d || o(e.id, t);
|
|
1511
1512
|
},
|
|
1512
|
-
isValid:
|
|
1513
|
+
isValid: v,
|
|
1513
1514
|
hasPreviousStep: c.hasPreviousStep,
|
|
1514
1515
|
hasNextStep: c.hasNextStep
|
|
1515
1516
|
});
|
|
@@ -6105,8 +6106,8 @@ var Vn = ({ title: e, icon: t, description: n, image: r, children: i, onPrevious
|
|
|
6105
6106
|
fill: t
|
|
6106
6107
|
})]
|
|
6107
6108
|
});
|
|
6108
|
-
}, Wn = ({ title: e, icon: t, description: n, image: r, onPrevious: i, onNext: a, onQuit: o, inputText: s, setInputText: c, maxCharacters: l,
|
|
6109
|
-
let { t:
|
|
6109
|
+
}, Wn = ({ title: e, icon: t, description: n, image: r, onPrevious: i, onNext: a, onQuit: o, inputText: s, setInputText: c, maxCharacters: l, placeholder: u, isValid: d, hasPreviousStep: f, hasNextStep: p }) => {
|
|
6110
|
+
let { t: g } = Ze();
|
|
6110
6111
|
return /* @__PURE__ */ m(Vn, {
|
|
6111
6112
|
title: e,
|
|
6112
6113
|
icon: t,
|
|
@@ -6115,16 +6116,16 @@ var Vn = ({ title: e, icon: t, description: n, image: r, children: i, onPrevious
|
|
|
6115
6116
|
onPrevious: i,
|
|
6116
6117
|
onNext: a,
|
|
6117
6118
|
onQuit: o,
|
|
6118
|
-
isValid:
|
|
6119
|
-
hasPreviousStep:
|
|
6120
|
-
hasNextStep:
|
|
6119
|
+
isValid: d,
|
|
6120
|
+
hasPreviousStep: f,
|
|
6121
|
+
hasNextStep: p,
|
|
6121
6122
|
children: /* @__PURE__ */ h("div", {
|
|
6122
6123
|
className: "flex flex-col py-3 gap-2",
|
|
6123
6124
|
children: [l && /* @__PURE__ */ h("div", {
|
|
6124
6125
|
className: "flex items-center justify-between",
|
|
6125
6126
|
children: [/* @__PURE__ */ m(J, {
|
|
6126
6127
|
significance: "secondary",
|
|
6127
|
-
children:
|
|
6128
|
+
children: g("Max {{maxCharacters}} characters", { maxCharacters: l })
|
|
6128
6129
|
}), /* @__PURE__ */ m(J, {
|
|
6129
6130
|
significance: "secondary",
|
|
6130
6131
|
children: `${s.length}/${l}`
|
|
@@ -6137,7 +6138,7 @@ var Vn = ({ title: e, icon: t, description: n, image: r, children: i, onPrevious
|
|
|
6137
6138
|
children: s
|
|
6138
6139
|
}), /* @__PURE__ */ m("textarea", {
|
|
6139
6140
|
id: "primary",
|
|
6140
|
-
placeholder:
|
|
6141
|
+
placeholder: u ?? g("Type your answer here"),
|
|
6141
6142
|
className: K("absolute inset-0 resize-none", "overflow-hidden break-words outline-hidden resize-none material-medium", "rounded-lg py-3 px-4 min-h-20 border border-separator-opaque-light dark:border-separator-opaque-dark", "text-label-primary-light dark:text-label-primary-dark", Nn.B1),
|
|
6142
6143
|
value: s,
|
|
6143
6144
|
onChange: (e) => c(e.target.value)
|
|
@@ -7064,4 +7065,4 @@ var jr = z, Mr = class extends Error {
|
|
|
7064
7065
|
//#endregion
|
|
7065
7066
|
export { Nr as n, Mr as r, Pr as t };
|
|
7066
7067
|
|
|
7067
|
-
//# sourceMappingURL=form-manager-
|
|
7068
|
+
//# sourceMappingURL=form-manager-BqtPAs-A.js.map
|