@aquera/nile-elements 0.0.38-5 → 0.0.38-6

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 (22) hide show
  1. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-content-editor/nile-content-editor.d.ts +1 -0
  2. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-content-editor/nile-content-editor.js +8 -2
  3. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-content-editor/nile-content-editor.js.map +1 -1
  4. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-switcher/nile-switcher.js +2 -1
  5. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-switcher/nile-switcher.js.map +1 -1
  6. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/tsconfig.tsbuildinfo +1 -1
  7. package/dist/index.iife.js +4 -3
  8. package/dist/nile-content-editor/nile-content-editor.cjs.js +1 -1
  9. package/dist/nile-content-editor/nile-content-editor.cjs.js.map +1 -1
  10. package/dist/nile-content-editor/nile-content-editor.esm.js +5 -5
  11. package/dist/nile-switcher/nile-switcher.cjs.js +1 -1
  12. package/dist/nile-switcher/nile-switcher.cjs.js.map +1 -1
  13. package/dist/nile-switcher/nile-switcher.esm.js +11 -10
  14. package/dist/src/nile-content-editor/nile-content-editor.d.ts +1 -0
  15. package/dist/src/nile-content-editor/nile-content-editor.js +8 -2
  16. package/dist/src/nile-content-editor/nile-content-editor.js.map +1 -1
  17. package/dist/src/nile-switcher/nile-switcher.js +2 -1
  18. package/dist/src/nile-switcher/nile-switcher.js.map +1 -1
  19. package/dist/tsconfig.tsbuildinfo +1 -1
  20. package/package.json +1 -1
  21. package/src/nile-content-editor/nile-content-editor.ts +7 -2
  22. package/src/nile-switcher/nile-switcher.ts +11 -2
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.38-5",
6
+ "version": "0.0.38-6",
7
7
  "main": "dist/src/index.js",
8
8
  "type": "module",
9
9
  "module": "dist/src/index.js",
@@ -62,6 +62,7 @@ export class NileContentEditor extends NileElement {
62
62
 
63
63
  @property({ attribute: 'error' }) error = false;
64
64
  @property({ attribute: 'noborder' }) noborder = false;
65
+ @property({ type: Boolean }) updateValue: any = false;
65
66
 
66
67
  @state() initialValue = '';
67
68
 
@@ -134,9 +135,13 @@ export class NileContentEditor extends NileElement {
134
135
  });
135
136
  }
136
137
 
137
- @watch(['type'], { waitUntilFirstUpdate: true })
138
+ @watch(['type', 'value'], { waitUntilFirstUpdate: true })
138
139
  handleTypeChange() {
139
- this.contentEditor.innerHTML = this.generateHTMLTagsWithValues(this.value);
140
+ if (this.updateValue) {
141
+ this.contentEditor.innerHTML = this.generateHTMLTagsWithValues(
142
+ this.value
143
+ );
144
+ }
140
145
  }
141
146
 
142
147
  disconnectedCallback(): void {
@@ -259,8 +259,16 @@ export class NileSwitcher extends NileElement {
259
259
  }
260
260
 
261
261
  renderContentEditor(Input: switchInputType) {
262
- let { options, inputType, errorMessage, type, readonly, noborder, value } =
263
- Input;
262
+ let {
263
+ options,
264
+ inputType,
265
+ errorMessage,
266
+ type,
267
+ readonly,
268
+ noborder,
269
+ value,
270
+ updateValue,
271
+ } = Input;
264
272
  return html`<nile-content-editor
265
273
  class="switcher-content-editor"
266
274
  .value=${value}
@@ -268,6 +276,7 @@ export class NileSwitcher extends NileElement {
268
276
  .type=${type}
269
277
  .readonly=${readonly}
270
278
  .noborder=${noborder}
279
+ .updateValue=${updateValue}
271
280
  .errorMessage=${errorMessage}
272
281
  @nile-change=${(e: CustomEvent) => {
273
282
  this.handleChange(e, inputType);