@jinntec/fore 3.3.1 → 4.0.0
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/README.md +98 -70
- package/dist/fore-dev.js +5593 -6832
- package/dist/fore.js +5602 -4887
- package/index.js +5 -10
- package/package.json +7 -7
- package/resources/fore.css +33 -0
- package/src/DependencyNotifyingDomFacade.js +90 -21
- package/src/DependentXPathQueries.js +15 -2
- package/src/ForeElementMixin.js +110 -16
- package/src/UndoManager.js +267 -0
- package/src/actions/abstract-action.js +71 -30
- package/src/actions/fx-action.js +5 -0
- package/src/actions/fx-append.js +3 -3
- package/src/actions/fx-commit-history.js +26 -0
- package/src/actions/fx-hide.js +1 -1
- package/src/actions/fx-insert.js +25 -22
- package/src/actions/fx-load.js +5 -5
- package/src/actions/fx-redo.js +58 -0
- package/src/actions/fx-refresh.js +2 -2
- package/src/actions/fx-reload.js +1 -1
- package/src/actions/fx-replace.js +1 -1
- package/src/actions/fx-send.js +27 -5
- package/src/actions/fx-setattribute.js +11 -7
- package/src/actions/fx-undo.js +58 -0
- package/src/createNodes.js +314 -0
- package/src/fore.js +53 -18
- package/src/functions/fx-functionlib.js +10 -10
- package/src/fx-bind.js +30 -18
- package/src/fx-fore.js +222 -200
- package/src/fx-instance.js +18 -1
- package/src/fx-model.js +236 -69
- package/src/fx-submission.js +37 -29
- package/src/fx-var.js +49 -13
- package/src/getInScopeContext.js +1 -1
- package/src/json/JSONDomFacade.js +1 -1
- package/src/json/JSONLens.js +2 -2
- package/src/ui/UIElement.js +18 -8
- package/src/ui/abstract-control.js +45 -3
- package/src/ui/fx-alert.js +4 -0
- package/src/ui/fx-case.js +1 -1
- package/src/ui/fx-container.js +3 -0
- package/src/ui/fx-control-menu.js +79 -11
- package/src/ui/fx-control.js +130 -41
- package/src/ui/fx-dialog.js +5 -0
- package/src/ui/fx-items.js +6 -6
- package/src/ui/fx-output.js +37 -1
- package/src/ui/fx-repeat.js +1065 -103
- package/src/ui/fx-repeatitem.js +4 -1
- package/src/ui/fx-switch.js +116 -3
- package/src/ui/fx-trigger.js +9 -4
- package/src/ui/fx-upload.js +10 -4
- package/src/ui/repeat-base.js +20 -12
- package/src/withDraggability.js +10 -1
- package/src/xpath-evaluation.js +30 -18
- package/src/xpath-path.js +122 -0
- package/src/xpath-util.js +11 -126
- package/src/actions/StringTpl.js +0 -17
- package/src/extract-predicate-deps.js +0 -57
- package/src/extractPredicateDependencies.js +0 -36
- package/src/json/lensFromNode.js +0 -5
- package/src/json-util.js +0 -27
- package/src/tools/adi.js +0 -1111
- package/src/tools/deprecation.md +0 -1
- package/src/tools/fx-action-log.js +0 -745
- package/src/tools/fx-devtools.js +0 -444
- package/src/tools/fx-dom-inspector.js +0 -610
- package/src/tools/fx-json-instance.js +0 -444
- package/src/tools/fx-log-item.js +0 -128
- package/src/tools/fx-log-settings.js +0 -533
- package/src/tools/fx-minimap.js +0 -203
- package/src/tools/helpers.js +0 -132
- package/src/ui/TemplateExpression.js +0 -12
- package/src/ui/fx-dom-inspector.js +0 -1255
|
@@ -1,610 +0,0 @@
|
|
|
1
|
-
import ADI from './adi.js';
|
|
2
|
-
|
|
3
|
-
export class FxDomInspector extends HTMLElement {
|
|
4
|
-
constructor() {
|
|
5
|
-
super();
|
|
6
|
-
this.attachShadow({ mode: 'open' });
|
|
7
|
-
this.instanceName = null;
|
|
8
|
-
this.instance = null;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
connectedCallback() {
|
|
12
|
-
this.render();
|
|
13
|
-
if (this.instance) {
|
|
14
|
-
this.shadowRoot.querySelector('#focus-button').style = 'display: none';
|
|
15
|
-
} else {
|
|
16
|
-
this.setupFocusButton();
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
setInstance(instance) {
|
|
21
|
-
this.instance = instance;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
disconnectedCallback() {
|
|
25
|
-
this.adiInstance = null;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
setupFocusButton() {
|
|
29
|
-
let styleBackup = '';
|
|
30
|
-
let focusedElement = null;
|
|
31
|
-
const removeFocus = () => {
|
|
32
|
-
if (styleBackup === '') {
|
|
33
|
-
focusedElement.removeAttribute('style');
|
|
34
|
-
} else {
|
|
35
|
-
focusedElement.setAttribute('style', styleBackup);
|
|
36
|
-
}
|
|
37
|
-
focusedElement = null;
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
const onHover = event => {
|
|
41
|
-
const { target } = event;
|
|
42
|
-
if (event.type === 'mouseover') {
|
|
43
|
-
styleBackup = target.getAttribute('style') || '';
|
|
44
|
-
target.setAttribute('style', `outline: 2px solid blue; ${styleBackup}`);
|
|
45
|
-
focusedElement = target;
|
|
46
|
-
return;
|
|
47
|
-
}
|
|
48
|
-
if (focusedElement) {
|
|
49
|
-
removeFocus();
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
const focusButton = this.shadowRoot.querySelector('#focus-button');
|
|
54
|
-
let isFocussing = false;
|
|
55
|
-
const styleElement = window.document.head.appendChild(document.createElement('style'));
|
|
56
|
-
const stopFocussing = () => {
|
|
57
|
-
isFocussing = false;
|
|
58
|
-
window.document.body.removeEventListener('click', listener);
|
|
59
|
-
focusButton.classList.remove('selected-btn');
|
|
60
|
-
styleElement.innerHTML = '';
|
|
61
|
-
document.body.style.cursor = 'auto';
|
|
62
|
-
|
|
63
|
-
window.document.body.removeEventListener('mouseover', onHover);
|
|
64
|
-
window.document.body.removeEventListener('mouseout', onHover);
|
|
65
|
-
if (focusedElement) {
|
|
66
|
-
removeFocus();
|
|
67
|
-
}
|
|
68
|
-
};
|
|
69
|
-
const listener = event => {
|
|
70
|
-
stopFocussing();
|
|
71
|
-
|
|
72
|
-
event.preventDefault();
|
|
73
|
-
event.stopPropagation();
|
|
74
|
-
if (event.target !== focusButton) {
|
|
75
|
-
// Do not 'click on the focusbutton. It's a cancel.
|
|
76
|
-
// console.log('done', event.target);
|
|
77
|
-
window.document.dispatchEvent(
|
|
78
|
-
new CustomEvent('log-active-element', { detail: { target: event.target } }),
|
|
79
|
-
);
|
|
80
|
-
}
|
|
81
|
-
};
|
|
82
|
-
const startFocussing = () => {
|
|
83
|
-
isFocussing = true;
|
|
84
|
-
focusButton.classList.add('selected-btn');
|
|
85
|
-
document.body.style.cursor = 'crosshair';
|
|
86
|
-
|
|
87
|
-
window.document.body.removeEventListener('click', listener);
|
|
88
|
-
styleElement.innerHTML =
|
|
89
|
-
'fx-fore::before { color:blue; content: "Sub fore!" } fx-fore {border: solid 1px blue}';
|
|
90
|
-
window.document.body.addEventListener('click', listener);
|
|
91
|
-
|
|
92
|
-
window.document.body.addEventListener('mouseover', onHover);
|
|
93
|
-
window.document.body.addEventListener('mouseout', onHover);
|
|
94
|
-
};
|
|
95
|
-
window.document.addEventListener('keyup', event => {
|
|
96
|
-
if (isFocussing && event.code === 'Escape') {
|
|
97
|
-
stopFocussing();
|
|
98
|
-
return;
|
|
99
|
-
}
|
|
100
|
-
if (!isFocussing && event.code === 'KeyI' && event.ctrlKey) {
|
|
101
|
-
startFocussing();
|
|
102
|
-
}
|
|
103
|
-
});
|
|
104
|
-
focusButton.addEventListener('click', clickEvent => {
|
|
105
|
-
if (isFocussing) {
|
|
106
|
-
stopFocussing();
|
|
107
|
-
} else {
|
|
108
|
-
startFocussing();
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
clickEvent.preventDefault();
|
|
112
|
-
clickEvent.stopPropagation();
|
|
113
|
-
});
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
render() {
|
|
117
|
-
const style = `
|
|
118
|
-
@import '../../resources/fore.css';
|
|
119
|
-
|
|
120
|
-
:host {
|
|
121
|
-
display:block;
|
|
122
|
-
background:transparent;
|
|
123
|
-
}
|
|
124
|
-
body {
|
|
125
|
-
-webkit-animation: bugfix infinite 1s;
|
|
126
|
-
font-size:1rem;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
@-webkit-keyframes bugfix {
|
|
130
|
-
from {
|
|
131
|
-
padding: 0
|
|
132
|
-
}
|
|
133
|
-
to {
|
|
134
|
-
padding: 0
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
.adi-content {
|
|
138
|
-
position: relative;
|
|
139
|
-
overflow: auto;
|
|
140
|
-
box-sizing: border-box;
|
|
141
|
-
-moz-box-sizing: border-box;
|
|
142
|
-
height: 100% !important;
|
|
143
|
-
padding:0;
|
|
144
|
-
font-size:0.8em;
|
|
145
|
-
}
|
|
146
|
-
.adi-content header{
|
|
147
|
-
padding:0.5rem;
|
|
148
|
-
// background:rgba(255, 255, 255, 0.2);
|
|
149
|
-
border-bottom:2px solid #ddd;
|
|
150
|
-
border-collapse:collapse;
|
|
151
|
-
}
|
|
152
|
-
.adi-content > * {
|
|
153
|
-
padding:0 0.25em;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
#adi-wrapper {
|
|
157
|
-
top: 0;
|
|
158
|
-
font-family: "Segoe UI", Arial;
|
|
159
|
-
font-size: 1.1rem;
|
|
160
|
-
-webkit-user-select: none;
|
|
161
|
-
-moz-user-select: none;
|
|
162
|
-
-ms-user-select: none;
|
|
163
|
-
user-select: none;
|
|
164
|
-
position:relative;
|
|
165
|
-
height:calc(100% - 8rem);
|
|
166
|
-
display:flex;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
#adi-wrapper.left {
|
|
170
|
-
left: 0
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
#adi-wrapper.right {
|
|
174
|
-
right: 0
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
#adi-wrapper.transparent {
|
|
178
|
-
background: rgba(250, 250, 250, 0.9)
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
#adi-panel {
|
|
182
|
-
position:fixed;
|
|
183
|
-
top:0;
|
|
184
|
-
/*bottom: 0;*/
|
|
185
|
-
right: 0;
|
|
186
|
-
height: 24px;
|
|
187
|
-
background: #d4d4d4;
|
|
188
|
-
border-top: 1px solid #bbc5c9
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
#adi-panel .adi-path-wrap {
|
|
192
|
-
position:absolute;
|
|
193
|
-
bottom: 0;
|
|
194
|
-
left: 0;
|
|
195
|
-
width: 80%;
|
|
196
|
-
height: 24px;
|
|
197
|
-
padding: 0 13px 0 18px;
|
|
198
|
-
line-height: 24px;
|
|
199
|
-
overflow: hidden;
|
|
200
|
-
box-sizing: border-box;
|
|
201
|
-
-moz-box-sizing: border-box
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
#adi-panel .adi-path-wrap.adi-overflowing .adi-path-left,
|
|
205
|
-
#adi-panel .adi-path-wrap.adi-overflowing .adi-path-right {
|
|
206
|
-
display: block
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
#adi-panel .adi-path {
|
|
210
|
-
height: 24px;
|
|
211
|
-
overflow: hidden;
|
|
212
|
-
white-space: nowrap
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
#adi-panel .adi-path-left, #adi-panel .adi-path-right {
|
|
216
|
-
display: none;
|
|
217
|
-
position: absolute;
|
|
218
|
-
top: 0;
|
|
219
|
-
width: 8px;
|
|
220
|
-
height: 24px;
|
|
221
|
-
background-repeat: no-repeat;
|
|
222
|
-
background-position: center center;
|
|
223
|
-
opacity: .7
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
#adi-panel .adi-path-left:hover, #adi-panel .adi-path-right:hover {
|
|
227
|
-
opacity: 1
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
#adi-panel .adi-path-left {
|
|
231
|
-
left: 7px;
|
|
232
|
-
background-image: url('img/left_shift.png')
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
#adi-panel .adi-path-right {
|
|
236
|
-
position:absolute;
|
|
237
|
-
right: 2px;
|
|
238
|
-
background-image: url('/resources/scripts/dom-inspector/img/right_shift.png')
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
#adi-panel .adi-menu-wrap {
|
|
242
|
-
bottom: 0;
|
|
243
|
-
right: 24px;
|
|
244
|
-
width: 50px;
|
|
245
|
-
height: 24px
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
#adi-panel .adi-menu-lookup, #adi-panel .adi-menu-config {
|
|
249
|
-
display: block;
|
|
250
|
-
float: left;
|
|
251
|
-
width: 24px;
|
|
252
|
-
height: 24px;
|
|
253
|
-
border-left: 1px solid #bbc5c9;
|
|
254
|
-
background-position: center center;
|
|
255
|
-
background-repeat: no-repeat;
|
|
256
|
-
opacity: .7;
|
|
257
|
-
border-radius: 0
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
#adi-panel .adi-menu-lookup:hover, #adi-panel .adi-menu-config:hover {
|
|
261
|
-
background-color: #c5d9d8;
|
|
262
|
-
opacity: 1
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
#adi-panel .adi-menu-lookup.adi-active, #adi-panel .adi-menu-config.adi-active {
|
|
266
|
-
background-color: #fafafa;
|
|
267
|
-
opacity: 1
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
#adi-panel .adi-menu-lookup {
|
|
271
|
-
background-image: url('/resources/scripts/dom-inspector/img/lookup.png')
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
#adi-panel .adi-menu-config {
|
|
275
|
-
background-image: url('/resources/scripts/dom-inspector/img/config.png')
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
#adi-vert-split {
|
|
281
|
-
position: fixed;
|
|
282
|
-
top: 0;
|
|
283
|
-
width: 4px;
|
|
284
|
-
height: 100%;
|
|
285
|
-
cursor: e-resize;
|
|
286
|
-
border-width: 0 1px 0 0;
|
|
287
|
-
background: #bbc5c9;
|
|
288
|
-
border-color: #768285;
|
|
289
|
-
border-style: solid;
|
|
290
|
-
-webkit-user-select: none;
|
|
291
|
-
-moz-user-select: none;
|
|
292
|
-
-ms-user-select: none;
|
|
293
|
-
user-select: none;
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
#adi-vert-split:hover {
|
|
297
|
-
background: #c5d9d8;
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
#adi-dom-view {
|
|
302
|
-
border-right:2px solid #ddd;
|
|
303
|
-
overflow:auto;
|
|
304
|
-
flex-grow:3;
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
#adi-dom-view ul {
|
|
308
|
-
margin: 0;
|
|
309
|
-
padding: 0;
|
|
310
|
-
list-style: none
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
#adi-dom-view ul[data-open=true] {
|
|
314
|
-
display: block
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
#adi-dom-view ul[data-open=false] {
|
|
318
|
-
display: none
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
#adi-dom-view ul ul {
|
|
322
|
-
margin: 4px 0
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
#adi-dom-view ul li {
|
|
326
|
-
padding-left: 1em;
|
|
327
|
-
padding-bottom: 0.125em;
|
|
328
|
-
margin: 0;
|
|
329
|
-
padding-top: 0.125em;
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
#adi-dom-view .adi-normal-node,
|
|
339
|
-
#adi-dom-view .adi-end-node {
|
|
340
|
-
margin-right: 5px;
|
|
341
|
-
padding: 0 6px 0px;
|
|
342
|
-
background: #d2e8ff;
|
|
343
|
-
border-radius: 8px;
|
|
344
|
-
cursor: default;
|
|
345
|
-
font-size:0.8rem;
|
|
346
|
-
}
|
|
347
|
-
#adi-dom-view .adi-text-node:after, #adi-dom-view .adi-comment-node:after {
|
|
348
|
-
content: '"'
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
#adi-dom-view .adi-text-node:before, #adi-dom-view .adi-comment-node:before {
|
|
352
|
-
content: '"'
|
|
353
|
-
}
|
|
354
|
-
|
|
355
|
-
#adi-dom-view .adi-comment-node {
|
|
356
|
-
color: #999;
|
|
357
|
-
font-style: italic
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
#adi-dom-view .adi-text-node, #adi-dom-view .adi-comment-node {
|
|
361
|
-
display: block;
|
|
362
|
-
padding: 3px 8px;
|
|
363
|
-
color: #444;
|
|
364
|
-
background: #fff;
|
|
365
|
-
border-radius: 8px
|
|
366
|
-
}
|
|
367
|
-
|
|
368
|
-
#adi-dom-view .adi-normal-node:hover,
|
|
369
|
-
#adi-dom-view .adi-normal-node.hover,
|
|
370
|
-
#adi-dom-view .adi-end-node:hover,
|
|
371
|
-
#adi-dom-view .adi-end-node.hover {
|
|
372
|
-
background: var(--paper-grey-700);
|
|
373
|
-
color:white;
|
|
374
|
-
}
|
|
375
|
-
|
|
376
|
-
#adi-dom-view .adi-normal-node:hover ~ span,
|
|
377
|
-
#adi-dom-view .adi-normal-node.hover ~ span,
|
|
378
|
-
#adi-dom-view .adi-end-node:hover ~ span,
|
|
379
|
-
#adi-dom-view .adi-end-node.hover ~ span {
|
|
380
|
-
background: var(--paper-grey-700);
|
|
381
|
-
color:white;
|
|
382
|
-
}
|
|
383
|
-
|
|
384
|
-
#adi-dom-view .adi-normal-node.adi-active-node,
|
|
385
|
-
#adi-dom-view .adi-end-node.adi-active-node {
|
|
386
|
-
background: var(--paper-grey-700);
|
|
387
|
-
color:white;
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
#adi-dom-view .adi-normal-node.adi-active-node ~ span,
|
|
391
|
-
#adi-dom-view .adi-end-node.adi-active-node ~ span {
|
|
392
|
-
background: var(--paper-grey-700);
|
|
393
|
-
color:white;
|
|
394
|
-
}
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
#adi-dom-view .adi-trigger {
|
|
402
|
-
display: inline-block;
|
|
403
|
-
width: 10px;
|
|
404
|
-
height: 10px;
|
|
405
|
-
margin: 0 5px 0 -13px;
|
|
406
|
-
opacity: .7
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
#adi-dom-view .adi-trigger.closed {
|
|
410
|
-
// background: url('/resources/scripts/dom-inspector/img/node_closed.png') no-repeat;
|
|
411
|
-
}
|
|
412
|
-
#adi-dom-view .adi-trigger.closed::before {
|
|
413
|
-
content:'\\25B8';
|
|
414
|
-
}
|
|
415
|
-
|
|
416
|
-
#adi-dom-view .adi-trigger.opened {
|
|
417
|
-
// background: url('/resources/scripts/dom-inspector/img/node_opened.png') no-repeat
|
|
418
|
-
}
|
|
419
|
-
#adi-dom-view .adi-trigger.opened::before{
|
|
420
|
-
content:'\\25BE';
|
|
421
|
-
}
|
|
422
|
-
|
|
423
|
-
#adi-dom-view .adi-trigger:hover {
|
|
424
|
-
opacity: 1
|
|
425
|
-
}
|
|
426
|
-
|
|
427
|
-
#adi-opts-view {
|
|
428
|
-
position: relative;
|
|
429
|
-
height: 100%;
|
|
430
|
-
padding: 0 15px;
|
|
431
|
-
background: #fff
|
|
432
|
-
}
|
|
433
|
-
|
|
434
|
-
#adi-opts-view.adi-hidden {
|
|
435
|
-
display: none
|
|
436
|
-
}
|
|
437
|
-
|
|
438
|
-
#adi-opts-view .adi-opt-heading, #adi-opts-view .adi-opt {
|
|
439
|
-
display: block;
|
|
440
|
-
padding: 5px 0
|
|
441
|
-
}
|
|
442
|
-
|
|
443
|
-
#adi-opts-view .adi-opt-heading {
|
|
444
|
-
padding: 20px 0 10px;
|
|
445
|
-
font-size: 1rem;
|
|
446
|
-
}
|
|
447
|
-
|
|
448
|
-
#adi-opts-view .adi-opt-heading:first-child {
|
|
449
|
-
padding-top: 10px
|
|
450
|
-
}
|
|
451
|
-
|
|
452
|
-
#adi-opts-view .adi-opt input {
|
|
453
|
-
margin-right: 6px
|
|
454
|
-
}
|
|
455
|
-
|
|
456
|
-
#adi-opts-view .adi-opt-close {
|
|
457
|
-
position: absolute;
|
|
458
|
-
top: 5px;
|
|
459
|
-
right: 28px;
|
|
460
|
-
width: 16px;
|
|
461
|
-
height: 16px;
|
|
462
|
-
background: url('/resources/scripts/dom-inspector/img/options_close.png') no-repeat;
|
|
463
|
-
opacity: .7;
|
|
464
|
-
}
|
|
465
|
-
|
|
466
|
-
#adi-opts-view .adi-opt-close:hover {
|
|
467
|
-
opacity: 1;
|
|
468
|
-
}
|
|
469
|
-
|
|
470
|
-
#adi-attr-view {
|
|
471
|
-
top: 0.5rem;
|
|
472
|
-
border: 1px solid #ddd;
|
|
473
|
-
overflow: auto;
|
|
474
|
-
padding: 0.25em;
|
|
475
|
-
height: calc(90% - 1em);
|
|
476
|
-
min-width: 10rem;
|
|
477
|
-
position: absolute;
|
|
478
|
-
z-index: 10;
|
|
479
|
-
right: 0.5rem;
|
|
480
|
-
background:rgba(255,255,255,0.85);
|
|
481
|
-
}
|
|
482
|
-
#adi-attr-view > .adi-content{
|
|
483
|
-
height:calc(100% - 5em);
|
|
484
|
-
overflow:auto;
|
|
485
|
-
}
|
|
486
|
-
|
|
487
|
-
#adi-attr-view .adi-attr {
|
|
488
|
-
display: block;
|
|
489
|
-
padding: 0.25em;
|
|
490
|
-
}
|
|
491
|
-
|
|
492
|
-
#adi-attr-view hr {
|
|
493
|
-
height: 1px;
|
|
494
|
-
border: none
|
|
495
|
-
}
|
|
496
|
-
|
|
497
|
-
#adi-attr-view input[type=text] {
|
|
498
|
-
width: calc(100% - 0.5em);
|
|
499
|
-
margin-top: 3px;
|
|
500
|
-
padding: 2px;
|
|
501
|
-
}
|
|
502
|
-
|
|
503
|
-
#adi-horiz-split {
|
|
504
|
-
height: 4px;
|
|
505
|
-
cursor: n-resize;
|
|
506
|
-
border-width: 0 0 1px 0;
|
|
507
|
-
background: #bbc5c9;
|
|
508
|
-
border-color: #768285;
|
|
509
|
-
border-style: solid;
|
|
510
|
-
-webkit-user-select: none;
|
|
511
|
-
-moz-user-select: none;
|
|
512
|
-
-ms-user-select: none;
|
|
513
|
-
user-select: none;
|
|
514
|
-
}
|
|
515
|
-
|
|
516
|
-
#adi-horiz-split:hover {
|
|
517
|
-
background: #c5d9d8;
|
|
518
|
-
}
|
|
519
|
-
|
|
520
|
-
#adi-dom-view .fore-node{
|
|
521
|
-
background: var(--paper-blue-700);
|
|
522
|
-
font-size:1.1em;
|
|
523
|
-
color:white;
|
|
524
|
-
}
|
|
525
|
-
#adi-dom-view .adi-normal-node.fore-node:hover {
|
|
526
|
-
background: var(--paper-grey-700);
|
|
527
|
-
color:white;
|
|
528
|
-
}
|
|
529
|
-
#adi-dom-view .adi-end-node.fore-node{
|
|
530
|
-
background: var(--paper-blue-700);
|
|
531
|
-
font-size:1em;
|
|
532
|
-
color:white;
|
|
533
|
-
}
|
|
534
|
-
|
|
535
|
-
#adi-dom-view .adi-node .adi-active-node.fore-node,
|
|
536
|
-
#adi-dom-view .adi-node.action .adi-active-node.fore-node,
|
|
537
|
-
#adi-dom-view .adi-node.action .adi-active-node.fore-node ~ .adi-end-node
|
|
538
|
-
{
|
|
539
|
-
background: var(--paper-grey-700);
|
|
540
|
-
color:white;
|
|
541
|
-
}
|
|
542
|
-
|
|
543
|
-
#adi-dom-view .adi-node.fx-fore{
|
|
544
|
-
background:var(--paper-blue-grey-50);
|
|
545
|
-
}
|
|
546
|
-
#adi-dom-view .adi-node.fx-model{
|
|
547
|
-
background:var(--paper-blue-grey-100);
|
|
548
|
-
padding:0.25em 0;
|
|
549
|
-
}
|
|
550
|
-
|
|
551
|
-
#adi-dom-view .adi-node.action .fore-node {
|
|
552
|
-
background:var(--paper-blue-grey-100);
|
|
553
|
-
color:black;
|
|
554
|
-
font-family:monospace;
|
|
555
|
-
}
|
|
556
|
-
|
|
557
|
-
.toggleView{
|
|
558
|
-
/*width:20px;*/
|
|
559
|
-
/*height: 20px;*/
|
|
560
|
-
}
|
|
561
|
-
input, select{
|
|
562
|
-
display: block;
|
|
563
|
-
}
|
|
564
|
-
header{
|
|
565
|
-
background:rgba(255, 255, 255, 0.2);
|
|
566
|
-
}
|
|
567
|
-
|
|
568
|
-
.selected-btn { color: orange }
|
|
569
|
-
`;
|
|
570
|
-
|
|
571
|
-
const html = `
|
|
572
|
-
<slot name="header"></slot>
|
|
573
|
-
<button id="focus-button">Focus</button>
|
|
574
|
-
<slot></slot>
|
|
575
|
-
`;
|
|
576
|
-
|
|
577
|
-
this.shadowRoot.innerHTML = `
|
|
578
|
-
<style>
|
|
579
|
-
${style}
|
|
580
|
-
</style>
|
|
581
|
-
${html}
|
|
582
|
-
`;
|
|
583
|
-
const inst = this.hasAttribute('instance') ? this.getAttribute('instance') : '#document';
|
|
584
|
-
this.adiInstance = new ADI(
|
|
585
|
-
this.shadowRoot,
|
|
586
|
-
this.hasAttribute('instance') ? this.instance : '#document',
|
|
587
|
-
);
|
|
588
|
-
}
|
|
589
|
-
|
|
590
|
-
verticalResize(e) {
|
|
591
|
-
if (!this.vertResizing) {
|
|
592
|
-
return;
|
|
593
|
-
}
|
|
594
|
-
|
|
595
|
-
e = e || window.event;
|
|
596
|
-
document.documentElement.style.cursor = 'e-resize';
|
|
597
|
-
const nWidth = this.options.width + this.xPos - e.clientX;
|
|
598
|
-
|
|
599
|
-
if (nWidth >= this.options.minWidth) {
|
|
600
|
-
this.options.width = nWidth;
|
|
601
|
-
this.xPos = e.clientX;
|
|
602
|
-
this.refreshUI();
|
|
603
|
-
this.saveOptions();
|
|
604
|
-
}
|
|
605
|
-
}
|
|
606
|
-
}
|
|
607
|
-
|
|
608
|
-
if (!customElements.get('fx-dom-inspector')) {
|
|
609
|
-
customElements.define('fx-dom-inspector', FxDomInspector);
|
|
610
|
-
}
|