@signal24/vue-foundation 4.30.5 → 4.30.8

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.
@@ -1,53 +1,45 @@
1
- import type { Writable } from 'type-fest';
2
- import { type AllowedComponentProps, type ComponentInternalInstance, type ComponentPublicInstance, type ComputedOptions, type MethodOptions, type Raw, type VNode, type VNodeProps } from 'vue';
1
+ import { type AllowedComponentProps, type Component, type ComponentCustomProps, type ComponentInternalInstance, type Raw, type VNode, type VNodeProps } from 'vue';
3
2
  import type { OverlayAnchorOptions } from './overlay-types';
4
- interface OverlayOptions<C extends OverlayComponent, R extends ComponentReturn<C>> {
3
+ interface OverlayOptions<C extends Component, R extends ComponentReturn<C>> {
5
4
  anchor?: OverlayAnchorOptions;
6
5
  onCallback?: (result: R) => void | Promise<boolean>;
7
6
  }
8
- export interface OverlayInjection<C extends OverlayComponent, R extends ComponentReturn<C>> {
7
+ export interface OverlayInjection<C extends Component> {
9
8
  id: string;
10
- component: OverlayComponentUnwrapped<C>;
11
- props: OverlayComponentProps<C>;
12
- options: OverlayOptions<C, R>;
9
+ component: Raw<C>;
10
+ props: {
11
+ callback?: () => void;
12
+ } & OverlayComponentProps<C>;
13
+ options: OverlayOptions<C, any>;
13
14
  vnode: VNode;
14
15
  wrapperVnode?: VNode;
15
16
  }
16
17
  export declare const OverlayContainer: import("vue").DefineComponent<{}, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
17
18
  [key: string]: any;
18
19
  }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
19
- export type Vue__ComponentPublicInstanceConstructor<T extends ComponentPublicInstance<Props, RawBindings, D, C, M> = ComponentPublicInstance<any>, Props = any, RawBindings = any, D = any, C extends ComputedOptions = ComputedOptions, M extends MethodOptions = MethodOptions> = {
20
- __isFragment?: never;
21
- __isTeleport?: never;
22
- __isSuspense?: never;
23
- new (...args: any[]): T;
24
- };
25
- export type ObjectComponentConfig<T extends Vue__ComponentPublicInstanceConstructor> = T extends Vue__ComponentPublicInstanceConstructor<infer P> ? P : never;
26
- export type ObjectComponentProps<T extends Vue__ComponentPublicInstanceConstructor> = Writable<Omit<ObjectComponentConfig<T>['$props'], keyof VNodeProps | keyof AllowedComponentProps>>;
27
- type ObjectOrDefault<T> = T extends object ? T : PropsWithCallback<{}>;
28
- export type OverlayComponent = Vue__ComponentPublicInstanceConstructor | ((props: any) => any);
29
- export type OverlayComponentConfig<T> = T extends Vue__ComponentPublicInstanceConstructor ? {
30
- props: ObjectComponentProps<T>;
31
- component: Raw<T>;
32
- } : T extends (props: infer P) => any ? {
33
- props: Omit<ObjectOrDefault<P>, keyof VNodeProps | keyof AllowedComponentProps>;
34
- component: T;
35
- } : never;
36
- export type OverlayComponentUnwrapped<T extends OverlayComponent> = OverlayComponentConfig<T>['component'];
37
- export type OverlayComponentProps<T extends OverlayComponent> = OverlayComponentConfig<T>['props'];
38
- interface PropsWithCallback<T> {
39
- callback?: (result: T) => void;
40
- }
41
- type ComponentReturn<M extends OverlayComponent> = OverlayComponentProps<M> extends PropsWithCallback<infer R> ? R : never;
42
20
  export type AnyComponentPublicInstance = {
43
21
  $?: ComponentInternalInstance;
44
22
  };
45
- export declare function createOverlayInjection<C extends OverlayComponent, R extends ComponentReturn<C>>(component: C, props: OverlayComponentProps<C>, options?: OverlayOptions<C, R>): OverlayInjection<C, R>;
23
+ type ExtractComponentProps<C> = C extends new (...args: any) => any ? InstanceType<C>['$props'] : C extends (props: infer P, ...args: any) => any ? P : C extends {
24
+ __props?: infer P;
25
+ } ? P : never;
26
+ type CleanProps<P> = {
27
+ [K in keyof P as K extends keyof (VNodeProps & AllowedComponentProps & ComponentCustomProps) ? never : string extends K ? never : K]: P[K];
28
+ };
29
+ type HasCallbackProp<C> = CleanProps<ExtractComponentProps<C>> extends {
30
+ callback: (result: any) => void;
31
+ } ? true : false;
32
+ type OverlayComponent<C extends Component> = HasCallbackProp<C> extends true ? C : never;
33
+ type ComponentReturn<C> = CleanProps<ExtractComponentProps<C>> extends {
34
+ callback: (result: infer R) => void;
35
+ } ? R : never;
36
+ type OverlayComponentProps<C> = CleanProps<ExtractComponentProps<C>>;
37
+ export declare function createOverlayInjection<C extends Component, R extends ComponentReturn<C>>(component: OverlayComponent<C>, props: OverlayComponentProps<C>, options?: OverlayOptions<C, R>): OverlayInjection<C>;
46
38
  export declare function dismissOverlayInjectionByInstance(instance: AnyComponentPublicInstance): void;
47
39
  export declare function dismissOverlayInjectionByInternalInstance(instance: ComponentInternalInstance): void;
48
40
  export declare function dismissOverlayInjectionByVnode(vnode: VNode): boolean;
49
41
  export declare function dismissOverlayInjectionById(id: string): boolean;
50
- export declare function removeOverlayInjection(injection: OverlayInjection<any, any>): void;
51
- export declare function presentOverlay<C extends OverlayComponent, R extends ComponentReturn<C>>(component: C, props: Omit<OverlayComponentProps<C>, 'callback'>, options?: OverlayOptions<C, R>): Promise<R | undefined>;
52
- export declare function updateOverlayProps<C extends OverlayComponent>(injection: OverlayInjection<C, any>, props: Partial<Omit<OverlayComponentProps<C>, 'callback'>>): Promise<void>;
42
+ export declare function removeOverlayInjection(injection: OverlayInjection<any>): void;
43
+ export declare function presentOverlay<C extends Component, R extends ComponentReturn<C>>(component: OverlayComponent<C>, props: Omit<OverlayComponentProps<C>, 'callback'>, options?: OverlayOptions<C, R>): Promise<R | undefined>;
44
+ export declare function updateOverlayProps<C extends Component>(injection: OverlayInjection<C>, props: Partial<Omit<OverlayComponentProps<C>, 'callback'>>): Promise<void>;
53
45
  export {};
@@ -1,5 +1,5 @@
1
- declare const __VLS_export: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
2
- props: __VLS_PrettifyLocal<{
1
+ declare const __VLS_export: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
2
+ props: import("vue").PublicProps & __VLS_PrettifyLocal<{
3
3
  modelValue: T;
4
4
  loadFn: () => Promise<T[]>;
5
5
  nullText?: string;
@@ -8,7 +8,9 @@ declare const __VLS_export: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_se
8
8
  preprocesor?: (option: T) => string;
9
9
  } & {
10
10
  "onUpdate:modelValue"?: ((args_0: T) => any) | undefined;
11
- }> & import("vue").PublicProps;
11
+ }> & (typeof globalThis extends {
12
+ __VLS_PROPS_FALLBACK: infer P;
13
+ } ? P : {});
12
14
  expose: (exposed: {}) => void;
13
15
  attrs: any;
14
16
  slots: {};
@@ -18,6 +20,8 @@ declare const __VLS_export: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_se
18
20
  };
19
21
  declare const _default: typeof __VLS_export;
20
22
  export default _default;
21
- type __VLS_PrettifyLocal<T> = {
23
+ type __VLS_PrettifyLocal<T> = (T extends any ? {
24
+ [K in keyof T]: T[K];
25
+ } : {
22
26
  [K in keyof T as K]: T[K];
23
- } & {};
27
+ }) & {};
@@ -1,5 +1,5 @@
1
- declare const __VLS_export: <T extends string>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
2
- props: __VLS_PrettifyLocal<{
1
+ declare const __VLS_export: <T extends string>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
2
+ props: import("vue").PublicProps & __VLS_PrettifyLocal<{
3
3
  modelValue: T | null | undefined;
4
4
  nullTitle?: string;
5
5
  placeholder?: string;
@@ -8,7 +8,9 @@ declare const __VLS_export: <T extends string>(__VLS_props: NonNullable<Awaited<
8
8
  name?: string;
9
9
  } & {
10
10
  "onUpdate:modelValue"?: ((value: T | null) => any) | undefined;
11
- }> & import("vue").PublicProps;
11
+ }> & (typeof globalThis extends {
12
+ __VLS_PROPS_FALLBACK: infer P;
13
+ } ? P : {});
12
14
  expose: (exposed: {}) => void;
13
15
  attrs: any;
14
16
  slots: {};
@@ -18,6 +20,8 @@ declare const __VLS_export: <T extends string>(__VLS_props: NonNullable<Awaited<
18
20
  };
19
21
  declare const _default: typeof __VLS_export;
20
22
  export default _default;
21
- type __VLS_PrettifyLocal<T> = {
23
+ type __VLS_PrettifyLocal<T> = (T extends any ? {
24
+ [K in keyof T]: T[K];
25
+ } : {
22
26
  [K in keyof T as K]: T[K];
23
- } & {};
27
+ }) & {};
@@ -1,6 +1,6 @@
1
1
  import type { VfSmartSelectOptionDescriptor } from './vf-smart-select.types';
2
- declare const __VLS_export: <T, V = T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
3
- props: __VLS_PrettifyLocal<{
2
+ declare const __VLS_export: <T, V = T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
3
+ props: import("vue").PublicProps & __VLS_PrettifyLocal<{
4
4
  modelValue: V | null;
5
5
  loadingText?: string;
6
6
  loadOptions?: (searchText: string | null) => Promise<T[]>;
@@ -35,7 +35,9 @@ declare const __VLS_export: <T, V = T>(__VLS_props: NonNullable<Awaited<typeof _
35
35
  } & {
36
36
  "onUpdate:modelValue"?: ((args_0: V) => any) | undefined;
37
37
  onOptionsLoaded?: ((args_0: T[]) => any) | undefined;
38
- }> & import("vue").PublicProps;
38
+ }> & (typeof globalThis extends {
39
+ __VLS_PROPS_FALLBACK: infer P;
40
+ } ? P : {});
39
41
  expose: (exposed: import("vue").ShallowUnwrapRef<{
40
42
  addRemoteOption: (option: T) => void;
41
43
  }>) => void;
@@ -57,6 +59,8 @@ declare const __VLS_export: <T, V = T>(__VLS_props: NonNullable<Awaited<typeof _
57
59
  };
58
60
  declare const _default: typeof __VLS_export;
59
61
  export default _default;
60
- type __VLS_PrettifyLocal<T> = {
62
+ type __VLS_PrettifyLocal<T> = (T extends any ? {
63
+ [K in keyof T]: T[K];
64
+ } : {
61
65
  [K in keyof T as K]: T[K];
62
- } & {};
66
+ }) & {};
@@ -1,3 +1,14 @@
1
1
  export declare function cloneProp<T>(prop: T | undefined | null, fallback: T): T;
2
2
  export declare function nullifyEmptyInputs<T extends Record<string, unknown>, K extends keyof T>(obj: T, fields: K[]): T;
3
3
  export declare function isNotNullOrUndefined<T>(value: T | null | undefined): value is T;
4
+ export declare function objectKeys<T extends object>(object: T): (keyof T)[];
5
+ export declare function objectAssign<T extends object>(object: T, ...values: Partial<T>[]): T;
6
+ type Entries<T> = {
7
+ [K in keyof T]: [K, T[K]];
8
+ }[keyof T][];
9
+ export declare function objectEntries<T extends object>(object: T): Entries<T>;
10
+ export declare function extractValues<T extends object, K extends readonly (keyof T)[]>(state: T, fields: K): Pick<T, K[number]>;
11
+ export declare function extractUpdates<T extends object>(state: T, updates: Partial<T>, fields?: Array<keyof T>, method?: 'equals' | 'matches'): Partial<T>;
12
+ export declare function patchObject<T extends object>(state: T, updates: Partial<T>, fields?: Array<keyof T>, method?: 'equals' | 'matches'): T;
13
+ export declare function extractKV<T, K extends keyof T, V extends keyof T>(arr: T[], keyCol: K, valCol: V): Record<string, T[V]>;
14
+ export {};