@gct-paas/design-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.
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 +17 -8
  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 -46
@@ -1,56 +0,0 @@
1
- import i18n_select_textarea_default from "./i18n-select-textarea.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-textarea-form.vue?vue&type=script&setup=true&name=i18n-select-input-form&lang.ts
4
- var i18n_select_textarea_form_vue_vue_type_script_setup_true_name_i18n_select_input_form_lang_default = /* @__PURE__ */ defineComponent({
5
- __name: "i18n-select-textarea-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_textarea_default, mergeProps(_ctx.$attrs, {
31
- "i18n-text": i18nText.value,
32
- "onUpdate:i18nText": _cache[0] || (_cache[0] = ($event) => i18nText.value = $event),
33
- "placeholder-text": _ctx.$t("sys.inputText"),
34
- "input-extra-props": __props.inputExtraProps,
35
- "i18n-config": __props.i18nConfig,
36
- attr: Array.isArray(__props.formItemName) ? __props.formItemName.join(".") : __props.formItemName
37
- }), null, 16, [
38
- "i18n-text",
39
- "placeholder-text",
40
- "input-extra-props",
41
- "i18n-config",
42
- "attr"
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_textarea_form_vue_vue_type_script_setup_true_name_i18n_select_input_form_lang_default as default };
@@ -1,26 +0,0 @@
1
- import { InputProps, TextAreaProps } from 'ant-design-vue';
2
- interface Props {
3
- attr: string;
4
- inputExtraProps?: InputProps | TextAreaProps;
5
- i18nConfig?: string | Record<string, string>;
6
- i18nText?: string;
7
- placeholderText?: string;
8
- rows?: number;
9
- style?: object;
10
- }
11
- declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
12
- "update:i18nText": (...args: any[]) => void;
13
- "update:i18nConfig": (...args: any[]) => void;
14
- "on-i18n-select": (...args: any[]) => void;
15
- clickOutside: (...args: any[]) => void;
16
- focus: (...args: any[]) => void;
17
- }, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
18
- "onUpdate:i18nText"?: ((...args: any[]) => any) | undefined;
19
- "onUpdate:i18nConfig"?: ((...args: any[]) => any) | undefined;
20
- "onOn-i18n-select"?: ((...args: any[]) => any) | undefined;
21
- onClickOutside?: ((...args: any[]) => any) | undefined;
22
- onFocus?: ((...args: any[]) => any) | undefined;
23
- }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
24
- inputRef: unknown;
25
- }, HTMLDivElement>;
26
- export default _default;
@@ -1,7 +0,0 @@
1
- import _plugin_vue_export_helper_default from "../../../_virtual/_plugin-vue_export-helper.mjs";
2
- import i18n_select_textarea_vue_vue_type_script_setup_true_name_i18n_select_input_lang_default from "./i18n-select-textarea.vue_vue_type_script_setup_true_name_i18n-select-input_lang.mjs";
3
- import './i18n-select-textarea.vue_vue_type_style_index_0_scoped_cd95c416_lang.css';/* empty css */
4
- //#region src/components/I18nSelect/src/i18n-select-textarea.vue
5
- var i18n_select_textarea_default = /* @__PURE__ */ _plugin_vue_export_helper_default(i18n_select_textarea_vue_vue_type_script_setup_true_name_i18n_select_input_lang_default, [["__scopeId", "data-v-cd95c416"]]);
6
- //#endregion
7
- export { i18n_select_textarea_default as default };
@@ -1,86 +0,0 @@
1
- import i18n_select_btn_default from "./i18n-select-btn.vue.mjs";
2
- import { computed, createElementBlock, createVNode, defineComponent, mergeProps, openBlock, ref, resolveComponent } from "vue";
3
- import { isEmpty, omit } from "lodash-es";
4
- //#region src/components/I18nSelect/src/i18n-select-textarea.vue?vue&type=script&setup=true&name=i18n-select-input&lang.ts
5
- var _hoisted_1 = { class: "inline-block w100% relative" };
6
- var i18n_select_textarea_vue_vue_type_script_setup_true_name_i18n_select_input_lang_default = /* @__PURE__ */ defineComponent({
7
- __name: "i18n-select-textarea",
8
- props: {
9
- attr: {},
10
- inputExtraProps: {},
11
- i18nConfig: {},
12
- i18nText: {},
13
- placeholderText: {},
14
- rows: {},
15
- style: {}
16
- },
17
- emits: [
18
- "update:i18nText",
19
- "update:i18nConfig",
20
- "on-i18n-select",
21
- "clickOutside",
22
- "focus"
23
- ],
24
- setup(__props, { emit: __emit }) {
25
- const props = __props;
26
- const emit = __emit;
27
- const inputValue = computed({
28
- get() {
29
- return props.i18nText ?? "";
30
- },
31
- set(value) {
32
- emit("update:i18nText", value);
33
- }
34
- });
35
- const i18nConfigState = computed(() => {
36
- if (isEmpty(props.i18nConfig)) return {};
37
- if (typeof props.i18nConfig === "string") return JSON.parse(props.i18nConfig) ?? {};
38
- return props.i18nConfig ?? {};
39
- });
40
- const i18nValue = computed(() => {
41
- return i18nConfigState.value?.[props.attr];
42
- });
43
- const handleSelectI18n = (params) => {
44
- if (params) {
45
- if (isEmpty(inputValue.value)) emit("update:i18nText", params.i18nTitle);
46
- emit("update:i18nConfig", JSON.stringify(isEmpty(params) ? omit(i18nConfigState.value, props.attr) : {
47
- ...i18nConfigState.value,
48
- [props.attr]: params.i18nKey
49
- }));
50
- emit("on-i18n-select", params);
51
- }
52
- };
53
- const inputRef = ref();
54
- const handleFocus = () => {
55
- emit("focus", inputRef.value);
56
- };
57
- return (_ctx, _cache) => {
58
- const _component_a_textarea = resolveComponent("a-textarea");
59
- return openBlock(), createElementBlock("div", _hoisted_1, [createVNode(_component_a_textarea, mergeProps({
60
- ref_key: "inputRef",
61
- ref: inputRef,
62
- value: inputValue.value,
63
- "onUpdate:value": _cache[0] || (_cache[0] = ($event) => inputValue.value = $event),
64
- placeholder: __props.placeholderText
65
- }, __props.inputExtraProps, {
66
- style: {
67
- resize: "none",
68
- ...__props.style
69
- },
70
- onFocus: handleFocus
71
- }), null, 16, [
72
- "value",
73
- "placeholder",
74
- "style"
75
- ]), createVNode(i18n_select_btn_default, {
76
- "i18n-value": i18nValue.value,
77
- "simple-btn": true,
78
- type: "text",
79
- onOnSelectI18n: handleSelectI18n,
80
- onClosed: _cache[1] || (_cache[1] = ($event) => emit("clickOutside"))
81
- }, null, 8, ["i18n-value"])]);
82
- };
83
- }
84
- });
85
- //#endregion
86
- export { i18n_select_textarea_vue_vue_type_script_setup_true_name_i18n_select_input_lang_default as default };
@@ -1,17 +0,0 @@
1
- [data-v-cd95c416] .i18n-icon {
2
- position: absolute;
3
- right: 16px;
4
- bottom: 12px;
5
- color: #212528;
6
- font-size: 16px;
7
- cursor: pointer;
8
- }
9
- [data-v-cd95c416]
10
- div.ant-input-textarea.ant-input-textarea-show-count.ant-input-textarea-show-count::after
11
- {
12
- right: 33px;
13
- }
14
- [data-v-cd95c416] .ant-input {
15
- border: 2px dashed #dbdbdb;
16
- background: transparent;
17
- }
@@ -1,13 +0,0 @@
1
- export interface I18nSelectProps {
2
- i18nModalKey?: string;
3
- saveCallback?: (params: IObject) => void;
4
- destroyCallback?: (params: IObject) => void;
5
- }
6
- export interface IUseI18nSelectOptions {
7
- target?: HTMLElement;
8
- props?: Partial<I18nSelectProps>;
9
- }
10
- export declare function useI18nSelect(): {
11
- open: (params: Partial<I18nSelectProps> | Partial<IUseI18nSelectOptions>) => void;
12
- close: (callback: unknown) => void;
13
- };
@@ -1,46 +0,0 @@
1
- import i18n_select_modal_default from "./i18n-select-modal.vue.mjs";
2
- import { createApp, ref, unref } from "vue";
3
- import { has } from "lodash-es";
4
- //#region src/components/I18nSelect/src/useI18nSelect.ts
5
- function useI18nSelect() {
6
- let app = null;
7
- let instance = null;
8
- const i18nModalKey = ref("");
9
- function open(params) {
10
- let props;
11
- let target = document.body;
12
- if (has(params, "target") || has(params, "props")) {
13
- const options = params;
14
- props = options.props || {};
15
- target = options.target || document.body;
16
- } else props = params;
17
- i18nModalKey.value = props.i18nModalKey || `i18n-select-modal-${Math.random().toString(16).substring(8)}`;
18
- const propsData = {
19
- ...props,
20
- destroyCallback: () => close(props?.destroyCallback),
21
- i18nModalKey: unref(i18nModalKey)
22
- };
23
- if (!app) {
24
- const container = document.createElement("div");
25
- container.id = unref(i18nModalKey);
26
- unref(target)?.appendChild(container);
27
- app = createApp(i18n_select_modal_default, propsData);
28
- instance = app.mount(container);
29
- }
30
- instance?.open();
31
- }
32
- function close(callback) {
33
- if (typeof callback === "function") callback();
34
- document.querySelector(`#${unref(i18nModalKey)}`).remove();
35
- if (app) {
36
- app.unmount();
37
- app = null;
38
- }
39
- }
40
- return {
41
- open,
42
- close
43
- };
44
- }
45
- //#endregion
46
- export { useI18nSelect };