@farris/ui-vue
Version:
Farris Vue, a Farris Design based Vue3 component library.
1,483 lines • 423 kB
JavaScript
var Jo = Object.defineProperty;
var Zo = (n, t, e) => t in n ? Jo(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
var L = (n, t, e) => Zo(n, typeof t != "symbol" ? t + "" : t, e);
import { defineComponent as Qe, onBeforeMount as cn, onMounted as Ct, createVNode as M, ref as S, computed as q, watch as Me, Fragment as Et, reactive as wt, createApp as Qn, onUnmounted as dn, Transition as Kn, mergeProps as $t, createTextVNode as Ve, onBeforeUnmount as Jn, withDirectives as Zn, resolveDirective as er, inject as kt, provide as tr, triggerRef as nr, isVNode as or, nextTick as Zt, Teleport as rr, shallowRef as ir, render as mn, h as ar, cloneVNode as sr, vModelText as lr } from "vue";
import { isPlainObject as Pn, cloneDeep as at, isUndefined as dt, throttle as ur } from "lodash-es";
import { useResizeObserver as eo } from "@vueuse/core";
import { useIdentify as cr, useGroupData as dr, useFilter as fr, useHierarchy as pr, useLoading as mr, useDataView as hr, useSelection as vr, useSelectHierarchyItem as gr, useDataViewContainerStyle as yr, useCommandColumn as br, useColumn as wr, useSort as Cr, useGroupColumn as xr, useRow as _r, useEdit as Sr, useVisualDataBound as Tr, useVisualDataCell as Fr, useVisualDataRow as Mr, useVisualData as kr, useCellPosition as Er, useSidebar as Ir, useVirtualScroll as Or, useFitColumn as Dr, useFilterHistory as Vr, useColumnFilter as Br, useDragColumn as Pr, getColumnHeader as Nr, getSidebar as Rr, getDisableMask as Lr, getHorizontalScrollbar as $r, getVerticalScrollbar as jr, getEmpty as Wr } from "../data-view/index.esm.js";
import "../modal/index.esm.js";
import Hr from "../transfer/index.esm.js";
import Ar from "../tabs/index.esm.js";
import qr from "../order/index.esm.js";
import "../condition/index.esm.js";
import { FCheckbox as Gr } from "../checkbox/index.esm.js";
import { useGuid as zr, resolveField as it, FormSchemaEntityFieldTypeName as Nn, getCustomClass as nn, useCommonUtils as Yr, useDateFormat as Ur, useNumberFormat as Xr, setFieldValue as yn, withInstall as Qr } from "../common/index.esm.js";
import Kr from "../filter-bar/index.esm.js";
import Rn from "../tooltip/index.esm.js";
import Jr from "../pagination/index.esm.js";
import Zr from "../button/index.esm.js";
import ei from "../search-box/index.esm.js";
import ti from "../tags/index.esm.js";
import ni, { FDynamicFormGroup as oi, FDynamicFormInput as ri } from "../dynamic-form/index.esm.js";
import { createPropsResolver as ii } from "../dynamic-resolver/index.esm.js";
import { DgControl as jt } from "../designer-canvas/index.esm.js";
import { FormBindingType as ai } from "../property-panel/index.esm.js";
import si from "../accordion/index.esm.js";
import li from "../avatar/index.esm.js";
import ui from "../../designer/button-edit/index.esm.js";
import ci from "../button-group/index.esm.js";
import di from "../calendar/index.esm.js";
import fi from "../capsule/index.esm.js";
import Ln from "../../designer/checkbox/index.esm.js";
import $n from "../../designer/checkbox-group/index.esm.js";
import bn from "../combo-list/index.esm.js";
import pi from "../combo-tree/index.esm.js";
import mi from "../component/index.esm.js";
import hi from "../color-picker/index.esm.js";
import vi from "../content-container/index.esm.js";
import gi from "../date-picker/index.esm.js";
import yi from "../../designer/data-grid/index.esm.js";
import bi from "../dropdown/index.esm.js";
import wi from "../events-editor/index.esm.js";
import Ci from "../field-selector/index.esm.js";
import xi from "../binding-selector/index.esm.js";
import _i from "../image-cropper/index.esm.js";
import Si from "../../designer/input-group/index.esm.js";
import Ti from "../layout/index.esm.js";
import Fi from "../list-nav/index.esm.js";
import Mi from "../list-view/index.esm.js";
import ki from "../lookup/index.esm.js";
import Ei from "../mapping-editor/index.esm.js";
import Ii from "../nav/index.esm.js";
import Oi from "../number-range/index.esm.js";
import Di from "../number-spinner/index.esm.js";
import Vi from "../page-header/index.esm.js";
import Bi from "../page-footer/index.esm.js";
import Pi from "../progress/index.esm.js";
import Ni from "../query-solution/index.esm.js";
import Ri from "../../designer/radio-group/index.esm.js";
import Li from "../rate/index.esm.js";
import $i from "../response-toolbar/index.esm.js";
import ji from "../response-layout/index.esm.js";
import Wi from "../response-layout-editor/index.esm.js";
import Hi from "../section/index.esm.js";
import Ai from "../smoke-detector/index.esm.js";
import qi from "../splitter/index.esm.js";
import Gi from "../step/index.esm.js";
import zi from "../switch/index.esm.js";
import Yi from "../text/index.esm.js";
import Ui from "../time-picker/index.esm.js";
import Xi from "../tree-view/index.esm.js";
import Qi from "../uploader/index.esm.js";
import Ki from "../verify-detail/index.esm.js";
import Ji from "../video/index.esm.js";
import Zi from "../textarea/index.esm.js";
import ea from "../schema-selector/index.esm.js";
import to from "../tree-grid/index.esm.js";
import ta from "../event-parameter/index.esm.js";
import na from "../filter-condition-editor/index.esm.js";
import oa from "../fieldset/index.esm.js";
import ra from "../sort-condition-editor/index.esm.js";
import ia from "../menu-lookup/index.esm.js";
import aa from "../drawer/index.esm.js";
import sa from "../json-editor/index.esm.js";
import la from "../property-editor/index.esm.js";
import ua from "../expression-editor/index.esm.js";
import ca from "../code-editor/index.esm.js";
import da from "../html-template/index.esm.js";
import "../external-container/index.esm.js";
import { FNotifyService as fa } from "../notify/index.esm.js";
import "bignumber.js";
const Fn = {}, no = {};
function Mn(n) {
const { properties: t, title: e, ignore: o } = n, r = o && Array.isArray(o), i = Object.keys(t).reduce((a, l) => ((!r || !o.find((s) => s === l)) && (a[l] = t[l].type === "object" && t[l].properties ? Mn(t[l]) : at(t[l].default)), a), {});
if (e && (!r || !o.find((a) => a === "id"))) {
const a = e.toLowerCase().replace(/-/g, "_");
i.id = `${a}_${Math.random().toString().slice(2, 6)}`;
}
return i;
}
function pa(n) {
const { properties: t, title: e, required: o } = n;
if (o && Array.isArray(o)) {
const r = o.reduce((i, a) => (i[a] = t[a].type === "object" && t[a].properties ? Mn(t[a]) : at(t[a].default), i), {});
if (e && o.find((i) => i === "id")) {
const i = e.toLowerCase().replace(/-/g, "_");
r.id = `${i}_${Math.random().toString().slice(2, 6)}`;
}
return r;
}
return {
type: e
};
}
function Ut(n, t = {}, e) {
const o = Fn[n];
if (o) {
let r = pa(o);
const i = no[n];
return r = i ? i({ getSchemaByType: Ut }, r, t, e) : r, r;
}
return null;
}
function ma(n, t) {
const e = Mn(t);
return Object.keys(e).reduce((o, r) => (Object.prototype.hasOwnProperty.call(n, r) && (o[r] && Pn(o[r]) && Pn(n[r] || !n[r]) ? Object.assign(o[r], n[r] || {}) : o[r] = n[r]), o), e), e;
}
function oo(n, t) {
return Object.keys(n).filter((o) => n[o] != null).reduce((o, r) => {
if (t.has(r)) {
const i = t.get(r);
if (typeof i == "string")
o[i] = n[r];
else {
const a = i(r, n[r], n);
Object.assign(o, a);
}
} else
o[r] = n[r];
return o;
}, {});
}
function ha(n, t, e = /* @__PURE__ */ new Map()) {
const o = ma(n, t);
return oo(o, e);
}
function va(n = {}) {
function t(u, c, d, m) {
if (typeof d == "number")
return m[u].length === d;
if (typeof d == "object") {
const y = Object.keys(d)[0], p = d[y];
if (y === "not")
return Number(m[u].length) !== Number(p);
if (y === "moreThan")
return Number(m[u].length) >= Number(p);
if (y === "lessThan")
return Number(m[u].length) <= Number(p);
}
return !1;
}
function e(u, c, d, m) {
return m[u] && m[u].propertyValue && String(m[u].propertyValue.value) === String(d);
}
const o = /* @__PURE__ */ new Map([
["length", t],
["getProperty", e]
]);
Object.keys(n).reduce((u, c) => (u.set(c, n[c]), u), o);
function r(u, c) {
const d = u;
return typeof c == "number" ? [{ target: d, operator: "length", param: null, value: Number(c) }] : typeof c == "boolean" ? [{ target: d, operator: "getProperty", param: u, value: !!c }] : typeof c == "object" ? Object.keys(c).map((m) => {
if (m === "length")
return { target: d, operator: "length", param: null, value: c[m] };
const y = m, p = c[m];
return { target: d, operator: "getProperty", param: y, value: p };
}) : [];
}
function i(u) {
return Object.keys(u).reduce((d, m) => {
const y = r(m, u[m]);
return d.push(...y), d;
}, []);
}
function a(u, c) {
if (o.has(u.operator)) {
const d = o.get(u.operator);
return d && d(u.target, u.param, u.value, c) || !1;
}
return !1;
}
function l(u, c) {
return i(u).reduce((y, p) => y && a(p, c), !0);
}
function s(u, c) {
const d = Object.keys(u), m = d.includes("allOf"), y = d.includes("anyOf"), p = m || y, g = (p ? u[p ? m ? "allOf" : "anyOf" : "allOf"] : [u]).map((b) => l(b, c));
return m ? !g.includes(!1) : g.includes(!0);
}
return { parseValueSchema: s };
}
const de = {
button: { type: "button", name: "按钮" },
"response-toolbar": { type: "response-toolbar", name: "工具栏" },
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮" },
"content-container": { type: "content-container", 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: "标签页工具栏按钮" },
"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: "页脚" },
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏" },
fieldset: { type: "fieldset", name: "分组" },
"query-solution": { type: "query-solution", name: "筛选方案" },
drawer: { type: "drawer", name: "抽屉" },
"external-container": { type: "external-container", name: "外部容器", icon: "content-container" },
"list-nav": { type: "list-nav", name: "列表导航" },
"filter-bar": { type: "filter-bar", name: "筛选条" }
}, ga = {}, ya = {};
va();
function Ot(n, t, e = /* @__PURE__ */ new Map(), o = (a, l, s, u) => l, r = {}, i = (a) => a) {
return Fn[t.title] = t, no[t.title] = o, ga[t.title] = r, ya[t.title] = i, (a = {}, l = !0) => {
if (!l)
return oo(a, e);
const s = ha(a, t, e), u = Object.keys(n).reduce((c, d) => (c[d] = n[d].default, c), {});
return Object.assign(u, s);
};
}
function fn(n, t) {
return { customClass: t.class, customStyle: t.style };
}
function ba() {
function n(t, e) {
const { dataSource: o } = t || {};
return o === void 0 ? {} : {};
}
return {
resolve: n
};
}
function wa() {
function n(t, e) {
return t.selectItemById(e);
}
return {
selectItemById: n
};
}
function Ca() {
function n(t, e) {
const { columns: o } = e;
return t.updateColumns(o);
}
return {
updateColumns: n
};
}
const ro = /* @__PURE__ */ new Map([
["appearance", fn]
]), xa = "https://json-schema.org/draft/2020-12/schema", _a = "https://farris-design.gitee.io/component.schema.json", Sa = "component", Ta = "A Farris Visual Component", Fa = "object", Ma = {
id: {
description: "The unique identifier for a component",
type: "string"
},
type: {
description: "The type string of component",
type: "string",
default: "component"
},
componentType: {
description: "The type string of component",
type: "string"
},
viewModel: {
description: "The viewModel string of component",
type: "string"
},
appearance: {
description: "",
type: "object",
properties: {
class: {
type: "string"
},
style: {
type: "string"
}
},
default: {}
},
contents: {
description: "",
type: "array",
default: []
},
visible: {
description: "",
type: "boolean",
default: !0
},
onInit: {
description: "初始化事件",
type: "string",
default: ""
},
onAfterViewInit: {
description: "视图初始化后事件",
type: "string",
default: ""
}
}, ka = [
"id",
"type",
"contents"
], Ea = {
onInit: "初始化事件",
onAfterViewInit: "视图初始化后事件"
}, Ia = {
$schema: xa,
$id: _a,
title: Sa,
description: Ta,
type: Fa,
properties: Ma,
required: ka,
events: Ea
};
function io(n, t, e) {
return t;
}
const pn = {
id: { type: String },
customClass: { type: String, default: "" },
customStyle: { type: String, default: "" },
componentType: { type: String, default: "" },
formColumns: { type: Number, default: 4 }
}, jn = Ot(pn, Ia, ro, io), Lp = Object.assign({}, pn, { componentId: { type: String, default: "" } }), hn = /* @__PURE__ */ Qe({
name: "FComponent",
props: pn,
emits: ["init", "afterViewInit"],
setup(n, t) {
return cn(() => {
t.emit("init", n.id);
}), Ct(() => {
t.emit("afterViewInit", n.id);
}), () => M("div", {
class: n.customClass
}, [t.slots.default && t.slots.default()]);
}
});
function ao(n, t, e) {
var f;
const o = e && e.getStyles && e.getStyles() || "", r = e && e.getDesignerClass && e.getDesignerClass() || "", i = S();
function a() {
return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : e && e.checkCanMoveComponent ? e.checkCanMoveComponent() : !0;
}
function l() {
return !1;
}
function s() {
return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : e && e.checkCanDeleteComponent ? e.checkCanDeleteComponent() : !0;
}
function u() {
return (t == null ? void 0 : t.schema.componentType) === "frame" ? !0 : e && e.hideNestedPaddingInDesginerView ? e.hideNestedPaddingInDesginerView() : !1;
}
function c(v) {
if (!v || !v.value)
return null;
if (v.value.schema && v.value.schema.type === "component")
return v.value;
const w = S(v == null ? void 0 : v.value.parent), T = c(w);
return T || null;
}
function d(v = t) {
var O;
if (e != null && e.getDraggableDesignItemElement)
return e.getDraggableDesignItemElement(v);
const { componentInstance: w, designerItemElementRef: T } = v;
if (!w || !w.value)
return null;
const { getCustomButtons: h } = w.value;
return w.value.canMove || h && ((O = h()) != null && O.length) ? T : d(v.parent);
}
function m(v) {
return !!e && e.canAccepts(v);
}
function y() {
return (t == null ? void 0 : t.schema.label) || (t == null ? void 0 : t.schema.title) || (t == null ? void 0 : t.schema.name);
}
function p() {
}
function I(v, w) {
var T;
!v || !w || (e != null && e.onAcceptMovedChildElement && e.onAcceptMovedChildElement(v, w), (T = t == null ? void 0 : t.setupContext) == null || T.emit("dragEnd"));
}
function C(v, w) {
const { componentType: T } = v;
let h = Ut(T, v, w);
e && e.onResolveNewComponentSchema && (h = e.onResolveNewComponentSchema(v, h));
const O = T.toLowerCase().replace(/-/g, "_");
return h && !h.id && h.type === T && (h.id = `${O}_${Math.random().toString().slice(2, 6)}`), h;
}
function g(v) {
v && e != null && e.onChildElementMovedOut && e.onChildElementMovedOut(v);
}
function x(...v) {
if (e && e.getPropsConfig)
return e.getPropsConfig(...v);
}
function b(v) {
if (!v)
return;
const w = t == null ? void 0 : t.schema, { formSchemaUtils: T } = v;
if (w && T.getExpressions().length) {
const h = T.getExpressions().findIndex((O) => O.target === w.id);
h > -1 && T.getExpressions().splice(h, 1);
}
}
function F(v) {
e && e.onRemoveComponent && e.onRemoveComponent(), b(v), t != null && t.schema.contents && t.schema.contents.map((w) => {
let T = w.id;
w.type === "component-ref" && (T = w.component);
const h = n.value.querySelectorAll(`#${T}-design-item`);
h != null && h.length && Array.from(h).map((O) => {
var V;
(V = O == null ? void 0 : O.componentInstance) != null && V.value.onRemoveComponent && O.componentInstance.value.onRemoveComponent(v);
});
});
}
function k() {
if (e && e.getCustomButtons)
return e.getCustomButtons();
}
function _(v) {
if (e && e.onPropertyChanged)
return e.onPropertyChanged(v);
}
return i.value = {
canMove: a(),
canSelectParent: l(),
canDelete: s(),
canNested: !u(),
contents: t == null ? void 0 : t.schema.contents,
elementRef: n,
parent: (f = t == null ? void 0 : t.parent) == null ? void 0 : f.componentInstance,
schema: t == null ? void 0 : t.schema,
styles: o,
designerClass: r,
canAccepts: m,
getBelongedComponentInstance: c,
getDraggableDesignItemElement: d,
getDraggingDisplayText: y,
getPropConfig: x,
getDragScopeElement: p,
onAcceptMovedChildElement: I,
onChildElementMovedOut: g,
addNewChildComponentSchema: C,
triggerBelongedComponentToMoveWhenMoved: !!e && e.triggerBelongedComponentToMoveWhenMoved || S(!1),
triggerBelongedComponentToDeleteWhenDeleted: !!e && e.triggerBelongedComponentToDeleteWhenDeleted || S(!1),
onRemoveComponent: F,
getCustomButtons: k,
onPropertyChanged: _
}, i;
}
class Oa {
getTemplateRule(t, e) {
const o = e == null ? void 0 : e.formSchemaUtils, r = o == null ? void 0 : o.getFormTemplateRule(), i = { canAccept: !0, canDelete: !0, canMove: !0 };
if (!r)
return i;
const a = this.getComponentContext(t), { componentClassList: l } = a;
return l.forEach((s) => {
if (!s || !r[s])
return;
const { canMove: u, canDelete: c, canAccept: d } = r[s];
i.canMove = i.canMove && this.resolveRuleValue(u, a), i.canDelete = i.canDelete && this.resolveRuleValue(c, a), i.canAccept = i.canAccept && this.resolveRuleValue(d, a);
}), i;
}
resolveRuleValue(t, e) {
return typeof t == "boolean" ? t : this.parseRuleValueSchema(t, e);
}
parseRuleValueSchema(t, e) {
const o = t.invalidContext || [];
let r = !0;
for (const i of o) {
if (i.firstLevelChild) {
if (i.firstLevelChild.class) {
const { firstLevelChildClassList: a } = e;
if (a && !a.includes(i.firstLevelChild.class)) {
r = !1;
continue;
}
}
if (i.firstLevelChild.type) {
const { firstLevelChildSchema: a } = e;
if (!a || a.type !== i.firstLevelChild.type) {
r = !1;
continue;
}
}
}
if (i.secondLevelChild) {
if (i.secondLevelChild.class) {
const { secondLevelChildClassList: a } = e;
if (a && !a.includes(i.secondLevelChild.class)) {
r = !1;
continue;
}
}
if (i.secondLevelChild.type) {
const { secondLevelChildSchema: a } = e;
if (!a || a.type !== i.secondLevelChild.type) {
r = !1;
continue;
}
}
}
if (i.parent) {
if (i.parent.class) {
const { parentClassList: a } = e;
if (a && !a.includes(i.parent.class)) {
r = !1;
continue;
}
}
if (i.parent.type) {
const { parentSchema: a } = e;
if (a && a.type !== i.parent.type) {
r = !1;
continue;
}
}
}
r = !0;
break;
}
return !r;
}
getComponentContext(t) {
var I, C, g, x;
const e = t.schema, o = e.appearance && e.appearance.class || "", r = o.split(" ") || [], i = e.contents || [], a = i.length ? i[0] : null, l = a && a.appearance ? a.appearance.class : "", s = l ? l.split(" ") : [], u = (I = a == null ? void 0 : a.contents) != null && I.length ? a == null ? void 0 : a.contents[0] : null, c = u && u.appearance ? u.appearance.class : "", d = c ? c.split(" ") : [], m = e.type === "component" ? (g = (C = t.parent) == null ? void 0 : C.parent) == null ? void 0 : g.schema : (x = t.parent) == null ? void 0 : x.schema, y = m && m.appearance && m.appearance.class || "", p = y ? y.split(" ") : [];
return {
componentClass: o,
componentClassList: r,
childContents: i,
firstLevelChildSchema: a,
firstLevelChildClass: l,
firstLevelChildClassList: s,
secondLevelChildSchema: u,
secondLevelChildClass: c,
secondLevelChildClassList: d,
parentSchema: m,
parentClass: y,
parentClassList: p
};
}
}
const Da = S(0);
function so() {
Da.value++;
}
const Xt = S(0);
function Va(n, t) {
const e = t.getBoundingClientRect(), o = n.getBoundingClientRect(), r = o.top >= e.top, i = o.top <= e.bottom;
return r && i;
}
function Ba(n) {
const t = n.querySelector(".component-btn-group");
if (!t)
return;
t.style.display = "";
const e = t.getBoundingClientRect();
if (!(e.top === 0 && e.left === 0)) {
const o = t.querySelector("div");
if (o) {
const r = o.getBoundingClientRect();
o.style.top = e.top + "px";
let i = e.left - r.width;
const a = document.querySelector(".editorDiv");
if (a) {
const l = a.getBoundingClientRect();
i < l.left && ({ left: i } = n.getBoundingClientRect());
}
o.style.left = i + "px";
}
}
}
function Pa(n) {
if (!window.scrollContainerList)
return;
const t = Array.from(window.scrollContainerList);
if (t.length && t.length === 1) {
const e = t[0], o = document.querySelector(`[id=${e}]`);
if (o && o.contains(n))
return o;
}
}
function lo(n) {
if (!n)
return;
const t = n.getBoundingClientRect();
if (t.width === 0 && t.height === 0)
return;
const e = n.querySelector(".component-btn-group");
if (e) {
let o = !0;
const r = Pa(n);
if (r && (o = Va(n, r)), !o) {
e.style.display = "none";
return;
}
Ba(n);
}
}
function Na(n) {
if (!n)
return;
let t;
n.className.includes("dgComponentSelected") ? t = n : t = n.querySelector(".dgComponentSelected"), t && lo(t);
}
function Ra(n) {
const { formSchemaUtils: t, formStateMachineUtils: e } = n;
function o(s, u = "") {
return {
path: u + s.code,
field: s.id,
fullPath: s.code
};
}
function r(s, u = "") {
return t.getViewModelById(s).states.map((d) => o(d, u));
}
function i(s) {
const u = t.getRootViewModelId(), c = r(s);
if (s === u)
return c;
const d = r(u, "root-component.");
return [...c, ...d];
}
function a(s) {
return s.binding && s.binding.path || s.id || "";
}
function l() {
return e && e.getRenderStates() || [];
}
return { getVariables: i, getControlName: a, getStateMachines: l };
}
class La {
constructor(t) {
L(this, "sessionVariables", [
{
key: "CurrentSysOrgName",
name: "当前组织Name",
description: "当前组织Name"
},
// {
// key: "CurrentSysOrgCode",
// name: "当前组织Code",
// description: "当前组织Code"
// },
{
key: "CurrentSysOrgId",
name: "当前组织Id",
description: "当前组织Id"
},
{
key: "CurrentUserName",
name: "当前用户Name",
description: "当前用户Name"
},
{
key: "CurrentUserCode",
name: "当前用户Code",
description: "当前用户Code"
},
{
key: "CurrentUserId",
name: "当前用户Id",
description: "当前用户Id"
},
{
key: "CurrentLanguage",
name: "当前语言编号",
description: "当前登录的语言编号,例如简体中文返回'zh-CHS',英文返回'en',繁体中文'zh-CHT'"
}
]);
L(this, "expressionNames", {
compute: "计算表达式",
dependency: "依赖表达式",
validate: "验证表达式",
dataPicking: "帮助前表达式",
visible: "可见表达式",
readonly: "只读表达式",
required: "必填表达式"
});
L(this, "getExpressionConverter", (t, e) => ({
convertFrom: (o, r, i, a) => {
const l = i.getExpressionRuleValue(t, e || r);
return l && l.value || "";
},
convertTo: (o, r, i, a, l) => {
var s;
if (r === "dataPicking" && (i != null && i.target)) {
const u = `${i.target}_dataPicking`;
((s = i.rules) == null ? void 0 : s.some(
(d) => d.id === u && d.value
)) ? o.dictPickingExpressionId = u : delete o.dictPickingExpressionId;
}
a.updateExpression(i);
}
}));
this.formSchemaService = t;
}
getExpressionRule(t, e) {
const o = this.formSchemaService.getExpressions();
if (!o)
return "";
const r = o.find((a) => a.target === t);
if (!r)
return "";
const i = r.rules.find((a) => a.type === e);
return i || "";
}
// 获取上下文表单变量
getContextFormVariables() {
const { module: t } = this.formSchemaService.getFormSchema();
if (!t.viewmodels || t.viewmodels.length === 0)
return [];
const e = this.formSchemaService.getRootViewModelId(), o = this.formSchemaService.getViewModelById(e);
if (!o || !o.states || o.states.length === 0)
return [];
const r = [];
return o.states.forEach((i) => {
r.push({
key: i.code,
name: i.name,
description: i.name,
category: i.category
});
}), r;
}
createTreeNode(t, e, o = "label") {
return {
id: t.id,
name: t.name,
bindingPath: t[o],
parents: e
};
}
buildEntityFieldsTreeData(t = null, e) {
const o = [];
return t == null || t.forEach((r) => {
var l;
const i = this.createTreeNode(r, e);
let a = [];
(l = r.type) != null && l.fields && (a = this.buildEntityFieldsTreeData(r.type.fields, [...e, r.label])), o.push({
data: i,
children: a,
expanded: !0
});
}), o;
}
buildChildEntityTreeData(t = null, e) {
const o = [];
return t == null || t.forEach((r) => {
var s, u;
const i = this.createTreeNode(r, e), a = this.buildEntityFieldsTreeData((s = r.type) == null ? void 0 : s.fields, [...e, r.label]), l = this.buildChildEntityTreeData((u = r.type) == null ? void 0 : u.entities, [...e, r.label]);
l != null && l.length && (a == null || a.push(...l)), o.push({
data: i,
children: a || [],
// 空值回退
expanded: !0
});
}), o;
}
getEntitiesTreeData() {
const t = this.formSchemaService.getSchemaEntities();
if (!(t != null && t.length))
return [];
const e = t[0];
if (!(e != null && e.type))
return [];
const o = this.buildEntityFieldsTreeData(e.type.fields, [e.code]), r = this.buildChildEntityTreeData(e.type.entities, [e.code]);
return r != null && r.length && (o == null || o.push(...r)), {
entityCode: e.code,
fields: [{
data: this.createTreeNode(e, [], "code"),
children: o || []
}]
};
}
getEntitiesAndVariables() {
return {
entities: this.getEntitiesTreeData(),
variables: {
session: {
name: "系统变量",
items: this.sessionVariables,
visible: !1
},
forms: {
name: "表单变量",
items: this.getContextFormVariables(),
visible: !0
}
}
};
}
onBeforeOpenExpression(t, e, o) {
const r = o === "Field" ? t.binding.field : t.id, i = this.getExpressionRule(r, e), a = this.getEntitiesAndVariables(), l = {
message: ["validate", "required", "dataPicking"].includes(e) && i ? i.message : "",
...a
};
return i.messageType != null && (l.messageType = i.messageType), l;
}
buildRule(t, e, o, r) {
const { expression: i, message: a, messageType: l } = e, s = {
id: `${t}_${o}`,
type: o,
value: i
};
return (o === "validate" || o === "dataPicking" || o === "required") && (s.message = a), o === "dataPicking" && (s.messageType = l), o === "validate" && r && (s.elementId = r), s;
}
getExpressionData() {
const { expressions: t } = this.formSchemaService.getFormSchema().module;
return t || [];
}
updateExpression(t, e, o, r) {
const i = e === "Field" ? t.binding.field : t.id, a = this.buildRule(i, o, r, t.type === "form-group" ? t.id : "");
let s = this.getExpressionData().find((c) => c.targetType === e && c.target === i);
const u = (c) => c.value.trim() === "";
if (s) {
const c = s.rules.find((d) => d.id === a.id);
if (c)
u(a) ? s.rules = s.rules.filter((d) => d.id !== a.id) : (Object.assign(c, a), r === "validate" && t.type === "form-group" && (c.elementId = t.id));
else {
if (u(a))
return null;
s.rules = s.rules || [], s.rules.push(a);
}
} else {
if (u(a))
return null;
s = {
target: `${i}`,
rules: [a],
targetType: e
};
}
return s;
}
getExpressionEditorOptions(t, e, o, r) {
return o.reduce((i, a) => {
var s, u;
const l = e === "Field" ? (s = t == null ? void 0 : t.binding) == null ? void 0 : s.field : t.id;
return i[a] = {
hide: e === "Field" ? !!((u = t == null ? void 0 : t.binding) != null && u.field) : !1,
description: "",
title: this.expressionNames[a],
type: "string",
$converter: this.getExpressionConverter(l),
editor: {
type: "expression-editor",
singleExpand: !1,
dialogTitle: `${this.expressionNames[a]}编辑器`,
showMessage: a === "validate" || a === "dataPicking" || a === "required",
showMessageType: a === "dataPicking",
beforeOpen: () => this.onBeforeOpenExpression(t, a, e),
onSubmitModal: (c) => {
const d = this.updateExpression(t, e, c, a);
if (r) {
const m = this.buildRule(l, c, a);
r(m);
}
return d;
}
}
}, i;
}, {});
}
getExpressionInfo(t, e, o) {
const r = e === "Field" ? t.binding.field : t.id, i = this.getExpressionRule(r, o), a = {
value: i && i.value,
targetId: r,
targetType: e,
expressionType: o
};
return i && i.message && (a.message = i.message), a;
}
getExpressionConfig(t, e, o = ["compute", "dependency", "validate"], r) {
return {
description: "表达式",
title: "表达式",
properties: {
...this.getExpressionEditorOptions(t, e, o, r)
}
};
}
getExpressionOptions(t, e, o) {
const r = this.getExpressionInfo(t, e, o);
return {
dialogTitle: `${this.expressionNames[o]}编辑器`,
singleExpand: !1,
showMessage: o === "required",
beforeOpen: () => this.onBeforeOpenExpression(t, o, e),
expressionInfo: r
};
}
}
class uo {
constructor(t, e) {
L(this, "componentId");
L(this, "viewModelId");
L(this, "eventsEditorUtils");
L(this, "formSchemaUtils");
L(this, "formMetadataConverter");
L(this, "designViewModelUtils");
L(this, "designViewModelField");
L(this, "controlCreatorUtils");
L(this, "designerHostService");
L(this, "schemaService", null);
L(this, "metadataService", null);
L(this, "propertyConfig", {
type: "object",
categories: {}
});
var o;
this.componentId = t, this.designerHostService = e, this.eventsEditorUtils = e.eventsEditorUtils, this.formSchemaUtils = e.formSchemaUtils, this.formMetadataConverter = e.formMetadataConverter, this.viewModelId = ((o = this.formSchemaUtils) == null ? void 0 : o.getViewModelIdByComponentId(t)) || "", this.designViewModelUtils = e.designViewModelUtils, this.controlCreatorUtils = e.controlCreatorUtils, this.metadataService = e.metadataService, this.schemaService = e.schemaService;
}
getTableInfo() {
var t;
return (t = this.schemaService) == null ? void 0 : t.getTableInfoByViewModelId(this.viewModelId);
}
setDesignViewModelField(t) {
var o;
const e = t.binding && t.binding.type === "Form" && t.binding.field;
if (e) {
if (!this.designViewModelField) {
const r = this.designViewModelUtils.getDgViewModel(this.viewModelId);
this.designViewModelField = r.fields.find((i) => i.id === e);
}
t.updateOn = (o = this.designViewModelField) == null ? void 0 : o.updateOn;
}
}
getBasicPropConfig(t) {
return {
description: "Basic Information",
title: "基本信息",
properties: {
id: {
description: "组件标识",
title: "标识",
type: "string",
readonly: !0
},
type: {
description: "组件类型",
title: "控件类型",
type: "select",
editor: {
type: "combo-list",
textField: "name",
valueField: "value",
idField: "value",
editable: !1,
data: [{ value: t.type, name: de[t.type].name }]
}
}
}
};
}
getAppearanceConfig(t = null, e = {}, o) {
const r = {
title: "外观",
description: "Appearance"
}, i = {
class: {
title: "class样式",
type: "string",
description: "组件的CSS样式",
$converter: "/converter/appearance.converter"
},
style: {
title: "style样式",
type: "string",
description: "组件的样式",
$converter: "/converter/appearance.converter"
}
};
for (const a in e)
i[a] = Object.assign(i[a] || {}, e[a]);
return {
...r,
properties: { ...i },
setPropertyRelates(a, l) {
if (a) {
switch (a && a.propertyID) {
case "class":
case "style": {
Xt.value++;
break;
}
}
o && o(a, t, l);
}
}
};
}
getPropertyEditorParams(t, e = [], o = "visible", r = {}, i = {}) {
const { getVariables: a, getControlName: l, getStateMachines: s } = Ra(this.designerHostService), u = this.getRealTargetType(t), c = e && e.length > 0 ? e : ["Const", "Variable", "StateMachine", "Expression"], d = {
type: "property-editor",
propertyTypes: c
};
return c.map((m) => {
switch (m) {
case "Const":
Object.assign(d, {
constType: "enum",
constEnums: [{ id: !0, name: "是" }, { id: !1, name: "否" }]
}, r);
break;
case "Expression":
d.expressionConfig = this.getExpressionOptions(t, u, o);
break;
case "StateMachine":
d.stateMachines = s();
break;
case "Variable":
Object.assign(d, {
controlName: l(t),
newVariablePrefix: "is",
newVariableType: "Boolean",
variables: a(this.viewModelId),
onBeforeOpenVariables: (y) => {
y.value = a(this.viewModelId);
}
}, i);
break;
}
}), d;
}
getVisibleProperty(t, e = "") {
return {
visible: {
title: "是否可见",
type: "boolean",
description: "运行时组件是否可见",
editor: this.getPropertyEditorParams(t, e === "gridFieldEditor" ? ["Const", "Expression"] : ["Const", "Variable", "StateMachine", "Expression"], "visible")
}
};
}
/**
* 获取行为
* @param propertyData
* @param viewModelId
* @returns
*/
getBehaviorConfig(t, e = "", o = {}, r) {
const i = {
title: "行为",
description: ""
}, a = this.getVisibleProperty(t, e);
for (const s in o)
a[s] = Object.assign(a[s] || {}, o[s]);
const l = this;
return {
...i,
properties: { ...a },
setPropertyRelates(s, u) {
if (s) {
switch (s.propertyID) {
case "disabled":
case "readonly":
case "visible":
l.afterMutilEditorChanged(t, s);
break;
}
r && r(s, u);
}
}
};
}
/**
* 当多值编辑器变更时
* @param propertyData
* @param changeObject
*/
afterMutilEditorChanged(t, e) {
this.addNewVariableToViewModel(e, this.viewModelId), this.updateExpressionValue(e), this.clearExpression(e, t);
}
/**
*
* @param propertyId
* @param componentInstance
* @returns
*/
updateElementByParentContainer(t, e) {
const o = e && e.parent && e.parent.schema;
if (!o)
return;
const r = o.contents.findIndex((a) => a.id === t), i = at(o.contents[r]);
o.contents.splice(r, 1), o.contents.splice(r, 0, i), so();
}
/**
* 属性编辑器,在编辑过程中会新增变量,此处需要将新增的变量追加到ViewModel中
* @param changeObject
* @param viewModelId
* @returns
*/
addNewVariableToViewModel(t, e) {
const o = t.propertyValue;
if (!(o && typeof o == "object") || !(o.type === "Variable" && o.isNewVariable))
return;
const a = {
id: o.field,
category: "locale",
code: o.fullPath,
name: o.fullPath,
type: o.newVariableType || "String"
};
delete o.newVariableType, delete o.isNewVariable, this.formSchemaUtils.getVariableByCode(a.code) || this.formSchemaUtils.getViewModelById(e).states.push(a);
}
/**
* 更新表达式到expressions节点
* @param changeObject
*/
updateExpressionValue(t) {
const e = t.propertyValue;
if (!((e && e.type) === "Expression" && e.expressionInfo))
return;
const { expressionId: i, expressionInfo: a } = e, { targetId: l, targetType: s, expressionType: u, value: c, message: d } = a, m = this.formSchemaUtils.getModule();
m.expressions ?? (m.expressions = []);
const { expressions: y } = m;
let p = y.find((C) => C.target === l);
p || (p = { target: l, rules: [], targetType: s }, y.push(p));
const I = p.rules.find((C) => C.type === u);
if (I)
I.value = c, I.message = d;
else {
const C = { id: i, type: u, value: c, message: d };
p.rules.push(C);
}
delete e.expressionInfo;
}
/**
* 属性类型切换为非表达式后,清除原表达式
* @param changeObject
* @param propertyData
* @returns
*/
clearExpression(t, e) {
const o = t.propertyValue;
if (o && o.type === "Expression")
return;
const i = t.propertyID, a = this.formSchemaUtils.getExpressions(), l = e.binding ? e.binding.field : e.id, s = a.find((u) => u.target === l);
!s || !s.rules || (s.rules = s.rules.filter((u) => u.type !== i));
}
getExpressionOptions(t, e, o) {
return new La(this.formSchemaUtils).getExpressionOptions(t, e, o);
}
getRealTargetType(t) {
return ["response-toolbar-item", "tab-toolbar-item", "section-toolbar-item"].indexOf(t.type) > -1 ? "Button" : t.binding && t.binding.field ? "Field" : "Container";
}
}
class $a extends uo {
constructor(t, e) {
super(t, e);
}
getPropertyConfig(t) {
return this.propertyConfig.categories.basic = this.getBasicPropConfig(t), this.propertyConfig.categories.appearance = this.getAppearancePropConfig(t), this.getBehaviorConfig(t), this.getEventPropConfig(t), this.propertyConfig;
}
getAppearancePropConfig(t) {
const e = this.formSchemaUtils.getViewModelById(this.viewModelId);
t.name = e ? e.name : null;
const o = this;
return this.getAppearanceConfig(t, {
name: {
title: "组件名称",
type: "string",
description: "组件名称",
defaultValue: t.name
}
}, (i, a, l) => {
switch (i.propertyID) {
case "name":
o.syncChangesToViewModel({ name: i.propertyValue }), delete a.name;
break;
}
});
}
getEventPropConfig(t) {
const e = [
{
label: "onInit",
name: "初始化事件"
},
{
label: "onAfterViewInit",
name: "视图初始化后事件"
}
], o = this, r = o.eventsEditorUtils.formProperties(t, o.viewModelId, e), i = {};
i[o.viewModelId] = {
type: "events-editor",
editor: {
initialData: r
}
}, this.propertyConfig.categories.eventsEditor = {
title: "事件",
hideTitle: !0,
properties: i,
// 这个属性,标记当属性变更得时候触发重新更新属性
refreshPanelAfterChanged: !0,
tabId: "commands",
tabName: "交互",
setPropertyRelates(a, l) {
const s = a.propertyValue;
delete t[o.viewModelId], s && (s.setPropertyRelates = this.setPropertyRelates, o.eventsEditorUtils.saveRelatedParameters(t, o.viewModelId, s.events, s));
}
};
}
getBehaviorConfig(t) {
const e = this.formSchemaUtils.getViewModelById(this.viewModelId), o = e ? e.enableValidation : null, r = this;
this.propertyConfig.categories.behavior = {
title: "行为",
description: "",
properties: {
enableValidation: {
title: "启用校验",
type: "boolean",
description: "运行时组件是否启用校验",
defaultValue: o
}
},
setPropertyRelates: (i) => {
if (i)
switch (i.propertyID) {
case "enableValidation": {
r.syncChangesToViewModel({ enableValidation: i.propertyValue }), delete t.enableValidation;
break;
}
}
}
};
}
/**
* 将变更的属性值同步到ViewModel上
*/
syncChangesToViewModel(t) {
const e = this.formSchemaUtils.getViewModelById(this.viewModelId);
e && Object.assign(e, t);
}
}
const ja = {
showCloseButton: { type: Boolean, default: !0 },
position: { type: String, default: "top-center" },
timeout: { type: Number, default: 3e3 },
theme: { type: String, default: "bootstrap" },
left: { type: Number },
right: { type: Number },
top: { type: Number },
bottom: { type: Number },
id: { type: String },
animate: { type: String, default: "fadeIn" },
options: { type: Object },
safeHtml: { type: Boolean, default: !0 }
}, Wa = {
showCloseButton: { type: Boolean, default: !0 },
animate: { type: String, default: "fadeIn" },
options: { type: Object }
}, wn = /* @__PURE__ */ Qe({
name: "Toast",
props: Wa,
emits: ["close", "click"],
setup: (n, t) => {
const e = S(n.animate), o = "fadeOut", r = q(() => n.options), i = S(!1), a = q(() => {
const g = {
animated: i.value,
toast: !0
};
return g[n.animate] = !1, g[o] = i.value, g[r.value.type] = !0, r.value.theme && (g[r.value.theme] = !0), g;
}), l = q(() => {
const b = `f-icon-${r.value && r.value.type ? r.value.type.replace("toasty-type-", "") : "default"}`, F = {
"f-icon": !0
};
return F[b] = !0, F;
}), s = q(() => r.value.title || r.value.message), u = q(() => r.value.title && r.value.message), c = q(() => !r.value.title && r.value.message), d = q(() => n.showCloseButton), m = q(() => !!r.value.buttons || !!t.slots.default);
function y(g) {
g.stopPropagation(), g.preventDefault(), i.value = !1, setTimeout(() => {
t.emit("close", r.value);
}, 200);
}
function p(g, x) {
}
function I(g) {
return `f-preten-link ${g.customClass ? g.customClass : ""}`;
}
Me(e, () => {
e.value;
});
const C = () => {
var g;
return M(Et, null, [M("div", {
class: "after-toast-msg text-right"
}, [!t.slots.default && ((g = r.value.buttons) == null ? void 0 : g.map((x) => M("span", {
class: I(x),
onClick: (b) => void 0
}, [x.text]))), t.slots.default && t.slots.default()])]);
};
return () => M("div", {
class: a.value,
style: "min-height:44px"
}, [d.value && M("button", {
title: "关闭",
class: "toast-close f-btn-icon f-bare",
onClick: y
}, [M("span", {
class: "f-icon modal_close"
}, null)]), s.value && M("section", {
class: "modal-tips"
}, [M("div", {
class: "float-left modal-tips-iconwrap"
}, [M("span", {
class: l.value
}, null)]), M("div", {
class: "modal-tips-content"
}, [u.value && M(Et, null, [M("h5", {
class: "toast-title modal-tips-title",
innerHTML: r.value.title
}, null), M("p", {
class: "toast-msg",
innerHTML: r.value.message
}, null), m.value && C()]), c.value && (r.value.buttons ? M("div", {
class: "toast-title-btns-wrapper d-flex"
}, [M("h5", {
class: "toast-title modal-tips-title only-toast-msg",
innerHTML: r.value.message
}, null), M("div", {
class: "after-toast-title text-right ml-auto"
}, [C()])]) : M("h5", {
class: "toast-title modal-tips-title only-toast-msg",
innerHTML: r.value.message
}, null))])])]);
}
}), on = /* @__PURE__ */ Qe({
name: "Notify",
props: ja,
emits: ["close", "empty"],
setup(n, t) {
const e = q(() => ({
"farris-notify": !0
})), o = {
left: 12,
right: 12,
top: 20,
bottom: 12
}, r = S(), i = S(n.options), a = S(n.showCloseButton), l = q(() => n.position || "bottom-right"), s = q(() => n.timeout != null ? n.timeout : 3e3), u = q(() => {
const m = n.bottom ? n.bottom : o.bottom, y = n.top ? n.top : o.top, p = {
transition: "all 0.2s ease",
left: l.value.indexOf("left") > -1 ? `${n.left ? n.left : o.left}px` : "",
right: l.value.indexOf("right") > -1 ? `${n.right ? n.right : o.right}px` : "",
top: l.value.indexOf("top") > -1 ? `${y}px` : "",
bottom: l.value.indexOf("bottom") > -1 ? `${m}px` : ""
};
return l.value.indexOf("center") > -1 && (p.left = "50%", p.marginLeft = "calc(-24rem / 2)", l.value === "center-center" && (p.top = "50%", p.transform = "translate(-50%, -50%)")), p;
});
function c(m) {
t.emit("close");
}
s.value && setTimeout(() => {
c();
}, s.value), t.expose({
closeToast: c,
container: r,
notifyPosition: l
});
function d(m, y) {
c();
}
return () => M("div", {
class: e.value,
style: u.value,
ref: r
}, [M(wn, {
options: i.value,
showCloseButton: a.value,
animate: n.animate,
onClose: (m) => d(m, i.value)
}, null)]);
}
});
class en {
constructor() {
L(this, "notifyRefs", []);
L(this, "globalConfig", wt({}));
}
escapeAllHtml(t) {
if (typeof t != "string" || !t)
return "";
const e = document.createElement("div");
return e.textContent = t || "", e.innerHTML.replace(/ /g, " ").replace(/\\n/g, "<br>").replace(/\\t/g, " ").replace(/\\r/g, "");
}
createNotifyInstance(t) {
const e = this, r = Object.assign({
timeout: 3e3,
position: "bottom-right",
showCloseButton: !0,
safeHtml: !0
}, this.globalConfig, {
...t
}), i = document.createElement("div");
i.style.display = "contents";
const a = Qn({
setup() {
var u;
const l = S();
function s() {
l.value.container.style.transform = "scale(0)", setTimeout(() => {
e.updateNotifyPositionForClose(r, l), a.unmount();
}, 220);
}
if (r.position.indexOf("top") > -1) {
const c = e.getNotifyInstances(r.position), d = c[c.length - 1];
if (d) {
const m = d.value.container.getBoundingClientRect();
r.top = m.bottom;
}
}
return r.safeHtml && ((u = r.options) != null && u.message) && (r.options.message = e.escapeAllHtml(r.options.message)), dn(() => {
document.body.removeChild(i);
}), Ct(() => {
e.updateNotifyPositionForCreate(r, l);
}), () => M(Kn, {
mode: "out-in",
name: "fade",
appear: !0
}, {
default: () => [M(on, $t({
ref: l
}, r, {
onClose: s
}), null)]
});
}
});
return a.provide("NotifyService", this), document.body.appendChild(i), a.mount(i), a;
}
getNotifyInstances(t) {
return this.notifyRefs.filter((e) => e.value.notifyPosition === t);
}
updateNotifyPositionForCreate(t, e) {
if (this.notifyRefs && this.notifyRefs.length) {
const o = window.innerHeight;
t.position.indexOf("bottom") > -1 && this.getNotifyInstances(t.position).forEach((r) => {
const i = r.value.container.getBoundingClientRect();
r.value.container.style.bottom = i.height + o - i.bottom + "px";
});
}
this.notifyRefs = [...this.no