UNPKG

scrivito-pisasales-questionnaire-builder

Version:
383 lines (382 loc) 11.6 kB
import * as g from "scrivito"; import { provideWidgetClass as o, provideComponent as n, isUserLoggedIn as S } from "scrivito"; import { jsx as e } from "react/jsx-runtime"; import { lazy as a, Suspense as i } from "react"; const nt = "externalId", at = "questionnaireId", it = "formType", ot = "previewSubmittedMessage", ct = "previewSubmittingMessage", Tt = "previewFailedMessage", lt = "failedMessage", rt = "showRetryButton", Et = "retryButtonText", It = "retryButtonAlignment", ut = "fixedFormHeight", _t = "formHeight", dt = "submittingMessageType", gt = "customClassNames", St = "scrollbarWidth", Nt = "overscrollBehavior", At = "submittedMessage", pt = "submittedMessageType", Ot = "submittingMessage", mt = "failedMessageType", Dt = "failedMessageWidgets", Rt = "submittedMessageWidgets", Lt = "submittingMessageWidgets", Ct = "backwardButtonText", bt = "forwardButtonText", Mt = "submitButtonText", wt = "singleSubmitButtonAlignment", Ut = "showReview", ft = "includeEmptyAnswers", Bt = "showStepsInReview", Wt = "showReviewHeader", vt = "showReviewFooter", yt = "reviewButtonText", Gt = "reviewHeaderTitle", Ft = "reviewCloseButtonText", Pt = "steps", ht = "questionnaireStatus", xt = "creationData", Qt = "title", Vt = "inputType", Ht = "isBeingCopied", kt = "activityIdSource", Yt = "projectIdSource", Xt = "contactIdSource", zt = "contactId", Jt = "projectId", jt = "activityId", qt = "activityIdDataItemField", Kt = "activityIdDataItemFieldValue", $t = "projectIdDataItemField", Zt = "projectIdDataItemFieldValue", te = "contactIdDataItemField", ee = "contactIdDataItemFieldValue", se = "stepNumber", ne = "isSingleStep", ae = "location", ie = "buttonsSize", oe = "anonymous", ce = "buttonsStyle", Te = "questionId", le = "text", re = "help", Ee = "mandatory", Ie = "options", ue = "answerOptionId", _e = "identifier", de = "position", ge = "content", Se = "type", Ne = "defaultValue", Ae = "placeholder", pe = "enableConditionals", Oe = "isCondition", me = "showClearSelectionButton", De = "clearSelectionButtonText", Re = "inlineView", Le = "alignment", Ce = "validationText", be = "selectButtonText", Me = "fileAccept", we = "fileTooLargeTextSingle", Ue = "fileTooLargeTextMulti", fe = "fileTypeRejectTextSingle", Be = "fileTypeRejectTextMulti", We = "value", ve = "valueIdentifier", ye = "updatedAt", Ge = "questionnaire-builder", N = "PSA_QST_INP_TYP_REP", A = "PSA_QST_INP_TYP_ONC_UPD", p = "document_single", O = "document_multi", m = "logic", D = "logic_tristate", R = "string_single_line", L = "string_multi_line", C = "integer", b = "floating_point", M = "date", w = "date_time", U = "string_dropdown", f = "string_radio", B = "string_checkboxes", I = "QuestionnaireContainerWidget", u = "QuestionnaireStepWidget", W = "QuestionnaireCheckboxQuestionWidget", v = "QuestionnaireFileQuestionWidget", y = "QuestionnaireInputQuestionWidget", _ = "QuestionnaireSelectQuestionWidget", d = "QuestionnaireAnswerOptionWidget", G = o(d, { attributes: { text: "string", identifier: "string", externalId: "string", answerOptionId: "string", position: "integer", type: ["enum", { values: ["dropdown", "radio", "checkbox"] }], content: "widgetlist", isCondition: "boolean" }, onlyInside: [_] }), F = a(() => import("./AnswerOptionWidgetContent-D2FPcr1W.js")); n(G, ({ widget: t }) => /* @__PURE__ */ e(i, { fallback: null, children: /* @__PURE__ */ e(F, { widget: t }) })); const T = { text: "string", mandatory: "boolean", help: "string", externalId: "string", defaultValue: "string", identifier: "string", position: "integer", questionId: "string", alignment: [ "enum", { values: ["left", "center", "right"] } ], validationText: "string" }, P = g.provideWidgetClass( W, { attributes: { ...T, type: [ "enum", { values: [m, D] } ] } } ), h = a(() => import("./CheckboxWidgetContent-4rke0IKm.js")); n(P, ({ widget: t }) => /* @__PURE__ */ e(i, { fallback: null, children: /* @__PURE__ */ e(h, { widget: t }) })); const x = o( v, { attributes: { ...T, type: ["enum", { values: [p, O] }], selectButtonText: "string", fileAccept: "string", fileTooLargeTextSingle: "string", fileTooLargeTextMulti: "string", fileTypeRejectTextSingle: "string", fileTypeRejectTextMulti: "string" } } ), Q = a(() => import("./FileQuestionWidgetContent-CgrLnHIZ.js")); n(x, ({ widget: t }) => /* @__PURE__ */ e(i, { fallback: null, children: /* @__PURE__ */ e(Q, { widget: t }) })); const V = o(y, { attributes: { ...T, placeholder: "string", type: ["enum", { values: [R, L, C, b, M, w] }] } }), H = a(() => import("./InputQuestionWidgetContent-BdqbWD6n.js")); n(V, ({ widget: t }) => /* @__PURE__ */ e(i, { fallback: null, children: /* @__PURE__ */ e(H, { widget: t }) })); const k = o( I, { attributes: { title: "string", steps: ["widgetlist", { only: u }], externalId: "string", questionnaireId: "string", inputType: [ "enum", { values: [N, A] } ], activityIdSource: [ "enum", { values: ["manual", "data-item"] } ], activityIdDataItemField: "string", activityIdDataItemFieldValue: "string", activityId: "string", projectIdSource: [ "enum", { values: ["manual", "data-item"] } ], projectIdDataItemField: "string", projectIdDataItemFieldValue: "string", projectId: "string", contactIdSource: [ "enum", { values: ["manual", "data-item"] } ], contactIdDataItemField: "string", contactIdDataItemFieldValue: "string", contactId: "string", customClassNames: "string", isBeingCopied: "boolean", showReview: "boolean", includeEmptyAnswers: "boolean", showStepsInReview: "boolean", showReviewHeader: "boolean", showReviewFooter: "boolean", reviewButtonText: "string", reviewHeaderTitle: "string", reviewCloseButtonText: "string", failedMessage: "string", submittedMessage: "string", submittingMessage: "string", failedMessageType: [ "enum", { values: ["default", "widget-list"] } ], submittedMessageType: [ "enum", { values: ["default", "widget-list"] } ], submittingMessageType: [ "enum", { values: ["default", "widget-list"] } ], failedMessageWidgets: "widgetlist", submittedMessageWidgets: "widgetlist", submittingMessageWidgets: "widgetlist", previewFailedMessage: "boolean", previewSubmittedMessage: "boolean", previewSubmittingMessage: "boolean", showRetryButton: "boolean", retryButtonText: "string", retryButtonAlignment: [ "enum", { values: ["left", "text-center", "text-end", "block"] } ], hiddenFields: ["widgetlist", { only: "FormHiddenFieldWidget" }], formType: [ "enum", { values: ["single-step", "multi-step"] } ], forwardButtonText: "string", backwardButtonText: "string", submitButtonText: "string", singleSubmitButtonAlignment: [ "enum", { values: ["left", "text-center", "text-end", "block"] } ], overscrollBehavior: [ "enum", { values: ["default", "none"] } ], fixedFormHeight: "boolean", formHeight: "integer", scrollbarWidth: [ "enum", { values: ["default", "thin", "none"] } ], creationData: "string", questionnaireStatus: "string", location: "string", buttonsSize: [ "enum", { values: ["btn-sm", "btn-md", "btn-lg"] } ], buttonsStyle: [ "enum", { values: ["btn-primary", "btn-secondary"] } ] }, extractTextAttributes: ["steps"] } ), Y = a(() => import("./QuestionnaireContainerContent-BjUWwbLI.js")); n(k, ({ widget: t }) => /* @__PURE__ */ e(i, { fallback: null, children: /* @__PURE__ */ e(Y, { widget: t }) })); const X = o(u, { onlyInside: I, attributes: { content: "widgetlist", stepNumber: "integer", isSingleStep: "boolean" } }), z = a(() => import("./QuestionnaireStepWidgetContent-DDdm7xLE.js")); n(X, ({ widget: t }) => /* @__PURE__ */ e(i, { fallback: null, children: /* @__PURE__ */ e(z, { widget: t }) })); const J = o( _, { attributes: { ...T, type: ["enum", { values: [U, f, B] }], options: ["widgetlist", { only: [d] }], enableConditionals: "boolean", clearSelectionButtonText: "string", showClearSelectionButton: "boolean", inlineView: "boolean" } } ), j = a(() => import("./SelectQuestionWidgetContent-B4FA15ii.js")); n(J, ({ widget: t }) => /* @__PURE__ */ e(i, { fallback: null, children: /* @__PURE__ */ e(j, { widget: t }) })); const q = (t) => t == null ? !0 : t instanceof Map || t instanceof Set ? t.size === 0 : [Object, Array].includes((t || {}).constructor) && !Object.entries(t || {}).length, Fe = (t) => t == null, Pe = (t) => [...new Set(t)], he = (t) => t != null && typeof t.valueOf() == "string", xe = (t) => t.filter(Boolean), s = globalThis; s.pisaInitDispatched = null; s.pisaJwtToken = null; const E = "salesportal", Qe = async (t) => { const c = await t.connection, l = c.apiUrl, r = c.token; r && !S() && (s.pisaJwtToken = r), await K(l), await Z(l); }, K = async (t) => { if ($(t), typeof window < "u") { const c = new CustomEvent("pisaUrlChanged"); window.dispatchEvent(c); } }, $ = (t) => { if (!t) { s.pisaUrl = ""; return; } s.pisaUrl = t.includes(E) ? t : `${t}/${E}` || ""; }, Z = async (t) => { if (q(t)) { s.pisaInitDispatched = !1; return; } s.pisaInitDispatched = !0; }, Ve = () => s.pisaUrl, He = () => s.pisaJwtToken, ke = () => s.pisaInitDispatched; export { ke as $, Le as A, Ae as B, ge as C, Ne as D, nt as E, we as F, R as G, re as H, Re as I, kt as J, jt as K, m as L, Ee as M, Kt as N, Ie as O, de as P, Te as Q, Xt as R, f as S, le as T, zt as U, Ce as V, ee as W, Yt as X, Jt as Y, Zt as Z, Fe as _, Se as a, Ge as a$, Pt as a0, it as a1, $t as a2, te as a3, qt as a4, oe as a5, at as a6, Vt as a7, ct as a8, ot as a9, lt as aA, Nt as aB, St as aC, gt as aD, dt as aE, _t as aF, ut as aG, It as aH, Et as aI, rt as aJ, Pe as aK, se as aL, Qt as aM, M as aN, w as aO, L as aP, xt as aQ, he as aR, ue as aS, I as aT, Oe as aU, Ht as aV, X as aW, V as aX, ht as aY, A as aZ, ae as a_, Tt as aa, N as ab, We as ac, ve as ad, ye as ae, ce as af, ie as ag, Ft as ah, Gt as ai, yt as aj, vt as ak, Wt as al, Bt as am, ft as an, Ut as ao, wt as ap, Mt as aq, bt as ar, Ct as as, Lt as at, Rt as au, Dt as av, mt as aw, Ot as ax, pt as ay, At as az, B as b, u as b0, ne as b1, G as b2, xe as b3, _e as c, D as d, y as e, _ as f, W as g, v as h, Qe as i, q as j, d as k, Ve as l, p as m, be as n, Ue as o, fe as p, Be as q, Me as r, O as s, U as t, pe as u, me as v, De as w, He as x, b as y, C as z }; //# sourceMappingURL=scrivitoConfig-WST4rsmc.js.map