@farris/ui-vue
Version:
Farris Vue, a Farris Design based Vue3 component library.
1,368 lines • 1.94 MB
JavaScript
var sg = Object.defineProperty;
var ug = (e, t, n) => t in e ? sg(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
var W = (e, t, n) => ug(e, typeof t != "symbol" ? t + "" : t, n);
import { getCustomClass as ft, isMobilePhone as Ot, withInstall as xt, isImageUrl as cg, urlPrependBasePath as mo, isBase64ImageUrl as dg, getCustomStyle as Zt, FormSchemaEntityField$Type as Mo, FormSchemaEntityFieldType$Type as dl, EVENT_PROPERTY_TAB_IDS as ia, getMaxZIndex as wl, useGuid as gn, resolveField as Qt, useDateFormat as Vn, useResizeObserver as is, CHECKBOX_CONTEXT as Gs, useCheck as _s, radioCheckboxCommonProps as Gd, useTouchMomentum as fg, useTouch as pg, useCommonUtils as Fa, useBem as fn, useFarrisConfig as mg, useThirdComponent as _d, FormSchemaEntityFieldTypeName as gl, formatTime as hg, getDateObject as ya, isLeapYear as vg, compareDate as Di, getDaysInMonth as gg, useTextBox as Qd, useClear as Kd, encrypt as yg, useNumberFormat as Xd, useDelayedRef as bg, RADIOGROUP_CONTEXT as Jd, useReqAnimationFrame as Cg, getTimeObject as Rr, formatObjecTime as wg } from "../common/index.esm.js";
import { computed as A, defineComponent as ce, createVNode as r, provide as Wt, ref as C, inject as Me, onMounted as Ve, watch as K, Fragment as rt, createTextVNode as Se, nextTick as it, Teleport as Xa, createApp as Do, onUnmounted as Vt, onBeforeMount as Ao, watchEffect as dr, Transition as Ai, shallowRef as pi, render as $r, h as Sg, cloneVNode as xg, mergeProps as qt, withDirectives as Bt, vShow as wa, onUpdated as Tg, onBeforeUnmount as Zd, withModifiers as jt, vModelText as Pa, toRef as kg, reactive as ut, resolveDirective as On, isVNode as Ln, Comment as ef, getCurrentInstance as fr, resolveComponent as Gn, toRefs as Ml, toRaw as Fg, vModelCheckbox as Qs, vModelSelect as Pg, isRef as Mg } from "vue";
import { resolveAppearance as Ct, createPropsResolver as Ze, getPropsResolverGenerator as pn, getSchemaByTypeForDesigner as Ig, schemaResolverMap as Eg, propertyEffectMap as Bg, propertyConfigSchemaMap as Dg, schemaMap as Ag, getSchemaByType as Sl, resolveToolbar as tf, createPageHeaderEventHandlerResolver as nf, createEventsResolver as af, createFormBindingResolver as Og } from "../dynamic-resolver/index.esm.js";
import { useDesignerComponent as _t, DgControl as Pe, canvasChanged as mi, refreshCanvas as Vg, useDragulaCommonRule as of, UseTemplateDragAndDropRules as lf, setPositionOfButtonGroup as rf } from "../designer-canvas/index.esm.js";
import { LocaleService as Ne } from "../locale/index.esm.js";
import { FNotifyService as Ma, F_NOTIFY_SERVICE_TOKEN as Il } from "../notify/index.esm.js";
import { isPlainObject as Ec, cloneDeep as vt, debounce as ra, isFunction as jr, isUndefined as Bn, mergeWith as Oi, merge as xl, isNil as Lg, isNaN as Ng, flatten as sf, get as ja, isEmpty as Rg } from "lodash-es";
import uf from "../color-picker/index.esm.js";
import Vi, { FTouchComboListContainer as cf, useDataSource as $g, FComboListContainer as jg, FComboList as Oo } from "../combo-list/index.esm.js";
import df, { useNumber as Hg, useFormat as zg, useSpinner as Wg, useTextBox as qg, getSpinnerRender as Ug, getNumberTextBoxRender as Yg, FNumberSpinner as hi, useNumberLocales as Gg } from "../number-spinner/index.esm.js";
import { FMessageBoxService as _g } from "../message-box/index.esm.js";
import fl, { FButton as Li } from "../button/index.esm.js";
import Ja from "../popover/index.esm.js";
import { BaseControlProperty as ff, InputBaseProperty as Ks, ExpressionProperty as Qg, FormBindingType as ol, SchemaDOMMapping as Kg } from "../property-panel/index.esm.js";
import Xg, { FieldSelectorRepositoryToken as vi } from "../field-selector/index.esm.js";
import "../collection-property-editor/index.esm.js/src/use-button-items.designer";
import Jg from "../tags/index.esm.js";
import { useInputExpand as Xs } from "../common/index.esm.js/text-box/use-input-expand";
import Js from "../drawer/index.esm.js";
import { useFilter as El, useIdentify as Bl, useHierarchy as Dl, useGroupData as Zs, useDataView as Al, useSelection as Ol, usePagination as eu, useRow as Vl, useEdit as Ll, useVisualDataBound as Nl, useVisualDataCell as Rl, useVisualDataRow as $l, useVisualGroupRow as pf, useVisualSummaryRow as mf, useVisualData as jl, useSidebar as pr, useColumn as Hl, useVirtualScroll as zl, getHierarchyRow as hf, useLoading as vf, useSelectHierarchyItem as tu, useDataViewContainerStyle as mr, useCommandColumn as gf, useSettingColumn as yf, useSort as bf, useGroupColumn as nu, useCellPosition as hr, useFitColumn as au, useFilterHistory as Cf, useColumnFilter as wf, useDragColumn as Sf, getColumnHeader as xf, getSidebar as ou, getDisableMask as Tf, getHorizontalScrollbar as lu, getVerticalScrollbar as iu, getEmpty as ru, getPagination as kf, getSummary as Ff, ColumnSettingSolution as Pf, refreshScrollAfterDataSourceLoad as Mf, COMMAND_COLUMN_DATA_TYPE as aa, SETTING_COLUMN_DATA_TYPE as oa, SETTING_COLUMN_FIELD as Zg, COMMAND_COLUMN_FIELD as ey, CellMode as If, useScreen as Ef, useCellContentStyle as ty, getFilterPanel as ny, getGroupPanel as ay, useAdapt as oy, useNavigation as ly } from "../data-view/index.esm.js";
import vr, { FCheckbox as su } from "../checkbox/index.esm.js";
import Ia, { FButtonEdit as Wl } from "../button-edit/index.esm.js";
import Bf from "../list-view/index.esm.js";
import Et from "bignumber.js";
import uu from "../../designer/button-edit/index.esm.js";
import Sa from "../tree-view/index.esm.js";
import Df, { FInputGroup as Ni } from "../input-group/index.esm.js";
import { useResizeObserver as cu } from "@vueuse/core";
import { resolveField as iy } from "../common/index.esm.js/utils/resolve-field";
import ry from "../binding-selector/index.esm.js";
import sy from "../accordion/index.esm.js";
import uy from "../../designer/avatar/index.esm.js";
import cy from "../../designer/approval-logs/index.esm.js";
import dy from "../button-group/index.esm.js";
import fy from "../calendar/index.esm.js";
import py from "../../designer/capsule/index.esm.js";
import Bc from "../../designer/checkbox/index.esm.js";
import Dc from "../../designer/checkbox-group/index.esm.js";
import my from "../content-container/index.esm.js";
import hy from "../table/index.esm.js";
import vy from "../../designer/data-grid/index.esm.js";
import gy from "../../designer/date-picker/index.esm.js";
import yy from "../dropdown/index.esm.js";
import by from "../../designer/dynamic-form/index.esm.js";
import Cy from "../external-container/index.esm.js";
import wy from "../filter-bar/index.esm.js";
import Sy from "../image-cropper/index.esm.js";
import xy from "../../designer/input-group/index.esm.js";
import du, { FLayout as Ty, FLayoutPane as Io } from "../layout/index.esm.js";
import ky from "../list-nav/index.esm.js";
import Fy from "../../designer/list-view/index.esm.js";
import Af from "../lookup/index.esm.js";
import Py from "../language-textbox/index.esm.js";
import My from "../../designer/nav/index.esm.js";
import Iy from "../../designer/number-spinner/index.esm.js";
import Ey from "../number-range/index.esm.js";
import By from "../order/index.esm.js";
import Dy from "../page-header/index.esm.js";
import Ay from "../page-footer/index.esm.js";
import Of from "../pagination/index.esm.js";
import Oy from "../progress/index.esm.js";
import Vy, { useCondition as Ly, useSolutionUtils as Vf } from "../query-solution/index.esm.js";
import Ny from "../../designer/radio-group/index.esm.js";
import Ry from "../../designer/rate/index.esm.js";
import $y, { commonToolbarItemDesignProps as jy } from "../../designer/response-toolbar/index.esm.js";
import Hy from "../response-layout/index.esm.js";
import zy from "../../designer/response-layout-editor/index.esm.js";
import Wy from "../search-box/index.esm.js";
import qy from "../../designer/section/index.esm.js";
import Uy from "../smoke-detector/index.esm.js";
import Yy from "../splitter/index.esm.js";
import Lf from "../step/index.esm.js";
import Gy from "../../designer/switch/index.esm.js";
import _y from "../../designer/tabs/index.esm.js";
import Qy from "../../designer/tags/index.esm.js";
import Ky from "../text/index.esm.js";
import Xy from "../../designer/time-picker/index.esm.js";
import Jy from "../transfer/index.esm.js";
import Zy from "../uploader/index.esm.js";
import eb from "../verify-detail/index.esm.js";
import tb from "../component/index.esm.js";
import nb from "../video/index.esm.js";
import ab from "../../designer/textarea/index.esm.js";
import ob from "../../designer/tree-grid/index.esm.js";
import lb from "../fieldset/index.esm.js";
import ib from "../../designer/drawer/index.esm.js";
import rb from "../html-template/index.esm.js";
import sb from "../image/index.esm.js";
import ub from "../comment/index.esm.js";
import cb from "../../designer/wizard/index.esm.js";
import { loadRegister as db, useComponentManager as fb, useEntityState as pb, useDynamicViewUtils as mb, componentMap as Hr, resolverMap as hb, componentPropsConverter as vb } from "../dynamic-view/index.esm.js";
import rs from "../section/index.esm.js";
import gb from "../combo-tree/index.esm.js";
import yb from "../events-editor/index.esm.js";
import bb from "../mapping-editor/index.esm.js";
import Cb from "../schema-selector/index.esm.js";
import Nf, { EditorType as wb } from "../event-parameter/index.esm.js";
import Sb from "../filter-condition-editor/index.esm.js";
import xb from "../sort-condition-editor/index.esm.js";
import Tb from "../menu-lookup/index.esm.js";
import kb from "../json-editor/index.esm.js";
import Fb from "../property-editor/index.esm.js";
import Pb, { FExpressionTextbox as Mb } from "../expression-editor/index.esm.js";
import Ib from "../code-editor/index.esm.js";
import Eb from "../collection-property-editor/index.esm.js";
import Bb from "../../designer/modal/index.esm.js";
import Db from "../tooltip/index.esm.js";
import Ab, { FTreeGrid as fu } from "../tree-grid/index.esm.js";
import Ob, { FDynamicForm as Vb, FDynamicFormLabel as Lb, FDynamicFormGroup as Ri, useTypeResolver as Rf } from "../dynamic-form/index.esm.js";
import Nb, { FTimePickerTimeView as Ac, convertToDate as Rb, FTouchTimePickerTimeView as $b } from "../time-picker/index.esm.js";
import ss from "../date-picker/index.esm.js";
import pu from "../capsule/index.esm.js";
import { createI18n as jb, useI18n as Hb } from "vue-i18n";
import { useConditionValue as zb, useConditionUtils as mu, FConditionFields as Oc, FConditionFieldsDesign as Vc, CompareType as St } from "../condition/index.esm.js";
import Wb, { radioGroupProps as qb, FRadioGroup as Ub } from "../radio-group/index.esm.js";
import { DgControl as Yb } from "../designer-canvas/index.esm.js/";
import { F_MODAL_SERVICE_TOKEN as hu } from "../modal/index.esm.js";
import us, { FDataGrid as ql } from "../data-grid/index.esm.js";
import { FSwitch as Gb } from "../switch/index.esm.js";
import { FDatePicker as Lc } from "../components/index.esm.js";
import { FCheckboxGroup as _b } from "../checkbox-group/index.esm.js";
import { SearchRelation as zr, SearchComparisonOperator as Wr } from "../field-search-box/index.esm.js";
import Vo from "../scroll-list/index.esm.js";
import vu from "../response-toolbar/index.esm.js";
import Qb, { FLoadingService as Kb } from "../loading/index.esm.js";
import Xb, { FTabPage as Jb } from "../tabs/index.esm.js";
import Zb from "../textarea/index.esm.js";
import "../avatar/index.esm.js/src/property-config/avatar.property-config";
import "../checkbox-group/index.esm.js/src/property-config/check-group.property-config";
import "../checkbox/index.esm.js/src/property-config/checkbox.property-config";
import "../combo-list/index.esm.js/src/property-config/combo-list.property-config";
import "../date-picker/index.esm.js/src/property-config/date-picker.property-config";
import "../input-group/index.esm.js/src/property-config/input-group.property-config";
import "../language-textbox/index.esm.js/src/property-config/language-textbox.property-config";
import "../lookup/index.esm.js/src/property-config/lookup.property-config";
import "../number-range/index.esm.js/src/property-config/number-range.property-config";
import "../number-spinner/index.esm.js/src/property-config/number-spinner.property-config";
import "../radio-group/index.esm.js/src/property-config/radio-group.property-config";
import "../switch/index.esm.js/src/property-config/switch.property-config";
import "../textarea/index.esm.js/src/property-config/textarea.property-config";
import "../time-picker/index.esm.js/src/property-config/time-picker.property-config";
const eC = "https://json-schema.org/draft/2020-12/schema", tC = "https://farris-design.gitee.io/component.schema.json", nC = "button", aC = "A Farris Visual Button", oC = "object", lC = {
id: {
description: "The unique identifier for a component",
type: "string"
},
type: {
description: "The type string of component",
type: "string",
default: "button"
},
text: {
description: "The text string of component",
type: "string"
},
disabled: {
description: "",
type: "boolean",
default: !1
},
appearance: {
description: "",
type: "object",
properties: {
class: {
type: "string"
},
style: {
type: "string"
}
},
default: {}
},
visible: {
description: "",
type: "boolean",
default: !0
},
size: {
description: "大小",
type: "string",
default: "middle"
},
icon: {
description: "图标",
type: "string",
default: ""
},
onClick: {
description: "点击事件",
type: "string",
default: ""
}
}, iC = [
"id",
"type",
"text"
], rC = {
onClick: "点击事件"
}, sC = {
$schema: eC,
$id: tC,
title: nC,
description: aC,
type: oC,
properties: lC,
required: iC,
events: rC
}, uC = /* @__PURE__ */ new Map([
["appearance", Ct]
]);
function cC(e, t, n) {
return Object.assign(t, {
text: "按钮",
appearance: {
class: "btn btn-secondary"
}
}), t;
}
const gu = {
/**
* 组件唯一标识。
*/
id: String,
/**
* 按钮显示样式。
*
* @default 'primary'
*/
type: { type: String, default: "primary" },
/**
* 是否禁用按钮。
*
* @default false
*/
disabled: { type: Boolean, default: !1 },
/**
* 按钮尺寸,可选 small、middle、large。
*
* @default 'middle'
*/
size: { type: String, default: "middle" },
/**
* 按钮图标类名。
*
* @default ''
*/
icon: { type: String, default: "" },
/**
* 按钮文本。
*
* @default ''
*/
text: { type: String, default: "" },
/**
* 自定义 CSS 类名。
*
* @default ''
*/
customClass: { type: String, default: "" },
/**
* 自定义内联样式。
*
* @default ''
*/
customStyle: { type: String, default: "" },
/**
* 控制按钮是否可见。
*
* @default true
*/
visible: { type: Boolean, default: !0 }
}, $f = Ze(gu, sC, uC, cC);
function dC(e, t) {
function n(a) {
a.stopPropagation(), e.disabled || t.emit("click", a);
}
return {
onClickButton: n
};
}
function jf(e) {
const t = A(() => {
const a = {
"f-icon": !0
};
if (e.icon) {
const o = e.icon.trim().split(" ");
o && o.length && o.reduce((l, i) => (l[i] = !0, l), a);
}
return a;
}), n = A(() => !!(e.icon && e.icon.trim()));
return { iconClass: t, shouldShowIcon: n };
}
const $i = /* @__PURE__ */ ce({
name: "FButton",
props: gu,
emits: ["click"],
setup(e, t) {
const {
onClickButton: n
} = dC(e, t), {
iconClass: a,
shouldShowIcon: o
} = jf(e), l = A(() => {
const i = {
btn: !0,
"btn-lg": e.size === "large",
"btn-md": e.size !== "large" && e.size !== "small",
"btn-sm": e.size === "small",
"btn-icontext": o.value
};
return i[`btn-${e.type}`] = !0, e.customClass && (typeof e.customClass == "string" ? ft(i, e.customClass) : Object.keys(e.customClass).reduce((s, c) => (s[c] = e.customClass[c], s), i)), i;
});
return () => e.visible ? r("button", {
class: l.value,
disabled: e.disabled,
style: e.customStyle,
onClick: (i) => n(i)
}, [o.value && r("i", {
class: a.value
}, null), e.text ? e.text : "", t.slots.default && t.slots.default()]) : null;
}
}), Hf = /* @__PURE__ */ new Map([
["appearance", Ct],
["size", (e, t) => {
const n = {};
return t.width && (n.width = Number(t.width)), t.height && (n.height = Number(t.height)), n;
}]
]), fC = "https://json-schema.org/draft/2020-12/schema", pC = "https://farris-design.gitee.io/accordion.schema.json", mC = "accordion", hC = "A Farris Container Component", vC = "object", gC = {
id: {
description: "The unique identifier for a Accordion",
type: "string"
},
type: {
description: "The type string of Accordion component",
type: "string",
default: "accordion"
},
appearance: {
description: "",
type: "object",
properties: {
class: {
type: "string"
},
style: {
type: "string"
}
},
default: {}
},
contents: {
description: "",
type: "array",
default: []
},
customClass: {
description: "",
type: "string",
default: ""
},
size: {
description: "",
type: "object",
properties: {
width: {
type: "number"
},
height: {
type: "number"
}
},
default: null
},
enableFold: {
description: "",
type: "boolean",
default: !0
},
expanded: {
description: "",
type: "boolean",
default: !1
}
}, yC = [
"id",
"type",
"contents"
], bC = {
$schema: fC,
$id: pC,
title: mC,
description: hC,
type: vC,
properties: gC,
required: yC
};
function CC(e, t, n) {
return t;
}
const wC = "accordion", SC = "A Farris Component", xC = "object", TC = {
basic: {
description: "Basic Infomation",
title: "基本信息",
properties: {
id: {
description: "组件标识",
title: "标识",
type: "string",
readonly: !0
},
type: {
description: "组件类型",
title: "控件类型",
type: "select",
editor: {
type: "waiting for modification",
enum: []
}
}
}
}
}, kC = {
title: wC,
description: SC,
type: xC,
categories: TC
}, yu = {
/**
* 组件自定义样式,多个时使用空格分隔,如'class1 class2'
* @default ''
*/
customClass: { type: String, default: "" },
/**
* 是否允许收折
* @default true
*/
enableFold: { type: Boolean, default: !0 },
/**
* 是否展开所有面板
* @default false
*/
expanded: { type: Boolean, default: !1 },
/**
* 设置组件的高度
*/
height: { type: Number },
/**
* 设置组件的宽度
*/
width: { type: Number }
}, zf = Ze(yu, bC, Hf, CC, kC), bo = /* @__PURE__ */ ce({
name: "FAccordion",
props: yu,
emits: [],
setup(e, t) {
const n = A(() => ({
height: e.height ? `${e.height}px` : "",
width: e.width ? `${e.width}px` : ""
}));
Wt("accordionContext", {
parentProps: e
});
const a = A(() => ft({
"farris-panel": !0,
accordion: !0
}, e.customClass));
return () => r("div", {
class: a.value,
style: n.value
}, [t.slots.default && t.slots.default()]);
}
}), FC = "https://json-schema.org/draft/2020-12/schema", PC = "https://farris-design.gitee.io/accordion-item.schema.json", MC = "AccordionItem", IC = "A Farris Container Component", EC = "object", BC = {
id: {
description: "The unique identifier for a Accordion Item",
type: "string"
},
type: {
description: "The type string of Accordion Item component",
type: "string"
},
contents: {
description: "",
type: "array",
default: []
},
size: {
description: "",
type: "object",
properties: {
width: {
type: "number"
},
height: {
type: "number"
}
},
default: null
},
title: {
description: "",
type: "string",
default: ""
},
disable: {
description: "",
type: "boolean",
default: !1
}
}, DC = [
"id",
"type",
"contents"
], AC = {
$schema: FC,
$id: PC,
title: MC,
description: IC,
type: EC,
properties: BC,
required: DC
}, bu = {
active: { type: Boolean, default: !1 },
customClass: { type: String, default: "" },
disabled: { type: Boolean, default: !1 },
enableFold: { type: Boolean, default: !0 },
height: { type: Number },
iconUri: { type: String, default: "" },
maxHeight: { type: Number },
title: { type: String, default: "" },
width: { type: Number }
}, Wf = Ze(bu, AC, Hf), cs = /* @__PURE__ */ ce({
name: "FAccordionItem",
props: bu,
emits: ["ClickHeader"],
setup(e, t) {
const n = C(), a = Me("accordionContext"), o = C(e.title), l = C(e.active), i = A(() => {
var m;
return !!((m = a == null ? void 0 : a.parentProps) != null && m.enableFold) && e.enableFold;
});
function s() {
e.disabled || !i.value || (l.value = !l.value);
}
function c(m) {
t.emit("ClickHeader"), s();
}
const f = A(() => {
const m = {
card: !0,
"farris-panel-item": !0,
"f-state-disabled": e.disabled,
"f-state-selected": l.value
};
return ft(m, e.customClass);
}), d = A(() => !0), u = A(() => ({
"f-icon": !0,
"f-accordion-collapse": !l.value,
"f-accordion-expand": l.value
}));
function p() {
return n.value ? n.value.getBoundingClientRect().height : 0;
}
const h = A(() => {
const m = e.maxHeight ? {
transition: "maxHeight 0.36s ease 0s",
"max-height": l.value ? `${e.maxHeight}px` : 0
} : {
transition: "height 0.36s ease 0s",
height: l.value ? `${p()}px` : 0
};
return l.value || (m.overflow = "hidden"), m;
});
return Ve(() => {
var m;
(m = a == null ? void 0 : a.parentProps) != null && m.expanded && (l.value = !0);
}), () => r("div", {
class: f.value
}, [r("div", {
class: "card-header",
onClick: c
}, [r("div", {
class: "panel-item-title"
}, [e.iconUri && r("img", {
class: "panel-item-title-image",
src: e.iconUri,
title: "title-icon"
}, null), d.value && r("span", null, [o.value]), t.slots.head && t.slots.head(), i.value && r("i", {
class: u.value
}, null)]), r("div", {
class: "panel-item-tool"
}, [t.slots.toolbar && t.slots.toolbar()]), r("div", {
class: "panel-item-clear"
}, null)]), r("div", {
style: h.value
}, [r("div", {
class: "card-body",
ref: n
}, [t.slots.default && t.slots.default()])])]);
}
}), OC = /* @__PURE__ */ ce({
name: "FAccordionDesign",
props: yu,
emits: [],
setup(e, t) {
const n = A(() => ({
height: e.height ? `${e.height}px` : "",
width: e.width ? `${e.width}px` : ""
})), a = A(() => {
const s = e.customClass.split(" "), c = {
"farris-panel": !0,
accordion: !0
};
return s.reduce((f, d) => (f[d] = !0, f), c), c;
}), o = C(), l = Me("design-item-context"), i = _t(o, l);
return Ve(() => {
o.value.componentInstance = i;
}), t.expose(i.value), () => r("div", {
ref: o,
class: a.value,
style: n.value
}, [t.slots.default && t.slots.default()]);
}
}), VC = /* @__PURE__ */ ce({
name: "FAccordionItemDesign",
props: bu,
emits: [],
setup(e, t) {
const n = C(e.title), a = C(!1), o = C(!1);
function l() {
a.value = !a.value;
}
function i(v) {
l();
}
const s = A(() => ({
"f-state-disabled": o.value,
card: !0,
"farris-panel-item": !0,
"f-state-selected": a.value
})), c = A(() => !0), f = A(() => !1), d = A(() => ({
"f-icon": !0,
"f-accordion-collapse": !a.value,
"f-accordion-expand": a.value
})), u = A(() => {
const v = e.maxHeight ? {
transition: "maxHeight 0.36s ease 0s",
"max-height": a.value ? `${e.maxHeight}px` : 0
} : {
transition: "height 0.36s ease 0s",
height: a.value ? `${e.height}px` : 0
};
return a.value || (v.overflow = "hidden"), v;
});
function p() {
return !0;
}
function h() {
return !1;
}
function m() {
return !0;
}
return t.expose({
canMove: p(),
canSelectParent: h(),
canDelete: m(),
canNested: !0
}), () => r("div", {
class: s.value
}, [r("div", {
class: "card-header",
onClick: i
}, [r("div", {
class: "panel-item-title"
}, [c.value && r("span", null, [n.value]), f.value && t.slots.head && t.slots.head(), r("span", {
class: d.value
}, null)]), r("div", {
class: "panel-item-tool"
}, [t.slots.toolbar && t.slots.toolbar()]), r("div", {
class: "panel-item-clear"
}, null)]), r("div", {
style: u.value
}, [r("div", {
class: "card-body drag-container"
}, [t.slots.default && t.slots.default()])])]);
}
});
bo.install = (e) => {
e.component(bo.name, bo), e.component(cs.name, cs);
};
bo.register = (e, t, n, a) => {
e.accordion = bo, e["accordion-item"] = cs, t.accordion = zf, t["accordion-item"] = Wf;
};
bo.registerDesigner = (e, t, n) => {
e.accordion = OC, e["accordion-item"] = VC, t.accordion = zf, t["accordion-item"] = Wf;
};
const LC = "https://json-schema.org/draft/2020-12/schema", NC = "https://farris-design.gitee.io/approval-logs.schema.json", RC = "approval-logs", $C = "A Farris Business Component", jC = "object", HC = {
id: {
description: "The unique identifier for a component",
type: "string"
},
type: {
description: "The type string of a component",
type: "string",
default: "approval-logs"
},
dataId: {
type: "string",
default: ""
},
displayType: {
type: "string",
default: "card"
},
showForecastLogs: {
type: "boolean",
default: !1
},
showHistoryLogs: {
type: "boolean",
default: !1
},
workflowScriptUrl: {
type: "string",
default: "/platform/runtime/wf/webapp/mobiletaskcenter/taskComment.js"
}
}, zC = [
"id",
"type",
"displayType",
"showForecastLogs",
"showHistoryLogs"
], WC = {
$schema: LC,
$id: NC,
title: RC,
description: $C,
type: jC,
properties: HC,
required: zC
}, qC = /* @__PURE__ */ new Map([]);
function UC(e, t, n) {
var f, d;
const a = t, o = (f = n.bindingSourceContext) == null ? void 0 : f.entityFieldNode;
o && (a.binding = {
type: "Form",
path: o.bindingField,
field: o.id,
fullPath: o.path
});
const l = n.parentComponentInstance, i = (d = l == null ? void 0 : l.schema) == null ? void 0 : d.type;
if (!i || i === Pe.section.type)
return a;
const s = e.getSchemaByType("section"), c = Math.random().toString().slice(2, 6);
return Object.assign(s, {
id: `section-${c}`,
appearance: {
class: "f-section-in-mainsubcard"
},
mainTitle: "审批记录",
contents: [a]
}), s;
}
const qf = {
/** 单据ID */
dataId: { type: String, default: "" },
/** 展示类型 */
displayType: { type: String, default: "card" },
/** 是否展示预测日志 */
showForecastLogs: { type: Boolean, default: !1 },
/** 是否展示历史日志 */
showHistoryLogs: { type: Boolean, default: !1 },
/** 审批流脚本地址 */
workflowScriptUrl: { type: String, default: "" }
};
pn(
qf,
WC,
qC,
UC
);
const ri = {};
function YC() {
function e(n = 1) {
const a = n * 60 * 60 * 1e3, o = Date.now();
return o - o % a;
}
function t(n) {
if (!n)
return Promise.resolve();
if (ri[n])
return ri[n];
const a = new Promise((o, l) => {
const i = document.createElement("script");
i.src = n + `?v=${e()}`, i.type = "text/javascript", i.async = !0;
function s() {
i.removeEventListener("load", c), i.removeEventListener("error", f);
}
function c() {
s(), o();
}
function f(d) {
s(), delete ri[n], l(d);
}
i.addEventListener("load", c), i.addEventListener("error", f), document.head.appendChild(i);
});
return ri[n] = a, a;
}
return {
loadJsScript: t
};
}
const GC = /* @__PURE__ */ ce({
name: "FApprovalLogs",
props: qf,
emits: [],
setup(e, t) {
const {
loadJsScript: n
} = YC(), a = Ot(), o = C();
function l() {
return !!window.gspTaskCenterBizLog;
}
function i() {
return window.gspTaskCenterBizLog.ApprovalLogUtil;
}
function s() {
return e.displayType === "data-grid" && !a ? "datagrid" : "card";
}
function c() {
o.value && (o.value.innerHTML = "");
}
function f() {
if (s() === "datagrid") {
const h = {
bizInstId: e.dataId,
container: o.value,
showHeader: !1,
showViewProcess: !1,
ifForecast: !!e.showForecastLogs,
isIncludeHistory: !!e.showHistoryLogs
};
i().getWebHtml(h);
} else {
const h = {
bizInstId: e.dataId,
container: o.value,
terminal: a ? "mobile" : "web",
typeId: "wf",
showHeader: !1,
showForecastBtn: a,
ifForecast: !!e.showForecastLogs,
isIncludeHistory: !!e.showHistoryLogs
};
i().getWebLogsHtml(h);
}
}
async function d() {
if (!e.dataId || !o.value) {
c();
return;
}
l() || await n(e.workflowScriptUrl).catch((p) => {
console.error(p);
}), l() && f();
}
Ve(d), K([() => e.dataId, () => e.displayType, () => e.showForecastLogs, () => e.showHistoryLogs], () => {
c(), d();
});
function u() {
d();
}
return t.expose({
refreshData: u
}), () => r("div", {
ref: o,
class: "fv-approval-logs"
}, null);
}
});
xt(GC);
function _C(e, t, n) {
return t;
}
function QC(e, t) {
return t ? typeof t == "string" ? { imageType: t.split(",") } : { imageType: t } : { imageType: [] };
}
const KC = /* @__PURE__ */ new Map([
["appearance", Ct],
["imageType", QC]
]), XC = "https://json-schema.org/draft/2020-12/schema", JC = "https://farris-design.gitee.io/avatar.schema.json", ZC = "avatar", ew = "A Farris Component", tw = "object", nw = {
id: {
description: "The unique identifier for avatar",
type: "string"
},
type: {
description: "The type string of avatar",
type: "string",
default: "avatar"
},
appearance: {
description: "",
type: "object",
properties: {
class: {
type: "string"
},
style: {
type: "string"
}
},
default: {}
},
binding: {
description: "",
type: "object",
default: {}
},
disabled: {
type: "boolean",
default: !1
},
avatarWidth: {
description: "",
type: "number",
default: 100
},
title: {
description: "",
type: "string"
},
avatarHeight: {
description: "",
type: "number",
default: 100
},
readonly: {
description: "",
type: "boolean",
default: !1
},
cover: {
description: "",
type: "string"
},
visible: {
description: "",
type: "boolean",
default: !0
},
required: {
description: "",
type: "boolean",
default: !1
},
shape: {
description: "",
type: "string",
default: "circle"
},
maxSize: {
description: "允许头像上传的大小,单位MB",
type: "number",
default: 2
},
imageType: {
description: "支持的头像类型",
type: "array",
default: []
},
onImageChange: {
description: "",
type: "string"
}
}, aw = [
"id",
"type"
], ow = [
"id",
"appearance",
"binding",
"visible"
], lw = {
onImageChange: "头像变化后事件"
}, iw = {
$schema: XC,
$id: JC,
title: ZC,
description: ew,
type: tw,
properties: nw,
required: aw,
ignore: ow,
events: lw
}, Uf = {
/**
* 组件自定义样式
*/
customClass: { type: String, default: "" },
customStyle: { type: String, default: "" },
/**
* 头像宽度
* @default 100
*/
avatarWidth: { type: Number, default: 100 },
/**
* 头像高度
* @default 100
*/
avatarHeight: { type: Number, default: 100 },
/**
* 封面图片,无需双向绑定时使用
*/
cover: { type: String },
/**
* 只读
* @default false
*/
readonly: { type: Boolean, default: !1 },
visible: { type: Boolean, default: !0 },
required: { type: Boolean, default: !1 },
/**
* 头像形状
* @default 'circle'
*/
shape: { type: String, default: "circle" },
/**
* 头像最大尺寸, 单位MB
* @default 2
*/
maxSize: { type: Number, default: 2 },
/**
* 组件值
*/
modelValue: { type: String, default: "" },
/**
* 图像说明,仅在readonly为true时生效
* @default ''
*/
title: { type: String, default: "" },
/**
* 支持的图片类型
* @default []
*/
imageType: { type: Array, default: [] }
};
Ze(Uf, iw, KC, _C);
function rw(e, t, n, a) {
const o = ["webp", "png", "svg", "gif", "jpg", "jpeg", "bmp"];
function l(d) {
return d ? "data:image/jpeg;base64," + d : "";
}
const i = A(() => {
var u;
if (!e.imageType || !e.imageType.length)
return o.map((p) => `.${p}`).join(",");
const d = (u = e.imageType) == null ? void 0 : u.map((p) => `.${p}`);
return !d || !d.length ? "image/*" : d.join(",");
}), s = A(() => {
const d = a.value;
return d ? cg(d) ? mo(d) : dg(d) ? d : l(d) : "";
}), c = A(() => e.readonly ? "" : e.title);
function f() {
e.readonly || n && n.value && n.value.click();
}
return { acceptTypes: i, imageSource: s, imageTitle: c, onClickImage: f };
}
function sw(e, t, n, a, o) {
const l = new Ma();
function i(d) {
a.value = d;
}
function s(d) {
return new Promise((p, h) => {
const m = new FileReader();
m.readAsDataURL(d), m.onload = () => {
p({ state: "done", content: m.result });
}, m.onerror = function() {
h({ state: "error", content: m.result });
};
});
}
function c(d) {
const u = {
size: d.size,
name: d.name,
type: d.type,
lastModified: String(d.lastModified)
};
s(d).then((p) => {
p.state === "done" && (i(p.content), u.state = p.state, u.base64 = p.content, t.emit("update:modelValue", u.base64), t.emit("imageChange", u)), o.value = !1;
}).catch((p) => {
o.value = !1;
const h = Ne.getLocaleValue("avatar.uploadError");
l.error({ message: h, position: "top-center" });
});
}
function f(d) {
if (e.readonly)
return;
const u = d.target, p = u.files;
if (!p || !p[0])
return;
const h = e.maxSize <= 0 ? 2 : e.maxSize, m = p[0].name || "", v = m.lastIndexOf("."), b = v > 0 ? m.substring(v).toLowerCase() : "", y = p[0].size / 1024 / 1024 < h;
if (n.value && n.value.split(",").indexOf(b) < 0) {
const g = Ne.getLocaleValue("avatar.typeError");
l.error({ message: g, position: "top-center" }), u.value = "";
return;
}
if (!y) {
const g = Ne.getLocaleValue("avatar.sizeError") + h + "MB!";
l.error({ message: g, position: "top-center" }), u.value = "";
return;
}
o.value = !0, c(p[0]), u.value = "";
}
return { onFileChange: f };
}
const uw = /* @__PURE__ */ ce({
name: "FAvatar",
props: Uf,
emits: ["imageChange", "update:modelValue"],
setup(e, t) {
const n = C(), a = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAZABkAAD/2wBDAAwICQoJBwwKCQoNDAwOER0TERAQESMZGxUdKiUsKyklKCguNEI4LjE/MigoOk46P0RHSktKLTdRV1FIVkJJSkf/2wBDAQwNDREPESITEyJHMCgwR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0f/wAARCAEsASwDASIAAhEBAxEB/8QAGgABAQEBAQEBAAAAAAAAAAAAAAECAwQFB//EADMQAQEAAQEECAQGAgMBAAAAAAABAhEDITFBBBRRUmFxgaESkcHwEyIysdHhM3IjQvE0/8QAFQEBAQAAAAAAA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KACiiigAooooAKKKKAP/V/swooooAKKKKACiiigAooooAKKKKACiiigAooooA/9k=", l = A(() => {
const m = {
"f-avatar": !0,
"f-avatar-readonly": e.readonly,
"f-avatar-circle": e.shape === "circle",
"f-avatar-square": e.shape === "square"
};
return ft(m, e.customClass);
}), i = A(() => {
const m = {
width: (e.avatarWidth > 0 ? e.avatarWidth : 100) + "px",
height: (e.avatarHeight > 0 ? e.avatarHeight : 100) + "px"
};
return Zt(m, e.customStyle);
}), s = C(!1), c = C(e.modelValue || e.cover || a), {
acceptTypes: f,
imageSource: d,
onClickImage: u
} = rw(e, t, n, c), {
onFileChange: p
} = sw(e, t, f, c, s);
K(() => e.modelValue, (m) => {
c.value = m || e.cover || a;
});
function h() {
c.value = o;
}
return () => e.visible ? r("div", {
class: l.value,
style: i.value,
onClick: u
}, [s.value && r("div", {
class: "f-avatar-upload-loading"
}, [r("div", {
class: "loading-inner"
}, [Ne.getLocaleValue("avatar.loading")])]), r("img", {
title: e.title,
class: "f-avatar-image",
src: d.value,
onError: h
}, null), !e.readonly && r("div", {
class: "f-avatar-icon"
}, [r("span", {
class: "f-icon f-icon-camera"
}, null)]), !e.readonly && r("input", {
ref: n,
name: "file-input",
type: "file",
class: "f-avatar-upload",
accept: f.value,
onChange: p,
style: "display: none;"
}, null)]) : null;
}
});
xt(uw);
function Yf(e, t) {
let n;
function a(u) {
const { properties: p, title: h, ignore: m } = u, v = m && Array.isArray(m), b = Object.keys(p).reduce((y, g) => ((!v || !m.find((w) => w === g)) && (y[g] = p[g].type === "object" && p[g].properties ? a(p[g]) : vt(p[g].default)), y), {});
if (h && (!v || !m.find((y) => y === "id"))) {
const y = h.toLowerCase().replace(/-/g, "_");
b.id = `${y}_${Math.random().toString().slice(2, 6)}`;
}
return b;
}
function o(u) {
const { properties: p, title: h, required: m } = u;
if (m && Array.isArray(m)) {
const v = m.reduce((b, y) => (b[y] = p[y].type === "object" && p[y].properties ? a(p[y]) : vt(p[y].default), b), {});
if (h && m.find((b) => b === "id")) {
const b = h.toLowerCase().replace(/-/g, "_");
v.id = `${b}_${Math.random().toString().slice(2, 6)}`;
}
return v;
}
return {
type: h
};
}
function l(u, p = {}, h) {
const m = e[u];
if (m) {
let v = o(m);
const b = t[u];
return v = b ? b({ getSchemaByType: l }, v, p, h) : v, n != null && n.appendIdentifyForNewControl && n.appendIdentifyForNewControl(v), v;
}
return null;
}
function i(u, p) {
const h = a(p);
return Object.keys(h).reduce((m, v) => (Object.prototype.hasOwnProperty.call(u, v) && (m[v] && Ec(m[v]) && Ec(u[v] || !u[v]) ? Object.assign(m[v], u[v] || {}) : m[v] = u[v]), m), h), h;
}
function s(u, p) {
return Object.keys(u).filter((m) => u[m] != null).reduce((m, v) => {
if (p.has(v)) {
const b = p.get(v);
if (typeof b == "string")
m[b] = u[v];
else {
const y = b(v, u[v], u);
Object.assign(m, y);
}
} else
m[v] = u[v];
return m;
}, {});
}
function c(u, p, h = /* @__PURE__ */ new Map()) {
const m = i(u, p);
return s(m, h);
}
function f(u) {
var h;
const p = u.type;
if (p) {
const m = e[p];
if (!m)
return u;
const v = i(u, m), b = ((h = u.editor) == null ? void 0 : h.type) || "";
if (b) {
const y = e[b], g = i(u.editor, y);
v.editor = g;
}
return v;
}
return u;
}
function d(u) {
n = u;
}
return { getSchemaByType: l, resolveSchemaWithDefaultValue: f, resolveSchemaToProps: c, mappingSchemaToProps: s, setDesignerContext: d };
}
const Gf = {}, _f = {}, { resolveSchemaWithDefaultValue: cw, resolveSchemaToProps: dw, mappingSchemaToProps: fw } = Yf(Gf, _f);
function pw(e = {}) {
function t(f, d, u, p) {
if (typeof u == "number")
return p[f].length === u;
if (typeof u == "object") {
const h = Object.keys(u)[0], m = u[h];
if (h === "not")
return Number(p[f].length) !== Number(m);
if (h === "moreThan")
return Number(p[f].length) >= Number(m);
if (h === "lessThan")
return Number(p[f].length) <= Number(m);
}
return !1;
}
function n(f, d, u, p) {
return p[f] && p[f].propertyValue && String(p[f].propertyValue.value) === String(u);
}
const a = /* @__PURE__ */ new Map([
["length", t],
["getProperty", n]
]);
Object.keys(e).reduce((f, d) => (f.set(d, e[d]), f), a);
function o(f, d) {
const u = f;
return typeof d == "number" ? [{ target: u, operator: "length", param: null, value: Number(d) }] : typeof d == "boolean" ? [{ target: u, operator: "getProperty", param: f, value: !!d }] : typeof d == "object" ? Object.keys(d).map((p) => {
if (p === "length")
return { target: u, operator: "length", param: null, value: d[p] };
const h = p, m = d[p];
return { target: u, operator: "getProperty", param: h, value: m };
}) : [];
}
function l(f) {
return Object.keys(f).reduce((u, p) => {
const h = o(p, f[p]);
return u.push(...h), u;
}, []);
}
function i(f, d) {
if (a.has(f.operator)) {
const u = a.get(f.operator);
return u && u(f.target, f.param, f.value, d) || !1;
}
return !1;
}
function s(f, d) {
return l(f).reduce((h, m) => h && i(m, d), !0);
}
function c(f, d) {
const u = Object.keys(f), p = u.includes("allOf"), h = u.includes("anyOf"), m = p || h, y = (m ? f[m ? p ? "allOf" : "anyOf" : "allOf"] : [f]).map((w) => s(w, d));
return p ? !y.includes(!1) : y.includes(!0);
}
return { parseValueSchema: c };
}
const mw = {
convertTo: (e, t, n, a) => {
e.appearance || (e.appearance = {}), e.appearance[t] = n;
},
convertFrom: (e, t, n) => e.appearance ? e.appearance[t] : e[t]
}, hw = {
convertFrom: (e, t, n) => e.buttons && e.buttons.length ? `共 ${e.buttons.length} 项` : "无"
}, vw = {
convertTo: (e, t, n, a) => {
e.editor && (e.editor[t] = n);
},
convertFrom: (e, t, n) => e.editor && Object.prototype.hasOwnProperty.call(e.editor, t) ? e.editor[t] : e[t]
}, xa = {
button: { type: "button", name: "按钮" },
"response-toolbar": { type: "response-toolbar", name: "工具栏" },
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮" },
"content-container": { type: "content-container", name: "容器" },
table: { type: "table", name: "表格布局" },
"table-td": { type: "table-td", name: "单元格" },
"input-group": { type: "input-group", name: "文本" },
textarea: { type: "textarea", name: "多行文本" },
lookup: { type: "lookup", name: "帮助" },
"number-spinner": { type: "number-spinner", name: "数值" },
"date-picker": { type: "date-picker", name: "日期" },
switch: { type: "switch", name: "开关" },
"radio-group": { type: "radio-group", name: "单选组" },
"check-box": { type: "check-box", name: "复选框" },
"check-group": { type: "check-group", name: "复选框组" },
"combo-list": { type: "combo-list", name: "下拉列表" },
"response-form": { type: "response-form", name: "卡片面板" },
"response-layout": { type: "response-layout", name: "布局容器", icon: "response-layout-3" },
"response-layout-item": { type: "response-layout-item", name: "布局", icon: "response-layout-1" },
"tree-grid": { type: "tree-grid", name: "树表格" },
"tree-grid-column": { type: "tree-grid-column", name: "树表格列" },
"data-grid": { type: "data-grid", name: "表格" },
"data-grid-column": { type: "data-grid-column", name: "表格列" },
module: { type: "Module", name: "模块" },
component: { type: "component", name: "组件" },
tabs: { type: "tabs", name: "标签页" },
"tab-page": { type: "tab-page", name: "标签页项", dependentParentControl: "Tab" },
"tab-toolbar-item": { type: "tab-toolbar-item", name: "标签页工具栏按钮" },
"drawer-toolbar-item": { type: "drawer-toolbar-item", name: "抽屉工具栏按钮" },
"html-template": { type: "html-template", name: "模板容器" },
"time-picker": { type: "time-picker", name: "时间选择" },
section: { type: "section", name: "分组面板" },
"section-toolbar": { type: "section-toolbar", name: "分组面板工具栏" },
"section-toolbar-item": { type: "section-toolbar-item", name: "分组面板按钮" },
splitter: { type: "splitter", name: "分栏面板" },
"splitter-pane": { type: "splitter-pane", name: "分栏面板项", dependentParentControl: "Splitter" },
"component-ref": { type: "component-ref", name: "组件引用节点" },
uploader: { type: "uploader", name: "附件上传" },
"page-header": { type: "page-header", name: "页头" },
"page-footer": { type: "page-footer", name: