@farris/ui-vue 1.5.8 → 1.5.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/components/avatar/index.esm.js +1 -1
  2. package/components/avatar/index.umd.cjs +1 -1
  3. package/components/component/index.esm.js +1 -1
  4. package/components/component/index.umd.cjs +1 -1
  5. package/components/condition/index.esm.js +1 -1
  6. package/components/condition/index.umd.cjs +1 -1
  7. package/components/content-container/index.esm.js +1 -1
  8. package/components/content-container/index.umd.cjs +1 -1
  9. package/components/designer-canvas/index.esm.js +904 -893
  10. package/components/designer-canvas/index.umd.cjs +1 -1
  11. package/components/dynamic-form/index.esm.js +1 -1
  12. package/components/dynamic-form/index.umd.cjs +1 -1
  13. package/components/dynamic-view/index.esm.js +1 -1
  14. package/components/dynamic-view/index.umd.cjs +1 -1
  15. package/components/events-editor/index.esm.js +1 -1
  16. package/components/events-editor/index.umd.cjs +1 -1
  17. package/components/filter-bar/index.esm.js +1 -1
  18. package/components/filter-bar/index.umd.cjs +1 -1
  19. package/components/flow-canvas/index.esm.js +1 -1
  20. package/components/flow-canvas/index.umd.cjs +1 -1
  21. package/components/number-range/index.esm.js +1 -1
  22. package/components/number-range/index.umd.cjs +1 -1
  23. package/components/number-spinner/index.esm.js +1 -1
  24. package/components/number-spinner/index.umd.cjs +1 -1
  25. package/components/page-header/index.esm.js +795 -2822
  26. package/components/page-header/index.umd.cjs +1 -1
  27. package/components/property-panel/index.esm.js +1 -1
  28. package/components/property-panel/index.umd.cjs +1 -1
  29. package/components/query-solution/index.esm.js +1 -1
  30. package/components/query-solution/index.umd.cjs +1 -1
  31. package/components/response-layout/index.esm.js +1 -1
  32. package/components/response-layout/index.umd.cjs +1 -1
  33. package/components/section/index.esm.js +119 -7475
  34. package/components/section/index.umd.cjs +1 -1
  35. package/components/time-picker/index.esm.js +1 -1
  36. package/components/time-picker/index.umd.cjs +1 -1
  37. package/components/video/index.esm.js +1 -1
  38. package/components/video/index.umd.cjs +1 -1
  39. package/designer/data-grid/index.esm.js +1 -1
  40. package/designer/data-grid/index.umd.cjs +1 -1
  41. package/designer/farris-designer.all.esm.js +946 -934
  42. package/designer/farris-designer.all.umd.cjs +4 -4
  43. package/designer/radio-group/index.esm.js +1 -1
  44. package/designer/radio-group/index.umd.cjs +1 -1
  45. package/designer/section/index.esm.js +744 -0
  46. package/designer/section/index.umd.cjs +1 -0
  47. package/farris.all.esm.js +10489 -10488
  48. package/farris.all.umd.cjs +16 -16
  49. package/package.json +1 -1
  50. package/types/designer-canvas/index.d.ts +2 -2
  51. package/types/section/designer.d.ts +26 -0
  52. package/types/section/index.d.ts +1 -0
  53. package/types/section/src/designer/section-header.design.component.d.ts +2 -2
  54. package/types/section/src/designer/section-toolbar-item.design.props.d.ts +16 -0
  55. package/types/section/src/designer/section-toolbar-item.props.d.ts +0 -1
  56. package/types/section/src/designer/section-toolbar.design.component.d.ts +2 -2
  57. package/types/section/src/designer/section.design.props.d.ts +11 -0
  58. package/types/section/src/designer/use-designer-rules.d.ts +1 -2
  59. package/types/section/src/property-config/section.property-config.d.ts +1 -1
  60. package/types/section/src/schema/schema-resolver.d.ts +1 -1
  61. package/types/section/src/section.props.d.ts +0 -10
  62. package/components/section/index.css +0 -1
@@ -0,0 +1,744 @@
1
+ import E, { sectionToolbarItemProps as z, sectionProps as R } from "../../components/section/index.esm.js";
2
+ import { getCustomClass as w, withInstall as q } from "../../components/common/index.esm.js";
3
+ import { schemaResolver as B, FResponseToolbarDesign as H } from "../response-toolbar/index.esm.js";
4
+ import { createPropsResolver as P, resolveAppearance as L, createSectionEventHandlerResolver as N, getSchemaByType as O } from "../../components/dynamic-resolver/index.esm.js";
5
+ import U, { responseToolbarProps as V } from "../../components/response-toolbar/index.esm.js";
6
+ import { DgControl as D, canvasChanged as _, UseTemplateDragAndDropRules as G, useDragulaCommonRule as K, FDesignerInnerItem as Z, setPositionOfSelectedComponentBtnGroup as J, useDesignerComponent as Q } from "../../components/designer-canvas/index.esm.js";
7
+ import { computed as b, ref as A, createVNode as l, Fragment as W, nextTick as X, defineComponent as Y, inject as I, onMounted as ee } from "vue";
8
+ import { BaseControlProperty as te } from "../../components/property-panel/index.esm.js";
9
+ const ne = "https://json-schema.org/draft/2020-12/schema", oe = "https://farris-design.gitee.io/section-toolbar-item.schema.json", se = "section-toolbar-item", ie = "A Farris Toolbar Item Component", re = "object", ae = {
10
+ id: {
11
+ description: "The unique identifier for a Response Toolbar",
12
+ type: "string"
13
+ },
14
+ type: {
15
+ description: "The type string of Response Toolbar",
16
+ type: "string",
17
+ default: "section-toolbar-item"
18
+ },
19
+ appearance: {
20
+ description: "",
21
+ type: "object",
22
+ properties: {
23
+ class: {
24
+ type: "string"
25
+ },
26
+ style: {
27
+ type: "string"
28
+ }
29
+ },
30
+ default: {}
31
+ },
32
+ text: {
33
+ description: "按钮",
34
+ type: "string",
35
+ default: "按钮"
36
+ },
37
+ icon: {
38
+ description: "图标",
39
+ type: "string",
40
+ default: ""
41
+ },
42
+ disabled: {
43
+ description: "禁用",
44
+ type: "boolean",
45
+ default: !1
46
+ },
47
+ visible: {
48
+ description: "是否可见",
49
+ type: "boolean",
50
+ default: !0
51
+ },
52
+ onClick: {
53
+ description: "点击事件",
54
+ type: "string",
55
+ default: ""
56
+ },
57
+ tipsEnable: {
58
+ description: "",
59
+ type: "boolean",
60
+ default: !1
61
+ },
62
+ tipsText: {
63
+ description: "",
64
+ type: "string",
65
+ default: ""
66
+ },
67
+ dropdownClass: {
68
+ description: "处于下拉菜单时的样式",
69
+ type: "string",
70
+ default: ""
71
+ },
72
+ split: {
73
+ description: "",
74
+ type: "boolean",
75
+ default: !1
76
+ }
77
+ }, le = [
78
+ "id",
79
+ "type",
80
+ "text"
81
+ ], ce = {
82
+ $schema: ne,
83
+ $id: oe,
84
+ title: se,
85
+ description: ie,
86
+ type: re,
87
+ properties: ae,
88
+ required: le
89
+ }, ue = P(z, ce);
90
+ function de(t, e, n) {
91
+ return e ? { enableAccordion: n.accordionMode } : { enableAccordion: "" };
92
+ }
93
+ function pe(t, e) {
94
+ var n;
95
+ return {
96
+ buttons: e.buttons,
97
+ buttonPosition: e.position,
98
+ buttonsClass: (n = e.appearance) == null ? void 0 : n.class
99
+ };
100
+ }
101
+ const M = /* @__PURE__ */ new Map([
102
+ ["appearance", L],
103
+ ["expanded", "expandStatus"],
104
+ ["enableAccordion", de],
105
+ ["toolbar", pe]
106
+ ]);
107
+ function fe(t, e, n) {
108
+ const i = Math.random().toString().slice(2, 6), a = n.parentComponentInstance;
109
+ Object.assign(e, {
110
+ id: `section-${i}`,
111
+ appearance: {
112
+ class: "f-section-in-mainsubcard"
113
+ },
114
+ mainTitle: n.mainTitle || e.mainTitle || "标题"
115
+ });
116
+ const r = t.getSchemaByType("content-container");
117
+ Object.assign(r, {
118
+ id: `container-${i}`,
119
+ appearance: {
120
+ class: "f-struct-wrapper"
121
+ },
122
+ contents: [e]
123
+ });
124
+ const c = a.schema;
125
+ switch (c && c.type) {
126
+ case D["splitter-pane"].type: {
127
+ e.appearance.class = "f-section-in-main";
128
+ break;
129
+ }
130
+ }
131
+ const g = a.elementRef, u = window.getComputedStyle(g);
132
+ return u && u.display === "flex" && (r.appearance.class += " d-block"), r;
133
+ }
134
+ function me(t, e, n) {
135
+ return n.parentComponentInstance ? fe(t, e, n) : e;
136
+ }
137
+ const be = "https://json-schema.org/draft/2020-12/schema", ye = "https://farris-design.gitee.io/section.schema.json", he = "section", ge = "A Farris Container Component", ve = "object", Ce = {
138
+ id: {
139
+ description: "The unique identifier for a Section",
140
+ type: "string"
141
+ },
142
+ type: {
143
+ description: "The type string of Section component",
144
+ type: "string",
145
+ default: "section"
146
+ },
147
+ appearance: {
148
+ description: "",
149
+ type: "object",
150
+ properties: {
151
+ class: {
152
+ type: "string"
153
+ },
154
+ style: {
155
+ type: "string"
156
+ }
157
+ },
158
+ default: {}
159
+ },
160
+ contentClass: {
161
+ description: "",
162
+ type: "string",
163
+ default: ""
164
+ },
165
+ contents: {
166
+ description: "",
167
+ type: "array",
168
+ default: []
169
+ },
170
+ enableAccordion: {
171
+ description: "",
172
+ type: "string",
173
+ default: ""
174
+ },
175
+ accordionMode: {
176
+ description: "",
177
+ type: "string",
178
+ default: "default"
179
+ },
180
+ enableMaximize: {
181
+ description: "",
182
+ type: "boolean",
183
+ default: !1
184
+ },
185
+ expanded: {
186
+ description: "",
187
+ type: "boolean",
188
+ default: !0
189
+ },
190
+ fill: {
191
+ description: "",
192
+ type: "boolean",
193
+ default: !1
194
+ },
195
+ headerClass: {
196
+ description: "",
197
+ type: "string",
198
+ default: ""
199
+ },
200
+ size: {
201
+ description: "",
202
+ type: "object",
203
+ properties: {
204
+ width: {
205
+ type: "number"
206
+ },
207
+ height: {
208
+ type: "number"
209
+ }
210
+ },
211
+ default: null
212
+ },
213
+ showHeader: {
214
+ description: "",
215
+ type: "string",
216
+ default: !0
217
+ },
218
+ mainTitle: {
219
+ description: "",
220
+ type: "string",
221
+ default: ""
222
+ },
223
+ subTitle: {
224
+ description: "",
225
+ type: "string",
226
+ default: ""
227
+ },
228
+ headerContentClass: {
229
+ description: "",
230
+ type: "string",
231
+ default: ""
232
+ },
233
+ extendClass: {
234
+ description: "",
235
+ type: "string",
236
+ default: ""
237
+ },
238
+ visible: {
239
+ description: "",
240
+ type: "boolean",
241
+ default: !0
242
+ },
243
+ expandStatus: {
244
+ description: "",
245
+ type: "boolean",
246
+ default: !0
247
+ },
248
+ toolbar: {
249
+ description: "",
250
+ type: "object",
251
+ properties: {
252
+ type: {
253
+ type: "string",
254
+ default: "section-toolbar"
255
+ },
256
+ position: {
257
+ type: "string",
258
+ default: "inHead"
259
+ },
260
+ buttons: {
261
+ type: "array",
262
+ default: []
263
+ },
264
+ appearance: {
265
+ description: "",
266
+ type: "object",
267
+ properties: {
268
+ class: {
269
+ type: "string",
270
+ default: ""
271
+ }
272
+ }
273
+ }
274
+ },
275
+ default: null
276
+ }
277
+ }, Te = [
278
+ "id",
279
+ "type",
280
+ "contents"
281
+ ], xe = {
282
+ $schema: be,
283
+ $id: ye,
284
+ title: he,
285
+ description: ge,
286
+ type: ve,
287
+ properties: Ce,
288
+ required: Te
289
+ }, Se = "https://json-schema.org/draft/2020-12/schema", Ae = "https://farris-design.gitee.io/section-toolbar.schema.json", $e = "section-toolbar", we = "A Farris Toolbar Component", Pe = "object", Ie = {
290
+ id: {
291
+ description: "The unique identifier for a Section Toolbar",
292
+ type: "string"
293
+ },
294
+ type: {
295
+ description: "The type string of Section Toolbar",
296
+ type: "string",
297
+ default: "section-toolbar"
298
+ },
299
+ appearance: {
300
+ description: "",
301
+ type: "object",
302
+ properties: {
303
+ class: {
304
+ type: "string",
305
+ default: ""
306
+ }
307
+ }
308
+ },
309
+ alignment: {
310
+ description: "The alignment of Section Toolbar Button.",
311
+ type: "string",
312
+ default: "right"
313
+ },
314
+ buttons: {
315
+ description: "The items of Section Toolbar.",
316
+ type: "array",
317
+ default: []
318
+ },
319
+ buttonSize: {
320
+ type: "string",
321
+ default: ""
322
+ },
323
+ visible: {
324
+ description: "",
325
+ type: "boolean",
326
+ default: !0
327
+ }
328
+ }, Re = [
329
+ "id",
330
+ "type",
331
+ "buttons"
332
+ ], De = {
333
+ onClick: "点击事件"
334
+ }, Me = {
335
+ $schema: Se,
336
+ $id: Ae,
337
+ title: $e,
338
+ description: we,
339
+ type: Pe,
340
+ properties: Ie,
341
+ required: Re,
342
+ events: De
343
+ }, k = P(R, xe, M, me), ke = N(), Fe = Object.assign({}, R, { componentId: { type: String, default: "" } }), je = P(
344
+ V,
345
+ Me,
346
+ M,
347
+ B
348
+ );
349
+ class Ee extends te {
350
+ constructor(e, n) {
351
+ super(e, n);
352
+ }
353
+ getPropertyConfig(e) {
354
+ const n = this.getBasicPropConfig(e), i = this.getAppearanceProperties(e), a = this.getBehaviorConfig(e, ""), r = this.getExtendConfig(e);
355
+ return this.propertyConfig.categories = {
356
+ basic: n,
357
+ appearance: i,
358
+ behavior: a,
359
+ extend: r
360
+ }, this.propertyConfig;
361
+ }
362
+ getAppearanceProperties(e) {
363
+ return {
364
+ title: "外观",
365
+ description: "Appearance",
366
+ properties: {
367
+ class: {
368
+ description: "组件的CSS样式",
369
+ title: "class样式"
370
+ },
371
+ style: {
372
+ description: "组件的内容样式",
373
+ title: "style样式"
374
+ },
375
+ fill: {
376
+ title: "填充内容区域",
377
+ type: "boolean",
378
+ description: ""
379
+ },
380
+ showHeader: {
381
+ title: "显示标题区域",
382
+ type: "boolean",
383
+ description: ""
384
+ },
385
+ mainTitle: {
386
+ title: "主标题",
387
+ type: "string",
388
+ description: "",
389
+ visible: {
390
+ showHeader: !0
391
+ }
392
+ },
393
+ subTitle: {
394
+ title: "副标题",
395
+ type: "string",
396
+ description: "",
397
+ visible: {
398
+ showHeader: !0
399
+ }
400
+ },
401
+ enableAccordion: {
402
+ title: "面板收折",
403
+ type: "enum",
404
+ description: "是否启用分组面板的收折特性",
405
+ editor: {
406
+ type: "combo-list",
407
+ textField: "value",
408
+ valueField: "key",
409
+ idField: "key",
410
+ editable: !1,
411
+ data: [
412
+ {
413
+ key: "",
414
+ value: "不启用"
415
+ },
416
+ {
417
+ key: "default",
418
+ value: "启用默认收折"
419
+ }
420
+ ]
421
+ },
422
+ // visible: {
423
+ // showHeader: true // 属性面板上此属性不受showHeader限制,是因为expandStatus不受showHeader限制
424
+ // },
425
+ refreshPanelAfterChanged: !0
426
+ },
427
+ expandStatus: {
428
+ title: "默认状态",
429
+ type: "boolean",
430
+ description: "默认面板是展开还是收起",
431
+ editor: {
432
+ type: "combo-list",
433
+ textField: "name",
434
+ valueField: "value",
435
+ data: [{
436
+ name: "展开",
437
+ value: !0
438
+ }, {
439
+ name: "收起",
440
+ value: !1
441
+ }],
442
+ enableClear: !1
443
+ },
444
+ visible: e.enableAccordion === "default"
445
+ }
446
+ },
447
+ setPropertyRelates(n, i) {
448
+ if (n)
449
+ switch (n && n.propertyID) {
450
+ case "mainTitle": {
451
+ n.needRefreshControlTree = !0;
452
+ break;
453
+ }
454
+ case "showHeader": {
455
+ const a = document.getElementsByClassName("dgComponentFocused");
456
+ Array.from(a).forEach((r) => r.classList.remove("dgComponentFocused")), _.value++;
457
+ break;
458
+ }
459
+ }
460
+ }
461
+ };
462
+ }
463
+ getExtendConfig(e) {
464
+ return {
465
+ title: "扩展",
466
+ description: "",
467
+ properties: {
468
+ contentClass: {
469
+ title: "内容区域样式",
470
+ type: "string",
471
+ description: ""
472
+ }
473
+ }
474
+ };
475
+ }
476
+ }
477
+ function ze(t, e) {
478
+ const n = new G(), i = t.schema;
479
+ function a(o) {
480
+ return new Ee(o, e).getPropertyConfig(i);
481
+ }
482
+ function r(o) {
483
+ if (!K().basalDragulaRuleForContainer(o, e))
484
+ return !1;
485
+ const { canAccept: m } = n.getTemplateRule(t, e);
486
+ return m;
487
+ }
488
+ function c() {
489
+ const { canDelete: o } = n.getTemplateRule(t, e);
490
+ return o;
491
+ }
492
+ function g() {
493
+ const { canMove: o } = n.getTemplateRule(t, e);
494
+ return o;
495
+ }
496
+ function u() {
497
+ const { canMove: o, canDelete: s } = n.getTemplateRule(t, e);
498
+ return !o && !s;
499
+ }
500
+ function v(o) {
501
+ o && (o.stopPropagation(), o.preventDefault());
502
+ const { schema: s } = t;
503
+ (!s.toolbar || !s.toolbar.buttons) && (s.toolbar = { id: `${s.id}_toolbar`, buttons: [] });
504
+ const m = O("section-toolbar-item");
505
+ m.id = `section_toolbar_item_${Math.random().toString().slice(2, 6)}`, s.toolbar.buttons.push(m);
506
+ }
507
+ function p() {
508
+ var T;
509
+ const { schema: o } = t, s = e == null ? void 0 : e.formSchemaUtils;
510
+ if (o.showHeader === !1 || !s)
511
+ return;
512
+ const m = s.selectNode(o, (d) => d.type === D["response-form"].type), x = ((T = o.toolbar) == null ? void 0 : T.buttons) || [];
513
+ if (!m && x.length === 0)
514
+ return [{
515
+ id: "appendToolbar",
516
+ title: "新增按钮",
517
+ icon: "f-icon f-icon-plus-circle text-white",
518
+ onClick: (d) => v(d)
519
+ }];
520
+ }
521
+ function f() {
522
+ var x, T;
523
+ if (!e)
524
+ return;
525
+ const o = e.formSchemaUtils.getExpressions();
526
+ if (!o || !o.length)
527
+ return;
528
+ const { schema: s } = t;
529
+ if (!((T = (x = s.toolbar) == null ? void 0 : x.buttons) != null && T.length))
530
+ return;
531
+ const m = (d) => {
532
+ d.forEach((h) => {
533
+ const S = o.findIndex((C) => C.target === h.id);
534
+ S > -1 && o.splice(S, 1), h.children && h.children.length && m(h.children);
535
+ });
536
+ };
537
+ m(s.toolbar.buttons);
538
+ }
539
+ function y() {
540
+ f();
541
+ }
542
+ return {
543
+ canAccepts: r,
544
+ checkCanDeleteComponent: c,
545
+ checkCanMoveComponent: g,
546
+ hideNestedPaddingInDesginerView: u,
547
+ getPropsConfig: a,
548
+ getCustomButtons: p,
549
+ onRemoveComponent: y
550
+ };
551
+ }
552
+ function qe(t, e, n) {
553
+ let i;
554
+ function a(u = 1) {
555
+ const v = [
556
+ "body>.f-datagrid-settings-simple-host",
557
+ "body>div",
558
+ "body>farris-dialog>.farris-modal.show",
559
+ "body>.farris-modal.show",
560
+ "body>farris-filter-panel>.f-filter-panel-wrapper",
561
+ "body .f-sidebar-show>.f-sidebar-main",
562
+ "body>.popover.show",
563
+ "body>filter-row-panel>.f-datagrid-filter-panel",
564
+ "body>.f-section-maximize"
565
+ ], p = Array.from(document.body.querySelectorAll(v.join(","))).filter((y) => y).map((y) => {
566
+ const { display: o, zIndex: s } = window.getComputedStyle(y);
567
+ return o === "none" ? 0 : parseInt(s, 10);
568
+ }).filter((y) => y);
569
+ let f = Math.max(...p);
570
+ return f < 1040 && (f = 1040), f + u;
571
+ }
572
+ function r() {
573
+ i = t.value.nextElementSibling;
574
+ const u = document && document.querySelector("body");
575
+ u && (u.appendChild(t.value), t.value.style.zIndex = a());
576
+ }
577
+ function c() {
578
+ i ? e.value.insertBefore(
579
+ t.value,
580
+ i
581
+ ) : e.value.appendChild(t.value), t.value.style.zIndex = null;
582
+ }
583
+ function g() {
584
+ !t || !e.value || (n.value = !n.value, n.value ? r() : c());
585
+ }
586
+ return { onClickMaxMinIcon: g };
587
+ }
588
+ function F(t, e) {
589
+ var v, p;
590
+ const n = b(() => "f-section-toolbar col-6" + (t.buttonPosition === "inHead" ? " f-toolbar f-section-header--toolbar" : " f-section-content--toolbar") + (t.buttonsClass ? " " + t.buttonsClass : "")), i = A(t.buttons), a = A(e.schema.toolbar), r = t.componentId, c = `${r}-toolbar`, g = b(() => t.buttonPosition === "inHead" ? "right" : "left");
591
+ function u(f, y, o, s) {
592
+ var m;
593
+ (m = e.setupContext) == null || m.emit("selectionChange", f, y, o, s);
594
+ }
595
+ return l(W, null, [(p = (v = a.value) == null ? void 0 : v.buttons) != null && p.length ? l("div", {
596
+ class: n.value,
597
+ style: "padding-right:0;"
598
+ }, [l("div", {
599
+ class: "w-100",
600
+ style: "flex:1"
601
+ }, [l(Z, {
602
+ modelValue: a.value,
603
+ "onUpdate:modelValue": (f) => a.value = f,
604
+ class: "w-100 position-relative",
605
+ canAdd: !1,
606
+ childType: "section-toolbar-item",
607
+ childLabel: "按钮",
608
+ contentKey: "buttons",
609
+ id: c,
610
+ onSelectionChange: u,
611
+ componentId: r
612
+ }, {
613
+ default: () => [l(U, {
614
+ customClass: "d-block text-right",
615
+ items: i.value,
616
+ alignment: g.value,
617
+ componentId: r
618
+ }, null)]
619
+ })])]) : ""]);
620
+ }
621
+ function Be(t, e, n, i, a, r, c) {
622
+ const g = b(() => t.buttonPosition), {
623
+ onClickMaxMinIcon: u
624
+ } = qe(i, a, r), v = b(() => t.enableMaximize), p = b(() => t.enableAccordion !== ""), f = b(() => {
625
+ const d = {
626
+ "f-section-header": !0
627
+ };
628
+ return e.slots.header && t.headerClass.split(" ").reduce((S, C) => (S[C] = !0, S), d), d;
629
+ });
630
+ function y(d) {
631
+ d.stopPropagation(), t.enableAccordion !== "" && (n.value = !n.value, X(() => {
632
+ J(c.designerItemElementRef.value);
633
+ }));
634
+ }
635
+ function o() {
636
+ const d = b(() => ({
637
+ btn: !0,
638
+ "f-btn-collapse-expand": !0,
639
+ "f-btn-mx": !0,
640
+ "f-state-expand": n.value
641
+ })), h = b(() => ({
642
+ "f-icon": !0,
643
+ "f-icon-maximize": !r.value,
644
+ "f-icon-minimize": r.value
645
+ }));
646
+ return l("div", {
647
+ class: "f-max-accordion"
648
+ }, [v.value ? l("span", {
649
+ class: h.value,
650
+ onClick: u
651
+ }, null) : "", p.value ? l("button", {
652
+ class: d.value,
653
+ onClick: y
654
+ }, [l("span", null, [n.value ? t.collapseLabel : t.expandLabel])]) : ""]);
655
+ }
656
+ function s() {
657
+ return e.slots.header ? l("div", {
658
+ class: f.value
659
+ }, [e.slots.header()]) : "";
660
+ }
661
+ function m() {
662
+ return l("div", {
663
+ class: "f-title"
664
+ }, [l("h4", {
665
+ class: "f-title-text"
666
+ }, [t.mainTitle]), t.subTitle && l("span", null, [t.subTitle])]);
667
+ }
668
+ function x() {
669
+ const d = b(() => {
670
+ const h = {
671
+ "f-content": !0
672
+ };
673
+ return t.headerContentClass && t.headerContentClass.split(" ").reduce((C, j) => (C[j] = !0, C), h), h;
674
+ });
675
+ return e.slots.headerContent ? l("div", {
676
+ class: d.value
677
+ }, [e.slots.headerContent()]) : "";
678
+ }
679
+ function T() {
680
+ return l("div", {
681
+ class: f.value
682
+ }, [e.slots.headerTitle ? e.slots.headerTitle() : m(), x(), g.value === "inHead" && F(t, c), (v.value || p.value) && o()]);
683
+ }
684
+ return () => t.showHeader && (e.slots.header ? s() : T());
685
+ }
686
+ const $ = /* @__PURE__ */ Y({
687
+ name: "FSectionDesign",
688
+ props: Fe,
689
+ emits: [],
690
+ setup(t, e) {
691
+ const n = A(), i = A(), a = A(), r = I("designer-host-service"), c = I("design-item-context"), g = ze(c, r), u = Q(n, c, g);
692
+ u.value.styles = "display: inherit;", ee(() => {
693
+ n.value.componentInstance = u;
694
+ }), e.expose(u.value);
695
+ const v = A(t.customClass), p = b(() => t.enableAccordion), f = A(!0), y = b(() => t.buttonPosition), o = A(!1), s = Be(t, e, f, i, a, o, c), m = b(() => {
696
+ const C = {
697
+ "f-section": !0,
698
+ "f-section-accordion": p.value === "default",
699
+ "f-state-collapse": (p.value === "default" || p.value === "custom") && !f.value,
700
+ "f-section-custom-accordion": p.value === "custom",
701
+ "f-section-fill": t.fill,
702
+ "f-section-maximize": o.value,
703
+ "f-utils-fill": !0,
704
+ "p-0": !0
705
+ };
706
+ return w(C, v.value);
707
+ }), x = b(() => w({
708
+ "f-section-content": !0,
709
+ "drag-container": !0
710
+ }, t.contentClass)), T = b(() => ({
711
+ visibility: (p.value === "default" || p.value === "custom") && !f.value ? "hidden" : "visible"
712
+ })), d = b(() => w({
713
+ "f-section-extend": !0
714
+ }, d.value));
715
+ function h() {
716
+ return e.slots.extend && l("div", {
717
+ class: d.value
718
+ }, [e.slots.extend()]);
719
+ }
720
+ function S() {
721
+ return l("div", {
722
+ class: x.value,
723
+ ref: n,
724
+ "data-dragref": `${c.schema.id}-container`,
725
+ style: T.value
726
+ }, [y.value === "inContent" && F(t, c), e.slots.default && e.slots.default()]);
727
+ }
728
+ return () => l("div", {
729
+ class: m.value,
730
+ ref: i,
731
+ style: t.customStyle
732
+ }, [s(), h(), S()]);
733
+ }
734
+ });
735
+ $.register = (t, e, n, i) => {
736
+ t.section = E, e.section = k, i.section = { eventHandlerResolver: ke };
737
+ };
738
+ $.registerDesigner = (t, e, n) => {
739
+ t.section = $, e.section = k, e["section-toolbar-item"] = ue, t["section-toolbar"] = H, e["section-toolbar"] = je;
740
+ };
741
+ const Ke = q($);
742
+ export {
743
+ Ke as default
744
+ };