@nebularstreams/libmui 2.5.121 → 2.5.123

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nebularstreams/libmui",
3
3
  "description": "Micro UI based on Mithril",
4
- "version": "2.5.121",
4
+ "version": "2.5.123",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
7
7
  "scripts": {
@@ -421,6 +421,8 @@ const
421
421
  parameters: item,
422
422
  auxParameters,
423
423
 
424
+ arrayInfo: {source: rawValue, item, index},
425
+
424
426
  global,
425
427
  clone,
426
428
  onchange,
@@ -472,19 +474,20 @@ const
472
474
  titleCollapsed: metaDef.titleCollapsed || metaDef.hint,
473
475
  })
474
476
  )
475
- .concat(metaDef.addAction ? [
476
- m(ButtonNew, {
477
- ...metaDef.addAction,
478
- onClick: (e) => {
479
- if (metaDef.addAction.onClick) {
480
- metaDef.addAction.onClick(e, parameters, auxParameters);
481
- } else if (metaDef.addAction.template) {
482
- rawValue.push(cloneObject(metaDef.addAction.template));
477
+ .concat(
478
+ metaDef.addAction ? [
479
+ m(ButtonNew, {
480
+ ...metaDef.addAction,
481
+ onClick: (e) => {
482
+ if (metaDef.addAction.onClick) {
483
+ metaDef.addAction.onClick(e, parameters, auxParameters);
484
+ } else if (metaDef.addAction.template) {
485
+ rawValue.push(cloneObject(metaDef.addAction.template));
486
+ }
487
+ m.redraw();
483
488
  }
484
- m.redraw();
485
- }
486
- })
487
- ] : [])
489
+ })
490
+ ] : [])
488
491
  : []
489
492
 
490
493
  : isCardie
@@ -841,7 +844,7 @@ const
841
844
  if (metaDef.onClick) {
842
845
  metaDef.onClick(metaKey, e, targetParameters, auxParameters, global, attrs);
843
846
  } else {
844
- if (attrs.onAction) attrs.onAction(metaKey, e, targetSource);
847
+ if (attrs.onAction) attrs.onAction(metaKey, e, targetSource, attrs.arrayInfo);
845
848
  }
846
849
  };
847
850