@ibiz-template/vue3-components 0.7.38-alpha.31 → 0.7.38-alpha.43
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/chart-NHocZH22.js +1 -0
- package/dist/index-BLHbMaxB.js +1 -0
- package/dist/index-D22WGUVe.js +1 -0
- package/dist/index-b76YR_Js.js +4 -0
- package/dist/index.min.css +1 -1
- package/dist/index.system.min.js +1 -1
- package/dist/{xlsx-util-DbA3TyD9.js → xlsx-util-BoMFhSd9.js} +1 -1
- package/es/common/action-toolbar/action-toolbar.css +1 -1
- package/es/common/button-list/button-list.css +1 -1
- package/es/common/custom-filter-condition/custom-filter-condition.d.ts +3 -0
- package/es/common/custom-theme/custom-theme-model.mjs +168 -47
- package/es/common/custom-theme/custom-theme.controller.d.ts +87 -1
- package/es/common/custom-theme/custom-theme.controller.mjs +235 -5
- package/es/common/custom-theme/custom-theme.css +1 -1
- package/es/common/custom-theme/custom-theme.d.ts +5 -3
- package/es/common/custom-theme/custom-theme.mjs +190 -26
- package/es/common/nav-split/nav-split.mjs +0 -1
- package/es/common/no-data/no-data.css +1 -1
- package/es/common/no-data/no-data.d.ts +3 -3
- package/es/common/no-data/no-data.mjs +2 -2
- package/es/common/view-message/view-message.d.ts +5 -0
- package/es/control/app-menu/app-menu.css +1 -1
- package/es/control/calendar/calendar-util.d.ts +24 -0
- package/es/control/calendar/calendar-util.mjs +21 -0
- package/es/control/calendar/calendar.css +1 -1
- package/es/control/calendar/calendar.d.ts +2 -0
- package/es/control/calendar/calendar.mjs +94 -25
- package/es/control/calendar/components/calendar-user/calendar-user.css +1 -0
- package/es/control/calendar/components/calendar-user/calendar-user.d.ts +15 -0
- package/es/control/calendar/components/calendar-user/calendar-user.mjs +133 -0
- package/es/control/calendar/components/calendar-user/index.d.ts +15 -0
- package/es/control/calendar/components/calendar-user/index.mjs +9 -0
- package/es/control/calendar/components/calendar-user/use-calendar-user.d.ts +17 -0
- package/es/control/calendar/components/calendar-user/use-calendar-user.mjs +59 -0
- package/es/control/calendar/components/calendar-week/calendar-week.css +1 -1
- package/es/control/calendar/components/calendar-week/calendar-week.mjs +3 -2
- package/es/control/calendar/components/custom-calendar/custom-calendar.mjs +11 -0
- package/es/control/calendar/components/interface/calendar-user.d.ts +10 -0
- package/es/control/calendar/components/interface/calendar-user.mjs +20 -0
- package/es/control/calendar/components/interface/index.d.ts +1 -0
- package/es/control/calendar/components/interface/index.mjs +1 -0
- package/es/control/calendar/index.d.ts +2 -0
- package/es/control/caption-bar/caption-bar.css +1 -1
- package/es/control/chart/chart.css +1 -1
- package/es/control/chart/chart.d.ts +1 -0
- package/es/control/chart/chart.mjs +12 -5
- package/es/control/dashboard/custom-dashboard-container/custom-dashboard-container.d.ts +85 -0
- package/es/control/dashboard/dashboard-design/dashboard-design.d.ts +1 -0
- package/es/control/dashboard/dashboard-design/dashboard-design.mjs +36 -16
- package/es/control/dashboard/dashboard-design/dashboard-design.util.d.ts +10 -0
- package/es/control/dashboard/dashboard-design/dashboard-design.util.mjs +246 -0
- package/es/control/dashboard/portlet/portlet-layout/portlet-layout.mjs +1 -1
- package/es/control/data-view/data-view.css +1 -1
- package/es/control/data-view/data-view.mjs +8 -1
- package/es/control/drtab/drtab-control.util.mjs +1 -1
- package/es/control/form/form-detail/form-item/composite-form-item/composite-form-item.d.ts +35 -0
- package/es/control/form/form-detail/form-item/composite-form-item/composite-form-item.mjs +93 -0
- package/es/control/form/form-detail/form-item/form-item.css +1 -1
- package/es/control/form/form-detail/form-item/form-item.mjs +49 -33
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid/repeater-grid.d.ts +71 -0
- package/es/control/grid/grid/grid-control.util.mjs +2 -2
- package/es/control/grid/grid/grid.css +1 -1
- package/es/control/grid/grid/grid.mjs +3 -2
- 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/list/list.css +1 -1
- package/es/control/list/list.mjs +9 -2
- package/es/control/toolbar/toolbar.css +1 -1
- package/es/control/toolbar/toolbar.d.ts +2 -2
- package/es/control/toolbar/toolbar.mjs +24 -11
- package/es/control/tree/index.d.ts +2 -0
- package/es/control/tree/tree.css +1 -1
- package/es/control/tree/tree.d.ts +2 -0
- package/es/control/tree/tree.mjs +87 -6
- package/es/control/wizard-panel/wizard-panel.mjs +3 -1
- package/es/editor/autocomplete/ibiz-autocomplete/ibiz-autocomplete.mjs +3 -0
- package/es/editor/color-picker/ibiz-color-mpicker-custom/ibiz-color-mpicker-custom.css +1 -0
- package/es/editor/color-picker/ibiz-color-mpicker-custom/ibiz-color-mpicker-custom.d.ts +66 -0
- package/es/editor/color-picker/ibiz-color-mpicker-custom/ibiz-color-mpicker-custom.mjs +139 -0
- package/es/editor/color-picker/ibiz-color-mpicker-default/ibiz-color-mpicker-default.css +1 -0
- package/es/editor/color-picker/ibiz-color-mpicker-default/ibiz-color-mpicker-default.d.ts +56 -0
- package/es/editor/color-picker/ibiz-color-mpicker-default/ibiz-color-mpicker-default.mjs +178 -0
- package/es/editor/color-picker/ibiz-color-picker/ibiz-color-picker.d.ts +10 -1
- package/es/editor/color-picker/ibiz-color-picker/ibiz-color-picker.mjs +48 -4
- package/es/editor/data-picker/ibiz-mpicker/ibiz-mpicker.mjs +10 -0
- package/es/editor/data-picker/ibiz-picker/ibiz-picker.mjs +9 -2
- package/es/editor/data-picker/ibiz-picker-dropdown/ibiz-picker-dropdown.mjs +12 -3
- package/es/editor/data-picker/ibiz-picker-link/ibiz-picker-link.mjs +3 -1
- package/es/editor/data-picker/picker-editor.provider.mjs +0 -1
- package/es/editor/dropdown-list/dropdown-list-editor.controller.d.ts +6 -0
- package/es/editor/dropdown-list/dropdown-list-editor.controller.mjs +13 -2
- package/es/editor/dropdown-list/dropdown-list-editor.provider.mjs +3 -0
- package/es/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.css +1 -1
- package/es/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.mjs +3 -0
- package/es/editor/dropdown-list/ibiz-virtualized-list/ibiz-virtualized-list.css +1 -0
- package/es/editor/dropdown-list/ibiz-virtualized-list/ibiz-virtualized-list.d.ts +83 -0
- package/es/editor/dropdown-list/ibiz-virtualized-list/ibiz-virtualized-list.mjs +382 -0
- package/es/editor/dropdown-list/index.d.ts +1 -0
- package/es/editor/dropdown-list/index.mjs +1 -0
- package/es/editor/index.mjs +10 -0
- package/es/editor/span/span/span.mjs +1 -1
- package/es/editor/upload/ibiz-image-preview/ibiz-image-preview.d.ts +2 -0
- package/es/editor/upload/ibiz-image-preview/ibiz-image-preview.mjs +18 -5
- package/es/locale/en/index.d.ts +86 -26
- package/es/locale/en/index.mjs +69 -28
- package/es/locale/zh-CN/index.d.ts +87 -26
- package/es/locale/zh-CN/index.mjs +69 -28
- package/es/panel-component/index.mjs +2 -1
- package/es/panel-component/panel-app-header/panel-app-header.css +1 -1
- package/es/panel-component/panel-index-view-search/panel-index-view-search.css +1 -1
- package/es/panel-component/user-action/user-action.css +1 -1
- package/es/panel-component/user-action/user-action.mjs +1 -5
- package/es/util/fullscreen/fullscreen-util.mjs +1 -1
- package/es/view/login-view/login-view.mjs +22 -15
- package/es/view/share-view/share-view.mjs +1 -6
- package/es/view-engine/custom-view.engine.d.ts +9 -0
- package/es/view-engine/custom-view.engine.mjs +17 -1
- package/es/view-engine/edit-view.engine.d.ts +6 -14
- package/es/view-engine/edit-view.engine.mjs +75 -162
- package/es/view-engine/index-view.engine.d.ts +7 -0
- package/es/view-engine/index-view.engine.mjs +17 -1
- package/es/view-engine/login-view.engine.mjs +10 -1
- package/es/view-engine/portal-view-engine.d.ts +31 -3
- package/es/view-engine/portal-view-engine.mjs +94 -2
- package/es/view-engine/tree-exp-view.engine.d.ts +14 -0
- package/es/view-engine/tree-exp-view.engine.mjs +24 -1
- package/es/web-app/components/modal-router-shell/modal-router-shell.mjs +4 -0
- package/es/web-app/guard/auth-guard/auth-guard.d.ts +4 -3
- package/es/web-app/guard/auth-guard/auth-guard.mjs +26 -8
- package/es/web-app/util/unauthorized-handler/unauthorized-handler.d.ts +9 -0
- package/es/web-app/util/unauthorized-handler/unauthorized-handler.mjs +21 -0
- package/lib/common/action-toolbar/action-toolbar.css +1 -1
- package/lib/common/button-list/button-list.css +1 -1
- package/lib/common/custom-theme/custom-theme-model.cjs +168 -47
- package/lib/common/custom-theme/custom-theme.cjs +188 -24
- package/lib/common/custom-theme/custom-theme.controller.cjs +235 -5
- package/lib/common/custom-theme/custom-theme.css +1 -1
- package/lib/common/nav-split/nav-split.cjs +0 -1
- package/lib/common/no-data/no-data.cjs +2 -2
- package/lib/common/no-data/no-data.css +1 -1
- package/lib/control/app-menu/app-menu.css +1 -1
- package/lib/control/calendar/calendar-util.cjs +24 -0
- package/lib/control/calendar/calendar.cjs +94 -25
- package/lib/control/calendar/calendar.css +1 -1
- package/lib/control/calendar/components/calendar-user/calendar-user.cjs +135 -0
- package/lib/control/calendar/components/calendar-user/calendar-user.css +1 -0
- package/lib/control/calendar/components/calendar-user/index.cjs +14 -0
- package/lib/control/calendar/components/calendar-user/use-calendar-user.cjs +63 -0
- package/lib/control/calendar/components/calendar-week/calendar-week.cjs +3 -2
- package/lib/control/calendar/components/calendar-week/calendar-week.css +1 -1
- package/lib/control/calendar/components/custom-calendar/custom-calendar.cjs +11 -0
- package/lib/control/calendar/components/interface/calendar-user.cjs +23 -0
- package/lib/control/calendar/components/interface/index.cjs +3 -0
- package/lib/control/caption-bar/caption-bar.css +1 -1
- package/lib/control/chart/chart.cjs +12 -5
- package/lib/control/chart/chart.css +1 -1
- package/lib/control/dashboard/dashboard-design/dashboard-design.cjs +35 -15
- package/lib/control/dashboard/dashboard-design/dashboard-design.util.cjs +248 -0
- package/lib/control/dashboard/portlet/portlet-layout/portlet-layout.cjs +1 -1
- package/lib/control/data-view/data-view.cjs +8 -1
- package/lib/control/data-view/data-view.css +1 -1
- package/lib/control/drtab/drtab-control.util.cjs +1 -1
- package/lib/control/form/form-detail/form-item/composite-form-item/composite-form-item.cjs +98 -0
- package/lib/control/form/form-detail/form-item/form-item.cjs +48 -32
- package/lib/control/form/form-detail/form-item/form-item.css +1 -1
- package/lib/control/grid/grid/grid-control.util.cjs +2 -2
- package/lib/control/grid/grid/grid.cjs +3 -2
- package/lib/control/grid/grid/grid.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/list/list.cjs +9 -2
- package/lib/control/list/list.css +1 -1
- package/lib/control/toolbar/toolbar.cjs +24 -11
- package/lib/control/toolbar/toolbar.css +1 -1
- package/lib/control/tree/tree.cjs +87 -6
- package/lib/control/tree/tree.css +1 -1
- package/lib/control/wizard-panel/wizard-panel.cjs +3 -1
- package/lib/editor/autocomplete/ibiz-autocomplete/ibiz-autocomplete.cjs +3 -0
- package/lib/editor/color-picker/ibiz-color-mpicker-custom/ibiz-color-mpicker-custom.cjs +141 -0
- package/lib/editor/color-picker/ibiz-color-mpicker-custom/ibiz-color-mpicker-custom.css +1 -0
- package/lib/editor/color-picker/ibiz-color-mpicker-default/ibiz-color-mpicker-default.cjs +180 -0
- package/lib/editor/color-picker/ibiz-color-mpicker-default/ibiz-color-mpicker-default.css +1 -0
- package/lib/editor/color-picker/ibiz-color-picker/ibiz-color-picker.cjs +48 -4
- package/lib/editor/data-picker/ibiz-mpicker/ibiz-mpicker.cjs +10 -0
- package/lib/editor/data-picker/ibiz-picker/ibiz-picker.cjs +9 -2
- package/lib/editor/data-picker/ibiz-picker-dropdown/ibiz-picker-dropdown.cjs +12 -3
- package/lib/editor/data-picker/ibiz-picker-link/ibiz-picker-link.cjs +3 -1
- package/lib/editor/data-picker/picker-editor.provider.cjs +0 -1
- package/lib/editor/dropdown-list/dropdown-list-editor.controller.cjs +13 -2
- package/lib/editor/dropdown-list/dropdown-list-editor.provider.cjs +3 -0
- package/lib/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.cjs +3 -0
- package/lib/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.css +1 -1
- package/lib/editor/dropdown-list/ibiz-virtualized-list/ibiz-virtualized-list.cjs +384 -0
- package/lib/editor/dropdown-list/ibiz-virtualized-list/ibiz-virtualized-list.css +1 -0
- package/lib/editor/dropdown-list/index.cjs +2 -0
- package/lib/editor/index.cjs +10 -0
- package/lib/editor/span/span/span.cjs +1 -1
- package/lib/editor/upload/ibiz-image-preview/ibiz-image-preview.cjs +18 -5
- package/lib/locale/en/index.cjs +69 -28
- package/lib/locale/zh-CN/index.cjs +69 -28
- package/lib/panel-component/index.cjs +1 -0
- package/lib/panel-component/panel-app-header/panel-app-header.css +1 -1
- package/lib/panel-component/panel-index-view-search/panel-index-view-search.css +1 -1
- package/lib/panel-component/user-action/user-action.cjs +1 -5
- package/lib/panel-component/user-action/user-action.css +1 -1
- package/lib/util/fullscreen/fullscreen-util.cjs +1 -1
- package/lib/view/login-view/login-view.cjs +20 -13
- package/lib/view/share-view/share-view.cjs +0 -5
- package/lib/view-engine/custom-view.engine.cjs +16 -0
- package/lib/view-engine/edit-view.engine.cjs +74 -161
- package/lib/view-engine/index-view.engine.cjs +17 -1
- package/lib/view-engine/login-view.engine.cjs +10 -1
- package/lib/view-engine/portal-view-engine.cjs +93 -1
- package/lib/view-engine/tree-exp-view.engine.cjs +23 -0
- package/lib/web-app/components/modal-router-shell/modal-router-shell.cjs +4 -0
- package/lib/web-app/guard/auth-guard/auth-guard.cjs +26 -8
- package/lib/web-app/util/unauthorized-handler/unauthorized-handler.cjs +21 -0
- package/package.json +8 -8
- package/dist/chart-DPS_XpZp.js +0 -1
- package/dist/index-CnCC-cC2.js +0 -1
- package/dist/index-Q4QqDXYJ.js +0 -4
- package/dist/index-X3QXftIl.js +0 -1
- /package/es/node_modules/.pnpm/{@ibiz-template_core@0.7.38-alpha.32_axios@1.7.7_lodash-es@4.17.21_qs@6.13.0_qx-util@0.4.8_ramda@0.29.1 → @ibiz-template_core@0.7.38-alpha.43_axios@1.7.7_lodash-es@4.17.21_qs@6.13.0_qx-util@0.4.8_ramda@0.29.1}/node_modules/@ibiz-template/core/out/utils/namespace/namespace.mjs +0 -0
- /package/lib/node_modules/.pnpm/{@ibiz-template_core@0.7.38-alpha.32_axios@1.7.7_lodash-es@4.17.21_qs@6.13.0_qx-util@0.4.8_ramda@0.29.1 → @ibiz-template_core@0.7.38-alpha.43_axios@1.7.7_lodash-es@4.17.21_qs@6.13.0_qx-util@0.4.8_ramda@0.29.1}/node_modules/@ibiz-template/core/out/utils/namespace/namespace.cjs +0 -0
|
@@ -41,6 +41,7 @@ export declare const DashboardDesign: import("vue").DefineComponent<{
|
|
|
41
41
|
filterVal: Ref<string>;
|
|
42
42
|
defaultOpens: import("vue").ComputedRef<string[]>;
|
|
43
43
|
layoutModel: Ref<IData[]>;
|
|
44
|
+
isLoading: Ref<boolean>;
|
|
44
45
|
onReset: () => Promise<void>;
|
|
45
46
|
onSave: () => Promise<void>;
|
|
46
47
|
removeItem: (child: IData) => Promise<void>;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { isVNode, defineComponent, ref, computed, watch, onUnmounted, createVNode, resolveComponent, h, createTextVNode } from 'vue';
|
|
1
|
+
import { isVNode, defineComponent, ref, computed, watch, onUnmounted, createVNode, resolveComponent, h, createTextVNode, withDirectives, resolveDirective } from 'vue';
|
|
2
2
|
import { getPortletProvider } from '@ibiz-template/runtime';
|
|
3
3
|
import { useNamespace } from '@ibiz-template/vue3-util';
|
|
4
|
+
import { showTitle } from '@ibiz-template/core';
|
|
4
5
|
import { clone } from 'ramda';
|
|
6
|
+
import { loadDefaultLayoutModel } from './dashboard-design.util.mjs';
|
|
5
7
|
import './dashboard-design.css';
|
|
6
|
-
import { showTitle } from '@ibiz-template/core';
|
|
7
8
|
|
|
8
9
|
"use strict";
|
|
9
10
|
function _isSlot(s) {
|
|
@@ -41,6 +42,7 @@ const DashboardDesign = /* @__PURE__ */ defineComponent({
|
|
|
41
42
|
const providers = ref({});
|
|
42
43
|
const portletControllers = ref({});
|
|
43
44
|
const designPanel = ref(null);
|
|
45
|
+
const isLoading = ref(false);
|
|
44
46
|
const filterData = (list1) => {
|
|
45
47
|
const items = [];
|
|
46
48
|
list1.forEach((data) => {
|
|
@@ -129,6 +131,7 @@ const DashboardDesign = /* @__PURE__ */ defineComponent({
|
|
|
129
131
|
} else if (app.model.appPortletCats && app.model.appPortlets) {
|
|
130
132
|
const isDEView = customC.model.appDataEntityId;
|
|
131
133
|
const categoryTag = props.dashboard.controlParams.categorytag;
|
|
134
|
+
const portletNameTag = props.dashboard.controlParams.portletnametag;
|
|
132
135
|
app.model.appPortlets.forEach((portlet) => {
|
|
133
136
|
var _a;
|
|
134
137
|
if (!isDEView && !portlet.enableAppDashboard) {
|
|
@@ -147,6 +150,12 @@ const DashboardDesign = /* @__PURE__ */ defineComponent({
|
|
|
147
150
|
return;
|
|
148
151
|
}
|
|
149
152
|
}
|
|
153
|
+
if (portletNameTag) {
|
|
154
|
+
const portletNameRegex = new RegExp(portletNameTag);
|
|
155
|
+
if (portlet.codeName && !portletNameRegex.test(portlet.codeName)) {
|
|
156
|
+
return;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
150
159
|
const temp = {
|
|
151
160
|
type: "app",
|
|
152
161
|
portletCodeName: portlet.codeName,
|
|
@@ -242,17 +251,27 @@ const DashboardDesign = /* @__PURE__ */ defineComponent({
|
|
|
242
251
|
};
|
|
243
252
|
watch(() => props.isShowDesign, async (newVal) => {
|
|
244
253
|
if (newVal) {
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
item.portletModel = tempModelDatas[index];
|
|
254
|
+
try {
|
|
255
|
+
isLoading.value = true;
|
|
256
|
+
await prepareData();
|
|
257
|
+
const res = await customC.loadCustomModelData();
|
|
258
|
+
let model = clone(res.model);
|
|
259
|
+
if (!model.length) {
|
|
260
|
+
model = loadDefaultLayoutModel(c, customC);
|
|
253
261
|
}
|
|
254
|
-
|
|
255
|
-
|
|
262
|
+
const tempModelDatas = await preparePortlet(model);
|
|
263
|
+
layoutModel.value = model;
|
|
264
|
+
layoutModel.value.forEach((item, index) => {
|
|
265
|
+
if (item.dynamodelFlag) {
|
|
266
|
+
item.portletModel = tempModelDatas[index];
|
|
267
|
+
}
|
|
268
|
+
});
|
|
269
|
+
layoutConfig.value = clone(res.config);
|
|
270
|
+
} catch (error) {
|
|
271
|
+
ibiz.log.error(error);
|
|
272
|
+
} finally {
|
|
273
|
+
isLoading.value = false;
|
|
274
|
+
}
|
|
256
275
|
}
|
|
257
276
|
}, {
|
|
258
277
|
immediate: true
|
|
@@ -354,6 +373,7 @@ const DashboardDesign = /* @__PURE__ */ defineComponent({
|
|
|
354
373
|
filterVal,
|
|
355
374
|
defaultOpens,
|
|
356
375
|
layoutModel,
|
|
376
|
+
isLoading,
|
|
357
377
|
onReset,
|
|
358
378
|
onSave,
|
|
359
379
|
removeItem,
|
|
@@ -503,9 +523,9 @@ const DashboardDesign = /* @__PURE__ */ defineComponent({
|
|
|
503
523
|
default: () => [_slot5]
|
|
504
524
|
}), createVNode("div", {
|
|
505
525
|
"class": this.ns.b("tree-content")
|
|
506
|
-
}, [renderTree()])]), createVNode("div", {
|
|
507
|
-
"
|
|
508
|
-
"
|
|
526
|
+
}, [renderTree()])]), withDirectives(createVNode("div", {
|
|
527
|
+
"ref": "designPanel",
|
|
528
|
+
"class": this.ns.b("scroll-box")
|
|
509
529
|
}, [createVNode("div", {
|
|
510
530
|
"class": this.ns.b("panel")
|
|
511
531
|
}, [createVNode("div", {
|
|
@@ -551,7 +571,7 @@ const DashboardDesign = /* @__PURE__ */ defineComponent({
|
|
|
551
571
|
});
|
|
552
572
|
})) ? _slot6 : {
|
|
553
573
|
default: () => [_slot6]
|
|
554
|
-
})])])])]);
|
|
574
|
+
})])]), [[resolveDirective("loading"), this.isLoading]])])]);
|
|
555
575
|
}
|
|
556
576
|
});
|
|
557
577
|
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CustomDashboardController, DashboardController } from '@ibiz-template/runtime';
|
|
2
|
+
/**
|
|
3
|
+
* 加载默认模型布局
|
|
4
|
+
*
|
|
5
|
+
* @export
|
|
6
|
+
* @param {DashboardController} dashboard
|
|
7
|
+
* @param {CustomDashboardController} customDashboard
|
|
8
|
+
* @return {*} {IData[]}
|
|
9
|
+
*/
|
|
10
|
+
export declare function loadDefaultLayoutModel(dashboard: DashboardController, customDashboard: CustomDashboardController): IData[];
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
function calcGridSpanOffset(layoutPos) {
|
|
3
|
+
const {
|
|
4
|
+
layout,
|
|
5
|
+
colXS,
|
|
6
|
+
colSM,
|
|
7
|
+
colMD,
|
|
8
|
+
colLG,
|
|
9
|
+
colXSOffset,
|
|
10
|
+
colSMOffset,
|
|
11
|
+
colMDOffset,
|
|
12
|
+
colLGOffset
|
|
13
|
+
} = layoutPos;
|
|
14
|
+
const _span = colXS || colSM || colMD || colLG;
|
|
15
|
+
const _offset = colXSOffset || colSMOffset || colMDOffset || colLGOffset;
|
|
16
|
+
const spanDefault = layout === "TABLE_24COL" ? 24 : 12;
|
|
17
|
+
const span = !_span || _span === -1 ? 1 : _span / spanDefault;
|
|
18
|
+
const offset = !_offset || _offset === -1 ? 0 : _offset / spanDefault;
|
|
19
|
+
return { span, offset };
|
|
20
|
+
}
|
|
21
|
+
function calculateXYPositions(items, parentPos) {
|
|
22
|
+
let currentRowWidth = 0;
|
|
23
|
+
let currentY = 0;
|
|
24
|
+
let currentRowHeight = 0;
|
|
25
|
+
items.forEach((item) => {
|
|
26
|
+
if (currentRowWidth + item.x + item.w > parentPos.w) {
|
|
27
|
+
currentY += currentRowHeight;
|
|
28
|
+
currentRowWidth = 0;
|
|
29
|
+
currentRowHeight = 0;
|
|
30
|
+
}
|
|
31
|
+
item.x = currentRowWidth + item.x;
|
|
32
|
+
item.y = currentY;
|
|
33
|
+
currentRowWidth += item.x + item.w - currentRowWidth;
|
|
34
|
+
currentRowHeight = Math.max(currentRowHeight, item.h);
|
|
35
|
+
});
|
|
36
|
+
items.forEach((item) => {
|
|
37
|
+
item.x += parentPos.x;
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
function calculatePositions(items, parentPos) {
|
|
41
|
+
const { dir, align, valign } = parentPos.layout;
|
|
42
|
+
const flexLayoutPos = [];
|
|
43
|
+
const models = (dir == null ? void 0 : dir.includes("reverse")) ? items.toReversed() : items;
|
|
44
|
+
if (dir == null ? void 0 : dir.includes("row")) {
|
|
45
|
+
const W = parseFloat((parentPos.w / models.length).toFixed(1));
|
|
46
|
+
let widthSum = 0;
|
|
47
|
+
let growCount = 0;
|
|
48
|
+
let shrinkCont = 0;
|
|
49
|
+
models.forEach((model) => {
|
|
50
|
+
const { grow, width } = model.layoutPos;
|
|
51
|
+
if (grow || !width) {
|
|
52
|
+
growCount++;
|
|
53
|
+
} else {
|
|
54
|
+
shrinkCont++;
|
|
55
|
+
widthSum += parseFloat((width / 100).toFixed(1));
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
const fixedWidthSum = widthSum > W * shrinkCont ? W * shrinkCont : widthSum;
|
|
59
|
+
const remainingWidth = parentPos.w - fixedWidthSum;
|
|
60
|
+
const growWidth = growCount > 0 ? remainingWidth / growCount : 0;
|
|
61
|
+
models.forEach((model) => {
|
|
62
|
+
const { grow, width } = model.layoutPos;
|
|
63
|
+
flexLayoutPos.push({
|
|
64
|
+
x: 0,
|
|
65
|
+
model,
|
|
66
|
+
w: grow || !width ? growWidth : parseFloat((width / 100).toFixed(1))
|
|
67
|
+
});
|
|
68
|
+
});
|
|
69
|
+
const flexW = flexLayoutPos.reduce((sum, element) => sum + element.w, 0);
|
|
70
|
+
const poorW = parentPos.w - flexW;
|
|
71
|
+
switch (align) {
|
|
72
|
+
case "flex-start":
|
|
73
|
+
if (dir === "row-reverse") {
|
|
74
|
+
flexLayoutPos[0].x = poorW;
|
|
75
|
+
}
|
|
76
|
+
break;
|
|
77
|
+
case "flex-end":
|
|
78
|
+
if (dir === "row") {
|
|
79
|
+
flexLayoutPos[0].x = poorW;
|
|
80
|
+
}
|
|
81
|
+
break;
|
|
82
|
+
case "center":
|
|
83
|
+
if (poorW) {
|
|
84
|
+
flexLayoutPos[0].x = poorW / 2;
|
|
85
|
+
}
|
|
86
|
+
break;
|
|
87
|
+
case "space-between":
|
|
88
|
+
if (poorW && flexLayoutPos.length > 1) {
|
|
89
|
+
const x = poorW / (flexLayoutPos.length - 1);
|
|
90
|
+
flexLayoutPos.forEach((f, index) => {
|
|
91
|
+
if (index !== 0) {
|
|
92
|
+
f.x = x;
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
break;
|
|
97
|
+
case "space-around":
|
|
98
|
+
if (poorW) {
|
|
99
|
+
const x = poorW / (flexLayoutPos.length * 2);
|
|
100
|
+
flexLayoutPos.forEach((f, index) => {
|
|
101
|
+
if (index === 0) {
|
|
102
|
+
f.x = x;
|
|
103
|
+
} else {
|
|
104
|
+
f.x = x * 2;
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
break;
|
|
109
|
+
default:
|
|
110
|
+
break;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
if (dir == null ? void 0 : dir.includes("column")) {
|
|
114
|
+
models.forEach((model) => {
|
|
115
|
+
const { width } = model.layoutPos;
|
|
116
|
+
let x = 0;
|
|
117
|
+
let w = parentPos.w;
|
|
118
|
+
if (width) {
|
|
119
|
+
w = width / 100 > 1 && width / 100 < parentPos.w ? width / 100 : parentPos.w;
|
|
120
|
+
}
|
|
121
|
+
const poorW = parentPos.w - w;
|
|
122
|
+
switch (valign) {
|
|
123
|
+
case "flex-end":
|
|
124
|
+
x = poorW;
|
|
125
|
+
break;
|
|
126
|
+
case "center":
|
|
127
|
+
if (poorW) {
|
|
128
|
+
x = (parentPos.w - w) / 2;
|
|
129
|
+
}
|
|
130
|
+
break;
|
|
131
|
+
default:
|
|
132
|
+
break;
|
|
133
|
+
}
|
|
134
|
+
flexLayoutPos.push({
|
|
135
|
+
x,
|
|
136
|
+
w,
|
|
137
|
+
model
|
|
138
|
+
});
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
return flexLayoutPos;
|
|
142
|
+
}
|
|
143
|
+
function loadDefaultLayoutModel(dashboard, customDashboard) {
|
|
144
|
+
var _a;
|
|
145
|
+
const { layoutRowH, layoutColNum } = customDashboard;
|
|
146
|
+
const app = ibiz.hub.getApp(ibiz.env.appId);
|
|
147
|
+
const recursivePortlePart = (container, parentPos) => {
|
|
148
|
+
const { controls, layout } = container;
|
|
149
|
+
const children = (controls == null ? void 0 : controls.filter((child) => !!child.layoutPos)) || [];
|
|
150
|
+
const portletLayoutPos = [];
|
|
151
|
+
const childrenLayoutPos = [];
|
|
152
|
+
if ((layout == null ? void 0 : layout.layout) === "TABLE_24COL" || (layout == null ? void 0 : layout.layout) === "TABLE_12COL") {
|
|
153
|
+
children.forEach((model) => {
|
|
154
|
+
var _a2;
|
|
155
|
+
const { height } = model.layoutPos;
|
|
156
|
+
const { span, offset } = calcGridSpanOffset(model.layoutPos);
|
|
157
|
+
const w = span * parentPos.w;
|
|
158
|
+
const x = offset * parentPos.w;
|
|
159
|
+
let h = height ? height / layoutRowH : 3;
|
|
160
|
+
if (model.portletType === "CONTAINER" && ((_a2 = model.controls) == null ? void 0 : _a2.length)) {
|
|
161
|
+
const _childrenLayoutPos = recursivePortlePart(model, { w, x });
|
|
162
|
+
h = _childrenLayoutPos.reduce((max, current) => {
|
|
163
|
+
return Math.max(max, current.y + current.h);
|
|
164
|
+
}, -Infinity);
|
|
165
|
+
childrenLayoutPos.push(..._childrenLayoutPos);
|
|
166
|
+
}
|
|
167
|
+
portletLayoutPos.push({
|
|
168
|
+
w,
|
|
169
|
+
x,
|
|
170
|
+
h,
|
|
171
|
+
y: 0,
|
|
172
|
+
model,
|
|
173
|
+
parentId: container.codeName
|
|
174
|
+
});
|
|
175
|
+
});
|
|
176
|
+
} else if ((layout == null ? void 0 : layout.layout) === "FLEX") {
|
|
177
|
+
const flexLayoutPos = calculatePositions(children, {
|
|
178
|
+
...parentPos,
|
|
179
|
+
layout
|
|
180
|
+
});
|
|
181
|
+
flexLayoutPos.forEach((pos) => {
|
|
182
|
+
var _a2;
|
|
183
|
+
const { x, w, model } = pos;
|
|
184
|
+
const { height } = model.layoutPos;
|
|
185
|
+
let h = height ? height / layoutRowH : 3;
|
|
186
|
+
if (model.portletType === "CONTAINER" && ((_a2 = model.controls) == null ? void 0 : _a2.length)) {
|
|
187
|
+
const _childrenLayoutPos = recursivePortlePart(model, { w, x });
|
|
188
|
+
h = _childrenLayoutPos.reduce((max, current) => {
|
|
189
|
+
return Math.max(max, current.y + current.h);
|
|
190
|
+
}, -Infinity);
|
|
191
|
+
childrenLayoutPos.push(..._childrenLayoutPos);
|
|
192
|
+
}
|
|
193
|
+
portletLayoutPos.push({
|
|
194
|
+
w,
|
|
195
|
+
x,
|
|
196
|
+
h,
|
|
197
|
+
y: 0,
|
|
198
|
+
model,
|
|
199
|
+
parentId: container.codeName
|
|
200
|
+
});
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
calculateXYPositions(portletLayoutPos, parentPos);
|
|
204
|
+
portletLayoutPos.forEach((layoutPos) => {
|
|
205
|
+
if (layoutPos.model.portletType === "CONTAINER") {
|
|
206
|
+
const _children = childrenLayoutPos.filter(
|
|
207
|
+
(child) => child.parentId === layoutPos.model.codeName
|
|
208
|
+
);
|
|
209
|
+
_children.forEach((child) => {
|
|
210
|
+
child.x += layoutPos.x;
|
|
211
|
+
child.y += layoutPos.y;
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
});
|
|
215
|
+
const modelLayoutPos = portletLayoutPos.filter(
|
|
216
|
+
(layoutPos) => !["CONTAINER", "RAWITEM"].includes(layoutPos.model.portletType)
|
|
217
|
+
);
|
|
218
|
+
modelLayoutPos.push(...childrenLayoutPos);
|
|
219
|
+
return modelLayoutPos;
|
|
220
|
+
};
|
|
221
|
+
const layoutModel = [];
|
|
222
|
+
if ((_a = dashboard.model.controls) == null ? void 0 : _a.length) {
|
|
223
|
+
const modelLayoutPos = recursivePortlePart(dashboard.model, {
|
|
224
|
+
x: 0,
|
|
225
|
+
w: layoutColNum
|
|
226
|
+
});
|
|
227
|
+
modelLayoutPos.forEach((layout) => {
|
|
228
|
+
const { x, y, w, h, model } = layout;
|
|
229
|
+
layoutModel.push({
|
|
230
|
+
x,
|
|
231
|
+
y,
|
|
232
|
+
w,
|
|
233
|
+
h,
|
|
234
|
+
i: model.codeName,
|
|
235
|
+
appName: app.model.name,
|
|
236
|
+
portletName: model.title,
|
|
237
|
+
portletImage: model.sysImage,
|
|
238
|
+
portletCodeName: model.codeName,
|
|
239
|
+
appCodeName: model.appDataEntityId || app.model.pkgcodeName
|
|
240
|
+
});
|
|
241
|
+
});
|
|
242
|
+
}
|
|
243
|
+
return layoutModel;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
export { loadDefaultLayoutModel };
|
|
@@ -85,7 +85,7 @@ const PortletLayout = /* @__PURE__ */ defineComponent({
|
|
|
85
85
|
"title": showTitle(state.title)
|
|
86
86
|
}, [state.title])])]), createVNode("div", {
|
|
87
87
|
"class": this.ns.be("header", "right")
|
|
88
|
-
}, [model.uiactionGroup && createVNode(resolveComponent("iBizActionToolbar"), {
|
|
88
|
+
}, [model.portletType !== "ACTIONBAR" && model.uiactionGroup && createVNode(resolveComponent("iBizActionToolbar"), {
|
|
89
89
|
"class": this.ns.e("toolbar"),
|
|
90
90
|
"action-details": model.uiactionGroup.uiactionGroupDetails,
|
|
91
91
|
"actions-state": state.actionGroupState,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.ibiz-control-dataview{--ibiz-control-dataview-text-color:var(--ibiz-color-text-0);--ibiz-control-dataview-hover-bg-color:var(--ibiz-color-fill-1);--ibiz-control-dataview-active-bg-color:var(--ibiz-color-fill-2);--ibiz-control-dataview-padding:var(--ibiz-spacing-tight) var(--ibiz-spacing-base) 0;--ibiz-control-dataview-page-height:50px;display:flex;flex-flow:column nowrap;align-items:stretch;justify-content:flex-start;position:relative;height:100%}.ibiz-control-dataview__nav-icon{
|
|
1
|
+
.ibiz-control-dataview{--ibiz-control-dataview-text-color:var(--ibiz-color-text-0);--ibiz-control-dataview-hover-bg-color:var(--ibiz-color-fill-1);--ibiz-control-dataview-active-bg-color:var(--ibiz-color-fill-2);--ibiz-control-dataview-padding:var(--ibiz-spacing-tight) var(--ibiz-spacing-base) 0;--ibiz-control-dataview-page-height:50px;--ibiz-control-dataview-item-bg-color:transparent;display:flex;flex-flow:column nowrap;align-items:stretch;justify-content:flex-start;position:relative;height:100%}.ibiz-control-dataview__nav-icon{position:absolute;top:20px;right:10px;color:var(--ibiz-color-primary);cursor:pointer}.ibiz-control-dataview__content{flex-grow:1;height:100%}.ibiz-control-dataview__pagination{flex-shrink:0}.ibiz-control-dataview__load-more{width:calc(100% - var(--ibiz-spacing-base-tight));text-align:center}.ibiz-control-dataview__load-more i{font-size:var(--ibiz-font-size-header-3);color:var(--ibiz-color-text-2);cursor:pointer}.ibiz-control-dataview__load-more i:hover{color:var(--ibiz-color-primary-light-hover)}.ibiz-control-dataview__collapse-expand-icon{width:calc(100% - var(--ibiz-spacing-base-tight));text-align:center}.ibiz-control-dataview__collapse-expand-icon i{font-size:var(--ibiz-font-size-header-3);color:var(--ibiz-color-text-2);cursor:pointer}.ibiz-control-dataview__collapse-expand-icon i:hover{color:var(--ibiz-color-primary-light-hover)}.ibiz-control-dataview-scroll{display:flex;flex-wrap:wrap;align-content:flex-start;padding:var(--ibiz-control-dataview-padding);overflow:auto}.ibiz-control-dataview-scroll>*{margin:calc(var(--ibiz-spacing-base-tight)/ 2)}.ibiz-control-dataview-item-col{padding:0 var(--ibiz-spacing-base-tight) var(--ibiz-spacing-base-tight) 0}.ibiz-control-dataview-item{--ibiz-control-dataview-text-color:var(--ibiz-color-text-0);--ibiz-control-dataview-hover-bg-color:var(--ibiz-color-fill-1);--ibiz-control-dataview-active-bg-color:var(--ibiz-color-fill-2);--ibiz-control-dataview-padding:var(--ibiz-spacing-tight) var(--ibiz-spacing-base) 0;--ibiz-control-dataview-page-height:50px;--ibiz-control-dataview-item-bg-color:transparent;color:var(--ibiz-control-dataview-text-color);cursor:pointer;background-color:var(--ibiz-control-dataview-item-bg-color)}.ibiz-control-dataview-item:hover{background-color:var(--ibiz-control-dataview-hover-bg-color)}.ibiz-control-dataview-item.is-active{background-color:var(--ibiz-control-dataview-active-bg-color)}.ibiz-control-dataview-item-content{--ibiz-control-dataview-text-color:var(--ibiz-color-text-0);--ibiz-control-dataview-hover-bg-color:var(--ibiz-color-fill-1);--ibiz-control-dataview-active-bg-color:var(--ibiz-color-fill-2);--ibiz-control-dataview-padding:var(--ibiz-spacing-tight) var(--ibiz-spacing-base) 0;--ibiz-control-dataview-page-height:50px;--ibiz-control-dataview-item-bg-color:transparent}.ibiz-control-dataview-item-content__top--title{text-align:center}.ibiz-control-dataview-item-content__top--description{min-width:150px;text-align:justify;text-justify:newspaper;word-break:break-all}.ibiz-control-dataview-item-content__bottom--actions{display:flex;justify-content:center}.ibiz-control-dataview-group-content{--ibiz-control-dataview-group-item-header-bg-color:transparent;--ibiz-control-dataview-group-item-header-padding:var(--ibiz-spacing-base-tight);--ibiz-control-dataview-group-item-header-border-color:var(--ibiz-color-border);--ibiz-control-dataview-group-item-caption-text-color:var(--ibiz-color-text-0);--ibiz-control-dataview-group-item-caption-font-size:var(--ibiz-font-size-header-5);--ibiz-control-dataview-group-item-caption-font-weight:var(--ibiz-font-weight-bold);--ibiz-control-dataview-group-item-content-bg-color:transparent;--ibiz-control-dataview-group-item-content-padding:var(--ibiz-spacing-tight);width:100%}.ibiz-control-dataview-group-content__item .el-collapse-item__content{display:flex;flex-wrap:wrap}.ibiz-control-dataview-group-content__item--empty{width:100%;text-align:center}.ibiz-control-dataview-group-content__item.is-collapse .ibiz-control-dataview-group-content__item-content{height:0;overflow:hidden}.ibiz-control-dataview-group-content__item-header{display:flex;align-items:center;justify-content:space-between;width:100%;padding:var(--ibiz-control-dataview-group-item-header-padding);border-bottom:1px solid var(--ibiz-control-dataview-group-item-header-border-color)}.ibiz-control-dataview-group-content__item-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--ibiz-control-dataview-group-item-caption-font-size);font-weight:var(--ibiz-control-dataview-group-item-caption-font-weight);color:var(--ibiz-control-dataview-group-item-caption-text-color)}.ibiz-control-dataview-group-content__item-content{display:flex;flex-wrap:wrap;padding:var(--ibiz-control-dataview-group-item-content-padding);background-color:var(--ibiz-control-dataview-group-item-content-bg-color);will-change:height}.ibiz-control-dataview-group-content__item-content>*{margin:calc(var(--ibiz-spacing-base-tight)/ 2)}.ibiz-control-dataview-group-content__item-row{padding:var(--ibiz-control-dataview-group-item-content-padding)}.ibiz-control-dataview-group-content__item-col{padding:0 var(--ibiz-spacing-base-tight) var(--ibiz-spacing-base-tight) 0}
|
|
@@ -179,10 +179,17 @@ const DataViewControl = /* @__PURE__ */ defineComponent({
|
|
|
179
179
|
height: "".concat(c.model.cardHeight, "px")
|
|
180
180
|
});
|
|
181
181
|
}
|
|
182
|
+
const itemStyle = ns.cssVarBlock({
|
|
183
|
+
"item-bg-color": "".concat(item.bgcolor || ""),
|
|
184
|
+
"text-color": "".concat(item.fontcolor || ""),
|
|
185
|
+
"hover-bg-color": "".concat(item.hovercolor || ""),
|
|
186
|
+
"active-bg-color": "".concat(item.activecolor || "")
|
|
187
|
+
});
|
|
182
188
|
const panel = props.modelData.itemLayoutPanel;
|
|
183
189
|
return createVNode(resolveComponent("el-card"), {
|
|
184
190
|
"shadow": "hover",
|
|
185
191
|
"class": cardClass,
|
|
192
|
+
"style": itemStyle,
|
|
186
193
|
"body-style": cardStyle,
|
|
187
194
|
"onClick": (event) => onRowClick(item, event),
|
|
188
195
|
"onDblclick": (event) => onDbRowClick(item, event)
|
|
@@ -353,7 +360,7 @@ const DataViewControl = /* @__PURE__ */ defineComponent({
|
|
|
353
360
|
"class": ns.e("content"),
|
|
354
361
|
"text": c.model.emptyText,
|
|
355
362
|
"emptyTextLanguageRes": c.model.emptyTextLanguageRes,
|
|
356
|
-
"
|
|
363
|
+
"hideNoDataImage": c.state.hideNoDataImage
|
|
357
364
|
}, null);
|
|
358
365
|
};
|
|
359
366
|
const renderCollapseExpandIcon = () => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ref, watch, watchEffect, onUnmounted } from 'vue';
|
|
2
|
-
import { defaultNamespace } from '../../node_modules/.pnpm/@ibiz-template_core@0.7.38-alpha.
|
|
2
|
+
import { defaultNamespace } from '../../node_modules/.pnpm/@ibiz-template_core@0.7.38-alpha.43_axios@1.7.7_lodash-es@4.17.21_qs@6.13.0_qx-util@0.4.8_ramda@0.29.1/node_modules/@ibiz-template/core/out/utils/namespace/namespace.mjs';
|
|
3
3
|
|
|
4
4
|
"use strict";
|
|
5
5
|
function useAppDRTab(c, controlRef, counterData) {
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { IDEFormItem } from '@ibiz/model-core';
|
|
3
|
+
import { FormItemController } from '@ibiz-template/runtime';
|
|
4
|
+
export declare const CompositeFormItem: import("vue").DefineComponent<{
|
|
5
|
+
modelData: {
|
|
6
|
+
type: PropType<IDEFormItem>;
|
|
7
|
+
required: true;
|
|
8
|
+
};
|
|
9
|
+
controller: {
|
|
10
|
+
type: typeof FormItemController;
|
|
11
|
+
required: true;
|
|
12
|
+
};
|
|
13
|
+
attrs: {
|
|
14
|
+
type: PropType<IData>;
|
|
15
|
+
required: false;
|
|
16
|
+
};
|
|
17
|
+
}, {
|
|
18
|
+
c: FormItemController;
|
|
19
|
+
extraParams: import("vue").Ref<{}>;
|
|
20
|
+
onValueChange: (val: unknown, name?: string) => void;
|
|
21
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
22
|
+
modelData: {
|
|
23
|
+
type: PropType<IDEFormItem>;
|
|
24
|
+
required: true;
|
|
25
|
+
};
|
|
26
|
+
controller: {
|
|
27
|
+
type: typeof FormItemController;
|
|
28
|
+
required: true;
|
|
29
|
+
};
|
|
30
|
+
attrs: {
|
|
31
|
+
type: PropType<IData>;
|
|
32
|
+
required: false;
|
|
33
|
+
};
|
|
34
|
+
}>>, {}, {}>;
|
|
35
|
+
export default CompositeFormItem;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { defineComponent, ref, resolveComponent, h, createVNode } from 'vue';
|
|
2
|
+
import { FormItemController } from '@ibiz-template/runtime';
|
|
3
|
+
|
|
4
|
+
"use strict";
|
|
5
|
+
const CompositeFormItem = /* @__PURE__ */ defineComponent({
|
|
6
|
+
name: "IBizCompositeFormItem",
|
|
7
|
+
props: {
|
|
8
|
+
modelData: {
|
|
9
|
+
type: Object,
|
|
10
|
+
required: true
|
|
11
|
+
},
|
|
12
|
+
controller: {
|
|
13
|
+
type: FormItemController,
|
|
14
|
+
required: true
|
|
15
|
+
},
|
|
16
|
+
attrs: {
|
|
17
|
+
type: Object,
|
|
18
|
+
required: false
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
setup(props) {
|
|
22
|
+
var _a, _b, _c, _d;
|
|
23
|
+
const c = props.controller;
|
|
24
|
+
const onValueChange = (val, name) => {
|
|
25
|
+
props.controller.setDataValue(val, name);
|
|
26
|
+
};
|
|
27
|
+
const extraParams = ref({});
|
|
28
|
+
let emptyHiddenUnit = ibiz.config.form.emptyHiddenUnit;
|
|
29
|
+
const emptyhiddenunit = (_b = (_a = props.controller.form) == null ? void 0 : _a.controlParams) == null ? void 0 : _b.emptyhiddenunit;
|
|
30
|
+
if (emptyhiddenunit) {
|
|
31
|
+
emptyHiddenUnit = Object.is(emptyhiddenunit, "true");
|
|
32
|
+
}
|
|
33
|
+
const editorParams = ((_d = (_c = props.controller.editor) == null ? void 0 : _c.model) == null ? void 0 : _d.editorParams) || {};
|
|
34
|
+
const {
|
|
35
|
+
EMPTYHIDDENUNIT
|
|
36
|
+
} = editorParams;
|
|
37
|
+
if (EMPTYHIDDENUNIT) {
|
|
38
|
+
emptyHiddenUnit = Object.is(EMPTYHIDDENUNIT, "true");
|
|
39
|
+
}
|
|
40
|
+
Object.assign(extraParams.value, {
|
|
41
|
+
emptyHiddenUnit
|
|
42
|
+
});
|
|
43
|
+
return {
|
|
44
|
+
c,
|
|
45
|
+
extraParams,
|
|
46
|
+
onValueChange
|
|
47
|
+
};
|
|
48
|
+
},
|
|
49
|
+
render() {
|
|
50
|
+
var _a, _b, _c, _d, _e;
|
|
51
|
+
if (!this.c.state.visible || ((_a = this.controller.model.editor) == null ? void 0 : _a.editorType) === "HIDDEN") {
|
|
52
|
+
return null;
|
|
53
|
+
}
|
|
54
|
+
let editor = null;
|
|
55
|
+
const editMode = (_d = (_c = (_b = this.controller.editor) == null ? void 0 : _b.model) == null ? void 0 : _c.editorParams) == null ? void 0 : _d.editMode;
|
|
56
|
+
const editorProps = {
|
|
57
|
+
style: (_e = this.controller.editor) == null ? void 0 : _e.style,
|
|
58
|
+
value: this.controller.value,
|
|
59
|
+
data: this.controller.data,
|
|
60
|
+
controller: this.controller.editor,
|
|
61
|
+
disabled: this.controller.state.disabled,
|
|
62
|
+
readonly: this.controller.state.readonly,
|
|
63
|
+
onChange: this.onValueChange,
|
|
64
|
+
extraParams: this.extraParams,
|
|
65
|
+
controlParams: editMode ? {
|
|
66
|
+
...this.controller.form.controlParams,
|
|
67
|
+
editmode: editMode
|
|
68
|
+
} : this.controller.form.controlParams,
|
|
69
|
+
onFocus: (event) => this.c.onFocus(event),
|
|
70
|
+
onBlur: (event) => this.c.onBlur(event),
|
|
71
|
+
onEnter: (event) => this.controller.onEnter(event),
|
|
72
|
+
onClick: (event, params) => this.controller.onClick(event, params),
|
|
73
|
+
...this.attrs
|
|
74
|
+
};
|
|
75
|
+
if (this.c.form.state.isLoaded) {
|
|
76
|
+
if (this.$slots.default) {
|
|
77
|
+
editor = this.$slots.default(editorProps);
|
|
78
|
+
} else if (this.controller.editorProvider) {
|
|
79
|
+
const component = resolveComponent(this.controller.editorProvider.formEditor);
|
|
80
|
+
editor = h(component, {
|
|
81
|
+
...editorProps
|
|
82
|
+
});
|
|
83
|
+
} else {
|
|
84
|
+
editor = createVNode(resolveComponent("not-supported-editor"), {
|
|
85
|
+
"modelData": this.modelData.editor
|
|
86
|
+
}, null);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
return editor;
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
export { CompositeFormItem, CompositeFormItem as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.ibiz-form-item{border-color:var(--ibiz-color-border);--ibiz-form-item-label-color:var(--ibiz-color-text-1);--ibiz-form-item-text-color:var(--ibiz-color-text-2);--ibiz-form-item-hover-color:var(--ibiz-color-text-0);--ibiz-form-item-hover-bg-color:var(--ibiz-color-fill-1);--ibiz-form-item-readonly-color:var(--ibiz-color-disabled-text);--ibiz-form-item-border-color:transparent;--ibiz-form-item-font-size:var(--ibiz-font-size-regular);--ibiz-form-item-placeholder-color:var(--ibiz-color-text-3);--ibiz-form-item-disabled-color:var(--ibiz-color-disabled-text);--ibiz-form-item-disabled-bg-color:var(--ibiz-color-disabled-fill);--ibiz-form-item-disabled-border-color:var(--ibiz-color-disabled-border);--ibiz-form-item-active-bg:var(--ibiz-color-fill-2);--ibiz-form-item-active-border:var(--ibiz-active-bg);--ibiz-form-item-focus-bg:var(--ibiz-color-fill-0);--ibiz-form-item-focus-border:var(--ibiz-color-focus-border);--ibiz-form-item-line-height:var(--ibiz-editor-default-line-height);--ibiz-form-item-font-weight:var(--ibiz-font-weight-regular);--ibiz-form-item-hover-edit-padding:var(--ibiz-spacing-none) 11px}
|
|
1
|
+
.ibiz-form-item{border-color:var(--ibiz-color-border);--ibiz-form-item-label-color:var(--ibiz-color-text-1);--ibiz-form-item-text-color:var(--ibiz-color-text-2);--ibiz-form-item-hover-color:var(--ibiz-color-text-0);--ibiz-form-item-hover-bg-color:var(--ibiz-color-fill-1);--ibiz-form-item-readonly-color:var(--ibiz-color-disabled-text);--ibiz-form-item-border-color:transparent;--ibiz-form-item-font-size:var(--ibiz-font-size-regular);--ibiz-form-item-placeholder-color:var(--ibiz-color-text-3);--ibiz-form-item-disabled-color:var(--ibiz-color-disabled-text);--ibiz-form-item-disabled-bg-color:var(--ibiz-color-disabled-fill);--ibiz-form-item-disabled-border-color:var(--ibiz-color-disabled-border);--ibiz-form-item-active-bg:var(--ibiz-color-fill-2);--ibiz-form-item-active-border:var(--ibiz-active-bg);--ibiz-form-item-focus-bg:var(--ibiz-color-fill-0);--ibiz-form-item-focus-border:var(--ibiz-color-focus-border);--ibiz-form-item-line-height:var(--ibiz-editor-default-line-height);--ibiz-form-item-font-weight:var(--ibiz-font-weight-regular);--ibiz-form-item-hover-edit-padding:var(--ibiz-spacing-none) 11px}.ibiz-form-item.is-compositeItem{--ibiz-form-item-compositeItem-gap:var(--ibiz-spacing-tight)}.ibiz-form-item.is-compositeItem .ibiz-form-item-container__editor{display:flex;gap:var(--ibiz-form-item-compositeItem-gap)}
|