Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
visual_debugger
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
visual_debugger
Commits
c40601d7
Commit
c40601d7
authored
9 months ago
by
Marcos Hollanda
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3457610
: Update regular expressions patterns for debug messages after Drupal 10.3
parent
eb3a8ef6
No related branches found
No related tags found
1 merge request
!10
Update regexp patterns for debug messages
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
js/dist/themeElement.min.js
+1
-1
1 addition, 1 deletion
js/dist/themeElement.min.js
js/dist/vd.min.js
+1
-1
1 addition, 1 deletion
js/dist/vd.min.js
js/source/themeElement.js
+3
-3
3 additions, 3 deletions
js/source/themeElement.js
js/source/vd.js
+2
-2
2 additions, 2 deletions
js/source/vd.js
with
7 additions
and
7 deletions
js/dist/themeElement.min.js
+
1
−
1
View file @
c40601d7
Drupal
.
themeElement
=
{
activated
:
!
1
,
propertyHook
:
null
,
objectType
:
null
,
suggestions
:
null
,
filePath
:
null
,
dataNode
:
null
,
cacheHit
:
!
1
,
cacheTags
:
null
,
cacheContexts
:
null
,
cacheKeys
:
null
,
cacheMaxAge
:
0
,
preBubblingCacheTags
:
null
,
preBubblingCacheContexts
:
null
,
preBubblingCacheKeys
:
null
,
preBubblingCacheMaxAge
:
0
,
renderingTime
:
0
,
initialState
:
null
,
init
:
function
(){
this
.
initialState
=
{
activated
:
this
.
activated
,
propertyHook
:
this
.
propertyHook
,
objectType
:
this
.
objectType
,
suggestions
:
this
.
suggestions
,
filePath
:
this
.
filePath
,
dataNode
:
this
.
dataNode
,
cacheHit
:
this
.
cacheHit
,
cacheTags
:
this
.
cacheTags
,
cacheContexts
:
this
.
cacheContexts
,
cacheKeys
:
this
.
cacheKeys
,
cacheMaxAge
:
this
.
cacheMaxAge
,
preBubblingCacheTags
:
this
.
preBubblingCacheTags
,
preBubblingCacheContexts
:
this
.
preBubblingCacheContexts
,
preBubblingCacheKeys
:
this
.
preBubblingCacheKeys
,
preBubblingCacheMaxAge
:
this
.
preBubblingCacheMaxAge
,
renderingTime
:
this
.
renderingTime
}},
setActivated
(){
this
.
activated
=!
0
},
setPropertyHook
(
e
){
this
.
propertyHook
=
e
},
setCacheHit
(
e
){
this
.
cacheHit
=
e
},
setCacheTags
(
e
){
this
.
cacheTags
=
this
.
parseListRegexpOutput
(
e
)},
setCacheContexts
(
e
){
this
.
cacheContexts
=
this
.
parseListRegexpOutput
(
e
)},
setCacheKeys
(
e
){
this
.
cacheKeys
=
this
.
parseListRegexpOutput
(
e
)},
setCacheMaxAge
(
e
){
this
.
cacheMaxAge
=
parseInt
(
e
)},
setPreBubblingCacheTags
(
e
){
this
.
preBubblingCacheTags
=
this
.
parseListRegexpOutput
(
e
)},
setPreBubblingCacheContexts
(
e
){
this
.
preBubblingCacheContexts
=
this
.
parseListRegexpOutput
(
e
)},
setPreBubblingCacheKeys
(
e
){
this
.
preBubblingCacheKeys
=
this
.
parseListRegexpOutput
(
e
)},
setPreBubblingCacheMaxAge
(
e
){
this
.
preBubblingCacheMaxAge
=
parseInt
(
e
)},
setRenderingTime
(
e
){
this
.
renderingTime
=
parseFloat
(
e
)},
setObjectType
(
e
){
this
.
objectType
=
e
.
split
(
"
__
"
)[
0
]},
setFilePath
(
e
){
this
.
filePath
=
e
},
setSuggestions
(
e
){
this
.
suggestions
=
this
.
pasreListOnOffRegexpOutput
(
e
)},
setDataNode
(
e
){
this
.
dataNode
=
e
},
getPropertyHook
(){
return
this
.
propertyHook
},
getObjectType
(){
return
this
.
objectType
},
getDisplayElements
(){
const
{
idControllerSelectedElementInfo
:
e
,
idControllerSelectedElementSuggestionsValue
:
t
,
idControllerSelectedElementFilePathValue
:
l
,
idControllerSelectedElementCacheHit
:
a
,
idControllerSelectedElementCacheMaxAge
:
s
,
idControllerSelectedElementCacheTags
:
i
,
idControllerSelectedElementCacheContexts
:
n
,
idControllerSelectedElementCacheKeys
:
c
,
idControllerSelectedElementPreBubblingCacheTags
:
h
,
idControllerSelectedElementPreBubblingCacheContexts
:
p
,
idControllerSelectedElementPreBubblingCacheKeys
:
r
,
idControllerSelectedElementPreBubblingCacheMaxAge
:
g
,
idControllerSelectedElementRenderingTime
:
o
}
=
Drupal
.
vdUtilities
.
ids
,{
classNameSelectedElementInfoWrapper
:
u
,
classNameSelectedElementInfo
:
y
,
classNameSelectedElementSuggestionsWrapper
:
C
,
classNameSelectedElementSuggestions
:
b
,
classNameSelectedElementTemplateFilePathWrapper
:
d
,
classNameSelectedElementTemplateFilePath
:
m
,
classNameSelectedElementTemplateFilePathLabel
:
T
}
=
Drupal
.
vdUtilities
.
classNames
,{
stringThemeElementInfo
:
x
,
stringThemeElementThemeSuggestions
:
E
,
stringThemeElementFilePath
:
B
,
stringThemeElementFilePathInlineLabel
:
S
,
stringThemeElementCacheHit
:
P
,
stringThemeElementCacheMaxAge
:
k
,
stringThemeElementCacheTags
:
f
,
stringThemeElementCacheContexts
:
A
,
stringThemeElementCacheKeys
:
H
,
stringThemeElementPreBubblingCacheTags
:
K
,
stringThemeElementPreBubblingCacheContexts
:
M
,
stringThemeElementPreBubblingCacheKeys
:
O
,
stringThemeElementPreBubblingCacheMaxAge
:
N
,
stringThemeElementRenderingTime
:
v
}
=
Drupal
.
vdUtilities
.
strings
;
return
[{
key
:
"
propertyHook
"
,
label
:
x
,
id
:
e
,
type
:
"
template
"
,
displayType
:
"
info
"
,
wrapperClasses
:[
u
],
valueClasses
:[
y
]},{
key
:
"
suggestions
"
,
label
:
E
,
id
:
t
,
type
:
"
template
"
,
displayType
:
"
multipleCopyWithChecked
"
,
wrapperClasses
:[
C
],
valueClasses
:[
b
]},{
key
:
"
filePath
"
,
label
:
B
,
inlineLabel
:
S
,
id
:
l
,
type
:
"
template
"
,
displayType
:
"
singleCopy
"
,
wrapperClasses
:[
d
],
valueClasses
:[
m
]},{
key
:
"
cacheHit
"
,
label
:
P
,
id
:
a
,
type
:
"
cache
"
,
displayType
:
"
singleInfo
"
},{
key
:
"
cacheTags
"
,
label
:
f
,
id
:
i
,
type
:
"
cache
"
,
displayType
:
"
multipleCopy
"
},{
key
:
"
cacheContexts
"
,
label
:
A
,
id
:
n
,
type
:
"
cache
"
,
displayType
:
"
multipleCopy
"
},{
key
:
"
cacheKeys
"
,
label
:
H
,
id
:
c
,
type
:
"
cache
"
,
displayType
:
"
multipleCopy
"
},{
key
:
"
cacheMaxAge
"
,
label
:
k
,
id
:
s
,
type
:
"
cache
"
,
displayType
:
"
singleInfo
"
},{
key
:
"
preBubblingCacheTags
"
,
label
:
K
,
id
:
h
,
type
:
"
cache
"
,
displayType
:
"
multipleCopy
"
},{
key
:
"
preBubblingCacheContexts
"
,
label
:
M
,
id
:
p
,
type
:
"
cache
"
,
displayType
:
"
multipleCopy
"
},{
key
:
"
preBubblingCacheKeys
"
,
label
:
O
,
id
:
r
,
type
:
"
cache
"
,
displayType
:
"
multipleCopy
"
},{
key
:
"
preBubblingCacheMaxAge
"
,
label
:
N
,
id
:
g
,
type
:
"
cache
"
,
displayType
:
"
singleInfo
"
},{
key
:
"
renderingTime
"
,
label
:
v
,
id
:
o
,
type
:
"
cache
"
,
displayType
:
"
singleInfo
"
}]},
parseListRegexpOutput
:
e
=>
e
.
split
(
"
\n
"
).
map
((
e
=>
e
.
trim
().
replace
(
/^
\*\s
/
,
""
))).
filter
((
e
=>
e
.
length
>
0
)),
pasreListOnOffRegexpOutput
:
e
=>
e
.
trim
().
split
(
/
\n\s
*/
).
map
((
e
=>
{
const
t
=
e
.
split
(
"
"
);
return
{
suggestion
:
t
[
1
],
activated
:
"
x
"
===
t
[
0
]}})),
reset
:
function
(){
Object
.
assign
(
this
,
this
.
initialState
)}};
\ No newline at end of file
Drupal
.
themeElement
=
{
activated
:
!
1
,
propertyHook
:
null
,
objectType
:
null
,
suggestions
:
null
,
filePath
:
null
,
dataNode
:
null
,
cacheHit
:
!
1
,
cacheTags
:
null
,
cacheContexts
:
null
,
cacheKeys
:
null
,
cacheMaxAge
:
0
,
preBubblingCacheTags
:
null
,
preBubblingCacheContexts
:
null
,
preBubblingCacheKeys
:
null
,
preBubblingCacheMaxAge
:
0
,
renderingTime
:
0
,
initialState
:
null
,
init
:
function
(){
this
.
initialState
=
{
activated
:
this
.
activated
,
propertyHook
:
this
.
propertyHook
,
objectType
:
this
.
objectType
,
suggestions
:
this
.
suggestions
,
filePath
:
this
.
filePath
,
dataNode
:
this
.
dataNode
,
cacheHit
:
this
.
cacheHit
,
cacheTags
:
this
.
cacheTags
,
cacheContexts
:
this
.
cacheContexts
,
cacheKeys
:
this
.
cacheKeys
,
cacheMaxAge
:
this
.
cacheMaxAge
,
preBubblingCacheTags
:
this
.
preBubblingCacheTags
,
preBubblingCacheContexts
:
this
.
preBubblingCacheContexts
,
preBubblingCacheKeys
:
this
.
preBubblingCacheKeys
,
preBubblingCacheMaxAge
:
this
.
preBubblingCacheMaxAge
,
renderingTime
:
this
.
renderingTime
}},
setActivated
(){
this
.
activated
=!
0
},
setPropertyHook
(
e
){
this
.
propertyHook
=
e
},
setCacheHit
(
e
){
this
.
cacheHit
=
e
},
setCacheTags
(
e
){
this
.
cacheTags
=
this
.
parseListRegexpOutput
(
e
)},
setCacheContexts
(
e
){
this
.
cacheContexts
=
this
.
parseListRegexpOutput
(
e
)},
setCacheKeys
(
e
){
this
.
cacheKeys
=
this
.
parseListRegexpOutput
(
e
)},
setCacheMaxAge
(
e
){
this
.
cacheMaxAge
=
parseInt
(
e
)},
setPreBubblingCacheTags
(
e
){
this
.
preBubblingCacheTags
=
this
.
parseListRegexpOutput
(
e
)},
setPreBubblingCacheContexts
(
e
){
this
.
preBubblingCacheContexts
=
this
.
parseListRegexpOutput
(
e
)},
setPreBubblingCacheKeys
(
e
){
this
.
preBubblingCacheKeys
=
this
.
parseListRegexpOutput
(
e
)},
setPreBubblingCacheMaxAge
(
e
){
this
.
preBubblingCacheMaxAge
=
parseInt
(
e
)},
setRenderingTime
(
e
){
this
.
renderingTime
=
parseFloat
(
e
)},
setObjectType
(
e
){
this
.
objectType
=
e
.
split
(
"
__
"
)[
0
]},
setFilePath
(
e
){
this
.
filePath
=
e
},
setSuggestions
(
e
){
this
.
suggestions
=
this
.
parseListOnOffRegexpOutput
(
e
)},
setDataNode
(
e
){
this
.
dataNode
=
e
},
getPropertyHook
(){
return
this
.
propertyHook
},
getObjectType
(){
return
this
.
objectType
},
getDisplayElements
(){
const
{
idControllerSelectedElementInfo
:
e
,
idControllerSelectedElementSuggestionsValue
:
t
,
idControllerSelectedElementFilePathValue
:
l
,
idControllerSelectedElementCacheHit
:
a
,
idControllerSelectedElementCacheMaxAge
:
s
,
idControllerSelectedElementCacheTags
:
i
,
idControllerSelectedElementCacheContexts
:
n
,
idControllerSelectedElementCacheKeys
:
c
,
idControllerSelectedElementPreBubblingCacheTags
:
h
,
idControllerSelectedElementPreBubblingCacheContexts
:
p
,
idControllerSelectedElementPreBubblingCacheKeys
:
r
,
idControllerSelectedElementPreBubblingCacheMaxAge
:
g
,
idControllerSelectedElementRenderingTime
:
o
}
=
Drupal
.
vdUtilities
.
ids
,{
classNameSelectedElementInfoWrapper
:
u
,
classNameSelectedElementInfo
:
y
,
classNameSelectedElementSuggestionsWrapper
:
C
,
classNameSelectedElementSuggestions
:
b
,
classNameSelectedElementTemplateFilePathWrapper
:
d
,
classNameSelectedElementTemplateFilePath
:
m
,
classNameSelectedElementTemplateFilePathLabel
:
T
}
=
Drupal
.
vdUtilities
.
classNames
,{
stringThemeElementInfo
:
x
,
stringThemeElementThemeSuggestions
:
E
,
stringThemeElementFilePath
:
B
,
stringThemeElementFilePathInlineLabel
:
S
,
stringThemeElementCacheHit
:
P
,
stringThemeElementCacheMaxAge
:
k
,
stringThemeElementCacheTags
:
f
,
stringThemeElementCacheContexts
:
A
,
stringThemeElementCacheKeys
:
H
,
stringThemeElementPreBubblingCacheTags
:
K
,
stringThemeElementPreBubblingCacheContexts
:
M
,
stringThemeElementPreBubblingCacheKeys
:
O
,
stringThemeElementPreBubblingCacheMaxAge
:
N
,
stringThemeElementRenderingTime
:
v
}
=
Drupal
.
vdUtilities
.
strings
;
return
[{
key
:
"
propertyHook
"
,
label
:
x
,
id
:
e
,
type
:
"
template
"
,
displayType
:
"
info
"
,
wrapperClasses
:[
u
],
valueClasses
:[
y
]},{
key
:
"
suggestions
"
,
label
:
E
,
id
:
t
,
type
:
"
template
"
,
displayType
:
"
multipleCopyWithChecked
"
,
wrapperClasses
:[
C
],
valueClasses
:[
b
]},{
key
:
"
filePath
"
,
label
:
B
,
inlineLabel
:
S
,
id
:
l
,
type
:
"
template
"
,
displayType
:
"
singleCopy
"
,
wrapperClasses
:[
d
],
valueClasses
:[
m
]},{
key
:
"
cacheHit
"
,
label
:
P
,
id
:
a
,
type
:
"
cache
"
,
displayType
:
"
singleInfo
"
},{
key
:
"
cacheTags
"
,
label
:
f
,
id
:
i
,
type
:
"
cache
"
,
displayType
:
"
multipleCopy
"
},{
key
:
"
cacheContexts
"
,
label
:
A
,
id
:
n
,
type
:
"
cache
"
,
displayType
:
"
multipleCopy
"
},{
key
:
"
cacheKeys
"
,
label
:
H
,
id
:
c
,
type
:
"
cache
"
,
displayType
:
"
multipleCopy
"
},{
key
:
"
cacheMaxAge
"
,
label
:
k
,
id
:
s
,
type
:
"
cache
"
,
displayType
:
"
singleInfo
"
},{
key
:
"
preBubblingCacheTags
"
,
label
:
K
,
id
:
h
,
type
:
"
cache
"
,
displayType
:
"
multipleCopy
"
},{
key
:
"
preBubblingCacheContexts
"
,
label
:
M
,
id
:
p
,
type
:
"
cache
"
,
displayType
:
"
multipleCopy
"
},{
key
:
"
preBubblingCacheKeys
"
,
label
:
O
,
id
:
r
,
type
:
"
cache
"
,
displayType
:
"
multipleCopy
"
},{
key
:
"
preBubblingCacheMaxAge
"
,
label
:
N
,
id
:
g
,
type
:
"
cache
"
,
displayType
:
"
singleInfo
"
},{
key
:
"
renderingTime
"
,
label
:
v
,
id
:
o
,
type
:
"
cache
"
,
displayType
:
"
singleInfo
"
}]},
parseListRegexpOutput
:
e
=>
e
.
split
(
"
\n
"
).
map
((
e
=>
e
.
trim
().
replace
(
/^
\*\s
/
,
""
))).
filter
((
e
=>
e
.
length
>
0
)),
parseListOnOffRegexpOutput
:
e
=>
e
.
trim
().
split
(
/
\n\s
*/
).
map
((
e
=>
{
const
t
=
e
.
split
(
"
"
);
return
{
suggestion
:
t
[
1
],
activated
:[
"
x
"
,
"
✅
"
].
includes
(
t
[
0
])}})),
reset
:
function
(){
Object
.
assign
(
this
,
this
.
initialState
)}};
\ No newline at end of file
This diff is collapsed.
Click to expand it.
js/dist/vd.min.js
+
1
−
1
View file @
c40601d7
!
function
(
e
){
e
.
behaviors
.
visualDebugger
=
{
body
:
document
.
body
,
utilities
:
e
.
vdUtilities
,
constants
:{
baseZIndex
:
0
},
classNames
:{
classNameVisualDebugger
:
"
visual-debugger
"
,
classNameInitialized
:
"
visual-debugger--initialized
"
,
classNameBaseLayer
:
"
visual-debugger--base
"
,
classNameInstanceLayer
:
"
instance-element
"
,
classNameInstanceLayerUnchecked
:
"
instance-element--unchecked
"
,
classNameInstanceLayerChecked
:
"
instance-element--checked
"
,
classNameInstanceLayerHover
:
"
instance-element--hover
"
,
classNameObjectType
:
"
object-type
"
,
classNameObjectTypeHover
:
"
object-type--hover
"
,
classNameIconActivated
:
"
icon-checkbox-checked
"
,
classNameIconDectivated
:
"
icon-checkbox-unchecked
"
,
classNameCheckboxToggle
:
"
checkbox-toggle
"
,
classNameSpanToggle
:
"
span-toggle
"
,
classNameActivated
:
"
item-activated
"
,
classNameDeactivated
:
"
item-deactivated
"
,
classNameObjectTypeTyped
:
e
=>
`object-type--
${
e
}
`
},
layerAttributes
:{
layerIdAttributeName
:
"
data-vd-id
"
},
themeDebugNodes
:
null
,
triggerResizeObserver
(
e
){
const
{
body
:
t
}
=
this
,{
layerIdAttributeName
:
s
}
=
this
.
layerAttributes
,{
layerTargetIdAttributeName
:
a
}
=
this
.
utilities
.
layerAttributes
,
n
=
new
ResizeObserver
((
e
=>
{
e
.
forEach
((
e
=>
{
const
n
=
e
.
target
,
i
=
n
.
getAttribute
(
s
),
c
=
t
.
querySelector
(
`[
${
a
}
="
${
i
}
"]`
);
this
.
setInstanceLayerSizeAndPosition
(
c
,
n
)}))}));
e
.
forEach
((
e
=>
{
const
{
instanceRefElement
:
t
}
=
e
;
n
.
observe
(
t
)}))},
triggerMutationObserver
:
function
(
e
){
new
MutationObserver
((()
=>
{
e
.
forEach
((
e
=>
{
this
.
setInstanceLayerSizeAndPosition
(
e
.
instanceLayer
,
e
.
instanceRefElement
)}))})).
observe
(
this
.
body
,{
attributes
:
!
0
,
attributeFilter
:[
"
style
"
]})},
regExs
:{
regexGetTemplateDebug
:()
=>
new
RegExp
(
"
^(THEME DEBUG|START RENDERED)$
"
),
regexGetTemplateHook
:()
=>
new
RegExp
(
"
THEME HOOK: '([^']*)'
"
),
regexGetTemplateSuggestions
:()
=>
new
RegExp
(
"
FILE NAME SUGGESTIONS:s*
\n
s*([^']*)s*
\n
*s*
"
),
regexGetTemplateFilePath
:()
=>
new
RegExp
(
"
BEGIN OUTPUT from '([^']*)'
"
),
regexGetTemplateEndOutput
:()
=>
new
RegExp
(
"
END OUTPUT from '([^']*)'
"
),
regexGetCacheHit
:()
=>
new
RegExp
(
"
CACHE-HIT: (Yes|No)
"
),
regexGetCacheTags
:()
=>
new
RegExp
(
"
^
\\
s?CACHE TAGS:s*
\n
s*([^']*)s*
\n
*s*
"
),
regexGetCacheContexts
:()
=>
new
RegExp
(
"
^
\\
s?CACHE CONTEXTS:s*
\n
s*([^']*)s*
\n
*s*
"
),
regexGetCacheKeys
:()
=>
new
RegExp
(
"
^
\\
s?CACHE KEYS:s*
\n
s*([^']*)s*
\n
*s*
"
),
regexGetCacheMaxAge
:()
=>
new
RegExp
(
"
^
\\
s?CACHE MAX-AGE: (-?[0-9]*)
"
),
regexGetPreBubblingCacheTags
:()
=>
new
RegExp
(
"
PRE-BUBBLING CACHE TAGS:s*
\n
s*([^']*)s*
\n
*s*
"
),
regexGetPreBubblingCacheContexts
:()
=>
new
RegExp
(
"
PRE-BUBBLING CACHE CONTEXTS:s*
\n
s*([^']*)s*
\n
*s*
"
),
regexGetPreBubblingCacheKeys
:()
=>
new
RegExp
(
"
PRE-BUBBLING CACHE KEYS:s*
\n
s*([^']*)s*
\n
*s*
"
),
regexGetPreBubblingCacheMaxAge
:()
=>
new
RegExp
(
"
PRE-BUBBLING CACHE MAX-AGE: (-?[0-9]*)
"
),
regexGetRenderingTime
:()
=>
new
RegExp
(
"
RENDERING TIME: (-?[0-9]*.?[0-9]*)
"
)},
controllerElement
:
null
,
getUniquePropertyHooks
:
e
=>
e
.
map
((
e
=>
e
.
instanceActiveElement
.
propertyHook
)).
filter
(((
e
,
t
,
s
)
=>
s
.
indexOf
(
e
)
===
t
)).
sort
(),
getCalculatedDomDepth
(
e
){
let
t
=
0
;
for
(;
e
.
parentNode
;)
t
++
,
e
=
e
.
parentNode
;
return
t
},
generateBaseLayer
(){
const
e
=
document
.
createElement
(
"
div
"
),{
classNameVisualDebugger
:
t
,
classNameBaseLayer
:
s
}
=
this
.
classNames
;
return
e
.
classList
.
add
(
t
),
e
.
classList
.
add
(
s
),
e
},
getCheckedNodes
(){
return
this
.
themeDebugNodes
.
filter
((
e
=>
e
.
instanceLayer
.
classList
.
contains
(
this
.
classNames
.
classNameInstanceLayerChecked
)))},
generateInstanceLayer
(
e
,
t
,
s
){
const
a
=
document
.
createElement
(
"
div
"
),
n
=
this
.
controllerElement
,{
classNameInstanceLayer
:
i
,
classNameInstanceLayerChecked
:
c
,
classNameInstanceLayerUnchecked
:
r
,
classNameObjectType
:
o
,
classNameObjectTypeTyped
:
l
,
classNameIconActivated
:
g
,
classNameIconDectivated
:
d
,
classNameCheckboxToggle
:
h
,
classNameSpanToggle
:
u
,
classNameActivated
:
m
,
classNameDeactivated
:
b
}
=
this
.
classNames
,{
layerTargetIdAttributeName
:
E
,
instanceLayerActivatedAttributeName
:
y
,
layerAttributeIsVisible
:
x
}
=
this
.
utilities
.
layerAttributes
;
a
.
classList
.
add
(
i
,
o
,
l
(
e
.
getObjectType
()),
r
),
a
.
setAttribute
(
E
,
s
),
a
.
setAttribute
(
x
,
!
0
),
a
.
setAttribute
(
y
,
!
1
),
a
.
style
.
zIndex
=
this
.
getCalculatedDomDepth
(
t
),
this
.
setInstanceLayerSizeAndPosition
(
a
,
t
);
const
C
=
e
,
N
=
document
.
createElement
(
"
input
"
);
N
.
setAttribute
(
"
type
"
,
"
checkbox
"
),
N
.
classList
.
add
(
h
);
const
p
=
document
.
createElement
(
"
span
"
);
p
.
classList
.
add
(
u
,
m
,
g
);
const
v
=
document
.
createElement
(
"
span
"
);
return
v
.
classList
.
add
(
u
,
b
,
d
),
a
.
append
(
N
,
p
,
v
),
a
.
addEventListener
(
"
mouseenter
"
,(()
=>
{
N
.
focus
({
preventScroll
:
!
0
}),
n
.
setActiveThemeElement
(
C
)})),
a
.
addEventListener
(
"
mouseleave
"
,(()
=>
{
N
.
blur
(),
n
.
resetActiveThemeElement
(
C
)})),
a
.
addEventListener
(
"
click
"
,(()
=>
{
this
.
getCheckedNodes
().
forEach
((
e
=>
{
e
.
instanceLayer
!==
a
&&
e
.
instanceLayer
.
click
()})),
N
.
click
()})),
N
.
addEventListener
(
"
change
"
,(()
=>
{
a
.
setAttribute
(
y
,
N
.
checked
),
a
.
classList
.
toggle
(
c
),
a
.
classList
.
toggle
(
r
),
!
0
===
N
.
checked
?(
N
.
focus
(),
n
.
setDefaultThemeElement
(
e
)):(
N
.
blur
(),
n
.
resetDefaultThemeElement
(
e
))})),
a
},
setInstanceLayerSizeAndPosition
(
e
,
t
){
const
s
=
t
.
getBoundingClientRect
(),
a
=
Math
.
round
(
s
.
top
+
window
.
scrollY
),
n
=
Math
.
round
(
s
.
left
+
window
.
scrollX
);
let
{
width
:
i
,
height
:
c
}
=
s
;
c
=
Math
.
round
(
c
),
i
=
Math
.
round
(
i
),
e
.
style
.
width
=
`
${
Math
.
round
(
i
)}
px`
,
e
.
style
.
height
=
`
${
Math
.
round
(
c
)}
px`
,
e
.
style
.
top
=
`
${
a
}
px`
,
e
.
style
.
left
=
`
${
n
}
px`
},
setthemeDebugNode
(
e
,
t
,
s
){
const
{
layerAttributeIsVisible
:
a
,
instanceLayerActivatedAttributeName
:
n
}
=
this
.
utilities
.
layerAttributes
,{
classNameInstanceLayerHover
:
i
,
classNameObjectTypeHover
:
c
}
=
this
.
classNames
;
return
{
instanceActiveElement
:
e
,
instanceLayer
:
t
,
instanceRefElement
:
s
,
showInstanceLayer
(){
this
.
instanceLayer
.
setAttribute
(
a
,
!
0
)},
hideInstanceLayer
(){
this
.
instanceLayer
.
setAttribute
(
a
,
!
1
),
"
true
"
===
this
.
instanceLayer
.
getAttribute
(
n
)
&&
this
.
instanceLayer
.
click
()},
triggerMouseEnter
(){
this
.
instanceLayer
.
dispatchEvent
(
new
MouseEvent
(
"
mouseenter
"
)),
this
.
instanceLayer
.
classList
.
add
(
i
,
c
)},
triggerMouseLeave
(){
this
.
instanceLayer
.
dispatchEvent
(
new
MouseEvent
(
"
mouseleave
"
)),
this
.
instanceLayer
.
classList
.
remove
(
i
,
c
)}}},
attach
:
function
(
e
,
t
){
const
{
body
:
s
}
=
this
,{
classNameInitialized
:
a
}
=
this
.
classNames
;
s
.
classList
.
contains
(
a
)
||
(
s
.
classList
.
add
(
a
),
this
.
main
(
e
,
t
,
s
))},
main
:
function
(
t
,
s
,
a
){
const
{
regexGetTemplateDebug
:
n
,
regexGetTemplateHook
:
i
,
regexGetTemplateSuggestions
:
c
,
regexGetTemplateFilePath
:
r
,
regexGetCacheHit
:
o
,
regexGetCacheMaxAge
:
l
,
regexGetPreBubblingCacheTags
:
g
,
regexGetPreBubblingCacheContexts
:
d
,
regexGetPreBubblingCacheKeys
:
h
,
regexGetPreBubblingCacheMaxAge
:
u
,
regexGetRenderingTime
:
m
,
regexGetCacheTags
:
b
,
regexGetCacheContexts
:
E
,
regexGetCacheKeys
:
y
}
=
this
.
regExs
,{
layerIdAttributeName
:
x
}
=
this
.
layerAttributes
,
C
=
e
.
controllerElement
;
this
.
controllerElement
=
C
;
const
N
=
this
.
generateBaseLayer
();
a
.
appendChild
(
N
);
let
p
=
[],
v
=
e
.
themeElement
;
v
.
init
();
document
.
querySelectorAll
(
"
*
"
).
forEach
((
e
=>
{
const
t
=
e
.
childNodes
;
Array
.
from
(
t
).
forEach
((
e
=>
{
if
(
e
.
nodeType
!==
Node
.
COMMENT_NODE
)
return
;
if
(
n
().
test
(
e
.
textContent
))
return
void
v
.
setActivated
();
const
t
=
e
.
textContent
.
match
(
o
());
if
(
t
)
return
void
v
.
setCacheHit
(
t
[
1
]);
const
s
=
e
.
textContent
.
match
(
l
());
if
(
s
)
return
void
v
.
setCacheMaxAge
(
s
[
1
]);
const
a
=
e
.
textContent
.
match
(
b
());
if
(
a
)
return
void
v
.
setCacheTags
(
a
[
1
]);
const
C
=
e
.
textContent
.
match
(
E
());
if
(
C
)
return
void
v
.
setCacheContexts
(
C
[
1
]);
const
A
=
e
.
textContent
.
match
(
y
());
if
(
A
)
return
void
v
.
setCacheKeys
(
A
[
1
]);
const
L
=
e
.
textContent
.
match
(
g
());
if
(
L
)
return
void
v
.
setPreBubblingCacheTags
(
L
[
1
]);
const
T
=
e
.
textContent
.
match
(
d
());
if
(
T
)
return
void
v
.
setPreBubblingCacheContexts
(
T
[
1
]);
const
f
=
e
.
textContent
.
match
(
h
());
if
(
f
)
return
void
v
.
setPreBubblingCacheKeys
(
f
[
1
]);
const
I
=
e
.
textContent
.
match
(
u
());
if
(
I
)
return
void
v
.
setPreBubblingCacheMaxAge
(
I
[
1
]);
const
G
=
e
.
textContent
.
match
(
m
());
if
(
G
)
return
void
v
.
setRenderingTime
(
G
[
1
]);
const
R
=
e
.
textContent
.
match
(
i
());
if
(
R
)
return
v
.
setPropertyHook
(
R
[
1
]),
void
v
.
setObjectType
(
R
[
1
]);
const
B
=
e
.
textContent
.
match
(
c
());
if
(
B
)
return
void
v
.
setSuggestions
(
B
[
1
]);
const
D
=
e
.
textContent
.
match
(
r
());
if
(
D
){
v
.
setFilePath
(
D
[
1
]);
const
t
=
e
.
nextElementSibling
;
if
(
t
&&
t
.
nodeType
===
Node
.
ELEMENT_NODE
&&
null
===
v
.
dataNode
){
v
.
setDataNode
(
t
);
const
e
=
Object
.
assign
({},
v
),
s
=
this
.
utilities
.
generateUniqueIdentifier
(),
a
=
this
.
generateInstanceLayer
(
e
,
t
,
s
);
t
.
setAttribute
(
x
,
s
),
N
.
appendChild
(
a
),
p
.
push
(
this
.
setthemeDebugNode
(
e
,
a
,
t
))}
v
.
reset
()}}))})),
this
.
themeDebugNodes
=
p
,
this
.
triggerMutationObserver
(
p
),
this
.
triggerResizeObserver
(
p
),
C
.
init
(
N
,
p
),
a
.
appendChild
(
C
.
generateControllerLayer
()),
C
.
executePostActivation
()},
detach
:
function
(
e
,
t
,
s
){}}}(
Drupal
);
\ No newline at end of file
!
function
(
e
){
e
.
behaviors
.
visualDebugger
=
{
body
:
document
.
body
,
utilities
:
e
.
vdUtilities
,
constants
:{
baseZIndex
:
0
},
classNames
:{
classNameVisualDebugger
:
"
visual-debugger
"
,
classNameInitialized
:
"
visual-debugger--initialized
"
,
classNameBaseLayer
:
"
visual-debugger--base
"
,
classNameInstanceLayer
:
"
instance-element
"
,
classNameInstanceLayerUnchecked
:
"
instance-element--unchecked
"
,
classNameInstanceLayerChecked
:
"
instance-element--checked
"
,
classNameInstanceLayerHover
:
"
instance-element--hover
"
,
classNameObjectType
:
"
object-type
"
,
classNameObjectTypeHover
:
"
object-type--hover
"
,
classNameIconActivated
:
"
icon-checkbox-checked
"
,
classNameIconDectivated
:
"
icon-checkbox-unchecked
"
,
classNameCheckboxToggle
:
"
checkbox-toggle
"
,
classNameSpanToggle
:
"
span-toggle
"
,
classNameActivated
:
"
item-activated
"
,
classNameDeactivated
:
"
item-deactivated
"
,
classNameObjectTypeTyped
:
e
=>
`object-type--
${
e
}
`
},
layerAttributes
:{
layerIdAttributeName
:
"
data-vd-id
"
},
themeDebugNodes
:
null
,
triggerResizeObserver
(
e
){
const
{
body
:
t
}
=
this
,{
layerIdAttributeName
:
s
}
=
this
.
layerAttributes
,{
layerTargetIdAttributeName
:
a
}
=
this
.
utilities
.
layerAttributes
,
n
=
new
ResizeObserver
((
e
=>
{
e
.
forEach
((
e
=>
{
const
n
=
e
.
target
,
i
=
n
.
getAttribute
(
s
),
c
=
t
.
querySelector
(
`[
${
a
}
="
${
i
}
"]`
);
this
.
setInstanceLayerSizeAndPosition
(
c
,
n
)}))}));
e
.
forEach
((
e
=>
{
const
{
instanceRefElement
:
t
}
=
e
;
n
.
observe
(
t
)}))},
triggerMutationObserver
:
function
(
e
){
new
MutationObserver
((()
=>
{
e
.
forEach
((
e
=>
{
this
.
setInstanceLayerSizeAndPosition
(
e
.
instanceLayer
,
e
.
instanceRefElement
)}))})).
observe
(
this
.
body
,{
attributes
:
!
0
,
attributeFilter
:[
"
style
"
]})},
regExs
:{
regexGetTemplateDebug
:()
=>
new
RegExp
(
"
^(THEME DEBUG|START RENDERER)$
"
),
regexGetTemplateHook
:()
=>
new
RegExp
(
"
THEME HOOK: '([^']*)'
"
),
regexGetTemplateSuggestions
:()
=>
new
RegExp
(
"
FILE NAME SUGGESTIONS:s*
\n
s*([^']*)s*
\n
*s*
"
),
regexGetTemplateFilePath
:()
=>
new
RegExp
(
"
BEGIN( CUSTOM TEMPLATE)? OUTPUT from '([^']*)'
"
),
regexGetTemplateEndOutput
:()
=>
new
RegExp
(
"
END OUTPUT from '([^']*)'
"
),
regexGetCacheHit
:()
=>
new
RegExp
(
"
CACHE-HIT: (Yes|No)
"
),
regexGetCacheTags
:()
=>
new
RegExp
(
"
^
\\
s?CACHE TAGS:s*
\n
s*([^']*)s*
\n
*s*
"
),
regexGetCacheContexts
:()
=>
new
RegExp
(
"
^
\\
s?CACHE CONTEXTS:s*
\n
s*([^']*)s*
\n
*s*
"
),
regexGetCacheKeys
:()
=>
new
RegExp
(
"
^
\\
s?CACHE KEYS:s*
\n
s*([^']*)s*
\n
*s*
"
),
regexGetCacheMaxAge
:()
=>
new
RegExp
(
"
^
\\
s?CACHE MAX-AGE: (-?[0-9]*)
"
),
regexGetPreBubblingCacheTags
:()
=>
new
RegExp
(
"
PRE-BUBBLING CACHE TAGS:s*
\n
s*([^']*)s*
\n
*s*
"
),
regexGetPreBubblingCacheContexts
:()
=>
new
RegExp
(
"
PRE-BUBBLING CACHE CONTEXTS:s*
\n
s*([^']*)s*
\n
*s*
"
),
regexGetPreBubblingCacheKeys
:()
=>
new
RegExp
(
"
PRE-BUBBLING CACHE KEYS:s*
\n
s*([^']*)s*
\n
*s*
"
),
regexGetPreBubblingCacheMaxAge
:()
=>
new
RegExp
(
"
PRE-BUBBLING CACHE MAX-AGE: (-?[0-9]*)
"
),
regexGetRenderingTime
:()
=>
new
RegExp
(
"
RENDERING TIME: (-?[0-9]*.?[0-9]*)
"
)},
controllerElement
:
null
,
getUniquePropertyHooks
:
e
=>
e
.
map
((
e
=>
e
.
instanceActiveElement
.
propertyHook
)).
filter
(((
e
,
t
,
s
)
=>
s
.
indexOf
(
e
)
===
t
)).
sort
(),
getCalculatedDomDepth
(
e
){
let
t
=
0
;
for
(;
e
.
parentNode
;)
t
++
,
e
=
e
.
parentNode
;
return
t
},
generateBaseLayer
(){
const
e
=
document
.
createElement
(
"
div
"
),{
classNameVisualDebugger
:
t
,
classNameBaseLayer
:
s
}
=
this
.
classNames
;
return
e
.
classList
.
add
(
t
),
e
.
classList
.
add
(
s
),
e
},
getCheckedNodes
(){
return
this
.
themeDebugNodes
.
filter
((
e
=>
e
.
instanceLayer
.
classList
.
contains
(
this
.
classNames
.
classNameInstanceLayerChecked
)))},
generateInstanceLayer
(
e
,
t
,
s
){
const
a
=
document
.
createElement
(
"
div
"
),
n
=
this
.
controllerElement
,{
classNameInstanceLayer
:
i
,
classNameInstanceLayerChecked
:
c
,
classNameInstanceLayerUnchecked
:
r
,
classNameObjectType
:
o
,
classNameObjectTypeTyped
:
l
,
classNameIconActivated
:
g
,
classNameIconDectivated
:
d
,
classNameCheckboxToggle
:
h
,
classNameSpanToggle
:
u
,
classNameActivated
:
m
,
classNameDeactivated
:
b
}
=
this
.
classNames
,{
layerTargetIdAttributeName
:
E
,
instanceLayerActivatedAttributeName
:
y
,
layerAttributeIsVisible
:
x
}
=
this
.
utilities
.
layerAttributes
;
a
.
classList
.
add
(
i
,
o
,
l
(
e
.
getObjectType
()),
r
),
a
.
setAttribute
(
E
,
s
),
a
.
setAttribute
(
x
,
!
0
),
a
.
setAttribute
(
y
,
!
1
),
a
.
style
.
zIndex
=
this
.
getCalculatedDomDepth
(
t
),
this
.
setInstanceLayerSizeAndPosition
(
a
,
t
);
const
C
=
e
,
N
=
document
.
createElement
(
"
input
"
);
N
.
setAttribute
(
"
type
"
,
"
checkbox
"
),
N
.
classList
.
add
(
h
);
const
p
=
document
.
createElement
(
"
span
"
);
p
.
classList
.
add
(
u
,
m
,
g
);
const
v
=
document
.
createElement
(
"
span
"
);
return
v
.
classList
.
add
(
u
,
b
,
d
),
a
.
append
(
N
,
p
,
v
),
a
.
addEventListener
(
"
mouseenter
"
,(()
=>
{
N
.
focus
({
preventScroll
:
!
0
}),
n
.
setActiveThemeElement
(
C
)})),
a
.
addEventListener
(
"
mouseleave
"
,(()
=>
{
N
.
blur
(),
n
.
resetActiveThemeElement
(
C
)})),
a
.
addEventListener
(
"
click
"
,(()
=>
{
this
.
getCheckedNodes
().
forEach
((
e
=>
{
e
.
instanceLayer
!==
a
&&
e
.
instanceLayer
.
click
()})),
N
.
click
()})),
N
.
addEventListener
(
"
change
"
,(()
=>
{
a
.
setAttribute
(
y
,
N
.
checked
),
a
.
classList
.
toggle
(
c
),
a
.
classList
.
toggle
(
r
),
!
0
===
N
.
checked
?(
N
.
focus
(),
n
.
setDefaultThemeElement
(
e
)):(
N
.
blur
(),
n
.
resetDefaultThemeElement
(
e
))})),
a
},
setInstanceLayerSizeAndPosition
(
e
,
t
){
const
s
=
t
.
getBoundingClientRect
(),
a
=
Math
.
round
(
s
.
top
+
window
.
scrollY
),
n
=
Math
.
round
(
s
.
left
+
window
.
scrollX
);
let
{
width
:
i
,
height
:
c
}
=
s
;
c
=
Math
.
floor
(
c
),
i
=
Math
.
floor
(
i
),
e
.
style
.
width
=
`
${
i
}
px`
,
e
.
style
.
height
=
`
${
c
}
px`
,
e
.
style
.
top
=
`
${
a
}
px`
,
e
.
style
.
left
=
`
${
n
}
px`
},
setthemeDebugNode
(
e
,
t
,
s
){
const
{
layerAttributeIsVisible
:
a
,
instanceLayerActivatedAttributeName
:
n
}
=
this
.
utilities
.
layerAttributes
,{
classNameInstanceLayerHover
:
i
,
classNameObjectTypeHover
:
c
}
=
this
.
classNames
;
return
{
instanceActiveElement
:
e
,
instanceLayer
:
t
,
instanceRefElement
:
s
,
showInstanceLayer
(){
this
.
instanceLayer
.
setAttribute
(
a
,
!
0
)},
hideInstanceLayer
(){
this
.
instanceLayer
.
setAttribute
(
a
,
!
1
),
"
true
"
===
this
.
instanceLayer
.
getAttribute
(
n
)
&&
this
.
instanceLayer
.
click
()},
triggerMouseEnter
(){
this
.
instanceLayer
.
dispatchEvent
(
new
MouseEvent
(
"
mouseenter
"
)),
this
.
instanceLayer
.
classList
.
add
(
i
,
c
)},
triggerMouseLeave
(){
this
.
instanceLayer
.
dispatchEvent
(
new
MouseEvent
(
"
mouseleave
"
)),
this
.
instanceLayer
.
classList
.
remove
(
i
,
c
)}}},
attach
:
function
(
e
,
t
){
const
{
body
:
s
}
=
this
,{
classNameInitialized
:
a
}
=
this
.
classNames
;
s
.
classList
.
contains
(
a
)
||
(
s
.
classList
.
add
(
a
),
this
.
main
(
e
,
t
,
s
))},
main
:
function
(
t
,
s
,
a
){
const
{
regexGetTemplateDebug
:
n
,
regexGetTemplateHook
:
i
,
regexGetTemplateSuggestions
:
c
,
regexGetTemplateFilePath
:
r
,
regexGetCacheHit
:
o
,
regexGetCacheMaxAge
:
l
,
regexGetPreBubblingCacheTags
:
g
,
regexGetPreBubblingCacheContexts
:
d
,
regexGetPreBubblingCacheKeys
:
h
,
regexGetPreBubblingCacheMaxAge
:
u
,
regexGetRenderingTime
:
m
,
regexGetCacheTags
:
b
,
regexGetCacheContexts
:
E
,
regexGetCacheKeys
:
y
}
=
this
.
regExs
,{
layerIdAttributeName
:
x
}
=
this
.
layerAttributes
,
C
=
e
.
controllerElement
;
this
.
controllerElement
=
C
;
const
N
=
this
.
generateBaseLayer
();
a
.
appendChild
(
N
);
let
p
=
[],
v
=
e
.
themeElement
;
v
.
init
();
document
.
querySelectorAll
(
"
*
"
).
forEach
((
e
=>
{
const
t
=
e
.
childNodes
;
Array
.
from
(
t
).
forEach
((
e
=>
{
if
(
e
.
nodeType
!==
Node
.
COMMENT_NODE
)
return
;
if
(
n
().
test
(
e
.
textContent
))
return
void
v
.
setActivated
();
const
t
=
e
.
textContent
.
match
(
o
());
if
(
t
)
return
void
v
.
setCacheHit
(
t
[
1
]);
const
s
=
e
.
textContent
.
match
(
l
());
if
(
s
)
return
void
v
.
setCacheMaxAge
(
s
[
1
]);
const
a
=
e
.
textContent
.
match
(
b
());
if
(
a
)
return
void
v
.
setCacheTags
(
a
[
1
]);
const
C
=
e
.
textContent
.
match
(
E
());
if
(
C
)
return
void
v
.
setCacheContexts
(
C
[
1
]);
const
A
=
e
.
textContent
.
match
(
y
());
if
(
A
)
return
void
v
.
setCacheKeys
(
A
[
1
]);
const
L
=
e
.
textContent
.
match
(
g
());
if
(
L
)
return
void
v
.
setPreBubblingCacheTags
(
L
[
1
]);
const
T
=
e
.
textContent
.
match
(
d
());
if
(
T
)
return
void
v
.
setPreBubblingCacheContexts
(
T
[
1
]);
const
f
=
e
.
textContent
.
match
(
h
());
if
(
f
)
return
void
v
.
setPreBubblingCacheKeys
(
f
[
1
]);
const
I
=
e
.
textContent
.
match
(
u
());
if
(
I
)
return
void
v
.
setPreBubblingCacheMaxAge
(
I
[
1
]);
const
G
=
e
.
textContent
.
match
(
m
());
if
(
G
)
return
void
v
.
setRenderingTime
(
G
[
1
]);
const
R
=
e
.
textContent
.
match
(
i
());
if
(
R
)
return
v
.
setPropertyHook
(
R
[
1
]),
void
v
.
setObjectType
(
R
[
1
]);
const
B
=
e
.
textContent
.
match
(
c
());
if
(
B
)
return
void
v
.
setSuggestions
(
B
[
1
]);
const
P
=
e
.
textContent
.
match
(
r
());
if
(
P
){
v
.
setFilePath
(
P
[
1
]);
const
t
=
e
.
nextElementSibling
;
if
(
t
&&
t
.
nodeType
===
Node
.
ELEMENT_NODE
&&
null
===
v
.
dataNode
){
v
.
setDataNode
(
t
);
const
e
=
Object
.
assign
({},
v
),
s
=
this
.
utilities
.
generateUniqueIdentifier
(),
a
=
this
.
generateInstanceLayer
(
e
,
t
,
s
);
t
.
setAttribute
(
x
,
s
),
N
.
appendChild
(
a
),
p
.
push
(
this
.
setthemeDebugNode
(
e
,
a
,
t
))}
v
.
reset
()}}))})),
this
.
themeDebugNodes
=
p
,
this
.
triggerMutationObserver
(
p
),
this
.
triggerResizeObserver
(
p
),
C
.
init
(
N
,
p
),
a
.
appendChild
(
C
.
generateControllerLayer
()),
C
.
executePostActivation
()},
detach
:
function
(
e
,
t
,
s
){}}}(
Drupal
);
\ No newline at end of file
This diff is collapsed.
Click to expand it.
js/source/themeElement.js
+
3
−
3
View file @
c40601d7
...
...
@@ -105,7 +105,7 @@ Drupal.themeElement = {
},
setSuggestions
(
input
)
{
this
.
suggestions
=
this
.
pa
s
reListOnOffRegexpOutput
(
input
);
this
.
suggestions
=
this
.
par
s
eListOnOffRegexpOutput
(
input
);
},
setDataNode
(
input
)
{
...
...
@@ -297,14 +297,14 @@ Drupal.themeElement = {
});
},
pa
s
reListOnOffRegexpOutput
(
regexpOutput
)
{
par
s
eListOnOffRegexpOutput
(
regexpOutput
)
{
return
regexpOutput
.
trim
()
.
split
(
/
\n\s
*/
)
.
map
((
themeSuggestion
)
=>
{
const
splitThemeSuggestion
=
themeSuggestion
.
split
(
'
'
);
return
{
suggestion
:
splitThemeSuggestion
[
1
],
activated
:
(
splitThemeSuggestion
[
0
]
===
'
x
'
),
activated
:
[
'
x
'
,
'
✅
'
].
includes
(
splitThemeSuggestion
[
0
]),
};
});
},
...
...
This diff is collapsed.
Click to expand it.
js/source/vd.js
+
2
−
2
View file @
c40601d7
...
...
@@ -93,7 +93,7 @@
regExs
:
{
// Validate theme DEBUG.
regexGetTemplateDebug
:
()
=>
new
RegExp
(
"
^(THEME DEBUG|START RENDERE
D
)$
"
),
regexGetTemplateDebug
:
()
=>
new
RegExp
(
"
^(THEME DEBUG|START RENDERE
R
)$
"
),
// Validate template hook.
regexGetTemplateHook
:
()
=>
new
RegExp
(
"
THEME HOOK: '([^']*)'
"
),
...
...
@@ -104,7 +104,7 @@
),
// Validate template file path.
regexGetTemplateFilePath
:
()
=>
new
RegExp
(
"
BEGIN OUTPUT from '([^']*)'
"
),
regexGetTemplateFilePath
:
()
=>
new
RegExp
(
"
BEGIN
( CUSTOM TEMPLATE)?
OUTPUT from '([^']*)'
"
),
// Validate complete theme analysis.
regexGetTemplateEndOutput
:
()
=>
new
RegExp
(
"
END OUTPUT from '([^']*)'
"
),
...
...
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