ru.coon 2.7.27 → 2.7.29

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/CHANGELOG.md CHANGED
@@ -1,3 +1,16 @@
1
+ # Version 2.7.29, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/567513e38f7c7e6b90e1873785d5fb69e9fb9f4b)
2
+ * ## Fixes
3
+ * <span style='color:red'> CustomValueCheckBox updateCheckedCls by transformed value. Closes HT-8838.</span> ([1ac9e0], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/1ac9e0051d72938c2942a2d528e40fd9b20ca4a0))
4
+
5
+ * add CoonQtip plugin for adding tooltip on fields with missing tooltip feature ([49dabd], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/49dabdd3c14afd50413d8a1b9a027a9fbd78713d))
6
+ * update: CHANGELOG.md ([89516f], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/89516fd4f6c4e5fde8dac6635e30f1b42ada35d3))
7
+
8
+ # Version 2.7.28, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/cb4662ac201c84739a5abb84ba36f10af0e35a25)
9
+ * ## Fixes
10
+ * <span style='color:red'>fix HT-8819</span> ([c5be10], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/c5be103a7e463659ee436dd478eee04c9cfa6b35))
11
+
12
+ * update: CHANGELOG.md ([6b1c8b], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/6b1c8b9cfb4519d95713d70996f2d8f816bcaea4))
13
+
1
14
  # Version 2.7.27, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/c59dc7400f5e4ee4f7bbfcd42f4aa371d9b2e68f)
2
15
  * ## Fixes
3
16
  * <span style='color:red'> HT-8707 checking the component is rendered</span> ([d1fd00], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/d1fd008a47ca9a0f2d7a2404c1b21e1d7aa8b2a7))
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "name": "ru.coon"
5
5
  },
6
6
  "description": "",
7
- "version": "2.7.27",
7
+ "version": "2.7.29",
8
8
  "repository": {
9
9
  "type": "git",
10
10
  "url": "git+http://gitlab-dbr.sigma-it.local/dbr/ru.coon"
@@ -302,12 +302,18 @@ Ext.define('Coon.common.component.editor.CharacteristicGridEditor', {
302
302
 
303
303
  const ns = Coon.report.model.CharacteristicBeanFields;
304
304
 
305
+ const normalize = (el) => {
306
+ el.value = typeof el.value === 'string' ? el.value.trim() : el.value;
307
+ el.type = typeof el.type === 'string' ? el.type.trim() : el.type;
308
+ return el;
309
+ };
310
+
305
311
  const withTypeDefinition = (!Ext.isEmpty(typeList) || Ext.isEmpty(valueList));
306
312
  if (!withTypeDefinition) {
307
313
  const typesCache = [];
308
314
  // Без определения доступных типов - типы формируются из списка значений
309
315
  for (let i = 0; i < valueList.length; i++) {
310
- const valueBean = valueList[i];
316
+ const valueBean = normalize(valueList[i]);
311
317
  const valueType = valueBean[ns.$type];
312
318
  if (typesCache.indexOf(valueType) === -1) {
313
319
  const typeRawBean = Ext.apply({}, valueBean);
@@ -99,7 +99,7 @@ Ext.define('Coon.common.field.checkbox.CustomValueCheckBox', {
99
99
  inputEl.checked = checked;
100
100
  me.duringSetRawValue = false;
101
101
 
102
- me.updateCheckedCls(value);
102
+ me.updateCheckedCls(me.getValue());
103
103
  }
104
104
 
105
105
  me.checked = me.rawValue = checked;
@@ -0,0 +1,43 @@
1
+ Ext.define('Coon.plugin.CoonQtip', {
2
+ extend: 'Ext.plugin.Abstract',
3
+ alias: 'plugin.CoonQtip',
4
+ id: 'CoonQtip',
5
+
6
+ init() {
7
+ Coon.util.bindMethods(
8
+ [
9
+ 'getQtip',
10
+ 'setQtip'
11
+ ],
12
+ this,
13
+ this.getCmp(),
14
+ this
15
+ );
16
+ this.renderQtip();
17
+ this.getCmp().on('afterrender', function() {
18
+ this.renderQtip();
19
+ }, this, {single: true});
20
+ },
21
+
22
+ getQtip() {
23
+ return this.getCmp().qtip;
24
+ },
25
+
26
+ setQtip(qtip) {
27
+ this.getCmp().qtip = qtip;
28
+ this.renderQtip(qtip);
29
+ },
30
+
31
+ renderQtip() {
32
+ if (this.getCmp().destroyed) {
33
+ return;
34
+ }
35
+ const dom = this.getCmp().getEl() && this.getCmp().getEl().dom;
36
+ if (!dom) {
37
+ return;
38
+ }
39
+ const qtip = Ext.util.Format.htmlEncode(this.getQtip() || '');
40
+ dom.dataset.qtip = qtip;
41
+ },
42
+
43
+ });
@@ -11,14 +11,10 @@ Ext.define('Coon.report.model.CharacteristicBean', {
11
11
  fields: [
12
12
  {name: Coon.report.model.CharacteristicBeanFields.$effectiveDate, type: 'date'},
13
13
  {
14
- name: Coon.report.model.CharacteristicBeanFields.$value, type: 'string', convert: (val) => {
15
- return typeof val === 'string' ? val.trim() : val;
16
- },
14
+ name: Coon.report.model.CharacteristicBeanFields.$value, type: 'string',
17
15
  },
18
16
  {name: Coon.report.model.CharacteristicBeanFields.$valueDescription, type: 'string'},
19
- {name: Coon.report.model.CharacteristicBeanFields.$type, type: 'string', convert: (val) => {
20
- return typeof val === 'string' ? val.trim() : val;
21
- }},
17
+ {name: Coon.report.model.CharacteristicBeanFields.$type, type: 'string'},
22
18
  {name: Coon.report.model.CharacteristicBeanFields.$typeDescription, type: 'string'},
23
19
  {name: Coon.report.model.CharacteristicBeanFields.$editable, type: 'boolean', defaultValue: true},
24
20
  {name: Coon.report.model.CharacteristicBeanFields.$visible, type: 'boolean', defaultValue: true},
package/src/util.js CHANGED
@@ -620,4 +620,24 @@ Ext.define('Coon.util', {
620
620
  objectsIsEqual(obj1 = {}, obj2 = {}) {
621
621
  return Coon.util.generateHashFromObj(obj1) === Coon.util.generateHashFromObj(obj2);
622
622
  },
623
+
624
+ /**
625
+ * bind methods from one component to another
626
+ * @param {Array} methods array of method names
627
+ * @param {*} from component
628
+ * @param {*} to component
629
+ * @param {*} scope context
630
+ * @returns
631
+ */
632
+ bindMethods(methods, from, to, scope) {
633
+ if (!Array.isArray(methods) || !Ext.isObject(from) || !Ext.isObject(to)) {
634
+ return;
635
+ }
636
+ methods.forEach((name) => {
637
+ const method = from[name];
638
+ if (typeof method === 'function') {
639
+ to[name] = method.bind(scope || from);
640
+ }
641
+ });
642
+ },
623
643
  });
package/src/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  Ext.define('Coon.version', {
2
2
  singleton: true,
3
- number: '2.7.27',
3
+ number: '2.7.29',
4
4
  });