@openui5/sap.ui.webc.common 1.93.3 → 1.96.2
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/.reuse/dep5 +6 -11
- package/THIRDPARTY.txt +10 -16
- package/package.json +2 -2
- package/src/sap/ui/webc/common/.library +1 -1
- package/src/sap/ui/webc/common/WebComponent.js +42 -21
- package/src/sap/ui/webc/common/WebComponentMetadata.js +1 -1
- package/src/sap/ui/webc/common/WebComponentRenderer.js +3 -3
- package/src/sap/ui/webc/common/library.js +3 -3
- package/src/sap/ui/webc/common/thirdparty/base/Device.js +2 -0
- package/src/sap/ui/webc/common/thirdparty/base/EventProvider.js +16 -24
- package/src/sap/ui/webc/common/thirdparty/base/FontFace.js +4 -4
- package/src/sap/ui/webc/common/thirdparty/base/Keys.js +10 -0
- package/src/sap/ui/webc/common/thirdparty/base/StaticAreaItem.js +10 -1
- package/src/sap/ui/webc/common/thirdparty/base/SystemCSSVars.js +3 -3
- package/src/sap/ui/webc/common/thirdparty/base/UI5Element.js +25 -31
- package/src/sap/ui/webc/common/thirdparty/base/UI5ElementMetadata.js +1 -1
- package/src/sap/ui/webc/common/thirdparty/base/asset-registries/Icons.js +5 -0
- package/src/sap/ui/webc/common/thirdparty/base/asset-registries/Illustrations.js +23 -0
- package/src/sap/ui/webc/common/thirdparty/base/delegate/ItemNavigation.js +38 -0
- package/src/sap/ui/webc/common/thirdparty/base/renderer/LitRenderer.js +20 -18
- package/src/sap/ui/webc/common/thirdparty/base/sap/base/Log.js +253 -0
- package/src/sap/ui/webc/common/thirdparty/base/sap/base/assert.js +16 -0
- package/src/sap/ui/webc/common/thirdparty/base/sap/base/util/now.js +12 -0
- package/src/sap/ui/webc/common/thirdparty/base/types/DataType.js +9 -0
- package/src/sap/ui/webc/common/thirdparty/base/types/Float.js +3 -0
- package/src/sap/ui/webc/common/thirdparty/base/types/Integer.js +3 -0
- package/src/sap/ui/webc/common/thirdparty/base/updateShadowRoot.js +1 -1
- package/src/sap/ui/webc/common/thirdparty/base/util/AriaLabelHelper.js +4 -4
- package/src/sap/ui/webc/common/thirdparty/base/util/InvisibleMessage.js +21 -14
- package/src/sap/ui/webc/common/thirdparty/base/util/PopupUtils.js +1 -1
- package/src/sap/ui/webc/common/thirdparty/lit-html/directive.js +16 -0
- package/src/sap/ui/webc/common/thirdparty/lit-html/directives/class-map.js +8 -80
- package/src/sap/ui/webc/common/thirdparty/lit-html/directives/if-defined.js +13 -0
- package/src/sap/ui/webc/common/thirdparty/lit-html/directives/repeat.js +15 -159
- package/src/sap/ui/webc/common/thirdparty/lit-html/directives/style-map.js +8 -51
- package/src/sap/ui/webc/common/thirdparty/lit-html/directives/unsafe-html.js +9 -32
- package/src/sap/ui/webc/common/thirdparty/lit-html/lit-html.js +14 -49
- package/src/sap/ui/webc/common/thirdparty/lit-html/static.js +17 -0
- package/src/sap/ui/webc/common/thirdparty/theme-base/generated/json-imports/Themes.js +7 -7
- package/src/sap/ui/webc/common/thirdparty/theme-base/generated/themes/sap_belize/parameters-bundle.css.js +1 -1
- package/src/sap/ui/webc/common/thirdparty/theme-base/generated/themes/sap_belize_hcb/parameters-bundle.css.js +1 -1
- package/src/sap/ui/webc/common/thirdparty/theme-base/generated/themes/sap_belize_hcw/parameters-bundle.css.js +1 -1
- package/src/sap/ui/webc/common/thirdparty/theme-base/generated/themes/sap_fiori_3/parameters-bundle.css.js +1 -1
- package/src/sap/ui/webc/common/thirdparty/theme-base/generated/themes/sap_fiori_3_dark/parameters-bundle.css.js +1 -1
- package/src/sap/ui/webc/common/thirdparty/theme-base/generated/themes/sap_fiori_3_hcb/parameters-bundle.css.js +1 -1
- package/src/sap/ui/webc/common/thirdparty/theme-base/generated/themes/sap_fiori_3_hcw/parameters-bundle.css.js +1 -1
- package/src/sap/ui/webc/common/thirdparty/theme-base/parameters-bundle.css-10d6a87c.js +9 -0
- package/src/sap/ui/webc/common/thirdparty/theme-base/parameters-bundle.css-17ba1024.js +9 -0
- package/src/sap/ui/webc/common/thirdparty/theme-base/parameters-bundle.css-33240f21.js +9 -0
- package/src/sap/ui/webc/common/thirdparty/theme-base/parameters-bundle.css-354df2bd.js +9 -0
- package/src/sap/ui/webc/common/thirdparty/theme-base/parameters-bundle.css-4c3222f0.js +9 -0
- package/src/sap/ui/webc/common/thirdparty/theme-base/parameters-bundle.css-abf4cf1a.js +9 -0
- package/src/sap/ui/webc/common/thirdparty/theme-base/parameters-bundle.css-f92d2591.js +9 -0
- package/ui5.yaml +1 -1
- package/src/sap/ui/webc/common/thirdparty/base/renderer/ifDefined.js +0 -18
- package/src/sap/ui/webc/common/thirdparty/base/renderer/scopeHTML.js +0 -23
- package/src/sap/ui/webc/common/thirdparty/lit-html/lib/default-template-processor.js +0 -43
- package/src/sap/ui/webc/common/thirdparty/lit-html/lib/directive.js +0 -31
- package/src/sap/ui/webc/common/thirdparty/lit-html/lib/dom.js +0 -41
- package/src/sap/ui/webc/common/thirdparty/lit-html/lib/part.js +0 -24
- package/src/sap/ui/webc/common/thirdparty/lit-html/lib/parts.js +0 -374
- package/src/sap/ui/webc/common/thirdparty/lit-html/lib/render.js +0 -33
- package/src/sap/ui/webc/common/thirdparty/lit-html/lib/template-factory.js +0 -45
- package/src/sap/ui/webc/common/thirdparty/lit-html/lib/template-instance.js +0 -88
- package/src/sap/ui/webc/common/thirdparty/lit-html/lib/template-result.js +0 -77
- package/src/sap/ui/webc/common/thirdparty/lit-html/lib/template.js +0 -149
- package/src/sap/ui/webc/common/thirdparty/theme-base/parameters-bundle.css-0ad70668.js +0 -9
- package/src/sap/ui/webc/common/thirdparty/theme-base/parameters-bundle.css-0f7f1dcc.js +0 -9
- package/src/sap/ui/webc/common/thirdparty/theme-base/parameters-bundle.css-4bf24a54.js +0 -9
- package/src/sap/ui/webc/common/thirdparty/theme-base/parameters-bundle.css-69006d4e.js +0 -9
- package/src/sap/ui/webc/common/thirdparty/theme-base/parameters-bundle.css-819624f1.js +0 -9
- package/src/sap/ui/webc/common/thirdparty/theme-base/parameters-bundle.css-97e70e91.js +0 -9
- package/src/sap/ui/webc/common/thirdparty/theme-base/parameters-bundle.css-c5f25513.js +0 -9
@@ -1,41 +0,0 @@
|
|
1
|
-
sap.ui.define(['exports'], function (exports) { 'use strict';
|
2
|
-
|
3
|
-
/**
|
4
|
-
* @license
|
5
|
-
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
6
|
-
* This code may only be used under the BSD style license found at
|
7
|
-
* http://polymer.github.io/LICENSE.txt
|
8
|
-
* The complete set of authors may be found at
|
9
|
-
* http://polymer.github.io/AUTHORS.txt
|
10
|
-
* The complete set of contributors may be found at
|
11
|
-
* http://polymer.github.io/CONTRIBUTORS.txt
|
12
|
-
* Code distributed by Google as part of the polymer project is also
|
13
|
-
* subject to an additional IP rights grant found at
|
14
|
-
* http://polymer.github.io/PATENTS.txt
|
15
|
-
*/
|
16
|
-
const isCEPolyfill = typeof window !== 'undefined' &&
|
17
|
-
window.customElements != null &&
|
18
|
-
window.customElements.polyfillWrapFlushCallback !==
|
19
|
-
undefined;
|
20
|
-
const reparentNodes = (container, start, end = null, before = null) => {
|
21
|
-
while (start !== end) {
|
22
|
-
const n = start.nextSibling;
|
23
|
-
container.insertBefore(start, before);
|
24
|
-
start = n;
|
25
|
-
}
|
26
|
-
};
|
27
|
-
const removeNodes = (container, start, end = null) => {
|
28
|
-
while (start !== end) {
|
29
|
-
const n = start.nextSibling;
|
30
|
-
container.removeChild(start);
|
31
|
-
start = n;
|
32
|
-
}
|
33
|
-
};
|
34
|
-
|
35
|
-
exports.isCEPolyfill = isCEPolyfill;
|
36
|
-
exports.removeNodes = removeNodes;
|
37
|
-
exports.reparentNodes = reparentNodes;
|
38
|
-
|
39
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
40
|
-
|
41
|
-
});
|
@@ -1,24 +0,0 @@
|
|
1
|
-
sap.ui.define(['exports'], function (exports) { 'use strict';
|
2
|
-
|
3
|
-
/**
|
4
|
-
* @license
|
5
|
-
* Copyright (c) 2018 The Polymer Project Authors. All rights reserved.
|
6
|
-
* This code may only be used under the BSD style license found at
|
7
|
-
* http://polymer.github.io/LICENSE.txt
|
8
|
-
* The complete set of authors may be found at
|
9
|
-
* http://polymer.github.io/AUTHORS.txt
|
10
|
-
* The complete set of contributors may be found at
|
11
|
-
* http://polymer.github.io/CONTRIBUTORS.txt
|
12
|
-
* Code distributed by Google as part of the polymer project is also
|
13
|
-
* subject to an additional IP rights grant found at
|
14
|
-
* http://polymer.github.io/PATENTS.txt
|
15
|
-
*/
|
16
|
-
const noChange = {};
|
17
|
-
const nothing = {};
|
18
|
-
|
19
|
-
exports.noChange = noChange;
|
20
|
-
exports.nothing = nothing;
|
21
|
-
|
22
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
23
|
-
|
24
|
-
});
|
@@ -1,374 +0,0 @@
|
|
1
|
-
sap.ui.define(['exports', './directive', './dom', './part', './template-instance', './template-result', './template'], function (exports, directive, dom, part, templateInstance, templateResult, template) { 'use strict';
|
2
|
-
|
3
|
-
/**
|
4
|
-
* @license
|
5
|
-
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
6
|
-
* This code may only be used under the BSD style license found at
|
7
|
-
* http://polymer.github.io/LICENSE.txt
|
8
|
-
* The complete set of authors may be found at
|
9
|
-
* http://polymer.github.io/AUTHORS.txt
|
10
|
-
* The complete set of contributors may be found at
|
11
|
-
* http://polymer.github.io/CONTRIBUTORS.txt
|
12
|
-
* Code distributed by Google as part of the polymer project is also
|
13
|
-
* subject to an additional IP rights grant found at
|
14
|
-
* http://polymer.github.io/PATENTS.txt
|
15
|
-
*/
|
16
|
-
const isPrimitive = (value) => {
|
17
|
-
return (value === null ||
|
18
|
-
!(typeof value === 'object' || typeof value === 'function'));
|
19
|
-
};
|
20
|
-
const isIterable = (value) => {
|
21
|
-
return Array.isArray(value) ||
|
22
|
-
!!(value && value[Symbol.iterator]);
|
23
|
-
};
|
24
|
-
class AttributeCommitter {
|
25
|
-
constructor(element, name, strings) {
|
26
|
-
this.dirty = true;
|
27
|
-
this.element = element;
|
28
|
-
this.name = name;
|
29
|
-
this.strings = strings;
|
30
|
-
this.parts = [];
|
31
|
-
for (let i = 0; i < strings.length - 1; i++) {
|
32
|
-
this.parts[i] = this._createPart();
|
33
|
-
}
|
34
|
-
}
|
35
|
-
_createPart() {
|
36
|
-
return new AttributePart(this);
|
37
|
-
}
|
38
|
-
_getValue() {
|
39
|
-
const strings = this.strings;
|
40
|
-
const l = strings.length - 1;
|
41
|
-
const parts = this.parts;
|
42
|
-
if (l === 1 && strings[0] === '' && strings[1] === '') {
|
43
|
-
const v = parts[0].value;
|
44
|
-
if (typeof v === 'symbol') {
|
45
|
-
return String(v);
|
46
|
-
}
|
47
|
-
if (typeof v === 'string' || !isIterable(v)) {
|
48
|
-
return v;
|
49
|
-
}
|
50
|
-
}
|
51
|
-
let text = '';
|
52
|
-
for (let i = 0; i < l; i++) {
|
53
|
-
text += strings[i];
|
54
|
-
const part = parts[i];
|
55
|
-
if (part !== undefined) {
|
56
|
-
const v = part.value;
|
57
|
-
if (isPrimitive(v) || !isIterable(v)) {
|
58
|
-
text += typeof v === 'string' ? v : String(v);
|
59
|
-
}
|
60
|
-
else {
|
61
|
-
for (const t of v) {
|
62
|
-
text += typeof t === 'string' ? t : String(t);
|
63
|
-
}
|
64
|
-
}
|
65
|
-
}
|
66
|
-
}
|
67
|
-
text += strings[l];
|
68
|
-
return text;
|
69
|
-
}
|
70
|
-
commit() {
|
71
|
-
if (this.dirty) {
|
72
|
-
this.dirty = false;
|
73
|
-
this.element.setAttribute(this.name, this._getValue());
|
74
|
-
}
|
75
|
-
}
|
76
|
-
}
|
77
|
-
class AttributePart {
|
78
|
-
constructor(committer) {
|
79
|
-
this.value = undefined;
|
80
|
-
this.committer = committer;
|
81
|
-
}
|
82
|
-
setValue(value) {
|
83
|
-
if (value !== part.noChange && (!isPrimitive(value) || value !== this.value)) {
|
84
|
-
this.value = value;
|
85
|
-
if (!directive.isDirective(value)) {
|
86
|
-
this.committer.dirty = true;
|
87
|
-
}
|
88
|
-
}
|
89
|
-
}
|
90
|
-
commit() {
|
91
|
-
while (directive.isDirective(this.value)) {
|
92
|
-
const directive = this.value;
|
93
|
-
this.value = part.noChange;
|
94
|
-
directive(this);
|
95
|
-
}
|
96
|
-
if (this.value === part.noChange) {
|
97
|
-
return;
|
98
|
-
}
|
99
|
-
this.committer.commit();
|
100
|
-
}
|
101
|
-
}
|
102
|
-
class NodePart {
|
103
|
-
constructor(options) {
|
104
|
-
this.value = undefined;
|
105
|
-
this.__pendingValue = undefined;
|
106
|
-
this.options = options;
|
107
|
-
}
|
108
|
-
appendInto(container) {
|
109
|
-
this.startNode = container.appendChild(template.createMarker());
|
110
|
-
this.endNode = container.appendChild(template.createMarker());
|
111
|
-
}
|
112
|
-
insertAfterNode(ref) {
|
113
|
-
this.startNode = ref;
|
114
|
-
this.endNode = ref.nextSibling;
|
115
|
-
}
|
116
|
-
appendIntoPart(part) {
|
117
|
-
part.__insert(this.startNode = template.createMarker());
|
118
|
-
part.__insert(this.endNode = template.createMarker());
|
119
|
-
}
|
120
|
-
insertAfterPart(ref) {
|
121
|
-
ref.__insert(this.startNode = template.createMarker());
|
122
|
-
this.endNode = ref.endNode;
|
123
|
-
ref.endNode = this.startNode;
|
124
|
-
}
|
125
|
-
setValue(value) {
|
126
|
-
this.__pendingValue = value;
|
127
|
-
}
|
128
|
-
commit() {
|
129
|
-
if (this.startNode.parentNode === null) {
|
130
|
-
return;
|
131
|
-
}
|
132
|
-
while (directive.isDirective(this.__pendingValue)) {
|
133
|
-
const directive = this.__pendingValue;
|
134
|
-
this.__pendingValue = part.noChange;
|
135
|
-
directive(this);
|
136
|
-
}
|
137
|
-
const value = this.__pendingValue;
|
138
|
-
if (value === part.noChange) {
|
139
|
-
return;
|
140
|
-
}
|
141
|
-
if (isPrimitive(value)) {
|
142
|
-
if (value !== this.value) {
|
143
|
-
this.__commitText(value);
|
144
|
-
}
|
145
|
-
}
|
146
|
-
else if (value instanceof templateResult.TemplateResult) {
|
147
|
-
this.__commitTemplateResult(value);
|
148
|
-
}
|
149
|
-
else if (value instanceof Node) {
|
150
|
-
this.__commitNode(value);
|
151
|
-
}
|
152
|
-
else if (isIterable(value)) {
|
153
|
-
this.__commitIterable(value);
|
154
|
-
}
|
155
|
-
else if (value === part.nothing) {
|
156
|
-
this.value = part.nothing;
|
157
|
-
this.clear();
|
158
|
-
}
|
159
|
-
else {
|
160
|
-
this.__commitText(value);
|
161
|
-
}
|
162
|
-
}
|
163
|
-
__insert(node) {
|
164
|
-
this.endNode.parentNode.insertBefore(node, this.endNode);
|
165
|
-
}
|
166
|
-
__commitNode(value) {
|
167
|
-
if (this.value === value) {
|
168
|
-
return;
|
169
|
-
}
|
170
|
-
this.clear();
|
171
|
-
this.__insert(value);
|
172
|
-
this.value = value;
|
173
|
-
}
|
174
|
-
__commitText(value) {
|
175
|
-
const node = this.startNode.nextSibling;
|
176
|
-
value = value == null ? '' : value;
|
177
|
-
const valueAsString = typeof value === 'string' ? value : String(value);
|
178
|
-
if (node === this.endNode.previousSibling &&
|
179
|
-
node.nodeType === 3 ) {
|
180
|
-
node.data = valueAsString;
|
181
|
-
}
|
182
|
-
else {
|
183
|
-
this.__commitNode(document.createTextNode(valueAsString));
|
184
|
-
}
|
185
|
-
this.value = value;
|
186
|
-
}
|
187
|
-
__commitTemplateResult(value) {
|
188
|
-
const template = this.options.templateFactory(value);
|
189
|
-
if (this.value instanceof templateInstance.TemplateInstance &&
|
190
|
-
this.value.template === template) {
|
191
|
-
this.value.update(value.values);
|
192
|
-
}
|
193
|
-
else {
|
194
|
-
const instance = new templateInstance.TemplateInstance(template, value.processor, this.options);
|
195
|
-
const fragment = instance._clone();
|
196
|
-
instance.update(value.values);
|
197
|
-
this.__commitNode(fragment);
|
198
|
-
this.value = instance;
|
199
|
-
}
|
200
|
-
}
|
201
|
-
__commitIterable(value) {
|
202
|
-
if (!Array.isArray(this.value)) {
|
203
|
-
this.value = [];
|
204
|
-
this.clear();
|
205
|
-
}
|
206
|
-
const itemParts = this.value;
|
207
|
-
let partIndex = 0;
|
208
|
-
let itemPart;
|
209
|
-
for (const item of value) {
|
210
|
-
itemPart = itemParts[partIndex];
|
211
|
-
if (itemPart === undefined) {
|
212
|
-
itemPart = new NodePart(this.options);
|
213
|
-
itemParts.push(itemPart);
|
214
|
-
if (partIndex === 0) {
|
215
|
-
itemPart.appendIntoPart(this);
|
216
|
-
}
|
217
|
-
else {
|
218
|
-
itemPart.insertAfterPart(itemParts[partIndex - 1]);
|
219
|
-
}
|
220
|
-
}
|
221
|
-
itemPart.setValue(item);
|
222
|
-
itemPart.commit();
|
223
|
-
partIndex++;
|
224
|
-
}
|
225
|
-
if (partIndex < itemParts.length) {
|
226
|
-
itemParts.length = partIndex;
|
227
|
-
this.clear(itemPart && itemPart.endNode);
|
228
|
-
}
|
229
|
-
}
|
230
|
-
clear(startNode = this.startNode) {
|
231
|
-
dom.removeNodes(this.startNode.parentNode, startNode.nextSibling, this.endNode);
|
232
|
-
}
|
233
|
-
}
|
234
|
-
class BooleanAttributePart {
|
235
|
-
constructor(element, name, strings) {
|
236
|
-
this.value = undefined;
|
237
|
-
this.__pendingValue = undefined;
|
238
|
-
if (strings.length !== 2 || strings[0] !== '' || strings[1] !== '') {
|
239
|
-
throw new Error('Boolean attributes can only contain a single expression');
|
240
|
-
}
|
241
|
-
this.element = element;
|
242
|
-
this.name = name;
|
243
|
-
this.strings = strings;
|
244
|
-
}
|
245
|
-
setValue(value) {
|
246
|
-
this.__pendingValue = value;
|
247
|
-
}
|
248
|
-
commit() {
|
249
|
-
while (directive.isDirective(this.__pendingValue)) {
|
250
|
-
const directive = this.__pendingValue;
|
251
|
-
this.__pendingValue = part.noChange;
|
252
|
-
directive(this);
|
253
|
-
}
|
254
|
-
if (this.__pendingValue === part.noChange) {
|
255
|
-
return;
|
256
|
-
}
|
257
|
-
const value = !!this.__pendingValue;
|
258
|
-
if (this.value !== value) {
|
259
|
-
if (value) {
|
260
|
-
this.element.setAttribute(this.name, '');
|
261
|
-
}
|
262
|
-
else {
|
263
|
-
this.element.removeAttribute(this.name);
|
264
|
-
}
|
265
|
-
this.value = value;
|
266
|
-
}
|
267
|
-
this.__pendingValue = part.noChange;
|
268
|
-
}
|
269
|
-
}
|
270
|
-
class PropertyCommitter extends AttributeCommitter {
|
271
|
-
constructor(element, name, strings) {
|
272
|
-
super(element, name, strings);
|
273
|
-
this.single =
|
274
|
-
(strings.length === 2 && strings[0] === '' && strings[1] === '');
|
275
|
-
}
|
276
|
-
_createPart() {
|
277
|
-
return new PropertyPart(this);
|
278
|
-
}
|
279
|
-
_getValue() {
|
280
|
-
if (this.single) {
|
281
|
-
return this.parts[0].value;
|
282
|
-
}
|
283
|
-
return super._getValue();
|
284
|
-
}
|
285
|
-
commit() {
|
286
|
-
if (this.dirty) {
|
287
|
-
this.dirty = false;
|
288
|
-
this.element[this.name] = this._getValue();
|
289
|
-
}
|
290
|
-
}
|
291
|
-
}
|
292
|
-
class PropertyPart extends AttributePart {
|
293
|
-
}
|
294
|
-
let eventOptionsSupported = false;
|
295
|
-
(() => {
|
296
|
-
try {
|
297
|
-
const options = {
|
298
|
-
get capture() {
|
299
|
-
eventOptionsSupported = true;
|
300
|
-
return false;
|
301
|
-
}
|
302
|
-
};
|
303
|
-
window.addEventListener('test', options, options);
|
304
|
-
window.removeEventListener('test', options, options);
|
305
|
-
}
|
306
|
-
catch (_e) {
|
307
|
-
}
|
308
|
-
})();
|
309
|
-
class EventPart {
|
310
|
-
constructor(element, eventName, eventContext) {
|
311
|
-
this.value = undefined;
|
312
|
-
this.__pendingValue = undefined;
|
313
|
-
this.element = element;
|
314
|
-
this.eventName = eventName;
|
315
|
-
this.eventContext = eventContext;
|
316
|
-
this.__boundHandleEvent = (e) => this.handleEvent(e);
|
317
|
-
}
|
318
|
-
setValue(value) {
|
319
|
-
this.__pendingValue = value;
|
320
|
-
}
|
321
|
-
commit() {
|
322
|
-
while (directive.isDirective(this.__pendingValue)) {
|
323
|
-
const directive = this.__pendingValue;
|
324
|
-
this.__pendingValue = part.noChange;
|
325
|
-
directive(this);
|
326
|
-
}
|
327
|
-
if (this.__pendingValue === part.noChange) {
|
328
|
-
return;
|
329
|
-
}
|
330
|
-
const newListener = this.__pendingValue;
|
331
|
-
const oldListener = this.value;
|
332
|
-
const shouldRemoveListener = newListener == null ||
|
333
|
-
oldListener != null &&
|
334
|
-
(newListener.capture !== oldListener.capture ||
|
335
|
-
newListener.once !== oldListener.once ||
|
336
|
-
newListener.passive !== oldListener.passive);
|
337
|
-
const shouldAddListener = newListener != null && (oldListener == null || shouldRemoveListener);
|
338
|
-
if (shouldRemoveListener) {
|
339
|
-
this.element.removeEventListener(this.eventName, this.__boundHandleEvent, this.__options);
|
340
|
-
}
|
341
|
-
if (shouldAddListener) {
|
342
|
-
this.__options = getOptions(newListener);
|
343
|
-
this.element.addEventListener(this.eventName, this.__boundHandleEvent, this.__options);
|
344
|
-
}
|
345
|
-
this.value = newListener;
|
346
|
-
this.__pendingValue = part.noChange;
|
347
|
-
}
|
348
|
-
handleEvent(event) {
|
349
|
-
if (typeof this.value === 'function') {
|
350
|
-
this.value.call(this.eventContext || this.element, event);
|
351
|
-
}
|
352
|
-
else {
|
353
|
-
this.value.handleEvent(event);
|
354
|
-
}
|
355
|
-
}
|
356
|
-
}
|
357
|
-
const getOptions = (o) => o &&
|
358
|
-
(eventOptionsSupported ?
|
359
|
-
{ capture: o.capture, passive: o.passive, once: o.once } :
|
360
|
-
o.capture);
|
361
|
-
|
362
|
-
exports.AttributeCommitter = AttributeCommitter;
|
363
|
-
exports.AttributePart = AttributePart;
|
364
|
-
exports.BooleanAttributePart = BooleanAttributePart;
|
365
|
-
exports.EventPart = EventPart;
|
366
|
-
exports.NodePart = NodePart;
|
367
|
-
exports.PropertyCommitter = PropertyCommitter;
|
368
|
-
exports.PropertyPart = PropertyPart;
|
369
|
-
exports.isIterable = isIterable;
|
370
|
-
exports.isPrimitive = isPrimitive;
|
371
|
-
|
372
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
373
|
-
|
374
|
-
});
|
@@ -1,33 +0,0 @@
|
|
1
|
-
sap.ui.define(['exports', './dom', './parts', './template-factory'], function (exports, dom, parts$1, templateFactory) { 'use strict';
|
2
|
-
|
3
|
-
/**
|
4
|
-
* @license
|
5
|
-
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
6
|
-
* This code may only be used under the BSD style license found at
|
7
|
-
* http://polymer.github.io/LICENSE.txt
|
8
|
-
* The complete set of authors may be found at
|
9
|
-
* http://polymer.github.io/AUTHORS.txt
|
10
|
-
* The complete set of contributors may be found at
|
11
|
-
* http://polymer.github.io/CONTRIBUTORS.txt
|
12
|
-
* Code distributed by Google as part of the polymer project is also
|
13
|
-
* subject to an additional IP rights grant found at
|
14
|
-
* http://polymer.github.io/PATENTS.txt
|
15
|
-
*/
|
16
|
-
const parts = new WeakMap();
|
17
|
-
const render = (result, container, options) => {
|
18
|
-
let part = parts.get(container);
|
19
|
-
if (part === undefined) {
|
20
|
-
dom.removeNodes(container, container.firstChild);
|
21
|
-
parts.set(container, part = new parts$1.NodePart(Object.assign({ templateFactory: templateFactory.templateFactory }, options)));
|
22
|
-
part.appendInto(container);
|
23
|
-
}
|
24
|
-
part.setValue(result);
|
25
|
-
part.commit();
|
26
|
-
};
|
27
|
-
|
28
|
-
exports.parts = parts;
|
29
|
-
exports.render = render;
|
30
|
-
|
31
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
32
|
-
|
33
|
-
});
|
@@ -1,45 +0,0 @@
|
|
1
|
-
sap.ui.define(['exports', './template'], function (exports, template) { 'use strict';
|
2
|
-
|
3
|
-
/**
|
4
|
-
* @license
|
5
|
-
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
6
|
-
* This code may only be used under the BSD style license found at
|
7
|
-
* http://polymer.github.io/LICENSE.txt
|
8
|
-
* The complete set of authors may be found at
|
9
|
-
* http://polymer.github.io/AUTHORS.txt
|
10
|
-
* The complete set of contributors may be found at
|
11
|
-
* http://polymer.github.io/CONTRIBUTORS.txt
|
12
|
-
* Code distributed by Google as part of the polymer project is also
|
13
|
-
* subject to an additional IP rights grant found at
|
14
|
-
* http://polymer.github.io/PATENTS.txt
|
15
|
-
*/
|
16
|
-
function templateFactory(result) {
|
17
|
-
let templateCache = templateCaches.get(result.type);
|
18
|
-
if (templateCache === undefined) {
|
19
|
-
templateCache = {
|
20
|
-
stringsArray: new WeakMap(),
|
21
|
-
keyString: new Map()
|
22
|
-
};
|
23
|
-
templateCaches.set(result.type, templateCache);
|
24
|
-
}
|
25
|
-
let template$1 = templateCache.stringsArray.get(result.strings);
|
26
|
-
if (template$1 !== undefined) {
|
27
|
-
return template$1;
|
28
|
-
}
|
29
|
-
const key = result.strings.join(template.marker);
|
30
|
-
template$1 = templateCache.keyString.get(key);
|
31
|
-
if (template$1 === undefined) {
|
32
|
-
template$1 = new template.Template(result, result.getTemplateElement());
|
33
|
-
templateCache.keyString.set(key, template$1);
|
34
|
-
}
|
35
|
-
templateCache.stringsArray.set(result.strings, template$1);
|
36
|
-
return template$1;
|
37
|
-
}
|
38
|
-
const templateCaches = new Map();
|
39
|
-
|
40
|
-
exports.templateCaches = templateCaches;
|
41
|
-
exports.templateFactory = templateFactory;
|
42
|
-
|
43
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
44
|
-
|
45
|
-
});
|
@@ -1,88 +0,0 @@
|
|
1
|
-
sap.ui.define(['exports', './dom', './template'], function (exports, dom, template) { 'use strict';
|
2
|
-
|
3
|
-
/**
|
4
|
-
* @license
|
5
|
-
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
6
|
-
* This code may only be used under the BSD style license found at
|
7
|
-
* http://polymer.github.io/LICENSE.txt
|
8
|
-
* The complete set of authors may be found at
|
9
|
-
* http://polymer.github.io/AUTHORS.txt
|
10
|
-
* The complete set of contributors may be found at
|
11
|
-
* http://polymer.github.io/CONTRIBUTORS.txt
|
12
|
-
* Code distributed by Google as part of the polymer project is also
|
13
|
-
* subject to an additional IP rights grant found at
|
14
|
-
* http://polymer.github.io/PATENTS.txt
|
15
|
-
*/
|
16
|
-
class TemplateInstance {
|
17
|
-
constructor(template, processor, options) {
|
18
|
-
this.__parts = [];
|
19
|
-
this.template = template;
|
20
|
-
this.processor = processor;
|
21
|
-
this.options = options;
|
22
|
-
}
|
23
|
-
update(values) {
|
24
|
-
let i = 0;
|
25
|
-
for (const part of this.__parts) {
|
26
|
-
if (part !== undefined) {
|
27
|
-
part.setValue(values[i]);
|
28
|
-
}
|
29
|
-
i++;
|
30
|
-
}
|
31
|
-
for (const part of this.__parts) {
|
32
|
-
if (part !== undefined) {
|
33
|
-
part.commit();
|
34
|
-
}
|
35
|
-
}
|
36
|
-
}
|
37
|
-
_clone() {
|
38
|
-
const fragment = dom.isCEPolyfill ?
|
39
|
-
this.template.element.content.cloneNode(true) :
|
40
|
-
document.importNode(this.template.element.content, true);
|
41
|
-
const stack = [];
|
42
|
-
const parts = this.template.parts;
|
43
|
-
const walker = document.createTreeWalker(fragment, 133 , null, false);
|
44
|
-
let partIndex = 0;
|
45
|
-
let nodeIndex = 0;
|
46
|
-
let part;
|
47
|
-
let node = walker.nextNode();
|
48
|
-
while (partIndex < parts.length) {
|
49
|
-
part = parts[partIndex];
|
50
|
-
if (!template.isTemplatePartActive(part)) {
|
51
|
-
this.__parts.push(undefined);
|
52
|
-
partIndex++;
|
53
|
-
continue;
|
54
|
-
}
|
55
|
-
while (nodeIndex < part.index) {
|
56
|
-
nodeIndex++;
|
57
|
-
if (node.nodeName === 'TEMPLATE') {
|
58
|
-
stack.push(node);
|
59
|
-
walker.currentNode = node.content;
|
60
|
-
}
|
61
|
-
if ((node = walker.nextNode()) === null) {
|
62
|
-
walker.currentNode = stack.pop();
|
63
|
-
node = walker.nextNode();
|
64
|
-
}
|
65
|
-
}
|
66
|
-
if (part.type === 'node') {
|
67
|
-
const part = this.processor.handleTextExpression(this.options);
|
68
|
-
part.insertAfterNode(node.previousSibling);
|
69
|
-
this.__parts.push(part);
|
70
|
-
}
|
71
|
-
else {
|
72
|
-
this.__parts.push(...this.processor.handleAttributeExpressions(node, part.name, part.strings, this.options));
|
73
|
-
}
|
74
|
-
partIndex++;
|
75
|
-
}
|
76
|
-
if (dom.isCEPolyfill) {
|
77
|
-
document.adoptNode(fragment);
|
78
|
-
customElements.upgrade(fragment);
|
79
|
-
}
|
80
|
-
return fragment;
|
81
|
-
}
|
82
|
-
}
|
83
|
-
|
84
|
-
exports.TemplateInstance = TemplateInstance;
|
85
|
-
|
86
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
87
|
-
|
88
|
-
});
|
@@ -1,77 +0,0 @@
|
|
1
|
-
sap.ui.define(['exports', './dom', './template'], function (exports, dom, template) { 'use strict';
|
2
|
-
|
3
|
-
/**
|
4
|
-
* @license
|
5
|
-
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
6
|
-
* This code may only be used under the BSD style license found at
|
7
|
-
* http://polymer.github.io/LICENSE.txt
|
8
|
-
* The complete set of authors may be found at
|
9
|
-
* http://polymer.github.io/AUTHORS.txt
|
10
|
-
* The complete set of contributors may be found at
|
11
|
-
* http://polymer.github.io/CONTRIBUTORS.txt
|
12
|
-
* Code distributed by Google as part of the polymer project is also
|
13
|
-
* subject to an additional IP rights grant found at
|
14
|
-
* http://polymer.github.io/PATENTS.txt
|
15
|
-
*/
|
16
|
-
const policy = window.trustedTypes &&
|
17
|
-
trustedTypes.createPolicy('lit-html', { createHTML: (s) => s });
|
18
|
-
const commentMarker = ` ${template.marker} `;
|
19
|
-
class TemplateResult {
|
20
|
-
constructor(strings, values, type, processor) {
|
21
|
-
this.strings = strings;
|
22
|
-
this.values = values;
|
23
|
-
this.type = type;
|
24
|
-
this.processor = processor;
|
25
|
-
}
|
26
|
-
getHTML() {
|
27
|
-
const l = this.strings.length - 1;
|
28
|
-
let html = '';
|
29
|
-
let isCommentBinding = false;
|
30
|
-
for (let i = 0; i < l; i++) {
|
31
|
-
const s = this.strings[i];
|
32
|
-
const commentOpen = s.lastIndexOf('<!--');
|
33
|
-
isCommentBinding = (commentOpen > -1 || isCommentBinding) &&
|
34
|
-
s.indexOf('-->', commentOpen + 1) === -1;
|
35
|
-
const attributeMatch = template.lastAttributeNameRegex.exec(s);
|
36
|
-
if (attributeMatch === null) {
|
37
|
-
html += s + (isCommentBinding ? commentMarker : template.nodeMarker);
|
38
|
-
}
|
39
|
-
else {
|
40
|
-
html += s.substr(0, attributeMatch.index) + attributeMatch[1] +
|
41
|
-
attributeMatch[2] + template.boundAttributeSuffix + attributeMatch[3] +
|
42
|
-
template.marker;
|
43
|
-
}
|
44
|
-
}
|
45
|
-
html += this.strings[l];
|
46
|
-
return html;
|
47
|
-
}
|
48
|
-
getTemplateElement() {
|
49
|
-
const template = document.createElement('template');
|
50
|
-
let value = this.getHTML();
|
51
|
-
if (policy !== undefined) {
|
52
|
-
value = policy.createHTML(value);
|
53
|
-
}
|
54
|
-
template.innerHTML = value;
|
55
|
-
return template;
|
56
|
-
}
|
57
|
-
}
|
58
|
-
class SVGTemplateResult extends TemplateResult {
|
59
|
-
getHTML() {
|
60
|
-
return `<svg>${super.getHTML()}</svg>`;
|
61
|
-
}
|
62
|
-
getTemplateElement() {
|
63
|
-
const template = super.getTemplateElement();
|
64
|
-
const content = template.content;
|
65
|
-
const svgElement = content.firstChild;
|
66
|
-
content.removeChild(svgElement);
|
67
|
-
dom.reparentNodes(content, svgElement.firstChild);
|
68
|
-
return template;
|
69
|
-
}
|
70
|
-
}
|
71
|
-
|
72
|
-
exports.SVGTemplateResult = SVGTemplateResult;
|
73
|
-
exports.TemplateResult = TemplateResult;
|
74
|
-
|
75
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
76
|
-
|
77
|
-
});
|