cft-builder 0.2.245 → 0.2.247
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.
|
@@ -32806,13 +32806,13 @@ class Gee {
|
|
|
32806
32806
|
const Lp = function(e, n, r) {
|
|
32807
32807
|
return new Gee(e, n, r);
|
|
32808
32808
|
}, IN = kf(void 0), Wee = ({ children: t, option: e, saveFormBuilderSchema: n, templateSchema: r, onChange: i, isHTML5BackendDisabled: a = !1 }) => {
|
|
32809
|
-
const { isPreview: s, isAdmin: o, isRenderView: l, isBuilderMode: u, renderType: d, isAdvanceView: f, globalAlignment: p = "ltr", emitSocketData: m, media: y, exam: g = {}, reusableComponent: x, saveFormProgress: A, showSettings: T, training: w, fileUploadParams: S
|
|
32809
|
+
const { isPreview: s, isAdmin: o, isRenderView: l, isBuilderMode: u, renderType: d, isAdvanceView: f, globalAlignment: p = "ltr", emitSocketData: m, media: y, exam: g = {}, reusableComponent: x, saveFormProgress: A, showSettings: T, training: w, fileUploadParams: S } = e, C = { ...D7, formType: d, ...r }, [E, D] = RD(LJ, C);
|
|
32810
32810
|
return fn(() => {
|
|
32811
|
-
const
|
|
32812
|
-
n && n(
|
|
32811
|
+
const P = St.debounce(() => {
|
|
32812
|
+
n && n(E);
|
|
32813
32813
|
}, 1e3);
|
|
32814
|
-
return
|
|
32815
|
-
}, [
|
|
32814
|
+
return P(), () => P.cancel();
|
|
32815
|
+
}, [E, n]), /* @__PURE__ */ c(IN.Provider, { value: { media: y, isBuilderMode: u, isPreview: s, isAdmin: o, isRenderView: l, renderType: d, isAdvanceView: f, globalAlignment: p, exam: g, emitSocketData: m, reusableComponent: x, state: E, dispatch: D, onChange: i, saveFormProgress: A, showSettings: T, training: w, fileUploadParams: S }, children: a ? /* @__PURE__ */ c(we, { children: t }) : /* @__PURE__ */ c(Rp, { backend: Lp, children: t }) });
|
|
32816
32816
|
}, _N = () => jd(IN), Qee = (t, e, n) => {
|
|
32817
32817
|
const r = Array.from(t), [i] = r.splice(e, 1);
|
|
32818
32818
|
return r.splice(n, 0, i), r;
|
|
@@ -33484,7 +33484,7 @@ const Lp = function(e, n, r) {
|
|
|
33484
33484
|
gridComponentFieldDelete: L
|
|
33485
33485
|
};
|
|
33486
33486
|
}, qt = () => {
|
|
33487
|
-
var E, D
|
|
33487
|
+
var C, E, D;
|
|
33488
33488
|
const {
|
|
33489
33489
|
isPreview: t,
|
|
33490
33490
|
// need to ask
|
|
@@ -33499,35 +33499,33 @@ const Lp = function(e, n, r) {
|
|
|
33499
33499
|
reusableComponent: u,
|
|
33500
33500
|
showSettings: d,
|
|
33501
33501
|
training: f,
|
|
33502
|
-
fileUploadParams: p
|
|
33503
|
-
showFromTitle: m
|
|
33502
|
+
fileUploadParams: p
|
|
33504
33503
|
} = _N();
|
|
33505
33504
|
if (t === void 0)
|
|
33506
33505
|
throw new Error("Must be wrapped in builder provider");
|
|
33507
|
-
const
|
|
33508
|
-
},
|
|
33509
|
-
d != null && d.showToast && (d == null || d.showToast(
|
|
33510
|
-
},
|
|
33506
|
+
const m = r == null ? void 0 : r.key, { saveComponent: y, componentList: g, sectionsList: x } = u, A = () => {
|
|
33507
|
+
}, T = (P) => {
|
|
33508
|
+
d != null && d.showToast && (d == null || d.showToast(P));
|
|
33509
|
+
}, w = ((C = f == null ? void 0 : f.quiz) == null ? void 0 : C.quizList) || [], S = (E = f == null ? void 0 : f.quiz) != null && E.getQuizList ? (D = f == null ? void 0 : f.quiz) == null ? void 0 : D.getQuizList : () => {
|
|
33511
33510
|
};
|
|
33512
33511
|
return {
|
|
33513
|
-
quizlist:
|
|
33514
|
-
getQuizList:
|
|
33512
|
+
quizlist: w,
|
|
33513
|
+
getQuizList: S,
|
|
33515
33514
|
isPreview: t,
|
|
33516
33515
|
isAdmin: e,
|
|
33517
33516
|
isRenderView: n,
|
|
33518
|
-
renderType:
|
|
33517
|
+
renderType: m,
|
|
33519
33518
|
isAdvanceView: i,
|
|
33520
33519
|
isBuilderMode: a,
|
|
33521
33520
|
globalAlignment: l,
|
|
33522
33521
|
media: s,
|
|
33523
33522
|
exam: o,
|
|
33524
|
-
saveComponent:
|
|
33525
|
-
componentList:
|
|
33526
|
-
sectionsList:
|
|
33523
|
+
saveComponent: y,
|
|
33524
|
+
componentList: g,
|
|
33525
|
+
sectionsList: x,
|
|
33527
33526
|
fileUploadParams: p,
|
|
33528
|
-
|
|
33529
|
-
|
|
33530
|
-
updateGlobalToast: w
|
|
33527
|
+
emitSocketData: A,
|
|
33528
|
+
updateGlobalToast: T
|
|
33531
33529
|
};
|
|
33532
33530
|
}, ite = "TASKS_LOADING", ate = "TASKS_ADD", ste = "TASKS_GET_PAGINATED_LIST", ote = "TASKS_DELETE", lte = "TASKS_PAGNIATION_UPDATE", cte = "TASKS_UPDATE", ute = "TASKS_SUCCESS_GET", dte = "TASK_GET_TEMPLATE", fte = "TASK_SET_DATA", hte = "TASKS_FORM_SUBMIT", pte = "TASKS_FORM_HTTP_REQUEST", iy = "TASK_SET_PROGRESS_VALUE", FN = "TASK_SET_MAX_PROGRESS_VALUE", NN = "TASK_SET_REGISTER_DATA", kN = "TASK_SET_SCHEMA", ay = "TASK_UPDATE_USER_FORM_SUBMIT_DATA", PN = "CLEAR_TASK", MN = "TASK_USER_SUBMIT_FORM_REPEATABLE_ADD", RN = "TASK_USER_SUBMIT_FORM_REPEATABLE_REMOVE_INDEX", LN = "TASK_USER_TRAINING_DATA", VN = "TASK_FIELD_UPDATE", mte = 6, A3 = 1, ap = "DISPLAY_TYPE_START_DETAILS", jg = "DISPLAY_TYPE_QUIZ", f9 = "DISPLAY_TYPE_START_TIMER";
|
|
33533
33531
|
function gte(t, e, n, r, i, a) {
|
|
@@ -60709,7 +60707,7 @@ var R0e = function() {
|
|
|
60709
60707
|
theme: i.theme,
|
|
60710
60708
|
formats: i.formats
|
|
60711
60709
|
};
|
|
60712
|
-
R0e ? C(new Quill(d.current, M)) : import("./quill-
|
|
60710
|
+
R0e ? C(new Quill(d.current, M)) : import("./quill-BlSu89FJ.js").then(function(Y) {
|
|
60713
60711
|
if (Y && Ie.isExist(d.current)) {
|
|
60714
60712
|
var F;
|
|
60715
60713
|
Y.default ? F = new Y.default(d.current, M) : F = new Y(d.current, M), C(F);
|
|
@@ -126643,6 +126641,8 @@ const Twe = ({
|
|
|
126643
126641
|
return /* @__PURE__ */ c("div", { children: (e == null ? void 0 : e.isExternalSource) === !1 && (e == null ? void 0 : e.media_file_id) !== void 0 && (e == null ? void 0 : e.media_file_id) !== null ? /* @__PURE__ */ c(we, { children: y(e == null ? void 0 : e.media_file_id) }) : /* @__PURE__ */ c(we, { children: /* @__PURE__ */ c(
|
|
126644
126642
|
hV,
|
|
126645
126643
|
{
|
|
126644
|
+
onUpdate: () => {
|
|
126645
|
+
},
|
|
126646
126646
|
options: n,
|
|
126647
126647
|
onReady: u,
|
|
126648
126648
|
currentItem: e
|
|
@@ -126735,7 +126735,7 @@ const Twe = ({
|
|
|
126735
126735
|
};
|
|
126736
126736
|
return /* @__PURE__ */ _("div", { className: "grid", children: [
|
|
126737
126737
|
/* @__PURE__ */ _("div", { className: "col-8 scroll-height-100", children: [
|
|
126738
|
-
/* @__PURE__ */ _("div", { className: "text-2xl font-bold mb-3", children: [
|
|
126738
|
+
/* @__PURE__ */ _("div", { className: "flex justify-content-center text-2xl font-bold mb-3", children: [
|
|
126739
126739
|
(M = g == null ? void 0 : g.heading) == null ? void 0 : M[f == null ? void 0 : f.type],
|
|
126740
126740
|
" -",
|
|
126741
126741
|
" ",
|
|
@@ -127609,13 +127609,14 @@ const Twe = ({
|
|
|
127609
127609
|
] });
|
|
127610
127610
|
}, ISe = (t) => {
|
|
127611
127611
|
var N, k, M, Y, F, q, $, oe, X, K;
|
|
127612
|
-
const {
|
|
127613
|
-
taskId:
|
|
127614
|
-
endPoints:
|
|
127615
|
-
isRenderView:
|
|
127616
|
-
showFieldsAfterSubmit:
|
|
127617
|
-
className:
|
|
127618
|
-
onStart:
|
|
127612
|
+
const {
|
|
127613
|
+
taskId: e,
|
|
127614
|
+
endPoints: n,
|
|
127615
|
+
isRenderView: r,
|
|
127616
|
+
showFieldsAfterSubmit: i = !1,
|
|
127617
|
+
className: a = "",
|
|
127618
|
+
onStart: s,
|
|
127619
|
+
showFromTitle: o = !0
|
|
127619
127620
|
} = t, { setLayout: l } = nn(), {
|
|
127620
127621
|
taskProgressValue: u,
|
|
127621
127622
|
taskRegisterData: d,
|
|
@@ -127633,12 +127634,12 @@ const Twe = ({
|
|
|
127633
127634
|
taskOptions: E
|
|
127634
127635
|
} = mr(), D = E != null && E.successMessage ? E == null ? void 0 : E.successMessage : "Submitted Successfully";
|
|
127635
127636
|
fn(() => {
|
|
127636
|
-
if (p !== null && l((p == null ? void 0 : p.layout) || []),
|
|
127637
|
+
if (p !== null && l((p == null ? void 0 : p.layout) || []), e) {
|
|
127637
127638
|
const U = { viewed_at: (/* @__PURE__ */ new Date()).toISOString() };
|
|
127638
127639
|
y(
|
|
127639
127640
|
x,
|
|
127640
|
-
|
|
127641
|
-
|
|
127641
|
+
e,
|
|
127642
|
+
n == null ? void 0 : n.updateFormData,
|
|
127642
127643
|
A3,
|
|
127643
127644
|
() => {
|
|
127644
127645
|
},
|
|
@@ -127648,13 +127649,13 @@ const Twe = ({
|
|
|
127648
127649
|
return () => {
|
|
127649
127650
|
w();
|
|
127650
127651
|
};
|
|
127651
|
-
}, [
|
|
127652
|
+
}, [e]), fn(() => {
|
|
127652
127653
|
const le = setTimeout(() => {
|
|
127653
127654
|
var U, G;
|
|
127654
127655
|
x !== null && ((p == null ? void 0 : p.enableAutoSave) === !0 || ((U = p == null ? void 0 : p.formType) == null ? void 0 : U.key) === x3 || ((G = p == null ? void 0 : p.formType) == null ? void 0 : G.key) === Bp) && C(
|
|
127655
127656
|
x,
|
|
127656
|
-
|
|
127657
|
-
|
|
127657
|
+
e,
|
|
127658
|
+
n == null ? void 0 : n.updateFormData
|
|
127658
127659
|
);
|
|
127659
127660
|
}, 2e3);
|
|
127660
127661
|
return () => clearTimeout(le);
|
|
@@ -127673,44 +127674,44 @@ const Twe = ({
|
|
|
127673
127674
|
/* @__PURE__ */ c(oi, { className: "mb-2" }),
|
|
127674
127675
|
/* @__PURE__ */ c(oi, { className: "mb-2" })
|
|
127675
127676
|
] }) });
|
|
127676
|
-
return /* @__PURE__ */ c("div", { className: "relative", children: g || T || A ? /* @__PURE__ */ c("div", { className: "w-full", children: /* @__PURE__ */ c(P, {}) }) : /* @__PURE__ */ _(we, { children: [
|
|
127677
|
-
(((N = p == null ? void 0 : p.formType) == null ? void 0 : N.key) === Bp || ((k = p == null ? void 0 : p.formType) == null ? void 0 : k.key) === x3) && /* @__PURE__ */ c(we, { children: /* @__PURE__ */ _("div", { className: `px-0 ${
|
|
127677
|
+
return console.log("className", a), /* @__PURE__ */ c("div", { className: "relative", children: g || T || A ? /* @__PURE__ */ c("div", { className: "w-full", children: /* @__PURE__ */ c(P, {}) }) : /* @__PURE__ */ _(we, { children: [
|
|
127678
|
+
(((N = p == null ? void 0 : p.formType) == null ? void 0 : N.key) === Bp || ((k = p == null ? void 0 : p.formType) == null ? void 0 : k.key) === x3) && /* @__PURE__ */ c(we, { children: /* @__PURE__ */ _("div", { className: `px-0 ${r === !1 && "builder_container"}`, children: [
|
|
127678
127679
|
/* @__PURE__ */ _("div", { className: "flex justify-content-center mb-2 align-items-center", children: [
|
|
127679
|
-
|
|
127680
|
+
o === !0 && /* @__PURE__ */ c("div", { className: "text-center text-900 text-3xl font-medium", children: m == null ? void 0 : m.task_title }),
|
|
127680
127681
|
/* @__PURE__ */ c("div", { className: "ml-4 ", children: f === mte && /* @__PURE__ */ c(sy, { classes: "", value: "Completed", level: "success" }) })
|
|
127681
127682
|
] }),
|
|
127682
|
-
|
|
127683
|
+
i === !1 && f === S ? /* @__PURE__ */ c(we, { children: /* @__PURE__ */ c("h3", { className: "text-center mt-5", children: D }) }) : /* @__PURE__ */ c("div", { className: "grid", children: /* @__PURE__ */ _("div", { className: "col-12", children: [
|
|
127683
127684
|
g && /* @__PURE__ */ c(P, {}),
|
|
127684
127685
|
!g && /* @__PURE__ */ _(we, { children: [
|
|
127685
127686
|
/* @__PURE__ */ c(jte, {}),
|
|
127686
127687
|
/* @__PURE__ */ c(
|
|
127687
127688
|
"div",
|
|
127688
127689
|
{
|
|
127689
|
-
className: `${
|
|
127690
|
+
className: `${a} mt-2 mb-2`,
|
|
127690
127691
|
children: p !== null && ((M = p == null ? void 0 : p.layout) == null ? void 0 : M.length) && /* @__PURE__ */ c(o3, {})
|
|
127691
127692
|
}
|
|
127692
127693
|
)
|
|
127693
127694
|
] })
|
|
127694
127695
|
] }) })
|
|
127695
127696
|
] }) }),
|
|
127696
|
-
((Y = p == null ? void 0 : p.formType) == null ? void 0 : Y.key) === qN && /* @__PURE__ */ c("div", { className: "
|
|
127697
|
-
|
|
127697
|
+
((Y = p == null ? void 0 : p.formType) == null ? void 0 : Y.key) === qN && /* @__PURE__ */ c("div", { className: "grid", children: /* @__PURE__ */ c("div", { className: "col-12", children: /* @__PURE__ */ _("div", { className: "card", children: [
|
|
127698
|
+
o === !0 && /* @__PURE__ */ c("div", { className: "flex align-items-center", children: /* @__PURE__ */ _("div", { children: [
|
|
127698
127699
|
m == null ? void 0 : m.task_title,
|
|
127699
127700
|
" "
|
|
127700
|
-
] }) })
|
|
127701
|
+
] }) }),
|
|
127701
127702
|
/* @__PURE__ */ c("div", { className: "scroll-height-300 mt-2 mb-2", children: /* @__PURE__ */ c(Rp, { backend: Lp, children: p !== null && ((F = p == null ? void 0 : p.layout) == null ? void 0 : F.length) && /* @__PURE__ */ c(o3, {}) }) })
|
|
127702
|
-
] }) }) })
|
|
127703
|
-
(((q = p == null ? void 0 : p.formType) == null ? void 0 : q.key) === "page" || (($ = p == null ? void 0 : p.formType) == null ? void 0 : $.key) === "pdf") && /* @__PURE__ */ c("div", { className: "
|
|
127703
|
+
] }) }) }),
|
|
127704
|
+
(((q = p == null ? void 0 : p.formType) == null ? void 0 : q.key) === "page" || (($ = p == null ? void 0 : p.formType) == null ? void 0 : $.key) === "pdf") && /* @__PURE__ */ c("div", { className: "grid", children: /* @__PURE__ */ c("div", { className: "col-12", children: /* @__PURE__ */ c("div", { className: "card", children: /* @__PURE__ */ c(Rp, { backend: Lp, children: p !== null && ((oe = p == null ? void 0 : p.layout) == null ? void 0 : oe.length) && /* @__PURE__ */ c(o3, {}) }) }) }) }),
|
|
127704
127705
|
((X = p == null ? void 0 : p.formType) == null ? void 0 : X.key) === "training" && /* @__PURE__ */ c(
|
|
127705
127706
|
$we,
|
|
127706
127707
|
{
|
|
127707
127708
|
renderIn: Pte,
|
|
127708
127709
|
taskSchema: p,
|
|
127709
|
-
taskId:
|
|
127710
|
-
endPoints:
|
|
127710
|
+
taskId: e,
|
|
127711
|
+
endPoints: n
|
|
127711
127712
|
}
|
|
127712
127713
|
),
|
|
127713
|
-
((K = p == null ? void 0 : p.formType) == null ? void 0 : K.key) === "exam" && /* @__PURE__ */ c(Uwe, { taskId:
|
|
127714
|
+
((K = p == null ? void 0 : p.formType) == null ? void 0 : K.key) === "exam" && /* @__PURE__ */ c(Uwe, { taskId: e, endPoints: n, onStart: s })
|
|
127714
127715
|
] }) });
|
|
127715
127716
|
}, _Se = (t) => {
|
|
127716
127717
|
var Y;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var Bl = Object.defineProperty;
|
|
2
2
|
var Ml = (n, t, e) => t in n ? Bl(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
|
|
3
3
|
var T = (n, t, e) => Ml(n, typeof t != "symbol" ? t + "" : t, e);
|
|
4
|
-
import { d as ti, i as Rr, a as Hi, b as Dl, e as Br, M as Ul, S as ei, U as si, g as ni, c as ri, f as fr, h as zs, j as $i, k as Vs, l as dr, m as Pl, n as jl, o as Fi, p as Hl, q as $l, r as Fl, s as zl, t as ii, u as Kl, v as Gl, w as Ft, x as zi, y as xe } from "./main-
|
|
4
|
+
import { d as ti, i as Rr, a as Hi, b as Dl, e as Br, M as Ul, S as ei, U as si, g as ni, c as ri, f as fr, h as zs, j as $i, k as Vs, l as dr, m as Pl, n as jl, o as Fi, p as Hl, q as $l, r as Fl, s as zl, t as ii, u as Kl, v as Gl, w as Ft, x as zi, y as xe } from "./main-DaIjYFUY.js";
|
|
5
5
|
function Ki(n) {
|
|
6
6
|
return n;
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cft-builder",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.247",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"types": "dist/types/index",
|
|
6
6
|
"files": [
|
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
"prebuild": "rm -rf dist",
|
|
32
32
|
"build": "vite build",
|
|
33
33
|
"tbuild": "vite build",
|
|
34
|
+
"wtbuild": "vite build --watch",
|
|
34
35
|
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
|
|
35
36
|
"preview": "vite preview",
|
|
36
37
|
"prepublish": "npm run build"
|