@oinone/kunlun-vue-widget 6.4.9 → 7.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/dist/oinone-kunlun-vue-widget.esm.js +1 -16
  2. package/dist/types/index.d.ts +1 -1
  3. package/dist/types/src/basic/AsyncVueWidget.d.ts +7 -7
  4. package/dist/types/src/basic/VueFragment.vue.d.ts +2 -2
  5. package/dist/types/src/basic/VueWidget.d.ts +339 -331
  6. package/dist/types/src/basic/Widget.d.ts +260 -257
  7. package/dist/types/src/basic/index.d.ts +3 -3
  8. package/dist/types/src/data/ActiveRecordsWidget.d.ts +271 -261
  9. package/dist/types/src/data/PathWidget.d.ts +34 -34
  10. package/dist/types/src/data/index.d.ts +2 -2
  11. package/dist/types/src/dsl/DslDefinitionWidget.d.ts +66 -68
  12. package/dist/types/src/dsl/DslNodeWidget.d.ts +42 -42
  13. package/dist/types/src/dsl/DslRenderWidget.d.ts +47 -44
  14. package/dist/types/src/dsl/index.d.ts +3 -3
  15. package/dist/types/src/feature/index.d.ts +1 -1
  16. package/dist/types/src/feature/invisible-supported.d.ts +11 -11
  17. package/dist/types/src/hooks/all-mounted.d.ts +20 -20
  18. package/dist/types/src/hooks/index.d.ts +1 -1
  19. package/dist/types/src/index.d.ts +10 -10
  20. package/dist/types/src/state/context.d.ts +41 -41
  21. package/dist/types/src/state/global.d.ts +3 -4
  22. package/dist/types/src/state/index.d.ts +3 -3
  23. package/dist/types/src/state/method/action.d.ts +18 -18
  24. package/dist/types/src/state/method/field.d.ts +3 -3
  25. package/dist/types/src/state/method/index.d.ts +2 -2
  26. package/dist/types/src/state/typing.d.ts +112 -105
  27. package/dist/types/src/state/use-state.d.ts +15 -16
  28. package/dist/types/src/state/view.d.ts +5 -5
  29. package/dist/types/src/token/index.d.ts +2 -2
  30. package/dist/types/src/typing/WidgetTagContext.d.ts +39 -39
  31. package/dist/types/src/typing/WidgetTagProps.d.ts +23 -23
  32. package/dist/types/src/typing/index.d.ts +3 -3
  33. package/dist/types/src/typing/typing.d.ts +7 -7
  34. package/dist/types/src/util/dsl-render.d.ts +106 -106
  35. package/dist/types/src/util/index.d.ts +4 -4
  36. package/dist/types/src/util/install.d.ts +4 -4
  37. package/dist/types/src/util/render.d.ts +7 -7
  38. package/dist/types/src/util/widget-manager.d.ts +4 -4
  39. package/dist/types/src/view/index.d.ts +161 -161
  40. package/package.json +29 -18
  41. package/src/basic/AsyncVueWidget.ts +2 -2
  42. package/src/basic/VueWidget.ts +67 -31
  43. package/src/basic/Widget.ts +11 -9
  44. package/src/basic/__tests__/Widget.spec.ts +82 -0
  45. package/src/data/ActiveRecordsWidget.ts +51 -21
  46. package/src/data/PathWidget.ts +1 -1
  47. package/src/dsl/DslDefinitionWidget.ts +10 -33
  48. package/src/dsl/DslNodeWidget.ts +3 -3
  49. package/src/dsl/DslRenderWidget.ts +32 -3
  50. package/src/feature/__tests__/invisible-supported.spec.ts +31 -0
  51. package/src/hooks/__tests__/all-mounted.spec.ts +41 -0
  52. package/src/hooks/all-mounted.ts +1 -1
  53. package/src/shim-translate.d.ts +5 -2
  54. package/src/state/__tests__/state.spec.ts +114 -0
  55. package/src/state/context.ts +6 -2
  56. package/src/state/global.ts +16 -5
  57. package/src/state/method/action.ts +7 -2
  58. package/src/state/method/field.ts +1 -1
  59. package/src/state/typing.ts +10 -0
  60. package/src/state/use-state.ts +2 -2
  61. package/src/state/view.ts +3 -3
  62. package/src/token/index.ts +1 -1
  63. package/src/typing/WidgetTagContext.ts +3 -3
  64. package/src/typing/WidgetTagProps.ts +2 -2
  65. package/src/util/__tests__/dsl-render.spec.ts +112 -0
  66. package/src/util/__tests__/render.spec.ts +69 -0
  67. package/src/util/__tests__/widget-manager.spec.ts +27 -0
  68. package/src/util/dsl-render.ts +6 -7
  69. package/src/util/install.ts +1 -1
  70. package/src/util/render.ts +3 -7
  71. package/src/view/index.ts +15 -8
  72. package/rollup.config.js +0 -22
@@ -1,68 +1,66 @@
1
- import { ComputeContext, RuntimeContext, RuntimeModelField } from '@oinone/kunlun-engine';
2
- import { CSSClass, CSSStyle } from '@oinone/kunlun-shared';
3
- import { InvisibleSupported } from '../feature';
4
- import { DslRenderWidget, DslRenderWidgetProps } from './DslRenderWidget';
5
- /**
6
- * dsl组件属性
7
- */
8
- export interface DslDefinitionWidgetProps extends DslRenderWidgetProps {
9
- /**
10
- * 元数据视图handle
11
- */
12
- metadataHandle?: string;
13
- /**
14
- * 根组件handle(一般为视图组件)
15
- */
16
- rootHandle?: string;
17
- /**
18
- * 是否内联组件
19
- */
20
- inline?: boolean;
21
- /**
22
- * 自动渲染组件
23
- */
24
- automatic?: boolean;
25
- }
26
- /**
27
- * dsl定义组件
28
- */
29
- export declare class DslDefinitionWidget<Props extends DslDefinitionWidgetProps = DslDefinitionWidgetProps> extends DslRenderWidget<Props> implements InvisibleSupported {
30
- protected automatic: boolean;
31
- protected metadataHandle: string | undefined;
32
- getMetadataHandle(): string | undefined;
33
- protected get class(): CSSClass | undefined;
34
- protected get style(): CSSStyle | undefined;
35
- protected rootHandle: string | undefined;
36
- getRootHandle(): string | undefined;
37
- protected readonly currentHandle: string;
38
- getCurrentHandle(): string;
39
- protected inline: boolean | undefined;
40
- protected defaultAllInvisible: boolean;
41
- get allInvisible(): boolean | undefined;
42
- private invisibleState;
43
- private lastedInvisibleState;
44
- parentInvisible: boolean | undefined;
45
- get invisible(): boolean;
46
- get parentInvisibleProvider(): boolean;
47
- constructor(handle?: string);
48
- initialize(props: Props): this;
49
- get metadataRuntimeContext(): RuntimeContext;
50
- get metadataRuntimeContextNullable(): RuntimeContext | undefined;
51
- get rootRuntimeContext(): RuntimeContext;
52
- get rootRuntimeContextNullable(): RuntimeContext | undefined;
53
- get rootComputeContext(): ComputeContext | undefined;
54
- get rootViewRuntimeContext(): {
55
- runtimeContext: RuntimeContext;
56
- fields: RuntimeModelField[];
57
- };
58
- protected cacheConfigProxy: any;
59
- protected getMergeConfig(...keys: string[]): Record<string, any>;
60
- protected invisibleProcess(invisible: boolean | string): boolean | undefined;
61
- protected childrenInvisibleProcess(): boolean;
62
- protected resetInvisible(): void;
63
- protected resetParentInvisible(): void;
64
- protected $$mounted(): void;
65
- protected $$updated(): void;
66
- protected $$unmountedAfterProperties(): void;
67
- protected allMounted(): void;
68
- }
1
+ import { type ComputeContext, type RuntimeContext, type RuntimeModelField } from '@oinone/kunlun-engine';
2
+ import { type CSSClass, type CSSStyle } from '@oinone/kunlun-shared';
3
+ import { type InvisibleSupported } from '../feature';
4
+ import { DslRenderWidget, type DslRenderWidgetProps } from './DslRenderWidget';
5
+ /**
6
+ * dsl组件属性
7
+ */
8
+ export interface DslDefinitionWidgetProps extends DslRenderWidgetProps {
9
+ /**
10
+ * 元数据视图handle
11
+ */
12
+ metadataHandle?: string;
13
+ /**
14
+ * 根组件handle(一般为视图组件)
15
+ */
16
+ rootHandle?: string;
17
+ /**
18
+ * 是否内联组件
19
+ */
20
+ inline?: boolean;
21
+ /**
22
+ * 自动渲染组件
23
+ */
24
+ automatic?: boolean;
25
+ }
26
+ /**
27
+ * dsl定义组件
28
+ */
29
+ export declare class DslDefinitionWidget<Props extends DslDefinitionWidgetProps = DslDefinitionWidgetProps> extends DslRenderWidget<Props> implements InvisibleSupported {
30
+ protected automatic: boolean;
31
+ protected metadataHandle: string | undefined;
32
+ getMetadataHandle(): string | undefined;
33
+ protected get class(): CSSClass | undefined;
34
+ protected get style(): CSSStyle | undefined;
35
+ protected rootHandle: string | undefined;
36
+ getRootHandle(): string | undefined;
37
+ protected readonly currentHandle: string;
38
+ getCurrentHandle(): string;
39
+ protected inline: boolean | undefined;
40
+ protected defaultAllInvisible: boolean;
41
+ get allInvisible(): boolean | undefined;
42
+ private invisibleState;
43
+ private lastedInvisibleState;
44
+ parentInvisible: boolean | undefined;
45
+ get invisible(): boolean;
46
+ get parentInvisibleProvider(): boolean;
47
+ constructor(handle?: string);
48
+ initialize(props: Props): this;
49
+ get metadataRuntimeContext(): RuntimeContext;
50
+ get metadataRuntimeContextNullable(): RuntimeContext | undefined;
51
+ get rootRuntimeContext(): RuntimeContext;
52
+ get rootRuntimeContextNullable(): RuntimeContext | undefined;
53
+ get rootComputeContext(): ComputeContext | undefined;
54
+ get rootViewRuntimeContext(): {
55
+ runtimeContext: RuntimeContext;
56
+ fields: RuntimeModelField[];
57
+ };
58
+ protected invisibleProcess(invisible: boolean | string): boolean | undefined;
59
+ protected childrenInvisibleProcess(): boolean;
60
+ protected resetInvisible(): void;
61
+ protected resetParentInvisible(): void;
62
+ protected $$mounted(): void;
63
+ protected $$updated(): void;
64
+ protected $$unmountedAfterProperties(): void;
65
+ protected allMounted(): void;
66
+ }
@@ -1,42 +1,42 @@
1
- import { DslDefinition } from '@oinone/kunlun-dsl';
2
- import { DslProps, RuntimeContext } from '@oinone/kunlun-engine';
3
- import { IDslNode } from '@oinone/kunlun-meta';
4
- import { VueWidget } from '../basic';
5
- /**
6
- * @deprecated 请使用PathWidget或ActiveRecordsWidget
7
- */
8
- export declare class DslNodeWidget<IViewProps extends DslProps = DslProps> extends VueWidget<IViewProps> {
9
- protected metadataHandle: string | undefined;
10
- protected rootHandle: string | undefined;
11
- protected currentHandle: string;
12
- protected dslNode?: IDslNode;
13
- protected template: DslDefinition | undefined;
14
- protected slotName: string | undefined;
15
- /**
16
- * 上级路径
17
- */
18
- protected parentPath: string | undefined;
19
- /**
20
- * 当前子路径
21
- */
22
- protected subPath: string | undefined;
23
- /**
24
- * 当前子路径
25
- */
26
- protected subIndex: string | number | undefined;
27
- /**
28
- * 完整路径
29
- */
30
- protected get widgetPath(): string;
31
- protected widgetInline: boolean | undefined;
32
- protected get variables(): Record<string, unknown>;
33
- initialize(config: IViewProps): this;
34
- getDsl(): IDslNode;
35
- getSlotName(): string | undefined;
36
- /**
37
- * 根据标签名获取dsl
38
- */
39
- getDslChildrenByLabel(labelName: string): IDslNode | null | undefined;
40
- get metadataRuntimeContext(): RuntimeContext | undefined;
41
- get rootRuntimeContext(): RuntimeContext | undefined;
42
- }
1
+ import { type DslDefinition } from '@oinone/kunlun-dsl';
2
+ import { type DslProps, type RuntimeContext } from '@oinone/kunlun-engine';
3
+ import type { IDslNode } from '@oinone/kunlun-meta';
4
+ import { VueWidget } from '../basic';
5
+ /**
6
+ * @deprecated 请使用PathWidget或ActiveRecordsWidget
7
+ */
8
+ export declare class DslNodeWidget<IViewProps extends DslProps = DslProps> extends VueWidget<IViewProps> {
9
+ protected metadataHandle: string | undefined;
10
+ protected rootHandle: string | undefined;
11
+ protected currentHandle: string;
12
+ protected dslNode?: IDslNode;
13
+ protected template: DslDefinition | undefined;
14
+ protected slotName: string | undefined;
15
+ /**
16
+ * 上级路径
17
+ */
18
+ protected parentPath: string | undefined;
19
+ /**
20
+ * 当前子路径
21
+ */
22
+ protected subPath: string | undefined;
23
+ /**
24
+ * 当前子路径
25
+ */
26
+ protected subIndex: string | number | undefined;
27
+ /**
28
+ * 完整路径
29
+ */
30
+ protected get widgetPath(): string;
31
+ protected widgetInline: boolean | undefined;
32
+ protected get variables(): Record<string, unknown>;
33
+ initialize(config: IViewProps): this;
34
+ getDsl(): IDslNode;
35
+ getSlotName(): string | undefined;
36
+ /**
37
+ * 根据标签名获取dsl
38
+ */
39
+ getDslChildrenByLabel(labelName: string): IDslNode | null | undefined;
40
+ get metadataRuntimeContext(): RuntimeContext | undefined;
41
+ get rootRuntimeContext(): RuntimeContext | undefined;
42
+ }
@@ -1,44 +1,47 @@
1
- import { DslDefinition, DslSlots } from '@oinone/kunlun-dsl';
2
- import { WidgetProps } from '@oinone/kunlun-engine';
3
- import { Slots, VNode } from 'vue';
4
- import { VueWidget } from '../basic';
5
- /**
6
- * dsl渲染组件属性
7
- */
8
- export interface DslRenderWidgetProps extends WidgetProps {
9
- /**
10
- * 内部组件
11
- */
12
- internal?: boolean;
13
- /**
14
- * 模板dsl定义
15
- */
16
- template?: DslDefinition;
17
- /**
18
- * 在父组件中的插槽名
19
- */
20
- slotName?: string;
21
- /**
22
- * 支持的插槽名称
23
- */
24
- slotNames?: string[];
25
- /**
26
- * 插槽上下文
27
- */
28
- slotContext?: Record<string, unknown>;
29
- }
30
- export declare class DslRenderWidget<Props extends DslRenderWidgetProps = DslRenderWidgetProps> extends VueWidget {
31
- protected internal: boolean;
32
- protected template: DslDefinition | undefined;
33
- protected slotName: string | undefined;
34
- protected supportedSlotNames: string[];
35
- protected dslSlots: DslSlots | undefined;
36
- protected slots: Slots | null | undefined;
37
- initialize(props: Props): this;
38
- getDsl(): DslDefinition;
39
- getSlotName(): string | undefined;
40
- render(ctx?: Record<string, unknown>, slots?: Slots): VNode | VNode[];
41
- protected rawRender(ctx?: Record<string, unknown>, slots?: Slots): VNode | VNode[];
42
- protected internalRender(slots?: Slots): Slots | undefined;
43
- protected commonRender(slots?: Slots): Slots | undefined;
44
- }
1
+ import { type DslDefinition, type DslSlots } from '@oinone/kunlun-dsl';
2
+ import type { WidgetProps } from '@oinone/kunlun-engine';
3
+ import type { Slots, VNode } from 'vue';
4
+ import { VueWidget } from '../basic';
5
+ /**
6
+ * dsl渲染组件属性
7
+ */
8
+ export interface DslRenderWidgetProps extends WidgetProps {
9
+ /**
10
+ * 内部组件
11
+ */
12
+ internal?: boolean;
13
+ /**
14
+ * 模板dsl定义
15
+ */
16
+ template?: DslDefinition;
17
+ /**
18
+ * 在父组件中的插槽名
19
+ */
20
+ slotName?: string;
21
+ /**
22
+ * 支持的插槽名称
23
+ */
24
+ slotNames?: string[];
25
+ /**
26
+ * 插槽上下文
27
+ */
28
+ slotContext?: Record<string, unknown>;
29
+ }
30
+ export declare class DslRenderWidget<Props extends DslRenderWidgetProps = DslRenderWidgetProps> extends VueWidget {
31
+ protected internal: boolean;
32
+ protected template: DslDefinition | undefined;
33
+ protected slotName: string | undefined;
34
+ protected renderProps: Props | undefined;
35
+ protected supportedSlotNames: string[];
36
+ protected dslSlots: DslSlots | undefined;
37
+ protected slots: Slots | null | undefined;
38
+ initialize(props: Props): this;
39
+ getDsl(): DslDefinition;
40
+ protected cacheConfigProxy: any;
41
+ protected getMergeConfig(...keys: string[]): Record<string, any>;
42
+ getSlotName(): string | undefined;
43
+ render(ctx?: Record<string, unknown>, slots?: Slots): VNode | VNode[];
44
+ protected rawRender(ctx?: Record<string, unknown>, slots?: Slots): VNode | VNode[];
45
+ protected internalRender(slots?: Slots): Slots | undefined;
46
+ protected commonRender(slots?: Slots): Slots | undefined;
47
+ }
@@ -1,3 +1,3 @@
1
- export * from './DslNodeWidget';
2
- export * from './DslDefinitionWidget';
3
- export * from './DslRenderWidget';
1
+ export * from './DslNodeWidget';
2
+ export * from './DslDefinitionWidget';
3
+ export * from './DslRenderWidget';
@@ -1 +1 @@
1
- export * from './invisible-supported';
1
+ export * from './invisible-supported';
@@ -1,11 +1,11 @@
1
- import { Widget } from '../basic';
2
- declare type InvisibleGetter = () => boolean;
3
- /**
4
- * 标记可隐藏功能支持
5
- */
6
- export interface InvisibleSupported {
7
- invisible: boolean | InvisibleGetter | undefined;
8
- }
9
- export declare function executeInvisible(invisibleSupported: InvisibleSupported | undefined): boolean;
10
- export declare function isAllInvisible(widgets: (Widget | InvisibleSupported)[] | undefined): boolean;
11
- export {};
1
+ import { Widget } from '../basic';
2
+ type InvisibleGetter = () => boolean;
3
+ /**
4
+ * 标记可隐藏功能支持
5
+ */
6
+ export interface InvisibleSupported {
7
+ invisible: boolean | InvisibleGetter | undefined;
8
+ }
9
+ export declare function executeInvisible(invisibleSupported: InvisibleSupported | undefined): boolean;
10
+ export declare function isAllInvisible(widgets: (Widget | InvisibleSupported)[] | undefined): boolean;
11
+ export {};
@@ -1,20 +1,20 @@
1
- declare type onAllMountedFn = () => void;
2
- declare type onAllMountedOptions = {
3
- allMounted?: () => void;
4
- allMountedUpdate?: () => void;
5
- };
6
- /**
7
- * 在子组件全部挂载时执行(需配合{@link reportAllMounted}使用)
8
- * @param fn 全部挂载时执行函数; allMounted仅会调用一次,allMountedUpdate会重复调用;
9
- */
10
- export declare function onAllMounted(fn: onAllMountedFn | onAllMountedOptions): void;
11
- /**
12
- * 子组件上报挂载状态,用于执行{@link onAllMounted}传入的全部挂载时执行函数,该方法会防止提供者方法向下透传,如需进行连续处理,应先使用reportAllMounted,再使用onAllMounted方法
13
- * @param options
14
- */
15
- export declare function reportAllMounted(options?: {
16
- onBeforeMount?: () => void | Promise<void>;
17
- onMounted?: () => void | Promise<void>;
18
- onUnmounted?: () => void | Promise<void>;
19
- }): void;
20
- export {};
1
+ type onAllMountedFn = () => void;
2
+ type onAllMountedOptions = {
3
+ allMounted?: () => void;
4
+ allMountedUpdate?: () => void;
5
+ };
6
+ /**
7
+ * 在子组件全部挂载时执行(需配合{@link reportAllMounted}使用)
8
+ * @param fn 全部挂载时执行函数; allMounted仅会调用一次,allMountedUpdate会重复调用;
9
+ */
10
+ export declare function onAllMounted(fn: onAllMountedFn | onAllMountedOptions): void;
11
+ /**
12
+ * 子组件上报挂载状态,用于执行{@link onAllMounted}传入的全部挂载时执行函数,该方法会防止提供者方法向下透传,如需进行连续处理,应先使用reportAllMounted,再使用onAllMounted方法
13
+ * @param options
14
+ */
15
+ export declare function reportAllMounted(options?: {
16
+ onBeforeMount?: () => void | Promise<void>;
17
+ onMounted?: () => void | Promise<void>;
18
+ onUnmounted?: () => void | Promise<void>;
19
+ }): void;
20
+ export {};
@@ -1 +1 @@
1
- export * from './all-mounted';
1
+ export * from './all-mounted';
@@ -1,10 +1,10 @@
1
- export * from './basic';
2
- export * from './data';
3
- export * from './dsl';
4
- export * from './feature';
5
- export * from './hooks';
6
- export * from './state';
7
- export * from './token';
8
- export * from './typing';
9
- export * from './util';
10
- export * from './view';
1
+ export * from './basic';
2
+ export * from './data';
3
+ export * from './dsl';
4
+ export * from './feature';
5
+ export * from './hooks';
6
+ export * from './state';
7
+ export * from './token';
8
+ export * from './typing';
9
+ export * from './util';
10
+ export * from './view';
@@ -1,41 +1,41 @@
1
- import { ViewType } from '@oinone/kunlun-meta';
2
- import { ComputedRef } from 'vue';
3
- /**
4
- * 元数据上下文
5
- */
6
- export interface MetaContext {
7
- viewType: ComputedRef<ViewType>;
8
- model: ComputedRef<string>;
9
- modelName: ComputedRef<string>;
10
- module: ComputedRef<string>;
11
- moduleName: ComputedRef<string>;
12
- metadataHandle: ComputedRef<string>;
13
- rootHandle: ComputedRef<string>;
14
- parentHandle: ComputedRef<string>;
15
- slotName: ComputedRef<string | undefined>;
16
- inline: ComputedRef<boolean>;
17
- }
18
- /**
19
- * 默认元数据上下文
20
- */
21
- export declare const defaultMetaContext: {
22
- viewType: ComputedRef<ViewType>;
23
- model: ComputedRef<string>;
24
- modelName: ComputedRef<string>;
25
- module: ComputedRef<string>;
26
- moduleName: ComputedRef<string>;
27
- metadataHandle: ComputedRef<string>;
28
- rootHandle: ComputedRef<string>;
29
- parentHandle: ComputedRef<string>;
30
- slotName: ComputedRef<undefined>;
31
- inline: ComputedRef<boolean>;
32
- };
33
- /**
34
- * 提供元数据上下文
35
- * @param state 元数据可选项
36
- */
37
- export declare const useProviderMetaContext: (state: Partial<MetaContext>) => void;
38
- /**
39
- * 获取元数据上下文
40
- */
41
- export declare const useInjectMetaContext: () => MetaContext;
1
+ import { ViewType } from '@oinone/kunlun-meta';
2
+ import { type ComputedRef } from 'vue';
3
+ /**
4
+ * 元数据上下文
5
+ */
6
+ export interface MetaContext {
7
+ viewType: ComputedRef<ViewType>;
8
+ model: ComputedRef<string>;
9
+ modelName: ComputedRef<string>;
10
+ module: ComputedRef<string>;
11
+ moduleName: ComputedRef<string>;
12
+ metadataHandle: ComputedRef<string>;
13
+ rootHandle: ComputedRef<string>;
14
+ parentHandle: ComputedRef<string>;
15
+ slotName: ComputedRef<string | undefined>;
16
+ inline: ComputedRef<boolean>;
17
+ }
18
+ /**
19
+ * 默认元数据上下文
20
+ */
21
+ export declare const defaultMetaContext: {
22
+ viewType: ComputedRef<ViewType>;
23
+ model: ComputedRef<string>;
24
+ modelName: ComputedRef<string>;
25
+ module: ComputedRef<string>;
26
+ moduleName: ComputedRef<string>;
27
+ metadataHandle: ComputedRef<string>;
28
+ rootHandle: ComputedRef<string>;
29
+ parentHandle: ComputedRef<string>;
30
+ slotName: ComputedRef<undefined>;
31
+ inline: ComputedRef<boolean>;
32
+ };
33
+ /**
34
+ * 提供元数据上下文
35
+ * @param state 元数据可选项
36
+ */
37
+ export declare const useProviderMetaContext: (state: Partial<MetaContext>) => void;
38
+ /**
39
+ * 获取元数据上下文
40
+ */
41
+ export declare const useInjectMetaContext: () => MetaContext;
@@ -1,4 +1,3 @@
1
- export interface OioGlobalState {
2
- fullscreen: boolean;
3
- }
4
- export declare const globalState: OioGlobalState;
1
+ import { type OioAnyViewState, OioGlobalState } from './typing';
2
+ export declare function getMainViewState(this: OioGlobalState): OioAnyViewState | undefined;
3
+ export declare const globalState: OioGlobalState;
@@ -1,3 +1,3 @@
1
- export * from './typing';
2
- export * from './context';
3
- export * from './use-state';
1
+ export * from './typing';
2
+ export * from './context';
3
+ export * from './use-state';
@@ -1,18 +1,18 @@
1
- import { OioActionBarState, OioAnyViewState } from '../typing';
2
- export declare function createActionBarState(this: OioAnyViewState, options: {
3
- handle: string;
4
- } & Partial<Omit<OioActionBarState, 'handle'>>): {
5
- [x: string]: any;
6
- inline?: boolean | undefined;
7
- actions: string[];
8
- visibleActions: string[];
9
- bizStyle?: string | undefined;
10
- getActionBarBizStyle?: ((actionHandle: string) => {
11
- type: import("@oinone/kunlun-vue-ui-common").ButtonType;
12
- bizStyle: import("@oinone/kunlun-vue-ui-common").ButtonBizStyle;
13
- } | undefined) | undefined;
14
- readonly handle: string;
15
- };
16
- export declare function getActionBarState(this: OioAnyViewState, rowIndex?: number): OioActionBarState | undefined;
17
- export declare function pushAction(this: OioAnyViewState, handle: string, rowIndex?: number): void;
18
- export declare function popAction(this: OioAnyViewState, handle: string, rowIndex?: number): void;
1
+ import { type OioActionBarState, type OioAnyViewState } from '../typing';
2
+ export declare function createActionBarState(this: OioAnyViewState, options: {
3
+ handle: string;
4
+ } & Partial<Omit<OioActionBarState, 'handle'>>): {
5
+ [x: string]: any;
6
+ inline?: boolean | undefined;
7
+ actions: string[];
8
+ visibleActions: string[];
9
+ bizStyle?: string | undefined;
10
+ getActionBarBizStyle?: ((actionHandle: string) => {
11
+ type: import("@oinone/kunlun-vue-ui-common").ButtonType;
12
+ bizStyle: import("@oinone/kunlun-vue-ui-common").ButtonBizStyle;
13
+ } | undefined) | undefined;
14
+ readonly handle: string;
15
+ };
16
+ export declare function getActionBarState(this: OioAnyViewState, rowIndex?: number): OioActionBarState | undefined;
17
+ export declare function pushAction(this: OioAnyViewState, handle: string, rowIndex?: number): void;
18
+ export declare function popAction(this: OioAnyViewState, handle: string, rowIndex?: number): void;
@@ -1,3 +1,3 @@
1
- import { OioAnyViewState } from '../typing';
2
- export declare function pushField(this: OioAnyViewState, handle: string, rowIndex?: number): void;
3
- export declare function popField(this: OioAnyViewState, handle: string, rowIndex?: number): void;
1
+ import { type OioAnyViewState } from '../typing';
2
+ export declare function pushField(this: OioAnyViewState, handle: string, rowIndex?: number): void;
3
+ export declare function popField(this: OioAnyViewState, handle: string, rowIndex?: number): void;
@@ -1,2 +1,2 @@
1
- export * from './action';
2
- export * from './field';
1
+ export * from './action';
2
+ export * from './field';