@aquera/nile-elements 0.0.36-3 → 0.0.37-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.
Files changed (32) hide show
  1. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-code-editor/nile-code-editor.css.js +2 -1
  2. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-code-editor/nile-code-editor.css.js.map +1 -1
  3. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-code-editor/nile-code-editor.d.ts +1 -0
  4. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-code-editor/nile-code-editor.js +5 -1
  5. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-code-editor/nile-code-editor.js.map +1 -1
  6. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-switcher/nile-switcher.d.ts +2 -1
  7. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-switcher/nile-switcher.js +12 -7
  8. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-switcher/nile-switcher.js.map +1 -1
  9. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/tsconfig.tsbuildinfo +1 -1
  10. package/dist/index.iife.js +71 -67
  11. package/dist/nile-code-editor/nile-code-editor.cjs.js +1 -1
  12. package/dist/nile-code-editor/nile-code-editor.cjs.js.map +1 -1
  13. package/dist/nile-code-editor/nile-code-editor.css.cjs.js +1 -1
  14. package/dist/nile-code-editor/nile-code-editor.css.cjs.js.map +1 -1
  15. package/dist/nile-code-editor/nile-code-editor.css.esm.js +4 -3
  16. package/dist/nile-code-editor/nile-code-editor.esm.js +4 -4
  17. package/dist/nile-switcher/nile-switcher.cjs.js +1 -1
  18. package/dist/nile-switcher/nile-switcher.cjs.js.map +1 -1
  19. package/dist/nile-switcher/nile-switcher.esm.js +11 -8
  20. package/dist/src/nile-code-editor/nile-code-editor.css.js +2 -1
  21. package/dist/src/nile-code-editor/nile-code-editor.css.js.map +1 -1
  22. package/dist/src/nile-code-editor/nile-code-editor.d.ts +1 -0
  23. package/dist/src/nile-code-editor/nile-code-editor.js +5 -1
  24. package/dist/src/nile-code-editor/nile-code-editor.js.map +1 -1
  25. package/dist/src/nile-switcher/nile-switcher.d.ts +2 -1
  26. package/dist/src/nile-switcher/nile-switcher.js +12 -7
  27. package/dist/src/nile-switcher/nile-switcher.js.map +1 -1
  28. package/dist/tsconfig.tsbuildinfo +1 -1
  29. package/package.json +1 -1
  30. package/src/nile-code-editor/nile-code-editor.css.ts +2 -1
  31. package/src/nile-code-editor/nile-code-editor.ts +2 -1
  32. package/src/nile-switcher/nile-switcher.ts +15 -6
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.36-3",
6
+ "version": "0.0.37-1",
7
7
  "main": "dist/src/index.js",
8
8
  "type": "module",
9
9
  "module": "dist/src/index.js",
@@ -43,7 +43,8 @@ export const styles = css`
43
43
  .code-mirror:hover > .code-editor__icon__container {
44
44
  cursor: pointer;
45
45
  display: flex;
46
- padding-right: 5px;
46
+ align-self: start;
47
+ padding: 5px 5px 0px 0px;
47
48
  }
48
49
  `;
49
50
 
@@ -50,6 +50,7 @@ export class NileCodeEditor extends NileElement {
50
50
  @property({ type: Boolean }) updateValue: any = false;
51
51
  @property({ attribute: 'error-message' }) errorMessage = '';
52
52
  @property({ attribute: 'error' }) error = false;
53
+ @property({ type: Boolean }) expandable: any = false;
53
54
 
54
55
  /**
55
56
  * The styles for CodeEditor
@@ -159,7 +160,7 @@ export class NileCodeEditor extends NileElement {
159
160
  'code-mirror__singleline': !this.multiline,
160
161
  })}
161
162
  >
162
- ${!this.multiline
163
+ ${this.expandable
163
164
  ? html` <nile-icon
164
165
  name="expand-2"
165
166
  class="code-editor__icon__container"
@@ -66,6 +66,7 @@ export interface switchInputType {
66
66
  noborder?: boolean;
67
67
  multiLine?: boolean;
68
68
  expand?: boolean;
69
+ expandable?: boolean;
69
70
  }
70
71
 
71
72
  export enum POSITIONS {
@@ -106,7 +107,7 @@ export class NileSwitcher extends NileElement {
106
107
 
107
108
  @property({ type: Object }) nileSwitchConfig: switchconfig;
108
109
 
109
- @property({ type: Number }) current: Number = 0;
110
+ @property({ type: Number }) current: Number = 1;
110
111
 
111
112
  @property({ type: Object }) currentInput: switchInputType;
112
113
 
@@ -271,9 +272,10 @@ export class NileSwitcher extends NileElement {
271
272
  </nile-content-editor>`;
272
273
  }
273
274
 
274
- renderObjectMapper() {
275
- const noborder = this.currentInput.noborder;
276
- const mode = this.currentInput.mode;
275
+ renderObjectMapper(Input: switchInputType) {
276
+ let { options, inputType, error, errorMessage, type, readonly, noborder } =
277
+ Input;
278
+
277
279
  const value =
278
280
  this.currentInput.mode === MODE.CREATE
279
281
  ? 'Click to Create - Not Mapped'
@@ -285,6 +287,8 @@ export class NileSwitcher extends NileElement {
285
287
  'switcher-object-mapper--noborder': !!noborder,
286
288
  })}
287
289
  .value=${value}
290
+ .errorMessage=${errorMessage}
291
+ .error=${error}
288
292
  readonly="true"
289
293
  @click="${(e: CustomEvent) =>
290
294
  this.handleChange(e, INPUT_TYPE_NAMES.OBJECT_MAPPER)}"
@@ -292,7 +296,7 @@ export class NileSwitcher extends NileElement {
292
296
  <nile-icon
293
297
  class="pointer-cursor switcher-object-mapper-icon"
294
298
  slot="suffix"
295
- name="collapse"
299
+ name="expand-2"
296
300
  color="#005EA6"
297
301
  size="16"
298
302
  >
@@ -311,6 +315,7 @@ export class NileSwitcher extends NileElement {
311
315
  error,
312
316
  inputType,
313
317
  noborder,
318
+ expandable,
314
319
  } = Input;
315
320
  return html`<nile-code-editor
316
321
  part="switcher-code-editor"
@@ -323,6 +328,7 @@ export class NileSwitcher extends NileElement {
323
328
  this.handleChange(e, INPUT_TYPE_NAMES.CODE_EDITOR)}"
324
329
  .multiline="${multiLine}"
325
330
  .value="${value}"
331
+ .expandable="${expandable}"
326
332
  .customOptions="${customAutoCompletions}"
327
333
  ></nile-code-editor> `;
328
334
  }
@@ -427,7 +433,10 @@ export class NileSwitcher extends NileElement {
427
433
  INPUT_TYPE_NAMES.CONTENTEDITOR,
428
434
  () => this.renderContentEditor(this.currentInput),
429
435
  ],
430
- [INPUT_TYPE_NAMES.OBJECT_MAPPER, () => this.renderObjectMapper()],
436
+ [
437
+ INPUT_TYPE_NAMES.OBJECT_MAPPER,
438
+ () => this.renderObjectMapper(this.currentInput),
439
+ ],
431
440
  [
432
441
  INPUT_TYPE_NAMES.CODE_EDITOR,
433
442
  () => this.renderCodeEditor(this.currentInput),