formiojs-eorion 0.0.8 → 0.1.0

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/Formio.js CHANGED
@@ -1724,7 +1724,7 @@ Formio.projectUrlSet = false;
1724
1724
  Formio.plugins = [];
1725
1725
  Formio.cache = {};
1726
1726
  Formio.Providers = _providers.default;
1727
- Formio.version = '0.0.8';
1727
+ Formio.version = '0.1.0';
1728
1728
  Formio.pathType = '';
1729
1729
  Formio.events = new _EventEmitter.default();
1730
1730
  Formio.cdn = new _CDN.default();
@@ -139,11 +139,11 @@ var _default = [{
139
139
  }
140
140
  }
141
141
  }, {
142
- type: 'select',
142
+ type: 'textfield',
143
143
  key: 'page',
144
144
  label: 'Page',
145
145
  input: true,
146
- tooltip: 'Select the page of formio.',
146
+ tooltip: 'page resource id',
147
147
  dataSrc: 'values',
148
148
  weight: 140,
149
149
  conditional: {
@@ -152,60 +152,6 @@ var _default = [{
152
152
  var: 'data.action'
153
153
  }, 'openPage']
154
154
  }
155
- },
156
- data: {
157
- values: [{
158
- "value": 920,
159
- "label": "团队管理"
160
- }, {
161
- "value": 916,
162
- "label": "New Leads for Partner"
163
- }, {
164
- "value": 915,
165
- "label": "Partner Portal Account Assign"
166
- }, {
167
- "value": 914,
168
- "label": "Partner Application Review"
169
- }, {
170
- "value": 912,
171
- "label": "Partner Application"
172
- }, {
173
- "value": 888,
174
- "label": "Trial Survey"
175
- }, {
176
- "value": 887,
177
- "label": "Leads Followup"
178
- }, {
179
- "value": 886,
180
- "label": "New Leads"
181
- }, {
182
- "value": 884,
183
- "label": "Trial followup"
184
- }, {
185
- "value": 883,
186
- "label": "Review Contactus"
187
- }, {
188
- "value": 881,
189
- "label": "Contact us"
190
- }, {
191
- "value": 880,
192
- "label": "Trial Review"
193
- }, {
194
- "value": 878,
195
- "label": "Trial Application"
196
- }, {
197
- "value": 877,
198
- "label": "售前支持"
199
- }, {
200
- "value": 876,
201
- "label": "销售活动"
202
- }, {
203
- "value": 873,
204
- "label": "商机管理"
205
- }, {
206
- "value": 826,
207
- "label": "contact us"
208
- }]
209
155
  }
210
156
  }, {
211
157
  type: 'datagrid',
@@ -14,6 +14,8 @@ Object.defineProperty(exports, "__esModule", {
14
14
  value: true
15
15
  });
16
16
  exports.default = void 0;
17
+ require("core-js/modules/es.string.ends-with.js");
18
+ require("core-js/modules/es.array.concat.js");
17
19
  require("core-js/modules/es.array.iterator.js");
18
20
  require("core-js/modules/es.object.to-string.js");
19
21
  require("core-js/modules/es.string.iterator.js");
@@ -23,7 +25,7 @@ require("core-js/modules/web.url-search-params.js");
23
25
  require("core-js/modules/es.object.get-prototype-of.js");
24
26
  var _Button = _interopRequireDefault(require("../button/Button"));
25
27
  var _Field = _interopRequireDefault(require("../_classes/field/Field"));
26
- var _lodash = _interopRequireDefault(require("lodash"));
28
+ var _utils = require("../../utils/utils");
27
29
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
28
30
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
29
31
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
@@ -93,6 +95,13 @@ var FileDownload = /*#__PURE__*/function (_Component) {
93
95
  var result = xhr.response;
94
96
  var blob = new Blob([result]);
95
97
  var fileName = file.filename;
98
+ // 自动添加文件后缀
99
+ if (file.mimeType) {
100
+ var extension = (0, _utils.getExtensionFromMimeType)(file.mimeType);
101
+ if (extension && extension.length > 0 && !fileName.endsWith(extension)) {
102
+ fileName = "".concat(fileName, ".").concat(extension);
103
+ }
104
+ }
96
105
  var elink = document.createElement('a');
97
106
  elink.download = fileName;
98
107
  elink.style.display = 'none';