quasar-ui-danx 0.2.11 → 0.2.12
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/dist/danx.es.js +204 -202
- package/dist/danx.umd.js +2 -2
- package/package.json +2 -2
- package/src/components/ActionTable/Filters/FilterToolbarLayout.vue +2 -2
- package/src/components/ActionTable/listControls.ts +2 -2
- package/src/components/Utility/Formats/IconWithTextFormat.vue +1 -1
- package/src/helpers/FlashMessages.ts +65 -65
package/package.json
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
{
|
2
2
|
"name": "quasar-ui-danx",
|
3
|
-
"version": "0.2.
|
3
|
+
"version": "0.2.12",
|
4
4
|
"author": "Dan <dan@flytedesk.com>",
|
5
5
|
"description": "DanX Vue / Quasar component library",
|
6
6
|
"license": "MIT",
|
7
7
|
"type": "module",
|
8
8
|
"main": "dist/danx.es.js",
|
9
|
-
"module": "
|
9
|
+
"module": "src/index.ts",
|
10
10
|
"scripts": {
|
11
11
|
"dev": "cd dev && quasar dev && cd ..",
|
12
12
|
"build": "vite build",
|
@@ -13,8 +13,8 @@
|
|
13
13
|
</div>
|
14
14
|
|
15
15
|
<div v-if="$slots['right-side']" class="flex justify-end items-stretch flex-nowrap p-4">
|
16
|
-
<QSeparator vertical class="mx-4 h-10 self-center" />
|
17
|
-
|
16
|
+
<QSeparator v-if="$slots['default']" vertical class="mx-4 h-10 self-center" />
|
17
|
+
{{ $slots['default'] }}HERE
|
18
18
|
<slot name="right-side" />
|
19
19
|
</div>
|
20
20
|
</div>
|
@@ -115,7 +115,7 @@ export function useListControls(name: string, {
|
|
115
115
|
|
116
116
|
if (Object.keys(urlFilter).length > 0) {
|
117
117
|
filter.value = urlFilter;
|
118
|
-
|
118
|
+
|
119
119
|
// Override whatever is in local storage with this new filter
|
120
120
|
updateSettings("filter", filter.value);
|
121
121
|
}
|
@@ -252,7 +252,7 @@ export function useListControls(name: string, {
|
|
252
252
|
* @returns {Promise<void>}
|
253
253
|
*/
|
254
254
|
async function getActiveItemDetails() {
|
255
|
-
if (!activeItem.value) return;
|
255
|
+
if (!activeItem.value || !itemDetailsRoute) return;
|
256
256
|
|
257
257
|
const result = await itemDetailsRoute(activeItem.value);
|
258
258
|
|
@@ -1,79 +1,79 @@
|
|
1
1
|
import { watch } from "vue";
|
2
2
|
|
3
3
|
export class FlashMessages {
|
4
|
-
|
4
|
+
static notify;
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
6
|
+
static PROP_DEFINITIONS = {
|
7
|
+
successMsg: {
|
8
|
+
type: String,
|
9
|
+
default: ""
|
10
|
+
},
|
11
|
+
errorMsg: {
|
12
|
+
type: String,
|
13
|
+
default: ""
|
14
|
+
},
|
15
|
+
warningMsg: {
|
16
|
+
type: String,
|
17
|
+
default: ""
|
18
|
+
}
|
19
|
+
};
|
20
20
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
21
|
+
static enable(msgProps) {
|
22
|
+
FlashMessages.success(msgProps.successMsg);
|
23
|
+
FlashMessages.error(msgProps.errorMsg);
|
24
|
+
FlashMessages.warning(msgProps.warningMsg);
|
25
|
+
watch(() => msgProps.successMsg, FlashMessages.success);
|
26
|
+
watch(() => msgProps.errorMsg, FlashMessages.error);
|
27
|
+
watch(() => msgProps.warningMsg, FlashMessages.warning);
|
28
|
+
}
|
29
29
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
30
|
+
static send(message, options = {}) {
|
31
|
+
if (message) {
|
32
|
+
FlashMessages.notify({
|
33
|
+
message,
|
34
|
+
timeout: 10000,
|
35
|
+
color: "gray-base",
|
36
|
+
textColor: "white",
|
37
|
+
position: "top",
|
38
|
+
closeBtn: "X",
|
39
|
+
...options
|
40
|
+
});
|
41
|
+
}
|
41
42
|
}
|
42
|
-
}
|
43
43
|
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
44
|
+
static success(message, options = {}) {
|
45
|
+
FlashMessages.send(message, {
|
46
|
+
color: "green-light",
|
47
|
+
textColor: "green-dark",
|
48
|
+
icon: "hero:check-circle",
|
49
|
+
...options
|
50
|
+
});
|
51
|
+
}
|
52
52
|
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
53
|
+
static error(message, options = {}) {
|
54
|
+
FlashMessages.send(message, {
|
55
|
+
color: "red-light",
|
56
|
+
textColor: "red-dark",
|
57
|
+
icon: "hero:alert",
|
58
|
+
...options
|
59
|
+
});
|
60
|
+
}
|
61
61
|
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
62
|
+
static warning(message, options = {}) {
|
63
|
+
FlashMessages.send(message, {
|
64
|
+
color: "yellow-lighter",
|
65
|
+
textColor: "yellow-base",
|
66
|
+
icon: "hero:alert",
|
67
|
+
...options
|
68
|
+
});
|
69
|
+
}
|
70
70
|
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
71
|
+
static combine(type, messages, options = {}) {
|
72
|
+
FlashMessages[type](messages.map(m => typeof m === "string" ? m : (m.message || m.Message)).join("<br/>"), {
|
73
|
+
...options,
|
74
|
+
html: true
|
75
|
+
});
|
76
|
+
}
|
77
77
|
}
|
78
78
|
|
79
79
|
export const notify = new FlashMessages();
|