@unicef-polymer/etools-form-builder 3.1.9 → 3.2.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.
@@ -133,11 +133,11 @@ let FormCollapsedCard = class FormCollapsedCard extends FormAbstractGroup {
133
133
  retrieveTitle(target) {
134
134
  switch (target) {
135
135
  case PARTNER_KEY:
136
- return `${getTranslation(this.language, 'PARTNER')}: `;
136
+ return `${getTranslation(this.language, 'PARTNER')}`;
137
137
  case OUTPUT_KEY:
138
- return `${getTranslation(this.language, 'CP_OUTPUT')}: `;
138
+ return `${getTranslation(this.language, 'CP_OUTPUT')}`;
139
139
  case INTERVENTION_KEY:
140
- return `${getTranslation(this.language, 'PD_SPD')}: `;
140
+ return `${getTranslation(this.language, 'PD_SPD')}`;
141
141
  default:
142
142
  return '';
143
143
  }
@@ -108,8 +108,6 @@ let RichToolbar = class RichToolbar extends LitElement {
108
108
  { name: getTranslation(this.language, 'HEADING2'), value: 'h2' },
109
109
  { name: getTranslation(this.language, 'HEADING3'), value: 'h3' },
110
110
  { name: getTranslation(this.language, 'HEADING4'), value: 'h4' },
111
- { name: getTranslation(this.language, 'HEADING5'), value: 'h5' },
112
- { name: getTranslation(this.language, 'HEADING6'), value: 'h6' },
113
111
  { name: getTranslation(this.language, 'PARAGRAPH'), value: 'p' },
114
112
  { name: getTranslation(this.language, 'PRE_FORMATTED'), value: 'pre' }
115
113
  ]}
@@ -124,9 +122,7 @@ let RichToolbar = class RichToolbar extends LitElement {
124
122
  { name: getTranslation(this.language, 'SMALL'), value: '2' },
125
123
  { name: getTranslation(this.language, 'NORMAL'), value: '3' },
126
124
  { name: getTranslation(this.language, 'MEDIUM_LARGE'), value: '4' },
127
- { name: getTranslation(this.language, 'LARGE'), value: '5' },
128
- { name: getTranslation(this.language, 'VERY_LARGE'), value: '6' },
129
- { name: getTranslation(this.language, 'MAXIMUM'), value: '7' }
125
+ { name: getTranslation(this.language, 'LARGE'), value: '5' }
130
126
  ]}
131
127
  ></rich-action>
132
128
  <rich-action icon="undo" command="undo"></rich-action>
@@ -31,15 +31,18 @@ let RichViewer = class RichViewer extends LitElement {
31
31
  }
32
32
  firstUpdated() {
33
33
  document.execCommand('defaultParagraphSeparator', false, 'br');
34
- document.addEventListener('selectionchange', () => {
35
- this.updateSelection();
36
- });
37
- window.addEventListener('selectionchange', () => {
38
- this.updateSelection();
39
- });
40
- document.addEventListener('keydown', () => {
41
- this.updateSelection();
42
- });
34
+ const mainEl = this.closest('main');
35
+ if (mainEl) {
36
+ mainEl.addEventListener('selectionchange', () => {
37
+ this.updateSelection();
38
+ });
39
+ mainEl.addEventListener('selectionchange', () => {
40
+ this.updateSelection();
41
+ });
42
+ mainEl.addEventListener('keydown', () => {
43
+ this.updateSelection();
44
+ });
45
+ }
43
46
  }
44
47
  };
45
48
  RichViewer.styles = css `
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": "3.1.9",
4
+ "version": "3.2.1",
5
5
  "type": "module",
6
6
  "contributors": [
7
7
  "eTools Team"