quasar-ui-danx 0.2.11 → 0.2.12

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "quasar-ui-danx",
3
- "version": "0.2.11",
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": "dist/danx.es.js",
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,5 +1,5 @@
1
1
  <template>
2
- <div class="flex items-center">
2
+ <div class="flex items-center flex-nowrap">
3
3
  <component :is="icon" :class="iconClass" />
4
4
  <div :class="textClass">
5
5
  <slot>{{ text }}</slot>
@@ -1,79 +1,79 @@
1
1
  import { watch } from "vue";
2
2
 
3
3
  export class FlashMessages {
4
- static notify;
4
+ static notify;
5
5
 
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
- };
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
- 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
- }
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
- static send(message, options = {}) {
31
- if (message) {
32
- FlashMessages.notify({
33
- message,
34
- timeout: 2500,
35
- color: "gray-base",
36
- textColor: "white",
37
- position: "top",
38
- closeBtn: "X",
39
- ...options
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
- 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
- }
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
- static error(message, options = {}) {
54
- FlashMessages.send(message, {
55
- color: "red-light",
56
- textColor: "red-dark",
57
- icon: "hero:alert",
58
- ...options
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
- static warning(message, options = {}) {
63
- FlashMessages.send(message, {
64
- color: "yellow-lighter",
65
- textColor: "yellow-base",
66
- icon: "hero:alert",
67
- ...options
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
- 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
- }
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();