yc-agent-ui 1.2.7 → 1.2.8
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/es/_virtual/_commonjsHelpers.mjs +7 -0
- package/es/_virtual/toastify.mjs +3 -0
- package/es/components/chart/src/chart-card.vue.d.ts +21 -21
- package/es/components/chart/src/chart-container.vue.d.ts +2 -2
- package/es/components/chart/src/metric-card.vue.d.ts +1 -1
- package/es/components/data-table/src/data-table.vue.d.ts +8 -8
- package/es/components/descriptions/index.d.ts +9 -9
- package/es/components/descriptions/src/index.vue.d.ts +3 -3
- package/es/components/dialog/index.d.ts +6 -6
- package/es/components/dialog/src/index.vue.d.ts +2 -2
- package/es/components/dialog-form/index.d.ts +10 -10
- package/es/components/dialog-form/src/index.vue.d.ts +6 -6
- package/es/components/display-item/index.d.ts +12 -12
- package/es/components/display-item/src/index.vue.d.ts +12 -12
- package/es/components/drawer-form/index.d.ts +19 -19
- package/es/components/drawer-form/src/index.vue.d.ts +9 -9
- package/es/components/form/index.d.ts +17 -17
- package/es/components/form/src/form-content.vue.d.ts +11 -11
- package/es/components/form/src/index.vue.d.ts +11 -11
- package/es/components/form-item/index.d.ts +25 -25
- package/es/components/form-item/src/index.vue.d.ts +12 -12
- package/es/components/input-tag/index.d.ts +3 -3
- package/es/components/input-tag/src/index.vue.d.ts +3 -3
- package/es/components/page/index.d.ts +494 -494
- package/es/components/page/src/index.vue.d.ts +167 -167
- package/es/components/pagination/index.d.ts +3 -3
- package/es/components/pagination/src/index.vue.d.ts +1 -1
- package/es/components/radio/index.d.ts +5 -5
- package/es/components/radio/src/index.vue.d.ts +5 -5
- package/es/components/render/index.d.ts +1 -1
- package/es/components/render/src/index.vue.d.ts +1 -1
- package/es/components/search/index.d.ts +130 -130
- package/es/components/search/src/index.vue.d.ts +46 -46
- package/es/components/table/src/table-action-bar.vue.d.ts +2 -2
- package/es/components/table/src/table-column.vue.d.ts +24 -24
- package/es/components/utils/index.d.ts +3 -3
- package/es/components/virtual-table/index.d.ts +3 -3
- package/es/components/virtual-table/src/index.vue.d.ts +1 -1
- package/es/components/yc-ai-chat/src/bubble.vue.d.ts +1 -1
- package/es/components/yc-ai-chat/src/mobile-frame.vue.d.ts +1 -1
- package/es/components/yc-ai-chat/src/select.vue.d.ts +5 -5
- package/es/components/yc-ai-chat/src/sender.vue.d.ts +1 -1
- package/es/components/yc-ai-chat/src/sidebar.vue.d.ts +2 -2
- package/es/components/yc-ai-chat/src/studio.vue.d.ts +1 -1
- package/es/components/yc-controls/src/choice-cards.vue.d.ts +2 -2
- package/es/components/yc-controls/src/segmented.vue.d.ts +1 -1
- package/es/components/yc-coss-table/src/coss-table.vue.d.ts +3 -3
- package/es/components/yc-coss-table/src/table-head.vue.d.ts +2 -2
- package/es/components/yc-display-cards/index.d.ts +4 -3
- package/es/components/yc-display-cards/src/form-card.vue.d.ts +3 -2
- package/es/components/yc-display-cards/src/table-card.vue.d.ts +1 -1
- package/es/components/yc-display-cards/src/toast.d.ts +4 -0
- package/es/components/yc-display-cards/src/types.d.ts +21 -0
- package/es/components/yc-gradient-card/src/index.vue.d.ts +2 -2
- package/es/components/yc-input/src/input.vue.d.ts +4 -4
- package/es/components/yc-input/src/money-input.vue.d.ts +3 -3
- package/es/components/yc-input/src/stepper-input.vue.d.ts +3 -3
- package/es/components/yc-input/src/textarea.vue.d.ts +1 -1
- package/es/components/yc-input-otp/src/index.vue.d.ts +3 -3
- package/es/components/yc-pagination/src/index.vue.d.ts +2 -2
- package/es/components/yc-plus-page/src/index.vue.d.ts +504 -504
- package/es/components/yc-plus-tree/src/index.vue.d.ts +1 -1
- package/es/components/yc-property-table/src/asset-table.vue.d.ts +2 -2
- package/es/components/yc-property-table/src/bill-table.vue.d.ts +2 -2
- package/es/components/yc-property-table/src/device-table.vue.d.ts +2 -2
- package/es/components/yc-property-table/src/order-table.vue.d.ts +2 -2
- package/es/components/yc-property-table/src/property-table.vue.d.ts +6 -6
- package/es/components/yc-select-v2/src/index.vue.d.ts +4 -4
- package/es/components/yc-status-dialog/src/index.vue.d.ts +1 -1
- package/es/components/yc-svg-icon/src/index.vue.d.ts +1 -1
- package/es/hooks/usePlusFormReset.d.ts +168 -168
- package/es/index.css +15 -8
- package/es/node_modules/.pnpm/toastify-js@1.12.0/node_modules/toastify-js/src/toastify.mjs +456 -0
- package/es/packages/components/yc-display-cards/src/form-card.vue.mjs +1 -1
- package/es/packages/components/yc-display-cards/src/form-card2.vue.mjs +449 -90
- package/es/packages/components/yc-display-cards/src/toast.mjs +35 -0
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/index.css +8 -1
- package/index.js +937 -93
- package/index.min.css +8 -1
- package/index.min.js +40 -34
- package/index.min.mjs +40 -34
- package/index.mjs +937 -93
- package/lib/_virtual/_commonjsHelpers.js +10 -0
- package/lib/_virtual/toastify.js +5 -0
- package/lib/components/chart/src/chart-card.vue.d.ts +21 -21
- package/lib/components/chart/src/chart-container.vue.d.ts +2 -2
- package/lib/components/chart/src/metric-card.vue.d.ts +1 -1
- package/lib/components/data-table/src/data-table.vue.d.ts +8 -8
- package/lib/components/descriptions/index.d.ts +9 -9
- package/lib/components/descriptions/src/index.vue.d.ts +3 -3
- package/lib/components/dialog/index.d.ts +6 -6
- package/lib/components/dialog/src/index.vue.d.ts +2 -2
- package/lib/components/dialog-form/index.d.ts +10 -10
- package/lib/components/dialog-form/src/index.vue.d.ts +6 -6
- package/lib/components/display-item/index.d.ts +12 -12
- package/lib/components/display-item/src/index.vue.d.ts +12 -12
- package/lib/components/drawer-form/index.d.ts +19 -19
- package/lib/components/drawer-form/src/index.vue.d.ts +9 -9
- package/lib/components/form/index.d.ts +17 -17
- package/lib/components/form/src/form-content.vue.d.ts +11 -11
- package/lib/components/form/src/index.vue.d.ts +11 -11
- package/lib/components/form-item/index.d.ts +25 -25
- package/lib/components/form-item/src/index.vue.d.ts +12 -12
- package/lib/components/input-tag/index.d.ts +3 -3
- package/lib/components/input-tag/src/index.vue.d.ts +3 -3
- package/lib/components/page/index.d.ts +494 -494
- package/lib/components/page/src/index.vue.d.ts +167 -167
- package/lib/components/pagination/index.d.ts +3 -3
- package/lib/components/pagination/src/index.vue.d.ts +1 -1
- package/lib/components/radio/index.d.ts +5 -5
- package/lib/components/radio/src/index.vue.d.ts +5 -5
- package/lib/components/render/index.d.ts +1 -1
- package/lib/components/render/src/index.vue.d.ts +1 -1
- package/lib/components/search/index.d.ts +130 -130
- package/lib/components/search/src/index.vue.d.ts +46 -46
- package/lib/components/table/src/table-action-bar.vue.d.ts +2 -2
- package/lib/components/table/src/table-column.vue.d.ts +24 -24
- package/lib/components/utils/index.d.ts +3 -3
- package/lib/components/virtual-table/index.d.ts +3 -3
- package/lib/components/virtual-table/src/index.vue.d.ts +1 -1
- package/lib/components/yc-ai-chat/src/bubble.vue.d.ts +1 -1
- package/lib/components/yc-ai-chat/src/mobile-frame.vue.d.ts +1 -1
- package/lib/components/yc-ai-chat/src/select.vue.d.ts +5 -5
- package/lib/components/yc-ai-chat/src/sender.vue.d.ts +1 -1
- package/lib/components/yc-ai-chat/src/sidebar.vue.d.ts +2 -2
- package/lib/components/yc-ai-chat/src/studio.vue.d.ts +1 -1
- package/lib/components/yc-controls/src/choice-cards.vue.d.ts +2 -2
- package/lib/components/yc-controls/src/segmented.vue.d.ts +1 -1
- package/lib/components/yc-coss-table/src/coss-table.vue.d.ts +3 -3
- package/lib/components/yc-coss-table/src/table-head.vue.d.ts +2 -2
- package/lib/components/yc-display-cards/index.d.ts +4 -3
- package/lib/components/yc-display-cards/src/form-card.vue.d.ts +3 -2
- package/lib/components/yc-display-cards/src/table-card.vue.d.ts +1 -1
- package/lib/components/yc-display-cards/src/toast.d.ts +4 -0
- package/lib/components/yc-display-cards/src/types.d.ts +21 -0
- package/lib/components/yc-gradient-card/src/index.vue.d.ts +2 -2
- package/lib/components/yc-input/src/input.vue.d.ts +4 -4
- package/lib/components/yc-input/src/money-input.vue.d.ts +3 -3
- package/lib/components/yc-input/src/stepper-input.vue.d.ts +3 -3
- package/lib/components/yc-input/src/textarea.vue.d.ts +1 -1
- package/lib/components/yc-input-otp/src/index.vue.d.ts +3 -3
- package/lib/components/yc-pagination/src/index.vue.d.ts +2 -2
- package/lib/components/yc-plus-page/src/index.vue.d.ts +504 -504
- package/lib/components/yc-plus-tree/src/index.vue.d.ts +1 -1
- package/lib/components/yc-property-table/src/asset-table.vue.d.ts +2 -2
- package/lib/components/yc-property-table/src/bill-table.vue.d.ts +2 -2
- package/lib/components/yc-property-table/src/device-table.vue.d.ts +2 -2
- package/lib/components/yc-property-table/src/order-table.vue.d.ts +2 -2
- package/lib/components/yc-property-table/src/property-table.vue.d.ts +6 -6
- package/lib/components/yc-select-v2/src/index.vue.d.ts +4 -4
- package/lib/components/yc-status-dialog/src/index.vue.d.ts +1 -1
- package/lib/components/yc-svg-icon/src/index.vue.d.ts +1 -1
- package/lib/hooks/usePlusFormReset.d.ts +168 -168
- package/lib/index.css +17 -10
- package/lib/node_modules/.pnpm/toastify-js@1.12.0/node_modules/toastify-js/src/toastify.js +460 -0
- package/lib/packages/components/yc-display-cards/src/form-card.vue.js +1 -1
- package/lib/packages/components/yc-display-cards/src/form-card2.vue.js +449 -90
- package/lib/packages/components/yc-display-cards/src/toast.js +37 -0
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/locale/en.js +1 -1
- package/locale/en.min.js +1 -1
- package/locale/en.min.mjs +1 -1
- package/locale/en.mjs +1 -1
- package/locale/ja.js +1 -1
- package/locale/ja.min.js +1 -1
- package/locale/ja.min.mjs +1 -1
- package/locale/ja.mjs +1 -1
- package/locale/ko.js +1 -1
- package/locale/ko.min.js +1 -1
- package/locale/ko.min.mjs +1 -1
- package/locale/ko.mjs +1 -1
- package/locale/zh-cn.js +1 -1
- package/locale/zh-cn.min.js +1 -1
- package/locale/zh-cn.min.mjs +1 -1
- package/locale/zh-cn.mjs +1 -1
- package/locale/zh-tw.js +1 -1
- package/locale/zh-tw.min.js +1 -1
- package/locale/zh-tw.min.mjs +1 -1
- package/locale/zh-tw.mjs +1 -1
- package/package.json +2 -1
- package/theme-chalk/index.css +8 -1
package/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! yc-agent-ui v1.2.
|
|
1
|
+
/*! yc-agent-ui v1.2.8 */
|
|
2
2
|
import { defineComponent, ref, shallowRef, computed, watch, onMounted, onBeforeUnmount, openBlock, createElementBlock, normalizeStyle, createElementVNode, createCommentVNode, renderSlot, toDisplayString, markRaw, resolveComponent, normalizeClass, createBlock, withCtx, createTextVNode, createVNode, createSlots, Fragment, resolveDynamicComponent, renderList, mergeProps, withDirectives, vModelText, resolveDirective, withModifiers, watchEffect, unref, isRef, reactive, useAttrs, normalizeProps, guardReactiveProps, nextTick, inject, isReactive, provide, h as h$1, isVNode, withKeys, TransitionGroup, toHandlers, getCurrentInstance, toRefs, toRef, Transition, useSlots, toValue, onUpdated, triggerRef, Comment, cloneVNode, onUnmounted, createStaticVNode, Teleport, vShow, useCssVars } from 'vue';
|
|
3
3
|
import * as echarts from 'echarts';
|
|
4
4
|
import { ElMessage, ElPagination, dayjs as dayjs$1, ElRadioGroup, ElRadio, localeContextKey, ElTableColumn, ElDropdown, ElIcon, ElDropdownMenu, ElDropdownItem, ElTooltip, ElPopconfirm, ElButton, ElLink, ElMessageBox, useFormDisabled, ElDatePicker, ClickOutside, ElTag, ElInput, ElSelectV2, ElTreeSelect, ElTransfer, ElTimeSelect, ElTimePicker, ElSwitch, ElSlider, ElOption, ElSelect, ElRate, ElInputNumber, ElColorPicker, ElCheckbox, ElCheckboxGroup, ElCascader, ElAutocomplete, ElFormItem, ElOptionGroup, ElText, ElDivider, ElRow, ElCol, ElForm, ElCard, ElAvatar, ElProgress, ElImage, ElPopover, ElTable, vLoading, TableV2FixedDir, ElAutoResizer, ElTableV2, ElDescriptions, ElDescriptionsItem, ElDialog, ElDrawer, ElEmpty } from 'element-plus';
|
|
@@ -21322,6 +21322,492 @@ var _sfc_main$Z = /* @__PURE__ */ defineComponent({
|
|
|
21322
21322
|
|
|
21323
21323
|
var DetailCard = /* @__PURE__ */ _export_sfc$1(_sfc_main$Z, [["__scopeId", "data-v-d75e2d96"]]);
|
|
21324
21324
|
|
|
21325
|
+
var toastify = {exports: {}};
|
|
21326
|
+
|
|
21327
|
+
/*!
|
|
21328
|
+
* Toastify js 1.12.0
|
|
21329
|
+
* https://github.com/apvarun/toastify-js
|
|
21330
|
+
* @license MIT licensed
|
|
21331
|
+
*
|
|
21332
|
+
* Copyright (C) 2018 Varun A P
|
|
21333
|
+
*/
|
|
21334
|
+
|
|
21335
|
+
(function (module) {
|
|
21336
|
+
(function(root, factory) {
|
|
21337
|
+
if (module.exports) {
|
|
21338
|
+
module.exports = factory();
|
|
21339
|
+
} else {
|
|
21340
|
+
root.Toastify = factory();
|
|
21341
|
+
}
|
|
21342
|
+
})(commonjsGlobal, function(global) {
|
|
21343
|
+
// Object initialization
|
|
21344
|
+
var Toastify = function(options) {
|
|
21345
|
+
// Returning a new init object
|
|
21346
|
+
return new Toastify.lib.init(options);
|
|
21347
|
+
},
|
|
21348
|
+
// Library version
|
|
21349
|
+
version = "1.12.0";
|
|
21350
|
+
|
|
21351
|
+
// Set the default global options
|
|
21352
|
+
Toastify.defaults = {
|
|
21353
|
+
oldestFirst: true,
|
|
21354
|
+
text: "Toastify is awesome!",
|
|
21355
|
+
node: undefined,
|
|
21356
|
+
duration: 3000,
|
|
21357
|
+
selector: undefined,
|
|
21358
|
+
callback: function () {
|
|
21359
|
+
},
|
|
21360
|
+
destination: undefined,
|
|
21361
|
+
newWindow: false,
|
|
21362
|
+
close: false,
|
|
21363
|
+
gravity: "toastify-top",
|
|
21364
|
+
positionLeft: false,
|
|
21365
|
+
position: '',
|
|
21366
|
+
backgroundColor: '',
|
|
21367
|
+
avatar: "",
|
|
21368
|
+
className: "",
|
|
21369
|
+
stopOnFocus: true,
|
|
21370
|
+
onClick: function () {
|
|
21371
|
+
},
|
|
21372
|
+
offset: {x: 0, y: 0},
|
|
21373
|
+
escapeMarkup: true,
|
|
21374
|
+
ariaLive: 'polite',
|
|
21375
|
+
style: {background: ''}
|
|
21376
|
+
};
|
|
21377
|
+
|
|
21378
|
+
// Defining the prototype of the object
|
|
21379
|
+
Toastify.lib = Toastify.prototype = {
|
|
21380
|
+
toastify: version,
|
|
21381
|
+
|
|
21382
|
+
constructor: Toastify,
|
|
21383
|
+
|
|
21384
|
+
// Initializing the object with required parameters
|
|
21385
|
+
init: function(options) {
|
|
21386
|
+
// Verifying and validating the input object
|
|
21387
|
+
if (!options) {
|
|
21388
|
+
options = {};
|
|
21389
|
+
}
|
|
21390
|
+
|
|
21391
|
+
// Creating the options object
|
|
21392
|
+
this.options = {};
|
|
21393
|
+
|
|
21394
|
+
this.toastElement = null;
|
|
21395
|
+
|
|
21396
|
+
// Validating the options
|
|
21397
|
+
this.options.text = options.text || Toastify.defaults.text; // Display message
|
|
21398
|
+
this.options.node = options.node || Toastify.defaults.node; // Display content as node
|
|
21399
|
+
this.options.duration = options.duration === 0 ? 0 : options.duration || Toastify.defaults.duration; // Display duration
|
|
21400
|
+
this.options.selector = options.selector || Toastify.defaults.selector; // Parent selector
|
|
21401
|
+
this.options.callback = options.callback || Toastify.defaults.callback; // Callback after display
|
|
21402
|
+
this.options.destination = options.destination || Toastify.defaults.destination; // On-click destination
|
|
21403
|
+
this.options.newWindow = options.newWindow || Toastify.defaults.newWindow; // Open destination in new window
|
|
21404
|
+
this.options.close = options.close || Toastify.defaults.close; // Show toast close icon
|
|
21405
|
+
this.options.gravity = options.gravity === "bottom" ? "toastify-bottom" : Toastify.defaults.gravity; // toast position - top or bottom
|
|
21406
|
+
this.options.positionLeft = options.positionLeft || Toastify.defaults.positionLeft; // toast position - left or right
|
|
21407
|
+
this.options.position = options.position || Toastify.defaults.position; // toast position - left or right
|
|
21408
|
+
this.options.backgroundColor = options.backgroundColor || Toastify.defaults.backgroundColor; // toast background color
|
|
21409
|
+
this.options.avatar = options.avatar || Toastify.defaults.avatar; // img element src - url or a path
|
|
21410
|
+
this.options.className = options.className || Toastify.defaults.className; // additional class names for the toast
|
|
21411
|
+
this.options.stopOnFocus = options.stopOnFocus === undefined ? Toastify.defaults.stopOnFocus : options.stopOnFocus; // stop timeout on focus
|
|
21412
|
+
this.options.onClick = options.onClick || Toastify.defaults.onClick; // Callback after click
|
|
21413
|
+
this.options.offset = options.offset || Toastify.defaults.offset; // toast offset
|
|
21414
|
+
this.options.escapeMarkup = options.escapeMarkup !== undefined ? options.escapeMarkup : Toastify.defaults.escapeMarkup;
|
|
21415
|
+
this.options.ariaLive = options.ariaLive || Toastify.defaults.ariaLive;
|
|
21416
|
+
this.options.style = options.style || Toastify.defaults.style;
|
|
21417
|
+
if(options.backgroundColor) {
|
|
21418
|
+
this.options.style.background = options.backgroundColor;
|
|
21419
|
+
}
|
|
21420
|
+
|
|
21421
|
+
// Returning the current object for chaining functions
|
|
21422
|
+
return this;
|
|
21423
|
+
},
|
|
21424
|
+
|
|
21425
|
+
// Building the DOM element
|
|
21426
|
+
buildToast: function() {
|
|
21427
|
+
// Validating if the options are defined
|
|
21428
|
+
if (!this.options) {
|
|
21429
|
+
throw "Toastify is not initialized";
|
|
21430
|
+
}
|
|
21431
|
+
|
|
21432
|
+
// Creating the DOM object
|
|
21433
|
+
var divElement = document.createElement("div");
|
|
21434
|
+
divElement.className = "toastify on " + this.options.className;
|
|
21435
|
+
|
|
21436
|
+
// Positioning toast to left or right or center
|
|
21437
|
+
if (!!this.options.position) {
|
|
21438
|
+
divElement.className += " toastify-" + this.options.position;
|
|
21439
|
+
} else {
|
|
21440
|
+
// To be depreciated in further versions
|
|
21441
|
+
if (this.options.positionLeft === true) {
|
|
21442
|
+
divElement.className += " toastify-left";
|
|
21443
|
+
console.warn('Property `positionLeft` will be depreciated in further versions. Please use `position` instead.');
|
|
21444
|
+
} else {
|
|
21445
|
+
// Default position
|
|
21446
|
+
divElement.className += " toastify-right";
|
|
21447
|
+
}
|
|
21448
|
+
}
|
|
21449
|
+
|
|
21450
|
+
// Assigning gravity of element
|
|
21451
|
+
divElement.className += " " + this.options.gravity;
|
|
21452
|
+
|
|
21453
|
+
if (this.options.backgroundColor) {
|
|
21454
|
+
// This is being deprecated in favor of using the style HTML DOM property
|
|
21455
|
+
console.warn('DEPRECATION NOTICE: "backgroundColor" is being deprecated. Please use the "style.background" property.');
|
|
21456
|
+
}
|
|
21457
|
+
|
|
21458
|
+
// Loop through our style object and apply styles to divElement
|
|
21459
|
+
for (var property in this.options.style) {
|
|
21460
|
+
divElement.style[property] = this.options.style[property];
|
|
21461
|
+
}
|
|
21462
|
+
|
|
21463
|
+
// Announce the toast to screen readers
|
|
21464
|
+
if (this.options.ariaLive) {
|
|
21465
|
+
divElement.setAttribute('aria-live', this.options.ariaLive);
|
|
21466
|
+
}
|
|
21467
|
+
|
|
21468
|
+
// Adding the toast message/node
|
|
21469
|
+
if (this.options.node && this.options.node.nodeType === Node.ELEMENT_NODE) {
|
|
21470
|
+
// If we have a valid node, we insert it
|
|
21471
|
+
divElement.appendChild(this.options.node);
|
|
21472
|
+
} else {
|
|
21473
|
+
if (this.options.escapeMarkup) {
|
|
21474
|
+
divElement.innerText = this.options.text;
|
|
21475
|
+
} else {
|
|
21476
|
+
divElement.innerHTML = this.options.text;
|
|
21477
|
+
}
|
|
21478
|
+
|
|
21479
|
+
if (this.options.avatar !== "") {
|
|
21480
|
+
var avatarElement = document.createElement("img");
|
|
21481
|
+
avatarElement.src = this.options.avatar;
|
|
21482
|
+
|
|
21483
|
+
avatarElement.className = "toastify-avatar";
|
|
21484
|
+
|
|
21485
|
+
if (this.options.position == "left" || this.options.positionLeft === true) {
|
|
21486
|
+
// Adding close icon on the left of content
|
|
21487
|
+
divElement.appendChild(avatarElement);
|
|
21488
|
+
} else {
|
|
21489
|
+
// Adding close icon on the right of content
|
|
21490
|
+
divElement.insertAdjacentElement("afterbegin", avatarElement);
|
|
21491
|
+
}
|
|
21492
|
+
}
|
|
21493
|
+
}
|
|
21494
|
+
|
|
21495
|
+
// Adding a close icon to the toast
|
|
21496
|
+
if (this.options.close === true) {
|
|
21497
|
+
// Create a span for close element
|
|
21498
|
+
var closeElement = document.createElement("button");
|
|
21499
|
+
closeElement.type = "button";
|
|
21500
|
+
closeElement.setAttribute("aria-label", "Close");
|
|
21501
|
+
closeElement.className = "toast-close";
|
|
21502
|
+
closeElement.innerHTML = "✖";
|
|
21503
|
+
|
|
21504
|
+
// Triggering the removal of toast from DOM on close click
|
|
21505
|
+
closeElement.addEventListener(
|
|
21506
|
+
"click",
|
|
21507
|
+
function(event) {
|
|
21508
|
+
event.stopPropagation();
|
|
21509
|
+
this.removeElement(this.toastElement);
|
|
21510
|
+
window.clearTimeout(this.toastElement.timeOutValue);
|
|
21511
|
+
}.bind(this)
|
|
21512
|
+
);
|
|
21513
|
+
|
|
21514
|
+
//Calculating screen width
|
|
21515
|
+
var width = window.innerWidth > 0 ? window.innerWidth : screen.width;
|
|
21516
|
+
|
|
21517
|
+
// Adding the close icon to the toast element
|
|
21518
|
+
// Display on the right if screen width is less than or equal to 360px
|
|
21519
|
+
if ((this.options.position == "left" || this.options.positionLeft === true) && width > 360) {
|
|
21520
|
+
// Adding close icon on the left of content
|
|
21521
|
+
divElement.insertAdjacentElement("afterbegin", closeElement);
|
|
21522
|
+
} else {
|
|
21523
|
+
// Adding close icon on the right of content
|
|
21524
|
+
divElement.appendChild(closeElement);
|
|
21525
|
+
}
|
|
21526
|
+
}
|
|
21527
|
+
|
|
21528
|
+
// Clear timeout while toast is focused
|
|
21529
|
+
if (this.options.stopOnFocus && this.options.duration > 0) {
|
|
21530
|
+
var self = this;
|
|
21531
|
+
// stop countdown
|
|
21532
|
+
divElement.addEventListener(
|
|
21533
|
+
"mouseover",
|
|
21534
|
+
function(event) {
|
|
21535
|
+
window.clearTimeout(divElement.timeOutValue);
|
|
21536
|
+
}
|
|
21537
|
+
);
|
|
21538
|
+
// add back the timeout
|
|
21539
|
+
divElement.addEventListener(
|
|
21540
|
+
"mouseleave",
|
|
21541
|
+
function() {
|
|
21542
|
+
divElement.timeOutValue = window.setTimeout(
|
|
21543
|
+
function() {
|
|
21544
|
+
// Remove the toast from DOM
|
|
21545
|
+
self.removeElement(divElement);
|
|
21546
|
+
},
|
|
21547
|
+
self.options.duration
|
|
21548
|
+
);
|
|
21549
|
+
}
|
|
21550
|
+
);
|
|
21551
|
+
}
|
|
21552
|
+
|
|
21553
|
+
// Adding an on-click destination path
|
|
21554
|
+
if (typeof this.options.destination !== "undefined") {
|
|
21555
|
+
divElement.addEventListener(
|
|
21556
|
+
"click",
|
|
21557
|
+
function(event) {
|
|
21558
|
+
event.stopPropagation();
|
|
21559
|
+
if (this.options.newWindow === true) {
|
|
21560
|
+
window.open(this.options.destination, "_blank");
|
|
21561
|
+
} else {
|
|
21562
|
+
window.location = this.options.destination;
|
|
21563
|
+
}
|
|
21564
|
+
}.bind(this)
|
|
21565
|
+
);
|
|
21566
|
+
}
|
|
21567
|
+
|
|
21568
|
+
if (typeof this.options.onClick === "function" && typeof this.options.destination === "undefined") {
|
|
21569
|
+
divElement.addEventListener(
|
|
21570
|
+
"click",
|
|
21571
|
+
function(event) {
|
|
21572
|
+
event.stopPropagation();
|
|
21573
|
+
this.options.onClick();
|
|
21574
|
+
}.bind(this)
|
|
21575
|
+
);
|
|
21576
|
+
}
|
|
21577
|
+
|
|
21578
|
+
// Adding offset
|
|
21579
|
+
if(typeof this.options.offset === "object") {
|
|
21580
|
+
|
|
21581
|
+
var x = getAxisOffsetAValue("x", this.options);
|
|
21582
|
+
var y = getAxisOffsetAValue("y", this.options);
|
|
21583
|
+
|
|
21584
|
+
var xOffset = this.options.position == "left" ? x : "-" + x;
|
|
21585
|
+
var yOffset = this.options.gravity == "toastify-top" ? y : "-" + y;
|
|
21586
|
+
|
|
21587
|
+
divElement.style.transform = "translate(" + xOffset + "," + yOffset + ")";
|
|
21588
|
+
|
|
21589
|
+
}
|
|
21590
|
+
|
|
21591
|
+
// Returning the generated element
|
|
21592
|
+
return divElement;
|
|
21593
|
+
},
|
|
21594
|
+
|
|
21595
|
+
// Displaying the toast
|
|
21596
|
+
showToast: function() {
|
|
21597
|
+
// Creating the DOM object for the toast
|
|
21598
|
+
this.toastElement = this.buildToast();
|
|
21599
|
+
|
|
21600
|
+
// Getting the root element to with the toast needs to be added
|
|
21601
|
+
var rootElement;
|
|
21602
|
+
if (typeof this.options.selector === "string") {
|
|
21603
|
+
rootElement = document.getElementById(this.options.selector);
|
|
21604
|
+
} else if (this.options.selector instanceof HTMLElement || (typeof ShadowRoot !== 'undefined' && this.options.selector instanceof ShadowRoot)) {
|
|
21605
|
+
rootElement = this.options.selector;
|
|
21606
|
+
} else {
|
|
21607
|
+
rootElement = document.body;
|
|
21608
|
+
}
|
|
21609
|
+
|
|
21610
|
+
// Validating if root element is present in DOM
|
|
21611
|
+
if (!rootElement) {
|
|
21612
|
+
throw "Root element is not defined";
|
|
21613
|
+
}
|
|
21614
|
+
|
|
21615
|
+
// Adding the DOM element
|
|
21616
|
+
var elementToInsert = Toastify.defaults.oldestFirst ? rootElement.firstChild : rootElement.lastChild;
|
|
21617
|
+
rootElement.insertBefore(this.toastElement, elementToInsert);
|
|
21618
|
+
|
|
21619
|
+
// Repositioning the toasts in case multiple toasts are present
|
|
21620
|
+
Toastify.reposition();
|
|
21621
|
+
|
|
21622
|
+
if (this.options.duration > 0) {
|
|
21623
|
+
this.toastElement.timeOutValue = window.setTimeout(
|
|
21624
|
+
function() {
|
|
21625
|
+
// Remove the toast from DOM
|
|
21626
|
+
this.removeElement(this.toastElement);
|
|
21627
|
+
}.bind(this),
|
|
21628
|
+
this.options.duration
|
|
21629
|
+
); // Binding `this` for function invocation
|
|
21630
|
+
}
|
|
21631
|
+
|
|
21632
|
+
// Supporting function chaining
|
|
21633
|
+
return this;
|
|
21634
|
+
},
|
|
21635
|
+
|
|
21636
|
+
hideToast: function() {
|
|
21637
|
+
if (this.toastElement.timeOutValue) {
|
|
21638
|
+
clearTimeout(this.toastElement.timeOutValue);
|
|
21639
|
+
}
|
|
21640
|
+
this.removeElement(this.toastElement);
|
|
21641
|
+
},
|
|
21642
|
+
|
|
21643
|
+
// Removing the element from the DOM
|
|
21644
|
+
removeElement: function(toastElement) {
|
|
21645
|
+
// Hiding the element
|
|
21646
|
+
// toastElement.classList.remove("on");
|
|
21647
|
+
toastElement.className = toastElement.className.replace(" on", "");
|
|
21648
|
+
|
|
21649
|
+
// Removing the element from DOM after transition end
|
|
21650
|
+
window.setTimeout(
|
|
21651
|
+
function() {
|
|
21652
|
+
// remove options node if any
|
|
21653
|
+
if (this.options.node && this.options.node.parentNode) {
|
|
21654
|
+
this.options.node.parentNode.removeChild(this.options.node);
|
|
21655
|
+
}
|
|
21656
|
+
|
|
21657
|
+
// Remove the element from the DOM, only when the parent node was not removed before.
|
|
21658
|
+
if (toastElement.parentNode) {
|
|
21659
|
+
toastElement.parentNode.removeChild(toastElement);
|
|
21660
|
+
}
|
|
21661
|
+
|
|
21662
|
+
// Calling the callback function
|
|
21663
|
+
this.options.callback.call(toastElement);
|
|
21664
|
+
|
|
21665
|
+
// Repositioning the toasts again
|
|
21666
|
+
Toastify.reposition();
|
|
21667
|
+
}.bind(this),
|
|
21668
|
+
400
|
|
21669
|
+
); // Binding `this` for function invocation
|
|
21670
|
+
},
|
|
21671
|
+
};
|
|
21672
|
+
|
|
21673
|
+
// Positioning the toasts on the DOM
|
|
21674
|
+
Toastify.reposition = function() {
|
|
21675
|
+
|
|
21676
|
+
// Top margins with gravity
|
|
21677
|
+
var topLeftOffsetSize = {
|
|
21678
|
+
top: 15,
|
|
21679
|
+
bottom: 15,
|
|
21680
|
+
};
|
|
21681
|
+
var topRightOffsetSize = {
|
|
21682
|
+
top: 15,
|
|
21683
|
+
bottom: 15,
|
|
21684
|
+
};
|
|
21685
|
+
var offsetSize = {
|
|
21686
|
+
top: 15,
|
|
21687
|
+
bottom: 15,
|
|
21688
|
+
};
|
|
21689
|
+
|
|
21690
|
+
// Get all toast messages on the DOM
|
|
21691
|
+
var allToasts = document.getElementsByClassName("toastify");
|
|
21692
|
+
|
|
21693
|
+
var classUsed;
|
|
21694
|
+
|
|
21695
|
+
// Modifying the position of each toast element
|
|
21696
|
+
for (var i = 0; i < allToasts.length; i++) {
|
|
21697
|
+
// Getting the applied gravity
|
|
21698
|
+
if (containsClass(allToasts[i], "toastify-top") === true) {
|
|
21699
|
+
classUsed = "toastify-top";
|
|
21700
|
+
} else {
|
|
21701
|
+
classUsed = "toastify-bottom";
|
|
21702
|
+
}
|
|
21703
|
+
|
|
21704
|
+
var height = allToasts[i].offsetHeight;
|
|
21705
|
+
classUsed = classUsed.substr(9, classUsed.length-1);
|
|
21706
|
+
// Spacing between toasts
|
|
21707
|
+
var offset = 15;
|
|
21708
|
+
|
|
21709
|
+
var width = window.innerWidth > 0 ? window.innerWidth : screen.width;
|
|
21710
|
+
|
|
21711
|
+
// Show toast in center if screen with less than or equal to 360px
|
|
21712
|
+
if (width <= 360) {
|
|
21713
|
+
// Setting the position
|
|
21714
|
+
allToasts[i].style[classUsed] = offsetSize[classUsed] + "px";
|
|
21715
|
+
|
|
21716
|
+
offsetSize[classUsed] += height + offset;
|
|
21717
|
+
} else {
|
|
21718
|
+
if (containsClass(allToasts[i], "toastify-left") === true) {
|
|
21719
|
+
// Setting the position
|
|
21720
|
+
allToasts[i].style[classUsed] = topLeftOffsetSize[classUsed] + "px";
|
|
21721
|
+
|
|
21722
|
+
topLeftOffsetSize[classUsed] += height + offset;
|
|
21723
|
+
} else {
|
|
21724
|
+
// Setting the position
|
|
21725
|
+
allToasts[i].style[classUsed] = topRightOffsetSize[classUsed] + "px";
|
|
21726
|
+
|
|
21727
|
+
topRightOffsetSize[classUsed] += height + offset;
|
|
21728
|
+
}
|
|
21729
|
+
}
|
|
21730
|
+
}
|
|
21731
|
+
|
|
21732
|
+
// Supporting function chaining
|
|
21733
|
+
return this;
|
|
21734
|
+
};
|
|
21735
|
+
|
|
21736
|
+
// Helper function to get offset.
|
|
21737
|
+
function getAxisOffsetAValue(axis, options) {
|
|
21738
|
+
|
|
21739
|
+
if(options.offset[axis]) {
|
|
21740
|
+
if(isNaN(options.offset[axis])) {
|
|
21741
|
+
return options.offset[axis];
|
|
21742
|
+
}
|
|
21743
|
+
else {
|
|
21744
|
+
return options.offset[axis] + 'px';
|
|
21745
|
+
}
|
|
21746
|
+
}
|
|
21747
|
+
|
|
21748
|
+
return '0px';
|
|
21749
|
+
|
|
21750
|
+
}
|
|
21751
|
+
|
|
21752
|
+
function containsClass(elem, yourClass) {
|
|
21753
|
+
if (!elem || typeof yourClass !== "string") {
|
|
21754
|
+
return false;
|
|
21755
|
+
} else if (
|
|
21756
|
+
elem.className &&
|
|
21757
|
+
elem.className
|
|
21758
|
+
.trim()
|
|
21759
|
+
.split(/\s+/gi)
|
|
21760
|
+
.indexOf(yourClass) > -1
|
|
21761
|
+
) {
|
|
21762
|
+
return true;
|
|
21763
|
+
} else {
|
|
21764
|
+
return false;
|
|
21765
|
+
}
|
|
21766
|
+
}
|
|
21767
|
+
|
|
21768
|
+
// Setting up the prototype for the init object
|
|
21769
|
+
Toastify.lib.init.prototype = Toastify.lib;
|
|
21770
|
+
|
|
21771
|
+
// Returning the Toastify function to be assigned to the window object/module
|
|
21772
|
+
return Toastify;
|
|
21773
|
+
});
|
|
21774
|
+
} (toastify));
|
|
21775
|
+
|
|
21776
|
+
var toastifyExports = toastify.exports;
|
|
21777
|
+
var Toastify = /*@__PURE__*/getDefaultExportFromCjs(toastifyExports);
|
|
21778
|
+
|
|
21779
|
+
const TOAST_BG = {
|
|
21780
|
+
info: "linear-gradient(135deg, #2563eb, #1d4ed8)",
|
|
21781
|
+
success: "linear-gradient(135deg, #16a34a, #15803d)",
|
|
21782
|
+
warning: "linear-gradient(135deg, #d97706, #b45309)",
|
|
21783
|
+
error: "linear-gradient(135deg, #dc2626, #b91c1c)"
|
|
21784
|
+
};
|
|
21785
|
+
function showDisplayToast(message, type = "info", duration = 3600) {
|
|
21786
|
+
if (typeof document === "undefined" || !message.trim()) return;
|
|
21787
|
+
try {
|
|
21788
|
+
Toastify({
|
|
21789
|
+
text: message.trim(),
|
|
21790
|
+
duration,
|
|
21791
|
+
gravity: "top",
|
|
21792
|
+
position: "center",
|
|
21793
|
+
close: true,
|
|
21794
|
+
stopOnFocus: true,
|
|
21795
|
+
style: {
|
|
21796
|
+
background: TOAST_BG[type],
|
|
21797
|
+
color: "#ffffff",
|
|
21798
|
+
borderRadius: "10px",
|
|
21799
|
+
fontSize: "13px",
|
|
21800
|
+
lineHeight: "1.45",
|
|
21801
|
+
padding: "10px 14px",
|
|
21802
|
+
maxWidth: "calc(100vw - 32px)",
|
|
21803
|
+
boxShadow: "0 8px 24px rgba(15, 23, 42, 0.18)",
|
|
21804
|
+
zIndex: "9999"
|
|
21805
|
+
}
|
|
21806
|
+
}).showToast();
|
|
21807
|
+
} catch (e) {
|
|
21808
|
+
}
|
|
21809
|
+
}
|
|
21810
|
+
|
|
21325
21811
|
const _hoisted_1$O = { class: "yc-display-card__header" };
|
|
21326
21812
|
const _hoisted_2$B = { class: "yc-display-card__title-wrap yc-display-form-card__title-group" };
|
|
21327
21813
|
const _hoisted_3$x = { class: "yc-display-form-card__titles" };
|
|
@@ -21347,61 +21833,98 @@ const _hoisted_10$h = {
|
|
|
21347
21833
|
key: 0,
|
|
21348
21834
|
class: "is-required"
|
|
21349
21835
|
};
|
|
21350
|
-
const _hoisted_11$h =
|
|
21351
|
-
|
|
21352
|
-
|
|
21353
|
-
|
|
21354
|
-
const
|
|
21355
|
-
|
|
21356
|
-
|
|
21357
|
-
|
|
21836
|
+
const _hoisted_11$h = {
|
|
21837
|
+
key: 1,
|
|
21838
|
+
class: "yc-display-form-card__dynamic-tag"
|
|
21839
|
+
};
|
|
21840
|
+
const _hoisted_12$g = {
|
|
21841
|
+
key: 0,
|
|
21842
|
+
class: "yc-display-form-card__choice-group",
|
|
21843
|
+
role: "radiogroup"
|
|
21844
|
+
};
|
|
21845
|
+
const _hoisted_13$f = ["aria-checked", "disabled", "onClick"];
|
|
21846
|
+
const _hoisted_14$d = {
|
|
21847
|
+
key: 1,
|
|
21848
|
+
class: "yc-display-form-card__choice-group",
|
|
21849
|
+
role: "group"
|
|
21850
|
+
};
|
|
21851
|
+
const _hoisted_15$c = ["aria-checked", "disabled", "onClick"];
|
|
21852
|
+
const _hoisted_16$c = ["value", "disabled", "onFocus", "onChange"];
|
|
21853
|
+
const _hoisted_17$b = { value: "" };
|
|
21854
|
+
const _hoisted_18$b = ["value"];
|
|
21855
|
+
const _hoisted_19$a = ["type", "value", "disabled", "onInput"];
|
|
21856
|
+
const _hoisted_20$a = ["step", "inputmode", "value", "disabled", "placeholder", "onInput"];
|
|
21857
|
+
const _hoisted_21$9 = ["aria-checked", "disabled", "onClick"];
|
|
21858
|
+
const _hoisted_22$9 = {
|
|
21859
|
+
key: 6,
|
|
21358
21860
|
class: "yc-display-form-card__upload"
|
|
21359
21861
|
};
|
|
21360
|
-
const
|
|
21361
|
-
const
|
|
21362
|
-
const
|
|
21862
|
+
const _hoisted_23$7 = ["accept", "onChange"];
|
|
21863
|
+
const _hoisted_24$6 = { class: "yc-display-form-card__upload-list" };
|
|
21864
|
+
const _hoisted_25$6 = {
|
|
21363
21865
|
key: 0,
|
|
21364
21866
|
class: "yc-display-form-card__thumb"
|
|
21365
21867
|
};
|
|
21366
|
-
const
|
|
21367
|
-
const
|
|
21368
|
-
const
|
|
21868
|
+
const _hoisted_26$6 = ["src", "alt"];
|
|
21869
|
+
const _hoisted_27$6 = ["onClick"];
|
|
21870
|
+
const _hoisted_28$6 = {
|
|
21369
21871
|
key: 1,
|
|
21370
21872
|
class: "yc-display-form-card__file-chip"
|
|
21371
21873
|
};
|
|
21372
|
-
const
|
|
21373
|
-
const
|
|
21374
|
-
const
|
|
21375
|
-
const
|
|
21376
|
-
const
|
|
21377
|
-
const
|
|
21378
|
-
const
|
|
21379
|
-
const
|
|
21380
|
-
const
|
|
21381
|
-
const
|
|
21382
|
-
|
|
21874
|
+
const _hoisted_29$6 = { class: "yc-display-form-card__file-name" };
|
|
21875
|
+
const _hoisted_30$6 = ["onClick"];
|
|
21876
|
+
const _hoisted_31$6 = ["disabled", "onClick"];
|
|
21877
|
+
const _hoisted_32$5 = { key: 0 };
|
|
21878
|
+
const _hoisted_33$4 = { key: 1 };
|
|
21879
|
+
const _hoisted_34$4 = ["value", "disabled", "placeholder", "onInput", "onBlur"];
|
|
21880
|
+
const _hoisted_35$4 = ["value", "disabled", "placeholder", "onInput", "onBlur"];
|
|
21881
|
+
const _hoisted_36$3 = ["value", "disabled", "placeholder", "onInput"];
|
|
21882
|
+
const _hoisted_37$3 = ["value", "disabled", "placeholder", "onInput"];
|
|
21883
|
+
const _hoisted_38$3 = {
|
|
21884
|
+
key: 11,
|
|
21885
|
+
class: "yc-display-form-card__field-error"
|
|
21886
|
+
};
|
|
21887
|
+
const _hoisted_39$2 = { class: "yc-display-form-card__actions" };
|
|
21888
|
+
const _hoisted_40$2 = ["disabled"];
|
|
21889
|
+
const _hoisted_41$2 = ["disabled"];
|
|
21890
|
+
const _hoisted_42$2 = {
|
|
21383
21891
|
key: 1,
|
|
21384
21892
|
class: "yc-display-form-card__alert is-error"
|
|
21385
21893
|
};
|
|
21386
|
-
const
|
|
21894
|
+
const _hoisted_43$2 = {
|
|
21387
21895
|
key: 2,
|
|
21388
21896
|
class: "yc-display-form-card__alert is-success"
|
|
21389
21897
|
};
|
|
21390
|
-
const
|
|
21898
|
+
const _hoisted_44$1 = {
|
|
21391
21899
|
key: 3,
|
|
21900
|
+
class: "yc-display-form-card__trace"
|
|
21901
|
+
};
|
|
21902
|
+
const _hoisted_45$1 = { class: "yc-display-form-card__trace-arrow" };
|
|
21903
|
+
const _hoisted_46$1 = {
|
|
21904
|
+
key: 0,
|
|
21905
|
+
class: "yc-display-form-card__trace-list"
|
|
21906
|
+
};
|
|
21907
|
+
const _hoisted_47$1 = { class: "yc-display-form-card__trace-content" };
|
|
21908
|
+
const _hoisted_48$1 = { class: "yc-display-form-card__trace-label" };
|
|
21909
|
+
const _hoisted_49$1 = {
|
|
21910
|
+
key: 0,
|
|
21911
|
+
class: "yc-display-form-card__trace-detail"
|
|
21912
|
+
};
|
|
21913
|
+
const _hoisted_50$1 = {
|
|
21914
|
+
key: 4,
|
|
21392
21915
|
class: "yc-display-form-card__result"
|
|
21393
21916
|
};
|
|
21394
|
-
const
|
|
21917
|
+
const _hoisted_51$1 = {
|
|
21395
21918
|
key: 0,
|
|
21396
21919
|
class: "yc-display-form-card__table-wrap"
|
|
21397
21920
|
};
|
|
21398
|
-
const
|
|
21399
|
-
const
|
|
21921
|
+
const _hoisted_52$1 = { class: "yc-display-form-card__table" };
|
|
21922
|
+
const _hoisted_53$1 = {
|
|
21400
21923
|
key: 1,
|
|
21401
21924
|
class: "yc-display-form-card__kv"
|
|
21402
21925
|
};
|
|
21403
|
-
const
|
|
21404
|
-
const
|
|
21926
|
+
const _hoisted_54$1 = { class: "yc-display-form-card__kv-label" };
|
|
21927
|
+
const _hoisted_55$1 = { class: "yc-display-form-card__kv-value" };
|
|
21405
21928
|
var _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
21406
21929
|
...{ name: "YcDisplayFormCard" },
|
|
21407
21930
|
__name: "form-card",
|
|
@@ -21417,7 +21940,8 @@ var _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
|
21417
21940
|
compact: { type: Boolean, default: false },
|
|
21418
21941
|
skillName: { default: "" },
|
|
21419
21942
|
executeAction: { type: Function, default: void 0 },
|
|
21420
|
-
uploadFile: { type: Function, default: void 0 }
|
|
21943
|
+
uploadFile: { type: Function, default: void 0 },
|
|
21944
|
+
submitReply: { type: Function, default: void 0 }
|
|
21421
21945
|
},
|
|
21422
21946
|
emits: ["action"],
|
|
21423
21947
|
setup(__props, { emit: __emit }) {
|
|
@@ -21433,6 +21957,9 @@ var _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
|
21433
21957
|
const resultData = ref(null);
|
|
21434
21958
|
const hasExecuted = ref(false);
|
|
21435
21959
|
const replySent = ref(false);
|
|
21960
|
+
const dynamicFields = ref([]);
|
|
21961
|
+
const traceSteps = ref([]);
|
|
21962
|
+
const traceExpanded = ref(false);
|
|
21436
21963
|
const formValues = reactive({});
|
|
21437
21964
|
const remoteOptions = reactive({});
|
|
21438
21965
|
const loadingOptions = reactive({});
|
|
@@ -21488,27 +22015,51 @@ var _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
|
21488
22015
|
return options.length ? options : void 0;
|
|
21489
22016
|
}
|
|
21490
22017
|
const inlineFields = computed(() => {
|
|
21491
|
-
|
|
21492
|
-
|
|
21493
|
-
|
|
21494
|
-
|
|
22018
|
+
var _a;
|
|
22019
|
+
const base = Array.isArray(props.fields) ? props.fields : [];
|
|
22020
|
+
const merged = [...base, ...dynamicFields.value];
|
|
22021
|
+
const seen = /* @__PURE__ */ new Set();
|
|
22022
|
+
const result = [];
|
|
22023
|
+
for (const item of merged) {
|
|
22024
|
+
if (!item || typeof item !== "object" || !item.name) continue;
|
|
22025
|
+
const name = String(item.name);
|
|
22026
|
+
if (seen.has(name)) continue;
|
|
22027
|
+
seen.add(name);
|
|
22028
|
+
result.push({
|
|
21495
22029
|
...item,
|
|
21496
|
-
name
|
|
21497
|
-
label: String((_a = item.label) != null ? _a :
|
|
22030
|
+
name,
|
|
22031
|
+
label: String((_a = item.label) != null ? _a : name),
|
|
21498
22032
|
visible: item.visible !== false
|
|
21499
|
-
};
|
|
21500
|
-
}
|
|
22033
|
+
});
|
|
22034
|
+
}
|
|
22035
|
+
return result;
|
|
21501
22036
|
});
|
|
22037
|
+
const dynamicFieldNames = computed(
|
|
22038
|
+
() => new Set(dynamicFields.value.map((f) => f.name))
|
|
22039
|
+
);
|
|
21502
22040
|
const visibleFields = computed(() => {
|
|
21503
22041
|
const source = inlineFields.value.length > 0 ? inlineFields.value : loadedFields.value;
|
|
21504
22042
|
return source.filter((field) => field.visible !== false);
|
|
21505
22043
|
});
|
|
22044
|
+
function isRadioField(field) {
|
|
22045
|
+
return field.widget === "radio";
|
|
22046
|
+
}
|
|
22047
|
+
function isCheckboxField(field) {
|
|
22048
|
+
return field.widget === "checkbox";
|
|
22049
|
+
}
|
|
21506
22050
|
function isSelectField(field) {
|
|
21507
22051
|
var _a, _b;
|
|
22052
|
+
if (isRadioField(field) || isCheckboxField(field)) return false;
|
|
21508
22053
|
return Boolean(
|
|
21509
22054
|
field.widget === "select" || field.options_operation || ((_a = field.options) == null ? void 0 : _a.length) || ((_b = field.enum) == null ? void 0 : _b.length)
|
|
21510
22055
|
);
|
|
21511
22056
|
}
|
|
22057
|
+
function isPhoneField(field) {
|
|
22058
|
+
return field.widget === "phone" || field.widget === "tel";
|
|
22059
|
+
}
|
|
22060
|
+
function isEmailField(field) {
|
|
22061
|
+
return field.widget === "email";
|
|
22062
|
+
}
|
|
21512
22063
|
function isDateField(field) {
|
|
21513
22064
|
return field.widget === "date" || field.widget === "datetime";
|
|
21514
22065
|
}
|
|
@@ -21765,6 +22316,47 @@ var _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
|
21765
22316
|
}
|
|
21766
22317
|
return result;
|
|
21767
22318
|
}
|
|
22319
|
+
function isCheckboxChecked(field, optionValue) {
|
|
22320
|
+
const current = formValues[field.name];
|
|
22321
|
+
return Array.isArray(current) && current.includes(optionValue);
|
|
22322
|
+
}
|
|
22323
|
+
function toggleCheckboxOption(field, optionValue) {
|
|
22324
|
+
if (replySent.value) return;
|
|
22325
|
+
const current = Array.isArray(formValues[field.name]) ? [...formValues[field.name]] : [];
|
|
22326
|
+
const idx = current.indexOf(optionValue);
|
|
22327
|
+
if (idx >= 0) {
|
|
22328
|
+
current.splice(idx, 1);
|
|
22329
|
+
} else {
|
|
22330
|
+
current.push(optionValue);
|
|
22331
|
+
}
|
|
22332
|
+
formValues[field.name] = current.length ? current : void 0;
|
|
22333
|
+
}
|
|
22334
|
+
const fieldValidationErrors = reactive({});
|
|
22335
|
+
function validateFieldFormat(field, value) {
|
|
22336
|
+
if (isBlank(value)) return "";
|
|
22337
|
+
const text = String(value).trim();
|
|
22338
|
+
const label = field.label || field.name;
|
|
22339
|
+
if (isPhoneField(field)) {
|
|
22340
|
+
const normalized = text.replace(/[\s-]/g, "");
|
|
22341
|
+
if (!/^1[3-9]\d{9}$/.test(normalized) && !/^0\d{2,3}\d{7,8}$/.test(normalized)) {
|
|
22342
|
+
return `\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u300C${label}\u300D\uFF0811\u4F4D\u624B\u673A\u53F7\u6216\u56FA\u8BDD\uFF09`;
|
|
22343
|
+
}
|
|
22344
|
+
}
|
|
22345
|
+
if (isEmailField(field)) {
|
|
22346
|
+
if (!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(text)) {
|
|
22347
|
+
return `\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u300C${label}\u300D\u90AE\u7BB1\u683C\u5F0F`;
|
|
22348
|
+
}
|
|
22349
|
+
}
|
|
22350
|
+
return "";
|
|
22351
|
+
}
|
|
22352
|
+
function handleFieldBlur(field) {
|
|
22353
|
+
const msg = validateFieldFormat(field, formValues[field.name]);
|
|
22354
|
+
if (msg) {
|
|
22355
|
+
fieldValidationErrors[field.name] = msg;
|
|
22356
|
+
} else {
|
|
22357
|
+
delete fieldValidationErrors[field.name];
|
|
22358
|
+
}
|
|
22359
|
+
}
|
|
21768
22360
|
function isBlank(value) {
|
|
21769
22361
|
if (Array.isArray(value)) return value.length === 0;
|
|
21770
22362
|
return value === void 0 || value === null || String(value).trim() === "";
|
|
@@ -21777,6 +22369,13 @@ var _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
|
21777
22369
|
return `\u5DF2\u968F\u6D88\u606F\u4E0A\u4F20 ${items.length} \u4E2A\u9644\u4EF6\uFF08${items.map((item) => item.attachment.fileName).join("\u3001")}\uFF09`;
|
|
21778
22370
|
}
|
|
21779
22371
|
}
|
|
22372
|
+
if (Array.isArray(value)) {
|
|
22373
|
+
const opts = fieldOptions(field);
|
|
22374
|
+
return value.map((v) => {
|
|
22375
|
+
const opt = opts.find((o) => o.value === v);
|
|
22376
|
+
return !opt || opt.label === String(v) ? String(v) : `${opt.label}\uFF08${String(v)}\uFF09`;
|
|
22377
|
+
}).join("\u3001");
|
|
22378
|
+
}
|
|
21780
22379
|
const option = fieldOptions(field).find((opt) => opt.value === value);
|
|
21781
22380
|
if (!option || option.label === String(value)) return String(value);
|
|
21782
22381
|
return `${option.label}\uFF08${String(value)}\uFF09`;
|
|
@@ -21792,6 +22391,35 @@ var _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
|
21792
22391
|
}
|
|
21793
22392
|
return [`${prefix}\uFF1A`, ...lines].join("\n");
|
|
21794
22393
|
}
|
|
22394
|
+
function upsertTraceStep(step) {
|
|
22395
|
+
const idx = traceSteps.value.findIndex((item) => item.id === step.id);
|
|
22396
|
+
if (idx >= 0) {
|
|
22397
|
+
traceSteps.value[idx] = { ...traceSteps.value[idx], ...step };
|
|
22398
|
+
} else {
|
|
22399
|
+
traceSteps.value.push(step);
|
|
22400
|
+
}
|
|
22401
|
+
}
|
|
22402
|
+
function appendMissingFieldsFromResult(missingFields, message) {
|
|
22403
|
+
const existingNames = new Set(inlineFields.value.map((f) => f.name));
|
|
22404
|
+
const candidates = Array.isArray(missingFields) ? [...missingFields] : [];
|
|
22405
|
+
if (candidates.length === 0 && message && /(附件|图片|照片|photo|image|attachment)/i.test(message) && !inlineFields.value.some((f) => isUploadField(f))) {
|
|
22406
|
+
candidates.push({
|
|
22407
|
+
name: "attachments",
|
|
22408
|
+
label: "\u73B0\u573A\u7167\u7247",
|
|
22409
|
+
widget: "image",
|
|
22410
|
+
required: true,
|
|
22411
|
+
visible: true
|
|
22412
|
+
});
|
|
22413
|
+
}
|
|
22414
|
+
for (const field of candidates) {
|
|
22415
|
+
if (!(field == null ? void 0 : field.name) || existingNames.has(field.name)) continue;
|
|
22416
|
+
existingNames.add(field.name);
|
|
22417
|
+
dynamicFields.value.push({
|
|
22418
|
+
...field,
|
|
22419
|
+
visible: field.visible !== false
|
|
22420
|
+
});
|
|
22421
|
+
}
|
|
22422
|
+
}
|
|
21795
22423
|
async function handleExecute() {
|
|
21796
22424
|
if (!canExecute.value || executing.value) return;
|
|
21797
22425
|
errorMessage.value = "";
|
|
@@ -21801,20 +22429,85 @@ var _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
|
21801
22429
|
return;
|
|
21802
22430
|
}
|
|
21803
22431
|
for (const field of visibleFields.value) {
|
|
21804
|
-
|
|
22432
|
+
const val = formValues[field.name];
|
|
22433
|
+
if (field.required && isBlank(val)) {
|
|
21805
22434
|
const label = field.label || field.name;
|
|
21806
22435
|
errorMessage.value = isUploadField(field) ? `\u8BF7\u5148\u4E0A\u4F20\u300C${label}\u300D` : `\u8BF7\u5148\u586B\u5199\u300C${label}\u300D`;
|
|
21807
22436
|
return;
|
|
21808
22437
|
}
|
|
22438
|
+
const formatErr = validateFieldFormat(field, val);
|
|
22439
|
+
if (formatErr) {
|
|
22440
|
+
fieldValidationErrors[field.name] = formatErr;
|
|
22441
|
+
errorMessage.value = formatErr;
|
|
22442
|
+
return;
|
|
22443
|
+
}
|
|
22444
|
+
delete fieldValidationErrors[field.name];
|
|
21809
22445
|
}
|
|
21810
22446
|
if (resolvedMode.value === "reply") {
|
|
21811
22447
|
const attachments = collectUploadedAttachments();
|
|
22448
|
+
const replyText = buildReplyText();
|
|
22449
|
+
if (props.submitReply) {
|
|
22450
|
+
executing.value = true;
|
|
22451
|
+
traceExpanded.value = true;
|
|
22452
|
+
traceSteps.value = [
|
|
22453
|
+
{
|
|
22454
|
+
id: "submit",
|
|
22455
|
+
label: "\u6B63\u5728\u63D0\u4EA4\u8868\u5355\u4EA4\u7531\u4E1A\u52A1\u52A9\u624B\u5904\u7406\u2026",
|
|
22456
|
+
status: "running"
|
|
22457
|
+
}
|
|
22458
|
+
];
|
|
22459
|
+
try {
|
|
22460
|
+
const res = await props.submitReply({
|
|
22461
|
+
text: replyText,
|
|
22462
|
+
attachments: attachments.length ? attachments : void 0,
|
|
22463
|
+
values: { ...formValues },
|
|
22464
|
+
onTrace: upsertTraceStep
|
|
22465
|
+
});
|
|
22466
|
+
if (Array.isArray(res.trace)) {
|
|
22467
|
+
for (const step of res.trace) upsertTraceStep(step);
|
|
22468
|
+
}
|
|
22469
|
+
if (res.ok) {
|
|
22470
|
+
upsertTraceStep({
|
|
22471
|
+
id: "submit",
|
|
22472
|
+
label: "\u8868\u5355\u63D0\u4EA4\u4E0E\u5904\u7406\u5B8C\u6210",
|
|
22473
|
+
status: "succeeded",
|
|
22474
|
+
detail: res.message
|
|
22475
|
+
});
|
|
22476
|
+
replySent.value = true;
|
|
22477
|
+
submitReceipt.value = res.message || `${cardTitle.value}\u5904\u7406\u6210\u529F`;
|
|
22478
|
+
showDisplayToast(submitReceipt.value, "success");
|
|
22479
|
+
} else {
|
|
22480
|
+
upsertTraceStep({
|
|
22481
|
+
id: "submit",
|
|
22482
|
+
label: "\u5904\u7406\u672A\u5B8C\u6210\uFF0C\u9700\u8865\u5145\u4FE1\u606F",
|
|
22483
|
+
status: "failed",
|
|
22484
|
+
detail: res.message
|
|
22485
|
+
});
|
|
22486
|
+
errorMessage.value = res.message || "\u4FE1\u606F\u4E0D\u5B8C\u6574\u6216\u5904\u7406\u5931\u8D25\uFF0C\u8BF7\u8865\u5145\u540E\u91CD\u65B0\u63D0\u4EA4";
|
|
22487
|
+
appendMissingFieldsFromResult(res.missingFields, res.message);
|
|
22488
|
+
showDisplayToast(errorMessage.value, "warning", 4500);
|
|
22489
|
+
}
|
|
22490
|
+
} catch (err) {
|
|
22491
|
+
const msg = err instanceof Error ? err.message : "\u63D0\u4EA4\u5904\u7406\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5";
|
|
22492
|
+
upsertTraceStep({
|
|
22493
|
+
id: "submit",
|
|
22494
|
+
label: "\u63D0\u4EA4\u8FC7\u7A0B\u53D1\u751F\u5F02\u5E38",
|
|
22495
|
+
status: "failed",
|
|
22496
|
+
detail: msg
|
|
22497
|
+
});
|
|
22498
|
+
errorMessage.value = msg;
|
|
22499
|
+
showDisplayToast(msg, "error", 4500);
|
|
22500
|
+
} finally {
|
|
22501
|
+
executing.value = false;
|
|
22502
|
+
}
|
|
22503
|
+
return;
|
|
22504
|
+
}
|
|
21812
22505
|
replySent.value = true;
|
|
21813
|
-
submitReceipt.value = "\u5DF2\u63D0\u4EA4\uFF0CAgent \u6B63\u5728\u6309\u4F60\u586B\u5199\u7684\u4FE1\u606F\u5904\u7406";
|
|
22506
|
+
submitReceipt.value = "\u5DF2\u63D0\u4EA4\uFF0CAgent \u6B63\u5728\u6309\u4F60\u586B\u5199\u7684\u4FE1\u606F\u5904\u7406\uFF08\u82E5\u5904\u7406\u5931\u8D25\u53EF\u70B9\u300C\u4FEE\u6539\u91CD\u63D0\u300D\uFF09";
|
|
21814
22507
|
if (attachments.length) {
|
|
21815
|
-
emit("action",
|
|
22508
|
+
emit("action", replyText, attachments);
|
|
21816
22509
|
} else {
|
|
21817
|
-
emit("action",
|
|
22510
|
+
emit("action", replyText);
|
|
21818
22511
|
}
|
|
21819
22512
|
return;
|
|
21820
22513
|
}
|
|
@@ -21853,10 +22546,18 @@ var _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
|
21853
22546
|
}
|
|
21854
22547
|
}
|
|
21855
22548
|
}
|
|
22549
|
+
function unlockReplyEdit() {
|
|
22550
|
+
replySent.value = false;
|
|
22551
|
+
errorMessage.value = "";
|
|
22552
|
+
submitReceipt.value = null;
|
|
22553
|
+
}
|
|
21856
22554
|
function handleReset() {
|
|
21857
22555
|
for (const key of Object.keys(formValues)) {
|
|
21858
22556
|
delete formValues[key];
|
|
21859
22557
|
}
|
|
22558
|
+
for (const key of Object.keys(fieldValidationErrors)) {
|
|
22559
|
+
delete fieldValidationErrors[key];
|
|
22560
|
+
}
|
|
21860
22561
|
revokeAllUploadPreviews();
|
|
21861
22562
|
for (const key of Object.keys(uploadedFiles)) {
|
|
21862
22563
|
delete uploadedFiles[key];
|
|
@@ -21888,7 +22589,7 @@ var _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
|
21888
22589
|
[
|
|
21889
22590
|
createElementVNode("div", _hoisted_1$O, [
|
|
21890
22591
|
createElementVNode("div", _hoisted_2$B, [
|
|
21891
|
-
_cache[
|
|
22592
|
+
_cache[1] || (_cache[1] = createElementVNode(
|
|
21892
22593
|
"span",
|
|
21893
22594
|
{ class: "yc-display-form-card__accent" },
|
|
21894
22595
|
null,
|
|
@@ -21928,7 +22629,7 @@ var _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
|
21928
22629
|
Fragment,
|
|
21929
22630
|
null,
|
|
21930
22631
|
renderList(visibleFields.value, (field) => {
|
|
21931
|
-
var _a2, _b, _c, _d, _e;
|
|
22632
|
+
var _a2, _b, _c, _d, _e, _f, _g;
|
|
21932
22633
|
return openBlock(), createElementBlock(
|
|
21933
22634
|
"div",
|
|
21934
22635
|
{
|
|
@@ -21941,13 +22642,50 @@ var _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
|
21941
22642
|
createElementVNode("label", _hoisted_9$i, [
|
|
21942
22643
|
field.required ? (openBlock(), createElementBlock("span", _hoisted_10$h, "*")) : createCommentVNode("v-if", true),
|
|
21943
22644
|
createTextVNode(
|
|
21944
|
-
" " + toDisplayString(field.label || field.name),
|
|
22645
|
+
" " + toDisplayString(field.label || field.name) + " ",
|
|
21945
22646
|
1
|
|
21946
22647
|
/* TEXT */
|
|
21947
|
-
)
|
|
22648
|
+
),
|
|
22649
|
+
dynamicFieldNames.value.has(field.name) ? (openBlock(), createElementBlock("span", _hoisted_11$h, " \u9700\u8865\u5145 ")) : createCommentVNode("v-if", true)
|
|
21948
22650
|
]),
|
|
21949
|
-
|
|
21950
|
-
|
|
22651
|
+
isRadioField(field) ? (openBlock(), createElementBlock("div", _hoisted_12$g, [
|
|
22652
|
+
(openBlock(true), createElementBlock(
|
|
22653
|
+
Fragment,
|
|
22654
|
+
null,
|
|
22655
|
+
renderList(fieldOptions(field), (opt) => {
|
|
22656
|
+
return openBlock(), createElementBlock("button", {
|
|
22657
|
+
key: String(opt.value),
|
|
22658
|
+
type: "button",
|
|
22659
|
+
role: "radio",
|
|
22660
|
+
"aria-checked": formValues[field.name] === opt.value,
|
|
22661
|
+
disabled: replySent.value,
|
|
22662
|
+
class: normalizeClass(["yc-display-form-card__choice-item", { "is-selected": formValues[field.name] === opt.value }]),
|
|
22663
|
+
onClick: ($event) => formValues[field.name] = opt.value
|
|
22664
|
+
}, toDisplayString(opt.label), 11, _hoisted_13$f);
|
|
22665
|
+
}),
|
|
22666
|
+
128
|
|
22667
|
+
/* KEYED_FRAGMENT */
|
|
22668
|
+
))
|
|
22669
|
+
])) : isCheckboxField(field) ? (openBlock(), createElementBlock("div", _hoisted_14$d, [
|
|
22670
|
+
(openBlock(true), createElementBlock(
|
|
22671
|
+
Fragment,
|
|
22672
|
+
null,
|
|
22673
|
+
renderList(fieldOptions(field), (opt) => {
|
|
22674
|
+
return openBlock(), createElementBlock("button", {
|
|
22675
|
+
key: String(opt.value),
|
|
22676
|
+
type: "button",
|
|
22677
|
+
role: "checkbox",
|
|
22678
|
+
"aria-checked": isCheckboxChecked(field, opt.value),
|
|
22679
|
+
disabled: replySent.value,
|
|
22680
|
+
class: normalizeClass(["yc-display-form-card__choice-item", { "is-selected": isCheckboxChecked(field, opt.value) }]),
|
|
22681
|
+
onClick: ($event) => toggleCheckboxOption(field, opt.value)
|
|
22682
|
+
}, toDisplayString(opt.label), 11, _hoisted_15$c);
|
|
22683
|
+
}),
|
|
22684
|
+
128
|
|
22685
|
+
/* KEYED_FRAGMENT */
|
|
22686
|
+
))
|
|
22687
|
+
])) : isSelectField(field) ? (openBlock(), createElementBlock("select", {
|
|
22688
|
+
key: 2,
|
|
21951
22689
|
value: (_a2 = formValues[field.name]) != null ? _a2 : "",
|
|
21952
22690
|
disabled: replySent.value,
|
|
21953
22691
|
class: "yc-display-form-card__control yc-display-form-card__select",
|
|
@@ -21956,7 +22694,7 @@ var _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
|
21956
22694
|
}, [
|
|
21957
22695
|
createElementVNode(
|
|
21958
22696
|
"option",
|
|
21959
|
-
|
|
22697
|
+
_hoisted_17$b,
|
|
21960
22698
|
toDisplayString(loadingOptions[field.name] ? "\u52A0\u8F7D\u9009\u9879\u4E2D\u2026" : `\u8BF7\u9009\u62E9${field.label || field.name}`),
|
|
21961
22699
|
1
|
|
21962
22700
|
/* TEXT */
|
|
@@ -21968,20 +22706,20 @@ var _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
|
21968
22706
|
return openBlock(), createElementBlock("option", {
|
|
21969
22707
|
key: String(opt.value),
|
|
21970
22708
|
value: String(opt.value)
|
|
21971
|
-
}, toDisplayString(opt.label), 9,
|
|
22709
|
+
}, toDisplayString(opt.label), 9, _hoisted_18$b);
|
|
21972
22710
|
}),
|
|
21973
22711
|
128
|
|
21974
22712
|
/* KEYED_FRAGMENT */
|
|
21975
22713
|
))
|
|
21976
|
-
], 40,
|
|
21977
|
-
key:
|
|
22714
|
+
], 40, _hoisted_16$c)) : isDateField(field) ? (openBlock(), createElementBlock("input", {
|
|
22715
|
+
key: 3,
|
|
21978
22716
|
type: field.widget === "datetime" ? "datetime-local" : "date",
|
|
21979
22717
|
value: formatDateInputValue(field, formValues[field.name]),
|
|
21980
22718
|
disabled: replySent.value,
|
|
21981
22719
|
class: "yc-display-form-card__control yc-display-form-card__input",
|
|
21982
22720
|
onInput: (event) => handleDateInput(field, event)
|
|
21983
|
-
}, null, 40,
|
|
21984
|
-
key:
|
|
22721
|
+
}, null, 40, _hoisted_19$a)) : isNumberField(field) ? (openBlock(), createElementBlock("input", {
|
|
22722
|
+
key: 4,
|
|
21985
22723
|
type: "number",
|
|
21986
22724
|
step: field.type === "integer" ? "1" : "any",
|
|
21987
22725
|
inputmode: field.type === "integer" ? "numeric" : "decimal",
|
|
@@ -21990,15 +22728,15 @@ var _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
|
21990
22728
|
placeholder: `\u8BF7\u8F93\u5165${field.label || field.name}`,
|
|
21991
22729
|
class: "yc-display-form-card__control yc-display-form-card__input",
|
|
21992
22730
|
onInput: (event) => handleNumberInput(field, event)
|
|
21993
|
-
}, null, 40,
|
|
21994
|
-
key:
|
|
22731
|
+
}, null, 40, _hoisted_20$a)) : field.type === "boolean" ? (openBlock(), createElementBlock("button", {
|
|
22732
|
+
key: 5,
|
|
21995
22733
|
type: "button",
|
|
21996
22734
|
role: "switch",
|
|
21997
22735
|
"aria-checked": Boolean(formValues[field.name]),
|
|
21998
22736
|
disabled: replySent.value,
|
|
21999
22737
|
class: normalizeClass(["yc-display-form-card__switch", { "is-checked": Boolean(formValues[field.name]) }]),
|
|
22000
22738
|
onClick: ($event) => formValues[field.name] = !formValues[field.name]
|
|
22001
|
-
}, [..._cache[
|
|
22739
|
+
}, [..._cache[2] || (_cache[2] = [
|
|
22002
22740
|
createElementVNode(
|
|
22003
22741
|
"span",
|
|
22004
22742
|
{ class: "yc-display-form-card__switch-thumb" },
|
|
@@ -22006,7 +22744,7 @@ var _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
|
22006
22744
|
-1
|
|
22007
22745
|
/* CACHED */
|
|
22008
22746
|
)
|
|
22009
|
-
])], 10,
|
|
22747
|
+
])], 10, _hoisted_21$9)) : isUploadField(field) ? (openBlock(), createElementBlock("div", _hoisted_22$9, [
|
|
22010
22748
|
createElementVNode("input", {
|
|
22011
22749
|
ref_for: true,
|
|
22012
22750
|
ref: (el) => setFileInputRef(field.name, el),
|
|
@@ -22015,8 +22753,8 @@ var _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
|
22015
22753
|
accept: field.widget === "image" ? "image/*" : void 0,
|
|
22016
22754
|
class: "yc-display-form-card__upload-input",
|
|
22017
22755
|
onChange: (event) => handleFileInputChange(field, event)
|
|
22018
|
-
}, null, 40,
|
|
22019
|
-
createElementVNode("div",
|
|
22756
|
+
}, null, 40, _hoisted_23$7),
|
|
22757
|
+
createElementVNode("div", _hoisted_24$6, [
|
|
22020
22758
|
(openBlock(true), createElementBlock(
|
|
22021
22759
|
Fragment,
|
|
22022
22760
|
null,
|
|
@@ -22027,22 +22765,22 @@ var _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
|
22027
22765
|
key: `${item.attachment.fileRef || item.attachment.fileName}-${idx}`
|
|
22028
22766
|
},
|
|
22029
22767
|
[
|
|
22030
|
-
item.previewUrl ? (openBlock(), createElementBlock("div",
|
|
22768
|
+
item.previewUrl ? (openBlock(), createElementBlock("div", _hoisted_25$6, [
|
|
22031
22769
|
createElementVNode("img", {
|
|
22032
22770
|
src: item.previewUrl,
|
|
22033
22771
|
alt: item.attachment.fileName
|
|
22034
|
-
}, null, 8,
|
|
22772
|
+
}, null, 8, _hoisted_26$6),
|
|
22035
22773
|
!replySent.value ? (openBlock(), createElementBlock("button", {
|
|
22036
22774
|
key: 0,
|
|
22037
22775
|
type: "button",
|
|
22038
22776
|
class: "yc-display-form-card__thumb-remove",
|
|
22039
22777
|
title: "\u79FB\u9664",
|
|
22040
22778
|
onClick: ($event) => removeUploadedItem(field.name, idx)
|
|
22041
|
-
}, " \xD7 ", 8,
|
|
22042
|
-
])) : (openBlock(), createElementBlock("div",
|
|
22779
|
+
}, " \xD7 ", 8, _hoisted_27$6)) : createCommentVNode("v-if", true)
|
|
22780
|
+
])) : (openBlock(), createElementBlock("div", _hoisted_28$6, [
|
|
22043
22781
|
createElementVNode(
|
|
22044
22782
|
"span",
|
|
22045
|
-
|
|
22783
|
+
_hoisted_29$6,
|
|
22046
22784
|
toDisplayString(item.attachment.fileName),
|
|
22047
22785
|
1
|
|
22048
22786
|
/* TEXT */
|
|
@@ -22053,7 +22791,7 @@ var _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
|
22053
22791
|
class: "yc-display-form-card__file-remove",
|
|
22054
22792
|
title: "\u79FB\u9664",
|
|
22055
22793
|
onClick: ($event) => removeUploadedItem(field.name, idx)
|
|
22056
|
-
}, " \xD7 ", 8,
|
|
22794
|
+
}, " \xD7 ", 8, _hoisted_30$6)) : createCommentVNode("v-if", true)
|
|
22057
22795
|
]))
|
|
22058
22796
|
],
|
|
22059
22797
|
64
|
|
@@ -22073,32 +22811,66 @@ var _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
|
22073
22811
|
disabled: Boolean(uploadingFields[field.name]),
|
|
22074
22812
|
onClick: ($event) => triggerFileSelect(field.name)
|
|
22075
22813
|
}, [
|
|
22076
|
-
uploadingFields[field.name] ? (openBlock(), createElementBlock("span",
|
|
22814
|
+
uploadingFields[field.name] ? (openBlock(), createElementBlock("span", _hoisted_32$5, "\u4E0A\u4F20\u4E2D\u2026")) : (openBlock(), createElementBlock(
|
|
22077
22815
|
"span",
|
|
22078
|
-
|
|
22816
|
+
_hoisted_33$4,
|
|
22079
22817
|
toDisplayString(field.widget === "image" ? "+ \u4E0A\u4F20\u56FE\u7247" : "+ \u4E0A\u4F20\u9644\u4EF6"),
|
|
22080
22818
|
1
|
|
22081
22819
|
/* TEXT */
|
|
22082
22820
|
))
|
|
22083
|
-
], 10,
|
|
22821
|
+
], 10, _hoisted_31$6)) : createCommentVNode("v-if", true)
|
|
22084
22822
|
])
|
|
22085
|
-
])) : field
|
|
22086
|
-
key:
|
|
22087
|
-
|
|
22823
|
+
])) : isPhoneField(field) ? (openBlock(), createElementBlock("input", {
|
|
22824
|
+
key: 7,
|
|
22825
|
+
type: "tel",
|
|
22826
|
+
inputmode: "tel",
|
|
22827
|
+
maxlength: "20",
|
|
22088
22828
|
value: String((_d = formValues[field.name]) != null ? _d : ""),
|
|
22089
22829
|
disabled: replySent.value,
|
|
22090
22830
|
placeholder: `\u8BF7\u8F93\u5165${field.label || field.name}`,
|
|
22831
|
+
class: normalizeClass(["yc-display-form-card__control yc-display-form-card__input", { "is-invalid": Boolean(fieldValidationErrors[field.name]) }]),
|
|
22832
|
+
onInput: (event) => {
|
|
22833
|
+
formValues[field.name] = event.target.value;
|
|
22834
|
+
delete fieldValidationErrors[field.name];
|
|
22835
|
+
},
|
|
22836
|
+
onBlur: ($event) => handleFieldBlur(field)
|
|
22837
|
+
}, null, 42, _hoisted_34$4)) : isEmailField(field) ? (openBlock(), createElementBlock("input", {
|
|
22838
|
+
key: 8,
|
|
22839
|
+
type: "email",
|
|
22840
|
+
inputmode: "email",
|
|
22841
|
+
value: String((_e = formValues[field.name]) != null ? _e : ""),
|
|
22842
|
+
disabled: replySent.value,
|
|
22843
|
+
placeholder: `\u8BF7\u8F93\u5165${field.label || field.name}`,
|
|
22844
|
+
class: normalizeClass(["yc-display-form-card__control yc-display-form-card__input", { "is-invalid": Boolean(fieldValidationErrors[field.name]) }]),
|
|
22845
|
+
onInput: (event) => {
|
|
22846
|
+
formValues[field.name] = event.target.value;
|
|
22847
|
+
delete fieldValidationErrors[field.name];
|
|
22848
|
+
},
|
|
22849
|
+
onBlur: ($event) => handleFieldBlur(field)
|
|
22850
|
+
}, null, 42, _hoisted_35$4)) : field.widget === "textarea" ? (openBlock(), createElementBlock("textarea", {
|
|
22851
|
+
key: 9,
|
|
22852
|
+
rows: "3",
|
|
22853
|
+
value: String((_f = formValues[field.name]) != null ? _f : ""),
|
|
22854
|
+
disabled: replySent.value,
|
|
22855
|
+
placeholder: `\u8BF7\u8F93\u5165${field.label || field.name}`,
|
|
22091
22856
|
class: "yc-display-form-card__control yc-display-form-card__textarea",
|
|
22092
22857
|
onInput: (event) => formValues[field.name] = event.target.value
|
|
22093
|
-
}, null, 40,
|
|
22094
|
-
key:
|
|
22858
|
+
}, null, 40, _hoisted_36$3)) : (openBlock(), createElementBlock("input", {
|
|
22859
|
+
key: 10,
|
|
22095
22860
|
type: "text",
|
|
22096
|
-
value: String((
|
|
22861
|
+
value: String((_g = formValues[field.name]) != null ? _g : ""),
|
|
22097
22862
|
disabled: replySent.value,
|
|
22098
22863
|
placeholder: `\u8BF7\u8F93\u5165${field.label || field.name}`,
|
|
22099
22864
|
class: "yc-display-form-card__control yc-display-form-card__input",
|
|
22100
22865
|
onInput: (event) => formValues[field.name] = event.target.value
|
|
22101
|
-
}, null, 40,
|
|
22866
|
+
}, null, 40, _hoisted_37$3)),
|
|
22867
|
+
fieldValidationErrors[field.name] ? (openBlock(), createElementBlock(
|
|
22868
|
+
"span",
|
|
22869
|
+
_hoisted_38$3,
|
|
22870
|
+
toDisplayString(fieldValidationErrors[field.name]),
|
|
22871
|
+
1
|
|
22872
|
+
/* TEXT */
|
|
22873
|
+
)) : createCommentVNode("v-if", true)
|
|
22102
22874
|
],
|
|
22103
22875
|
2
|
|
22104
22876
|
/* CLASS */
|
|
@@ -22108,37 +22880,109 @@ var _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
|
22108
22880
|
/* KEYED_FRAGMENT */
|
|
22109
22881
|
))
|
|
22110
22882
|
])) : createCommentVNode("v-if", true),
|
|
22111
|
-
createElementVNode("div",
|
|
22883
|
+
createElementVNode("div", _hoisted_39$2, [
|
|
22884
|
+
resolvedMode.value === "reply" && replySent.value ? (openBlock(), createElementBlock("button", {
|
|
22885
|
+
key: 0,
|
|
22886
|
+
type: "button",
|
|
22887
|
+
class: "yc-display-form-card__btn is-default",
|
|
22888
|
+
onClick: unlockReplyEdit
|
|
22889
|
+
}, " \u4FEE\u6539\u91CD\u63D0 ")) : createCommentVNode("v-if", true),
|
|
22112
22890
|
createElementVNode("button", {
|
|
22113
22891
|
type: "button",
|
|
22114
22892
|
class: "yc-display-form-card__btn is-primary",
|
|
22115
22893
|
disabled: !canExecute.value || executing.value,
|
|
22116
22894
|
onClick: handleExecute
|
|
22117
|
-
}, toDisplayString(executing.value ? "\u5904\u7406\u4E2D\u2026" : resolvedSubmitLabel.value), 9,
|
|
22895
|
+
}, toDisplayString(executing.value ? "\u5904\u7406\u4E2D\u2026" : resolvedSubmitLabel.value), 9, _hoisted_40$2),
|
|
22118
22896
|
createElementVNode("button", {
|
|
22119
22897
|
type: "button",
|
|
22120
22898
|
class: "yc-display-form-card__btn is-default",
|
|
22121
22899
|
disabled: executing.value || replySent.value,
|
|
22122
22900
|
onClick: handleReset
|
|
22123
|
-
}, " \u91CD\u7F6E ", 8,
|
|
22901
|
+
}, " \u91CD\u7F6E ", 8, _hoisted_41$2)
|
|
22124
22902
|
]),
|
|
22125
22903
|
errorMessage.value ? (openBlock(), createElementBlock(
|
|
22126
22904
|
"div",
|
|
22127
|
-
|
|
22905
|
+
_hoisted_42$2,
|
|
22128
22906
|
toDisplayString(errorMessage.value),
|
|
22129
22907
|
1
|
|
22130
22908
|
/* TEXT */
|
|
22131
22909
|
)) : createCommentVNode("v-if", true),
|
|
22132
22910
|
submitReceipt.value ? (openBlock(), createElementBlock(
|
|
22133
22911
|
"div",
|
|
22134
|
-
|
|
22912
|
+
_hoisted_43$2,
|
|
22135
22913
|
toDisplayString(submitReceipt.value),
|
|
22136
22914
|
1
|
|
22137
22915
|
/* TEXT */
|
|
22138
22916
|
)) : createCommentVNode("v-if", true),
|
|
22139
|
-
|
|
22140
|
-
(
|
|
22141
|
-
|
|
22917
|
+
traceSteps.value.length ? (openBlock(), createElementBlock("div", _hoisted_44$1, [
|
|
22918
|
+
createElementVNode("button", {
|
|
22919
|
+
type: "button",
|
|
22920
|
+
class: "yc-display-form-card__trace-toggle",
|
|
22921
|
+
onClick: _cache[0] || (_cache[0] = ($event) => traceExpanded.value = !traceExpanded.value)
|
|
22922
|
+
}, [
|
|
22923
|
+
createElementVNode(
|
|
22924
|
+
"span",
|
|
22925
|
+
null,
|
|
22926
|
+
" \u6267\u884C\u8FFD\u8E2A\uFF08" + toDisplayString(traceSteps.value.length) + " \u6B65\uFF09 ",
|
|
22927
|
+
1
|
|
22928
|
+
/* TEXT */
|
|
22929
|
+
),
|
|
22930
|
+
createElementVNode(
|
|
22931
|
+
"span",
|
|
22932
|
+
_hoisted_45$1,
|
|
22933
|
+
toDisplayString(traceExpanded.value ? "\u6536\u8D77" : "\u5C55\u5F00"),
|
|
22934
|
+
1
|
|
22935
|
+
/* TEXT */
|
|
22936
|
+
)
|
|
22937
|
+
]),
|
|
22938
|
+
traceExpanded.value ? (openBlock(), createElementBlock("ul", _hoisted_46$1, [
|
|
22939
|
+
(openBlock(true), createElementBlock(
|
|
22940
|
+
Fragment,
|
|
22941
|
+
null,
|
|
22942
|
+
renderList(traceSteps.value, (step) => {
|
|
22943
|
+
return openBlock(), createElementBlock(
|
|
22944
|
+
"li",
|
|
22945
|
+
{
|
|
22946
|
+
key: step.id,
|
|
22947
|
+
class: normalizeClass(["yc-display-form-card__trace-item", `is-${step.status}`])
|
|
22948
|
+
},
|
|
22949
|
+
[
|
|
22950
|
+
_cache[3] || (_cache[3] = createElementVNode(
|
|
22951
|
+
"span",
|
|
22952
|
+
{ class: "yc-display-form-card__trace-dot" },
|
|
22953
|
+
null,
|
|
22954
|
+
-1
|
|
22955
|
+
/* CACHED */
|
|
22956
|
+
)),
|
|
22957
|
+
createElementVNode("div", _hoisted_47$1, [
|
|
22958
|
+
createElementVNode(
|
|
22959
|
+
"div",
|
|
22960
|
+
_hoisted_48$1,
|
|
22961
|
+
toDisplayString(step.label),
|
|
22962
|
+
1
|
|
22963
|
+
/* TEXT */
|
|
22964
|
+
),
|
|
22965
|
+
step.detail ? (openBlock(), createElementBlock(
|
|
22966
|
+
"div",
|
|
22967
|
+
_hoisted_49$1,
|
|
22968
|
+
toDisplayString(step.detail),
|
|
22969
|
+
1
|
|
22970
|
+
/* TEXT */
|
|
22971
|
+
)) : createCommentVNode("v-if", true)
|
|
22972
|
+
])
|
|
22973
|
+
],
|
|
22974
|
+
2
|
|
22975
|
+
/* CLASS */
|
|
22976
|
+
);
|
|
22977
|
+
}),
|
|
22978
|
+
128
|
|
22979
|
+
/* KEYED_FRAGMENT */
|
|
22980
|
+
))
|
|
22981
|
+
])) : createCommentVNode("v-if", true)
|
|
22982
|
+
])) : createCommentVNode("v-if", true),
|
|
22983
|
+
hasExecuted.value ? (openBlock(), createElementBlock("div", _hoisted_50$1, [
|
|
22984
|
+
((_a = resultRows.value) == null ? void 0 : _a.length) ? (openBlock(), createElementBlock("div", _hoisted_51$1, [
|
|
22985
|
+
createElementVNode("table", _hoisted_52$1, [
|
|
22142
22986
|
createElementVNode("thead", null, [
|
|
22143
22987
|
createElementVNode("tr", null, [
|
|
22144
22988
|
(openBlock(true), createElementBlock(
|
|
@@ -22187,7 +23031,7 @@ var _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
|
22187
23031
|
))
|
|
22188
23032
|
])
|
|
22189
23033
|
])
|
|
22190
|
-
])) : resultDetailEntries.value.length ? (openBlock(), createElementBlock("div",
|
|
23034
|
+
])) : resultDetailEntries.value.length ? (openBlock(), createElementBlock("div", _hoisted_53$1, [
|
|
22191
23035
|
(openBlock(true), createElementBlock(
|
|
22192
23036
|
Fragment,
|
|
22193
23037
|
null,
|
|
@@ -22198,14 +23042,14 @@ var _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
|
22198
23042
|
}, [
|
|
22199
23043
|
createElementVNode(
|
|
22200
23044
|
"span",
|
|
22201
|
-
|
|
23045
|
+
_hoisted_54$1,
|
|
22202
23046
|
toDisplayString(entry.label),
|
|
22203
23047
|
1
|
|
22204
23048
|
/* TEXT */
|
|
22205
23049
|
),
|
|
22206
23050
|
createElementVNode(
|
|
22207
23051
|
"span",
|
|
22208
|
-
|
|
23052
|
+
_hoisted_55$1,
|
|
22209
23053
|
toDisplayString(entry.value),
|
|
22210
23054
|
1
|
|
22211
23055
|
/* TEXT */
|
|
@@ -22226,7 +23070,7 @@ var _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
|
22226
23070
|
}
|
|
22227
23071
|
});
|
|
22228
23072
|
|
|
22229
|
-
var FormCard = /* @__PURE__ */ _export_sfc$1(_sfc_main$Y, [["__scopeId", "data-v-
|
|
23073
|
+
var FormCard = /* @__PURE__ */ _export_sfc$1(_sfc_main$Y, [["__scopeId", "data-v-c0193546"]]);
|
|
22230
23074
|
|
|
22231
23075
|
const YcDisplayTableCard = withInstall(TableCard);
|
|
22232
23076
|
const YcDisplayMetricsCard = withInstall(MetricsCard);
|
|
@@ -75805,7 +76649,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
75805
76649
|
}
|
|
75806
76650
|
});
|
|
75807
76651
|
|
|
75808
|
-
const version = "1.2.
|
|
76652
|
+
const version = "1.2.8";
|
|
75809
76653
|
|
|
75810
76654
|
const install = installer.install;
|
|
75811
76655
|
|