1- import 'https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.16 .0/cdn/components/alert/alert.js' ;
2- import 'https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.16 .0/cdn/components/popup/popup.js' ;
1+ import 'https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.18 .0/cdn/components/alert/alert.js' ;
2+ import 'https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.18 .0/cdn/components/popup/popup.js' ;
33import { ansi2html_string } from './ansi2html.js' ;
44
5- const observer = new MutationObserver ( mutationsList => {
6- for ( const mutation of mutationsList ) {
7- if ( mutation . type === 'attributes' && mutation . attributeName === 'inert' ) {
8- mutation . target . removeAttribute ( 'inert' ) ;
9- }
10- }
11- } ) ;
12-
135$ ( window ) . on ( "load" , async ( ) => {
146 const themeLightLink = $ ( '#theme-light' ) ;
157 const themeDarkLink = $ ( '#theme-dark' ) ;
@@ -31,9 +23,14 @@ $(window).on("load", async () => {
3123 flatpickrDark . attr ( 'disabled' , 'disabled' ) ;
3224 flatpickrLight . removeAttr ( 'disabled' ) ;
3325 }
26+
27+ notifyInfo ( `Theme switched to ${ event . target . checked ? 'dark' : 'light' } ` )
3428 } ) ;
3529
36- setTimeout ( ( ) => themeSwitch . click ( ) , 1 ) ;
30+ const switchThemeInterval = setInterval ( ( ) => {
31+ themeSwitch . click ( ) ;
32+ clearInterval ( switchThemeInterval ) ;
33+ } , 100 ) ;
3734
3835 flatpickr ( "sl-input[name='epicCreatedOn']" , {
3936 enableTime : true ,
@@ -1020,6 +1017,15 @@ function updateCustomEpicsList() {
10201017 const customUserStories = $ ( "#customUserStories" ) [ 0 ] ;
10211018 const customTechnicalTasks = $ ( "#customTechnicalTasks" ) [ 0 ] ;
10221019
1020+ const observer = new MutationObserver ( mutations => {
1021+ mutations . forEach ( mutation => {
1022+ // Check if the mutation is related to the 'inert' attribute
1023+ if ( ( mutation . type === 'attributes' && mutation . attributeName === 'inert' ) || mutation . target . hasAttribute ( 'inert' ) ) {
1024+ mutation . target . removeAttribute ( 'inert' ) ; // Remove the 'inert' attribute
1025+ }
1026+ } ) ;
1027+ } ) ;
1028+
10231029 currentPredefinedData . forEach ( ( value , key ) => {
10241030 $ ( "#epicsWrapper" ) . append ( `<sl-card id="epic_#${ key } " style="height:100%; --border-color: rgb(150, 2, 253, 1); text-align: -webkit-center;" xmlns="http://www.w3.org/1999/html">
10251031 <strong>ID: ${ value . epicId } </strong>
@@ -1058,10 +1064,7 @@ function updateCustomEpicsList() {
10581064
10591065 const userStoriesCarousel = $ ( "sl-tab-panel[name='customUserStoriesViewTab'] sl-carousel" ) ;
10601066
1061- setTimeout ( ( ) => {
1062- $ ( userStoriesCarousel [ 0 ] . shadowRoot ) . find ( "#scroll-container" ) . css ( "overflow-y" , "auto" ) ;
1063- observer . observe ( userStoriesCarousel [ 0 ] , { childList : true , subtree : true , attributes : true } ) ;
1064- } , 500 ) ;
1067+ observer . observe ( userStoriesCarousel [ 0 ] , { childList : true , subtree : true , attributeFilter : [ "inert" ] } ) ;
10651068
10661069 $ ( userStoriesCarousel ) . on ( 'sl-slide-change' , event => {
10671070 $ ( customUserStories . shadowRoot ) . find ( "#title slot" ) . html ( $ ( customUserStories . shadowRoot ) . find ( "#title slot" ) . html ( ) . split ( "(" ) [ 0 ] + "(Currently viewing Epic: '" + $ ( event . target . children ) . filter ( ( index , child ) => $ ( child ) . attr ( 'class' ) && $ ( child ) . attr ( 'class' ) . includes ( '--is-active' ) ) [ 0 ] . id . split ( "Of" ) [ 1 ] + "')" ) ;
@@ -1076,10 +1079,7 @@ function updateCustomEpicsList() {
10761079
10771080 const technicalTasksCarousel = $ ( "sl-tab-panel[name='customTechnicalTasksViewTab'] sl-carousel" ) ;
10781081
1079- setTimeout ( ( ) => {
1080- $ ( technicalTasksCarousel [ 0 ] . shadowRoot ) . find ( "#scroll-container" ) . css ( "overflow-y" , "auto" ) ;
1081- observer . observe ( technicalTasksCarousel [ 0 ] , { childList : true , subtree : true , attributes : true } ) ;
1082- } , 500 ) ;
1082+ observer . observe ( technicalTasksCarousel [ 0 ] , { childList : true , subtree : true , attributeFilter : [ "inert" ] } ) ;
10831083
10841084 $ ( technicalTasksCarousel ) . on ( 'sl-slide-change' , event => {
10851085 $ ( customTechnicalTasks . shadowRoot ) . find ( "#title slot" ) . html ( $ ( customTechnicalTasks . shadowRoot ) . find ( "#title slot" ) . html ( ) . split ( "(" ) [ 0 ] + "(Currently viewing User story: '" + $ ( event . target . children ) . filter ( ( index , child ) => $ ( child ) . attr ( 'class' ) && $ ( child ) . attr ( 'class' ) . includes ( '--is-active' ) ) [ 0 ] . id . split ( "Of" ) [ 1 ] + "')" ) ;
@@ -1108,7 +1108,7 @@ function updateCustomEpicsList() {
11081108function updateCustomUserStoriesList ( relatedEpicId , userStories ) {
11091109 const userStoriesCarousel = $ ( "sl-tab-panel[name='customUserStoriesViewTab'] sl-carousel" ) ;
11101110
1111- userStoriesCarousel . append ( `<sl-carousel-item id="userStoriesOf${ relatedEpicId } " style="display: grid; grid-template-columns: repeat(var(--numberOfColumns), 1fr); height: 100%; row-gap: 1%; column-gap: 1%; text-align: -webkit-center;"></sl-carousel-item>` )
1111+ userStoriesCarousel . append ( `<sl-carousel-item id="userStoriesOf${ relatedEpicId } " style="display: grid; grid-template-columns: repeat(var(--numberOfColumns), 1fr); height: 100%; width: 99%; row-gap: 1%; column-gap: 1%; text-align: -webkit-center; overflow-y: auto ;"></sl-carousel-item>` )
11121112
11131113 const userStorySlSelect = $ ( "sl-select[name='selectedUserStory']" ) ;
11141114
@@ -1151,9 +1151,9 @@ function updateCustomUserStoriesList(relatedEpicId, userStories) {
11511151}
11521152
11531153function updateCustomTechnicalTasksList ( relatedUserStoryId , technicalTasks ) {
1154- const technicalTaskCarousel = $ ( "sl-tab-panel[name='customTechnicalTasksViewTab'] sl-carousel" ) ;
1154+ const technicalTasksCarousel = $ ( "sl-tab-panel[name='customTechnicalTasksViewTab'] sl-carousel" ) ;
11551155
1156- technicalTaskCarousel . append ( `<sl-carousel-item id="technicalTaskOf${ relatedUserStoryId } " style="display: grid; grid-template-columns: repeat(var(--numberOfColumns), 1fr); height: 100%; row-gap: 1%; column-gap: 1%; text-align: -webkit-center;"></sl-carousel-item>` )
1156+ technicalTasksCarousel . append ( `<sl-carousel-item id="technicalTaskOf${ relatedUserStoryId } " style="display: grid; grid-template-columns: repeat(var(--numberOfColumns), 1fr); height: 100%; width: 99%; row-gap: 1%; column-gap: 1%; text-align: -webkit-center; overflow-y: auto ;"></sl-carousel-item>` )
11571157
11581158 setTimeout ( ( ) => $ ( $ ( "#customTechnicalTasks" ) [ 0 ] . shadowRoot ) . find ( "#title slot" ) . html ( "Manage technical tasks for predefined application flow (Currently viewing User story: '" + relatedUserStoryId + "')" ) , 500 ) ;
11591159
0 commit comments