super-page-designer 2.3.17-sit1-design1 → 2.3.17-sit3-design1

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.
Files changed (23) hide show
  1. package/dist/es/components/design/utils/assemblys-config.js +1 -1
  2. package/dist/es/components/design/utils/form-design-util.js +4 -1
  3. package/dist/es/components/design/utils/page-table-util.js +1 -1
  4. package/dist/es/components/design/views/assemblys/common/common-variable-bind.vue.js +1 -1
  5. package/dist/es/components/design/views/assemblys/data/component/data-origin.vue2.js +1 -1
  6. package/dist/es/components/design/views/assemblys/data/table/table-attr-base.vue.js +5 -5
  7. package/dist/es/components/design/views/assemblys/form/common/condition.vue.js +43 -40
  8. package/dist/es/components/design/views/assemblys/form/common/data-format.vue.js +1 -1
  9. package/dist/es/components/design/views/assemblys/form/common/data-origin.vue.js +1 -1
  10. package/dist/es/components/design/views/assemblys/form/common/data-origin.vue2.js +1 -1
  11. package/dist/es/components/design/views/assemblys/form/common/dataorigin-input-table.vue.js +26 -2
  12. package/dist/es/components/design/views/assemblys/form/common/dataorigin-input-table.vue2.js +2 -26
  13. package/dist/es/components/design/views/assemblys/form/label/label-attr-base.vue.js +20 -20
  14. package/dist/es/components/design/views/assemblys/form/label/label-design.vue.js +4 -1
  15. package/dist/es/components/design/views/assemblys/form/label/label-design.vue2.js +22 -22
  16. package/dist/es/components/design/views/design/page-event/completion-data.js +1 -1
  17. package/dist/es/components/design/views/design/page-event/{config.vue2.js → config.vue.js} +2 -2
  18. package/dist/es/components/design/views/design/page-event/config.vue3.js +52 -45
  19. package/dist/es/components/design/views/design/page-event/page-event-content.vue.js +1 -1
  20. package/dist/es/components/design/views/design/view/view-design-display.vue.js +1 -1
  21. package/dist/es/style.css +153 -60
  22. package/package.json +3 -3
  23. /package/dist/es/components/design/views/assemblys/common/{common-variable-bind.vue3.js → common-variable-bind.vue2.js} +0 -0
@@ -1,28 +1,28 @@
1
- import { defineComponent as e, ref as u, watch as t, resolveComponent as l, createBlock as a, openBlock as o, normalizeStyle as i, normalizeClass as n, withCtx as r, createElementVNode as s, createElementBlock as p, createCommentVNode as c, createTextVNode as f, unref as v, toDisplayString as y } from "vue";
2
- import { caculateDetailComponentStyle as d, caculateComponentProps as m } from "../../../../utils/form-design-util.js";
1
+ import { defineComponent as e, ref as t, watch as l, resolveComponent as u, createElementBlock as a, createBlock as i, openBlock as n, normalizeStyle as o, normalizeClass as r, createElementVNode as s, toDisplayString as p, withCtx as c, createCommentVNode as f, createTextVNode as v, unref as y } from "vue";
2
+ import { caculateDetailComponentStyle as m, caculateComponentProps as d } from "../../../../utils/form-design-util.js";
3
3
  import { SuperIcon as T } from "agilebuilder-ui";
4
- const g = { style: { display: "flex", width: "100%", "justify-content": "space-between" } }, x = ["title"], I = e({ __name: "label-design", props: { configure: { type: Object, required: true } }, setup(e2) {
5
- const I2 = e2;
6
- I2.configure.runtime || (I2.configure.runtime = {});
7
- const b = u({}), h = u(""), V = u({}), _ = u({}), w = u({});
8
- return t(I2.configure.style, () => {
9
- d(I2.configure, b, h, V), I2.configure.runtime.style = b.value, I2.configure.runtime.class = h.value, I2.configure.runtime.headerStyle = V.value;
10
- }, { immediate: true }), t(I2.configure.props, () => {
11
- m(I2.configure, _, w), function() {
12
- let e3 = I2.configure.props ? I2.configure.props : {};
13
- const u2 = e3.base ? e3.base : {}, t2 = e3.dataOrigin ? e3.dataOrigin : {}, l2 = {};
14
- u2.labelText && (l2.labelText = u2.labelText), u2.whetherTittle && (l2.whetherTittle = u2.whetherTittle);
4
+ const g = { style: { width: "100%", "text-align": "center", "font-weight": "700", "font-size": "24px" } }, x = { style: { display: "flex", width: "100%", "justify-content": "space-between" } }, h = ["title"], w = { key: 2, style: { display: "flex", "justify-content": "space-between" } }, I = { style: { overflow: "hidden", "white-space": "nowrap" } }, b = { key: 0 }, V = e({ __name: "label-design", props: { configure: { type: Object, required: true } }, setup(e2) {
5
+ const V2 = e2;
6
+ V2.configure.runtime || (V2.configure.runtime = {});
7
+ const S = t({}), _ = t(""), k = t({}), F = t({}), j = t({});
8
+ return l(V2.configure.style, () => {
9
+ m(V2.configure, S, _, k), V2.configure.runtime.style = S.value, V2.configure.runtime.class = _.value, V2.configure.runtime.headerStyle = k.value;
10
+ }, { immediate: true }), l(V2.configure.props, () => {
11
+ d(V2.configure, F, j), function() {
12
+ let e3 = V2.configure.props ? V2.configure.props : {};
13
+ const t2 = e3.base ? e3.base : {}, l2 = e3.dataOrigin ? e3.dataOrigin : {}, u2 = {};
14
+ t2.labelText && (u2.labelText = t2.labelText), t2.whetherTittle ? u2.whetherTittle = t2.whetherTittle : (u2.whetherTittle = false, u2.showType = t2.showType, u2.contentAlign = t2.contentAlign);
15
15
  const a2 = e3.preSuffix ? e3.preSuffix : {};
16
- (a2.preIconType || a2.preText || a2.sufIconType || a2.sufText) && (l2.preIconType = a2.preIconType, l2.preIconValue = a2.preIconValue, l2.preText = a2.preText, l2.sufIconType = a2.sufIconType, l2.sufIconValue = a2.sufIconValue, l2.sufText = a2.sufText, l2.iconPosition = a2.position);
17
- const o2 = t2.optionValueSetType;
18
- let i2 = false;
19
- o2 && (_.value.formatType = o2, "static" != o2 && "optionGroup" != o2 && "dynamicData" != o2 && "dataTable" != o2 || (i2 = true), _.value.hasOptions = i2, _.value.decimalDigit = t2.decimalDigit, _.value.thousandsSeparator = t2.thousandsSeparator, _.value.symbol = t2.symbol, _.value.dateFormat = t2.dateFormat, _.value.timeFormat = t2.timeFormat, _.value.formatFunc = t2.formatFunc), Object.assign(_.value, l2);
20
- }(), I2.configure.runtime.props = _.value, I2.configure.runtime.titleExceedStyle = w.value;
21
- }, { immediate: true }), (e3, u2) => {
22
- const t2 = l("el-form-item");
23
- return o(), a(t2, { required: !!_.value.required, class: n(h.value), "label-width": _.value.labelWidth, style: i(b.value) }, { label: r(() => [_.value.tittleShow ? (o(), p("div", { key: 0, style: i({ ...V.value, ...w.value }) }, y(_.value.title), 5)) : c("", true)]), default: r(() => [s("div", g, [s("span", { style: { overflow: "hidden" }, title: _.value.value }, [_.value.preIconValue || _.value.preText ? (o(), p("span", { key: 0, class: n({ "el-input__suffix": "outer" != _.value.iconPosition, "el-input-group__append": "outer" == _.value.iconPosition }), style: i(e3.appendStyle) }, [_.value.preIconType && _.value.preIconValue ? (o(), a(v(T), { key: 0, iconType: _.value.preIconType, iconValue: _.value.preIconValue }, null, 8, ["iconType", "iconValue"])) : c("", true), f(" " + y(_.value.preText), 1)], 6)) : c("", true), f("  " + y(_.value.value), 1)], 8, x), _.value.sufIconValue || _.value.sufText ? (o(), p("span", { key: 0, class: n({ "el-input__suffix": "outer" != _.value.iconPosition, "el-input-group__append": "outer" == _.value.iconPosition }) }, [_.value.sufIconType && _.value.sufIconValue ? (o(), a(v(T), { key: 0, style: {}, iconType: _.value.sufIconType, iconValue: _.value.sufIconValue }, null, 8, ["iconType", "iconValue"])) : c("", true), s("span", null, " " + y(_.value.sufText), 1)], 2)) : c("", true)])]), _: 1 }, 8, ["required", "class", "label-width", "style"]);
16
+ (a2.preIconType || a2.preText || a2.sufIconType || a2.sufText) && (u2.preIconType = a2.preIconType, u2.preIconValue = a2.preIconValue, u2.preText = a2.preText, u2.sufIconType = a2.sufIconType, u2.sufIconValue = a2.sufIconValue, u2.sufText = a2.sufText, u2.iconPosition = a2.position);
17
+ const i2 = l2.optionValueSetType;
18
+ let n2 = false;
19
+ i2 && (F.value.formatType = i2, "static" != i2 && "optionGroup" != i2 && "dynamicData" != i2 && "dataTable" != i2 || (n2 = true), F.value.hasOptions = n2, F.value.decimalDigit = l2.decimalDigit, F.value.thousandsSeparator = l2.thousandsSeparator, F.value.symbol = l2.symbol, F.value.dateFormat = l2.dateFormat, F.value.timeFormat = l2.timeFormat, F.value.formatFunc = l2.formatFunc), Object.assign(F.value, u2);
20
+ }(), V2.configure.runtime.props = F.value, V2.configure.runtime.titleExceedStyle = j.value;
21
+ }, { immediate: true }), (e3, t2) => {
22
+ const l2 = u("el-form-item");
23
+ return F.value.whetherTittle ? (n(), a("div", { key: 0, ref: "titleRef", class: r(e3.runtimeClass), style: o(e3.runtimeStyle) }, [s("div", g, p(F.value.title), 1)], 6)) : F.value.tittleShow ? (n(), i(l2, { key: 1, required: !!F.value.required, class: r([_.value, F.value.contentAlign ? "form-item-align-" + F.value.contentAlign : "formNo" === F.value.showType ? "form-item-align-right" : ""]), "label-width": F.value.labelWidth, style: o(S.value) }, { label: c(() => [F.value.tittleShow ? (n(), a("div", { key: 0, style: o({ ...k.value, ...j.value }) }, p(F.value.title), 5)) : f("", true)]), default: c(() => [s("div", x, [s("span", { style: { overflow: "hidden" }, title: F.value.value }, [F.value.preIconValue || F.value.preText ? (n(), a("span", { key: 0, class: r({ "el-input__suffix": "outer" != F.value.iconPosition, "el-input-group__append": "outer" == F.value.iconPosition }), style: o(e3.appendStyle) }, [F.value.preIconType && F.value.preIconValue ? (n(), i(y(T), { key: 0, iconType: F.value.preIconType, iconValue: F.value.preIconValue }, null, 8, ["iconType", "iconValue"])) : f("", true), v(" " + p(F.value.preText), 1)], 6)) : f("", true), v("  " + p(F.value.value) + " " + p("formNo" === F.value.showType ? "(表单编号xxxx)" : ""), 1)], 8, h), F.value.sufIconValue || F.value.sufText ? (n(), a("span", { key: 0, class: r({ "el-input__suffix": "outer" != F.value.iconPosition, "el-input-group__append": "outer" == F.value.iconPosition }) }, [F.value.sufIconType && F.value.sufIconValue ? (n(), i(y(T), { key: 0, style: {}, iconType: F.value.sufIconType, iconValue: F.value.sufIconValue }, null, 8, ["iconType", "iconValue"])) : f("", true), s("span", null, " " + p(F.value.sufText), 1)], 2)) : f("", true)])]), _: 1 }, 8, ["required", "class", "label-width", "style"])) : (n(), a("span", w, [s("span", I, p(F.value.prefixIcon) + " " + p(), 1), F.value.suffixTxt ? (n(), a("span", b, p(F.value.suffixTxt), 1)) : f("", true)]));
24
24
  };
25
25
  } });
26
26
  export {
27
- I as default
27
+ V as default
28
28
  };
@@ -1,4 +1,4 @@
1
- const e = { "window.": [{ label: "window.$PageUtil", type: "property", info: "页面工具方法" }, { label: "window.$message", type: "property", info: "提示信息" }, { label: "window.$http", type: "property", info: "接口调用" }], "window.$http.": [{ label: "window.$http.get(url).then(result => {\n\n})", type: "function", info: "" }, { label: "window.$http.post(url,{}).then(result => {\n\n})", type: "function", info: "" }, { label: "window.$http.delete(url).then(result => {\n\n})", type: "function", info: "" }, { label: "window.$http.put(url).then(result => {\n\n})", type: "function", info: "" }, { label: "window.$http.patch(url).then(result => {\n\n})", type: "function", info: "" }], "window.$message.": [{ label: "window.$message.info()", type: "function", info: "提示消息" }, { label: "window.$message.success()", type: "function", info: "成功消息" }, { label: "window.$message.warning()", type: "function", info: "警告消息" }, { label: "window.$message.error()", type: "function", info: "错误消息" }], "window.$PageUtil.": [{ label: "window.$PageUtil.standardEvents", type: "function", info: "标准事件" }, { label: 'window.$PageUtil.getCustomFunc(params.pageContext, "xxxx")', type: "function", info: "获取自定义方法" }, { label: 'window.$PageUtil.getComponentRefByProp(params.pageContext, "xxxx")', type: "function", info: "根据属性获取组件引用对象" }, { label: 'window.$PageUtil.getComponentRefByCode(params.pageContext, "12c216ce9d424259974a56436c5af4cc")', type: "function", info: "根据组件唯一编码获取组件引用对象" }, { label: "window.$PageUtil.getEntity(params.pageContext)", type: "function", info: "获得实体" }, { label: 'window.$PageUtil.getEntityValue(params.pageContext, "xxxx")', type: "function", info: "获得实体属性值" }, { label: "window.$PageUtil.getPageData(params.pageContext)", type: "function", info: "获得页面变量" }, { label: 'window.$PageUtil.getPageDataValue(params.pageContext,"xxxx")', type: "function", info: "获得页面变量属性值" }, { label: "window.$PageUtil.getAdditionalParams(params.pageContext)", type: "function", info: "获得附加参数对象" }, { label: 'window.$PageUtil.getAdditionalParamValue(params.pageContext,"xxxx")', type: "function", info: "获得某附加参数值" }, { label: "window.$PageUtil.getFormViewData(params.pageContext)", type: "function", info: "获得表单数据查看信息" }, { label: "window.$PageUtil.getFormData(params.pageContext,id)", type: "function", info: "重新请求获得表单数据" }, { label: 'window.$PageUtil.setEntityDataValue(params.pageContext, {"name":"xxx",age:1})', type: "function", info: "设置Data值" }, { label: 'window.$PageUtil.setEntityPageValue(params.pageContext, {"name":"xxx",age:1})', type: "function", info: "设置页面变量值" }, { label: 'window.$PageUtil.setEntityValueByType(params.pageContext,"page",{"name":"xxx",age:1})', type: "function", info: "根据类型设置值" }, { label: 'window.$PageUtil.showElement(params.pageContext,["NAME","AGE"])', type: "function", info: "显示页面中的某个组件元素" }, { label: 'window.$PageUtil.hideElement(params.pageContext,["NAME","AGE"])', type: "function", info: "隐藏页面中的某个组件元素" }, { label: 'window.$PageUtil.enableElement(params.pageContext,["NAME","AGE"])', type: "function", info: "设置组件元素可用状态" }, { label: 'window.$PageUtil.disableElement(params.pageContext,["NAME","AGE"])', type: "function", info: "禁用页面中的某个组件元素" }, { label: "window.$PageUtil.disabledAllFields(params.pageContext)", type: "function", info: "禁用所有字段" }, { label: "window.$PageUtil.dynamicControlFormEdit(params.pageContext,[])", type: "function", info: "表单编辑权限动态控制" }, { label: "window.$PageUtil.dynamicControlTableEdit(params.pageContext,[],tableCode?)", type: "function", info: "控制表格编辑权限" }, { label: "window.$PageUtil.openPage(params.pageContext,openParam)", type: "function", info: "打开页面" }, { label: "window.$PageUtil.refreshPage(params.pageContext,id)", type: "function", info: "刷新页面" }, { label: "window.$PageUtil.refreshSubTableHandle(params.pageContext,tableCode)", type: "function", info: "刷新表单中子表内容" }, { label: "window.$PageUtil.refreshChildData(params.pageContextt, tableCode, data)", type: "function", info: "更新子表集合" }, { label: "window.$PageUtil.isMobile()", type: "function", info: "是否是移动端" }, { label: "window.$PageUtil.getServerConfigValue(key)", type: "function", info: "根据key获得配置信息" }, { label: "window.$PageUtil.getBackendUrl(params.pageContext)", type: "function", info: "获得当前系统后端访问路径" }, { label: "window.$PageUtil.getPlateBackendUrl()", type: "function", info: "获得平台后端访问路径" }], "logicContext.": [{ label: "logicContext.page", type: "property", info: "页面变量" }, { label: "logicContext.logic", type: "property", info: "页面逻辑" }, { label: "logicContext.task", type: "property", info: "任务变量" }, { label: "logicContext.context", type: "property", info: "上下文变量" }, { label: "logicContext.system", type: "property", info: "系统变量" }, { label: "logicContext.data", type: "property", info: "数据模型变量" }] };
1
+ const e = { de: [{ label: "debugger", type: "property" }], "params.": [{ label: "params.pageContext", type: "property", info: "页面工具上下文" }, { label: "params.configureObj", type: "property", info: "组件配置信息" }], "params.pageContext.": [{ label: "params.pageContext.entity.data", type: "property", info: "" }, { label: "params.pageContext.entity.context", type: "property", info: "" }, { label: "params.pageContext.entity.page", type: "property", info: "" }, { label: "params.pageContext.entity.request", type: "property", info: "" }, { label: "params.pageContext.entity.system", type: "property", info: "" }, { label: "params.pageContext.entity.task", type: "property", info: "" }], "window.": [{ label: "window.$PageUtil", type: "property", info: "页面工具方法" }, { label: "window.$message", type: "property", info: "提示信息" }, { label: "window.$http", type: "property", info: "接口调用" }], "window.$http.": [{ label: "window.$http.get(url).then(result => {\n\n})", type: "function", info: "" }, { label: "window.$http.post(url,{}).then(result => {\n\n})", type: "function", info: "" }, { label: "window.$http.delete(url).then(result => {\n\n})", type: "function", info: "" }, { label: "window.$http.put(url).then(result => {\n\n})", type: "function", info: "" }, { label: "window.$http.patch(url).then(result => {\n\n})", type: "function", info: "" }], "window.$message.": [{ label: "window.$message.info()", type: "function", info: "提示消息" }, { label: "window.$message.success()", type: "function", info: "成功消息" }, { label: "window.$message.warning()", type: "function", info: "警告消息" }, { label: "window.$message.error()", type: "function", info: "错误消息" }], "window.$PageUtil.": [{ label: "window.$PageUtil.standardEvents", type: "function", info: "标准事件" }, { label: 'window.$PageUtil.getCustomFunc(params.pageContext, "xxxx")', type: "function", info: "获取自定义方法" }, { label: 'window.$PageUtil.getComponentRefByProp(params.pageContext, "xxxx")', type: "function", info: "根据属性获取组件引用对象" }, { label: 'window.$PageUtil.getComponentRefByCode(params.pageContext, "12c216ce9d424259974a56436c5af4cc")', type: "function", info: "根据组件唯一编码获取组件引用对象" }, { label: "window.$PageUtil.getEntity(params.pageContext)", type: "function", info: "获得实体" }, { label: 'window.$PageUtil.getEntityValue(params.pageContext, "xxxx")', type: "function", info: "获得实体属性值" }, { label: "window.$PageUtil.getPageData(params.pageContext)", type: "function", info: "获得页面变量" }, { label: 'window.$PageUtil.getPageDataValue(params.pageContext,"xxxx")', type: "function", info: "获得页面变量属性值" }, { label: "window.$PageUtil.getAdditionalParams(params.pageContext)", type: "function", info: "获得附加参数对象" }, { label: 'window.$PageUtil.getAdditionalParamValue(params.pageContext,"xxxx")', type: "function", info: "获得某附加参数值" }, { label: "window.$PageUtil.getFormViewData(params.pageContext)", type: "function", info: "获得表单数据查看信息" }, { label: "window.$PageUtil.getFormData(params.pageContext,id)", type: "function", info: "重新请求获得表单数据" }, { label: 'window.$PageUtil.setEntityDataValue(params.pageContext, {"name":"xxx",age:1})', type: "function", info: "设置Data值" }, { label: 'window.$PageUtil.setEntityPageValue(params.pageContext, {"name":"xxx",age:1})', type: "function", info: "设置页面变量值" }, { label: 'window.$PageUtil.setEntityValueByType(params.pageContext,"page",{"name":"xxx",age:1})', type: "function", info: "根据类型设置值" }, { label: 'window.$PageUtil.showElement(params.pageContext,["NAME","AGE"])', type: "function", info: "显示页面中的某个组件元素" }, { label: 'window.$PageUtil.hideElement(params.pageContext,["NAME","AGE"])', type: "function", info: "隐藏页面中的某个组件元素" }, { label: 'window.$PageUtil.enableElement(params.pageContext,["NAME","AGE"])', type: "function", info: "设置组件元素可用状态" }, { label: 'window.$PageUtil.disableElement(params.pageContext,["NAME","AGE"])', type: "function", info: "禁用页面中的某个组件元素" }, { label: "window.$PageUtil.disabledAllFields(params.pageContext)", type: "function", info: "禁用所有字段" }, { label: "window.$PageUtil.dynamicControlFormEdit(params.pageContext,[])", type: "function", info: "表单编辑权限动态控制" }, { label: "window.$PageUtil.dynamicControlTableEdit(params.pageContext,[],tableCode?)", type: "function", info: "控制表格编辑权限" }, { label: "window.$PageUtil.openPage(params.pageContext,openParam)", type: "function", info: "打开页面" }, { label: "window.$PageUtil.refreshPage(params.pageContext,id)", type: "function", info: "刷新页面" }, { label: "window.$PageUtil.refreshSubTableHandle(params.pageContext,tableCode)", type: "function", info: "刷新表单中子表内容" }, { label: "window.$PageUtil.refreshChildData(params.pageContextt, tableCode, data)", type: "function", info: "更新子表集合" }, { label: "window.$PageUtil.isMobile()", type: "function", info: "是否是移动端" }, { label: "window.$PageUtil.getServerConfigValue(key)", type: "function", info: "根据key获得配置信息" }, { label: "window.$PageUtil.getBackendUrl(params.pageContext)", type: "function", info: "获得当前系统后端访问路径" }, { label: "window.$PageUtil.getPlateBackendUrl()", type: "function", info: "获得平台后端访问路径" }], "logicContext.": [{ label: "logicContext.page", type: "property", info: "页面变量" }, { label: "logicContext.logic", type: "property", info: "页面逻辑" }, { label: "logicContext.task", type: "property", info: "任务变量" }, { label: "logicContext.context", type: "property", info: "上下文变量" }, { label: "logicContext.system", type: "property", info: "系统变量" }, { label: "logicContext.data", type: "property", info: "数据模型变量" }] };
2
2
  export {
3
3
  e as default
4
4
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./config.vue3.js";
2
- /* empty css */
2
+ /* empty css */
3
3
  import e from "../../../../../_virtual/_plugin-vue_export-helper.js";
4
- const r = e(o, [["__scopeId", "data-v-c8908117"]]);
4
+ const r = e(o, [["__scopeId", "data-v-f39498c6"]]);
5
5
  export {
6
6
  r as default
7
7
  };
@@ -1,76 +1,83 @@
1
- import { defineComponent as e, ref as t, onMounted as l, onUnmounted as o, resolveComponent as n, createElementBlock as a, openBlock as r, createElementVNode as i, createVNode as s, createTextVNode as u, withCtx as c, unref as d, normalizeStyle as m } from "vue";
2
- import { useLocalStorage as f } from "@vueuse/core";
3
- import { Search as p, MagicStick as v } from "@element-plus/icons-vue";
1
+ import { defineComponent as e, ref as t, onMounted as l, onUnmounted as o, resolveComponent as a, createElementBlock as n, openBlock as r, createElementVNode as i, createVNode as s, createTextVNode as u, withCtx as c, unref as m, normalizeStyle as p } from "vue";
2
+ import { useLocalStorage as d } from "@vueuse/core";
3
+ import { Search as f, MagicStick as v } from "@element-plus/icons-vue";
4
4
  import { EditorView as h, basicSetup as g } from "codemirror";
5
5
  import { javascriptLanguage as b, javascript as _ } from "@codemirror/lang-javascript";
6
- import { EditorState as x } from "@codemirror/state";
6
+ import { EditorState as y } from "@codemirror/state";
7
7
  import "@codemirror/autocomplete";
8
8
  import "@codemirror/language";
9
- import { openSearchPanel as y } from "@codemirror/search";
9
+ import { openSearchPanel as x } from "@codemirror/search";
10
10
  import k from "js-beautify";
11
- import w from "./completion-data.js";
12
- const j = { style: { padding: "8px 16px", margin: "10px 0px", "background-color": "#f4f4f5" }, class: "pppp" }, C = { style: { color: "#909399", "font-size": "14px" } }, z = { key: 0 }, F = { key: 1 }, S = { class: "editorTool" }, O = e({ __name: "config", props: { eventForm: { type: Object, default: () => ({}) } }, emits: ["fullScreen"], setup(e2, { expose: O2, emit: V }) {
13
- const D = e2;
11
+ import C from "./completion-data.js";
12
+ const j = { style: { padding: "8px 16px", margin: "10px 0px", "background-color": "#f4f4f5" }, class: "pppp" }, w = { style: { color: "#909399", "font-size": "14px" } }, z = { key: 0 }, F = { key: 1 }, S = { class: "editorTool" }, O = e({ __name: "config", props: { eventForm: { type: Object, default: () => ({}) } }, emits: ["fullScreen"], setup(e2, { expose: O2, emit: V }) {
13
+ const L = e2;
14
14
  t(false);
15
- const L = t({ theme: "default", fontSize: 14, searchOpen: false }), T = t(null), W = t(null), $ = t(null), B = t({ backgroundColor: "#fff", color: "#333", border: "1px solid #ddd", overflow: "auto" });
16
- let R;
15
+ const D = t({ theme: "default", fontSize: 14, searchOpen: false }), E = t(null), W = t(null), R = t(null), T = t({ backgroundColor: "#fff", color: "#333", border: "1px solid #ddd", overflow: "auto" });
16
+ let B;
17
17
  l(() => {
18
- let e3 = f("editorStyle", "").value;
19
- e3 && (e3 = JSON.parse(e3), L.value.theme = e3.theme || "default", L.value.fontSize = e3.fontSize || 14), G();
18
+ let e3 = d("editorStyle", "").value;
19
+ e3 && (e3 = JSON.parse(e3), D.value.theme = e3.theme || "default", D.value.fontSize = e3.fontSize || 14), H();
20
20
  }), o(() => {
21
- R && clearTimeout(R);
21
+ B && clearTimeout(B);
22
22
  });
23
23
  const U = b.data.of({ autocomplete: function(e3) {
24
- const t2 = e3.matchBefore(/(?:window\.[\w$\.]*|logicContext\.[\w$\.]*)/);
25
- if (!t2 || "" === t2.text) return null;
26
- const l2 = t2.text;
27
- if (w[l2]) return { from: t2.from, options: w[l2], filter: true };
28
- let o2 = null;
29
- for (const e4 of Object.keys(w)) l2.startsWith(e4) && (!o2 || e4.length > o2.length) && (o2 = e4);
30
- if (!o2) for (const e4 of Object.keys(w)) e4.startsWith(l2) && (!o2 || e4.length > o2.length) && (o2 = e4);
31
- if (o2) {
32
- let e4 = w[o2];
33
- return (l2.length > o2.length || l2 !== o2) && (e4 = e4.filter((e5) => e5.label.startsWith(l2))), { from: t2.from, options: e4, filter: false };
24
+ const t2 = Object.keys(C).map((e4) => e4.replace(".", "\\.")), l2 = new RegExp(`(?:${t2.map((e4) => e4.replace(/\\\./g, "") + "[\\.\\w$]*").join("|")})`), o2 = e3.matchBefore(l2);
25
+ if (!o2 || "" === o2.text) return null;
26
+ const a2 = o2.text;
27
+ if (C[a2]) return { from: o2.from, options: C[a2], filter: true };
28
+ let n2 = null;
29
+ for (const e4 of Object.keys(C)) a2.startsWith(e4) && (!n2 || e4.length > n2.length) && (n2 = e4);
30
+ if (n2) {
31
+ let e4 = C[n2];
32
+ if (a2.length > n2.length && (e4 = e4.filter((e5) => e5.label.toLowerCase().startsWith(a2.toLowerCase()))), e4.length > 0) return { from: o2.from, options: e4, filter: false };
33
+ }
34
+ const r2 = Object.keys(C).filter((e4) => e4.startsWith(a2) || e4.slice(0, -1).startsWith(a2));
35
+ if (r2.length > 0) {
36
+ const e4 = [];
37
+ if (r2.forEach((t3) => {
38
+ C[t3].forEach((t4) => {
39
+ t4.label.toLowerCase().startsWith(a2.toLowerCase()) && e4.push(t4);
40
+ });
41
+ }), e4.length > 0) return { from: o2.from, options: e4, filter: false };
34
42
  }
35
- if ("window.$" === l2) return { from: t2.from, options: w["window."].filter((e4) => e4.label.startsWith("window.$")), filter: false };
36
43
  return null;
37
44
  } });
38
45
  function q() {
39
- f("editorStyle", L.value).value = L.value, T.value && (T.value && T.value.destroy(), G());
40
- }
41
- function E() {
42
- const e3 = h.theme({}), t2 = h.theme({ ".cm-content, .cm-gutter": { minHeight: "400px" }, "&": { fontSize: L.value.fontSize + "px" } });
43
- return x.create({ doc: D.eventForm.jsContent, extensions: [x.tabSize.of(16), g, _(), U, e3, t2, h.updateListener.of(function(e4) {
44
- D.eventForm.jsContent = e4.state.doc.toString();
45
- })] });
46
+ d("editorStyle", D.value).value = D.value, E.value && (E.value && E.value.destroy(), H());
46
47
  }
47
48
  function G() {
48
- const e3 = E();
49
- T.value = new h({ state: e3, parent: document.getElementById("cf-codemirror") || void 0 });
49
+ const e3 = h.theme({}), t2 = h.theme({ ".cm-content, .cm-gutter": { minHeight: "400px" }, "&": { fontSize: D.value.fontSize + "px" } });
50
+ return y.create({ doc: L.eventForm.jsContent, extensions: [y.tabSize.of(16), g, _(), U, e3, t2, h.updateListener.of(function(e4) {
51
+ L.eventForm.jsContent = e4.state.doc.toString();
52
+ })] });
50
53
  }
51
54
  function H() {
52
- if (T.value) {
53
- T.value.focus(), y(T.value) && T.value.update([]);
54
- }
55
+ const e3 = G();
56
+ E.value = new h({ state: e3, parent: document.getElementById("cf-codemirror") || void 0 });
55
57
  }
56
58
  function J() {
57
- if (T.value) {
58
- const e3 = k.js(D.eventForm.jsContent, { indent_level: 0, indent_size: 2, space_in_empty_paren: false, max_preserve_newlines: 2, preserve_newlines: true, jslint_happy: false, keep_array_indentation: false, keep_function_indentation: false, space_before_conditional: true, break_chained_methods: false, eval_code: false, unescape_strings: false, wrap_line_length: 0, end_with_newline: false });
59
- T.value.dispatch({ changes: { from: 0, to: D.eventForm.jsContent.length, insert: e3 } });
59
+ if (E.value) {
60
+ E.value.focus(), x(E.value) && E.value.update([]);
61
+ }
62
+ }
63
+ function P() {
64
+ if (E.value) {
65
+ const e3 = k.js(L.eventForm.jsContent, { indent_level: 0, indent_size: 2, space_in_empty_paren: false, max_preserve_newlines: 2, preserve_newlines: true, jslint_happy: false, keep_array_indentation: false, keep_function_indentation: false, space_before_conditional: true, break_chained_methods: false, eval_code: false, unescape_strings: false, wrap_line_length: 0, end_with_newline: false });
66
+ E.value.dispatch({ changes: { from: 0, to: L.eventForm.jsContent.length, insert: e3 } });
60
67
  }
61
68
  }
62
69
  return O2({ resize: function() {
63
- R && clearTimeout(R), W.value && (R = setTimeout(() => {
70
+ B && clearTimeout(B), W.value && (B = setTimeout(() => {
64
71
  const e3 = W.value.getBoundingClientRect(), t2 = window.innerHeight - e3.y - 30 + "px";
65
- T.value && T.value.dom && (T.value.dom.style.height = t2);
72
+ E.value && E.value.dom && (E.value.dom.style.height = t2);
66
73
  }, 10));
67
74
  }, updateJsContent: function(e3) {
68
75
  var _a;
69
- const t2 = D.eventForm.jsContent ? D.eventForm.jsContent : "";
70
- e3 && D.eventForm && (e3.jsContent || (e3.jsContent = ""), Object.assign(D.eventForm, e3), (_a = T.value) == null ? void 0 : _a.dispatch({ changes: { from: 0, to: t2.length, insert: D.eventForm.jsContent } }));
76
+ const t2 = L.eventForm.jsContent ? L.eventForm.jsContent : "";
77
+ e3 && L.eventForm && (e3.jsContent || (e3.jsContent = ""), Object.assign(L.eventForm, e3), (_a = E.value) == null ? void 0 : _a.dispatch({ changes: { from: 0, to: t2.length, insert: L.eventForm.jsContent } }));
71
78
  } }), (t2, l2) => {
72
- const o2 = n("el-input"), f2 = n("el-option"), h2 = n("el-select"), g2 = n("el-tooltip"), b2 = n("el-icon");
73
- return r(), a("div", { style: { "padding-right": "20px" }, ref_key: "editorContentRef", ref: $ }, [i("div", j, [i("span", C, [l2[6] || (l2[6] = u(" function ")), "customFunc" === e2.eventForm.name ? (r(), a("span", z, [l2[3] || (l2[3] = u(" ( ")), l2[4] || (l2[4] = i("span", { class: "is_req" }, [i("span", { class: "cell--span required__label" })], -1)), s(o2, { size: "small", modelValue: e2.eventForm.funcParam, "onUpdate:modelValue": l2[0] || (l2[0] = (t3) => e2.eventForm.funcParam = t3), style: { width: "300px" }, title: "方法参数" }, null, 8, ["modelValue"]), l2[5] || (l2[5] = u(" ) "))])) : (r(), a("span", F, " ( params ) ")), l2[7] || (l2[7] = u("{ "))]), i("span", S, [s(g2, { class: "box-item", effect: "dark", content: "切换主题", placement: "top" }, { default: c(() => [s(h2, { class: "editorOption", onChange: q, modelValue: L.value.theme, "onUpdate:modelValue": l2[1] || (l2[1] = (e3) => L.value.theme = e3), placeholder: "", size: "small", style: { width: "120px" } }, { default: c(() => [s(f2, { label: "默认", value: "default" }), s(f2, { label: "VScodeDark", value: "vscodeDark" }), s(f2, { label: "Dracula", value: "dracula" }), s(f2, { label: "GithubLight", value: "githubLight" }), s(f2, { label: "GithubDark", value: "githubDark" }), s(f2, { label: "Eclipse", value: "eclipse" }), s(f2, { label: "XcodeLight", value: "xcodeLight" }), s(f2, { label: "XcodeDark", value: "xcodeDark" })]), _: 1 }, 8, ["modelValue"])]), _: 1 }), s(g2, { class: "box-item", effect: "dark", content: "切换字体大小", placement: "top" }, { default: c(() => [s(h2, { class: "editorOption", modelValue: L.value.fontSize, "onUpdate:modelValue": l2[2] || (l2[2] = (e3) => L.value.fontSize = e3), placeholder: "", onChange: q, size: "small", style: { width: "80px" } }, { default: c(() => [s(f2, { label: "12", value: 12 }), s(f2, { label: "14", value: 14 }), s(f2, { label: "16", value: 16 }), s(f2, { label: "18", value: 18 }), s(f2, { label: "20", value: 20 }), s(f2, { label: "22", value: 22 }), s(f2, { label: "24", value: 24 }), s(f2, { label: "26", value: 26 }), s(f2, { label: "28", value: 28 })]), _: 1 }, 8, ["modelValue"])]), _: 1 })]), s(g2, { class: "box-item", effect: "dark", content: "打开搜索", placement: "top" }, { default: c(() => [s(b2, { class: "editorOption", onClick: H }, { default: c(() => [s(d(p))]), _: 1 })]), _: 1 }), s(g2, { class: "box-item", effect: "dark", content: "格式化代码", placement: "top" }, { default: c(() => [s(b2, { class: "editorOption", onClick: J }, { default: c(() => [s(d(v))]), _: 1 })]), _: 1 })]), i("div", { style: m(B.value), id: "cf-codemirror", ref_key: "codemirrorRef", ref: W }, null, 4), l2[8] || (l2[8] = i("span", { style: { color: "gray" } }, " }", -1))], 512);
79
+ const o2 = a("el-input"), d2 = a("el-option"), h2 = a("el-select"), g2 = a("el-tooltip"), b2 = a("el-icon");
80
+ return r(), n("div", { style: { "padding-right": "20px" }, ref_key: "editorContentRef", ref: R }, [i("div", j, [i("span", w, [l2[6] || (l2[6] = u(" function ")), "customFunc" === e2.eventForm.name ? (r(), n("span", z, [l2[3] || (l2[3] = u(" ( ")), l2[4] || (l2[4] = i("span", { class: "is_req" }, [i("span", { class: "cell--span required__label" })], -1)), s(o2, { size: "small", modelValue: e2.eventForm.funcParam, "onUpdate:modelValue": l2[0] || (l2[0] = (t3) => e2.eventForm.funcParam = t3), style: { width: "300px" }, title: "方法参数" }, null, 8, ["modelValue"]), l2[5] || (l2[5] = u(" ) "))])) : (r(), n("span", F, " ( params ) ")), l2[7] || (l2[7] = u("{ "))]), i("span", S, [s(g2, { class: "box-item", effect: "dark", content: "切换主题", placement: "top" }, { default: c(() => [s(h2, { class: "editorOption", onChange: q, modelValue: D.value.theme, "onUpdate:modelValue": l2[1] || (l2[1] = (e3) => D.value.theme = e3), placeholder: "", size: "small", style: { width: "120px" } }, { default: c(() => [s(d2, { label: "默认", value: "default" }), s(d2, { label: "VScodeDark", value: "vscodeDark" }), s(d2, { label: "Dracula", value: "dracula" }), s(d2, { label: "GithubLight", value: "githubLight" }), s(d2, { label: "GithubDark", value: "githubDark" }), s(d2, { label: "Eclipse", value: "eclipse" }), s(d2, { label: "XcodeLight", value: "xcodeLight" }), s(d2, { label: "XcodeDark", value: "xcodeDark" })]), _: 1 }, 8, ["modelValue"])]), _: 1 }), s(g2, { class: "box-item", effect: "dark", content: "切换字体大小", placement: "top" }, { default: c(() => [s(h2, { class: "editorOption", modelValue: D.value.fontSize, "onUpdate:modelValue": l2[2] || (l2[2] = (e3) => D.value.fontSize = e3), placeholder: "", onChange: q, size: "small", style: { width: "80px" } }, { default: c(() => [s(d2, { label: "12", value: 12 }), s(d2, { label: "14", value: 14 }), s(d2, { label: "16", value: 16 }), s(d2, { label: "18", value: 18 }), s(d2, { label: "20", value: 20 }), s(d2, { label: "22", value: 22 }), s(d2, { label: "24", value: 24 }), s(d2, { label: "26", value: 26 }), s(d2, { label: "28", value: 28 })]), _: 1 }, 8, ["modelValue"])]), _: 1 })]), s(g2, { class: "box-item", effect: "dark", content: "打开搜索", placement: "top" }, { default: c(() => [s(b2, { class: "editorOption", onClick: J }, { default: c(() => [s(m(f))]), _: 1 })]), _: 1 }), s(g2, { class: "box-item", effect: "dark", content: "格式化代码", placement: "top" }, { default: c(() => [s(b2, { class: "editorOption", onClick: P }, { default: c(() => [s(m(v))]), _: 1 })]), _: 1 })]), i("div", { style: p(T.value), id: "cf-codemirror", ref_key: "codemirrorRef", ref: W }, null, 4), l2[8] || (l2[8] = i("span", { style: { color: "gray" } }, " }", -1))], 512);
74
81
  };
75
82
  } });
76
83
  export {
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as e, ref as t, onMounted as n, onUnmounted as a, watch as l, resolveComponent as u, createElementBlock as o, openBlock as s, createElementVNode as i, createVNode as r, withDirectives as m, withCtx as c, vShow as d, unref as v, createTextVNode as p, toDisplayString as f, Fragment as g, renderList as b, createBlock as y } from "vue";
2
2
  import { ElMessageBox as x, ElMessage as h } from "element-plus";
3
- import C from "./config.vue2.js";
3
+ import C from "./config.vue.js";
4
4
  import { standardButtonOperations as E } from "../../../utils/assemblys-config.js";
5
5
  import { findDesignItemByUuid as S, getUuidv4 as V, deepCopy as k } from "../../../utils/common-util.js";
6
6
  import { usePageContextStore as _ } from "../../../../../stores/page-store.js";
@@ -16,7 +16,7 @@ import "@codemirror/autocomplete";
16
16
  import "@codemirror/language";
17
17
  import "@codemirror/search";
18
18
  import "js-beautify";
19
- /* empty css */
19
+ /* empty css */
20
20
  import "../../../utils/assemblys-config.js";
21
21
  import "../../../../../stores/page-store.js";
22
22
  import "../../../../../stores/event-undo-redo-store.js";