@gct-paas/core-web 0.1.5-dev.4 → 0.1.5-dev.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_plugin-vue_export-helper-DySwtVV7.js +1 -0
- package/dist/icon-next-picker-CShmDJI0.js +1 -0
- package/dist/index.min.css +1 -1
- package/dist/loader.esm.min.js +1 -1
- package/dist/monaco-editor-t8SRxaFC.js +1 -0
- package/dist/overlayscrollbars-vue-B2LfyB-V.js +1 -0
- package/es/components/UserPick/src/user-pick.vue_vue_type_script_setup_true_lang.mjs +2 -2
- package/es/components/base-button/base-button.vue.mjs +1 -1
- package/es/components/field-upload/src/components/base-upload.vue.mjs +2 -2
- package/es/components/field-upload/src/components/base-upload.vue_vue_type_script_name_baseUpload_setup_true_lang.mjs +4 -3
- package/es/components/field-upload/src/components/{base-upload.vue_vue_type_style_index_0_scoped_f53b6ac6_lang.css → base-upload.vue_vue_type_style_index_0_scoped_65872e0a_lang.css} +18 -18
- package/es/components/field-upload/src/components/file-list.vue.mjs +2 -2
- package/es/components/field-upload/src/components/file-list.vue_vue_type_script_setup_true_name_fileList_lang.mjs +2 -2
- package/es/components/field-upload/src/components/{file-list.vue_vue_type_style_index_0_scoped_3918aad0_lang.css → file-list.vue_vue_type_style_index_0_scoped_543b5221_lang.css} +25 -25
- package/es/components/field-upload/src/components/upload-design.vue.mjs +2 -2
- package/es/components/field-upload/src/components/upload-design.vue_vue_type_script_name_UploadDesign_setup_true_lang.mjs +4 -3
- package/es/components/field-upload/src/components/{upload-design.vue_vue_type_style_index_0_scoped_1e5189c1_lang.css → upload-design.vue_vue_type_style_index_0_scoped_5fd18cf8_lang.css} +10 -10
- package/es/components/icon-next-picker/icon-next-picker.vue.mjs +6 -0
- package/es/components/{icon-next/src/IconNextPicker.vue_vue_type_script_setup_true_name_IconNextPicker_lang.mjs → icon-next-picker/icon-next-picker.vue_vue_type_script_setup_true_name_IconNextPicker_lang.mjs} +7 -11
- package/es/components/image-upload/index.mjs +1 -1
- package/es/components/index.d.ts +2 -5
- package/es/components/index.mjs +3 -11
- package/es/components/number-range/number-range.vue.d.ts +85 -0
- package/es/components/number-range/number-range.vue.mjs +7 -0
- package/es/components/number-range/number-range.vue_vue_type_script_setup_true_lang.mjs +91 -0
- package/es/components/number-range/number-range.vue_vue_type_style_index_0_scoped_283a5280_lang.css +8 -0
- package/es/create-app-vue.mjs +5 -3
- package/es/index.mjs +37 -39
- package/es/modules/color-picker/src/ColorPicker.vue.mjs +1 -1
- package/es/modules/formula-editor/formula-editor.mjs +1 -2
- package/es/modules/formula-editor/interface/i-formula-editor-options/i-formula-editor-options.d.ts +2 -0
- package/es/modules/gct-table/editor/gct-table-date/gct-table-date.mjs +1 -1
- package/es/modules/gct-table/editor/gct-table-text/gct-table-text.mjs +1 -1
- package/es/setup-app.d.ts +2 -1
- package/es/setup-app.mjs +1 -3
- package/es/utils/index.d.ts +1 -0
- package/es/utils/index.mjs +1 -0
- package/es/utils/model-entity/model-entity.d.ts +28 -0
- package/es/utils/model-entity/model-entity.mjs +47 -0
- package/package.json +7 -5
- package/dist/monaco-editor-BSzX1Bsh.js +0 -1
- package/dist/useMonacoEditor-BCTpu3UR.js +0 -1
- package/es/components/assets-svg-icon/assets-svg-icon.css +0 -188
- package/es/components/assets-svg-icon/assets-svg-icon.d.ts +0 -134
- package/es/components/assets-svg-icon/assets-svg-icon.mjs +0 -167
- package/es/components/assets-svg-icon/request.d.ts +0 -2
- package/es/components/assets-svg-icon/request.mjs +0 -68
- package/es/components/assets-svg-icon/utils.d.ts +0 -9
- package/es/components/assets-svg-icon/utils.mjs +0 -23
- package/es/components/assets-svg-icon/validate.d.ts +0 -4
- package/es/components/assets-svg-icon/validate.mjs +0 -29
- package/es/components/icon-next/data/icons.data.d.ts +0 -5
- package/es/components/icon-next/hooks/useIconAsset.d.ts +0 -16
- package/es/components/icon-next/hooks/useIconAsset.mjs +0 -36
- package/es/components/icon-next/hooks/useIconPark.d.ts +0 -16
- package/es/components/icon-next/hooks/useIconPark.mjs +0 -52
- package/es/components/icon-next/hooks/useIconPlatform.d.ts +0 -8
- package/es/components/icon-next/hooks/useIconPlatform.mjs +0 -43
- package/es/components/icon-next/index.d.ts +0 -3
- package/es/components/icon-next/index.mjs +0 -3
- package/es/components/icon-next/src/IconNext.vue.d.ts +0 -40
- package/es/components/icon-next/src/IconNext.vue.mjs +0 -7
- package/es/components/icon-next/src/IconNext.vue_vue_type_script_setup_true_name_IconNext_lang.mjs +0 -113
- package/es/components/icon-next/src/IconNext.vue_vue_type_style_index_0_scoped_360a87c9_lang.css +0 -18
- package/es/components/icon-next/src/IconNextPicker.vue.mjs +0 -6
- package/es/components/icon-next/types/index.d.ts +0 -17
- package/es/components/icon-next/types/index.mjs +0 -11
- package/es/components/svg-icon/svg-icon.vue.d.ts +0 -40
- package/es/components/svg-icon/svg-icon.vue.mjs +0 -6
- package/es/components/svg-icon/svg-icon.vue_vue_type_script_setup_true_name_SvgIcon_lang.mjs +0 -52
- package/es/components/svg-icon/svg-icon.vue_vue_type_style_index_0_lang.css +0 -73
- package/es/components/wujie-container/wujie-container.css +0 -74
- package/es/components/wujie-container/wujie-container.d.ts +0 -11
- package/es/components/wujie-container/wujie-container.mjs +0 -61
- /package/dist/{cropper-DyP6CFER.js → cropper-DPh9NaIi.js} +0 -0
- /package/dist/{de_DE-DIDpd1gQ.js → de_DE-BY1He8Sf.js} +0 -0
- /package/dist/{en_US-BaP-b1tP.js → en_US-CuX-vrWy.js} +0 -0
- /package/dist/{es_ES-NOVlNQnw.js → es_ES-BqHRjpc9.js} +0 -0
- /package/dist/{fr_FR-Bk_x0L7S.js → fr_FR-C4TFcMTv.js} +0 -0
- /package/dist/{ja_JP-CeseBQS9.js → ja_JP-CgXnA74i.js} +0 -0
- /package/dist/{pt_PT-DFlFmzXZ.js → pt_PT-C0ALlHDr.js} +0 -0
- /package/dist/{ru_RU-C5XPaRfl.js → ru_RU-D39vUeFW.js} +0 -0
- /package/dist/{tr_TR-CODhj5X1.js → tr_TR-Cm3P61iH.js} +0 -0
- /package/dist/{vi_VN-BjwID8XV.js → vi_VN-BZ_iPKuE.js} +0 -0
- /package/dist/{zh_CN-BKmwBYsr.js → zh_CN-DY_wA21D.js} +0 -0
- /package/dist/{zh_TW-BSGEo2Qx.js → zh_TW-A1Y7MG2g.js} +0 -0
- /package/es/components/{icon-next/src/IconNextPicker.vue.d.ts → icon-next-picker/icon-next-picker.vue.d.ts} +0 -0
- /package/es/components/{icon-next/src/IconNextPicker.vue_vue_type_style_index_0_lang.css → icon-next-picker/icon-next-picker.vue_vue_type_style_index_0_lang.css} +0 -0
- /package/es/modules/gct-table/editor/{gct-table-date/gct-table-date.css → gct-table-text/gct-table-text.css} +0 -0
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
type RangeNumber = number | undefined;
|
|
3
|
+
type MaxObjProp = IObject | undefined;
|
|
4
|
+
declare function __VLS_template(): {
|
|
5
|
+
attrs: Partial<{}>;
|
|
6
|
+
slots: {
|
|
7
|
+
'middle-text'?(_: {}): any;
|
|
8
|
+
};
|
|
9
|
+
refs: {};
|
|
10
|
+
rootEl: HTMLDivElement;
|
|
11
|
+
};
|
|
12
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
13
|
+
declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
14
|
+
rangeMin: {
|
|
15
|
+
type: PropType<RangeNumber>;
|
|
16
|
+
default: undefined;
|
|
17
|
+
};
|
|
18
|
+
rangeMax: {
|
|
19
|
+
type: PropType<RangeNumber>;
|
|
20
|
+
default: undefined;
|
|
21
|
+
};
|
|
22
|
+
disabled: {
|
|
23
|
+
type: BooleanConstructor;
|
|
24
|
+
default: boolean;
|
|
25
|
+
};
|
|
26
|
+
precision: {
|
|
27
|
+
type: NumberConstructor;
|
|
28
|
+
default: number;
|
|
29
|
+
};
|
|
30
|
+
maxObj: {
|
|
31
|
+
type: PropType<MaxObjProp>;
|
|
32
|
+
default: undefined;
|
|
33
|
+
};
|
|
34
|
+
placeholderType: {
|
|
35
|
+
type: StringConstructor;
|
|
36
|
+
default: string;
|
|
37
|
+
};
|
|
38
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
39
|
+
change: (...args: any[]) => void;
|
|
40
|
+
"update:rangeMax": (...args: any[]) => void;
|
|
41
|
+
"update:rangeMin": (...args: any[]) => void;
|
|
42
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
43
|
+
rangeMin: {
|
|
44
|
+
type: PropType<RangeNumber>;
|
|
45
|
+
default: undefined;
|
|
46
|
+
};
|
|
47
|
+
rangeMax: {
|
|
48
|
+
type: PropType<RangeNumber>;
|
|
49
|
+
default: undefined;
|
|
50
|
+
};
|
|
51
|
+
disabled: {
|
|
52
|
+
type: BooleanConstructor;
|
|
53
|
+
default: boolean;
|
|
54
|
+
};
|
|
55
|
+
precision: {
|
|
56
|
+
type: NumberConstructor;
|
|
57
|
+
default: number;
|
|
58
|
+
};
|
|
59
|
+
maxObj: {
|
|
60
|
+
type: PropType<MaxObjProp>;
|
|
61
|
+
default: undefined;
|
|
62
|
+
};
|
|
63
|
+
placeholderType: {
|
|
64
|
+
type: StringConstructor;
|
|
65
|
+
default: string;
|
|
66
|
+
};
|
|
67
|
+
}>> & Readonly<{
|
|
68
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
69
|
+
"onUpdate:rangeMax"?: ((...args: any[]) => any) | undefined;
|
|
70
|
+
"onUpdate:rangeMin"?: ((...args: any[]) => any) | undefined;
|
|
71
|
+
}>, {
|
|
72
|
+
rangeMin: RangeNumber;
|
|
73
|
+
rangeMax: RangeNumber;
|
|
74
|
+
disabled: boolean;
|
|
75
|
+
precision: number;
|
|
76
|
+
maxObj: MaxObjProp;
|
|
77
|
+
placeholderType: string;
|
|
78
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
79
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
80
|
+
export default _default;
|
|
81
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
82
|
+
new (): {
|
|
83
|
+
$slots: S;
|
|
84
|
+
};
|
|
85
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import _plugin_vue_export_helper_default from "../../_virtual/_plugin-vue_export-helper.mjs";
|
|
2
|
+
import number_range_vue_vue_type_script_setup_true_lang_default from "./number-range.vue_vue_type_script_setup_true_lang.mjs";
|
|
3
|
+
import './number-range.vue_vue_type_style_index_0_scoped_283a5280_lang.css';/* empty css */
|
|
4
|
+
//#region src/components/number-range/number-range.vue
|
|
5
|
+
var number_range_default = /* @__PURE__ */ _plugin_vue_export_helper_default(number_range_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-283a5280"]]);
|
|
6
|
+
//#endregion
|
|
7
|
+
export { number_range_default as default };
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { computed, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, openBlock, renderSlot, resolveComponent, toDisplayString, unref } from "vue";
|
|
2
|
+
import { t } from "@gct-paas/core";
|
|
3
|
+
//#region src/components/number-range/number-range.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
+
var _hoisted_1 = { class: "range-box" };
|
|
5
|
+
var _hoisted_2 = { class: "text" };
|
|
6
|
+
var number_range_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
7
|
+
__name: "number-range",
|
|
8
|
+
props: {
|
|
9
|
+
rangeMin: {
|
|
10
|
+
type: [Number, void 0],
|
|
11
|
+
default: void 0
|
|
12
|
+
},
|
|
13
|
+
rangeMax: {
|
|
14
|
+
type: [Number, void 0],
|
|
15
|
+
default: void 0
|
|
16
|
+
},
|
|
17
|
+
disabled: {
|
|
18
|
+
type: Boolean,
|
|
19
|
+
default: false
|
|
20
|
+
},
|
|
21
|
+
precision: {
|
|
22
|
+
type: Number,
|
|
23
|
+
default: 0
|
|
24
|
+
},
|
|
25
|
+
maxObj: {
|
|
26
|
+
type: [Object, void 0],
|
|
27
|
+
default: void 0
|
|
28
|
+
},
|
|
29
|
+
placeholderType: {
|
|
30
|
+
type: String,
|
|
31
|
+
default: t("sys.model.value")
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
emits: [
|
|
35
|
+
"update:rangeMin",
|
|
36
|
+
"update:rangeMax",
|
|
37
|
+
"change"
|
|
38
|
+
],
|
|
39
|
+
setup(__props, { emit: __emit }) {
|
|
40
|
+
const props = __props;
|
|
41
|
+
const startMax = computed(() => {
|
|
42
|
+
return props.maxObj ? props.maxObj["start"] : void 0;
|
|
43
|
+
});
|
|
44
|
+
const endMax = computed(() => {
|
|
45
|
+
return props.maxObj ? props.maxObj["end"] : void 0;
|
|
46
|
+
});
|
|
47
|
+
const handleMinChange = (val) => {
|
|
48
|
+
emit("update:rangeMin", val);
|
|
49
|
+
emit("change", val);
|
|
50
|
+
};
|
|
51
|
+
const handleMaxChange = (val) => {
|
|
52
|
+
emit("update:rangeMax", val);
|
|
53
|
+
emit("change", val);
|
|
54
|
+
};
|
|
55
|
+
const emit = __emit;
|
|
56
|
+
return (_ctx, _cache) => {
|
|
57
|
+
const _component_a_input_number = resolveComponent("a-input-number");
|
|
58
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
59
|
+
createVNode(_component_a_input_number, {
|
|
60
|
+
value: __props.rangeMin,
|
|
61
|
+
min: 0,
|
|
62
|
+
max: startMax.value,
|
|
63
|
+
precision: __props.precision,
|
|
64
|
+
placeholder: `${unref(t)("sys.model.pleaseInputMin")}${__props.placeholderType}`,
|
|
65
|
+
onChange: handleMinChange
|
|
66
|
+
}, null, 8, [
|
|
67
|
+
"value",
|
|
68
|
+
"max",
|
|
69
|
+
"precision",
|
|
70
|
+
"placeholder"
|
|
71
|
+
]),
|
|
72
|
+
createElementVNode("div", _hoisted_2, [renderSlot(_ctx.$slots, "middle-text", {}, () => [createTextVNode(toDisplayString(_ctx.$t("sys.webRender.to")), 1)], true)]),
|
|
73
|
+
createVNode(_component_a_input_number, {
|
|
74
|
+
value: __props.rangeMax,
|
|
75
|
+
min: 0,
|
|
76
|
+
max: endMax.value,
|
|
77
|
+
precision: __props.precision,
|
|
78
|
+
placeholder: `${unref(t)("sys.model.pleaseInputMax")}${__props.placeholderType}`,
|
|
79
|
+
onChange: handleMaxChange
|
|
80
|
+
}, null, 8, [
|
|
81
|
+
"value",
|
|
82
|
+
"max",
|
|
83
|
+
"precision",
|
|
84
|
+
"placeholder"
|
|
85
|
+
])
|
|
86
|
+
]);
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
//#endregion
|
|
91
|
+
export { number_range_vue_vue_type_script_setup_true_lang_default as default };
|
package/es/create-app-vue.mjs
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { BasicModal } from "./modules/global-modal/index.mjs";
|
|
2
|
-
import components_default from "./components/index.mjs";
|
|
3
1
|
import gct_form_default from "./modules/gct-form/index.mjs";
|
|
4
2
|
import gct_table_default from "./modules/gct-table/index.mjs";
|
|
5
3
|
import ColorPicker_default from "./modules/color-picker/src/ColorPicker.vue.mjs";
|
|
6
4
|
import "./modules/color-picker/index.mjs";
|
|
5
|
+
import { BasicModal } from "./modules/global-modal/index.mjs";
|
|
6
|
+
import components_default from "./components/index.mjs";
|
|
7
7
|
import { setupDirectives } from "./directives/index.mjs";
|
|
8
|
+
import { coreComponentsCreateAppVue } from "@gct-paas/core-components";
|
|
8
9
|
import Antdv from "ant-design-vue";
|
|
9
|
-
import { OverlayScrollbarsComponent } from "overlayscrollbars-vue";
|
|
10
10
|
import * as Icons from "@ant-design/icons-vue";
|
|
11
|
+
import { OverlayScrollbarsComponent } from "overlayscrollbars-vue";
|
|
11
12
|
import "overlayscrollbars/overlayscrollbars.css";
|
|
12
13
|
//#region src/create-app-vue.ts
|
|
13
14
|
/**
|
|
@@ -26,6 +27,7 @@ async function coreWebCreateAppVue(app) {
|
|
|
26
27
|
});
|
|
27
28
|
app.component(ColorPicker_default.name, ColorPicker_default);
|
|
28
29
|
app.component(OverlayScrollbarsComponent.__name, OverlayScrollbarsComponent);
|
|
30
|
+
await coreComponentsCreateAppVue(app);
|
|
29
31
|
app.use(gct_form_default);
|
|
30
32
|
app.use(gct_table_default);
|
|
31
33
|
app.use(BasicModal);
|
package/es/index.mjs
CHANGED
|
@@ -30,44 +30,6 @@ import { gctFormItemEditorProps } from "./modules/gct-form/props/gct-form-item/g
|
|
|
30
30
|
import { EditorRegister } from "./modules/gct-form/register/editor-register/editor-register.mjs";
|
|
31
31
|
import { FormItemRegister } from "./modules/gct-form/register/form-item-register/form-item-register.mjs";
|
|
32
32
|
import { WUJIE_FORMULA_EVENTS } from "./modules/formula-editor/constants/index.mjs";
|
|
33
|
-
import svg_icon_default from "./components/svg-icon/svg-icon.vue.mjs";
|
|
34
|
-
import { AssetsSvgIcon } from "./components/assets-svg-icon/assets-svg-icon.mjs";
|
|
35
|
-
import base_button_default from "./components/base-button/base-button.vue.mjs";
|
|
36
|
-
import basic_button_default from "./components/basic-button/basic-button.vue.mjs";
|
|
37
|
-
import { WuJieContainer } from "./components/wujie-container/wujie-container.mjs";
|
|
38
|
-
import double_input_default from "./components/double-input/double-input.vue.mjs";
|
|
39
|
-
import copy_module_key_default from "./components/copy-module-key/copy-module-key.vue.mjs";
|
|
40
|
-
import IconNext_default from "./components/icon-next/src/IconNext.vue.mjs";
|
|
41
|
-
import { MessageUtil } from "./utils/message-util/message-util.mjs";
|
|
42
|
-
import { monacoLoader } from "./utils/monaco-loader/monaco-loader.mjs";
|
|
43
|
-
import { useLocale } from "./hooks/useLocale.mjs";
|
|
44
|
-
import { useTheme } from "./hooks/useTheme.mjs";
|
|
45
|
-
import { UseDragByLine } from "./hooks/useDragLine.mjs";
|
|
46
|
-
import "./hooks/index.mjs";
|
|
47
|
-
import { OverlayController, overlay } from "./utils/overlay-controller/overlay-controller.mjs";
|
|
48
|
-
import { withInstall } from "./utils/with-install.mjs";
|
|
49
|
-
import "./utils/index.mjs";
|
|
50
|
-
import { ImageUpload } from "./components/image-upload/index.mjs";
|
|
51
|
-
import { FieldUpload } from "./components/field-upload/index.mjs";
|
|
52
|
-
import paas_bpmn_log_default from "./components/paas-bpmn-log/paas-bpmn-log.vue.mjs";
|
|
53
|
-
import { CodeEditor } from "./components/code-editor/code-editor.mjs";
|
|
54
|
-
import { ViewContainer } from "./components/layout/view-container/view-container.mjs";
|
|
55
|
-
import { Vue3GridDndItem } from "./components/vue3-grid-dnd-item/vue3-grid-dnd-item.mjs";
|
|
56
|
-
import { useModalDragMove } from "./modules/global-modal/src/hooks/useModalDrag.mjs";
|
|
57
|
-
import { useModalContext } from "./modules/global-modal/src/hooks/useModalContext.mjs";
|
|
58
|
-
import { useModal, useModalInner } from "./modules/global-modal/src/hooks/useModal.mjs";
|
|
59
|
-
import { BasicModal } from "./modules/global-modal/index.mjs";
|
|
60
|
-
import { PickType } from "./components/UserPick/src/constants/index.mjs";
|
|
61
|
-
import { useModalPicker } from "./components/UserPick/index.mjs";
|
|
62
|
-
import paas_bpmn_runtime_default from "./components/BpmnRuntime/paas/paas-bpmn-runtime.vue.mjs";
|
|
63
|
-
import i18n_modal_default from "./components/I18nSelect/src/i18n-modal.vue.mjs";
|
|
64
|
-
import { useI18nSelect } from "./components/I18nSelect/src/useI18nSelect.mjs";
|
|
65
|
-
import i18n_select_btn_default from "./components/I18nSelect/src/i18n-select-btn.vue.mjs";
|
|
66
|
-
import i18n_select_input_default from "./components/I18nSelect/src/i18n-select-input.vue.mjs";
|
|
67
|
-
import i18n_select_input_form_default from "./components/I18nSelect/src/i18n-select-input-form.vue.mjs";
|
|
68
|
-
import i18n_select_textarea_default from "./components/I18nSelect/src/i18n-select-textarea.vue.mjs";
|
|
69
|
-
import i18n_select_textarea_form_default from "./components/I18nSelect/src/i18n-select-textarea-form.vue.mjs";
|
|
70
|
-
import "./components/index.mjs";
|
|
71
33
|
import { openFormulaEditor } from "./modules/formula-editor/formula-editor.mjs";
|
|
72
34
|
import "./modules/formula-editor/index.mjs";
|
|
73
35
|
import "./modules/gct-form/index.mjs";
|
|
@@ -83,6 +45,16 @@ import { GctTableController, useTableController } from "./modules/gct-table/cont
|
|
|
83
45
|
import { useAntTableScrollHeight } from "./modules/gct-table/hooks/use-ant-table/use-ant-table.mjs";
|
|
84
46
|
import { TableEditorRegister } from "./modules/gct-table/register/table-editor-register/table-editor-register.mjs";
|
|
85
47
|
import "./modules/gct-table/index.mjs";
|
|
48
|
+
import { MessageUtil } from "./utils/message-util/message-util.mjs";
|
|
49
|
+
import { validateFieldDefaultForLength, validateFieldDefaultForValue, validateLengthRange } from "./utils/model-entity/model-entity.mjs";
|
|
50
|
+
import { monacoLoader } from "./utils/monaco-loader/monaco-loader.mjs";
|
|
51
|
+
import { useLocale } from "./hooks/useLocale.mjs";
|
|
52
|
+
import { useTheme } from "./hooks/useTheme.mjs";
|
|
53
|
+
import { UseDragByLine } from "./hooks/useDragLine.mjs";
|
|
54
|
+
import "./hooks/index.mjs";
|
|
55
|
+
import { OverlayController, overlay } from "./utils/overlay-controller/overlay-controller.mjs";
|
|
56
|
+
import { withInstall } from "./utils/with-install.mjs";
|
|
57
|
+
import "./utils/index.mjs";
|
|
86
58
|
import { useEditorConsole, useEditorConsoleInner } from "./modules/code-editor/useEditorConsole.mjs";
|
|
87
59
|
import { Lang, Prop, Theme } from "./modules/code-editor/useMonacoEditor.mjs";
|
|
88
60
|
import { MonacoEditor } from "./modules/code-editor/index.mjs";
|
|
@@ -93,6 +65,10 @@ import GctDndItem from "./modules/gct-dnd/components/gct-dnd-item/gct-dnd-item.m
|
|
|
93
65
|
import { GctDndDropLine } from "./modules/gct-dnd/components/gct-dnd-drop-line/gct-dnd-drop-line.mjs";
|
|
94
66
|
import GctDndContainer from "./modules/gct-dnd/components/gct-dnd-container/gct-dnd-container.mjs";
|
|
95
67
|
import "./modules/gct-dnd/index.mjs";
|
|
68
|
+
import { useModalDragMove } from "./modules/global-modal/src/hooks/useModalDrag.mjs";
|
|
69
|
+
import { useModalContext } from "./modules/global-modal/src/hooks/useModalContext.mjs";
|
|
70
|
+
import { useModal, useModalInner } from "./modules/global-modal/src/hooks/useModal.mjs";
|
|
71
|
+
import { BasicModal } from "./modules/global-modal/index.mjs";
|
|
96
72
|
import Cropper_default from "./modules/picture-cropper/src/Cropper.vue.mjs";
|
|
97
73
|
import CopperFreeModal_default from "./modules/picture-cropper/src/CopperFreeModal.vue.mjs";
|
|
98
74
|
import CopperModal_default from "./modules/picture-cropper/src/CopperModal.vue.mjs";
|
|
@@ -102,6 +78,28 @@ import { createImgPreview } from "./modules/picture-preview/src/functional.mjs";
|
|
|
102
78
|
import "./modules/picture-preview/index.mjs";
|
|
103
79
|
import CropperFree_default from "./modules/picture-cropper/src/CropperFree.vue.mjs";
|
|
104
80
|
import "./modules/picture-cropper/index.mjs";
|
|
81
|
+
import base_button_default from "./components/base-button/base-button.vue.mjs";
|
|
82
|
+
import basic_button_default from "./components/basic-button/basic-button.vue.mjs";
|
|
83
|
+
import double_input_default from "./components/double-input/double-input.vue.mjs";
|
|
84
|
+
import copy_module_key_default from "./components/copy-module-key/copy-module-key.vue.mjs";
|
|
85
|
+
import { ImageUpload } from "./components/image-upload/index.mjs";
|
|
86
|
+
import { FieldUpload } from "./components/field-upload/index.mjs";
|
|
87
|
+
import paas_bpmn_log_default from "./components/paas-bpmn-log/paas-bpmn-log.vue.mjs";
|
|
88
|
+
import { CodeEditor } from "./components/code-editor/code-editor.mjs";
|
|
89
|
+
import { ViewContainer } from "./components/layout/view-container/view-container.mjs";
|
|
90
|
+
import { Vue3GridDndItem } from "./components/vue3-grid-dnd-item/vue3-grid-dnd-item.mjs";
|
|
91
|
+
import { PickType } from "./components/UserPick/src/constants/index.mjs";
|
|
92
|
+
import { useModalPicker } from "./components/UserPick/index.mjs";
|
|
93
|
+
import paas_bpmn_runtime_default from "./components/BpmnRuntime/paas/paas-bpmn-runtime.vue.mjs";
|
|
94
|
+
import i18n_modal_default from "./components/I18nSelect/src/i18n-modal.vue.mjs";
|
|
95
|
+
import { useI18nSelect } from "./components/I18nSelect/src/useI18nSelect.mjs";
|
|
96
|
+
import i18n_select_btn_default from "./components/I18nSelect/src/i18n-select-btn.vue.mjs";
|
|
97
|
+
import i18n_select_input_default from "./components/I18nSelect/src/i18n-select-input.vue.mjs";
|
|
98
|
+
import i18n_select_input_form_default from "./components/I18nSelect/src/i18n-select-input-form.vue.mjs";
|
|
99
|
+
import i18n_select_textarea_default from "./components/I18nSelect/src/i18n-select-textarea.vue.mjs";
|
|
100
|
+
import i18n_select_textarea_form_default from "./components/I18nSelect/src/i18n-select-textarea-form.vue.mjs";
|
|
101
|
+
import number_range_default from "./components/number-range/number-range.vue.mjs";
|
|
102
|
+
import "./components/index.mjs";
|
|
105
103
|
import { coreWebCreateAppVue } from "./create-app-vue.mjs";
|
|
106
104
|
import { coreWebSetupApp } from "./setup-app.mjs";
|
|
107
105
|
//#region src/index.ts
|
|
@@ -114,4 +112,4 @@ function onInit() {
|
|
|
114
112
|
}
|
|
115
113
|
onInit();
|
|
116
114
|
//#endregion
|
|
117
|
-
export {
|
|
115
|
+
export { base_button_default as BaseButton, basic_button_default as BasicButton, BasicModal, CodeEditor, ColorPicker_default as ColorPicker, CopperFreeModal_default as CopperFreeModal, CopperModal_default as CopperModal, copy_module_key_default as CopyModuleKey, CropperAvatar_default as CropperAvatar, CropperFree_default as CropperFree, Cropper_default as CropperImage, double_input_default as DoubleInput, EditFormController, EditorController, EditorRegister, EditorRegisterConst, EditorType, FORM_CONTROLLER_INJECT_TAG, FieldUpload, FormCollapseController, FormCollapsePaneController, FormCollapsePaneState, FormCollapseState, FormEditItemController, FormEditItemState, FormGroupController, FormGroupState, FormHiddenItemController, FormItemBasicController, FormItemBasicState, FormItemController, FormItemRegister, FormItemState, FormLineController, FormLineState, FormState, FormTabController, FormTabPaneController, FormTabPaneState, FormTabState, GCT_DND_INSERT_POS, GctDndContainer, GctDndDropLine, GctDndItem, GctFormController, GctTableController, i18n_modal_default as I18Modal, i18n_select_btn_default as I18nSelectBtn, i18n_select_input_default as I18nSelectInput, i18n_select_input_form_default as I18nSelectInputForm, i18n_select_textarea_default as I18nSelectTextarea, i18n_select_textarea_form_default as I18nSelectTextareaForm, picture_preview_default as ImagePreview, ImageUpload, Lang, MessageUtil, MonacoEditor, number_range_default as NumberRange, OverlayController, paas_bpmn_log_default as PaasBpmnLog, paas_bpmn_runtime_default as PaasBpmnRuntime, Prop, TableActionItemController, TableEditItemController, TableEditItemState, TableEditorRegister, TableITemState, TableItemController, TableRowController, TableRowState, TableState, Theme, UseDragByLine, PickType as UserPickType, ViewContainer, Vue3GridDndItem, WUJIE_FORMULA_EVENTS, coreWebCreateAppVue, coreWebSetupApp, createImgPreview, gctFormItemEditorProps, monacoLoader, openFormulaEditor, overlay, useAntTableScrollHeight, useEditFormController, useEditorConsole, useEditorConsoleInner, useForm, useFormItemController, useGctFormValue, useGctFormValueByText, useI18nSelect, useLocale, useModal, useModalContext, useModalDragMove, useModalInner, useModalPicker, useTableController, useTheme, validateFieldDefaultForLength, validateFieldDefaultForValue, validateLengthRange, withInstall };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import _plugin_vue_export_helper_default from "../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
2
1
|
import ColorPicker_vue_vue_type_script_setup_true_name_ColorPicker_lang_default from "./ColorPicker.vue_vue_type_script_setup_true_name_ColorPicker_lang.mjs";
|
|
3
2
|
import './ColorPicker.vue_vue_type_style_index_1_lang.css';import './ColorPicker.vue_vue_type_style_index_0_scoped_7bfd9ca3_lang.css';/* empty css */
|
|
4
3
|
/* empty css */
|
|
4
|
+
import _plugin_vue_export_helper_default from "../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
5
5
|
//#region src/modules/color-picker/src/ColorPicker.vue
|
|
6
6
|
var ColorPicker_default = /* @__PURE__ */ _plugin_vue_export_helper_default(ColorPicker_vue_vue_type_script_setup_true_name_ColorPicker_lang_default, [["__scopeId", "data-v-7bfd9ca3"]]);
|
|
7
7
|
//#endregion
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { WuJieContainer } from "../../components/wujie-container/wujie-container.mjs";
|
|
2
|
-
import "../../components/index.mjs";
|
|
3
1
|
import { createApp, h } from "vue";
|
|
4
2
|
import WujieVue3 from "wujie-vue3";
|
|
3
|
+
import { WuJieContainer } from "@gct-paas/core-components";
|
|
5
4
|
//#region src/modules/formula-editor/formula-editor.ts
|
|
6
5
|
/**
|
|
7
6
|
* 打开公式编辑器
|
package/es/modules/formula-editor/interface/i-formula-editor-options/i-formula-editor-options.d.ts
CHANGED
|
@@ -44,4 +44,6 @@ export interface IFormulaEditorOptions {
|
|
|
44
44
|
modelKey?: string;
|
|
45
45
|
/** 字段属性(精度、布尔文本等) */
|
|
46
46
|
fieldProps?: IFieldProps;
|
|
47
|
+
/** 关闭前的验证回调函数,当返回 false 时阻止关闭 */
|
|
48
|
+
beforeClose?(expr: string, exprEcho: string, type: ReturnTypeEnum, formState: IObject): Promise<boolean>;
|
|
47
49
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useGctFormValue } from "../../../gct-form/hooks/use-gct-form-value/use-gct-form-value.mjs";
|
|
2
2
|
import "../../../gct-form/index.mjs";
|
|
3
|
-
import '
|
|
3
|
+
import '../gct-table-text/gct-table-text.css';/* empty css */
|
|
4
4
|
import { createVNode, defineComponent, mergeProps, resolveComponent } from "vue";
|
|
5
5
|
import { useNamespace } from "@gct-paas/core";
|
|
6
6
|
//#region src/modules/gct-table/editor/gct-table-date/gct-table-date.tsx
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useGctFormValueByText } from "../../../gct-form/hooks/use-gct-form-value/use-gct-form-value.mjs";
|
|
2
2
|
import "../../../gct-form/index.mjs";
|
|
3
|
-
import '
|
|
3
|
+
import './gct-table-text.css';/* empty css */
|
|
4
4
|
import { createVNode, defineComponent, mergeProps, resolveComponent } from "vue";
|
|
5
5
|
import { useNamespace } from "@gct-paas/core";
|
|
6
6
|
//#region src/modules/gct-table/editor/gct-table-text/gct-table-text.tsx
|
package/es/setup-app.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { App } from 'vue';
|
|
2
|
+
export declare function coreWebSetupApp(_app: App): Promise<void>;
|
package/es/setup-app.mjs
CHANGED
package/es/utils/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { MessageUtil } from './message-util/message-util';
|
|
2
|
+
export { validateFieldDefaultForLength, validateFieldDefaultForValue, validateLengthRange, } from './model-entity/model-entity';
|
|
2
3
|
export * from './monaco-loader/monaco-loader';
|
|
3
4
|
export { OverlayController, overlay, } from './overlay-controller/overlay-controller';
|
|
4
5
|
export { withInstall, type CustomComponent, type WithInstall, } from './with-install';
|
package/es/utils/index.mjs
CHANGED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { FieldFormState } from '@gct-paas/core';
|
|
2
|
+
interface MaxObj {
|
|
3
|
+
end?: number;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* 校验特定配置中的:最小值是否大于最大值 (逻辑互斥校验)
|
|
7
|
+
* @param rule - 校验规则对象
|
|
8
|
+
* @param value - 当前字段的值 (此处不使用,为了兼容框架的 validator 签名)
|
|
9
|
+
* @param formData - 表单全局数据
|
|
10
|
+
*/
|
|
11
|
+
export declare function validateLengthRange(_rule: unknown, _value: unknown, formData: FieldFormState): Promise<void>;
|
|
12
|
+
/**
|
|
13
|
+
* 校验默认值的【字符】是否符合配置的范围限制
|
|
14
|
+
* @param rule - 校验规则对象
|
|
15
|
+
* @param value - 当前输入的值 (字符串)
|
|
16
|
+
* @param formData - 表单全局数据
|
|
17
|
+
* @param maxObj - 备用的最大值配置对象 (可选)
|
|
18
|
+
*/
|
|
19
|
+
export declare function validateFieldDefaultForLength(_rule: unknown, value: string, formData: FieldFormState, maxObj?: MaxObj): Promise<void>;
|
|
20
|
+
/**
|
|
21
|
+
* 校验默认值的【数值大小】是否符合配置的范围限制
|
|
22
|
+
* @param rule - 校验规则对象
|
|
23
|
+
* @param value - 当前输入的数值
|
|
24
|
+
* @param formData - 表单全局数据
|
|
25
|
+
* @param maxObj - 备用的最大值配置对象 (可选)
|
|
26
|
+
*/
|
|
27
|
+
export declare function validateFieldDefaultForValue(_rule: unknown, value: number | string, formData: FieldFormState, maxObj?: MaxObj): Promise<void>;
|
|
28
|
+
export {};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { t } from "@gct-paas/core";
|
|
2
|
+
//#region src/utils/model-entity/model-entity.ts
|
|
3
|
+
/**
|
|
4
|
+
* 校验特定配置中的:最小值是否大于最大值 (逻辑互斥校验)
|
|
5
|
+
* @param rule - 校验规则对象
|
|
6
|
+
* @param value - 当前字段的值 (此处不使用,为了兼容框架的 validator 签名)
|
|
7
|
+
* @param formData - 表单全局数据
|
|
8
|
+
*/
|
|
9
|
+
function validateLengthRange(_rule, _value, formData) {
|
|
10
|
+
const { minValue, maxValue } = formData.specificConfig || {};
|
|
11
|
+
if (typeof minValue === "number" && typeof maxValue === "number" && minValue > maxValue) return Promise.reject(/* @__PURE__ */ new Error("MinValue cannot be greater than MaxValue"));
|
|
12
|
+
return Promise.resolve();
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* 校验默认值的【字符】是否符合配置的范围限制
|
|
16
|
+
* @param rule - 校验规则对象
|
|
17
|
+
* @param value - 当前输入的值 (字符串)
|
|
18
|
+
* @param formData - 表单全局数据
|
|
19
|
+
* @param maxObj - 备用的最大值配置对象 (可选)
|
|
20
|
+
*/
|
|
21
|
+
function validateFieldDefaultForLength(_rule, value, formData, maxObj) {
|
|
22
|
+
if (!value) return Promise.resolve();
|
|
23
|
+
const { minValue, maxValue: configMaxValue } = formData.specificConfig || {};
|
|
24
|
+
const maxValue = configMaxValue ?? maxObj?.end;
|
|
25
|
+
const currentLength = value.length;
|
|
26
|
+
if (typeof minValue === "number" && currentLength < minValue) return Promise.reject(`${t("sys.model.minLengthDefault")}${minValue}`);
|
|
27
|
+
if (typeof maxValue === "number" && currentLength > maxValue) return Promise.reject(`${t("sys.model.maxLengthDefault")}${maxValue}`);
|
|
28
|
+
return Promise.resolve();
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* 校验默认值的【数值大小】是否符合配置的范围限制
|
|
32
|
+
* @param rule - 校验规则对象
|
|
33
|
+
* @param value - 当前输入的数值
|
|
34
|
+
* @param formData - 表单全局数据
|
|
35
|
+
* @param maxObj - 备用的最大值配置对象 (可选)
|
|
36
|
+
*/
|
|
37
|
+
function validateFieldDefaultForValue(_rule, value, formData, maxObj) {
|
|
38
|
+
if (value == null || value === "") return Promise.resolve();
|
|
39
|
+
const { minValue, maxValue: configMaxValue } = formData.specificConfig || {};
|
|
40
|
+
const maxValue = configMaxValue ?? maxObj?.end;
|
|
41
|
+
const numericValue = Number(value);
|
|
42
|
+
if (typeof minValue === "number" && numericValue < minValue) return Promise.reject(`${t("sys.model.minNumDefault")}${minValue}`);
|
|
43
|
+
if (typeof maxValue === "number" && numericValue > maxValue) return Promise.reject(`${t("sys.model.maxNumDefault")}${maxValue}`);
|
|
44
|
+
return Promise.resolve();
|
|
45
|
+
}
|
|
46
|
+
//#endregion
|
|
47
|
+
export { validateFieldDefaultForLength, validateFieldDefaultForValue, validateLengthRange };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gct-paas/core-web",
|
|
3
|
-
"version": "0.1.5-dev.
|
|
3
|
+
"version": "0.1.5-dev.6",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "paas 平台网页端核心包",
|
|
6
6
|
"loader": "dist/loader.esm.min.js",
|
|
@@ -54,15 +54,17 @@
|
|
|
54
54
|
"vuedraggable": "^4.1.0",
|
|
55
55
|
"wujie": "^1.0.29",
|
|
56
56
|
"wujie-vue3": "^1.0.29",
|
|
57
|
-
"@gct-paas/
|
|
58
|
-
"@gct-paas/
|
|
57
|
+
"@gct-paas/scss": "0.1.5-dev.6",
|
|
58
|
+
"@gct-paas/core": "0.1.5-dev.6",
|
|
59
|
+
"@gct-paas/core-components": "0.1.5-dev.6"
|
|
59
60
|
},
|
|
60
61
|
"peerDependencies": {
|
|
61
62
|
"@gct-paas/api": "0.1.4-dev.0",
|
|
62
63
|
"vant": ">=4",
|
|
63
64
|
"vue": ">=3",
|
|
64
|
-
"@gct-paas/core": "0.1.5-dev.
|
|
65
|
-
"@gct-paas/scss": "0.1.5-dev.
|
|
65
|
+
"@gct-paas/core": "0.1.5-dev.6",
|
|
66
|
+
"@gct-paas/scss": "0.1.5-dev.6",
|
|
67
|
+
"@gct-paas/core-components": "0.1.5-dev.6"
|
|
66
68
|
},
|
|
67
69
|
"scripts": {
|
|
68
70
|
"dev": "cross-env NODE_ENV=development vite build --watch --config vite.dev.config.ts",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{f as e,h as t,r as o}from"./useMonacoEditor-BCTpu3UR.js";import{computed as n,createBlock as a,createCommentVNode as l,createElementBlock as i,createElementVNode as r,createTextVNode as u,createVNode as c,defineComponent as s,normalizeClass as d,normalizeStyle as f,onMounted as g,onUnmounted as m,openBlock as v,ref as p,renderSlot as w,resolveComponent as h,toDisplayString as M,unref as C,watch as b,withCtx as y}from"vue";import{ClearOutlined as k,CloudDownloadOutlined as x,DownCircleOutlined as E,FormatPainterOutlined as L,RobotOutlined as V,SearchOutlined as _,UpCircleOutlined as R}from"@ant-design/icons-vue";var B={class:"hex-monaco-editor m-e w-full h-full overflow-hidden"},S={class:"m-e-main"},O=/* @__PURE__ */t(/* @__PURE__ */s({__name:"monaco-editor",props:{value:{default:""},title:{default:""},language:{default:"typescript"},theme:{default:o.DARK},readonly:{type:Boolean,default:!1},direction:{default:"bottom"},gapVal:{default:20}},emits:["update:value","change","editor-mounted","blur","focus","chat-bot-click"],setup(t,{expose:s,emit:O}){const D=t,N=p(!1);let T=null;b(()=>D.language,async e=>{A&&A.getModel()&&T&&T.editor.setModelLanguage(A.getModel(),e)});const F=O,W=p();let A;const I=p(!0),j=p(!1),q=p(!1),U=p(!1),$=p(!1),K=n(()=>({color:q.value?"#000":"#fff",marginRight:D.gapVal+"px"}));D.theme===o.VS&&(q.value=!0);let z={value:D.value??"",language:D.language,automaticLayout:!0,theme:D.theme,readOnly:D.readonly,wordWrap:I.value?"on":"off",scrollBeyondLastLine:!1,minimap:{enabled:!0},tabSize:2,autoClosingBrackets:"always",autoClosingDelete:"always",autoClosingOvertype:"always",autoClosingQuotes:"always",comments:{ignoreEmptyLines:!0,insertSpace:!0},columnSelection:!1,folding:!0,fixedOverflowWidgets:!0,hover:{sticky:!0,above:!1}};function P(e){A.setValue(e),F("change",Q()),F("update:value",Q())}function Q(){return A.getValue()}function G(){if(T)try{A.focus(),A.setSelection(new T.Range(1,9999,1,1e4)),A.trigger("","actions.find",null)}catch(e){console.error(e)}else console.warn("[MonacoEditor] Monaco editor is not available for findByKeyword")}function H(){A.setScrollPosition({scrollTop:0})}function J(){A.revealLine(A.getModel().getLineCount())}function X(){!function(e,t){const o=window.URL||window.webkitURL||window,n=new Blob([t]),a=document.createEvent("MouseEvents");a.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null);const l=document.createElementNS("http://www.w3.org/1999/xhtml","a");l.href=o.createObjectURL(n),l.download=e,l.dispatchEvent(a)}(D.title,A.getValue())}async function Y(){if("sql"==D.language){const e=Q(),{format:t}=await import("sql-formatter"),o=t(e);A.setValue(o)}else A.getAction("editor.action.formatDocument").run();const e=Q();F("change",e),F("update:value",e)}function Z(){P("")}function ee(){U.value=!U.value,F("chat-bot-click")}function te(){A&&A.dispose()}return g(()=>{!async function(){T=await e.loadMonaco(),te(),T?(A=T.editor.create(W.value,z),"bottom"===D.direction?J():"top"===D.direction&&H(),A.onDidChangeModelContent(()=>{F("change",Q()),F("update:value",Q())}),A.onDidBlurEditorText(()=>{F("blur",Q()),F("update:value",Q())}),A.onDidFocusEditorText(()=>{F("focus")}),N.value=!0,F("editor-mounted",A)):console.warn("[MonacoEditor] Monaco editor is not available for initEditor"),D.value&&Y()}()}),m(()=>{te()}),async function(){1==await _api.apaas.basicConfig.getAiRagEnabled()?$.value=!0:$.value=!1}(),s({isMonacoReady:N,reload(e){null!=A?A.setValue(e||""):console.warn("[MonacoEditor] Monaco editor is not available for reload")},getMonacoEditor:function(){return A},setEditorContent:P,getEditorContent:Q,scrollToTop:H,scrollToBottom:J,setEditorWordWrap:function(){I.value=!I.value,I.value?A.updateOptions({wordWrap:"on"}):A.updateOptions({wordWrap:"off"})},setEditorTheme:function(){q.value=!q.value,q.value?A.updateOptions({theme:"vs"}):A.updateOptions({theme:"vs-dark"})},handleFullScreenClick:function(){W.value.fullscreenElement?(W.value.exitFullscreen(),j.value=!1):(W.value.requestFullscreen(),j.value=!0)},handleDownloadLogClick:X,getEditorMarkers:function(){if(!T)return console.warn("[MonacoEditor] Monaco editor is not available for getEditorMarkers"),[];const e=A.getModel();return e?T.editor.getModelMarkers({resource:e.uri}):[]},handleFormatCodeClick:Y,getValue:function(){return A.getValue()},setValue:function(e){const t=A.getModel();if(!t)return;const o=t.getFullModelRange();A.executeEdits("setValue",[{range:o,text:e,forceMoveMarkers:!1}]),F("change",Q()),F("update:value",Q())},getSelectCode:function(){const e=A.getSelection();if(e){var t;const o=null===(t=A.getModel())||void 0===t?void 0:t.getValueInRange(e),n=e.startLineNumber,a=e.startColumn,l=e.endLineNumber,i=e.endColumn,r={startLineNumber:1,startColumn:1,endLineNumber:n,endColumn:a},u=A.getModel().getValueInRange(r),c={startLineNumber:l,startColumn:i,endLineNumber:A.getModel().getLineCount(),endColumn:A.getModel().getLineMaxColumn(A.getModel().getLineCount())};return{text:o,textBefore:u,textAfter:A.getModel().getValueInRange(c)}}return{}},isChatBotActive:U,handleChatBotClick:ee}),(e,o)=>{const n=h("a-col"),s=h("a-row");return v(),i("div",B,[w(e.$slots,"header",{},void 0,!0),r("div",S,[c(s,{class:"m-e-main_toolbar w-full flex",type:"flex",justify:"space-between",style:f(q.value?"background-color: #fff; box-shadow: 0px 2px 5px #ddd;":"background-color: #1e1e1e; box-shadow: 0px 2px 5px #111;")},{default:y(()=>[c(n,{class:"m-e-main_toolbar_left flex-1",style:f(q.value?"color: #000":"color: #fff")},{default:y(()=>[r("span",null,[w(e.$slots,"title",{},()=>[u(M(t.title),1)],!0)])]),_:3},8,["style"]),c(n,{class:"m-e-main_toolbar_right",style:f(K.value)},{default:y(()=>[c(C(_),{class:"icon",onClick:G}),c(C(R),{class:"icon",onClick:H}),c(C(E),{class:"icon",onClick:J}),c(C(L),{class:"icon",onClick:Y}),c(C(x),{class:"icon",onClick:X}),c(C(k),{class:"icon",onClick:Z}),$.value?(v(),a(C(V),{key:0,title:"聊天机器人",class:d(["icon",{"icon-active":U.value}]),onClick:ee},null,8,["class"])):l("",!0)]),_:1},8,["style"])]),_:3},8,["style"]),r("div",{ref_key:"Editor",ref:W,class:"m-e-main_container"},null,512)]),w(e.$slots,"footer",{},void 0,!0)])}}}),[["__scopeId","data-v-ccf22884"]]);export{O as default};
|