@formio/js 5.0.0-dev.5759.a3476ed → 5.0.0-dev.5764.34bd69a
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.form.js +1 -1
- package/dist/formio.form.min.js +1 -1
- package/dist/formio.full.js +2 -2
- package/dist/formio.full.min.js +1 -1
- package/lib/cjs/components/signature/editForm/Signature.edit.display.d.ts +6 -0
- package/lib/cjs/components/signature/editForm/Signature.edit.display.js +1 -0
- package/lib/cjs/components/time/Time.js +0 -5
- package/lib/mjs/components/signature/editForm/Signature.edit.display.d.ts +6 -0
- package/lib/mjs/components/signature/editForm/Signature.edit.display.js +1 -0
- package/lib/mjs/components/time/Time.js +0 -11
- package/package.json +1 -1
package/dist/formio.full.js
CHANGED
|
@@ -7059,7 +7059,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexpo
|
|
|
7059
7059
|
/***/ (function(__unused_webpack_module, exports) {
|
|
7060
7060
|
|
|
7061
7061
|
"use strict";
|
|
7062
|
-
eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports[\"default\"] = [\n {\n type: 'textfield',\n input: true,\n key: 'footer',\n label: 'Footer Label',\n tooltip: 'The footer text that appears below the signature area.',\n placeholder: 'Footer Label',\n weight: 10\n },\n {\n type: 'textfield',\n input: true,\n key: 'width',\n label: 'Width',\n tooltip: 'The width of the signature area.',\n placeholder: 'Width',\n conditional: {\n json: { '!': [{ var: 'data.keepOverlayRatio' }] },\n },\n weight: 50\n },\n {\n type: 'textfield',\n input: true,\n key: 'height',\n label: 'Height',\n tooltip: 'The height of the signature area.',\n placeholder: 'Height', conditional: {\n json: { '!': [{ var: 'data.keepOverlayRatio' }] },\n },\n weight: 51\n },\n {\n weight: 52,\n type: 'checkbox',\n label: 'Keep Overlay Aspect Ratio',\n tooltip: 'If checked, the field will have the same aspect ratio as its preview.',\n key: 'keepOverlayRatio',\n input: true\n },\n {\n type: 'textfield',\n input: true,\n key: 'backgroundColor',\n label: 'Background Color',\n tooltip: 'The background color of the signature area.',\n placeholder: 'Background Color',\n weight: 52\n },\n {\n type: 'textfield',\n input: true,\n key: 'penColor',\n label: 'Pen Color',\n tooltip: 'The ink color for the signature area.',\n placeholder: 'Pen Color',\n weight: 53\n },\n {\n key: 'placeholder',\n ignore: true,\n },\n {\n key: 'autofocus',\n ignore: true,\n },\n];\n\n\n//# sourceURL=webpack://Formio/./lib/cjs/components/signature/editForm/Signature.edit.display.js?");
|
|
7062
|
+
eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports[\"default\"] = [\n {\n type: 'textfield',\n input: true,\n key: 'footer',\n label: 'Footer Label',\n tooltip: 'The footer text that appears below the signature area.',\n placeholder: 'Footer Label',\n weight: 10\n },\n {\n type: 'textfield',\n input: true,\n key: 'width',\n label: 'Width',\n tooltip: 'The width of the signature area.',\n placeholder: 'Width',\n conditional: {\n json: { '!': [{ var: 'data.keepOverlayRatio' }] },\n },\n weight: 50\n },\n {\n type: 'textfield',\n input: true,\n key: 'height',\n label: 'Height',\n tooltip: 'The height of the signature area.',\n placeholder: 'Height', conditional: {\n json: { '!': [{ var: 'data.keepOverlayRatio' }] },\n },\n weight: 51\n },\n {\n weight: 52,\n type: 'checkbox',\n label: 'Keep Overlay Aspect Ratio',\n tooltip: 'If checked, the field will have the same aspect ratio as its preview.',\n key: 'keepOverlayRatio',\n customConditional: ({ options }) => { var _a; return (((_a = options === null || options === void 0 ? void 0 : options.editForm) === null || _a === void 0 ? void 0 : _a.display) === 'pdf'); },\n input: true\n },\n {\n type: 'textfield',\n input: true,\n key: 'backgroundColor',\n label: 'Background Color',\n tooltip: 'The background color of the signature area.',\n placeholder: 'Background Color',\n weight: 52\n },\n {\n type: 'textfield',\n input: true,\n key: 'penColor',\n label: 'Pen Color',\n tooltip: 'The ink color for the signature area.',\n placeholder: 'Pen Color',\n weight: 53\n },\n {\n key: 'placeholder',\n ignore: true,\n },\n {\n key: 'autofocus',\n ignore: true,\n },\n];\n\n\n//# sourceURL=webpack://Formio/./lib/cjs/components/signature/editForm/Signature.edit.display.js?");
|
|
7063
7063
|
|
|
7064
7064
|
/***/ }),
|
|
7065
7065
|
|
|
@@ -7345,7 +7345,7 @@ eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
7345
7345
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
7346
7346
|
|
|
7347
7347
|
"use strict";
|
|
7348
|
-
eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nconst moment_1 = __importDefault(__webpack_require__(/*! moment */ \"./node_modules/moment/moment.js\"));\nconst TextField_1 = __importDefault(__webpack_require__(/*! ../textfield/TextField */ \"./lib/cjs/components/textfield/TextField.js\"));\nconst utils_1 = __webpack_require__(/*! ../../utils/utils */ \"./lib/cjs/utils/utils.js\");\nconst defaultDataFormat = 'HH:mm:ss';\nclass TimeComponent extends TextField_1.default {\n static schema(...extend) {\n return TextField_1.default.schema({\n type: 'time',\n label: 'Time',\n key: 'time',\n inputType: 'time',\n format: 'HH:mm',\n dataFormat: defaultDataFormat,\n }, ...extend);\n }\n
|
|
7348
|
+
eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nconst moment_1 = __importDefault(__webpack_require__(/*! moment */ \"./node_modules/moment/moment.js\"));\nconst TextField_1 = __importDefault(__webpack_require__(/*! ../textfield/TextField */ \"./lib/cjs/components/textfield/TextField.js\"));\nconst utils_1 = __webpack_require__(/*! ../../utils/utils */ \"./lib/cjs/utils/utils.js\");\nconst defaultDataFormat = 'HH:mm:ss';\nclass TimeComponent extends TextField_1.default {\n static schema(...extend) {\n return TextField_1.default.schema({\n type: 'time',\n label: 'Time',\n key: 'time',\n inputType: 'time',\n format: 'HH:mm',\n dataFormat: defaultDataFormat,\n }, ...extend);\n }\n constructor(component, options, data) {\n super(component, options, data);\n const { edge: isEdgeBrowser, version: edgeVersion } = (0, utils_1.getBrowserInfo)();\n this.component.inputMask = this.getInputMaskFromFormat(this.component.format);\n this.component.inputType = isEdgeBrowser && edgeVersion <= 18\n ? 'text'\n : (this.component.inputType || 'time');\n // If default value is given then the raw data needs to be set\n this.rawData = this.component.multiple ? [] : this.getValueAsString(this.defaultValue) || this.emptyValue;\n }\n static get builderInfo() {\n return {\n title: 'Time',\n icon: 'clock-o',\n group: 'advanced',\n documentation: '/userguide/form-building/advanced-components#time-1',\n weight: 55,\n schema: TimeComponent.schema(),\n };\n }\n get dataFormat() {\n return this.component.dataFormat || defaultDataFormat;\n }\n get defaultSchema() {\n return TimeComponent.schema();\n }\n get defaultValue() {\n let value = super.defaultValue;\n if (this.component.multiple && Array.isArray(value)) {\n value = value.map(item => item ? this.getStringAsValue(item) : item);\n }\n else {\n if (value) {\n value = this.getStringAsValue(value);\n }\n }\n return value;\n }\n get validationValue() {\n if ((Array.isArray(this.rawData) && !this.rawData.length) || !this.rawData) {\n return this.dataValue;\n }\n return this.rawData;\n }\n get inputInfo() {\n const info = super.inputInfo;\n info.attr.type = this.component.inputType;\n return info;\n }\n get skipMaskValidation() {\n return true;\n }\n isNotCompleteInput(value) {\n return value.includes('_');\n }\n removeValue(index) {\n this.rawData = Array.isArray(this.rawData) ? [...this.rawData.slice(0, index), ...this.rawData.slice(index + 1)] : this.emptyValue;\n super.removeValue(index);\n }\n resetRawData(index) {\n if (index) {\n this.setRawValue(this.emptyValue, index);\n }\n else {\n this.rawData = [];\n }\n }\n setRawValue(value, index) {\n if (Array.isArray(this.rawData)) {\n this.rawData[index] = value;\n }\n else {\n this.rawData = value;\n }\n }\n getRawValue(index) {\n if (index && Array.isArray(this.rawData)) {\n return this.rawData[index] || this.emptyValue;\n }\n else {\n return this.rawData;\n }\n }\n getValueAt(index) {\n if (!this.refs.input.length || !this.refs.input[index]) {\n return this.emptyValue;\n }\n const { value } = this.refs.input[index];\n if (!value) {\n this.resetRawData(index);\n return this.emptyValue;\n }\n this.setRawValue(value, index);\n return this.getStringAsValue(value);\n }\n setValueAt(index, value) {\n this.setRawValue(value ? this.getValueAsString(value) : value, index);\n this.refs.input[index].value = this.getRawValue(index);\n }\n getStringAsValue(view) {\n return view ? (0, moment_1.default)(view, this.component.format).format(this.component.dataFormat) : view;\n }\n getValueAsString(value) {\n if (Array.isArray(value) && this.component.multiple) {\n return value.map(item => (0, moment_1.default)(item, this.component.dataFormat).format(this.component.format)).join(', ');\n }\n return (value ? (0, moment_1.default)(value, this.component.dataFormat).format(this.component.format) : value) || '';\n }\n getInputMaskFromFormat(format) {\n if (format === 'LT') {\n return '99:99 AA';\n }\n if (format === 'LTS') {\n return '99:99:99 AA';\n }\n return format.replace(/[hHmMsSk]/g, '9')\n .replace(/[aA]/, 'AA');\n }\n addFocusBlurEvents(element) {\n super.addFocusBlurEvents(element);\n this.addEventListener(element, 'blur', () => {\n element.value = this.getValueAsString(element.value);\n });\n }\n}\nexports[\"default\"] = TimeComponent;\n\n\n//# sourceURL=webpack://Formio/./lib/cjs/components/time/Time.js?");
|
|
7349
7349
|
|
|
7350
7350
|
/***/ }),
|
|
7351
7351
|
|