Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vuetify-confirm-box

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vuetify-confirm-box - npm Package Compare versions

Comparing version 1.0.8 to 1.0.10

5

dist/VuetifyConfirmBox.esm.js

@@ -322,3 +322,2 @@ import { VCard, VCardActions, VCardText, VDialog, VIcon, VToolbar, VToolbarTitle, VSpacer, VBtn } from 'vuetify/lib';

staticClass: "pa-1",
class: { "border-bottom": _vm.themeLight },
attrs: {

@@ -483,7 +482,7 @@ color: _vm.toolbarColor,

if (!inject) { return }
inject("data-v-5968ef60_0", { source: "\n.border-bottom[data-v-5968ef60] {\r\n border-bottom: 1px solid #eee !important;\n}\r\n", map: {"version":3,"sources":["D:\\Projects\\vuetify-confirm-box\\src\\VuetifyConfirmBox.vue"],"names":[],"mappings":";AAoMA;IACA,wCAAA;AACA","file":"VuetifyConfirmBox.vue","sourcesContent":["<template>\r\n <v-dialog \r\n @keydown.enter=\"escapePressed()\"\r\n @keydown.esc=\"enterPressed\"\r\n :max-width=\"width\" \r\n :persistent=\"persistent\" \r\n value=\"true\"\r\n eager>\r\n <v-card \r\n :color=\"color\" \r\n :dark=\"themeDark\"\r\n :light=\"themeLight\"\r\n class=\"pa-2\"\r\n tile>\r\n <v-toolbar \r\n :class=\"{'border-bottom': themeLight}\"\r\n :color=\"toolbarColor\"\r\n :dark=\"themeDark\"\r\n :light=\"themeLight\"\r\n class=\"pa-1\"\r\n dense\r\n flat\r\n v-if=\"showToolbar\">\r\n <v-icon left :color=\"themeDark ? 'white' : type\" v-if=\"showIcon\">{{ icon }}</v-icon>\r\n <v-toolbar-title :class=\"{ 'white--text': themeDark }\" v-if=\"Boolean(title)\">{{ title }}</v-toolbar-title>\r\n <v-spacer/>\r\n <v-btn @click=\"choose(false)\" small icon right text><v-icon>mdi-close</v-icon></v-btn>\r\n </v-toolbar>\r\n <v-card-text class=\"body-1 text-body-1 py-3\" v-if=\"!allowHtml\">{{ message }}</v-card-text>\r\n <v-card-text class=\"body-1 text-body-1 py-3\" v-else v-html=\"message\"></v-card-text>\r\n <v-card-actions v-if=\"actionsPositiveToNegative\">\r\n <v-spacer/>\r\n <v-btn\r\n v-if=\"Boolean(buttonTrueText)\"\r\n :color=\"buttonTrueColor\"\r\n :text=\"buttonTrueFlat\"\r\n @click=\"choose(true)\">{{ buttonTrueText }}</v-btn>\r\n <v-btn\r\n v-if=\"Boolean(buttonFalseText)\"\r\n :color=\"buttonFalseColor\"\r\n :text=\"buttonFalseFlat\"\r\n @click=\"choose(false)\">{{ buttonFalseText }}</v-btn>\r\n </v-card-actions>\r\n <v-card-actions v-else>\r\n <v-spacer/>\r\n <v-btn\r\n v-if=\"Boolean(buttonFalseText)\"\r\n :color=\"buttonFalseColor\"\r\n :text=\"buttonFalseFlat\"\r\n @click=\"choose(false)\">{{ buttonFalseText }}</v-btn>\r\n <v-btn\r\n v-if=\"Boolean(buttonTrueText)\"\r\n :color=\"buttonTrueColor\"\r\n :text=\"buttonTrueFlat\"\r\n @click=\"choose(true)\">{{ buttonTrueText }}</v-btn>\r\n </v-card-actions>\r\n </v-card>\r\n </v-dialog>\r\n</template>\r\n\r\n<script>\r\nimport { VCard, VCardActions, VCardText, VDialog, VIcon, VToolbar, VToolbarTitle, VSpacer, VBtn } from 'vuetify/lib'\r\nexport default {\r\n components: {\r\n VCard,\r\n VCardActions,\r\n VCardText,\r\n VDialog,\r\n VIcon,\r\n VToolbar,\r\n VToolbarTitle,\r\n VSpacer,\r\n VBtn\r\n },\r\n computed: {\r\n actionsPositiveToNegative() {\r\n if(this.actionsNegativeToPositive) return false;\r\n if(!this.smartActions) return true;\r\n if(!this.buttonTrueText || !this.buttonFalseText) return true;\r\n return this.buttonTrueText[0] <= this.buttonFalseText[0];\r\n },\r\n icon() {\r\n if(this.type === 'info') {\r\n return 'mdi-alert-circle-outline';\r\n }\r\n if(this.type === 'warning') {\r\n return 'mdi-alert-outline';\r\n }\r\n if(this.type === 'success') {\r\n return 'mdi-check-circle-outline';\r\n }\r\n if(this.type === 'error') {\r\n return 'mdi-close-octagon-outline';\r\n }\r\n return null;\r\n },\r\n themeDark() { return this.theme === 'dark' },\r\n themeLight() { return this.theme === 'light' },\r\n toolbarColor() {\r\n if(this.color !== null) {\r\n return this.color;\r\n }\r\n if(this.themeDark)\r\n return 'text--white';\r\n return 'text--black';\r\n },\r\n },\r\n data() {\r\n return {\r\n toggler: false,\r\n value: false\r\n }\r\n },\r\n methods: {\r\n choose(value) {\r\n this.$emit('result', value);\r\n this.value = value;\r\n this.$destroy();\r\n },\r\n enterPressed(e) {\r\n if(this.confirmWithEnter) {\r\n e.stopPropagation();\r\n this.choose(false);\r\n }\r\n },\r\n escapePressed() {\r\n if(this.cancelWithEscape)\r\n this.choose(true);\r\n },\r\n },\r\n name: 'vuetify-confirm-box',\r\n props: {\r\n actionsNegativeToPositive: Boolean,\r\n allowHtml: Boolean,\r\n buttonFalseColor: {\r\n type: String,\r\n default: 'secondary'\r\n },\r\n buttonTrueColor: {\r\n type: String,\r\n default: 'primary'\r\n },\r\n buttonFalseFlat: {\r\n type: Boolean,\r\n default: true\r\n },\r\n buttonTrueFlat: {\r\n type: Boolean,\r\n default: false\r\n },\r\n buttonFalseText: String,\r\n buttonTrueText: String,\r\n cancelWithEscape: {\r\n type: Boolean,\r\n default: true\r\n },\r\n color: {\r\n type: String,\r\n default: null\r\n },\r\n confirmWithEnter: {\r\n type: Boolean,\r\n default: false\r\n },\r\n message: {\r\n type: String,\r\n required: true\r\n },\r\n persistent: Boolean,\r\n showIcon: {\r\n type: Boolean,\r\n default: true\r\n },\r\n showToolbar: {\r\n type: Boolean,\r\n default: true\r\n },\r\n smartActions: Boolean,\r\n theme: {\r\n type: String, // dark | light\r\n default: 'light'\r\n },\r\n title: String,\r\n type: {\r\n type: String, // info | warning | success | error\r\n required: true\r\n },\r\n width: {\r\n type: Number,\r\n default: 450\r\n }\r\n }\r\n}\r\n</script>\r\n\r\n<style scoped>\r\n.border-bottom {\r\n border-bottom: 1px solid #eee !important;\r\n}\r\n</style>"]}, media: undefined });
inject("data-v-4b6ce9df_0", { source: "\n.border-bottom[data-v-4b6ce9df] {\r\n border-bottom: 1px solid #eee !important;\n}\r\n", map: {"version":3,"sources":["D:\\Projects\\vuetify-confirm-box\\src\\VuetifyConfirmBox.vue"],"names":[],"mappings":";AAmMA;IACA,wCAAA;AACA","file":"VuetifyConfirmBox.vue","sourcesContent":["<template>\r\n <v-dialog \r\n @keydown.enter=\"escapePressed()\"\r\n @keydown.esc=\"enterPressed\"\r\n :max-width=\"width\" \r\n :persistent=\"persistent\" \r\n value=\"true\"\r\n eager>\r\n <v-card \r\n :color=\"color\" \r\n :dark=\"themeDark\"\r\n :light=\"themeLight\"\r\n class=\"pa-2\"\r\n tile>\r\n <v-toolbar \r\n :color=\"toolbarColor\"\r\n :dark=\"themeDark\"\r\n :light=\"themeLight\"\r\n class=\"pa-1\"\r\n dense\r\n flat\r\n v-if=\"showToolbar\">\r\n <v-icon left :color=\"themeDark ? 'white' : type\" v-if=\"showIcon\">{{ icon }}</v-icon>\r\n <v-toolbar-title :class=\"{ 'white--text': themeDark }\" v-if=\"Boolean(title)\">{{ title }}</v-toolbar-title>\r\n <v-spacer/>\r\n <v-btn @click=\"choose(false)\" small icon right text><v-icon>mdi-close</v-icon></v-btn>\r\n </v-toolbar>\r\n <v-card-text class=\"body-1 text-body-1 py-3\" v-if=\"!allowHtml\">{{ message }}</v-card-text>\r\n <v-card-text class=\"body-1 text-body-1 py-3\" v-else v-html=\"message\"></v-card-text>\r\n <v-card-actions v-if=\"actionsPositiveToNegative\">\r\n <v-spacer/>\r\n <v-btn\r\n v-if=\"Boolean(buttonTrueText)\"\r\n :color=\"buttonTrueColor\"\r\n :text=\"buttonTrueFlat\"\r\n @click=\"choose(true)\">{{ buttonTrueText }}</v-btn>\r\n <v-btn\r\n v-if=\"Boolean(buttonFalseText)\"\r\n :color=\"buttonFalseColor\"\r\n :text=\"buttonFalseFlat\"\r\n @click=\"choose(false)\">{{ buttonFalseText }}</v-btn>\r\n </v-card-actions>\r\n <v-card-actions v-else>\r\n <v-spacer/>\r\n <v-btn\r\n v-if=\"Boolean(buttonFalseText)\"\r\n :color=\"buttonFalseColor\"\r\n :text=\"buttonFalseFlat\"\r\n @click=\"choose(false)\">{{ buttonFalseText }}</v-btn>\r\n <v-btn\r\n v-if=\"Boolean(buttonTrueText)\"\r\n :color=\"buttonTrueColor\"\r\n :text=\"buttonTrueFlat\"\r\n @click=\"choose(true)\">{{ buttonTrueText }}</v-btn>\r\n </v-card-actions>\r\n </v-card>\r\n </v-dialog>\r\n</template>\r\n\r\n<script>\r\nimport { VCard, VCardActions, VCardText, VDialog, VIcon, VToolbar, VToolbarTitle, VSpacer, VBtn } from 'vuetify/lib'\r\nexport default {\r\n components: {\r\n VCard,\r\n VCardActions,\r\n VCardText,\r\n VDialog,\r\n VIcon,\r\n VToolbar,\r\n VToolbarTitle,\r\n VSpacer,\r\n VBtn\r\n },\r\n computed: {\r\n actionsPositiveToNegative() {\r\n if(this.actionsNegativeToPositive) return false;\r\n if(!this.smartActions) return true;\r\n if(!this.buttonTrueText || !this.buttonFalseText) return true;\r\n return this.buttonTrueText[0] <= this.buttonFalseText[0];\r\n },\r\n icon() {\r\n if(this.type === 'info') {\r\n return 'mdi-alert-circle-outline';\r\n }\r\n if(this.type === 'warning') {\r\n return 'mdi-alert-outline';\r\n }\r\n if(this.type === 'success') {\r\n return 'mdi-check-circle-outline';\r\n }\r\n if(this.type === 'error') {\r\n return 'mdi-close-octagon-outline';\r\n }\r\n return null;\r\n },\r\n themeDark() { return this.theme === 'dark' },\r\n themeLight() { return this.theme === 'light' },\r\n toolbarColor() {\r\n if(this.color !== null) {\r\n return this.color;\r\n }\r\n if(this.themeDark)\r\n return 'text--white';\r\n return 'text--black';\r\n },\r\n },\r\n data() {\r\n return {\r\n toggler: false,\r\n value: false\r\n }\r\n },\r\n methods: {\r\n choose(value) {\r\n this.$emit('result', value);\r\n this.value = value;\r\n this.$destroy();\r\n },\r\n enterPressed(e) {\r\n if(this.confirmWithEnter) {\r\n e.stopPropagation();\r\n this.choose(false);\r\n }\r\n },\r\n escapePressed() {\r\n if(this.cancelWithEscape)\r\n this.choose(true);\r\n },\r\n },\r\n name: 'vuetify-confirm-box',\r\n props: {\r\n actionsNegativeToPositive: Boolean,\r\n allowHtml: Boolean,\r\n buttonFalseColor: {\r\n type: String,\r\n default: 'secondary'\r\n },\r\n buttonTrueColor: {\r\n type: String,\r\n default: 'primary'\r\n },\r\n buttonFalseFlat: {\r\n type: Boolean,\r\n default: true\r\n },\r\n buttonTrueFlat: {\r\n type: Boolean,\r\n default: false\r\n },\r\n buttonFalseText: String,\r\n buttonTrueText: String,\r\n cancelWithEscape: {\r\n type: Boolean,\r\n default: true\r\n },\r\n color: {\r\n type: String,\r\n default: null\r\n },\r\n confirmWithEnter: {\r\n type: Boolean,\r\n default: false\r\n },\r\n message: {\r\n type: String,\r\n required: true\r\n },\r\n persistent: Boolean,\r\n showIcon: {\r\n type: Boolean,\r\n default: true\r\n },\r\n showToolbar: {\r\n type: Boolean,\r\n default: true\r\n },\r\n smartActions: Boolean,\r\n theme: {\r\n type: String, // dark | light\r\n default: 'light'\r\n },\r\n title: String,\r\n type: {\r\n type: String, // info | warning | success | error\r\n required: true\r\n },\r\n width: {\r\n type: Number,\r\n default: 450\r\n }\r\n }\r\n}\r\n</script>\r\n\r\n<style scoped>\r\n.border-bottom {\r\n border-bottom: 1px solid #eee !important;\r\n}\r\n</style>"]}, media: undefined });
};
/* scoped */
var __vue_scope_id__ = "data-v-5968ef60";
var __vue_scope_id__ = "data-v-4b6ce9df";
/* module identifier */

@@ -490,0 +489,0 @@ var __vue_module_identifier__ = undefined;

@@ -323,3 +323,2 @@ var VuetifyConfirmBox = (function (exports, lib) {

staticClass: "pa-1",
class: { "border-bottom": _vm.themeLight },
attrs: {

@@ -484,7 +483,7 @@ color: _vm.toolbarColor,

if (!inject) { return }
inject("data-v-5968ef60_0", { source: "\n.border-bottom[data-v-5968ef60] {\r\n border-bottom: 1px solid #eee !important;\n}\r\n", map: {"version":3,"sources":["D:\\Projects\\vuetify-confirm-box\\src\\VuetifyConfirmBox.vue"],"names":[],"mappings":";AAoMA;IACA,wCAAA;AACA","file":"VuetifyConfirmBox.vue","sourcesContent":["<template>\r\n <v-dialog \r\n @keydown.enter=\"escapePressed()\"\r\n @keydown.esc=\"enterPressed\"\r\n :max-width=\"width\" \r\n :persistent=\"persistent\" \r\n value=\"true\"\r\n eager>\r\n <v-card \r\n :color=\"color\" \r\n :dark=\"themeDark\"\r\n :light=\"themeLight\"\r\n class=\"pa-2\"\r\n tile>\r\n <v-toolbar \r\n :class=\"{'border-bottom': themeLight}\"\r\n :color=\"toolbarColor\"\r\n :dark=\"themeDark\"\r\n :light=\"themeLight\"\r\n class=\"pa-1\"\r\n dense\r\n flat\r\n v-if=\"showToolbar\">\r\n <v-icon left :color=\"themeDark ? 'white' : type\" v-if=\"showIcon\">{{ icon }}</v-icon>\r\n <v-toolbar-title :class=\"{ 'white--text': themeDark }\" v-if=\"Boolean(title)\">{{ title }}</v-toolbar-title>\r\n <v-spacer/>\r\n <v-btn @click=\"choose(false)\" small icon right text><v-icon>mdi-close</v-icon></v-btn>\r\n </v-toolbar>\r\n <v-card-text class=\"body-1 text-body-1 py-3\" v-if=\"!allowHtml\">{{ message }}</v-card-text>\r\n <v-card-text class=\"body-1 text-body-1 py-3\" v-else v-html=\"message\"></v-card-text>\r\n <v-card-actions v-if=\"actionsPositiveToNegative\">\r\n <v-spacer/>\r\n <v-btn\r\n v-if=\"Boolean(buttonTrueText)\"\r\n :color=\"buttonTrueColor\"\r\n :text=\"buttonTrueFlat\"\r\n @click=\"choose(true)\">{{ buttonTrueText }}</v-btn>\r\n <v-btn\r\n v-if=\"Boolean(buttonFalseText)\"\r\n :color=\"buttonFalseColor\"\r\n :text=\"buttonFalseFlat\"\r\n @click=\"choose(false)\">{{ buttonFalseText }}</v-btn>\r\n </v-card-actions>\r\n <v-card-actions v-else>\r\n <v-spacer/>\r\n <v-btn\r\n v-if=\"Boolean(buttonFalseText)\"\r\n :color=\"buttonFalseColor\"\r\n :text=\"buttonFalseFlat\"\r\n @click=\"choose(false)\">{{ buttonFalseText }}</v-btn>\r\n <v-btn\r\n v-if=\"Boolean(buttonTrueText)\"\r\n :color=\"buttonTrueColor\"\r\n :text=\"buttonTrueFlat\"\r\n @click=\"choose(true)\">{{ buttonTrueText }}</v-btn>\r\n </v-card-actions>\r\n </v-card>\r\n </v-dialog>\r\n</template>\r\n\r\n<script>\r\nimport { VCard, VCardActions, VCardText, VDialog, VIcon, VToolbar, VToolbarTitle, VSpacer, VBtn } from 'vuetify/lib'\r\nexport default {\r\n components: {\r\n VCard,\r\n VCardActions,\r\n VCardText,\r\n VDialog,\r\n VIcon,\r\n VToolbar,\r\n VToolbarTitle,\r\n VSpacer,\r\n VBtn\r\n },\r\n computed: {\r\n actionsPositiveToNegative() {\r\n if(this.actionsNegativeToPositive) return false;\r\n if(!this.smartActions) return true;\r\n if(!this.buttonTrueText || !this.buttonFalseText) return true;\r\n return this.buttonTrueText[0] <= this.buttonFalseText[0];\r\n },\r\n icon() {\r\n if(this.type === 'info') {\r\n return 'mdi-alert-circle-outline';\r\n }\r\n if(this.type === 'warning') {\r\n return 'mdi-alert-outline';\r\n }\r\n if(this.type === 'success') {\r\n return 'mdi-check-circle-outline';\r\n }\r\n if(this.type === 'error') {\r\n return 'mdi-close-octagon-outline';\r\n }\r\n return null;\r\n },\r\n themeDark() { return this.theme === 'dark' },\r\n themeLight() { return this.theme === 'light' },\r\n toolbarColor() {\r\n if(this.color !== null) {\r\n return this.color;\r\n }\r\n if(this.themeDark)\r\n return 'text--white';\r\n return 'text--black';\r\n },\r\n },\r\n data() {\r\n return {\r\n toggler: false,\r\n value: false\r\n }\r\n },\r\n methods: {\r\n choose(value) {\r\n this.$emit('result', value);\r\n this.value = value;\r\n this.$destroy();\r\n },\r\n enterPressed(e) {\r\n if(this.confirmWithEnter) {\r\n e.stopPropagation();\r\n this.choose(false);\r\n }\r\n },\r\n escapePressed() {\r\n if(this.cancelWithEscape)\r\n this.choose(true);\r\n },\r\n },\r\n name: 'vuetify-confirm-box',\r\n props: {\r\n actionsNegativeToPositive: Boolean,\r\n allowHtml: Boolean,\r\n buttonFalseColor: {\r\n type: String,\r\n default: 'secondary'\r\n },\r\n buttonTrueColor: {\r\n type: String,\r\n default: 'primary'\r\n },\r\n buttonFalseFlat: {\r\n type: Boolean,\r\n default: true\r\n },\r\n buttonTrueFlat: {\r\n type: Boolean,\r\n default: false\r\n },\r\n buttonFalseText: String,\r\n buttonTrueText: String,\r\n cancelWithEscape: {\r\n type: Boolean,\r\n default: true\r\n },\r\n color: {\r\n type: String,\r\n default: null\r\n },\r\n confirmWithEnter: {\r\n type: Boolean,\r\n default: false\r\n },\r\n message: {\r\n type: String,\r\n required: true\r\n },\r\n persistent: Boolean,\r\n showIcon: {\r\n type: Boolean,\r\n default: true\r\n },\r\n showToolbar: {\r\n type: Boolean,\r\n default: true\r\n },\r\n smartActions: Boolean,\r\n theme: {\r\n type: String, // dark | light\r\n default: 'light'\r\n },\r\n title: String,\r\n type: {\r\n type: String, // info | warning | success | error\r\n required: true\r\n },\r\n width: {\r\n type: Number,\r\n default: 450\r\n }\r\n }\r\n}\r\n</script>\r\n\r\n<style scoped>\r\n.border-bottom {\r\n border-bottom: 1px solid #eee !important;\r\n}\r\n</style>"]}, media: undefined });
inject("data-v-4b6ce9df_0", { source: "\n.border-bottom[data-v-4b6ce9df] {\r\n border-bottom: 1px solid #eee !important;\n}\r\n", map: {"version":3,"sources":["D:\\Projects\\vuetify-confirm-box\\src\\VuetifyConfirmBox.vue"],"names":[],"mappings":";AAmMA;IACA,wCAAA;AACA","file":"VuetifyConfirmBox.vue","sourcesContent":["<template>\r\n <v-dialog \r\n @keydown.enter=\"escapePressed()\"\r\n @keydown.esc=\"enterPressed\"\r\n :max-width=\"width\" \r\n :persistent=\"persistent\" \r\n value=\"true\"\r\n eager>\r\n <v-card \r\n :color=\"color\" \r\n :dark=\"themeDark\"\r\n :light=\"themeLight\"\r\n class=\"pa-2\"\r\n tile>\r\n <v-toolbar \r\n :color=\"toolbarColor\"\r\n :dark=\"themeDark\"\r\n :light=\"themeLight\"\r\n class=\"pa-1\"\r\n dense\r\n flat\r\n v-if=\"showToolbar\">\r\n <v-icon left :color=\"themeDark ? 'white' : type\" v-if=\"showIcon\">{{ icon }}</v-icon>\r\n <v-toolbar-title :class=\"{ 'white--text': themeDark }\" v-if=\"Boolean(title)\">{{ title }}</v-toolbar-title>\r\n <v-spacer/>\r\n <v-btn @click=\"choose(false)\" small icon right text><v-icon>mdi-close</v-icon></v-btn>\r\n </v-toolbar>\r\n <v-card-text class=\"body-1 text-body-1 py-3\" v-if=\"!allowHtml\">{{ message }}</v-card-text>\r\n <v-card-text class=\"body-1 text-body-1 py-3\" v-else v-html=\"message\"></v-card-text>\r\n <v-card-actions v-if=\"actionsPositiveToNegative\">\r\n <v-spacer/>\r\n <v-btn\r\n v-if=\"Boolean(buttonTrueText)\"\r\n :color=\"buttonTrueColor\"\r\n :text=\"buttonTrueFlat\"\r\n @click=\"choose(true)\">{{ buttonTrueText }}</v-btn>\r\n <v-btn\r\n v-if=\"Boolean(buttonFalseText)\"\r\n :color=\"buttonFalseColor\"\r\n :text=\"buttonFalseFlat\"\r\n @click=\"choose(false)\">{{ buttonFalseText }}</v-btn>\r\n </v-card-actions>\r\n <v-card-actions v-else>\r\n <v-spacer/>\r\n <v-btn\r\n v-if=\"Boolean(buttonFalseText)\"\r\n :color=\"buttonFalseColor\"\r\n :text=\"buttonFalseFlat\"\r\n @click=\"choose(false)\">{{ buttonFalseText }}</v-btn>\r\n <v-btn\r\n v-if=\"Boolean(buttonTrueText)\"\r\n :color=\"buttonTrueColor\"\r\n :text=\"buttonTrueFlat\"\r\n @click=\"choose(true)\">{{ buttonTrueText }}</v-btn>\r\n </v-card-actions>\r\n </v-card>\r\n </v-dialog>\r\n</template>\r\n\r\n<script>\r\nimport { VCard, VCardActions, VCardText, VDialog, VIcon, VToolbar, VToolbarTitle, VSpacer, VBtn } from 'vuetify/lib'\r\nexport default {\r\n components: {\r\n VCard,\r\n VCardActions,\r\n VCardText,\r\n VDialog,\r\n VIcon,\r\n VToolbar,\r\n VToolbarTitle,\r\n VSpacer,\r\n VBtn\r\n },\r\n computed: {\r\n actionsPositiveToNegative() {\r\n if(this.actionsNegativeToPositive) return false;\r\n if(!this.smartActions) return true;\r\n if(!this.buttonTrueText || !this.buttonFalseText) return true;\r\n return this.buttonTrueText[0] <= this.buttonFalseText[0];\r\n },\r\n icon() {\r\n if(this.type === 'info') {\r\n return 'mdi-alert-circle-outline';\r\n }\r\n if(this.type === 'warning') {\r\n return 'mdi-alert-outline';\r\n }\r\n if(this.type === 'success') {\r\n return 'mdi-check-circle-outline';\r\n }\r\n if(this.type === 'error') {\r\n return 'mdi-close-octagon-outline';\r\n }\r\n return null;\r\n },\r\n themeDark() { return this.theme === 'dark' },\r\n themeLight() { return this.theme === 'light' },\r\n toolbarColor() {\r\n if(this.color !== null) {\r\n return this.color;\r\n }\r\n if(this.themeDark)\r\n return 'text--white';\r\n return 'text--black';\r\n },\r\n },\r\n data() {\r\n return {\r\n toggler: false,\r\n value: false\r\n }\r\n },\r\n methods: {\r\n choose(value) {\r\n this.$emit('result', value);\r\n this.value = value;\r\n this.$destroy();\r\n },\r\n enterPressed(e) {\r\n if(this.confirmWithEnter) {\r\n e.stopPropagation();\r\n this.choose(false);\r\n }\r\n },\r\n escapePressed() {\r\n if(this.cancelWithEscape)\r\n this.choose(true);\r\n },\r\n },\r\n name: 'vuetify-confirm-box',\r\n props: {\r\n actionsNegativeToPositive: Boolean,\r\n allowHtml: Boolean,\r\n buttonFalseColor: {\r\n type: String,\r\n default: 'secondary'\r\n },\r\n buttonTrueColor: {\r\n type: String,\r\n default: 'primary'\r\n },\r\n buttonFalseFlat: {\r\n type: Boolean,\r\n default: true\r\n },\r\n buttonTrueFlat: {\r\n type: Boolean,\r\n default: false\r\n },\r\n buttonFalseText: String,\r\n buttonTrueText: String,\r\n cancelWithEscape: {\r\n type: Boolean,\r\n default: true\r\n },\r\n color: {\r\n type: String,\r\n default: null\r\n },\r\n confirmWithEnter: {\r\n type: Boolean,\r\n default: false\r\n },\r\n message: {\r\n type: String,\r\n required: true\r\n },\r\n persistent: Boolean,\r\n showIcon: {\r\n type: Boolean,\r\n default: true\r\n },\r\n showToolbar: {\r\n type: Boolean,\r\n default: true\r\n },\r\n smartActions: Boolean,\r\n theme: {\r\n type: String, // dark | light\r\n default: 'light'\r\n },\r\n title: String,\r\n type: {\r\n type: String, // info | warning | success | error\r\n required: true\r\n },\r\n width: {\r\n type: Number,\r\n default: 450\r\n }\r\n }\r\n}\r\n</script>\r\n\r\n<style scoped>\r\n.border-bottom {\r\n border-bottom: 1px solid #eee !important;\r\n}\r\n</style>"]}, media: undefined });
};
/* scoped */
var __vue_scope_id__ = "data-v-5968ef60";
var __vue_scope_id__ = "data-v-4b6ce9df";
/* module identifier */

@@ -491,0 +490,0 @@ var __vue_module_identifier__ = undefined;

@@ -326,3 +326,2 @@ (function (global, factory) {

staticClass: "pa-1",
class: { "border-bottom": _vm.themeLight },
attrs: {

@@ -487,7 +486,7 @@ color: _vm.toolbarColor,

if (!inject) { return }
inject("data-v-5968ef60_0", { source: "\n.border-bottom[data-v-5968ef60] {\r\n border-bottom: 1px solid #eee !important;\n}\r\n", map: {"version":3,"sources":["D:\\Projects\\vuetify-confirm-box\\src\\VuetifyConfirmBox.vue"],"names":[],"mappings":";AAoMA;IACA,wCAAA;AACA","file":"VuetifyConfirmBox.vue","sourcesContent":["<template>\r\n <v-dialog \r\n @keydown.enter=\"escapePressed()\"\r\n @keydown.esc=\"enterPressed\"\r\n :max-width=\"width\" \r\n :persistent=\"persistent\" \r\n value=\"true\"\r\n eager>\r\n <v-card \r\n :color=\"color\" \r\n :dark=\"themeDark\"\r\n :light=\"themeLight\"\r\n class=\"pa-2\"\r\n tile>\r\n <v-toolbar \r\n :class=\"{'border-bottom': themeLight}\"\r\n :color=\"toolbarColor\"\r\n :dark=\"themeDark\"\r\n :light=\"themeLight\"\r\n class=\"pa-1\"\r\n dense\r\n flat\r\n v-if=\"showToolbar\">\r\n <v-icon left :color=\"themeDark ? 'white' : type\" v-if=\"showIcon\">{{ icon }}</v-icon>\r\n <v-toolbar-title :class=\"{ 'white--text': themeDark }\" v-if=\"Boolean(title)\">{{ title }}</v-toolbar-title>\r\n <v-spacer/>\r\n <v-btn @click=\"choose(false)\" small icon right text><v-icon>mdi-close</v-icon></v-btn>\r\n </v-toolbar>\r\n <v-card-text class=\"body-1 text-body-1 py-3\" v-if=\"!allowHtml\">{{ message }}</v-card-text>\r\n <v-card-text class=\"body-1 text-body-1 py-3\" v-else v-html=\"message\"></v-card-text>\r\n <v-card-actions v-if=\"actionsPositiveToNegative\">\r\n <v-spacer/>\r\n <v-btn\r\n v-if=\"Boolean(buttonTrueText)\"\r\n :color=\"buttonTrueColor\"\r\n :text=\"buttonTrueFlat\"\r\n @click=\"choose(true)\">{{ buttonTrueText }}</v-btn>\r\n <v-btn\r\n v-if=\"Boolean(buttonFalseText)\"\r\n :color=\"buttonFalseColor\"\r\n :text=\"buttonFalseFlat\"\r\n @click=\"choose(false)\">{{ buttonFalseText }}</v-btn>\r\n </v-card-actions>\r\n <v-card-actions v-else>\r\n <v-spacer/>\r\n <v-btn\r\n v-if=\"Boolean(buttonFalseText)\"\r\n :color=\"buttonFalseColor\"\r\n :text=\"buttonFalseFlat\"\r\n @click=\"choose(false)\">{{ buttonFalseText }}</v-btn>\r\n <v-btn\r\n v-if=\"Boolean(buttonTrueText)\"\r\n :color=\"buttonTrueColor\"\r\n :text=\"buttonTrueFlat\"\r\n @click=\"choose(true)\">{{ buttonTrueText }}</v-btn>\r\n </v-card-actions>\r\n </v-card>\r\n </v-dialog>\r\n</template>\r\n\r\n<script>\r\nimport { VCard, VCardActions, VCardText, VDialog, VIcon, VToolbar, VToolbarTitle, VSpacer, VBtn } from 'vuetify/lib'\r\nexport default {\r\n components: {\r\n VCard,\r\n VCardActions,\r\n VCardText,\r\n VDialog,\r\n VIcon,\r\n VToolbar,\r\n VToolbarTitle,\r\n VSpacer,\r\n VBtn\r\n },\r\n computed: {\r\n actionsPositiveToNegative() {\r\n if(this.actionsNegativeToPositive) return false;\r\n if(!this.smartActions) return true;\r\n if(!this.buttonTrueText || !this.buttonFalseText) return true;\r\n return this.buttonTrueText[0] <= this.buttonFalseText[0];\r\n },\r\n icon() {\r\n if(this.type === 'info') {\r\n return 'mdi-alert-circle-outline';\r\n }\r\n if(this.type === 'warning') {\r\n return 'mdi-alert-outline';\r\n }\r\n if(this.type === 'success') {\r\n return 'mdi-check-circle-outline';\r\n }\r\n if(this.type === 'error') {\r\n return 'mdi-close-octagon-outline';\r\n }\r\n return null;\r\n },\r\n themeDark() { return this.theme === 'dark' },\r\n themeLight() { return this.theme === 'light' },\r\n toolbarColor() {\r\n if(this.color !== null) {\r\n return this.color;\r\n }\r\n if(this.themeDark)\r\n return 'text--white';\r\n return 'text--black';\r\n },\r\n },\r\n data() {\r\n return {\r\n toggler: false,\r\n value: false\r\n }\r\n },\r\n methods: {\r\n choose(value) {\r\n this.$emit('result', value);\r\n this.value = value;\r\n this.$destroy();\r\n },\r\n enterPressed(e) {\r\n if(this.confirmWithEnter) {\r\n e.stopPropagation();\r\n this.choose(false);\r\n }\r\n },\r\n escapePressed() {\r\n if(this.cancelWithEscape)\r\n this.choose(true);\r\n },\r\n },\r\n name: 'vuetify-confirm-box',\r\n props: {\r\n actionsNegativeToPositive: Boolean,\r\n allowHtml: Boolean,\r\n buttonFalseColor: {\r\n type: String,\r\n default: 'secondary'\r\n },\r\n buttonTrueColor: {\r\n type: String,\r\n default: 'primary'\r\n },\r\n buttonFalseFlat: {\r\n type: Boolean,\r\n default: true\r\n },\r\n buttonTrueFlat: {\r\n type: Boolean,\r\n default: false\r\n },\r\n buttonFalseText: String,\r\n buttonTrueText: String,\r\n cancelWithEscape: {\r\n type: Boolean,\r\n default: true\r\n },\r\n color: {\r\n type: String,\r\n default: null\r\n },\r\n confirmWithEnter: {\r\n type: Boolean,\r\n default: false\r\n },\r\n message: {\r\n type: String,\r\n required: true\r\n },\r\n persistent: Boolean,\r\n showIcon: {\r\n type: Boolean,\r\n default: true\r\n },\r\n showToolbar: {\r\n type: Boolean,\r\n default: true\r\n },\r\n smartActions: Boolean,\r\n theme: {\r\n type: String, // dark | light\r\n default: 'light'\r\n },\r\n title: String,\r\n type: {\r\n type: String, // info | warning | success | error\r\n required: true\r\n },\r\n width: {\r\n type: Number,\r\n default: 450\r\n }\r\n }\r\n}\r\n</script>\r\n\r\n<style scoped>\r\n.border-bottom {\r\n border-bottom: 1px solid #eee !important;\r\n}\r\n</style>"]}, media: undefined });
inject("data-v-4b6ce9df_0", { source: "\n.border-bottom[data-v-4b6ce9df] {\r\n border-bottom: 1px solid #eee !important;\n}\r\n", map: {"version":3,"sources":["D:\\Projects\\vuetify-confirm-box\\src\\VuetifyConfirmBox.vue"],"names":[],"mappings":";AAmMA;IACA,wCAAA;AACA","file":"VuetifyConfirmBox.vue","sourcesContent":["<template>\r\n <v-dialog \r\n @keydown.enter=\"escapePressed()\"\r\n @keydown.esc=\"enterPressed\"\r\n :max-width=\"width\" \r\n :persistent=\"persistent\" \r\n value=\"true\"\r\n eager>\r\n <v-card \r\n :color=\"color\" \r\n :dark=\"themeDark\"\r\n :light=\"themeLight\"\r\n class=\"pa-2\"\r\n tile>\r\n <v-toolbar \r\n :color=\"toolbarColor\"\r\n :dark=\"themeDark\"\r\n :light=\"themeLight\"\r\n class=\"pa-1\"\r\n dense\r\n flat\r\n v-if=\"showToolbar\">\r\n <v-icon left :color=\"themeDark ? 'white' : type\" v-if=\"showIcon\">{{ icon }}</v-icon>\r\n <v-toolbar-title :class=\"{ 'white--text': themeDark }\" v-if=\"Boolean(title)\">{{ title }}</v-toolbar-title>\r\n <v-spacer/>\r\n <v-btn @click=\"choose(false)\" small icon right text><v-icon>mdi-close</v-icon></v-btn>\r\n </v-toolbar>\r\n <v-card-text class=\"body-1 text-body-1 py-3\" v-if=\"!allowHtml\">{{ message }}</v-card-text>\r\n <v-card-text class=\"body-1 text-body-1 py-3\" v-else v-html=\"message\"></v-card-text>\r\n <v-card-actions v-if=\"actionsPositiveToNegative\">\r\n <v-spacer/>\r\n <v-btn\r\n v-if=\"Boolean(buttonTrueText)\"\r\n :color=\"buttonTrueColor\"\r\n :text=\"buttonTrueFlat\"\r\n @click=\"choose(true)\">{{ buttonTrueText }}</v-btn>\r\n <v-btn\r\n v-if=\"Boolean(buttonFalseText)\"\r\n :color=\"buttonFalseColor\"\r\n :text=\"buttonFalseFlat\"\r\n @click=\"choose(false)\">{{ buttonFalseText }}</v-btn>\r\n </v-card-actions>\r\n <v-card-actions v-else>\r\n <v-spacer/>\r\n <v-btn\r\n v-if=\"Boolean(buttonFalseText)\"\r\n :color=\"buttonFalseColor\"\r\n :text=\"buttonFalseFlat\"\r\n @click=\"choose(false)\">{{ buttonFalseText }}</v-btn>\r\n <v-btn\r\n v-if=\"Boolean(buttonTrueText)\"\r\n :color=\"buttonTrueColor\"\r\n :text=\"buttonTrueFlat\"\r\n @click=\"choose(true)\">{{ buttonTrueText }}</v-btn>\r\n </v-card-actions>\r\n </v-card>\r\n </v-dialog>\r\n</template>\r\n\r\n<script>\r\nimport { VCard, VCardActions, VCardText, VDialog, VIcon, VToolbar, VToolbarTitle, VSpacer, VBtn } from 'vuetify/lib'\r\nexport default {\r\n components: {\r\n VCard,\r\n VCardActions,\r\n VCardText,\r\n VDialog,\r\n VIcon,\r\n VToolbar,\r\n VToolbarTitle,\r\n VSpacer,\r\n VBtn\r\n },\r\n computed: {\r\n actionsPositiveToNegative() {\r\n if(this.actionsNegativeToPositive) return false;\r\n if(!this.smartActions) return true;\r\n if(!this.buttonTrueText || !this.buttonFalseText) return true;\r\n return this.buttonTrueText[0] <= this.buttonFalseText[0];\r\n },\r\n icon() {\r\n if(this.type === 'info') {\r\n return 'mdi-alert-circle-outline';\r\n }\r\n if(this.type === 'warning') {\r\n return 'mdi-alert-outline';\r\n }\r\n if(this.type === 'success') {\r\n return 'mdi-check-circle-outline';\r\n }\r\n if(this.type === 'error') {\r\n return 'mdi-close-octagon-outline';\r\n }\r\n return null;\r\n },\r\n themeDark() { return this.theme === 'dark' },\r\n themeLight() { return this.theme === 'light' },\r\n toolbarColor() {\r\n if(this.color !== null) {\r\n return this.color;\r\n }\r\n if(this.themeDark)\r\n return 'text--white';\r\n return 'text--black';\r\n },\r\n },\r\n data() {\r\n return {\r\n toggler: false,\r\n value: false\r\n }\r\n },\r\n methods: {\r\n choose(value) {\r\n this.$emit('result', value);\r\n this.value = value;\r\n this.$destroy();\r\n },\r\n enterPressed(e) {\r\n if(this.confirmWithEnter) {\r\n e.stopPropagation();\r\n this.choose(false);\r\n }\r\n },\r\n escapePressed() {\r\n if(this.cancelWithEscape)\r\n this.choose(true);\r\n },\r\n },\r\n name: 'vuetify-confirm-box',\r\n props: {\r\n actionsNegativeToPositive: Boolean,\r\n allowHtml: Boolean,\r\n buttonFalseColor: {\r\n type: String,\r\n default: 'secondary'\r\n },\r\n buttonTrueColor: {\r\n type: String,\r\n default: 'primary'\r\n },\r\n buttonFalseFlat: {\r\n type: Boolean,\r\n default: true\r\n },\r\n buttonTrueFlat: {\r\n type: Boolean,\r\n default: false\r\n },\r\n buttonFalseText: String,\r\n buttonTrueText: String,\r\n cancelWithEscape: {\r\n type: Boolean,\r\n default: true\r\n },\r\n color: {\r\n type: String,\r\n default: null\r\n },\r\n confirmWithEnter: {\r\n type: Boolean,\r\n default: false\r\n },\r\n message: {\r\n type: String,\r\n required: true\r\n },\r\n persistent: Boolean,\r\n showIcon: {\r\n type: Boolean,\r\n default: true\r\n },\r\n showToolbar: {\r\n type: Boolean,\r\n default: true\r\n },\r\n smartActions: Boolean,\r\n theme: {\r\n type: String, // dark | light\r\n default: 'light'\r\n },\r\n title: String,\r\n type: {\r\n type: String, // info | warning | success | error\r\n required: true\r\n },\r\n width: {\r\n type: Number,\r\n default: 450\r\n }\r\n }\r\n}\r\n</script>\r\n\r\n<style scoped>\r\n.border-bottom {\r\n border-bottom: 1px solid #eee !important;\r\n}\r\n</style>"]}, media: undefined });
};
/* scoped */
var __vue_scope_id__ = "data-v-5968ef60";
var __vue_scope_id__ = "data-v-4b6ce9df";
/* module identifier */

@@ -494,0 +493,0 @@ var __vue_module_identifier__ = undefined;

2

package.json

@@ -5,3 +5,3 @@ {

"description": "This plugin make the vuetify custom confirm prompts easier and fluent",
"version": "1.0.8",
"version": "1.0.10",
"main": "dist/VuetifyConfirmBox.umd.js",

@@ -8,0 +8,0 @@ "module": "dist/VuetifyConfirmBox.esm.js",

@@ -42,5 +42,6 @@ # Vuetify Confirm Box

* **persistent:** This will prevent the user to exit the confirmation box by clicking outside of the box. `default: false`
* **showIcon:** This will toggle the toolbar icon visibility.
* **showIcon:** This will toggle the toolbar icon visibility `default: true`
* **showToolbar:** This will toggle the toolbar it self `default: true`
* **smartActions:** Setting `smartActions` is possible globaly and per component call like `actionsNegativeToPositive` option. **This option** will order the action buttons based on the first alphabet. so for example it will render **['Cancel', 'Ok']** like `Cancel` and `Ok` but **['Yes', 'No']** like `No` then `Yes`.
* **theme:** Set the confirmation box theme to `dark` or `light`. `default: light`
* **width:** Set then maximum width for the box. `default: 450`

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc