vueless 0.0.139 → 0.0.141
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/index.js +1 -1
- package/package.json +2 -2
- package/ui.button/index.vue +16 -13
- package/ui.text-notify/Docs.mdx +39 -35
- package/ui.text-notify/configs/default.config.js +11 -12
- package/ui.text-notify/constants/index.js +10 -0
- package/ui.text-notify/index.stories.js +43 -26
- package/ui.text-notify/index.vue +13 -6
- package/ui.text-notify/services/index.js +35 -38
- package/web-types.json +22 -21
package/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vueless",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.141",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Vue Styleless Component Framework.",
|
|
6
6
|
"homepage": "https://vueless.com",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@release-it/bumper": "^6.0.1",
|
|
38
38
|
"@vitejs/plugin-vue": "^5.0.4",
|
|
39
39
|
"@vue/eslint-config-prettier": "^9.0.0",
|
|
40
|
-
"@vueless/plugin-vite": "^0.0.
|
|
40
|
+
"@vueless/plugin-vite": "^0.0.27",
|
|
41
41
|
"@vueless/storybook": "^0.0.27",
|
|
42
42
|
"@vueless/web-types": "^0.0.8",
|
|
43
43
|
"autoprefixer": "^10.4.19",
|
package/ui.button/index.vue
CHANGED
|
@@ -45,14 +45,6 @@ const props = defineProps({
|
|
|
45
45
|
default: UIService.get(defaultConfig, UButton).default.variant,
|
|
46
46
|
},
|
|
47
47
|
|
|
48
|
-
/**
|
|
49
|
-
* Fill the background for thirdary variant.
|
|
50
|
-
*/
|
|
51
|
-
filled: {
|
|
52
|
-
type: Boolean,
|
|
53
|
-
default: UIService.get(defaultConfig, UButton).default.filled,
|
|
54
|
-
},
|
|
55
|
-
|
|
56
48
|
/**
|
|
57
49
|
* Button color.
|
|
58
50
|
* @values brand, grayscale, gray, red, orange, amber, yellow, lime, green, emerald, teal, cyan, sky, blue, indigo, violet, purple, fuchsia, pink, rose, white
|
|
@@ -79,6 +71,22 @@ const props = defineProps({
|
|
|
79
71
|
default: "",
|
|
80
72
|
},
|
|
81
73
|
|
|
74
|
+
/**
|
|
75
|
+
* Allows changing button html tag.
|
|
76
|
+
*/
|
|
77
|
+
tag: {
|
|
78
|
+
type: String,
|
|
79
|
+
default: UIService.get(defaultConfig, UButton).default.tag,
|
|
80
|
+
},
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Fill the background for thirdary variant.
|
|
84
|
+
*/
|
|
85
|
+
filled: {
|
|
86
|
+
type: Boolean,
|
|
87
|
+
default: UIService.get(defaultConfig, UButton).default.filled,
|
|
88
|
+
},
|
|
89
|
+
|
|
82
90
|
/**
|
|
83
91
|
* Disable the button.
|
|
84
92
|
*/
|
|
@@ -136,11 +144,6 @@ const props = defineProps({
|
|
|
136
144
|
default: () => ({}),
|
|
137
145
|
},
|
|
138
146
|
|
|
139
|
-
tag: {
|
|
140
|
-
type: String,
|
|
141
|
-
default: UIService.get(defaultConfig, UButton).default.tag,
|
|
142
|
-
},
|
|
143
|
-
|
|
144
147
|
/**
|
|
145
148
|
* Data-cy attribute for automated testing.
|
|
146
149
|
*/
|
package/ui.text-notify/Docs.mdx
CHANGED
|
@@ -15,70 +15,74 @@ import defaultConfig from "./configs/default.config?raw"
|
|
|
15
15
|
## **Default config**
|
|
16
16
|
<Source code={getSource(defaultConfig)} language="jsx" dark />
|
|
17
17
|
|
|
18
|
-
##
|
|
19
|
-
You can trigger notification using
|
|
18
|
+
## Triggering notification
|
|
19
|
+
You can trigger notification using `notify` method.
|
|
20
|
+
Use `notifySuccess`, `notifyWarning`, `notifyError` shortcut methods to trigger notification of a specific type.
|
|
20
21
|
|
|
21
22
|
<Source code={`
|
|
22
23
|
import {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
notify,
|
|
25
|
+
notifySuccess,
|
|
26
|
+
notifyWarning,
|
|
27
|
+
notifyError,
|
|
27
28
|
} from "vueless";
|
|
28
29
|
|
|
29
30
|
notify({
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
type: "success", // @values: success, warning, error
|
|
32
|
+
label: "Hurray!",
|
|
33
|
+
description: "The file successfully downloaded.",
|
|
34
|
+
duration: 1000, // in milliseconds
|
|
35
|
+
ignoreDuplicates: false // ignore notifications with the same 'description'
|
|
35
36
|
});
|
|
36
37
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
notifyWarning("Some warning text", durationInMilliseconds);
|
|
41
|
-
notifyError("Some error text", durationInMilliseconds);
|
|
38
|
+
notifySuccess({ description: "The file successfully downloaded." });
|
|
39
|
+
notifyWarning({ description: "The file have been downloaded, but some data is missing." });
|
|
40
|
+
notifyError({ description: "The file can't be downloaded, please check the fields and try again." });
|
|
42
41
|
`} language="jsx" dark />
|
|
43
42
|
|
|
44
|
-
## Clear
|
|
45
|
-
Use
|
|
43
|
+
## Clear notifications
|
|
44
|
+
Use `clearNotifications` method to clear active notifications.
|
|
46
45
|
|
|
47
46
|
<Source code={`
|
|
48
|
-
import {
|
|
47
|
+
import { clearNotifications, notifySuccess } from "vueless";
|
|
49
48
|
|
|
50
|
-
|
|
51
|
-
notifySuccess("Some success text", durationInMilliseconds);
|
|
49
|
+
notifySuccess({ description: "The file successfully downloaded." });
|
|
52
50
|
|
|
53
|
-
|
|
51
|
+
// and somewhere below
|
|
52
|
+
clearNotifications();
|
|
54
53
|
`} language="jsx" dark />
|
|
55
54
|
|
|
56
55
|
## Trigger notifications
|
|
57
|
-
You can create delayed notification which you can trigger any time later.
|
|
56
|
+
You can create a delayed notification which you can trigger any time later.
|
|
58
57
|
|
|
59
58
|
<Source code={`
|
|
60
59
|
import { setDelayedNotify, getDelayedNotify } from "vueless";
|
|
61
60
|
|
|
62
61
|
setDelayedNotify({
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
62
|
+
type: "success", // @values: success, warning, error
|
|
63
|
+
label: "Hurray!",
|
|
64
|
+
description: "The file successfully downloaded.",
|
|
65
|
+
duration: 1000, // in milliseconds
|
|
66
|
+
ignoreDuplicates: false // ignore notifications with the same 'description'
|
|
68
67
|
});
|
|
69
68
|
|
|
70
|
-
|
|
69
|
+
// and somewhere below
|
|
70
|
+
getDelayedNotify();
|
|
71
71
|
`} language="jsx" dark />
|
|
72
72
|
|
|
73
|
-
##
|
|
74
|
-
|
|
75
|
-
|
|
73
|
+
## Align notification relatively to the layout
|
|
74
|
+
Use `positionClasses` in UNotify config to align a notification component related to layout.
|
|
75
|
+
* `page` – align UNotify inside an element with provided class (UNotifyPage is a default class name).
|
|
76
|
+
* `aside` – add shift for aside width (UNotifyAside is a default class name).
|
|
76
77
|
|
|
77
78
|
<Source code={`
|
|
78
|
-
|
|
79
|
+
{
|
|
80
|
+
...
|
|
81
|
+
UNotify: {
|
|
79
82
|
positionClasses: {
|
|
80
|
-
|
|
81
|
-
|
|
83
|
+
page: "UNotifyPage",
|
|
84
|
+
aside: "UNotifyAside",
|
|
82
85
|
},
|
|
86
|
+
}
|
|
83
87
|
}
|
|
84
88
|
`} language="jsx" dark />
|
|
@@ -1,15 +1,22 @@
|
|
|
1
1
|
export default /*tw*/ {
|
|
2
|
+
transitionGroup: {
|
|
3
|
+
moveClass: "transition-all duration-500",
|
|
4
|
+
enterActiveClass: "transition-all duration-500",
|
|
5
|
+
leaveActiveClass: "transition-all duration-500 absolute",
|
|
6
|
+
enterFromClass: "opacity-0",
|
|
7
|
+
leaveToClass: "opacity-0",
|
|
8
|
+
},
|
|
2
9
|
wrapper: "absolute overflow-visible md:w-[22rem]",
|
|
3
10
|
body: `
|
|
4
|
-
mb-3 flex w-
|
|
11
|
+
mb-3 flex w-full items-center justify-center gap-3 rounded-2xl bg-gray-900/90
|
|
5
12
|
p-4 shadow-[0_4px_16px_rgba(17,24,39,0.5)] backdrop-blur-md md:shadow-[0_0px_12px_rgba(0,0,0,0.25)]
|
|
6
13
|
`,
|
|
7
14
|
bodySuccess: "bg-[radial-gradient(100.16%_500.78%_at_0%_50%,rgba(74,222,128,0.1)_2.17%,transparent)]",
|
|
8
15
|
bodyWarning: "bg-[radial-gradient(100.16%_500.78%_at_0%_50%,rgba(251,146,60,0.2)_2.17%,transparent)]",
|
|
9
16
|
bodyError: "bg-[radial-gradient(100.16%_500.78%_at_0%_50%,rgba(251,113,133,0.2)_2.17%,transparent)]",
|
|
10
|
-
content: "w-full flex flex-col max-w-full
|
|
11
|
-
label: "mb-
|
|
12
|
-
description: "break-words font-normal
|
|
17
|
+
content: "w-full flex flex-col max-w-full text-sm text-gray-200",
|
|
18
|
+
label: "mb-0.5 font-medium",
|
|
19
|
+
description: "break-words font-normal",
|
|
13
20
|
successIcon: "",
|
|
14
21
|
successIconName: "check_circle",
|
|
15
22
|
warningIcon: "",
|
|
@@ -18,13 +25,6 @@ export default /*tw*/ {
|
|
|
18
25
|
errorIconName: "error",
|
|
19
26
|
closeIcon: "",
|
|
20
27
|
closeIconName: "close",
|
|
21
|
-
transitionGroup: {
|
|
22
|
-
moveClass: "transition-all duration-500",
|
|
23
|
-
enterActiveClass: "transition-all duration-500",
|
|
24
|
-
leaveActiveClass: "transition-all duration-500 absolute",
|
|
25
|
-
enterFromClass: "opacity-0",
|
|
26
|
-
leaveToClass: "opacity-0",
|
|
27
|
-
},
|
|
28
28
|
duration: {
|
|
29
29
|
short: 4000,
|
|
30
30
|
medium: 8000,
|
|
@@ -48,6 +48,5 @@ export default /*tw*/ {
|
|
|
48
48
|
defaultVariants: {
|
|
49
49
|
xPosition: "center",
|
|
50
50
|
yPosition: "top",
|
|
51
|
-
vHtml: false,
|
|
52
51
|
},
|
|
53
52
|
};
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
*/
|
|
5
5
|
export const UNotify = "UNotify";
|
|
6
6
|
|
|
7
|
+
export const LOCAL_STORAGE_ID = "vueless:notify";
|
|
8
|
+
|
|
7
9
|
export const NOTIFY_TYPE = {
|
|
8
10
|
success: "success",
|
|
9
11
|
warning: "warning",
|
|
@@ -17,3 +19,11 @@ export const POSITION = {
|
|
|
17
19
|
bottom: "bottom",
|
|
18
20
|
center: "center",
|
|
19
21
|
};
|
|
22
|
+
|
|
23
|
+
export const DURATION = {
|
|
24
|
+
short: 4000,
|
|
25
|
+
medium: 8000,
|
|
26
|
+
long: 12000,
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export const DELAY_BETWEEN_CLONES = 1000;
|
|
@@ -2,6 +2,7 @@ import { notify } from "./services";
|
|
|
2
2
|
|
|
3
3
|
import UNotify from "../ui.text-notify";
|
|
4
4
|
import UButton from "../ui.button";
|
|
5
|
+
import UGroup from "../ui.container-group";
|
|
5
6
|
|
|
6
7
|
import { getArgTypes } from "../service.storybook";
|
|
7
8
|
|
|
@@ -12,14 +13,16 @@ export default {
|
|
|
12
13
|
id: "4035",
|
|
13
14
|
title: "Text & Content / Notify",
|
|
14
15
|
component: UNotify,
|
|
15
|
-
args: {
|
|
16
|
-
type: "success",
|
|
17
|
-
label: "",
|
|
18
|
-
text: "",
|
|
19
|
-
},
|
|
20
16
|
argTypes: {
|
|
21
17
|
...getArgTypes(UNotify.name),
|
|
22
18
|
},
|
|
19
|
+
parameters: {
|
|
20
|
+
docs: {
|
|
21
|
+
story: {
|
|
22
|
+
height: "280px",
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
},
|
|
23
26
|
};
|
|
24
27
|
|
|
25
28
|
const DefaultTemplate = (args) => ({
|
|
@@ -28,45 +31,59 @@ const DefaultTemplate = (args) => ({
|
|
|
28
31
|
return { args };
|
|
29
32
|
},
|
|
30
33
|
template: `
|
|
31
|
-
<
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
<UButton label="show notify" @click="onClick"/>
|
|
35
|
-
</div>
|
|
34
|
+
<UNotify class="m-4" v-bind="args" />
|
|
35
|
+
<UButton label="Show notify" @click="onClick"/>
|
|
36
36
|
`,
|
|
37
|
-
|
|
38
37
|
methods: {
|
|
39
38
|
onClick() {
|
|
40
|
-
|
|
39
|
+
notify({
|
|
41
40
|
type: "success",
|
|
42
|
-
label: "
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
notify(settings);
|
|
41
|
+
label: "Hurray!",
|
|
42
|
+
description: "The file successfully downloaded.",
|
|
43
|
+
});
|
|
46
44
|
},
|
|
47
45
|
},
|
|
48
46
|
});
|
|
49
47
|
|
|
50
48
|
const TypesTemplate = (args) => ({
|
|
51
|
-
components: { UNotify, UButton },
|
|
49
|
+
components: { UNotify, UButton, UGroup },
|
|
52
50
|
setup() {
|
|
53
51
|
return { args };
|
|
54
52
|
},
|
|
55
53
|
template: `
|
|
56
|
-
<
|
|
57
|
-
<UNotify />
|
|
54
|
+
<UNotify class="m-4" />
|
|
58
55
|
|
|
59
|
-
|
|
60
|
-
<UButton label="
|
|
61
|
-
<UButton label="
|
|
62
|
-
|
|
56
|
+
<UGroup>
|
|
57
|
+
<UButton label="Success" color="green" @click="onClick('success')"/>
|
|
58
|
+
<UButton label="Warning" color="orange" @click="onClick('warning')"/>
|
|
59
|
+
<UButton label="Error" color="red" @click="onClick('error')"/>
|
|
60
|
+
</UGroup>
|
|
63
61
|
`,
|
|
64
|
-
|
|
65
62
|
methods: {
|
|
66
63
|
onClick(type) {
|
|
67
|
-
|
|
64
|
+
if (type === "success") {
|
|
65
|
+
notify({
|
|
66
|
+
type,
|
|
67
|
+
label: "Hurray!",
|
|
68
|
+
description: "The file successfully downloaded.",
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
if (type === "warning") {
|
|
73
|
+
notify({
|
|
74
|
+
type,
|
|
75
|
+
label: "Be aware!",
|
|
76
|
+
description: "The file have been downloaded, but some data is missing.",
|
|
77
|
+
});
|
|
78
|
+
}
|
|
68
79
|
|
|
69
|
-
|
|
80
|
+
if (type === "error") {
|
|
81
|
+
notify({
|
|
82
|
+
type,
|
|
83
|
+
label: "Ooops!",
|
|
84
|
+
description: "The file can't be downloaded, please check the fields and try again.",
|
|
85
|
+
});
|
|
86
|
+
}
|
|
70
87
|
},
|
|
71
88
|
},
|
|
72
89
|
});
|
package/ui.text-notify/index.vue
CHANGED
|
@@ -45,13 +45,20 @@
|
|
|
45
45
|
/>
|
|
46
46
|
|
|
47
47
|
<div v-bind="contentAttrs">
|
|
48
|
-
<template v-if="
|
|
48
|
+
<template v-if="html">
|
|
49
49
|
<span v-bind="labelAttrs" v-html="notification.label" />
|
|
50
|
-
<span
|
|
50
|
+
<span
|
|
51
|
+
v-bind="descriptionAttrs"
|
|
52
|
+
v-html="getText(notification.description, notification.type)"
|
|
53
|
+
/>
|
|
51
54
|
</template>
|
|
55
|
+
|
|
52
56
|
<template v-else>
|
|
53
57
|
<span v-bind="labelAttrs" v-text="notification.label" />
|
|
54
|
-
<span
|
|
58
|
+
<span
|
|
59
|
+
v-bind="descriptionAttrs"
|
|
60
|
+
v-text="getText(notification.description, notification.type)"
|
|
61
|
+
/>
|
|
55
62
|
</template>
|
|
56
63
|
</div>
|
|
57
64
|
|
|
@@ -106,11 +113,11 @@ const props = defineProps({
|
|
|
106
113
|
},
|
|
107
114
|
|
|
108
115
|
/**
|
|
109
|
-
* Use
|
|
116
|
+
* Use html to render you own content.
|
|
110
117
|
*/
|
|
111
|
-
|
|
118
|
+
html: {
|
|
112
119
|
type: Boolean,
|
|
113
|
-
default: UIService.get(defaultConfig, UNotify).default.
|
|
120
|
+
default: UIService.get(defaultConfig, UNotify).default.html,
|
|
114
121
|
},
|
|
115
122
|
|
|
116
123
|
/**
|
|
@@ -1,89 +1,86 @@
|
|
|
1
1
|
import { globalComponentConfig, getRandomId } from "../../service.ui";
|
|
2
|
+
import { DELAY_BETWEEN_CLONES, DURATION, LOCAL_STORAGE_ID, NOTIFY_TYPE } from "../constants";
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const delayBetweenClones = 1000;
|
|
4
|
+
const globalNotifyDuration = globalComponentConfig.UNotify?.duration;
|
|
5
|
+
const notifyClearAllEvent = new Event("notifyClearAll");
|
|
6
6
|
|
|
7
7
|
let lastMessageTime = undefined;
|
|
8
8
|
let lastMessage = undefined;
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
short
|
|
12
|
-
medium: 8000,
|
|
13
|
-
long: 12000,
|
|
14
|
-
};
|
|
10
|
+
export function notify({ type, label, description, duration, ignoreDuplicates } = {}) {
|
|
11
|
+
const notifyDuration = duration || globalNotifyDuration?.short || DURATION.short;
|
|
15
12
|
|
|
16
|
-
const
|
|
13
|
+
const isSameMessage =
|
|
14
|
+
lastMessage === description && new Date() - lastMessageTime < DELAY_BETWEEN_CLONES;
|
|
17
15
|
|
|
18
|
-
|
|
19
|
-
const { type, label, text, duration, delayDuplicates } = settings;
|
|
20
|
-
const currentNotifyDuration =
|
|
21
|
-
duration || globalComponentConfig.UNotify?.duration?.short || defaultDuration.short;
|
|
22
|
-
const isSameMessage = lastMessage === text && new Date() - lastMessageTime < delayBetweenClones;
|
|
23
|
-
|
|
24
|
-
if ((isSameMessage || !text) && delayDuplicates) {
|
|
16
|
+
if ((isSameMessage || !description) && ignoreDuplicates) {
|
|
25
17
|
return;
|
|
26
18
|
}
|
|
27
19
|
|
|
28
20
|
lastMessageTime = new Date();
|
|
29
|
-
lastMessage =
|
|
21
|
+
lastMessage = description;
|
|
30
22
|
|
|
31
|
-
const
|
|
23
|
+
const eventDetail = {
|
|
32
24
|
type,
|
|
33
25
|
id: getRandomId(),
|
|
34
26
|
label: label || "",
|
|
35
|
-
|
|
36
|
-
duration:
|
|
27
|
+
description: description || "",
|
|
28
|
+
duration: notifyDuration,
|
|
37
29
|
};
|
|
38
30
|
|
|
39
|
-
const notifyStart = new CustomEvent("notifyStart", { detail });
|
|
40
|
-
const notifyEnd = new CustomEvent("notifyEnd", { detail });
|
|
31
|
+
const notifyStart = new CustomEvent("notifyStart", { detail: eventDetail });
|
|
32
|
+
const notifyEnd = new CustomEvent("notifyEnd", { detail: eventDetail });
|
|
41
33
|
|
|
42
34
|
window.dispatchEvent(notifyStart);
|
|
43
35
|
|
|
44
|
-
setTimeout(() => window.dispatchEvent(notifyEnd),
|
|
36
|
+
setTimeout(() => window.dispatchEvent(notifyEnd), notifyDuration);
|
|
45
37
|
}
|
|
46
38
|
|
|
47
|
-
export function notifySuccess(
|
|
39
|
+
export function notifySuccess({ label, description, duration, ignoreDuplicates } = {}) {
|
|
48
40
|
notify({
|
|
41
|
+
label,
|
|
42
|
+
description,
|
|
43
|
+
ignoreDuplicates,
|
|
49
44
|
type: NOTIFY_TYPE.success,
|
|
50
|
-
|
|
51
|
-
duration,
|
|
45
|
+
duration: duration || globalNotifyDuration?.short || DURATION.short,
|
|
52
46
|
});
|
|
53
47
|
}
|
|
54
48
|
|
|
55
|
-
export function notifyWarning(
|
|
49
|
+
export function notifyWarning({ label, description, duration, ignoreDuplicates } = {}) {
|
|
56
50
|
notify({
|
|
51
|
+
label,
|
|
52
|
+
description,
|
|
53
|
+
ignoreDuplicates,
|
|
57
54
|
type: NOTIFY_TYPE.warning,
|
|
58
|
-
|
|
59
|
-
duration,
|
|
55
|
+
duration: duration || globalNotifyDuration?.medium || DURATION.medium,
|
|
60
56
|
});
|
|
61
57
|
}
|
|
62
58
|
|
|
63
|
-
export function notifyError(
|
|
59
|
+
export function notifyError({ label, description, duration, ignoreDuplicates } = {}) {
|
|
64
60
|
notify({
|
|
61
|
+
label,
|
|
62
|
+
description,
|
|
63
|
+
ignoreDuplicates,
|
|
65
64
|
type: NOTIFY_TYPE.error,
|
|
66
|
-
|
|
67
|
-
duration,
|
|
65
|
+
duration: duration || globalNotifyDuration?.long || DURATION.long,
|
|
68
66
|
});
|
|
69
67
|
}
|
|
70
68
|
|
|
71
|
-
export function
|
|
69
|
+
export function clearNotifications() {
|
|
72
70
|
window.dispatchEvent(notifyClearAllEvent);
|
|
73
71
|
}
|
|
74
72
|
|
|
75
73
|
export function setDelayedNotify(settings) {
|
|
76
|
-
localStorage.setItem(
|
|
74
|
+
localStorage.setItem(LOCAL_STORAGE_ID, JSON.stringify(settings));
|
|
77
75
|
}
|
|
78
76
|
|
|
79
77
|
export function getDelayedNotify() {
|
|
80
|
-
const notifyData = JSON.parse(localStorage.getItem(
|
|
78
|
+
const notifyData = JSON.parse(localStorage.getItem(LOCAL_STORAGE_ID));
|
|
81
79
|
|
|
82
|
-
|
|
80
|
+
clearNotifications();
|
|
83
81
|
|
|
84
82
|
if (notifyData) {
|
|
85
83
|
notify(notifyData);
|
|
86
|
-
|
|
87
|
-
localStorage.removeItem("notify");
|
|
84
|
+
localStorage.removeItem(LOCAL_STORAGE_ID);
|
|
88
85
|
}
|
|
89
86
|
}
|
package/web-types.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"framework": "vue",
|
|
3
3
|
"name": "vueless",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.141",
|
|
5
5
|
"contributions": {
|
|
6
6
|
"html": {
|
|
7
7
|
"description-markup": "markdown",
|
|
@@ -553,15 +553,6 @@
|
|
|
553
553
|
},
|
|
554
554
|
"default": "primary"
|
|
555
555
|
},
|
|
556
|
-
{
|
|
557
|
-
"name": "filled",
|
|
558
|
-
"description": "Fill the background for thirdary variant.",
|
|
559
|
-
"value": {
|
|
560
|
-
"kind": "expression",
|
|
561
|
-
"type": "boolean"
|
|
562
|
-
},
|
|
563
|
-
"default": "false"
|
|
564
|
-
},
|
|
565
556
|
{
|
|
566
557
|
"name": "color",
|
|
567
558
|
"description": "Button color.",
|
|
@@ -589,6 +580,24 @@
|
|
|
589
580
|
},
|
|
590
581
|
"default": "\"\""
|
|
591
582
|
},
|
|
583
|
+
{
|
|
584
|
+
"name": "tag",
|
|
585
|
+
"description": "Allows changing button html tag.",
|
|
586
|
+
"value": {
|
|
587
|
+
"kind": "expression",
|
|
588
|
+
"type": "string"
|
|
589
|
+
},
|
|
590
|
+
"default": "button"
|
|
591
|
+
},
|
|
592
|
+
{
|
|
593
|
+
"name": "filled",
|
|
594
|
+
"description": "Fill the background for thirdary variant.",
|
|
595
|
+
"value": {
|
|
596
|
+
"kind": "expression",
|
|
597
|
+
"type": "boolean"
|
|
598
|
+
},
|
|
599
|
+
"default": "false"
|
|
600
|
+
},
|
|
592
601
|
{
|
|
593
602
|
"name": "disabled",
|
|
594
603
|
"description": "Disable the button.",
|
|
@@ -652,14 +661,6 @@
|
|
|
652
661
|
},
|
|
653
662
|
"default": "{}"
|
|
654
663
|
},
|
|
655
|
-
{
|
|
656
|
-
"name": "tag",
|
|
657
|
-
"value": {
|
|
658
|
-
"kind": "expression",
|
|
659
|
-
"type": "string"
|
|
660
|
-
},
|
|
661
|
-
"default": "button"
|
|
662
|
-
},
|
|
663
664
|
{
|
|
664
665
|
"name": "dataCy",
|
|
665
666
|
"description": "Data-cy attribute for automated testing.",
|
|
@@ -5119,13 +5120,13 @@
|
|
|
5119
5120
|
"default": "top"
|
|
5120
5121
|
},
|
|
5121
5122
|
{
|
|
5122
|
-
"name": "
|
|
5123
|
-
"description": "Use
|
|
5123
|
+
"name": "html",
|
|
5124
|
+
"description": "Use html to render you own content.",
|
|
5124
5125
|
"value": {
|
|
5125
5126
|
"kind": "expression",
|
|
5126
5127
|
"type": "boolean"
|
|
5127
5128
|
},
|
|
5128
|
-
"default": "
|
|
5129
|
+
"default": "UIService.get(defaultConfig, UNotify).default.html"
|
|
5129
5130
|
},
|
|
5130
5131
|
{
|
|
5131
5132
|
"name": "config",
|