@kengic/vue 0.26.6-beta.134 → 0.26.6-beta.135
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/card-text-outline.6e053122.mjs +8 -0
- package/dist/kengic-vue.js +44 -37
- package/dist/src/component/KgAppSelect/index.hooks.d.ts +11 -11
- package/dist/src/component/KgAppSelect/index.store.d.ts +11 -11
- package/dist/src/component/KgSearch/KgSearch.service.d.ts +1 -1
- package/dist/src/component/KgSubmit/KgSubmit.service.d.ts +1 -1
- package/package.json +1 -1
package/dist/kengic-vue.js
CHANGED
@@ -49529,7 +49529,7 @@ function pi(e) {
|
|
49529
49529
|
})
|
49530
49530
|
);
|
49531
49531
|
}
|
49532
|
-
const version = "0.26.6-beta.
|
49532
|
+
const version = "0.26.6-beta.135", en$1 = {
|
49533
49533
|
kg: {
|
49534
49534
|
KgAppSelect: {
|
49535
49535
|
businessManager: "Business Manager",
|
@@ -54896,6 +54896,7 @@ import("./stop.ea3dde55.mjs").then(({ default: e }) => addIcon("akar-icons:stop"
|
|
54896
54896
|
import("./release-gate-check.8c1ba629.mjs").then(({ default: e }) => addIcon("fluent-mdl2:release-gate-check", e));
|
54897
54897
|
import("./checkbox-indeterminate.e5386a53.mjs").then(({ default: e }) => addIcon("mdi:checkbox-indeterminate", e));
|
54898
54898
|
import("./email-resend-outline.780506de.mjs").then(({ default: e }) => addIcon("mdi:email-resend-outline", e));
|
54899
|
+
import("./card-text-outline.6e053122.mjs").then(({ default: e }) => addIcon("mdi:card-text-outline", e));
|
54899
54900
|
import("./key-return-thin.ce6f074c.mjs").then(({ default: e }) => addIcon("ph:key-return-thin", e));
|
54900
54901
|
Spin.setDefaultIndicator({
|
54901
54902
|
indicator: h$1(LoadingOutlined$1, { spin: !0 })
|
@@ -56624,8 +56625,8 @@ function onEventFactory(e, r, n) {
|
|
56624
56625
|
const useKgAppSelectStore = defineStore("KgAppSelect", {
|
56625
56626
|
state: () => ({
|
56626
56627
|
currentApp: null,
|
56627
|
-
|
56628
|
-
|
56628
|
+
onGotoApp: /* @__PURE__ */ new Map(),
|
56629
|
+
onGotoPath: /* @__PURE__ */ new Map()
|
56629
56630
|
}),
|
56630
56631
|
getters: {
|
56631
56632
|
getCurrentApp() {
|
@@ -56635,44 +56636,44 @@ const useKgAppSelectStore = defineStore("KgAppSelect", {
|
|
56635
56636
|
actions: {
|
56636
56637
|
addEventListener(e, r) {
|
56637
56638
|
switch (e) {
|
56638
|
-
case "
|
56639
|
-
const n = this.
|
56640
|
-
this.
|
56639
|
+
case "onGotoApp": {
|
56640
|
+
const n = this.onGotoApp.get("0");
|
56641
|
+
this.onGotoApp.set("0", [...n != null ? n : [], r]);
|
56641
56642
|
break;
|
56642
56643
|
}
|
56643
|
-
case "
|
56644
|
-
const n = this.
|
56645
|
-
this.
|
56644
|
+
case "onGotoPath": {
|
56645
|
+
const n = this.onGotoPath.get("0");
|
56646
|
+
this.onGotoPath.set("0", [...n != null ? n : [], r]);
|
56646
56647
|
break;
|
56647
56648
|
}
|
56648
56649
|
}
|
56649
56650
|
},
|
56650
56651
|
removeEventListener(e, r) {
|
56651
56652
|
switch (e) {
|
56652
|
-
case "
|
56653
|
+
case "onGotoApp":
|
56653
56654
|
if (r) {
|
56654
|
-
const n = this.
|
56655
|
-
this.
|
56655
|
+
const n = this.onGotoApp.get("0");
|
56656
|
+
this.onGotoApp.set("0", without$1(n, r));
|
56656
56657
|
} else
|
56657
|
-
this.
|
56658
|
+
this.onGotoApp.set("0", []);
|
56658
56659
|
break;
|
56659
|
-
case "
|
56660
|
+
case "onGotoPath":
|
56660
56661
|
if (r) {
|
56661
|
-
const n = this.
|
56662
|
-
this.
|
56662
|
+
const n = this.onGotoPath.get("0");
|
56663
|
+
this.onGotoPath.set("0", without$1(n, r));
|
56663
56664
|
} else
|
56664
|
-
this.
|
56665
|
+
this.onGotoPath.set("0", []);
|
56665
56666
|
break;
|
56666
56667
|
}
|
56667
56668
|
},
|
56668
56669
|
emit(e, r) {
|
56669
56670
|
let n, a = Promise.resolve(!1);
|
56670
56671
|
switch (e) {
|
56671
|
-
case "
|
56672
|
-
n = this.
|
56672
|
+
case "onGotoApp":
|
56673
|
+
n = this.onGotoApp.get("0");
|
56673
56674
|
break;
|
56674
|
-
case "
|
56675
|
-
n = this.
|
56675
|
+
case "onGotoPath":
|
56676
|
+
n = this.onGotoPath.get("0");
|
56676
56677
|
break;
|
56677
56678
|
}
|
56678
56679
|
if (n)
|
@@ -56696,7 +56697,7 @@ const useKgAppSelectStore = defineStore("KgAppSelect", {
|
|
56696
56697
|
const { path: a } = unref(r.router.value.currentRoute);
|
56697
56698
|
if (n !== a)
|
56698
56699
|
try {
|
56699
|
-
await this.emit("
|
56700
|
+
await this.emit("onGotoApp", { app: e }), await r.router.value.push(n);
|
56700
56701
|
} catch {
|
56701
56702
|
Le("KgAppSelect | gotoApp() | \u8FDB\u5165\u6A21\u5757\u5931\u8D25.", { app: e, path: n });
|
56702
56703
|
}
|
@@ -56711,7 +56712,7 @@ const useKgAppSelectStore = defineStore("KgAppSelect", {
|
|
56711
56712
|
if (n !== this.currentApp) {
|
56712
56713
|
this.currentApp = n;
|
56713
56714
|
const a = unref(r.router.value.currentRoute).path;
|
56714
|
-
e !== a && (await this.emit("
|
56715
|
+
e !== a && (await this.emit("onGotoPath", { path: e }), await r.router.value.push(e));
|
56715
56716
|
} else {
|
56716
56717
|
const a = unref(r.router.value.currentRoute).path;
|
56717
56718
|
e !== a && await r.router.value.push(e);
|
@@ -56735,8 +56736,8 @@ function useKgAppSelect() {
|
|
56735
56736
|
const e = useKgAppSelectStore(getPinia());
|
56736
56737
|
return {
|
56737
56738
|
store: e,
|
56738
|
-
onGotoApp: onEventFactory(null, e, "
|
56739
|
-
onGotoPath: onEventFactory(null, e, "
|
56739
|
+
onGotoApp: onEventFactory(null, e, "onGotoApp"),
|
56740
|
+
onGotoPath: onEventFactory(null, e, "onGotoPath"),
|
56740
56741
|
gotoApp: e.gotoApp,
|
56741
56742
|
gotoPath: e.gotoPath,
|
56742
56743
|
isMenuInCurrentApp: e.isMenuInCurrentApp,
|
@@ -64648,8 +64649,8 @@ const screenful = screenfull, getProps$R = () => ({
|
|
64648
64649
|
return ((N = n == null ? void 0 : n.kgCanvasToolbarFullscreen) == null ? void 0 : N.kgIsShowText) !== void 0 ? (x = n == null ? void 0 : n.kgCanvasToolbarFullscreen) == null ? void 0 : x.kgIsShowText : e.kgIsShowText;
|
64649
64650
|
});
|
64650
64651
|
function p() {
|
64651
|
-
var N, x;
|
64652
|
-
screenful.isEnabled && (x = (N = o.value) == null ? void 0 : N.parentElement) != null &&
|
64652
|
+
var N, x, G;
|
64653
|
+
screenful.isEnabled && (G = (x = (N = o.value) == null ? void 0 : N.parentElement) == null ? void 0 : x.parentElement) != null && G.parentElement && screenful.toggle(o.value.parentElement.parentElement.parentElement);
|
64653
64654
|
}
|
64654
64655
|
return () => createVNode(Fragment, null, [createVNode(Button, {
|
64655
64656
|
class: "kg-canvas--toolbar--fullscreen",
|
@@ -64962,8 +64963,8 @@ const screenful = screenfull, getProps$R = () => ({
|
|
64962
64963
|
G();
|
64963
64964
|
});
|
64964
64965
|
}), () => {
|
64965
|
-
var oe;
|
64966
|
-
return createVNode("div", {
|
64966
|
+
var oe, ve;
|
64967
|
+
return createVNode(Fragment, null, [createVNode("div", {
|
64967
64968
|
ref: n,
|
64968
64969
|
id: e.id,
|
64969
64970
|
class: "kg-canvas"
|
@@ -64975,7 +64976,7 @@ const screenful = screenfull, getProps$R = () => ({
|
|
64975
64976
|
}, [(oe = r.toolbarRight) == null ? void 0 : oe.call(r), createVNode(KgCanvasToolbarOverviewScale, null, null), createVNode(KgCanvasToolbarFullscreen, null, null)]), createVNode(KgCanvasContextMenu, {
|
64976
64977
|
kgIsVisible: p.value.kgIsVisible,
|
64977
64978
|
kgMouseEvent: p.value.kgMouseEvent,
|
64978
|
-
"onUpdate:kgIsVisible": (
|
64979
|
+
"onUpdate:kgIsVisible": (Te) => p.value.kgIsVisible = Te,
|
64979
64980
|
kgMenus: p.value.kgMenus,
|
64980
64981
|
kgElement: p.value.kgElement,
|
64981
64982
|
kgElementUi: p.value.kgElementUi,
|
@@ -64986,14 +64987,20 @@ const screenful = screenfull, getProps$R = () => ({
|
|
64986
64987
|
kgElementUi: N.value.kgElementUi
|
64987
64988
|
}, {
|
64988
64989
|
default: () => {
|
64989
|
-
var
|
64990
|
-
return [(
|
64990
|
+
var Te;
|
64991
|
+
return [(Te = r.tooltip) == null ? void 0 : Te.call(r, {
|
64991
64992
|
element: N.value.kgElement,
|
64992
64993
|
event: N.value.kgMouseEvent,
|
64993
64994
|
graph: ne()
|
64994
64995
|
})];
|
64995
64996
|
}
|
64996
|
-
})])
|
64997
|
+
})]), createVNode("div", {
|
64998
|
+
class: "kg-canvas--right"
|
64999
|
+
}, [(ve = r.right) == null ? void 0 : ve.call(r, {
|
65000
|
+
element: N.value.kgElement,
|
65001
|
+
event: N.value.kgMouseEvent,
|
65002
|
+
graph: ne()
|
65003
|
+
})])]);
|
64997
65004
|
};
|
64998
65005
|
}
|
64999
65006
|
}), useKgCanvasStore = defineStore("KgCanvas", {
|
@@ -71145,7 +71152,7 @@ function getRowWidth(e) {
|
|
71145
71152
|
return (Number.isNaN(r) || r < 1) && (r = 1), (FOMR_ITEM_WIDTH + FOMR_ITEM_MARGIN) * r;
|
71146
71153
|
}
|
71147
71154
|
const SUBMIT_DEFAULT_MIN_WIDTH = getKgModalWidth({ span: 1 }), SUBMIT_DEFAULT_WIDTH = getKgModalWidth({ span: 2 }), SUBMIT_DEFAULT_LAYOUT = KG__VAR_SUBMIT_CONFIG__LAYOUT.VERTICAL, SUBMIT_DEFAULT_LABEL_COL_FOR_SPAN = 4, SUBMIT_DEFAULT_LABEL_COL_FOR_PX = 100;
|
71148
|
-
function
|
71155
|
+
function useFormModel$1() {
|
71149
71156
|
const e = inject("$dayjs", dayjs), r = useKgVar(), n = ref({}), a = debounce((o) => {
|
71150
71157
|
if (n.value = {}, !(o != null && o.length)) {
|
71151
71158
|
r.kgSubmit.store.setFormModel(r.formID, n.value);
|
@@ -71339,7 +71346,7 @@ const getProps$C = () => ({
|
|
71339
71346
|
const n = inject("$dayjs", dayjs), a = inject(KG__DI__KG_VAR__KG_SLOTS, null);
|
71340
71347
|
inject(KG__DI__KG_VAR__KG_PROPS, null);
|
71341
71348
|
const o = useKg(), s = useKgVar();
|
71342
|
-
s.kgButton.onSubmitSave(async () => (await ft(), !1)), s.kgButton.onSubmitCancel(async () => (await Mn(), !1)),
|
71349
|
+
s.kgButton.onSubmitSave(async () => (await ft(), !1)), s.kgButton.onSubmitCancel(async () => (await Mn(), !1)), useFormModel$1();
|
71343
71350
|
const g = computed(() => s.isDeleting.value && s.kgSubmit.currentVarSubmitDetailsForKey.value.length === 0 && s.kgSubmit.currentVarSubmitDetailsForNotKey.value.length === 0), p = computed(() => s.kgSubmit.store.isLoading(s.formID)), N = computed(() => s.kgButton.isCurrentButtonRequesting.value || !!s.store.isCreatingRequesting(s.formID) || !!s.store.isUpdatingRequesting(s.formID) || !!s.store.isCopyingRequesting(s.formID) || !!s.store.isDeletingRequesting(s.formID)), x = computed(() => N.value || p.value), G = computed(() => p.value), te = ref(!1), ne = computed(() => {
|
71344
71351
|
var ma;
|
71345
71352
|
return g.value ? SUBMIT_DEFAULT_MIN_WIDTH : (ma = s.kgSubmit.currentVarSubmitConfig.value) == null ? void 0 : ma.min_width;
|
@@ -83752,7 +83759,7 @@ function _useHeight(e) {
|
|
83752
83759
|
minHeight: g
|
83753
83760
|
};
|
83754
83761
|
}
|
83755
|
-
function
|
83762
|
+
function useFormModel(e) {
|
83756
83763
|
const {
|
83757
83764
|
formRef: r,
|
83758
83765
|
kgResizableRef: n
|
@@ -83817,7 +83824,7 @@ const getProps$b = () => ({
|
|
83817
83824
|
isVisible: s
|
83818
83825
|
} = _useCommon(), g = ref(null), p = ref(null), N = ref(null), {
|
83819
83826
|
initFormModel: x
|
83820
|
-
} =
|
83827
|
+
} = useFormModel({
|
83821
83828
|
kgResizableRef: g,
|
83822
83829
|
formRef: N
|
83823
83830
|
}), {
|
@@ -1,9 +1,7 @@
|
|
1
|
-
import { KG_APP, Menu } from '../../const';
|
2
|
-
import { IKgAppSelectGotoAppEventListener, IKgAppSelectGotoPathEventListener, IKgAppSelectStore } from './index.store';
|
3
1
|
import { IRemoveEventListener } from '@kengic/core.core';
|
2
|
+
import { KG_APP, Menu } from '../../const';
|
3
|
+
import { IKgAppSelectOnGotoAppEventListener, IKgAppSelectOnGotoPathEventListener, IKgAppSelectStore } from './index.store';
|
4
4
|
export declare type IUseKgAppSelect = {
|
5
|
-
/** 状态数据. */
|
6
|
-
store: IKgAppSelectStore;
|
7
5
|
/**
|
8
6
|
* 进入某个模块.
|
9
7
|
* @param app 要进入的模块.
|
@@ -15,28 +13,30 @@ export declare type IUseKgAppSelect = {
|
|
15
13
|
* @param path 要进入的地址.
|
16
14
|
*/
|
17
15
|
gotoPath(path: string): Promise<void>;
|
16
|
+
/**
|
17
|
+
* 初始化.
|
18
|
+
* 1. 需要根据当前地址设置当前模块.
|
19
|
+
*/
|
20
|
+
init(): void;
|
18
21
|
/**
|
19
22
|
* 判断某个菜单是否属于当前模块.
|
20
23
|
* @param menu 菜单.
|
21
24
|
* @return {} 如果菜单属于当前模块则返回 true, 否则返回 false.
|
22
25
|
*/
|
23
26
|
isMenuInCurrentApp(menu: Menu): boolean;
|
24
|
-
/**
|
25
|
-
* 初始化.
|
26
|
-
* 1. 需要根据当前地址设置当前模块.
|
27
|
-
*/
|
28
|
-
init(): void;
|
29
27
|
/**
|
30
28
|
* 监听事件: 进入某个模块.
|
31
29
|
* @param listener 事件监听函数.
|
32
30
|
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
33
31
|
*/
|
34
|
-
onGotoApp(listener:
|
32
|
+
onGotoApp(listener: IKgAppSelectOnGotoAppEventListener, isOnce?: boolean): IRemoveEventListener;
|
35
33
|
/**
|
36
34
|
* 监听事件: 进入某个地址.
|
37
35
|
* @param listener 事件监听函数.
|
38
36
|
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
39
37
|
*/
|
40
|
-
onGotoPath(listener:
|
38
|
+
onGotoPath(listener: IKgAppSelectOnGotoPathEventListener, isOnce?: boolean): IRemoveEventListener;
|
39
|
+
/** 状态数据. */
|
40
|
+
store: IKgAppSelectStore;
|
41
41
|
};
|
42
42
|
export declare function useKgAppSelect(): IUseKgAppSelect;
|
@@ -3,27 +3,27 @@ import { StoreDefinition } from 'pinia';
|
|
3
3
|
import { KG_APP, Menu } from '../../const';
|
4
4
|
/**
|
5
5
|
* 事件类型.
|
6
|
-
* '
|
7
|
-
* '
|
6
|
+
* 'onGotoApp': 进入某个模块
|
7
|
+
* 'onGotoPath': 进入某个地址
|
8
8
|
*/
|
9
|
-
export declare type IKgAppSelectEvent = '
|
10
|
-
export declare type
|
9
|
+
export declare type IKgAppSelectEvent = 'onGotoApp' | 'onGotoPath';
|
10
|
+
export declare type IKgAppSelectOnGotoAppEventListenerParameter = {
|
11
11
|
app: string;
|
12
12
|
};
|
13
|
-
export declare type
|
14
|
-
export declare type
|
13
|
+
export declare type IKgAppSelectOnGotoAppEventListener = ((param: IKgAppSelectOnGotoAppEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
14
|
+
export declare type IKgAppSelectOnGotoPathEventListenerParameter = {
|
15
15
|
path: string;
|
16
16
|
};
|
17
|
-
export declare type
|
18
|
-
export declare type IKgAppSelectEventListenerParameter =
|
19
|
-
export declare type IKgAppSelectEventListener =
|
17
|
+
export declare type IKgAppSelectOnGotoPathEventListener = ((param: IKgAppSelectOnGotoPathEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
18
|
+
export declare type IKgAppSelectEventListenerParameter = IKgAppSelectOnGotoAppEventListenerParameter | IKgAppSelectOnGotoPathEventListenerParameter;
|
19
|
+
export declare type IKgAppSelectEventListener = IKgAppSelectOnGotoAppEventListener | IKgAppSelectOnGotoPathEventListener;
|
20
20
|
export interface IUseKgAppSelectStoreState {
|
21
21
|
/**
|
22
22
|
* 当前模块.
|
23
23
|
*/
|
24
24
|
currentApp: KG_APP | null;
|
25
|
-
|
26
|
-
|
25
|
+
onGotoApp: Map<string, Array<IKgAppSelectOnGotoAppEventListener>>;
|
26
|
+
onGotoPath: Map<string, Array<IKgAppSelectOnGotoPathEventListener>>;
|
27
27
|
}
|
28
28
|
export interface IUseKgAppSelectStoreGetters {
|
29
29
|
getCurrentApp(): KG_APP;
|
@@ -24,7 +24,7 @@ export declare function _useHeight(param: {
|
|
24
24
|
maxHeight: import("vue").ComputedRef<number>;
|
25
25
|
minHeight: import("vue").ComputedRef<number>;
|
26
26
|
};
|
27
|
-
export declare function
|
27
|
+
export declare function useFormModel(param: {
|
28
28
|
kgResizableRef: Ref<any | null>;
|
29
29
|
formRef: Ref<FormInstance | null>;
|
30
30
|
}): {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@kengic/vue",
|
3
|
-
"version": "0.26.6-beta.
|
3
|
+
"version": "0.26.6-beta.135",
|
4
4
|
"scripts": {
|
5
5
|
"build": "npm run use-node && rimraf dist && vue-tsc && vite build",
|
6
6
|
"build:dev": "npm run use-node && rimraf dist && vue-tsc && vite build --mode development",
|