@formio/js 5.0.1-rc.4 → 5.0.2-rc.1
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/dist/formio.embed.js +1 -1
- package/dist/formio.embed.min.js +1 -1
- package/dist/formio.embed.min.js.LICENSE.txt +1 -1
- package/dist/formio.form.js +8 -8
- package/dist/formio.form.min.js +1 -1
- package/dist/formio.form.min.js.LICENSE.txt +1 -1
- package/dist/formio.full.js +8 -8
- package/dist/formio.full.min.js +1 -1
- package/dist/formio.full.min.js.LICENSE.txt +1 -1
- package/dist/formio.js +2 -2
- package/dist/formio.min.js +1 -1
- package/dist/formio.min.js.LICENSE.txt +1 -1
- package/dist/formio.utils.min.js.LICENSE.txt +1 -1
- package/lib/cjs/Embed.js +1 -1
- package/lib/cjs/Formio.js +1 -1
- package/lib/mjs/Embed.js +1 -1
- package/lib/mjs/Formio.js +1 -1
- package/package.json +3 -3
@@ -27,7 +27,7 @@
|
|
27
27
|
|
28
28
|
/*! @license DOMPurify 3.1.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.6/LICENSE */
|
29
29
|
|
30
|
-
/*! formiojs v5.0.
|
30
|
+
/*! formiojs v5.0.2-rc.1 | https://unpkg.com/formiojs@5.0.2-rc.1/LICENSE.txt */
|
31
31
|
|
32
32
|
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
33
33
|
|
package/dist/formio.full.js
CHANGED
@@ -8530,7 +8530,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\ncons
|
|
8530
8530
|
\************************************************************************************************/
|
8531
8531
|
/***/ (function(__unused_webpack_module, exports) {
|
8532
8532
|
|
8533
|
-
eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"]=function(ctx) {\nvar __t, __p = '', __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n__p += '<div class=\"formio-component-modal-wrapper formio-component-modal-wrapper-' +\n((__t = ( ctx.component.type )) == null ? '' : __t) +\n'\" ref=\"componentModalWrapper\">\\n <div ref=\"openModalWrapper\"></div>\\n <div class=\"formio-dialog formio-dialog-theme-default component-rendering-hidden\" ref=\"modalWrapper\">\\n <div class=\"formio-dialog-overlay\" ref=\"modalOverlay\"></div>\\n <div class=\"formio-dialog-content\" aria-labelledby=\"ml-' +\n((__t = (ctx.instance.id)) == null ? '' : __t) +\n'-' +\n((__t = (ctx.component.key)) == null ? '' : __t) +\n'\" ';\n if (!ctx.self.isIE()) { ;\n__p += ' role=\"dialog\" ';\n } ;\n__p += ' ref=\"modalContents\">\\n <label class=\"visually-hidden\" id=\"ml-' +\n((__t = (ctx.instance.id)) == null ? '' : __t) +\n'-' +\n((__t = (ctx.component.key)) == null ? '' : __t) +\n'\">' +\n((__t = ( ctx.t(ctx.component.label) )) == null ? '' : __t) +\n'' +\n((__t = (ctx.self.isIE() ? ', dialog' : '')) == null ? '' : __t) +\n'</label>\\n ';\n if (ctx.options.vpat) { ;\n__p += '\\n <button class=\"formio-dialog-close float-end\" title=\"Close\" aria-label=\"Close button. Click to get back to the form\" ref=\"modalCloseButton\"></button>\\n ';\n } else { ;\n__p += '\\n <button class=\"formio-dialog-close float-end btn btn-secondary btn-sm\" aria-label=\"Close button. Click to get back to the form\" ref=\"modalClose\"></button>\\n ';\n } ;\n__p += '\\n <div ref=\"
|
8533
|
+
eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"]=function(ctx) {\nvar __t, __p = '', __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n__p += '<div class=\"formio-component-modal-wrapper formio-component-modal-wrapper-' +\n((__t = ( ctx.component.type )) == null ? '' : __t) +\n'\" ref=\"componentModalWrapper\">\\n <div ref=\"openModalWrapper\"></div>\\n <div class=\"formio-dialog formio-dialog-theme-default component-rendering-hidden\" ref=\"modalWrapper\">\\n <div class=\"formio-dialog-overlay\" ref=\"modalOverlay\"></div>\\n <div class=\"formio-dialog-content\" aria-labelledby=\"ml-' +\n((__t = (ctx.instance.id)) == null ? '' : __t) +\n'-' +\n((__t = (ctx.component.key)) == null ? '' : __t) +\n'\" ';\n if (!ctx.self.isIE()) { ;\n__p += ' role=\"dialog\" ';\n } ;\n__p += ' ref=\"modalContents\">\\n <label class=\"visually-hidden\" id=\"ml-' +\n((__t = (ctx.instance.id)) == null ? '' : __t) +\n'-' +\n((__t = (ctx.component.key)) == null ? '' : __t) +\n'\">' +\n((__t = ( ctx.t(ctx.component.label) )) == null ? '' : __t) +\n'' +\n((__t = (ctx.self.isIE() ? ', dialog' : '')) == null ? '' : __t) +\n'</label>\\n ';\n if (ctx.options.vpat) { ;\n__p += '\\n <button class=\"formio-dialog-close float-end\" title=\"Close\" aria-label=\"Close button. Click to get back to the form\" ref=\"modalCloseButton\"></button>\\n ';\n } else { ;\n__p += '\\n <button class=\"formio-dialog-close float-end btn btn-secondary btn-sm\" aria-label=\"Close button. Click to get back to the form\" ref=\"modalClose\"></button>\\n ';\n } ;\n__p += '\\n <div ref=\"modalContent\">\\n ';\n if (ctx.visible) { ;\n__p += '\\n <div ref=\"componentContent\">' +\n((__t = (ctx.children)) == null ? '' : __t) +\n'</div>\\n ';\n } ;\n__p += '\\n <div class=\"formio-dialog-buttons\">\\n ';\n if (ctx.options.vpat) { ;\n__p += '\\n <button class=\"btn btn-secondary formio-dialog-button\" aria-label=\"Cancel button. Click to cancel the changes and get back to the form.\" ref=\"modalClose\">' +\n((__t = (ctx.t('Cancel'))) == null ? '' : __t) +\n'</button>\\n ';\n } ;\n__p += '\\n <button class=\"btn btn-success formio-dialog-button\" ref=\"modalSave\" aria-label=\"Save button. Click to save the changes and get back to the form.\">' +\n((__t = (ctx.t('Save'))) == null ? '' : __t) +\n'</button>\\n </div>\\n </div>\\n </div>\\n <span class=\"visually-hidden\" ref=\"modalLiveRegion\" aria-live=\"assertive\"></span>\\n </div>\\n</div>\\n';\nreturn __p\n}\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/bootstrap/lib/cjs/templates/bootstrap5/componentModal/form.ejs.js?");
|
8534
8534
|
|
8535
8535
|
/***/ }),
|
8536
8536
|
|
@@ -8656,7 +8656,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\ncons
|
|
8656
8656
|
\****************************************************************************************/
|
8657
8657
|
/***/ (function(__unused_webpack_module, exports) {
|
8658
8658
|
|
8659
|
-
eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"]=function(ctx) {\nvar __t, __p = '';\n__p += '<div class=\"formio-dialog formio-dialog-theme-default component-settings\">\\n <div class=\"formio-dialog-overlay\" ref=\"dialogOverlay\"></div>\\n <div class=\"formio-dialog-content\" ref=\"dialogContents\" role=\"dialog\">\\n <div ref=\"dialogContents\"></div>\\n <button class=\"formio-dialog-close float-end btn-sm\"
|
8659
|
+
eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"]=function(ctx) {\nvar __t, __p = '';\n__p += '<div class=\"formio-dialog formio-dialog-theme-default component-settings\">\\n <div class=\"formio-dialog-overlay\" ref=\"dialogOverlay\"></div>\\n <div class=\"formio-dialog-content\" ref=\"dialogContents\" role=\"dialog\">\\n <div ref=\"dialogContents\"></div>\\n <button class=\"formio-dialog-close float-end btn-sm\" aria-label=\"Close modal window.\" ref=\"dialogClose\"></button>\\n </div>\\n</div>\\n';\nreturn __p\n}\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/bootstrap/lib/cjs/templates/bootstrap5/dialog/form.ejs.js?");
|
8660
8660
|
|
8661
8661
|
/***/ }),
|
8662
8662
|
|
@@ -8812,7 +8812,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\ncons
|
|
8812
8812
|
\**************************************************************************************/
|
8813
8813
|
/***/ (function(__unused_webpack_module, exports) {
|
8814
8814
|
|
8815
|
-
eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"]=function(ctx) {\nvar __t, __p = '', __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n\n if (ctx.options.vpat) { ;\n__p += '\\n <span tabindex=\"-1\" class=\"visually-hidden\" id=\"invisible-' +\n((__t = (ctx.instance.id)) == null ? '' : __t) +\n'-' +\n((__t = (ctx.component.key)) == null ? '' : __t) +\n'\"></span>\\n';\n } ;\n__p += '\\n';\n if (!ctx.self.imageUpload) { ;\n__p += '\\n ';\n if (ctx.options.vpat) { ;\n__p += '\\n <div>' +\n((__t = ((!ctx.component.filePattern || ctx.component.filePattern === '*') ? 'Any file types are allowed' : ctx.t('Allowed file types: ') + ctx.component.filePattern)) == null ? '' : __t) +\n'</div>\\n ';\n } ;\n__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 <div class=\"col-md-' +\n((__t = (ctx.columns.name)) == null ? '' : __t) +\n'\"><strong>' +\n((__t = (ctx.t('File Name'))) == null ? '' : __t) +\n'</strong></div>\\n <div class=\"col-md-' +\n((__t = (ctx.columns.size)) == null ? '' : __t) +\n'\"><strong>' +\n((__t = (ctx.t('Size'))) == null ? '' : __t) +\n'</strong></div>\\n ';\n if (ctx.self.hasTypes) { ;\n__p += '\\n <div class=\"col-md-' +\n((__t = (ctx.columns.type)) == null ? '' : __t) +\n'\"><strong>' +\n((__t = (ctx.t('Type'))) == null ? '' : __t) +\n'</strong></div>\\n ';\n } ;\n__p += '\\n <div class=\"col-md-' +\n((__t = (ctx.columns.actions)) == null ? '' : __t) +\n' justify-center\">\\n ';\n if (ctx.showSyncButton) { ;\n__p += '\\n <button\\n class=\"btn btn-primary btn-sm\"\\n ref=\"syncNow\"\\n ';\n if (ctx.disabled || ctx.isSyncing) { ;\n__p += 'disabled=true';\n } ;\n__p += '\\n >' +\n((__t = (ctx.isSyncing ? ctx.t('Syncing...') : ctx.t('Sync Now'))) == null ? '' : __t) +\n'</button>\\n ';\n } ;\n__p += '\\n </div>\\n </div>\\n </li>\\n ';\n ctx.files.forEach(function(file) { ;\n__p += '\\n <li class=\"list-group-item\">\\n <div class=\"row\">\\n <div class=\"col-md-' +\n((__t = (ctx.columns.name)) == null ? '' : __t) +\n'\">\\n ';\n if (ctx.component.uploadOnly) { ;\n__p += '\\n ' +\n((__t = (file.originalName || file.name)) == null ? '' : __t) +\n'\\n ';\n } else { ;\n__p += '\\n <a href=\"' +\n((__t = (file.url || '#')) == null ? '' : __t) +\n'\" target=\"_blank\" ref=\"fileLink\">\\n <span class=\"visually-hidden\">' +\n((__t = (ctx.t('Press to open '))) == null ? '' : __t) +\n'</span>' +\n((__t = (file.originalName || file.name)) == null ? '' : __t) +\n'\\n </a>\\n ';\n } ;\n__p += '\\n </div>\\n <div class=\"col-md-' +\n((__t = (ctx.columns.size)) == null ? '' : __t) +\n'\">' +\n((__t = (ctx.fileSize(file.size))) == null ? '' : __t) +\n'</div>\\n ';\n if (ctx.self.hasTypes && !ctx.disabled) { ;\n__p += '\\n <div class=\"col-md-' +\n((__t = (ctx.columns.type)) == null ? '' : __t) +\n'\">\\n <select class=\"file-type\" ref=\"fileType\">\\n ';\n ctx.component.fileTypes.map(function(type) { ;\n__p += '\\n <option class=\"test\" value=\"' +\n((__t = ( type.value )) == null ? '' : __t) +\n'\" ';\n if (type.label === file.fileType) { ;\n__p += 'selected=\"selected\"';\n } ;\n__p += '>' +\n((__t = (ctx.t(type.label))) == null ? '' : __t) +\n'</option>\\n ';\n }); ;\n__p += '\\n </select>\\n </div>\\n ';\n } ;\n__p += '\\n ';\n if (ctx.self.hasTypes && ctx.disabled) { ;\n__p += '\\n <div class=\"col-md-' +\n((__t = (ctx.columns.type)) == null ? '' : __t) +\n'\">' +\n((__t = (file.fileType)) == null ? '' : __t) +\n'</div>\\n ';\n } ;\n__p += '\\n ';\n if (!ctx.disabled) { ;\n__p += '\\n <div class=\"col-md-' +\n((__t = (ctx.columns.actions)) == null ? '' : __t) +\n' justify-center\"><i tabindex=\"0\" class=\"' +\n((__t = (ctx.iconClass('remove'))) == null ? '' : __t) +\n'\" ref=\"removeLink\"></i></div>\\n ';\n } ;\n__p += '\\n </div>\\n </li>\\n ';\n }) ;\n__p += '\\n ';\n ctx.filesToDelete.forEach(function(file) { ;\n__p += '\\n <li class=\"list-group-item\">\\n <div class=\"row align-center\">\\n <div class=\"col-md-' +\n((__t = (ctx.columns.name)) == null ? '' : __t) +\n'\">\\n <div>' +\n((__t = (file.originalName || file.name)) == null ? '' : __t) +\n'</div>\\n <div class=\"status text-' +\n((__t = (file.status === 'error' ? 'danger': file.status)) == null ? '' : __t) +\n'\">' +\n((__t = (ctx.t(file.message))) == null ? '' : __t) +\n'</div>\\n </div>\\n <div class=\"col-md-' +\n((__t = (ctx.columns.size)) == null ? '' : __t) +\n'\">' +\n((__t = (ctx.fileSize(file.size))) == null ? '' : __t) +\n'</div>\\n ';\n if (ctx.self.hasTypes) { ;\n__p += '\\n <div class=\"col-md-' +\n((__t = (ctx.columns.type)) == null ? '' : __t) +\n'\">\\n <select class=\"file-type\" ref=\"fileType\">\\n ';\n ctx.component.fileTypes.map(function(type) { ;\n__p += '\\n <option class=\"test\" value=\"' +\n((__t = ( type.value )) == null ? '' : __t) +\n'\" ';\n if (type.label === file.fileType) { ;\n__p += 'selected=\"selected\"';\n } ;\n__p += '>' +\n((__t = (ctx.t(type.label))) == null ? '' : __t) +\n'</option>\\n ';\n }); ;\n__p += '\\n </select>\\n </div>\\n ';\n } ;\n__p += '\\n ';\n if (!ctx.isSyncing && file.status !== 'success') { ;\n__p += '\\n <div class=\"col-md-' +\n((__t = (ctx.columns.actions)) == null ? '' : __t) +\n' justify-center\"><i tabindex=\"0\" class=\"' +\n((__t = (ctx.iconClass('arrow-counterclockwise'))) == null ? '' : __t) +\n'\" ref=\"restoreFile\"></i></div>\\n ';\n } ;\n__p += '\\n </div>\\n </li>\\n ';\n }) ;\n__p += '\\n ';\n ctx.filesToUpload.forEach(function(file) { ;\n__p += '\\n <li class=\"list-group-item\">\\n <div class=\"row align-center\">\\n <div class=\"col-md-' +\n((__t = (ctx.columns.name)) == null ? '' : __t) +\n'\">\\n <div>' +\n((__t = (file.originalName || file.name)) == null ? '' : __t) +\n'</div>\\n ';\n if (file.status === 'progress') { ;\n__p += '\\n <div class=\"status progress\">\\n <div id=\"' +\n((__t = (file.id)) == null ? '' : __t) +\n'\" class=\"progress-bar\" role=\"progressbar\" aria-valuenow=\"' +\n((__t = (file.progress)) == null ? '' : __t) +\n'\" aria-valuemin=\"0\" aria-valuemax=\"100\" style=\"width: ' +\n((__t = (file.progress)) == null ? '' : __t) +\n'%\" ref=\"progress\">\\n <span class=\"visually-hidden\">' +\n((__t = (file.progress)) == null ? '' : __t) +\n'% ' +\n((__t = (ctx.t('Complete'))) == null ? '' : __t) +\n'</span>\\n </div>\\n </div>\\n ';\n } else { ;\n__p += '\\n <div class=\"status text-' +\n((__t = (file.status === 'error' ? 'danger': file.status)) == null ? '' : __t) +\n'\">' +\n((__t = (ctx.t(file.message))) == null ? '' : __t) +\n'</div>\\n ';\n } ;\n__p += '\\n </div>\\n <div class=\"col-md-' +\n((__t = (ctx.columns.size)) == null ? '' : __t) +\n'\">' +\n((__t = (ctx.fileSize(file.size))) == null ? '' : __t) +\n'</div>\\n ';\n if (ctx.self.hasTypes) { ;\n__p += '\\n <div class=\"col-md-' +\n((__t = (ctx.columns.type)) == null ? '' : __t) +\n'\">\\n <select class=\"file-type\" ref=\"fileType\">\\n ';\n ctx.component.fileTypes.map(function(type) { ;\n__p += '\\n <option class=\"test\" value=\"' +\n((__t = ( type.value )) == null ? '' : __t) +\n'\" ';\n if (type.label === file.fileType) { ;\n__p += 'selected=\"selected\"';\n } ;\n__p += '>' +\n((__t = (ctx.t(type.label))) == null ? '' : __t) +\n'</option>\\n ';\n }); ;\n__p += '\\n </select>\\n </div>\\n ';\n } ;\n__p += '\\n ';\n if (file.status === 'progress') { ;\n__p += '\\n <div class=\"col-md-' +\n((__t = (ctx.columns.actions)) == null ? '' : __t) +\n' justify-center\"><i id=\"abort-' +\n((__t = (file.id)) == null ? '' : __t) +\n'\" tabindex=\"0\" class=\"' +\n((__t = (ctx.iconClass('ban'))) == null ? '' : __t) +\n'\"></i></div>\\n ';\n } else if (!ctx.isSyncing && file.status !== 'success') { ;\n__p += '\\n <div class=\"col-md-' +\n((__t = (ctx.columns.actions)) == null ? '' : __t) +\n' justify-center\"><i tabindex=\"0\" class=\"' +\n((__t = (ctx.iconClass('remove'))) == null ? '' : __t) +\n'\" ref=\"fileToSyncRemove\"></i></div>\\n ';\n } ;\n__p += '\\n </div>\\n </li>\\n ';\n }) ;\n__p += '\\n </ul>\\n';\n } else { ;\n__p += '\\n <div>\\n ';\n ctx.files.forEach(function(file) { ;\n__p += '\\n <div>\\n <span>\\n <img ref=\"fileImage\" src=\"\" alt=\"' +\n((__t = (file.originalName || file.name)) == null ? '' : __t) +\n'\" style=\"width:' +\n((__t = (ctx.component.imageSize)) == null ? '' : __t) +\n'px\">\\n ';\n if (!ctx.disabled) { ;\n__p += '\\n <i tabindex=\"0\" class=\"' +\n((__t = (ctx.iconClass('remove'))) == null ? '' : __t) +\n'\" ref=\"removeLink\" aria-label=\"' +\n((__t = (ctx.t('Remove button. Press to remove ' + (file.originalName || file.name) + ' file'))) == null ? '' : __t) +\n'\"></i>\\n ';\n } ;\n__p += '\\n </span>\\n </div>\\n ';\n }) ;\n__p += '\\n </div>\\n';\n } ;\n__p += '\\n';\n if (!ctx.disabled && (ctx.component.multiple || !ctx.files.length)) { ;\n__p += '\\n ';\n if (ctx.self.useWebViewCamera) { ;\n__p += '\\n <div class=\"fileSelector\">\\n <button class=\"btn btn-primary\" ref=\"galleryButton\"><i class=\"' +\n((__t = (ctx.iconClass('book'))) == null ? '' : __t) +\n'\"></i> ' +\n((__t = (ctx.t('Gallery'))) == null ? '' : __t) +\n'</button>\\n <button class=\"btn btn-primary\" ref=\"cameraButton\"><i class=\"' +\n((__t = (ctx.iconClass('camera'))) == null ? '' : __t) +\n'\"></i> ' +\n((__t = (ctx.t('Camera'))) == null ? '' : __t) +\n'</button>\\n </div>\\n ';\n } else if (!ctx.self.cameraMode) { ;\n__p += '\\n <div class=\"fileSelector\" ref=\"fileDrop\" ' +\n((__t = (ctx.fileDropHidden ?'hidden' : '')) == null ? '' : __t) +\n'>\\n ';\n if (!ctx.self.isMobile.any) { ;\n__p += '\\n <i class=\"' +\n((__t = (ctx.iconClass('cloud-upload'))) == null ? '' : __t) +\n'\"></i> ' +\n((__t = (ctx.t('Drop files to attach,'))) == null ? '' : __t) +\n'\\n ';\n } ;\n__p += '\\n ';\n if (ctx.self.imageUpload && ctx.component.webcam) { ;\n__p += '\\n <a href=\"#\" ref=\"toggleCameraMode\"><i class=\"' +\n((__t = (ctx.iconClass('camera'))) == null ? '' : __t) +\n'\"></i>' +\n((__t = (ctx.t('Use Camera'))) == null ? '' : __t) +\n'</a>\\n ' +\n((__t = (ctx.t('or'))) == null ? '' : __t) +\n'\\n ';\n } ;\n__p += '\\n <a href=\"#\" ref=\"fileBrowse\" class=\"browse\">\\n ';\n if (ctx.self.isMobile.any && ctx.component.capture) { ;\n__p += '\\n ';\n if (ctx.component.filePattern && ctx.component.filePattern.includes(\"video\")) { ;\n__p += '\\n <i class=\"' +\n((__t = (ctx.iconClass('video'))) == null ? '' : __t) +\n'\"></i>' +\n((__t = (ctx.t('Capture Video'))) == null ? '' : __t) +\n'\\n ';\n } else if (ctx.component.filePattern && ctx.component.filePattern.includes(\"audio\")) { ;\n__p += '\\n <i class=\"' +\n((__t = (ctx.iconClass('microphone'))) == null ? '' : __t) +\n'\"></i>' +\n((__t = (ctx.t('Capture Audio'))) == null ? '' : __t) +\n'\\n ';\n } else { ;\n__p += '\\n <i class=\"' +\n((__t = (ctx.iconClass('camera'))) == null ? '' : __t) +\n'\"></i>' +\n((__t = (ctx.t('Capture Image'))) == null ? '' : __t) +\n'\\n ';\n } ;\n__p += '\\n ';\n } else { ;\n__p += '\\n <i class=\"' +\n((__t = (ctx.iconClass('folder-open'))) == null ? '' : __t) +\n'\"></i>' +\n((__t = (ctx.t('Browse Files'))) == null ? '' : __t) +\n'\\n ';\n } ;\n__p += '\\n <span class=\"visually-hidden\">\\n ' +\n((__t = (ctx.t('Browse to attach file for ' + ctx.component.label + '. ' +\n (ctx.component.description ? ctx.component.description + '. ' : '') +\n ((!ctx.component.filePattern || ctx.component.filePattern === '*') ? 'Any file types are allowed' : ctx.t('Allowed file types: ') + ctx.component.filePattern)))) == null ? '' : __t) +\n'\\n </span>\\n </a>\\n <div ref=\"fileProcessingLoader\" class=\"loader-wrapper\">\\n <div class=\"loader text-center\"></div>\\n </div>\\n </div>\\n ';\n } else { ;\n__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=\"' +\n((__t = (ctx.iconClass('camera'))) == null ? '' : __t) +\n'\"></i> ' +\n((__t = (ctx.t('Take Picture'))) == null ? '' : __t) +\n'</button>\\n <button class=\"btn btn-primary\" ref=\"toggleCameraMode\">' +\n((__t = (ctx.t('Switch to file upload'))) == null ? '' : __t) +\n'</button>\\n ';\n } ;\n__p += '\\n';\n } ;\n__p += '\\n';\n if (!ctx.component.storage || ctx.support.hasWarning) { ;\n__p += '\\n <div class=\"alert alert-warning\">\\n ';\n if (!ctx.component.storage) { ;\n__p += '\\n <p>' +\n((__t = (ctx.t('No storage has been set for this field. File uploads are disabled until storage is set up.'))) == null ? '' : __t) +\n'</p>\\n ';\n } ;\n__p += '\\n ';\n if (!ctx.support.filereader) { ;\n__p += '\\n <p>' +\n((__t = (ctx.t('File API & FileReader API not supported.'))) == null ? '' : __t) +\n'</p>\\n ';\n } ;\n__p += '\\n ';\n if (!ctx.support.formdata) { ;\n__p += '\\n <p>' +\n((__t = (ctx.t(\"XHR2's FormData is not supported.\"))) == null ? '' : __t) +\n'</p>\\n ';\n } ;\n__p += '\\n ';\n if (!ctx.support.progress) { ;\n__p += '\\n <p>' +\n((__t = (ctx.t(\"XHR2's upload progress isn't supported.\"))) == null ? '' : __t) +\n'</p>\\n ';\n } ;\n__p += '\\n </div>\\n';\n } ;\n__p += '\\n';\nreturn __p\n}\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/bootstrap/lib/cjs/templates/bootstrap5/file/form.ejs.js?");
|
8815
|
+
eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"]=function(ctx) {\nvar __t, __p = '', __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n\n if (ctx.options.vpat) { ;\n__p += '\\n <span tabindex=\"-1\" class=\"visually-hidden\" id=\"invisible-' +\n((__t = (ctx.instance.id)) == null ? '' : __t) +\n'-' +\n((__t = (ctx.component.key)) == null ? '' : __t) +\n'\"></span>\\n';\n } ;\n__p += '\\n';\n if (!ctx.self.imageUpload) { ;\n__p += '\\n ';\n if (ctx.options.vpat) { ;\n__p += '\\n <div>' +\n((__t = ((!ctx.component.filePattern || ctx.component.filePattern === '*') ? 'Any file types are allowed' : ctx.t('Allowed file types: ') + ctx.component.filePattern)) == null ? '' : __t) +\n'</div>\\n ';\n } ;\n__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 <div class=\"col-md-' +\n((__t = (ctx.columns.name)) == null ? '' : __t) +\n'\"><strong>' +\n((__t = (ctx.t('File Name'))) == null ? '' : __t) +\n'</strong></div>\\n <div class=\"col-md-' +\n((__t = (ctx.columns.size)) == null ? '' : __t) +\n'\"><strong>' +\n((__t = (ctx.t('Size'))) == null ? '' : __t) +\n'</strong></div>\\n ';\n if (ctx.self.hasTypes) { ;\n__p += '\\n <div class=\"col-md-' +\n((__t = (ctx.columns.type)) == null ? '' : __t) +\n'\"><strong>' +\n((__t = (ctx.t('Type'))) == null ? '' : __t) +\n'</strong></div>\\n ';\n } ;\n__p += '\\n <div class=\"col-md-' +\n((__t = (ctx.columns.actions)) == null ? '' : __t) +\n' justify-center\">\\n ';\n if (ctx.showSyncButton) { ;\n__p += '\\n <button\\n class=\"btn btn-primary btn-sm\"\\n ref=\"syncNow\"\\n ';\n if (ctx.disabled || ctx.isSyncing) { ;\n__p += 'disabled=true';\n } ;\n__p += '\\n >' +\n((__t = (ctx.isSyncing ? ctx.t('Syncing...') : ctx.t('Sync Now'))) == null ? '' : __t) +\n'</button>\\n ';\n } ;\n__p += '\\n </div>\\n </div>\\n </li>\\n ';\n ctx.files.forEach(function(file) { ;\n__p += '\\n <li class=\"list-group-item\">\\n <div class=\"row\">\\n <div class=\"col-md-' +\n((__t = (ctx.columns.name)) == null ? '' : __t) +\n'\">\\n ';\n if (ctx.component.uploadOnly) { ;\n__p += '\\n ' +\n((__t = (file.originalName || file.name)) == null ? '' : __t) +\n'\\n ';\n } else { ;\n__p += '\\n <a href=\"' +\n((__t = (file.url || '#')) == null ? '' : __t) +\n'\" target=\"_blank\" ref=\"fileLink\">\\n <span class=\"visually-hidden\">' +\n((__t = (ctx.t('Press to open '))) == null ? '' : __t) +\n'</span>' +\n((__t = (file.originalName || file.name)) == null ? '' : __t) +\n'\\n </a>\\n ';\n } ;\n__p += '\\n </div>\\n <div class=\"col-md-' +\n((__t = (ctx.columns.size)) == null ? '' : __t) +\n'\">' +\n((__t = (ctx.fileSize(file.size))) == null ? '' : __t) +\n'</div>\\n ';\n if (ctx.self.hasTypes && !ctx.disabled) { ;\n__p += '\\n <div class=\"col-md-' +\n((__t = (ctx.columns.type)) == null ? '' : __t) +\n'\">\\n <select class=\"file-type\" ref=\"fileType\">\\n ';\n ctx.component.fileTypes.map(function(type) { ;\n__p += '\\n <option class=\"test\" value=\"' +\n((__t = ( type.value )) == null ? '' : __t) +\n'\" ';\n if (type.label === file.fileType) { ;\n__p += 'selected=\"selected\"';\n } ;\n__p += '>' +\n((__t = (ctx.t(type.label))) == null ? '' : __t) +\n'</option>\\n ';\n }); ;\n__p += '\\n </select>\\n </div>\\n ';\n } ;\n__p += '\\n ';\n if (ctx.self.hasTypes && ctx.disabled) { ;\n__p += '\\n <div class=\"col-md-' +\n((__t = (ctx.columns.type)) == null ? '' : __t) +\n'\">' +\n((__t = (file.fileType)) == null ? '' : __t) +\n'</div>\\n ';\n } ;\n__p += '\\n ';\n if (!ctx.disabled) { ;\n__p += '\\n <div class=\"col-md-' +\n((__t = (ctx.columns.actions)) == null ? '' : __t) +\n' justify-center\"><i tabindex=\"0\" class=\"' +\n((__t = (ctx.iconClass('remove'))) == null ? '' : __t) +\n'\" ref=\"removeLink\"></i></div>\\n ';\n } ;\n__p += '\\n </div>\\n </li>\\n ';\n }) ;\n__p += '\\n ';\n ctx.filesToDelete.forEach(function(file) { ;\n__p += '\\n <li class=\"list-group-item\">\\n <div class=\"row align-center\">\\n <div class=\"col-md-' +\n((__t = (ctx.columns.name)) == null ? '' : __t) +\n'\">\\n <div>' +\n((__t = (file.originalName || file.name)) == null ? '' : __t) +\n'</div>\\n <div class=\"status text-' +\n((__t = (file.status === 'error' ? 'danger': file.status)) == null ? '' : __t) +\n'\">' +\n((__t = (ctx.t(file.message))) == null ? '' : __t) +\n'</div>\\n </div>\\n <div class=\"col-md-' +\n((__t = (ctx.columns.size)) == null ? '' : __t) +\n'\">' +\n((__t = (ctx.fileSize(file.size))) == null ? '' : __t) +\n'</div>\\n ';\n if (ctx.self.hasTypes) { ;\n__p += '\\n <div class=\"col-md-' +\n((__t = (ctx.columns.type)) == null ? '' : __t) +\n'\">\\n <select class=\"file-type\" ref=\"fileType\">\\n ';\n ctx.component.fileTypes.map(function(type) { ;\n__p += '\\n <option class=\"test\" value=\"' +\n((__t = ( type.value )) == null ? '' : __t) +\n'\" ';\n if (type.label === file.fileType) { ;\n__p += 'selected=\"selected\"';\n } ;\n__p += '>' +\n((__t = (ctx.t(type.label))) == null ? '' : __t) +\n'</option>\\n ';\n }); ;\n__p += '\\n </select>\\n </div>\\n ';\n } ;\n__p += '\\n ';\n if (!ctx.isSyncing && file.status !== 'success') { ;\n__p += '\\n <div class=\"col-md-' +\n((__t = (ctx.columns.actions)) == null ? '' : __t) +\n' justify-center\"><i tabindex=\"0\" class=\"' +\n((__t = (ctx.iconClass('arrow-counterclockwise'))) == null ? '' : __t) +\n'\" ref=\"restoreFile\"></i></div>\\n ';\n } ;\n__p += '\\n </div>\\n </li>\\n ';\n }) ;\n__p += '\\n ';\n ctx.filesToUpload.forEach(function(file) { ;\n__p += '\\n <li class=\"list-group-item\">\\n <div class=\"row align-center\">\\n <div class=\"col-md-' +\n((__t = (ctx.columns.name)) == null ? '' : __t) +\n'\">\\n <div>' +\n((__t = (file.originalName || file.name)) == null ? '' : __t) +\n'</div>\\n ';\n if (file.status === 'progress') { ;\n__p += '\\n <div class=\"status progress\">\\n <div id=\"' +\n((__t = (file.id)) == null ? '' : __t) +\n'\" class=\"progress-bar\" role=\"progressbar\" aria-valuenow=\"' +\n((__t = (file.progress)) == null ? '' : __t) +\n'\" aria-valuemin=\"0\" aria-valuemax=\"100\" style=\"width: ' +\n((__t = (file.progress)) == null ? '' : __t) +\n'%\" ref=\"progress\">\\n <span class=\"visually-hidden\">' +\n((__t = (file.progress)) == null ? '' : __t) +\n'% ' +\n((__t = (ctx.t('Complete'))) == null ? '' : __t) +\n'</span>\\n </div>\\n </div>\\n ';\n } else { ;\n__p += '\\n <div class=\"status text-' +\n((__t = (file.status === 'error' ? 'danger': file.status)) == null ? '' : __t) +\n'\">' +\n((__t = (ctx.t(file.message))) == null ? '' : __t) +\n'</div>\\n ';\n } ;\n__p += '\\n </div>\\n <div class=\"col-md-' +\n((__t = (ctx.columns.size)) == null ? '' : __t) +\n'\">' +\n((__t = (ctx.fileSize(file.size))) == null ? '' : __t) +\n'</div>\\n ';\n if (ctx.self.hasTypes) { ;\n__p += '\\n <div class=\"col-md-' +\n((__t = (ctx.columns.type)) == null ? '' : __t) +\n'\">\\n <select class=\"file-type\" ref=\"fileType\">\\n ';\n ctx.component.fileTypes.map(function(type) { ;\n__p += '\\n <option class=\"test\" value=\"' +\n((__t = ( type.value )) == null ? '' : __t) +\n'\" ';\n if (type.label === file.fileType) { ;\n__p += 'selected=\"selected\"';\n } ;\n__p += '>' +\n((__t = (ctx.t(type.label))) == null ? '' : __t) +\n'</option>\\n ';\n }); ;\n__p += '\\n </select>\\n </div>\\n ';\n } ;\n__p += '\\n ';\n if (file.status === 'progress') { ;\n__p += '\\n <div class=\"col-md-' +\n((__t = (ctx.columns.actions)) == null ? '' : __t) +\n' justify-center\"><i id=\"abort-' +\n((__t = (file.id)) == null ? '' : __t) +\n'\" tabindex=\"0\" class=\"' +\n((__t = (ctx.iconClass('ban'))) == null ? '' : __t) +\n'\"></i></div>\\n ';\n } else if (!ctx.isSyncing && file.status !== 'success') { ;\n__p += '\\n <div class=\"col-md-' +\n((__t = (ctx.columns.actions)) == null ? '' : __t) +\n' justify-center\"><i tabindex=\"0\" class=\"' +\n((__t = (ctx.iconClass('remove'))) == null ? '' : __t) +\n'\" ref=\"fileToSyncRemove\"></i></div>\\n ';\n } ;\n__p += '\\n </div>\\n </li>\\n ';\n }) ;\n__p += '\\n </ul>\\n';\n } else { ;\n__p += '\\n <div>\\n ';\n ctx.files.forEach(function(file) { ;\n__p += '\\n <div>\\n <span>\\n <img ref=\"fileImage\" src=\"\" alt=\"' +\n((__t = (file.originalName || file.name)) == null ? '' : __t) +\n'\" style=\"width:' +\n((__t = (ctx.component.imageSize)) == null ? '' : __t) +\n'px\">\\n ';\n if (!ctx.disabled) { ;\n__p += '\\n <i tabindex=\"0\" class=\"' +\n((__t = (ctx.iconClass('remove'))) == null ? '' : __t) +\n'\" ref=\"removeLink\"></i>\\n ';\n } ;\n__p += '\\n </span>\\n </div>\\n ';\n }) ;\n__p += '\\n </div>\\n';\n } ;\n__p += '\\n';\n if (!ctx.disabled && (ctx.component.multiple || !ctx.files.length)) { ;\n__p += '\\n ';\n if (ctx.self.useWebViewCamera) { ;\n__p += '\\n <div class=\"fileSelector\">\\n <button class=\"btn btn-primary\" ref=\"galleryButton\"><i class=\"' +\n((__t = (ctx.iconClass('book'))) == null ? '' : __t) +\n'\"></i> ' +\n((__t = (ctx.t('Gallery'))) == null ? '' : __t) +\n'</button>\\n <button class=\"btn btn-primary\" ref=\"cameraButton\"><i class=\"' +\n((__t = (ctx.iconClass('camera'))) == null ? '' : __t) +\n'\"></i> ' +\n((__t = (ctx.t('Camera'))) == null ? '' : __t) +\n'</button>\\n </div>\\n ';\n } else if (!ctx.self.cameraMode) { ;\n__p += '\\n <div class=\"fileSelector\" ref=\"fileDrop\" ' +\n((__t = (ctx.fileDropHidden ?'hidden' : '')) == null ? '' : __t) +\n'>\\n ';\n if (!ctx.self.isMobile.any) { ;\n__p += '\\n <i class=\"' +\n((__t = (ctx.iconClass('cloud-upload'))) == null ? '' : __t) +\n'\"></i> ' +\n((__t = (ctx.t('Drop files to attach,'))) == null ? '' : __t) +\n'\\n ';\n } ;\n__p += '\\n ';\n if (ctx.self.imageUpload && ctx.component.webcam) { ;\n__p += '\\n <a href=\"#\" ref=\"toggleCameraMode\"><i class=\"' +\n((__t = (ctx.iconClass('camera'))) == null ? '' : __t) +\n'\"></i>' +\n((__t = (ctx.t('Use Camera'))) == null ? '' : __t) +\n'</a>\\n ' +\n((__t = (ctx.t('or'))) == null ? '' : __t) +\n'\\n ';\n } ;\n__p += '\\n <a href=\"#\" ref=\"fileBrowse\" class=\"browse\">\\n ';\n if (ctx.self.isMobile.any && ctx.component.capture) { ;\n__p += '\\n ';\n if (ctx.component.filePattern && ctx.component.filePattern.includes(\"video\")) { ;\n__p += '\\n <i class=\"' +\n((__t = (ctx.iconClass('video'))) == null ? '' : __t) +\n'\"></i>' +\n((__t = (ctx.t('Capture Video'))) == null ? '' : __t) +\n'\\n ';\n } else if (ctx.component.filePattern && ctx.component.filePattern.includes(\"audio\")) { ;\n__p += '\\n <i class=\"' +\n((__t = (ctx.iconClass('microphone'))) == null ? '' : __t) +\n'\"></i>' +\n((__t = (ctx.t('Capture Audio'))) == null ? '' : __t) +\n'\\n ';\n } else { ;\n__p += '\\n <i class=\"' +\n((__t = (ctx.iconClass('camera'))) == null ? '' : __t) +\n'\"></i>' +\n((__t = (ctx.t('Capture Image'))) == null ? '' : __t) +\n'\\n ';\n } ;\n__p += '\\n ';\n } else { ;\n__p += '\\n <i class=\"' +\n((__t = (ctx.iconClass('folder-open'))) == null ? '' : __t) +\n'\"></i>' +\n((__t = (ctx.t('Browse Files'))) == null ? '' : __t) +\n'\\n ';\n } ;\n__p += '\\n <span class=\"visually-hidden\">\\n ' +\n((__t = (ctx.t('Browse to attach file for ' + ctx.component.label + '. ' +\n (ctx.component.description ? ctx.component.description + '. ' : '') +\n ((!ctx.component.filePattern || ctx.component.filePattern === '*') ? 'Any file types are allowed' : ctx.t('Allowed file types: ') + ctx.component.filePattern)))) == null ? '' : __t) +\n'\\n </span>\\n </a>\\n <div ref=\"fileProcessingLoader\" class=\"loader-wrapper\">\\n <div class=\"loader text-center\"></div>\\n </div>\\n </div>\\n ';\n } else { ;\n__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=\"' +\n((__t = (ctx.iconClass('camera'))) == null ? '' : __t) +\n'\"></i> ' +\n((__t = (ctx.t('Take Picture'))) == null ? '' : __t) +\n'</button>\\n <button class=\"btn btn-primary\" ref=\"toggleCameraMode\">' +\n((__t = (ctx.t('Switch to file upload'))) == null ? '' : __t) +\n'</button>\\n ';\n } ;\n__p += '\\n';\n } ;\n__p += '\\n';\n if (!ctx.component.storage || ctx.support.hasWarning) { ;\n__p += '\\n <div class=\"alert alert-warning\">\\n ';\n if (!ctx.component.storage) { ;\n__p += '\\n <p>' +\n((__t = (ctx.t('No storage has been set for this field. File uploads are disabled until storage is set up.'))) == null ? '' : __t) +\n'</p>\\n ';\n } ;\n__p += '\\n ';\n if (!ctx.support.filereader) { ;\n__p += '\\n <p>' +\n((__t = (ctx.t('File API & FileReader API not supported.'))) == null ? '' : __t) +\n'</p>\\n ';\n } ;\n__p += '\\n ';\n if (!ctx.support.formdata) { ;\n__p += '\\n <p>' +\n((__t = (ctx.t(\"XHR2's FormData is not supported.\"))) == null ? '' : __t) +\n'</p>\\n ';\n } ;\n__p += '\\n ';\n if (!ctx.support.progress) { ;\n__p += '\\n <p>' +\n((__t = (ctx.t(\"XHR2's upload progress isn't supported.\"))) == null ? '' : __t) +\n'</p>\\n ';\n } ;\n__p += '\\n </div>\\n';\n } ;\n__p += '\\n';\nreturn __p\n}\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/bootstrap/lib/cjs/templates/bootstrap5/file/form.ejs.js?");
|
8816
8816
|
|
8817
8817
|
/***/ }),
|
8818
8818
|
|
@@ -8876,7 +8876,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\ncons
|
|
8876
8876
|
/***/ (function(__unused_webpack_module, exports) {
|
8877
8877
|
|
8878
8878
|
"use strict";
|
8879
|
-
eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports[\"default\"] = (iconset, name, spinning) => {\n let biName = name;\n switch (name) {\n case 'cog':\n biName = 'gear';\n break;\n case 'copy':\n biName = 'back';\n break;\n case 'bars':\n biName = 'list';\n break;\n case 'remove':\n biName = 'trash';\n break;\n case 'font':\n biName = 'type';\n break;\n case 'hashtag':\n biName = 'hash';\n break;\n case 'th-list':\n biName = 'menu-button-wide';\n break;\n case 'dot-circle-o':\n biName = 'ui-radios';\n break;\n case 'plus-square-o':\n biName = 'plus-square';\n break;\n case 'minus-square-o':\n biName = 'dash-square';\n break;\n case 'plus-square':\n biName = 'ui-checks';\n break;\n case 'phone-square':\n biName = 'phone';\n break;\n case 'home':\n biName = 'house';\n break;\n case 'clock-o':\n biName = 'clock';\n break;\n case 'usd':\n biName = 'currency-dollar';\n break;\n case 'html5':\n biName = 'file-richtext';\n break;\n case 'pencil-square-o':\n biName = 'pencil-square';\n break;\n case 'columns':\n biName = 'layout-three-columns';\n break;\n case 'list-alt':\n biName = 'window';\n break;\n case 'th-large':\n biName = 'grid-fill';\n break;\n case 'folder-o':\n biName = 'folder';\n break;\n case 'square-o':\n biName = 'square';\n break;\n case 'user-secret':\n biName = 'person-fill-slash';\n break;\n case 'folder-open':\n biName = 'folder2-open';\n break;\n case 'th':\n biName = 'grid-3x3-gap-fill';\n break;\n case 'tasks':\n biName = 'view-stacked';\n break;\n case 'indent':\n biName = 'text-indent-left';\n break;\n case 'refresh':\n biName = 'arrow-repeat';\n break;\n case 'files-o':\n biName = 'files';\n break;\n case 'wpforms':\n biName = 'window-stack';\n break;\n case 'cube':\n biName = 'box';\n break;\n case 'cubes':\n biName = 'boxes';\n break;\n case 'check-square-o':\n biName = 'check-square';\n break;\n case 'plus':\n biName = 'plus-lg';\n break;\n case 'question-sign':\n name = 'question-circle';\n biName = 'question-circle';\n break;\n case 'remove-circle':\n biName = 'x-circle';\n break;\n case 'new-window':\n name = 'window-restore';\n biName = 'window-plus';\n break;\n case 'move':\n name = 'arrows';\n biName = 'arrows-move';\n break;\n case 'edit':\n biName = 'pencil';\n break;\n case 'time':\n biName = 'clock';\n break;\n case 'video':\n biName = 'camera-video';\n break;\n case 'microphone':\n biName = 'mic';\n break;\n case 'folder-open':\n biName = 'folder2-open';\n break;\n case 'check-circle':\n biName = 'check-circle-fill';\n break;\n case 'times-circle':\n biName = 'x-circle-fill';\n break;\n case 'pencil':\n biName = 'pencil-fill';\n break;\n case 'minus':\n biName = 'dash';\n break;\n case 'circle':\n biName = 'circle-fill';\n break;\n case 'search-plus':\n biName = 'zoom-in';\n break;\n case 'search-minus':\n biName = 'zoom-out';\n break;\n case 'hand-paper-o':\n biName = 'hand-index';\n break;\n case 'undo':\n biName = 'arrow-counterclockwise';\n break;\n case 'repeat':\n biName = 'arrow-clockwise';\n break;\n }\n return spinning ? 'spinner-border spinner-border-sm' :
|
8879
|
+
eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports[\"default\"] = (iconset, name, spinning) => {\n let biName = name;\n switch (name) {\n case 'cog':\n biName = 'gear';\n break;\n case 'copy':\n biName = 'back';\n break;\n case 'bars':\n biName = 'list';\n break;\n case 'remove':\n biName = 'trash';\n break;\n case 'font':\n biName = 'type';\n break;\n case 'hashtag':\n biName = 'hash';\n break;\n case 'th-list':\n biName = 'menu-button-wide';\n break;\n case 'dot-circle-o':\n biName = 'ui-radios';\n break;\n case 'plus-square-o':\n biName = 'plus-square';\n break;\n case 'minus-square-o':\n biName = 'dash-square';\n break;\n case 'plus-square':\n biName = 'ui-checks';\n break;\n case 'phone-square':\n biName = 'phone';\n break;\n case 'home':\n biName = 'house';\n break;\n case 'clock-o':\n biName = 'clock';\n break;\n case 'usd':\n biName = 'currency-dollar';\n break;\n case 'html5':\n biName = 'file-richtext';\n break;\n case 'pencil-square-o':\n biName = 'pencil-square';\n break;\n case 'columns':\n biName = 'layout-three-columns';\n break;\n case 'list-alt':\n biName = 'window';\n break;\n case 'th-large':\n biName = 'grid-fill';\n break;\n case 'folder-o':\n biName = 'folder';\n break;\n case 'square-o':\n biName = 'square';\n break;\n case 'user-secret':\n biName = 'person-fill-slash';\n break;\n case 'folder-open':\n biName = 'folder2-open';\n break;\n case 'th':\n biName = 'grid-3x3-gap-fill';\n break;\n case 'tasks':\n biName = 'view-stacked';\n break;\n case 'indent':\n biName = 'text-indent-left';\n break;\n case 'refresh':\n biName = 'arrow-repeat';\n break;\n case 'files-o':\n biName = 'files';\n break;\n case 'wpforms':\n biName = 'window-stack';\n break;\n case 'cube':\n biName = 'box';\n break;\n case 'cubes':\n biName = 'boxes';\n break;\n case 'check-square-o':\n biName = 'check-square';\n break;\n case 'plus':\n biName = 'plus-lg';\n break;\n case 'question-sign':\n name = 'question-circle';\n biName = 'question-circle';\n break;\n case 'remove-circle':\n biName = 'x-circle';\n break;\n case 'new-window':\n name = 'window-restore';\n biName = 'window-plus';\n break;\n case 'move':\n name = 'arrows';\n biName = 'arrows-move';\n break;\n case 'edit':\n biName = 'pencil';\n break;\n case 'time':\n biName = 'clock';\n break;\n case 'video':\n biName = 'camera-video';\n break;\n case 'microphone':\n biName = 'mic';\n break;\n case 'folder-open':\n biName = 'folder2-open';\n break;\n case 'check-circle':\n biName = 'check-circle-fill';\n break;\n case 'times-circle':\n biName = 'x-circle-fill';\n break;\n case 'pencil':\n biName = 'pencil-fill';\n break;\n case 'minus':\n biName = 'dash';\n break;\n case 'circle':\n biName = 'circle-fill';\n break;\n case 'search-plus':\n biName = 'zoom-in';\n break;\n case 'search-minus':\n biName = 'zoom-out';\n break;\n case 'hand-paper-o':\n biName = 'hand-index';\n break;\n case 'undo':\n biName = 'arrow-counterclockwise';\n break;\n case 'repeat':\n biName = 'arrow-clockwise';\n break;\n }\n return spinning ? 'spinner-border spinner-border-sm' : `${iconset} ${iconset}-${name}`;\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/bootstrap/lib/cjs/templates/bootstrap5/iconClass.js?");
|
8880
8880
|
|
8881
8881
|
/***/ }),
|
8882
8882
|
|
@@ -9295,7 +9295,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\ncons
|
|
9295
9295
|
\****************************************************************************************/
|
9296
9296
|
/***/ (function(__unused_webpack_module, exports) {
|
9297
9297
|
|
9298
|
-
eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"]=function(ctx) {\nvar __t, __p = '', __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n__p += '<select\\n ref=\"' +\n((__t = (ctx.input.ref ? ctx.input.ref : 'selectContainer')) == null ? '' : __t) +\n'\"\\n ' +\n((__t = ( ctx.input.multiple ? 'multiple' : '' )) == null ? '' : __t) +\n'\\n ';\n for (var attr in ctx.input.attr) { ;\n__p += '\\n ' +\n((__t = (attr)) == null ? '' : __t) +\n'=\"' +\n((__t = (ctx.input.attr[attr])) == null ? '' : __t) +\n'\"\\n ';\n } ;\n__p += '\\n ';\n if (!ctx.input.attr.id) { ;\n__p += '\\n id=\"' +\n((__t = (ctx.instance.id)) == null ? '' : __t) +\n'-' +\n((__t = (ctx.component.key)) == null ? '' : __t) +\n'\"\\n ';\n } ;\n__p += '\\n ';\n if (ctx.component.description) { ;\n__p += '\\n aria-describedby=\"d-' +\n((__t = (ctx.instance.id)) == null ? '' : __t) +\n'-' +\n((__t = (ctx.component.key)) == null ? '' : __t) +\n'\"\\n ';\n } ;\n__p += '\\n aria-required=\"' +\n((__t = (ctx.input.ref === 'selectContainer' || !ctx.input.ref ? ctx.input.component.validate.required : ctx.component.fields[ctx.input.ref].required)) == null ? '' : __t) +\n'\"\\n>' +\n((__t = (ctx.selectOptions)) == null ? '' : __t) +\n'</select>\\n<input type=\"text\"\\n class=\"formio-select-autocomplete-input\"\\n ref=\"autocompleteInput\"\\n ';\n if (ctx.input.attr.autocomplete) { ;\n__p += '\\n autocomplete=\"' +\n((__t = (ctx.input.attr.autocomplete)) == null ? '' : __t) +\n'\"\\n ';\n } ;\n__p += '\\n tabindex=\"-1\"\\n aria-label=\"' +\n((__t = (ctx.t('autocomplete'))) == null ? '' : __t) +\n'\"\\n
|
9298
|
+
eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"]=function(ctx) {\nvar __t, __p = '', __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n__p += '<select\\n ref=\"' +\n((__t = (ctx.input.ref ? ctx.input.ref : 'selectContainer')) == null ? '' : __t) +\n'\"\\n ' +\n((__t = ( ctx.input.multiple ? 'multiple' : '' )) == null ? '' : __t) +\n'\\n ';\n for (var attr in ctx.input.attr) { ;\n__p += '\\n ' +\n((__t = (attr)) == null ? '' : __t) +\n'=\"' +\n((__t = (ctx.input.attr[attr])) == null ? '' : __t) +\n'\"\\n ';\n } ;\n__p += '\\n ';\n if (!ctx.input.attr.id) { ;\n__p += '\\n id=\"' +\n((__t = (ctx.instance.id)) == null ? '' : __t) +\n'-' +\n((__t = (ctx.component.key)) == null ? '' : __t) +\n'\"\\n ';\n } ;\n__p += '\\n ';\n if (ctx.component.description) { ;\n__p += '\\n aria-describedby=\"d-' +\n((__t = (ctx.instance.id)) == null ? '' : __t) +\n'-' +\n((__t = (ctx.component.key)) == null ? '' : __t) +\n'\"\\n ';\n } ;\n__p += '\\n aria-required=\"' +\n((__t = (ctx.input.ref === 'selectContainer' || !ctx.input.ref ? ctx.input.component.validate.required : ctx.component.fields[ctx.input.ref].required)) == null ? '' : __t) +\n'\"\\n>' +\n((__t = (ctx.selectOptions)) == null ? '' : __t) +\n'</select>\\n<input type=\"text\"\\n class=\"formio-select-autocomplete-input\"\\n ref=\"autocompleteInput\"\\n ';\n if (ctx.input.attr.autocomplete) { ;\n__p += '\\n autocomplete=\"' +\n((__t = (ctx.input.attr.autocomplete)) == null ? '' : __t) +\n'\"\\n ';\n } ;\n__p += '\\n tabindex=\"-1\"\\n aria-label=\"' +\n((__t = (ctx.t('autocomplete'))) == null ? '' : __t) +\n'\"\\n/>\\n';\nreturn __p\n}\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/bootstrap/lib/cjs/templates/bootstrap5/select/form.ejs.js?");
|
9299
9299
|
|
9300
9300
|
/***/ }),
|
9301
9301
|
|
@@ -9450,7 +9450,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\ncons
|
|
9450
9450
|
\***************************************************************************************/
|
9451
9451
|
/***/ (function(__unused_webpack_module, exports) {
|
9452
9452
|
|
9453
|
-
eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"]=function(ctx) {\nvar __t, __p = '', __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n__p += '<table class=\"table\\n ' +\n((__t = ( ctx.component.striped ? 'table-striped' : '')) == null ? '' : __t) +\n'\\n ' +\n((__t = ( ctx.component.bordered ? 'table-bordered' : '')) == null ? '' : __t) +\n'\\n ' +\n((__t = ( ctx.component.hover ? 'table-hover' : '')) == null ? '' : __t) +\n'\\n ' +\n((__t = ( ctx.component.condensed ? 'table-sm' : '')) == null ? '' : __t) +\n'\\n \">\\n <caption class=\"visually-hidden\">' +\n((__t = (ctx.t(ctx.component.label))) == null ? '' : __t) +\n'</caption>\\n ';\n if (ctx.component.header && ctx.component.header.length > 0) { ;\n__p += '\\n <thead>\\n <tr>\\n ';\n ctx.component.header.forEach(function(header) { ;\n__p += '\\n <th
|
9453
|
+
eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"]=function(ctx) {\nvar __t, __p = '', __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n__p += '<table class=\"table\\n ' +\n((__t = ( ctx.component.striped ? 'table-striped' : '')) == null ? '' : __t) +\n'\\n ' +\n((__t = ( ctx.component.bordered ? 'table-bordered' : '')) == null ? '' : __t) +\n'\\n ' +\n((__t = ( ctx.component.hover ? 'table-hover' : '')) == null ? '' : __t) +\n'\\n ' +\n((__t = ( ctx.component.condensed ? 'table-sm' : '')) == null ? '' : __t) +\n'\\n \">\\n <caption class=\"visually-hidden\">' +\n((__t = (ctx.t(ctx.component.label))) == null ? '' : __t) +\n'</caption>\\n ';\n if (ctx.component.header && ctx.component.header.length > 0) { ;\n__p += '\\n <thead>\\n <tr>\\n ';\n ctx.component.header.forEach(function(header) { ;\n__p += '\\n <th>' +\n((__t = (ctx.t(header))) == null ? '' : __t) +\n'</th>\\n ';\n }) ;\n__p += '\\n </tr>\\n </thead>\\n ';\n } ;\n__p += '\\n <tbody>\\n ';\n ctx.tableComponents.forEach(function(row, rowIndex) { ;\n__p += '\\n <tr ref=\"row-' +\n((__t = (ctx.id)) == null ? '' : __t) +\n'\">\\n ';\n row.forEach(function(column, colIndex) { ;\n__p += '\\n <td ref=\"' +\n((__t = (ctx.tableKey)) == null ? '' : __t) +\n'-' +\n((__t = (rowIndex)) == null ? '' : __t) +\n'\"';\n if (ctx.cellClassName) { ;\n__p += ' class=\"' +\n((__t = (ctx.cellClassName)) == null ? '' : __t) +\n'\"';\n } ;\n__p += '>' +\n((__t = (column)) == null ? '' : __t) +\n'</td>\\n ';\n }) ;\n__p += '\\n </tr>\\n ';\n }) ;\n__p += '\\n </tbody>\\n</table>\\n';\nreturn __p\n}\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/bootstrap/lib/cjs/templates/bootstrap5/table/form.ejs.js?");
|
9454
9454
|
|
9455
9455
|
/***/ }),
|
9456
9456
|
|
@@ -10887,7 +10887,7 @@ eval("\nvar parent = __webpack_require__(/*! ../../es/object/from-entries */ \".
|
|
10887
10887
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
10888
10888
|
|
10889
10889
|
"use strict";
|
10890
|
-
eval("\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nvar _a;\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.FormBuilder = exports.Form = exports.Formio = void 0;\nconst CDN_js_1 = __importDefault(__webpack_require__(/*! ./CDN.js */ \"./lib/cjs/CDN.js\"));\nclass Formio {\n static setLicense(license, norecurse = false) {\n _a.license = license;\n if (!norecurse && _a.FormioClass) {\n _a.FormioClass.setLicense(license);\n }\n }\n static setBaseUrl(url, norecurse = false) {\n _a.baseUrl = url;\n if (!norecurse && _a.FormioClass) {\n _a.FormioClass.setBaseUrl(url);\n }\n }\n static setApiUrl(url, norecurse = false) {\n _a.baseUrl = url;\n if (!norecurse && _a.FormioClass) {\n _a.FormioClass.setApiUrl(url);\n }\n }\n static setProjectUrl(url, norecurse = false) {\n _a.projectUrl = url;\n if (!norecurse && _a.FormioClass) {\n _a.FormioClass.setProjectUrl(url);\n }\n }\n static setAppUrl(url, norecurse = false) {\n _a.projectUrl = url;\n if (!norecurse && _a.FormioClass) {\n _a.FormioClass.setAppUrl(url);\n }\n }\n static setPathType(type, norecurse = false) {\n _a.pathType = type;\n if (!norecurse && _a.FormioClass) {\n _a.FormioClass.setPathType(type);\n }\n }\n static debug(...args) {\n if (_a.config.debug) {\n console.log(...args);\n }\n }\n static clearCache() {\n if (_a.FormioClass) {\n _a.FormioClass.clearCache();\n }\n }\n static global(prop, flag = '') {\n const globalValue = window[prop];\n if (flag && globalValue && !globalValue[flag]) {\n return null;\n }\n _a.debug(`Getting global ${prop}`, globalValue);\n return globalValue;\n }\n static use(module) {\n if (_a.FormioClass && _a.FormioClass.isRenderer) {\n _a.FormioClass.use(module);\n }\n else {\n _a.modules.push(module);\n }\n }\n static createElement(type, attrs, children) {\n const element = document.createElement(type);\n if (!attrs) {\n return element;\n }\n Object.keys(attrs).forEach(key => {\n element.setAttribute(key, attrs[key]);\n });\n (children || []).forEach(child => {\n element.appendChild(_a.createElement(child.tag, child.attrs, child.children));\n });\n return element;\n }\n static addScript(wrapper, src, name, flag = '') {\n return __awaiter(this, void 0, void 0, function* () {\n if (!src) {\n return Promise.resolve();\n }\n if (typeof src !== 'string' && src.length) {\n return Promise.all(src.map(ref => _a.addScript(wrapper, ref)));\n }\n if (name && _a.global(name, flag)) {\n _a.debug(`${name} already loaded.`);\n return Promise.resolve(_a.global(name));\n }\n _a.debug('Adding Script', src);\n try {\n wrapper.appendChild(_a.createElement('script', {\n src\n }));\n }\n catch (err) {\n _a.debug(err);\n return Promise.resolve();\n }\n if (!name) {\n return Promise.resolve();\n }\n return new Promise((resolve) => {\n _a.debug(`Waiting to load ${name}`);\n const wait = setInterval(() => {\n if (_a.global(name, flag)) {\n clearInterval(wait);\n _a.debug(`${name} loaded.`);\n resolve(_a.global(name));\n }\n }, 100);\n });\n });\n }\n static addStyles(wrapper, href) {\n return __awaiter(this, void 0, void 0, function* () {\n if (!href) {\n return;\n }\n if (typeof href !== 'string' && href.length) {\n href.forEach(ref => _a.addStyles(wrapper, ref));\n return;\n }\n _a.debug('Adding Styles', href);\n wrapper.appendChild(_a.createElement('link', {\n rel: 'stylesheet',\n href\n }));\n });\n }\n static submitDone(instance, submission) {\n return __awaiter(this, void 0, void 0, function* () {\n _a.debug('Submision Complete', submission);\n if (_a.config.submitDone) {\n _a.config.submitDone(submission, instance);\n }\n const successMessage = (_a.config.success || '').toString();\n if (successMessage && successMessage.toLowerCase() !== 'false' && instance.element) {\n instance.element.innerHTML = `<div class=\"alert-success\" role=\"alert\">${successMessage}</div>`;\n }\n let returnUrl = _a.config.redirect;\n // Allow form based configuration for return url.\n if (!returnUrl &&\n (instance._form &&\n instance._form.settings &&\n (instance._form.settings.returnUrl ||\n instance._form.settings.redirect))) {\n _a.debug('Return url found in form configuration');\n returnUrl = instance._form.settings.returnUrl || instance._form.settings.redirect;\n }\n if (returnUrl) {\n const formSrc = instance.formio ? instance.formio.formUrl : '';\n const hasQuery = !!returnUrl.match(/\\?/);\n const isOrigin = returnUrl.indexOf(location.origin) === 0;\n returnUrl += hasQuery ? '&' : '?';\n returnUrl += `sub=${submission._id}`;\n if (!isOrigin && formSrc) {\n returnUrl += `&form=${encodeURIComponent(formSrc)}`;\n }\n _a.debug('Return URL', returnUrl);\n window.location.href = returnUrl;\n if (isOrigin) {\n window.location.reload();\n }\n }\n });\n }\n // Return the full script if the builder is being used.\n static formioScript(script, builder) {\n builder = builder || _a.config.includeBuilder;\n if (_a.fullAdded || builder) {\n _a.fullAdded = true;\n return script.replace('formio.form', 'formio.full');\n }\n return script;\n }\n static addLibrary(libWrapper, lib, name) {\n return __awaiter(this, void 0, void 0, function* () {\n if (!lib) {\n return;\n }\n if (lib.dependencies) {\n for (let i = 0; i < lib.dependencies.length; i++) {\n const libName = lib.dependencies[i];\n yield _a.addLibrary(libWrapper, _a.config.libs[libName], libName);\n }\n }\n if (lib.css) {\n yield _a.addStyles((lib.global ? document.body : libWrapper), lib.css);\n }\n if (lib.js) {\n const module = yield _a.addScript((lib.global ? document.body : libWrapper), lib.js, lib.use ? name : false);\n if (lib.use) {\n _a.debug(`Using ${name}`);\n const options = lib.options || {};\n if (!options.license && _a.license) {\n options.license = _a.license;\n }\n _a.use((typeof lib.use === 'function' ? lib.use(module) : module), options);\n }\n }\n if (lib.globalStyle) {\n const style = _a.createElement('style');\n style.type = 'text/css';\n style.innerHTML = lib.globalStyle;\n document.body.appendChild(style);\n }\n });\n }\n static addLoader(wrapper) {\n return __awaiter(this, void 0, void 0, function* () {\n wrapper.appendChild(_a.createElement('div', {\n 'class': 'formio-loader'\n }, [{\n tag: 'div',\n attrs: {\n class: 'loader-wrapper'\n },\n children: [{\n tag: 'div',\n attrs: {\n class: 'loader text-center'\n }\n }]\n }]));\n });\n }\n // eslint-disable-next-line max-statements\n static init(element, options = {}, builder = false) {\n return __awaiter(this, void 0, void 0, function* () {\n _a.cdn = new CDN_js_1.default(_a.config.cdn, _a.config.cdnUrls || {});\n _a.config.libs = _a.config.libs || {\n uswds: {\n dependencies: ['fontawesome'],\n js: `${_a.cdn.uswds}/uswds.min.js`,\n css: `${_a.cdn.uswds}/uswds.min.css`,\n use: true\n },\n fontawesome: {\n // Due to an issue with font-face not loading in the shadowdom (https://issues.chromium.org/issues/41085401), we need\n // to do 2 things. 1.) Load the fonts from the global cdn, and 2.) add the font-face to the global styles on the page.\n css: `https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css`,\n globalStyle: `@font-face {\n font-family: 'FontAwesome';\n src: url('https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/fonts/fontawesome-webfont.eot?v=4.7.0');\n src: url('https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/fonts/fontawesome-webfont.eot?#iefix&v=4.7.0') format('embedded-opentype'), url('https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/fonts/fontawesome-webfont.woff2?v=4.7.0') format('woff2'), url('https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/fonts/fontawesome-webfont.woff?v=4.7.0') format('woff'), url('https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/fonts/fontawesome-webfont.ttf?v=4.7.0') format('truetype'), url('https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular') format('svg');\n font-weight: normal;\n font-style: normal;\n }`\n },\n bootstrap4: {\n dependencies: ['fontawesome'],\n css: `${_a.cdn.bootstrap4}/css/bootstrap.min.css`\n },\n bootstrap: {\n dependencies: ['bootstrap-icons'],\n css: `${_a.cdn.bootstrap}/css/bootstrap.min.css`\n },\n 'bootstrap-icons': {\n // Due to an issue with font-face not loading in the shadowdom (https://issues.chromium.org/issues/41085401), we need\n // to do 2 things. 1.) Load the fonts from the global cdn, and 2.) add the font-face to the global styles on the page.\n css: 'https://cdn.jsdelivr.net/npm/bootstrap-icons/font/bootstrap-icons.min.css',\n globalStyle: `@font-face {\n font-display: block;\n font-family: \"bootstrap-icons\";\n src: url(\"https://cdn.jsdelivr.net/npm/bootstrap-icons/font/fonts/bootstrap-icons.woff2?dd67030699838ea613ee6dbda90effa6\") format(\"woff2\"),\n url(\"https://cdn.jsdelivr.net/npm/bootstrap-icons/font/fonts/bootstrap-icons.woff?dd67030699838ea613ee6dbda90effa6\") format(\"woff\");\n }`\n }\n };\n // Add all bootswatch templates.\n ['cerulean', 'cosmo', 'cyborg', 'darkly', 'flatly', 'journal', 'litera', 'lumen', 'lux', 'materia', 'minty', 'pulse', 'sandstone', 'simplex', 'sketchy', 'slate', 'solar', 'spacelab', 'superhero', 'united', 'yeti'].forEach((template) => {\n _a.config.libs[template] = {\n dependencies: ['bootstrap-icons'],\n css: `${_a.cdn.bootswatch}/dist/${template}/bootstrap.min.css`\n };\n });\n const id = _a.config.id || `formio-${Math.random().toString(36).substring(7)}`;\n // Create a new wrapper and add the element inside of a new wrapper.\n let wrapper = _a.createElement('div', {\n 'id': `${id}-wrapper`\n });\n element.parentNode.insertBefore(wrapper, element);\n // If we include the libraries, then we will attempt to run this in shadow dom.\n const useShadowDom = _a.config.includeLibs && !_a.config.noshadow && (typeof wrapper.attachShadow === 'function');\n if (useShadowDom) {\n wrapper = wrapper.attachShadow({\n mode: 'open'\n });\n options.shadowRoot = wrapper;\n }\n element.parentNode.removeChild(element);\n wrapper.appendChild(element);\n // If this is inside of shadow dom, then we need to add the styles and scripts to the shadow dom.\n const libWrapper = useShadowDom ? wrapper : document.body;\n // Load the renderer styles.\n yield _a.addStyles(libWrapper, _a.config.embedCSS || `${_a.cdn.js}/formio.embed.css`);\n // Add a loader.\n _a.addLoader(wrapper);\n const formioSrc = _a.config.full ? 'formio.full' : 'formio.form';\n const renderer = _a.config.debug ? formioSrc : `${formioSrc}.min`;\n _a.FormioClass = yield _a.addScript(libWrapper, _a.formioScript(_a.config.script || `${_a.cdn.js}/${renderer}.js`, builder), 'Formio', builder ? 'isBuilder' : 'isRenderer');\n _a.FormioClass.cdn = _a.cdn;\n _a.FormioClass.setBaseUrl(options.baseUrl || _a.baseUrl || _a.config.base);\n _a.FormioClass.setProjectUrl(options.projectUrl || _a.projectUrl || _a.config.project);\n _a.FormioClass.language = _a.language;\n _a.setLicense(_a.license || _a.config.license || false);\n _a.modules.forEach((module) => {\n _a.FormioClass.use(module);\n });\n if (_a.icons) {\n _a.FormioClass.icons = _a.icons;\n }\n if (_a.pathType) {\n _a.FormioClass.setPathType(_a.pathType);\n }\n // Add libraries if they wish to include the libs.\n if (_a.config.template && _a.config.includeLibs) {\n yield _a.addLibrary(libWrapper, _a.config.libs[_a.config.template], _a.config.template);\n }\n if (!_a.config.libraries) {\n _a.config.libraries = _a.config.modules || {};\n }\n // Adding premium if it is provided via the config.\n if (_a.config.premium) {\n _a.config.libraries.premium = _a.config.premium;\n }\n // Allow adding dynamic modules.\n if (_a.config.libraries) {\n for (const name in _a.config.libraries) {\n const lib = _a.config.libraries[name];\n lib.use = lib.use || true;\n yield _a.addLibrary(libWrapper, lib, name);\n }\n }\n yield _a.addStyles(libWrapper, _a.formioScript(_a.config.style || `${_a.cdn.js}/${renderer}.css`, builder));\n if (_a.config.before) {\n yield _a.config.before(_a.FormioClass, element, _a.config);\n }\n _a.FormioClass.license = true;\n _a._formioReady(_a.FormioClass);\n return wrapper;\n });\n }\n // Called after an instance has been created.\n static afterCreate(instance, wrapper, readyEvent) {\n return __awaiter(this, void 0, void 0, function* () {\n const loader = wrapper.querySelector('.formio-loader');\n if (loader) {\n wrapper.removeChild(loader);\n }\n _a.FormioClass.events.emit(readyEvent, instance);\n if (_a.config.after) {\n _a.debug('Calling ready callback');\n _a.config.after(instance, _a.config);\n }\n return instance;\n });\n }\n // Create a new form.\n static createForm(element, form, options = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n if (_a.FormioClass) {\n return _a.FormioClass.createForm(element, form, Object.assign(Object.assign({}, options), { noLoader: true }));\n }\n const wrapper = yield _a.init(element, options);\n return _a.FormioClass.createForm(element, form, Object.assign(Object.assign({}, options), { noLoader: true })).then((instance) => {\n // Set the default submission data.\n if (_a.config.submission) {\n _a.debug('Setting submission', _a.config.submission);\n instance.submission = _a.config.submission;\n }\n // Call the after create method.\n _a.afterCreate(instance, wrapper, 'formEmbedded');\n return instance;\n });\n });\n }\n // Create a form builder.\n static builder(element, form, options = {}) {\n var _b;\n return __awaiter(this, void 0, void 0, function* () {\n if ((_b = _a.FormioClass) === null || _b === void 0 ? void 0 : _b.builder) {\n return _a.FormioClass.builder(element, form, options);\n }\n const wrapper = yield _a.init(element, options, true);\n return _a.FormioClass.builder(element, form, options).then((instance) => {\n _a.afterCreate(instance, wrapper, 'builderEmbedded');\n return instance;\n });\n });\n }\n}\nexports.Formio = Formio;\n_a = Formio;\nFormio.FormioClass = null;\nFormio.config = {};\nFormio.modules = [];\nFormio.icons = '';\nFormio.license = '';\nFormio.formioReady = new Promise((ready, reject) => {\n _a._formioReady = ready;\n _a._formioReadyReject = reject;\n});\nFormio.version = '5.0.1-rc.4';\n// Create a report.\nFormio.Report = {\n create: (element, submission, options = {}) => __awaiter(void 0, void 0, void 0, function* () {\n var _b;\n if ((_b = _a.FormioClass) === null || _b === void 0 ? void 0 : _b.Report) {\n return _a.FormioClass.Report.create(element, submission, options);\n }\n const wrapper = yield _a.init(element, options, true);\n return _a.FormioClass.Report.create(element, submission, options).then((instance) => {\n _a.afterCreate(instance, wrapper, 'reportEmbedded');\n return instance;\n });\n })\n};\nCDN_js_1.default.defaultCDN = Formio.version.includes('rc') ? 'https://cdn.test-form.io' : 'https://cdn.form.io';\nclass Form {\n constructor(element, form, options) {\n this.form = form;\n this.element = element;\n this.options = options || {};\n this.init();\n this.instance = {\n proxy: true,\n ready: this.ready,\n destroy: () => { }\n };\n }\n init() {\n if (this.instance && !this.instance.proxy) {\n this.instance.destroy();\n }\n this.element.innerHTML = '';\n this.ready = this.create().then((instance) => {\n this.instance = instance;\n this.form = instance.form;\n return instance;\n });\n }\n create() {\n return Formio.createForm(this.element, this.form, this.options);\n }\n setForm(form) {\n this.form = form;\n if (this.instance) {\n this.instance.setForm(form);\n }\n }\n setDisplay(display) {\n if (this.instance.proxy) {\n return this.ready;\n }\n this.form.display = display;\n this.instance.destroy();\n this.ready = this.create().then((instance) => {\n this.instance = instance;\n this.setForm(this.form);\n });\n return this.ready;\n }\n}\nexports.Form = Form;\nclass FormBuilder extends Form {\n create() {\n return Formio.builder(this.element, this.form, this.options);\n }\n}\nexports.FormBuilder = FormBuilder;\nFormio.Form = Form;\nFormio.FormBuilder = FormBuilder;\n\n\n//# sourceURL=webpack://Formio/./lib/cjs/Embed.js?");
|
10890
|
+
eval("\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nvar _a;\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.FormBuilder = exports.Form = exports.Formio = void 0;\nconst CDN_js_1 = __importDefault(__webpack_require__(/*! ./CDN.js */ \"./lib/cjs/CDN.js\"));\nclass Formio {\n static setLicense(license, norecurse = false) {\n _a.license = license;\n if (!norecurse && _a.FormioClass) {\n _a.FormioClass.setLicense(license);\n }\n }\n static setBaseUrl(url, norecurse = false) {\n _a.baseUrl = url;\n if (!norecurse && _a.FormioClass) {\n _a.FormioClass.setBaseUrl(url);\n }\n }\n static setApiUrl(url, norecurse = false) {\n _a.baseUrl = url;\n if (!norecurse && _a.FormioClass) {\n _a.FormioClass.setApiUrl(url);\n }\n }\n static setProjectUrl(url, norecurse = false) {\n _a.projectUrl = url;\n if (!norecurse && _a.FormioClass) {\n _a.FormioClass.setProjectUrl(url);\n }\n }\n static setAppUrl(url, norecurse = false) {\n _a.projectUrl = url;\n if (!norecurse && _a.FormioClass) {\n _a.FormioClass.setAppUrl(url);\n }\n }\n static setPathType(type, norecurse = false) {\n _a.pathType = type;\n if (!norecurse && _a.FormioClass) {\n _a.FormioClass.setPathType(type);\n }\n }\n static debug(...args) {\n if (_a.config.debug) {\n console.log(...args);\n }\n }\n static clearCache() {\n if (_a.FormioClass) {\n _a.FormioClass.clearCache();\n }\n }\n static global(prop, flag = '') {\n const globalValue = window[prop];\n if (flag && globalValue && !globalValue[flag]) {\n return null;\n }\n _a.debug(`Getting global ${prop}`, globalValue);\n return globalValue;\n }\n static use(module) {\n if (_a.FormioClass && _a.FormioClass.isRenderer) {\n _a.FormioClass.use(module);\n }\n else {\n _a.modules.push(module);\n }\n }\n static createElement(type, attrs, children) {\n const element = document.createElement(type);\n if (!attrs) {\n return element;\n }\n Object.keys(attrs).forEach(key => {\n element.setAttribute(key, attrs[key]);\n });\n (children || []).forEach(child => {\n element.appendChild(_a.createElement(child.tag, child.attrs, child.children));\n });\n return element;\n }\n static addScript(wrapper, src, name, flag = '') {\n return __awaiter(this, void 0, void 0, function* () {\n if (!src) {\n return Promise.resolve();\n }\n if (typeof src !== 'string' && src.length) {\n return Promise.all(src.map(ref => _a.addScript(wrapper, ref)));\n }\n if (name && _a.global(name, flag)) {\n _a.debug(`${name} already loaded.`);\n return Promise.resolve(_a.global(name));\n }\n _a.debug('Adding Script', src);\n try {\n wrapper.appendChild(_a.createElement('script', {\n src\n }));\n }\n catch (err) {\n _a.debug(err);\n return Promise.resolve();\n }\n if (!name) {\n return Promise.resolve();\n }\n return new Promise((resolve) => {\n _a.debug(`Waiting to load ${name}`);\n const wait = setInterval(() => {\n if (_a.global(name, flag)) {\n clearInterval(wait);\n _a.debug(`${name} loaded.`);\n resolve(_a.global(name));\n }\n }, 100);\n });\n });\n }\n static addStyles(wrapper, href) {\n return __awaiter(this, void 0, void 0, function* () {\n if (!href) {\n return;\n }\n if (typeof href !== 'string' && href.length) {\n href.forEach(ref => _a.addStyles(wrapper, ref));\n return;\n }\n _a.debug('Adding Styles', href);\n wrapper.appendChild(_a.createElement('link', {\n rel: 'stylesheet',\n href\n }));\n });\n }\n static submitDone(instance, submission) {\n return __awaiter(this, void 0, void 0, function* () {\n _a.debug('Submision Complete', submission);\n if (_a.config.submitDone) {\n _a.config.submitDone(submission, instance);\n }\n const successMessage = (_a.config.success || '').toString();\n if (successMessage && successMessage.toLowerCase() !== 'false' && instance.element) {\n instance.element.innerHTML = `<div class=\"alert-success\" role=\"alert\">${successMessage}</div>`;\n }\n let returnUrl = _a.config.redirect;\n // Allow form based configuration for return url.\n if (!returnUrl &&\n (instance._form &&\n instance._form.settings &&\n (instance._form.settings.returnUrl ||\n instance._form.settings.redirect))) {\n _a.debug('Return url found in form configuration');\n returnUrl = instance._form.settings.returnUrl || instance._form.settings.redirect;\n }\n if (returnUrl) {\n const formSrc = instance.formio ? instance.formio.formUrl : '';\n const hasQuery = !!returnUrl.match(/\\?/);\n const isOrigin = returnUrl.indexOf(location.origin) === 0;\n returnUrl += hasQuery ? '&' : '?';\n returnUrl += `sub=${submission._id}`;\n if (!isOrigin && formSrc) {\n returnUrl += `&form=${encodeURIComponent(formSrc)}`;\n }\n _a.debug('Return URL', returnUrl);\n window.location.href = returnUrl;\n if (isOrigin) {\n window.location.reload();\n }\n }\n });\n }\n // Return the full script if the builder is being used.\n static formioScript(script, builder) {\n builder = builder || _a.config.includeBuilder;\n if (_a.fullAdded || builder) {\n _a.fullAdded = true;\n return script.replace('formio.form', 'formio.full');\n }\n return script;\n }\n static addLibrary(libWrapper, lib, name) {\n return __awaiter(this, void 0, void 0, function* () {\n if (!lib) {\n return;\n }\n if (lib.dependencies) {\n for (let i = 0; i < lib.dependencies.length; i++) {\n const libName = lib.dependencies[i];\n yield _a.addLibrary(libWrapper, _a.config.libs[libName], libName);\n }\n }\n if (lib.css) {\n yield _a.addStyles((lib.global ? document.body : libWrapper), lib.css);\n }\n if (lib.js) {\n const module = yield _a.addScript((lib.global ? document.body : libWrapper), lib.js, lib.use ? name : false);\n if (lib.use) {\n _a.debug(`Using ${name}`);\n const options = lib.options || {};\n if (!options.license && _a.license) {\n options.license = _a.license;\n }\n _a.use((typeof lib.use === 'function' ? lib.use(module) : module), options);\n }\n }\n if (lib.globalStyle) {\n const style = _a.createElement('style');\n style.type = 'text/css';\n style.innerHTML = lib.globalStyle;\n document.body.appendChild(style);\n }\n });\n }\n static addLoader(wrapper) {\n return __awaiter(this, void 0, void 0, function* () {\n wrapper.appendChild(_a.createElement('div', {\n 'class': 'formio-loader'\n }, [{\n tag: 'div',\n attrs: {\n class: 'loader-wrapper'\n },\n children: [{\n tag: 'div',\n attrs: {\n class: 'loader text-center'\n }\n }]\n }]));\n });\n }\n // eslint-disable-next-line max-statements\n static init(element, options = {}, builder = false) {\n return __awaiter(this, void 0, void 0, function* () {\n _a.cdn = new CDN_js_1.default(_a.config.cdn, _a.config.cdnUrls || {});\n _a.config.libs = _a.config.libs || {\n uswds: {\n dependencies: ['fontawesome'],\n js: `${_a.cdn.uswds}/uswds.min.js`,\n css: `${_a.cdn.uswds}/uswds.min.css`,\n use: true\n },\n fontawesome: {\n // Due to an issue with font-face not loading in the shadowdom (https://issues.chromium.org/issues/41085401), we need\n // to do 2 things. 1.) Load the fonts from the global cdn, and 2.) add the font-face to the global styles on the page.\n css: `https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css`,\n globalStyle: `@font-face {\n font-family: 'FontAwesome';\n src: url('https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/fonts/fontawesome-webfont.eot?v=4.7.0');\n src: url('https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/fonts/fontawesome-webfont.eot?#iefix&v=4.7.0') format('embedded-opentype'), url('https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/fonts/fontawesome-webfont.woff2?v=4.7.0') format('woff2'), url('https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/fonts/fontawesome-webfont.woff?v=4.7.0') format('woff'), url('https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/fonts/fontawesome-webfont.ttf?v=4.7.0') format('truetype'), url('https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular') format('svg');\n font-weight: normal;\n font-style: normal;\n }`\n },\n bootstrap4: {\n dependencies: ['fontawesome'],\n css: `${_a.cdn.bootstrap4}/css/bootstrap.min.css`\n },\n bootstrap: {\n dependencies: ['bootstrap-icons'],\n css: `${_a.cdn.bootstrap}/css/bootstrap.min.css`\n },\n 'bootstrap-icons': {\n // Due to an issue with font-face not loading in the shadowdom (https://issues.chromium.org/issues/41085401), we need\n // to do 2 things. 1.) Load the fonts from the global cdn, and 2.) add the font-face to the global styles on the page.\n css: 'https://cdn.jsdelivr.net/npm/bootstrap-icons/font/bootstrap-icons.min.css',\n globalStyle: `@font-face {\n font-display: block;\n font-family: \"bootstrap-icons\";\n src: url(\"https://cdn.jsdelivr.net/npm/bootstrap-icons/font/fonts/bootstrap-icons.woff2?dd67030699838ea613ee6dbda90effa6\") format(\"woff2\"),\n url(\"https://cdn.jsdelivr.net/npm/bootstrap-icons/font/fonts/bootstrap-icons.woff?dd67030699838ea613ee6dbda90effa6\") format(\"woff\");\n }`\n }\n };\n // Add all bootswatch templates.\n ['cerulean', 'cosmo', 'cyborg', 'darkly', 'flatly', 'journal', 'litera', 'lumen', 'lux', 'materia', 'minty', 'pulse', 'sandstone', 'simplex', 'sketchy', 'slate', 'solar', 'spacelab', 'superhero', 'united', 'yeti'].forEach((template) => {\n _a.config.libs[template] = {\n dependencies: ['bootstrap-icons'],\n css: `${_a.cdn.bootswatch}/dist/${template}/bootstrap.min.css`\n };\n });\n const id = _a.config.id || `formio-${Math.random().toString(36).substring(7)}`;\n // Create a new wrapper and add the element inside of a new wrapper.\n let wrapper = _a.createElement('div', {\n 'id': `${id}-wrapper`\n });\n element.parentNode.insertBefore(wrapper, element);\n // If we include the libraries, then we will attempt to run this in shadow dom.\n const useShadowDom = _a.config.includeLibs && !_a.config.noshadow && (typeof wrapper.attachShadow === 'function');\n if (useShadowDom) {\n wrapper = wrapper.attachShadow({\n mode: 'open'\n });\n options.shadowRoot = wrapper;\n }\n element.parentNode.removeChild(element);\n wrapper.appendChild(element);\n // If this is inside of shadow dom, then we need to add the styles and scripts to the shadow dom.\n const libWrapper = useShadowDom ? wrapper : document.body;\n // Load the renderer styles.\n yield _a.addStyles(libWrapper, _a.config.embedCSS || `${_a.cdn.js}/formio.embed.css`);\n // Add a loader.\n _a.addLoader(wrapper);\n const formioSrc = _a.config.full ? 'formio.full' : 'formio.form';\n const renderer = _a.config.debug ? formioSrc : `${formioSrc}.min`;\n _a.FormioClass = yield _a.addScript(libWrapper, _a.formioScript(_a.config.script || `${_a.cdn.js}/${renderer}.js`, builder), 'Formio', builder ? 'isBuilder' : 'isRenderer');\n _a.FormioClass.cdn = _a.cdn;\n _a.FormioClass.setBaseUrl(options.baseUrl || _a.baseUrl || _a.config.base);\n _a.FormioClass.setProjectUrl(options.projectUrl || _a.projectUrl || _a.config.project);\n _a.FormioClass.language = _a.language;\n _a.setLicense(_a.license || _a.config.license || false);\n _a.modules.forEach((module) => {\n _a.FormioClass.use(module);\n });\n if (_a.icons) {\n _a.FormioClass.icons = _a.icons;\n }\n if (_a.pathType) {\n _a.FormioClass.setPathType(_a.pathType);\n }\n // Add libraries if they wish to include the libs.\n if (_a.config.template && _a.config.includeLibs) {\n yield _a.addLibrary(libWrapper, _a.config.libs[_a.config.template], _a.config.template);\n }\n if (!_a.config.libraries) {\n _a.config.libraries = _a.config.modules || {};\n }\n // Adding premium if it is provided via the config.\n if (_a.config.premium) {\n _a.config.libraries.premium = _a.config.premium;\n }\n // Allow adding dynamic modules.\n if (_a.config.libraries) {\n for (const name in _a.config.libraries) {\n const lib = _a.config.libraries[name];\n lib.use = lib.use || true;\n yield _a.addLibrary(libWrapper, lib, name);\n }\n }\n yield _a.addStyles(libWrapper, _a.formioScript(_a.config.style || `${_a.cdn.js}/${renderer}.css`, builder));\n if (_a.config.before) {\n yield _a.config.before(_a.FormioClass, element, _a.config);\n }\n _a.FormioClass.license = true;\n _a._formioReady(_a.FormioClass);\n return wrapper;\n });\n }\n // Called after an instance has been created.\n static afterCreate(instance, wrapper, readyEvent) {\n return __awaiter(this, void 0, void 0, function* () {\n const loader = wrapper.querySelector('.formio-loader');\n if (loader) {\n wrapper.removeChild(loader);\n }\n _a.FormioClass.events.emit(readyEvent, instance);\n if (_a.config.after) {\n _a.debug('Calling ready callback');\n _a.config.after(instance, _a.config);\n }\n return instance;\n });\n }\n // Create a new form.\n static createForm(element, form, options = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n if (_a.FormioClass) {\n return _a.FormioClass.createForm(element, form, Object.assign(Object.assign({}, options), { noLoader: true }));\n }\n const wrapper = yield _a.init(element, options);\n return _a.FormioClass.createForm(element, form, Object.assign(Object.assign({}, options), { noLoader: true })).then((instance) => {\n // Set the default submission data.\n if (_a.config.submission) {\n _a.debug('Setting submission', _a.config.submission);\n instance.submission = _a.config.submission;\n }\n // Call the after create method.\n _a.afterCreate(instance, wrapper, 'formEmbedded');\n return instance;\n });\n });\n }\n // Create a form builder.\n static builder(element, form, options = {}) {\n var _b;\n return __awaiter(this, void 0, void 0, function* () {\n if ((_b = _a.FormioClass) === null || _b === void 0 ? void 0 : _b.builder) {\n return _a.FormioClass.builder(element, form, options);\n }\n const wrapper = yield _a.init(element, options, true);\n return _a.FormioClass.builder(element, form, options).then((instance) => {\n _a.afterCreate(instance, wrapper, 'builderEmbedded');\n return instance;\n });\n });\n }\n}\nexports.Formio = Formio;\n_a = Formio;\nFormio.FormioClass = null;\nFormio.config = {};\nFormio.modules = [];\nFormio.icons = '';\nFormio.license = '';\nFormio.formioReady = new Promise((ready, reject) => {\n _a._formioReady = ready;\n _a._formioReadyReject = reject;\n});\nFormio.version = '5.0.2-rc.1';\n// Create a report.\nFormio.Report = {\n create: (element, submission, options = {}) => __awaiter(void 0, void 0, void 0, function* () {\n var _b;\n if ((_b = _a.FormioClass) === null || _b === void 0 ? void 0 : _b.Report) {\n return _a.FormioClass.Report.create(element, submission, options);\n }\n const wrapper = yield _a.init(element, options, true);\n return _a.FormioClass.Report.create(element, submission, options).then((instance) => {\n _a.afterCreate(instance, wrapper, 'reportEmbedded');\n return instance;\n });\n })\n};\nCDN_js_1.default.defaultCDN = Formio.version.includes('rc') ? 'https://cdn.test-form.io' : 'https://cdn.form.io';\nclass Form {\n constructor(element, form, options) {\n this.form = form;\n this.element = element;\n this.options = options || {};\n this.init();\n this.instance = {\n proxy: true,\n ready: this.ready,\n destroy: () => { }\n };\n }\n init() {\n if (this.instance && !this.instance.proxy) {\n this.instance.destroy();\n }\n this.element.innerHTML = '';\n this.ready = this.create().then((instance) => {\n this.instance = instance;\n this.form = instance.form;\n return instance;\n });\n }\n create() {\n return Formio.createForm(this.element, this.form, this.options);\n }\n setForm(form) {\n this.form = form;\n if (this.instance) {\n this.instance.setForm(form);\n }\n }\n setDisplay(display) {\n if (this.instance.proxy) {\n return this.ready;\n }\n this.form.display = display;\n this.instance.destroy();\n this.ready = this.create().then((instance) => {\n this.instance = instance;\n this.setForm(this.form);\n });\n return this.ready;\n }\n}\nexports.Form = Form;\nclass FormBuilder extends Form {\n create() {\n return Formio.builder(this.element, this.form, this.options);\n }\n}\nexports.FormBuilder = FormBuilder;\nFormio.Form = Form;\nFormio.FormBuilder = FormBuilder;\n\n\n//# sourceURL=webpack://Formio/./lib/cjs/Embed.js?");
|
10891
10891
|
|
10892
10892
|
/***/ }),
|
10893
10893
|
|
@@ -10898,7 +10898,7 @@ eval("\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _argument
|
|
10898
10898
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
10899
10899
|
|
10900
10900
|
"use strict";
|
10901
|
-
eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Formio = void 0;\nconst sdk_1 = __webpack_require__(/*! @formio/core/sdk */ \"./node_modules/@formio/core/lib/sdk/index.js\");\nObject.defineProperty(exports, \"Formio\", ({ enumerable: true, get: function () { return sdk_1.Formio; } }));\nconst Embed_1 = __webpack_require__(/*! ./Embed */ \"./lib/cjs/Embed.js\");\nconst CDN_1 = __importDefault(__webpack_require__(/*! ./CDN */ \"./lib/cjs/CDN.js\"));\nconst providers_1 = __importDefault(__webpack_require__(/*! ./providers */ \"./lib/cjs/providers/index.js\"));\nsdk_1.Formio.cdn = new CDN_1.default();\nsdk_1.Formio.Providers = providers_1.default;\nsdk_1.Formio.version = '5.0.
|
10901
|
+
eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Formio = void 0;\nconst sdk_1 = __webpack_require__(/*! @formio/core/sdk */ \"./node_modules/@formio/core/lib/sdk/index.js\");\nObject.defineProperty(exports, \"Formio\", ({ enumerable: true, get: function () { return sdk_1.Formio; } }));\nconst Embed_1 = __webpack_require__(/*! ./Embed */ \"./lib/cjs/Embed.js\");\nconst CDN_1 = __importDefault(__webpack_require__(/*! ./CDN */ \"./lib/cjs/CDN.js\"));\nconst providers_1 = __importDefault(__webpack_require__(/*! ./providers */ \"./lib/cjs/providers/index.js\"));\nsdk_1.Formio.cdn = new CDN_1.default();\nsdk_1.Formio.Providers = providers_1.default;\nsdk_1.Formio.version = '5.0.2-rc.1';\nCDN_1.default.defaultCDN = sdk_1.Formio.version.includes('rc') ? 'https://cdn.test-form.io' : 'https://cdn.form.io';\nconst isNil = (val) => val === null || val === undefined;\nsdk_1.Formio.prototype.uploadFile = function (storage, file, fileName, dir, progressCallback, url, options, fileKey, groupPermissions, groupId, uploadStartCallback, abortCallback, multipartOptions) {\n const requestArgs = {\n provider: storage,\n method: 'upload',\n file: file,\n fileName: fileName,\n dir: dir\n };\n fileKey = fileKey || 'file';\n const request = sdk_1.Formio.pluginWait('preRequest', requestArgs)\n .then(() => {\n return sdk_1.Formio.pluginGet('fileRequest', requestArgs)\n .then((result) => {\n if (storage && isNil(result)) {\n const Provider = providers_1.default.getProvider('storage', storage);\n if (Provider) {\n const provider = new Provider(this);\n if (uploadStartCallback) {\n uploadStartCallback();\n }\n return provider.uploadFile(file, fileName, dir, progressCallback, url, options, fileKey, groupPermissions, groupId, abortCallback, multipartOptions);\n }\n else {\n throw ('Storage provider not found');\n }\n }\n return result || { url: '' };\n });\n });\n return sdk_1.Formio.pluginAlter('wrapFileRequestPromise', request, requestArgs);\n};\nsdk_1.Formio.prototype.downloadFile = function (file, options) {\n const requestArgs = {\n method: 'download',\n file: file\n };\n const request = sdk_1.Formio.pluginWait('preRequest', requestArgs)\n .then(() => {\n return sdk_1.Formio.pluginGet('fileRequest', requestArgs)\n .then((result) => {\n if (file.storage && isNil(result)) {\n const Provider = providers_1.default.getProvider('storage', file.storage);\n if (Provider) {\n const provider = new Provider(this);\n return provider.downloadFile(file, options);\n }\n else {\n throw ('Storage provider not found');\n }\n }\n return result || { url: '' };\n });\n });\n return sdk_1.Formio.pluginAlter('wrapFileRequestPromise', request, requestArgs);\n};\nsdk_1.Formio.prototype.deleteFile = function (file, options) {\n const requestArgs = {\n method: 'delete',\n file: file\n };\n const request = sdk_1.Formio.pluginWait('preRequest', requestArgs)\n .then(() => {\n return sdk_1.Formio.pluginGet('fileRequest', requestArgs)\n .then((result) => {\n if (file.storage && isNil(result)) {\n const Provider = providers_1.default.getProvider('storage', file.storage);\n if (Provider) {\n const provider = new Provider(this);\n return provider.deleteFile(file, options);\n }\n else {\n throw ('Storage provider not found');\n }\n }\n return result || { url: '' };\n });\n });\n return sdk_1.Formio.pluginAlter('wrapFileRequestPromise', request, requestArgs);\n};\n// Esnure we proxy the following methods to the FormioEmbed class.\n['setBaseUrl', 'setApiUrl', 'setAppUrl', 'setProjectUrl', 'setPathType', 'setLicense'].forEach((fn) => {\n const baseFn = sdk_1.Formio[fn];\n sdk_1.Formio[fn] = function (arg) {\n const retVal = Embed_1.Formio[fn](arg, true);\n return baseFn ? baseFn.call(this, arg) : retVal;\n };\n});\n// For reverse compatability.\nsdk_1.Formio.Promise = Promise;\nsdk_1.Formio.formioReady = Embed_1.Formio.formioReady;\nsdk_1.Formio.config = Embed_1.Formio.config;\nsdk_1.Formio.builder = Embed_1.Formio.builder;\nsdk_1.Formio.Report = Embed_1.Formio.Report;\nsdk_1.Formio.Form = Embed_1.Formio.Form;\nsdk_1.Formio.FormBuilder = Embed_1.Formio.FormBuilder;\nsdk_1.Formio.use = Embed_1.Formio.use;\nsdk_1.Formio.createForm = Embed_1.Formio.createForm;\nsdk_1.Formio.submitDone = Embed_1.Formio.submitDone;\nsdk_1.Formio.addLibrary = Embed_1.Formio.addLibrary;\nsdk_1.Formio.addLoader = Embed_1.Formio.addLoader;\nsdk_1.Formio.addToGlobal = (global) => {\n if (typeof global === 'object' && !global.Formio) {\n global.Formio = sdk_1.Formio;\n }\n};\nif (typeof __webpack_require__.g !== 'undefined') {\n sdk_1.Formio.addToGlobal(__webpack_require__.g);\n}\nif (typeof window !== 'undefined') {\n sdk_1.Formio.addToGlobal(window);\n}\nEmbed_1.Formio._formioReady(sdk_1.Formio);\n\n\n//# sourceURL=webpack://Formio/./lib/cjs/Formio.js?");
|
10902
10902
|
|
10903
10903
|
/***/ }),
|
10904
10904
|
|