Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Monster
Manage
Activity
Members
Plan
Jira
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OSS
Libraries
Javascript
Monster
Commits
873989c2
Commit
873989c2
authored
11 months ago
by
Volker Schukai
Browse files
Options
Downloads
Plain Diff
fix: #197 #195
parents
2abc01fb
2e6af70f
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CHANGELOG.md
+5
-0
5 additions, 0 deletions
CHANGELOG.md
source/components/datatable/datatable.mjs
+1
-6
1 addition, 6 deletions
source/components/datatable/datatable.mjs
source/components/notify/message.mjs
+9
-12
9 additions, 12 deletions
source/components/notify/message.mjs
with
15 additions
and
18 deletions
CHANGELOG.md
+
5
−
0
View file @
873989c2
# Changelog
# Changelog
## [3.65.1] - 2024-06-17
### Bug Fixes
-
close Button fix message.mjs
[
#197
](
https://gitlab.schukai.com/oss/libraries/javascript/monster/-/issues/197
)
-
remove style add fill="currentColor" in getEmptyTemplate method
[
#195
](
https://gitlab.schukai.com/oss/libraries/javascript/monster/-/issues/195
)
## [3.65.0] - 2024-04-15
## [3.65.0] - 2024-04-15
...
...
This diff is collapsed.
Click to expand it.
source/components/datatable/datatable.mjs
+
1
−
6
View file @
873989c2
...
@@ -946,12 +946,7 @@ function initOptionsFromArguments() {
...
@@ -946,12 +946,7 @@ function initOptionsFromArguments() {
function
getEmptyTemplate
()
{
function
getEmptyTemplate
()
{
return
`<monster-state data-monster-role="empty-without-action">
return
`<monster-state data-monster-role="empty-without-action">
<div part="visual">
<div part="visual">
<style>
<svg width="4rem" height="4rem" fill="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
path {
fill: var(--monster-bg-color-primary-4);
}
</style>
<svg width="4rem" height="4rem" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path d="m21.5 22h-19c-1.378 0-2.5-1.121-2.5-2.5v-7c0-.07.015-.141.044-.205l3.969-8.82c.404-.896 1.299-1.475 2.28-1.475h11.414c.981 0 1.876.579 2.28 1.475l3.969 8.82c.029.064.044.135.044.205v7c0 1.379-1.122 2.5-2.5 2.5zm-20.5-9.393v6.893c0 .827.673 1.5 1.5 1.5h19c.827 0 1.5-.673 1.5-1.5v-6.893l-3.925-8.723c-.242-.536-.779-.884-1.368-.884h-11.414c-.589 0-1.126.348-1.368.885z"/>
<path d="m21.5 22h-19c-1.378 0-2.5-1.121-2.5-2.5v-7c0-.07.015-.141.044-.205l3.969-8.82c.404-.896 1.299-1.475 2.28-1.475h11.414c.981 0 1.876.579 2.28 1.475l3.969 8.82c.029.064.044.135.044.205v7c0 1.379-1.122 2.5-2.5 2.5zm-20.5-9.393v6.893c0 .827.673 1.5 1.5 1.5h19c.827 0 1.5-.673 1.5-1.5v-6.893l-3.925-8.723c-.242-.536-.779-.884-1.368-.884h-11.414c-.589 0-1.126.348-1.368.885z"/>
<path d="m16.807 17h-9.614c-.622 0-1.186-.391-1.404-.973l-1.014-2.703c-.072-.194-.26-.324-.468-.324h-3.557c-.276 0-.5-.224-.5-.5s.224-.5.5-.5h3.557c.622 0 1.186.391 1.405.973l1.013 2.703c.073.194.261.324.468.324h9.613c.208 0 .396-.13.468-.324l1.013-2.703c.22-.582.784-.973 1.406-.973h3.807c.276 0 .5.224.5.5s-.224.5-.5.5h-3.807c-.208 0-.396.13-.468.324l-1.013 2.703c-.219.582-.784.973-1.405.973z"/>
<path d="m16.807 17h-9.614c-.622 0-1.186-.391-1.404-.973l-1.014-2.703c-.072-.194-.26-.324-.468-.324h-3.557c-.276 0-.5-.224-.5-.5s.224-.5.5-.5h3.557c.622 0 1.186.391 1.405.973l1.013 2.703c.073.194.261.324.468.324h9.613c.208 0 .396-.13.468-.324l1.013-2.703c.22-.582.784-.973 1.406-.973h3.807c.276 0 .5.224.5.5s-.224.5-.5.5h-3.807c-.208 0-.396.13-.468.324l-1.013 2.703c-.219.582-.784.973-1.405.973z"/>
</svg>
</svg>
...
...
This diff is collapsed.
Click to expand it.
source/components/notify/message.mjs
+
9
−
12
View file @
873989c2
...
@@ -106,7 +106,7 @@ class Message extends CustomElement {
...
@@ -106,7 +106,7 @@ class Message extends CustomElement {
* new Monster.Types.DataUrl(btoa(JSON.stringify({
* new Monster.Types.DataUrl(btoa(JSON.stringify({
* timeout: 3000,
* timeout: 3000,
* features: {
* features: {
* cl
ear
: true,
* cl
ose
: true,
* disappear: true
* disappear: true
* }
* }
* })),'application/json',true).toString()
* })),'application/json',true).toString()
...
@@ -116,7 +116,7 @@ class Message extends CustomElement {
...
@@ -116,7 +116,7 @@ class Message extends CustomElement {
* @property {Object} templates Template definitions
* @property {Object} templates Template definitions
* @property {integer} timeout time in milliseconds until the message should be removed. The timeout can be disabled via the feature `disappear`.
* @property {integer} timeout time in milliseconds until the message should be removed. The timeout can be disabled via the feature `disappear`.
* @property {Object} features
* @property {Object} features
* @property {boolean} features.cl
ear
show cl
ear
button
* @property {boolean} features.cl
ose
show cl
ose
button
* @property {boolean} features.disappear automatically remove the message after the timeout
* @property {boolean} features.disappear automatically remove the message after the timeout
* @property {string} templates.main Main template
* @property {string} templates.main Main template
*
*
...
@@ -128,7 +128,7 @@ class Message extends CustomElement {
...
@@ -128,7 +128,7 @@ class Message extends CustomElement {
{
{
timeout
:
6000
,
timeout
:
6000
,
features
:
{
features
:
{
cl
ear
:
true
,
cl
ose
:
true
,
disappear
:
true
,
disappear
:
true
,
},
},
content
:
"
<slot></slot>
"
,
content
:
"
<slot></slot>
"
,
...
@@ -211,12 +211,9 @@ class Message extends CustomElement {
...
@@ -211,12 +211,9 @@ class Message extends CustomElement {
*/
*/
function
startFadeout
()
{
function
startFadeout
()
{
if
(
!
this
?.[
timerSymbol
])
{
if
(
!
this
?.[
timerSymbol
])
{
this
[
timerSymbol
]
=
setTimeout
(
this
[
timerSymbol
]
=
setTimeout
(()
=>
{
()
=>
{
removeSelf
.
call
(
this
);
removeSelf
.
call
(
this
);
},
this
.
getOption
(
"
timeout
"
,
1000
));
},
this
.
getOption
(
"
timeout
"
,
1000
),
);
}
}
}
}
...
@@ -277,7 +274,7 @@ function initControlReferences() {
...
@@ -277,7 +274,7 @@ function initControlReferences() {
"
[
"
+
ATTRIBUTE_ROLE
+
"
=control]
"
,
"
[
"
+
ATTRIBUTE_ROLE
+
"
=control]
"
,
);
);
this
[
removeElementSymbol
]
=
this
.
shadowRoot
.
querySelector
(
this
[
removeElementSymbol
]
=
this
.
shadowRoot
.
querySelector
(
"
[
"
+
ATTRIBUTE_ROLE
+
"
=
remov
e]
"
,
"
[
"
+
ATTRIBUTE_ROLE
+
"
=
clos
e]
"
,
);
);
}
}
...
@@ -328,7 +325,7 @@ function initEventhandler() {
...
@@ -328,7 +325,7 @@ function initEventhandler() {
* @param {Event} event
* @param {Event} event
*/
*/
this
[
removeEventHandlerSymbol
]
=
(
event
)
=>
{
this
[
removeEventHandlerSymbol
]
=
(
event
)
=>
{
const
element
=
findTargetElementFromEvent
(
event
,
ATTRIBUTE_ROLE
,
"
remov
e
"
);
const
element
=
findTargetElementFromEvent
(
event
,
ATTRIBUTE_ROLE
,
"
clos
e
"
);
if
(
element
instanceof
HTMLElement
)
{
if
(
element
instanceof
HTMLElement
)
{
removeSelf
.
call
(
this
);
removeSelf
.
call
(
this
);
...
@@ -364,7 +361,7 @@ function getTemplate() {
...
@@ -364,7 +361,7 @@ function getTemplate() {
</div>
</div>
<div part="remove"
<div part="remove"
data-monster-attributes="class path:features.cl
ear
| ?::hidden "
data-monster-attributes="class path:features.cl
ose
| ?::hidden "
data-monster-role="close" tabindex="-1"></div>
data-monster-role="close" tabindex="-1"></div>
</div>
</div>
</div>
</div>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment