@formio/bootstrap3
Advanced tools
Comparing version 1.1.6 to 2.0.0
@@ -10,3 +10,3 @@ Object.defineProperty(exports, "__esModule", { | ||
__p += '\n ' + | ||
((__t = ( ctx.render('label', ctx) )) == null ? '' : __t) + | ||
((__t = ( ctx.labelMarkup )) == null ? '' : __t) + | ||
'\n'; | ||
@@ -24,14 +24,6 @@ } ; | ||
if (!ctx.label.hidden && ctx.label.labelPosition === 'bottom') { ; | ||
__p += '\n <label class="control-label ' + | ||
((__t = (ctx.label.className)) == null ? '' : __t) + | ||
'">\n ' + | ||
((__t = (ctx.t(ctx.component.label))) == null ? '' : __t) + | ||
'\n '; | ||
if (ctx.component.tooltip) { ; | ||
__p += '\n <i ref="tooltip" class="' + | ||
((__t = (ctx.iconClass('question-sign'))) == null ? '' : __t) + | ||
' text-muted"></i>\n '; | ||
__p += '\n ' + | ||
((__t = ( ctx.labelMarkup )) == null ? '' : __t) + | ||
'\n'; | ||
} ; | ||
__p += '\n </label>\n'; | ||
} ; | ||
__p += '\n'; | ||
@@ -38,0 +30,0 @@ if (ctx.component.description) { ; |
@@ -8,8 +8,8 @@ Object.defineProperty(exports, "__esModule", { | ||
if (!ctx.component.image) { ; | ||
__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 '; | ||
if (!ctx.self.imageUpload) { ; | ||
__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 '; | ||
if (!ctx.disabled) { ; | ||
__p += '\n <div class="col-md-1"></div>\n '; | ||
__p += '\n <div class="col-md-1"></div>\n '; | ||
} ; | ||
__p += '\n <div class="col-md-'; | ||
__p += '\n <div class="col-md-'; | ||
if (ctx.self.hasTypes) { ; | ||
@@ -22,37 +22,43 @@ __p += '7'; | ||
((__t = (ctx.t('File Name'))) == null ? '' : __t) + | ||
'</strong></div>\n <div class="col-md-2"><strong>' + | ||
'</strong></div>\n <div class="col-md-2"><strong>' + | ||
((__t = (ctx.t('Size'))) == null ? '' : __t) + | ||
'</strong></div>\n '; | ||
'</strong></div>\n '; | ||
if (ctx.self.hasTypes) { ; | ||
__p += '\n <div class="col-md-2"><strong>' + | ||
__p += '\n <div class="col-md-2"><strong>' + | ||
((__t = (ctx.t('Type'))) == null ? '' : __t) + | ||
'</strong></div>\n '; | ||
'</strong></div>\n '; | ||
} ; | ||
__p += '\n </div>\n </li>\n '; | ||
__p += '\n </div>\n </li>\n '; | ||
ctx.files.forEach(function(file) { ; | ||
__p += '\n <li class="list-group-item">\n <div class="row">\n '; | ||
__p += '\n <li class="list-group-item">\n <div class="row">\n '; | ||
if (!ctx.disabled) { ; | ||
__p += '\n <div class="col-md-1"><i class="' + | ||
__p += '\n <div class="col-md-1"><i class="' + | ||
((__t = (ctx.iconClass('remove'))) == null ? '' : __t) + | ||
'" ref="removeLink"></i></div>\n '; | ||
'" ref="removeLink"></i></div>\n '; | ||
} ; | ||
__p += '\n <div class="col-md-9">\n '; | ||
__p += '\n <div class="col-md-'; | ||
if (ctx.self.hasTypes) { ; | ||
__p += '7'; | ||
} else { ; | ||
__p += '9'; | ||
} ; | ||
__p += '">\n '; | ||
if (ctx.component.uploadOnly) { ; | ||
__p += '\n ' + | ||
__p += '\n ' + | ||
((__t = (file.originalName || file.name)) == null ? '' : __t) + | ||
'\n '; | ||
'\n '; | ||
} else { ; | ||
__p += '\n <a href="' + | ||
((__t = (file.url)) == null ? '' : __t) + | ||
__p += '\n <a href="' + | ||
((__t = (file.url || '#')) == null ? '' : __t) + | ||
'" target="_blank" ref="fileLink">' + | ||
((__t = (file.originalName || file.name)) == null ? '' : __t) + | ||
'</a>\n '; | ||
'</a>\n '; | ||
} ; | ||
__p += '\n </div>\n <div class="col-md-2">' + | ||
__p += '\n </div>\n <div class="col-md-2">' + | ||
((__t = (ctx.fileSize(file.size))) == null ? '' : __t) + | ||
'</div>\n '; | ||
'</div>\n '; | ||
if (ctx.self.hasTypes) { ; | ||
__p += '\n <div class="col-md-2">\n <select class="file-type">\n '; | ||
__p += '\n <div class="col-md-2">\n <select class="file-type">\n '; | ||
ctx.component.fileTypes.map(function(type) { ; | ||
__p += '\n <option class="test" value="' + | ||
__p += '\n <option class="test" value="' + | ||
((__t = ( type.value )) == null ? '' : __t) + | ||
@@ -65,57 +71,57 @@ '" '; | ||
((__t = ( type.label )) == null ? '' : __t) + | ||
'</option>\n '; | ||
'</option>\n '; | ||
}); ; | ||
__p += '\n </select>\n </div>\n '; | ||
__p += '\n </select>\n </div>\n '; | ||
} ; | ||
__p += '\n </div>\n </li>\n '; | ||
__p += '\n </div>\n </li>\n '; | ||
}) ; | ||
__p += '\n</ul>\n'; | ||
__p += '\n </ul>\n'; | ||
} else { ; | ||
__p += '\n<div>\n '; | ||
__p += '\n <div>\n '; | ||
ctx.files.forEach(function(file) { ; | ||
__p += '\n <div>\n <span>\n <img ref="fileImage" src="" alt="' + | ||
__p += '\n <div>\n <span>\n <img ref="fileImage" src="" alt="' + | ||
((__t = (file.originalName || file.name)) == null ? '' : __t) + | ||
'" style="width:' + | ||
((__t = (ctx.component.imageSize)) == null ? '' : __t) + | ||
'px" />\n '; | ||
'px">\n '; | ||
if (!ctx.disabled) { ; | ||
__p += '\n <i class="' + | ||
__p += '\n <i class="' + | ||
((__t = (ctx.iconClass('remove'))) == null ? '' : __t) + | ||
'" ref="removeLink"></i>\n '; | ||
'" ref="removeLink"></i>\n '; | ||
} ; | ||
__p += '\n </span>\n </div>\n '; | ||
__p += '\n </span>\n </div>\n '; | ||
}) ; | ||
__p += '\n</div>\n'; | ||
__p += '\n </div>\n'; | ||
} ; | ||
__p += '\n'; | ||
if (!ctx.disabled && (ctx.component.multiple || !ctx.files.length)) { ; | ||
__p += '\n<input type="file" style="opacity: 0; position: absolute;" tabindex="-1" ref="hiddenFileInputElement">\n'; | ||
__p += '\n '; | ||
if (ctx.self.useWebViewCamera) { ; | ||
__p += '\n<div class="fileSelector">\n <button class="btn btn-primary" ref="galleryButton"><i class="fa fa-book"></i> ' + | ||
__p += '\n <div class="fileSelector">\n <button class="btn btn-primary" ref="galleryButton"><i class="fa fa-book"></i> ' + | ||
((__t = (ctx.t('Gallery'))) == null ? '' : __t) + | ||
'</button>\n <button class="btn btn-primary" ref="cameraButton"><i class="fa fa-camera"></i> ' + | ||
'</button>\n <button class="btn btn-primary" ref="cameraButton"><i class="fa fa-camera"></i> ' + | ||
((__t = (ctx.t('Camera'))) == null ? '' : __t) + | ||
'</button>\n</div>\n'; | ||
'</button>\n </div>\n '; | ||
} else if (!ctx.self.cameraMode) { ; | ||
__p += '\n<div class="fileSelector" ref="fileDrop">\n <i class="' + | ||
__p += '\n <div class="fileSelector" ref="fileDrop">\n <i class="' + | ||
((__t = (ctx.iconClass('cloud-upload'))) == null ? '' : __t) + | ||
'"></i> ' + | ||
((__t = (ctx.t('Drop files to attach,'))) == null ? '' : __t) + | ||
'\n '; | ||
if (ctx.component.image) { ; | ||
__p += '\n <a href="#" ref="toggleCameraMode"><i class="fa fa-camera"></i> ' + | ||
'\n '; | ||
if (ctx.self.imageUpload) { ; | ||
__p += '\n <a href="#" ref="toggleCameraMode"><i class="fa fa-camera"></i> ' + | ||
((__t = (ctx.t('Use Camera,'))) == null ? '' : __t) + | ||
'</a>\n '; | ||
'</a>\n '; | ||
} ; | ||
__p += '\n ' + | ||
__p += '\n ' + | ||
((__t = (ctx.t('or'))) == null ? '' : __t) + | ||
' <a href="#" ref="fileBrowse" class="browse">' + | ||
((__t = (ctx.t('browse'))) == null ? '' : __t) + | ||
'</a>\n</div>\n'; | ||
'</a>\n </div>\n '; | ||
} else { ; | ||
__p += '\n<div>\n <video class="video" autoplay="true" ref="videoPlayer"></video>\n <canvas style="display: none" ref="videoCanvas"></canvas>\n</div>\n<button class="btn btn-primary" ref="takePictureButton"><i class="fa fa-camera"></i> ' + | ||
__p += '\n <div>\n <video class="video" autoplay="true" ref="videoPlayer"></video>\n </div>\n <button class="btn btn-primary" ref="takePictureButton"><i class="fa fa-camera"></i> ' + | ||
((__t = (ctx.t('Take Picture'))) == null ? '' : __t) + | ||
'</button>\n<button class="btn btn-primary" ref="toggleCameraMode">' + | ||
'</button>\n <button class="btn btn-primary" ref="toggleCameraMode">' + | ||
((__t = (ctx.t('Switch to file upload'))) == null ? '' : __t) + | ||
'</button>\n'; | ||
'</button>\n '; | ||
} ; | ||
@@ -126,60 +132,60 @@ __p += '\n'; | ||
ctx.statuses.forEach(function(status) { ; | ||
__p += '\n<div class="file ' + | ||
__p += '\n <div class="file ' + | ||
((__t = (ctx.statuses.status === 'error' ? ' has-error' : '')) == null ? '' : __t) + | ||
'">\n <div class="row">\n <div class="fileName control-label col-sm-10">' + | ||
'">\n <div class="row">\n <div class="fileName col-form-label col-sm-10">' + | ||
((__t = (status.originalName)) == null ? '' : __t) + | ||
' <i class="' + | ||
((__t = (ctx.iconClass('remove'))) == null ? '' : __t) + | ||
'" ref="fileStatusRemove"></i></div>\n <div class="fileSize control-label col-sm-2 text-right">' + | ||
'" ref="fileStatusRemove"></i></div>\n <div class="fileSize col-form-label col-sm-2 text-right">' + | ||
((__t = (ctx.fileSize(status.size))) == null ? '' : __t) + | ||
'</div>\n </div>\n <div class="row">\n <div class="col-sm-12">\n '; | ||
'</div>\n </div>\n <div class="row">\n <div class="col-sm-12">\n '; | ||
if (status.status === 'progress') { ; | ||
__p += '\n <div class="progress">\n <div class="progress-bar" role="progressbar" aria-valuenow="' + | ||
__p += '\n <div class="progress">\n <div class="progress-bar" role="progressbar" aria-valuenow="' + | ||
((__t = (status.progress)) == null ? '' : __t) + | ||
'" aria-valuemin="0" aria-valuemax="100" style="width: ' + | ||
((__t = (status.progress)) == null ? '' : __t) + | ||
'">\n <span class="sr-only">' + | ||
'">\n <span class="sr-only">' + | ||
((__t = (status.progress)) == null ? '' : __t) + | ||
'% ' + | ||
((__t = (ctx.t('Complete'))) == null ? '' : __t) + | ||
'</span>\n </div>\n </div>\n '; | ||
'</span>\n </div>\n </div>\n '; | ||
} else { ; | ||
__p += '\n <div class="bg-' + | ||
__p += '\n <div class="bg-' + | ||
((__t = (status.status)) == null ? '' : __t) + | ||
'">' + | ||
((__t = (ctx.t(status.message))) == null ? '' : __t) + | ||
'</div>\n '; | ||
'</div>\n '; | ||
} ; | ||
__p += '\n </div>\n </div>\n</div>\n'; | ||
__p += '\n </div>\n </div>\n </div>\n'; | ||
}) ; | ||
__p += '\n'; | ||
if (!ctx.component.storage || ctx.support.hasWarning) { ; | ||
__p += '\n<div class="alert alert-warning">\n '; | ||
__p += '\n <div class="alert alert-warning">\n '; | ||
if (!ctx.component.storage) { ; | ||
__p += '\n <p>' + | ||
__p += '\n <p>' + | ||
((__t = (ctx.t('No storage has been set for this field. File uploads are disabled until storage is set up.'))) == null ? '' : __t) + | ||
'</p>\n '; | ||
'</p>\n '; | ||
} ; | ||
__p += '\n '; | ||
__p += '\n '; | ||
if (!ctx.support.filereader) { ; | ||
__p += '\n <p>' + | ||
__p += '\n <p>' + | ||
((__t = (ctx.t('File API & FileReader API not supported.'))) == null ? '' : __t) + | ||
'</p>\n '; | ||
'</p>\n '; | ||
} ; | ||
__p += '\n '; | ||
__p += '\n '; | ||
if (!ctx.support.formdata) { ; | ||
__p += '\n <p>' + | ||
__p += '\n <p>' + | ||
((__t = (ctx.t("XHR2's FormData is not supported."))) == null ? '' : __t) + | ||
'</p>\n '; | ||
'</p>\n '; | ||
} ; | ||
__p += '\n '; | ||
__p += '\n '; | ||
if (!ctx.support.progress) { ; | ||
__p += '\n <p>' + | ||
__p += '\n <p>' + | ||
((__t = (ctx.t("XHR2's upload progress isn't supported."))) == null ? '' : __t) + | ||
'</p>\n '; | ||
'</p>\n '; | ||
} ; | ||
__p += '\n</div>\n'; | ||
__p += '\n </div>\n'; | ||
} ; | ||
__p += '\n'; | ||
return __p | ||
} |
{ | ||
"name": "@formio/bootstrap3", | ||
"version": "1.1.6", | ||
"version": "2.0.0", | ||
"description": "Bootstrap 3 templates for form.io", | ||
@@ -37,3 +37,3 @@ "main": "lib/index.js", | ||
"@types/mocha": "^5.2.7", | ||
"@types/node": "^12.12.17", | ||
"@types/node": "^13.1.8", | ||
"@types/sinon": "^7.5.1", | ||
@@ -45,11 +45,11 @@ "chai": "^4.2.0", | ||
"gulp-template": "^5.0.0", | ||
"mocha": "^6.2.2", | ||
"nyc": "^14.1.1", | ||
"mocha": "^7.0.0", | ||
"nyc": "^15.0.0", | ||
"pre-commit": "^1.2.2", | ||
"sinon": "^7.5.0", | ||
"ts-node": "^8.5.4", | ||
"sinon": "^8.1.1", | ||
"ts-node": "^8.6.2", | ||
"ts-sinon": "^1.0.24", | ||
"tslint": "^5.20.1", | ||
"typescript": "^3.7.3", | ||
"webpack": "^4.41.2", | ||
"tslint": "^6.0.0", | ||
"typescript": "^3.7.5", | ||
"webpack": "^4.41.5", | ||
"webpack-cli": "^3.3.10" | ||
@@ -56,0 +56,0 @@ }, |
77241
126
2221