@siemens/ix-aggrid 1.0.0-beta.4 → 1.0.0-beta.5

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.
@@ -22,31 +22,17 @@ function _interopNamespace(e) {
22
22
 
23
23
  const NAMESPACE = 'ix-aggrid';
24
24
 
25
+ /**
26
+ * Virtual DOM patching algorithm based on Snabbdom by
27
+ * Simon Friis Vindum (@paldepind)
28
+ * Licensed under the MIT License
29
+ * https://github.com/snabbdom/snabbdom/blob/master/LICENSE
30
+ *
31
+ * Modified for Stencil's renderer and slot projection
32
+ */
25
33
  let scopeId;
26
34
  let isSvgMode = false;
27
35
  let queuePending = false;
28
- const win = typeof window !== 'undefined' ? window : {};
29
- const doc = win.document || { head: {} };
30
- const plt = {
31
- $flags$: 0,
32
- $resourcesUrl$: '',
33
- jmp: (h) => h(),
34
- raf: (h) => requestAnimationFrame(h),
35
- ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
36
- rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
37
- ce: (eventName, opts) => new CustomEvent(eventName, opts),
38
- };
39
- const promiseResolve = (v) => Promise.resolve(v);
40
- const supportsConstructableStylesheets = /*@__PURE__*/ (() => {
41
- try {
42
- new CSSStyleSheet();
43
- return typeof new CSSStyleSheet().replaceSync === 'function';
44
- }
45
- catch (e) { }
46
- return false;
47
- })()
48
- ;
49
- const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';
50
36
  const createTime = (fnName, tagName = '') => {
51
37
  {
52
38
  return () => {
@@ -61,79 +47,7 @@ const uniqueTime = (key, measureText) => {
61
47
  };
62
48
  }
63
49
  };
64
- const rootAppliedStyles = /*@__PURE__*/ new WeakMap();
65
- const registerStyle = (scopeId, cssText, allowCS) => {
66
- let style = styles.get(scopeId);
67
- if (supportsConstructableStylesheets && allowCS) {
68
- style = (style || new CSSStyleSheet());
69
- if (typeof style === 'string') {
70
- style = cssText;
71
- }
72
- else {
73
- style.replaceSync(cssText);
74
- }
75
- }
76
- else {
77
- style = cssText;
78
- }
79
- styles.set(scopeId, style);
80
- };
81
- const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
82
- let scopeId = getScopeId(cmpMeta);
83
- const style = styles.get(scopeId);
84
- // if an element is NOT connected then getRootNode() will return the wrong root node
85
- // so the fallback is to always use the document for the root node in those cases
86
- styleContainerNode = styleContainerNode.nodeType === 11 /* NODE_TYPE.DocumentFragment */ ? styleContainerNode : doc;
87
- if (style) {
88
- if (typeof style === 'string') {
89
- styleContainerNode = styleContainerNode.head || styleContainerNode;
90
- let appliedStyles = rootAppliedStyles.get(styleContainerNode);
91
- let styleElm;
92
- if (!appliedStyles) {
93
- rootAppliedStyles.set(styleContainerNode, (appliedStyles = new Set()));
94
- }
95
- if (!appliedStyles.has(scopeId)) {
96
- {
97
- {
98
- styleElm = doc.createElement('style');
99
- styleElm.innerHTML = style;
100
- }
101
- styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
102
- }
103
- if (appliedStyles) {
104
- appliedStyles.add(scopeId);
105
- }
106
- }
107
- }
108
- else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
109
- styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
110
- }
111
- }
112
- return scopeId;
113
- };
114
- const attachStyles = (hostRef) => {
115
- const cmpMeta = hostRef.$cmpMeta$;
116
- const elm = hostRef.$hostElement$;
117
- const flags = cmpMeta.$flags$;
118
- const endAttachStyles = createTime('attachStyles', cmpMeta.$tagName$);
119
- const scopeId = addStyle(elm.getRootNode(), cmpMeta);
120
- if (flags & 10 /* CMP_FLAGS.needsScopedEncapsulation */) {
121
- // only required when we're NOT using native shadow dom (slot)
122
- // or this browser doesn't support native shadow dom
123
- // and this host element was NOT created with SSR
124
- // let's pick out the inner content for slot projection
125
- // create a node to represent where the original
126
- // content was first placed, which is useful later on
127
- // DOM WRITE!!
128
- elm['s-sc'] = scopeId;
129
- elm.classList.add(scopeId + '-h');
130
- if (flags & 2 /* CMP_FLAGS.scopedCssEncapsulation */) {
131
- elm.classList.add(scopeId + '-s');
132
- }
133
- }
134
- endAttachStyles();
135
- };
136
- const getScopeId = (cmp, mode) => 'sc-' + (cmp.$tagName$);
50
+ const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';
137
51
  /**
138
52
  * Default style mode id
139
53
  */
@@ -222,6 +136,125 @@ const newVNode = (tag, text) => {
222
136
  };
223
137
  const Host = {};
224
138
  const isHost = (node) => node && node.$tag$ === Host;
139
+ /**
140
+ * Parse a new property value for a given property type.
141
+ *
142
+ * While the prop value can reasonably be expected to be of `any` type as far as TypeScript's type checker is concerned,
143
+ * it is not safe to assume that the string returned by evaluating `typeof propValue` matches:
144
+ * 1. `any`, the type given to `propValue` in the function signature
145
+ * 2. the type stored from `propType`.
146
+ *
147
+ * This function provides the capability to parse/coerce a property's value to potentially any other JavaScript type.
148
+ *
149
+ * Property values represented in TSX preserve their type information. In the example below, the number 0 is passed to
150
+ * a component. This `propValue` will preserve its type information (`typeof propValue === 'number'`). Note that is
151
+ * based on the type of the value being passed in, not the type declared of the class member decorated with `@Prop`.
152
+ * ```tsx
153
+ * <my-cmp prop-val={0}></my-cmp>
154
+ * ```
155
+ *
156
+ * HTML prop values on the other hand, will always a string
157
+ *
158
+ * @param propValue the new value to coerce to some type
159
+ * @param propType the type of the prop, expressed as a binary number
160
+ * @returns the parsed/coerced value
161
+ */
162
+ const parsePropertyValue = (propValue, propType) => {
163
+ // ensure this value is of the correct prop type
164
+ if (propValue != null && !isComplexType(propValue)) {
165
+ // redundant return here for better minification
166
+ return propValue;
167
+ }
168
+ // not sure exactly what type we want
169
+ // so no need to change to a different type
170
+ return propValue;
171
+ };
172
+ const getElement = (ref) => (getHostRef(ref).$hostElement$ );
173
+ /**
174
+ * Helper function to create & dispatch a custom Event on a provided target
175
+ * @param elm the target of the Event
176
+ * @param name the name to give the custom Event
177
+ * @param opts options for configuring a custom Event
178
+ * @returns the custom Event
179
+ */
180
+ const emitEvent = (elm, name, opts) => {
181
+ const ev = plt.ce(name, opts);
182
+ elm.dispatchEvent(ev);
183
+ return ev;
184
+ };
185
+ const rootAppliedStyles = /*@__PURE__*/ new WeakMap();
186
+ const registerStyle = (scopeId, cssText, allowCS) => {
187
+ let style = styles.get(scopeId);
188
+ if (supportsConstructableStylesheets && allowCS) {
189
+ style = (style || new CSSStyleSheet());
190
+ if (typeof style === 'string') {
191
+ style = cssText;
192
+ }
193
+ else {
194
+ style.replaceSync(cssText);
195
+ }
196
+ }
197
+ else {
198
+ style = cssText;
199
+ }
200
+ styles.set(scopeId, style);
201
+ };
202
+ const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
203
+ let scopeId = getScopeId(cmpMeta);
204
+ const style = styles.get(scopeId);
205
+ // if an element is NOT connected then getRootNode() will return the wrong root node
206
+ // so the fallback is to always use the document for the root node in those cases
207
+ styleContainerNode = styleContainerNode.nodeType === 11 /* NODE_TYPE.DocumentFragment */ ? styleContainerNode : doc;
208
+ if (style) {
209
+ if (typeof style === 'string') {
210
+ styleContainerNode = styleContainerNode.head || styleContainerNode;
211
+ let appliedStyles = rootAppliedStyles.get(styleContainerNode);
212
+ let styleElm;
213
+ if (!appliedStyles) {
214
+ rootAppliedStyles.set(styleContainerNode, (appliedStyles = new Set()));
215
+ }
216
+ if (!appliedStyles.has(scopeId)) {
217
+ {
218
+ {
219
+ styleElm = doc.createElement('style');
220
+ styleElm.innerHTML = style;
221
+ }
222
+ styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
223
+ }
224
+ if (appliedStyles) {
225
+ appliedStyles.add(scopeId);
226
+ }
227
+ }
228
+ }
229
+ else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
230
+ styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
231
+ }
232
+ }
233
+ return scopeId;
234
+ };
235
+ const attachStyles = (hostRef) => {
236
+ const cmpMeta = hostRef.$cmpMeta$;
237
+ const elm = hostRef.$hostElement$;
238
+ const flags = cmpMeta.$flags$;
239
+ const endAttachStyles = createTime('attachStyles', cmpMeta.$tagName$);
240
+ const scopeId = addStyle(elm.getRootNode(), cmpMeta);
241
+ if (flags & 10 /* CMP_FLAGS.needsScopedEncapsulation */) {
242
+ // only required when we're NOT using native shadow dom (slot)
243
+ // or this browser doesn't support native shadow dom
244
+ // and this host element was NOT created with SSR
245
+ // let's pick out the inner content for slot projection
246
+ // create a node to represent where the original
247
+ // content was first placed, which is useful later on
248
+ // DOM WRITE!!
249
+ elm['s-sc'] = scopeId;
250
+ elm.classList.add(scopeId + '-h');
251
+ if (flags & 2 /* CMP_FLAGS.scopedCssEncapsulation */) {
252
+ elm.classList.add(scopeId + '-s');
253
+ }
254
+ }
255
+ endAttachStyles();
256
+ };
257
+ const getScopeId = (cmp, mode) => 'sc-' + (cmp.$tagName$);
225
258
  /**
226
259
  * Production setAccessor() function based on Preact by
227
260
  * Jason Miller (@developit)
@@ -637,19 +670,6 @@ const renderVdom = (hostRef, renderFnResults) => {
637
670
  // synchronous patch
638
671
  patch(oldVNode, rootVnode);
639
672
  };
640
- const getElement = (ref) => (getHostRef(ref).$hostElement$ );
641
- /**
642
- * Helper function to create & dispatch a custom Event on a provided target
643
- * @param elm the target of the Event
644
- * @param name the name to give the custom Event
645
- * @param opts options for configuring a custom Event
646
- * @returns the custom Event
647
- */
648
- const emitEvent = (elm, name, opts) => {
649
- const ev = plt.ce(name, opts);
650
- elm.dispatchEvent(ev);
651
- return ev;
652
- };
653
673
  const attachToAncestor = (hostRef, ancestorComponent) => {
654
674
  if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent['s-p']) {
655
675
  ancestorComponent['s-p'].push(new Promise((r) => (hostRef.$onRenderResolve$ = r)));
@@ -803,39 +823,6 @@ const then = (promise, thenFn) => {
803
823
  };
804
824
  const addHydratedFlag = (elm) => elm.classList.add('hydrated')
805
825
  ;
806
- /**
807
- * Parse a new property value for a given property type.
808
- *
809
- * While the prop value can reasonably be expected to be of `any` type as far as TypeScript's type checker is concerned,
810
- * it is not safe to assume that the string returned by evaluating `typeof propValue` matches:
811
- * 1. `any`, the type given to `propValue` in the function signature
812
- * 2. the type stored from `propType`.
813
- *
814
- * This function provides the capability to parse/coerce a property's value to potentially any other JavaScript type.
815
- *
816
- * Property values represented in TSX preserve their type information. In the example below, the number 0 is passed to
817
- * a component. This `propValue` will preserve its type information (`typeof propValue === 'number'`). Note that is
818
- * based on the type of the value being passed in, not the type declared of the class member decorated with `@Prop`.
819
- * ```tsx
820
- * <my-cmp prop-val={0}></my-cmp>
821
- * ```
822
- *
823
- * HTML prop values on the other hand, will always a string
824
- *
825
- * @param propValue the new value to coerce to some type
826
- * @param propType the type of the prop, expressed as a binary number
827
- * @returns the parsed/coerced value
828
- */
829
- const parsePropertyValue = (propValue, propType) => {
830
- // ensure this value is of the correct prop type
831
- if (propValue != null && !isComplexType(propValue)) {
832
- // redundant return here for better minification
833
- return propValue;
834
- }
835
- // not sure exactly what type we want
836
- // so no need to change to a different type
837
- return propValue;
838
- };
839
826
  const getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
840
827
  const setValue = (ref, propName, newVal, cmpMeta) => {
841
828
  // check our new property value against our internal value
@@ -879,6 +866,16 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
879
866
  }
880
867
  }
881
868
  };
869
+ /**
870
+ * Attach a series of runtime constructs to a compiled Stencil component
871
+ * constructor, including getters and setters for the `@Prop` and `@State`
872
+ * decorators, callbacks for when attributes change, and so on.
873
+ *
874
+ * @param Cstr the constructor for a component that we need to process
875
+ * @param cmpMeta metadata collected previously about the component
876
+ * @param flags a number used to store a series of bit flags
877
+ * @returns a reference to the same constructor passed in (but now mutated)
878
+ */
882
879
  const proxyComponent = (Cstr, cmpMeta, flags) => {
883
880
  if (cmpMeta.$members$) {
884
881
  if (Cstr.watchers) {
@@ -1159,6 +1156,27 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
1159
1156
  }, consoleError);
1160
1157
  };
1161
1158
  const styles = /*@__PURE__*/ new Map();
1159
+ const win = typeof window !== 'undefined' ? window : {};
1160
+ const doc = win.document || { head: {} };
1161
+ const plt = {
1162
+ $flags$: 0,
1163
+ $resourcesUrl$: '',
1164
+ jmp: (h) => h(),
1165
+ raf: (h) => requestAnimationFrame(h),
1166
+ ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
1167
+ rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
1168
+ ce: (eventName, opts) => new CustomEvent(eventName, opts),
1169
+ };
1170
+ const promiseResolve = (v) => Promise.resolve(v);
1171
+ const supportsConstructableStylesheets = /*@__PURE__*/ (() => {
1172
+ try {
1173
+ new CSSStyleSheet();
1174
+ return typeof new CSSStyleSheet().replaceSync === 'function';
1175
+ }
1176
+ catch (e) { }
1177
+ return false;
1178
+ })()
1179
+ ;
1162
1180
  const queueDomReads = [];
1163
1181
  const queueDomWrites = [];
1164
1182
  const queueTask = (queue, write) => (cb) => {
@@ -1,4 +1,4 @@
1
1
  'use strict';
2
2
 
3
- require('./ag-grid-community.auto.esm-6aabb45a.js');
3
+ require('./ag-grid-community.auto.esm-42c6bc63.js');
4
4
 
@@ -2,8 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-15264d0e.js');
6
- const agGridCommunity_auto_esm = require('./ag-grid-community.auto.esm-6aabb45a.js');
5
+ const index = require('./index-5b0f17d6.js');
6
+ const agGridCommunity_auto_esm = require('./ag-grid-community.auto.esm-42c6bc63.js');
7
7
 
8
8
  const IxAgGrid = class {
9
9
  constructor(hostRef) {
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
- const index = require('./index-15264d0e.js');
3
+ const index = require('./index-5b0f17d6.js');
4
4
 
5
5
  /*
6
- Stencil Client Patch Browser v2.18.0 | MIT Licensed | https://stenciljs.com
6
+ Stencil Client Patch Browser v2.18.1 | MIT Licensed | https://stenciljs.com
7
7
  */
8
8
  const patchBrowser = () => {
9
9
  const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('ix-aggrid.cjs.js', document.baseURI).href));
@@ -2,10 +2,10 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-15264d0e.js');
5
+ const index = require('./index-5b0f17d6.js');
6
6
 
7
7
  /*
8
- Stencil Client Patch Esm v2.18.0 | MIT Licensed | https://stenciljs.com
8
+ Stencil Client Patch Esm v2.18.1 | MIT Licensed | https://stenciljs.com
9
9
  */
10
10
  const patchEsm = () => {
11
11
  return index.promiseResolve();
@@ -5,7 +5,7 @@
5
5
  ],
6
6
  "compiler": {
7
7
  "name": "@stencil/core",
8
- "version": "2.18.0",
8
+ "version": "2.18.1",
9
9
  "typescriptVersion": "4.7.4"
10
10
  },
11
11
  "collections": [],