@aquera/nile-elements 0.1.67-beta-1.9 → 0.1.67-beta-2.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 (213) hide show
  1. package/README.md +1 -23
  2. package/demo/index.html +61 -1
  3. package/dist/index.cjs.js +1 -1
  4. package/dist/index.esm.js +1 -1
  5. package/dist/index.js +5640 -7857
  6. package/dist/internal/form.cjs.js +1 -1
  7. package/dist/internal/form.cjs.js.map +1 -1
  8. package/dist/internal/form.esm.js +1 -1
  9. package/dist/internal/resizable-table-styles.cjs.js +1 -1
  10. package/dist/internal/resizable-table-styles.cjs.js.map +1 -1
  11. package/dist/internal/resizable-table-styles.esm.js +3 -15
  12. package/dist/nile-accordion/nile-accordian.test.cjs.js +1 -1
  13. package/dist/nile-accordion/nile-accordian.test.esm.js +1 -1
  14. package/dist/nile-auto-complete/index.cjs.js +1 -1
  15. package/dist/nile-auto-complete/index.esm.js +1 -1
  16. package/dist/nile-auto-complete/nile-auto-complete.cjs.js +17 -1
  17. package/dist/nile-auto-complete/nile-auto-complete.cjs.js.map +1 -1
  18. package/dist/nile-auto-complete/nile-auto-complete.esm.js +29 -8
  19. package/dist/nile-auto-complete/nile-auto-complete.test.cjs.js +1 -1
  20. package/dist/nile-auto-complete/nile-auto-complete.test.cjs.js.map +1 -1
  21. package/dist/nile-auto-complete/nile-auto-complete.test.esm.js +1 -1
  22. package/dist/nile-avatar/nile-avatar.test.cjs.js +1 -1
  23. package/dist/nile-avatar/nile-avatar.test.esm.js +1 -1
  24. package/dist/nile-badge/nile-badge.test.cjs.js +1 -1
  25. package/dist/nile-badge/nile-badge.test.esm.js +1 -1
  26. package/dist/nile-button/nile-button.test.cjs.js +1 -1
  27. package/dist/nile-button/nile-button.test.esm.js +1 -1
  28. package/dist/nile-button-toggle-group/nile-button-toggle-group.test.cjs.js +1 -1
  29. package/dist/nile-button-toggle-group/nile-button-toggle-group.test.esm.js +1 -1
  30. package/dist/nile-calendar/nile-calendar.test.cjs.js +1 -1
  31. package/dist/nile-calendar/nile-calendar.test.cjs.js.map +1 -1
  32. package/dist/nile-calendar/nile-calendar.test.esm.js +1 -1
  33. package/dist/nile-card/nile-card.test.cjs.js +1 -1
  34. package/dist/nile-card/nile-card.test.esm.js +1 -1
  35. package/dist/nile-checkbox/nile-checkbox.test.cjs.js +1 -1
  36. package/dist/nile-checkbox/nile-checkbox.test.esm.js +1 -1
  37. package/dist/nile-chip/nile-chip.cjs.js +1 -1
  38. package/dist/nile-chip/nile-chip.cjs.js.map +1 -1
  39. package/dist/nile-chip/nile-chip.esm.js +1 -1
  40. package/dist/nile-chip/nile-chip.test.cjs.js +1 -1
  41. package/dist/nile-chip/nile-chip.test.cjs.js.map +1 -1
  42. package/dist/nile-chip/nile-chip.test.esm.js +1 -1
  43. package/dist/nile-code-editor/extensionSetup.cjs.js +5 -5
  44. package/dist/nile-code-editor/extensionSetup.cjs.js.map +1 -1
  45. package/dist/nile-code-editor/extensionSetup.esm.js +1 -1
  46. package/dist/nile-code-editor/nile-code-editor.cjs.js +2 -2
  47. package/dist/nile-code-editor/nile-code-editor.cjs.js.map +1 -1
  48. package/dist/nile-code-editor/nile-code-editor.esm.js +3 -3
  49. package/dist/nile-code-editor/theme.cjs.js +1 -1
  50. package/dist/nile-code-editor/theme.cjs.js.map +1 -1
  51. package/dist/nile-code-editor/theme.esm.js +1 -1
  52. package/dist/nile-dialog/nile-dialog.test.cjs.js +1 -1
  53. package/dist/nile-dialog/nile-dialog.test.esm.js +1 -1
  54. package/dist/nile-drawer/nile-drawer.test.cjs.js +1 -1
  55. package/dist/nile-drawer/nile-drawer.test.esm.js +1 -1
  56. package/dist/nile-dropdown/nile-dropdown.test.cjs.js +1 -1
  57. package/dist/nile-dropdown/nile-dropdown.test.esm.js +1 -1
  58. package/dist/nile-empty-state/nile-empty-state.test.cjs.js +1 -1
  59. package/dist/nile-empty-state/nile-empty-state.test.esm.js +1 -1
  60. package/dist/nile-error-message/nile-error-message.test.cjs.js +1 -1
  61. package/dist/nile-error-message/nile-error-message.test.esm.js +1 -1
  62. package/dist/nile-filter-chip/nile-filter-chip.test.cjs.js +1 -1
  63. package/dist/nile-filter-chip/nile-filter-chip.test.esm.js +1 -1
  64. package/dist/nile-form-group/nile-form-group.test.cjs.js +1 -1
  65. package/dist/nile-form-group/nile-form-group.test.esm.js +1 -1
  66. package/dist/nile-form-help-text/nile-form-help-text.test.cjs.js +1 -1
  67. package/dist/nile-form-help-text/nile-form-help-text.test.esm.js +1 -1
  68. package/dist/nile-hero/nile-hero.test.cjs.js +1 -1
  69. package/dist/nile-hero/nile-hero.test.esm.js +1 -1
  70. package/dist/nile-icon/nile-icon.test.cjs.js +1 -1
  71. package/dist/nile-icon/nile-icon.test.esm.js +1 -1
  72. package/dist/nile-input/nile-input.test.cjs.js +1 -1
  73. package/dist/nile-input/nile-input.test.esm.js +1 -1
  74. package/dist/nile-link/nile-link.test.cjs.js +1 -1
  75. package/dist/nile-link/nile-link.test.esm.js +1 -1
  76. package/dist/nile-loader/nile-loader.test.cjs.js +1 -1
  77. package/dist/nile-loader/nile-loader.test.esm.js +1 -1
  78. package/dist/nile-option/nile-option.cjs.js +1 -1
  79. package/dist/nile-option/nile-option.cjs.js.map +1 -1
  80. package/dist/nile-option/nile-option.esm.js +3 -3
  81. package/dist/nile-popover/index.cjs.js +1 -1
  82. package/dist/nile-popover/index.esm.js +1 -1
  83. package/dist/nile-popover/nile-popover.cjs.js +11 -3
  84. package/dist/nile-popover/nile-popover.cjs.js.map +1 -1
  85. package/dist/nile-popover/nile-popover.esm.js +13 -7
  86. package/dist/nile-popover/nile-popover.test.cjs.js +1 -1
  87. package/dist/nile-popover/nile-popover.test.cjs.js.map +1 -1
  88. package/dist/nile-popover/nile-popover.test.esm.js +3 -3
  89. package/dist/nile-popup/nile-popup.test.cjs.js +1 -1
  90. package/dist/nile-popup/nile-popup.test.esm.js +1 -1
  91. package/dist/nile-progress-bar/nile-progress-bar.test.cjs.js +1 -1
  92. package/dist/nile-progress-bar/nile-progress-bar.test.esm.js +1 -1
  93. package/dist/nile-radio/nile-radio.test.cjs.js +1 -1
  94. package/dist/nile-radio/nile-radio.test.esm.js +1 -1
  95. package/dist/nile-radio-group/nile-radio-group.test.cjs.js +1 -1
  96. package/dist/nile-radio-group/nile-radio-group.test.esm.js +1 -1
  97. package/dist/nile-select/index.cjs.js +1 -1
  98. package/dist/nile-select/index.esm.js +1 -1
  99. package/dist/nile-select/nile-select.cjs.js +1 -1
  100. package/dist/nile-select/nile-select.cjs.js.map +1 -1
  101. package/dist/nile-select/nile-select.esm.js +9 -9
  102. package/dist/nile-select/nile-select.test.cjs.js +1 -1
  103. package/dist/nile-select/nile-select.test.cjs.js.map +1 -1
  104. package/dist/nile-select/nile-select.test.esm.js +2 -2
  105. package/dist/nile-slide-toggle/nile-slide-toggle.test.cjs.js +1 -1
  106. package/dist/nile-slide-toggle/nile-slide-toggle.test.esm.js +1 -1
  107. package/dist/nile-tab-group/nile-tab-group.test.cjs.js +1 -1
  108. package/dist/nile-tab-group/nile-tab-group.test.esm.js +1 -1
  109. package/dist/nile-table-cell-item/nile-table-cell-item.css.cjs.js +1 -1
  110. package/dist/nile-table-cell-item/nile-table-cell-item.css.cjs.js.map +1 -1
  111. package/dist/nile-table-cell-item/nile-table-cell-item.css.esm.js +6 -2
  112. package/dist/nile-table-header-item/nile-table-header-item.css.cjs.js +1 -1
  113. package/dist/nile-table-header-item/nile-table-header-item.css.cjs.js.map +1 -1
  114. package/dist/nile-table-header-item/nile-table-header-item.css.esm.js +4 -2
  115. package/dist/nile-table-row/nile-table-row.cjs.js +1 -1
  116. package/dist/nile-table-row/nile-table-row.cjs.js.map +1 -1
  117. package/dist/nile-table-row/nile-table-row.css.cjs.js +1 -1
  118. package/dist/nile-table-row/nile-table-row.css.cjs.js.map +1 -1
  119. package/dist/nile-table-row/nile-table-row.css.esm.js +51 -0
  120. package/dist/nile-table-row/nile-table-row.esm.js +26 -6
  121. package/dist/nile-textarea/nile-textarea.test.cjs.js +1 -1
  122. package/dist/nile-textarea/nile-textarea.test.esm.js +1 -1
  123. package/dist/src/index.d.ts +0 -4
  124. package/dist/src/index.js +0 -4
  125. package/dist/src/index.js.map +1 -1
  126. package/dist/src/internal/form.js +3 -3
  127. package/dist/src/internal/form.js.map +1 -1
  128. package/dist/src/internal/resizable-table-styles.js +0 -12
  129. package/dist/src/internal/resizable-table-styles.js.map +1 -1
  130. package/dist/src/nile-chip/nile-chip.js +1 -10
  131. package/dist/src/nile-chip/nile-chip.js.map +1 -1
  132. package/dist/src/nile-code-editor/nile-code-editor.d.ts +0 -3
  133. package/dist/src/nile-code-editor/nile-code-editor.js +3 -23
  134. package/dist/src/nile-code-editor/nile-code-editor.js.map +1 -1
  135. package/dist/src/nile-code-editor/theme.d.ts +0 -6
  136. package/dist/src/nile-code-editor/theme.js +2 -8
  137. package/dist/src/nile-code-editor/theme.js.map +1 -1
  138. package/dist/src/nile-option/nile-option.d.ts +1 -4
  139. package/dist/src/nile-option/nile-option.js +15 -27
  140. package/dist/src/nile-option/nile-option.js.map +1 -1
  141. package/dist/src/nile-select/nile-select.d.ts +3 -20
  142. package/dist/src/nile-select/nile-select.js +22 -123
  143. package/dist/src/nile-select/nile-select.js.map +1 -1
  144. package/dist/src/nile-table-cell-item/nile-table-cell-item.css.js +4 -0
  145. package/dist/src/nile-table-cell-item/nile-table-cell-item.css.js.map +1 -1
  146. package/dist/src/nile-table-header-item/nile-table-header-item.css.js +2 -0
  147. package/dist/src/nile-table-header-item/nile-table-header-item.css.js.map +1 -1
  148. package/dist/src/nile-table-row/nile-table-row-expandable.d.ts +37 -0
  149. package/dist/src/nile-table-row/nile-table-row-expandable.js +105 -0
  150. package/dist/src/nile-table-row/nile-table-row-expandable.js.map +1 -0
  151. package/dist/src/nile-table-row/nile-table-row.css.js +51 -0
  152. package/dist/src/nile-table-row/nile-table-row.css.js.map +1 -1
  153. package/dist/src/nile-table-row/nile-table-row.d.ts +4 -0
  154. package/dist/src/nile-table-row/nile-table-row.js +58 -11
  155. package/dist/src/nile-table-row/nile-table-row.js.map +1 -1
  156. package/dist/src/nile-table-row-expandable/index.d.ts +1 -0
  157. package/dist/src/nile-table-row-expandable/index.js +2 -0
  158. package/dist/src/nile-table-row-expandable/index.js.map +1 -0
  159. package/dist/src/nile-table-row-expandable/nile-table-row-expandable.css.d.ts +12 -0
  160. package/dist/src/nile-table-row-expandable/nile-table-row-expandable.css.js +17 -0
  161. package/dist/src/nile-table-row-expandable/nile-table-row-expandable.css.js.map +1 -0
  162. package/dist/src/nile-table-row-expandable/nile-table-row-expandable.d.ts +37 -0
  163. package/dist/src/nile-table-row-expandable/nile-table-row-expandable.js +103 -0
  164. package/dist/src/nile-table-row-expandable/nile-table-row-expandable.js.map +1 -0
  165. package/dist/tsconfig.tsbuildinfo +1 -1
  166. package/package.json +3 -4
  167. package/src/index.ts +1 -5
  168. package/src/internal/form.ts +3 -3
  169. package/src/internal/resizable-table-styles.ts +0 -12
  170. package/src/nile-chip/nile-chip.ts +1 -9
  171. package/src/nile-code-editor/nile-code-editor.ts +4 -25
  172. package/src/nile-code-editor/theme.ts +2 -8
  173. package/src/nile-option/nile-option.ts +12 -22
  174. package/src/nile-select/nile-select.ts +15 -139
  175. package/src/nile-table-cell-item/nile-table-cell-item.css.ts +4 -0
  176. package/src/nile-table-header-item/nile-table-header-item.css.ts +2 -0
  177. package/src/nile-table-row/nile-table-row.css.ts +51 -0
  178. package/src/nile-table-row/nile-table-row.ts +50 -7
  179. package/vscode-html-custom-data.json +23 -400
  180. package/src/nile-file-preview/index.ts +0 -1
  181. package/src/nile-file-preview/nile-file-preview.css.ts +0 -589
  182. package/src/nile-file-preview/nile-file-preview.template.ts +0 -259
  183. package/src/nile-file-preview/nile-file-preview.test.ts +0 -38
  184. package/src/nile-file-preview/nile-file-preview.ts +0 -205
  185. package/src/nile-file-preview/types/index.ts +0 -2
  186. package/src/nile-file-preview/types/nile-file-preview.enums.ts +0 -32
  187. package/src/nile-file-preview/types/nile-file-preview.interface.ts +0 -4
  188. package/src/nile-file-preview/utils/index.ts +0 -1
  189. package/src/nile-file-preview/utils/nile-file-preview.util.ts +0 -72
  190. package/src/nile-file-upload/index.ts +0 -1
  191. package/src/nile-file-upload/nile-file-upload.css.ts +0 -624
  192. package/src/nile-file-upload/nile-file-upload.template.ts +0 -217
  193. package/src/nile-file-upload/nile-file-upload.test.ts +0 -38
  194. package/src/nile-file-upload/nile-file-upload.ts +0 -161
  195. package/src/nile-file-upload/types/file-upload.enums.ts +0 -46
  196. package/src/nile-file-upload/types/file-upload.type.ts +0 -5
  197. package/src/nile-file-upload/types/index.ts +0 -2
  198. package/src/nile-file-upload/utils/drag-drop.util.ts +0 -106
  199. package/src/nile-file-upload/utils/file-validation.util.ts +0 -216
  200. package/src/nile-option-group/index.ts +0 -1
  201. package/src/nile-option-group/nile-option-group.css.ts +0 -60
  202. package/src/nile-option-group/nile-option-group.interface.ts +0 -24
  203. package/src/nile-option-group/nile-option-group.ts +0 -84
  204. package/src/nile-select/nile-select.interface.ts +0 -5
  205. package/src/nile-select/virtual-scroll-helper.ts +0 -56
  206. package/src/nile-virtual-select/index.ts +0 -1
  207. package/src/nile-virtual-select/nile-virtual-select.css.ts +0 -491
  208. package/src/nile-virtual-select/nile-virtual-select.test.ts +0 -774
  209. package/src/nile-virtual-select/nile-virtual-select.ts +0 -1314
  210. package/src/nile-virtual-select/renderer.ts +0 -102
  211. package/src/nile-virtual-select/search-manager.ts +0 -50
  212. package/src/nile-virtual-select/selection-manager.ts +0 -75
  213. package/src/nile-virtual-select/types.ts +0 -54
@@ -25,6 +25,57 @@ export const styles = css `
25
25
  nile-table-row > slot::slotted(nile-table-cell-item:first-child) {
26
26
  color: red;
27
27
  }
28
+
29
+ .row-container {
30
+ display: flex;
31
+ flex-direction: column;
32
+ }
33
+
34
+ .row {
35
+ cursor: default;
36
+ position: relative;
37
+ display: flex;
38
+ align-items: center;
39
+ }
40
+
41
+ .row.expandable {
42
+ border-bottom: 1px solid var(--nile-table-row-border-color);
43
+ }
44
+
45
+
46
+ .expanded-content {
47
+ overflow: hidden;
48
+ transition: max-height 0.3s ease;
49
+ }
50
+
51
+ .row.expandable .expand-icon {
52
+ margin-right: 4px;
53
+ }
54
+
55
+ .row ::slotted(nile-table-cell-item),
56
+ .row ::slotted(nile-table-header-item) {
57
+ flex: 1 1 0;
58
+ box-sizing: border-box;
59
+ }
60
+
61
+
62
+ .row-container {
63
+ display: flex;
64
+ flex-direction: column;
65
+ }
66
+
67
+ .expand-icon {
68
+ position: absolute;
69
+ left: 0.40em;
70
+ top: 50%;
71
+ transform: translateY(-50%);
72
+ cursor: pointer;
73
+ font-size: 1em;
74
+ line-height: 1;
75
+ user-select: none;
76
+ z-index: 2;
77
+ }
78
+
28
79
  `;
29
80
  export default [styles];
30
81
  //# sourceMappingURL=nile-table-row.css.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"nile-table-row.css.js","sourceRoot":"","sources":["../../../src/nile-table-row/nile-table-row.css.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;CAiBxB,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';\n\n/**\n * TableRow CSS\n */\nexport const styles = css`\n :host {\n display: table-row;\n width: 100%;\n height: 100%;\n height: max-content;\n --nile-header-background: var(--nile-table-header-background-color);\n border-bottom: 1px solid var(--nile-table-row-border-color);\n }\n\n slot::slotted(nile-table-header-item) {\n background-color: var(--nile-header-background);\n }\n\n nile-table-row > slot::slotted(nile-table-cell-item:first-child) {\n color: red;\n }\n`;\n\nexport default [styles];\n"]}
1
+ {"version":3,"file":"nile-table-row.css.js","sourceRoot":"","sources":["../../../src/nile-table-row/nile-table-row.css.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoExB,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';\n\n/**\n * TableRow CSS\n */\nexport const styles = css`\n :host {\n display: table-row;\n width: 100%;\n height: 100%;\n height: max-content;\n --nile-header-background: var(--nile-table-header-background-color);\n border-bottom: 1px solid var(--nile-table-row-border-color);\n }\n\n slot::slotted(nile-table-header-item) {\n background-color: var(--nile-header-background);\n }\n\n nile-table-row > slot::slotted(nile-table-cell-item:first-child) {\n color: red;\n }\n\n.row-container {\n display: flex;\n flex-direction: column;\n}\n\n.row {\n cursor: default;\n position: relative; \n display: flex;\n align-items: center;\n}\n\n.row.expandable {\n border-bottom: 1px solid var(--nile-table-row-border-color);\n}\n \n\n.expanded-content {\n overflow: hidden;\n transition: max-height 0.3s ease;\n}\n\n.row.expandable .expand-icon {\n margin-right: 4px;\n}\n \n.row ::slotted(nile-table-cell-item),\n.row ::slotted(nile-table-header-item) {\n flex: 1 1 0; \n box-sizing: border-box; \n}\n\n\n.row-container {\n display: flex;\n flex-direction: column;\n}\n\n.expand-icon {\n position: absolute;\n left: 0.40em; \n top: 50%;\n transform: translateY(-50%);\n cursor: pointer;\n font-size: 1em;\n line-height: 1;\n user-select: none;\n z-index: 2;\n}\n \n`;\n\nexport default [styles];\n"]}
@@ -22,6 +22,10 @@ export declare class NileTableRow extends NileElement {
22
22
  * Render method
23
23
  * @slot This is a slot test
24
24
  */
25
+ expandable: boolean;
26
+ expanded: boolean;
27
+ private _expandedSlot;
28
+ private toggleExpand;
25
29
  private handleSortingAlter;
26
30
  render(): TemplateResult;
27
31
  }
@@ -6,7 +6,7 @@
6
6
  */
7
7
  import { __decorate } from "tslib";
8
8
  import { html, } from 'lit';
9
- import { customElement } from 'lit/decorators.js';
9
+ import { customElement, query, property } from 'lit/decorators.js';
10
10
  import { styles } from './nile-table-row.css';
11
11
  import NileElement from '../internal/nile-element';
12
12
  /**
@@ -16,6 +16,18 @@ import NileElement from '../internal/nile-element';
16
16
  *
17
17
  */
18
18
  let NileTableRow = class NileTableRow extends NileElement {
19
+ constructor() {
20
+ super(...arguments);
21
+ /* #endregion */
22
+ /* #region Methods */
23
+ /**
24
+ * Render method
25
+ * @slot This is a slot test
26
+ */
27
+ this.expandable = false;
28
+ this.expanded = false;
29
+ /* #endregion */
30
+ }
19
31
  /**
20
32
  * The styles for TableRow
21
33
  * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`
@@ -23,12 +35,14 @@ let NileTableRow = class NileTableRow extends NileElement {
23
35
  static get styles() {
24
36
  return [styles];
25
37
  }
26
- /* #endregion */
27
- /* #region Methods */
28
- /**
29
- * Render method
30
- * @slot This is a slot test
31
- */
38
+ toggleExpand(e) {
39
+ this.expanded = !this.expanded;
40
+ this.dispatchEvent(new CustomEvent('nile-change', {
41
+ detail: { expanded: this.expanded },
42
+ bubbles: true,
43
+ composed: true,
44
+ }));
45
+ }
32
46
  handleSortingAlter(event) {
33
47
  const header_items = [
34
48
  ...this.querySelectorAll('nile-table-header-item'),
@@ -43,13 +57,46 @@ let NileTableRow = class NileTableRow extends NileElement {
43
57
  }
44
58
  render() {
45
59
  return html `
46
- <slot
47
- part="nile-row"
48
- @nile-click-sort="${this.handleSortingAlter}"
49
- ></slot>
60
+ <div part="row-container" class="row-container">
61
+ <div
62
+ part="nile-row"
63
+ class="row ${this.expandable ? 'expandable' : ''} ${this.expanded ? 'expanded' : ''}"
64
+ @nile-click-sort="${this.handleSortingAlter}"
65
+ >
66
+ ${this.expandable
67
+ ? html `
68
+ <slot name="expandableIcon">
69
+ <nile-icon
70
+ class="expand-icon"
71
+ name="${this.expanded ? 'chevron-up' : 'chevron-down'}"
72
+ @click=${this.toggleExpand}
73
+ role="button"
74
+ size="10"
75
+ aria-label="${this.expanded ? 'Collapse row' : 'Expand row'}">
76
+ </nile-icon> </slot>`
77
+ : null}
78
+ <slot></slot>
79
+ </div>
80
+
81
+ ${this.expandable && this.expanded
82
+ ? html `
83
+ <div class="expanded-content">
84
+ <slot name="expanded"></slot>
85
+ </div>`
86
+ : null}
87
+ </div>
50
88
  `;
51
89
  }
52
90
  };
91
+ __decorate([
92
+ property({ type: Boolean, reflect: true })
93
+ ], NileTableRow.prototype, "expandable", void 0);
94
+ __decorate([
95
+ property({ type: Boolean, reflect: true })
96
+ ], NileTableRow.prototype, "expanded", void 0);
97
+ __decorate([
98
+ query('slot[name="expanded"]')
99
+ ], NileTableRow.prototype, "_expandedSlot", void 0);
53
100
  NileTableRow = __decorate([
54
101
  customElement('nile-table-row')
55
102
  ], NileTableRow);
@@ -1 +1 @@
1
- {"version":3,"file":"nile-table-row.js","sourceRoot":"","sources":["../../../src/nile-table-row/nile-table-row.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAEL,IAAI,GAGL,MAAM,KAAK,CAAC;AACb,OAAO,EAAE,aAAa,EAAmB,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,WAAW,MAAM,0BAA0B,CAAC;AAEnD;;;;;GAKG;AAEI,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,WAAW;IAC3C;;;OAGG;IAEI,MAAM,KAAK,MAAM;QACtB,OAAO,CAAC,MAAM,CAAC,CAAC;IAClB,CAAC;IAED,gBAAgB;IAEhB,qBAAqB;IAErB;;;OAGG;IAEK,kBAAkB,CAAC,KAAkB;QAC3C,MAAM,YAAY,GAAQ;YACxB,GAAG,IAAI,CAAC,gBAAgB,CAAC,wBAAwB,CAAC;SACnD,CAAC;QACF,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,YAAY,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YAC7C,MAAM,MAAM,GAAG,YAAY,CAAC,CAAC,CAAC,CAAC;YAC/B,MAAM,QAAQ,GAAG,MAAM,CAAC,WAAW,IAAI,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,gBAAgB,CAAC;YAC3E,IAAI,CAAC,QAAQ,EAAE,CAAC;gBACd,MAAM,CAAC,UAAU,GAAG,CAAC,CAAC;YACxB,CAAC;QACH,CAAC;IACH,CAAC;IAEM,MAAM;QACX,OAAO,IAAI,CAAA;;;4BAGa,IAAI,CAAC,kBAAkB;;KAE9C,CAAC;IACJ,CAAC;CAGF,CAAA;AA1CY,YAAY;IADxB,aAAa,CAAC,gBAAgB,CAAC;GACnB,YAAY,CA0CxB;;AAED,eAAe,YAAY,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 {\n LitElement,\n html,\n CSSResultArray,\n TemplateResult,\n} from 'lit';\nimport { customElement, query, property } from 'lit/decorators.js';\nimport { styles } from './nile-table-row.css';\nimport NileElement from '../internal/nile-element';\n\n/**\n *nile-table-row component.\n *\n * @tag nile-table-row\n *\n */\n@customElement('nile-table-row')\nexport class NileTableRow extends NileElement {\n /**\n * The styles for TableRow\n * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`\n */\n\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n /* #endregion */\n\n /* #region Methods */\n\n /**\n * Render method\n * @slot This is a slot test\n */\n\n private handleSortingAlter(event: CustomEvent) {\n const header_items: any = [\n ...this.querySelectorAll('nile-table-header-item'),\n ];\n for (let i = 0; i < header_items.length; i++) {\n const header = header_items[i];\n const haveIcon = header.textContent == event.detail.value.curr_sort_string;\n if (!haveIcon) {\n header.sorting_ct = 0;\n }\n }\n }\n\n public render(): TemplateResult {\n return html`\n <slot\n part=\"nile-row\"\n @nile-click-sort=\"${this.handleSortingAlter}\"\n ></slot>\n `;\n }\n\n /* #endregion */\n}\n\nexport default NileTableRow;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-table-row': NileTableRow;\n }\n}\n"]}
1
+ {"version":3,"file":"nile-table-row.js","sourceRoot":"","sources":["../../../src/nile-table-row/nile-table-row.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAEL,IAAI,GAGL,MAAM,KAAK,CAAC;AACb,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,WAAW,MAAM,0BAA0B,CAAC;AAEnD;;;;;GAKG;AAEI,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,WAAW;IAAtC;;QASL,gBAAgB;QAEhB,qBAAqB;QAErB;;;WAGG;QAKyC,eAAU,GAAG,KAAK,CAAC;QAGnB,aAAQ,GAAG,KAAK,CAAC;QA6D7D,gBAAgB;IAClB,CAAC;IArFC;;;OAGG;IACI,MAAM,KAAK,MAAM;QACtB,OAAO,CAAC,MAAM,CAAC,CAAC;IAClB,CAAC;IAuBO,YAAY,CAAC,CAAa;QAChC,IAAI,CAAC,QAAQ,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC;QAC/B,IAAI,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,aAAa,EAAE;YAChD,MAAM,EAAE,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE;YACnC,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,IAAI;SACf,CAAC,CAAC,CAAC;IACN,CAAC;IAGO,kBAAkB,CAAC,KAAkB;QAC3C,MAAM,YAAY,GAAQ;YACxB,GAAG,IAAI,CAAC,gBAAgB,CAAC,wBAAwB,CAAC;SACnD,CAAC;QACF,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,YAAY,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YAC7C,MAAM,MAAM,GAAG,YAAY,CAAC,CAAC,CAAC,CAAC;YAC/B,MAAM,QAAQ,GAAG,MAAM,CAAC,WAAW,IAAI,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,gBAAgB,CAAC;YAC3E,IAAI,CAAC,QAAQ,EAAE,CAAC;gBACd,MAAM,CAAC,UAAU,GAAG,CAAC,CAAC;YACxB,CAAC;QACH,CAAC;IACH,CAAC;IAEM,MAAM;QACX,OAAO,IAAI,CAAA;;;;uBAIQ,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE;8BAC/D,IAAI,CAAC,kBAAkB;;YAEzC,IAAI,CAAC,UAAU;YACf,CAAC,CAAC,IAAI,CAAA;;;;yBAIO,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,cAAc;yBAC7C,IAAI,CAAC,YAAY;;;8BAGZ,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,YAAY;mCACxC;YACvB,CAAC,CAAC,IAAI;;;;UAIR,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,QAAQ;YAChC,CAAC,CAAC,IAAI,CAAA;;;qBAGK;YACX,CAAC,CAAC,IAAI;;KAEX,CAAC;IACJ,CAAC;CAEF,CAAA;AAjE6C;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;gDAAoB;AAGnB;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8CAAkB;AAGrD;IADP,KAAK,CAAC,uBAAuB,CAAC;mDACS;AA3B7B,YAAY;IADxB,aAAa,CAAC,gBAAgB,CAAC;GACnB,YAAY,CAsFxB;;AACD,eAAe,YAAY,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 {\n LitElement,\n html,\n CSSResultArray,\n TemplateResult,\n} from 'lit';\nimport { customElement, query, property } from 'lit/decorators.js';\nimport { styles } from './nile-table-row.css';\nimport NileElement from '../internal/nile-element';\n\n/**\n *nile-table-row component.\n *\n * @tag nile-table-row\n *\n */\n@customElement('nile-table-row')\nexport class NileTableRow extends NileElement {\n /**\n * The styles for TableRow\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 /* #endregion */\n\n /* #region Methods */\n\n /**\n * Render method\n * @slot This is a slot test\n */\n\n\n\n\n @property({ type: Boolean, reflect: true }) expandable = false;\n\n\n @property({ type: Boolean, reflect: true }) expanded = false;\n\n @query('slot[name=\"expanded\"]')\n private _expandedSlot!: HTMLSlotElement;\n\n\n private toggleExpand(e: MouseEvent): void {\n this.expanded = !this.expanded;\n this.dispatchEvent(new CustomEvent('nile-change', {\n detail: { expanded: this.expanded },\n bubbles: true,\n composed: true,\n }));\n }\n\n\n private handleSortingAlter(event: CustomEvent) {\n const header_items: any = [\n ...this.querySelectorAll('nile-table-header-item'),\n ];\n for (let i = 0; i < header_items.length; i++) {\n const header = header_items[i];\n const haveIcon = header.textContent == event.detail.value.curr_sort_string;\n if (!haveIcon) {\n header.sorting_ct = 0;\n }\n }\n }\n\n public render(): TemplateResult {\n return html`\n <div part=\"row-container\" class=\"row-container\">\n <div\n part=\"nile-row\"\n class=\"row ${this.expandable ? 'expandable' : ''} ${this.expanded ? 'expanded' : ''}\"\n @nile-click-sort=\"${this.handleSortingAlter}\"\n >\n ${this.expandable\n ? html`\n <slot name=\"expandableIcon\">\n <nile-icon\n class=\"expand-icon\"\n name=\"${this.expanded ? 'chevron-up' : 'chevron-down'}\"\n @click=${this.toggleExpand}\n role=\"button\"\n size=\"10\"\n aria-label=\"${this.expanded ? 'Collapse row' : 'Expand row'}\">\n </nile-icon> </slot>`\n : null}\n <slot></slot>\n </div>\n\n ${this.expandable && this.expanded\n ? html`\n <div class=\"expanded-content\">\n <slot name=\"expanded\"></slot>\n </div>`\n : null}\n </div>\n `;\n }\n /* #endregion */\n}\nexport default NileTableRow;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-table-row': NileTableRow;\n }\n}\n"]}
@@ -0,0 +1 @@
1
+ export { NileTableRowExpandable } from './nile-table-row-expandable';
@@ -0,0 +1,2 @@
1
+ export { NileTableRowExpandable } from './nile-table-row-expandable';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/nile-table-row-expandable/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC","sourcesContent":["export { NileTableRowExpandable } from './nile-table-row-expandable';"]}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Copyright Aquera Inc 2023
3
+ *
4
+ * This source code is licensed under the BSD-3-Clause license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ /**
8
+ * TableRowExpandable CSS
9
+ */
10
+ export declare const styles: import("lit").CSSResult;
11
+ declare const _default: import("lit").CSSResult[];
12
+ export default _default;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Copyright Aquera Inc 2023
3
+ *
4
+ * This source code is licensed under the BSD-3-Clause license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ import { css } from 'lit';
8
+ /**
9
+ * TableRowExpandable CSS
10
+ */
11
+ export const styles = css `
12
+ :host {
13
+
14
+ }
15
+ `;
16
+ export default [styles];
17
+ //# sourceMappingURL=nile-table-row-expandable.css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nile-table-row-expandable.css.js","sourceRoot":"","sources":["../../../src/nile-table-row-expandable/nile-table-row-expandable.css.ts"],"names":[],"mappings":"AAAA;;;;;EAKE;AAEF,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;CAIxB,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';\n\n/**\n * TableRowExpandable CSS\n */\nexport const styles = css`\n\t:host {\n\n\t}\n`;\n\nexport default [styles];"]}
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Copyright Aquera Inc 2023
3
+ *
4
+ * This source code is licensed under the BSD-3-Clause license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ import { CSSResultArray, TemplateResult } from 'lit';
8
+ import NileElement from '../internal/nile-element';
9
+ /**
10
+ * Nile table-row-expandable component.
11
+ *
12
+ * @tag nile-table-row-expandable
13
+ *
14
+ */
15
+ export declare class NileTableRowExpandable extends NileElement {
16
+ /**
17
+ * The styles for nile-table-row-expandable
18
+ * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`
19
+ */
20
+ static get styles(): CSSResultArray;
21
+ expandable: boolean;
22
+ expanded: boolean;
23
+ private _expandedSlot;
24
+ private toggleExpand;
25
+ private handleSortingAlter;
26
+ /**
27
+ * Render method
28
+ * @slot This is a slot test
29
+ */
30
+ render(): TemplateResult;
31
+ }
32
+ export default NileTableRowExpandable;
33
+ declare global {
34
+ interface HTMLElementTagNameMap {
35
+ 'nile-table-row-expandable': NileTableRowExpandable;
36
+ }
37
+ }
@@ -0,0 +1,103 @@
1
+ /**
2
+ * Copyright Aquera Inc 2023
3
+ *
4
+ * This source code is licensed under the BSD-3-Clause license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ import { __decorate } from "tslib";
8
+ import { html } from 'lit';
9
+ import { customElement, property, query } from 'lit/decorators.js';
10
+ import { styles } from './nile-table-row-expandable.css';
11
+ import NileElement from '../internal/nile-element';
12
+ /**
13
+ * Nile table-row-expandable component.
14
+ *
15
+ * @tag nile-table-row-expandable
16
+ *
17
+ */
18
+ let NileTableRowExpandable = class NileTableRowExpandable extends NileElement {
19
+ constructor() {
20
+ super(...arguments);
21
+ this.expandable = false;
22
+ this.expanded = false;
23
+ /* #endregion */
24
+ }
25
+ /**
26
+ * The styles for nile-table-row-expandable
27
+ * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`
28
+ */
29
+ static get styles() {
30
+ return [styles];
31
+ }
32
+ toggleExpand(e) {
33
+ this.expanded = !this.expanded;
34
+ this.dispatchEvent(new CustomEvent('nile-change', {
35
+ detail: { expanded: this.expanded },
36
+ bubbles: true,
37
+ composed: true,
38
+ }));
39
+ }
40
+ handleSortingAlter(event) {
41
+ const header_items = [
42
+ ...this.querySelectorAll('nile-table-header-item'),
43
+ ];
44
+ for (let i = 0; i < header_items.length; i++) {
45
+ const header = header_items[i];
46
+ const haveIcon = header.textContent == event.detail.value.curr_sort_string;
47
+ if (!haveIcon) {
48
+ header.sorting_ct = 0;
49
+ }
50
+ }
51
+ }
52
+ /**
53
+ * Render method
54
+ * @slot This is a slot test
55
+ */
56
+ render() {
57
+ return html `
58
+ <div part="row-container" class="row-container">
59
+ <div
60
+ part="nile-row"
61
+ class="row ${this.expandable ? 'expandable' : ''} ${this.expanded ? 'expanded' : ''}"
62
+ @nile-click-sort="${this.handleSortingAlter}"
63
+ >
64
+ ${this.expandable
65
+ ? html `
66
+ <slot name="expandableIcon">
67
+ <nile-icon
68
+ class="expand-icon"
69
+ name="${this.expanded ? 'chevron-up' : 'chevron-down'}"
70
+ @click=${this.toggleExpand}
71
+ role="button"
72
+ size="10"
73
+ aria-label="${this.expanded ? 'Collapse row' : 'Expand row'}">
74
+ </nile-icon> </slot>`
75
+ : null}
76
+ <slot></slot>
77
+ </div>
78
+
79
+ ${this.expandable && this.expanded
80
+ ? html `
81
+ <div class="expanded-content">
82
+ <slot name="expanded"></slot>
83
+ </div>`
84
+ : null}
85
+ </div>
86
+ `;
87
+ }
88
+ };
89
+ __decorate([
90
+ property({ type: Boolean, reflect: true })
91
+ ], NileTableRowExpandable.prototype, "expandable", void 0);
92
+ __decorate([
93
+ property({ type: Boolean, reflect: true })
94
+ ], NileTableRowExpandable.prototype, "expanded", void 0);
95
+ __decorate([
96
+ query('slot[name="expanded"]')
97
+ ], NileTableRowExpandable.prototype, "_expandedSlot", void 0);
98
+ NileTableRowExpandable = __decorate([
99
+ customElement('nile-table-row-expandable')
100
+ ], NileTableRowExpandable);
101
+ export { NileTableRowExpandable };
102
+ export default NileTableRowExpandable;
103
+ //# sourceMappingURL=nile-table-row-expandable.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nile-table-row-expandable.js","sourceRoot":"","sources":["../../../src/nile-table-row-expandable/nile-table-row-expandable.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAa,IAAI,EAAiC,MAAM,KAAK,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAC,MAAM,mBAAmB,CAAC;AAClE,OAAO,EAAC,MAAM,EAAC,MAAM,iCAAiC,CAAC;AACvD,OAAO,WAAW,MAAM,0BAA0B,CAAC;AAGnD;;;;;GAKG;AAEI,IAAM,sBAAsB,GAA5B,MAAM,sBAAuB,SAAQ,WAAW;IAAhD;;QAUsC,eAAU,GAAG,KAAK,CAAC;QACnB,aAAQ,GAAG,KAAK,CAAC;QAiE7D,gBAAgB;IACjB,CAAC;IA3EA;;;OAGG;IACI,MAAM,KAAK,MAAM;QACvB,OAAO,CAAC,MAAM,CAAC,CAAC;IACjB,CAAC;IAQO,YAAY,CAAC,CAAa;QACjC,IAAI,CAAC,QAAQ,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC;QAC/B,IAAI,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,aAAa,EAAE;YACjD,MAAM,EAAE,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE;YACnC,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,IAAI;SACd,CAAC,CAAC,CAAC;IACL,CAAC;IAGO,kBAAkB,CAAC,KAAkB;QAC5C,MAAM,YAAY,GAAQ;YACzB,GAAG,IAAI,CAAC,gBAAgB,CAAC,wBAAwB,CAAC;SAClD,CAAC;QACF,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,YAAY,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YAC9C,MAAM,MAAM,GAAG,YAAY,CAAC,CAAC,CAAC,CAAC;YAC/B,MAAM,QAAQ,GAAG,MAAM,CAAC,WAAW,IAAI,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,gBAAgB,CAAC;YAC3E,IAAI,CAAC,QAAQ,EAAE,CAAC;gBACf,MAAM,CAAC,UAAU,GAAG,CAAC,CAAC;YACvB,CAAC;QACF,CAAC;IACF,CAAC;IAED;;;OAGG;IACI,MAAM;QACZ,OAAO,IAAI,CAAA;;;;kBAIK,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE;yBAC/D,IAAI,CAAC,kBAAkB;;OAEzC,IAAI,CAAC,UAAU;YACnB,CAAC,CAAC,IAAI,CAAA;;;;iBAIQ,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,cAAc;iBAC7C,IAAI,CAAC,YAAY;;;sBAGZ,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,YAAY;4BACvC;YACzB,CAAC,CAAC,IAAI;;;;MAIH,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,QAAQ;YACnC,CAAC,CAAC,IAAI,CAAA;;;cAGK;YACX,CAAC,CAAC,IAAI;;GAEN,CAAC;IACH,CAAC;CAGD,CAAA;AAnE4C;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;0DAAoB;AACnB;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;wDAAkB;AAGrD;IADP,KAAK,CAAC,uBAAuB,CAAC;6DACS;AAd5B,sBAAsB;IADlC,aAAa,CAAC,2BAA2B,CAAC;GAC9B,sBAAsB,CA6ElC;;AAED,eAAe,sBAAsB,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, CSSResultArray, TemplateResult} from 'lit';\nimport { customElement, property, query} from 'lit/decorators.js';\nimport {styles} from './nile-table-row-expandable.css';\nimport NileElement from '../internal/nile-element';\n\n\n/**\n * Nile table-row-expandable component.\n *\n * @tag nile-table-row-expandable\n *\n */\n@customElement('nile-table-row-expandable')\nexport class NileTableRowExpandable extends NileElement {\n\n\t/**\n\t * The styles for nile-table-row-expandable\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@property({ type: Boolean, reflect: true }) expandable = false;\n\t@property({ type: Boolean, reflect: true }) expanded = false;\n\n\t@query('slot[name=\"expanded\"]')\n\tprivate _expandedSlot!: HTMLSlotElement;\n\n\tprivate toggleExpand(e: MouseEvent): void {\n\t\tthis.expanded = !this.expanded;\n\t\tthis.dispatchEvent(new CustomEvent('nile-change', {\n\t\t\tdetail: { expanded: this.expanded },\n\t\t\tbubbles: true,\n\t\t\tcomposed: true,\n\t\t}));\n\t}\n\n\n\tprivate handleSortingAlter(event: CustomEvent) {\n\t\tconst header_items: any = [\n\t\t\t...this.querySelectorAll('nile-table-header-item'),\n\t\t];\n\t\tfor (let i = 0; i < header_items.length; i++) {\n\t\t\tconst header = header_items[i];\n\t\t\tconst haveIcon = header.textContent == event.detail.value.curr_sort_string;\n\t\t\tif (!haveIcon) {\n\t\t\t\theader.sorting_ct = 0;\n\t\t\t}\n\t\t}\n\t}\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\t\t\t<div part=\"row-container\" class=\"row-container\">\n\t\t\t\t<div\n\t\t\t\t\tpart=\"nile-row\"\n\t\t\t\t\tclass=\"row ${this.expandable ? 'expandable' : ''} ${this.expanded ? 'expanded' : ''}\"\n\t\t\t\t\t@nile-click-sort=\"${this.handleSortingAlter}\"\n\t\t\t\t>\n\t\t\t\t\t${this.expandable\n\t\t\t? html`\n\t\t\t\t\t\t<slot name=\"expandableIcon\">\n\t\t\t\t\t\t\t<nile-icon\n\t\t\t\t\t\t\t\tclass=\"expand-icon\"\n\t\t\t\t\t\t\t\t\tname=\"${this.expanded ? 'chevron-up' : 'chevron-down'}\"\n\t\t\t\t\t\t\t\t@click=${this.toggleExpand}\n\t\t\t\t\t\t\t\trole=\"button\"\n\t\t\t\t\t\t\t\tsize=\"10\"\n\t\t\t\t\t\t\t\taria-label=\"${this.expanded ? 'Collapse row' : 'Expand row'}\">\n\t\t\t\t\t\t\t</nile-icon> </slot>`\n\t\t\t: null}\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</div>\n\n\t\t\t\t${this.expandable && this.expanded\n\t\t\t? html`\n\t\t\t\t\t\t\t<div class=\"expanded-content\">\n\t\t\t\t\t\t\t\t<slot name=\"expanded\"></slot>\n\t\t\t\t\t\t\t</div>`\n\t\t\t: null}\n\t\t\t</div>\n\t\t`;\n\t}\n\n\t/* #endregion */\n}\n\nexport default NileTableRowExpandable;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-table-row-expandable': NileTableRowExpandable;\n }\n}"]}