@unicef-polymer/etools-form-builder 2.1.7 → 2.1.9

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.
Files changed (87) hide show
  1. package/LICENSE +674 -674
  2. package/README.md +1 -1
  3. package/dist/assets/translations.d.ts +6 -6
  4. package/dist/assets/translations.js +67 -67
  5. package/dist/form-attachments-popup/form-attachments-popup.d.ts +86 -86
  6. package/dist/form-attachments-popup/form-attachments-popup.helper.d.ts +8 -8
  7. package/dist/form-attachments-popup/form-attachments-popup.helper.js +14 -14
  8. package/dist/form-attachments-popup/form-attachments-popup.js +255 -255
  9. package/dist/form-attachments-popup/form-attachments-popup.tpl.d.ts +3 -3
  10. package/dist/form-attachments-popup/form-attachments-popup.tpl.js +91 -91
  11. package/dist/form-attachments-popup/index.d.ts +2 -2
  12. package/dist/form-attachments-popup/index.js +2 -2
  13. package/dist/form-fields/abstract-field-base.class.d.ts +33 -33
  14. package/dist/form-fields/abstract-field-base.class.js +213 -213
  15. package/dist/form-fields/field-renderer-component.d.ts +20 -20
  16. package/dist/form-fields/field-renderer-component.js +255 -255
  17. package/dist/form-fields/index.d.ts +12 -12
  18. package/dist/form-fields/index.js +12 -12
  19. package/dist/form-fields/repeatable-fields/repeatable-attachment-field.d.ts +17 -17
  20. package/dist/form-fields/repeatable-fields/repeatable-attachment-field.js +209 -209
  21. package/dist/form-fields/repeatable-fields/repeatable-base-field.d.ts +20 -20
  22. package/dist/form-fields/repeatable-fields/repeatable-base-field.js +124 -124
  23. package/dist/form-fields/repeatable-fields/repeatable-number-field.d.ts +10 -10
  24. package/dist/form-fields/repeatable-fields/repeatable-number-field.js +67 -67
  25. package/dist/form-fields/repeatable-fields/repeatable-scale-field.d.ts +15 -15
  26. package/dist/form-fields/repeatable-fields/repeatable-scale-field.js +108 -108
  27. package/dist/form-fields/repeatable-fields/repeatable-text-field.d.ts +8 -8
  28. package/dist/form-fields/repeatable-fields/repeatable-text-field.js +53 -53
  29. package/dist/form-fields/single-fields/attachment-field.d.ts +16 -16
  30. package/dist/form-fields/single-fields/attachment-field.js +98 -98
  31. package/dist/form-fields/single-fields/base-field.d.ts +11 -11
  32. package/dist/form-fields/single-fields/base-field.js +58 -58
  33. package/dist/form-fields/single-fields/boolean-field.d.ts +8 -8
  34. package/dist/form-fields/single-fields/boolean-field.js +49 -49
  35. package/dist/form-fields/single-fields/number-field.d.ts +10 -10
  36. package/dist/form-fields/single-fields/number-field.js +67 -67
  37. package/dist/form-fields/single-fields/scale-field.d.ts +18 -18
  38. package/dist/form-fields/single-fields/scale-field.js +108 -108
  39. package/dist/form-fields/single-fields/text-field.d.ts +8 -8
  40. package/dist/form-fields/single-fields/text-field.js +54 -54
  41. package/dist/form-groups/form-abstract-group.d.ts +71 -71
  42. package/dist/form-groups/form-abstract-group.js +398 -398
  43. package/dist/form-groups/form-card.d.ts +32 -32
  44. package/dist/form-groups/form-card.js +113 -113
  45. package/dist/form-groups/form-collapsed-card.d.ts +71 -71
  46. package/dist/form-groups/form-collapsed-card.js +259 -259
  47. package/dist/form-groups/index.d.ts +3 -3
  48. package/dist/form-groups/index.js +3 -3
  49. package/dist/index.d.ts +3 -3
  50. package/dist/index.js +3 -3
  51. package/dist/lib/additional-components/confirmation-dialog.d.ts +18 -18
  52. package/dist/lib/additional-components/confirmation-dialog.js +72 -72
  53. package/dist/lib/additional-components/etools-fb-card.d.ts +21 -21
  54. package/dist/lib/additional-components/etools-fb-card.js +239 -238
  55. package/dist/lib/styles/attachments.styles.d.ts +2 -2
  56. package/dist/lib/styles/attachments.styles.js +72 -72
  57. package/dist/lib/styles/card-styles.d.ts +2 -2
  58. package/dist/lib/styles/card-styles.js +154 -154
  59. package/dist/lib/styles/dialog.styles.d.ts +2 -2
  60. package/dist/lib/styles/dialog.styles.js +85 -85
  61. package/dist/lib/styles/elevation-styles.d.ts +9 -9
  62. package/dist/lib/styles/elevation-styles.js +43 -43
  63. package/dist/lib/styles/flex-layout-classes.d.ts +2 -2
  64. package/dist/lib/styles/flex-layout-classes.js +319 -319
  65. package/dist/lib/styles/form-builder-card.styles.d.ts +2 -2
  66. package/dist/lib/styles/form-builder-card.styles.js +49 -49
  67. package/dist/lib/styles/input-styles.d.ts +2 -2
  68. package/dist/lib/styles/input-styles.js +138 -138
  69. package/dist/lib/styles/page-layout-styles.d.ts +2 -2
  70. package/dist/lib/styles/page-layout-styles.js +201 -201
  71. package/dist/lib/styles/shared-styles.d.ts +2 -2
  72. package/dist/lib/styles/shared-styles.js +70 -70
  73. package/dist/lib/types/form-builder.interfaces.d.ts +83 -83
  74. package/dist/lib/types/form-builder.interfaces.js +0 -0
  75. package/dist/lib/types/form-builder.types.d.ts +59 -59
  76. package/dist/lib/types/form-builder.types.js +0 -0
  77. package/dist/lib/types/global.types.d.ts +4 -4
  78. package/dist/lib/types/global.types.js +0 -0
  79. package/dist/lib/utils/dialog.d.ts +10 -10
  80. package/dist/lib/utils/dialog.js +21 -21
  81. package/dist/lib/utils/fire-custom-event.d.ts +1 -1
  82. package/dist/lib/utils/fire-custom-event.js +7 -7
  83. package/dist/lib/utils/translate.d.ts +1 -1
  84. package/dist/lib/utils/translate.js +9 -9
  85. package/dist/lib/utils/validations.helper.d.ts +26 -26
  86. package/dist/lib/utils/validations.helper.js +42 -42
  87. package/package.json +56 -56
@@ -1,255 +1,255 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6
- };
7
- import '@unicef-polymer/etools-dialog/etools-dialog';
8
- import '@unicef-polymer/etools-upload/etools-upload-multi';
9
- import '@unicef-polymer/etools-dropdown/etools-dropdown';
10
- import '@polymer/paper-button/paper-button';
11
- import '@polymer/iron-icons/iron-icons';
12
- import { css, customElement, LitElement, property, query } from 'lit-element';
13
- import { clone, equals } from 'ramda';
14
- import { template } from './form-attachments-popup.tpl';
15
- import { fireEvent } from '../lib/utils/fire-custom-event';
16
- import { SharedStyles } from '../lib/styles/shared-styles';
17
- import { AttachmentsStyles } from '../lib/styles/attachments.styles';
18
- import { AttachmentsHelper } from './form-attachments-popup.helper';
19
- import { deleteFileFromDexie } from '@unicef-polymer/etools-upload/offline/dexie-operations';
20
- import { getTranslation } from '../lib/utils/translate';
21
- let FormAttachmentsPopup = class FormAttachmentsPopup extends LitElement {
22
- constructor() {
23
- super();
24
- this.dialogOpened = true;
25
- this.saveBtnClicked = false;
26
- this.attachments = [];
27
- this.readonly = false;
28
- this.popupTitle = '';
29
- this.computedPath = [];
30
- this.errors = [];
31
- /**
32
- * Array of offline saved fileIds that was remove from popup.
33
- * We need to remove them from IDB but only after confirm button click
34
- */
35
- this.filesForRemove = [];
36
- this.originalAttachments = [];
37
- if (!AttachmentsHelper.isInitialized) {
38
- throw new Error('Please initialize attachments popup before use');
39
- }
40
- if (!this.language) {
41
- this.language = window.localStorage.defaultLanguage || 'en';
42
- }
43
- }
44
- set dialogData({ attachments, title, metadata, readonly, computedPath, errors }) {
45
- this.popupTitle = title;
46
- this.attachments = clone(attachments) || [];
47
- this.originalAttachments = clone(attachments) || [];
48
- this.metadata = clone(metadata);
49
- this.readonly = Boolean(readonly);
50
- this.computedPath = computedPath;
51
- this.errors = clone(errors) || [];
52
- }
53
- get uploadUrl() {
54
- return AttachmentsHelper.uploadUrl;
55
- }
56
- get jwtLocalStorageKey() {
57
- return AttachmentsHelper.jwtLocalStorageKey;
58
- }
59
- render() {
60
- return template.call(this);
61
- }
62
- /**
63
- * on Cancel button click
64
- * Remove offline saved attachments from IDB if they are missing in originalAttachments
65
- */
66
- onClose() {
67
- this.attachments.forEach(({ url, attachment }) => {
68
- const existsInOriginal = this.originalAttachments
69
- .map((item) => item.attachment || [])
70
- .includes(attachment);
71
- if (!existsInOriginal && !url) {
72
- deleteFileFromDexie(attachment);
73
- }
74
- });
75
- fireEvent(this, 'response', { confirmed: false });
76
- }
77
- async saveChanges() {
78
- let fileTypeNotSelected = false;
79
- this.attachments.forEach((attachment, index) => {
80
- if (!attachment.file_type) {
81
- fileTypeNotSelected = true;
82
- this.errors[index] = { file_type: ['This field is required'] };
83
- }
84
- else {
85
- this.errors[index] = [];
86
- }
87
- });
88
- this.requestUpdate();
89
- if (fileTypeNotSelected) {
90
- return;
91
- }
92
- if (this.filesForRemove.length) {
93
- for (const fileId of this.filesForRemove) {
94
- await deleteFileFromDexie(fileId);
95
- }
96
- }
97
- /**
98
- * Don't confirm popup if no changes was made
99
- */
100
- if (!equals(this.attachments, this.originalAttachments)) {
101
- fireEvent(this, 'response', { confirmed: true, attachments: this.attachments });
102
- }
103
- else {
104
- fireEvent(this, 'response', { confirmed: false });
105
- }
106
- }
107
- checkFileType(index) {
108
- var _a;
109
- return (_a = this.errors[index]) === null || _a === void 0 ? void 0 : _a.file_type;
110
- }
111
- retrieveErrorMessage(index) {
112
- return this.errors[index] && this.errors[index].file_type ? this.errors[index].file_type[0] : '';
113
- }
114
- downloadFile(attachment) {
115
- const url = attachment.url;
116
- this.link.href = url;
117
- this.link.click();
118
- window.URL.revokeObjectURL(url);
119
- }
120
- changeFileType(attachment, newType, index) {
121
- if (newType && attachment.file_type !== newType) {
122
- attachment.file_type = newType;
123
- this.errors[index] = [];
124
- this.requestUpdate();
125
- }
126
- }
127
- attachmentsUploaded({ success, error }) {
128
- const parsedAttachments = success
129
- .map((attachment) => {
130
- if (this.isUploadedAttachment(attachment)) {
131
- return {
132
- url: attachment.file_link,
133
- attachment: attachment.id,
134
- filename: attachment.filename,
135
- file_type: null
136
- };
137
- }
138
- else if (this.isOfflineSavedAttachment(attachment)) {
139
- return {
140
- attachment: attachment.id,
141
- filename: attachment.filename,
142
- composedPath: this.computedPath,
143
- file_type: null
144
- };
145
- }
146
- else {
147
- console.warn('Missing fields in parsed attachment');
148
- return null;
149
- }
150
- })
151
- .filter((attachment) => Boolean(attachment));
152
- this.attachments = [...this.attachments, ...parsedAttachments];
153
- if (error && error.length) {
154
- console.error(error);
155
- fireEvent(this, 'toast', { text: getTranslation(this.language, 'UPLOAD_ATTACHMENTS_FAILED') });
156
- }
157
- }
158
- deleteAttachment(index) {
159
- const [attachment] = this.attachments.splice(index, 1);
160
- if (!attachment.hasOwnProperty('url')) {
161
- /**
162
- * prepare attachment for remove from IDB after Popup confirm
163
- */
164
- this.filesForRemove.push(attachment.attachment);
165
- }
166
- this.attachments = [...this.attachments];
167
- }
168
- isUploadedAttachment(attachment) {
169
- return (attachment.hasOwnProperty('filename') &&
170
- attachment.hasOwnProperty('id') &&
171
- attachment.hasOwnProperty('file_link') &&
172
- !attachment.hasOwnProperty('unsynced'));
173
- }
174
- isOfflineSavedAttachment(attachment) {
175
- return (attachment.hasOwnProperty('filename') && attachment.hasOwnProperty('id') && attachment.hasOwnProperty('unsynced'));
176
- }
177
- static get styles() {
178
- // language=CSS
179
- return [
180
- SharedStyles,
181
- AttachmentsStyles,
182
- css `
183
- .file-selector__type-dropdown {
184
- flex-basis: 25%;
185
- padding-left: 8px;
186
- padding-right: 8px;
187
- }
188
- .file-selector__filename {
189
- flex-basis: 35%;
190
- }
191
- .file-selector__download {
192
- flex-basis: 10%;
193
- }
194
- .file-selector__delete {
195
- flex-basis: 10%;
196
- }
197
- .file-selector-container.with-type-dropdown {
198
- flex-wrap: nowrap;
199
- }
200
- .popup-container {
201
- padding: 12px 12px 0;
202
- }
203
- @media (max-width: 380px) {
204
- .file-selector-container.with-type-dropdown {
205
- justify-content: center;
206
- }
207
- .file-selector-container.with-type-dropdown etools-dropdown.type-dropdown {
208
- flex-basis: 90%;
209
- }
210
- .file-selector__filename {
211
- flex-basis: 90%;
212
- }
213
- .file-selector__download {
214
- flex-basis: 5%;
215
- }
216
- .file-selector__delete {
217
- flex-basis: 5%;
218
- }
219
- }
220
- @media (max-width: 600px) {
221
- etools-dropdown {
222
- padding: 0;
223
- }
224
- .file-selector-container.with-type-dropdown {
225
- border-bottom: 1px solid lightgrey;
226
- flex-wrap: wrap;
227
- padding-bottom: 10px;
228
- }
229
- }
230
- `
231
- ];
232
- }
233
- };
234
- __decorate([
235
- property()
236
- ], FormAttachmentsPopup.prototype, "dialogOpened", void 0);
237
- __decorate([
238
- property()
239
- ], FormAttachmentsPopup.prototype, "saveBtnClicked", void 0);
240
- __decorate([
241
- property()
242
- ], FormAttachmentsPopup.prototype, "attachments", void 0);
243
- __decorate([
244
- property()
245
- ], FormAttachmentsPopup.prototype, "metadata", void 0);
246
- __decorate([
247
- property()
248
- ], FormAttachmentsPopup.prototype, "language", void 0);
249
- __decorate([
250
- query('#link')
251
- ], FormAttachmentsPopup.prototype, "link", void 0);
252
- FormAttachmentsPopup = __decorate([
253
- customElement('form-attachments-popup')
254
- ], FormAttachmentsPopup);
255
- export { FormAttachmentsPopup };
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import '@unicef-polymer/etools-dialog/etools-dialog';
8
+ import '@unicef-polymer/etools-upload/etools-upload-multi';
9
+ import '@unicef-polymer/etools-dropdown/etools-dropdown';
10
+ import '@polymer/paper-button/paper-button';
11
+ import '@polymer/iron-icons/iron-icons';
12
+ import { css, customElement, LitElement, property, query } from 'lit-element';
13
+ import { clone, equals } from 'ramda';
14
+ import { template } from './form-attachments-popup.tpl';
15
+ import { fireEvent } from '../lib/utils/fire-custom-event';
16
+ import { SharedStyles } from '../lib/styles/shared-styles';
17
+ import { AttachmentsStyles } from '../lib/styles/attachments.styles';
18
+ import { AttachmentsHelper } from './form-attachments-popup.helper';
19
+ import { deleteFileFromDexie } from '@unicef-polymer/etools-upload/offline/dexie-operations';
20
+ import { getTranslation } from '../lib/utils/translate';
21
+ let FormAttachmentsPopup = class FormAttachmentsPopup extends LitElement {
22
+ constructor() {
23
+ super();
24
+ this.dialogOpened = true;
25
+ this.saveBtnClicked = false;
26
+ this.attachments = [];
27
+ this.readonly = false;
28
+ this.popupTitle = '';
29
+ this.computedPath = [];
30
+ this.errors = [];
31
+ /**
32
+ * Array of offline saved fileIds that was remove from popup.
33
+ * We need to remove them from IDB but only after confirm button click
34
+ */
35
+ this.filesForRemove = [];
36
+ this.originalAttachments = [];
37
+ if (!AttachmentsHelper.isInitialized) {
38
+ throw new Error('Please initialize attachments popup before use');
39
+ }
40
+ if (!this.language) {
41
+ this.language = window.localStorage.defaultLanguage || 'en';
42
+ }
43
+ }
44
+ set dialogData({ attachments, title, metadata, readonly, computedPath, errors }) {
45
+ this.popupTitle = title;
46
+ this.attachments = clone(attachments) || [];
47
+ this.originalAttachments = clone(attachments) || [];
48
+ this.metadata = clone(metadata);
49
+ this.readonly = Boolean(readonly);
50
+ this.computedPath = computedPath;
51
+ this.errors = clone(errors) || [];
52
+ }
53
+ get uploadUrl() {
54
+ return AttachmentsHelper.uploadUrl;
55
+ }
56
+ get jwtLocalStorageKey() {
57
+ return AttachmentsHelper.jwtLocalStorageKey;
58
+ }
59
+ render() {
60
+ return template.call(this);
61
+ }
62
+ /**
63
+ * on Cancel button click
64
+ * Remove offline saved attachments from IDB if they are missing in originalAttachments
65
+ */
66
+ onClose() {
67
+ this.attachments.forEach(({ url, attachment }) => {
68
+ const existsInOriginal = this.originalAttachments
69
+ .map((item) => item.attachment || [])
70
+ .includes(attachment);
71
+ if (!existsInOriginal && !url) {
72
+ deleteFileFromDexie(attachment);
73
+ }
74
+ });
75
+ fireEvent(this, 'response', { confirmed: false });
76
+ }
77
+ async saveChanges() {
78
+ let fileTypeNotSelected = false;
79
+ this.attachments.forEach((attachment, index) => {
80
+ if (!attachment.file_type) {
81
+ fileTypeNotSelected = true;
82
+ this.errors[index] = { file_type: ['This field is required'] };
83
+ }
84
+ else {
85
+ this.errors[index] = [];
86
+ }
87
+ });
88
+ this.requestUpdate();
89
+ if (fileTypeNotSelected) {
90
+ return;
91
+ }
92
+ if (this.filesForRemove.length) {
93
+ for (const fileId of this.filesForRemove) {
94
+ await deleteFileFromDexie(fileId);
95
+ }
96
+ }
97
+ /**
98
+ * Don't confirm popup if no changes was made
99
+ */
100
+ if (!equals(this.attachments, this.originalAttachments)) {
101
+ fireEvent(this, 'response', { confirmed: true, attachments: this.attachments });
102
+ }
103
+ else {
104
+ fireEvent(this, 'response', { confirmed: false });
105
+ }
106
+ }
107
+ checkFileType(index) {
108
+ var _a;
109
+ return (_a = this.errors[index]) === null || _a === void 0 ? void 0 : _a.file_type;
110
+ }
111
+ retrieveErrorMessage(index) {
112
+ return this.errors[index] && this.errors[index].file_type ? this.errors[index].file_type[0] : '';
113
+ }
114
+ downloadFile(attachment) {
115
+ const url = attachment.url;
116
+ this.link.href = url;
117
+ this.link.click();
118
+ window.URL.revokeObjectURL(url);
119
+ }
120
+ changeFileType(attachment, newType, index) {
121
+ if (newType && attachment.file_type !== newType) {
122
+ attachment.file_type = newType;
123
+ this.errors[index] = [];
124
+ this.requestUpdate();
125
+ }
126
+ }
127
+ attachmentsUploaded({ success, error }) {
128
+ const parsedAttachments = success
129
+ .map((attachment) => {
130
+ if (this.isUploadedAttachment(attachment)) {
131
+ return {
132
+ url: attachment.file_link,
133
+ attachment: attachment.id,
134
+ filename: attachment.filename,
135
+ file_type: null
136
+ };
137
+ }
138
+ else if (this.isOfflineSavedAttachment(attachment)) {
139
+ return {
140
+ attachment: attachment.id,
141
+ filename: attachment.filename,
142
+ composedPath: this.computedPath,
143
+ file_type: null
144
+ };
145
+ }
146
+ else {
147
+ console.warn('Missing fields in parsed attachment');
148
+ return null;
149
+ }
150
+ })
151
+ .filter((attachment) => Boolean(attachment));
152
+ this.attachments = [...this.attachments, ...parsedAttachments];
153
+ if (error && error.length) {
154
+ console.error(error);
155
+ fireEvent(this, 'toast', { text: getTranslation(this.language, 'UPLOAD_ATTACHMENTS_FAILED') });
156
+ }
157
+ }
158
+ deleteAttachment(index) {
159
+ const [attachment] = this.attachments.splice(index, 1);
160
+ if (!attachment.hasOwnProperty('url')) {
161
+ /**
162
+ * prepare attachment for remove from IDB after Popup confirm
163
+ */
164
+ this.filesForRemove.push(attachment.attachment);
165
+ }
166
+ this.attachments = [...this.attachments];
167
+ }
168
+ isUploadedAttachment(attachment) {
169
+ return (attachment.hasOwnProperty('filename') &&
170
+ attachment.hasOwnProperty('id') &&
171
+ attachment.hasOwnProperty('file_link') &&
172
+ !attachment.hasOwnProperty('unsynced'));
173
+ }
174
+ isOfflineSavedAttachment(attachment) {
175
+ return (attachment.hasOwnProperty('filename') && attachment.hasOwnProperty('id') && attachment.hasOwnProperty('unsynced'));
176
+ }
177
+ static get styles() {
178
+ // language=CSS
179
+ return [
180
+ SharedStyles,
181
+ AttachmentsStyles,
182
+ css `
183
+ .file-selector__type-dropdown {
184
+ flex-basis: 25%;
185
+ padding-left: 8px;
186
+ padding-right: 8px;
187
+ }
188
+ .file-selector__filename {
189
+ flex-basis: 35%;
190
+ }
191
+ .file-selector__download {
192
+ flex-basis: 10%;
193
+ }
194
+ .file-selector__delete {
195
+ flex-basis: 10%;
196
+ }
197
+ .file-selector-container.with-type-dropdown {
198
+ flex-wrap: nowrap;
199
+ }
200
+ .popup-container {
201
+ padding: 12px 12px 0;
202
+ }
203
+ @media (max-width: 380px) {
204
+ .file-selector-container.with-type-dropdown {
205
+ justify-content: center;
206
+ }
207
+ .file-selector-container.with-type-dropdown etools-dropdown.type-dropdown {
208
+ flex-basis: 90%;
209
+ }
210
+ .file-selector__filename {
211
+ flex-basis: 90%;
212
+ }
213
+ .file-selector__download {
214
+ flex-basis: 5%;
215
+ }
216
+ .file-selector__delete {
217
+ flex-basis: 5%;
218
+ }
219
+ }
220
+ @media (max-width: 600px) {
221
+ etools-dropdown {
222
+ padding: 0;
223
+ }
224
+ .file-selector-container.with-type-dropdown {
225
+ border-bottom: 1px solid lightgrey;
226
+ flex-wrap: wrap;
227
+ padding-bottom: 10px;
228
+ }
229
+ }
230
+ `
231
+ ];
232
+ }
233
+ };
234
+ __decorate([
235
+ property()
236
+ ], FormAttachmentsPopup.prototype, "dialogOpened", void 0);
237
+ __decorate([
238
+ property()
239
+ ], FormAttachmentsPopup.prototype, "saveBtnClicked", void 0);
240
+ __decorate([
241
+ property()
242
+ ], FormAttachmentsPopup.prototype, "attachments", void 0);
243
+ __decorate([
244
+ property()
245
+ ], FormAttachmentsPopup.prototype, "metadata", void 0);
246
+ __decorate([
247
+ property()
248
+ ], FormAttachmentsPopup.prototype, "language", void 0);
249
+ __decorate([
250
+ query('#link')
251
+ ], FormAttachmentsPopup.prototype, "link", void 0);
252
+ FormAttachmentsPopup = __decorate([
253
+ customElement('form-attachments-popup')
254
+ ], FormAttachmentsPopup);
255
+ export { FormAttachmentsPopup };
@@ -1,3 +1,3 @@
1
- import { FormAttachmentsPopup } from './form-attachments-popup';
2
- import { TemplateResult } from 'lit-html';
3
- export declare function template(this: FormAttachmentsPopup): TemplateResult;
1
+ import { FormAttachmentsPopup } from './form-attachments-popup';
2
+ import { TemplateResult } from 'lit-html';
3
+ export declare function template(this: FormAttachmentsPopup): TemplateResult;