@siemens/ix-aggrid 1.4.2 → 1.5.0-beta.1
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/dist/cjs/ag-grid-community.auto.esm-9ea84b71.js +2 -0
- package/dist/cjs/ag-grid-community.auto.esm-9ea84b71.js.map +1 -0
- package/dist/cjs/{index-713ffc51.js → index-5fdf8083.js} +99 -2
- package/dist/cjs/index-5fdf8083.js.map +1 -0
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/index.cjs.js.map +1 -0
- package/dist/cjs/ix-ag-grid.cjs.entry.js +3 -1
- package/dist/cjs/ix-ag-grid.cjs.entry.js.map +1 -0
- package/dist/cjs/ix-aggrid.cjs.js +11 -2
- package/dist/cjs/ix-aggrid.cjs.js.map +1 -0
- package/dist/cjs/loader.cjs.js +5 -2
- package/dist/cjs/loader.cjs.js.map +1 -0
- package/dist/cjs/my-component.cjs.entry.js +3 -1
- package/dist/cjs/my-component.cjs.entry.js.map +1 -0
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/ix-ag-grid/ix-ag-grid.js +1 -0
- package/dist/collection/components/ix-ag-grid/ix-ag-grid.js.map +1 -0
- package/dist/collection/components/my-component/my-component.js +1 -0
- package/dist/collection/components/my-component/my-component.js.map +1 -0
- package/dist/collection/components/tests/utils/test/index.js +1 -0
- package/dist/collection/components/tests/utils/test/index.js.map +1 -0
- package/dist/collection/components/tests/utils/test/page.js +1 -0
- package/dist/collection/components/tests/utils/test/page.js.map +1 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/index.js.map +1 -0
- package/dist/components/ag-grid-community.auto.esm.js +50822 -0
- package/dist/components/ag-grid-community.auto.esm.js.map +1 -0
- package/dist/components/index.d.ts +9 -5
- package/dist/components/index.js +4 -3
- package/dist/components/index.js.map +1 -0
- package/dist/components/ix-ag-grid.js +5 -50821
- package/dist/components/ix-ag-grid.js.map +1 -0
- package/dist/components/my-component.js +2 -0
- package/dist/components/my-component.js.map +1 -0
- package/dist/esm/ag-grid-community.auto.esm-c5d0b4c8.js +2 -0
- package/dist/esm/ag-grid-community.auto.esm-c5d0b4c8.js.map +1 -0
- package/dist/esm/{index-c5cf50e5.js → index-2dc15cee.js} +99 -3
- package/dist/esm/index-2dc15cee.js.map +1 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/ix-ag-grid.entry.js +3 -1
- package/dist/esm/ix-ag-grid.entry.js.map +1 -0
- package/dist/esm/ix-aggrid.js +8 -2
- package/dist/esm/ix-aggrid.js.map +1 -0
- package/dist/esm/loader.js +5 -2
- package/dist/esm/loader.js.map +1 -0
- package/dist/esm/my-component.entry.js +3 -1
- package/dist/esm/my-component.entry.js.map +1 -0
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/ix-aggrid/index.esm.js +2 -1
- package/dist/ix-aggrid/index.esm.js.map +1 -0
- package/dist/ix-aggrid/ix-aggrid.esm.js +2 -1
- package/dist/ix-aggrid/ix-aggrid.esm.js.map +1 -0
- package/dist/ix-aggrid/p-344d1d93.entry.js +2 -0
- package/dist/ix-aggrid/p-344d1d93.entry.js.map +1 -0
- package/dist/ix-aggrid/p-38388e1b.js +1198 -60
- package/dist/ix-aggrid/p-38388e1b.js.map +1 -0
- package/dist/ix-aggrid/p-bc67a04a.entry.js +2 -0
- package/dist/ix-aggrid/p-bc67a04a.entry.js.map +1 -0
- package/dist/ix-aggrid/p-c5dadb3f.js +3 -0
- package/dist/ix-aggrid/p-c5dadb3f.js.map +1 -0
- package/dist/types/components.d.ts +1 -0
- package/dist/types/stencil-public-runtime.d.ts +71 -15
- package/loader/index.d.ts +9 -0
- package/package.json +9 -9
- package/dist/ix-aggrid/p-55389b3b.js +0 -2
- package/dist/ix-aggrid/p-55ee162e.entry.js +0 -1
- package/dist/ix-aggrid/p-cfe2ad1a.entry.js +0 -1
|
@@ -34,11 +34,30 @@ const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';
|
|
|
34
34
|
*/
|
|
35
35
|
const EMPTY_OBJ = {};
|
|
36
36
|
const isDef = (v) => v != null;
|
|
37
|
+
/**
|
|
38
|
+
* Check whether a value is a 'complex type', defined here as an object or a
|
|
39
|
+
* function.
|
|
40
|
+
*
|
|
41
|
+
* @param o the value to check
|
|
42
|
+
* @returns whether it's a complex type or not
|
|
43
|
+
*/
|
|
37
44
|
const isComplexType = (o) => {
|
|
38
45
|
// https://jsperf.com/typeof-fn-object/5
|
|
39
46
|
o = typeof o;
|
|
40
47
|
return o === 'object' || o === 'function';
|
|
41
48
|
};
|
|
49
|
+
/**
|
|
50
|
+
* Helper method for querying a `meta` tag that contains a nonce value
|
|
51
|
+
* out of a DOM's head.
|
|
52
|
+
*
|
|
53
|
+
* @param doc The DOM containing the `head` to query against
|
|
54
|
+
* @returns The content of the meta tag representing the nonce value, or `undefined` if no tag
|
|
55
|
+
* exists or the tag has no content.
|
|
56
|
+
*/
|
|
57
|
+
function queryNonceMetaTagContent(doc) {
|
|
58
|
+
var _a, _b, _c;
|
|
59
|
+
return (_c = (_b = (_a = doc.head) === null || _a === void 0 ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) === null || _b === void 0 ? void 0 : _b.getAttribute('content')) !== null && _c !== void 0 ? _c : undefined;
|
|
60
|
+
}
|
|
42
61
|
/**
|
|
43
62
|
* Production h() function based on Preact by
|
|
44
63
|
* Jason Miller (@developit)
|
|
@@ -47,7 +66,6 @@ const isComplexType = (o) => {
|
|
|
47
66
|
*
|
|
48
67
|
* Modified for Stencil's compiler and vdom
|
|
49
68
|
*/
|
|
50
|
-
// const stack: any[] = [];
|
|
51
69
|
// export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, child?: d.ChildType): d.VNode;
|
|
52
70
|
// export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, ...children: d.ChildType[]): d.VNode;
|
|
53
71
|
const h = (nodeName, vnodeData, ...children) => {
|
|
@@ -98,6 +116,14 @@ const h = (nodeName, vnodeData, ...children) => {
|
|
|
98
116
|
}
|
|
99
117
|
return vnode;
|
|
100
118
|
};
|
|
119
|
+
/**
|
|
120
|
+
* A utility function for creating a virtual DOM node from a tag and some
|
|
121
|
+
* possible text content.
|
|
122
|
+
*
|
|
123
|
+
* @param tag the tag for this element
|
|
124
|
+
* @param text possible text content for the node
|
|
125
|
+
* @returns a newly-minted virtual DOM node
|
|
126
|
+
*/
|
|
101
127
|
const newVNode = (tag, text) => {
|
|
102
128
|
const vnode = {
|
|
103
129
|
$flags$: 0,
|
|
@@ -112,6 +138,12 @@ const newVNode = (tag, text) => {
|
|
|
112
138
|
return vnode;
|
|
113
139
|
};
|
|
114
140
|
const Host = {};
|
|
141
|
+
/**
|
|
142
|
+
* Check whether a given node is a Host node or not
|
|
143
|
+
*
|
|
144
|
+
* @param node the virtual DOM node to check
|
|
145
|
+
* @returns whether it's a Host node or not
|
|
146
|
+
*/
|
|
115
147
|
const isHost = (node) => node && node.$tag$ === Host;
|
|
116
148
|
/**
|
|
117
149
|
* Parse a new property value for a given property type.
|
|
@@ -177,6 +209,7 @@ const registerStyle = (scopeId, cssText, allowCS) => {
|
|
|
177
209
|
styles.set(scopeId, style);
|
|
178
210
|
};
|
|
179
211
|
const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
|
|
212
|
+
var _a;
|
|
180
213
|
let scopeId = getScopeId(cmpMeta);
|
|
181
214
|
const style = styles.get(scopeId);
|
|
182
215
|
// if an element is NOT connected then getRootNode() will return the wrong root node
|
|
@@ -192,10 +225,16 @@ const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
|
|
|
192
225
|
}
|
|
193
226
|
if (!appliedStyles.has(scopeId)) {
|
|
194
227
|
{
|
|
228
|
+
// TODO(STENCIL-659): Remove code implementing the CSS variable shim
|
|
195
229
|
{
|
|
196
230
|
styleElm = doc.createElement('style');
|
|
197
231
|
styleElm.innerHTML = style;
|
|
198
232
|
}
|
|
233
|
+
// Apply CSP nonce to the style tag if it exists
|
|
234
|
+
const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
|
|
235
|
+
if (nonce != null) {
|
|
236
|
+
styleElm.setAttribute('nonce', nonce);
|
|
237
|
+
}
|
|
199
238
|
styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
|
|
200
239
|
}
|
|
201
240
|
if (appliedStyles) {
|
|
@@ -215,6 +254,7 @@ const attachStyles = (hostRef) => {
|
|
|
215
254
|
const flags = cmpMeta.$flags$;
|
|
216
255
|
const endAttachStyles = createTime('attachStyles', cmpMeta.$tagName$);
|
|
217
256
|
const scopeId = addStyle(elm.getRootNode(), cmpMeta);
|
|
257
|
+
// TODO(STENCIL-662): Remove code related to deprecated shadowDomShim field
|
|
218
258
|
if (flags & 10 /* CMP_FLAGS.needsScopedEncapsulation */) {
|
|
219
259
|
// only required when we're NOT using native shadow dom (slot)
|
|
220
260
|
// or this browser doesn't support native shadow dom
|
|
@@ -344,6 +384,21 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
344
384
|
}
|
|
345
385
|
return elm;
|
|
346
386
|
};
|
|
387
|
+
/**
|
|
388
|
+
* Create DOM nodes corresponding to a list of {@link d.Vnode} objects and
|
|
389
|
+
* add them to the DOM in the appropriate place.
|
|
390
|
+
*
|
|
391
|
+
* @param parentElm the DOM node which should be used as a parent for the new
|
|
392
|
+
* DOM nodes
|
|
393
|
+
* @param before a child of the `parentElm` which the new children should be
|
|
394
|
+
* inserted before (optional)
|
|
395
|
+
* @param parentVNode the parent virtual DOM node
|
|
396
|
+
* @param vnodes the new child virtual DOM nodes to produce DOM nodes for
|
|
397
|
+
* @param startIdx the index in the child virtual DOM nodes at which to start
|
|
398
|
+
* creating DOM nodes (inclusive)
|
|
399
|
+
* @param endIdx the index in the child virtual DOM nodes at which to stop
|
|
400
|
+
* creating DOM nodes (inclusive)
|
|
401
|
+
*/
|
|
347
402
|
const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
|
|
348
403
|
let containerElm = (parentElm);
|
|
349
404
|
let childNode;
|
|
@@ -357,6 +412,19 @@ const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) =>
|
|
|
357
412
|
}
|
|
358
413
|
}
|
|
359
414
|
};
|
|
415
|
+
/**
|
|
416
|
+
* Remove the DOM elements corresponding to a list of {@link d.VNode} objects.
|
|
417
|
+
* This can be used to, for instance, clean up after a list of children which
|
|
418
|
+
* should no longer be shown.
|
|
419
|
+
*
|
|
420
|
+
* This function also handles some of Stencil's slot relocation logic.
|
|
421
|
+
*
|
|
422
|
+
* @param vnodes a list of virtual DOM nodes to remove
|
|
423
|
+
* @param startIdx the index at which to start removing nodes (inclusive)
|
|
424
|
+
* @param endIdx the index at which to stop removing nodes (inclusive)
|
|
425
|
+
* @param vnode a VNode
|
|
426
|
+
* @param elm an element
|
|
427
|
+
*/
|
|
360
428
|
const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
|
|
361
429
|
for (; startIdx <= endIdx; ++startIdx) {
|
|
362
430
|
if ((vnode = vnodes[startIdx])) {
|
|
@@ -548,7 +616,8 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
548
616
|
*
|
|
549
617
|
* So, in other words, if `key` attrs are not set on VNodes which may be
|
|
550
618
|
* changing order within a `children` array or something along those lines then
|
|
551
|
-
* we could obtain a false
|
|
619
|
+
* we could obtain a false negative and then have to do needless re-rendering
|
|
620
|
+
* (i.e. we'd say two VNodes aren't equal when in fact they should be).
|
|
552
621
|
*
|
|
553
622
|
* @param leftVNode the first VNode to check
|
|
554
623
|
* @param rightVNode the second VNode to check
|
|
@@ -598,6 +667,18 @@ const patch = (oldVNode, newVNode) => {
|
|
|
598
667
|
}
|
|
599
668
|
}
|
|
600
669
|
};
|
|
670
|
+
/**
|
|
671
|
+
* The main entry point for Stencil's virtual DOM-based rendering engine
|
|
672
|
+
*
|
|
673
|
+
* Given a {@link d.HostRef} container and some virtual DOM nodes, this
|
|
674
|
+
* function will handle creating a virtual DOM tree with a single root, patching
|
|
675
|
+
* the current virtual DOM tree onto an old one (if any), dealing with slot
|
|
676
|
+
* relocation, and reflecting attributes.
|
|
677
|
+
*
|
|
678
|
+
* @param hostRef data needed to root and render the virtual DOM tree, such as
|
|
679
|
+
* the DOM node into which it should be rendered.
|
|
680
|
+
* @param renderFnResults the virtual DOM nodes to be rendered
|
|
681
|
+
*/
|
|
601
682
|
const renderVdom = (hostRef, renderFnResults) => {
|
|
602
683
|
const hostElm = hostRef.$hostElement$;
|
|
603
684
|
const oldVNode = hostRef.$vnode$ || newVNode(null, null);
|
|
@@ -976,6 +1057,7 @@ const disconnectedCallback = (elm) => {
|
|
|
976
1057
|
}
|
|
977
1058
|
};
|
|
978
1059
|
const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
1060
|
+
var _a;
|
|
979
1061
|
const endBootstrap = createTime();
|
|
980
1062
|
const cmpTags = [];
|
|
981
1063
|
const exclude = options.exclude || [];
|
|
@@ -1041,6 +1123,11 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1041
1123
|
{
|
|
1042
1124
|
visibilityStyle.innerHTML = cmpTags + HYDRATED_CSS;
|
|
1043
1125
|
visibilityStyle.setAttribute('data-styles', '');
|
|
1126
|
+
// Apply CSP nonce to the style tag if it exists
|
|
1127
|
+
const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
|
|
1128
|
+
if (nonce != null) {
|
|
1129
|
+
visibilityStyle.setAttribute('nonce', nonce);
|
|
1130
|
+
}
|
|
1044
1131
|
head.insertBefore(visibilityStyle, metaCharset ? metaCharset.nextSibling : head.firstChild);
|
|
1045
1132
|
}
|
|
1046
1133
|
// Process deferred connectedCallbacks now all components have been registered
|
|
@@ -1056,6 +1143,13 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1056
1143
|
// Fallback appLoad event
|
|
1057
1144
|
endBootstrap();
|
|
1058
1145
|
};
|
|
1146
|
+
/**
|
|
1147
|
+
* Assigns the given value to the nonce property on the runtime platform object.
|
|
1148
|
+
* During runtime, this value is used to set the nonce attribute on all dynamically created script and style tags.
|
|
1149
|
+
* @param nonce The value to be assigned to the platform nonce property.
|
|
1150
|
+
* @returns void
|
|
1151
|
+
*/
|
|
1152
|
+
const setNonce = (nonce) => (plt.$nonce$ = nonce);
|
|
1059
1153
|
const hostRefs = /*@__PURE__*/ new WeakMap();
|
|
1060
1154
|
const getHostRef = (ref) => hostRefs.get(ref);
|
|
1061
1155
|
const registerInstance = (lazyInstance, hostRef) => hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef);
|
|
@@ -1161,4 +1255,6 @@ const flush = () => {
|
|
|
1161
1255
|
const nextTick = /*@__PURE__*/ (cb) => promiseResolve().then(cb);
|
|
1162
1256
|
const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
|
|
1163
1257
|
|
|
1164
|
-
export { Host as H, bootstrapLazy as b, getElement as g, h, promiseResolve as p, registerInstance as r };
|
|
1258
|
+
export { Host as H, bootstrapLazy as b, getElement as g, h, promiseResolve as p, registerInstance as r, setNonce as s };
|
|
1259
|
+
|
|
1260
|
+
//# sourceMappingURL=index-2dc15cee.js.map
|