@aquera/nile-elements 1.3.3 → 1.3.4-beta-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 (449) hide show
  1. package/demo/index.html +20 -27
  2. package/dist/{fixture-1c49c014.cjs.js → fixture-54600b35.cjs.js} +2 -2
  3. package/dist/{fixture-1c49c014.cjs.js.map → fixture-54600b35.cjs.js.map} +1 -1
  4. package/dist/fixture-5b79f853.cjs.js +395 -0
  5. package/dist/fixture-5b79f853.cjs.js.map +1 -0
  6. package/dist/fixture-73855806.cjs.js +395 -0
  7. package/dist/fixture-73855806.cjs.js.map +1 -0
  8. package/dist/fixture-90b199c4.esm.js +569 -0
  9. package/dist/{fixture-985bba12.esm.js → fixture-9871e8a9.esm.js} +1 -1
  10. package/dist/fixture-c1d78368.cjs.js +395 -0
  11. package/dist/fixture-c1d78368.cjs.js.map +1 -0
  12. package/dist/fixture-cf7bfcf5.esm.js +569 -0
  13. package/dist/fixture-dbd66009.cjs.js +395 -0
  14. package/dist/fixture-dbd66009.cjs.js.map +1 -0
  15. package/dist/index.js +2 -2
  16. package/dist/nile-accordion/nile-accordian.test.cjs.js +1 -1
  17. package/dist/nile-accordion/nile-accordian.test.esm.js +1 -1
  18. package/dist/nile-auto-complete/nile-auto-complete.test.cjs.js +1 -1
  19. package/dist/nile-auto-complete/nile-auto-complete.test.esm.js +1 -1
  20. package/dist/nile-avatar/nile-avatar.test.cjs.js +1 -1
  21. package/dist/nile-avatar/nile-avatar.test.esm.js +1 -1
  22. package/dist/nile-badge/nile-badge.test.cjs.js +1 -1
  23. package/dist/nile-badge/nile-badge.test.esm.js +1 -1
  24. package/dist/nile-button/nile-button.test.cjs.js +1 -1
  25. package/dist/nile-button/nile-button.test.esm.js +1 -1
  26. package/dist/nile-button-toggle-group/nile-button-toggle-group.test.cjs.js +1 -1
  27. package/dist/nile-button-toggle-group/nile-button-toggle-group.test.esm.js +1 -1
  28. package/dist/nile-calendar/nile-calendar.test.cjs.js +1 -1
  29. package/dist/nile-calendar/nile-calendar.test.esm.js +1 -1
  30. package/dist/nile-card/nile-card.test.cjs.js +1 -1
  31. package/dist/nile-card/nile-card.test.esm.js +1 -1
  32. package/dist/nile-checkbox/nile-checkbox.test.cjs.js +1 -1
  33. package/dist/nile-checkbox/nile-checkbox.test.esm.js +1 -1
  34. package/dist/nile-chip/nile-chip.test.cjs.js +1 -1
  35. package/dist/nile-chip/nile-chip.test.esm.js +1 -1
  36. package/dist/nile-code-editor/backup_nile-code-editor copy.cjs.js +2 -0
  37. package/dist/nile-code-editor/backup_nile-code-editor copy.cjs.js.map +1 -0
  38. package/dist/nile-code-editor/backup_nile-code-editor copy.esm.js +1 -0
  39. package/dist/nile-dialog/nile-dialog.test.cjs.js +1 -1
  40. package/dist/nile-dialog/nile-dialog.test.esm.js +1 -1
  41. package/dist/nile-drawer/nile-drawer.test.cjs.js +1 -1
  42. package/dist/nile-drawer/nile-drawer.test.esm.js +1 -1
  43. package/dist/nile-dropdown/nile-dropdown.test.cjs.js +1 -1
  44. package/dist/nile-dropdown/nile-dropdown.test.esm.js +1 -1
  45. package/dist/nile-dropdown/portal-utils.cjs.js +1 -1
  46. package/dist/nile-dropdown/portal-utils.cjs.js.map +1 -1
  47. package/dist/nile-dropdown/portal-utils.esm.js +1 -1
  48. package/dist/nile-empty-state/nile-empty-state.test.cjs.js +1 -1
  49. package/dist/nile-empty-state/nile-empty-state.test.esm.js +1 -1
  50. package/dist/nile-error-message/nile-error-message.test.cjs.js +1 -1
  51. package/dist/nile-error-message/nile-error-message.test.esm.js +1 -1
  52. package/dist/nile-file-preview/nile-file-preview.test.cjs.js +1 -1
  53. package/dist/nile-file-preview/nile-file-preview.test.esm.js +1 -1
  54. package/dist/nile-file-upload/nile-file-upload.test.cjs.js +1 -1
  55. package/dist/nile-file-upload/nile-file-upload.test.esm.js +1 -1
  56. package/dist/nile-filter-chip/nile-filter-chip.test.cjs.js +1 -1
  57. package/dist/nile-filter-chip/nile-filter-chip.test.esm.js +1 -1
  58. package/dist/nile-form-group/nile-form-group.test.cjs.js +1 -1
  59. package/dist/nile-form-group/nile-form-group.test.esm.js +1 -1
  60. package/dist/nile-form-help-text/nile-form-help-text.test.cjs.js +1 -1
  61. package/dist/nile-form-help-text/nile-form-help-text.test.esm.js +1 -1
  62. package/dist/nile-grid/nile-grid.types.cjs.js +2 -0
  63. package/dist/nile-grid/nile-grid.types.cjs.js.map +1 -0
  64. package/dist/nile-grid/nile-grid.types.esm.js +1 -0
  65. package/dist/nile-grid-body/index.cjs.js +2 -0
  66. package/dist/nile-grid-body/index.cjs.js.map +1 -0
  67. package/dist/nile-grid-body/index.esm.js +1 -0
  68. package/dist/nile-grid-body/nile-grid-body.cjs.js +2 -0
  69. package/dist/nile-grid-body/nile-grid-body.cjs.js.map +1 -0
  70. package/dist/nile-grid-body/nile-grid-body.css.cjs.js +2 -0
  71. package/dist/nile-grid-body/nile-grid-body.css.cjs.js.map +1 -0
  72. package/dist/nile-grid-body/nile-grid-body.css.esm.js +10 -0
  73. package/dist/nile-grid-body/nile-grid-body.esm.js +5 -0
  74. package/dist/nile-grid-cell-item/index.cjs.js +2 -0
  75. package/dist/nile-grid-cell-item/index.cjs.js.map +1 -0
  76. package/dist/nile-grid-cell-item/index.esm.js +1 -0
  77. package/dist/nile-grid-cell-item/nile-grid-cell-item.cjs.js +2 -0
  78. package/dist/nile-grid-cell-item/nile-grid-cell-item.cjs.js.map +1 -0
  79. package/dist/nile-grid-cell-item/nile-grid-cell-item.css.cjs.js +2 -0
  80. package/dist/nile-grid-cell-item/nile-grid-cell-item.css.cjs.js.map +1 -0
  81. package/dist/nile-grid-cell-item/nile-grid-cell-item.css.esm.js +35 -0
  82. package/dist/nile-grid-cell-item/nile-grid-cell-item.esm.js +12 -0
  83. package/dist/nile-grid-cell-item/nile-grid-cell-item.utils.cjs.js +2 -0
  84. package/dist/nile-grid-cell-item/nile-grid-cell-item.utils.cjs.js.map +1 -0
  85. package/dist/nile-grid-cell-item/nile-grid-cell-item.utils.esm.js +1 -0
  86. package/dist/nile-grid-head/index.cjs.js +2 -0
  87. package/dist/nile-grid-head/index.cjs.js.map +1 -0
  88. package/dist/nile-grid-head/index.esm.js +1 -0
  89. package/dist/nile-grid-head/nile-grid-head.cjs.js +2 -0
  90. package/dist/nile-grid-head/nile-grid-head.cjs.js.map +1 -0
  91. package/dist/nile-grid-head/nile-grid-head.css.cjs.js +2 -0
  92. package/dist/nile-grid-head/nile-grid-head.css.cjs.js.map +1 -0
  93. package/dist/nile-grid-head/nile-grid-head.css.esm.js +7 -0
  94. package/dist/nile-grid-head/nile-grid-head.esm.js +5 -0
  95. package/dist/nile-grid-head-item/index.cjs.js +2 -0
  96. package/dist/nile-grid-head-item/index.cjs.js.map +1 -0
  97. package/dist/nile-grid-head-item/index.esm.js +1 -0
  98. package/dist/nile-grid-head-item/nile-grid-head-item.cjs.js +2 -0
  99. package/dist/nile-grid-head-item/nile-grid-head-item.cjs.js.map +1 -0
  100. package/dist/nile-grid-head-item/nile-grid-head-item.css.cjs.js +2 -0
  101. package/dist/nile-grid-head-item/nile-grid-head-item.css.cjs.js.map +1 -0
  102. package/dist/nile-grid-head-item/nile-grid-head-item.css.esm.js +34 -0
  103. package/dist/nile-grid-head-item/nile-grid-head-item.esm.js +12 -0
  104. package/dist/nile-grid-head-item/nile-grid-head-item.utils.cjs.js +2 -0
  105. package/dist/nile-grid-head-item/nile-grid-head-item.utils.cjs.js.map +1 -0
  106. package/dist/nile-grid-head-item/nile-grid-head-item.utils.esm.js +1 -0
  107. package/dist/nile-grid-row/index.cjs.js +2 -0
  108. package/dist/nile-grid-row/index.cjs.js.map +1 -0
  109. package/dist/nile-grid-row/index.esm.js +1 -0
  110. package/dist/nile-grid-row/nile-grid-row.cjs.js +2 -0
  111. package/dist/nile-grid-row/nile-grid-row.cjs.js.map +1 -0
  112. package/dist/nile-grid-row/nile-grid-row.css.cjs.js +2 -0
  113. package/dist/nile-grid-row/nile-grid-row.css.cjs.js.map +1 -0
  114. package/dist/nile-grid-row/nile-grid-row.css.esm.js +15 -0
  115. package/dist/nile-grid-row/nile-grid-row.esm.js +7 -0
  116. package/dist/nile-hero/nile-hero.test.cjs.js +1 -1
  117. package/dist/nile-hero/nile-hero.test.esm.js +1 -1
  118. package/dist/nile-icon/nile-icon.test.cjs.js +1 -1
  119. package/dist/nile-icon/nile-icon.test.esm.js +1 -1
  120. package/dist/nile-input/nile-input.test.cjs.js +1 -1
  121. package/dist/nile-input/nile-input.test.esm.js +1 -1
  122. package/dist/nile-link/nile-link.test.cjs.js +1 -1
  123. package/dist/nile-link/nile-link.test.esm.js +1 -1
  124. package/dist/nile-loader/nile-loader.test.cjs.js +1 -1
  125. package/dist/nile-loader/nile-loader.test.esm.js +1 -1
  126. package/dist/nile-popover/nile-popover.test.cjs.js +1 -1
  127. package/dist/nile-popover/nile-popover.test.esm.js +1 -1
  128. package/dist/nile-popup/nile-popup.test.cjs.js +1 -1
  129. package/dist/nile-popup/nile-popup.test.esm.js +1 -1
  130. package/dist/nile-progress-bar/nile-progress-bar.test.cjs.js +1 -1
  131. package/dist/nile-progress-bar/nile-progress-bar.test.esm.js +1 -1
  132. package/dist/nile-radio/nile-radio.test.cjs.js +1 -1
  133. package/dist/nile-radio/nile-radio.test.esm.js +1 -1
  134. package/dist/nile-radio-group/nile-radio-group.test.cjs.js +1 -1
  135. package/dist/nile-radio-group/nile-radio-group.test.esm.js +1 -1
  136. package/dist/nile-rich-text-editor/utils.cjs.js +2 -0
  137. package/dist/nile-rich-text-editor/utils.cjs.js.map +1 -0
  138. package/dist/nile-rich-text-editor/utils.esm.js +1 -0
  139. package/dist/nile-select/nile-select.test.cjs.js +1 -1
  140. package/dist/nile-select/nile-select.test.esm.js +1 -1
  141. package/dist/nile-sidebar/index.cjs.js +2 -0
  142. package/dist/nile-sidebar/index.cjs.js.map +1 -0
  143. package/dist/nile-sidebar/index.esm.js +75 -0
  144. package/dist/nile-sidebar-menu/index.cjs.js +2 -0
  145. package/dist/nile-sidebar-menu/index.cjs.js.map +1 -0
  146. package/dist/nile-sidebar-menu/index.esm.js +1 -0
  147. package/dist/nile-sidebar-menu/nile-sidebar-menu.cjs.js +2 -0
  148. package/dist/nile-sidebar-menu/nile-sidebar-menu.cjs.js.map +1 -0
  149. package/dist/nile-sidebar-menu/nile-sidebar-menu.css.cjs.js +2 -0
  150. package/dist/nile-sidebar-menu/nile-sidebar-menu.css.cjs.js.map +1 -0
  151. package/dist/nile-sidebar-menu/nile-sidebar-menu.css.esm.js +38 -0
  152. package/dist/nile-sidebar-menu/nile-sidebar-menu.esm.js +10 -0
  153. package/dist/nile-sidebar-menu-items/index.cjs.js +2 -0
  154. package/dist/nile-sidebar-menu-items/index.cjs.js.map +1 -0
  155. package/dist/nile-sidebar-menu-items/index.esm.js +1 -0
  156. package/dist/nile-sidebar-menu-items/nile-sidebar-menu-items.cjs.js +2 -0
  157. package/dist/nile-sidebar-menu-items/nile-sidebar-menu-items.cjs.js.map +1 -0
  158. package/dist/nile-sidebar-menu-items/nile-sidebar-menu-items.css.cjs.js +2 -0
  159. package/dist/nile-sidebar-menu-items/nile-sidebar-menu-items.css.cjs.js.map +1 -0
  160. package/dist/nile-sidebar-menu-items/nile-sidebar-menu-items.css.esm.js +36 -0
  161. package/dist/nile-sidebar-menu-items/nile-sidebar-menu-items.esm.js +15 -0
  162. package/dist/nile-sidebar-wrapper/index.cjs.js +2 -0
  163. package/dist/nile-sidebar-wrapper/index.cjs.js.map +1 -0
  164. package/dist/nile-sidebar-wrapper/index.esm.js +1 -0
  165. package/dist/nile-sidebar-wrapper/nile-sidebar-wrapper.cjs.js +2 -0
  166. package/dist/nile-sidebar-wrapper/nile-sidebar-wrapper.cjs.js.map +1 -0
  167. package/dist/nile-sidebar-wrapper/nile-sidebar-wrapper.css.cjs.js +2 -0
  168. package/dist/nile-sidebar-wrapper/nile-sidebar-wrapper.css.cjs.js.map +1 -0
  169. package/dist/nile-sidebar-wrapper/nile-sidebar-wrapper.css.esm.js +105 -0
  170. package/dist/nile-sidebar-wrapper/nile-sidebar-wrapper.esm.js +16 -0
  171. package/dist/nile-slide-toggle/nile-slide-toggle.test.cjs.js +1 -1
  172. package/dist/nile-slide-toggle/nile-slide-toggle.test.esm.js +1 -1
  173. package/dist/nile-tab-group/nile-tab-group.test.cjs.js +1 -1
  174. package/dist/nile-tab-group/nile-tab-group.test.esm.js +1 -1
  175. package/dist/nile-textarea/nile-textarea.test.cjs.js +1 -1
  176. package/dist/nile-textarea/nile-textarea.test.esm.js +1 -1
  177. package/dist/nile-virtual-select/group-manager.cjs.js +2 -0
  178. package/dist/nile-virtual-select/group-manager.cjs.js.map +1 -0
  179. package/dist/nile-virtual-select/group-manager.esm.js +1 -0
  180. package/dist/nile-virtual-select/nile-virtual-select.test.cjs.js +1 -1
  181. package/dist/nile-virtual-select/nile-virtual-select.test.esm.js +1 -1
  182. package/dist/nile-virtual-select/temp_nile-virtual-select copy.cjs.js +2 -0
  183. package/dist/nile-virtual-select/temp_nile-virtual-select copy.cjs.js.map +1 -0
  184. package/dist/nile-virtual-select/temp_nile-virtual-select copy.esm.js +231 -0
  185. package/dist/scopedElementsWrapper-1bff26ef.cjs.js +2 -0
  186. package/dist/scopedElementsWrapper-1bff26ef.cjs.js.map +1 -0
  187. package/dist/scopedElementsWrapper-4c29be11.esm.js +7 -0
  188. package/dist/scopedElementsWrapper-a112fc73.cjs.js +6 -0
  189. package/dist/scopedElementsWrapper-a112fc73.cjs.js.map +1 -0
  190. package/dist/scopedElementsWrapper-c815042c.cjs.js +2 -0
  191. package/dist/scopedElementsWrapper-c815042c.cjs.js.map +1 -0
  192. package/dist/src/internal/portal-manager.d.ts +53 -0
  193. package/dist/src/internal/portal-manager.js +196 -0
  194. package/dist/src/internal/portal-manager.js.map +1 -0
  195. package/dist/src/internal/portal.d.ts +60 -0
  196. package/dist/src/internal/portal.js +199 -0
  197. package/dist/src/internal/portal.js.map +1 -0
  198. package/dist/src/internal/resizable-helper.d.ts +59 -0
  199. package/dist/src/internal/resizable-helper.js +115 -0
  200. package/dist/src/internal/resizable-helper.js.map +1 -0
  201. package/dist/src/internal/resizable-styles.d.ts +16 -0
  202. package/dist/src/internal/resizable-styles.js +144 -0
  203. package/dist/src/internal/resizable-styles.js.map +1 -0
  204. package/dist/src/internal/virtualizer-error-handler.d.ts +30 -0
  205. package/dist/src/internal/virtualizer-error-handler.js +82 -0
  206. package/dist/src/internal/virtualizer-error-handler.js.map +1 -0
  207. package/dist/src/lib/index.d.ts +7 -0
  208. package/dist/src/lib/index.js +8 -0
  209. package/dist/src/lib/index.js.map +1 -0
  210. package/dist/src/lib/virtualize.d.ts +32 -0
  211. package/dist/src/lib/virtualize.js +105 -0
  212. package/dist/src/lib/virtualize.js.map +1 -0
  213. package/dist/src/lib/virtualize.test.d.ts +7 -0
  214. package/dist/src/lib/virtualize.test.js +57 -0
  215. package/dist/src/lib/virtualize.test.js.map +1 -0
  216. package/dist/src/nile-badge/__snapshots__/nile-badge.test.snap.js +17 -0
  217. package/dist/src/nile-calendar/__snapshots__/nile-calendar.test.snap.js +310 -0
  218. package/dist/src/nile-card/__snapshots__/nile-card.test.snap.js +34 -0
  219. package/dist/src/nile-checkbox/__snapshots__/nile-checkbox.test.snap.js +31 -0
  220. package/dist/src/nile-code-editor/Old_theme copy.d.ts +191 -0
  221. package/dist/src/nile-code-editor/Old_theme copy.js +193 -0
  222. package/dist/src/nile-code-editor/Old_theme copy.js.map +1 -0
  223. package/dist/src/nile-code-editor/backup_nile-code-editor copy.d.ts +0 -0
  224. package/dist/src/nile-code-editor/backup_nile-code-editor copy.js +675 -0
  225. package/dist/src/nile-code-editor/backup_nile-code-editor copy.js.map +1 -0
  226. package/dist/src/nile-code-editor/theme copy.d.ts +191 -0
  227. package/dist/src/nile-code-editor/theme copy.js +193 -0
  228. package/dist/src/nile-code-editor/theme copy.js.map +1 -0
  229. package/dist/src/nile-dropdown/portal-utils.js +143 -59
  230. package/dist/src/nile-dropdown/portal-utils.js.map +1 -1
  231. package/dist/src/nile-floating-panel/anchor-manager.d.ts +26 -0
  232. package/dist/src/nile-floating-panel/anchor-manager.js +49 -0
  233. package/dist/src/nile-floating-panel/anchor-manager.js.map +1 -0
  234. package/dist/src/nile-floating-panel/content-manager.d.ts +23 -0
  235. package/dist/src/nile-floating-panel/content-manager.js +67 -0
  236. package/dist/src/nile-floating-panel/content-manager.js.map +1 -0
  237. package/dist/src/nile-floating-panel/event-manager.d.ts +38 -0
  238. package/dist/src/nile-floating-panel/event-manager.js +81 -0
  239. package/dist/src/nile-floating-panel/event-manager.js.map +1 -0
  240. package/dist/src/nile-floating-panel/index.d.ts +1 -0
  241. package/dist/src/nile-floating-panel/index.js +2 -0
  242. package/dist/src/nile-floating-panel/index.js.map +1 -0
  243. package/dist/src/nile-floating-panel/nile-floating-panel.css.d.ts +17 -0
  244. package/dist/src/nile-floating-panel/nile-floating-panel.css.js +51 -0
  245. package/dist/src/nile-floating-panel/nile-floating-panel.css.js.map +1 -0
  246. package/dist/src/nile-floating-panel/nile-floating-panel.d.ts +67 -0
  247. package/dist/src/nile-floating-panel/nile-floating-panel.js +203 -0
  248. package/dist/src/nile-floating-panel/nile-floating-panel.js.map +1 -0
  249. package/dist/src/nile-floating-panel/position-manager.d.ts +47 -0
  250. package/dist/src/nile-floating-panel/position-manager.js +94 -0
  251. package/dist/src/nile-floating-panel/position-manager.js.map +1 -0
  252. package/dist/src/nile-floating-panel/style-manager.d.ts +31 -0
  253. package/dist/src/nile-floating-panel/style-manager.js +74 -0
  254. package/dist/src/nile-floating-panel/style-manager.js.map +1 -0
  255. package/dist/src/nile-floating-panel/types.d.ts +29 -0
  256. package/dist/src/nile-floating-panel/types.js +8 -0
  257. package/dist/src/nile-floating-panel/types.js.map +1 -0
  258. package/dist/src/nile-grid/data-processor.d.ts +37 -0
  259. package/dist/src/nile-grid/data-processor.js +122 -0
  260. package/dist/src/nile-grid/data-processor.js.map +1 -0
  261. package/dist/src/nile-grid/event-handlers.d.ts +35 -0
  262. package/dist/src/nile-grid/event-handlers.js +158 -0
  263. package/dist/src/nile-grid/event-handlers.js.map +1 -0
  264. package/dist/src/nile-grid/nile-grid.types.d.ts +3 -0
  265. package/dist/src/nile-grid/nile-grid.types.js +2 -0
  266. package/dist/src/nile-grid/nile-grid.types.js.map +1 -0
  267. package/dist/src/nile-grid/renderer.d.ts +8 -0
  268. package/dist/src/nile-grid/renderer.js +78 -0
  269. package/dist/src/nile-grid/renderer.js.map +1 -0
  270. package/dist/src/nile-grid/resize-handler.d.ts +4 -0
  271. package/dist/src/nile-grid/resize-handler.js +36 -0
  272. package/dist/src/nile-grid/resize-handler.js.map +1 -0
  273. package/dist/src/nile-grid/types.d.ts +32 -0
  274. package/dist/src/nile-grid/types.js +2 -0
  275. package/dist/src/nile-grid/types.js.map +1 -0
  276. package/dist/src/nile-grid/utils.d.ts +4 -0
  277. package/dist/src/nile-grid/utils.js +32 -0
  278. package/dist/src/nile-grid/utils.js.map +1 -0
  279. package/dist/src/nile-grid-body/index.d.ts +1 -0
  280. package/dist/src/nile-grid-body/index.js +2 -0
  281. package/dist/src/nile-grid-body/index.js.map +1 -0
  282. package/dist/src/nile-grid-body/nile-grid-body.css.d.ts +12 -0
  283. package/dist/src/nile-grid-body/nile-grid-body.css.js +22 -0
  284. package/dist/src/nile-grid-body/nile-grid-body.css.js.map +1 -0
  285. package/dist/src/nile-grid-body/nile-grid-body.d.ts +29 -0
  286. package/dist/src/nile-grid-body/nile-grid-body.js +43 -0
  287. package/dist/src/nile-grid-body/nile-grid-body.js.map +1 -0
  288. package/dist/src/nile-grid-cell-item/index.d.ts +1 -0
  289. package/dist/src/nile-grid-cell-item/index.js +2 -0
  290. package/dist/src/nile-grid-cell-item/index.js.map +1 -0
  291. package/dist/src/nile-grid-cell-item/nile-grid-cell-item.css.d.ts +12 -0
  292. package/dist/src/nile-grid-cell-item/nile-grid-cell-item.css.js +47 -0
  293. package/dist/src/nile-grid-cell-item/nile-grid-cell-item.css.js.map +1 -0
  294. package/dist/src/nile-grid-cell-item/nile-grid-cell-item.d.ts +36 -0
  295. package/dist/src/nile-grid-cell-item/nile-grid-cell-item.js +93 -0
  296. package/dist/src/nile-grid-cell-item/nile-grid-cell-item.js.map +1 -0
  297. package/dist/src/nile-grid-cell-item/nile-grid-cell-item.utils.d.ts +10 -0
  298. package/dist/src/nile-grid-cell-item/nile-grid-cell-item.utils.js +34 -0
  299. package/dist/src/nile-grid-cell-item/nile-grid-cell-item.utils.js.map +1 -0
  300. package/dist/src/nile-grid-head/index.d.ts +1 -0
  301. package/dist/src/nile-grid-head/index.js +2 -0
  302. package/dist/src/nile-grid-head/index.js.map +1 -0
  303. package/dist/src/nile-grid-head/nile-grid-head.css.d.ts +12 -0
  304. package/dist/src/nile-grid-head/nile-grid-head.css.js +19 -0
  305. package/dist/src/nile-grid-head/nile-grid-head.css.js.map +1 -0
  306. package/dist/src/nile-grid-head/nile-grid-head.d.ts +28 -0
  307. package/dist/src/nile-grid-head/nile-grid-head.js +41 -0
  308. package/dist/src/nile-grid-head/nile-grid-head.js.map +1 -0
  309. package/dist/src/nile-grid-head-item/index.d.ts +1 -0
  310. package/dist/src/nile-grid-head-item/index.js +2 -0
  311. package/dist/src/nile-grid-head-item/index.js.map +1 -0
  312. package/dist/src/nile-grid-head-item/nile-grid-head-item.css.d.ts +12 -0
  313. package/dist/src/nile-grid-head-item/nile-grid-head-item.css.js +46 -0
  314. package/dist/src/nile-grid-head-item/nile-grid-head-item.css.js.map +1 -0
  315. package/dist/src/nile-grid-head-item/nile-grid-head-item.d.ts +37 -0
  316. package/dist/src/nile-grid-head-item/nile-grid-head-item.js +100 -0
  317. package/dist/src/nile-grid-head-item/nile-grid-head-item.js.map +1 -0
  318. package/dist/src/nile-grid-head-item/nile-grid-head-item.utils.d.ts +10 -0
  319. package/dist/src/nile-grid-head-item/nile-grid-head-item.utils.js +34 -0
  320. package/dist/src/nile-grid-head-item/nile-grid-head-item.utils.js.map +1 -0
  321. package/dist/src/nile-grid-row/index.d.ts +1 -0
  322. package/dist/src/nile-grid-row/index.js +2 -0
  323. package/dist/src/nile-grid-row/index.js.map +1 -0
  324. package/dist/src/nile-grid-row/nile-grid-row.css.d.ts +12 -0
  325. package/dist/src/nile-grid-row/nile-grid-row.css.js +27 -0
  326. package/dist/src/nile-grid-row/nile-grid-row.css.js.map +1 -0
  327. package/dist/src/nile-grid-row/nile-grid-row.d.ts +29 -0
  328. package/dist/src/nile-grid-row/nile-grid-row.js +45 -0
  329. package/dist/src/nile-grid-row/nile-grid-row.js.map +1 -0
  330. package/dist/src/nile-hero/__snapshots__/nile-hero.test.snap.js +47 -0
  331. package/dist/src/nile-icon/__snapshots__/nile-icon.test.snap.js +16 -0
  332. package/dist/src/nile-input/__snapshots__/nile-input.test.snap.js +75 -0
  333. package/dist/src/nile-menu/portal-manager.d.ts +39 -0
  334. package/dist/src/nile-menu/portal-manager.js +340 -0
  335. package/dist/src/nile-menu/portal-manager.js.map +1 -0
  336. package/dist/src/nile-menu/portal-utils.d.ts +21 -0
  337. package/dist/src/nile-menu/portal-utils.js +128 -0
  338. package/dist/src/nile-menu/portal-utils.js.map +1 -0
  339. package/dist/src/nile-popover/__snapshots__/nile-popover.test.snap.js +22 -0
  340. package/dist/src/nile-popover/popover-portal-handler.d.ts +21 -0
  341. package/dist/src/nile-popover/popover-portal-handler.js +106 -0
  342. package/dist/src/nile-popover/popover-portal-handler.js.map +1 -0
  343. package/dist/src/nile-portal-wrapper/index.d.ts +1 -0
  344. package/dist/src/nile-portal-wrapper/index.js +2 -0
  345. package/dist/src/nile-portal-wrapper/index.js.map +1 -0
  346. package/dist/src/nile-portal-wrapper/nile-portal-wrapper.d.ts +47 -0
  347. package/dist/src/nile-portal-wrapper/nile-portal-wrapper.js +451 -0
  348. package/dist/src/nile-portal-wrapper/nile-portal-wrapper.js.map +1 -0
  349. package/dist/src/nile-rich-text-editor/utils.d.ts +13 -0
  350. package/dist/src/nile-rich-text-editor/utils.js +538 -0
  351. package/dist/src/nile-rich-text-editor/utils.js.map +1 -0
  352. package/dist/src/nile-select/body-append-manager.d.ts +90 -0
  353. package/dist/src/nile-select/body-append-manager.js +298 -0
  354. package/dist/src/nile-select/body-append-manager.js.map +1 -0
  355. package/dist/src/nile-sidebar/index.d.ts +28 -0
  356. package/dist/src/nile-sidebar/index.js +116 -0
  357. package/dist/src/nile-sidebar/index.js.map +1 -0
  358. package/dist/src/nile-sidebar-menu/index.d.ts +1 -0
  359. package/dist/src/nile-sidebar-menu/index.js +2 -0
  360. package/dist/src/nile-sidebar-menu/index.js.map +1 -0
  361. package/dist/src/nile-sidebar-menu/nile-sidebar-menu.css.d.ts +12 -0
  362. package/dist/src/nile-sidebar-menu/nile-sidebar-menu.css.js +47 -0
  363. package/dist/src/nile-sidebar-menu/nile-sidebar-menu.css.js.map +1 -0
  364. package/dist/src/nile-sidebar-menu/nile-sidebar-menu.d.ts +37 -0
  365. package/dist/src/nile-sidebar-menu/nile-sidebar-menu.js +84 -0
  366. package/dist/src/nile-sidebar-menu/nile-sidebar-menu.js.map +1 -0
  367. package/dist/src/nile-sidebar-menu-items/index.d.ts +1 -0
  368. package/dist/src/nile-sidebar-menu-items/index.js +2 -0
  369. package/dist/src/nile-sidebar-menu-items/index.js.map +1 -0
  370. package/dist/src/nile-sidebar-menu-items/nile-sidebar-menu-items.css.d.ts +12 -0
  371. package/dist/src/nile-sidebar-menu-items/nile-sidebar-menu-items.css.js +45 -0
  372. package/dist/src/nile-sidebar-menu-items/nile-sidebar-menu-items.css.js.map +1 -0
  373. package/dist/src/nile-sidebar-menu-items/nile-sidebar-menu-items.d.ts +35 -0
  374. package/dist/src/nile-sidebar-menu-items/nile-sidebar-menu-items.js +78 -0
  375. package/dist/src/nile-sidebar-menu-items/nile-sidebar-menu-items.js.map +1 -0
  376. package/dist/src/nile-sidebar-wrapper/index.d.ts +1 -0
  377. package/dist/src/nile-sidebar-wrapper/index.js +2 -0
  378. package/dist/src/nile-sidebar-wrapper/index.js.map +1 -0
  379. package/dist/src/nile-sidebar-wrapper/nile-sidebar-wrapper.css.d.ts +12 -0
  380. package/dist/src/nile-sidebar-wrapper/nile-sidebar-wrapper.css.js +114 -0
  381. package/dist/src/nile-sidebar-wrapper/nile-sidebar-wrapper.css.js.map +1 -0
  382. package/dist/src/nile-sidebar-wrapper/nile-sidebar-wrapper.d.ts +35 -0
  383. package/dist/src/nile-sidebar-wrapper/nile-sidebar-wrapper.js +89 -0
  384. package/dist/src/nile-sidebar-wrapper/nile-sidebar-wrapper.js.map +1 -0
  385. package/dist/src/nile-table-body/virtual-scroll-helper.d.ts +9 -0
  386. package/dist/src/nile-table-body/virtual-scroll-helper.js +24 -0
  387. package/dist/src/nile-table-body/virtual-scroll-helper.js.map +1 -0
  388. package/dist/src/nile-virtual-select/body-append-helper.d.ts +16 -0
  389. package/dist/src/nile-virtual-select/body-append-helper.js +95 -0
  390. package/dist/src/nile-virtual-select/body-append-helper.js.map +1 -0
  391. package/dist/src/nile-virtual-select/group-manager.d.ts +32 -0
  392. package/dist/src/nile-virtual-select/group-manager.js +134 -0
  393. package/dist/src/nile-virtual-select/group-manager.js.map +1 -0
  394. package/dist/src/nile-virtual-select/portal-utils.d.ts +65 -0
  395. package/dist/src/nile-virtual-select/portal-utils.js +376 -0
  396. package/dist/src/nile-virtual-select/portal-utils.js.map +1 -0
  397. package/dist/src/nile-virtual-select/temp_nile-virtual-select copy.d.ts +273 -0
  398. package/dist/src/nile-virtual-select/temp_nile-virtual-select copy.js +1305 -0
  399. package/dist/src/nile-virtual-select/temp_nile-virtual-select copy.js.map +1 -0
  400. package/dist/src/nile-virtual-select/virtualizer-error-handler.d.ts +21 -0
  401. package/dist/src/nile-virtual-select/virtualizer-error-handler.js +56 -0
  402. package/dist/src/nile-virtual-select/virtualizer-error-handler.js.map +1 -0
  403. package/dist/src/nile-virtual-select-disabled/index.d.ts +1 -0
  404. package/dist/src/nile-virtual-select-disabled/index.js +2 -0
  405. package/dist/src/nile-virtual-select-disabled/index.js.map +1 -0
  406. package/dist/src/nile-virtual-select-disabled/nile-virtual-select.css.d.ts +12 -0
  407. package/dist/src/nile-virtual-select-disabled/nile-virtual-select.css.js +538 -0
  408. package/dist/src/nile-virtual-select-disabled/nile-virtual-select.css.js.map +1 -0
  409. package/dist/src/nile-virtual-select-disabled/nile-virtual-select.d.ts +299 -0
  410. package/dist/src/nile-virtual-select-disabled/nile-virtual-select.js +1441 -0
  411. package/dist/src/nile-virtual-select-disabled/nile-virtual-select.js.map +1 -0
  412. package/dist/src/nile-virtual-select-disabled/nile-virtual-select.test.d.ts +7 -0
  413. package/dist/src/nile-virtual-select-disabled/nile-virtual-select.test.js +631 -0
  414. package/dist/src/nile-virtual-select-disabled/nile-virtual-select.test.js.map +1 -0
  415. package/dist/src/nile-virtual-select-disabled/portal-manager.d.ts +45 -0
  416. package/dist/src/nile-virtual-select-disabled/portal-manager.js +333 -0
  417. package/dist/src/nile-virtual-select-disabled/portal-manager.js.map +1 -0
  418. package/dist/src/nile-virtual-select-disabled/renderer.d.ts +16 -0
  419. package/dist/src/nile-virtual-select-disabled/renderer.js +79 -0
  420. package/dist/src/nile-virtual-select-disabled/renderer.js.map +1 -0
  421. package/dist/src/nile-virtual-select-disabled/search-manager.d.ts +12 -0
  422. package/dist/src/nile-virtual-select-disabled/search-manager.js +40 -0
  423. package/dist/src/nile-virtual-select-disabled/search-manager.js.map +1 -0
  424. package/dist/src/nile-virtual-select-disabled/selection-manager.d.ts +12 -0
  425. package/dist/src/nile-virtual-select-disabled/selection-manager.js +64 -0
  426. package/dist/src/nile-virtual-select-disabled/selection-manager.js.map +1 -0
  427. package/dist/src/nile-virtual-select-disabled/types.d.ts +50 -0
  428. package/dist/src/nile-virtual-select-disabled/types.js +8 -0
  429. package/dist/src/nile-virtual-select-disabled/types.js.map +1 -0
  430. package/dist/src/nile-virtual-table-body/index.d.ts +2 -0
  431. package/dist/src/nile-virtual-table-body/index.js +3 -0
  432. package/dist/src/nile-virtual-table-body/index.js.map +1 -0
  433. package/dist/src/nile-virtual-table-body/nile-virtual-table-body.css.d.ts +1 -0
  434. package/dist/src/nile-virtual-table-body/nile-virtual-table-body.css.js +44 -0
  435. package/dist/src/nile-virtual-table-body/nile-virtual-table-body.css.js.map +1 -0
  436. package/dist/src/nile-virtual-table-body/nile-virtual-table-body.d.ts +50 -0
  437. package/dist/src/nile-virtual-table-body/nile-virtual-table-body.js +135 -0
  438. package/dist/src/nile-virtual-table-body/nile-virtual-table-body.js.map +1 -0
  439. package/dist/src/nile-virtual-table-body/renderer.d.ts +16 -0
  440. package/dist/src/nile-virtual-table-body/renderer.js +49 -0
  441. package/dist/src/nile-virtual-table-body/renderer.js.map +1 -0
  442. package/dist/src/utilities/stepper-utils.d.ts +71 -0
  443. package/dist/src/utilities/stepper-utils.js +108 -0
  444. package/dist/src/utilities/stepper-utils.js.map +1 -0
  445. package/dist/src/version.js +1 -1
  446. package/dist/src/version.js.map +1 -1
  447. package/dist/tsconfig.tsbuildinfo +1 -1
  448. package/package.json +1 -1
  449. package/src/nile-dropdown/portal-utils.ts +153 -61
@@ -0,0 +1,675 @@
1
+ "use strict";
2
+ // /**
3
+ // * Copyright Aquera Inc 2023
4
+ // *
5
+ // * This source code is licensed under the BSD-3-Clause license found in the
6
+ // * LICENSE file in the root directory of this source tree.
7
+ // */
8
+ // import {
9
+ // html,
10
+ // CSSResultArray,
11
+ // TemplateResult,
12
+ // PropertyValueMap,
13
+ // } from 'lit';
14
+ // import { customElement, query, property } from 'lit/decorators.js';
15
+ // import { styles } from './nile-code-editor.css';
16
+ // import { EditorView } from 'codemirror';
17
+ // import { ViewUpdate, placeholder, tooltips } from '@codemirror/view';
18
+ // import {
19
+ // Compartment,
20
+ // EditorState,
21
+ // Extension
22
+ // } from '@codemirror/state';
23
+ // import { StyleSpec } from 'style-mod';
24
+ // import {
25
+ // syntaxHighlighting,
26
+ // defaultHighlightStyle,
27
+ // } from '@codemirror/language';
28
+ // import { lineNumbers } from '@codemirror/view';
29
+ // import {
30
+ // javascript,
31
+ // javascriptLanguage,
32
+ // } from '@codemirror/lang-javascript';
33
+ // import { sql } from '@codemirror/lang-sql';
34
+ // import { json } from '@codemirror/lang-json';
35
+ // import { html as htmlLang } from '@codemirror/lang-html';
36
+ // import { autocompletion,acceptCompletion, closeCompletion,CompletionContext,CompletionResult, completionStatus } from '@codemirror/autocomplete';
37
+ // import NileElement from '../internal/nile-element';
38
+ // import { basicSetup } from './extensionSetup';
39
+ // import { classMap } from 'lit/directives/class-map.js';
40
+ // import { Theme as DefaultTheme, customisedThemeCss, fontFamily } from './theme';
41
+ // import { keymap } from '@codemirror/view';
42
+ // // Choose the appropriate mode for your use case
43
+ // /**
44
+ // * Nile icon component.
45
+ // *
46
+ // * @tag nile-code-editor
47
+ // *
48
+ // */
49
+ // @customElement('nile-code-editor')
50
+ // export class NileCodeEditor extends NileElement {
51
+ // @query('.code__editor__container') codeEditor: HTMLInputElement;
52
+ // @property({ type: String, reflect: true , attribute: true }) value = '';
53
+ // @property({ type: String, reflect: true , attribute: true }) expandIcon = "expand-2";
54
+ // @property({ type: String, reflect: true , attribute: true }) placeholder = "";
55
+ // @property({ type: Object, reflect: true , attribute: true }) customAutoCompletions: object | any = {};
56
+ // @property({ type: Array, reflect: true , attribute: true }) customCompletionsPaths: string[] = [];
57
+ // @property({ type: String, reflect: true , attribute: true}) language: 'javascript' | 'sql' | 'json' | 'html' = 'javascript';
58
+ // @property({ type: String, reflect: true , attribute: 'error-message' }) errorMessage: string = '';
59
+ // @property({ type: Boolean, reflect: true , attribute: true }) error: boolean = false;
60
+ // @property({ type: Boolean, reflect: true , attribute: true }) enableSearch: boolean = false;
61
+ // @property({ type: Boolean, reflect: true , attribute: true }) noborder: boolean = false;
62
+ // @property({ type: Boolean, reflect: true , attribute: true }) multiline: boolean = false;
63
+ // @property({ type: Boolean, reflect: true , attribute: true }) enableFoldGutters: boolean = false;
64
+ // @property({ type: Boolean, reflect: true , attribute: true }) allowVariableInCustomSuggestion: boolean = false;
65
+ // @property({ type: Boolean, reflect: true , attribute: true }) lineNumbers: boolean = false;
66
+ // @property({ type: Boolean, reflect: true , attribute: false }) disableSyntaxHighlighting: boolean = false;
67
+ // @property({ type: Object, attribute: false }) customThemeCSS: object | null = customisedThemeCss;
68
+ // @property({ type: Boolean, reflect: true , attribute: true }) lineNumbersMultiline: boolean = true;
69
+ // @property({ type: Boolean, reflect: true , attribute: true }) hasScroller: boolean = true;
70
+ // @property({ type: Boolean, reflect: true , attribute: true }) expandable: boolean = true;
71
+ // @property({ type: Boolean, reflect: true , attribute: true}) readonly: boolean = false;
72
+ // @property({ type: Boolean, reflect: true , attribute: true}) debounce: boolean = false;
73
+ // @property({ type: Number, reflect: true , attribute: true}) debounceTimeout: number = 200;
74
+ // @property({ type: Boolean, reflect: true , attribute: true}) aboveCursor: boolean = false;
75
+ // @property({ type: Boolean, reflect: true, attribute: true }) tabCompletion: boolean = true;
76
+ // @property({ type: Boolean, reflect: true, attribute: true }) defaultFont: boolean = false;
77
+ // @property({ type: Object, attribute: false }) autoCompleteStyle: { width?: string; multiline?: boolean } | undefined = undefined;
78
+ // public view: EditorView;
79
+ // public viewState:EditorState;
80
+ // private timeOut: any = null;
81
+ // private resizeObserver?: ResizeObserver;
82
+ // // Compartments for initialiazing and switching extensions
83
+ // private lineNumbersComp = new Compartment();
84
+ // private restrictSingleLineComp = new Compartment();
85
+ // private readOnlyComp = new Compartment();
86
+ // private customCompletionComp = new Compartment();
87
+ // private placeholderComp = new Compartment();
88
+ // private defaultSyntaxHighlightingComp = new Compartment();
89
+ // private themeComp = new Compartment();
90
+ // private autoCompletionComp = new Compartment();
91
+ // private autoCompleteStyleComp = new Compartment();
92
+ // private isSpacePressed:boolean = false;
93
+ // /**
94
+ // * The styles for CodeEditor
95
+ // * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`
96
+ // */
97
+ // public static get styles(): CSSResultArray {
98
+ // return [styles];
99
+ // }
100
+ // connectedCallback(): void {
101
+ // super.connectedCallback();
102
+ // this.emit('nile-init',undefined,false);
103
+ // }
104
+ // disconnectedCallback(): void {
105
+ // super.disconnectedCallback();
106
+ // this.resizeObserver?.disconnect();
107
+ // this.view.destroy()
108
+ // this.emit('nile-destroy',undefined,false);
109
+ // }
110
+ // firstUpdated() {
111
+ // this.createNewView()
112
+ // // Initialize ResizeObserver to watch for container resize
113
+ // if (this.autoCompleteStyle?.width) {
114
+ // this.resizeObserver = new ResizeObserver(entries => {
115
+ // for (const entry of entries) {
116
+ // const width = entry.contentRect.width;
117
+ // this.updateAutocompleteWidth(width);
118
+ // }
119
+ // });
120
+ // this.resizeObserver.observe(this.codeEditor);
121
+ // }
122
+ // this.emit('nile-after-init',{
123
+ // codeMirrorInstance: this.view,
124
+ // createNewView: this.createNewView,
125
+ // insertAtCursor: this.insertBetweenCode
126
+ // }, false )
127
+ // }
128
+ // getTabCompletionKeymap() {
129
+ // return this.tabCompletion
130
+ // ? keymap.of([
131
+ // {
132
+ // key: 'Tab',
133
+ // run: acceptCompletion,
134
+ // }
135
+ // ])
136
+ // : [];
137
+ // }
138
+ // protected updated(changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>): void{
139
+ // super.updated(changedProperties);
140
+ // if (changedProperties.has('value') && this.view.state.doc.toString()!=this.value) {
141
+ // // Editor has already been initialized, update its state
142
+ // this.singleLineMultiLineToggle();
143
+ // }
144
+ // if (changedProperties.has('multiline')) {
145
+ // this.view.dispatch({
146
+ // effects: [
147
+ // this.lineNumbersComp.reconfigure(this.getLineNumbersExension()),
148
+ // this.restrictSingleLineComp.reconfigure(this.getSingleLineExtension())
149
+ // ],
150
+ // })
151
+ // this.singleLineMultiLineToggle();
152
+ // }
153
+ // if (changedProperties.has('readonly')) {
154
+ // this.view.dispatch({
155
+ // effects: [
156
+ // this.readOnlyComp.reconfigure(this.getReadOnlyExtension()),
157
+ // ]
158
+ // })
159
+ // }
160
+ // if (changedProperties.has('aboveCursor')) {
161
+ // this.view.dispatch({
162
+ // effects: [
163
+ // this.autoCompletionComp.reconfigure(
164
+ // autocompletion({ aboveCursor: this.aboveCursor })
165
+ // )
166
+ // ]
167
+ // });
168
+ // }
169
+ // if (changedProperties.has('placeholder')) {
170
+ // this.view.dispatch({
171
+ // effects: [
172
+ // this.placeholderComp.reconfigure(this.getPlaceholderExtension()),
173
+ // ]
174
+ // })
175
+ // }
176
+ // if (changedProperties.has('lineNumbers') || changedProperties.has('lineNumbersMultiline')) {
177
+ // this.view.dispatch({
178
+ // effects: [
179
+ // this.lineNumbersComp.reconfigure(this.getLineNumbersExension()),
180
+ // ]
181
+ // })
182
+ // }
183
+ // if(changedProperties.has('customAutoCompletions') || changedProperties.has('customCompletionsPaths')){
184
+ // this.view.dispatch({
185
+ // effects: [
186
+ // this.customCompletionComp.reconfigure(javascriptLanguage.data.of({
187
+ // autocomplete: this.customAutocomplete
188
+ // }))
189
+ // ]
190
+ // })
191
+ // }
192
+ // if(changedProperties.has('disableSyntaxHighlighting')){
193
+ // this.view.dispatch({
194
+ // effects: [
195
+ // this.defaultSyntaxHighlightingComp.reconfigure(this.getDefaultSyntaxHighlightingExtension())
196
+ // ]
197
+ // })
198
+ // }
199
+ // if(changedProperties.has('customThemeCSS')){
200
+ // this.view.dispatch({
201
+ // effects: [
202
+ // this.themeComp.reconfigure(this.getCustomThemeExtension())
203
+ // ]
204
+ // })
205
+ // }
206
+ // if(changedProperties.has('autoCompleteStyle') && this.view){
207
+ // if (this.autoCompleteStyle?.width) {
208
+ // // Initialize ResizeObserver if autoCompleteStyle width is enabled
209
+ // if (!this.resizeObserver) {
210
+ // this.resizeObserver = new ResizeObserver(entries => {
211
+ // for (const entry of entries) {
212
+ // const width = entry.contentRect.width;
213
+ // this.updateAutocompleteWidth(width);
214
+ // }
215
+ // });
216
+ // this.resizeObserver.observe(this.codeEditor);
217
+ // }
218
+ // } else {
219
+ // // Disconnect ResizeObserver if autoCompleteStyle width is disabled
220
+ // this.resizeObserver?.disconnect();
221
+ // this.resizeObserver = undefined;
222
+ // }
223
+ // this.view.dispatch({
224
+ // effects: [
225
+ // this.autoCompleteStyleComp.reconfigure(this.getAutoCompleteStyleExtension())
226
+ // ]
227
+ // })
228
+ // }
229
+ // }
230
+ // public render(): TemplateResult {
231
+ // const hasErrorMessage = !!this.errorMessage;
232
+ // const hasError = !!this.error;
233
+ // const noborder = !!this.noborder;
234
+ // const noScrollbar = !this.hasScroller
235
+ // return html`<div
236
+ // part="code-editor-base"
237
+ // class=${classMap({
238
+ // 'code__editor__container': true,
239
+ // 'noborder': noborder,
240
+ // 'error': hasError || hasErrorMessage,
241
+ // 'code__editor__singleline': !this.multiline,
242
+ // 'no-scroller': noScrollbar
243
+ // })}
244
+ // >
245
+ // ${this.expandable
246
+ // ? html`
247
+ // <div @click="${(e: CustomEvent) => this.emit('nile-expand')}" class="expand__icon__container">
248
+ // <nile-icon
249
+ // name="${this.expandIcon}"
250
+ // size="16"
251
+ // color="black"
252
+ // ></nile-icon>
253
+ // </div>`
254
+ // : ''}
255
+ // </div>
256
+ // ${hasErrorMessage
257
+ // ? html`
258
+ // <nile-form-error-message
259
+ // >${this.errorMessage}</nile-form-error-message
260
+ // >
261
+ // `
262
+ // : ``}`;
263
+ // }
264
+ // createNewView(emitEvent=true){
265
+ // if(this.view) this.view.destroy();
266
+ // this.createState()
267
+ // this.view = new EditorView({
268
+ // state: this.viewState,
269
+ // parent: this.codeEditor
270
+ // });
271
+ // this.view.dom.addEventListener('keydown', (e: KeyboardEvent) => {
272
+ // this.checkForSpaceKey(e);
273
+ // this.handleEscapeKey(e);
274
+ // }, true);
275
+ // if (emitEvent) this.emit('nile-after-update', { createNewView: this.createNewView, codeMirrorInstance: this.view, }, false );
276
+ // }
277
+ // checkForSpaceKey(e: KeyboardEvent) {
278
+ // if (e.code === 'Space' && !e.ctrlKey) {
279
+ // this.isSpacePressed = true;
280
+ // } else {
281
+ // this.isSpacePressed = false;
282
+ // }
283
+ // }
284
+ // public closeCompletion() {
285
+ // if (this.view) {
286
+ // closeCompletion(this.view);
287
+ // }
288
+ // }
289
+ // handleEscapeKey(e: KeyboardEvent) {
290
+ // if (e.key === 'Escape' && this.view && completionStatus(this.view.state) !== null) {
291
+ // e.stopPropagation();
292
+ // e.preventDefault();
293
+ // closeCompletion(this.view);
294
+ // }
295
+ // }
296
+ // createState(){
297
+ // const lineNumbersExtension = this.lineNumbersComp.of(this.getLineNumbersExension());
298
+ // const readOnlyExtension = this.readOnlyComp.of(this.getReadOnlyExtension());
299
+ // const restrictSingleLineExtension = this.restrictSingleLineComp.of(this.getSingleLineExtension())
300
+ // const placeholderExtension = this.placeholderComp.of(this.getPlaceholderExtension())
301
+ // const customThemeExtension=this.themeComp.of(this.getCustomThemeExtension());
302
+ // const defaultSyntaxHighlightingExtension = this.defaultSyntaxHighlightingComp.of(this.getDefaultSyntaxHighlightingExtension());
303
+ // const autoCompleteStyleExtension = this.autoCompleteStyleComp.of(this.getAutoCompleteStyleExtension());
304
+ // const language = this.getLanguageExtension()
305
+ // const customAutoCompletions = this.customCompletionComp.of(javascriptLanguage.data.of({
306
+ // autocomplete: this.customAutocomplete
307
+ // }));
308
+ // this.viewState = EditorState.create({
309
+ // doc: !this.multiline ? convertToSingleLine(this.value) : this.value,
310
+ // extensions: [
311
+ // basicSetup({
312
+ // highlightActiveLine: false,
313
+ // foldGutter: this.enableFoldGutters,
314
+ // enableSearch:this.enableSearch
315
+ // }),
316
+ // lineNumbersExtension,
317
+ // readOnlyExtension,
318
+ // restrictSingleLineExtension,
319
+ // customAutoCompletions,
320
+ // placeholderExtension,
321
+ // defaultSyntaxHighlightingExtension,
322
+ // this.autoCompletionComp.of(
323
+ // autocompletion({ aboveCursor: this.aboveCursor })
324
+ // ),
325
+ // language,
326
+ // customThemeExtension,
327
+ // autoCompleteStyleExtension,
328
+ // this.getTabCompletionKeymap(),
329
+ // EditorView.updateListener.of((v: ViewUpdate) => {
330
+ // if (v.docChanged) {
331
+ // this.debounce ? this.emitAfterTimeout({ value: this.view.state.doc.toString() }) : this.emit('nile-change', { value: this.view.state.doc.toString() })
332
+ // }
333
+ // }),
334
+ // EditorView.domEventHandlers({
335
+ // focus: () => this.dispatchEvent(new Event('nile-focus')),
336
+ // blur: () => this.dispatchEvent(new Event('nile-blur')),
337
+ // }),
338
+ // ],
339
+ // });
340
+ // return this.viewState
341
+ // }
342
+ // /**
343
+ // * Custom autocomplete handler for code editor suggestions
344
+ // * @param context CompletionContext from CodeMirror
345
+ // * @returns CompletionResult with suggestions or null if no suggestions
346
+ // */
347
+ // customAutocomplete = (context: CompletionContext): CompletionResult | null => {
348
+ // // Getting the valid last line, last text from the code editor
349
+ // const text = context.state.doc.sliceString(0, context.pos);
350
+ // const lastWord = text.split('\n').at(-1)?.split(' ').at(-1) || '';
351
+ // const [textBeforeCursor, baseTextAfterSeperation] = splitStringAtLastSeparator(lastWord);
352
+ // return this.getNestedSuggestions(context, textBeforeCursor, baseTextAfterSeperation)
353
+ // || this.getTopLevelSuggestions(context, textBeforeCursor);
354
+ // };
355
+ // /**
356
+ // * Gets nested property suggestions based on the current path
357
+ // * @param context CompletionContext from CodeMirror
358
+ // * @param textBeforeCursor Text before cursor position
359
+ // * @param baseTextAfterSeperation Text after the last separator (. or [)
360
+ // * @returns CompletionResult with nested suggestions or null
361
+ // */
362
+ // getNestedSuggestions(context: CompletionContext, textBeforeCursor: string, baseTextAfterSeperation: string) {
363
+ // // Return early if not a valid path or not ending with . or [
364
+ // if (!isValidPath(textBeforeCursor) || !['.', '['].includes(textBeforeCursor.at(-1)!)) {
365
+ // return null;
366
+ // }
367
+ // const path = parsePath(textBeforeCursor);
368
+ // if (!path) return null;
369
+ // const textAfterSeperation = baseTextAfterSeperation.replace(/["'\[]/g, '');
370
+ // const isInString = textAfterSeperation !== baseTextAfterSeperation;
371
+ // const isBracket = textBeforeCursor.at(-1) === '[';
372
+ // // Return null if we're in a string after a dot
373
+ // if (textBeforeCursor.at(-1) === '.' && isInString) return null;
374
+ // // Get nested properties and filter by text after separation if it exists
375
+ // let resolved = resolveNestedProperties(this.customAutoCompletions, path);
376
+ // if (!resolved || typeof resolved !== 'object') return null;
377
+ // if (textAfterSeperation) {
378
+ // resolved = Object.fromEntries(
379
+ // Object.entries(resolved).filter(([key]) =>
380
+ // key.toLowerCase().startsWith(textAfterSeperation.toLowerCase())
381
+ // )
382
+ // );
383
+ // }
384
+ // return {
385
+ // from: context.pos - textAfterSeperation.length,
386
+ // options: Object.keys(resolved).map(key => ({
387
+ // label: key,
388
+ // type: 'property',
389
+ // info: `Key of ${path[path.length - 1]}`,
390
+ // apply: !this.allowVariableInCustomSuggestion && (isBracket && !isInString)
391
+ // ? `'${key}'`
392
+ // : key,
393
+ // boost: 999
394
+ // }))
395
+ // };
396
+ // }
397
+ // /**
398
+ // * Gets top level suggestions based on custom completions and paths
399
+ // * @param context CompletionContext from CodeMirror
400
+ // * @param textBeforeCursor Text before cursor position
401
+ // * @returns CompletionResult with top level suggestions or null
402
+ // */
403
+ // getTopLevelSuggestions(context: CompletionContext,textBeforeCursor:string){
404
+ // const baseMatch: any = textBeforeCursor.match(/([a-zA-Z_$][\w$]*)$/);
405
+ // if (!baseMatch) {
406
+ // const trimmedText = textBeforeCursor.trim();
407
+ // if (trimmedText === '' && !this.isSpacePressed) {
408
+ // const optionsList = Object.keys(this.customAutoCompletions).filter(key =>
409
+ // Object.keys(this.customAutoCompletions[key]).length
410
+ // );
411
+ // const options = optionsList.map((key) => ({
412
+ // label: key,
413
+ // type: 'property',
414
+ // apply: key,
415
+ // boost: 999
416
+ // }));
417
+ // if(this.customCompletionsPaths.length){
418
+ // this.customCompletionsPaths.forEach(path => {
419
+ // options.push({
420
+ // label: ''+path,
421
+ // type: 'property',
422
+ // apply: ''+path,
423
+ // boost: 998
424
+ // });
425
+ // });
426
+ // }
427
+ // return {
428
+ // from: context.pos,
429
+ // options: options
430
+ // };
431
+ // }
432
+ // return null;
433
+ // }
434
+ // const optionsList = Object.keys(this.customAutoCompletions).filter(key =>
435
+ // Object.keys(this.customAutoCompletions[key]).length &&
436
+ // key.toLowerCase().startsWith(textBeforeCursor.toLowerCase())
437
+ // );
438
+ // const options=optionsList.map((key) => ({
439
+ // label: key,
440
+ // type: 'property',
441
+ // apply: key,
442
+ // boost: 999
443
+ // }))
444
+ // if(this.customCompletionsPaths.length){
445
+ // this.customCompletionsPaths
446
+ // .filter(path=>path.toLocaleLowerCase().includes(textBeforeCursor.toLocaleLowerCase()))
447
+ // .forEach(path=>{
448
+ // options.push({
449
+ // label: ''+path,
450
+ // type: 'property',
451
+ // apply: ''+path,
452
+ // boost: 998
453
+ // })
454
+ // })
455
+ // }
456
+ // return {
457
+ // from: context.pos - baseMatch[1].length,
458
+ // options: options
459
+ // }
460
+ // }
461
+ // emitAfterTimeout(value:any){
462
+ // if(this.timeOut) clearTimeout(this.timeOut);
463
+ // this.timeOut=setTimeout(()=> this.emit('nile-change', value, false), this.debounceTimeout)
464
+ // }
465
+ // public focusAtPosition(pos: number=this.view.state.doc.toString().length): void {
466
+ // if (this.view) {
467
+ // this.view.dispatch({
468
+ // selection: { anchor: pos },
469
+ // });
470
+ // this.view.focus();
471
+ // }
472
+ // }
473
+ // public insertBetweenCode=(text: string) => {
474
+ // const transaction = this.view.state.changeByRange(range => {
475
+ // const { from, to } = range;
476
+ // return { changes: { from:from, to, insert: text }, range };
477
+ // });
478
+ // this.view.dispatch(transaction);
479
+ // }
480
+ // singleLineMultiLineToggle() {
481
+ // this.view.dispatch({
482
+ // changes: {
483
+ // from: 0,
484
+ // to: this.view.state.doc.length,
485
+ // insert: !this.multiline
486
+ // ? convertToSingleLine(this.value)
487
+ // : this.value,
488
+ // },
489
+ // });
490
+ // }
491
+ // //EXTENSION CONFIGURATIONS
492
+ // getLineNumbersExension() {
493
+ // return (!this.multiline && this.lineNumbers) || (this.multiline && this.lineNumbersMultiline) ? lineNumbers() : [];
494
+ // }
495
+ // getLanguageExtension():Extension{
496
+ // switch(this.language){
497
+ // case 'sql':
498
+ // return sql();
499
+ // case 'json':
500
+ // return json();
501
+ // case 'html':
502
+ // return htmlLang();
503
+ // default:
504
+ // return javascript();
505
+ // }
506
+ // }
507
+ // getReadOnlyExtension() {
508
+ // return this.readonly ? EditorState.readOnly.of(true) : [];
509
+ // }
510
+ // getSingleLineExtension() {
511
+ // return !this.multiline ? EditorState.transactionFilter.of(tr =>
512
+ // tr.newDoc.lines > 1 ? [] : tr
513
+ // ) : [];
514
+ // }
515
+ // getPlaceholderExtension(){
516
+ // return this.placeholder ? placeholder(this.placeholder) : [];
517
+ // }
518
+ // getDefaultSyntaxHighlightingExtension(){
519
+ // return !this.disableSyntaxHighlighting ? syntaxHighlighting(defaultHighlightStyle, { fallback: true }):[]
520
+ // }
521
+ // getCustomThemeExtension(): Extension {
522
+ // if(this.customThemeCSS) {
523
+ // if(this.defaultFont){
524
+ // return [EditorView.theme(this.customThemeCSS as { [selector: string]: StyleSpec }), EditorView.theme(customisedThemeCss),EditorView.theme(fontFamily)];
525
+ // }
526
+ // return [EditorView.theme(this.customThemeCSS as { [selector: string]: StyleSpec }), EditorView.theme(customisedThemeCss)];
527
+ // }
528
+ // if(this.defaultFont){
529
+ // return [EditorView.theme(customisedThemeCss), EditorView.theme(fontFamily)];
530
+ // }
531
+ // return [EditorView.theme(customisedThemeCss)];
532
+ // }
533
+ // getAutoCompleteStyleExtension(width?: number): Extension {
534
+ // if (this.autoCompleteStyle?.width) {
535
+ // const containerWidth = width || (this.codeEditor ? this.codeEditor.getBoundingClientRect().width : 300);
536
+ // const widthPercentage = parseFloat(this.autoCompleteStyle.width.replace('%', ''));
537
+ // const codeEditorWidth = (containerWidth * widthPercentage) / 100;
538
+ // const multilineStyles: { [key: string]: string } = this.autoCompleteStyle.multiline ? {
539
+ // overflow: "visible",
540
+ // textOverflow: "unset",
541
+ // whiteSpace: "normal",
542
+ // wordWrap: "break-word"
543
+ // } : {
544
+ // overflow: "hidden",
545
+ // textOverflow: "ellipsis",
546
+ // whiteSpace: "nowrap"
547
+ // };
548
+ // return [
549
+ // tooltips({
550
+ // position: "fixed",
551
+ // tooltipSpace: () => {
552
+ // const rect = this.codeEditor.getBoundingClientRect();
553
+ // return {
554
+ // left: rect.left,
555
+ // top: 0,
556
+ // right: rect.right,
557
+ // bottom: 1000
558
+ // };
559
+ // }
560
+ // }),
561
+ // EditorView.theme({
562
+ // ".cm-tooltip.cm-tooltip-autocomplete": {
563
+ // maxWidth: (codeEditorWidth - 15) + "px !important"
564
+ // },
565
+ // ".cm-tooltip.cm-tooltip-autocomplete > ul > li": {
566
+ // ...multilineStyles,
567
+ // maxWidth: "100%"
568
+ // }
569
+ // })
570
+ // ];
571
+ // }
572
+ // return [];
573
+ // }
574
+ // private updateAutocompleteWidth(width: number) {
575
+ // if (this.view) {
576
+ // this.view.dispatch({
577
+ // effects: this.autoCompleteStyleComp.reconfigure(this.getAutoCompleteStyleExtension(width))
578
+ // });
579
+ // }
580
+ // }
581
+ // restrictSingleLine() {
582
+ // return EditorState.transactionFilter.of(tr =>
583
+ // tr.newDoc.lines > 1 ? [] : tr
584
+ // );
585
+ // }
586
+ // /* #endregion */
587
+ // }
588
+ // export default NileCodeEditor;
589
+ // declare global {
590
+ // interface HTMLElementTagNameMap {
591
+ // 'nile-code-editor': NileCodeEditor;
592
+ // }
593
+ // }
594
+ // /**
595
+ // * Parses a string path into an array of keys representing nested object access
596
+ // * @param text The path string to parse (e.g. "foo.bar[0].baz")
597
+ // * @returns Array of keys if valid path, null otherwise
598
+ // * @example
599
+ // * parsePath("foo.bar[0]") // returns ["foo", "bar", "0"]
600
+ // * parsePath("invalid") // returns null
601
+ // */
602
+ // function parsePath(text: string) {
603
+ // const regex = /([a-zA-Z_$][\w$]*)(\[(?:[^\]]+)\]|\.[a-zA-Z_$][\w$]*)*/g;
604
+ // const matches = [...text.matchAll(regex)];
605
+ // if (matches.length > 0) {
606
+ // const base = matches[0][1]; // The base object name
607
+ // const keys = [base];
608
+ // // Extract keys from dot or bracket notation
609
+ // const pathMatches = text.match(/\[(.*?)\]|\.(\w+)/g) || [];
610
+ // for (const match of pathMatches) {
611
+ // if (match.startsWith('[')) {
612
+ // keys.push(match.slice(1, -1).replace(/['"]/g, '')); // Remove brackets and quotes
613
+ // } else if (match.startsWith('.')) {
614
+ // keys.push(match.slice(1));
615
+ // }
616
+ // }
617
+ // return keys;
618
+ // }
619
+ // return null;
620
+ // };
621
+ // /**
622
+ // * Splits a path string at the last separator (. or [)
623
+ // * @param input The path string to split
624
+ // * @returns Array containing [path up to last separator, remainder after separator]
625
+ // * @example
626
+ // * splitStringAtLastSeparator("foo.bar[0]") // returns ["foo.bar[", "0"]
627
+ // */
628
+ // function splitStringAtLastSeparator(input:string) {
629
+ // const lastSeparatorIndex = Math.max(input.lastIndexOf('.'), input.lastIndexOf('['));
630
+ // if (lastSeparatorIndex === -1) return [input, ''];
631
+ // return [input.slice(0, lastSeparatorIndex + 1), input.slice(lastSeparatorIndex + 1)];
632
+ // }
633
+ // /**
634
+ // * Traverses an object using an array of keys to access nested properties
635
+ // * @param obj The object to traverse
636
+ // * @param keys Array of keys defining the path to the desired property
637
+ // * @returns The value at the specified path, or null if path is invalid
638
+ // * @example
639
+ // * resolveNestedProperties({foo: {bar: 123}}, ["foo", "bar"]) // returns 123
640
+ // */
641
+ // function resolveNestedProperties (obj:any, keys:any[]){
642
+ // return keys.reduce((acc, key) => {
643
+ // if (acc && typeof acc === 'object') {
644
+ // return acc[key];
645
+ // }
646
+ // return null;
647
+ // }, obj);
648
+ // };
649
+ // /**
650
+ // * Validates if a string represents a valid object path format
651
+ // * @param path The path string to validate
652
+ // * @returns Boolean indicating if path format is valid
653
+ // * @example
654
+ // * isValidPath("foo.bar[0]") // returns true
655
+ // * isValidPath("foo..bar") // returns false
656
+ // */
657
+ // function isValidPath(path: string) {
658
+ // // Regex to validate the format of the string
659
+ // const regex = /^([a-zA-Z_$][\w$]*)(\.[a-zA-Z_$][\w$]*|\[\s*(['"]?[a-zA-Z0-9_$]*['"]?)\s*\])*([\.\[])?$/;
660
+ // // Test the string against the regex
661
+ // return regex.test(path);
662
+ // }
663
+ // /**
664
+ // * Converts multi-line code into a single line by removing line breaks and extra whitespace
665
+ // * @param code The code string to convert
666
+ // * @returns Single line version of the code
667
+ // * @example
668
+ // * convertToSingleLine("foo\n bar") // returns "foo bar"
669
+ // */
670
+ // function convertToSingleLine(code: string) {
671
+ // if (!code) return '';
672
+ // // Remove line breaks and unnecessary whitespace
673
+ // return code.replace(/\s+/g, ' ').trim();
674
+ // }
675
+ //# sourceMappingURL=backup_nile-code-editor%20copy.js.map