@farris/ui-vue 1.3.5 → 1.3.6
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/components/accordion/index.esm.js +16 -16
- package/components/accordion/index.umd.cjs +1 -1
- package/components/avatar/index.esm.js +65 -65
- package/components/avatar/index.umd.cjs +1 -1
- package/components/button-edit/index.esm.js +13 -13
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +504 -490
- package/components/calendar/index.umd.cjs +1 -1
- package/components/capsule/index.esm.js +247 -233
- package/components/capsule/index.umd.cjs +1 -1
- package/components/checkbox/index.esm.js +356 -344
- package/components/checkbox/index.umd.cjs +1 -1
- package/components/color-picker/index.esm.js +159 -145
- package/components/color-picker/index.umd.cjs +2 -2
- package/components/combo-list/index.esm.js +127 -128
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-tree/index.esm.js +15 -15
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/component/index.esm.js +101 -87
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.esm.js +7 -5
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +181 -167
- package/components/content-container/index.umd.cjs +1 -1
- package/components/data-grid/index.esm.js +4057 -4304
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +2450 -2467
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.esm.js +789 -777
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/designer-canvas/index.esm.js +3593 -3585
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/dropdown/index.esm.js +257 -243
- package/components/dropdown/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +322 -306
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +177 -163
- package/components/dynamic-resolver/index.umd.cjs +1 -1
- package/components/event-parameter/index.esm.js +163 -2643
- package/components/event-parameter/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +500 -486
- package/components/events-editor/index.umd.cjs +1 -1
- package/components/expression-editor/index.esm.js +37 -37
- package/components/expression-editor/index.umd.cjs +1 -1
- package/components/external-container/index.esm.js +485 -470
- package/components/external-container/index.umd.cjs +1 -1
- package/components/field-selector/index.esm.js +2611 -2623
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/filter-bar/index.esm.js +3825 -3837
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/flow-canvas/index.esm.js +3720 -3712
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/image-cropper/index.esm.js +402 -388
- package/components/image-cropper/index.umd.cjs +1 -1
- package/components/input-group/index.esm.js +201 -202
- package/components/input-group/index.umd.cjs +1 -1
- package/components/layout/index.esm.js +264 -245
- package/components/layout/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +157 -143
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.esm.js +312 -296
- package/components/list-view/index.umd.cjs +1 -1
- package/components/lookup/index.esm.js +4748 -4992
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.esm.js +4215 -4462
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +169 -155
- package/components/nav/index.umd.cjs +2 -2
- package/components/number-range/index.esm.js +150 -137
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +207 -194
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/order/index.esm.js +427 -414
- package/components/order/index.umd.cjs +1 -1
- package/components/page-footer/index.esm.js +22 -22
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +510 -492
- package/components/page-header/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +192 -178
- package/components/pagination/index.umd.cjs +1 -1
- package/components/progress/index.esm.js +234 -220
- package/components/progress/index.umd.cjs +3 -3
- package/components/property-editor/index.esm.js +288 -277
- package/components/property-editor/index.umd.cjs +2 -2
- package/components/property-panel/index.esm.js +62 -61
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/query-solution/index.esm.js +3015 -3027
- package/components/query-solution/index.umd.cjs +5 -5
- package/components/radio-button/index.esm.js +64 -64
- package/components/radio-button/index.umd.cjs +1 -1
- package/components/radio-group/index.esm.js +293 -280
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/rate/index.esm.js +222 -208
- package/components/rate/index.umd.cjs +1 -1
- package/components/response-layout/index.esm.js +187 -173
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.esm.js +554 -542
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +483 -469
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +632 -617
- package/components/schema-selector/index.umd.cjs +2 -2
- package/components/search-box/index.esm.js +228 -214
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +419 -406
- package/components/section/index.umd.cjs +1 -1
- package/components/smoke-detector/index.esm.js +162 -148
- package/components/smoke-detector/index.umd.cjs +1 -1
- package/components/splitter/index.esm.js +308 -284
- package/components/splitter/index.umd.cjs +1 -1
- package/components/step/index.esm.js +279 -265
- package/components/step/index.umd.cjs +1 -1
- package/components/switch/index.esm.js +183 -170
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +307 -294
- package/components/tabs/index.umd.cjs +1 -1
- package/components/tags/index.esm.js +320 -306
- package/components/tags/index.umd.cjs +1 -1
- package/components/text/index.esm.js +245 -231
- package/components/text/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +260 -247
- package/components/textarea/index.umd.cjs +1 -1
- package/components/time-picker/index.esm.js +409 -396
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/transfer/index.esm.js +424 -410
- package/components/transfer/index.umd.cjs +1 -1
- package/components/tree-grid/index.esm.js +2994 -3006
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +749 -733
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +325 -311
- package/components/uploader/index.umd.cjs +2 -2
- package/components/verify-detail/index.esm.js +304 -290
- package/components/verify-detail/index.umd.cjs +1 -1
- package/components/video/index.esm.js +99 -85
- package/components/video/index.umd.cjs +1 -1
- package/components/weather/index.esm.js +947 -933
- package/components/weather/index.umd.cjs +4 -4
- package/farris.all.esm.js +7750 -7990
- package/farris.all.umd.cjs +12 -12
- package/package.json +1 -1
- package/types/data-view/composition/types.d.ts +0 -1
- package/types/entity-binding-selector/composition/use-entity-tree.d.ts +3 -0
- package/types/entity-binding-selector/composition/use-field-tree.d.ts +1 -0
- package/components/event-parameter/index.css +0 -1
- package/types/data-grid/src/components/data/data-grid-area.component.d.ts +0 -8
- package/types/data-grid/src/components/data/data-grid-area.props.d.ts +0 -3
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as C, computed as h, provide as E, createVNode as d, inject as
|
|
2
|
-
import { isPlainObject as
|
|
1
|
+
import { defineComponent as C, computed as h, provide as E, createVNode as d, inject as I, ref as y, onMounted as P } from "vue";
|
|
2
|
+
import { isPlainObject as O, cloneDeep as M } from "lodash-es";
|
|
3
3
|
import { resolveAppearance as R, createPropsResolver as T } from "../dynamic-resolver/index.esm.js";
|
|
4
4
|
import { useDesignerComponent as B } from "../designer-canvas/index.esm.js";
|
|
5
|
-
const q = {},
|
|
5
|
+
const q = {}, x = {};
|
|
6
6
|
function F(t) {
|
|
7
7
|
const { properties: e, title: i, ignore: s } = t, n = s && Array.isArray(s), p = Object.keys(e).reduce((a, u) => ((!n || !s.find((m) => m === u)) && (a[u] = e[u].type === "object" && e[u].properties ? F(e[u]) : M(e[u].default)), a), {});
|
|
8
8
|
if (i && (!n || !s.find((a) => a === "id"))) {
|
|
@@ -11,9 +11,9 @@ function F(t) {
|
|
|
11
11
|
}
|
|
12
12
|
return p;
|
|
13
13
|
}
|
|
14
|
-
function
|
|
14
|
+
function V(t, e) {
|
|
15
15
|
const i = F(e);
|
|
16
|
-
return Object.keys(i).reduce((s, n) => (s[n] &&
|
|
16
|
+
return Object.keys(i).reduce((s, n) => (Object.prototype.hasOwnProperty.call(t, n) && (s[n] && O(s[n]) && O(t[n] || !t[n]) ? Object.assign(s[n], t[n] || {}) : s[n] = t[n]), s), i), i;
|
|
17
17
|
}
|
|
18
18
|
function z(t, e) {
|
|
19
19
|
return Object.keys(t).filter((s) => t[s] != null).reduce((s, n) => {
|
|
@@ -31,7 +31,7 @@ function z(t, e) {
|
|
|
31
31
|
}, {});
|
|
32
32
|
}
|
|
33
33
|
function H(t, e, i = /* @__PURE__ */ new Map()) {
|
|
34
|
-
const s =
|
|
34
|
+
const s = V(t, e);
|
|
35
35
|
return z(s, i);
|
|
36
36
|
}
|
|
37
37
|
function L(t = {}) {
|
|
@@ -83,15 +83,15 @@ function L(t = {}) {
|
|
|
83
83
|
return p(r).reduce((f, g) => f && a(g, c), !0);
|
|
84
84
|
}
|
|
85
85
|
function m(r, c) {
|
|
86
|
-
const o = Object.keys(r), l = o.includes("allOf"), f = o.includes("anyOf"), g = l || f,
|
|
87
|
-
return l ? !
|
|
86
|
+
const o = Object.keys(r), l = o.includes("allOf"), f = o.includes("anyOf"), g = l || f, A = (g ? r[g ? l ? "allOf" : "anyOf" : "allOf"] : [r]).map((S) => u(S, c));
|
|
87
|
+
return l ? !A.includes(!1) : A.includes(!0);
|
|
88
88
|
}
|
|
89
89
|
return { parseValueSchema: m };
|
|
90
90
|
}
|
|
91
91
|
const _ = {}, G = {};
|
|
92
92
|
L();
|
|
93
93
|
function J(t, e, i = /* @__PURE__ */ new Map(), s = (a, u, m, r) => u, n = {}, p = (a) => a) {
|
|
94
|
-
return q[e.title] = e,
|
|
94
|
+
return q[e.title] = e, x[e.title] = s, _[e.title] = n, G[e.title] = p, (a = {}) => {
|
|
95
95
|
const u = H(a, e, i), m = Object.keys(t).reduce((r, c) => (r[c] = t[c].default, r), {});
|
|
96
96
|
return Object.assign(m, u);
|
|
97
97
|
};
|
|
@@ -280,18 +280,18 @@ const ne = "accordion", se = "A Farris Component", re = "object", oe = {
|
|
|
280
280
|
type: de,
|
|
281
281
|
properties: pe,
|
|
282
282
|
required: fe
|
|
283
|
-
},
|
|
283
|
+
}, w = {
|
|
284
284
|
width: { type: Number },
|
|
285
285
|
height: { type: Number, default: 100 },
|
|
286
286
|
title: { type: String, default: "" },
|
|
287
287
|
disabled: { type: Boolean, default: !1 },
|
|
288
288
|
active: { type: Boolean, default: !1 }
|
|
289
|
-
}, D = T(
|
|
289
|
+
}, D = T(w, me, N), $ = /* @__PURE__ */ C({
|
|
290
290
|
name: "FAccordionItem",
|
|
291
|
-
props:
|
|
291
|
+
props: w,
|
|
292
292
|
emits: [],
|
|
293
293
|
setup(t, e) {
|
|
294
|
-
const i =
|
|
294
|
+
const i = I("accordionContext"), s = y(t.title), n = y(t.active);
|
|
295
295
|
function p() {
|
|
296
296
|
var o;
|
|
297
297
|
t.disabled || !((o = i == null ? void 0 : i.parentProps) != null && o.enableFold) || (n.value = !n.value);
|
|
@@ -351,7 +351,7 @@ const ne = "accordion", se = "A Farris Component", re = "object", oe = {
|
|
|
351
351
|
accordion: !0
|
|
352
352
|
};
|
|
353
353
|
return u.reduce((r, c) => (r[c] = !0, r), m), m;
|
|
354
|
-
}), n = y(), p =
|
|
354
|
+
}), n = y(), p = I("design-item-context"), a = B(n, p);
|
|
355
355
|
return P(() => {
|
|
356
356
|
n.value.componentInstance = a;
|
|
357
357
|
}), e.expose(a.value), () => d("div", {
|
|
@@ -362,7 +362,7 @@ const ne = "accordion", se = "A Farris Component", re = "object", oe = {
|
|
|
362
362
|
}
|
|
363
363
|
}), ge = /* @__PURE__ */ C({
|
|
364
364
|
name: "FAccordionItemDesign",
|
|
365
|
-
props:
|
|
365
|
+
props: w,
|
|
366
366
|
emits: [],
|
|
367
367
|
setup(t, e) {
|
|
368
368
|
const i = y(t.title), s = y(!1), n = y(!1);
|
|
@@ -434,7 +434,7 @@ b.registerDesigner = (t, e, i) => {
|
|
|
434
434
|
export {
|
|
435
435
|
b as FAccordion,
|
|
436
436
|
$ as FAccordionItem,
|
|
437
|
-
|
|
437
|
+
w as accordionItemProps,
|
|
438
438
|
D as accordionItemPropsResolver,
|
|
439
439
|
j as accordionProps,
|
|
440
440
|
k as accordionPropsResolver,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(f,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("vue"),require("lodash-es"),require("../dynamic-resolver/index.umd.js"),require("../designer-canvas/index.umd.js")):typeof define=="function"&&define.amd?define(["exports","vue","lodash-es","../dynamic-resolver/index.umd.js","../designer-canvas/index.umd.js"],n):(f=typeof globalThis<"u"?globalThis:f||self,n(f.accordion={},f.Vue,f.LodashES,f.dynamicResolver,f.designerCanvas))})(this,function(f,n,N,I,v){"use strict";const F={},S={};function
|
|
1
|
+
(function(f,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("vue"),require("lodash-es"),require("../dynamic-resolver/index.umd.js"),require("../designer-canvas/index.umd.js")):typeof define=="function"&&define.amd?define(["exports","vue","lodash-es","../dynamic-resolver/index.umd.js","../designer-canvas/index.umd.js"],n):(f=typeof globalThis<"u"?globalThis:f||self,n(f.accordion={},f.Vue,f.LodashES,f.dynamicResolver,f.designerCanvas))})(this,function(f,n,N,I,v){"use strict";const F={},S={};function O(t){const{properties:e,title:c,ignore:r}=t,o=r&&Array.isArray(r),p=Object.keys(e).reduce((d,u)=>((!o||!r.find(h=>h===u))&&(d[u]=e[u].type==="object"&&e[u].properties?O(e[u]):N.cloneDeep(e[u].default)),d),{});if(c&&(!o||!r.find(d=>d==="id"))){const d=c.toLowerCase().replace(/-/g,"_");p.id=`${d}_${Math.random().toString().slice(2,6)}`}return p}function M(t,e){const c=O(e);return Object.keys(c).reduce((r,o)=>(Object.prototype.hasOwnProperty.call(t,o)&&(r[o]&&N.isPlainObject(r[o])&&N.isPlainObject(t[o]||!t[o])?Object.assign(r[o],t[o]||{}):r[o]=t[o]),r),c),c}function k(t,e){return Object.keys(t).filter(r=>t[r]!=null).reduce((r,o)=>{if(e.has(o)){const p=e.get(o);if(typeof p=="string")r[p]=t[o];else{const d=p(o,t[o],t);Object.assign(r,d)}}else r[o]=t[o];return r},{})}function q(t,e,c=new Map){const r=M(t,e);return k(r,c)}function T(t={}){function e(s,a,i,l){if(typeof i=="number")return l[s].length===i;if(typeof i=="object"){const m=Object.keys(i)[0],g=i[m];if(m==="not")return Number(l[s].length)!==Number(g);if(m==="moreThan")return Number(l[s].length)>=Number(g);if(m==="lessThan")return Number(l[s].length)<=Number(g)}return!1}function c(s,a,i,l){return l[s]&&l[s].propertyValue&&String(l[s].propertyValue.value)===String(i)}const r=new Map([["length",e],["getProperty",c]]);Object.keys(t).reduce((s,a)=>(s.set(a,t[a]),s),r);function o(s,a){const i=s;return typeof a=="number"?[{target:i,operator:"length",param:null,value:Number(a)}]:typeof a=="boolean"?[{target:i,operator:"getProperty",param:s,value:!!a}]:typeof a=="object"?Object.keys(a).map(l=>{if(l==="length")return{target:i,operator:"length",param:null,value:a[l]};const m=l,g=a[l];return{target:i,operator:"getProperty",param:m,value:g}}):[]}function p(s){return Object.keys(s).reduce((i,l)=>{const m=o(l,s[l]);return i.push(...m),i},[])}function d(s,a){if(r.has(s.operator)){const i=r.get(s.operator);return i&&i(s.target,s.param,s.value,a)||!1}return!1}function u(s,a){return p(s).reduce((m,g)=>m&&d(g,a),!0)}function h(s,a){const i=Object.keys(s),l=i.includes("allOf"),m=i.includes("anyOf"),g=l||m,V=(g?s[g?l?"allOf":"anyOf":"allOf"]:[s]).map(G=>u(G,a));return l?!V.includes(!1):V.includes(!0)}return{parseValueSchema:h}}const D={},R={};T();function E(t,e,c=new Map,r=(d,u,h,s)=>u,o={},p=d=>d){return F[e.title]=e,S[e.title]=r,D[e.title]=o,R[e.title]=p,(d={})=>{const u=q(d,e,c),h=Object.keys(t).reduce((s,a)=>(s[a]=t[a].default,s),{});return Object.assign(h,u)}}const P=new Map([["appearance",I.resolveAppearance],["size",(t,e)=>{const c={};return e.width&&(c.width=Number(e.width)),e.height&&(c.height=Number(e.height)),c}]]),B={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/accordion.schema.json",title:"accordion",description:"A Farris Container Component",type:"object",properties:{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}},required:["id","type","contents"]};function x(t,e,c){return e}const z={title:"accordion",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}}}},C={customClass:{type:String,default:""},height:{type:Number},width:{type:Number},enableFold:{type:Boolean,default:!0},expanded:{type:Boolean,default:!1}},A=E(C,B,P,x,z),y=n.defineComponent({name:"FAccordion",props:C,emits:[],setup(t,e){const c=n.computed(()=>({height:t.height?`${t.height}px`:"",width:t.width?`${t.width}px`:""}));n.provide("accordionContext",{parentProps:t});const r=n.computed(()=>{const o=t.customClass.split(" "),p={"farris-panel":!0,accordion:!0};return o.reduce((d,u)=>(d[u]=!0,d),p),p});return()=>n.createVNode("div",{class:r.value,style:c.value},[e.slots.default&&e.slots.default()])}}),H={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/accordion-item.schema.json",title:"AccordionItem",description:"A Farris Container Component",type:"object",properties:{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}},required:["id","type","contents"]},$={width:{type:Number},height:{type:Number,default:100},title:{type:String,default:""},disabled:{type:Boolean,default:!1},active:{type:Boolean,default:!1}},w=I.createPropsResolver($,H,P),j=n.defineComponent({name:"FAccordionItem",props:$,emits:[],setup(t,e){const c=n.inject("accordionContext"),r=n.ref(t.title),o=n.ref(t.active);function p(){var i;t.disabled||!((i=c==null?void 0:c.parentProps)!=null&&i.enableFold)||(o.value=!o.value)}function d(i){p()}const u=n.computed(()=>({"f-state-disabled":t.disabled,card:!0,"farris-panel-item":!0,"f-state-selected":o.value})),h=n.computed(()=>!0),s=n.computed(()=>({"f-icon":!0,"f-accordion-collapse":!o.value,"f-accordion-expand":o.value})),a=n.computed(()=>{const i={transition:"height 0.36s ease 0s",height:o.value?`${t.height}px`:0};return o.value||(i.overflow="hidden"),i});return n.onMounted(()=>{var i;(i=c==null?void 0:c.parentProps)!=null&&i.expanded&&(o.value=!0)}),()=>n.createVNode("div",{class:u.value},[n.createVNode("div",{class:"card-header",onClick:d},[n.createVNode("div",{class:"panel-item-title"},[h.value&&n.createVNode("span",null,[r.value]),e.slots.head&&e.slots.head(),n.createVNode("span",{class:s.value},null)]),n.createVNode("div",{class:"panel-item-tool"},[e.slots.toolbar&&e.slots.toolbar()]),n.createVNode("div",{class:"panel-item-clear"},null)]),n.createVNode("div",{style:a.value},[n.createVNode("div",{class:"card-body"},[e.slots.default&&e.slots.default()])])])}}),L=n.defineComponent({name:"FAccordionDesign",props:C,emits:[],setup(t,e){const c=n.computed(()=>({height:t.height?`${t.height}px`:"",width:t.width?`${t.width}px`:""})),r=n.computed(()=>{const u=t.customClass.split(" "),h={"farris-panel":!0,accordion:!0};return u.reduce((s,a)=>(s[a]=!0,s),h),h}),o=n.ref(),p=n.inject("design-item-context"),d=v.useDesignerComponent(o,p);return n.onMounted(()=>{o.value.componentInstance=d}),e.expose(d.value),()=>n.createVNode("div",{ref:o,class:r.value,style:c.value},[e.slots.default&&e.slots.default()])}}),_=n.defineComponent({name:"FAccordionItemDesign",props:$,emits:[],setup(t,e){const c=n.ref(t.title),r=n.ref(!1),o=n.ref(!1);function p(){r.value=!r.value}function d(b){p()}const u=n.computed(()=>({"f-state-disable":o.value,card:!0,"farris-panel-item":!0,"f-state-selected":r.value})),h=n.computed(()=>!0),s=n.computed(()=>!1),a=n.computed(()=>({"f-icon":!0,"f-accordion-collapse":!r.value,"f-accordion-expand":r.value})),i=n.computed(()=>{const b={transition:"height 0.36s ease 0s",height:r.value?`${t.height}px`:0};return r.value||(b.overflow="hidden"),b});function l(){return!0}function m(){return!1}function g(){return!0}return e.expose({canMove:l(),canSelectParent:m(),canDelete:g(),canNested:!0}),()=>n.createVNode("div",{class:u.value},[n.createVNode("div",{class:"card-header",onClick:d},[n.createVNode("div",{class:"panel-item-title"},[h.value&&n.createVNode("span",null,[c.value]),s.value&&e.slots.head&&e.slots.head(),n.createVNode("span",{class:a.value},null)]),n.createVNode("div",{class:"panel-item-tool"},[e.slots.toolbar&&e.slots.toolbar()]),n.createVNode("div",{class:"panel-item-clear"},null)]),n.createVNode("div",{style:i.value},[n.createVNode("div",{class:"card-body drag-container"},[e.slots.default&&e.slots.default()])])])}});y.install=t=>{t.component(y.name,y),t.component(j.name,j)},y.register=(t,e,c,r)=>{t.accordion=y,t["accordion-item"]=j,e.accordion=A,e["accordion-item"]=w},y.registerDesigner=(t,e,c)=>{t.accordion=L,t["accordion-item"]=_,e.accordion=A,e["accordion-item"]=w},f.FAccordion=y,f.FAccordionItem=j,f.accordionItemProps=$,f.accordionItemPropsResolver=w,f.accordionProps=C,f.accordionPropsResolver=A,f.default=y,Object.defineProperties(f,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
var
|
|
2
|
-
var O = (i, o, e) => o in i ?
|
|
1
|
+
var R = Object.defineProperty;
|
|
2
|
+
var O = (i, o, e) => o in i ? R(i, o, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[o] = e;
|
|
3
3
|
var f = (i, o, e) => O(i, typeof o != "symbol" ? o + "" : o, e);
|
|
4
4
|
import { ref as I, computed as B, defineComponent as x, createVNode as b, inject as P, onMounted as Z } from "vue";
|
|
5
|
-
import { isPlainObject as
|
|
5
|
+
import { isPlainObject as L, cloneDeep as N } from "lodash-es";
|
|
6
6
|
import { resolveAppearance as z } from "../dynamic-resolver/index.esm.js";
|
|
7
|
-
import { DgControl as
|
|
8
|
-
import { withInstall as
|
|
7
|
+
import { DgControl as V, useDesignerComponent as J } from "../designer-canvas/index.esm.js";
|
|
8
|
+
import { withInstall as K } from "../common/index.esm.js";
|
|
9
9
|
const X = {}, Y = {};
|
|
10
10
|
function D(i) {
|
|
11
|
-
const { properties: o, title: e, ignore: n } = i, r = n && Array.isArray(n), s = Object.keys(o).reduce((l,
|
|
11
|
+
const { properties: o, title: e, ignore: n } = i, r = n && Array.isArray(n), s = Object.keys(o).reduce((l, y) => ((!r || !n.find((m) => m === y)) && (l[y] = o[y].type === "object" && o[y].properties ? D(o[y]) : N(o[y].default)), l), {});
|
|
12
12
|
if (e && (!r || !n.find((l) => l === "id"))) {
|
|
13
13
|
const l = e.toLowerCase().replace(/-/g, "_");
|
|
14
14
|
s.id = `${l}_${Math.random().toString().slice(2, 6)}`;
|
|
@@ -17,7 +17,7 @@ function D(i) {
|
|
|
17
17
|
}
|
|
18
18
|
function $(i, o) {
|
|
19
19
|
const e = D(o);
|
|
20
|
-
return Object.keys(e).reduce((n, r) => (n[r] &&
|
|
20
|
+
return Object.keys(e).reduce((n, r) => (Object.prototype.hasOwnProperty.call(i, r) && (n[r] && L(n[r]) && L(i[r] || !i[r]) ? Object.assign(n[r], i[r] || {}) : n[r] = i[r]), n), e), e;
|
|
21
21
|
}
|
|
22
22
|
function _(i, o) {
|
|
23
23
|
return Object.keys(i).filter((n) => i[n] != null).reduce((n, r) => {
|
|
@@ -83,14 +83,14 @@ function te(i = {}) {
|
|
|
83
83
|
}
|
|
84
84
|
return !1;
|
|
85
85
|
}
|
|
86
|
-
function
|
|
86
|
+
function y(a, d) {
|
|
87
87
|
return s(a).reduce((c, A) => c && l(A, d), !0);
|
|
88
88
|
}
|
|
89
|
-
function
|
|
90
|
-
const t = Object.keys(a), p = t.includes("allOf"), c = t.includes("anyOf"), A = p || c, v = (A ? a[A ? p ? "allOf" : "anyOf" : "allOf"] : [a]).map((k) =>
|
|
89
|
+
function m(a, d) {
|
|
90
|
+
const t = Object.keys(a), p = t.includes("allOf"), c = t.includes("anyOf"), A = p || c, v = (A ? a[A ? p ? "allOf" : "anyOf" : "allOf"] : [a]).map((k) => y(k, d));
|
|
91
91
|
return p ? !v.includes(!1) : v.includes(!0);
|
|
92
92
|
}
|
|
93
|
-
return { parseValueSchema:
|
|
93
|
+
return { parseValueSchema: m };
|
|
94
94
|
}
|
|
95
95
|
const u = {
|
|
96
96
|
button: { type: "button", name: "按钮", icon: "Button" },
|
|
@@ -134,10 +134,10 @@ const u = {
|
|
|
134
134
|
"query-solution": { type: "query-solution", name: "筛选方案", icon: "QueryScheme" }
|
|
135
135
|
}, ne = {}, re = {};
|
|
136
136
|
te();
|
|
137
|
-
function oe(i, o, e = /* @__PURE__ */ new Map(), n = (l,
|
|
137
|
+
function oe(i, o, e = /* @__PURE__ */ new Map(), n = (l, y, m, a) => y, r = {}, s = (l) => l) {
|
|
138
138
|
return X[o.title] = o, Y[o.title] = n, ne[o.title] = r, re[o.title] = s, (l = {}) => {
|
|
139
|
-
const
|
|
140
|
-
return Object.assign(
|
|
139
|
+
const y = ee(l, o, e), m = Object.keys(i).reduce((a, d) => (a[d] = i[d].default, a), {});
|
|
140
|
+
return Object.assign(m, y);
|
|
141
141
|
};
|
|
142
142
|
}
|
|
143
143
|
function ie(i, o, e) {
|
|
@@ -210,12 +210,12 @@ const ae = /* @__PURE__ */ new Map([
|
|
|
210
210
|
}, Ae = [
|
|
211
211
|
"id",
|
|
212
212
|
"type"
|
|
213
|
-
],
|
|
213
|
+
], ye = [
|
|
214
214
|
"id",
|
|
215
215
|
"appearance",
|
|
216
216
|
"binding",
|
|
217
217
|
"visible"
|
|
218
|
-
],
|
|
218
|
+
], me = {
|
|
219
219
|
$schema: se,
|
|
220
220
|
$id: le,
|
|
221
221
|
title: ce,
|
|
@@ -223,7 +223,7 @@ const ae = /* @__PURE__ */ new Map([
|
|
|
223
223
|
type: pe,
|
|
224
224
|
properties: ue,
|
|
225
225
|
required: Ae,
|
|
226
|
-
ignore:
|
|
226
|
+
ignore: ye
|
|
227
227
|
}, T = {
|
|
228
228
|
/**
|
|
229
229
|
* 头像宽度
|
|
@@ -261,16 +261,16 @@ const ae = /* @__PURE__ */ new Map([
|
|
|
261
261
|
* 支持的头像类型
|
|
262
262
|
*/
|
|
263
263
|
imageType: { type: Array, default: ["jpeg"] }
|
|
264
|
-
}, H = oe(T,
|
|
264
|
+
}, H = oe(T, me, ae, ie);
|
|
265
265
|
function q(i, o, e, n) {
|
|
266
266
|
const r = "data:image/jpeg;base64,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", s = I(i.readonly);
|
|
267
267
|
function l(c) {
|
|
268
268
|
return c.match(/\.(jpeg|jpg|gif|png|svg|bmp|webp)$/) != null;
|
|
269
269
|
}
|
|
270
|
-
function
|
|
270
|
+
function y(c) {
|
|
271
271
|
return c.indexOf("data:image/") > -1;
|
|
272
272
|
}
|
|
273
|
-
function
|
|
273
|
+
function m(c) {
|
|
274
274
|
return c ? "data:image/jpeg;base64," + c : "";
|
|
275
275
|
}
|
|
276
276
|
const a = B(() => {
|
|
@@ -281,7 +281,7 @@ function q(i, o, e, n) {
|
|
|
281
281
|
return !c || !c.length ? "image/*" : c.join(",");
|
|
282
282
|
}), d = B(() => {
|
|
283
283
|
const c = n.value || i.cover || r;
|
|
284
|
-
return l(c) ||
|
|
284
|
+
return l(c) || y(c) ? c : m(c);
|
|
285
285
|
}), t = B(() => s.value ? "" : i.title);
|
|
286
286
|
function p() {
|
|
287
287
|
s.value || e && e.value && e.value.click();
|
|
@@ -305,13 +305,13 @@ const E = /* @__PURE__ */ x({
|
|
|
305
305
|
function l() {
|
|
306
306
|
return "";
|
|
307
307
|
}
|
|
308
|
-
function
|
|
308
|
+
function y() {
|
|
309
309
|
}
|
|
310
|
-
const
|
|
310
|
+
const m = I(null), {
|
|
311
311
|
acceptTypes: a,
|
|
312
312
|
imageSource: d,
|
|
313
313
|
onClickImage: t
|
|
314
|
-
} = q(i, o,
|
|
314
|
+
} = q(i, o, m, n);
|
|
315
315
|
return () => b("div", {
|
|
316
316
|
class: e.value,
|
|
317
317
|
style: r.value,
|
|
@@ -331,7 +331,7 @@ const E = /* @__PURE__ */ x({
|
|
|
331
331
|
type: "file",
|
|
332
332
|
class: "f-avatar-upload",
|
|
333
333
|
accept: a.value,
|
|
334
|
-
onChange:
|
|
334
|
+
onChange: y,
|
|
335
335
|
style: "display: none;"
|
|
336
336
|
}, null)]);
|
|
337
337
|
}
|
|
@@ -502,7 +502,7 @@ f(S, "fieldControlTypeMapping", {
|
|
|
502
502
|
{ key: u["radio-group"].type, value: u["radio-group"].name }
|
|
503
503
|
]
|
|
504
504
|
});
|
|
505
|
-
let
|
|
505
|
+
let F = S;
|
|
506
506
|
const fe = I(0);
|
|
507
507
|
class he {
|
|
508
508
|
constructor() {
|
|
@@ -559,20 +559,20 @@ function ve(i) {
|
|
|
559
559
|
h ? s(h, v) : v.isSupportedClass = !1, v.label = g.label || g.id, v.id = g.id, v.group = p, c && (v.fieldSetId = d.id), e === g.id && (o = p), n.set(g.id, g), t.push(v);
|
|
560
560
|
});
|
|
561
561
|
}
|
|
562
|
-
function
|
|
562
|
+
function y(d) {
|
|
563
563
|
const t = i.getComponentById(d);
|
|
564
564
|
if (!t || !t.componentType || !t.componentType.startsWith("form"))
|
|
565
565
|
return { result: !1, message: "只可以在响应式表单组件中调整响应式布局配置" };
|
|
566
|
-
const p = i.selectNode(t, (c) => c.type ===
|
|
566
|
+
const p = i.selectNode(t, (c) => c.type === V["response-form"].type);
|
|
567
567
|
return !p || !p.contents || p.contents.length === 0 ? { result: !1, message: "Form区域内没有控件,请先添加控件" } : { result: !0, message: "", formNode: p };
|
|
568
568
|
}
|
|
569
|
-
function
|
|
569
|
+
function m(d, t) {
|
|
570
570
|
t = t || d.id;
|
|
571
|
-
const { result: p, message: c, formNode: A } =
|
|
571
|
+
const { result: p, message: c, formNode: A } = y(t);
|
|
572
572
|
if (!p)
|
|
573
573
|
return { result: p, message: c };
|
|
574
574
|
e = d.id, r = [], n.clear();
|
|
575
|
-
const g = A.contents[0].type ===
|
|
575
|
+
const g = A.contents[0].type === V.fieldset.type ? 0 : 1;
|
|
576
576
|
l(A, r, g);
|
|
577
577
|
const h = r.find((C) => !C.isSupportedClass);
|
|
578
578
|
return {
|
|
@@ -585,7 +585,7 @@ function ve(i) {
|
|
|
585
585
|
}
|
|
586
586
|
function a(d, t) {
|
|
587
587
|
t = t;
|
|
588
|
-
const { result: p, formNode: c } =
|
|
588
|
+
const { result: p, formNode: c } = y(t);
|
|
589
589
|
if (!p)
|
|
590
590
|
return "";
|
|
591
591
|
const A = [];
|
|
@@ -593,19 +593,19 @@ function ve(i) {
|
|
|
593
593
|
var C;
|
|
594
594
|
const h = n.get(g.id), v = h.appearance && h.appearance.class;
|
|
595
595
|
if (v) {
|
|
596
|
-
const
|
|
597
|
-
h.appearance.class =
|
|
596
|
+
const w = v.split(" ").filter((G) => !G.startsWith("col-")), M = "col-" + g.columnInSM, U = "col-md-" + g.columnInMD, Q = "col-xl-" + g.columnInLG, W = "col-el-" + g.columnInEL, j = [M, U, Q, W].concat(w);
|
|
597
|
+
h.appearance.class = j.join(" ");
|
|
598
598
|
}
|
|
599
599
|
if (g.fieldSetId) {
|
|
600
|
-
const k = c.contents.find((M) => M.id === g.fieldSetId),
|
|
601
|
-
|
|
600
|
+
const k = c.contents.find((M) => M.id === g.fieldSetId), w = A.find((M) => M.id === g.fieldSetId);
|
|
601
|
+
w ? (C = w.contents) == null || C.push(h) : (A.push(k), k.contents = [h]);
|
|
602
602
|
} else
|
|
603
603
|
A.push(h);
|
|
604
604
|
}), c.contents = A, c.id;
|
|
605
605
|
}
|
|
606
606
|
return {
|
|
607
|
-
checkCanFindFormNode:
|
|
608
|
-
checkCanOpenLayoutEditor:
|
|
607
|
+
checkCanFindFormNode: y,
|
|
608
|
+
checkCanOpenLayoutEditor: m,
|
|
609
609
|
changeFormControlsByResponseLayoutConfig: a,
|
|
610
610
|
getResonseFormLayoutConfig: l
|
|
611
611
|
};
|
|
@@ -622,7 +622,7 @@ class Ce extends ge {
|
|
|
622
622
|
getBasicProperties(e, n) {
|
|
623
623
|
var s;
|
|
624
624
|
const r = this;
|
|
625
|
-
return this.setDesignViewModelField(e),
|
|
625
|
+
return this.setDesignViewModelField(e), {
|
|
626
626
|
description: "Basic Information",
|
|
627
627
|
title: "基本信息",
|
|
628
628
|
properties: {
|
|
@@ -643,7 +643,7 @@ class Ce extends ge {
|
|
|
643
643
|
textField: "value",
|
|
644
644
|
valueField: "key",
|
|
645
645
|
editable: !1,
|
|
646
|
-
data: r.designViewModelField ?
|
|
646
|
+
data: r.designViewModelField ? F.getEditorTypesByMDataType((s = r.designViewModelField.type) == null ? void 0 : s.name) : F.getAllInputTypes()
|
|
647
647
|
}
|
|
648
648
|
},
|
|
649
649
|
label: {
|
|
@@ -668,7 +668,7 @@ class Ce extends ge {
|
|
|
668
668
|
}
|
|
669
669
|
}
|
|
670
670
|
},
|
|
671
|
-
setPropertyRelates(l,
|
|
671
|
+
setPropertyRelates(l, y) {
|
|
672
672
|
if (l)
|
|
673
673
|
switch (l && l.propertyID) {
|
|
674
674
|
case "type": {
|
|
@@ -740,7 +740,7 @@ class Ce extends ge {
|
|
|
740
740
|
const s = n.propertyValue, l = r && r.parent && r.parent.schema;
|
|
741
741
|
if (!l)
|
|
742
742
|
return;
|
|
743
|
-
const
|
|
743
|
+
const y = l.contents.findIndex((A) => A.id === e.id), m = l.contents[y];
|
|
744
744
|
let a;
|
|
745
745
|
this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
|
|
746
746
|
editor: {
|
|
@@ -750,19 +750,19 @@ class Ce extends ge {
|
|
|
750
750
|
require: this.designViewModelField.require,
|
|
751
751
|
readonly: this.designViewModelField.readonly
|
|
752
752
|
}, !1), a = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, s)), a || (a = this.controlCreatorUtils.createFormGroupWithoutField(s)), Object.assign(a, {
|
|
753
|
-
id:
|
|
754
|
-
appearance:
|
|
755
|
-
size:
|
|
756
|
-
label:
|
|
757
|
-
binding:
|
|
758
|
-
visible:
|
|
753
|
+
id: m.id,
|
|
754
|
+
appearance: m.appearance,
|
|
755
|
+
size: m.size,
|
|
756
|
+
label: m.label,
|
|
757
|
+
binding: m.binding,
|
|
758
|
+
visible: m.visible
|
|
759
759
|
}), Object.assign(a.editor, {
|
|
760
|
-
isTextArea: a.isTextArea &&
|
|
761
|
-
placeholder: (d =
|
|
762
|
-
holdPlace: (t =
|
|
763
|
-
readonly: (p =
|
|
764
|
-
require: (c =
|
|
765
|
-
}), l.contents.splice(
|
|
760
|
+
isTextArea: a.isTextArea && m.isTextArea,
|
|
761
|
+
placeholder: (d = m.editor) == null ? void 0 : d.placeholder,
|
|
762
|
+
holdPlace: (t = m.editor) == null ? void 0 : t.holdPlace,
|
|
763
|
+
readonly: (p = m.editor) == null ? void 0 : p.readonly,
|
|
764
|
+
require: (c = m.editor) == null ? void 0 : c.require
|
|
765
|
+
}), l.contents.splice(y, 1), l.contents.splice(y, 0, a), r.schema = Object.assign(m, a), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
|
|
766
766
|
(A) => A.classList.remove("dgComponentSelected")
|
|
767
767
|
), fe.value++;
|
|
768
768
|
}
|
|
@@ -804,13 +804,13 @@ class Ce extends ge {
|
|
|
804
804
|
*/
|
|
805
805
|
updateUnifiedLayoutAfterControlChanged(e, n, r) {
|
|
806
806
|
const s = e.split(" ");
|
|
807
|
-
let l = s.find((t) => /^col-([1-9]|10|11|12)$/.test(t)),
|
|
808
|
-
l = l || "col-12",
|
|
807
|
+
let l = s.find((t) => /^col-([1-9]|10|11|12)$/.test(t)), y = s.find((t) => /^col-md-([1-9]|10|11|12)$/.test(t)), m = s.find((t) => /^col-xl-([1-9]|10|11|12)$/.test(t)), a = s.find((t) => /^col-el-([1-9]|10|11|12)$/.test(t));
|
|
808
|
+
l = l || "col-12", y = y || "col-md-" + l.replace("col-", ""), m = m || "col-xl-" + y.replace("col-md-", ""), a = a || "col-el-" + m.replace("col-xl-", "");
|
|
809
809
|
const d = {
|
|
810
810
|
id: n,
|
|
811
811
|
columnInSM: parseInt(l.replace("col-", ""), 10),
|
|
812
|
-
columnInMD: parseInt(
|
|
813
|
-
columnInLG: parseInt(
|
|
812
|
+
columnInMD: parseInt(y.replace("col-md-", ""), 10),
|
|
813
|
+
columnInLG: parseInt(m.replace("col-xl-", ""), 10),
|
|
814
814
|
columnInEL: parseInt(a.replace("col-el-", ""), 10)
|
|
815
815
|
};
|
|
816
816
|
this.updateUnifiedLayoutAfterResponseLayoutChanged(r, d);
|
|
@@ -829,7 +829,7 @@ class Ce extends ge {
|
|
|
829
829
|
const A = s.find((g) => g.id === n.id);
|
|
830
830
|
Object.assign(A || {}, n);
|
|
831
831
|
}
|
|
832
|
-
const l = s.map((A) => A.columnInSM),
|
|
832
|
+
const l = s.map((A) => A.columnInSM), y = s.map((A) => A.columnInMD), m = s.map((A) => A.columnInLG), a = s.map((A) => A.columnInEL), d = this.checkIsUniqueColumn(l) ? l[0] : null, t = this.checkIsUniqueColumn(y) ? y[0] : null, p = this.checkIsUniqueColumn(m) ? m[0] : null, c = this.checkIsUniqueColumn(a) ? a[0] : null;
|
|
833
833
|
Object.assign(r.unifiedLayout, {
|
|
834
834
|
uniqueColClassInSM: d,
|
|
835
835
|
uniqueColClassInMD: t,
|
|
@@ -894,16 +894,16 @@ const Be = /* @__PURE__ */ x({
|
|
|
894
894
|
props: T,
|
|
895
895
|
emits: ["change", "update:modelValue"],
|
|
896
896
|
setup(i, o) {
|
|
897
|
-
const e = I(), n = P("designer-host-service"), r = P("design-item-context"), s = Ie(r, n), l =
|
|
897
|
+
const e = I(), n = P("designer-host-service"), r = P("design-item-context"), s = Ie(r, n), l = J(e, r, s);
|
|
898
898
|
Z(() => {
|
|
899
899
|
e.value.componentInstance = l;
|
|
900
900
|
}), o.expose(l.value);
|
|
901
|
-
const
|
|
901
|
+
const y = B(() => ({
|
|
902
902
|
"f-avatar": !0,
|
|
903
903
|
"f-avatar-readonly": i.readonly,
|
|
904
904
|
"f-avatar-circle": i.shape === "circle",
|
|
905
905
|
"f-avatar-square": i.shape === "square"
|
|
906
|
-
})),
|
|
906
|
+
})), m = I(i.modelValue), a = B(() => ({
|
|
907
907
|
width: i.avatarWidth + "px",
|
|
908
908
|
height: i.avatarHeight + "px"
|
|
909
909
|
})), d = !1;
|
|
@@ -916,10 +916,10 @@ const Be = /* @__PURE__ */ x({
|
|
|
916
916
|
acceptTypes: A,
|
|
917
917
|
imageSource: g,
|
|
918
918
|
onClickImage: h
|
|
919
|
-
} = q(i, o, c,
|
|
919
|
+
} = q(i, o, c, m);
|
|
920
920
|
return () => b("div", {
|
|
921
921
|
ref: e,
|
|
922
|
-
class:
|
|
922
|
+
class: y.value,
|
|
923
923
|
style: a.value,
|
|
924
924
|
onClick: h
|
|
925
925
|
}, [d, b("img", {
|
|
@@ -948,7 +948,7 @@ E.register = (i, o, e, n) => {
|
|
|
948
948
|
E.registerDesigner = (i, o, e) => {
|
|
949
949
|
i.avatar = Be, o.avatar = H;
|
|
950
950
|
};
|
|
951
|
-
const Te =
|
|
951
|
+
const Te = K(E);
|
|
952
952
|
export {
|
|
953
953
|
E as FAvatar,
|
|
954
954
|
T as avatarProps,
|