@ibiz-template/vue3-components 0.7.41-alpha.96 → 0.7.41-alpha.98
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/dist/index-CTxNNWbw.js +1 -0
- package/dist/index-DAM-lgrU.js +1 -0
- package/dist/index-DSNJCnK2.js +339 -0
- package/dist/{index.es-COHR8lWq.js → index.es-STEFwkv3.js} +1 -1
- package/dist/index.min.css +1 -1
- package/dist/index.system.min.js +1 -1
- package/dist/wang-editor-Dchfm22O.js +1 -0
- package/dist/{xlsx-util-CzrO72Os.js → xlsx-util-D-uPcLFr.js} +2 -2
- package/es/common/control-navigation/provider/navigation-base.provider.mjs +3 -1
- package/es/common/high-light-code/high-light-code-util.mjs +183 -0
- package/es/common/high-light-code/high-light-code.css +1 -0
- package/es/common/high-light-code/high-light-code.mjs +31 -0
- package/es/common/index.mjs +2 -0
- package/es/common/pagination/pagination.mjs +5 -1
- package/es/common/rawitem/rawitem.mjs +2 -0
- package/es/control/calendar/calendar-util.mjs +1 -1
- package/es/control/calendar/calendar.mjs +54 -40
- package/es/control/calendar/components/calendar-flatten/calendar-flatten.css +1 -0
- package/es/control/calendar/components/calendar-flatten/calendar-flatten.mjs +200 -0
- package/es/control/calendar/components/calendar-flatten/index.mjs +9 -0
- package/es/control/calendar/components/custom-calendar/custom-calendar.mjs +1 -1
- package/es/control/calendar/components/custom-calendar/use-custom-calendar.mjs +2 -2
- package/es/control/dashboard/portlet/menu-portlet/app-menu-portlet/app-menu-portlet.css +1 -1
- package/es/control/dashboard/portlet/menu-portlet/app-menu-portlet/app-menu-portlet.mjs +20 -3
- package/es/control/dashboard/portlet/rawitem-portlet/rawitem-portlet.mjs +32 -7
- package/es/control/data-view/data-view.mjs +2 -2
- package/es/control/form/form-detail/form-page/form-page.mjs +1 -1
- package/es/control/form/form-detail/form-rawitem/form-rawitem.mjs +3 -1
- package/es/control/grid/grid/grid-control.util.mjs +1 -1
- package/es/control/grid/grid/grid.css +1 -1
- package/es/control/grid/grid/grid.mjs +31 -9
- package/es/control/grid/grid-column/grid-column-header/grid-column-header.css +1 -1
- package/es/control/grid/grid-column/grid-field-column/grid-field-column.css +1 -1
- package/es/control/grid/grid-column/grid-field-edit-column/grid-edit-item/grid-edit-item.css +1 -1
- package/es/control/grid/grid-column/grid-ua-column/grid-ua-column.css +1 -1
- package/es/control/grid/row-edit-popover/row-edit-popover.css +1 -1
- package/es/control/list/list.css +1 -1
- package/es/control/list/list.mjs +6 -3
- package/es/control/search-bar/filter-mode-select/filter-mode-select.mjs +2 -2
- package/es/control/search-bar/filter-tree/filter-tree.mjs +2 -2
- package/es/editor/code/code-editor.controller.mjs +11 -1
- package/es/editor/code/monaco-editor/monaco-editor.css +1 -1
- package/es/editor/code/monaco-editor/monaco-editor.mjs +54 -7
- package/es/editor/raw/ibiz-raw/ibiz-raw.mjs +3 -1
- package/es/locale/en/index.mjs +4 -3
- package/es/locale/index.mjs +29 -1
- package/es/locale/zh-CN/index.mjs +4 -3
- package/es/util/inline-ai-util/inline-ai-util.mjs +17 -1
- package/lib/common/control-navigation/provider/navigation-base.provider.cjs +3 -1
- package/lib/common/high-light-code/high-light-code-util.cjs +185 -0
- package/lib/common/high-light-code/high-light-code.cjs +33 -0
- package/lib/common/high-light-code/high-light-code.css +1 -0
- package/lib/common/index.cjs +2 -0
- package/lib/common/pagination/pagination.cjs +5 -1
- package/lib/common/rawitem/rawitem.cjs +2 -0
- package/lib/control/calendar/calendar-util.cjs +1 -1
- package/lib/control/calendar/calendar.cjs +54 -40
- package/lib/control/calendar/components/calendar-flatten/calendar-flatten.cjs +202 -0
- package/lib/control/calendar/components/calendar-flatten/calendar-flatten.css +1 -0
- package/lib/control/calendar/components/calendar-flatten/index.cjs +14 -0
- package/lib/control/calendar/components/custom-calendar/custom-calendar.cjs +1 -1
- package/lib/control/calendar/components/custom-calendar/use-custom-calendar.cjs +2 -2
- package/lib/control/dashboard/portlet/menu-portlet/app-menu-portlet/app-menu-portlet.cjs +20 -3
- package/lib/control/dashboard/portlet/menu-portlet/app-menu-portlet/app-menu-portlet.css +1 -1
- package/lib/control/dashboard/portlet/rawitem-portlet/rawitem-portlet.cjs +31 -6
- package/lib/control/data-view/data-view.cjs +2 -2
- package/lib/control/form/form-detail/form-page/form-page.cjs +1 -1
- package/lib/control/form/form-detail/form-rawitem/form-rawitem.cjs +3 -1
- package/lib/control/grid/grid/grid-control.util.cjs +1 -1
- package/lib/control/grid/grid/grid.cjs +30 -8
- package/lib/control/grid/grid/grid.css +1 -1
- package/lib/control/grid/grid-column/grid-column-header/grid-column-header.css +1 -1
- package/lib/control/grid/grid-column/grid-field-column/grid-field-column.css +1 -1
- package/lib/control/grid/grid-column/grid-field-edit-column/grid-edit-item/grid-edit-item.css +1 -1
- package/lib/control/grid/grid-column/grid-ua-column/grid-ua-column.css +1 -1
- package/lib/control/grid/row-edit-popover/row-edit-popover.css +1 -1
- package/lib/control/list/list.cjs +6 -3
- package/lib/control/list/list.css +1 -1
- package/lib/control/search-bar/filter-mode-select/filter-mode-select.cjs +2 -2
- package/lib/control/search-bar/filter-tree/filter-tree.cjs +2 -2
- package/lib/editor/code/code-editor.controller.cjs +11 -1
- package/lib/editor/code/monaco-editor/monaco-editor.cjs +54 -7
- package/lib/editor/code/monaco-editor/monaco-editor.css +1 -1
- package/lib/editor/raw/ibiz-raw/ibiz-raw.cjs +3 -1
- package/lib/locale/en/index.cjs +4 -3
- package/lib/locale/index.cjs +29 -1
- package/lib/locale/zh-CN/index.cjs +4 -3
- package/lib/util/inline-ai-util/inline-ai-util.cjs +17 -1
- package/package.json +6 -6
- package/dist/index-CSWh3Soj.js +0 -339
- package/dist/index-ChKlnzfZ.js +0 -1
- package/dist/index-DiSn0c6_.js +0 -1
- package/dist/wang-editor-DGTnSGqn.js +0 -1
|
@@ -38,7 +38,7 @@ function useCalendarLegend(ns) {
|
|
|
38
38
|
() => getVarValue("".concat(ns.cssVarName("color-black")))
|
|
39
39
|
);
|
|
40
40
|
const getBkColor = (_index) => {
|
|
41
|
-
return bgColors[_index] || bgColors[0];
|
|
41
|
+
return bgColors[_index % bgColors.length] || bgColors[0];
|
|
42
42
|
};
|
|
43
43
|
const getActBdrColors = (_index) => {
|
|
44
44
|
return actBdrColors[_index] || getVarValue("".concat(ns.cssVarName("color-primary")));
|
|
@@ -7,6 +7,7 @@ var dayjs = require('dayjs');
|
|
|
7
7
|
var lodashEs = require('lodash-es');
|
|
8
8
|
var core = require('@ibiz-template/core');
|
|
9
9
|
var index = require('./components/custom-calendar/index.cjs');
|
|
10
|
+
var index$1 = require('./components/calendar-flatten/index.cjs');
|
|
10
11
|
var calendarUtil = require('./calendar-util.cjs');
|
|
11
12
|
require('../../util/index.cjs');
|
|
12
13
|
require('./calendar.css');
|
|
@@ -92,15 +93,13 @@ const CalendarControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
92
93
|
const result = !Object.values(c.loadMoreItems).some((item) => item.curPage < item.totalPage);
|
|
93
94
|
return result;
|
|
94
95
|
});
|
|
95
|
-
const
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
96
|
+
const legendType = ["DAY", "WEEK", "MONTH", "USER2"];
|
|
97
|
+
const legends = vue.ref([]);
|
|
98
|
+
const onLegendClick = (item) => {
|
|
99
|
+
item.isShow = !item.isShow;
|
|
99
100
|
};
|
|
100
|
-
const legendItems = vue.ref([]);
|
|
101
|
-
const legendType = ["DAY", "WEEK", "MONTH"];
|
|
102
101
|
const calcLegend = () => {
|
|
103
|
-
|
|
102
|
+
legends.value = c.state.legends.map((_item, index) => {
|
|
104
103
|
const tempItem = {
|
|
105
104
|
..._item,
|
|
106
105
|
isShow: true
|
|
@@ -192,13 +191,20 @@ const CalendarControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
192
191
|
return false;
|
|
193
192
|
};
|
|
194
193
|
vue.watch(() => c.state.selectedDate, (newVal, oldVal) => {
|
|
195
|
-
if (timeRangeComparison(newVal, oldVal))
|
|
194
|
+
if (timeRangeComparison(newVal, oldVal))
|
|
195
|
+
return;
|
|
196
|
+
c.load();
|
|
197
|
+
});
|
|
198
|
+
vue.watch(() => c.state.timeRange, () => {
|
|
199
|
+
if (!c.state.isLoaded)
|
|
196
200
|
return;
|
|
197
|
-
}
|
|
198
201
|
c.load();
|
|
199
202
|
});
|
|
203
|
+
const onTimeRangeChange = (date) => {
|
|
204
|
+
c.state.timeRange = date;
|
|
205
|
+
};
|
|
200
206
|
const calcItemStyle = (data) => {
|
|
201
|
-
const _legend =
|
|
207
|
+
const _legend = legends.value.find((_item) => _item.id === data.itemType);
|
|
202
208
|
return {
|
|
203
209
|
color: data.color,
|
|
204
210
|
backgroundColor: data.bkColor,
|
|
@@ -209,7 +215,7 @@ const CalendarControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
209
215
|
const calcCalendarItems = (date) => {
|
|
210
216
|
const weekRange = calendarUtil.getWeekRange(date);
|
|
211
217
|
const calendarItems = c.state.items.filter((item) => {
|
|
212
|
-
const _legend =
|
|
218
|
+
const _legend = legends.value.find((legend) => legend.id === item.itemType);
|
|
213
219
|
if (_legend && !_legend.isShow)
|
|
214
220
|
return false;
|
|
215
221
|
if (!showDateRange.value) {
|
|
@@ -233,7 +239,7 @@ const CalendarControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
233
239
|
});
|
|
234
240
|
}
|
|
235
241
|
return calendarItems.map((_item) => {
|
|
236
|
-
const targetLegend =
|
|
242
|
+
const targetLegend = legends.value.find((legendItem) => Object.is(legendItem.id, _item.itemType));
|
|
237
243
|
if (!targetLegend)
|
|
238
244
|
return _item;
|
|
239
245
|
if (!_item.bkColor)
|
|
@@ -379,9 +385,9 @@ const CalendarControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
379
385
|
return {
|
|
380
386
|
c,
|
|
381
387
|
ns,
|
|
388
|
+
legends,
|
|
382
389
|
curPopover,
|
|
383
390
|
calendarRef,
|
|
384
|
-
legendItems,
|
|
385
391
|
popoverValue,
|
|
386
392
|
showDateList,
|
|
387
393
|
showDateRange,
|
|
@@ -389,8 +395,9 @@ const CalendarControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
389
395
|
disabledLodeMore,
|
|
390
396
|
selectDate,
|
|
391
397
|
calcItemStyle,
|
|
398
|
+
onLegendClick,
|
|
392
399
|
handleScrollLoad,
|
|
393
|
-
|
|
400
|
+
onTimeRangeChange,
|
|
394
401
|
calcCalendarItems,
|
|
395
402
|
onNodeContextmenu
|
|
396
403
|
};
|
|
@@ -505,25 +512,19 @@ const CalendarControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
505
512
|
"class": this.ns.b("content-title")
|
|
506
513
|
}, [date]), vue.createVNode("div", {
|
|
507
514
|
"class": this.ns.b("legend")
|
|
508
|
-
}, [this.
|
|
509
|
-
var _a;
|
|
510
|
-
let label = _legend.name;
|
|
511
|
-
const _model = (_a = this.c.model.sysCalendarItems) == null ? void 0 : _a.find((_calendarItem) => _calendarItem.id === _legend.id);
|
|
512
|
-
if (_model == null ? void 0 : _model.nameLanguageRes) {
|
|
513
|
-
label = ibiz.i18n.t(_model.nameLanguageRes.lanResTag, _model.name);
|
|
514
|
-
}
|
|
515
|
+
}, [this.legends && this.legends.length > 1 && this.legends.map((legend) => {
|
|
515
516
|
return vue.createVNode("div", {
|
|
516
517
|
"class": [this.ns.be("legend", "item")],
|
|
517
|
-
"onClick": () => this.
|
|
518
|
+
"onClick": () => this.onLegendClick(legend)
|
|
518
519
|
}, [vue.createVNode("div", {
|
|
519
520
|
"class": this.ns.bem("legend", "item", "tip"),
|
|
520
521
|
"style": {
|
|
521
|
-
background:
|
|
522
|
-
color:
|
|
522
|
+
background: legend.isShow ? legend == null ? void 0 : legend.bkcolor : "var(".concat(this.ns.cssVarName("color-disabled-bg"), ")"),
|
|
523
|
+
color: legend == null ? void 0 : legend.color
|
|
523
524
|
}
|
|
524
525
|
}, null), vue.createVNode("div", {
|
|
525
526
|
"class": this.ns.bem("legend", "item", "text")
|
|
526
|
-
}, [
|
|
527
|
+
}, [legend.name])]);
|
|
527
528
|
})]), vue.createVNode("div", {
|
|
528
529
|
"class": this.ns.b("content-header")
|
|
529
530
|
}, [vue.createVNode(vue.resolveComponent("el-date-picker"), {
|
|
@@ -600,22 +601,23 @@ const CalendarControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
600
601
|
default: () => [noDataSlots]
|
|
601
602
|
});
|
|
602
603
|
};
|
|
603
|
-
const
|
|
604
|
-
const slots = {};
|
|
604
|
+
const renderSlots = () => {
|
|
605
605
|
const {
|
|
606
|
-
sysCalendarItems
|
|
606
|
+
sysCalendarItems = []
|
|
607
607
|
} = this.c.model;
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
return
|
|
608
|
+
return {
|
|
609
|
+
event: ({
|
|
610
|
+
data
|
|
611
|
+
}) => {
|
|
612
|
+
const model = sysCalendarItems.find((item) => data.itemType === item.itemType);
|
|
613
|
+
if (model == null ? void 0 : model.layoutPanel)
|
|
614
|
+
return renderPanelItem(data, model.layoutPanel);
|
|
615
|
+
return renderDefaultItem(data);
|
|
616
616
|
}
|
|
617
|
-
return renderDefaultItem(data);
|
|
618
617
|
};
|
|
618
|
+
};
|
|
619
|
+
const renderWeekDay = () => {
|
|
620
|
+
let _slot6;
|
|
619
621
|
return vue.createVNode("div", {
|
|
620
622
|
"class": this.ns.b("content")
|
|
621
623
|
}, [vue.createVNode(index.IBizCustomCalendar, {
|
|
@@ -626,7 +628,7 @@ const CalendarControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
626
628
|
"ref": "calendarRef",
|
|
627
629
|
"viewType": this.c.model.calendarStyle,
|
|
628
630
|
"events": this.c.state.items,
|
|
629
|
-
"legends": this.
|
|
631
|
+
"legends": this.legends,
|
|
630
632
|
"multiple": !this.c.state.singleSelect,
|
|
631
633
|
"selectedData": this.c.state.selectedData,
|
|
632
634
|
"onEventClick": (value) => {
|
|
@@ -654,8 +656,8 @@ const CalendarControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
654
656
|
if (item && evt)
|
|
655
657
|
this.onNodeContextmenu(item, evt);
|
|
656
658
|
}
|
|
657
|
-
}, _isSlot(
|
|
658
|
-
default: () => [
|
|
659
|
+
}, _isSlot(_slot6 = renderSlots()) ? _slot6 : {
|
|
660
|
+
default: () => [_slot6]
|
|
659
661
|
})]);
|
|
660
662
|
};
|
|
661
663
|
const renderTimeLine = () => {
|
|
@@ -683,6 +685,7 @@ const CalendarControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
683
685
|
})]);
|
|
684
686
|
};
|
|
685
687
|
const renderCalendar = () => {
|
|
688
|
+
let _slot7;
|
|
686
689
|
switch (this.c.model.calendarStyle) {
|
|
687
690
|
case "TIMELINE":
|
|
688
691
|
return renderTimeLine();
|
|
@@ -690,6 +693,17 @@ const CalendarControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
690
693
|
case "DAY":
|
|
691
694
|
case "USER":
|
|
692
695
|
return renderWeekDay();
|
|
696
|
+
case "USER2":
|
|
697
|
+
return vue.createVNode(index$1.IBizCalendarFlatten, {
|
|
698
|
+
"legends": this.legends,
|
|
699
|
+
"items": this.c.state.items,
|
|
700
|
+
"timeRange": this.c.state.timeRange,
|
|
701
|
+
"title": this.c.state.calendarTitle,
|
|
702
|
+
"onLegendClick": this.onLegendClick,
|
|
703
|
+
"onTimeRangeChange": this.onTimeRangeChange
|
|
704
|
+
}, _isSlot(_slot7 = renderSlots()) ? _slot7 : {
|
|
705
|
+
default: () => [_slot7]
|
|
706
|
+
});
|
|
693
707
|
case "MONTH":
|
|
694
708
|
default:
|
|
695
709
|
return renderElCalender();
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var vue = require('vue');
|
|
4
|
+
var dayjs = require('dayjs');
|
|
5
|
+
var vue3Util = require('@ibiz-template/vue3-util');
|
|
6
|
+
var quarterOfYear = require('dayjs/plugin/quarterOfYear');
|
|
7
|
+
require('./calendar-flatten.css');
|
|
8
|
+
|
|
9
|
+
"use strict";
|
|
10
|
+
dayjs.extend(quarterOfYear);
|
|
11
|
+
const CalendarFlatten = /* @__PURE__ */ vue.defineComponent({
|
|
12
|
+
name: "CalendarFlatten",
|
|
13
|
+
props: {
|
|
14
|
+
title: {
|
|
15
|
+
type: String,
|
|
16
|
+
default: () => ibiz.i18n.t("control.calendar.title")
|
|
17
|
+
},
|
|
18
|
+
items: {
|
|
19
|
+
type: Array,
|
|
20
|
+
default: () => []
|
|
21
|
+
},
|
|
22
|
+
legends: {
|
|
23
|
+
type: Array,
|
|
24
|
+
default: () => []
|
|
25
|
+
},
|
|
26
|
+
timeRange: {
|
|
27
|
+
required: true,
|
|
28
|
+
type: Array,
|
|
29
|
+
validator: (range) => range.length === 2
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
emits: {
|
|
33
|
+
legendClick: (_legend) => true,
|
|
34
|
+
timeRangeChange: (_range) => true
|
|
35
|
+
},
|
|
36
|
+
setup(props, {
|
|
37
|
+
emit
|
|
38
|
+
}) {
|
|
39
|
+
const ns = vue3Util.useNamespace("calendar-flatten");
|
|
40
|
+
const range = vue.computed({
|
|
41
|
+
get() {
|
|
42
|
+
return props.timeRange;
|
|
43
|
+
},
|
|
44
|
+
set(date) {
|
|
45
|
+
emit("timeRangeChange", date);
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
const legends = vue.computed(() => {
|
|
49
|
+
return props.legends.filter((legend) => legend.isShow);
|
|
50
|
+
});
|
|
51
|
+
const itemsByDate = vue.computed(() => {
|
|
52
|
+
const map = /* @__PURE__ */ new Map();
|
|
53
|
+
for (const item of props.items) {
|
|
54
|
+
if (!item.beginTime && !item.endTime)
|
|
55
|
+
continue;
|
|
56
|
+
const start = dayjs(item.beginTime || item.endTime);
|
|
57
|
+
const end = dayjs(item.endTime || item.beginTime);
|
|
58
|
+
const daysDiff = end.diff(start, "day") + 1;
|
|
59
|
+
for (let i = 0; i < daysDiff; i++) {
|
|
60
|
+
const dateKey = start.add(i, "day").format("YYYY-MM-DD");
|
|
61
|
+
if (!map.has(dateKey))
|
|
62
|
+
map.set(dateKey, []);
|
|
63
|
+
map.get(dateKey).push(item);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
return map;
|
|
67
|
+
});
|
|
68
|
+
const dateMarkersMap = vue.computed(() => {
|
|
69
|
+
const map = /* @__PURE__ */ new Map();
|
|
70
|
+
if (!props.timeRange.length)
|
|
71
|
+
return map;
|
|
72
|
+
const [startDate, endDate] = props.timeRange;
|
|
73
|
+
let current = dayjs(startDate);
|
|
74
|
+
while (current.isBefore(endDate) || current.isSame(endDate, "day")) {
|
|
75
|
+
const dateKey = current.format("YYYY-MM-DD");
|
|
76
|
+
const dateItems = itemsByDate.value.get(dateKey) || [];
|
|
77
|
+
if (dateItems.length > 0) {
|
|
78
|
+
const marks = legends.value.map((legend) => ({
|
|
79
|
+
...legend,
|
|
80
|
+
items: dateItems.filter((item) => item.itemType === legend.id)
|
|
81
|
+
})).filter((legend) => legend.items.length);
|
|
82
|
+
if (marks.length) {
|
|
83
|
+
map.set(dateKey, marks);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
current = current.add(1, "day");
|
|
87
|
+
}
|
|
88
|
+
return map;
|
|
89
|
+
});
|
|
90
|
+
const months = vue.computed(() => {
|
|
91
|
+
if (!props.timeRange.length)
|
|
92
|
+
return [];
|
|
93
|
+
const [startDate, endDate] = props.timeRange;
|
|
94
|
+
const monthsList = [];
|
|
95
|
+
let current = dayjs(startDate).startOf("month");
|
|
96
|
+
while (current.isBefore(endDate) || current.isSame(endDate, "month")) {
|
|
97
|
+
monthsList.push(current.toDate());
|
|
98
|
+
current = current.add(1, "month");
|
|
99
|
+
}
|
|
100
|
+
return monthsList;
|
|
101
|
+
});
|
|
102
|
+
return {
|
|
103
|
+
ns,
|
|
104
|
+
range,
|
|
105
|
+
months,
|
|
106
|
+
dateMarkersMap
|
|
107
|
+
};
|
|
108
|
+
},
|
|
109
|
+
render() {
|
|
110
|
+
return vue.createVNode("div", {
|
|
111
|
+
"class": this.ns.b()
|
|
112
|
+
}, [vue.createVNode("div", {
|
|
113
|
+
"class": this.ns.e("header")
|
|
114
|
+
}, [vue.createVNode("div", {
|
|
115
|
+
"class": this.ns.em("header", "left")
|
|
116
|
+
}, [this.title]), vue.createVNode("div", {
|
|
117
|
+
"class": this.ns.em("header", "centre")
|
|
118
|
+
}, [this.legends.length > 1 && this.legends.map((legend) => {
|
|
119
|
+
return vue.createVNode("div", {
|
|
120
|
+
"class": this.ns.e("legend"),
|
|
121
|
+
"onClick": () => this.$emit("legendClick", legend)
|
|
122
|
+
}, [vue.createVNode("div", {
|
|
123
|
+
"class": this.ns.em("legend", "dot"),
|
|
124
|
+
"style": {
|
|
125
|
+
backgroundColor: legend.isShow ? legend == null ? void 0 : legend.bkcolor : "var(".concat(this.ns.cssVarName("color-disabled-bg"), ")")
|
|
126
|
+
}
|
|
127
|
+
}, null), vue.createVNode("div", {
|
|
128
|
+
"class": this.ns.em("legend", "text")
|
|
129
|
+
}, [legend.name])]);
|
|
130
|
+
})]), vue.createVNode("div", {
|
|
131
|
+
"class": this.ns.em("header", "right")
|
|
132
|
+
}, [vue.createVNode(vue.resolveComponent("el-date-picker"), {
|
|
133
|
+
"type": "monthrange",
|
|
134
|
+
"clearable": false,
|
|
135
|
+
"modelValue": this.range,
|
|
136
|
+
"onUpdate:modelValue": ($event) => this.range = $event,
|
|
137
|
+
"class": this.ns.e("data-picker")
|
|
138
|
+
}, null)])]), vue.createVNode("div", {
|
|
139
|
+
"class": this.ns.e("body")
|
|
140
|
+
}, [this.months.map((month) => {
|
|
141
|
+
return vue.createVNode(vue.resolveComponent("el-calendar"), {
|
|
142
|
+
"modelValue": month,
|
|
143
|
+
"class": this.ns.e("month-calendar"),
|
|
144
|
+
"key": "".concat(month.getFullYear(), "-").concat(month.getMonth())
|
|
145
|
+
}, {
|
|
146
|
+
header: ({
|
|
147
|
+
date
|
|
148
|
+
}) => {
|
|
149
|
+
return vue.createVNode("div", {
|
|
150
|
+
"class": this.ns.em("month-calendar", "header")
|
|
151
|
+
}, [date]);
|
|
152
|
+
},
|
|
153
|
+
dateCell: ({
|
|
154
|
+
data
|
|
155
|
+
}) => {
|
|
156
|
+
const {
|
|
157
|
+
date
|
|
158
|
+
} = data;
|
|
159
|
+
const marks = this.dateMarkersMap.get(dayjs(date).format("YYYY-MM-DD")) || [];
|
|
160
|
+
return vue.createVNode(vue.resolveComponent("el-popover"), {
|
|
161
|
+
"trigger": "click",
|
|
162
|
+
"persistent": false,
|
|
163
|
+
"disabled": !marks.length,
|
|
164
|
+
"popperClass": this.ns.e("popover")
|
|
165
|
+
}, {
|
|
166
|
+
default: () => {
|
|
167
|
+
return vue.createVNode("div", {
|
|
168
|
+
"class": this.ns.em("popover", "content")
|
|
169
|
+
}, [marks.map((mark) => {
|
|
170
|
+
return vue.createVNode("div", {
|
|
171
|
+
"class": [this.ns.e("event"), this.ns.em("event", mark.id)]
|
|
172
|
+
}, [mark.items.map((item) => {
|
|
173
|
+
var _a, _b;
|
|
174
|
+
return (_b = (_a = this.$slots).event) == null ? void 0 : _b.call(_a, {
|
|
175
|
+
data: item
|
|
176
|
+
});
|
|
177
|
+
})]);
|
|
178
|
+
})]);
|
|
179
|
+
},
|
|
180
|
+
reference: () => vue.createVNode("div", {
|
|
181
|
+
"class": this.ns.e("date")
|
|
182
|
+
}, [vue.createVNode("div", {
|
|
183
|
+
"class": this.ns.em("date", "day")
|
|
184
|
+
}, [date.getDate()]), vue.createVNode("div", {
|
|
185
|
+
"class": this.ns.em("date", "mark")
|
|
186
|
+
}, [marks.map((mark) => {
|
|
187
|
+
if (mark.isShow)
|
|
188
|
+
return vue.createVNode("div", {
|
|
189
|
+
"class": this.ns.e("dot"),
|
|
190
|
+
"style": {
|
|
191
|
+
backgroundColor: mark.bkcolor
|
|
192
|
+
}
|
|
193
|
+
}, null);
|
|
194
|
+
})])])
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
});
|
|
198
|
+
})])]);
|
|
199
|
+
}
|
|
200
|
+
});
|
|
201
|
+
|
|
202
|
+
exports.CalendarFlatten = CalendarFlatten;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.ibiz-calendar-flatten{display:flex;flex-direction:column;gap:var(--ibiz-spacing-tight);width:100%;height:100%}.ibiz-calendar-flatten__header{display:flex;flex-shrink:0;align-items:center;padding:var(--ibiz-spacing-tight) var(--ibiz-spacing-base-loose);border-bottom:1px solid var(--ibiz-color-border)}.ibiz-calendar-flatten__header--left{flex-shrink:0;min-width:300px}.ibiz-calendar-flatten__header--centre{display:flex;flex-grow:1;gap:var(--ibiz-spacing-tight);align-items:center;justify-content:center}.ibiz-calendar-flatten__header--right{flex-shrink:0}.ibiz-calendar-flatten__body{display:flex;flex-grow:1;flex-wrap:wrap;gap:var(--ibiz-spacing-tight);overflow:auto}.ibiz-calendar-flatten__month-calendar{width:366px;border:1px solid var(--ibiz-color-border)}.ibiz-calendar-flatten__month-calendar .el-calendar__header{display:flex;justify-content:center}.ibiz-calendar-flatten__month-calendar .el-calendar__body{padding:var(--ibiz-spacing-tight)}.ibiz-calendar-flatten__month-calendar .el-calendar-table .el-calendar-day{width:50px;height:50px;padding:0}.ibiz-calendar-flatten__month-calendar .el-calendar-table td.is-selected{background-color:transparent}.ibiz-calendar-flatten__date{display:flex;flex-direction:column;gap:var(--ibiz-spacing-extra-tight);align-items:center;justify-content:center;width:100%;height:100%;padding:4px}.ibiz-calendar-flatten__date--day{flex-shrink:0}.ibiz-calendar-flatten__date--mark{display:flex;flex-grow:1;flex-wrap:wrap;gap:var(--ibiz-spacing-extra-tight);justify-content:center;overflow:hidden}.ibiz-calendar-flatten__dot{width:4px;height:4px;border-radius:50%}.ibiz-calendar-flatten__legend{display:flex;gap:var(--ibiz-spacing-extra-tight);align-items:center;cursor:pointer}.ibiz-calendar-flatten__legend--dot{width:16px;height:16px;border-radius:50%}.ibiz-calendar-flatten__popover{max-height:300px;overflow:auto}.ibiz-calendar-flatten__event .ibiz-control-calendar-item{width:126px;height:auto}.ibiz-calendar-flatten__event .ibiz-control-calendar-item.is-active{color:var(--ibiz-color-primary-text);background-color:var(--ibiz-color-primary)}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var vue3Util = require('@ibiz-template/vue3-util');
|
|
6
|
+
var calendarFlatten = require('./calendar-flatten.cjs');
|
|
7
|
+
|
|
8
|
+
"use strict";
|
|
9
|
+
const IBizCalendarFlatten = vue3Util.withInstall(calendarFlatten.CalendarFlatten, (v) => {
|
|
10
|
+
v.component(calendarFlatten.CalendarFlatten.name, calendarFlatten.CalendarFlatten);
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
exports.IBizCalendarFlatten = IBizCalendarFlatten;
|
|
14
|
+
exports.default = IBizCalendarFlatten;
|
|
@@ -8,8 +8,8 @@ var index$1 = require('../calendar-daily/index.cjs');
|
|
|
8
8
|
var index = require('../calendar-week/index.cjs');
|
|
9
9
|
var index$2 = require('../calendar-user/index.cjs');
|
|
10
10
|
var useCustomCalendar = require('./use-custom-calendar.cjs');
|
|
11
|
-
require('./custom-calendar.css');
|
|
12
11
|
require('../interface/index.cjs');
|
|
12
|
+
require('./custom-calendar.css');
|
|
13
13
|
var customCalendar = require('../interface/custom-calendar.cjs');
|
|
14
14
|
|
|
15
15
|
"use strict";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var vue = require('vue');
|
|
4
3
|
var dayjs = require('dayjs');
|
|
5
4
|
var ElementPlus = require('element-plus');
|
|
6
|
-
require('
|
|
5
|
+
var vue = require('vue');
|
|
7
6
|
require('../constant/index.cjs');
|
|
7
|
+
require('../util/index.cjs');
|
|
8
8
|
var util = require('../util/util.cjs');
|
|
9
9
|
var event = require('../constant/event.cjs');
|
|
10
10
|
|
|
@@ -50,6 +50,9 @@ const AppMenuPortletControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
50
50
|
if (!state.visible) {
|
|
51
51
|
return null;
|
|
52
52
|
}
|
|
53
|
+
const {
|
|
54
|
+
counterId
|
|
55
|
+
} = item;
|
|
53
56
|
return vue.createVNode("div", {
|
|
54
57
|
"class": [ns.b("item"), ns.is("disabled", !item.appFuncId)],
|
|
55
58
|
"title": core.showTitle(item.tooltip || item.caption),
|
|
@@ -61,7 +64,10 @@ const AppMenuPortletControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
61
64
|
}, [vue.createVNode(vue.resolveComponent("iBizIcon"), {
|
|
62
65
|
"class": ns.be("item", "icon"),
|
|
63
66
|
"icon": item.sysImage
|
|
64
|
-
}, null), vue.createVNode("
|
|
67
|
+
}, null), counterId ? vue.createVNode(vue.resolveComponent("iBizBadge"), {
|
|
68
|
+
"class": ns.e("counter"),
|
|
69
|
+
"value": c.state.counterData[counterId]
|
|
70
|
+
}, null) : null, vue.createVNode("span", {
|
|
65
71
|
"class": ns.be("item", "label")
|
|
66
72
|
}, [item.caption])]);
|
|
67
73
|
};
|
|
@@ -73,16 +79,27 @@ const AppMenuPortletControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
73
79
|
if (!item.appMenuItems) {
|
|
74
80
|
return renderItem(item);
|
|
75
81
|
}
|
|
82
|
+
const {
|
|
83
|
+
counterId
|
|
84
|
+
} = item;
|
|
76
85
|
return vue.createVNode(vue.resolveComponent("el-collapse-item"), {
|
|
77
86
|
"class": ns.b("group"),
|
|
78
87
|
"name": item.id,
|
|
79
88
|
"title": core.showTitle(item.caption)
|
|
80
89
|
}, {
|
|
90
|
+
title: () => {
|
|
91
|
+
return [vue.createVNode("span", {
|
|
92
|
+
"class": ns.be("group", "label")
|
|
93
|
+
}, [item.caption]), counterId ? vue.createVNode(vue.resolveComponent("iBizBadge"), {
|
|
94
|
+
"class": ns.e("counter"),
|
|
95
|
+
"value": c.state.counterData[counterId]
|
|
96
|
+
}, null) : null];
|
|
97
|
+
},
|
|
81
98
|
default: () => {
|
|
82
99
|
var _a2;
|
|
83
|
-
return
|
|
100
|
+
return (_a2 = item.appMenuItems) == null ? void 0 : _a2.map((child) => {
|
|
84
101
|
return renderItem(child);
|
|
85
|
-
})
|
|
102
|
+
});
|
|
86
103
|
}
|
|
87
104
|
});
|
|
88
105
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.ibiz-control-appmenu-portlet{--ibiz-control-appmenu-portlet-margin:var(--ibiz-spacing-base-tight);--ibiz-control-appmenu-portlet-border-color:var(--ibiz-color-primary);--ibiz-control-appmenu-portlet-bg-color:var(--ibiz-color-bg-0);--ibiz-control-appmenu-portlet-padding:var(--ibiz-spacing-base-tight);--ibiz-control-appmenu-portlet-content-padding:var(--ibiz-spacing-tight) var(--ibiz-spacing-base);padding:var(--ibiz-control-appmenu-portlet-content-padding)}.ibiz-control-appmenu-portlet__content{display:flex;flex-wrap:wrap;width:100%}.ibiz-control-appmenu-portlet-item{position:relative;display:flex;flex-direction:column;flex-shrink:0;align-items:flex-start;justify-content:center;width:calc(25% - var(--ibiz-control-appmenu-portlet-margin) * 2);padding:var(--ibiz-control-appmenu-portlet-padding);margin:var(--ibiz-control-appmenu-portlet-margin);cursor:pointer;background-color:var(--ibiz-control-appmenu-portlet-bg-color)}.ibiz-control-appmenu-portlet-item::before{position:absolute;left:0;width:4px;height:100%;content:"";background-color:var(--ibiz-control-appmenu-portlet-border-color)}.ibiz-control-appmenu-portlet-group{width:100%}.ibiz-control-appmenu-portlet-group .el-collapse-item__content{display:flex;flex-wrap:wrap}
|
|
1
|
+
.ibiz-control-appmenu-portlet{--ibiz-control-appmenu-portlet-margin:var(--ibiz-spacing-base-tight);--ibiz-control-appmenu-portlet-border-color:var(--ibiz-color-primary);--ibiz-control-appmenu-portlet-bg-color:var(--ibiz-color-bg-0);--ibiz-control-appmenu-portlet-padding:var(--ibiz-spacing-base-tight);--ibiz-control-appmenu-portlet-content-padding:var(--ibiz-spacing-tight) var(--ibiz-spacing-base);--ibiz-control-appmenu-portlet-counter-gap:var(--ibiz-spacing-tight);padding:var(--ibiz-control-appmenu-portlet-content-padding)}.ibiz-control-appmenu-portlet__content{display:flex;flex-wrap:wrap;width:100%}.ibiz-control-appmenu-portlet-item{position:relative;display:flex;flex-direction:column;flex-shrink:0;align-items:flex-start;justify-content:center;width:calc(25% - var(--ibiz-control-appmenu-portlet-margin) * 2);padding:var(--ibiz-control-appmenu-portlet-padding);margin:var(--ibiz-control-appmenu-portlet-margin);cursor:pointer;background-color:var(--ibiz-control-appmenu-portlet-bg-color)}.ibiz-control-appmenu-portlet-item::before{position:absolute;left:0;width:4px;height:100%;content:"";background-color:var(--ibiz-control-appmenu-portlet-border-color)}.ibiz-control-appmenu-portlet-item .ibiz-control-appmenu-portlet__counter{position:absolute;top:var(--ibiz-control-appmenu-portlet-counter-gap);right:var(--ibiz-control-appmenu-portlet-counter-gap)}.ibiz-control-appmenu-portlet-group{width:100%}.ibiz-control-appmenu-portlet-group .el-collapse-item__header .ibiz-control-appmenu-portlet__counter{margin-left:var(--ibiz-control-appmenu-portlet-counter-gap)}.ibiz-control-appmenu-portlet-group .el-collapse-item__content{display:flex;flex-wrap:wrap}
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
var vue = require('vue');
|
|
4
4
|
var vue3Util = require('@ibiz-template/vue3-util');
|
|
5
|
-
var runtime = require('@ibiz-template/runtime');
|
|
6
5
|
|
|
7
6
|
"use strict";
|
|
8
7
|
function _isSlot(s) {
|
|
@@ -16,17 +15,42 @@ const RawItemPortlet = /* @__PURE__ */ vue.defineComponent({
|
|
|
16
15
|
required: true
|
|
17
16
|
},
|
|
18
17
|
controller: {
|
|
19
|
-
type:
|
|
18
|
+
type: Object,
|
|
20
19
|
required: true
|
|
21
20
|
}
|
|
22
21
|
},
|
|
23
22
|
setup(props) {
|
|
24
23
|
var _a;
|
|
25
|
-
const
|
|
26
|
-
const
|
|
24
|
+
const c = props.controller;
|
|
25
|
+
const ns = vue3Util.useNamespace("portlet-".concat((_a = c.model.portletType) == null ? void 0 : _a.toLowerCase()));
|
|
26
|
+
const content = vue.ref();
|
|
27
|
+
const onInit = async () => {
|
|
28
|
+
const rawItemModel = c.model.rawItem;
|
|
29
|
+
if (!rawItemModel)
|
|
30
|
+
return;
|
|
31
|
+
let rawItemContent;
|
|
32
|
+
if (rawItemModel.contentType === "RAW") {
|
|
33
|
+
rawItemContent = rawItemModel.caption;
|
|
34
|
+
} else if (rawItemModel.contentType === "HTML") {
|
|
35
|
+
rawItemContent = rawItemModel.content;
|
|
36
|
+
}
|
|
37
|
+
const data = c.dashboard.view.srfactiveviewdata || {};
|
|
38
|
+
if (rawItemContent && rawItemModel.templateMode)
|
|
39
|
+
rawItemContent = await ibiz.util.hbs.render(rawItemContent.replaceAll("//n", "\n"), {
|
|
40
|
+
data: {
|
|
41
|
+
...data
|
|
42
|
+
},
|
|
43
|
+
context: props.controller.context,
|
|
44
|
+
params: props.controller.params
|
|
45
|
+
});
|
|
46
|
+
content.value = rawItemContent;
|
|
47
|
+
};
|
|
48
|
+
vue.onMounted(() => {
|
|
49
|
+
onInit();
|
|
50
|
+
});
|
|
27
51
|
return {
|
|
28
52
|
ns,
|
|
29
|
-
|
|
53
|
+
content
|
|
30
54
|
};
|
|
31
55
|
},
|
|
32
56
|
render() {
|
|
@@ -36,7 +60,8 @@ const RawItemPortlet = /* @__PURE__ */ vue.defineComponent({
|
|
|
36
60
|
"controller": this.controller,
|
|
37
61
|
"class": classArr
|
|
38
62
|
}, _isSlot(_slot = vue.h(vue.resolveComponent("iBizRawItem"), {
|
|
39
|
-
rawItem: this.
|
|
63
|
+
rawItem: this.modelData,
|
|
64
|
+
content: this.content
|
|
40
65
|
})) ? _slot : {
|
|
41
66
|
default: () => [_slot]
|
|
42
67
|
});
|
|
@@ -526,13 +526,13 @@ const DataViewControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
526
526
|
}
|
|
527
527
|
return icon;
|
|
528
528
|
};
|
|
529
|
-
const ITEM_HEIGHT =
|
|
529
|
+
const ITEM_HEIGHT = 24;
|
|
530
530
|
const calcSkeletonRows = () => {
|
|
531
531
|
const {
|
|
532
532
|
cardHeight
|
|
533
533
|
} = c.model;
|
|
534
534
|
if (cardHeight) {
|
|
535
|
-
return Math.max(1, Math.floor(cardHeight / ITEM_HEIGHT));
|
|
535
|
+
return Math.max(1, Math.floor((cardHeight - 32 + 4) / ITEM_HEIGHT));
|
|
536
536
|
}
|
|
537
537
|
return 2;
|
|
538
538
|
};
|
|
@@ -71,7 +71,7 @@ const FormPage = /* @__PURE__ */ vue.defineComponent({
|
|
|
71
71
|
default: () => slot,
|
|
72
72
|
label: () => {
|
|
73
73
|
return vue.createVNode("span", {
|
|
74
|
-
"class": c.labelClass
|
|
74
|
+
"class": [c.labelClass, this.ns.b("tab-label")]
|
|
75
75
|
}, [c.model.sysImage ? vue.createVNode(vue.resolveComponent("iBizIcon"), {
|
|
76
76
|
"icon": c.model.sysImage
|
|
77
77
|
}, null) : null, c.model.caption]);
|
|
@@ -172,7 +172,9 @@ const FormRawItem = /* @__PURE__ */ vue.defineComponent({
|
|
|
172
172
|
rawItemContent = await ibiz.util.hbs.render(rawItemContent.replaceAll("//n", "\n"), Object.assign(obj, {
|
|
173
173
|
data: {
|
|
174
174
|
...newVal
|
|
175
|
-
}
|
|
175
|
+
},
|
|
176
|
+
context: c.context,
|
|
177
|
+
params: c.params
|
|
176
178
|
}));
|
|
177
179
|
}
|
|
178
180
|
content.value = rawItemContent;
|
|
@@ -731,7 +731,7 @@ function useGridHeaderStyle(tableRef, ns) {
|
|
|
731
731
|
const height = entries[0].contentRect.height;
|
|
732
732
|
if (height !== lastGridHeaderHeight) {
|
|
733
733
|
const tempCssVars = {
|
|
734
|
-
"
|
|
734
|
+
"setting-height": "".concat(height, "px")
|
|
735
735
|
};
|
|
736
736
|
headerCssVars.value = ns.cssVarBlock(tempCssVars);
|
|
737
737
|
lastGridHeaderHeight = height;
|