@unicef-polymer/etools-form-builder 1.0.3 → 2.1.0-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/form-attachments-popup/form-attachments-popup.d.ts +10 -2
- package/dist/form-attachments-popup/form-attachments-popup.js +53 -48
- package/dist/form-attachments-popup/form-attachments-popup.tpl.d.ts +0 -5
- package/dist/form-attachments-popup/form-attachments-popup.tpl.js +79 -85
- package/dist/form-fields/abstract-field-base.class.d.ts +28 -0
- package/dist/form-fields/{base-field.js → abstract-field-base.class.js} +133 -112
- package/dist/form-fields/custom-elements.define.js +17 -5
- package/dist/form-fields/field-renderer-component.d.ts +20 -0
- package/dist/form-fields/field-renderer-component.js +245 -0
- package/dist/form-fields/index.d.ts +9 -5
- package/dist/form-fields/index.js +9 -5
- package/dist/form-fields/repeatable-fields/repeatable-attachment-field.d.ts +17 -0
- package/dist/form-fields/repeatable-fields/repeatable-attachment-field.js +198 -0
- package/dist/form-fields/repeatable-fields/repeatable-base-field.d.ts +20 -0
- package/dist/form-fields/repeatable-fields/repeatable-base-field.js +123 -0
- package/dist/form-fields/repeatable-fields/repeatable-number-field.d.ts +10 -0
- package/dist/form-fields/repeatable-fields/repeatable-number-field.js +56 -0
- package/dist/form-fields/repeatable-fields/repeatable-scale-field.d.ts +15 -0
- package/dist/form-fields/repeatable-fields/repeatable-scale-field.js +104 -0
- package/dist/form-fields/repeatable-fields/repeatable-text-field.d.ts +8 -0
- package/dist/form-fields/repeatable-fields/repeatable-text-field.js +43 -0
- package/dist/form-fields/single-fields/attachment-field.d.ts +16 -0
- package/dist/form-fields/single-fields/attachment-field.js +87 -0
- package/dist/form-fields/single-fields/base-field.d.ts +11 -0
- package/dist/form-fields/single-fields/base-field.js +57 -0
- package/dist/form-fields/single-fields/boolean-field.d.ts +8 -0
- package/dist/form-fields/single-fields/boolean-field.js +39 -0
- package/dist/form-fields/{number-field.d.ts → single-fields/number-field.d.ts} +1 -0
- package/dist/form-fields/{number-field.js → single-fields/number-field.js} +34 -21
- package/dist/form-fields/{scale-field.d.ts → single-fields/scale-field.d.ts} +4 -2
- package/dist/form-fields/{scale-field.js → single-fields/scale-field.js} +66 -54
- package/dist/form-fields/{text-field.d.ts → single-fields/text-field.d.ts} +0 -0
- package/dist/form-fields/{text-field.js → single-fields/text-field.js} +26 -21
- package/dist/form-fields/wide-field.d.ts +1 -1
- package/dist/form-fields/wide-field.js +3 -3
- package/dist/form-groups/form-abstract-group.d.ts +12 -12
- package/dist/form-groups/form-abstract-group.js +189 -166
- package/dist/form-groups/form-card.d.ts +1 -0
- package/dist/form-groups/form-card.js +35 -10
- package/dist/form-groups/form-collapsed-card.d.ts +3 -1
- package/dist/form-groups/form-collapsed-card.js +45 -25
- package/dist/index.d.ts +1 -1
- package/dist/index.js +6 -1
- package/dist/lib/additional-components/confirmation-dialog.d.ts +16 -0
- package/dist/lib/additional-components/confirmation-dialog.js +61 -0
- package/dist/lib/additional-components/etools-fb-card.js +135 -128
- package/dist/lib/styles/attachments.styles.js +69 -66
- package/dist/lib/styles/form-builder-card.styles.js +46 -41
- package/dist/lib/styles/input-styles.js +53 -64
- package/dist/lib/styles/page-layout-styles.js +198 -198
- package/dist/lib/types/form-builder.interfaces.d.ts +2 -2
- package/dist/lib/types/form-builder.types.d.ts +8 -2
- package/dist/lib/utils/validations.helper.d.ts +3 -3
- package/dist/lib/utils/validations.helper.js +7 -7
- package/package.json +53 -52
- package/dist/form-fields/base-field.d.ts +0 -20
package/package.json
CHANGED
|
@@ -1,52 +1,53 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@unicef-polymer/etools-form-builder",
|
|
3
|
-
"description": "Etools FM Form Builder components",
|
|
4
|
-
"version": "1.0.
|
|
5
|
-
"contributors": [
|
|
6
|
-
"eTools Team"
|
|
7
|
-
],
|
|
8
|
-
"license": "BSD-3-Clause",
|
|
9
|
-
"repository": "https://github.com/unicef-polymer/fm-form-builder",
|
|
10
|
-
"main": "dist/index.js",
|
|
11
|
-
"types": "dist/index.d.ts",
|
|
12
|
-
"files": [
|
|
13
|
-
"dist"
|
|
14
|
-
],
|
|
15
|
-
"scripts": {
|
|
16
|
-
"build": "tsc --skipLibCheck",
|
|
17
|
-
"lint": "eslint src/",
|
|
18
|
-
"prepare": "rm -rf ./dist && npm run build",
|
|
19
|
-
"prepublishOnly": "npm run lint"
|
|
20
|
-
},
|
|
21
|
-
"dependencies": {
|
|
22
|
-
"@polymer/iron-collapse": "^3.0.1",
|
|
23
|
-
"@polymer/iron-icons": "^3.0.1",
|
|
24
|
-
"@polymer/paper-button": "^3.0.1",
|
|
25
|
-
"@polymer/paper-input": "^3.0.2",
|
|
26
|
-
"@polymer/paper-radio-button": "^3.0.1",
|
|
27
|
-
"@polymer/paper-radio-group": "^3.0.1",
|
|
28
|
-
"@polymer/paper-toast": "^3.0.1",
|
|
29
|
-
"@
|
|
30
|
-
"@
|
|
31
|
-
"@unicef-polymer/etools-
|
|
32
|
-
"@unicef-polymer/etools-
|
|
33
|
-
"@
|
|
34
|
-
"
|
|
35
|
-
"lit-
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
"@typescript-eslint/
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"eslint
|
|
45
|
-
"eslint-
|
|
46
|
-
"eslint-plugin-
|
|
47
|
-
"eslint-plugin-
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
|
|
52
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@unicef-polymer/etools-form-builder",
|
|
3
|
+
"description": "Etools FM Form Builder components",
|
|
4
|
+
"version": "2.1.0-rc.1",
|
|
5
|
+
"contributors": [
|
|
6
|
+
"eTools Team"
|
|
7
|
+
],
|
|
8
|
+
"license": "BSD-3-Clause",
|
|
9
|
+
"repository": "https://github.com/unicef-polymer/fm-form-builder",
|
|
10
|
+
"main": "dist/index.js",
|
|
11
|
+
"types": "dist/index.d.ts",
|
|
12
|
+
"files": [
|
|
13
|
+
"dist"
|
|
14
|
+
],
|
|
15
|
+
"scripts": {
|
|
16
|
+
"build": "tsc --skipLibCheck",
|
|
17
|
+
"lint": "eslint src/",
|
|
18
|
+
"prepare": "rm -rf ./dist && npm run build",
|
|
19
|
+
"prepublishOnly": "npm run lint"
|
|
20
|
+
},
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"@polymer/iron-collapse": "^3.0.1",
|
|
23
|
+
"@polymer/iron-icons": "^3.0.1",
|
|
24
|
+
"@polymer/paper-button": "^3.0.1",
|
|
25
|
+
"@polymer/paper-input": "^3.0.2",
|
|
26
|
+
"@polymer/paper-radio-button": "^3.0.1",
|
|
27
|
+
"@polymer/paper-radio-group": "^3.0.1",
|
|
28
|
+
"@polymer/paper-toast": "^3.0.1",
|
|
29
|
+
"@polymer/paper-toggle-button": "^3.0.1",
|
|
30
|
+
"@types/ramda": "^0.26.43",
|
|
31
|
+
"@unicef-polymer/etools-dialog": "5.0.0-rc.2",
|
|
32
|
+
"@unicef-polymer/etools-dropdown": "^3.7.6",
|
|
33
|
+
"@unicef-polymer/etools-upload": "^4.2.1-rc.3",
|
|
34
|
+
"@webcomponents/webcomponentsjs": "^2.6.0",
|
|
35
|
+
"lit-element": "^2.4.0",
|
|
36
|
+
"lit-translate": "^1.2.1",
|
|
37
|
+
"ramda": "^0.27.1",
|
|
38
|
+
"web-animations-js": "^2.3.2"
|
|
39
|
+
},
|
|
40
|
+
"devDependencies": {
|
|
41
|
+
"@typescript-eslint/eslint-plugin": "^3.10.1",
|
|
42
|
+
"@typescript-eslint/parser": "^3.10.1",
|
|
43
|
+
"acorn": "^8.0.4",
|
|
44
|
+
"eslint": "^7.14.0",
|
|
45
|
+
"eslint-config-prettier": "^6.15.0",
|
|
46
|
+
"eslint-plugin-html": "^6.1.1",
|
|
47
|
+
"eslint-plugin-lit": "^1.2.4",
|
|
48
|
+
"eslint-plugin-prettier": "^3.1.3",
|
|
49
|
+
"minimist": ">=0.2.1",
|
|
50
|
+
"prettier": "~2.2.0",
|
|
51
|
+
"typescript": "^3.9.7"
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { CSSResultArray, LitElement, TemplateResult } from 'lit-element';
|
|
2
|
-
import { FieldValidator } from '../lib/utils/validations.helper';
|
|
3
|
-
export declare abstract class BaseField<T> extends LitElement {
|
|
4
|
-
questionText: string;
|
|
5
|
-
isReadonly: boolean;
|
|
6
|
-
required: boolean;
|
|
7
|
-
value: T | null;
|
|
8
|
-
protected _errorMessage: string | null;
|
|
9
|
-
validators: FieldValidator[];
|
|
10
|
-
set errorMessage(message: string | null);
|
|
11
|
-
get errorMessage(): string | null;
|
|
12
|
-
protected render(): TemplateResult;
|
|
13
|
-
protected questionTemplate(): TemplateResult;
|
|
14
|
-
protected valueChanged(newValue: T): void;
|
|
15
|
-
protected validateField(value: T): void;
|
|
16
|
-
protected metaValidation(value: T): string | null;
|
|
17
|
-
protected abstract customValidation(value: T): string | null;
|
|
18
|
-
protected abstract controlTemplate(): TemplateResult;
|
|
19
|
-
static get styles(): CSSResultArray;
|
|
20
|
-
}
|