@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
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createOverlayInjection, presentOverlay, removeOverlayInjection } from './overlay-container';
|
|
1
|
+
import { createOverlayInjection, presentOverlay, removeOverlayInjection, updateOverlayProps } from './overlay-container';
|
|
2
2
|
import AlertModal from './vf-alert-modal.vue';
|
|
3
3
|
|
|
4
4
|
interface IAlertOptions {
|
|
@@ -64,3 +64,26 @@ export function showWait(arg0: string | IAlertOptions, arg1?: string): () => voi
|
|
|
64
64
|
});
|
|
65
65
|
return () => removeOverlayInjection(injection);
|
|
66
66
|
}
|
|
67
|
+
|
|
68
|
+
interface IMutableWait {
|
|
69
|
+
update: (message: string) => void;
|
|
70
|
+
dismiss: () => void;
|
|
71
|
+
}
|
|
72
|
+
export function showMutableWait(title: string, message: string): IMutableWait;
|
|
73
|
+
export function showMutableWait(message: string): IMutableWait;
|
|
74
|
+
export function showMutableWait(options: IAlertOptions): IMutableWait;
|
|
75
|
+
export function showMutableWait(arg0: string | IAlertOptions, arg1?: string): IMutableWait {
|
|
76
|
+
const params = resolveAlertParams(arg0, arg1);
|
|
77
|
+
const injection = createOverlayInjection(AlertModal, {
|
|
78
|
+
...params,
|
|
79
|
+
isBare: true,
|
|
80
|
+
classes: ['wait', ...params.classes],
|
|
81
|
+
callback: () => {}
|
|
82
|
+
});
|
|
83
|
+
return {
|
|
84
|
+
update: (message: string) => {
|
|
85
|
+
updateOverlayProps(injection, { message });
|
|
86
|
+
},
|
|
87
|
+
dismiss: () => removeOverlayInjection(injection)
|
|
88
|
+
};
|
|
89
|
+
}
|
|
@@ -189,3 +189,13 @@ export async function presentOverlay<C extends OverlayComponent, R extends Compo
|
|
|
189
189
|
overlayInjection = createOverlayInjection(component, resolvedProps, options);
|
|
190
190
|
});
|
|
191
191
|
}
|
|
192
|
+
|
|
193
|
+
export async function updateOverlayProps<C extends OverlayComponent>(
|
|
194
|
+
injection: OverlayInjection<C, any>,
|
|
195
|
+
props: Partial<Omit<OverlayComponentProps<C>, 'callback'>>
|
|
196
|
+
) {
|
|
197
|
+
const targetProps = injection.vnode.component!.props;
|
|
198
|
+
for (const key in props) {
|
|
199
|
+
targetProps[key] = props[key];
|
|
200
|
+
}
|
|
201
|
+
}
|