UNPKG

@byloth/vuert

Version:

The headless alerts, modals, notifications & popups library for Vue.js craftsmen. ℹ

1 lines 22.5 kB
{"version":3,"file":"vuert.umd.cjs","sources":["../src/core.ts","../src/exceptions.ts","../src/models/action.ts","../src/models/alert.ts","../src/models/context.ts","../src/vuert.ts","../src/functions.ts","../src/components/AlertHandler.vue"],"sourcesContent":["import type { InjectionKey } from \"vue\";\n\nimport type Vuert from \"./vuert.js\";\n\nexport const InjectionKeys = { $vuert: Symbol(\"[vuert]: vuert\") as InjectionKey<Vuert> };\n","import { RuntimeException } from \"@byloth/core\";\n\nimport type { AlertOptions } from \"./types/alert/index.js\";\n\nexport class AlertThrottledException<R, T extends AlertOptions<R>> extends RuntimeException\n{\n public readonly alert: T;\n\n public constructor(alert: T, message?: string, cause?: unknown, name = \"AlertThrottledException\")\n {\n if (message === undefined)\n {\n message = \"The alert has been throttled to prevent spamming the user with too many alerts.\";\n }\n\n super(message, cause, name);\n\n this.alert = alert;\n }\n}\n","import type { IAction, ActionCallback, ActionOptions } from \"../types/action/index.js\";\n\nexport default class Action<R = void> implements IAction<R>\n{\n public readonly id: symbol;\n public readonly type: \"primary\" | \"secondary\" | \"alternative\";\n\n public readonly icon?: string | undefined;\n public readonly label: string;\n\n public readonly callback: ActionCallback<R | undefined>;\n\n public constructor(options: ActionOptions<R>)\n {\n this.id = options.id ?? Symbol();\n this.type = options.type ?? \"secondary\";\n\n this.icon = options.icon;\n this.label = options.label;\n\n this.callback = options.callback ?? (() => options.value);\n }\n}\n","import { ValueException } from \"@byloth/core\";\n\nimport type { IAlert, AlertOptions } from \"../types/alert/index.js\";\n\nimport Action from \"./action.js\";\n\nexport default class Alert<R = void, P extends Record<string, unknown> = never> implements IAlert<R, P>\n{\n public readonly id: symbol;\n\n public readonly type: \"info\" | \"success\" | \"warning\" | \"error\" | \"question\";\n public readonly priority: \"high\" | \"normal\" | \"low\";\n\n public readonly icon?: string;\n public readonly title?: string;\n\n public readonly message?: string;\n public readonly payload?: P;\n\n public readonly actions: Action<R>[];\n\n public readonly dismissible: boolean;\n public readonly timeout: number;\n\n public constructor(options: AlertOptions<R, P>)\n {\n this.id = options.id ?? Symbol();\n\n this.type = options.type ?? \"info\";\n this.priority = options.priority ?? \"normal\";\n\n this.icon = options.icon;\n this.title = options.title;\n\n if ((options.message !== undefined) && (options.component !== undefined))\n {\n throw new ValueException(\"The `message` and `component` properties\" +\n \" cannot both be valued at the same time.\");\n }\n\n this.message = options.message;\n this.payload = options.payload;\n\n this.actions = options.actions?.map((a) => new Action(a)) ?? [];\n\n this.dismissible = (options.dismissible || false);\n\n if (options.timeout !== undefined)\n {\n if (options.timeout <= 0)\n {\n throw new ValueException(\"The `timeout` property must be a positive\" +\n \" integer or -at least- `undefined`.\");\n }\n\n this.timeout = options.timeout;\n }\n else\n {\n this.timeout = 0;\n }\n }\n}\n","import { computed, ref } from \"vue\";\nimport type { Component, ComputedRef, Ref } from \"vue\";\n\nimport { delay, DeferredPromise, Publisher } from \"@byloth/core\";\nimport type { MaybePromise, Timeout } from \"@byloth/core\";\n\nimport type { Duration } from \"../types/index.js\";\nimport type { ActionCallback } from \"../types/action/index.js\";\nimport type { AlertOptions } from \"../types/alert/index.js\";\n\nimport Action from \"./action.js\";\nimport Alert from \"./alert.js\";\n\nexport type ContextResult<R> = Action<R> | ActionCallback<R | undefined> | MaybePromise<R | undefined>;\n\ninterface ContextEventMap\n{\n opening: () => void;\n opened: () => void;\n closing: () => void;\n closed: () => void;\n}\n\nexport default class Context<T = void, P extends Record<string, unknown> = never> extends DeferredPromise<T>\n{\n protected _duration: Duration;\n protected _timeoutId?: Timeout;\n\n protected _publisher: Publisher<ContextEventMap>;\n\n protected readonly _isOpen: Ref<boolean>;\n\n public readonly alert: Alert<T, P>;\n public readonly isOpen: ComputedRef<boolean>;\n public readonly component?: Component;\n\n public constructor(options: AlertOptions<T, P>, duration: number | Duration)\n {\n const _close = async (): Promise<void> =>\n {\n if (!(this._isOpen.value))\n {\n throw new Error(\"Unable to close the alert. It has already been closed or not even opened yet.\");\n }\n\n this._isOpen.value = false;\n\n if (this._timeoutId !== undefined)\n {\n clearTimeout(this._timeoutId);\n\n this._timeoutId = undefined;\n }\n\n this._publisher.publish(\"closing\");\n await delay(this._duration.leave);\n this._publisher.publish(\"closed\");\n };\n\n const _onFulfilled = (result?: MaybePromise<ContextResult<T>>): T =>\n {\n _close();\n\n if (result instanceof Action)\n {\n return result.callback() as T;\n }\n else if (result instanceof Function)\n {\n return result() as T;\n }\n else\n {\n return result as T;\n }\n };\n const _onRejected = (reason: unknown): never =>\n {\n _close();\n\n throw reason;\n };\n\n super(_onFulfilled, _onRejected);\n\n if (typeof duration === \"object\")\n {\n this._duration = {\n enter: Number(duration.enter),\n leave: Number(duration.leave)\n };\n }\n else\n {\n const _duration = Number(duration);\n this._duration = {\n enter: _duration,\n leave: _duration\n };\n }\n\n this._publisher = new Publisher();\n this.alert = new Alert<T, P>(options as AlertOptions<T>);\n\n this._isOpen = ref(false);\n this.isOpen = computed((): boolean => this._isOpen.value);\n\n this.component = options.component;\n }\n\n public async open(): Promise<void>\n {\n if (this._isOpen.value)\n {\n throw new Error(\"Unable to open the alert. It has already been opened.\");\n }\n\n this._isOpen.value = true;\n\n this._publisher.publish(\"opening\");\n await delay(this._duration.enter);\n this._publisher.publish(\"opened\");\n\n if (this.alert.timeout)\n {\n this._timeoutId = setTimeout(this.resolve, this.alert.timeout);\n }\n }\n\n public onOpening(subscriber: () => void): void\n {\n this._publisher.subscribe(\"opening\", subscriber);\n }\n public onOpened(subscriber: () => void): void\n {\n this._publisher.subscribe(\"opened\", subscriber);\n }\n public onClosing(subscriber: () => void): void\n {\n this._publisher.subscribe(\"closing\", subscriber);\n }\n public onClosed(subscriber: () => void): void\n {\n this._publisher.subscribe(\"closed\", subscriber);\n }\n}\n","import { RuntimeException } from \"@byloth/core\";\n\nimport { AlertThrottledException } from \"./exceptions\";\nimport { Context } from \"./models/index.js\";\n\nimport type { Duration } from \"./types/index.js\";\nimport type { AlertOptions } from \"./types/alert/index.js\";\nimport type { BlockingAlert, DismissibleAlert } from \"./types/alert/simple.js\";\nimport type { BlockingCustomAlert, DismissibleCustomAlert } from \"./types/alert/custom.js\";\n\nexport interface VuertOptions\n{\n useThrottling: boolean;\n throttlingDuration: number;\n transitionDuration: number | Duration;\n}\nexport type VuertSubscriber<R = void> = (alert: AlertOptions<R>) => Context<R> | void;\n\nexport default class Vuert\n{\n public static readonly VERSION: string = \"1.3.5\";\n\n public static get DEFAULT_OPTS(): VuertOptions\n {\n return {\n useThrottling: true,\n throttlingDuration: 100,\n transitionDuration: 200\n };\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n protected _subscribers: VuertSubscriber<any>[];\n protected _throttlers: Map<symbol, number>;\n\n protected _options: VuertOptions;\n public get options(): VuertOptions\n {\n return { ...this._options };\n }\n\n protected _throttle: <R>(alert: AlertOptions<R>) => boolean;\n\n public constructor(options?: Partial<VuertOptions>)\n {\n this._subscribers = [];\n this._throttlers = new Map();\n\n this._options = { ...Vuert.DEFAULT_OPTS, ...options };\n\n if (this._options.useThrottling)\n {\n this._throttle = <R>(alert: AlertOptions<R>): boolean =>\n {\n if (!(alert.id)) { return false; }\n\n const now = Date.now();\n const last = this._throttlers.get(alert.id) ?? 0;\n\n if ((now - last) > this._options.throttlingDuration)\n {\n this._throttlers.set(alert.id, now);\n\n return false;\n }\n\n return true;\n };\n }\n else\n {\n this._throttle = () => false;\n }\n }\n\n public emit<R = void>(alert: BlockingAlert<R>): Context<R>;\n public emit<R = void>(alert: DismissibleAlert<R>): Context<R | void>;\n public emit<R = void>(alert: BlockingCustomAlert<R>): Context<R>;\n public emit<R = void>(alert: DismissibleCustomAlert<R>): Context<R | void>;\n public emit<R = void>(alert: AlertOptions<R>): Context<R | void>;\n public emit<R = void>(alert: AlertOptions<R>): Context<R | void>\n {\n if (this._throttle(alert)) { throw new AlertThrottledException(alert); }\n\n const subscribers = this._subscribers.slice();\n const contexts = subscribers.map((subscriber) => subscriber(alert));\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const results = contexts.filter((context) => !!(context)) as Context<any>[];\n\n if (!(results.length))\n {\n throw new RuntimeException(\"Unable to handle the emitted alert properly. \" +\n \"There wasn't found any supported subscribers.\");\n }\n if (results.length > 1)\n {\n throw new RuntimeException(\"Unable to handle the emitted alert properly. \" +\n \"There were found too many supported subscribers.\");\n }\n\n return results[0];\n }\n\n public subscribe<R>(subscriber: VuertSubscriber<R>): () => VuertSubscriber<R>\n {\n this._subscribers.push(subscriber);\n\n return (): VuertSubscriber<R> =>\n {\n const index = this._subscribers.indexOf(subscriber);\n\n return this._subscribers.splice(index, 1)[0];\n };\n }\n}\n","import { inject, getCurrentScope } from \"vue\";\nimport type { App, Plugin } from \"vue\";\n\nimport { RuntimeException } from \"@byloth/core\";\n\nimport { InjectionKeys } from \"./core.js\";\n\nimport Vuert from \"./vuert.js\";\nimport type { VuertOptions } from \"./vuert.js\";\n\nlet _activeVuert: Vuert | undefined = undefined;\n\nconst _setActiveVuert = (vuert: Vuert): void => { _activeVuert = vuert; };\nconst _getActiveVuert = (): Vuert | undefined =>\n{\n if (getCurrentScope())\n {\n return inject(InjectionKeys.$vuert);\n }\n\n return _activeVuert;\n};\n\nexport type PluginOptions = Partial<VuertOptions>;\nexport const createVuert = (options?: PluginOptions): Plugin => ({\n install: ({ config, provide }: App): void =>\n {\n const $vuert = new Vuert(options);\n\n _setActiveVuert($vuert);\n\n config.globalProperties.$vuert = $vuert;\n provide(InjectionKeys.$vuert, $vuert);\n }\n});\nexport const useVuert = (): Vuert =>\n{\n const $vuert = _getActiveVuert();\n if (!($vuert))\n {\n throw new RuntimeException(\n \"`useVuert()` was called but there was not active Vuert. \" +\n \"Did you forget to install `Vuert` plugin in your App?\"\n );\n }\n\n return $vuert;\n};\n","<script lang=\"ts\" setup>\n import { nextTick, onBeforeUnmount, onMounted, ref, shallowRef } from \"vue\";\n import type { Component, PropType } from \"vue\";\n\n import type { MaybePromise } from \"@byloth/core\";\n\n import { useVuert } from \"../functions.js\";\n import { Alert, Context } from \"../models/index.js\";\n\n import type { Duration } from \"../types/index.js\";\n import type { AlertOptions } from \"../types/alert/index.js\";\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n type AnyContext = Context<any, any>;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n type AnyContextResolver = (result?: MaybePromise<any>) => void;\n\n const props = defineProps({\n is: {\n default: \"div\",\n type: [String, Object] as PropType<string | Component>\n },\n filter: {\n default: () => true,\n type: Function as PropType<(options: AlertOptions<unknown>) => boolean>\n },\n transitionDuration: {\n default: () => useVuert().options.transitionDuration,\n type: [Number, Object] as PropType<number | Duration>,\n\n validator: (value: unknown): boolean =>\n {\n if (value instanceof Object)\n {\n if ((\"enter\" in value) && (\"leave\" in value))\n {\n return isFinite(Number(value[\"enter\"])) && isFinite(Number(value[\"leave\"]));\n }\n\n return false;\n }\n\n return isFinite(Number(value));\n }\n }\n });\n\n const emit = defineEmits({\n opening: <R, P extends Record<string, unknown>>(alert: Alert<R, P>) => (alert instanceof Alert),\n opened: <R, P extends Record<string, unknown>>(alert: Alert<R, P>) => (alert instanceof Alert),\n closing: <R, P extends Record<string, unknown>>(alert: Alert<R, P>) => (alert instanceof Alert),\n closed: <R, P extends Record<string, unknown>>(alert: Alert<R, P>) => (alert instanceof Alert)\n });\n\n const contexts: AnyContext[] = [];\n\n const queue = ref<number>(0);\n const context = shallowRef<AnyContext>();\n\n const open = async (): Promise<void> =>\n {\n const ctx = contexts[0];\n\n ctx.onOpening(() => emit(\"opening\", ctx.alert));\n ctx.onOpened(() => emit(\"opened\", ctx.alert));\n ctx.onClosing(() => emit(\"closing\", ctx.alert));\n ctx.onClosed(async () =>\n {\n emit(\"closed\", ctx.alert);\n\n contexts.shift();\n context.value = undefined;\n\n queue.value -= 1;\n\n await nextTick();\n\n if (contexts.length > 0) { open(); }\n });\n\n context.value = ctx;\n\n await ctx.open();\n };\n\n const register = <R, P extends Record<string, unknown>>(options: AlertOptions<R, P>): Context<R, P> =>\n {\n const ctx = new Context<R, P>(options, props.transitionDuration);\n\n contexts.push(ctx);\n if (contexts.length === 1) { open(); }\n\n queue.value += 1;\n\n return ctx;\n };\n\n let _unsubscribe: () => void;\n onMounted(() =>\n {\n _unsubscribe = useVuert().subscribe(<R>(options: AlertOptions<R>): Context<R> | void =>\n {\n if (props.filter(options)) { return register(options); }\n });\n });\n onBeforeUnmount(() => _unsubscribe());\n</script>\n\n<template>\n <Component :is=\"is\">\n <slot v-if=\"context\"\n :alert=\"context.alert\"\n :custom-component=\"context.component\"\n :is-open=\"context.isOpen.value\"\n :queue=\"queue\"\n :resolve=\"context.resolve as AnyContextResolver\"\n :reject=\"context.reject\"></slot>\n </Component>\n</template>\n"],"names":["InjectionKeys","AlertThrottledException","RuntimeException","alert","message","cause","name","__publicField","Action","options","Alert","ValueException","_a","a","Context","DeferredPromise","duration","_close","delay","result","reason","_duration","Publisher","ref","computed","subscriber","_Vuert","now","last","results","context","index","Vuert","_activeVuert","_setActiveVuert","vuert","_getActiveVuert","getCurrentScope","inject","createVuert","config","provide","$vuert","useVuert","props","__props","emit","__emit","contexts","queue","shallowRef","open","ctx","nextTick","register","_unsubscribe","onMounted","onBeforeUnmount"],"mappings":"8cAIO,MAAMA,EAAgB,CAAE,OAAQ,OAAO,gBAAgB,CAAyB,ECAhF,MAAMC,UAA8DC,EAAAA,gBAC3E,CAGW,YAAYC,EAAUC,EAAkBC,EAAiBC,EAAO,0BACvE,CACQF,IAAY,SAEFA,EAAA,mFAGR,MAAAA,EAASC,EAAOC,CAAI,EATdC,EAAA,cAWZ,KAAK,MAAQJ,CAAA,CAErB,CCjBA,MAAqBK,CACrB,CASW,YAAYC,EACnB,CATgBF,EAAA,WACAA,EAAA,aAEAA,EAAA,aACAA,EAAA,cAEAA,EAAA,iBAIP,KAAA,GAAKE,EAAQ,IAAM,OAAO,EAC1B,KAAA,KAAOA,EAAQ,MAAQ,YAE5B,KAAK,KAAOA,E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