@siemens/ix-aggrid 1.2.1 → 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.
Files changed (33) hide show
  1. package/dist/cjs/{index-bbfdf33e.js → index-713ffc51.js} +5 -42
  2. package/dist/cjs/ix-ag-grid.cjs.entry.js +41 -0
  3. package/dist/cjs/ix-aggrid.cjs.js +2 -2
  4. package/dist/cjs/loader.cjs.js +2 -2
  5. package/dist/cjs/my-component.cjs.entry.js +19 -0
  6. package/dist/collection/components/my-component/my-component.js +1 -26
  7. package/dist/collection/{utils → components/tests/utils}/test/index.js +1 -0
  8. package/dist/collection/{utils → components/tests/utils}/test/page.js +1 -1
  9. package/dist/collection/{utils → components/tests/utils}/test/theme-switcher.js +0 -0
  10. package/dist/components/index.js +0 -1
  11. package/dist/components/ix-ag-grid.js +52651 -1
  12. package/dist/components/my-component.js +2 -46
  13. package/dist/esm/{index-1ae27f1f.js → index-c5cf50e5.js} +5 -42
  14. package/dist/esm/ix-ag-grid.entry.js +37 -0
  15. package/dist/esm/ix-aggrid.js +2 -2
  16. package/dist/esm/loader.js +2 -2
  17. package/dist/esm/my-component.entry.js +15 -0
  18. package/dist/ix-aggrid/ix-aggrid.css +1 -1
  19. package/dist/ix-aggrid/ix-aggrid.esm.js +1 -1
  20. package/dist/ix-aggrid/p-531b1c8d.entry.js +1 -0
  21. package/dist/ix-aggrid/p-55389b3b.js +2 -0
  22. package/dist/ix-aggrid/p-cfe2ad1a.entry.js +1 -0
  23. package/dist/types/components/my-component/my-component.d.ts +0 -3
  24. package/dist/types/components/tests/utils/test/index.d.ts +2 -0
  25. package/dist/types/{utils → components/tests/utils}/test/page.d.ts +0 -0
  26. package/package.json +8 -6
  27. package/dist/cjs/ix-ag-grid_2.cjs.entry.js +0 -92
  28. package/dist/components/ix-ag-grid2.js +0 -52653
  29. package/dist/esm/ix-ag-grid_2.entry.js +0 -87
  30. package/dist/ix-aggrid/p-5c9652cd.js +0 -2
  31. package/dist/ix-aggrid/p-d43d39f0.entry.js +0 -1
  32. package/dist/types/utils/test/index.d.ts +0 -1
  33. package/dist/types/utils/test/theme-switcher.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, isSvgMode, newVnode.$flags$);
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], isSvgMode, newVnode.$flags$);
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, isSvgMode);
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, isSvgMode);
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) => {
@@ -0,0 +1,41 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-713ffc51.js');
6
+ const agGridCommunity_auto_esm = require('./ag-grid-community.auto.esm-42c6bc63.js');
7
+
8
+ const IxAgGrid = class {
9
+ constructor(hostRef) {
10
+ index.registerInstance(this, hostRef);
11
+ this.gridOptions = undefined;
12
+ }
13
+ componentDidLoad() {
14
+ this.initializeGrid();
15
+ }
16
+ initializeGrid() {
17
+ if (!this.gridOptions) {
18
+ return;
19
+ }
20
+ if (!this.grid) {
21
+ const gridDiv = this.host.querySelector('div.ag-theme-ix');
22
+ this.grid = new agGridCommunity_auto_esm.Grid(gridDiv, this.gridOptions);
23
+ }
24
+ }
25
+ disconnectedCallback() {
26
+ var _a;
27
+ (_a = this.grid) === null || _a === void 0 ? void 0 : _a.destroy();
28
+ }
29
+ render() {
30
+ return (index.h(index.Host, null, index.h("div", { style: {
31
+ height: '100%',
32
+ width: '100%',
33
+ }, class: "ag-theme-alpine-dark ag-theme-ix" })));
34
+ }
35
+ get host() { return index.getElement(this); }
36
+ static get watchers() { return {
37
+ "gridOptions": ["initializeGrid"]
38
+ }; }
39
+ };
40
+
41
+ exports.ix_ag_grid = IxAgGrid;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const index = require('./index-bbfdf33e.js');
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-grid_2.cjs",[[2,"my-component"],[2,"ix-ag-grid",{"gridOptions":[16]}]]]], options);
18
+ return index.bootstrapLazy([["ix-ag-grid.cjs",[[2,"ix-ag-grid",{"gridOptions":[16]}]]],["my-component.cjs",[[2,"my-component"]]]], options);
19
19
  });
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-bbfdf33e.js');
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-grid_2.cjs",[[2,"my-component"],[2,"ix-ag-grid",{"gridOptions":[16]}]]]], options);
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,34 +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
- import { themeSwitcher } from '@utils/test/theme-switcher';
11
- const columnDefs = [
12
- { field: 'make', resizable: true, checkboxSelection: true },
13
- { field: 'model', resizable: true, sortable: true, filter: true },
14
- { field: 'price', resizable: true },
15
- ];
16
- const rowData = [
17
- { make: 'Toyota', model: 'Celica', price: 35000, checked: false },
18
- { make: 'Ford', model: 'Mondeo', price: 32000, checked: true },
19
- { make: 'Porsche', model: 'Boxster', price: 72000, checked: false },
20
- ];
21
10
  export class MyComponent {
22
- constructor() {
23
- this.gridOptions = {
24
- columnDefs: columnDefs,
25
- rowData: rowData,
26
- rowSelection: 'multiple',
27
- suppressCellFocus: true,
28
- };
29
- }
30
- componentDidLoad() {
31
- themeSwitcher();
32
- }
33
11
  render() {
34
- return (h(Host, { style: {
35
- height: '100%',
36
- width: '100%',
37
- } }, h("ix-ag-grid", { gridOptions: this.gridOptions })));
12
+ return h(Host, null);
38
13
  }
39
14
  static get is() { return "my-component"; }
40
15
  static get encapsulation() { return "scoped"; }
@@ -7,3 +7,4 @@
7
7
  * LICENSE file in the root directory of this source tree.
8
8
  */
9
9
  export * from './page';
10
+ export { themeSwitcher } from './theme-switcher';
@@ -14,7 +14,7 @@ async function extendPageFixture(page, testInfo) {
14
14
  type: theme,
15
15
  });
16
16
  page.goto = async (url, options) => {
17
- const response = await originalGoto(`http://127.0.0.1:3333${url}?theme=${theme}`, options);
17
+ const response = await originalGoto(`http://127.0.0.1:8080/src/components/tests/${url}?theme=${theme}`, options);
18
18
  // Inital timeout for webKit to render Web Components
19
19
  await page.waitForTimeout(1000);
20
20
  return response;
@@ -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';