File tree 7 files changed +29
-13
lines changed
7 files changed +29
-13
lines changed Original file line number Diff line number Diff line change 1
- Z2/FFhMi1aIykMRZ/8bE3YIatok =
1
+ THl/rR2+CTzuEgv48kxhYOHQdU4 =
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import "./StaticArea.js";
2
2
import updateShadowRoot from "./updateShadowRoot.js" ;
3
3
import { renderFinished } from "./Render.js" ;
4
4
import getEffectiveContentDensity from "./util/getEffectiveContentDensity.js" ;
5
+ import { getEffectiveScopingSuffixForTag } from "./CustomElementsScope.js" ;
5
6
6
7
/**
7
8
*
@@ -72,10 +73,24 @@ class StaticAreaItem extends HTMLElement {
72
73
getStableDomRef ( refName ) {
73
74
return this . shadowRoot . querySelector ( `[data-ui5-stable=${ refName } ]` ) ;
74
75
}
75
- }
76
76
77
- if ( ! customElements . get ( "ui5-static-area-item" ) ) {
78
- customElements . define ( "ui5-static-area-item" , StaticAreaItem ) ;
77
+ static getTag ( ) {
78
+ const pureTag = "ui5-static-area-item" ;
79
+ const suffix = getEffectiveScopingSuffixForTag ( pureTag ) ;
80
+ if ( ! suffix ) {
81
+ return pureTag ;
82
+ }
83
+
84
+ return `${ pureTag } -${ suffix } ` ;
85
+ }
86
+
87
+ static createInstance ( ) {
88
+ if ( ! customElements . get ( StaticAreaItem . getTag ( ) ) ) {
89
+ customElements . define ( StaticAreaItem . getTag ( ) , StaticAreaItem ) ;
90
+ }
91
+
92
+ return document . createElement ( this . getTag ( ) ) ;
93
+ }
79
94
}
80
95
81
96
export default StaticAreaItem ;
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import { boot } from "./Boot.js";
3
3
import UI5ElementMetadata from "./UI5ElementMetadata.js" ;
4
4
import EventProvider from "./EventProvider.js" ;
5
5
import getSingletonElementInstance from "./util/getSingletonElementInstance.js" ;
6
- import "./StaticAreaItem.js" ;
6
+ import StaticAreaItem from "./StaticAreaItem.js" ;
7
7
import updateShadowRoot from "./updateShadowRoot.js" ;
8
8
import { renderDeferred , renderImmediately , cancelRender } from "./Render.js" ;
9
9
import { registerTag , isTagRegistered , recordTagRegistrationFailure } from "./CustomElementsRegistry.js" ;
@@ -796,7 +796,7 @@ class UI5Element extends HTMLElement {
796
796
}
797
797
798
798
if ( ! this . staticAreaItem ) {
799
- this . staticAreaItem = document . createElement ( "ui5-static-area-item" ) ;
799
+ this . staticAreaItem = StaticAreaItem . createInstance ( ) ;
800
800
this . staticAreaItem . setOwnerElement ( this ) ;
801
801
}
802
802
if ( ! this . staticAreaItem . parentElement ) {
Original file line number Diff line number Diff line change @@ -485,7 +485,7 @@ class Wizard extends UI5Element {
485
485
const iCurrStep = this . getSelectedStepIndex ( ) ;
486
486
const iStepsToShow = this . steps . length ? Math . floor ( iWidth / MIN_STEP_WIDTH_WITH_TITLE ) : Math . floor ( iWidth / MIN_STEP_WIDTH_NO_TITLE ) ;
487
487
488
- const tabs = this . shadowRoot . querySelectorAll ( "ui5-wizard-tab" ) ;
488
+ const tabs = this . shadowRoot . querySelectorAll ( "[ ui5-wizard-tab] " ) ;
489
489
490
490
if ( ! tabs . length ) {
491
491
return ;
@@ -564,7 +564,7 @@ class Wizard extends UI5Element {
564
564
}
565
565
566
566
async _showPopover ( oDomTarget , bAtStart ) {
567
- const tabs = Array . from ( this . shadowRoot . querySelectorAll ( "ui5-wizard-tab" ) ) ;
567
+ const tabs = Array . from ( this . shadowRoot . querySelectorAll ( "[ ui5-wizard-tab] " ) ) ;
568
568
this . _groupedTabs = [ ] ;
569
569
570
570
const iFromStep = bAtStart ? 0 : this . stepsInHeaderDOM . indexOf ( oDomTarget ) ;
@@ -589,7 +589,7 @@ class Wizard extends UI5Element {
589
589
}
590
590
591
591
_onOverflowStepButtonClick ( event ) {
592
- const tabs = Array . from ( this . shadowRoot . querySelectorAll ( "ui5-wizard-tab" ) ) ;
592
+ const tabs = Array . from ( this . shadowRoot . querySelectorAll ( "[ ui5-wizard-tab] " ) ) ;
593
593
const stepRefId = event . target . getAttribute ( "data-ui5-header-tab-ref-id" ) ;
594
594
const stepToSelect = this . slottedSteps [ stepRefId - 1 ] ;
595
595
const selectedStep = this . selectedStep ;
Original file line number Diff line number Diff line change 1
1
: host (: not ([hidden ])) {
2
- /* Well known worakround to allow shrinking inside flex containers
2
+ /* Well known worakround to allow shrinking inside flex containers
3
3
* and shrinking is needed so the texts trucnate properly.
4
4
*/
5
5
min-width : 1px ;
146
146
}
147
147
148
148
/* Workaround for IE to make the focus outline visible */
149
- ui5-wizard-tab .ui5-wiz-step-main {
149
+ [ ui5-wizard-tab ] .ui5-wiz-step-main {
150
150
pointer-events : none;
151
151
}
152
152
Original file line number Diff line number Diff line change 1
- xVuUgxGGvkAKIY1Yw5I2hbPgG24 =
1
+ W5PC928lrjsUvm6BzHaYc00TH0o =
Original file line number Diff line number Diff line change 1
1
import createStyleInHead from "@ui5/webcomponents-base/dist/util/createStyleInHead.js" ;
2
2
import getEffectiveStyle from "@ui5/webcomponents-base/dist/theming/getEffectiveStyle.js" ;
3
3
import { attachCustomCSSChange } from "@ui5/webcomponents-base/dist/theming/CustomStyle.js" ;
4
+ import StaticAreaItem from "@ui5/webcomponents-base/dist/StaticAreaItem.js" ;
4
5
import adaptCSSForIE from "./adaptCSSForIE.js" ;
5
6
import { schedulePonyfill } from "./CSSVarsPonyfill.js" ;
6
7
@@ -29,7 +30,7 @@ const createComponentStyleTag = component => {
29
30
// Append static CSS, if any, for IE
30
31
let staticCssContent = getEffectiveStyle ( ElementClass , true ) ;
31
32
if ( staticCssContent ) {
32
- staticCssContent = adaptCSSForIE ( staticCssContent , "ui5-static-area-item" ) ;
33
+ staticCssContent = adaptCSSForIE ( staticCssContent , StaticAreaItem . getTag ( ) ) ;
33
34
cssContent = `${ cssContent } ${ staticCssContent } ` ;
34
35
}
35
36
You can’t perform that action at this time.
0 commit comments