@aquera/nile-elements 0.0.28 → 0.0.30

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 (42) hide show
  1. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-content-editor/nile-content-editor.css.js +1 -0
  2. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-content-editor/nile-content-editor.css.js.map +1 -1
  3. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-error-message/nile-error-message.js +1 -1
  4. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-error-message/nile-error-message.js.map +1 -1
  5. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-switcher/nile-switcher.css.js +43 -6
  6. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-switcher/nile-switcher.css.js.map +1 -1
  7. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-switcher/nile-switcher.d.ts +30 -17
  8. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-switcher/nile-switcher.js +143 -110
  9. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-switcher/nile-switcher.js.map +1 -1
  10. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/tsconfig.tsbuildinfo +1 -1
  11. package/dist/index.cjs.js +1 -1
  12. package/dist/index.esm.js +1 -1
  13. package/dist/index.iife.js +379 -318
  14. package/dist/nile-content-editor/nile-content-editor.css.cjs.js +1 -1
  15. package/dist/nile-content-editor/nile-content-editor.css.cjs.js.map +1 -1
  16. package/dist/nile-content-editor/nile-content-editor.css.esm.js +1 -0
  17. package/dist/nile-error-message/nile-error-message.cjs.js +1 -1
  18. package/dist/nile-error-message/nile-error-message.cjs.js.map +1 -1
  19. package/dist/nile-error-message/nile-error-message.esm.js +1 -1
  20. package/dist/nile-switcher/index.cjs.js +1 -1
  21. package/dist/nile-switcher/index.esm.js +1 -1
  22. package/dist/nile-switcher/nile-switcher.cjs.js +1 -1
  23. package/dist/nile-switcher/nile-switcher.cjs.js.map +1 -1
  24. package/dist/nile-switcher/nile-switcher.css.cjs.js +1 -1
  25. package/dist/nile-switcher/nile-switcher.css.cjs.js.map +1 -1
  26. package/dist/nile-switcher/nile-switcher.css.esm.js +45 -8
  27. package/dist/nile-switcher/nile-switcher.esm.js +72 -44
  28. package/dist/src/nile-content-editor/nile-content-editor.css.js +1 -0
  29. package/dist/src/nile-content-editor/nile-content-editor.css.js.map +1 -1
  30. package/dist/src/nile-error-message/nile-error-message.js +1 -1
  31. package/dist/src/nile-error-message/nile-error-message.js.map +1 -1
  32. package/dist/src/nile-switcher/nile-switcher.css.js +43 -6
  33. package/dist/src/nile-switcher/nile-switcher.css.js.map +1 -1
  34. package/dist/src/nile-switcher/nile-switcher.d.ts +30 -17
  35. package/dist/src/nile-switcher/nile-switcher.js +143 -110
  36. package/dist/src/nile-switcher/nile-switcher.js.map +1 -1
  37. package/dist/tsconfig.tsbuildinfo +1 -1
  38. package/package.json +1 -1
  39. package/src/nile-content-editor/nile-content-editor.css.ts +1 -0
  40. package/src/nile-error-message/nile-error-message.ts +1 -1
  41. package/src/nile-switcher/nile-switcher.css.ts +43 -6
  42. package/src/nile-switcher/nile-switcher.ts +167 -172
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Webcomponent nile-elements following open-wc recommendations",
4
4
  "license": "MIT",
5
5
  "author": "nile-elements",
6
- "version": "0.0.28",
6
+ "version": "0.0.30",
7
7
  "main": "dist/src/index.js",
8
8
  "type": "module",
9
9
  "module": "dist/src/index.js",
@@ -14,6 +14,7 @@ export const styles = css`
14
14
  :host {
15
15
  box-sizing: border-box;
16
16
  font-size: 14px;
17
+ overflow: hidden;
17
18
  }
18
19
 
19
20
  .content-editable-wrapper {
@@ -62,7 +62,7 @@ export class NileErrorMessage extends LitElement {
62
62
  size="14"
63
63
  class="nile-error-message__icon"
64
64
  part="icon"
65
- color="#E5434D"
65
+ color="#A4121C"
66
66
  ></nile-icon>
67
67
  <span class="nile-error-message__error">${this.errorMessage}</span>
68
68
 
@@ -16,27 +16,64 @@ export const styles = css`
16
16
  box-sizing: border-box;
17
17
  }
18
18
 
19
- .pointer-cursor {
19
+ .switcher-icon-container {
20
20
  cursor: pointer;
21
+ justify-content: center;
22
+ display: flex;
23
+ align-items: center;
24
+ margin-bottom: 6px;
25
+ height: 28px;
26
+ width: 28px;
27
+ border-radius: 4px;
28
+ }
29
+
30
+ .switcher-icon-container.current {
31
+ background: var(--nile-colors-blue-400);
21
32
  }
22
- .input-container {
33
+
34
+ .switcher-input-container {
23
35
  display: flex;
36
+ }
37
+
38
+ .switcher-inline {
24
39
  gap: 0.5rem;
25
40
  }
26
41
 
27
- .input-container > :first-child {
28
- max-width: 98%;
29
- min-width: 98%;
42
+ .switcher-block {
43
+ flex-direction: column;
44
+ }
45
+
46
+ .switcher-block > :first-child {
47
+ align-self: end;
48
+ }
49
+
50
+ .switcher-inline > :nth-child(2) {
51
+ flex: 1;
30
52
  }
31
53
 
32
- nile-icon {
54
+ .switcher-input-container > :first-child {
55
+ display: flex;
56
+ gap: 0.5rem;
33
57
  max-height: 38px;
58
+ align-items: center;
34
59
  }
35
60
 
36
61
  nile-radio {
37
62
  display: inline-block;
38
63
  padding-right: 10px;
39
64
  }
65
+
66
+ .switcher-object-mapper::part(input) {
67
+ color: var(--nile-colors-primary-600);
68
+ cursor: pointer;
69
+ }
70
+
71
+ .switcher-input--noborder::part(base) {
72
+ border: none;
73
+ }
74
+ .switcher-object-mapper--noborder::part(base) {
75
+ border: none;
76
+ }
40
77
  `;
41
78
 
42
79
  export default [styles];
@@ -12,20 +12,19 @@ import NileElement from '../internal/nile-element';
12
12
  import { CSSResultGroup } from 'lit';
13
13
  import { choose } from 'lit/directives/choose.js';
14
14
  import { classMap } from 'lit/directives/class-map.js';
15
+ import { repeat } from 'lit/directives/repeat.js';
15
16
 
16
17
  /**
17
18
  * @summary Allows you to switch between nile elements
18
-
19
+ *
19
20
  * @dependency nile-icon
20
21
  * @dependency nile-input
21
22
  * @dependency nile-checkbox
22
23
  * @dependency nile-dropdown
23
24
  * @dependency nile-textarea
24
25
  *
25
-
26
26
  * @event nile-change - Emitted when the control's value changes.
27
27
  * @event nile-switch - Emitted when the nile component is being switched.
28
-
29
28
  */
30
29
 
31
30
  export interface switchconfig {
@@ -33,8 +32,9 @@ export interface switchconfig {
33
32
  toggleSwitch: boolean;
34
33
  disable?: boolean;
35
34
  confirmation?: boolean;
36
- defaultInput: switchInputType;
37
- switchInput: switchInputType;
35
+ current: number;
36
+ align: 'block' | 'inline';
37
+ inputs: switchInputType[];
38
38
  }
39
39
 
40
40
  export interface switchInputType {
@@ -44,11 +44,15 @@ export interface switchInputType {
44
44
  | INPUT_TYPE_NAMES.CHECKBOX
45
45
  | INPUT_TYPE_NAMES.TEXTAREA
46
46
  | INPUT_TYPE_NAMES.RADIO
47
- | INPUT_TYPE_NAMES.CONTENTEDITOR;
47
+ | INPUT_TYPE_NAMES.CONTENTEDITOR
48
+ | INPUT_TYPE_NAMES.OBJECT_MAPPER;
48
49
  value?: String | boolean;
49
50
  label?: String;
50
51
  readonly?: boolean;
52
+ order: number;
51
53
  type?: string;
54
+ icon: string;
55
+ mode?: string;
52
56
  placeholder?: string;
53
57
  disabled?: boolean;
54
58
  required?: boolean;
@@ -60,6 +64,11 @@ export interface switchInputType {
60
64
  noborder?: boolean;
61
65
  }
62
66
 
67
+ export enum POSITIONS {
68
+ INLINE = 'inline',
69
+ BLOCK = 'block',
70
+ }
71
+
63
72
  export enum INPUT_TYPE {
64
73
  DEFAULT = 'defaultInput',
65
74
  SWITCH = 'switchInput',
@@ -72,6 +81,12 @@ export enum INPUT_TYPE_NAMES {
72
81
  TEXTAREA = 'text-area',
73
82
  RADIO = 'radio',
74
83
  CONTENTEDITOR = 'content-editor',
84
+ OBJECT_MAPPER = 'object-mapper',
85
+ }
86
+
87
+ export enum MODE {
88
+ CREATE = 'create',
89
+ EDIT = 'edit',
75
90
  }
76
91
 
77
92
  @customElement('nile-switcher')
@@ -81,9 +96,12 @@ export class NileSwitcher extends NileElement {
81
96
  * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`
82
97
  */
83
98
  static styles: CSSResultGroup = styles;
99
+
84
100
  @property({ type: Object }) nileSwitchConfig: switchconfig;
101
+ @property() currentInput: switchInputType;
85
102
 
86
103
  connectedCallback() {
104
+ this.currentInput = this.nileSwitchConfig.inputs[0];
87
105
  super.connectedCallback();
88
106
  this.emit('nile-init');
89
107
  }
@@ -93,7 +111,7 @@ export class NileSwitcher extends NileElement {
93
111
  this.emit('nile-destroy');
94
112
  }
95
113
 
96
- renderNileText(Input: switchInputType, inputType: string) {
114
+ renderNileText(Input: switchInputType) {
97
115
  const {
98
116
  value,
99
117
  label,
@@ -102,9 +120,14 @@ export class NileSwitcher extends NileElement {
102
120
  required,
103
121
  error,
104
122
  errorMessage,
105
- inputType: inputTypeName,
123
+ inputType,
124
+ noborder,
106
125
  } = Input;
107
126
  return html`<nile-input
127
+ class=${classMap({
128
+ 'switcher-input': true,
129
+ 'switcher-input--noborder': !!noborder,
130
+ })}
108
131
  .value=${value}
109
132
  .label=${label}
110
133
  .disabled=${disabled}
@@ -113,12 +136,12 @@ export class NileSwitcher extends NileElement {
113
136
  .placeholder=${placeholder}
114
137
  .error=${error}
115
138
  @nile-input=${(e: CustomEvent) => {
116
- this.handleChange(e, inputType, inputTypeName);
139
+ this.handleChange(e, inputType);
117
140
  }}
118
141
  ></nile-input>`;
119
142
  }
120
143
 
121
- renderDropdown(Input: switchInputType, inputType: string) {
144
+ renderDropdown(Input: switchInputType) {
122
145
  const {
123
146
  options,
124
147
  multiple,
@@ -127,10 +150,11 @@ export class NileSwitcher extends NileElement {
127
150
  value,
128
151
  error,
129
152
  errorMessage,
130
- inputType: inputTypeName,
153
+ inputType,
131
154
  } = Input;
132
155
 
133
156
  return html`<nile-select
157
+ class="switcher-dropdown"
134
158
  .placeholder=${placeholder}
135
159
  .disabled="${disabled}"
136
160
  .multiple="${multiple}"
@@ -138,7 +162,7 @@ export class NileSwitcher extends NileElement {
138
162
  .error="${error}"
139
163
  .errorMessage="${errorMessage}"
140
164
  @nile-change=${(e: CustomEvent) => {
141
- this.handleChange(e, inputType, inputTypeName);
165
+ this.handleChange(e, inputType);
142
166
  }}
143
167
  >
144
168
  ${options?.map((option: any) => {
@@ -147,58 +171,48 @@ export class NileSwitcher extends NileElement {
147
171
  </nile-select>`;
148
172
  }
149
173
 
150
- renderNileTextArea(Input: switchInputType, inputType: string) {
151
- const {
152
- value,
153
- disabled,
154
- readonly,
155
- errorMessage,
156
- error,
157
- inputType: inputTypeName,
158
- } = Input;
174
+ renderNileTextArea(Input: switchInputType) {
175
+ const { value, disabled, readonly, errorMessage, error, inputType } = Input;
159
176
 
160
177
  return html`<nile-textarea
178
+ class="switcher-textarea"
161
179
  .value=${value}
162
180
  .disabled=${disabled}
163
181
  ?readonly=${readonly}
164
182
  .error=${error}
165
183
  .errorMessage=${errorMessage}
166
184
  @nile-input=${(e: CustomEvent) => {
167
- this.handleChange(e, inputType, inputTypeName);
185
+ this.handleChange(e, inputType);
168
186
  }}
169
187
  ></nile-textarea>`;
170
188
  }
171
189
 
172
- renderNileCheckBox(Input: switchInputType, inputType: string) {
173
- const { value, label, disabled, inputType: inputTypeName } = Input;
190
+ renderNileCheckBox(Input: switchInputType) {
191
+ const { value, label, disabled, inputType } = Input;
174
192
 
175
193
  return html`<nile-checkbox
194
+ class="switcher-checkbox"
176
195
  .checked=${value}
177
196
  .label=${label}
178
197
  .disabled=${disabled}
179
198
  @valueChange=${(e: CustomEvent) => {
180
- this.handleChange(e, inputType, inputTypeName);
199
+ this.handleChange(e, inputType);
181
200
  }}
182
201
  ></nile-checkbox
183
202
  >; `;
184
203
  }
185
204
 
186
- renderNileRadio(Input: switchInputType, inputType: string) {
187
- const {
188
- options,
189
- value,
190
- disabled,
191
- inputType: inputTypeName,
192
- errorMessage,
193
- } = Input;
205
+ renderNileRadio(Input: switchInputType) {
206
+ const { options, value, disabled, errorMessage, inputType } = Input;
194
207
 
195
208
  const haserrorMessage = !!errorMessage;
196
209
 
197
210
  return html`<nile-radio-group
211
+ class="switcher-radio-group"
198
212
  .value=${value}
199
213
  .disabled=${disabled}
200
214
  @change=${(e: CustomEvent) => {
201
- this.handleChange(e, inputType, inputTypeName);
215
+ this.handleChange(e, inputType);
202
216
  }}
203
217
  >
204
218
  ${options &&
@@ -215,17 +229,11 @@ export class NileSwitcher extends NileElement {
215
229
  `;
216
230
  }
217
231
 
218
- renderContentEditor(Input: switchInputType, inputType: string) {
219
- let {
220
- options,
221
- inputType: inputTypeName,
222
- errorMessage,
223
- type,
224
- readonly,
225
- noborder,
226
- value,
227
- } = Input;
232
+ renderContentEditor(Input: switchInputType) {
233
+ let { options, inputType, errorMessage, type, readonly, noborder, value } =
234
+ Input;
228
235
  return html`<nile-content-editor
236
+ class="switcher-content-editor"
229
237
  .value=${value}
230
238
  .options=${options}
231
239
  .type=${type}
@@ -233,154 +241,141 @@ export class NileSwitcher extends NileElement {
233
241
  .noborder=${noborder}
234
242
  .errorMessage=${errorMessage}
235
243
  @nile-change=${(e: CustomEvent) => {
236
- this.handleChange(e, inputType, inputTypeName);
244
+ this.handleChange(e, inputType);
237
245
  }}
238
246
  >
239
247
  </nile-content-editor>`;
240
248
  }
241
249
 
242
- handleChange(event: CustomEvent, inputType: string, inputTypeName: string) {
243
- if (inputTypeName === INPUT_TYPE_NAMES.CHECKBOX) {
244
- this.nileSwitchConfig[inputType as keyof switchconfig].value =
245
- event.detail.checked;
246
- } else {
247
- this.nileSwitchConfig[inputType as keyof switchconfig].value =
248
- event.detail.value;
249
- }
250
- event.stopPropagation();
251
- this.emit('nile-change', { config: this.nileSwitchConfig });
252
- }
253
-
254
- renderIcon(defaultInput: switchInputType, switchInput: switchInputType) {
255
- const defaultHelperText = defaultInput.helperText;
256
- const switchHelperText = switchInput.helperText;
257
-
258
- const icon = !this.nileSwitchConfig.toggleSwitch
259
- ? 'header-functions'
260
- : 'stringinput';
250
+ renderObjectMapper() {
251
+ const noborder = this.currentInput.noborder;
252
+ const mode = this.currentInput.mode;
253
+ const value =
254
+ this.currentInput.mode === MODE.CREATE
255
+ ? 'Click to Create - Not Mapped'
256
+ : '';
261
257
 
262
- const helperText = !this.nileSwitchConfig.toggleSwitch
263
- ? !!switchHelperText
264
- ? switchHelperText
265
- : `switch to ${switchInput.inputType}`
266
- : !!defaultHelperText
267
- ? defaultHelperText
268
- : `switch to ${defaultInput.inputType}`;
269
-
270
- return html` <nile-tooltip
258
+ return html`<nile-input
271
259
  class=${classMap({
272
- 'tooltip-container': true,
260
+ 'switcher-object-mapper': true,
261
+ 'switcher-object-mapper--noborder': !!noborder,
273
262
  })}
274
- content=${helperText}
275
- placement="bottom"
263
+ .value=${value}
264
+ readonly="true"
265
+ @click="${(e: CustomEvent) =>
266
+ this.handleChange(e, INPUT_TYPE_NAMES.OBJECT_MAPPER)}"
276
267
  >
277
268
  <nile-icon
278
- size="14"
279
- class=${classMap({
280
- 'pointer-cursor': true,
281
- })}
282
- .name=${icon}
269
+ class="pointer-cursor switcher-object-mapper-icon"
270
+ slot="suffix"
271
+ name="collapse"
283
272
  color="#005EA6"
284
- @click=${this.toggleField}
285
- ></nile-icon>
286
- </nile-tooltip>`;
273
+ size="16"
274
+ >
275
+ </nile-icon>
276
+ </nile-input>`;
287
277
  }
288
278
 
289
- toggleField() {
290
- if (!this.nileSwitchConfig.confirmation) {
291
- this.nileSwitchConfig = {
292
- ...this.nileSwitchConfig,
293
- toggleSwitch: !this.nileSwitchConfig.toggleSwitch,
294
- };
279
+ handleChange(event: CustomEvent, inputType: string) {
280
+ switch (inputType) {
281
+ case INPUT_TYPE_NAMES.OBJECT_MAPPER:
282
+ this.currentInput.value = 'clicked';
283
+ break;
284
+ case INPUT_TYPE_NAMES.CHECKBOX:
285
+ this.currentInput.value = event.detail.checked;
286
+ break;
287
+ default:
288
+ this.currentInput.value = event.detail.value;
295
289
  }
296
- this.emit('nile-switch', { config: this.nileSwitchConfig });
290
+ event.stopPropagation();
291
+ this.emit('nile-change', { input: this.currentInput });
297
292
  }
298
293
 
299
- singleFieldSwitcher(
300
- defaultInput: switchInputType,
301
- switchInput: switchInputType,
302
- toggleField: boolean,
303
- disable: boolean
304
- ) {
305
- const defaultInputType = defaultInput.inputType;
306
- const switchInputType = switchInput.inputType;
294
+ renderIcon() {
295
+ const inputs = this.nileSwitchConfig.inputs;
296
+ const toolTipPosition =
297
+ this.nileSwitchConfig.align === POSITIONS.BLOCK ? 'top' : 'bottom';
298
+
307
299
  return html`
308
- ${!toggleField
309
- ? choose(
310
- defaultInputType,
311
- [
312
- [
313
- INPUT_TYPE_NAMES.TEXT,
314
- () => this.renderNileText(defaultInput, INPUT_TYPE.DEFAULT),
315
- ],
316
- [
317
- INPUT_TYPE_NAMES.CHECKBOX,
318
- () => this.renderNileCheckBox(defaultInput, INPUT_TYPE.DEFAULT),
319
- ],
320
- [
321
- INPUT_TYPE_NAMES.TEXTAREA,
322
- () => this.renderNileTextArea(defaultInput, INPUT_TYPE.DEFAULT),
323
- ],
324
- [
325
- INPUT_TYPE_NAMES.RADIO,
326
- () => this.renderNileRadio(defaultInput, INPUT_TYPE.DEFAULT),
327
- ],
328
- [
329
- INPUT_TYPE_NAMES.DROPDOWN,
330
- () =>
331
- this.renderDropdown(
332
- this.nileSwitchConfig.defaultInput,
333
- INPUT_TYPE.DEFAULT
334
- ),
335
- ],
336
- [
337
- INPUT_TYPE_NAMES.CONTENTEDITOR,
338
- () =>
339
- this.renderContentEditor(
340
- this.nileSwitchConfig.defaultInput,
341
- INPUT_TYPE.DEFAULT
342
- ),
343
- ],
344
- ],
345
- () => this.renderNileText(defaultInput, INPUT_TYPE.DEFAULT)
346
- )
347
- : choose(
348
- switchInputType,
349
- [
350
- [
351
- INPUT_TYPE_NAMES.TEXTAREA,
352
- () => this.renderNileTextArea(switchInput, INPUT_TYPE.SWITCH),
353
- ],
354
- [
355
- INPUT_TYPE_NAMES.TEXT,
356
- () => this.renderNileText(switchInput, INPUT_TYPE.SWITCH),
357
- ],
358
- [
359
- INPUT_TYPE_NAMES.CONTENTEDITOR,
360
- () => this.renderContentEditor(switchInput, INPUT_TYPE.SWITCH),
361
- ],
362
- ],
363
-
364
- () => this.renderNileTextArea(switchInput, INPUT_TYPE.SWITCH)
365
- )}
366
- ${!disable ? this.renderIcon(defaultInput, switchInput) : ''}
300
+ <div class="switcher-icons-container">
301
+ ${repeat(
302
+ inputs,
303
+ input => html` <nile-tooltip
304
+ class=${classMap({
305
+ 'switcher-tooltip-container': true,
306
+ })}
307
+ content=${input.helperText}
308
+ placement=${toolTipPosition}
309
+ >
310
+ <div class=${classMap({
311
+ 'switcher-icon-container': true,
312
+ current: input.order === this.currentInput.order,
313
+ })}>
314
+ <nile-icon
315
+ size="16"
316
+ class=${classMap({
317
+ 'pointer-cursor': true,
318
+ })}
319
+ .name=${input.icon}
320
+ color="#000000"
321
+ @click=${() => this.toggleField(input)}
322
+ ></nile-icon>
323
+ <div>
324
+
325
+ </nile-tooltip>`
326
+ )}
327
+ </div>
367
328
  `;
368
329
  }
369
- public render(): TemplateResult {
370
- const {
371
- toggleSwitch: toggleField,
372
- defaultInput,
373
- switchInput,
374
- disable,
375
- } = this.nileSwitchConfig;
376
-
377
- return html`<div class="input-container">
378
- ${this.singleFieldSwitcher(
379
- defaultInput,
380
- switchInput,
381
- toggleField,
382
- !!disable
330
+
331
+ toggleField(currentInput: switchInputType) {
332
+ this.currentInput = currentInput;
333
+ this.emit('nile-switch', { input: this.currentInput });
334
+ }
335
+
336
+ singleFieldSwitcher() {
337
+ return html`
338
+ ${choose(
339
+ this.currentInput.inputType,
340
+ [
341
+ [INPUT_TYPE_NAMES.TEXT, () => this.renderNileText(this.currentInput)],
342
+ [
343
+ INPUT_TYPE_NAMES.CHECKBOX,
344
+ () => this.renderNileCheckBox(this.currentInput),
345
+ ],
346
+ [
347
+ INPUT_TYPE_NAMES.TEXTAREA,
348
+ () => this.renderNileTextArea(this.currentInput),
349
+ ],
350
+ [
351
+ INPUT_TYPE_NAMES.RADIO,
352
+ () => this.renderNileRadio(this.currentInput),
353
+ ],
354
+ [
355
+ INPUT_TYPE_NAMES.DROPDOWN,
356
+ () => this.renderDropdown(this.currentInput),
357
+ ],
358
+ [
359
+ INPUT_TYPE_NAMES.CONTENTEDITOR,
360
+ () => this.renderContentEditor(this.currentInput),
361
+ ],
362
+ [INPUT_TYPE_NAMES.OBJECT_MAPPER, () => this.renderObjectMapper()],
363
+ ],
364
+ () => this.renderNileText(this.currentInput)
383
365
  )}
366
+ `;
367
+ }
368
+
369
+ public render(): TemplateResult {
370
+ const align = this.nileSwitchConfig.align;
371
+ return html`<div
372
+ class=${classMap({
373
+ 'switcher-block': align === POSITIONS.BLOCK,
374
+ 'switcher-inline': align === POSITIONS.INLINE,
375
+ 'switcher-input-container': true,
376
+ })}
377
+ >
378
+ ${this.renderIcon()} ${this.singleFieldSwitcher()}
384
379
  </div>`;
385
380
  }
386
381
  }