@kp-ui/lowcode-pc 1.0.1 → 1.0.2

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.
@@ -342,38 +342,38 @@ div.row-no-column[data-v-a3f1d201] {
342
342
  .widget-wrapper .action-buttons[data-v-f2552afd]:hover {
343
343
  background-color: #ff4d4f;
344
344
  }
345
- .designer-widget-list[data-v-2b8c9959] {
345
+ .designer-widget-list[data-v-0fdc8abe] {
346
346
  position: relative;
347
347
  display: flex;
348
348
  flex-direction: column;
349
349
  }
350
- .designer-widget-list.empty-list[data-v-2b8c9959] {
350
+ .designer-widget-list.empty-list[data-v-0fdc8abe] {
351
351
  min-height: 96px;
352
352
  }
353
- .designer-widget-list .empty-drop-zone[data-v-2b8c9959] {
353
+ .designer-widget-list .empty-drop-zone[data-v-0fdc8abe] {
354
354
  position: absolute;
355
355
  left: 0;
356
356
  width: 100%;
357
357
  z-index: 2;
358
358
  }
359
- .designer-widget-list[data-v-2b8c9959] .sortable-ghost {
359
+ .designer-widget-list[data-v-0fdc8abe] .sortable-ghost {
360
360
  z-index: 99;
361
361
  }
362
- .list-transition-container[data-v-2b8c9959] {
362
+ .list-transition-container[data-v-0fdc8abe] {
363
363
  display: flex;
364
364
  flex-direction: column;
365
365
  padding: 2px;
366
366
  }
367
- .transition-group-el[data-v-2b8c9959] {
367
+ .transition-group-el[data-v-0fdc8abe] {
368
368
  position: relative;
369
369
  padding: 1px;
370
370
  }
371
- .transition-group-el .sortable-ghost[data-v-2b8c9959] {
371
+ .transition-group-el .sortable-ghost[data-v-0fdc8abe] {
372
372
  width: 100%;
373
373
  }
374
374
 
375
375
  /* SortableJS 自动应用的类 */
376
- .ghost-placeholder[data-v-2b8c9959] {
376
+ .ghost-placeholder[data-v-0fdc8abe] {
377
377
  opacity: 0.5;
378
378
  background: #c8ebfb;
379
379
  border: 2px dashed var(--ant-primary-color);
@@ -381,10 +381,10 @@ div.row-no-column[data-v-a3f1d201] {
381
381
  margin: 4px 0;
382
382
  border-radius: 4px;
383
383
  }
384
- .sortable-chosen[data-v-2b8c9959] {
384
+ .sortable-chosen[data-v-0fdc8abe] {
385
385
  background: #fdfdfd;
386
386
  }
387
- .empty-drop-zone[data-v-2b8c9959] {
387
+ .empty-drop-zone[data-v-0fdc8abe] {
388
388
  line-height: 1.2;
389
389
  display: flex;
390
390
  align-items: center;
@@ -402,7 +402,7 @@ div.row-no-column[data-v-a3f1d201] {
402
402
  color: #999;
403
403
  font-size: 14px;
404
404
  }
405
- .desginer-canvas[data-v-2b8c9959] .ant-form-item {
405
+ .desginer-canvas[data-v-0fdc8abe] .ant-form-item {
406
406
  margin-bottom: 0;
407
407
  }/* 调试面板样式 */
408
408
  .debug-panel[data-v-10eb5e61] {
@@ -1,7 +1,7 @@
1
1
  import _sfc_main from "./RenderWidgetList.vue2.js";
2
2
  /* empty css */
3
3
  import _export_sfc from "../../../../_virtual/_plugin-vue_export-helper.js";
4
- const RenderWidgetList = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-2b8c9959"]]);
4
+ const RenderWidgetList = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-0fdc8abe"]]);
5
5
  export {
6
6
  RenderWidgetList as default
7
7
  };
@@ -7,6 +7,7 @@ const _hoisted_2 = {
7
7
  key: 0,
8
8
  class: "empty-drop-zone"
9
9
  };
10
+ const _hoisted_3 = ["id"];
10
11
  const _sfc_main = /* @__PURE__ */ defineComponent({
11
12
  ...{
12
13
  inheritAttrs: false,
@@ -79,14 +80,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
79
80
  }, 8, ["modelValue", "class", "data-allow-types", "data-not-allow-types", "onUpdate"])) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(draggableList.value, (widget, index) => {
80
81
  return openBlock(), createElementBlock("div", {
81
82
  key: `${widget.id}_${index}`,
82
- class: "t-overflow-hidden"
83
+ class: "t-overflow-hidden",
84
+ id: widget.id
83
85
  }, [
84
86
  (openBlock(), createBlock(resolveDynamicComponent(unref(getWidget)(widget)), {
85
87
  widget,
86
88
  field: widget,
87
89
  index
88
90
  }, null, 8, ["widget", "field", "index"]))
89
- ]);
91
+ ], 8, _hoisted_3);
90
92
  }), 128));
91
93
  };
92
94
  }
@@ -1 +1 @@
1
- {"version":3,"file":"RenderWidgetList.vue2.js","sources":["../../../../../../core/src/components/common/RenderWidgetList.vue"],"sourcesContent":["<template>\n <template v-if=\"designState\">\n <draggable\n v-model=\"draggableList\"\n class=\"designer-widget-list list-transition-container\"\n :class=\"[{ 'empty-list': !draggableList.length }, { 'desginer-canvas': isCanvas }]\"\n tag=\"div\"\n :animation=\"200\"\n group=\"widget\"\n handle=\".drag-handler\"\n item-key=\"id\"\n :move=\"onMove\"\n :data-allow-types=\"allowTypes.join(',')\"\n :data-not-allow-types=\"notAllowTypes.join(',')\"\n @update=\"onDragUpdate\"\n @add=\"(evt: any) => onDragAdd(evt, draggableList)\"\n >\n <template #item=\"{ element: widget, index }\">\n <div :id=\"widget.id\" class=\"transition-group-el\" :data-widget-id=\"widget.id\">\n <WidgetWrapper :widget=\"widget\" :index=\"index\" v-model:list=\"draggableList\">\n <component\n :is=\"getWidget(widget)\"\n :widget=\"widget\"\n :field=\"widget\"\n :index=\"index\"\n />\n </WidgetWrapper>\n </div>\n </template>\n <template #footer>\n <div v-if=\"!draggableList.length\" class=\"empty-drop-zone\"> 拖拽组件到此处 </div>\n </template>\n </draggable>\n </template>\n <template v-else>\n <div\n v-for=\"(widget, index) in draggableList\"\n :key=\"`${widget.id}_${index}`\"\n class=\"t-overflow-hidden\"\n >\n <component :is=\"getWidget(widget)\" :widget=\"widget\" :field=\"widget\" :index=\"index\" />\n </div>\n </template>\n</template>\n\n<script lang=\"ts\" setup>\n import draggable from 'vuedraggable';\n import { useDesigner, WidgetWrapper } from '@kp-ui/lowcode-core';\n import type { Widget, FormDesigner } from '@kp-ui/lowcode-core';\n\n defineOptions({\n inheritAttrs: false,\n name: 'RenderWidgetList'\n });\n\n const props = withDefaults(\n defineProps<{\n isCanvas?: boolean;\n allowTypes?: string[];\n notAllowTypes?: string[];\n parentWidget: Widget | FormDesigner | null;\n }>(),\n {\n isCanvas: false,\n allowTypes: () => [],\n notAllowTypes: () => []\n }\n );\n\n const { designer, onDragAdd, onDragUpdate, designState, getWidget } = useDesigner();\n\n const onMove = (evt: any) => {\n return designer.value.checkWidgetMove(evt);\n };\n\n const draggableList = defineModel<Widget[]>('list', {\n type: Array,\n default: []\n });\n</script>\n\n<style scoped lang=\"scss\">\n .designer-widget-list {\n position: relative;\n display: flex;\n flex-direction: column;\n // gap: 3px;\n &.empty-list {\n min-height: 96px;\n }\n .empty-drop-zone {\n position: absolute;\n // top: 5px;\n left: 0;\n width: 100%;\n z-index: 2;\n }\n :deep(.sortable-ghost) {\n z-index: 99;\n }\n }\n\n .list-transition-container {\n display: flex;\n flex-direction: column;\n padding: 2px;\n }\n\n .transition-group-el {\n position: relative;\n padding: 1px;\n .sortable-ghost {\n width: 100%;\n }\n }\n\n /* SortableJS 自动应用的类 */\n .ghost-placeholder {\n opacity: 0.5;\n background: #c8ebfb;\n border: 2px dashed var(--ant-primary-color);\n height: 40px;\n margin: 4px 0;\n border-radius: 4px;\n }\n\n .sortable-chosen {\n background: #fdfdfd;\n }\n\n .empty-drop-zone {\n line-height: 1.2;\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n font-size: 12px;\n margin: 2px 0;\n height: 90px;\n background: rgba(#000, 0.05);\n border: 1px dashed #d9d9d9;\n border-radius: 2px;\n display: flex;\n align-items: center;\n justify-content: center;\n color: #999;\n font-size: 14px;\n }\n .desginer-canvas {\n &:deep(.ant-form-item) {\n margin-bottom: 0;\n }\n }\n</style>\n"],"names":["_useModel","_unref","_createBlock","draggable","isCanvas","allowTypes","notAllowTypes","_withCtx","_createElementVNode","_createVNode","_resolveDynamicComponent","_createElementBlock","_openBlock","_Fragment","_renderList"],"mappings":";;;;;;;;;;;;;;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A,GAAAD,mBAMME,UAAA,EAAA,KAAA,EAAA,GAAAC,WALwB,cAAA,OAAa,CAA/B,QAAQ,UAAK;4BADzBH,mBAMM,OAAA;AAAA,UAJD,KAAG,GAAK,OAAO,EAAE,IAAI,KAAK;AAAA,UAC3B,OAAM;AAAA,QAAA;wBAENT,YAAqFQ,wBAArET,MAAA,SAAA,EAAU,MAAM,CAAA,GAAA;AAAA,YAAI;AAAA,YAAiB,OAAO;AAAA,YAAS;AAAA,UAAA;;;;;;"}
1
+ {"version":3,"file":"RenderWidgetList.vue2.js","sources":["../../../../../../core/src/components/common/RenderWidgetList.vue"],"sourcesContent":["<template>\n <template v-if=\"designState\">\n <draggable\n v-model=\"draggableList\"\n class=\"designer-widget-list list-transition-container\"\n :class=\"[{ 'empty-list': !draggableList.length }, { 'desginer-canvas': isCanvas }]\"\n tag=\"div\"\n :animation=\"200\"\n group=\"widget\"\n handle=\".drag-handler\"\n item-key=\"id\"\n :move=\"onMove\"\n :data-allow-types=\"allowTypes.join(',')\"\n :data-not-allow-types=\"notAllowTypes.join(',')\"\n @update=\"onDragUpdate\"\n @add=\"(evt: any) => onDragAdd(evt, draggableList)\"\n >\n <template #item=\"{ element: widget, index }\">\n <div :id=\"widget.id\" class=\"transition-group-el\" :data-widget-id=\"widget.id\">\n <WidgetWrapper :widget=\"widget\" :index=\"index\" v-model:list=\"draggableList\">\n <component\n :is=\"getWidget(widget)\"\n :widget=\"widget\"\n :field=\"widget\"\n :index=\"index\"\n />\n </WidgetWrapper>\n </div>\n </template>\n <template #footer>\n <div v-if=\"!draggableList.length\" class=\"empty-drop-zone\"> 拖拽组件到此处 </div>\n </template>\n </draggable>\n </template>\n <template v-else>\n <div\n v-for=\"(widget, index) in draggableList\"\n :key=\"`${widget.id}_${index}`\"\n class=\"t-overflow-hidden\"\n :id=\"widget.id\"\n >\n <component :is=\"getWidget(widget)\" :widget=\"widget\" :field=\"widget\" :index=\"index\" />\n </div>\n </template>\n</template>\n\n<script lang=\"ts\" setup>\n import draggable from 'vuedraggable';\n import { useDesigner, WidgetWrapper } from '@kp-ui/lowcode-core';\n import type { Widget, FormDesigner } from '@kp-ui/lowcode-core';\n\n defineOptions({\n inheritAttrs: false,\n name: 'RenderWidgetList'\n });\n\n const props = withDefaults(\n defineProps<{\n isCanvas?: boolean;\n allowTypes?: string[];\n notAllowTypes?: string[];\n parentWidget: Widget | FormDesigner | null;\n }>(),\n {\n isCanvas: false,\n allowTypes: () => [],\n notAllowTypes: () => []\n }\n );\n\n const { designer, onDragAdd, onDragUpdate, designState, getWidget } = useDesigner();\n\n const onMove = (evt: any) => {\n return designer.value.checkWidgetMove(evt);\n };\n\n const draggableList = defineModel<Widget[]>('list', {\n type: Array,\n default: []\n });\n</script>\n\n<style scoped lang=\"scss\">\n .designer-widget-list {\n position: relative;\n display: flex;\n flex-direction: column;\n // gap: 3px;\n &.empty-list {\n min-height: 96px;\n }\n .empty-drop-zone {\n position: absolute;\n // top: 5px;\n left: 0;\n width: 100%;\n z-index: 2;\n }\n :deep(.sortable-ghost) {\n z-index: 99;\n }\n }\n\n .list-transition-container {\n display: flex;\n flex-direction: column;\n padding: 2px;\n }\n\n .transition-group-el {\n position: relative;\n padding: 1px;\n .sortable-ghost {\n width: 100%;\n }\n }\n\n /* SortableJS 自动应用的类 */\n .ghost-placeholder {\n opacity: 0.5;\n background: #c8ebfb;\n border: 2px dashed var(--ant-primary-color);\n height: 40px;\n margin: 4px 0;\n border-radius: 4px;\n }\n\n .sortable-chosen {\n background: #fdfdfd;\n }\n\n .empty-drop-zone {\n line-height: 1.2;\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n font-size: 12px;\n margin: 2px 0;\n height: 90px;\n background: rgba(#000, 0.05);\n border: 1px dashed #d9d9d9;\n border-radius: 2px;\n display: flex;\n align-items: center;\n justify-content: center;\n color: #999;\n font-size: 14px;\n }\n .desginer-canvas {\n &:deep(.ant-form-item) {\n margin-bottom: 0;\n }\n }\n</style>\n"],"names":["_useModel","_unref","_createBlock","draggable","isCanvas","allowTypes","notAllowTypes","_withCtx","_createElementVNode","_createVNode","_resolveDynamicComponent","_createElementBlock","_openBlock","_Fragment","_renderList"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsEI,UAAM,EAAE,UAAU,WAAW,cAAc,aAAa,UAAA,IAAc,YAAA;AAEtE,UAAM,SAAS,CAAC,QAAa;AACzB,aAAO,SAAS,MAAM,gBAAgB,GAAG;AAAA,IAC7C;AAEA,UAAM,gBAAgBA,kBAAsB,MAG3C;;aA9EeC,MAAA,WAAA,kBACZC,YA8BYD,MAAAE,SAAA,GAAA;AAAA;oBA7BC,cAAA;AAAA,qEAAA,cAAa,QAAA;AAAA,QACtB,uBAAM,kDAAgD,CAAA,EAAA,cAAA,CAC5B,oBAAc,OAAA,wBAA+BC,KAAAA,SAAAA,CAAQ,CAAA,CAAA;AAAA,QAC/E,KAAI;AAAA,QACH,WAAW;AAAA,QACZ,OAAM;AAAA,QACN,QAAO;AAAA,QACP,YAAS;AAAA,QACR,MAAM;AAAA,QACN,oBAAkBC,KAAAA,WAAW,KAAI,GAAA;AAAA,QACjC,wBAAsBC,KAAAA,cAAc,KAAI,GAAA;AAAA,QACxC,UAAQL,MAAA,YAAA;AAAA,QACR,kCAAM,QAAaA,iBAAU,KAAK,cAAA,KAAa;AAAA,MAAA;QAErC,MAAIM,QACX,CASM,EAAA,SAVkB,QAAQ,YAAK;AAAA,UACrCC,mBASM,OAAA;AAAA,YATA,IAAI,OAAO;AAAA,YAAI,OAAM;AAAA,YAAuB,kBAAgB,OAAO;AAAA,UAAA;YACrEC,YAOgBR,MAAA,aAAA,GAAA;AAAA,cAPA;AAAA,cAAiB;AAAA,cAAsB,MAAM,cAAA;AAAA,qEAAA,cAAa,QAAA;AAAA,YAAA;+BACtE,MAKE;AAAA,8BALFC,YAKEQ,wBAJOT,MAAA,SAAA,EAAU,MAAM,CAAA,GAAA;AAAA,kBACpB;AAAA,kBACA,OAAO;AAAA,kBACP;AAAA,gBAAA;;;;;;QAKN,gBACP,MAAyE;AAAA,UAA7D,CAAA,cAAA,MAAc,uBAA1BU,mBAAyE,OAAzE,YAA0D,WAAS;;;iGAK3EC,UAAA,IAAA,GAAAD,mBAOME,UAAA,EAAA,KAAA,EAAA,GAAAC,WANwB,cAAA,OAAa,CAA/B,QAAQ,UAAK;4BADzBH,mBAOM,OAAA;AAAA,UALD,KAAG,GAAK,OAAO,EAAE,IAAI,KAAK;AAAA,UAC3B,OAAM;AAAA,UACL,IAAI,OAAO;AAAA,QAAA;wBAEZT,YAAqFQ,wBAArET,MAAA,SAAA,EAAU,MAAM,CAAA,GAAA;AAAA,YAAI;AAAA,YAAiB,OAAO;AAAA,YAAS;AAAA,UAAA;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kp-ui/lowcode-pc",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org/"
@@ -9,7 +9,7 @@ import "../index.vue.js";
9
9
  import "./index.js";
10
10
  import { useExecFunction, tranformAntTableColumnToVxetableColumn, CustomItemRender, tranformAntSizzVxetableSize, TpfDelConfirm } from "tmgc2-share";
11
11
  import "../../widget-panel/widgetsConfig.js";
12
- import ActionButtonListRender from "../../../public/ActionButtonListRender.vue.js";
12
+ import ActionButtonListRender from "../../../public/ActionButtonListRender.vue3.js";
13
13
  /* empty css */
14
14
  import { useDataHttp } from "../../../../../core/src/hooks/useDataHttp.js";
15
15
  import { useI18n } from "../../../../../core/src/utils/i18n.js";
@@ -9,7 +9,7 @@ import "./index.js";
9
9
  import "lodash-es";
10
10
  import "tmgc2-share";
11
11
  import "../../widget-panel/widgetsConfig.js";
12
- import ActionButtonListRender from "../../../public/ActionButtonListRender.vue.js";
12
+ import ActionButtonListRender from "../../../public/ActionButtonListRender.vue3.js";
13
13
  /* empty css */
14
14
  import { ComponentNameEnum, ContainerTypeEnum } from "../../../../../core/src/constants/WidgetTypeEnum.js";
15
15
  import { useAppRef } from "../../../../../core/src/hooks/useAppRef.js";
@@ -9,7 +9,7 @@ import "../desginer/form-widget/container-widget/index.js";
9
9
  import "lodash-es";
10
10
  import { useExecFunction } from "tmgc2-share";
11
11
  import "../desginer/widget-panel/widgetsConfig.js";
12
- import ActionButtonListRender from "../public/ActionButtonListRender.vue.js";
12
+ import ActionButtonListRender from "../public/ActionButtonListRender.vue3.js";
13
13
  /* empty css */
14
14
  import { ComponentNameEnum, WidgetTypeEnum } from "../../../core/src/constants/WidgetTypeEnum.js";
15
15
  import { useField } from "../../../core/src/hooks/useField.js";
@@ -1,5 +1,6 @@
1
- import { defineComponent, createBlock, createCommentVNode, unref, openBlock, mergeProps, withCtx, createElementVNode, resolveDynamicComponent } from "vue";
1
+ import { defineComponent, createBlock, createCommentVNode, unref, openBlock, mergeProps, withCtx, createElementVNode, resolveDynamicComponent, isVNode, h } from "vue";
2
2
  import FormItemWrapper from "./form-item-wrapper.vue.js";
3
+ import { CustomItemRender } from "tmgc2-share";
3
4
  import { ComponentNameEnum, WidgetTypeEnum } from "../../../core/src/constants/WidgetTypeEnum.js";
4
5
  import { useField } from "../../../core/src/hooks/useField.js";
5
6
  const _hoisted_1 = { class: "slot-wrapper-render" };
@@ -29,7 +30,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
29
30
  params: { data: fieldModel.value },
30
31
  keys: ["data"]
31
32
  });
32
- return component ?? null;
33
+ if (isVNode(component)) {
34
+ return h(CustomItemRender, { is: component });
35
+ }
36
+ return component;
33
37
  };
34
38
  __expose({
35
39
  ...defineExposed
@@ -38,7 +42,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
38
42
  return !unref(handleHidden) ? (openBlock(), createBlock(FormItemWrapper, mergeProps({ key: 0 }, props, { rules: unref(rules) }), {
39
43
  default: withCtx(() => [
40
44
  createElementVNode("div", _hoisted_1, [
41
- (openBlock(), createBlock(resolveDynamicComponent(renderCompont()), {
45
+ (openBlock(), createBlock(resolveDynamicComponent(renderCompont), {
42
46
  ref_key: "fieldEditor",
43
47
  ref: fieldEditor
44
48
  }, null, 512))
@@ -1 +1 @@
1
- {"version":3,"file":"diy-compontent-widget.vue2.js","sources":["../../../../src/components/field-widget/diy-compontent-widget.vue"],"sourcesContent":["<template>\n <form-item-wrapper v-bind=\"props\" v-if=\"!handleHidden\" :rules=\"rules\">\n <div class=\"slot-wrapper-render\">\n <component ref=\"fieldEditor\" :is=\"renderCompont()\" />\n </div>\n </form-item-wrapper>\n</template>\n\n<script lang=\"ts\" setup>\n import { ComponentNameEnum, WidgetTypeEnum } from '@kp-ui/lowcode-core';\n import FormItemWrapper from './form-item-wrapper.vue';\n import { type FieldProps, useField } from '@kp-ui/lowcode-core';\n\n defineOptions({\n name: WidgetTypeEnum.bpmnEditor,\n componentName: ComponentNameEnum.FieldWidget\n });\n const props = withDefaults(defineProps<FieldProps>(), {});\n\n const { rules, fieldEditor, field, fieldModel, handleHidden, defineExposed, executeFunction } =\n useField(props);\n\n const renderCompont = () => {\n const component = executeFunction({\n functionBody: field.options.customRender,\n params: { data: fieldModel.value },\n keys: ['data']\n });\n\n return component ?? null;\n };\n\n defineExpose({\n ...defineExposed\n });\n</script>\n\n<style lang=\"scss\" scoped></style>\n"],"names":["_unref","_openBlock","_createBlock","_mergeProps","_createElementVNode","_resolveDynamicComponent"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAiBI,UAAM,QAAQ;AAEd,UAAM,EAAE,OAAO,aAAa,OAAO,YAAY,cAAc,eAAe,gBAAA,IACxE,SAAS,KAAK;AAElB,UAAM,gBAAgB,MAAM;AACxB,YAAM,YAAY,gBAAgB;AAAA,QAC9B,cAAc,MAAM,QAAQ;AAAA,QAC5B,QAAQ,EAAE,MAAM,WAAW,MAAA;AAAA,QAC3B,MAAM,CAAC,MAAM;AAAA,MAAA,CAChB;AAED,aAAO,aAAa;AAAA,IACxB;AAEA,aAAa;AAAA,MACT,GAAG;AAAA,IAAA,CACN;;cAjCwCA,MAAA,YAAA,KAAzCC,aAAAC,YAIoB,iBAJpBC,WAIoB,EAAA,KAAA,EAAA,GAJO,OAAK,EAAwB,OAAOH,MAAA,KAAA,EAAA,CAAK,GAAA;AAAA,yBAChE,MAEM;AAAA,UAFNI,mBAEM,OAFN,YAEM;AAAA,aADFH,aAAAC,YAAqDG,wBAAnB,cAAA,CAAa,GAAA;AAAA,uBAAhC;AAAA,cAAJ,KAAI;AAAA,YAAA;;;;;;;;"}
1
+ {"version":3,"file":"diy-compontent-widget.vue2.js","sources":["../../../../src/components/field-widget/diy-compontent-widget.vue"],"sourcesContent":["<template>\n <form-item-wrapper v-bind=\"props\" v-if=\"!handleHidden\" :rules=\"rules\">\n <div class=\"slot-wrapper-render\">\n <component ref=\"fieldEditor\" :is=\"renderCompont\" />\n </div>\n </form-item-wrapper>\n</template>\n\n<script lang=\"ts\" setup>\n import { ComponentNameEnum, WidgetTypeEnum } from '@kp-ui/lowcode-core';\n import FormItemWrapper from './form-item-wrapper.vue';\n import { type FieldProps, useField } from '@kp-ui/lowcode-core';\n import { h, isVNode } from 'vue';\n import { CustomItemRender } from 'tmgc2-share';\n\n defineOptions({\n name: WidgetTypeEnum.bpmnEditor,\n componentName: ComponentNameEnum.FieldWidget\n });\n const props = withDefaults(defineProps<FieldProps>(), {});\n\n const { rules, fieldEditor, field, fieldModel, handleHidden, defineExposed, executeFunction } =\n useField(props);\n\n const renderCompont = () => {\n const component = executeFunction({\n functionBody: field.options.customRender,\n params: { data: fieldModel.value },\n keys: ['data']\n });\n\n if (isVNode(component)) {\n return h(CustomItemRender, { is: component });\n }\n return component;\n };\n\n defineExpose({\n ...defineExposed\n });\n</script>\n\n<style lang=\"scss\" scoped></style>\n"],"names":["_unref","_openBlock","_createBlock","_mergeProps","_createElementVNode","_resolveDynamicComponent"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAmBI,UAAM,QAAQ;AAEd,UAAM,EAAE,OAAO,aAAa,OAAO,YAAY,cAAc,eAAe,gBAAA,IACxE,SAAS,KAAK;AAElB,UAAM,gBAAgB,MAAM;AACxB,YAAM,YAAY,gBAAgB;AAAA,QAC9B,cAAc,MAAM,QAAQ;AAAA,QAC5B,QAAQ,EAAE,MAAM,WAAW,MAAA;AAAA,QAC3B,MAAM,CAAC,MAAM;AAAA,MAAA,CAChB;AAED,UAAI,QAAQ,SAAS,GAAG;AACpB,eAAO,EAAE,kBAAkB,EAAE,IAAI,WAAW;AAAA,MAChD;AACA,aAAO;AAAA,IACX;AAEA,aAAa;AAAA,MACT,GAAG;AAAA,IAAA,CACN;;cAtCwCA,MAAA,YAAA,KAAzCC,aAAAC,YAIoB,iBAJpBC,WAIoB,EAAA,KAAA,EAAA,GAJO,OAAK,EAAwB,OAAOH,MAAA,KAAA,EAAA,CAAK,GAAA;AAAA,yBAChE,MAEM;AAAA,UAFNI,mBAEM,OAFN,YAEM;AAAA,aADFH,aAAAC,YAAmDG,wBAAjB,aAAa,GAAA;AAAA,uBAAhC;AAAA,cAAJ,KAAI;AAAA,YAAA;;;;;;;;"}
@@ -1,53 +1,130 @@
1
- import _sfc_main from "./ActionButtonListRender.vue2.js";
2
- import { resolveComponent, createElementBlock, openBlock, normalizeStyle, normalizeClass, createBlock, Teleport, createVNode, withCtx, Fragment, renderList, createCommentVNode, createTextVNode, toDisplayString } from "vue";
3
- /* empty css */
4
- import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.js";
5
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
6
- const _component_SvgIcon = resolveComponent("SvgIcon");
7
- const _component_a_button = resolveComponent("a-button");
8
- const _component_a_space = resolveComponent("a-space");
9
- return openBlock(), createElementBlock("div", {
10
- ref: "fieldEditor",
11
- class: normalizeClass(["button-list-container", ..._ctx.customClass]),
12
- style: normalizeStyle(_ctx.containerStyle)
13
- }, [
14
- (openBlock(), createBlock(Teleport, {
15
- disabled: _ctx.isDisabled,
16
- to: _ctx.getContainer
17
- }, [
18
- createVNode(_component_a_space, { size: 8 }, {
19
- default: withCtx(() => [
20
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.visibleButtons, (item) => {
21
- return openBlock(), createBlock(_component_a_button, {
22
- key: item.key,
23
- type: item.type,
24
- size: item.size,
25
- danger: !!item.danger,
26
- ghost: !!item.ghost,
27
- class: "tpf-button",
28
- loading: item.loading,
29
- disabled: _ctx.handleDisabled(item) || _ctx.disabled || !!item.disabled,
30
- onClick: ($event) => _ctx.handleClick(item)
31
- }, {
32
- default: withCtx(() => [
33
- item.icon ? (openBlock(), createBlock(_component_SvgIcon, {
34
- key: 0,
35
- "icon-class": item.icon,
36
- class: "button-icon"
37
- }, null, 8, ["icon-class"])) : createCommentVNode("", true),
38
- createTextVNode(" " + toDisplayString(item.label), 1)
39
- ]),
40
- _: 2
41
- }, 1032, ["type", "size", "danger", "ghost", "loading", "disabled", "onClick"]);
42
- }), 128))
43
- ]),
44
- _: 1
45
- })
46
- ], 8, ["disabled", "to"]))
47
- ], 6);
48
- }
49
- const ActionButtonListRender = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-37429548"]]);
1
+ import { defineComponent, computed } from "vue";
2
+ import { SvgIcon, useExecFunction } from "tmgc2-share";
3
+ import { ButtonPositionEnum } from "../../../core/src/constants/index.js";
4
+ const _sfc_main = defineComponent({
5
+ name: "ActionButtonListRender",
6
+ components: { SvgIcon },
7
+ props: {
8
+ options: {
9
+ type: Object,
10
+ default: () => {
11
+ }
12
+ },
13
+ disabled: {
14
+ type: Boolean,
15
+ default: false
16
+ },
17
+ scope: {
18
+ type: Object,
19
+ default: () => {
20
+ }
21
+ },
22
+ ctx: {
23
+ type: Object,
24
+ default: () => {
25
+ }
26
+ },
27
+ buttonList: {
28
+ type: Array,
29
+ default: () => []
30
+ },
31
+ customClass: {
32
+ type: Array,
33
+ default: () => []
34
+ },
35
+ flex: {
36
+ type: String,
37
+ default: "center"
38
+ },
39
+ designState: {
40
+ type: Boolean,
41
+ default: false
42
+ }
43
+ },
44
+ emits: ["on-click"],
45
+ setup(props, { emit }) {
46
+ const containerStyle = computed(() => ({
47
+ "--flex": props.flex
48
+ }));
49
+ const { executeFunction, asyncExecuteFunction } = useExecFunction();
50
+ const isDisabled = computed(
51
+ () => {
52
+ var _a;
53
+ return ((_a = props.options) == null ? void 0 : _a.buttonPosition) !== ButtonPositionEnum.DIY || props.designState;
54
+ }
55
+ );
56
+ const getContainer = computed(
57
+ () => {
58
+ var _a;
59
+ return isDisabled.value ? "body" : ((_a = props.options) == null ? void 0 : _a.getContainer) || "body";
60
+ }
61
+ );
62
+ const visibleButtons = computed(
63
+ () => props.buttonList.filter((item) => item.hidden !== 1).filter((item) => !handleHidden(item))
64
+ );
65
+ const handleClick = async (item) => {
66
+ if (props.designState) return;
67
+ if (!item.onClick) {
68
+ emit("on-click", { item, result: true });
69
+ return;
70
+ }
71
+ if (item.loading) return;
72
+ item.loading = true;
73
+ try {
74
+ const result = await asyncExecuteFunction({
75
+ functionBody: item.onClick,
76
+ context: props.ctx,
77
+ params: props.scope
78
+ });
79
+ emit("on-click", { item, result });
80
+ } catch (error) {
81
+ console.error("Button click handler error:", error);
82
+ } finally {
83
+ item.loading = false;
84
+ }
85
+ };
86
+ const handleDisabled = (item) => {
87
+ if (!item.onDisabled) return false;
88
+ try {
89
+ const result = executeFunction({
90
+ functionBody: item.onDisabled,
91
+ context: props.ctx,
92
+ params: props.scope
93
+ });
94
+ if (typeof result === "boolean") {
95
+ return result;
96
+ } else {
97
+ return false;
98
+ }
99
+ } catch (error) {
100
+ console.error("Button disabled handler error:", error);
101
+ return false;
102
+ }
103
+ };
104
+ const handleHidden = (item) => {
105
+ if (!item.onHidden) return false;
106
+ try {
107
+ return executeFunction({
108
+ functionBody: item.onHidden,
109
+ context: props.ctx,
110
+ params: props.scope
111
+ });
112
+ } catch (error) {
113
+ console.error("Button hidden handler error:", error);
114
+ return false;
115
+ }
116
+ };
117
+ return {
118
+ getContainer,
119
+ isDisabled,
120
+ containerStyle,
121
+ visibleButtons,
122
+ handleClick,
123
+ handleDisabled
124
+ };
125
+ }
126
+ });
50
127
  export {
51
- ActionButtonListRender as default
128
+ _sfc_main as default
52
129
  };
53
130
  //# sourceMappingURL=ActionButtonListRender.vue.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ActionButtonListRender.vue.js","sources":["../../../../src/components/public/ActionButtonListRender.vue"],"sourcesContent":["<template>\n <div\n ref=\"fieldEditor\"\n :class=\"['button-list-container', ...customClass]\"\n :style=\"containerStyle\"\n >\n <Teleport :disabled=\"isDisabled\" :to=\"getContainer\">\n <a-space :size=\"8\">\n <a-button\n v-for=\"item in visibleButtons\"\n :key=\"item.key\"\n :type=\"item.type\"\n :size=\"item.size\"\n :danger=\"!!item.danger\"\n :ghost=\"!!item.ghost\"\n class=\"tpf-button\"\n :loading=\"item.loading\"\n :disabled=\"handleDisabled(item) || disabled || !!item.disabled\"\n @click=\"handleClick(item)\"\n >\n <template v-if=\"item.icon\">\n <SvgIcon :icon-class=\"item.icon\" class=\"button-icon\" />\n </template>\n {{ item.label }}\n </a-button>\n </a-space>\n </Teleport>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { defineComponent, computed, PropType } from 'vue';\n import { SvgIcon, useExecFunction } from 'tmgc2-share';\n import type { ActionButton } from '@kp-ui/lowcode-core';\n import { ButtonPositionEnum } from '@kp-ui/lowcode-core';\n\n export default defineComponent({\n name: 'ActionButtonListRender',\n components: { SvgIcon },\n props: {\n options: {\n type: Object,\n default: () => {}\n },\n disabled: {\n type: Boolean,\n default: false\n },\n scope: {\n type: Object,\n default: () => {}\n },\n ctx: {\n type: Object,\n default: () => {}\n },\n buttonList: {\n type: Array as PropType<ActionButton[]>,\n default: () => []\n },\n customClass: {\n type: Array as PropType<string[]>,\n default: () => []\n },\n flex: {\n type: String,\n default: 'center'\n },\n designState: {\n type: Boolean,\n default: false\n }\n },\n emits: ['on-click'],\n setup(props, { emit }) {\n const containerStyle = computed(() => ({\n '--flex': props.flex\n }));\n\n const { executeFunction, asyncExecuteFunction } = useExecFunction();\n\n const isDisabled = computed(\n () => props.options?.buttonPosition !== ButtonPositionEnum.DIY || props.designState\n );\n\n const getContainer = computed(() =>\n isDisabled.value ? 'body' : props.options?.getContainer || 'body'\n );\n\n const visibleButtons = computed(() =>\n props.buttonList\n .filter(item => item.hidden !== 1)\n .filter(item => !handleHidden(item))\n );\n\n const handleClick = async (item: ActionButton) => {\n if (props.designState) return; // 在设计状态下不处理点击事件\n if (!item.onClick) {\n emit('on-click', { item, result: true });\n return;\n }\n if (item.loading) return;\n item.loading = true;\n try {\n const result = await asyncExecuteFunction({\n functionBody: item.onClick,\n context: props.ctx,\n params: props.scope\n });\n emit('on-click', { item, result });\n } catch (error) {\n console.error('Button click handler error:', error);\n } finally {\n item.loading = false;\n }\n };\n\n const handleDisabled = (item: ActionButton): boolean => {\n if (!item.onDisabled) return false;\n\n try {\n const result = executeFunction({\n functionBody: item.onDisabled,\n context: props.ctx,\n params: props.scope\n });\n if (typeof result === 'boolean') {\n return result;\n } else {\n return false;\n }\n } catch (error) {\n console.error('Button disabled handler error:', error);\n return false;\n }\n };\n\n const handleHidden = (item: ActionButton): boolean => {\n if (!item.onHidden) return false;\n\n try {\n return executeFunction({\n functionBody: item.onHidden,\n context: props.ctx,\n params: props.scope\n });\n } catch (error) {\n console.error('Button hidden handler error:', error);\n return false;\n }\n };\n\n return {\n getContainer,\n isDisabled,\n containerStyle,\n visibleButtons,\n handleClick,\n handleDisabled\n };\n }\n });\n</script>\n\n<style lang=\"scss\" scoped>\n .button-list-container {\n flex: 1;\n display: flex;\n justify-content: var(--flex);\n\n .button-icon {\n margin-right: 4px;\n }\n }\n</style>\n"],"names":["_createElementBlock","_normalizeClass","_normalizeStyle","_createBlock","_Teleport","_createVNode","_withCtx","_openBlock","_Fragment","_renderList","_createCommentVNode","_toDisplayString"],"mappings":";;;;;;;;sBACIA,mBA0BM,OAAA;AAAA,IAzBF,KAAI;AAAA,IACH,OAAKC,4CAA+B,KAAA,WAAW,CAAA;AAAA,IAC/C,OAAKC,eAAE,KAAA,cAAc;AAAA,EAAA,GAAA;AAAA,kBAEtBC,YAoBWC,UAAA;AAAA,MApBA,UAAU,KAAA;AAAA,MAAa,IAAI,KAAA;AAAA,IAAA,GAAA;AAAA,MAClCC,YAkBU,oBAAA,EAlBA,MAAM,EAAA,GAAC;AAAA,QAAA,SAAAC,QAET,MAA8B;AAAA,WAAAC,UAAA,IAAA,GADlCP,mBAgBWQ,UAAA,MAAAC,WAfQ,KAAA,gBAAc,CAAtB,SAAI;gCADfN,YAgBW,qBAAA;AAAA,cAdN,KAAK,KAAK;AAAA,cACV,MAAM,KAAK;AAAA,cACX,MAAM,KAAK;AAAA,cACX,QAAM,EAAI,KAAK;AAAA,cACf,OAAK,EAAI,KAAK;AAAA,cACf,OAAM;AAAA,cACL,SAAS,KAAK;AAAA,cACd,UAAU,KAAA,eAAe,IAAI,KAAK,KAAA,YAAQ,EAAM,KAAK;AAAA,cACrD,SAAK,CAAA,WAAE,KAAA,YAAY,IAAI;AAAA,YAAA,GAAA;AAAA,+BAExB,MAEW;AAAA,gBAFK,KAAK,qBACjBA,YAAuD,oBAAA;AAAA,kBAAA,KAAA;AAAA,kBAA7C,cAAY,KAAK;AAAA,kBAAM,OAAM;AAAA,gBAAA,GAAA,MAAA,GAAA,CAAA,YAAA,CAAA,KAAAO,mBAAA,IAAA,IAAA;AAAA,gCAChC,MACXC,gBAAG,KAAK,KAAK,GAAA,CAAA;AAAA,cAAA,CAAA;AAAA;;;;;;;;;;"}
1
+ {"version":3,"file":"ActionButtonListRender.vue.js","sources":["../../../../src/components/public/ActionButtonListRender.vue"],"sourcesContent":["<template>\n <div\n ref=\"fieldEditor\"\n :class=\"['button-list-container', ...customClass]\"\n :style=\"containerStyle\"\n >\n <Teleport :disabled=\"isDisabled\" :to=\"getContainer\">\n <a-space :size=\"8\">\n <a-button\n v-for=\"item in visibleButtons\"\n :key=\"item.key\"\n :type=\"item.type\"\n :size=\"item.size\"\n :danger=\"!!item.danger\"\n :ghost=\"!!item.ghost\"\n class=\"tpf-button\"\n :loading=\"item.loading\"\n :disabled=\"handleDisabled(item) || disabled || !!item.disabled\"\n @click=\"handleClick(item)\"\n >\n <template v-if=\"item.icon\">\n <SvgIcon :icon-class=\"item.icon\" class=\"button-icon\" />\n </template>\n {{ item.label }}\n </a-button>\n </a-space>\n </Teleport>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { defineComponent, computed, PropType } from 'vue';\n import { SvgIcon, useExecFunction } from 'tmgc2-share';\n import type { ActionButton } from '@kp-ui/lowcode-core';\n import { ButtonPositionEnum } from '@kp-ui/lowcode-core';\n\n export default defineComponent({\n name: 'ActionButtonListRender',\n components: { SvgIcon },\n props: {\n options: {\n type: Object,\n default: () => {}\n },\n disabled: {\n type: Boolean,\n default: false\n },\n scope: {\n type: Object,\n default: () => {}\n },\n ctx: {\n type: Object,\n default: () => {}\n },\n buttonList: {\n type: Array as PropType<ActionButton[]>,\n default: () => []\n },\n customClass: {\n type: Array as PropType<string[]>,\n default: () => []\n },\n flex: {\n type: String,\n default: 'center'\n },\n designState: {\n type: Boolean,\n default: false\n }\n },\n emits: ['on-click'],\n setup(props, { emit }) {\n const containerStyle = computed(() => ({\n '--flex': props.flex\n }));\n\n const { executeFunction, asyncExecuteFunction } = useExecFunction();\n\n const isDisabled = computed(\n () => props.options?.buttonPosition !== ButtonPositionEnum.DIY || props.designState\n );\n\n const getContainer = computed(() =>\n isDisabled.value ? 'body' : props.options?.getContainer || 'body'\n );\n\n const visibleButtons = computed(() =>\n props.buttonList\n .filter(item => item.hidden !== 1)\n .filter(item => !handleHidden(item))\n );\n\n const handleClick = async (item: ActionButton) => {\n if (props.designState) return; // 在设计状态下不处理点击事件\n if (!item.onClick) {\n emit('on-click', { item, result: true });\n return;\n }\n if (item.loading) return;\n item.loading = true;\n try {\n const result = await asyncExecuteFunction({\n functionBody: item.onClick,\n context: props.ctx,\n params: props.scope\n });\n emit('on-click', { item, result });\n } catch (error) {\n console.error('Button click handler error:', error);\n } finally {\n item.loading = false;\n }\n };\n\n const handleDisabled = (item: ActionButton): boolean => {\n if (!item.onDisabled) return false;\n\n try {\n const result = executeFunction({\n functionBody: item.onDisabled,\n context: props.ctx,\n params: props.scope\n });\n if (typeof result === 'boolean') {\n return result;\n } else {\n return false;\n }\n } catch (error) {\n console.error('Button disabled handler error:', error);\n return false;\n }\n };\n\n const handleHidden = (item: ActionButton): boolean => {\n if (!item.onHidden) return false;\n\n try {\n return executeFunction({\n functionBody: item.onHidden,\n context: props.ctx,\n params: props.scope\n });\n } catch (error) {\n console.error('Button hidden handler error:', error);\n return false;\n }\n };\n\n return {\n getContainer,\n isDisabled,\n containerStyle,\n visibleButtons,\n handleClick,\n handleDisabled\n };\n }\n });\n</script>\n\n<style lang=\"scss\" scoped>\n .button-list-container {\n flex: 1;\n display: flex;\n justify-content: var(--flex);\n\n .button-icon {\n margin-right: 4px;\n }\n }\n</style>\n"],"names":[],"mappings":";;;AAoCI,MAAA,YAAe,gBAAgB;AAAA,EAC3B,MAAM;AAAA,EACN,YAAY,EAAE,QAAA;AAAA,EACd,OAAO;AAAA,IACH,SAAS;AAAA,MACL,MAAM;AAAA,MACN,SAAS,MAAM;AAAA,MAAC;AAAA,IAAA;AAAA,IAEpB,UAAU;AAAA,MACN,MAAM;AAAA,MACN,SAAS;AAAA,IAAA;AAAA,IAEb,OAAO;AAAA,MACH,MAAM;AAAA,MACN,SAAS,MAAM;AAAA,MAAC;AAAA,IAAA;AAAA,IAEpB,KAAK;AAAA,MACD,MAAM;AAAA,MACN,SAAS,MAAM;AAAA,MAAC;AAAA,IAAA;AAAA,IAEpB,YAAY;AAAA,MACR,MAAM;AAAA,MACN,SAAS,MAAM,CAAA;AAAA,IAAC;AAAA,IAEpB,aAAa;AAAA,MACT,MAAM;AAAA,MACN,SAAS,MAAM,CAAA;AAAA,IAAC;AAAA,IAEpB,MAAM;AAAA,MACF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AACA,cAAM,SAAS,gBAAgB;AAAA,UAC3B,cAAc,KAAK;AAAA,UACnB,SAAS,MAAM;AAAA,UACf,QAAQ,MAAM;AAAA,QAAA,CACjB;AACD,YAAI,OAAO,WAAW,WAAW;AAC7B,iBAAO;AAAA,QACX,OAAO;AACH,iBAAO;AAAA,QACX;AAAA,MACJ,SAAS,OAAO;AACZ,gBAAQ,MAAM,kCAAkC,KAAK;AACrD,eAAO;AAAA,MACX;AAAA,IACJ;AAEA,UAAM,eAAe,CAAC,SAAgC;AAClD,UAAI,CAAC,KAAK,SAAU,QAAO;AAE3B,UAAI;AACA,eAAO,gBAAgB;AAAA,UACnB,cAAc,KAAK;AAAA,UACnB,SAAS,MAAM;AAAA,UACf,QAAQ,MAAM;AAAA,QAAA,CACjB;AAAA,MACL,SAAS,OAAO;AACZ,gBAAQ,MAAM,gCAAgC,KAAK;AACnD,eAAO;AAAA,MACX;AAAA,IACJ;AAEA,WAAO;AAAA,MACH;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IAAA;AAAA,EAER;AACJ,CAAC;"}
@@ -0,0 +1,53 @@
1
+ import _sfc_main from "./ActionButtonListRender.vue.js";
2
+ import { resolveComponent, createElementBlock, openBlock, normalizeStyle, normalizeClass, createBlock, Teleport, createVNode, withCtx, Fragment, renderList, createCommentVNode, createTextVNode, toDisplayString } from "vue";
3
+ /* empty css */
4
+ import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.js";
5
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
6
+ const _component_SvgIcon = resolveComponent("SvgIcon");
7
+ const _component_a_button = resolveComponent("a-button");
8
+ const _component_a_space = resolveComponent("a-space");
9
+ return openBlock(), createElementBlock("div", {
10
+ ref: "fieldEditor",
11
+ class: normalizeClass(["button-list-container", ..._ctx.customClass]),
12
+ style: normalizeStyle(_ctx.containerStyle)
13
+ }, [
14
+ (openBlock(), createBlock(Teleport, {
15
+ disabled: _ctx.isDisabled,
16
+ to: _ctx.getContainer
17
+ }, [
18
+ createVNode(_component_a_space, { size: 8 }, {
19
+ default: withCtx(() => [
20
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.visibleButtons, (item) => {
21
+ return openBlock(), createBlock(_component_a_button, {
22
+ key: item.key,
23
+ type: item.type,
24
+ size: item.size,
25
+ danger: !!item.danger,
26
+ ghost: !!item.ghost,
27
+ class: "tpf-button",
28
+ loading: item.loading,
29
+ disabled: _ctx.handleDisabled(item) || _ctx.disabled || !!item.disabled,
30
+ onClick: ($event) => _ctx.handleClick(item)
31
+ }, {
32
+ default: withCtx(() => [
33
+ item.icon ? (openBlock(), createBlock(_component_SvgIcon, {
34
+ key: 0,
35
+ "icon-class": item.icon,
36
+ class: "button-icon"
37
+ }, null, 8, ["icon-class"])) : createCommentVNode("", true),
38
+ createTextVNode(" " + toDisplayString(item.label), 1)
39
+ ]),
40
+ _: 2
41
+ }, 1032, ["type", "size", "danger", "ghost", "loading", "disabled", "onClick"]);
42
+ }), 128))
43
+ ]),
44
+ _: 1
45
+ })
46
+ ], 8, ["disabled", "to"]))
47
+ ], 6);
48
+ }
49
+ const ActionButtonListRender = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-37429548"]]);
50
+ export {
51
+ ActionButtonListRender as default
52
+ };
53
+ //# sourceMappingURL=ActionButtonListRender.vue3.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ActionButtonListRender.vue2.js","sources":["../../../../src/components/public/ActionButtonListRender.vue"],"sourcesContent":["<template>\n <div\n ref=\"fieldEditor\"\n :class=\"['button-list-container', ...customClass]\"\n :style=\"containerStyle\"\n >\n <Teleport :disabled=\"isDisabled\" :to=\"getContainer\">\n <a-space :size=\"8\">\n <a-button\n v-for=\"item in visibleButtons\"\n :key=\"item.key\"\n :type=\"item.type\"\n :size=\"item.size\"\n :danger=\"!!item.danger\"\n :ghost=\"!!item.ghost\"\n class=\"tpf-button\"\n :loading=\"item.loading\"\n :disabled=\"handleDisabled(item) || disabled || !!item.disabled\"\n @click=\"handleClick(item)\"\n >\n <template v-if=\"item.icon\">\n <SvgIcon :icon-class=\"item.icon\" class=\"button-icon\" />\n </template>\n {{ item.label }}\n </a-button>\n </a-space>\n </Teleport>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { defineComponent, computed, PropType } from 'vue';\n import { SvgIcon, useExecFunction } from 'tmgc2-share';\n import type { ActionButton } from '@kp-ui/lowcode-core';\n import { ButtonPositionEnum } from '@kp-ui/lowcode-core';\n\n export default defineComponent({\n name: 'ActionButtonListRender',\n components: { SvgIcon },\n props: {\n options: {\n type: Object,\n default: () => {}\n },\n disabled: {\n type: Boolean,\n default: false\n },\n scope: {\n type: Object,\n default: () => {}\n },\n ctx: {\n type: Object,\n default: () => {}\n },\n buttonList: {\n type: Array as PropType<ActionButton[]>,\n default: () => []\n },\n customClass: {\n type: Array as PropType<string[]>,\n default: () => []\n },\n flex: {\n type: String,\n default: 'center'\n },\n designState: {\n type: Boolean,\n default: false\n }\n },\n emits: ['on-click'],\n setup(props, { emit }) {\n const containerStyle = computed(() => ({\n '--flex': props.flex\n }));\n\n const { executeFunction, asyncExecuteFunction } = useExecFunction();\n\n const isDisabled = computed(\n () => props.options?.buttonPosition !== ButtonPositionEnum.DIY || props.designState\n );\n\n const getContainer = computed(() =>\n isDisabled.value ? 'body' : props.options?.getContainer || 'body'\n );\n\n const visibleButtons = computed(() =>\n props.buttonList\n .filter(item => item.hidden !== 1)\n .filter(item => !handleHidden(item))\n );\n\n const handleClick = async (item: ActionButton) => {\n if (props.designState) return; // 在设计状态下不处理点击事件\n if (!item.onClick) {\n emit('on-click', { item, result: true });\n return;\n }\n if (item.loading) return;\n item.loading = true;\n try {\n const result = await asyncExecuteFunction({\n functionBody: item.onClick,\n context: props.ctx,\n params: props.scope\n });\n emit('on-click', { item, result });\n } catch (error) {\n console.error('Button click handler error:', error);\n } finally {\n item.loading = false;\n }\n };\n\n const handleDisabled = (item: ActionButton): boolean => {\n if (!item.onDisabled) return false;\n\n try {\n const result = executeFunction({\n functionBody: item.onDisabled,\n context: props.ctx,\n params: props.scope\n });\n if (typeof result === 'boolean') {\n return result;\n } else {\n return false;\n }\n } catch (error) {\n console.error('Button disabled handler error:', error);\n return false;\n }\n };\n\n const handleHidden = (item: ActionButton): boolean => {\n if (!item.onHidden) return false;\n\n try {\n return executeFunction({\n functionBody: item.onHidden,\n context: props.ctx,\n params: props.scope\n });\n } catch (error) {\n console.error('Button hidden handler error:', error);\n return false;\n }\n };\n\n return {\n getContainer,\n isDisabled,\n containerStyle,\n visibleButtons,\n handleClick,\n handleDisabled\n };\n }\n });\n</script>\n\n<style lang=\"scss\" scoped>\n .button-list-container {\n flex: 1;\n display: flex;\n justify-content: var(--flex);\n\n .button-icon {\n margin-right: 4px;\n }\n }\n</style>\n"],"names":[],"mappings":";;;AAoCI,MAAA,YAAe,gBAAgB;AAAA,EAC3B,MAAM;AAAA,EACN,YAAY,EAAE,QAAA;AAAA,EACd,OAAO;AAAA,IACH,SAAS;AAAA,MACL,MAAM;AAAA,MACN,SAAS,MAAM;AAAA,MAAC;AAAA,IAAA;AAAA,IAEpB,UAAU;AAAA,MACN,MAAM;AAAA,MACN,SAAS;AAAA,IAAA;AAAA,IAEb,OAAO;AAAA,MACH,MAAM;AAAA,MACN,SAAS,MAAM;AAAA,MAAC;AAAA,IAAA;AAAA,IAEpB,KAAK;AAAA,MACD,MAAM;AAAA,MACN,SAAS,MAAM;AAAA,MAAC;AAAA,IAAA;AAAA,IAEpB,YAAY;AAAA,MACR,MAAM;AAAA,MACN,SAAS,MAAM,CAAA;AAAA,IAAC;AAAA,IAEpB,aAAa;AAAA,MACT,MAAM;AAAA,MACN,SAAS,MAAM,CAAA;AAAA,IAAC;AAAA,IAEpB,MAAM;AAAA,MACF,MAAM;AAAA,MACN,SAAS;AAAA,IAAA;AAAA,IAEb,aAAa;AAAA,MACT,MAAM;AAAA,MACN,SAAS;AAAA,IAAA;A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AA,QAAA,CACjB;AACD,YAAI,OAAO,WAAW,WAAW;AAC7B,iBAAO;AAAA,QACX,OAAO;AACH,iBAAO;AAAA,QACX;AAAA,MACJ,SAAS,OAAO;AACZ,gBAAQ,MAAM,kCAAkC,KAAK;AACrD,eAAO;AAAA,MACX;AAAA,IACJ;AAEA,UAAM,eAAe,CAAC,SAAgC;AAClD,UAAI,CAAC,KAAK,SAAU,QAAO;AAE3B,UAAI;AACA,eAAO,gBAAgB;AAAA,UACnB,cAAc,KAAK;AAAA,UACnB,SAAS,MAAM;AAAA,UACf,QAAQ,MAAM;AAAA,QAAA,CACjB;AAAA,MACL,SAAS,OAAO;AACZ,gBAAQ,MAAM,gCAAgC,KAAK;AACnD,eAAO;AAAA,MACX;AAAA,IACJ;AAEA,WAAO;AAAA,MACH;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IAAA;AAAA,EAER;AACJ,CAAC;"}
1
+ {"version":3,"file":"ActionButtonListRender.vue3.js","sources":["../../../../src/components/public/ActionButtonListRender.vue"],"sourcesContent":["<template>\n <div\n ref=\"fieldEditor\"\n :class=\"['button-list-container', ...customClass]\"\n :style=\"containerStyle\"\n >\n <Teleport :disabled=\"isDisabled\" :to=\"getContainer\">\n <a-space :size=\"8\">\n <a-button\n v-for=\"item in visibleButtons\"\n :key=\"item.key\"\n :type=\"item.type\"\n :size=\"item.size\"\n :danger=\"!!item.danger\"\n :ghost=\"!!item.ghost\"\n class=\"tpf-button\"\n :loading=\"item.loading\"\n :disabled=\"handleDisabled(item) || disabled || !!item.disabled\"\n @click=\"handleClick(item)\"\n >\n <template v-if=\"item.icon\">\n <SvgIcon :icon-class=\"item.icon\" class=\"button-icon\" />\n </template>\n {{ item.label }}\n </a-button>\n </a-space>\n </Teleport>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { defineComponent, computed, PropType } from 'vue';\n import { SvgIcon, useExecFunction } from 'tmgc2-share';\n import type { ActionButton } from '@kp-ui/lowcode-core';\n import { ButtonPositionEnum } from '@kp-ui/lowcode-core';\n\n export default defineComponent({\n name: 'ActionButtonListRender',\n components: { SvgIcon },\n props: {\n options: {\n type: Object,\n default: () => {}\n },\n disabled: {\n type: Boolean,\n default: false\n },\n scope: {\n type: Object,\n default: () => {}\n },\n ctx: {\n type: Object,\n default: () => {}\n },\n buttonList: {\n type: Array as PropType<ActionButton[]>,\n default: () => []\n },\n customClass: {\n type: Array as PropType<string[]>,\n default: () => []\n },\n flex: {\n type: String,\n default: 'center'\n },\n designState: {\n type: Boolean,\n default: false\n }\n },\n emits: ['on-click'],\n setup(props, { emit }) {\n const containerStyle = computed(() => ({\n '--flex': props.flex\n }));\n\n const { executeFunction, asyncExecuteFunction } = useExecFunction();\n\n const isDisabled = computed(\n () => props.options?.buttonPosition !== ButtonPositionEnum.DIY || props.designState\n );\n\n const getContainer = computed(() =>\n isDisabled.value ? 'body' : props.options?.getContainer || 'body'\n );\n\n const visibleButtons = computed(() =>\n props.buttonList\n .filter(item => item.hidden !== 1)\n .filter(item => !handleHidden(item))\n );\n\n const handleClick = async (item: ActionButton) => {\n if (props.designState) return; // 在设计状态下不处理点击事件\n if (!item.onClick) {\n emit('on-click', { item, result: true });\n return;\n }\n if (item.loading) return;\n item.loading = true;\n try {\n const result = await asyncExecuteFunction({\n functionBody: item.onClick,\n context: props.ctx,\n params: props.scope\n });\n emit('on-click', { item, result });\n } catch (error) {\n console.error('Button click handler error:', error);\n } finally {\n item.loading = false;\n }\n };\n\n const handleDisabled = (item: ActionButton): boolean => {\n if (!item.onDisabled) return false;\n\n try {\n const result = executeFunction({\n functionBody: item.onDisabled,\n context: props.ctx,\n params: props.scope\n });\n if (typeof result === 'boolean') {\n return result;\n } else {\n return false;\n }\n } catch (error) {\n console.error('Button disabled handler error:', error);\n return false;\n }\n };\n\n const handleHidden = (item: ActionButton): boolean => {\n if (!item.onHidden) return false;\n\n try {\n return executeFunction({\n functionBody: item.onHidden,\n context: props.ctx,\n params: props.scope\n });\n } catch (error) {\n console.error('Button hidden handler error:', error);\n return false;\n }\n };\n\n return {\n getContainer,\n isDisabled,\n containerStyle,\n visibleButtons,\n handleClick,\n handleDisabled\n };\n }\n });\n</script>\n\n<style lang=\"scss\" scoped>\n .button-list-container {\n flex: 1;\n display: flex;\n justify-content: var(--flex);\n\n .button-icon {\n margin-right: 4px;\n }\n }\n</style>\n"],"names":["_createElementBlock","_normalizeClass","_normalizeStyle","_createBlock","_Teleport","_createVNode","_withCtx","_openBlock","_Fragment","_renderList","_createCommentVNode","_toDisplayString"],"mappings":";;;;;;;;sBACIA,mBA0BM,OAAA;AAAA,IAzBF,KAAI;AAAA,IACH,OAAKC,4CAA+B,KAAA,WAAW,CAAA;AAAA,IAC/C,OAAKC,eAAE,KAAA,cAAc;AAAA,EAAA,GAAA;AAAA,kBAEtBC,YAoBWC,UAAA;AAAA,MApBA,UAAU,KAAA;AAAA,MAAa,IAAI,KAAA;AAAA,IAAA,GAAA;AAAA,MAClCC,YAkBU,oBAAA,EAlBA,MAAM,EAAA,GAAC;AAAA,QAAA,SAAAC,QAET,MAA8B;AAAA,WAAAC,UAAA,IAAA,GADlCP,mBAgBWQ,UAAA,MAAAC,WAfQ,KAAA,gBAAc,CAAtB,SAAI;gCADfN,YAgBW,qBAAA;AAAA,cAdN,KAAK,KAAK;AAAA,cACV,MAAM,KAAK;AAAA,cACX,MAAM,KAAK;AAAA,cACX,QAAM,EAAI,KAAK;AAAA,cACf,OAAK,EAAI,KAAK;AAAA,cACf,OAAM;AAAA,cACL,SAAS,KAAK;AAAA,cACd,UAAU,KAAA,eAAe,IAAI,KAAK,KAAA,YAAQ,EAAM,KAAK;AAAA,cACrD,SAAK,CAAA,WAAE,KAAA,YAAY,IAAI;AAAA,YAAA,GAAA;AAAA,+BAExB,MAEW;AAAA,gBAFK,KAAK,qBACjBA,YAAuD,oBAAA;AAAA,kBAAA,KAAA;AAAA,kBAA7C,cAAY,KAAK;AAAA,kBAAM,OAAM;AAAA,gBAAA,GAAA,MAAA,GAAA,CAAA,YAAA,CAAA,KAAAO,mBAAA,IAAA,IAAA;AAAA,gCAChC,MACXC,gBAAG,KAAK,KAAK,GAAA,CAAA;AAAA,cAAA,CAAA;AAAA;;;;;;;;;;"}
@@ -1,7 +1,7 @@
1
- import { defineComponent, onMounted, createElementBlock, openBlock, createVNode, unref, withCtx, createElementVNode } from "vue";
1
+ import { defineComponent, ref, onMounted, createElementBlock, openBlock, createVNode, unref, withCtx, createElementVNode } from "vue";
2
2
  import { getLocat } from "@kp-ui/tool";
3
3
  import { TpfAddInfoLayout } from "tmgc2-share";
4
- import ActionButtonListRender from "../ActionButtonListRender.vue.js";
4
+ import ActionButtonListRender from "../ActionButtonListRender.vue3.js";
5
5
  import VFormRender from "../../render/index.vue.js";
6
6
  import { useLowcode } from "../../../../core/src/hooks/useLowcode.js";
7
7
  const _hoisted_1 = {
@@ -21,6 +21,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
21
21
  id = "",
22
22
  type = "edit"
23
23
  } = getLocat();
24
+ const anchorList = ref([]);
25
+ const setAnchorList = (list) => {
26
+ anchorList.value = list;
27
+ };
24
28
  const {
25
29
  vfdRef,
26
30
  formConfig,
@@ -42,7 +46,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
42
46
  });
43
47
  return (_ctx, _cache) => {
44
48
  return openBlock(), createElementBlock("div", _hoisted_1, [createVNode(unref(TpfAddInfoLayout), {
45
- title: __props.title
49
+ title: __props.title,
50
+ "anchor-list": anchorList.value
46
51
  }, {
47
52
  footerRight: withCtx(() => {
48
53
  var _a, _b;
@@ -60,11 +65,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
60
65
  vfCtx: {
61
66
  _id: unref(id),
62
67
  ...unref(getLocat)(),
63
- goBack: unref(goBack)
68
+ goBack: unref(goBack),
69
+ setAnchorList
64
70
  }
65
71
  }, null, 8, ["vfCtx"])]),
66
72
  _: 1
67
- }, 8, ["title"])]);
73
+ }, 8, ["title", "anchor-list"])]);
68
74
  };
69
75
  }
70
76
  });
@@ -1 +1 @@
1
- {"version":3,"file":"CustomPageRender.vue.js","sources":["../../../../../src/components/public/ConfigView/CustomPageRender.vue"],"sourcesContent":["<template>\n <div class=\"t-bg-[#fff] t-h-full\">\n <TpfAddInfoLayout :title=\"title\">\n <VFormRender ref=\"vfdRef\" :vfCtx=\"{ _id: id, ...getLocat(), goBack }\" />\n <template #footerRight>\n <div id=\"fromBtn\"></div>\n <ActionButtonListRender\n :buttonList=\"formConfig?.buttonList || []\"\n :ctx=\"vfdRef?.context\"\n @on-click=\"handleButtonClick\"\n />\n </template>\n </TpfAddInfoLayout>\n </div>\n</template>\n\n<script lang=\"tsx\" setup>\n import { getLocat } from '@kp-ui/tool';\n import { onMounted } from 'vue';\n import { TpfAddInfoLayout } from 'tmgc2-share';\n import { useLowcode } from '@kp-ui/lowcode-core';\n import { type ActionButton } from '@kp-ui/lowcode-core';\n import ActionButtonListRender from '../ActionButtonListRender.vue';\n import VFormRender from '../../render/index.vue';\n\n const props = defineProps({\n title: {\n type: String,\n default: ''\n }\n });\n const { formCode = '', id = '', type = 'edit' } = getLocat();\n\n const { vfdRef, formConfig, getComponentJson, goBack } = useLowcode({ formCode, type });\n\n const handleButtonClick = ({ item }: { item: ActionButton }) => {\n if (item.name === 'cancelButton') {\n goBack();\n }\n };\n\n onMounted(async () => {\n await getComponentJson([]);\n });\n</script>\n\n<style lang=\"less\"></style>\n"],"names":["formCode","id","type","getLocat","vfdRef","formConfig","getComponentJson","goBack","useLowcode","handleButtonClick","item","name","onMounted","_openBlock","_createElementBlock","_hoisted_1","_createVNode","_unref","TpfAddInfoLayout","title","__props","footerRight","_createElementVNode","ActionButtonListRender","buttonList","ctx","context","onOnClick","VFormRender","ref","vfCtx","_id"],"mappings":";;;;;;;;;;;;;;;;;;AA+BI,UAAM;AAAA,MAAEA,WAAW;AAAA,MAAIC,KAAK;AAAA,MAAIC,OAAO;AAAA,QAAWC,SAAQ;AAE1D,UAAM;AAAA,MAAEC;AAAAA,MAAQC;AAAAA,MAAYC;AAAAA,MAAkBC;AAAAA,QAAWC,WAAW;AAAA,MAAER;AAAAA,MAAUE;AAAAA,IAAK,CAAC;AAEtF,UAAMO,oBAAoBA,CAAC;AAAA,MAAEC;AAAAA,IAA6B,MAAM;AAC5D,UAAIA,KAAKC,SAAS,gBAAgB;AAC9BJ,eAAM;AAAA,MACV;AAAA,IACJ;AAEAK,cAAU,YAAY;AAClB,YAAMN,iBAAiB,CAAA,CAAE;AAAA,IAC7B,CAAC;;AA1CD,aAAAO,UAAA,GAAAC,mBAYM,OAZNC,YAYM,CAXFC,YAUmBC,MAAAC,gBAAA,GAAA;AAAA,QAVAC,OAAOC,QAAAD;AAAAA,MAAK,GAAA;AAAA,QAEhBE,qBACP,MAAA;;AAAwB,4CAAxBC,mBAAwB,OAAA;AAAA,YAAnBrB,IAAG;AAAA,aAAS,MAAA,EAAA,IACjBe,YAIEO,wBAAA;AAAA,YAHGC,cAAYP,WAAAZ,UAAA,MAAAY,mBAAYO,eAAU,CAAA;AAAA,YAClCC,MAAKR,WAAAb,MAAA,MAAAa,mBAAQS;AAAAA,YACbC,WAAUlB;AAAAA;;yBANnB,MAAwE,CAAxEO,YAAwEY,aAAA;AAAA,mBAAvD;AAAA,UAAJC,KAAIzB;AAAAA,UAAU0B,OAAK;AAAA,YAAAC,KAASd,MAAAhB,EAAA;AAAA,YAAE,GAAKgB,MAAAd,QAAA,EAAQ;AAAA,oBAAIc,MAAAV,MAAA;AAAA,UAAM;AAAA;;;;;;"}
1
+ {"version":3,"file":"CustomPageRender.vue.js","sources":["../../../../../src/components/public/ConfigView/CustomPageRender.vue"],"sourcesContent":["<template>\n <div class=\"t-bg-[#fff] t-h-full\">\n <TpfAddInfoLayout :title=\"title\" :anchor-list=\"anchorList\">\n <VFormRender ref=\"vfdRef\" :vfCtx=\"{ _id: id, ...getLocat(), goBack, setAnchorList }\" />\n <template #footerRight>\n <div id=\"fromBtn\"></div>\n <ActionButtonListRender\n :buttonList=\"formConfig?.buttonList || []\"\n :ctx=\"vfdRef?.context\"\n @on-click=\"handleButtonClick\"\n />\n </template>\n </TpfAddInfoLayout>\n </div>\n</template>\n\n<script lang=\"tsx\" setup>\n import { getLocat } from '@kp-ui/tool';\n import { onMounted, ref } from 'vue';\n import { TpfAddInfoLayout, TpfAnchorList } from 'tmgc2-share';\n import { useLowcode } from '@kp-ui/lowcode-core';\n import { type ActionButton } from '@kp-ui/lowcode-core';\n import ActionButtonListRender from '../ActionButtonListRender.vue';\n import VFormRender from '../../render/index.vue';\n\n const props = defineProps({\n title: {\n type: String,\n default: ''\n }\n });\n const { formCode = '', id = '', type = 'edit' } = getLocat();\n const anchorList = ref<TpfAnchorList[]>([]);\n\n const setAnchorList = (list: TpfAnchorList[]) => {\n anchorList.value = list;\n };\n\n const { vfdRef, formConfig, getComponentJson, goBack } = useLowcode({ formCode, type });\n\n const handleButtonClick = ({ item }: { item: ActionButton }) => {\n if (item.name === 'cancelButton') {\n goBack();\n }\n };\n\n onMounted(async () => {\n await getComponentJson([]);\n });\n</script>\n\n<style lang=\"less\"></style>\n"],"names":["formCode","id","type","getLocat","anchorList","ref","setAnchorList","list","value","vfdRef","formConfig","getComponentJson","goBack","useLowcode","handleButtonClick","item","name","onMounted","_openBlock","_createElementBlock","_hoisted_1","_createVNode","_unref","TpfAddInfoLayout","title","__props","footerRight","_createElementVNode","ActionButtonListRender","buttonList","ctx","context","onOnClick","VFormRender","vfCtx"],"mappings":";;;;;;;;;;;;;;;;;;AA+BI,UAAM;AAAA,MAAEA,WAAW;AAAA,MAAIC,KAAK;AAAA,MAAIC,OAAO;AAAA,QAAWC,SAAQ;AAC1D,UAAMC,aAAaC,IAAqB,EAAE;AAE1C,UAAMC,gBAAiBC,UAA0B;AAC7CH,iBAAWI,QAAQD;AAAAA,IACvB;AAEA,UAAM;AAAA,MAAEE;AAAAA,MAAQC;AAAAA,MAAYC;AAAAA,MAAkBC;AAAAA,QAAWC,WAAW;AAAA,M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