@yesilyazilim/web.spa 1.0.50 → 1.0.51

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/index.js CHANGED
@@ -3915,6 +3915,29 @@ $3042695c00d24043$export$e2e9b8b5e72b52f3 = $3042695c00d24043$var$__decorate([
3915
3915
 
3916
3916
 
3917
3917
 
3918
+ class $464529808d0e4cdf$export$8896db612ea4f16e {
3919
+ createElement(tag, attrs, ...children) {
3920
+ const element = document.createElement(tag);
3921
+ for(const name in attrs)if (name && Object.prototype.hasOwnProperty.call(attrs, name)) {
3922
+ const value = attrs[name];
3923
+ if (name.toLowerCase() === 'click') element.addEventListener('click', value);
3924
+ else if (name.toLowerCase() === 'onchange') element.addEventListener('change', value);
3925
+ else {
3926
+ if (value === true) element.setAttribute(name, name);
3927
+ else if (value !== false && value != null) element.setAttribute(name, value.toString());
3928
+ }
3929
+ }
3930
+ for (const child of children || []){
3931
+ const node = (0, $87fc1b0b8620af66$export$e1dae5660003ffa7).isHtmlElement(child) ? child : document.createTextNode(child);
3932
+ element.appendChild(node);
3933
+ }
3934
+ return element;
3935
+ }
3936
+ }
3937
+ window.SpaJSX = new $464529808d0e4cdf$export$8896db612ea4f16e();
3938
+
3939
+
3940
+
3918
3941
 
3919
3942
 
3920
3943
 
@@ -5750,6 +5773,21 @@ class $1b4e3c1abfa7ee85$export$978e41b8329f7c94 {
5750
5773
  };
5751
5774
  return this.createColMutated(field, title, null, props);
5752
5775
  }
5776
+ createObjectCol(field, title, objField, otherProps = {}) {
5777
+ const props = otherProps || {};
5778
+ props.sorter = 'string';
5779
+ props.mutatorParams = {
5780
+ fieldName: field,
5781
+ objField: objField
5782
+ };
5783
+ props.mutator = (value, data, type, mutatorParams, cell)=>{
5784
+ const obj = data[mutatorParams.fieldName];
5785
+ if (!obj) return '';
5786
+ const objVal = obj[mutatorParams.objField];
5787
+ return objVal || '';
5788
+ };
5789
+ return this.createColMutated(field, title, null, props);
5790
+ }
5753
5791
  }
5754
5792
  function $1b4e3c1abfa7ee85$var$tabulatorInit() {
5755
5793
  (0, $hgUW1$TabulatorFull).extendModule("localize", "langs", {