-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #51 from anexia-it/release-v1.20.8
Release v1.20.8
- Loading branch information
Showing
26 changed files
with
313 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
The [AnxAlert Component](/vue-ui-components/#/Components/AnxAlert) is used to show alert messages on the screen. With the *AnxAlertPlugin* those alert messages can be shown programmatically. The plugin automatically renderst the *AnxAlert Component* . | ||
|
||
Attention: | ||
By default, the alert is simply appended to the body, so please provide a *class* or *ID* as a second parameter. | ||
with the help of a "querySelector" the alert message will be appended after the 'div'. | ||
|
||
Optionally all other attributes are accepted as well | ||
|
||
For a documentation on how to use this plugin please refer to the [AnxAlert Component Documentation](/vue-ui-components/#/Components/AnxAlert). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
The [AnxModal Component](/vue-ui-components/#/Components/AnxModal) is used for generating dynamic modals. Modals are dialogs that can be used to display information for users. | ||
The plugin automatically renderst the *AnxModal Component* and shows a push notification. | ||
|
||
|
||
For a documentation on how to use this plugin please refer to the [AnxModal Component Documentation](/vue-ui-components/#/Components/AnxModal).npm |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "@anexia/vue-ui-components", | ||
"version": "1.20.7", | ||
"version": "1.20.8", | ||
"description": "A Vue component library containing several components, plugins and icons that match the Anexia Corporate Design guidelines", | ||
"author": "ANEXIA Internetdienstleistungs Gmbh <[email protected]> (https://anexia.com)", | ||
"license": "MIT", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
import AnxAlert from "../../components/AnxAlert/AnxAlert.vue"; | ||
|
||
const Api = (Vue, globalOptions = {}) => { | ||
// This is alert stuff | ||
const alert = { | ||
text: null, | ||
target: null | ||
}; | ||
|
||
function getAlert(propsData, target) { | ||
const componentClass = Vue.extend(AnxAlert); | ||
const instance = new componentClass({ propsData }); | ||
instance.$mount(); | ||
|
||
if (alert[instance]) { | ||
return alert[instance]; | ||
} else { | ||
if (target !== undefined) { | ||
document.querySelector(target).appendChild(instance.$el); | ||
} else { | ||
document.body.appendChild(instance.$el); | ||
} | ||
} | ||
|
||
// Remove instance | ||
instance.$on("destroy", () => { | ||
alert[instance] = null; | ||
try { | ||
document.body.removeChild(instance.$el); | ||
} catch (ex) { | ||
// Dont't handle this exception | ||
} | ||
}); | ||
|
||
alert[instance] = instance; | ||
return instance; | ||
} | ||
return { | ||
show(text, target, options = {}) { | ||
const localOptions = { text, target, ...options }; | ||
const propsData = { | ||
...globalOptions, | ||
...localOptions | ||
}; | ||
|
||
const alert = getAlert(propsData, target); | ||
|
||
alert.showAction({ propsData }); | ||
|
||
return alert; | ||
} | ||
}; | ||
}; | ||
|
||
export default Api; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { PluginObject, Component as VueComponent } from "vue"; | ||
|
||
// Declaration | ||
declare module "vue/types/vue" { | ||
interface Vue { | ||
$anxAlert: { | ||
show: (text: string, target?: string , options?: {}) => VueComponent; | ||
}; | ||
} | ||
} | ||
|
||
export declare const AnxAlertPlugin: PluginObject<{}>; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { AnxAlertPlugin } from "./plugin"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import Api from "./api.js"; | ||
|
||
export const AnxAlertPlugin = { | ||
install: (Vue, options = {}) => { | ||
const methods = Api(Vue, options); | ||
Vue.prototype.$anxAlert = methods; | ||
Vue.$anxAlert = methods; | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
export * from "./icons"; | ||
export * from "./toast"; | ||
export * from "./variables"; | ||
export * from "./modal"; | ||
export * from "./alert" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
export * from "./icons"; | ||
export * from "./toast"; | ||
export * from "./variables"; | ||
export * from "./modal"; | ||
export * from "./alert"; |
Oops, something went wrong.