@gct-paas/design-web 0.1.4-dev.16 → 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.
Files changed (45) hide show
  1. package/dist/index.min.css +1 -1
  2. package/dist/loader.esm.min.js +1 -1
  3. package/es/components/form-component/FieldCheckbox.d.ts +1 -1
  4. package/es/components/form-component/FieldCheckbox.mjs +1 -1
  5. package/es/components/form-component/FieldRadio.d.ts +1 -1
  6. package/es/components/form-component/FieldSelect.d.ts +1 -1
  7. package/es/components/form-component/FieldSelect.mjs +2 -2
  8. package/es/components/form-component/field-label/tag-label.vue_vue_type_script_setup_true_lang.mjs +2 -2
  9. package/es/components/form-component/field-label/tag-span.vue.mjs +1 -1
  10. package/es/components/index.d.ts +0 -1
  11. package/es/components/index.mjs +0 -8
  12. package/es/index.mjs +1 -8
  13. package/package.json +7 -7
  14. package/es/components/I18nSelect/index.d.ts +0 -7
  15. package/es/components/I18nSelect/index.mjs +0 -7
  16. package/es/components/I18nSelect/src/i18n-modal.vue.d.ts +0 -21
  17. package/es/components/I18nSelect/src/i18n-modal.vue.mjs +0 -5
  18. package/es/components/I18nSelect/src/i18n-modal.vue_vue_type_script_setup_true_lang.mjs +0 -128
  19. package/es/components/I18nSelect/src/i18n-select-btn.vue.d.ts +0 -17
  20. package/es/components/I18nSelect/src/i18n-select-btn.vue.mjs +0 -7
  21. package/es/components/I18nSelect/src/i18n-select-btn.vue_vue_type_script_setup_true_name_i18n-select-btn_lang.mjs +0 -116
  22. package/es/components/I18nSelect/src/i18n-select-btn.vue_vue_type_style_index_0_scoped_dc8ffb2c_lang.css +0 -58
  23. package/es/components/I18nSelect/src/i18n-select-container.vue.d.ts +0 -10
  24. package/es/components/I18nSelect/src/i18n-select-container.vue.mjs +0 -7
  25. package/es/components/I18nSelect/src/i18n-select-container.vue_vue_type_script_setup_true_name_i18n-select-container_lang.mjs +0 -217
  26. package/es/components/I18nSelect/src/i18n-select-container.vue_vue_type_style_index_0_scoped_0160ed5e_lang.css +0 -6
  27. package/es/components/I18nSelect/src/i18n-select-input-form.vue.d.ts +0 -15
  28. package/es/components/I18nSelect/src/i18n-select-input-form.vue.mjs +0 -5
  29. package/es/components/I18nSelect/src/i18n-select-input-form.vue_vue_type_script_setup_true_name_i18n-select-input-form_lang.mjs +0 -56
  30. package/es/components/I18nSelect/src/i18n-select-input.vue.d.ts +0 -51
  31. package/es/components/I18nSelect/src/i18n-select-input.vue.mjs +0 -7
  32. package/es/components/I18nSelect/src/i18n-select-input.vue_vue_type_script_setup_true_name_i18n-select-input_lang.mjs +0 -125
  33. package/es/components/I18nSelect/src/i18n-select-input.vue_vue_type_style_index_0_scoped_64c5221c_lang.css +0 -3
  34. package/es/components/I18nSelect/src/i18n-select-modal.vue.d.ts +0 -4
  35. package/es/components/I18nSelect/src/i18n-select-modal.vue.mjs +0 -5
  36. package/es/components/I18nSelect/src/i18n-select-modal.vue_vue_type_script_setup_true_lang.mjs +0 -19
  37. package/es/components/I18nSelect/src/i18n-select-textarea-form.vue.d.ts +0 -15
  38. package/es/components/I18nSelect/src/i18n-select-textarea-form.vue.mjs +0 -5
  39. package/es/components/I18nSelect/src/i18n-select-textarea-form.vue_vue_type_script_setup_true_name_i18n-select-input-form_lang.mjs +0 -56
  40. package/es/components/I18nSelect/src/i18n-select-textarea.vue.d.ts +0 -26
  41. package/es/components/I18nSelect/src/i18n-select-textarea.vue.mjs +0 -7
  42. package/es/components/I18nSelect/src/i18n-select-textarea.vue_vue_type_script_setup_true_name_i18n-select-input_lang.mjs +0 -86
  43. package/es/components/I18nSelect/src/i18n-select-textarea.vue_vue_type_style_index_0_scoped_cd95c416_lang.css +0 -17
  44. package/es/components/I18nSelect/src/useI18nSelect.d.ts +0 -13
  45. package/es/components/I18nSelect/src/useI18nSelect.mjs +0 -47
@@ -1,58 +0,0 @@
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
- }
@@ -1,10 +0,0 @@
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;
@@ -1,7 +0,0 @@
1
- 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";
2
- import './i18n-select-container.vue_vue_type_style_index_0_scoped_0160ed5e_lang.css';/* empty css */
3
- import _plugin_vue_export_helper_default from "../../../_virtual/_plugin-vue_export-helper.mjs";
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-0160ed5e"]]);
6
- //#endregion
7
- export { i18n_select_container_default as default };
@@ -1,217 +0,0 @@
1
- import i18n_modal_default from "./i18n-modal.vue.mjs";
2
- import { computed, createBlock, createElementVNode, createTextVNode, createVNode, defineComponent, mergeProps, onMounted, openBlock, reactive, ref, resolveComponent, toDisplayString, unref, withCtx } from "vue";
3
- import { useModal, useModalInner } from "@gct-paas/core-web";
4
- import { SearchOutlined } from "@ant-design/icons-vue";
5
- import { t } from "@gct-paas/core";
6
- //#region src/components/I18nSelect/src/i18n-select-container.vue?vue&type=script&setup=true&name=i18n-select-container&lang.ts
7
- var _hoisted_1 = { class: "i18n-select-container" };
8
- var _hoisted_2 = { class: "table-wrap" };
9
- var i18n_select_container_vue_vue_type_script_setup_true_name_i18n_select_container_lang_default = /* @__PURE__ */ defineComponent({
10
- __name: "i18n-select-container",
11
- props: {
12
- i18nModalKey: {},
13
- destroyCallback: { type: Function },
14
- saveCallback: { type: Function }
15
- },
16
- setup(__props) {
17
- const [registerInner, { closeModal }] = useModalInner();
18
- const [userRegister, { openModal }] = useModal();
19
- const props = __props;
20
- const getContainer = () => document.querySelector(`#${props.i18nModalKey}`);
21
- const formRef = ref();
22
- const formState = reactive({ keywords: "" });
23
- const pagination = reactive({
24
- current: 1,
25
- pageSize: 5,
26
- total: 0,
27
- size: "small",
28
- showTotal: (total) => t("sys.component.table.total", { total })
29
- });
30
- const tableData = ref([]);
31
- const selectRows = ref();
32
- const rowSelection = ref({
33
- type: "radio",
34
- hideSelectAll: true,
35
- selectedRowKeys: [],
36
- onChange: handleRowChange
37
- });
38
- const loading = ref(false);
39
- const columns = computed(() => {
40
- return [];
41
- });
42
- const getTableData = async (keyword, current) => {
43
- loading.value = true;
44
- const result = await _api.apaas.i18NInfo.getPageList({
45
- pageNo: current ?? pagination.current,
46
- pageSize: pagination.pageSize,
47
- searchKey: keyword
48
- });
49
- loading.value = false;
50
- if (result && result.data) {
51
- const rows = result.data.map((item) => {
52
- const infos = JSON.parse(item?.info);
53
- return {
54
- key: item.key,
55
- type: item.type,
56
- ...Object.fromEntries(infos.map((i) => [i.locale, i.info]))
57
- };
58
- });
59
- pagination.total = result.totalCount;
60
- tableData.value = rows;
61
- }
62
- };
63
- onMounted(getTableData);
64
- const handleSearch = () => {
65
- formRef.value?.validate().then(async () => {
66
- await getTableData(formState.keywords, 1);
67
- });
68
- };
69
- const handleTableChange = (paginationInfo) => {
70
- const { current, total, pageSize } = paginationInfo;
71
- pagination.current = current;
72
- pagination.total = total;
73
- pagination.pageSize = pageSize;
74
- getTableData();
75
- };
76
- const handleAddI18n = () => {
77
- openModal();
78
- };
79
- const handleModalOk = async (data, isEdit) => {
80
- const langInfos = columns.value.map((item) => {
81
- return {
82
- locale: item.dataIndex,
83
- info: data[item.dataIndex]
84
- };
85
- });
86
- loading.value = true;
87
- try {
88
- if (isEdit) await _api.apaas.i18NInfo.putKey({ key: data.id }, { info: JSON.stringify(langInfos) });
89
- else await _api.apaas.i18NInfo.post({
90
- info: JSON.stringify(langInfos),
91
- key: data.id
92
- });
93
- getTableData();
94
- handleRowChange([data.id], [reactive(data)]);
95
- } catch (error) {
96
- loading.value = false;
97
- }
98
- };
99
- function handleRowChange(selectedRowKeys, selectedRows) {
100
- rowSelection.value.selectedRowKeys = selectedRowKeys;
101
- selectRows.value = selectedRows;
102
- }
103
- const handleClose = () => {
104
- if (props.destroyCallback && typeof props.destroyCallback === "function") props.destroyCallback();
105
- };
106
- const handleOk = async () => {
107
- if (props.saveCallback && typeof props.saveCallback === "function") {
108
- const selectRowKey = rowSelection.value.selectedRowKeys;
109
- const params = {};
110
- if (selectRowKey && selectRowKey[0]) {
111
- const selectRow = selectRows.value?.[0];
112
- console.log("selectRow", selectRow);
113
- Object.assign(params, { i18nKey: selectRowKey[0] });
114
- }
115
- props.saveCallback(params);
116
- }
117
- closeModal();
118
- };
119
- return (_ctx, _cache) => {
120
- const _component_a_input = resolveComponent("a-input");
121
- const _component_a_form_item = resolveComponent("a-form-item");
122
- const _component_a_col = resolveComponent("a-col");
123
- const _component_a_button = resolveComponent("a-button");
124
- const _component_plus_outlined = resolveComponent("plus-outlined");
125
- const _component_a_row = resolveComponent("a-row");
126
- const _component_a_form = resolveComponent("a-form");
127
- const _component_a_table = resolveComponent("a-table");
128
- const _component_basic_modal = resolveComponent("basic-modal");
129
- return openBlock(), createBlock(_component_basic_modal, mergeProps(_ctx.$attrs, {
130
- "min-height": 40,
131
- title: unref(t)("sys.i18n.i18nConfig"),
132
- centered: "",
133
- width: "640px",
134
- "can-fullscreen": false,
135
- "mask-closable": false,
136
- "after-close": handleClose,
137
- "get-container": getContainer,
138
- onRegister: unref(registerInner),
139
- onOk: handleOk
140
- }), {
141
- default: withCtx(() => [createElementVNode("div", _hoisted_1, [createVNode(_component_a_form, {
142
- ref_key: "formRef",
143
- ref: formRef,
144
- model: formState,
145
- autocomplete: "off",
146
- layout: "horizontal"
147
- }, {
148
- default: withCtx(() => [createVNode(_component_a_row, null, {
149
- default: withCtx(() => [createVNode(_component_a_col, { span: 12 }, {
150
- default: withCtx(() => [createVNode(_component_a_form_item, {
151
- name: "keywords",
152
- label: unref(t)("sys.keywords")
153
- }, {
154
- default: withCtx(() => [createVNode(_component_a_input, {
155
- value: formState.keywords,
156
- "onUpdate:value": _cache[0] || (_cache[0] = ($event) => formState.keywords = $event),
157
- placeholder: unref(t)("sys.keywordsPlaceholder"),
158
- style: { "display": "inline-flex" }
159
- }, null, 8, ["value", "placeholder"])]),
160
- _: 1
161
- }, 8, ["label"])]),
162
- _: 1
163
- }), createVNode(_component_a_col, {
164
- span: 12,
165
- style: { "text-align": "right" }
166
- }, {
167
- default: withCtx(() => [createVNode(_component_a_button, {
168
- type: "primary",
169
- onClick: handleSearch
170
- }, {
171
- icon: withCtx(() => [createVNode(unref(SearchOutlined))]),
172
- default: withCtx(() => [createTextVNode(" " + toDisplayString(unref(t)("sys.queryText")), 1)]),
173
- _: 1
174
- }), createVNode(_component_a_button, {
175
- style: { "margin": "0 8px" },
176
- type: "primary",
177
- onClick: handleAddI18n
178
- }, {
179
- icon: withCtx(() => [createVNode(_component_plus_outlined)]),
180
- default: withCtx(() => [createTextVNode(" " + toDisplayString(unref(t)("sys.new")), 1)]),
181
- _: 1
182
- })]),
183
- _: 1
184
- })]),
185
- _: 1
186
- })]),
187
- _: 1
188
- }, 8, ["model"]), createElementVNode("div", _hoisted_2, [createVNode(_component_a_table, {
189
- ref: "tableRef",
190
- "data-source": tableData.value,
191
- columns: columns.value,
192
- "show-index-column": false,
193
- pagination,
194
- striped: false,
195
- bordered: true,
196
- "row-selection": rowSelection.value,
197
- loading: loading.value,
198
- onChange: handleTableChange
199
- }, null, 8, [
200
- "data-source",
201
- "columns",
202
- "pagination",
203
- "row-selection",
204
- "loading"
205
- ]), createVNode(i18n_modal_default, {
206
- lang: columns.value,
207
- "get-container": getContainer,
208
- onRegister: unref(userRegister),
209
- onOk: handleModalOk
210
- }, null, 8, ["lang", "onRegister"])])])]),
211
- _: 1
212
- }, 16, ["title", "onRegister"]);
213
- };
214
- }
215
- });
216
- //#endregion
217
- export { i18n_select_container_vue_vue_type_script_setup_true_name_i18n_select_container_lang_default as default };
@@ -1,6 +0,0 @@
1
- .i18n-select-container[data-v-0160ed5e] {
2
- padding: 4px;
3
- }
4
- [data-v-0160ed5e] .ant-form-horizontal .ant-form-item {
5
- flex-direction: row;
6
- }
@@ -1,15 +0,0 @@
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;
@@ -1,5 +0,0 @@
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 };
@@ -1,56 +0,0 @@
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 };
@@ -1,51 +0,0 @@
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
- "update:i18nText": (...args: any[]) => void;
29
- "update:i18nConfig": (...args: any[]) => void;
30
- "on-i18n-select": (...args: any[]) => void;
31
- clickOutside: (...args: any[]) => void;
32
- focus: (...args: any[]) => void;
33
- blur: (...args: any[]) => void;
34
- }, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
35
- "onUpdate:i18nText"?: ((...args: any[]) => any) | undefined;
36
- "onUpdate:i18nConfig"?: ((...args: any[]) => any) | undefined;
37
- "onOn-i18n-select"?: ((...args: any[]) => any) | undefined;
38
- onClickOutside?: ((...args: any[]) => any) | undefined;
39
- onFocus?: ((...args: any[]) => any) | undefined;
40
- onBlur?: ((...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
- };
@@ -1,7 +0,0 @@
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 };
@@ -1,125 +0,0 @@
1
- import i18n_select_btn_default from "./i18n-select-btn.vue.mjs";
2
- import { computed, createBlock, createCommentVNode, createVNode, defineComponent, mergeProps, openBlock, ref, renderSlot, resolveComponent, unref, withCtx } from "vue";
3
- import { isEmpty, omit } from "lodash-es";
4
- import { ButtonSize } from "@gct-paas/core";
5
- import { onClickOutside } from "@vueuse/core";
6
- //#region src/components/I18nSelect/src/i18n-select-input.vue?vue&type=script&setup=true&name=i18n-select-input&lang.ts
7
- var i18n_select_input_vue_vue_type_script_setup_true_name_i18n_select_input_lang_default = /* @__PURE__ */ defineComponent({
8
- __name: "i18n-select-input",
9
- props: {
10
- attr: {},
11
- inputExtraProps: {},
12
- i18nConfig: {},
13
- i18nText: {},
14
- placeholderText: {},
15
- size: {},
16
- i18nModalKey: {},
17
- forceUpdate: { type: Boolean },
18
- btnHeight: {},
19
- btnWidth: {}
20
- },
21
- emits: [
22
- "update:i18nText",
23
- "update:i18nConfig",
24
- "on-i18n-select",
25
- "clickOutside",
26
- "focus",
27
- "blur"
28
- ],
29
- setup(__props, { emit: __emit }) {
30
- const isApp = computed(() => {
31
- return !!_gct.store.appInfo.id;
32
- });
33
- const props = __props;
34
- const emit = __emit;
35
- const inputValue = computed({
36
- get() {
37
- return props.i18nText ?? "";
38
- },
39
- set(value) {
40
- if (value !== props.i18nText) emit("update:i18nText", value);
41
- }
42
- });
43
- const i18nConfigState = computed(() => {
44
- if (isEmpty(props.i18nConfig)) return {};
45
- if (typeof props.i18nConfig === "string") return JSON.parse(props.i18nConfig) ?? {};
46
- return props.i18nConfig ?? {};
47
- });
48
- const i18nValue = computed(() => {
49
- return i18nConfigState.value?.[props.attr] ?? "";
50
- });
51
- const handleSelectI18n = (params) => {
52
- console.log("emit", params);
53
- if (params) {
54
- if (isEmpty(inputValue.value) || props.forceUpdate === true) emit("update:i18nText", params.i18nTitle);
55
- emit("update:i18nConfig", JSON.stringify(isEmpty(params) ? omit(i18nConfigState.value, props.attr) : {
56
- ...i18nConfigState.value,
57
- [props.attr]: params.i18nKey
58
- }));
59
- emit("on-i18n-select", params);
60
- }
61
- };
62
- const inputRef = ref();
63
- const handleFocus = () => {
64
- emit("focus", inputRef.value);
65
- };
66
- const handleBlur = () => {
67
- emit("blur", inputRef.value);
68
- };
69
- const i18nInputGroup = ref();
70
- onClickOutside(i18nInputGroup, () => {
71
- emit("clickOutside");
72
- });
73
- return (_ctx, _cache) => {
74
- const _component_a_input = resolveComponent("a-input");
75
- const _component_a_input_group = resolveComponent("a-input-group");
76
- return openBlock(), createBlock(_component_a_input_group, {
77
- id: "i18nInputGroup",
78
- ref_key: "i18nInputGroup",
79
- ref: i18nInputGroup,
80
- compact: ""
81
- }, {
82
- default: withCtx(() => [renderSlot(_ctx.$slots, "i18n-input", {}, () => [createVNode(_component_a_input, mergeProps({
83
- ref_key: "inputRef",
84
- ref: inputRef
85
- }, __props.inputExtraProps, {
86
- value: inputValue.value,
87
- "onUpdate:value": _cache[0] || (_cache[0] = ($event) => inputValue.value = $event),
88
- valueModifiers: { trim: true },
89
- style: {
90
- height: __props.btnHeight ? __props.btnHeight : __props.size === unref(ButtonSize).SMALL ? "26px" : "32px",
91
- width: !isApp.value ? "100%" : `calc(100% - ${__props.btnWidth ? __props.btnWidth : __props.size === unref(ButtonSize).SMALL ? "26px" : "32px"}`
92
- },
93
- placeholder: __props.placeholderText,
94
- size: __props.size,
95
- "allow-clear": "",
96
- onFocus: handleFocus,
97
- onBlur: handleBlur
98
- }), null, 16, [
99
- "value",
100
- "style",
101
- "placeholder",
102
- "size"
103
- ])], true), isApp.value ? (openBlock(), createBlock(i18n_select_btn_default, {
104
- key: 0,
105
- "btn-height": __props.btnHeight,
106
- "btn-width": __props.btnWidth,
107
- "i18n-value": i18nValue.value,
108
- size: __props.size,
109
- "i18n-modal-key": __props.i18nModalKey,
110
- onOnSelectI18n: handleSelectI18n,
111
- onClosed: _cache[1] || (_cache[1] = ($event) => emit("clickOutside"))
112
- }, null, 8, [
113
- "btn-height",
114
- "btn-width",
115
- "i18n-value",
116
- "size",
117
- "i18n-modal-key"
118
- ])) : createCommentVNode("", true)]),
119
- _: 3
120
- }, 512);
121
- };
122
- }
123
- });
124
- //#endregion
125
- export { i18n_select_input_vue_vue_type_script_setup_true_name_i18n_select_input_lang_default as default };
@@ -1,3 +0,0 @@
1
- [data-v-64c5221c] .ant-form-item-has-error .ant-btn {
2
- border-color: var(--ant-error-color) !important;
3
- }
@@ -1,4 +0,0 @@
1
- declare const _default: import('vue').DefineComponent<{}, {
2
- open: () => void;
3
- }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
4
- export default _default;
@@ -1,5 +0,0 @@
1
- import i18n_select_modal_vue_vue_type_script_setup_true_lang_default from "./i18n-select-modal.vue_vue_type_script_setup_true_lang.mjs";
2
- //#region src/components/I18nSelect/src/i18n-select-modal.vue
3
- var i18n_select_modal_default = i18n_select_modal_vue_vue_type_script_setup_true_lang_default;
4
- //#endregion
5
- export { i18n_select_modal_default as default };
@@ -1,19 +0,0 @@
1
- import i18n_select_container_default from "./i18n-select-container.vue.mjs";
2
- import { createBlock, defineComponent, openBlock, unref } from "vue";
3
- import { useModal } from "@gct-paas/core-web";
4
- //#region src/components/I18nSelect/src/i18n-select-modal.vue?vue&type=script&setup=true&lang.ts
5
- var i18n_select_modal_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
6
- __name: "i18n-select-modal",
7
- setup(__props, { expose: __expose }) {
8
- const [register, { openModal }] = useModal();
9
- const open = () => {
10
- openModal();
11
- };
12
- __expose({ open });
13
- return (_ctx, _cache) => {
14
- return openBlock(), createBlock(i18n_select_container_default, { onRegister: unref(register) }, null, 8, ["onRegister"]);
15
- };
16
- }
17
- });
18
- //#endregion
19
- export { i18n_select_modal_vue_vue_type_script_setup_true_lang_default as default };
@@ -1,15 +0,0 @@
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;
@@ -1,5 +0,0 @@
1
- import i18n_select_textarea_form_vue_vue_type_script_setup_true_name_i18n_select_input_form_lang_default from "./i18n-select-textarea-form.vue_vue_type_script_setup_true_name_i18n-select-input-form_lang.mjs";
2
- //#region src/components/I18nSelect/src/i18n-select-textarea-form.vue
3
- var i18n_select_textarea_form_default = i18n_select_textarea_form_vue_vue_type_script_setup_true_name_i18n_select_input_form_lang_default;
4
- //#endregion
5
- export { i18n_select_textarea_form_default as default };