formiojs-eorion 0.1.39 → 0.1.41

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.
Files changed (37) hide show
  1. package/Formio.js +1 -1
  2. package/components/Data/editForm/Data.edit.display.js +2 -2
  3. package/components/builder.js +2 -0
  4. package/components/file_china_grid/File.form.js +36 -0
  5. package/components/file_china_grid/File.js +1018 -0
  6. package/components/file_china_grid/File.unit.js +175 -0
  7. package/components/file_china_grid/editForm/File.edit.data.js +11 -0
  8. package/components/file_china_grid/editForm/File.edit.display.js +11 -0
  9. package/components/file_china_grid/editForm/File.edit.file.js +257 -0
  10. package/components/file_china_grid/editForm/File.edit.validation.js +14 -0
  11. package/components/file_china_grid/fixtures/comp1.js +21 -0
  12. package/components/file_china_grid/fixtures/comp2.js +36 -0
  13. package/components/file_china_grid/fixtures/index.js +20 -0
  14. package/components/file_china_grid/fixtures/values.js +16 -0
  15. package/components/index.js +2 -0
  16. package/dist/formio.builder.css +38 -0
  17. package/dist/formio.builder.min.css +1 -1
  18. package/dist/formio.contrib.js +23 -2
  19. package/dist/formio.contrib.min.js +1 -1
  20. package/dist/formio.contrib.min.js.LICENSE.txt +1 -1
  21. package/dist/formio.embed.min.js.LICENSE.txt +1 -1
  22. package/dist/formio.form.js +92 -5
  23. package/dist/formio.form.min.js +1 -1
  24. package/dist/formio.form.min.js.LICENSE.txt +1 -1
  25. package/dist/formio.full.css +38 -0
  26. package/dist/formio.full.js +92 -5
  27. package/dist/formio.full.min.css +1 -1
  28. package/dist/formio.full.min.js +1 -1
  29. package/dist/formio.full.min.js.LICENSE.txt +1 -1
  30. package/dist/formio.js +1 -1
  31. package/dist/formio.min.js +1 -1
  32. package/dist/formio.min.js.LICENSE.txt +1 -1
  33. package/dist/formio.utils.min.js.LICENSE.txt +1 -1
  34. package/package.json +1 -1
  35. package/templates/bootstrap/fileUDS/form.ejs.js +227 -0
  36. package/templates/bootstrap/fileUDS/index.js +12 -0
  37. package/templates/bootstrap/index.js +3 -1
@@ -17,7 +17,7 @@
17
17
  MIT License: http://getify.mit-license.org
18
18
  */
19
19
 
20
- /*! formiojs v0.1.39 | https://unpkg.com/formiojs@0.1.39/LICENSE.txt */
20
+ /*! formiojs v0.1.41 | https://unpkg.com/formiojs@0.1.41/LICENSE.txt */
21
21
 
22
22
  /**
23
23
  * @license
@@ -17,7 +17,7 @@
17
17
  MIT License: http://getify.mit-license.org
18
18
  */
19
19
 
20
- /*! formiojs v0.1.39 | https://unpkg.com/formiojs@0.1.39/LICENSE.txt */
20
+ /*! formiojs v0.1.41 | https://unpkg.com/formiojs@0.1.41/LICENSE.txt */
21
21
 
22
22
  /**
23
23
  * @license
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "formiojs-eorion",
3
- "version": "0.1.39",
3
+ "version": "0.1.41",
4
4
  "description": "Common js library for client side interaction with <form.io>",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -0,0 +1,227 @@
1
+ Object.defineProperty(exports, "__esModule", {
2
+ value: true
3
+ });
4
+ exports.default=function(ctx) {
5
+ var __t, __p = '', __j = Array.prototype.join;
6
+ function print() { __p += __j.call(arguments, '') }
7
+
8
+ if (ctx.options.vpat) { ;
9
+ __p += '\n <span tabindex="-1" class="sr-only" id="invisible-' +
10
+ ((__t = (ctx.instance.id)) == null ? '' : __t) +
11
+ '-' +
12
+ ((__t = (ctx.component.key)) == null ? '' : __t) +
13
+ '"></span>\n';
14
+ } ;
15
+ __p += '\n';
16
+ if (!ctx.self.imageUpload) { ;
17
+ __p += '\n ';
18
+ if (ctx.options.vpat) { ;
19
+ __p += '\n <div>' +
20
+ ((__t = ((!ctx.component.filePattern || ctx.component.filePattern === '*') ? 'Any file types are allowed' : ctx.t('Allowed file types: ') + ctx.component.filePattern)) == null ? '' : __t) +
21
+ '</div>\n ';
22
+ } ;
23
+ __p += '\n <ul class="list-group list-group-striped">\n <li class="list-group-item list-group-header hidden-xs hidden-sm">\n <div class="row">\n ';
24
+ if (!ctx.disabled) { ;
25
+ __p += '\n <div class="col-md-1"></div>\n ';
26
+ } ;
27
+ __p += '\n <div class="col-md-';
28
+ if (ctx.self.hasTypes) { ;
29
+ __p += '7';
30
+ } else { ;
31
+ __p += '9';
32
+ } ;
33
+ __p += '"><strong>' +
34
+ ((__t = (ctx.t('File Name'))) == null ? '' : __t) +
35
+ '</strong></div>\n <div class="col-md-2"><strong>' +
36
+ ((__t = (ctx.t('Size'))) == null ? '' : __t) +
37
+ '</strong></div>\n ';
38
+ if (ctx.self.hasTypes) { ;
39
+ __p += '\n <div class="col-md-2"><strong>' +
40
+ ((__t = (ctx.t('Type'))) == null ? '' : __t) +
41
+ '</strong></div>\n ';
42
+ } ;
43
+ __p += '\n </div>\n </li>\n ';
44
+ ctx.files.forEach(function(file) { ;
45
+ __p += '\n <li class="list-group-item">\n <div class="row">\n ';
46
+ if (!ctx.disabled) { ;
47
+ __p += '\n <div class="col-md-1"><i tabindex="0" class="' +
48
+ ((__t = (ctx.iconClass('remove'))) == null ? '' : __t) +
49
+ '" ref="removeLink"></i></div>\n ';
50
+ } ;
51
+ __p += '\n <div class="col-md-';
52
+ if (ctx.self.hasTypes) { ;
53
+ __p += '7';
54
+ } else { ;
55
+ __p += '9';
56
+ } ;
57
+ __p += '">\n ';
58
+ if (ctx.component.uploadOnly) { ;
59
+ __p += '\n ' +
60
+ ((__t = (file.fileName)) == null ? '' : __t) +
61
+ '\n ';
62
+ } else { ;
63
+ __p += '\n ';
64
+ if (ctx.component.type==='fileUds'&&ctx.component.storage==='url') { ;
65
+ __p += '\n <a target="_blank" ref="fileLinkDiv">\n <span class="sr-only">' +
66
+ ((__t = (ctx.t('Press to open '))) == null ? '' : __t) +
67
+ '</span>' +
68
+ ((__t = (file.fileName || file.name)) == null ? '' : __t) +
69
+ '\n </a>\n ';
70
+ } ;
71
+ __p += '\n ';
72
+ } ;
73
+ __p += '\n </div>\n <div class="col-md-2">' +
74
+ ((__t = (ctx.fileSize(file.size))) == null ? '' : __t) +
75
+ '</div>\n ';
76
+ if (ctx.self.hasTypes && !ctx.disabled) { ;
77
+ __p += '\n <div class="col-md-2">\n <select class="file-type" ref="fileType">\n ';
78
+ ctx.component.fileTypes.map(function(type) { ;
79
+ __p += '\n <option class="test" value="' +
80
+ ((__t = ( type.value )) == null ? '' : __t) +
81
+ '" ';
82
+ if (type.label === file.fileType) { ;
83
+ __p += 'selected="selected"';
84
+ } ;
85
+ __p += '>' +
86
+ ((__t = (ctx.t(type.label))) == null ? '' : __t) +
87
+ '</option>\n ';
88
+ }); ;
89
+ __p += '\n </select>\n </div>\n ';
90
+ } ;
91
+ __p += '\n ';
92
+ if (ctx.self.hasTypes && ctx.disabled) { ;
93
+ __p += '\n <div class="col-md-2">' +
94
+ ((__t = (file.fileType)) == null ? '' : __t) +
95
+ '</div>\n ';
96
+ } ;
97
+ __p += '\n </div>\n </li>\n ';
98
+ }) ;
99
+ __p += '\n </ul>\n';
100
+ } else { ;
101
+ __p += '\n <div>\n ';
102
+ ctx.files.forEach(function(file) { ;
103
+ __p += '\n <div>\n <span>\n <img ref="fileImage" src="" alt="' +
104
+ ((__t = (file.fileName || file.name)) == null ? '' : __t) +
105
+ '" style="width:' +
106
+ ((__t = (ctx.component.imageSize)) == null ? '' : __t) +
107
+ 'px">\n ';
108
+ if (!ctx.disabled) { ;
109
+ __p += '\n <i tabindex="0" class="' +
110
+ ((__t = (ctx.iconClass('remove'))) == null ? '' : __t) +
111
+ '" ref="removeLink"></i>\n ';
112
+ } ;
113
+ __p += '\n </span>\n </div>\n ';
114
+ }) ;
115
+ __p += '\n </div>\n';
116
+ } ;
117
+ __p += '\n';
118
+ if (!ctx.disabled && (ctx.component.multiple || !ctx.files.length)) { ;
119
+ __p += '\n ';
120
+ if (ctx.self.useWebViewCamera) { ;
121
+ __p += '\n <div class="fileSelector">\n <button class="btn btn-primary" ref="galleryButton"><i class="fa fa-book"></i> ' +
122
+ ((__t = (ctx.t('Gallery'))) == null ? '' : __t) +
123
+ '</button>\n <button class="btn btn-primary" ref="cameraButton"><i class="fa fa-camera"></i> ' +
124
+ ((__t = (ctx.t('Camera'))) == null ? '' : __t) +
125
+ '</button>\n </div>\n ';
126
+ } else if (!ctx.self.cameraMode) { ;
127
+ __p += '\n <div class="fileSelector" ref="fileDrop" ' +
128
+ ((__t = (ctx.fileDropHidden ?'hidden' : '')) == null ? '' : __t) +
129
+ '>\n <i class="' +
130
+ ((__t = (ctx.iconClass('cloud-upload'))) == null ? '' : __t) +
131
+ '"></i> ' +
132
+ ((__t = (ctx.t('Drop files to attach,'))) == null ? '' : __t) +
133
+ '\n ';
134
+ if (ctx.self.imageUpload && ctx.component.webcam) { ;
135
+ __p += '\n <a href="#" ref="toggleCameraMode"><i class="fa fa-camera"></i> ' +
136
+ ((__t = (ctx.t('use camera'))) == null ? '' : __t) +
137
+ '</a>\n ';
138
+ } ;
139
+ __p += '\n ' +
140
+ ((__t = (ctx.t('or'))) == null ? '' : __t) +
141
+ '\n <a href="#" ref="fileBrowse" class="browse">\n ' +
142
+ ((__t = (ctx.t('browse'))) == null ? '' : __t) +
143
+ '\n <span class="sr-only">\n ' +
144
+ ((__t = (ctx.t('Browse to attach file for ' + ctx.component.label + '. ' +
145
+ (ctx.component.description ? ctx.component.description + '. ' : '') +
146
+ ((!ctx.component.filePattern || ctx.component.filePattern === '*') ? 'Any file types are allowed' : ctx.t('Allowed file types: ') + ctx.component.filePattern)))) == null ? '' : __t) +
147
+ '\n </span>\n </a>\n <div ref="fileProcessingLoader" class="loader-wrapper">\n <div class="loader text-center"></div>\n </div>\n </div>\n ';
148
+ } else { ;
149
+ __p += '\n <div class="video-container">\n <video class="video" autoplay="true" ref="videoPlayer" tabindex="-1"></video>\n </div>\n <button class="btn btn-primary" ref="takePictureButton"><i class="fa fa-camera"></i> ' +
150
+ ((__t = (ctx.t('Take Picture'))) == null ? '' : __t) +
151
+ '</button>\n <button class="btn btn-primary" ref="toggleCameraMode">' +
152
+ ((__t = (ctx.t('Switch to file upload'))) == null ? '' : __t) +
153
+ '</button>\n ';
154
+ } ;
155
+ __p += '\n';
156
+ } ;
157
+ __p += '\n';
158
+ ctx.statuses.forEach(function(status) { ;
159
+ __p += '\n <div class="file ' +
160
+ ((__t = (ctx.statuses.status === 'error' ? ' has-error' : '')) == null ? '' : __t) +
161
+ '">\n <div class="row">\n <div class="fileName col-form-label col-sm-10">' +
162
+ ((__t = (status.fileName)) == null ? '' : __t) +
163
+ '\n <i class="' +
164
+ ((__t = (ctx.iconClass('remove'))) == null ? '' : __t) +
165
+ '" ref="fileStatusRemove">\n <span class="sr-only">' +
166
+ ((__t = (ctx.t('Remove button. Press to remove ' + status.fileName || status.name + '.'))) == null ? '' : __t) +
167
+ '</span>\n <span class="sr-only">' +
168
+ ((__t = (status.message ? status.message.replace(';', '.') : '')) == null ? '' : __t) +
169
+ '</span>\n </i>\n </div>\n <div class="fileSize col-form-label col-sm-2 text-right">' +
170
+ ((__t = (ctx.fileSize(status.size))) == null ? '' : __t) +
171
+ '</div>\n </div>\n <div class="row">\n <div class="col-sm-12">\n ';
172
+ if (status.status === 'progress') { ;
173
+ __p += '\n <div class="progress">\n <div class="progress-bar" role="progressbar" aria-valuenow="' +
174
+ ((__t = (status.progress)) == null ? '' : __t) +
175
+ '" aria-valuemin="0" aria-valuemax="100" style="width: ' +
176
+ ((__t = (status.progress)) == null ? '' : __t) +
177
+ '%">\n <span class="sr-only">' +
178
+ ((__t = (status.progress)) == null ? '' : __t) +
179
+ '% ' +
180
+ ((__t = (ctx.t('Complete'))) == null ? '' : __t) +
181
+ '</span>\n </div>\n </div>\n ';
182
+ } else if (status.status === 'error') { ;
183
+ __p += '\n <div class="alert alert-danger bg-' +
184
+ ((__t = (status.status)) == null ? '' : __t) +
185
+ '">' +
186
+ ((__t = (ctx.t(status.message))) == null ? '' : __t) +
187
+ '</div>\n ';
188
+ } else { ;
189
+ __p += '\n <div class="bg-' +
190
+ ((__t = (status.status)) == null ? '' : __t) +
191
+ '">' +
192
+ ((__t = (ctx.t(status.message))) == null ? '' : __t) +
193
+ '</div>\n ';
194
+ } ;
195
+ __p += '\n </div>\n </div>\n </div>\n';
196
+ }) ;
197
+ __p += '\n';
198
+ if (!ctx.component.storage || ctx.support.hasWarning) { ;
199
+ __p += '\n <div class="alert alert-warning">\n ';
200
+ if (!ctx.component.storage) { ;
201
+ __p += '\n <p>' +
202
+ ((__t = (ctx.t('No storage has been set for this field. File uploads are disabled until storage is set up.'))) == null ? '' : __t) +
203
+ '</p>\n ';
204
+ } ;
205
+ __p += '\n ';
206
+ if (!ctx.support.filereader) { ;
207
+ __p += '\n <p>' +
208
+ ((__t = (ctx.t('File API & FileReader API not supported.'))) == null ? '' : __t) +
209
+ '</p>\n ';
210
+ } ;
211
+ __p += '\n ';
212
+ if (!ctx.support.formdata) { ;
213
+ __p += '\n <p>' +
214
+ ((__t = (ctx.t("XHR2's FormData is not supported."))) == null ? '' : __t) +
215
+ '</p>\n ';
216
+ } ;
217
+ __p += '\n ';
218
+ if (!ctx.support.progress) { ;
219
+ __p += '\n <p>' +
220
+ ((__t = (ctx.t("XHR2's upload progress isn't supported."))) == null ? '' : __t) +
221
+ '</p>\n ';
222
+ } ;
223
+ __p += '\n </div>\n';
224
+ } ;
225
+ __p += '\n';
226
+ return __p
227
+ }
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _form = _interopRequireDefault(require("./form.ejs"));
8
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
9
+ var _default = {
10
+ form: _form.default
11
+ };
12
+ exports.default = _default;
@@ -87,6 +87,7 @@ var _echarts = _interopRequireDefault(require("./echarts"));
87
87
  var _iconButton = _interopRequireDefault(require("./iconButton"));
88
88
  var _dataSource = _interopRequireDefault(require("./dataSource"));
89
89
  var _buttonGroups = _interopRequireDefault(require("./buttonGroups"));
90
+ var _fileUDS = _interopRequireDefault(require("./fileUDS"));
90
91
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
91
92
  var _default = {
92
93
  transform: function transform(type, text) {
@@ -181,6 +182,7 @@ var _default = {
181
182
  echarts: _echarts.default,
182
183
  iconButton: _iconButton.default,
183
184
  dataSource: _dataSource.default,
184
- buttonGroups: _buttonGroups.default
185
+ buttonGroups: _buttonGroups.default,
186
+ fileUDS: _fileUDS.default
185
187
  };
186
188
  exports.default = _default;