@monoui/vuejs 1.1.28 → 1.1.31

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@monoui/vuejs",
3
- "version": "1.1.28",
3
+ "version": "1.1.31",
4
4
  "description": "This project will contain MonoFor UI Framework",
5
5
  "main": "./dist/main.js",
6
6
  "repository": "git@gitlab.com:monoui/vuejs.git",
@@ -38,7 +38,7 @@
38
38
  "vue-multiselect": "^2.1.6",
39
39
  "vue-server-renderer": "^2.6.12",
40
40
  "vue-sweetalert": "^0.1.18",
41
- "vue-sweetalert2": "^2.1.5",
41
+ "vue-sweetalert2": "^4.2",
42
42
  "vue-template-compiler": "^2.6.12",
43
43
  "vue-test-utils": "^1.0.0-beta.11",
44
44
  "vue2-datepicker": "^3.6.2",
@@ -66,6 +66,29 @@ export default {
66
66
  type: String,
67
67
  required: false,
68
68
  default: "No, cancel!"
69
+ },
70
+ /**
71
+ * Show Deny button.
72
+ * @type Boolean
73
+ */
74
+ showDenyButton: {
75
+ type: Boolean,
76
+ required: false,
77
+ default: false
78
+ },
79
+ /**
80
+ * Deny button text.
81
+ * @type String
82
+ */
83
+ denyButtonText: {
84
+ type: String,
85
+ required: false,
86
+ default: "Don't save"
87
+ },
88
+ denyButtonColor: {
89
+ type: String,
90
+ required: false,
91
+ default: "#dd6b55"
69
92
  }
70
93
  },
71
94
  methods: {
@@ -84,7 +107,10 @@ export default {
84
107
  reverseButtons: true,
85
108
  confirmButtonColor: this.confirmButtonColor,
86
109
  confirmButtonText: this.confirmButtonText,
87
- cancelButtonText: this.cancelButtonText
110
+ cancelButtonText: this.cancelButtonText,
111
+ showDenyButton: this.showDenyButton,
112
+ denyButtonText: this.denyButtonText,
113
+ denyButtonColor: this.denyButtonColor
88
114
  }).then(result => {
89
115
  if (result.value === true) {
90
116
  this.onConfirm();
@@ -7,22 +7,32 @@ export default {
7
7
  onConfirm,
8
8
  confirmButtonText = "Confirm",
9
9
  confirmButtonColor = "#000",
10
- cancelButtonText = "No, cancel!"
10
+ cancelButtonText = "No, cancel!",
11
+ showDenyButton = false,
12
+ denyButtonText = "No",
13
+ denyButtonColor = "#dd6b55",
14
+ onDenied
11
15
  ) {
12
16
  this.$swal({
13
17
  title: title,
14
- type: type,
18
+ icon: type,
15
19
  html: text,
16
20
  showCancelButton: true,
17
21
  focusConfirm: false,
18
22
  reverseButtons: true,
19
23
  confirmButtonColor: confirmButtonColor,
20
24
  confirmButtonText: confirmButtonText,
21
- cancelButtonText: cancelButtonText
25
+ cancelButtonText: cancelButtonText,
26
+ showDenyButton: showDenyButton,
27
+ denyButtonText: denyButtonText,
28
+ denyButtonColor: denyButtonColor
22
29
  }).then(result => {
23
- if (result.value === true) {
30
+ if (result.isConfirmed) {
24
31
  onConfirm();
25
32
  }
33
+ if (result.isDenied) {
34
+ onDenied();
35
+ }
26
36
  });
27
37
  };
28
38
 
package/src/icons.js CHANGED
@@ -62,7 +62,8 @@ import {
62
62
  faStar,
63
63
  faSort,
64
64
  faSortUp,
65
- faSortDown
65
+ faSortDown,
66
+ faStethoscope
66
67
  } from "@fortawesome/free-solid-svg-icons";
67
68
  import {
68
69
  faFontAwesome,
@@ -138,7 +139,8 @@ library.add(
138
139
  faStar,
139
140
  faSort,
140
141
  faSortUp,
141
- faSortDown
142
+ faSortDown,
143
+ faStethoscope
142
144
  );
143
145
 
144
146
  export { FontAwesomeIcon };