@gct-paas/core-web 0.1.4-dev.15 → 0.1.4-dev.17
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/BpmnApproval.vue-BQUAB11v.js +1 -0
- package/dist/BpmnBusiness.vue-C5duJF50.js +1 -0
- package/dist/BpmnEnd.vue-BjEcQnG0.js +1 -0
- package/dist/BpmnExclusive.vue-Cx276gAF.js +1 -0
- package/dist/BpmnForm.vue-CF07AB3T.js +1 -0
- package/dist/BpmnJoin.vue-DZgck71H.js +1 -0
- package/dist/BpmnJs.vue-BdKux96j.js +1 -0
- package/dist/BpmnMessage.vue-DABYKBdz.js +1 -0
- package/dist/BpmnParallel.vue-CUi6RogD.js +1 -0
- package/dist/BpmnStart.vue-lvEOgVJW.js +1 -0
- package/dist/NodeFlow.vue-DsiKwCpI.js +1 -0
- package/dist/NodeTools.vue-CKtwcfn2.js +1 -0
- package/dist/NodeTooltips.vue-BuKpNXoA.js +1 -0
- package/dist/enums-DefcbOFc.js +1 -0
- package/dist/index.min.css +1 -1
- package/dist/loader.esm.min.js +1 -1
- package/dist/{monaco-editor-DKwtDu2R.js → monaco-editor-BhuLUOmL.js} +1 -1
- package/dist/node-popover.vue-CnA0OEQf.js +1 -0
- package/dist/useGctBpmn-wMjCfvFc.js +1 -0
- package/dist/useMonacoEditor-no1c2RQN.js +1 -0
- package/es/assets/svg/image-error.svg.mjs +4 -0
- package/es/components/BpmnRuntime/index.d.ts +2 -0
- package/es/components/BpmnRuntime/index.mjs +1 -0
- package/es/components/BpmnRuntime/paas/paas-bpmn-runtime.vue.d.ts +5 -0
- package/es/components/BpmnRuntime/paas/paas-bpmn-runtime.vue.mjs +5 -0
- package/es/components/BpmnRuntime/paas/paas-bpmn-runtime.vue_vue_type_script_setup_true_lang.mjs +83 -0
- package/es/components/I18nSelect/index.d.ts +7 -0
- package/es/components/I18nSelect/index.mjs +7 -0
- package/es/components/I18nSelect/src/i18n-modal.vue.d.ts +21 -0
- package/es/components/I18nSelect/src/i18n-modal.vue.mjs +5 -0
- package/es/components/I18nSelect/src/i18n-modal.vue_vue_type_script_setup_true_lang.mjs +128 -0
- package/es/components/I18nSelect/src/i18n-select-btn.vue.d.ts +17 -0
- package/es/components/I18nSelect/src/i18n-select-btn.vue.mjs +7 -0
- package/es/components/I18nSelect/src/i18n-select-btn.vue_vue_type_script_setup_true_name_i18n-select-btn_lang.mjs +116 -0
- package/es/components/I18nSelect/src/i18n-select-btn.vue_vue_type_style_index_0_scoped_dc8ffb2c_lang.css +58 -0
- package/es/components/I18nSelect/src/i18n-select-container.vue.d.ts +10 -0
- package/es/components/I18nSelect/src/i18n-select-container.vue.mjs +7 -0
- package/es/components/I18nSelect/src/i18n-select-container.vue_vue_type_script_setup_true_name_i18n-select-container_lang.mjs +218 -0
- package/es/components/I18nSelect/src/i18n-select-container.vue_vue_type_style_index_0_scoped_820112ce_lang.css +6 -0
- package/es/components/I18nSelect/src/i18n-select-input-form.vue.d.ts +15 -0
- package/es/components/I18nSelect/src/i18n-select-input-form.vue.mjs +5 -0
- package/es/components/I18nSelect/src/i18n-select-input-form.vue_vue_type_script_setup_true_name_i18n-select-input-form_lang.mjs +56 -0
- package/es/components/I18nSelect/src/i18n-select-input.vue.d.ts +51 -0
- package/es/components/I18nSelect/src/i18n-select-input.vue.mjs +7 -0
- package/es/components/I18nSelect/src/i18n-select-input.vue_vue_type_script_setup_true_name_i18n-select-input_lang.mjs +125 -0
- package/es/components/I18nSelect/src/i18n-select-input.vue_vue_type_style_index_0_scoped_64c5221c_lang.css +3 -0
- package/es/components/I18nSelect/src/i18n-select-modal.vue.d.ts +4 -0
- package/es/components/I18nSelect/src/i18n-select-modal.vue.mjs +5 -0
- package/es/components/I18nSelect/src/i18n-select-modal.vue_vue_type_script_setup_true_lang.mjs +20 -0
- package/es/components/I18nSelect/src/i18n-select-textarea-form.vue.d.ts +15 -0
- package/es/components/I18nSelect/src/i18n-select-textarea-form.vue.mjs +5 -0
- package/es/components/I18nSelect/src/i18n-select-textarea-form.vue_vue_type_script_setup_true_name_i18n-select-input-form_lang.mjs +56 -0
- package/es/components/I18nSelect/src/i18n-select-textarea.vue.d.ts +26 -0
- package/es/components/I18nSelect/src/i18n-select-textarea.vue.mjs +7 -0
- package/es/components/I18nSelect/src/i18n-select-textarea.vue_vue_type_script_setup_true_name_i18n-select-input_lang.mjs +86 -0
- package/es/components/I18nSelect/src/i18n-select-textarea.vue_vue_type_style_index_0_scoped_cd95c416_lang.css +17 -0
- package/es/components/I18nSelect/src/useI18nSelect.d.ts +13 -0
- package/es/components/I18nSelect/src/useI18nSelect.mjs +47 -0
- package/es/components/UserPick/index.d.ts +2 -6
- package/es/components/UserPick/index.mjs +2 -7
- package/es/components/UserPick/src/constants/index.d.ts +5 -0
- package/es/components/UserPick/src/constants/index.mjs +9 -0
- package/es/components/UserPick/src/user-pick.vue.d.ts +1 -1
- package/es/components/UserPick/src/user-pick.vue.mjs +2 -2
- package/es/components/UserPick/src/user-pick.vue_vue_type_script_setup_true_lang.mjs +5 -5
- package/es/components/UserPick/src/{user-pick.vue_vue_type_style_index_0_scoped_081b9663_lang.css → user-pick.vue_vue_type_style_index_0_scoped_a49a84da_lang.css} +11 -11
- package/es/components/app-modal/app-modal-component.mjs +4 -2
- package/es/components/base-button/base-button.vue.mjs +2 -2
- package/es/components/base-button/base-button.vue_vue_type_script_setup_true_name_BaseButton_lang.mjs +5 -5
- package/es/components/base-button/{base-button.vue_vue_type_style_index_0_scoped_5375ec2b_lang.css → base-button.vue_vue_type_style_index_0_scoped_5b7fe5af_lang.css} +18 -18
- package/es/components/basic-button/basic-button.vue.mjs +2 -2
- package/es/components/basic-button/basic-button.vue_vue_type_script_setup_true_name_BasicButton_lang.mjs +3 -3
- package/es/components/basic-button/{basic-button.vue_vue_type_style_index_0_scoped_1dbcb2fa_lang.css → basic-button.vue_vue_type_style_index_0_scoped_22131025_lang.css} +5 -5
- package/es/components/image-upload/src/components/base-upload.vue.mjs +2 -2
- package/es/components/image-upload/src/components/base-upload.vue_vue_type_script_name_baseUpload_setup_true_lang.mjs +4 -4
- package/es/components/image-upload/src/components/base-upload.vue_vue_type_style_index_0_scoped_17a11419_lang.css +76 -0
- package/es/components/index.d.ts +4 -1
- package/es/components/index.mjs +12 -0
- package/es/components/paas-bpmn-log/components/approval-node.vue.d.ts +12 -0
- package/es/components/paas-bpmn-log/components/approval-node.vue.mjs +7 -0
- package/es/components/paas-bpmn-log/components/approval-node.vue_vue_type_script_setup_true_lang.mjs +170 -0
- package/es/components/paas-bpmn-log/components/approval-node.vue_vue_type_style_index_0_scoped_a88d7ef9_lang.css +51 -0
- package/es/components/paas-bpmn-log/components/user-list.vue.d.ts +6 -0
- package/es/components/paas-bpmn-log/components/user-list.vue.mjs +7 -0
- package/es/components/paas-bpmn-log/components/user-list.vue_vue_type_script_setup_true_lang.mjs +55 -0
- package/es/components/paas-bpmn-log/components/user-list.vue_vue_type_style_index_0_scoped_27aa2bf0_lang.css +10 -0
- package/es/components/paas-bpmn-log/hooks/useObserver.d.ts +13 -0
- package/es/components/paas-bpmn-log/hooks/useObserver.mjs +46 -0
- package/es/components/paas-bpmn-log/hooks/uselog.d.ts +5 -0
- package/es/components/paas-bpmn-log/hooks/uselog.mjs +17 -0
- package/es/components/paas-bpmn-log/imgs/avatar-default.png.mjs +4 -0
- package/es/components/paas-bpmn-log/paas-bpmn-log.vue.d.ts +23 -0
- package/es/components/paas-bpmn-log/paas-bpmn-log.vue.mjs +7 -0
- package/es/components/paas-bpmn-log/paas-bpmn-log.vue_vue_type_script_setup_true_lang.mjs +245 -0
- package/es/components/paas-bpmn-log/paas-bpmn-log.vue_vue_type_style_index_0_scoped_c85122b0_lang.css +54 -0
- package/es/hooks/index.d.ts +0 -1
- package/es/hooks/index.mjs +0 -1
- package/es/index.mjs +21 -12
- package/es/modules/Cropper/src/CopperFreeModal.vue.mjs +2 -2
- package/es/modules/Cropper/src/CopperFreeModal.vue_vue_type_script_setup_true_name_CropperModal_lang.mjs +4 -6
- package/es/modules/Cropper/src/{CopperFreeModal.vue_vue_type_style_index_0_scoped_28afc2ab_lang.css → CopperFreeModal.vue_vue_type_style_index_0_scoped_d24895d3_lang.css} +10 -10
- package/es/modules/Cropper/src/CopperModal.vue.mjs +2 -2
- package/es/modules/Cropper/src/CopperModal.vue_vue_type_script_setup_true_name_CropperModal_lang.mjs +5 -7
- package/es/modules/Cropper/src/{CopperModal.vue_vue_type_style_index_0_scoped_f42f8311_lang.css → CopperModal.vue_vue_type_style_index_0_scoped_a65b9ff7_lang.css} +14 -14
- package/es/modules/Cropper/src/Cropper.vue_vue_type_script_lang.mjs +4 -5
- package/es/modules/Cropper/src/CropperAvatar.vue.mjs +2 -2
- package/es/modules/Cropper/src/CropperAvatar.vue_vue_type_script_setup_true_name_CropperAvatar_lang.mjs +6 -7
- package/es/modules/Cropper/src/{CropperAvatar.vue_vue_type_style_index_0_scoped_66052c52_lang.css → CropperAvatar.vue_vue_type_style_index_0_scoped_683cf5bb_lang.css} +7 -7
- 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/modules/global-modal/src/BasicModal.vue.d.ts +2 -2
- package/package.json +13 -5
- package/dist/useMonacoEditor-DrIqFqr0.js +0 -1
- package/es/components/image-upload/src/components/base-upload.vue_vue_type_style_index_0_scoped_3248e630_lang.css +0 -73
- package/es/hooks/useDesign.d.ts +0 -4
- package/es/hooks/useDesign.mjs +0 -10
- package/es/loader.mjs +0 -92
- /package/dist/{de_DE-CYotlhMS.js → de_DE-WZ3EB5Ei.js} +0 -0
- /package/dist/{en_US-DjLwq3RF.js → en_US-CsMalKr8.js} +0 -0
- /package/dist/{es_ES-0UhVFVHw.js → es_ES-B9hxIQ3B.js} +0 -0
- /package/dist/{fr_FR-Xgsbf3iG.js → fr_FR-C6_kWsnc.js} +0 -0
- /package/dist/{ja_JP-3aUbzjBv.js → ja_JP-Bh5yjd5R.js} +0 -0
- /package/dist/{pt_PT-BzMPT58e.js → pt_PT-BWSTPDc8.js} +0 -0
- /package/dist/{ru_RU-BRHq1RXx.js → ru_RU-BhsOXNnH.js} +0 -0
- /package/dist/{tr_TR-CPqM558w.js → tr_TR-DFflgWBG.js} +0 -0
- /package/dist/{vi_VN-BOKGrWoY.js → vi_VN-pWDyqq2t.js} +0 -0
- /package/dist/{zh_CN-upOsz50m.js → zh_CN-TmE4LVWm.js} +0 -0
- /package/dist/{zh_TW-jlmatmAz.js → zh_TW-CkLTTF7p.js} +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,116 @@
|
|
|
1
|
+
import { useI18nSelect } from "./useI18nSelect.mjs";
|
|
2
|
+
import { Fragment, computed, createBlock, createElementBlock, createElementVNode, createVNode, defineComponent, mergeProps, normalizeClass, openBlock, reactive, ref, renderList, resolveComponent, toDisplayString, watch, withCtx } from "vue";
|
|
3
|
+
import { isEmpty } from "lodash-es";
|
|
4
|
+
//#region src/components/I18nSelect/src/i18n-select-btn.vue?vue&type=script&setup=true&name=i18n-select-btn&lang.ts
|
|
5
|
+
var _hoisted_1 = { class: "i18n-tooltip-title" };
|
|
6
|
+
var _hoisted_2 = { style: { "margin-left": "4px" } };
|
|
7
|
+
var i18n_select_btn_vue_vue_type_script_setup_true_name_i18n_select_btn_lang_default = /* @__PURE__ */ defineComponent({
|
|
8
|
+
__name: "i18n-select-btn",
|
|
9
|
+
props: {
|
|
10
|
+
i18nValue: {},
|
|
11
|
+
buttonExtraProps: {},
|
|
12
|
+
size: {},
|
|
13
|
+
i18nModalKey: {},
|
|
14
|
+
simpleBtn: { type: Boolean },
|
|
15
|
+
btnHeight: {},
|
|
16
|
+
btnWidth: {}
|
|
17
|
+
},
|
|
18
|
+
emits: ["on-select-i18n", "closed"],
|
|
19
|
+
setup(__props, { emit: __emit }) {
|
|
20
|
+
const getEnableLocaleList = ref();
|
|
21
|
+
const i18nInstance = useI18nSelect();
|
|
22
|
+
const props = __props;
|
|
23
|
+
const emit = __emit;
|
|
24
|
+
const i18nMap = reactive({});
|
|
25
|
+
const isHighlight = computed(() => {
|
|
26
|
+
return !isEmpty(props.i18nValue);
|
|
27
|
+
});
|
|
28
|
+
const getTableData = async (keyword) => {
|
|
29
|
+
const result = await _api.apaas.i18NInfo.getPageList({
|
|
30
|
+
pageNo: 1,
|
|
31
|
+
pageSize: 20,
|
|
32
|
+
searchKey: keyword
|
|
33
|
+
});
|
|
34
|
+
if (result && result.data) {
|
|
35
|
+
const row = result.data.find((item) => item.key === props.i18nValue);
|
|
36
|
+
if (row) Object.assign(i18nMap, Object.fromEntries(Object.entries(JSON.parse(row.info)).map(([_, item]) => [item.locale, item.info])));
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
watch(() => props.i18nValue, () => {
|
|
40
|
+
if (!isEmpty(props.i18nValue)) getTableData(props.i18nValue);
|
|
41
|
+
}, { immediate: true });
|
|
42
|
+
const handleOpenI18nSelectModal = () => {
|
|
43
|
+
i18nInstance.open({
|
|
44
|
+
i18nModalKey: props.i18nModalKey,
|
|
45
|
+
saveCallback: (params) => {
|
|
46
|
+
emit("on-select-i18n", { ...params });
|
|
47
|
+
},
|
|
48
|
+
destroyCallback: () => {
|
|
49
|
+
emit("closed");
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
};
|
|
53
|
+
return (_ctx, _cache) => {
|
|
54
|
+
const _component_Icon = resolveComponent("Icon");
|
|
55
|
+
const _component_a_button = resolveComponent("a-button");
|
|
56
|
+
const _component_a_tooltip = resolveComponent("a-tooltip");
|
|
57
|
+
return __props.simpleBtn ? (openBlock(), createBlock(_component_Icon, {
|
|
58
|
+
key: 0,
|
|
59
|
+
class: normalizeClass(["i18n-icon simple-btn", { "is-highlight": isHighlight.value }]),
|
|
60
|
+
icon: "ion:language",
|
|
61
|
+
onClick: handleOpenI18nSelectModal
|
|
62
|
+
}, null, 8, ["class"])) : isHighlight.value ? (openBlock(), createBlock(_component_a_tooltip, {
|
|
63
|
+
key: 1,
|
|
64
|
+
color: "#fff",
|
|
65
|
+
placement: "topRight"
|
|
66
|
+
}, {
|
|
67
|
+
title: withCtx(() => [createElementVNode("div", _hoisted_1, "语言标识:" + toDisplayString(__props.i18nValue), 1), (openBlock(true), createElementBlock(Fragment, null, renderList(getEnableLocaleList.value, (item) => {
|
|
68
|
+
return openBlock(), createElementBlock("div", {
|
|
69
|
+
key: item.id,
|
|
70
|
+
class: "i18n-tooltip-item"
|
|
71
|
+
}, [createElementVNode("strong", null, toDisplayString(item.language) + ": ", 1), createElementVNode("span", _hoisted_2, toDisplayString(i18nMap[item.languageTag]), 1)]);
|
|
72
|
+
}), 128))]),
|
|
73
|
+
default: withCtx(() => [createVNode(_component_a_button, mergeProps(__props.buttonExtraProps, {
|
|
74
|
+
class: { "is-highlight": isHighlight.value },
|
|
75
|
+
style: {
|
|
76
|
+
"--btn-width": __props.btnWidth,
|
|
77
|
+
"--btn-height": __props.btnHeight
|
|
78
|
+
},
|
|
79
|
+
size: __props.size,
|
|
80
|
+
onClick: handleOpenI18nSelectModal
|
|
81
|
+
}), {
|
|
82
|
+
icon: withCtx(() => [createVNode(_component_Icon, {
|
|
83
|
+
class: "i18n-icon",
|
|
84
|
+
icon: "ion:language"
|
|
85
|
+
})]),
|
|
86
|
+
_: 1
|
|
87
|
+
}, 16, [
|
|
88
|
+
"class",
|
|
89
|
+
"style",
|
|
90
|
+
"size"
|
|
91
|
+
])]),
|
|
92
|
+
_: 1
|
|
93
|
+
})) : (openBlock(), createBlock(_component_a_button, mergeProps({ key: 2 }, __props.buttonExtraProps, {
|
|
94
|
+
class: { "is-highlight": isHighlight.value },
|
|
95
|
+
style: {
|
|
96
|
+
"--btn-width": __props.btnWidth,
|
|
97
|
+
"--btn-height": __props.btnHeight
|
|
98
|
+
},
|
|
99
|
+
size: __props.size,
|
|
100
|
+
onClick: handleOpenI18nSelectModal
|
|
101
|
+
}), {
|
|
102
|
+
icon: withCtx(() => [createVNode(_component_Icon, {
|
|
103
|
+
class: "i18n-icon",
|
|
104
|
+
icon: "ion:language"
|
|
105
|
+
})]),
|
|
106
|
+
_: 1
|
|
107
|
+
}, 16, [
|
|
108
|
+
"class",
|
|
109
|
+
"style",
|
|
110
|
+
"size"
|
|
111
|
+
]));
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
//#endregion
|
|
116
|
+
export { i18n_select_btn_vue_vue_type_script_setup_true_name_i18n_select_btn_lang_default as default };
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
.ant-btn[data-v-dc8ffb2c] {
|
|
2
|
+
background-color: #fff !important;
|
|
3
|
+
}
|
|
4
|
+
.ant-btn.ant-btn-icon-only[data-v-dc8ffb2c] {
|
|
5
|
+
width: var(--btn-width, 32px);
|
|
6
|
+
height: var(--btn-height, 32px);
|
|
7
|
+
}
|
|
8
|
+
.ant-btn.ant-btn-icon-only.ant-btn-sm[data-v-dc8ffb2c] {
|
|
9
|
+
width: 26px;
|
|
10
|
+
height: 26px;
|
|
11
|
+
}
|
|
12
|
+
.ant-btn:hover .i18n-icon[data-v-dc8ffb2c] {
|
|
13
|
+
transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
|
|
14
|
+
color: var(--ant-primary-color);
|
|
15
|
+
}
|
|
16
|
+
.ant-btn.is-highlight[data-v-dc8ffb2c] {
|
|
17
|
+
color: var(--ant-primary-color);
|
|
18
|
+
border-color: var(--ant-primary-color);
|
|
19
|
+
}
|
|
20
|
+
.ant-btn.is-highlight .i18n-icon[data-v-dc8ffb2c] {
|
|
21
|
+
color: var(--ant-primary-color);
|
|
22
|
+
}
|
|
23
|
+
.i18n-icon[data-v-dc8ffb2c] {
|
|
24
|
+
color: #7f8695;
|
|
25
|
+
display: flex !important;
|
|
26
|
+
}
|
|
27
|
+
.simple-btn[data-v-dc8ffb2c]:hover {
|
|
28
|
+
color: var(--ant-primary-color);
|
|
29
|
+
}
|
|
30
|
+
.simple-btn.is-highlight[data-v-dc8ffb2c] {
|
|
31
|
+
color: var(--ant-primary-color);
|
|
32
|
+
}
|
|
33
|
+
.i18n-tooltip-title[data-v-dc8ffb2c] {
|
|
34
|
+
color: #303133;
|
|
35
|
+
font-size: 16px;
|
|
36
|
+
line-height: 1;
|
|
37
|
+
margin-bottom: 12px;
|
|
38
|
+
}
|
|
39
|
+
.i18n-tooltip-item[data-v-dc8ffb2c] {
|
|
40
|
+
color: #606266;
|
|
41
|
+
font-size: 14px;
|
|
42
|
+
}
|
|
43
|
+
.custom-i18n-btn[data-v-dc8ffb2c] {
|
|
44
|
+
vertical-align: middle;
|
|
45
|
+
background: #fff;
|
|
46
|
+
color: #303133;
|
|
47
|
+
border: none;
|
|
48
|
+
font-size: 14px;
|
|
49
|
+
display: inline-flex;
|
|
50
|
+
justify-content: center;
|
|
51
|
+
align-items: center;
|
|
52
|
+
padding: 0;
|
|
53
|
+
}
|
|
54
|
+
.custom-i18n-btn.reg-i18n[data-v-dc8ffb2c] {
|
|
55
|
+
position: absolute;
|
|
56
|
+
right: -32px;
|
|
57
|
+
bottom: 0;
|
|
58
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface Prop {
|
|
2
|
+
i18nModalKey?: string;
|
|
3
|
+
destroyCallback?: () => void;
|
|
4
|
+
saveCallback?: (params: IObject) => void;
|
|
5
|
+
}
|
|
6
|
+
declare const _default: import('vue').DefineComponent<Prop, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Prop> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
7
|
+
formRef: unknown;
|
|
8
|
+
tableRef: unknown;
|
|
9
|
+
}, any>;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import _plugin_vue_export_helper_default from "../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
2
|
+
import i18n_select_container_vue_vue_type_script_setup_true_name_i18n_select_container_lang_default from "./i18n-select-container.vue_vue_type_script_setup_true_name_i18n-select-container_lang.mjs";
|
|
3
|
+
import './i18n-select-container.vue_vue_type_style_index_0_scoped_820112ce_lang.css';/* empty css */
|
|
4
|
+
//#region src/components/I18nSelect/src/i18n-select-container.vue
|
|
5
|
+
var i18n_select_container_default = /* @__PURE__ */ _plugin_vue_export_helper_default(i18n_select_container_vue_vue_type_script_setup_true_name_i18n_select_container_lang_default, [["__scopeId", "data-v-820112ce"]]);
|
|
6
|
+
//#endregion
|
|
7
|
+
export { i18n_select_container_default as default };
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
import { useModal as useModal$1, useModalInner } from "../../../modules/global-modal/src/hooks/useModal.mjs";
|
|
2
|
+
import "../../../modules/global-modal/index.mjs";
|
|
3
|
+
import i18n_modal_default from "./i18n-modal.vue.mjs";
|
|
4
|
+
import { computed, createBlock, createElementVNode, createTextVNode, createVNode, defineComponent, mergeProps, onMounted, openBlock, reactive, ref, resolveComponent, toDisplayString, unref, withCtx } from "vue";
|
|
5
|
+
import { t } from "@gct-paas/core";
|
|
6
|
+
import { SearchOutlined } from "@ant-design/icons-vue";
|
|
7
|
+
//#region src/components/I18nSelect/src/i18n-select-container.vue?vue&type=script&setup=true&name=i18n-select-container&lang.ts
|
|
8
|
+
var _hoisted_1 = { class: "i18n-select-container" };
|
|
9
|
+
var _hoisted_2 = { class: "table-wrap" };
|
|
10
|
+
var i18n_select_container_vue_vue_type_script_setup_true_name_i18n_select_container_lang_default = /* @__PURE__ */ defineComponent({
|
|
11
|
+
__name: "i18n-select-container",
|
|
12
|
+
props: {
|
|
13
|
+
i18nModalKey: {},
|
|
14
|
+
destroyCallback: { type: Function },
|
|
15
|
+
saveCallback: { type: Function }
|
|
16
|
+
},
|
|
17
|
+
setup(__props) {
|
|
18
|
+
const [registerInner, { closeModal }] = useModalInner();
|
|
19
|
+
const [userRegister, { openModal }] = useModal$1();
|
|
20
|
+
const props = __props;
|
|
21
|
+
const getContainer = () => document.querySelector(`#${props.i18nModalKey}`);
|
|
22
|
+
const formRef = ref();
|
|
23
|
+
const formState = reactive({ keywords: "" });
|
|
24
|
+
const pagination = reactive({
|
|
25
|
+
current: 1,
|
|
26
|
+
pageSize: 5,
|
|
27
|
+
total: 0,
|
|
28
|
+
size: "small",
|
|
29
|
+
showTotal: (total) => t("sys.component.table.total", { total })
|
|
30
|
+
});
|
|
31
|
+
const tableData = ref([]);
|
|
32
|
+
const selectRows = ref();
|
|
33
|
+
const rowSelection = ref({
|
|
34
|
+
type: "radio",
|
|
35
|
+
hideSelectAll: true,
|
|
36
|
+
selectedRowKeys: [],
|
|
37
|
+
onChange: handleRowChange
|
|
38
|
+
});
|
|
39
|
+
const loading = ref(false);
|
|
40
|
+
const columns = computed(() => {
|
|
41
|
+
return [];
|
|
42
|
+
});
|
|
43
|
+
const getTableData = async (keyword, current) => {
|
|
44
|
+
loading.value = true;
|
|
45
|
+
const result = await _api.apaas.i18NInfo.getPageList({
|
|
46
|
+
pageNo: current ?? pagination.current,
|
|
47
|
+
pageSize: pagination.pageSize,
|
|
48
|
+
searchKey: keyword
|
|
49
|
+
});
|
|
50
|
+
loading.value = false;
|
|
51
|
+
if (result && result.data) {
|
|
52
|
+
const rows = result.data.map((item) => {
|
|
53
|
+
const infos = JSON.parse(item?.info);
|
|
54
|
+
return {
|
|
55
|
+
key: item.key,
|
|
56
|
+
type: item.type,
|
|
57
|
+
...Object.fromEntries(infos.map((i) => [i.locale, i.info]))
|
|
58
|
+
};
|
|
59
|
+
});
|
|
60
|
+
pagination.total = result.totalCount;
|
|
61
|
+
tableData.value = rows;
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
onMounted(getTableData);
|
|
65
|
+
const handleSearch = () => {
|
|
66
|
+
formRef.value?.validate().then(async () => {
|
|
67
|
+
await getTableData(formState.keywords, 1);
|
|
68
|
+
});
|
|
69
|
+
};
|
|
70
|
+
const handleTableChange = (paginationInfo) => {
|
|
71
|
+
const { current, total, pageSize } = paginationInfo;
|
|
72
|
+
pagination.current = current;
|
|
73
|
+
pagination.total = total;
|
|
74
|
+
pagination.pageSize = pageSize;
|
|
75
|
+
getTableData();
|
|
76
|
+
};
|
|
77
|
+
const handleAddI18n = () => {
|
|
78
|
+
openModal();
|
|
79
|
+
};
|
|
80
|
+
const handleModalOk = async (data, isEdit) => {
|
|
81
|
+
const langInfos = columns.value.map((item) => {
|
|
82
|
+
return {
|
|
83
|
+
locale: item.dataIndex,
|
|
84
|
+
info: data[item.dataIndex]
|
|
85
|
+
};
|
|
86
|
+
});
|
|
87
|
+
loading.value = true;
|
|
88
|
+
try {
|
|
89
|
+
if (isEdit) await _api.apaas.i18NInfo.putKey({ key: data.id }, { info: JSON.stringify(langInfos) });
|
|
90
|
+
else await _api.apaas.i18NInfo.post({
|
|
91
|
+
info: JSON.stringify(langInfos),
|
|
92
|
+
key: data.id
|
|
93
|
+
});
|
|
94
|
+
getTableData();
|
|
95
|
+
handleRowChange([data.id], [reactive(data)]);
|
|
96
|
+
} catch (error) {
|
|
97
|
+
loading.value = false;
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
function handleRowChange(selectedRowKeys, selectedRows) {
|
|
101
|
+
rowSelection.value.selectedRowKeys = selectedRowKeys;
|
|
102
|
+
selectRows.value = selectedRows;
|
|
103
|
+
}
|
|
104
|
+
const handleClose = () => {
|
|
105
|
+
if (props.destroyCallback && typeof props.destroyCallback === "function") props.destroyCallback();
|
|
106
|
+
};
|
|
107
|
+
const handleOk = async () => {
|
|
108
|
+
if (props.saveCallback && typeof props.saveCallback === "function") {
|
|
109
|
+
const selectRowKey = rowSelection.value.selectedRowKeys;
|
|
110
|
+
const params = {};
|
|
111
|
+
if (selectRowKey && selectRowKey[0]) {
|
|
112
|
+
const selectRow = selectRows.value?.[0];
|
|
113
|
+
console.log("selectRow", selectRow);
|
|
114
|
+
Object.assign(params, { i18nKey: selectRowKey[0] });
|
|
115
|
+
}
|
|
116
|
+
props.saveCallback(params);
|
|
117
|
+
}
|
|
118
|
+
closeModal();
|
|
119
|
+
};
|
|
120
|
+
return (_ctx, _cache) => {
|
|
121
|
+
const _component_a_input = resolveComponent("a-input");
|
|
122
|
+
const _component_a_form_item = resolveComponent("a-form-item");
|
|
123
|
+
const _component_a_col = resolveComponent("a-col");
|
|
124
|
+
const _component_a_button = resolveComponent("a-button");
|
|
125
|
+
const _component_plus_outlined = resolveComponent("plus-outlined");
|
|
126
|
+
const _component_a_row = resolveComponent("a-row");
|
|
127
|
+
const _component_a_form = resolveComponent("a-form");
|
|
128
|
+
const _component_a_table = resolveComponent("a-table");
|
|
129
|
+
const _component_basic_modal = resolveComponent("basic-modal");
|
|
130
|
+
return openBlock(), createBlock(_component_basic_modal, mergeProps(_ctx.$attrs, {
|
|
131
|
+
"min-height": 40,
|
|
132
|
+
title: unref(t)("sys.i18n.i18nConfig"),
|
|
133
|
+
centered: "",
|
|
134
|
+
width: "640px",
|
|
135
|
+
"can-fullscreen": false,
|
|
136
|
+
"mask-closable": false,
|
|
137
|
+
"after-close": handleClose,
|
|
138
|
+
"get-container": getContainer,
|
|
139
|
+
onRegister: unref(registerInner),
|
|
140
|
+
onOk: handleOk
|
|
141
|
+
}), {
|
|
142
|
+
default: withCtx(() => [createElementVNode("div", _hoisted_1, [createVNode(_component_a_form, {
|
|
143
|
+
ref_key: "formRef",
|
|
144
|
+
ref: formRef,
|
|
145
|
+
model: formState,
|
|
146
|
+
autocomplete: "off",
|
|
147
|
+
layout: "horizontal"
|
|
148
|
+
}, {
|
|
149
|
+
default: withCtx(() => [createVNode(_component_a_row, null, {
|
|
150
|
+
default: withCtx(() => [createVNode(_component_a_col, { span: 12 }, {
|
|
151
|
+
default: withCtx(() => [createVNode(_component_a_form_item, {
|
|
152
|
+
name: "keywords",
|
|
153
|
+
label: unref(t)("sys.keywords")
|
|
154
|
+
}, {
|
|
155
|
+
default: withCtx(() => [createVNode(_component_a_input, {
|
|
156
|
+
value: formState.keywords,
|
|
157
|
+
"onUpdate:value": _cache[0] || (_cache[0] = ($event) => formState.keywords = $event),
|
|
158
|
+
placeholder: unref(t)("sys.keywordsPlaceholder"),
|
|
159
|
+
style: { "display": "inline-flex" }
|
|
160
|
+
}, null, 8, ["value", "placeholder"])]),
|
|
161
|
+
_: 1
|
|
162
|
+
}, 8, ["label"])]),
|
|
163
|
+
_: 1
|
|
164
|
+
}), createVNode(_component_a_col, {
|
|
165
|
+
span: 12,
|
|
166
|
+
style: { "text-align": "right" }
|
|
167
|
+
}, {
|
|
168
|
+
default: withCtx(() => [createVNode(_component_a_button, {
|
|
169
|
+
type: "primary",
|
|
170
|
+
onClick: handleSearch
|
|
171
|
+
}, {
|
|
172
|
+
icon: withCtx(() => [createVNode(unref(SearchOutlined))]),
|
|
173
|
+
default: withCtx(() => [createTextVNode(" " + toDisplayString(unref(t)("sys.queryText")), 1)]),
|
|
174
|
+
_: 1
|
|
175
|
+
}), createVNode(_component_a_button, {
|
|
176
|
+
style: { "margin": "0 8px" },
|
|
177
|
+
type: "primary",
|
|
178
|
+
onClick: handleAddI18n
|
|
179
|
+
}, {
|
|
180
|
+
icon: withCtx(() => [createVNode(_component_plus_outlined)]),
|
|
181
|
+
default: withCtx(() => [createTextVNode(" " + toDisplayString(unref(t)("sys.new")), 1)]),
|
|
182
|
+
_: 1
|
|
183
|
+
})]),
|
|
184
|
+
_: 1
|
|
185
|
+
})]),
|
|
186
|
+
_: 1
|
|
187
|
+
})]),
|
|
188
|
+
_: 1
|
|
189
|
+
}, 8, ["model"]), createElementVNode("div", _hoisted_2, [createVNode(_component_a_table, {
|
|
190
|
+
ref: "tableRef",
|
|
191
|
+
"data-source": tableData.value,
|
|
192
|
+
columns: columns.value,
|
|
193
|
+
"show-index-column": false,
|
|
194
|
+
pagination,
|
|
195
|
+
striped: false,
|
|
196
|
+
bordered: true,
|
|
197
|
+
"row-selection": rowSelection.value,
|
|
198
|
+
loading: loading.value,
|
|
199
|
+
onChange: handleTableChange
|
|
200
|
+
}, null, 8, [
|
|
201
|
+
"data-source",
|
|
202
|
+
"columns",
|
|
203
|
+
"pagination",
|
|
204
|
+
"row-selection",
|
|
205
|
+
"loading"
|
|
206
|
+
]), createVNode(i18n_modal_default, {
|
|
207
|
+
lang: columns.value,
|
|
208
|
+
"get-container": getContainer,
|
|
209
|
+
onRegister: unref(userRegister),
|
|
210
|
+
onOk: handleModalOk
|
|
211
|
+
}, null, 8, ["lang", "onRegister"])])])]),
|
|
212
|
+
_: 1
|
|
213
|
+
}, 16, ["title", "onRegister"]);
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
});
|
|
217
|
+
//#endregion
|
|
218
|
+
export { i18n_select_container_vue_vue_type_script_setup_true_name_i18n_select_container_lang_default as default };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { FormInstance, FormItemProps, InputProps } from 'ant-design-vue';
|
|
2
|
+
interface Props {
|
|
3
|
+
formItemName: string | string[];
|
|
4
|
+
fromItemExtraProps?: FormItemProps;
|
|
5
|
+
inputExtraProps?: InputProps;
|
|
6
|
+
i18nConfig?: string;
|
|
7
|
+
text?: string;
|
|
8
|
+
formRef?: FormInstance;
|
|
9
|
+
}
|
|
10
|
+
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
11
|
+
"update:text": (...args: any[]) => void;
|
|
12
|
+
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
13
|
+
"onUpdate:text"?: ((...args: any[]) => any) | undefined;
|
|
14
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
15
|
+
export default _default;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import i18n_select_input_form_vue_vue_type_script_setup_true_name_i18n_select_input_form_lang_default from "./i18n-select-input-form.vue_vue_type_script_setup_true_name_i18n-select-input-form_lang.mjs";
|
|
2
|
+
//#region src/components/I18nSelect/src/i18n-select-input-form.vue
|
|
3
|
+
var i18n_select_input_form_default = i18n_select_input_form_vue_vue_type_script_setup_true_name_i18n_select_input_form_lang_default;
|
|
4
|
+
//#endregion
|
|
5
|
+
export { i18n_select_input_form_default as default };
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import i18n_select_input_default from "./i18n-select-input.vue.mjs";
|
|
2
|
+
import { Fragment, computed, createElementBlock, createElementVNode, createVNode, defineComponent, mergeProps, openBlock, resolveComponent, toDisplayString, withCtx } from "vue";
|
|
3
|
+
//#region src/components/I18nSelect/src/i18n-select-input-form.vue?vue&type=script&setup=true&name=i18n-select-input-form&lang.ts
|
|
4
|
+
var i18n_select_input_form_vue_vue_type_script_setup_true_name_i18n_select_input_form_lang_default = /* @__PURE__ */ defineComponent({
|
|
5
|
+
__name: "i18n-select-input-form",
|
|
6
|
+
props: {
|
|
7
|
+
formItemName: {},
|
|
8
|
+
fromItemExtraProps: {},
|
|
9
|
+
inputExtraProps: {},
|
|
10
|
+
i18nConfig: {},
|
|
11
|
+
text: {},
|
|
12
|
+
formRef: {}
|
|
13
|
+
},
|
|
14
|
+
emits: ["update:text"],
|
|
15
|
+
setup(__props, { emit: __emit }) {
|
|
16
|
+
const props = __props;
|
|
17
|
+
const emit = __emit;
|
|
18
|
+
const i18nText = computed({
|
|
19
|
+
get() {
|
|
20
|
+
return props.text ?? "";
|
|
21
|
+
},
|
|
22
|
+
set(value) {
|
|
23
|
+
emit("update:text", value);
|
|
24
|
+
props.formRef?.validateFields([props.formItemName]);
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
return (_ctx, _cache) => {
|
|
28
|
+
const _component_a_form_item = resolveComponent("a-form-item");
|
|
29
|
+
return openBlock(), createElementBlock(Fragment, null, [createVNode(_component_a_form_item, mergeProps({ name: __props.formItemName }, __props.fromItemExtraProps), {
|
|
30
|
+
default: withCtx(() => [createVNode(i18n_select_input_default, mergeProps(_ctx.$attrs, {
|
|
31
|
+
"i18n-text": i18nText.value,
|
|
32
|
+
"onUpdate:i18nText": _cache[0] || (_cache[0] = ($event) => i18nText.value = $event),
|
|
33
|
+
"input-extra-props": __props.inputExtraProps,
|
|
34
|
+
"i18n-config": __props.i18nConfig,
|
|
35
|
+
attr: Array.isArray(__props.formItemName) ? __props.formItemName.join(".") : __props.formItemName,
|
|
36
|
+
"placeholder-text": _ctx.$t("sys.inputText")
|
|
37
|
+
}), null, 16, [
|
|
38
|
+
"i18n-text",
|
|
39
|
+
"input-extra-props",
|
|
40
|
+
"i18n-config",
|
|
41
|
+
"attr",
|
|
42
|
+
"placeholder-text"
|
|
43
|
+
])]),
|
|
44
|
+
_: 1
|
|
45
|
+
}, 16, ["name"]), createVNode(_component_a_form_item, {
|
|
46
|
+
name: "i18nConfig",
|
|
47
|
+
hidden: ""
|
|
48
|
+
}, {
|
|
49
|
+
default: withCtx(() => [createElementVNode("span", null, toDisplayString(__props.i18nConfig), 1)]),
|
|
50
|
+
_: 1
|
|
51
|
+
})], 64);
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
//#endregion
|
|
56
|
+
export { i18n_select_input_form_vue_vue_type_script_setup_true_name_i18n_select_input_form_lang_default as default };
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { InputProps } from 'ant-design-vue';
|
|
2
|
+
import { ButtonSize } from '@gct-paas/core';
|
|
3
|
+
interface Props {
|
|
4
|
+
attr: string | IObject;
|
|
5
|
+
inputExtraProps?: InputProps;
|
|
6
|
+
i18nConfig?: string | Record<string, string>;
|
|
7
|
+
i18nText?: string;
|
|
8
|
+
placeholderText?: string;
|
|
9
|
+
size?: ButtonSize;
|
|
10
|
+
i18nModalKey?: string;
|
|
11
|
+
forceUpdate?: boolean;
|
|
12
|
+
btnHeight?: string;
|
|
13
|
+
btnWidth?: string;
|
|
14
|
+
}
|
|
15
|
+
declare function __VLS_template(): {
|
|
16
|
+
attrs: Partial<{}>;
|
|
17
|
+
slots: {
|
|
18
|
+
'i18n-input'?(_: {}): any;
|
|
19
|
+
};
|
|
20
|
+
refs: {
|
|
21
|
+
i18nInputGroup: unknown;
|
|
22
|
+
inputRef: unknown;
|
|
23
|
+
};
|
|
24
|
+
rootEl: any;
|
|
25
|
+
};
|
|
26
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
27
|
+
declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
28
|
+
blur: (...args: any[]) => void;
|
|
29
|
+
focus: (...args: any[]) => void;
|
|
30
|
+
"update:i18nText": (...args: any[]) => void;
|
|
31
|
+
"update:i18nConfig": (...args: any[]) => void;
|
|
32
|
+
"on-i18n-select": (...args: any[]) => void;
|
|
33
|
+
clickOutside: (...args: any[]) => void;
|
|
34
|
+
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
35
|
+
onBlur?: ((...args: any[]) => any) | undefined;
|
|
36
|
+
onFocus?: ((...args: any[]) => any) | undefined;
|
|
37
|
+
"onUpdate:i18nText"?: ((...args: any[]) => any) | undefined;
|
|
38
|
+
"onUpdate:i18nConfig"?: ((...args: any[]) => any) | undefined;
|
|
39
|
+
"onOn-i18n-select"?: ((...args: any[]) => any) | undefined;
|
|
40
|
+
onClickOutside?: ((...args: any[]) => any) | undefined;
|
|
41
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
42
|
+
i18nInputGroup: unknown;
|
|
43
|
+
inputRef: unknown;
|
|
44
|
+
}, any>;
|
|
45
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
46
|
+
export default _default;
|
|
47
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
48
|
+
new (): {
|
|
49
|
+
$slots: S;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import _plugin_vue_export_helper_default from "../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
2
|
+
import i18n_select_input_vue_vue_type_script_setup_true_name_i18n_select_input_lang_default from "./i18n-select-input.vue_vue_type_script_setup_true_name_i18n-select-input_lang.mjs";
|
|
3
|
+
import './i18n-select-input.vue_vue_type_style_index_0_scoped_64c5221c_lang.css';/* empty css */
|
|
4
|
+
//#region src/components/I18nSelect/src/i18n-select-input.vue
|
|
5
|
+
var i18n_select_input_default = /* @__PURE__ */ _plugin_vue_export_helper_default(i18n_select_input_vue_vue_type_script_setup_true_name_i18n_select_input_lang_default, [["__scopeId", "data-v-64c5221c"]]);
|
|
6
|
+
//#endregion
|
|
7
|
+
export { i18n_select_input_default as default };
|