@schwarzdavid/ui-kit 0.0.1-alpha.20 → 0.0.1-alpha.21
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/main.d.ts +12 -8
- package/dist/main.js +392 -374
- package/package.json +1 -1
package/dist/main.d.ts
CHANGED
|
@@ -188,13 +188,6 @@ export declare interface DialogEntryContext<Data = unknown, Value = unknown> {
|
|
|
188
188
|
reject(reason?: unknown): void;
|
|
189
189
|
}
|
|
190
190
|
|
|
191
|
-
export declare interface DialogFormContext {
|
|
192
|
-
submit(): Promise<void>;
|
|
193
|
-
loading: Readonly<Ref<boolean>>;
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
export declare type DialogFormFinish<T> = () => Promisable<T>;
|
|
197
|
-
|
|
198
191
|
declare type DialogProps<T extends object> = PropsRequired<OwnProps<T>> extends true ? {
|
|
199
192
|
props: OwnProps<T>;
|
|
200
193
|
} : {
|
|
@@ -221,6 +214,15 @@ export declare interface FormDialogBaseProps<T, R = T, Required extends boolean
|
|
|
221
214
|
required?: Required;
|
|
222
215
|
}
|
|
223
216
|
|
|
217
|
+
export declare interface FormDialogContext {
|
|
218
|
+
submit(): Promise<void>;
|
|
219
|
+
close(): void;
|
|
220
|
+
onFinish(handler: FormDialogFinishHandler): () => void;
|
|
221
|
+
loading: Readonly<Ref<boolean>>;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
export declare type FormDialogFinishHandler = () => Promisable<boolean | undefined>;
|
|
225
|
+
|
|
224
226
|
export declare type FormDialogInjectedProp = 'modelValue' | 'onUpdate:modelValue' | 'toolbar';
|
|
225
227
|
|
|
226
228
|
declare type FormDialogModelCheck<T, C extends Component> = unknown extends T ? unknown : 'modelValue' extends keyof ComponentProps<C> ? [T] extends [NonNullable<ComponentProps<C>['modelValue']>] ? unknown : {
|
|
@@ -257,6 +259,8 @@ export declare interface LoadingComposable<A extends LoadingAction> {
|
|
|
257
259
|
action(...args: Parameters<A>): Promise<Awaited<ReturnType<A>>>;
|
|
258
260
|
}
|
|
259
261
|
|
|
262
|
+
export declare function onDialogFinish(handler: FormDialogFinishHandler): () => void;
|
|
263
|
+
|
|
260
264
|
declare type OwnProps<T extends object> = Omit<T, keyof VNodeProps | keyof AllowedComponentProps | keyof ComponentCustomProps>;
|
|
261
265
|
|
|
262
266
|
export declare interface PluginComponentOptions {
|
|
@@ -352,7 +356,7 @@ export declare function useDialog(): DialogComposable;
|
|
|
352
356
|
|
|
353
357
|
export declare function useDialogEntry<Data, Value = unknown>(): DialogEntryContext<Data, Value>;
|
|
354
358
|
|
|
355
|
-
export declare function
|
|
359
|
+
export declare function useFormDialog(): FormDialogContext;
|
|
356
360
|
|
|
357
361
|
export declare function useLoading<A extends LoadingAction>(actionCallback: A, options?: Partial<PluginLoadingOptions>): LoadingComposable<A>;
|
|
358
362
|
|