neo.mjs 4.0.88 → 4.0.89

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,6 +1,6 @@
1
1
  {
2
2
  "name": "neo.mjs",
3
- "version": "4.0.88",
3
+ "version": "4.0.89",
4
4
  "description": "The webworkers driven UI framework",
5
5
  "type": "module",
6
6
  "repository": {
@@ -5,7 +5,7 @@
5
5
  .neo-action {
6
6
  color : inherit;
7
7
  display : block;
8
- margin : 1em 0;
8
+ margin : 1.1em 0;
9
9
  text-decoration: none;
10
10
  }
11
11
 
@@ -278,6 +278,10 @@ class RecordFactory extends Base {
278
278
  return new Date(value);
279
279
  }
280
280
 
281
+ if (type === 'html' && value) {
282
+ value = value + '';
283
+ }
284
+
281
285
  if (type === 'string' && value) {
282
286
  value = value + '';
283
287
  value = value.replace(/(<([^>]+)>)/ig, '');
@@ -55,6 +55,20 @@ class Container extends Base {
55
55
  layout: {ntype: 'hbox', align: 'stretch'}
56
56
  }}
57
57
 
58
+ /**
59
+ * @param {Object} config
60
+ */
61
+ construct(config) {
62
+ super.construct(config);
63
+
64
+ let me = this,
65
+ domListeners = me.domListeners;
66
+
67
+ domListeners.push({click: me.onItemClick, delegate: '.neo-action', scope: me});
68
+
69
+ me.domListeners = domListeners;
70
+ }
71
+
58
72
  /**
59
73
  * Triggered after the itemStore config got changed
60
74
  * @param {Neo.sitemap.store.Items|null} value
@@ -163,6 +177,12 @@ class Container extends Base {
163
177
  return `${this.id}__${recordId}`;
164
178
  }
165
179
 
180
+ /**
181
+ * Override as needed
182
+ * @param {Object} data
183
+ */
184
+ onItemClick(data) {}
185
+
166
186
  /**
167
187
  *
168
188
  */
@@ -41,7 +41,7 @@ class Item extends Model {
41
41
  type : 'Number'
42
42
  }, {
43
43
  name: 'name',
44
- type: 'String'
44
+ type: 'Html'
45
45
  }]
46
46
  }}
47
47
  }