@signal24/vue-foundation 4.25.8 → 4.26.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.
- package/demo/components/demo-root.vue +7 -1
- package/demo/components/demo-vf-alert-modal.vue +36 -0
- package/demo/index.ts +2 -0
- package/dist/demo/components/demo-vf-alert-modal.vue.d.ts +2 -0
- package/dist/src/components/alert-helpers.d.ts +7 -0
- package/dist/src/components/overlay-container.d.ts +1 -0
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/vue-foundation.es.js +341 -319
- package/package.json +1 -1
- package/src/components/alert-helpers.ts +24 -1
- package/src/components/overlay-container.ts +10 -0
|
@@ -6,15 +6,21 @@
|
|
|
6
6
|
</select>
|
|
7
7
|
|
|
8
8
|
<DemoVfSmartSelect v-if="selectedDemo === 'VfSmartSelect'" />
|
|
9
|
+
<DemoVfAlertModal v-else-if="selectedDemo === 'VfAlertModal'" />
|
|
10
|
+
|
|
11
|
+
<OverlayContainer />
|
|
9
12
|
</div>
|
|
10
13
|
</template>
|
|
11
14
|
|
|
12
15
|
<script lang="ts" setup>
|
|
13
16
|
import { ref } from 'vue';
|
|
14
17
|
|
|
18
|
+
import { OverlayContainer } from '@/components';
|
|
19
|
+
|
|
20
|
+
import DemoVfAlertModal from './demo-vf-alert-modal.vue';
|
|
15
21
|
import DemoVfSmartSelect from './demo-vf-smart-select.vue';
|
|
16
22
|
|
|
17
|
-
const demos = ['VfSmartSelect'] as const;
|
|
23
|
+
const demos = ['VfSmartSelect', 'VfAlertModal'] as const;
|
|
18
24
|
const selectedDemo = ref<(typeof demos)[number] | null>();
|
|
19
25
|
</script>
|
|
20
26
|
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div id="demo-vf-alert-modal">
|
|
3
|
+
<button @click="showAlertDemo">Show Alert Modal</button>
|
|
4
|
+
<button @click="showWaitDemo">Show Wait Modal</button>
|
|
5
|
+
<button @click="showMutableWaitDemo">Show Mutable Wait Modal</button>
|
|
6
|
+
</div>
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<script lang="ts" setup>
|
|
10
|
+
import { showAlert, showMutableWait, showWait } from '@/components';
|
|
11
|
+
import { sleepSecs } from '@/helpers';
|
|
12
|
+
|
|
13
|
+
async function showAlertDemo() {
|
|
14
|
+
await showAlert({
|
|
15
|
+
title: 'Alert Modal',
|
|
16
|
+
message: 'This is a simple alert modal.'
|
|
17
|
+
});
|
|
18
|
+
console.log('Alert modal closed');
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
async function showWaitDemo() {
|
|
22
|
+
const dismiss = showWait('Wait Demo', 'Waiting 1 second...');
|
|
23
|
+
await sleepSecs(1);
|
|
24
|
+
dismiss();
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
async function showMutableWaitDemo() {
|
|
28
|
+
const wait = showMutableWait({
|
|
29
|
+
message: 'Waiting 1 second...'
|
|
30
|
+
});
|
|
31
|
+
await sleepSecs(1);
|
|
32
|
+
wait.update('Another second...');
|
|
33
|
+
await sleepSecs(1);
|
|
34
|
+
wait.dismiss();
|
|
35
|
+
}
|
|
36
|
+
</script>
|
package/demo/index.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { createApp } from 'vue';
|
|
2
2
|
|
|
3
3
|
import { configureVf } from '@/config';
|
|
4
|
+
import { installVf } from '@/index';
|
|
4
5
|
|
|
5
6
|
import DemoRoot from './components/demo-root.vue';
|
|
6
7
|
|
|
7
8
|
const app = createApp(DemoRoot);
|
|
9
|
+
installVf(app);
|
|
8
10
|
configureVf({});
|
|
9
11
|
|
|
10
12
|
app.mount(document.body);
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -16,4 +16,11 @@ export declare function showConfirmDestroy(options: IAlertOptions): Promise<bool
|
|
|
16
16
|
export declare function showWait(title: string, message: string): () => void;
|
|
17
17
|
export declare function showWait(message: string): () => void;
|
|
18
18
|
export declare function showWait(options: IAlertOptions): () => void;
|
|
19
|
+
interface IMutableWait {
|
|
20
|
+
update: (message: string) => void;
|
|
21
|
+
dismiss: () => void;
|
|
22
|
+
}
|
|
23
|
+
export declare function showMutableWait(title: string, message: string): IMutableWait;
|
|
24
|
+
export declare function showMutableWait(message: string): IMutableWait;
|
|
25
|
+
export declare function showMutableWait(options: IAlertOptions): IMutableWait;
|
|
19
26
|
export {};
|
|
@@ -49,4 +49,5 @@ export declare function dismissOverlayInjectionByVnode(vnode: VNode): boolean;
|
|
|
49
49
|
export declare function dismissOverlayInjectionById(id: string): boolean;
|
|
50
50
|
export declare function removeOverlayInjection(injection: OverlayInjection<any, any>): void;
|
|
51
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>;
|
|
52
53
|
export {};
|