@unicef-polymer/etools-form-builder 0.1.24 → 1.0.1-rc.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.
|
@@ -102,16 +102,17 @@ export class FormCollapsedCard extends FormAbstractGroup {
|
|
|
102
102
|
*/
|
|
103
103
|
getAdditionalButtons() {
|
|
104
104
|
var _a, _b, _c, _d;
|
|
105
|
-
const
|
|
106
|
-
|
|
107
|
-
|
|
105
|
+
const hideAttachmentsButton = (this._readonly && !this.value.attachments.length) ||
|
|
106
|
+
!this.groupStructure.children.some(({ styling }) => styling.includes(StructureTypes.ATTACHMENTS_BUTTON));
|
|
107
|
+
return hideAttachmentsButton
|
|
108
|
+
? html ``
|
|
109
|
+
: html `
|
|
108
110
|
<iron-icon icon="warning" class="attachments-warning" ?hidden="${!this._errors.attachments}"></iron-icon>
|
|
109
111
|
<paper-button @click="${() => this.openAttachmentsPopup()}" class="attachments-button">
|
|
110
112
|
<iron-icon icon="${((_b = (_a = this.value) === null || _a === void 0 ? void 0 : _a.attachments) === null || _b === void 0 ? void 0 : _b.length) ? 'file-download' : 'file-upload'}"></iron-icon>
|
|
111
113
|
${this.getAttachmentsBtnText((_d = (_c = this.value) === null || _c === void 0 ? void 0 : _c.attachments) === null || _d === void 0 ? void 0 : _d.length)}
|
|
112
114
|
</paper-button>
|
|
113
|
-
|
|
114
|
-
: html ``;
|
|
115
|
+
`;
|
|
115
116
|
}
|
|
116
117
|
retrieveTitle(target) {
|
|
117
118
|
switch (target) {
|
|
@@ -15,6 +15,11 @@ export const FormBuilderCardStyles = css `
|
|
|
15
15
|
color: var(--primary-color);
|
|
16
16
|
font-weight: 500;
|
|
17
17
|
}
|
|
18
|
+
.attachments-button:focus {
|
|
19
|
+
outline: 0;
|
|
20
|
+
box-shadow: 0 0 5px 5px rgb(170 165 165 / 20%);
|
|
21
|
+
background-color: rgba(170, 165, 165, 0.2);
|
|
22
|
+
}
|
|
18
23
|
.attachments-button iron-icon {
|
|
19
24
|
margin-right: 8px;
|
|
20
25
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unicef-polymer/etools-form-builder",
|
|
3
3
|
"description": "Etools FM Form Builder components",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "1.0.1-rc.2",
|
|
5
5
|
"contributors": [
|
|
6
6
|
"eTools Team"
|
|
7
7
|
],
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
],
|
|
15
15
|
"scripts": {
|
|
16
16
|
"build": "tsc --skipLibCheck",
|
|
17
|
-
"lint": "
|
|
17
|
+
"lint": "eslint src/",
|
|
18
18
|
"prepare": "rm -rf ./dist && npm run build",
|
|
19
19
|
"prepublishOnly": "npm run lint"
|
|
20
20
|
},
|
|
@@ -27,12 +27,12 @@
|
|
|
27
27
|
"@polymer/paper-radio-group": "^3.0.1",
|
|
28
28
|
"@polymer/paper-toast": "^3.0.1",
|
|
29
29
|
"@types/ramda": "^0.26.43",
|
|
30
|
-
"@unicef-polymer/etools-dialog": "
|
|
31
|
-
"@unicef-polymer/etools-dropdown": "^3.
|
|
30
|
+
"@unicef-polymer/etools-dialog": "5.0.0-rc.2",
|
|
31
|
+
"@unicef-polymer/etools-dropdown": "^3.7.6",
|
|
32
32
|
"@unicef-polymer/etools-upload": "^3.5.0",
|
|
33
|
-
"@webcomponents/webcomponentsjs": "^2.
|
|
33
|
+
"@webcomponents/webcomponentsjs": "^2.6.0",
|
|
34
34
|
"lit-element": "^2.4.0",
|
|
35
|
-
"lit-translate": "^1.1
|
|
35
|
+
"lit-translate": "^1.2.1",
|
|
36
36
|
"ramda": "^0.27.1",
|
|
37
37
|
"web-animations-js": "^2.3.2"
|
|
38
38
|
},
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"eslint-plugin-lit": "^1.2.4",
|
|
47
47
|
"eslint-plugin-prettier": "^3.1.3",
|
|
48
48
|
"minimist": ">=0.2.1",
|
|
49
|
-
"prettier": "
|
|
49
|
+
"prettier": "~2.2.0",
|
|
50
50
|
"typescript": "^3.9.7"
|
|
51
51
|
}
|
|
52
52
|
}
|