@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.
- package/LICENSE +674 -674
- package/README.md +1 -1
- package/dist/assets/translations.d.ts +6 -6
- package/dist/assets/translations.js +67 -67
- package/dist/form-attachments-popup/form-attachments-popup.d.ts +86 -86
- package/dist/form-attachments-popup/form-attachments-popup.helper.d.ts +8 -8
- package/dist/form-attachments-popup/form-attachments-popup.helper.js +14 -14
- package/dist/form-attachments-popup/form-attachments-popup.js +255 -255
- package/dist/form-attachments-popup/form-attachments-popup.tpl.d.ts +3 -3
- package/dist/form-attachments-popup/form-attachments-popup.tpl.js +91 -91
- package/dist/form-attachments-popup/index.d.ts +2 -2
- package/dist/form-attachments-popup/index.js +2 -2
- package/dist/form-fields/abstract-field-base.class.d.ts +33 -33
- package/dist/form-fields/abstract-field-base.class.js +213 -213
- package/dist/form-fields/field-renderer-component.d.ts +20 -20
- package/dist/form-fields/field-renderer-component.js +255 -255
- package/dist/form-fields/index.d.ts +12 -12
- package/dist/form-fields/index.js +12 -12
- package/dist/form-fields/repeatable-fields/repeatable-attachment-field.d.ts +17 -17
- package/dist/form-fields/repeatable-fields/repeatable-attachment-field.js +209 -209
- package/dist/form-fields/repeatable-fields/repeatable-base-field.d.ts +20 -20
- package/dist/form-fields/repeatable-fields/repeatable-base-field.js +124 -124
- package/dist/form-fields/repeatable-fields/repeatable-number-field.d.ts +10 -10
- package/dist/form-fields/repeatable-fields/repeatable-number-field.js +67 -67
- package/dist/form-fields/repeatable-fields/repeatable-scale-field.d.ts +15 -15
- package/dist/form-fields/repeatable-fields/repeatable-scale-field.js +108 -108
- package/dist/form-fields/repeatable-fields/repeatable-text-field.d.ts +8 -8
- package/dist/form-fields/repeatable-fields/repeatable-text-field.js +53 -53
- package/dist/form-fields/single-fields/attachment-field.d.ts +16 -16
- package/dist/form-fields/single-fields/attachment-field.js +98 -98
- package/dist/form-fields/single-fields/base-field.d.ts +11 -11
- package/dist/form-fields/single-fields/base-field.js +58 -58
- package/dist/form-fields/single-fields/boolean-field.d.ts +8 -8
- package/dist/form-fields/single-fields/boolean-field.js +49 -49
- package/dist/form-fields/single-fields/number-field.d.ts +10 -10
- package/dist/form-fields/single-fields/number-field.js +67 -67
- package/dist/form-fields/single-fields/scale-field.d.ts +18 -18
- package/dist/form-fields/single-fields/scale-field.js +108 -108
- package/dist/form-fields/single-fields/text-field.d.ts +8 -8
- package/dist/form-fields/single-fields/text-field.js +54 -54
- package/dist/form-groups/form-abstract-group.d.ts +71 -71
- package/dist/form-groups/form-abstract-group.js +398 -398
- package/dist/form-groups/form-card.d.ts +32 -32
- package/dist/form-groups/form-card.js +113 -113
- package/dist/form-groups/form-collapsed-card.d.ts +71 -71
- package/dist/form-groups/form-collapsed-card.js +259 -259
- package/dist/form-groups/index.d.ts +3 -3
- package/dist/form-groups/index.js +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3 -3
- package/dist/lib/additional-components/confirmation-dialog.d.ts +18 -18
- package/dist/lib/additional-components/confirmation-dialog.js +72 -72
- package/dist/lib/additional-components/etools-fb-card.d.ts +21 -21
- package/dist/lib/additional-components/etools-fb-card.js +239 -238
- package/dist/lib/styles/attachments.styles.d.ts +2 -2
- package/dist/lib/styles/attachments.styles.js +72 -72
- package/dist/lib/styles/card-styles.d.ts +2 -2
- package/dist/lib/styles/card-styles.js +154 -154
- package/dist/lib/styles/dialog.styles.d.ts +2 -2
- package/dist/lib/styles/dialog.styles.js +85 -85
- package/dist/lib/styles/elevation-styles.d.ts +9 -9
- package/dist/lib/styles/elevation-styles.js +43 -43
- package/dist/lib/styles/flex-layout-classes.d.ts +2 -2
- package/dist/lib/styles/flex-layout-classes.js +319 -319
- package/dist/lib/styles/form-builder-card.styles.d.ts +2 -2
- package/dist/lib/styles/form-builder-card.styles.js +49 -49
- package/dist/lib/styles/input-styles.d.ts +2 -2
- package/dist/lib/styles/input-styles.js +138 -138
- package/dist/lib/styles/page-layout-styles.d.ts +2 -2
- package/dist/lib/styles/page-layout-styles.js +201 -201
- package/dist/lib/styles/shared-styles.d.ts +2 -2
- package/dist/lib/styles/shared-styles.js +70 -70
- package/dist/lib/types/form-builder.interfaces.d.ts +83 -83
- package/dist/lib/types/form-builder.interfaces.js +0 -0
- package/dist/lib/types/form-builder.types.d.ts +59 -59
- package/dist/lib/types/form-builder.types.js +0 -0
- package/dist/lib/types/global.types.d.ts +4 -4
- package/dist/lib/types/global.types.js +0 -0
- package/dist/lib/utils/dialog.d.ts +10 -10
- package/dist/lib/utils/dialog.js +21 -21
- package/dist/lib/utils/fire-custom-event.d.ts +1 -1
- package/dist/lib/utils/fire-custom-event.js +7 -7
- package/dist/lib/utils/translate.d.ts +1 -1
- package/dist/lib/utils/translate.js +9 -9
- package/dist/lib/utils/validations.helper.d.ts +26 -26
- package/dist/lib/utils/validations.helper.js +42 -42
- package/package.json +56 -56
|
@@ -1,72 +1,72 @@
|
|
|
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 { LitElement, property, html, css, customElement } from 'lit-element';
|
|
8
|
-
import { fireEvent } from '../utils/fire-custom-event';
|
|
9
|
-
import { getTranslation } from '../utils/translate';
|
|
10
|
-
let ConfirmationDialog = class ConfirmationDialog extends LitElement {
|
|
11
|
-
constructor() {
|
|
12
|
-
super();
|
|
13
|
-
this.dialogOpened = true;
|
|
14
|
-
this.text = '';
|
|
15
|
-
this.dialogTitle = '';
|
|
16
|
-
this.hideConfirmBtn = false;
|
|
17
|
-
if (!this.language) {
|
|
18
|
-
this.language = window.localStorage.defaultLanguage || 'en';
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
set dialogData({ text, dialogTitle = 'Are you', hideConfirmBtn = false }) {
|
|
22
|
-
this.text = text;
|
|
23
|
-
this.dialogTitle = dialogTitle;
|
|
24
|
-
this.hideConfirmBtn = hideConfirmBtn;
|
|
25
|
-
this.requestUpdate();
|
|
26
|
-
}
|
|
27
|
-
render() {
|
|
28
|
-
return html `
|
|
29
|
-
<etools-dialog
|
|
30
|
-
id="confirmation-dialog"
|
|
31
|
-
size="md"
|
|
32
|
-
no-padding
|
|
33
|
-
keep-dialog-open
|
|
34
|
-
?hide-confirm-btn="${this.hideConfirmBtn}"
|
|
35
|
-
cancel-btn-text="${getTranslation(this.language, this.hideConfirmBtn ? 'OK' : 'CANCEL')}"
|
|
36
|
-
?opened="${this.dialogOpened}"
|
|
37
|
-
theme="confirmation"
|
|
38
|
-
dialog-title="${this.dialogTitle}"
|
|
39
|
-
@close="${this.onClose}"
|
|
40
|
-
@confirm-btn-clicked="${() => this.confirm()}"
|
|
41
|
-
>
|
|
42
|
-
<div class="confirmation-message">${this.text}</div>
|
|
43
|
-
</etools-dialog>
|
|
44
|
-
`;
|
|
45
|
-
}
|
|
46
|
-
onClose() {
|
|
47
|
-
fireEvent(this, 'response', { confirmed: false });
|
|
48
|
-
}
|
|
49
|
-
confirm() {
|
|
50
|
-
fireEvent(this, 'response', { confirmed: true });
|
|
51
|
-
}
|
|
52
|
-
static get styles() {
|
|
53
|
-
// language=CSS
|
|
54
|
-
return [
|
|
55
|
-
css `
|
|
56
|
-
.confirmation-message {
|
|
57
|
-
padding-left: 24px;
|
|
58
|
-
}
|
|
59
|
-
`
|
|
60
|
-
];
|
|
61
|
-
}
|
|
62
|
-
};
|
|
63
|
-
__decorate([
|
|
64
|
-
property()
|
|
65
|
-
], ConfirmationDialog.prototype, "dialogOpened", void 0);
|
|
66
|
-
__decorate([
|
|
67
|
-
property()
|
|
68
|
-
], ConfirmationDialog.prototype, "language", void 0);
|
|
69
|
-
ConfirmationDialog = __decorate([
|
|
70
|
-
customElement('confirmation-popup')
|
|
71
|
-
], ConfirmationDialog);
|
|
72
|
-
export { ConfirmationDialog };
|
|
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 { LitElement, property, html, css, customElement } from 'lit-element';
|
|
8
|
+
import { fireEvent } from '../utils/fire-custom-event';
|
|
9
|
+
import { getTranslation } from '../utils/translate';
|
|
10
|
+
let ConfirmationDialog = class ConfirmationDialog extends LitElement {
|
|
11
|
+
constructor() {
|
|
12
|
+
super();
|
|
13
|
+
this.dialogOpened = true;
|
|
14
|
+
this.text = '';
|
|
15
|
+
this.dialogTitle = '';
|
|
16
|
+
this.hideConfirmBtn = false;
|
|
17
|
+
if (!this.language) {
|
|
18
|
+
this.language = window.localStorage.defaultLanguage || 'en';
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
set dialogData({ text, dialogTitle = 'Are you', hideConfirmBtn = false }) {
|
|
22
|
+
this.text = text;
|
|
23
|
+
this.dialogTitle = dialogTitle;
|
|
24
|
+
this.hideConfirmBtn = hideConfirmBtn;
|
|
25
|
+
this.requestUpdate();
|
|
26
|
+
}
|
|
27
|
+
render() {
|
|
28
|
+
return html `
|
|
29
|
+
<etools-dialog
|
|
30
|
+
id="confirmation-dialog"
|
|
31
|
+
size="md"
|
|
32
|
+
no-padding
|
|
33
|
+
keep-dialog-open
|
|
34
|
+
?hide-confirm-btn="${this.hideConfirmBtn}"
|
|
35
|
+
cancel-btn-text="${getTranslation(this.language, this.hideConfirmBtn ? 'OK' : 'CANCEL')}"
|
|
36
|
+
?opened="${this.dialogOpened}"
|
|
37
|
+
theme="confirmation"
|
|
38
|
+
dialog-title="${this.dialogTitle}"
|
|
39
|
+
@close="${this.onClose}"
|
|
40
|
+
@confirm-btn-clicked="${() => this.confirm()}"
|
|
41
|
+
>
|
|
42
|
+
<div class="confirmation-message">${this.text}</div>
|
|
43
|
+
</etools-dialog>
|
|
44
|
+
`;
|
|
45
|
+
}
|
|
46
|
+
onClose() {
|
|
47
|
+
fireEvent(this, 'response', { confirmed: false });
|
|
48
|
+
}
|
|
49
|
+
confirm() {
|
|
50
|
+
fireEvent(this, 'response', { confirmed: true });
|
|
51
|
+
}
|
|
52
|
+
static get styles() {
|
|
53
|
+
// language=CSS
|
|
54
|
+
return [
|
|
55
|
+
css `
|
|
56
|
+
.confirmation-message {
|
|
57
|
+
padding-left: 24px;
|
|
58
|
+
}
|
|
59
|
+
`
|
|
60
|
+
];
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
__decorate([
|
|
64
|
+
property()
|
|
65
|
+
], ConfirmationDialog.prototype, "dialogOpened", void 0);
|
|
66
|
+
__decorate([
|
|
67
|
+
property()
|
|
68
|
+
], ConfirmationDialog.prototype, "language", void 0);
|
|
69
|
+
ConfirmationDialog = __decorate([
|
|
70
|
+
customElement('confirmation-popup')
|
|
71
|
+
], ConfirmationDialog);
|
|
72
|
+
export { ConfirmationDialog };
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { CSSResultArray, LitElement, TemplateResult } from 'lit-element';
|
|
2
|
-
import '@polymer/iron-icons/iron-icons';
|
|
3
|
-
export declare class EtoolsFbCard extends LitElement {
|
|
4
|
-
cardTitle: string;
|
|
5
|
-
isEditable: boolean;
|
|
6
|
-
isCollapsible: boolean;
|
|
7
|
-
hideEditButton: boolean;
|
|
8
|
-
collapsed: boolean;
|
|
9
|
-
edit: boolean;
|
|
10
|
-
language: string;
|
|
11
|
-
static get styles(): CSSResultArray;
|
|
12
|
-
constructor();
|
|
13
|
-
save(): void;
|
|
14
|
-
cancel(): void;
|
|
15
|
-
startEdit(): void;
|
|
16
|
-
toggleCollapse(): void;
|
|
17
|
-
connectedCallback(): void;
|
|
18
|
-
disconnectedCallback(): void;
|
|
19
|
-
handleLanguageChange(e: CustomEvent): void;
|
|
20
|
-
protected render(): TemplateResult;
|
|
21
|
-
}
|
|
1
|
+
import { CSSResultArray, LitElement, TemplateResult } from 'lit-element';
|
|
2
|
+
import '@polymer/iron-icons/iron-icons';
|
|
3
|
+
export declare class EtoolsFbCard extends LitElement {
|
|
4
|
+
cardTitle: string;
|
|
5
|
+
isEditable: boolean;
|
|
6
|
+
isCollapsible: boolean;
|
|
7
|
+
hideEditButton: boolean;
|
|
8
|
+
collapsed: boolean;
|
|
9
|
+
edit: boolean;
|
|
10
|
+
language: string;
|
|
11
|
+
static get styles(): CSSResultArray;
|
|
12
|
+
constructor();
|
|
13
|
+
save(): void;
|
|
14
|
+
cancel(): void;
|
|
15
|
+
startEdit(): void;
|
|
16
|
+
toggleCollapse(): void;
|
|
17
|
+
connectedCallback(): void;
|
|
18
|
+
disconnectedCallback(): void;
|
|
19
|
+
handleLanguageChange(e: CustomEvent): void;
|
|
20
|
+
protected render(): TemplateResult;
|
|
21
|
+
}
|