@aquera/nile-elements 0.0.13 → 0.0.14

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 (160) 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 +32 -22
  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-error-message/nile-error-message.css.js +1 -0
  5. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-error-message/nile-error-message.css.js.map +1 -1
  6. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-error-message/nile-error-message.d.ts +1 -0
  7. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-error-message/nile-error-message.js +15 -8
  8. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-error-message/nile-error-message.js.map +1 -1
  9. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-form-help-text/nile-form-help-text.css.js +10 -0
  10. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-form-help-text/nile-form-help-text.css.js.map +1 -1
  11. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-form-help-text/nile-form-help-text.d.ts +8 -0
  12. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-form-help-text/nile-form-help-text.js +56 -6
  13. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-form-help-text/nile-form-help-text.js.map +1 -1
  14. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-icon/icons/svg/array-loop.d.ts +5 -0
  15. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-icon/icons/svg/array-loop.js +5 -0
  16. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-icon/icons/svg/array-loop.js.map +1 -0
  17. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-icon/icons/svg/index.d.ts +2 -0
  18. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-icon/icons/svg/index.js +2 -0
  19. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-icon/icons/svg/index.js.map +1 -1
  20. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-icon/icons/svg/integer.d.ts +5 -0
  21. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-icon/icons/svg/integer.js +5 -0
  22. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-icon/icons/svg/integer.js.map +1 -0
  23. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-option/nile-option.js +7 -0
  24. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-option/nile-option.js.map +1 -1
  25. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-select/nile-select.css.js +11 -0
  26. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-select/nile-select.css.js.map +1 -1
  27. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-select/nile-select.js +10 -1
  28. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-select/nile-select.js.map +1 -1
  29. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-switcher/nile-switcher.d.ts +2 -1
  30. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-switcher/nile-switcher.js +31 -18
  31. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-switcher/nile-switcher.js.map +1 -1
  32. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/tsconfig.tsbuildinfo +1 -1
  33. package/demo/filenames.txt +1 -1
  34. package/dist/index.cjs.js +1 -1
  35. package/dist/index.esm.js +1 -1
  36. package/dist/index.iife.js +97 -51
  37. package/dist/nile-badge/index.cjs.js +1 -1
  38. package/dist/nile-badge/index.esm.js +1 -1
  39. package/dist/nile-badge/nile-badge.cjs.js +1 -1
  40. package/dist/nile-badge/nile-badge.cjs.js.map +1 -1
  41. package/dist/nile-badge/nile-badge.esm.js +1 -1
  42. package/dist/nile-button/index.cjs.js +1 -1
  43. package/dist/nile-button/index.esm.js +1 -1
  44. package/dist/nile-button/nile-button.cjs.js +1 -1
  45. package/dist/nile-button/nile-button.cjs.js.map +1 -1
  46. package/dist/nile-button/nile-button.esm.js +1 -1
  47. package/dist/nile-content-editor/nile-content-editor.cjs.js +1 -1
  48. package/dist/nile-content-editor/nile-content-editor.cjs.js.map +1 -1
  49. package/dist/nile-content-editor/nile-content-editor.esm.js +3 -3
  50. package/dist/nile-dialog/index.cjs.js +1 -1
  51. package/dist/nile-dialog/index.esm.js +1 -1
  52. package/dist/nile-dialog/nile-dialog.cjs.js +1 -1
  53. package/dist/nile-dialog/nile-dialog.cjs.js.map +1 -1
  54. package/dist/nile-dialog/nile-dialog.esm.js +1 -1
  55. package/dist/nile-error-message/nile-error-message.cjs.js +1 -1
  56. package/dist/nile-error-message/nile-error-message.cjs.js.map +1 -1
  57. package/dist/nile-error-message/nile-error-message.css.cjs.js +1 -1
  58. package/dist/nile-error-message/nile-error-message.css.cjs.js.map +1 -1
  59. package/dist/nile-error-message/nile-error-message.css.esm.js +1 -0
  60. package/dist/nile-error-message/nile-error-message.esm.js +13 -10
  61. package/dist/nile-form-help-text/index.cjs.js +1 -1
  62. package/dist/nile-form-help-text/index.esm.js +1 -1
  63. package/dist/nile-form-help-text/nile-form-help-text.cjs.js +1 -1
  64. package/dist/nile-form-help-text/nile-form-help-text.cjs.js.map +1 -1
  65. package/dist/nile-form-help-text/nile-form-help-text.css.cjs.js +1 -1
  66. package/dist/nile-form-help-text/nile-form-help-text.css.cjs.js.map +1 -1
  67. package/dist/nile-form-help-text/nile-form-help-text.css.esm.js +10 -0
  68. package/dist/nile-form-help-text/nile-form-help-text.esm.js +16 -5
  69. package/dist/nile-icon/icons/svg/array-loop.cjs.js +2 -0
  70. package/dist/nile-icon/icons/svg/array-loop.cjs.js.map +1 -0
  71. package/dist/nile-icon/icons/svg/array-loop.esm.js +1 -0
  72. package/dist/nile-icon/icons/svg/index.cjs.js +1 -1
  73. package/dist/nile-icon/icons/svg/index.esm.js +1 -1
  74. package/dist/nile-icon/icons/svg/integer.cjs.js +2 -0
  75. package/dist/nile-icon/icons/svg/integer.cjs.js.map +1 -0
  76. package/dist/nile-icon/icons/svg/integer.esm.js +1 -0
  77. package/dist/nile-icon/index.cjs.js +1 -1
  78. package/dist/nile-icon/index.cjs.js.map +1 -1
  79. package/dist/nile-icon/index.esm.js +2 -2
  80. package/dist/nile-icon-button/index.cjs.js +1 -1
  81. package/dist/nile-icon-button/index.esm.js +1 -1
  82. package/dist/nile-icon-button/nile-icon-button.cjs.js +1 -1
  83. package/dist/nile-icon-button/nile-icon-button.cjs.js.map +1 -1
  84. package/dist/nile-icon-button/nile-icon-button.esm.js +1 -1
  85. package/dist/nile-input/index.cjs.js +1 -1
  86. package/dist/nile-input/index.esm.js +1 -1
  87. package/dist/nile-input/nile-input.cjs.js +1 -1
  88. package/dist/nile-input/nile-input.cjs.js.map +1 -1
  89. package/dist/nile-input/nile-input.esm.js +1 -1
  90. package/dist/nile-menu-item/index.cjs.js +1 -1
  91. package/dist/nile-menu-item/index.esm.js +1 -1
  92. package/dist/nile-menu-item/nile-menu-item.cjs.js +1 -1
  93. package/dist/nile-menu-item/nile-menu-item.cjs.js.map +1 -1
  94. package/dist/nile-menu-item/nile-menu-item.esm.js +1 -1
  95. package/dist/nile-option/index.cjs.js +1 -1
  96. package/dist/nile-option/index.esm.js +1 -1
  97. package/dist/nile-option/nile-option.cjs.js +1 -1
  98. package/dist/nile-option/nile-option.cjs.js.map +1 -1
  99. package/dist/nile-option/nile-option.esm.js +1 -1
  100. package/dist/nile-select/index.cjs.js +1 -1
  101. package/dist/nile-select/index.esm.js +1 -1
  102. package/dist/nile-select/nile-select.cjs.js +1 -1
  103. package/dist/nile-select/nile-select.cjs.js.map +1 -1
  104. package/dist/nile-select/nile-select.css.cjs.js +1 -1
  105. package/dist/nile-select/nile-select.css.cjs.js.map +1 -1
  106. package/dist/nile-select/nile-select.css.esm.js +11 -0
  107. package/dist/nile-select/nile-select.esm.js +8 -2
  108. package/dist/nile-switcher/nile-switcher.cjs.js +1 -1
  109. package/dist/nile-switcher/nile-switcher.cjs.js.map +1 -1
  110. package/dist/nile-switcher/nile-switcher.esm.js +42 -38
  111. package/dist/nile-tag/index.cjs.js +1 -1
  112. package/dist/nile-tag/index.esm.js +1 -1
  113. package/dist/nile-tag/nile-tag.cjs.js +1 -1
  114. package/dist/nile-tag/nile-tag.cjs.js.map +1 -1
  115. package/dist/nile-tag/nile-tag.esm.js +1 -1
  116. package/dist/src/nile-content-editor/nile-content-editor.d.ts +1 -0
  117. package/dist/src/nile-content-editor/nile-content-editor.js +32 -22
  118. package/dist/src/nile-content-editor/nile-content-editor.js.map +1 -1
  119. package/dist/src/nile-error-message/nile-error-message.css.js +1 -0
  120. package/dist/src/nile-error-message/nile-error-message.css.js.map +1 -1
  121. package/dist/src/nile-error-message/nile-error-message.d.ts +1 -0
  122. package/dist/src/nile-error-message/nile-error-message.js +15 -8
  123. package/dist/src/nile-error-message/nile-error-message.js.map +1 -1
  124. package/dist/src/nile-form-help-text/nile-form-help-text.css.js +10 -0
  125. package/dist/src/nile-form-help-text/nile-form-help-text.css.js.map +1 -1
  126. package/dist/src/nile-form-help-text/nile-form-help-text.d.ts +8 -0
  127. package/dist/src/nile-form-help-text/nile-form-help-text.js +56 -6
  128. package/dist/src/nile-form-help-text/nile-form-help-text.js.map +1 -1
  129. package/dist/src/nile-icon/icons/svg/array-loop.d.ts +5 -0
  130. package/dist/src/nile-icon/icons/svg/array-loop.js +5 -0
  131. package/dist/src/nile-icon/icons/svg/array-loop.js.map +1 -0
  132. package/dist/src/nile-icon/icons/svg/index.d.ts +2 -0
  133. package/dist/src/nile-icon/icons/svg/index.js +2 -0
  134. package/dist/src/nile-icon/icons/svg/index.js.map +1 -1
  135. package/dist/src/nile-icon/icons/svg/integer.d.ts +5 -0
  136. package/dist/src/nile-icon/icons/svg/integer.js +5 -0
  137. package/dist/src/nile-icon/icons/svg/integer.js.map +1 -0
  138. package/dist/src/nile-option/nile-option.js +7 -0
  139. package/dist/src/nile-option/nile-option.js.map +1 -1
  140. package/dist/src/nile-select/nile-select.css.js +11 -0
  141. package/dist/src/nile-select/nile-select.css.js.map +1 -1
  142. package/dist/src/nile-select/nile-select.js +10 -1
  143. package/dist/src/nile-select/nile-select.js.map +1 -1
  144. package/dist/src/nile-switcher/nile-switcher.d.ts +2 -1
  145. package/dist/src/nile-switcher/nile-switcher.js +31 -18
  146. package/dist/src/nile-switcher/nile-switcher.js.map +1 -1
  147. package/dist/tsconfig.tsbuildinfo +1 -1
  148. package/package.json +1 -1
  149. package/src/nile-content-editor/nile-content-editor.ts +37 -23
  150. package/src/nile-error-message/nile-error-message.css.ts +1 -0
  151. package/src/nile-error-message/nile-error-message.ts +17 -9
  152. package/src/nile-form-help-text/nile-form-help-text.css.ts +10 -0
  153. package/src/nile-form-help-text/nile-form-help-text.ts +73 -26
  154. package/src/nile-icon/icons/svg/array-loop.ts +5 -0
  155. package/src/nile-icon/icons/svg/index.ts +2 -0
  156. package/src/nile-icon/icons/svg/integer.ts +5 -0
  157. package/src/nile-option/nile-option.ts +9 -0
  158. package/src/nile-select/nile-select.css.ts +11 -0
  159. package/src/nile-select/nile-select.ts +10 -1
  160. package/src/nile-switcher/nile-switcher.ts +48 -23
@@ -51,6 +51,7 @@ export declare class NileContentEditor extends NileElement {
51
51
  filterOptions(): void;
52
52
  generateValuesFromHTMLTags(string: any): string;
53
53
  generateHTMLTagsWithValues(string: any): string;
54
+ setError(option: any): string;
54
55
  emitInputChange(): void;
55
56
  insertNodes(parentNode: Node, childNodes: NodeList, autoOptionsTag?: Node): void;
56
57
  handleOptions(option: any): void;
@@ -70,20 +70,23 @@ let NileContentEditor = class NileContentEditor extends NileElement {
70
70
  }
71
71
  async handleClipboardEvent(event) {
72
72
  const selectedText = window?.getSelection()?.toString();
73
- if (!!selectedText) {
74
- switch (event.type) {
75
- case 'cut':
76
- case 'copy':
73
+ switch (event.type) {
74
+ case 'cut':
75
+ case 'copy':
76
+ if (!!selectedText)
77
77
  await navigator.clipboard.writeText(selectedText);
78
- document.execCommand(event.type);
79
- break;
80
- case 'paste':
81
- const pastedText = await navigator.clipboard.readText();
82
- document.execCommand('insertText', false, pastedText);
83
- break;
84
- default:
85
- break;
86
- }
78
+ document.execCommand(event.type);
79
+ break;
80
+ case 'paste':
81
+ event.preventDefault();
82
+ let pastedText = await navigator.clipboard.readText();
83
+ pastedText = pastedText
84
+ .replace(/<(|\/)(html|body|meta|span)[^>]*?>/gi, '')
85
+ .trim();
86
+ document.execCommand('insertText', false, pastedText);
87
+ break;
88
+ default:
89
+ break;
87
90
  }
88
91
  setTimeout(() => {
89
92
  this.emitInputChange();
@@ -110,7 +113,8 @@ let NileContentEditor = class NileContentEditor extends NileElement {
110
113
  event.preventDefault();
111
114
  return;
112
115
  }
113
- if ([KeyCode.CUT, KeyCode.COPY, KeyCode.PASTE].includes(event.code)) {
116
+ if ([KeyCode.CUT, KeyCode.COPY, KeyCode.PASTE].includes(event.code) &&
117
+ (event.ctrlKey || event.metaKey)) {
114
118
  return;
115
119
  }
116
120
  if (event.code === KeyCode.ESCAPE) {
@@ -129,12 +133,12 @@ let NileContentEditor = class NileContentEditor extends NileElement {
129
133
  else {
130
134
  this.toggleDropdown(false);
131
135
  }
132
- });
136
+ }, 10);
133
137
  }
134
138
  filterOptions() {
135
139
  this.filteredOptions = this.options;
136
140
  if (!!this.options.length && !!this.filteredValue) {
137
- this.filteredOptions = this.options.filter(item => item.startsWith(this.filteredValue));
141
+ this.filteredOptions = this.options.filter(item => item.includes(this.filteredValue));
138
142
  }
139
143
  else {
140
144
  this.filteredOptions = this.options;
@@ -152,12 +156,16 @@ let NileContentEditor = class NileContentEditor extends NileElement {
152
156
  var result = string.replace(pattern, (match, option) => {
153
157
  return this.options.includes(option)
154
158
  ? '<span class="chips" contenteditable="false">' + option + '</span>'
155
- : '<span class="chips chip-error" contenteditable="false">' +
156
- option +
157
- '</span>';
159
+ : this.setError(option);
158
160
  });
159
161
  return result;
160
162
  }
163
+ setError(option) {
164
+ this.error = true;
165
+ return ('<span class="chips chip-error" contenteditable="false">' +
166
+ option +
167
+ '</span>');
168
+ }
161
169
  emitInputChange() {
162
170
  if (this.contentEditor) {
163
171
  let fieldValue = this.contentEditor.innerHTML;
@@ -165,7 +173,7 @@ let NileContentEditor = class NileContentEditor extends NileElement {
165
173
  fieldValue = this.generateValuesFromHTMLTags(fieldValue);
166
174
  }
167
175
  fieldValue = fieldValue.replace(/&nbsp;/g, ' ');
168
- fieldValue = fieldValue === '<br>' ? '' : fieldValue?.trim();
176
+ fieldValue = fieldValue.replace('<br>', '');
169
177
  this.emit('nile-change', {
170
178
  value: this.generateValuesFromHTMLTags(fieldValue),
171
179
  });
@@ -254,6 +262,7 @@ let NileContentEditor = class NileContentEditor extends NileElement {
254
262
  : ''}
255
263
  <div
256
264
  contenteditable="${!readonly}"
265
+ spellcheck="false"
257
266
  class=${classMap({
258
267
  'content-editable-input': true,
259
268
  error: hasError || hasErrorMessage,
@@ -275,8 +284,9 @@ let NileContentEditor = class NileContentEditor extends NileElement {
275
284
  `
276
285
  : ``}
277
286
  </div>
278
-
279
- ${this.renderAutoOptions()}
287
+ ${this.filteredOptions && !!this.filteredOptions.length
288
+ ? this.renderAutoOptions()
289
+ : null}
280
290
  </nile-popup>
281
291
  `;
282
292
  }
@@ -1 +1 @@
1
- {"version":3,"file":"nile-content-editor.js","sourceRoot":"","sources":["../../../src/nile-content-editor/nile-content-editor.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAkB,MAAM,aAAa,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAChE,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AAEnD,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,WAAW,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE9C;;;;;GAKG;AAEI,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,WAAW;IAA3C;QACL;;;;;;SAMC;;QAEW,UAAK,GAAW,EAAE,CAAC;QAMnB,cAAS,GAAY,IAAI,CAAC;QAE1B,cAAS,GAAG,EAAE,CAAC;QAEf,SAAI,GAAG,gBAAgB,CAAC;QAExB,aAAQ,GAAY,IAAI,CAAC;QAK5B,iBAAY,GAAG,KAAK,CAAC;QAE9B,kBAAa,GAAG,GAAG,CAAC;QAEpB,kBAAa,GAAG,EAAE,CAAC;QAEmB,aAAQ,GAAG,EAAE,CAAC;QAEf,aAAQ,GAAG,KAAK,CAAC;QAEZ,iBAAY,GAAG,EAAE,CAAC;QAE1B,UAAK,GAAG,KAA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AAK,CAAC,yBAAyB,CAAC;wDAAiC;AAChC;IAAjC,KAAK,CAAC,yBAAyB,CAAC;sDAA+B;AAEvD;IAAR,KAAK,EAAE;uDAAsB;AAMQ;IAArC,QAAQ,CAAC,EAAE,SAAS,EAAE,WAAW,EAAE,CAAC;mDAAe;AAEf;IAApC,QAAQ,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,CAAC;mDAAkB;AAEZ;IAAzC,QAAQ,CAAC,EAAE,SAAS,EAAE,eAAe,EAAE,CAAC;uDAAmB;AAE1B;IAAjC,QAAQ,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC;gDAAe;AAqEhD;IADC,KAAK,CAAC,MAAM,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;yDAG7C;AA7GU,iBAAiB;IAD7B,aAAa,CAAC,qBAAqB,CAAC;GACxB,iBAAiB,CAkT7B;SAlTY,iBAAiB;AAoT9B,eAAe,iBAAiB,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { html, property, TemplateResult } from 'lit-element';\nimport { customElement, query, state } from 'lit/decorators.js';\nimport { styles } from './nile-content-editor.css';\nimport { CSSResultGroup } from 'lit';\nimport { classMap } from 'lit/directives/class-map.js';\nimport NileElement from '../internal/nile-element';\nimport { watch } from '../internal/watch';\nimport { KeyCode } from '../internal/enum';\nimport { live } from 'lit/directives/live.js';\n\n/**\n * Nile icon component.\n *\n * @tag nile-attribute-expression\n *\n */\n@customElement('nile-content-editor')\nexport class NileContentEditor extends NileElement {\n /**\n * @summary Allows you to handle both input and dropdown selection\n\n * @dependency nile-option\n \n * @event nile-change - Emitted when the control's value changes. \n */\n\n @property() value: string = '';\n\n @property() options: Array<any>;\n\n @property() filteredOptions: Array<any>;\n\n @property() showLabel: boolean = true;\n\n @property() labelText = '';\n\n @property() type = 'text|text-area';\n\n @property() required: boolean = true;\n\n @query('.content-editable-input') contentEditor: HTMLInputElement;\n @query('.nile-options-container') autoOptions: HTMLInputElement;\n\n @state() openDropdown = false;\n\n tagIdentifier = '$';\n\n filteredValue = '';\n\n @property({ attribute: 'help-text' }) helpText = '';\n\n @property({ attribute: 'readonly' }) readonly = false;\n\n @property({ attribute: 'error-message' }) errorMessage = '';\n\n @property({ attribute: 'error' }) error = false;\n\n static styles: CSSResultGroup = styles;\n\n connectedCallback() {\n this.handleOutsideClick = this.handleOutsideClick.bind(this);\n this.handleClipboardEvent = this.handleClipboardEvent.bind(this);\n super.connectedCallback();\n this.emit('nile-init');\n this.addOpenListeners();\n this.setInitialValues();\n }\n\n setInitialValues() {\n this.updateComplete.then(res => {\n if (res && !!this.value)\n this.contentEditor.innerHTML = this.generateHTMLTagsWithValues(\n this.value\n );\n });\n }\n\n addOpenListeners() {\n window.addEventListener('click', this.handleOutsideClick);\n window.addEventListener('cut', this.handleClipboardEvent);\n window.addEventListener('copy', this.handleClipboardEvent);\n window.addEventListener('paste', this.handleClipboardEvent);\n }\n\n removeOpenListeners() {\n window.removeEventListener('click', this.handleOutsideClick);\n window.removeEventListener('cut', this.handleClipboardEvent);\n window.removeEventListener('copy', this.handleClipboardEvent);\n window.removeEventListener('paste', this.handleClipboardEvent);\n }\n\n async handleClipboardEvent(event: Event) {\n const selectedText = window?.getSelection()?.toString();\n if (!!selectedText) {\n switch (event.type) {\n case 'cut':\n case 'copy':\n await navigator.clipboard.writeText(selectedText);\n document.execCommand(event.type);\n break;\n case 'paste':\n const pastedText = await navigator.clipboard.readText();\n document.execCommand('insertText', false, pastedText);\n break;\n default:\n break;\n }\n }\n setTimeout(() => {\n this.emitInputChange();\n });\n }\n\n toggleDropdown(value: boolean) {\n this.openDropdown = value;\n }\n\n handleOutsideClick(event: Event) {\n if (event && event.target) {\n this.toggleDropdown(false);\n }\n }\n\n @watch('type', { waitUntilFirstUpdate: true })\n handleTypeChange() {\n this.contentEditor.innerHTML = this.generateHTMLTagsWithValues(this.value);\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n this.removeOpenListeners();\n this.emit('nile-destroy');\n }\n\n private handlekeyDown(event: any) {\n if (event.code === KeyCode.ENTER && this.type === 'text') {\n event.preventDefault();\n return;\n }\n if ([KeyCode.CUT, KeyCode.COPY, KeyCode.PASTE].includes(event.code)) {\n return;\n }\n if (event.code === KeyCode.ESCAPE) {\n event.preventDefault();\n this.toggleDropdown(false);\n return;\n }\n setTimeout(() => {\n const value = this.contentEditor.innerText;\n this.emitInputChange();\n if (value.includes(this.tagIdentifier)) {\n this.insertNodes(this.contentEditor, this.contentEditor.childNodes);\n this.filterOptions();\n this.toggleDropdown(true);\n } else {\n this.toggleDropdown(false);\n }\n });\n }\n\n filterOptions() {\n this.filteredOptions = this.options;\n if (!!this.options.length && !!this.filteredValue) {\n this.filteredOptions = this.options.filter(item =>\n item.startsWith(this.filteredValue)\n );\n } else {\n this.filteredOptions = this.options;\n }\n }\n\n generateValuesFromHTMLTags(string: any): string {\n var pattern =\n /<span class=\"chips(?: chip-error)?\" contenteditable=\"false\">(.*?)<\\/span>/g;\n var result = string.replace(pattern, (match: any, option: any) => {\n return '{{' + option + '}}';\n });\n return result;\n }\n\n generateHTMLTagsWithValues(string: any): string {\n var pattern = /{{(.*?)}}/g;\n var result = string.replace(pattern, (match: any, option: any) => {\n return this.options.includes(option)\n ? '<span class=\"chips\" contenteditable=\"false\">' + option + '</span>'\n : '<span class=\"chips chip-error\" contenteditable=\"false\">' +\n option +\n '</span>';\n });\n return result;\n }\n\n emitInputChange(): void {\n if (this.contentEditor) {\n let fieldValue = this.contentEditor.innerHTML;\n if (this.contentEditor.innerText !== '') {\n fieldValue = this.generateValuesFromHTMLTags(fieldValue);\n }\n fieldValue = fieldValue.replace(/&nbsp;/g, ' ');\n fieldValue = fieldValue === '<br>' ? '' : fieldValue?.trim();\n this.emit('nile-change', {\n value: this.generateValuesFromHTMLTags(fieldValue),\n });\n }\n }\n\n insertNodes(parentNode: Node, childNodes: NodeList, autoOptionsTag?: Node) {\n [...childNodes].forEach((node: Node, index: number) => {\n if (node.hasChildNodes()) {\n if (autoOptionsTag) {\n this.insertNodes(node, node.childNodes, autoOptionsTag);\n } else {\n this.insertNodes(node, node.childNodes);\n }\n } else {\n if (node.nodeValue?.includes(this.tagIdentifier)) {\n if (autoOptionsTag) {\n parentNode.childNodes[index].nodeValue = node.nodeValue?.replace(\n this.tagIdentifier + this.filteredValue,\n ''\n );\n parentNode.childNodes[index].after(autoOptionsTag);\n }\n this.filteredValue =\n parentNode?.childNodes[index]?.nodeValue\n ?.split(this.tagIdentifier)\n .slice(1)\n .join() || '';\n return;\n }\n }\n });\n }\n\n handleOptions(option: any): void {\n this.toggleDropdown(false);\n let autoOptionsTag = document.createElement('span');\n autoOptionsTag.setAttribute('class', 'chips');\n autoOptionsTag.setAttribute('contentEditable', 'false');\n autoOptionsTag.innerText = option;\n this.insertNodes(\n this.contentEditor,\n this.contentEditor.childNodes,\n autoOptionsTag\n );\n this.filteredOptions = this.options;\n this.filteredValue = '';\n this.emitInputChange();\n }\n\n public renderAutoOptions(): TemplateResult {\n return html`<div\n class=\"${classMap({\n 'nile-options-container': true,\n 'dropdown-position': this.type === 'text-area',\n })}\"\n >\n ${this.filteredOptions &&\n this.filteredOptions.map((option: any) => {\n return html` <nile-option\n .value=\"${option}\"\n @click=\"${(event: Event) => {\n this.handleOptions(option);\n }}\"\n >${option}\n </nile-option>`;\n })}\n </div>`;\n }\n\n public render(): TemplateResult {\n const hasHelpText = this.helpText ? true : false;\n const hasError = !!this.error;\n const hasErrorMessage = !!this.errorMessage;\n const readonly = !!this.readonly;\n const type = this.type;\n return html`\n <nile-popup\n .active=\"${live(this.openDropdown)}\"\n sync=\"width\"\n strategy=\"fixed\"\n placement=\"bottom\"\n class=${classMap({\n dropdown: true,\n 'dropdown--open': true,\n popup: true,\n })}\n >\n <div class=\"content-editable-wrapper\" slot=\"anchor\">\n ${this.showLabel && this.labelText\n ? html`<label class=\"ods-label\">${this.labelText} </label> ${this\n .required\n ? html`<span class=\"asterik\">*</span>`\n : ''}`\n : ''}\n <div\n contenteditable=\"${!readonly}\"\n class=${classMap({\n 'content-editable-input': true,\n error: hasError || hasErrorMessage,\n 'read-only': readonly,\n 'text-area': type === 'text-area' ? true : false,\n })}\n @keydown=${this.handlekeyDown}\n ></div>\n ${hasHelpText\n ? html`\n <nile-form-help-text>${this.helpText}</nile-form-help-text>\n `\n : ``}\n ${hasErrorMessage\n ? html`\n <nile-form-error-message\n >${this.errorMessage}</nile-form-error-message\n >\n `\n : ``}\n </div>\n\n ${this.renderAutoOptions()}\n </nile-popup>\n `;\n }\n}\n\nexport default NileContentEditor;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-content-editor': NileContentEditor;\n }\n}\n"]}
1
+ {"version":3,"file":"nile-content-editor.js","sourceRoot":"","sources":["../../../src/nile-content-editor/nile-content-editor.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAkB,MAAM,aAAa,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAChE,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AAEnD,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,WAAW,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE9C;;;;;GAKG;AAEI,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,WAAW;IAA3C;QACL;;;;;;SAMC;;QAEW,UAAK,GAAW,EAAE,CAAC;QAMnB,cAAS,GAAY,IAAI,CAAC;QAE1B,cAAS,GAAG,EAAE,CAAC;QAEf,SA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SAhUY,iBAAiB;AAkU9B,eAAe,iBAAiB,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { html, property, TemplateResult } from 'lit-element';\nimport { customElement, query, state } from 'lit/decorators.js';\nimport { styles } from './nile-content-editor.css';\nimport { CSSResultGroup } from 'lit';\nimport { classMap } from 'lit/directives/class-map.js';\nimport NileElement from '../internal/nile-element';\nimport { watch } from '../internal/watch';\nimport { KeyCode } from '../internal/enum';\nimport { live } from 'lit/directives/live.js';\n\n/**\n * Nile icon component.\n *\n * @tag nile-attribute-expression\n *\n */\n@customElement('nile-content-editor')\nexport class NileContentEditor extends NileElement {\n /**\n * @summary Allows you to handle both input and dropdown selection\n\n * @dependency nile-option\n \n * @event nile-change - Emitted when the control's value changes. \n */\n\n @property() value: string = '';\n\n @property() options: Array<any>;\n\n @property() filteredOptions: Array<any>;\n\n @property() showLabel: boolean = true;\n\n @property() labelText = '';\n\n @property() type = 'text|text-area';\n\n @property() required: boolean = true;\n\n @query('.content-editable-input') contentEditor: HTMLInputElement;\n @query('.nile-options-container') autoOptions: HTMLInputElement;\n\n @state() openDropdown = false;\n\n tagIdentifier = '$';\n\n filteredValue = '';\n\n @property({ attribute: 'help-text' }) helpText = '';\n\n @property({ attribute: 'readonly' }) readonly = false;\n\n @property({ attribute: 'error-message' }) errorMessage = '';\n\n @property({ attribute: 'error' }) error = false;\n\n static styles: CSSResultGroup = styles;\n\n connectedCallback() {\n this.handleOutsideClick = this.handleOutsideClick.bind(this);\n this.handleClipboardEvent = this.handleClipboardEvent.bind(this);\n super.connectedCallback();\n this.emit('nile-init');\n this.addOpenListeners();\n this.setInitialValues();\n }\n\n setInitialValues() {\n this.updateComplete.then(res => {\n if (res && !!this.value)\n this.contentEditor.innerHTML = this.generateHTMLTagsWithValues(\n this.value\n );\n });\n }\n\n addOpenListeners() {\n window.addEventListener('click', this.handleOutsideClick);\n window.addEventListener('cut', this.handleClipboardEvent);\n window.addEventListener('copy', this.handleClipboardEvent);\n window.addEventListener('paste', this.handleClipboardEvent);\n }\n\n removeOpenListeners() {\n window.removeEventListener('click', this.handleOutsideClick);\n window.removeEventListener('cut', this.handleClipboardEvent);\n window.removeEventListener('copy', this.handleClipboardEvent);\n window.removeEventListener('paste', this.handleClipboardEvent);\n }\n\n async handleClipboardEvent(event: Event) {\n const selectedText = window?.getSelection()?.toString();\n switch (event.type) {\n case 'cut':\n case 'copy':\n if (!!selectedText) await navigator.clipboard.writeText(selectedText);\n document.execCommand(event.type);\n break;\n case 'paste':\n event.preventDefault();\n let pastedText = await navigator.clipboard.readText();\n pastedText = pastedText\n .replace(/<(|\\/)(html|body|meta|span)[^>]*?>/gi, '')\n .trim();\n document.execCommand('insertText', false, pastedText);\n break;\n default:\n break;\n }\n setTimeout(() => {\n this.emitInputChange();\n });\n }\n\n toggleDropdown(value: boolean) {\n this.openDropdown = value;\n }\n\n handleOutsideClick(event: Event) {\n if (event && event.target) {\n this.toggleDropdown(false);\n }\n }\n\n @watch('type', { waitUntilFirstUpdate: true })\n handleTypeChange() {\n this.contentEditor.innerHTML = this.generateHTMLTagsWithValues(this.value);\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n this.removeOpenListeners();\n this.emit('nile-destroy');\n }\n\n private handlekeyDown(event: any) {\n if (event.code === KeyCode.ENTER && this.type === 'text') {\n event.preventDefault();\n return;\n }\n if (\n [KeyCode.CUT, KeyCode.COPY, KeyCode.PASTE].includes(event.code) &&\n (event.ctrlKey || event.metaKey)\n ) {\n return;\n }\n if (event.code === KeyCode.ESCAPE) {\n event.preventDefault();\n this.toggleDropdown(false);\n return;\n }\n setTimeout(() => {\n const value = this.contentEditor.innerText;\n this.emitInputChange();\n if (value.includes(this.tagIdentifier)) {\n this.insertNodes(this.contentEditor, this.contentEditor.childNodes);\n this.filterOptions();\n this.toggleDropdown(true);\n } else {\n this.toggleDropdown(false);\n }\n }, 10);\n }\n\n filterOptions() {\n this.filteredOptions = this.options;\n if (!!this.options.length && !!this.filteredValue) {\n this.filteredOptions = this.options.filter(item =>\n item.includes(this.filteredValue)\n );\n } else {\n this.filteredOptions = this.options;\n }\n }\n\n generateValuesFromHTMLTags(string: any): string {\n var pattern =\n /<span class=\"chips(?: chip-error)?\" contenteditable=\"false\">(.*?)<\\/span>/g;\n var result = string.replace(pattern, (match: any, option: any) => {\n return '{{' + option + '}}';\n });\n return result;\n }\n\n generateHTMLTagsWithValues(string: any): string {\n var pattern = /{{(.*?)}}/g;\n var result = string.replace(pattern, (match: any, option: any) => {\n return this.options.includes(option)\n ? '<span class=\"chips\" contenteditable=\"false\">' + option + '</span>'\n : this.setError(option);\n });\n return result;\n }\n\n setError(option: any) {\n this.error = true;\n return (\n '<span class=\"chips chip-error\" contenteditable=\"false\">' +\n option +\n '</span>'\n );\n }\n\n emitInputChange(): void {\n if (this.contentEditor) {\n let fieldValue = this.contentEditor.innerHTML;\n if (this.contentEditor.innerText !== '') {\n fieldValue = this.generateValuesFromHTMLTags(fieldValue);\n }\n fieldValue = fieldValue.replace(/&nbsp;/g, ' ');\n fieldValue = fieldValue.replace('<br>', '');\n this.emit('nile-change', {\n value: this.generateValuesFromHTMLTags(fieldValue),\n });\n }\n }\n\n insertNodes(parentNode: Node, childNodes: NodeList, autoOptionsTag?: Node) {\n [...childNodes].forEach((node: Node, index: number) => {\n if (node.hasChildNodes()) {\n if (autoOptionsTag) {\n this.insertNodes(node, node.childNodes, autoOptionsTag);\n } else {\n this.insertNodes(node, node.childNodes);\n }\n } else {\n if (node.nodeValue?.includes(this.tagIdentifier)) {\n if (autoOptionsTag) {\n parentNode.childNodes[index].nodeValue = node.nodeValue?.replace(\n this.tagIdentifier + this.filteredValue,\n ''\n );\n parentNode.childNodes[index].after(autoOptionsTag);\n }\n this.filteredValue =\n parentNode?.childNodes[index]?.nodeValue\n ?.split(this.tagIdentifier)\n .slice(1)\n .join() || '';\n return;\n }\n }\n });\n }\n\n handleOptions(option: any): void {\n this.toggleDropdown(false);\n let autoOptionsTag = document.createElement('span');\n autoOptionsTag.setAttribute('class', 'chips');\n autoOptionsTag.setAttribute('contentEditable', 'false');\n autoOptionsTag.innerText = option;\n this.insertNodes(\n this.contentEditor,\n this.contentEditor.childNodes,\n autoOptionsTag\n );\n this.filteredOptions = this.options;\n this.filteredValue = '';\n this.emitInputChange();\n }\n\n public renderAutoOptions(): TemplateResult {\n return html`<div\n class=\"${classMap({\n 'nile-options-container': true,\n 'dropdown-position': this.type === 'text-area',\n })}\"\n >\n ${this.filteredOptions &&\n this.filteredOptions.map((option: any) => {\n return html` <nile-option\n .value=\"${option}\"\n @click=\"${(event: Event) => {\n this.handleOptions(option);\n }}\"\n >${option}\n </nile-option>`;\n })}\n </div>`;\n }\n\n public render(): TemplateResult {\n const hasHelpText = this.helpText ? true : false;\n const hasError = !!this.error;\n const hasErrorMessage = !!this.errorMessage;\n const readonly = !!this.readonly;\n const type = this.type;\n return html`\n <nile-popup\n .active=\"${live(this.openDropdown)}\"\n sync=\"width\"\n strategy=\"fixed\"\n placement=\"bottom\"\n class=${classMap({\n dropdown: true,\n 'dropdown--open': true,\n popup: true,\n })}\n >\n <div class=\"content-editable-wrapper\" slot=\"anchor\">\n ${this.showLabel && this.labelText\n ? html`<label class=\"ods-label\">${this.labelText} </label> ${this\n .required\n ? html`<span class=\"asterik\">*</span>`\n : ''}`\n : ''}\n <div\n contenteditable=\"${!readonly}\"\n spellcheck=\"false\"\n class=${classMap({\n 'content-editable-input': true,\n error: hasError || hasErrorMessage,\n 'read-only': readonly,\n 'text-area': type === 'text-area' ? true : false,\n })}\n @keydown=${this.handlekeyDown}\n ></div>\n ${hasHelpText\n ? html`\n <nile-form-help-text>${this.helpText}</nile-form-help-text>\n `\n : ``}\n ${hasErrorMessage\n ? html`\n <nile-form-error-message\n >${this.errorMessage}</nile-form-error-message\n >\n `\n : ``}\n </div>\n ${this.filteredOptions && !!this.filteredOptions.length\n ? this.renderAutoOptions()\n : null}\n </nile-popup>\n `;\n }\n}\n\nexport default NileContentEditor;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-content-editor': NileContentEditor;\n }\n}\n"]}
@@ -28,6 +28,7 @@ export const styles = css `
28
28
 
29
29
  .nile-error-message__response {
30
30
  color: var(--nile-colors-dark-500);
31
+ margin-top:6px;
31
32
  }
32
33
 
33
34
  .nile-error-message__icon {
@@ -1 +1 @@
1
- {"version":3,"file":"nile-error-message.css.js","sourceRoot":"","sources":["../../../src/nile-error-message/nile-error-message.css.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAElC;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsExB,CAAC;AAEF,eAAe,CAAC,MAAM,CAAC,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { css } from 'lit-element';\n\n/**\n * ErrorMessage CSS\n */\nexport const styles = css`\n :host {\n }\n\n .nile-error-message {\n width: 100%;\n word-break: break-all;\n font-size: var(--nile-font-size-small);\n letter-spacing: 0.2px;\n font-weight: var(--nile-font-weight-regular);\n line-height: var(--nile-font-size-small);\n }\n\n .nile-error-message__error {\n color: var(--nile-colors-red-500);\n word-break: break-word;\n }\n\n .nile-error-message__response {\n color: var(--nile-colors-dark-500);\n }\n\n .nile-error-message__icon {\n vertical-align: middle;\n margin-right:2px;\n }\n\n .nile-error-message__more-button {\n color: var(--nile-colors-primary-600);\n cursor: pointer;\n white-space: nowrap;\n }\n\n .nile-error-message__response-expanded {\n height: auto;\n border: 1px solid var(--nile-colors-red-500);\n border-left: 6px solid var(--nile-colors-red-500);\n border-radius: 4px;\n margin-top: 12px;\n padding: 12px;\n background: var(--nile-colors-neutral-100);\n }\n\n .nile-error-message__response-expanded {\n max-height: 100px;\n overflow-y: auto;\n border: 1px solid var(--nile-colors-red-500);\n border-left: 6px solid var(--nile-colors-red-500);\n border-radius: 4px;\n margin-top: 12px;\n padding: 12px;\n background: var(--nile-colors-neutral-100);\n transition: max-height 0.3s ease-in-out;\n flex-shrink: 0;\n }\n\n .nile-error-message__response-expanded.collapsed {\n max-height: 0;\n overflow: hidden;\n transition: max-height 0.3s ease-in-out;\n visibility: hidden;\n padding: 0 12px;\n }\n\n .nile-error-message__response-expanded.expanded {\n max-height: 100px;\n transition: max-height 0.3s ease-in-out;\n visibility: visible;\n padding: 12px;\n }\n`;\n\nexport default [styles];\n"]}
1
+ {"version":3,"file":"nile-error-message.css.js","sourceRoot":"","sources":["../../../src/nile-error-message/nile-error-message.css.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAElC;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuExB,CAAC;AAEF,eAAe,CAAC,MAAM,CAAC,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { css } from 'lit-element';\n\n/**\n * ErrorMessage CSS\n */\nexport const styles = css`\n :host {\n }\n\n .nile-error-message {\n width: 100%;\n word-break: break-all;\n font-size: var(--nile-font-size-small);\n letter-spacing: 0.2px;\n font-weight: var(--nile-font-weight-regular);\n line-height: var(--nile-font-size-small);\n }\n\n .nile-error-message__error {\n color: var(--nile-colors-red-500);\n word-break: break-word;\n }\n\n .nile-error-message__response {\n color: var(--nile-colors-dark-500);\n margin-top:6px;\n }\n\n .nile-error-message__icon {\n vertical-align: middle;\n margin-right:2px;\n }\n\n .nile-error-message__more-button {\n color: var(--nile-colors-primary-600);\n cursor: pointer;\n white-space: nowrap;\n }\n\n .nile-error-message__response-expanded {\n height: auto;\n border: 1px solid var(--nile-colors-red-500);\n border-left: 6px solid var(--nile-colors-red-500);\n border-radius: 4px;\n margin-top: 12px;\n padding: 12px;\n background: var(--nile-colors-neutral-100);\n }\n\n .nile-error-message__response-expanded {\n max-height: 100px;\n overflow-y: auto;\n border: 1px solid var(--nile-colors-red-500);\n border-left: 6px solid var(--nile-colors-red-500);\n border-radius: 4px;\n margin-top: 12px;\n padding: 12px;\n background: var(--nile-colors-neutral-100);\n transition: max-height 0.3s ease-in-out;\n flex-shrink: 0;\n }\n\n .nile-error-message__response-expanded.collapsed {\n max-height: 0;\n overflow: hidden;\n transition: max-height 0.3s ease-in-out;\n visibility: hidden;\n padding: 0 12px;\n }\n\n .nile-error-message__response-expanded.expanded {\n max-height: 100px;\n transition: max-height 0.3s ease-in-out;\n visibility: visible;\n padding: 12px;\n }\n`;\n\nexport default [styles];\n"]}
@@ -7,6 +7,7 @@ export declare class NileErrorMessage extends LitElement {
7
7
  static get styles(): CSSResultArray;
8
8
  errorMessage: string;
9
9
  errorResponse: string;
10
+ errorResponseLong: string;
10
11
  isExpanded: boolean;
11
12
  private readonly MAX_LENGTH;
12
13
  /**
@@ -48,14 +48,18 @@ let NileErrorMessage = class NileErrorMessage extends LitElement {
48
48
 
49
49
 
50
50
  ${this.errorResponse
51
- ? html ` <span class="nile-error-message__response"
52
- >${this.getTruncatedResponse()}</span
53
- >
51
+ ? html `
52
+ <div class="nile-error-message__response">
53
+ ${this.errorResponse}
54
+ ${this.errorResponseLong
55
+ ? html `
54
56
  <span
55
- class="nile-error-message__more-button"
56
- @click=${this.toggleExpanded}
57
- >${this.isExpanded ? 'View Less' : 'View More'}</span
58
- >`
57
+ class="nile-error-message__more-button"
58
+ @click=${this.toggleExpanded}
59
+ >${this.isExpanded ? 'View Less' : 'View More'}</span
60
+ >` : ``}
61
+ </div>
62
+ `
59
63
  : ``}
60
64
 
61
65
  <div
@@ -63,7 +67,7 @@ let NileErrorMessage = class NileErrorMessage extends LitElement {
63
67
  ? 'expanded'
64
68
  : 'collapsed'}"
65
69
  >
66
- ${this.errorResponse}
70
+ ${this.errorResponseLong}
67
71
  </div>
68
72
  </div>
69
73
  `;
@@ -75,6 +79,9 @@ __decorate([
75
79
  __decorate([
76
80
  property({ type: String })
77
81
  ], NileErrorMessage.prototype, "errorResponse", void 0);
82
+ __decorate([
83
+ property({ type: String })
84
+ ], NileErrorMessage.prototype, "errorResponseLong", void 0);
78
85
  __decorate([
79
86
  property({ type: Boolean })
80
87
  ], NileErrorMessage.prototype, "isExpanded", void 0);
@@ -1 +1 @@
1
- {"version":3,"file":"nile-error-message.js","sourceRoot":"","sources":["../../../src/nile-error-message/nile-error-message.ts"],"names":[],"mappings":";AAAA,OAAO,EACL,UAAU,EACV,IAAI,EACJ,QAAQ,GAGT,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAElD;;;GAGG;AAEI,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,UAAU;IAAzC;;QAKL,4DAA4D;QAE5D,iBAAY,GAAW,EAAE,CAAC;QAO1B,eAAU,GAAY,KAAK,CAAC;QAE5B,wCAAwC;QACvB,eAAU,GAAW,GAAG,CAAC;IAsD5C,CAAC;IAtEQ,MAAM,KAAK,MAAM;QACtB,OAAO,CAAC,MAAM,CAAC,CAAC;IAClB,CAAC;IAgBD;;;OAGG;IACH,oBAAoB;QAClB,IAAI,IAAI,CAAC,aAAa,CAAC,MAAM,GAAG,IAAI,CAAC,UAAU,EAAE;YAC/C,OAAO,GAAG,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC,EAAE,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC;SACjE;QACD,OAAO,IAAI,CAAC,aAAa,CAAC;IAC5B,CAAC;IAED;;OAEG;IACH,cAAc;QACZ,IAAI,CAAC,UAAU,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC;IACrC,CAAC;IAEM,MAAM;QACX,OAAO,IAAI,CAAA;;;;;;;;;kDASmC,IAAI,CAAC,YAAY;;;UAGzD,IAAI,CAAC,aAAa;YAClB,CAAC,CAAC,IAAI,CAAA;mBACG,IAAI,CAAC,oBAAoB,EAAE;;;;yBAIrB,IAAI,CAAC,cAAc;mBACzB,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,WAAW;gBAC9C;YACN,CAAC,CAAC,EAAE;;;yDAG2C,IAAI,CAAC,UAAU;YAC5D,CAAC,CAAC,UAAU;YACZ,CAAC,CAAC,WAAW;;YAEb,IAAI,CAAC,aAAa;;;KAGzB,CAAC;IACJ,CAAC;CACF,CAAA;AAhEC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;sDACD;AAI1B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;uDACL;AAGtB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;oDACA;AAdjB,gBAAgB;IAD5B,aAAa,CAAC,oBAAoB,CAAC;GACvB,gBAAgB,CAuE5B;SAvEY,gBAAgB","sourcesContent":["import {\n LitElement,\n html,\n property,\n CSSResultArray,\n TemplateResult,\n} from 'lit-element';\nimport { customElement } from 'lit/decorators.js';\nimport { styles } from './nile-error-message.css';\n\n/**\n * A custom error message component that displays error information to the user.\n * @customElement nile-error-message\n */\n@customElement('nile-error-message')\nexport class NileErrorMessage extends LitElement {\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n // Represents the error message to be displayed to the user.\n @property({ type: String })\n errorMessage: string = '';\n\n // Represents additional details about the error, like stack trace or other info.\n @property({ type: String })\n errorResponse: string;\n\n @property({ type: Boolean })\n isExpanded: boolean = false;\n\n // The maximum length before truncation.\n private readonly MAX_LENGTH: number = 100;\n\n /**\n * Get a truncated version of the errorResponse if it's too long.\n * @returns {string}\n */\n getTruncatedResponse(): string {\n if (this.errorResponse.length > this.MAX_LENGTH) {\n return `${this.errorResponse.substring(0, this.MAX_LENGTH)}...`;\n }\n return this.errorResponse;\n }\n\n /**\n * Toggle the expanded state of the error response.\n */\n toggleExpanded() {\n this.isExpanded = !this.isExpanded;\n }\n\n public render(): TemplateResult {\n return html`\n <div class=\"nile-error-message\" part=\"base\">\n <nile-icon\n name=\"info2\"\n size=\"14\"\n class=\"nile-error-message__icon\"\n part=\"icon\"\n color=\"#E5434D\"\n ></nile-icon>\n <span class=\"nile-error-message__error\">${this.errorMessage}</span>\n\n\n ${this.errorResponse\n ? html` <span class=\"nile-error-message__response\"\n >${this.getTruncatedResponse()}</span\n >\n <span\n class=\"nile-error-message__more-button\"\n @click=${this.toggleExpanded}\n >${this.isExpanded ? 'View Less' : 'View More'}</span\n >`\n : ``}\n\n <div\n class=\"nile-error-message__response-expanded ${this.isExpanded\n ? 'expanded'\n : 'collapsed'}\"\n >\n ${this.errorResponse}\n </div>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-error-message': NileErrorMessage;\n }\n}\n"]}
1
+ {"version":3,"file":"nile-error-message.js","sourceRoot":"","sources":["../../../src/nile-error-message/nile-error-message.ts"],"names":[],"mappings":";AAAA,OAAO,EACL,UAAU,EACV,IAAI,EACJ,QAAQ,GAGT,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAElD;;;GAGG;AAEI,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,UAAU;IAAzC;;QAKL,4DAA4D;QAE5D,iBAAY,GAAW,EAAE,CAAC;QAW1B,eAAU,GAAY,KAAK,CAAC;QAE5B,wCAAwC;QACvB,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AO,EAAE,CAAC;oDACA;AAlBjB,gBAAgB;IAD5B,aAAa,CAAC,oBAAoB,CAAC;GACvB,gBAAgB,CA+E5B;SA/EY,gBAAgB","sourcesContent":["import {\n LitElement,\n html,\n property,\n CSSResultArray,\n TemplateResult,\n} from 'lit-element';\nimport { customElement } from 'lit/decorators.js';\nimport { styles } from './nile-error-message.css';\n\n/**\n * A custom error message component that displays error information to the user.\n * @customElement nile-error-message\n */\n@customElement('nile-error-message')\nexport class NileErrorMessage extends LitElement {\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n // Represents the error message to be displayed to the user.\n @property({ type: String })\n errorMessage: string = '';\n\n // Represents additional details about the error, like stack trace or other info.\n @property({ type: String })\n errorResponse: string;\n\n // Extended error information\n @property({ type: String })\n errorResponseLong: string;\n\n @property({ type: Boolean })\n isExpanded: boolean = false;\n\n // The maximum length before truncation.\n private readonly MAX_LENGTH: number = 100;\n\n /**\n * Get a truncated version of the errorResponse if it's too long.\n * @returns {string}\n */\n getTruncatedResponse(): string {\n if (this.errorResponse.length > this.MAX_LENGTH) {\n return `${this.errorResponse.substring(0, this.MAX_LENGTH)}...`;\n }\n return this.errorResponse;\n }\n\n /**\n * Toggle the expanded state of the error response.\n */\n toggleExpanded() {\n this.isExpanded = !this.isExpanded;\n }\n\n public render(): TemplateResult {\n return html`\n <div class=\"nile-error-message\" part=\"base\">\n <nile-icon\n name=\"info2\"\n size=\"14\"\n class=\"nile-error-message__icon\"\n part=\"icon\"\n color=\"#E5434D\"\n ></nile-icon>\n <span class=\"nile-error-message__error\">${this.errorMessage}</span>\n\n\n ${this.errorResponse\n ? html`\n <div class=\"nile-error-message__response\">\n ${this.errorResponse}\n ${this.errorResponseLong\n ? html`\n <span\n class=\"nile-error-message__more-button\"\n @click=${this.toggleExpanded}\n >${this.isExpanded ? 'View Less' : 'View More'}</span\n >`:``}\n </div>\n `\n : ``}\n\n <div\n class=\"nile-error-message__response-expanded ${this.isExpanded\n ? 'expanded'\n : 'collapsed'}\"\n >\n ${this.errorResponseLong}\n </div>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-error-message': NileErrorMessage;\n }\n}\n"]}
@@ -24,8 +24,18 @@ export const styles = css `
24
24
  line-height: 12px;
25
25
  letter-spacing: 0.2px;
26
26
  margin-top: 6px;
27
+ margin-right: 4px;
28
+ width: auto;
27
29
  }
28
30
 
31
+ .nile-form-help-text__more-button {
32
+ display: inline-flex;
33
+ gap: 4px;
34
+ color: var(--nile-colors-primary-600);
35
+ cursor: pointer;
36
+ white-space: nowrap;
37
+ align-items: center
38
+ }
29
39
  `;
30
40
  export default [styles];
31
41
  //# sourceMappingURL=nile-form-help-text.css.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"nile-form-help-text.css.js","sourceRoot":"","sources":["../../../src/nile-form-help-text/nile-form-help-text.css.ts"],"names":[],"mappings":"AAAA;;;;;EAKE;AAEF,OAAO,EAAC,GAAG,EAAC,MAAM,aAAa,CAAC;AAEhC;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;CAkBxB,CAAC;AAEF,eAAe,CAAC,MAAM,CAAC,CAAC","sourcesContent":["/**\n* Copyright Aquera Inc 2023\n*\n* This source code is licensed under the BSD-3-Clause license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\nimport {css} from 'lit-element';\n\n/**\n * FormHelpText CSS\n */\nexport const styles = css`\n\t:host {\n\n\t}\n\n .nile-form-help-text {\n display: flex;\n align-items: center;\n color: var(--nile-colors-dark-500);\n font-family: Colfax-regular;\n font-size: 12px;\n font-style: normal;\n font-weight: 400;\n line-height: 12px;\n letter-spacing: 0.2px;\n margin-top: 6px;\n }\n\n`;\n\nexport default [styles];\n"]}
1
+ {"version":3,"file":"nile-form-help-text.css.js","sourceRoot":"","sources":["../../../src/nile-form-help-text/nile-form-help-text.css.ts"],"names":[],"mappings":"AAAA;;;;;EAKE;AAEF,OAAO,EAAC,GAAG,EAAC,MAAM,aAAa,CAAC;AAEhC;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4BxB,CAAC;AAEF,eAAe,CAAC,MAAM,CAAC,CAAC","sourcesContent":["/**\n* Copyright Aquera Inc 2023\n*\n* This source code is licensed under the BSD-3-Clause license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\nimport {css} from 'lit-element';\n\n/**\n * FormHelpText CSS\n */\nexport const styles = css`\n\t:host {\n\n\t}\n\n .nile-form-help-text {\n display: flex;\n align-items: center;\n color: var(--nile-colors-dark-500);\n font-family: Colfax-regular;\n font-size: 12px;\n font-style: normal;\n font-weight: 400;\n line-height: 12px;\n letter-spacing: 0.2px;\n margin-top: 6px;\n margin-right: 4px;\n width: auto;\n }\n\n .nile-form-help-text__more-button {\n display: inline-flex;\n gap: 4px;\n color: var(--nile-colors-primary-600);\n cursor: pointer;\n white-space: nowrap;\n align-items: center\n }\n`;\n\nexport default [styles];\n"]}
@@ -17,6 +17,14 @@ export declare class NileFormHelpText extends LitElement {
17
17
  * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`
18
18
  */
19
19
  static get styles(): CSSResultArray;
20
+ isExpanded: boolean;
21
+ fullText: string;
22
+ displayedText: string;
23
+ slotElement: HTMLSlotElement;
24
+ connectedCallback(): void;
25
+ firstUpdated(): void;
26
+ handleSlotChange(): void;
27
+ toggleExpanded(): void;
20
28
  /**
21
29
  * Render method
22
30
  * @slot This is a slot test
@@ -5,8 +5,8 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
  import { __decorate } from "tslib";
8
- import { LitElement, html } from 'lit-element';
9
- import { customElement } from 'lit/decorators.js';
8
+ import { LitElement, html, property } from 'lit-element';
9
+ import { customElement, query } from 'lit/decorators.js';
10
10
  import { styles } from './nile-form-help-text.css';
11
11
  /**
12
12
  * Nile icon component.
@@ -15,6 +15,12 @@ import { styles } from './nile-form-help-text.css';
15
15
  *
16
16
  */
17
17
  let NileFormHelpText = class NileFormHelpText extends LitElement {
18
+ constructor() {
19
+ super(...arguments);
20
+ this.isExpanded = false;
21
+ this.fullText = '';
22
+ this.displayedText = '';
23
+ }
18
24
  /**
19
25
  * The styles for FormHelpText
20
26
  * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`
@@ -22,6 +28,25 @@ let NileFormHelpText = class NileFormHelpText extends LitElement {
22
28
  static get styles() {
23
29
  return [styles];
24
30
  }
31
+ connectedCallback() {
32
+ super.connectedCallback();
33
+ requestAnimationFrame(() => {
34
+ this.slotElement?.addEventListener('slotchange', this.handleSlotChange.bind(this));
35
+ });
36
+ }
37
+ firstUpdated() {
38
+ this.handleSlotChange();
39
+ }
40
+ handleSlotChange() {
41
+ const nodes = this.slotElement.assignedNodes({ flatten: true });
42
+ const textContent = nodes.map(node => node.textContent).join('');
43
+ this.fullText = textContent;
44
+ this.displayedText = textContent.length > 50 ? `${textContent.substring(0, 47)}...` : textContent;
45
+ }
46
+ toggleExpanded() {
47
+ this.isExpanded = !this.isExpanded;
48
+ this.displayedText = this.isExpanded ? this.fullText : `${this.fullText.substring(0, 47)}...`;
49
+ }
25
50
  /* #endregion */
26
51
  /* #region Methods */
27
52
  /**
@@ -29,13 +54,38 @@ let NileFormHelpText = class NileFormHelpText extends LitElement {
29
54
  * @slot This is a slot test
30
55
  */
31
56
  render() {
57
+ const showMoreButton = this.fullText.length > 50;
58
+ const iconName = this.isExpanded ? 'arrowup' : 'arrowdown';
32
59
  return html `
33
- <div class="nile-form-help-text">
34
- <slot> </slot>
35
- </div>
36
- `;
60
+ <div class="nile-form-help-text" part="container">
61
+ <slot hidden></slot>
62
+ <div part="text">${this.displayedText}
63
+ ${showMoreButton ? html `
64
+ <span
65
+ class="nile-form-help-text__more-button"
66
+ part="toggle-button"
67
+ @click=${this.toggleExpanded}
68
+ >${this.isExpanded ? 'View Less' : 'View More'}
69
+ <nile-icon color="#005EA6" part="icon" size="14" name="${iconName}"></nile-icon>
70
+ </span>
71
+ ` : ''}
72
+ </div>
73
+ </div>
74
+ `;
37
75
  }
38
76
  };
77
+ __decorate([
78
+ property({ type: Boolean })
79
+ ], NileFormHelpText.prototype, "isExpanded", void 0);
80
+ __decorate([
81
+ property({ type: String })
82
+ ], NileFormHelpText.prototype, "fullText", void 0);
83
+ __decorate([
84
+ property({ type: String })
85
+ ], NileFormHelpText.prototype, "displayedText", void 0);
86
+ __decorate([
87
+ query('slot')
88
+ ], NileFormHelpText.prototype, "slotElement", void 0);
39
89
  NileFormHelpText = __decorate([
40
90
  customElement('nile-form-help-text')
41
91
  ], NileFormHelpText);
@@ -1 +1 @@
1
- {"version":3,"file":"nile-form-help-text.js","sourceRoot":"","sources":["../../../src/nile-form-help-text/nile-form-help-text.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAC,UAAU,EAAE,IAAI,EAA2C,MAAM,aAAa,CAAC;AACvF,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAC,MAAM,EAAC,MAAM,2BAA2B,CAAC;AAEjD;;;;;GAKG;AAEI,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,UAAU;IAE/C;;;OAGG;IACI,MAAM,KAAK,MAAM;QACvB,OAAO,CAAC,MAAM,CAAC,CAAC;IACjB,CAAC;IAED,gBAAgB;IAEhB,qBAAqB;IAErB;;;OAGG;IACI,MAAM;QACZ,OAAO,IAAI,CAAA;;;;IAIT,CAAC;IACJ,CAAC;CAGD,CAAA;AA3BY,gBAAgB;IAD5B,aAAa,CAAC,qBAAqB,CAAC;GACxB,gBAAgB,CA2B5B;SA3BY,gBAAgB;AA6B7B,eAAe,gBAAgB,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {LitElement, html, property, CSSResultArray, TemplateResult} from 'lit-element';\nimport { customElement } from 'lit/decorators.js';\nimport {styles} from './nile-form-help-text.css';\n\n/**\n * Nile icon component.\n *\n * @tag nile-form-help-text\n *\n */\n@customElement('nile-form-help-text')\nexport class NileFormHelpText extends LitElement {\n\n\t/**\n\t * The styles for FormHelpText\n\t * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`\n\t */\n\tpublic static get styles(): CSSResultArray {\n\t\treturn [styles];\n\t}\n\n\t/* #endregion */\n\n\t/* #region Methods */\n\n\t/**\n\t * Render method\n\t * @slot This is a slot test\n\t */\n\tpublic render(): TemplateResult {\n\t\treturn html`\n <div class=\"nile-form-help-text\">\n <slot> </slot>\n </div>\n\t\t\t`;\n\t}\n\n\t/* #endregion */\n}\n\nexport default NileFormHelpText;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-form-help-text': NileFormHelpText;\n }\n}\n"]}
1
+ {"version":3,"file":"nile-form-help-text.js","sourceRoot":"","sources":["../../../src/nile-form-help-text/nile-form-help-text.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAC,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAiC,MAAM,aAAa,CAAC;AACvF,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAC,MAAM,EAAC,MAAM,2BAA2B,CAAC;AAEjD;;;;;GAKG;AAEI,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,UAAU;IAAzC;;QAWL,eAAU,GAAY,KAAK,CAAC;QAG5B,aAAQ,GAAW,EAAE,CAAC;QAGtB,kBAAa,GAAW,EAAE,CAAC;IAyD7B,CAAC;IAzEC;;;OAGG;IACI,MAAM,KAAK,MAAM;QACtB,OAAO,CAAC,MAAM,CAAC,CAAC;IAClB,CAAC;IAeD,iBAAiB;QACf,KAAK,CAAC,iBAAiB,EAAE,CAAC;QAC1B,qBAAqB,CAAC,GAAG,EAAE;Y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jC,cAAc,CAAC,CAAC,CAAC,IAAI,CAAA;;;;qBAIV,IAAI,CAAC,cAAc;eACzB,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,WAAW;qEACW,QAAQ;;SAEpE,CAAC,CAAC,CAAC,EAAE;;;GAGX,CAAC;IACF,CAAC;CACF,CAAA;AA/DC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;oDACA;AAG5B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;kDACL;AAGtB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;uDACA;AAG3B;IADC,KAAK,CAAC,MAAM,CAAC;qDACgB;AApBnB,gBAAgB;IAD5B,aAAa,CAAC,qBAAqB,CAAC;GACxB,gBAAgB,CA0E5B;SA1EY,gBAAgB;AA4E7B,eAAe,gBAAgB,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {LitElement, html, property, CSSResultArray, TemplateResult} from 'lit-element';\nimport { customElement, query } from 'lit/decorators.js';\nimport {styles} from './nile-form-help-text.css';\n\n/**\n * Nile icon component.\n *\n * @tag nile-form-help-text\n *\n */\n@customElement('nile-form-help-text')\nexport class NileFormHelpText extends LitElement {\n /**\n * The styles for FormHelpText\n * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`\n */\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n\n @property({ type: Boolean })\n isExpanded: boolean = false;\n\n @property({ type: String })\n fullText: string = '';\n\n @property({ type: String })\n displayedText: string = '';\n\n @query('slot')\n slotElement!: HTMLSlotElement;\n\n connectedCallback() {\n super.connectedCallback();\n requestAnimationFrame(() => {\n this.slotElement?.addEventListener('slotchange', this.handleSlotChange.bind(this));\n });\n }\n\n firstUpdated() {\n this.handleSlotChange();\n }\n\n handleSlotChange() {\n const nodes = this.slotElement.assignedNodes({flatten: true});\n const textContent = nodes.map(node => node.textContent).join('');\n this.fullText = textContent;\n this.displayedText = textContent.length > 50 ? `${textContent.substring(0, 47)}...` : textContent;\n }\n\n toggleExpanded() {\n this.isExpanded = !this.isExpanded;\n this.displayedText = this.isExpanded ? this.fullText : `${this.fullText.substring(0, 47)}...`;\n }\n\n /* #endregion */\n\n /* #region Methods */\n\n /**\n * Render method\n * @slot This is a slot test\n */\n public render(): TemplateResult {\n const showMoreButton = this.fullText.length > 50;\n const iconName = this.isExpanded ? 'arrowup' : 'arrowdown';\n\n return html`\n <div class=\"nile-form-help-text\" part=\"container\">\n <slot hidden></slot>\n <div part=\"text\">${this.displayedText}\n ${showMoreButton ? html`\n <span\n class=\"nile-form-help-text__more-button\"\n part=\"toggle-button\"\n @click=${this.toggleExpanded}\n >${this.isExpanded ? 'View Less' : 'View More'}\n <nile-icon color=\"#005EA6\" part=\"icon\" size=\"14\" name=\"${iconName}\"></nile-icon>\n </span>\n ` : ''}\n </div>\n </div>\n `;\n }\n}\n\nexport default NileFormHelpText;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-form-help-text': NileFormHelpText;\n }\n}\n"]}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Do not edit directly
3
+ */
4
+ declare const _default: "PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIGlkPSJMYXllcl8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxMi4zNCI+PHBhdGggZD0ibTEwLjM4LDYuNTloLjM4di0uODRoLS4zOGMtLjg2LDAtMS4zMi0uNS0xLjMyLTEuMzZ2LTIuMzdjMC0uNDctLjEtLjg3LS4zLTEuMTloMHMwLS4wMi0uMDEtLjAyaDBjLS4zMy0uNTEtLjkzLS44MS0xLjgtLjgxaC0uOTJ2Ljg0aC43NWMuOTMsMCw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43Ljg5LS4xNSwxLjMxLS43NSwxLjMxLTEuN3YtMi40MWMwLS43OC4zMi0xLjIzLDEuMjUtMS4yM2guNzV2LS44NGgtLjkyQzIuNCwwLDEuNy43OCwxLjcsMi4wMloiLz48L3N2Zz4=";
5
+ //# sourceMappingURL=array-loop.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"array-loop.js","sourceRoot":"","sources":["../../../../../src/nile-icon/icons/svg/array-loop.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAe,8wDAA8wD,CAAC","sourcesContent":["/**\n * Do not edit directly\n */\n\nexport default \"PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIGlkPSJMYXllcl8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxMi4zNCI+PHBhdGggZD0ibTEwLjM4LDYuNTloLjM4di0uODRoLS4zOGMtLjg2LDAtMS4zMi0uNS0xLjMyLTEuMzZ2LTIuMzdjMC0uNDctLjEtLjg3LS4zLTEuMTloMHMwLS4wMi0uMDEtLjAyaDBjLS4zMy0uNTEtLjkzLS44MS0xLjgtLjgxaC0uOTJ2Ljg0aC43NWMuOTMsMCwxLjI1LjQ0LDEuMjUsMS4yM3YyLjQxYzAsLjk0LjQyLDEuNTUsMS4zMSwxLjctLjg5LjE1LTEuMzEuNzUtMS4zMSwxLjd2Mi40MWMwLC43OC0uMzIsMS4yMy0xLjI1LDEuMjNoLS43NXYuODRoLjkyYy44NywwLDEuNDctLjMsMS44LS44MmgwczAtLjAxLjAxLS4wMmgwYy4yLS4zMi4zLS43Mi4zLTEuMTl2LTIuMzdjMC0uODYuNDYtMS4zNiwxLjMyLTEuMzZaIi8+PHBhdGggZD0ibTE1LjYyLDUuNzVjLS44NiwwLTEuMzItLjUtMS4zMi0xLjM2di0yLjM3YzAtMS4yNC0uNy0yLjAyLTIuMTItMi4wMmgtLjJjLjI1LjI2L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z4=\";"]}
@@ -15,6 +15,7 @@ export { default as applyfilter } from './apply-filter';
15
15
  export { default as approve } from './approve';
16
16
  export { default as aquera } from './aquera';
17
17
  export { default as aquerasupport } from './aquerasupport';
18
+ export { default as arrayloop } from './array-loop';
18
19
  export { default as array } from './array';
19
20
  export { default as arrayofobject } from './arrayofobject';
20
21
  export { default as arrow } from './arrow';
@@ -192,6 +193,7 @@ export { default as infoicon1 } from './info-icon1';
192
193
  export { default as info } from './info';
193
194
  export { default as info2 } from './info2';
194
195
  export { default as inprogress } from './inprogress';
196
+ export { default as integer } from './integer';
195
197
  export { default as itemplaceholder } from './itemplaceholder';
196
198
  export { default as js } from './js';
197
199
  export { default as kill } from './kill';
@@ -15,6 +15,7 @@ export { default as applyfilter } from './apply-filter';
15
15
  export { default as approve } from './approve';
16
16
  export { default as aquera } from './aquera';
17
17
  export { default as aquerasupport } from './aquerasupport';
18
+ export { default as arrayloop } from './array-loop';
18
19
  export { default as array } from './array';
19
20
  export { default as arrayofobject } from './arrayofobject';
20
21
  export { default as arrow } from './arrow';
@@ -192,6 +193,7 @@ export { default as infoicon1 } from './info-icon1';
192
193
  export { default as info } from './info';
193
194
  export { default as info2 } from './info2';
194
195
  export { default as inprogress } from './inprogress';
196
+ export { default as integer } from './integer';
195
197
  export { default as itemplaceholder } from './itemplaceholder';
196
198
  export { default as js } from './js';
197
199
  export { default as kill } from './kill';