ru.coon 2.8.2 → 2.8.3

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,10 +1,21 @@
1
+ # Version 2.8.3, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/f2bd405e3421aa5e65c5c112ce39cd61806e1e09)
2
+ * update: CHANGELOG.md ([f52e7b], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/f52e7b66d3bb410cfe89272d0eccd0632d1c30e3))
3
+
1
4
  # Version 2.8.2, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/b2e3da084c82fa409dca30ef2388bab2f3ef267b)
5
+ * ## Features
6
+ * <span style='color:green'>feat: Added createFromString function. Related to BFL-15767.</span> ([cea621], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/cea6218e44b5768116718379e25cc52706ef8a75))
7
+
2
8
  * ## Fixes
9
+ * <span style='color:red'> Разрешены html теги в колонке "Описание". Related to BFL-13996.</span> ([8a1793], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/8a1793a93a87dcb10f92d854d491c31aefcd2563))
3
10
  * <span style='color:red'> TR-69409 исправление проверки значения свойства successMessage в ExecuteCommandPlugin</span> ([b77390], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/b77390cabfdbdf3ad837c896b805a4bc7e5e92f3))
4
11
 
12
+ * ([Update], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/Update Function.js35da450c2734c57db4cc7bd13380f6da400a9a96))
5
13
  * update: CHANGELOG.md ([ad61a8], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/ad61a8c449000e7b9ff6e921d39eecd97ddabea2))
6
14
 
7
15
  # Version 2.8.1, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/88c146ad577ce2a14d194c245e3d5151081af6af)
16
+ * ## Fixes
17
+ * <span style='color:red'> HT-9264 CoonChart lite fix</span> ([d8e2d7], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/d8e2d7a5994649ea9707fd6e901d1201813bbc36))
18
+
8
19
  * add unconditional versioning ([187668], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/187668ff86c8e91b440ce9b8a1052a191a7989d6))
9
20
  * update: CHANGELOG.md ([8386a7], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/8386a79fae89b882f1a3baf81849bb08ffd7a298))
10
21
 
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "name": "ru.coon"
5
5
  },
6
6
  "description": "",
7
- "version": "2.8.2",
7
+ "version": "2.8.3",
8
8
  "repository": {
9
9
  "type": "git",
10
10
  "url": "git+http://gitlab-dbr.sigma-it.local/dbr/ru.coon"
package/src/Function.js CHANGED
@@ -783,4 +783,23 @@ Ext.define('Coon.Function', {
783
783
  beforeRequest(requestOptions, requestHash) {
784
784
  return this.debounceRequest(requestOptions, requestHash);
785
785
  },
786
+
787
+ /**
788
+ * Создает функцию из строки с определением функции.
789
+ * @param fnText
790
+ * @returns {Function | undefined}
791
+ * @throws {Error}
792
+ */
793
+ createFromString(fnText = '') {
794
+ if (typeof fnText === 'string' && fnText.startsWith('function')) {
795
+ // Extract the function body
796
+ const fnBody = fnText.slice(fnText.indexOf('{') + 1, fnText.lastIndexOf('}')).trim();
797
+
798
+ // Extract the parameter names
799
+ const argsMatch = fnText.match(/\(([^)]*)\)/);
800
+ const argNames = argsMatch ? argsMatch[1].split(',').map((arg) => arg.trim()) : [];
801
+
802
+ return new Function(...argNames, fnBody);
803
+ }
804
+ },
786
805
  });
@@ -246,8 +246,8 @@ Ext.define('Coon.chart.editor.CoonChartEditorController', {
246
246
  // vm.set('coonChart.propertyData', JSON.stringify(coonChart.propertyData));
247
247
  const validation = await this.validate();
248
248
  if (validation.state) {
249
- const commandName = vm.get('mode') === 'EDIT' ? 'SaveUIElementCommand' : 'AddUIElementCommand';
250
- const command = Ext.create('command.' + commandName, {activeComponent: this.getView()});
249
+ // const commandName = vm.get('mode') === 'EDIT' ? 'SaveUIElementCommand' : 'AddUIElementCommand';
250
+ const command = Ext.create('command.SaveUIElementCommand', {activeComponent: this.getView()});
251
251
  command.on('complete', function(coonChartBean) {
252
252
  vm.set('editorMode', 'edit');
253
253
  }, this);
@@ -48,9 +48,9 @@ Ext.define('Coon.chart.editor.DataSourceChartBindForm', {
48
48
  },
49
49
 
50
50
  loadReportFields(data) {
51
- const fields = data.map((r) => r.description);
51
+ // const fields = data.map((r) => r.description);
52
52
  this.links.form.removeAll();
53
- fields.forEach((field) => {
53
+ data.forEach((field) => {
54
54
  this.links.form.add({
55
55
  xtype: 'panel',
56
56
  margin: 4,
@@ -61,12 +61,12 @@ Ext.define('Coon.chart.editor.DataSourceChartBindForm', {
61
61
  pack: 'center',
62
62
  },
63
63
  items: [
64
- {xtype: 'displayfield', value: field, width: 130, fieldStyle: 'text-align: right'},
64
+ {xtype: 'displayfield', value: field.description, width: 130, fieldStyle: 'text-align: right'},
65
65
  {
66
66
  xtype: 'combo',
67
- itemId: field,
67
+ itemId: field.reportFieldCd,
68
68
  maxWidth: 350,
69
- reference: field,
69
+ reference: field.reportFieldCd,
70
70
  flex: 1,
71
71
  displayField: 'name',
72
72
  valueField: 'value',
@@ -80,7 +80,7 @@ Ext.define('Coon.chart.editor.DataSourceChartBindForm', {
80
80
  // ],
81
81
  // },
82
82
  bind: {
83
- value: `{coonChart.fieldset.${field}}`,
83
+ value: `{coonChart.fieldset.${field.reportFieldCd}}`,
84
84
  store: '{comboStore}',
85
85
  },
86
86
  listeners: {
@@ -114,14 +114,14 @@ Ext.define('Coon.chart.editor.DataSourceChartBindForm', {
114
114
  // },
115
115
  {
116
116
  xtype: 'textfield',
117
- itemId: `${field}_defval`,
117
+ itemId: `${field.reportFieldCd}_defval`,
118
118
  fieldLabel: 'default',
119
119
  tooltip: 'значение по умолчанию(если получили пустое)',
120
120
  width: 100,
121
121
  disabled: true,
122
122
  bind: {
123
- value: `{coonChart.fieldDefaults.${field}}`,
124
- disabled: `{!coonChart.fieldset.${field}}`,
123
+ value: `{coonChart.fieldDefaults.${field.reportFieldCd}}`,
124
+ disabled: `{!coonChart.fieldset.${field.reportFieldCd}}`,
125
125
  },
126
126
  listeners: {
127
127
  disable: function(field) {
@@ -131,20 +131,20 @@ Ext.define('Coon.chart.editor.DataSourceChartBindForm', {
131
131
  },
132
132
  {
133
133
  xtype: 'displayfield',
134
- itemId: `${field}_alertMsg`,
134
+ itemId: `${field.reportFieldCd}_alertMsg`,
135
135
  fieldStyle: {
136
136
  color: 'red',
137
137
  },
138
138
  tooltip: 'уведомление о некорректных данных',
139
139
  flex: 1,
140
140
  bind: {
141
- value: `{fieldAlerts.${field}}`,
141
+ value: `{fieldAlerts.${field.reportFieldCd}}`,
142
142
  },
143
143
  }
144
144
  ],
145
145
  });
146
146
  });
147
- this.links.grid.reconfigure(null, fields.map((key) => ({dataIndex: key, text: `${key}`, flex: 1})));
147
+ this.links.grid.reconfigure(null, data.map((key) => ({dataIndex: `${key.reportFieldCd}`, text: `${key.description}`, flex: 1})));
148
148
  },
149
149
 
150
150
  loadData(rows) {
@@ -123,6 +123,7 @@ Ext.define('Coon.report.component.settings.field.ReportFormFieldsGrid', {
123
123
  editor: {
124
124
  xtype: 'textfield',
125
125
  allowBlank: false,
126
+ vtype: false,
126
127
  },
127
128
  },
128
129
  {
package/src/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  Ext.define('Coon.version', {
2
2
  singleton: true,
3
- number: '2.8.2',
3
+ number: '2.8.3',
4
4
  });