@unicef-polymer/etools-form-builder 3.1.0 → 3.1.2
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-fields/field-renderer-component.js +2 -2
- package/dist/form-fields/repeatable-fields/repeatable-attachment-field.js +2 -2
- package/dist/form-groups/form-abstract-group.js +3 -1
- package/dist/lib/additional-components/etools-fb-card.js +11 -2
- package/dist/lib/styles/elevation-styles.js +18 -5
- package/dist/lib/utils/translate.js +1 -1
- package/package.json +17 -21
|
@@ -23,7 +23,7 @@ let FieldRendererComponent = class FieldRendererComponent extends LitElement {
|
|
|
23
23
|
return this.renderField(this.field);
|
|
24
24
|
}
|
|
25
25
|
renderField(blueprintField) {
|
|
26
|
-
|
|
26
|
+
const additionalClass = blueprintField.styling.includes(StructureTypes.ADDITIONAL)
|
|
27
27
|
? `additional-field ${blueprintField.name} `
|
|
28
28
|
: `${blueprintField.name} `;
|
|
29
29
|
const wideClass = blueprintField.styling.includes(StructureTypes.WIDE) ? 'wide-field-container ' : '';
|
|
@@ -245,7 +245,7 @@ let FieldRendererComponent = class FieldRendererComponent extends LitElement {
|
|
|
245
245
|
border-width: 0 1px 1px 1px;
|
|
246
246
|
border-color: var(--dark-divider-color);
|
|
247
247
|
}
|
|
248
|
-
}
|
|
248
|
+
}
|
|
249
249
|
@media print {
|
|
250
250
|
:host {
|
|
251
251
|
break-inside: avoid;
|
|
@@ -83,8 +83,8 @@ let RepeatableAttachmentField = class RepeatableAttachmentField extends Repeatab
|
|
|
83
83
|
}
|
|
84
84
|
attachmentsUploaded({ success, error }) {
|
|
85
85
|
success === null || success === void 0 ? void 0 : success.forEach((file, index) => {
|
|
86
|
-
var _a
|
|
87
|
-
const newIndex = (
|
|
86
|
+
var _a;
|
|
87
|
+
const newIndex = (Number((_a = this.editedValues) === null || _a === void 0 ? void 0 : _a.length) || 0) + index;
|
|
88
88
|
if (this.isUploadedAttachment(file)) {
|
|
89
89
|
this.valueChanged({
|
|
90
90
|
url: file.file_link,
|
|
@@ -316,7 +316,9 @@ let FormAbstractGroup = class FormAbstractGroup extends LitElement {
|
|
|
316
316
|
align-self: flex-end;
|
|
317
317
|
margin-right: 23px;
|
|
318
318
|
margin-top: 20px;
|
|
319
|
-
box-shadow:
|
|
319
|
+
box-shadow:
|
|
320
|
+
0 4px 5px 0 rgba(0, 0, 0, 0.14),
|
|
321
|
+
0 1px 10px 0 rgba(0, 0, 0, 0.12),
|
|
320
322
|
0 2px 4px -1px rgba(0, 0, 0, 0.4);
|
|
321
323
|
}
|
|
322
324
|
.card-header {
|
|
@@ -167,7 +167,11 @@ let EtoolsFbCard = class EtoolsFbCard extends LitElement {
|
|
|
167
167
|
<header class="card-title-box with-bottom-line flex-header" ?is-collapsible="${this.isCollapsible}">
|
|
168
168
|
${this.isCollapsible
|
|
169
169
|
? html `
|
|
170
|
-
<etools-icon
|
|
170
|
+
<etools-icon
|
|
171
|
+
name="${this.collapsed ? 'expand-more' : 'expand-less'}"
|
|
172
|
+
@click="${() => this.toggleCollapse()}"
|
|
173
|
+
>
|
|
174
|
+
</etools-icon>
|
|
171
175
|
`
|
|
172
176
|
: ''}
|
|
173
177
|
<div class="flex-header__title">${this.cardTitle}</div>
|
|
@@ -175,7 +179,12 @@ let EtoolsFbCard = class EtoolsFbCard extends LitElement {
|
|
|
175
179
|
<div class="layout horizontal center flex-header__edit">
|
|
176
180
|
${this.isEditable
|
|
177
181
|
? html `
|
|
178
|
-
|
|
182
|
+
<etools-icon
|
|
183
|
+
slot="trigger"
|
|
184
|
+
?hidden="${this.hideEditButton}"
|
|
185
|
+
@click="${() => this.startEdit()}"
|
|
186
|
+
name="create"
|
|
187
|
+
></etools-icon>
|
|
179
188
|
`
|
|
180
189
|
: ''}
|
|
181
190
|
</div>
|
|
@@ -16,28 +16,41 @@ export const elevationStyles = css `
|
|
|
16
16
|
|
|
17
17
|
.elevation[elevation='1'],
|
|
18
18
|
:host(.elevation[elevation='1']) {
|
|
19
|
-
box-shadow:
|
|
19
|
+
box-shadow:
|
|
20
|
+
0 2px 2px 0 rgba(0, 0, 0, 0.14),
|
|
21
|
+
0 1px 5px 0 rgba(0, 0, 0, 0.12),
|
|
22
|
+
0 3px 1px -2px rgba(0, 0, 0, 0.2);
|
|
20
23
|
}
|
|
21
24
|
|
|
22
25
|
.elevation[elevation='2'],
|
|
23
26
|
:host(.elevation[elevation='2']) {
|
|
24
|
-
box-shadow:
|
|
27
|
+
box-shadow:
|
|
28
|
+
0 4px 5px 0 rgba(0, 0, 0, 0.14),
|
|
29
|
+
0 1px 10px 0 rgba(0, 0, 0, 0.12),
|
|
30
|
+
0 2px 4px -1px rgba(0, 0, 0, 0.4);
|
|
25
31
|
}
|
|
26
32
|
|
|
27
33
|
.elevation[elevation='3'],
|
|
28
34
|
:host(.elevation[elevation='3']) {
|
|
29
|
-
box-shadow:
|
|
35
|
+
box-shadow:
|
|
36
|
+
0 6px 10px 0 rgba(0, 0, 0, 0.14),
|
|
37
|
+
0 1px 18px 0 rgba(0, 0, 0, 0.12),
|
|
38
|
+
0 3px 5px -1px rgba(0, 0, 0, 0.4);
|
|
30
39
|
}
|
|
31
40
|
|
|
32
41
|
.elevation[elevation='4'],
|
|
33
42
|
:host(.elevation[elevation='4']) {
|
|
34
|
-
box-shadow:
|
|
43
|
+
box-shadow:
|
|
44
|
+
0 8px 10px 1px rgba(0, 0, 0, 0.14),
|
|
45
|
+
0 3px 14px 2px rgba(0, 0, 0, 0.12),
|
|
35
46
|
0 5px 5px -3px rgba(0, 0, 0, 0.4);
|
|
36
47
|
}
|
|
37
48
|
|
|
38
49
|
.elevation[elevation='5'],
|
|
39
50
|
:host(.elevation[elevation='5']) {
|
|
40
|
-
box-shadow:
|
|
51
|
+
box-shadow:
|
|
52
|
+
0 16px 24px 2px rgba(0, 0, 0, 0.14),
|
|
53
|
+
0 6px 30px 5px rgba(0, 0, 0, 0.12),
|
|
41
54
|
0 8px 10px -5px rgba(0, 0, 0, 0.4);
|
|
42
55
|
}
|
|
43
56
|
`;
|
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unicef-polymer/etools-form-builder",
|
|
3
3
|
"description": "Etools FM Form Builder components",
|
|
4
|
-
"version": "3.1.
|
|
4
|
+
"version": "3.1.2",
|
|
5
|
+
"type": "module",
|
|
5
6
|
"contributors": [
|
|
6
7
|
"eTools Team"
|
|
7
8
|
],
|
|
@@ -15,7 +16,7 @@
|
|
|
15
16
|
"scripts": {
|
|
16
17
|
"tsToJs": "rm -rf dist && tsc --skipLibCheck",
|
|
17
18
|
"watch": "tsc --watch",
|
|
18
|
-
"lint": "eslint
|
|
19
|
+
"lint": "eslint",
|
|
19
20
|
"format": "eslint --ext .ts ./src/**/*.ts --fix --ignore-path .gitignore",
|
|
20
21
|
"rd:init": "relative-deps init",
|
|
21
22
|
"rd:add": "relative-deps add",
|
|
@@ -28,28 +29,23 @@
|
|
|
28
29
|
"lit": "^3.2.1",
|
|
29
30
|
"ramda": "0.30.1",
|
|
30
31
|
"relative-deps": "^1.0.7",
|
|
31
|
-
"typescript": "^4.9.5"
|
|
32
|
-
"web-animations-js": "^2.3.2"
|
|
32
|
+
"typescript": "^4.9.5"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
|
-
"@unicef-polymer/etools-unicef": ">=1.1.
|
|
35
|
+
"@unicef-polymer/etools-unicef": ">=1.1.3"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@unicef-polymer/etools-unicef": "^1.1.
|
|
39
|
-
"
|
|
40
|
-
"@
|
|
41
|
-
"@
|
|
42
|
-
"
|
|
43
|
-
"eslint": "^
|
|
44
|
-
"eslint-config-
|
|
45
|
-
"eslint-
|
|
46
|
-
"eslint-plugin-
|
|
47
|
-
"eslint-plugin-
|
|
48
|
-
"
|
|
49
|
-
"prettier": "^
|
|
50
|
-
"minimist": ">=0.2.1",
|
|
51
|
-
"lodash": ">=4.17.21",
|
|
52
|
-
"ansi-regex": ">=5.0.1",
|
|
53
|
-
"glob-parent": ">=5.1.2"
|
|
38
|
+
"@unicef-polymer/etools-unicef": "^1.1.3",
|
|
39
|
+
"eslint": "^9.16.0",
|
|
40
|
+
"@eslint/eslintrc": "^3.2.0",
|
|
41
|
+
"@eslint/js": "^9.16.0",
|
|
42
|
+
"@typescript-eslint/eslint-plugin": "^8.17.0",
|
|
43
|
+
"@typescript-eslint/parser": "^8.17.0",
|
|
44
|
+
"eslint-config-prettier": "^9.1.0",
|
|
45
|
+
"eslint-plugin-html": "^8.1.2",
|
|
46
|
+
"eslint-plugin-lit": "^1.15.0",
|
|
47
|
+
"eslint-plugin-prettier": "^5.2.1",
|
|
48
|
+
"globals": "^15.13.0",
|
|
49
|
+
"prettier": "^3.4.2"
|
|
54
50
|
}
|
|
55
51
|
}
|