datasync-dynamic-form 1.2.4 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/DsDynamicForm.js +4 -1
- package/package.json +3 -2
package/dist/DsDynamicForm.js
CHANGED
|
@@ -8,10 +8,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
11
|
-
import { Component } from "react";
|
|
11
|
+
import React, { Component } from "react";
|
|
12
12
|
import Multiselect from 'multiselect-react-dropdown';
|
|
13
13
|
import { CTimeStamp, Randomize, SaveDataTierToDatasync, WScrollTo } from "datasync-core";
|
|
14
14
|
import { DsBlob } from "datasync-blob";
|
|
15
|
+
import { DsPdf } from "datasync-pdf";
|
|
15
16
|
// reactstrap components
|
|
16
17
|
import { Button, Label, FormGroup, Input, InputGroupText, InputGroup, Row as ReactstrapRow, Col as ReactstrapCol, } from "reactstrap";
|
|
17
18
|
const debugging = false;
|
|
@@ -415,6 +416,8 @@ export class DsDynamicForm extends Component {
|
|
|
415
416
|
return (_jsxs("div", { children: [this.getFieldLabelTitle(field), _jsx(Multiselect, { showArrow: true, options: ["Oui", "Non"], isObject: false, displayValue: "key", selectedValues: this.getFieldData(field.name) ? this.getFieldData(field.name).split(";") : [], placeholder: field.placeholder, emptyRecordMsg: "", onSelect: (selectedList, selectedItem) => { this.setFieldData(field.name, selectedList.join(";")); }, onRemove: (selectedList, selectedItem) => { this.setFieldData(field.name, selectedList.join(";")); }, disable: this.props.read_only, singleSelect: true }), this._error_label(field)] }));
|
|
416
417
|
case "blob":
|
|
417
418
|
return (_jsxs(_Fragment, { children: [this.getFieldLabelTitle(field), _jsxs("div", { className: "col-md-10", children: [_jsx(DsBlob, { item_id: field.name, readOnly: this.props.read_only ? this.props.read_only : false, Caption: `${this.getFieldPrompt(field)} ...`, data: this.getFieldData(field.name), uploadPicture: (UploadFile) => { this.setFieldData(field.name, UploadFile.data); this.checkValidation(field); }, pictureStyle: "pic", buttonStyle: "btn btn-secondary", width: field.width ? field.width : undefined, height: field.height ? field.height : undefined, maxWidth: field.maxWidth ? field.maxWidth : undefined, maxHeight: field.maxHeight ? field.maxHeight : undefined, reduceImage: field.reduceImage ? field.reduceImage : undefined }), this._error_label(field)] })] }));
|
|
419
|
+
case "pdf":
|
|
420
|
+
return (_jsxs(_Fragment, { children: [this.getFieldLabelTitle(field), _jsxs("div", { className: "col-md-10", children: [_jsx(DsPdf, { item_id: field.name, readOnly: this.props.read_only ? this.props.read_only : false, Caption: `${this.getFieldPrompt(field)} ...`, data: this.getFieldData(field.name), uploadPdf: (UploadFile) => { this.setFieldData(field.name, UploadFile.data); this.checkValidation(field); }, pictureStyle: "pic", buttonStyle: "btn btn-secondary" }), this._error_label(field)] })] }));
|
|
418
421
|
case "email":
|
|
419
422
|
return this._email_field(field);
|
|
420
423
|
case "text":
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "datasync-dynamic-form",
|
|
3
3
|
"description": "Datasync Dynamic Form component",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.3.0",
|
|
5
5
|
"main": "dist/DsDynamicForm.js",
|
|
6
6
|
"module": "dist/DsDynamicForm.js",
|
|
7
7
|
"types": "dist/types/DsDynamicForm.d.ts",
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
"license": "ISC",
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"axios": "^1.7.2",
|
|
38
|
-
"datasync-blob": "^1.1.7"
|
|
38
|
+
"datasync-blob": "^1.1.7",
|
|
39
|
+
"datasync-pdf": "^0.0.1"
|
|
39
40
|
}
|
|
40
41
|
}
|