@oneclick.dev/cms-core-modules 0.0.56 → 0.0.58
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/{ContentEditor-HwHspQO1.mjs → ContentEditor-CtGeIzC4.mjs} +5663 -5562
- package/dist/ContentEditor-DCmt_y_R.js +290 -0
- package/dist/{Entries-DcpPvlYj.js → Entries-DlFiZ8EU.js} +1 -1
- package/dist/{Entries-QLMtTYLX.mjs → Entries-zyhycw1M.mjs} +1 -1
- package/dist/{Overview-KT2Mgfh5.js → Overview-CwCAeBnX.js} +1 -1
- package/dist/{Overview-D54pjmI6.mjs → Overview-D1nJLBe1.mjs} +1 -1
- package/dist/{TableView-D9J5rUls.mjs → TableView-CS13LLxk.mjs} +18968 -18400
- package/dist/{TableView-CpO53xcX.js → TableView-Dv4YXBD1.js} +38 -38
- package/dist/View-7qb_ohVo.js +1 -0
- package/dist/View-C7axVP9t.mjs +25 -0
- package/dist/cms-core-modules.css +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.mjs +6 -6
- package/dist/interpolation-BHSqsh8Q.mjs +65 -0
- package/dist/interpolation-We8hT28L.js +1 -0
- package/dist/src/lib/interpolation.d.ts +1 -1
- package/package.json +2 -2
- package/dist/ContentEditor-BBdzuTJJ.js +0 -290
- package/dist/View-DlHBZbFu.js +0 -1
- package/dist/View-Dv5QMrSn.mjs +0 -25
- package/dist/interpolation-BNUjI7LH.js +0 -1
- package/dist/interpolation-BpGXqOz8.mjs +0 -59
package/dist/View-DlHBZbFu.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("@oneclick.dev/cms-kit"),l={class:"flex-1 bg-white dark:bg-muted/40 rounded-lg border shadow overflow-hidden mt-4"},a=e.defineComponent({__name:"View",setup(d){const s=r.useRoute(),{config:u}=r.useModule(),c=t=>{console.log("Form submitted with result:",t),alert("Finished! Check console for result.")},i=e.computed(()=>Object.entries(s.query).reduce((t,[n,o])=>(t[n]=o,t),{}));return(t,n)=>{const o=e.resolveComponent("FormDisplayer");return e.openBlock(),e.createElementBlock("div",l,[e.createVNode(o,{settings:e.unref(u).formLayout,onFinish:c,variables:[],inputValues:i.value,style:{background:"transparent"}},null,8,["settings","inputValues"])])}}});exports.default=a;
|
package/dist/View-Dv5QMrSn.mjs
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { defineComponent as i, computed as l, resolveComponent as c, createElementBlock as a, openBlock as d, createVNode as m, unref as p } from "vue";
|
|
2
|
-
import { useRoute as f, useModule as _ } from "@oneclick.dev/cms-kit";
|
|
3
|
-
const h = { class: "flex-1 bg-white dark:bg-muted/40 rounded-lg border shadow overflow-hidden mt-4" }, v = /* @__PURE__ */ i({
|
|
4
|
-
__name: "View",
|
|
5
|
-
setup(g) {
|
|
6
|
-
const r = f(), { config: n } = _(), s = (e) => {
|
|
7
|
-
console.log("Form submitted with result:", e), alert("Finished! Check console for result.");
|
|
8
|
-
}, u = l(() => Object.entries(r.query).reduce((e, [o, t]) => (e[o] = t, e), {}));
|
|
9
|
-
return (e, o) => {
|
|
10
|
-
const t = c("FormDisplayer");
|
|
11
|
-
return d(), a("div", h, [
|
|
12
|
-
m(t, {
|
|
13
|
-
settings: p(n).formLayout,
|
|
14
|
-
onFinish: s,
|
|
15
|
-
variables: [],
|
|
16
|
-
inputValues: u.value,
|
|
17
|
-
style: { background: "transparent" }
|
|
18
|
-
}, null, 8, ["settings", "inputValues"])
|
|
19
|
-
]);
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
export {
|
|
24
|
-
v as default
|
|
25
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";function c(e,i){if(!e)return"";const r=i?.reduce((t,s)=>(t[s.name]=s.value,t),{})??{};return a(e,l(r))}function a(e,i){const r=e.match(/^\s*\{\{\s*([\s\S]+?)\s*\}\}\s*$/);if(r){const t=r[1].trim();return u(t,i)}return e.replace(/\{\{\s*([\s\S]+?)\s*\}\}/g,(t,s)=>{const o=String(s).trim(),n=u(o,i);if(n==null)return"";if(typeof n=="string")return n;if(typeof n=="number"||typeof n=="boolean")return String(n);try{return JSON.stringify(n)}catch{return String(n)}})}function u(e,i){if(!e)return"";const r=p(e),t={...i};for(const n of r)n in t||(t[n]=void 0);const s=Object.keys(t),o=Object.values(t);try{return new Function(...s,`'use strict'; return (${e})`)(...o)}catch(n){console.warn(`Interpolation failed for expression: "${e}"`,n);return}}function f(e){return/^[$A-Z_][0-9A-Z_$]*$/i.test(e)}function l(e){const i=["__proto__","constructor","prototype"],r=t=>{if(Array.isArray(t))return t.map(r);if(t&&typeof t=="object"){const s={};for(const o in t)!i.includes(o)&&f(o)&&(s[o]=r(t[o]));return s}return t};return r(e)}function p(e){const i=e.match(/\b[a-zA-Z_][a-zA-Z0-9_]*\b/g)||[],r=new Set(["true","false","null","undefined","return","if","else","try","catch","typeof"]);return[...new Set(i.filter(t=>!r.has(t)))]}exports.interpolateTemplateFromVariableContext=c;
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
function y(e, s) {
|
|
2
|
-
if (!e) return "";
|
|
3
|
-
const r = s?.reduce((t, i) => (t[i.name] = i.value, t), {}) ?? {};
|
|
4
|
-
return c(e, a(r));
|
|
5
|
-
}
|
|
6
|
-
function c(e, s) {
|
|
7
|
-
const r = e.match(/^\s*\{\{\s*([\s\S]+?)\s*\}\}\s*$/);
|
|
8
|
-
if (r) {
|
|
9
|
-
const t = r[1].trim();
|
|
10
|
-
return u(t, s);
|
|
11
|
-
}
|
|
12
|
-
return e.replace(/\{\{\s*([\s\S]+?)\s*\}\}/g, (t, i) => {
|
|
13
|
-
const o = String(i).trim(), n = u(o, s);
|
|
14
|
-
if (n == null) return "";
|
|
15
|
-
if (typeof n == "string") return n;
|
|
16
|
-
if (typeof n == "number" || typeof n == "boolean") return String(n);
|
|
17
|
-
try {
|
|
18
|
-
return JSON.stringify(n);
|
|
19
|
-
} catch {
|
|
20
|
-
return String(n);
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
function u(e, s) {
|
|
25
|
-
if (!e) return "";
|
|
26
|
-
const r = l(e), t = { ...s };
|
|
27
|
-
for (const n of r)
|
|
28
|
-
n in t || (t[n] = void 0);
|
|
29
|
-
const i = Object.keys(t), o = Object.values(t);
|
|
30
|
-
try {
|
|
31
|
-
return new Function(...i, `'use strict'; return (${e})`)(...o);
|
|
32
|
-
} catch (n) {
|
|
33
|
-
console.warn(`Interpolation failed for expression: "${e}"`, n);
|
|
34
|
-
return;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
function f(e) {
|
|
38
|
-
return /^[$A-Z_][0-9A-Z_$]*$/i.test(e);
|
|
39
|
-
}
|
|
40
|
-
function a(e) {
|
|
41
|
-
const s = ["__proto__", "constructor", "prototype"], r = (t) => {
|
|
42
|
-
if (Array.isArray(t)) return t.map(r);
|
|
43
|
-
if (t && typeof t == "object") {
|
|
44
|
-
const i = {};
|
|
45
|
-
for (const o in t)
|
|
46
|
-
!s.includes(o) && f(o) && (i[o] = r(t[o]));
|
|
47
|
-
return i;
|
|
48
|
-
}
|
|
49
|
-
return t;
|
|
50
|
-
};
|
|
51
|
-
return r(e);
|
|
52
|
-
}
|
|
53
|
-
function l(e) {
|
|
54
|
-
const s = e.match(/\b[a-zA-Z_][a-zA-Z0-9_]*\b/g) || [], r = /* @__PURE__ */ new Set(["true", "false", "null", "undefined", "return", "if", "else", "try", "catch", "typeof"]);
|
|
55
|
-
return [...new Set(s.filter((t) => !r.has(t)))];
|
|
56
|
-
}
|
|
57
|
-
export {
|
|
58
|
-
y as i
|
|
59
|
-
};
|