@fastkit/vui 0.19.39 → 0.19.41
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/vui.d.ts +2 -2
- package/dist/vui.mjs +10 -10
- package/dist/vui.mjs.map +1 -1
- package/package.json +15 -15
- package/src/plugin.tsx +1 -1
- package/src/service.tsx +15 -11
package/dist/vui.d.ts
CHANGED
|
@@ -35,7 +35,7 @@ import { TypedSlot, VNodeChildOrSlot, ExtractPropInput, DefineSlotsType } from '
|
|
|
35
35
|
export * from '@fastkit/vue-utils';
|
|
36
36
|
export * from '@fastkit/vue-loading';
|
|
37
37
|
import * as vue from 'vue';
|
|
38
|
-
import { PropType, ExtractPropTypes, ComputedRef, VNodeChild, VNodeProps, InjectionKey, UnwrapNestedRefs, ImgHTMLAttributes, HTMLAttributes
|
|
38
|
+
import { PropType, ExtractPropTypes, ComputedRef, VNodeChild, VNodeProps, InjectionKey, App, UnwrapNestedRefs, ImgHTMLAttributes, HTMLAttributes } from 'vue';
|
|
39
39
|
import * as vue_jsx_runtime from 'vue/jsx-runtime';
|
|
40
40
|
import * as _fastkit_color_scheme from '@fastkit/color-scheme';
|
|
41
41
|
import { ScopeName, ColorVariant , ThemeName, PaletteName } from '@fastkit/color-scheme';
|
|
@@ -2052,7 +2052,7 @@ declare class VuiService {
|
|
|
2052
2052
|
readonly menu: StackableLauncher<typeof VMenu>;
|
|
2053
2053
|
readonly sheet: StackableLauncher<typeof VSheetModal>;
|
|
2054
2054
|
get scroller(): UseScroller;
|
|
2055
|
-
constructor(options: VuiServiceOptions,
|
|
2055
|
+
constructor(options: VuiServiceOptions, app: App);
|
|
2056
2056
|
configure(options?: Partial<VuiServiceOptions>): void;
|
|
2057
2057
|
getRouterLink(): any;
|
|
2058
2058
|
setting<K extends keyof VuiServiceUISettings>(key: K): VuiServiceUISettings[K];
|
package/dist/vui.mjs
CHANGED
|
@@ -4515,7 +4515,7 @@ var VuiService = class {
|
|
|
4515
4515
|
get scroller() {
|
|
4516
4516
|
return getDocumentScroller();
|
|
4517
4517
|
}
|
|
4518
|
-
constructor(options,
|
|
4518
|
+
constructor(options, app) {
|
|
4519
4519
|
this.options = options;
|
|
4520
4520
|
this.configure();
|
|
4521
4521
|
const {
|
|
@@ -4529,11 +4529,11 @@ var VuiService = class {
|
|
|
4529
4529
|
this.textareaRows = textareaRows;
|
|
4530
4530
|
this.requiredChip = requiredChip;
|
|
4531
4531
|
this.router = options.router;
|
|
4532
|
-
this.location =
|
|
4532
|
+
this.location = LocationService.install(app, {
|
|
4533
4533
|
router: this.router
|
|
4534
4534
|
});
|
|
4535
4535
|
this.useLink = options.useLink || useLink;
|
|
4536
|
-
this.stack =
|
|
4536
|
+
this.stack = app.config.globalProperties.$vstack;
|
|
4537
4537
|
const {
|
|
4538
4538
|
uiSettings
|
|
4539
4539
|
} = options;
|
|
@@ -4554,8 +4554,8 @@ var VuiService = class {
|
|
|
4554
4554
|
default: () => [createTextVNode("CLOSE")]
|
|
4555
4555
|
})
|
|
4556
4556
|
};
|
|
4557
|
-
this.dialog =
|
|
4558
|
-
this.alert =
|
|
4557
|
+
this.dialog = this.stack.createLauncher(VDialog);
|
|
4558
|
+
this.alert = this.stack.createLauncher(VDialog, (props12) => {
|
|
4559
4559
|
const actions = [...props12?.actions || []];
|
|
4560
4560
|
if (!actions.length) {
|
|
4561
4561
|
actions.push(this.stackAction("ok"));
|
|
@@ -4567,7 +4567,7 @@ var VuiService = class {
|
|
|
4567
4567
|
actions
|
|
4568
4568
|
};
|
|
4569
4569
|
});
|
|
4570
|
-
this.confirm =
|
|
4570
|
+
this.confirm = this.stack.createLauncher(VDialog, (props12) => {
|
|
4571
4571
|
const actions = [...props12?.actions || []];
|
|
4572
4572
|
if (!actions.length) {
|
|
4573
4573
|
actions.push(this.stackAction("cancel"), this.stackAction("ok"));
|
|
@@ -4579,9 +4579,9 @@ var VuiService = class {
|
|
|
4579
4579
|
actions
|
|
4580
4580
|
};
|
|
4581
4581
|
});
|
|
4582
|
-
this.snackbar =
|
|
4583
|
-
this.menu =
|
|
4584
|
-
this.sheet =
|
|
4582
|
+
this.snackbar = this.stack.createLauncher(VSnackbar);
|
|
4583
|
+
this.menu = this.stack.createLauncher(VMenu);
|
|
4584
|
+
this.sheet = this.stack.createLauncher(VSheetModal);
|
|
4585
4585
|
}
|
|
4586
4586
|
configure(options) {
|
|
4587
4587
|
options && Object.assign(this.options, options);
|
|
@@ -4765,7 +4765,7 @@ var VuiPlugin = class {
|
|
|
4765
4765
|
installBodyScrollLockDirective(app);
|
|
4766
4766
|
installClickOutsideDirective(app);
|
|
4767
4767
|
installResizeDirective(app);
|
|
4768
|
-
const $vui = new VuiService(opts, app
|
|
4768
|
+
const $vui = new VuiService(opts, app);
|
|
4769
4769
|
app.provide(VuiInjectionKey, $vui);
|
|
4770
4770
|
app.config.globalProperties.$vui = $vui;
|
|
4771
4771
|
onAppUnmount(app, () => {
|