yc-agent-ui 1.2.10 → 1.2.11

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 (86) hide show
  1. package/es/components/display-item/index.d.ts +3 -3
  2. package/es/components/display-item/src/index.vue.d.ts +1 -1
  3. package/es/components/drawer-form/index.d.ts +6 -6
  4. package/es/components/drawer-form/src/index.vue.d.ts +2 -2
  5. package/es/components/form/index.d.ts +28 -28
  6. package/es/components/form/src/form-content.vue.d.ts +7 -7
  7. package/es/components/form/src/index.vue.d.ts +10 -10
  8. package/es/components/form-item/index.d.ts +31 -31
  9. package/es/components/form-item/src/index.vue.d.ts +10 -10
  10. package/es/components/page/index.d.ts +641 -641
  11. package/es/components/page/src/index.vue.d.ts +213 -213
  12. package/es/components/search/index.d.ts +190 -190
  13. package/es/components/search/src/index.vue.d.ts +64 -64
  14. package/es/components/table/src/table-column.vue.d.ts +10 -10
  15. package/es/components/virtual-table/index.d.ts +3 -3
  16. package/es/components/virtual-table/src/index.vue.d.ts +1 -1
  17. package/es/components/yc-ai-chat/src/sidebar.vue.d.ts +1 -1
  18. package/es/components/yc-date-picker/src/date-picker.vue.d.ts +1 -1
  19. package/es/components/yc-input/src/input.vue.d.ts +1 -1
  20. package/es/components/yc-input/src/money-input.vue.d.ts +1 -1
  21. package/es/components/yc-plus-page/src/index.vue.d.ts +637 -637
  22. package/es/components/yc-plus-tree/src/index.vue.d.ts +1 -1
  23. package/es/components/yc-questionnaire/src/index.vue.d.ts +1 -1
  24. package/es/hooks/usePlusFormReset.d.ts +18 -18
  25. package/es/index.css +11 -11
  26. package/es/packages/components/yc-display-cards/src/elements/input.vue.mjs +1 -1
  27. package/es/packages/components/yc-display-cards/src/elements/input2.vue.mjs +52 -46
  28. package/es/version.d.ts +1 -1
  29. package/es/version.mjs +1 -1
  30. package/index.css +1 -1
  31. package/index.js +165 -160
  32. package/index.min.css +1 -1
  33. package/index.min.js +13 -13
  34. package/index.min.mjs +16 -16
  35. package/index.mjs +165 -160
  36. package/lib/components/display-item/index.d.ts +3 -3
  37. package/lib/components/display-item/src/index.vue.d.ts +1 -1
  38. package/lib/components/drawer-form/index.d.ts +6 -6
  39. package/lib/components/drawer-form/src/index.vue.d.ts +2 -2
  40. package/lib/components/form/index.d.ts +28 -28
  41. package/lib/components/form/src/form-content.vue.d.ts +7 -7
  42. package/lib/components/form/src/index.vue.d.ts +10 -10
  43. package/lib/components/form-item/index.d.ts +31 -31
  44. package/lib/components/form-item/src/index.vue.d.ts +10 -10
  45. package/lib/components/page/index.d.ts +641 -641
  46. package/lib/components/page/src/index.vue.d.ts +213 -213
  47. package/lib/components/search/index.d.ts +190 -190
  48. package/lib/components/search/src/index.vue.d.ts +64 -64
  49. package/lib/components/table/src/table-column.vue.d.ts +10 -10
  50. package/lib/components/virtual-table/index.d.ts +3 -3
  51. package/lib/components/virtual-table/src/index.vue.d.ts +1 -1
  52. package/lib/components/yc-ai-chat/src/sidebar.vue.d.ts +1 -1
  53. package/lib/components/yc-date-picker/src/date-picker.vue.d.ts +1 -1
  54. package/lib/components/yc-input/src/input.vue.d.ts +1 -1
  55. package/lib/components/yc-input/src/money-input.vue.d.ts +1 -1
  56. package/lib/components/yc-plus-page/src/index.vue.d.ts +637 -637
  57. package/lib/components/yc-plus-tree/src/index.vue.d.ts +1 -1
  58. package/lib/components/yc-questionnaire/src/index.vue.d.ts +1 -1
  59. package/lib/hooks/usePlusFormReset.d.ts +18 -18
  60. package/lib/index.css +10 -10
  61. package/lib/packages/components/yc-display-cards/src/elements/input.vue.js +1 -1
  62. package/lib/packages/components/yc-display-cards/src/elements/input2.vue.js +51 -45
  63. package/lib/version.d.ts +1 -1
  64. package/lib/version.js +1 -1
  65. package/locale/en.js +1 -1
  66. package/locale/en.min.js +1 -1
  67. package/locale/en.min.mjs +1 -1
  68. package/locale/en.mjs +1 -1
  69. package/locale/ja.js +1 -1
  70. package/locale/ja.min.js +1 -1
  71. package/locale/ja.min.mjs +1 -1
  72. package/locale/ja.mjs +1 -1
  73. package/locale/ko.js +1 -1
  74. package/locale/ko.min.js +1 -1
  75. package/locale/ko.min.mjs +1 -1
  76. package/locale/ko.mjs +1 -1
  77. package/locale/zh-cn.js +1 -1
  78. package/locale/zh-cn.min.js +1 -1
  79. package/locale/zh-cn.min.mjs +1 -1
  80. package/locale/zh-cn.mjs +1 -1
  81. package/locale/zh-tw.js +1 -1
  82. package/locale/zh-tw.min.js +1 -1
  83. package/locale/zh-tw.min.mjs +1 -1
  84. package/locale/zh-tw.mjs +1 -1
  85. package/package.json +1 -1
  86. package/theme-chalk/index.css +1 -1
@@ -1,10 +1,8 @@
1
- import { defineComponent, computed, openBlock, createElementBlock, normalizeClass, createElementVNode, toDisplayString, Fragment, renderList } from 'vue';
1
+ import { defineComponent, computed, openBlock, createBlock, unref, normalizeClass, withCtx, createElementBlock, Fragment, renderList } from 'vue';
2
+ import { ElSelect, ElOption } from 'element-plus';
2
3
 
3
- const _hoisted_1 = ["value", "disabled"];
4
- const _hoisted_2 = { value: "" };
5
- const _hoisted_3 = ["value"];
6
- const _hoisted_4 = ["value", "disabled", "placeholder"];
7
- const _hoisted_5 = ["type", "inputmode", "step", "maxlength", "value", "disabled", "placeholder"];
4
+ const _hoisted_1 = ["value", "disabled", "placeholder"];
5
+ const _hoisted_2 = ["type", "inputmode", "step", "maxlength", "value", "disabled", "placeholder"];
8
6
  var _sfc_main = /* @__PURE__ */ defineComponent({
9
7
  ...{ name: "YcCardInput" },
10
8
  __name: "input",
@@ -75,53 +73,61 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
75
73
  }
76
74
  emit("update:modelValue", raw);
77
75
  }
78
- function handleSelect(event) {
79
- var _a, _b;
80
- const raw = (_b = (_a = event.target) == null ? void 0 : _a.value) != null ? _b : "";
81
- if (raw === "") return emit("update:modelValue", void 0);
82
- const matched = props.options.find((opt) => String(opt.value) === raw);
83
- emit("update:modelValue", matched ? matched.value : raw);
84
- }
76
+ const selectValue = computed({
77
+ get: () => {
78
+ if (props.modelValue === void 0 || props.modelValue === null || props.modelValue === "") {
79
+ return void 0;
80
+ }
81
+ const matched = props.options.find((opt) => String(opt.value) === String(props.modelValue));
82
+ return matched ? matched.value : props.modelValue;
83
+ },
84
+ set: (value) => {
85
+ emit("update:modelValue", value === "" || value === null ? void 0 : value);
86
+ }
87
+ });
85
88
  return (_ctx, _cache) => {
86
- return __props.kind === "select" ? (openBlock(), createElementBlock("select", {
89
+ return __props.kind === "select" ? (openBlock(), createBlock(unref(ElSelect), {
87
90
  key: 0,
88
- value: __props.modelValue === void 0 || __props.modelValue === null ? "" : String(__props.modelValue),
91
+ modelValue: selectValue.value,
92
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => selectValue.value = $event),
93
+ placeholder: __props.loading ? "\u52A0\u8F7D\u9009\u9879\u4E2D\u2026" : __props.placeholder || "\u8BF7\u9009\u62E9",
89
94
  disabled: __props.disabled,
90
- class: normalizeClass(["yc-input is-select", { "is-invalid": __props.invalid }]),
91
- onFocus: _cache[0] || (_cache[0] = ($event) => emit("focus")),
92
- onChange: handleSelect,
93
- onBlur: _cache[1] || (_cache[1] = ($event) => emit("blur"))
94
- }, [
95
- createElementVNode(
96
- "option",
97
- _hoisted_2,
98
- toDisplayString(__props.loading ? "\u52A0\u8F7D\u9009\u9879\u4E2D\u2026" : __props.placeholder),
99
- 1
100
- /* TEXT */
101
- ),
102
- (openBlock(true), createElementBlock(
103
- Fragment,
104
- null,
105
- renderList(__props.options, (opt) => {
106
- return openBlock(), createElementBlock("option", {
107
- key: String(opt.value),
108
- value: String(opt.value)
109
- }, toDisplayString(opt.label), 9, _hoisted_3);
110
- }),
111
- 128
112
- /* KEYED_FRAGMENT */
113
- ))
114
- ], 42, _hoisted_1)) : __props.kind === "textarea" ? (openBlock(), createElementBlock("textarea", {
95
+ loading: __props.loading,
96
+ filterable: "",
97
+ clearable: "",
98
+ "popper-class": "yc-card-select-popper",
99
+ class: normalizeClass(["yc-select-control", { "is-invalid": __props.invalid }]),
100
+ onFocus: _cache[1] || (_cache[1] = ($event) => emit("focus")),
101
+ onBlur: _cache[2] || (_cache[2] = ($event) => emit("blur"))
102
+ }, {
103
+ default: withCtx(() => [
104
+ (openBlock(true), createElementBlock(
105
+ Fragment,
106
+ null,
107
+ renderList(__props.options, (opt) => {
108
+ return openBlock(), createBlock(unref(ElOption), {
109
+ key: String(opt.value),
110
+ label: opt.label,
111
+ value: opt.value
112
+ }, null, 8, ["label", "value"]);
113
+ }),
114
+ 128
115
+ /* KEYED_FRAGMENT */
116
+ ))
117
+ ]),
118
+ _: 1
119
+ /* STABLE */
120
+ }, 8, ["modelValue", "placeholder", "disabled", "loading", "class"])) : __props.kind === "textarea" ? (openBlock(), createElementBlock("textarea", {
115
121
  key: 1,
116
122
  rows: "3",
117
123
  value: textValue.value,
118
124
  disabled: __props.disabled,
119
125
  placeholder: __props.placeholder,
120
126
  class: normalizeClass(["yc-input is-textarea", { "is-invalid": __props.invalid }]),
121
- onFocus: _cache[2] || (_cache[2] = ($event) => emit("focus")),
127
+ onFocus: _cache[3] || (_cache[3] = ($event) => emit("focus")),
122
128
  onInput: handleInput,
123
- onBlur: _cache[3] || (_cache[3] = ($event) => emit("blur"))
124
- }, null, 42, _hoisted_4)) : (openBlock(), createElementBlock("input", {
129
+ onBlur: _cache[4] || (_cache[4] = ($event) => emit("blur"))
130
+ }, null, 42, _hoisted_1)) : (openBlock(), createElementBlock("input", {
125
131
  key: 2,
126
132
  type: inputType.value,
127
133
  inputmode: inputMode.value,
@@ -131,10 +137,10 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
131
137
  disabled: __props.disabled,
132
138
  placeholder: __props.placeholder,
133
139
  class: normalizeClass(["yc-input", { "is-invalid": __props.invalid }]),
134
- onFocus: _cache[4] || (_cache[4] = ($event) => emit("focus")),
140
+ onFocus: _cache[5] || (_cache[5] = ($event) => emit("focus")),
135
141
  onInput: handleInput,
136
- onBlur: _cache[5] || (_cache[5] = ($event) => emit("blur"))
137
- }, null, 42, _hoisted_5));
142
+ onBlur: _cache[6] || (_cache[6] = ($event) => emit("blur"))
143
+ }, null, 42, _hoisted_2));
138
144
  };
139
145
  }
140
146
  });
package/es/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const version = "1.2.10";
1
+ export declare const version = "1.2.11";
package/es/version.mjs CHANGED
@@ -1,3 +1,3 @@
1
- const version = "1.2.10";
1
+ const version = "1.2.11";
2
2
 
3
3
  export { version };
package/index.css CHANGED
@@ -12,7 +12,7 @@
12
12
  .yc-action-bar[data-v-fc9f42aa]{align-items:center;border-top:1px solid #f1f5f9;display:flex;gap:10px;justify-content:flex-end;padding-top:12px}.yc-action-bar__btn[data-v-fc9f42aa]{align-items:center;border:1px solid transparent;border-radius:8px;cursor:pointer;display:inline-flex;font-family:inherit;font-size:13px;font-weight:500;justify-content:center;min-height:36px;padding:0 16px;transition:opacity .15s ease,background-color .15s ease}.yc-action-bar__btn.is-primary[data-v-fc9f42aa]{background:var(--yc-card-primary,var(--el-color-primary,#2563eb));color:#fff}.yc-action-bar__btn.is-default[data-v-fc9f42aa]{background:#fff;border-color:#cbd5e1;color:#334155}.yc-action-bar__btn[data-v-fc9f42aa]:hover:not(:disabled){opacity:.9}.yc-action-bar__btn[data-v-fc9f42aa]:disabled{cursor:not-allowed;opacity:.55}@container (max-width: 440px){.yc-action-bar[data-v-fc9f42aa]{flex-direction:row-reverse}.yc-action-bar__btn[data-v-fc9f42aa]{flex:1}}
13
13
  .yc-choice-group[data-v-1e3f5da2]{display:flex;flex-wrap:wrap;gap:8px}.yc-choice-group__item[data-v-1e3f5da2]{align-items:center;background:#fff;border:1px solid #cbd5e1;border-radius:8px;color:#334155;cursor:pointer;display:inline-flex;font-family:inherit;font-size:13px;justify-content:center;min-height:34px;padding:5px 12px;transition:all .15s ease}.yc-choice-group__item.is-selected[data-v-1e3f5da2]{background:#eff6ff;border-color:var(--yc-card-primary,var(--el-color-primary,#2563eb));color:var(--yc-card-primary,var(--el-color-primary,#2563eb));font-weight:500}.yc-choice-group__item[data-v-1e3f5da2]:disabled{cursor:not-allowed;opacity:.65}
14
14
  .yc-form-field[data-v-354eb9c0]{display:flex;flex-direction:column;gap:6px;min-width:0}.yc-form-field.is-full-row[data-v-354eb9c0]{grid-column:1/-1}.yc-form-field__label[data-v-354eb9c0]{color:#334155;font-size:13px;font-weight:500;line-height:18px}.yc-form-field__required[data-v-354eb9c0]{color:#dc2626;margin-right:3px}.yc-form-field__hint[data-v-354eb9c0]{background:#fef3c7;border-radius:999px;color:#b45309;display:inline-block;font-size:11px;font-weight:500;margin-left:6px;padding:1px 6px;vertical-align:middle}.yc-form-field__error[data-v-354eb9c0]{color:#dc2626;font-size:12px;line-height:1.35}
15
- .yc-input[data-v-730a2f3c]{background:#fff;border:1px solid #cbd5e1;border-radius:8px;box-sizing:border-box;color:#0f172a;font-family:inherit;font-size:14px;height:36px;line-height:1.45;min-width:0;outline:none;padding:6px 10px;transition:border-color .15s ease,box-shadow .15s ease;width:100%}.yc-input.is-textarea[data-v-730a2f3c]{height:auto;min-height:76px;padding:8px 10px;resize:vertical}.yc-input[data-v-730a2f3c]::-moz-placeholder{color:#94a3b8}.yc-input[data-v-730a2f3c]::placeholder{color:#94a3b8}.yc-input[data-v-730a2f3c]:focus{border-color:var(--yc-card-primary,var(--el-color-primary,#2563eb));box-shadow:0 0 0 2px rgba(37,99,235,.12)}.yc-input[data-v-730a2f3c]:disabled{background:#f8fafc;color:#64748b;cursor:not-allowed}.yc-input.is-invalid[data-v-730a2f3c]{border-color:#dc2626;box-shadow:0 0 0 2px rgba(220,38,38,.12)}@media (hover:none) and (pointer:coarse){.yc-input[data-v-730a2f3c]{font-size:16px;height:40px}.yc-input.is-textarea[data-v-730a2f3c]{height:auto}}
15
+ .yc-input[data-v-cec52b7f]{background:#fff;border:1px solid #cbd5e1;border-radius:8px;box-sizing:border-box;color:#0f172a;font-family:inherit;font-size:14px;height:36px;line-height:1.45;min-width:0;outline:none;padding:6px 10px;transition:border-color .15s ease,box-shadow .15s ease;width:100%}.yc-input.is-textarea[data-v-cec52b7f]{height:auto;min-height:76px;padding:8px 10px;resize:vertical}.yc-input[data-v-cec52b7f]::-moz-placeholder{color:#94a3b8}.yc-input[data-v-cec52b7f]::placeholder{color:#94a3b8}.yc-input[data-v-cec52b7f]:focus{border-color:var(--yc-card-primary,var(--el-color-primary,#2563eb));box-shadow:0 0 0 2px rgba(37,99,235,.12)}.yc-input[data-v-cec52b7f]:disabled{background:#f8fafc;color:#64748b;cursor:not-allowed}.yc-input.is-invalid[data-v-cec52b7f]{border-color:#dc2626;box-shadow:0 0 0 2px rgba(220,38,38,.12)}.yc-select-control{&[data-v-cec52b7f]{min-width:0;width:100%}[data-v-cec52b7f] .el-select__wrapper{background:#fff;border-radius:8px;box-shadow:inset 0 0 0 1px #cbd5e1;font-size:14px;min-height:36px;padding:4px 10px;transition:box-shadow .15s ease,background-color .15s ease;&:hover{box-shadow:inset 0 0 0 1px #94a3b8}&.is-focused{box-shadow:0 0 0 1px var(--yc-card-primary,var(--el-color-primary,#2563eb)) inset,0 0 0 3px rgba(37,99,235,.12)}&.is-disabled{background:#f8fafc;box-shadow:inset 0 0 0 1px #e2e8f0}}&.is-invalid[data-v-cec52b7f] .el-select__wrapper{box-shadow:inset 0 0 0 1px #dc2626,0 0 0 2px rgba(220,38,38,.12)}}@media (hover:none) and (pointer:coarse){.yc-input[data-v-cec52b7f]{font-size:16px;height:40px}.yc-input.is-textarea[data-v-cec52b7f]{height:auto}.yc-select-control[data-v-cec52b7f] .el-select__wrapper{font-size:16px;min-height:40px}}
16
16
  .yc-switch[data-v-6e7c3747]{align-items:center;background:#cbd5e1;border:none;border-radius:999px;cursor:pointer;display:inline-flex;height:24px;padding:2px;position:relative;transition:background-color .2s ease;width:44px}.yc-switch.is-checked[data-v-6e7c3747]{background:var(--yc-card-primary,var(--el-color-primary,#2563eb))}.yc-switch[data-v-6e7c3747]:disabled{cursor:not-allowed;opacity:.6}.yc-switch__thumb[data-v-6e7c3747]{background:#fff;border-radius:50%;box-shadow:0 1px 2px rgba(15,23,42,.2);height:20px;transition:transform .2s ease;width:20px}.yc-switch.is-checked .yc-switch__thumb[data-v-6e7c3747]{transform:translateX(20px)}
17
17
  .yc-upload__input[data-v-245cdbcd]{display:none}.yc-upload__list[data-v-245cdbcd]{align-items:center;display:flex;flex-wrap:wrap;gap:10px}.yc-upload__thumb[data-v-245cdbcd]{background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px;height:72px;overflow:hidden;position:relative;width:72px}.yc-upload__thumb img[data-v-245cdbcd]{display:block;height:100%;-o-object-fit:cover;object-fit:cover;width:100%}.yc-upload__thumb-remove[data-v-245cdbcd]{background:rgba(15,23,42,.68);border:none;border-radius:50%;color:#fff;cursor:pointer;font-size:13px;height:20px;line-height:20px;padding:0;position:absolute;right:2px;text-align:center;top:2px;width:20px}.yc-upload__chip[data-v-245cdbcd]{align-items:center;background:#f8fafc;border:1px solid #e2e8f0;border-radius:6px;color:#334155;display:inline-flex;font-size:12px;gap:6px;max-width:100%;padding:6px 10px}.yc-upload__name[data-v-245cdbcd]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.yc-upload__chip-remove[data-v-245cdbcd]{background:transparent;border:none;color:#64748b;cursor:pointer;font-size:14px;line-height:1;padding:0 4px}.yc-upload__trigger[data-v-245cdbcd]{align-items:center;background:#fff;border:1px dashed #cbd5e1;border-radius:8px;color:#475569;cursor:pointer;display:inline-flex;font-size:12px;justify-content:center;min-height:36px;padding:7px 14px;transition:border-color .2s,color .2s}.yc-upload__trigger.is-image[data-v-245cdbcd]{height:72px;padding:0 6px;text-align:center;width:72px}.yc-upload__trigger[data-v-245cdbcd]:hover:not(:disabled){border-color:var(--yc-card-primary,var(--el-color-primary,#2563eb));color:var(--yc-card-primary,var(--el-color-primary,#2563eb))}.yc-upload__trigger[data-v-245cdbcd]:disabled{cursor:wait;opacity:.7}@media (hover:none) and (pointer:coarse){.yc-upload__thumb-remove[data-v-245cdbcd]{height:24px;line-height:24px;width:24px}}
18
18
  .yc-inline-alert[data-v-2c7c2c97]{border-radius:8px;font-size:13px;line-height:1.45;padding:9px 12px;white-space:pre-line;word-break:break-word}.yc-inline-alert.is-error[data-v-2c7c2c97]{background:#fef2f2;border:1px solid #fecaca;color:#b91c1c}.yc-inline-alert.is-success[data-v-2c7c2c97]{background:#f0fdf4;border:1px solid #bbf7d0;color:#15803d}.yc-inline-alert.is-warning[data-v-2c7c2c97]{background:#fffbeb;border:1px solid #fde68a;color:#b45309}.yc-inline-alert.is-info[data-v-2c7c2c97]{background:#f8fafc;border:1px solid #e2e8f0;color:#475569}