@siemens/ix-aggrid 1.2.0 → 1.3.0-beta.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/dist/cjs/{index-bbfdf33e.js → index-713ffc51.js} +5 -42
- package/dist/cjs/{ix-ag-grid_2.cjs.entry.js → ix-ag-grid.cjs.entry.js} +1 -33
- package/dist/cjs/ix-aggrid.cjs.js +2 -2
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/my-component.cjs.entry.js +19 -0
- package/dist/collection/components/my-component/my-component.js +1 -22
- package/dist/collection/{utils/utils.js → components/tests/utils/test/index.js} +2 -3
- package/dist/collection/components/tests/utils/test/page.js +29 -0
- package/dist/collection/components/tests/utils/test/theme-switcher.js +15 -0
- package/dist/components/index.js +0 -1
- package/dist/components/ix-ag-grid.js +52651 -1
- package/dist/components/my-component.js +2 -27
- package/dist/esm/{index-1ae27f1f.js → index-c5cf50e5.js} +5 -42
- package/dist/esm/ix-ag-grid.entry.js +37 -0
- package/dist/esm/ix-aggrid.js +2 -2
- package/dist/esm/loader.js +2 -2
- package/dist/esm/my-component.entry.js +15 -0
- package/dist/ix-aggrid/ix-aggrid.css +1 -1
- package/dist/ix-aggrid/ix-aggrid.esm.js +1 -1
- package/dist/ix-aggrid/p-531b1c8d.entry.js +1 -0
- package/dist/ix-aggrid/p-55389b3b.js +2 -0
- package/dist/ix-aggrid/p-cfe2ad1a.entry.js +1 -0
- package/dist/types/components/my-component/my-component.d.ts +0 -2
- package/dist/types/components/tests/utils/test/index.d.ts +2 -0
- package/dist/types/components/tests/utils/test/page.d.ts +3 -0
- package/package.json +10 -6
- package/dist/components/ix-ag-grid2.js +0 -52653
- package/dist/esm/ix-ag-grid_2.entry.js +0 -68
- package/dist/ix-aggrid/p-5c9652cd.js +0 -2
- package/dist/ix-aggrid/p-98f781bb.entry.js +0 -1
- package/dist/types/utils/utils.d.ts +0 -1
|
@@ -31,7 +31,6 @@ const NAMESPACE = 'ix-aggrid';
|
|
|
31
31
|
* Modified for Stencil's renderer and slot projection
|
|
32
32
|
*/
|
|
33
33
|
let scopeId;
|
|
34
|
-
let isSvgMode = false;
|
|
35
34
|
let queuePending = false;
|
|
36
35
|
const createTime = (fnName, tagName = '') => {
|
|
37
36
|
{
|
|
@@ -265,7 +264,6 @@ const getScopeId = (cmp, mode) => 'sc-' + (cmp.$tagName$);
|
|
|
265
264
|
*/
|
|
266
265
|
const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
267
266
|
if (oldValue !== newValue) {
|
|
268
|
-
let isProp = isMemberInElement(elm, memberName);
|
|
269
267
|
memberName.toLowerCase();
|
|
270
268
|
if (memberName === 'class') {
|
|
271
269
|
const classList = elm.classList;
|
|
@@ -299,41 +297,7 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
299
297
|
}
|
|
300
298
|
}
|
|
301
299
|
}
|
|
302
|
-
else
|
|
303
|
-
// Set property if it exists and it's not a SVG
|
|
304
|
-
const isComplex = isComplexType(newValue);
|
|
305
|
-
if ((isProp || (isComplex && newValue !== null)) && !isSvg) {
|
|
306
|
-
try {
|
|
307
|
-
if (!elm.tagName.includes('-')) {
|
|
308
|
-
const n = newValue == null ? '' : newValue;
|
|
309
|
-
// Workaround for Safari, moving the <input> caret when re-assigning the same valued
|
|
310
|
-
if (memberName === 'list') {
|
|
311
|
-
isProp = false;
|
|
312
|
-
}
|
|
313
|
-
else if (oldValue == null || elm[memberName] != n) {
|
|
314
|
-
elm[memberName] = n;
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
else {
|
|
318
|
-
elm[memberName] = newValue;
|
|
319
|
-
}
|
|
320
|
-
}
|
|
321
|
-
catch (e) { }
|
|
322
|
-
}
|
|
323
|
-
if (newValue == null || newValue === false) {
|
|
324
|
-
if (newValue !== false || elm.getAttribute(memberName) === '') {
|
|
325
|
-
{
|
|
326
|
-
elm.removeAttribute(memberName);
|
|
327
|
-
}
|
|
328
|
-
}
|
|
329
|
-
}
|
|
330
|
-
else if ((!isProp || flags & 4 /* VNODE_FLAGS.isHost */ || isSvg) && !isComplex) {
|
|
331
|
-
newValue = newValue === true ? '' : newValue;
|
|
332
|
-
{
|
|
333
|
-
elm.setAttribute(memberName, newValue);
|
|
334
|
-
}
|
|
335
|
-
}
|
|
336
|
-
}
|
|
300
|
+
else ;
|
|
337
301
|
}
|
|
338
302
|
};
|
|
339
303
|
const parseClassListRegex = /\s/;
|
|
@@ -351,13 +315,13 @@ const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
|
|
|
351
315
|
// remove attributes no longer present on the vnode by setting them to undefined
|
|
352
316
|
for (memberName in oldVnodeAttrs) {
|
|
353
317
|
if (!(memberName in newVnodeAttrs)) {
|
|
354
|
-
setAccessor(elm, memberName, oldVnodeAttrs[memberName], undefined
|
|
318
|
+
setAccessor(elm, memberName, oldVnodeAttrs[memberName], undefined);
|
|
355
319
|
}
|
|
356
320
|
}
|
|
357
321
|
}
|
|
358
322
|
// add new & update changed attributes
|
|
359
323
|
for (memberName in newVnodeAttrs) {
|
|
360
|
-
setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName]
|
|
324
|
+
setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName]);
|
|
361
325
|
}
|
|
362
326
|
};
|
|
363
327
|
/**
|
|
@@ -381,7 +345,7 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
381
345
|
elm = newVNode.$elm$ = (doc.createElement(newVNode.$tag$));
|
|
382
346
|
// add css classes, attrs, props, listeners, etc.
|
|
383
347
|
{
|
|
384
|
-
updateElement(null, newVNode
|
|
348
|
+
updateElement(null, newVNode);
|
|
385
349
|
}
|
|
386
350
|
if (isDef(scopeId) && elm['s-si'] !== scopeId) {
|
|
387
351
|
// if there is a scopeId and this is the initial render
|
|
@@ -638,7 +602,7 @@ const patch = (oldVNode, newVNode) => {
|
|
|
638
602
|
// either this is the first render of an element OR it's an update
|
|
639
603
|
// AND we already know it's possible it could have changed
|
|
640
604
|
// this updates the element's css classes, attrs, props, listeners, etc.
|
|
641
|
-
updateElement(oldVNode, newVNode
|
|
605
|
+
updateElement(oldVNode, newVNode);
|
|
642
606
|
}
|
|
643
607
|
}
|
|
644
608
|
if (oldChildren !== null && newChildren !== null) {
|
|
@@ -1131,7 +1095,6 @@ const registerHost = (elm, cmpMeta) => {
|
|
|
1131
1095
|
}
|
|
1132
1096
|
return hostRefs.set(elm, hostRef);
|
|
1133
1097
|
};
|
|
1134
|
-
const isMemberInElement = (elm, memberName) => memberName in elm;
|
|
1135
1098
|
const consoleError = (e, el) => (0, console.error)(e, el);
|
|
1136
1099
|
const cmpModules = /*@__PURE__*/ new Map();
|
|
1137
1100
|
const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-713ffc51.js');
|
|
6
6
|
const agGridCommunity_auto_esm = require('./ag-grid-community.auto.esm-42c6bc63.js');
|
|
7
7
|
|
|
8
8
|
const IxAgGrid = class {
|
|
@@ -38,36 +38,4 @@ const IxAgGrid = class {
|
|
|
38
38
|
}; }
|
|
39
39
|
};
|
|
40
40
|
|
|
41
|
-
const myComponentCss = ".sc-my-component-h{display:block}";
|
|
42
|
-
|
|
43
|
-
const columnDefs = [
|
|
44
|
-
{ field: 'make', resizable: true, checkboxSelection: true },
|
|
45
|
-
{ field: 'model', resizable: true, sortable: true, filter: true },
|
|
46
|
-
{ field: 'price', resizable: true },
|
|
47
|
-
];
|
|
48
|
-
const rowData = [
|
|
49
|
-
{ make: 'Toyota', model: 'Celica', price: 35000, checked: false },
|
|
50
|
-
{ make: 'Ford', model: 'Mondeo', price: 32000, checked: true },
|
|
51
|
-
{ make: 'Porsche', model: 'Boxster', price: 72000, checked: false },
|
|
52
|
-
];
|
|
53
|
-
const MyComponent = class {
|
|
54
|
-
constructor(hostRef) {
|
|
55
|
-
index.registerInstance(this, hostRef);
|
|
56
|
-
this.gridOptions = {
|
|
57
|
-
columnDefs: columnDefs,
|
|
58
|
-
rowData: rowData,
|
|
59
|
-
rowSelection: 'multiple',
|
|
60
|
-
suppressCellFocus: true,
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
render() {
|
|
64
|
-
return (index.h(index.Host, { style: {
|
|
65
|
-
height: '100%',
|
|
66
|
-
width: '100%',
|
|
67
|
-
} }, index.h("ix-ag-grid", { gridOptions: this.gridOptions })));
|
|
68
|
-
}
|
|
69
|
-
};
|
|
70
|
-
MyComponent.style = myComponentCss;
|
|
71
|
-
|
|
72
41
|
exports.ix_ag_grid = IxAgGrid;
|
|
73
|
-
exports.my_component = MyComponent;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const index = require('./index-
|
|
3
|
+
const index = require('./index-713ffc51.js');
|
|
4
4
|
|
|
5
5
|
/*
|
|
6
6
|
Stencil Client Patch Browser v2.19.3 | MIT Licensed | https://stenciljs.com
|
|
@@ -15,5 +15,5 @@ const patchBrowser = () => {
|
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(options => {
|
|
18
|
-
return index.bootstrapLazy([["ix-ag-
|
|
18
|
+
return index.bootstrapLazy([["ix-ag-grid.cjs",[[2,"ix-ag-grid",{"gridOptions":[16]}]]],["my-component.cjs",[[2,"my-component"]]]], options);
|
|
19
19
|
});
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-713ffc51.js');
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
8
|
Stencil Client Patch Esm v2.19.3 | MIT Licensed | https://stenciljs.com
|
|
@@ -14,7 +14,7 @@ const patchEsm = () => {
|
|
|
14
14
|
const defineCustomElements = (win, options) => {
|
|
15
15
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
16
|
return patchEsm().then(() => {
|
|
17
|
-
return index.bootstrapLazy([["ix-ag-
|
|
17
|
+
return index.bootstrapLazy([["ix-ag-grid.cjs",[[2,"ix-ag-grid",{"gridOptions":[16]}]]],["my-component.cjs",[[2,"my-component"]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-713ffc51.js');
|
|
6
|
+
|
|
7
|
+
const myComponentCss = ".sc-my-component-h{display:block}";
|
|
8
|
+
|
|
9
|
+
const MyComponent = class {
|
|
10
|
+
constructor(hostRef) {
|
|
11
|
+
index.registerInstance(this, hostRef);
|
|
12
|
+
}
|
|
13
|
+
render() {
|
|
14
|
+
return index.h(index.Host, null);
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
MyComponent.style = myComponentCss;
|
|
18
|
+
|
|
19
|
+
exports.my_component = MyComponent;
|
|
@@ -7,30 +7,9 @@
|
|
|
7
7
|
* LICENSE file in the root directory of this source tree.
|
|
8
8
|
*/
|
|
9
9
|
import { h, Host } from '@stencil/core';
|
|
10
|
-
const columnDefs = [
|
|
11
|
-
{ field: 'make', resizable: true, checkboxSelection: true },
|
|
12
|
-
{ field: 'model', resizable: true, sortable: true, filter: true },
|
|
13
|
-
{ field: 'price', resizable: true },
|
|
14
|
-
];
|
|
15
|
-
const rowData = [
|
|
16
|
-
{ make: 'Toyota', model: 'Celica', price: 35000, checked: false },
|
|
17
|
-
{ make: 'Ford', model: 'Mondeo', price: 32000, checked: true },
|
|
18
|
-
{ make: 'Porsche', model: 'Boxster', price: 72000, checked: false },
|
|
19
|
-
];
|
|
20
10
|
export class MyComponent {
|
|
21
|
-
constructor() {
|
|
22
|
-
this.gridOptions = {
|
|
23
|
-
columnDefs: columnDefs,
|
|
24
|
-
rowData: rowData,
|
|
25
|
-
rowSelection: 'multiple',
|
|
26
|
-
suppressCellFocus: true,
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
11
|
render() {
|
|
30
|
-
return
|
|
31
|
-
height: '100%',
|
|
32
|
-
width: '100%',
|
|
33
|
-
} }, h("ix-ag-grid", { gridOptions: this.gridOptions })));
|
|
12
|
+
return h(Host, null);
|
|
34
13
|
}
|
|
35
14
|
static get is() { return "my-component"; }
|
|
36
15
|
static get encapsulation() { return "scoped"; }
|
|
@@ -6,6 +6,5 @@
|
|
|
6
6
|
* This source code is licensed under the MIT license found in the
|
|
7
7
|
* LICENSE file in the root directory of this source tree.
|
|
8
8
|
*/
|
|
9
|
-
export
|
|
10
|
-
|
|
11
|
-
}
|
|
9
|
+
export * from './page';
|
|
10
|
+
export { themeSwitcher } from './theme-switcher';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* SPDX-FileCopyrightText: 2022 Siemens AG
|
|
3
|
+
*
|
|
4
|
+
* SPDX-License-Identifier: MIT
|
|
5
|
+
*
|
|
6
|
+
* This source code is licensed under the MIT license found in the
|
|
7
|
+
* LICENSE file in the root directory of this source tree.
|
|
8
|
+
*/
|
|
9
|
+
import { test as base } from '@playwright/test';
|
|
10
|
+
async function extendPageFixture(page, testInfo) {
|
|
11
|
+
const originalGoto = page.goto.bind(page);
|
|
12
|
+
const theme = testInfo.project.metadata.theme;
|
|
13
|
+
testInfo.annotations.push({
|
|
14
|
+
type: theme,
|
|
15
|
+
});
|
|
16
|
+
page.goto = async (url, options) => {
|
|
17
|
+
const response = await originalGoto(`http://127.0.0.1:8080/src/components/tests/${url}?theme=${theme}`, options);
|
|
18
|
+
// Inital timeout for webKit to render Web Components
|
|
19
|
+
await page.waitForTimeout(1000);
|
|
20
|
+
return response;
|
|
21
|
+
};
|
|
22
|
+
return page;
|
|
23
|
+
}
|
|
24
|
+
export const regressionTest = base.extend({
|
|
25
|
+
page: async ({ page }, use, testInfo) => {
|
|
26
|
+
page = await extendPageFixture(page, testInfo);
|
|
27
|
+
await use(page);
|
|
28
|
+
},
|
|
29
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* SPDX-FileCopyrightText: 2022 Siemens AG
|
|
3
|
+
*
|
|
4
|
+
* SPDX-License-Identifier: MIT
|
|
5
|
+
*
|
|
6
|
+
* This source code is licensed under the MIT license found in the
|
|
7
|
+
* LICENSE file in the root directory of this source tree.
|
|
8
|
+
*/
|
|
9
|
+
export const themeSwitcher = () => {
|
|
10
|
+
const searchParams = new URLSearchParams(location.search);
|
|
11
|
+
if (searchParams.has('theme')) {
|
|
12
|
+
const theme = searchParams.get('theme');
|
|
13
|
+
document.body.className = theme;
|
|
14
|
+
}
|
|
15
|
+
};
|
package/dist/components/index.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
export { setAssetPath, setPlatformOptions } from '@stencil/core/internal/client';
|
|
2
|
-
import './ix-ag-grid2.js';
|
|
3
2
|
export { IxAgGrid, defineCustomElement as defineCustomElementIxAgGrid } from './ix-ag-grid.js';
|
|
4
3
|
export { MyComponent, defineCustomElement as defineCustomElementMyComponent } from './my-component.js';
|