@omegagrid/grid 0.10.0 → 0.10.2

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 (257) hide show
  1. package/package.json +7 -7
  2. package/dist/commands/editingCommands.d.ts +0 -4
  3. package/dist/commands/editingCommands.d.ts.map +0 -1
  4. package/dist/commands/editingCommands.js +0 -74
  5. package/dist/commands/editingCommands.js.map +0 -1
  6. package/dist/commands/groupCommands.d.ts +0 -8
  7. package/dist/commands/groupCommands.d.ts.map +0 -1
  8. package/dist/commands/groupCommands.js +0 -7
  9. package/dist/commands/groupCommands.js.map +0 -1
  10. package/dist/commands/index.d.ts +0 -4
  11. package/dist/commands/index.d.ts.map +0 -1
  12. package/dist/commands/index.js +0 -9
  13. package/dist/commands/index.js.map +0 -1
  14. package/dist/commands/navigationCommands.d.ts +0 -5
  15. package/dist/commands/navigationCommands.d.ts.map +0 -1
  16. package/dist/commands/navigationCommands.js +0 -117
  17. package/dist/commands/navigationCommands.js.map +0 -1
  18. package/dist/constants.d.ts +0 -65
  19. package/dist/constants.d.ts.map +0 -1
  20. package/dist/constants.js +0 -8
  21. package/dist/constants.js.map +0 -1
  22. package/dist/editors/baseEditor.d.ts +0 -31
  23. package/dist/editors/baseEditor.d.ts.map +0 -1
  24. package/dist/editors/baseEditor.js +0 -112
  25. package/dist/editors/baseEditor.js.map +0 -1
  26. package/dist/editors/calendarEditor.d.ts +0 -12
  27. package/dist/editors/calendarEditor.d.ts.map +0 -1
  28. package/dist/editors/calendarEditor.js +0 -74
  29. package/dist/editors/calendarEditor.js.map +0 -1
  30. package/dist/editors/checkboxEditor.d.ts +0 -9
  31. package/dist/editors/checkboxEditor.d.ts.map +0 -1
  32. package/dist/editors/checkboxEditor.js +0 -32
  33. package/dist/editors/checkboxEditor.js.map +0 -1
  34. package/dist/editors/dateEditor.d.ts +0 -8
  35. package/dist/editors/dateEditor.d.ts.map +0 -1
  36. package/dist/editors/dateEditor.js +0 -37
  37. package/dist/editors/dateEditor.js.map +0 -1
  38. package/dist/editors/dropdownEditor.d.ts +0 -26
  39. package/dist/editors/dropdownEditor.d.ts.map +0 -1
  40. package/dist/editors/dropdownEditor.js +0 -142
  41. package/dist/editors/dropdownEditor.js.map +0 -1
  42. package/dist/editors/formulaEditor.d.ts +0 -21
  43. package/dist/editors/formulaEditor.d.ts.map +0 -1
  44. package/dist/editors/formulaEditor.js +0 -109
  45. package/dist/editors/formulaEditor.js.map +0 -1
  46. package/dist/editors/index.d.ts +0 -8
  47. package/dist/editors/index.d.ts.map +0 -1
  48. package/dist/editors/index.js +0 -19
  49. package/dist/editors/index.js.map +0 -1
  50. package/dist/editors/numberEditor.d.ts +0 -9
  51. package/dist/editors/numberEditor.d.ts.map +0 -1
  52. package/dist/editors/numberEditor.js +0 -37
  53. package/dist/editors/numberEditor.js.map +0 -1
  54. package/dist/editors/textEditor.d.ts +0 -15
  55. package/dist/editors/textEditor.d.ts.map +0 -1
  56. package/dist/editors/textEditor.js +0 -74
  57. package/dist/editors/textEditor.js.map +0 -1
  58. package/dist/filters/NumberFilter.d.ts +0 -8
  59. package/dist/filters/NumberFilter.d.ts.map +0 -1
  60. package/dist/filters/NumberFilter.js +0 -13
  61. package/dist/filters/NumberFilter.js.map +0 -1
  62. package/dist/filters/baseFilter.d.ts +0 -20
  63. package/dist/filters/baseFilter.d.ts.map +0 -1
  64. package/dist/filters/baseFilter.js +0 -47
  65. package/dist/filters/baseFilter.js.map +0 -1
  66. package/dist/filters/checkboxFilter.d.ts +0 -12
  67. package/dist/filters/checkboxFilter.d.ts.map +0 -1
  68. package/dist/filters/checkboxFilter.js +0 -67
  69. package/dist/filters/checkboxFilter.js.map +0 -1
  70. package/dist/filters/dropdownFilter.d.ts +0 -17
  71. package/dist/filters/dropdownFilter.d.ts.map +0 -1
  72. package/dist/filters/dropdownFilter.js +0 -116
  73. package/dist/filters/dropdownFilter.js.map +0 -1
  74. package/dist/filters/filterFactory.d.ts +0 -4
  75. package/dist/filters/filterFactory.d.ts.map +0 -1
  76. package/dist/filters/filterFactory.js +0 -39
  77. package/dist/filters/filterFactory.js.map +0 -1
  78. package/dist/filters/index.d.ts +0 -5
  79. package/dist/filters/index.d.ts.map +0 -1
  80. package/dist/filters/index.js +0 -5
  81. package/dist/filters/index.js.map +0 -1
  82. package/dist/filters/textFilter.d.ts +0 -17
  83. package/dist/filters/textFilter.d.ts.map +0 -1
  84. package/dist/filters/textFilter.js +0 -89
  85. package/dist/filters/textFilter.js.map +0 -1
  86. package/dist/gridAdapter.d.ts +0 -30
  87. package/dist/gridAdapter.d.ts.map +0 -1
  88. package/dist/gridAdapter.js +0 -11
  89. package/dist/gridAdapter.js.map +0 -1
  90. package/dist/i18n/en-us.d.ts +0 -4
  91. package/dist/i18n/en-us.d.ts.map +0 -1
  92. package/dist/i18n/en-us.js +0 -5
  93. package/dist/i18n/en-us.js.map +0 -1
  94. package/dist/i18n/index.d.ts +0 -5
  95. package/dist/i18n/index.d.ts.map +0 -1
  96. package/dist/i18n/index.js +0 -8
  97. package/dist/i18n/index.js.map +0 -1
  98. package/dist/index.d.ts +0 -7
  99. package/dist/index.d.ts.map +0 -1
  100. package/dist/index.js +0 -7
  101. package/dist/index.js.map +0 -1
  102. package/dist/renderers/ActionRenderer.d.ts +0 -3
  103. package/dist/renderers/ActionRenderer.d.ts.map +0 -1
  104. package/dist/renderers/ActionRenderer.js +0 -68
  105. package/dist/renderers/ActionRenderer.js.map +0 -1
  106. package/dist/renderers/BaseRenderer.d.ts +0 -6
  107. package/dist/renderers/BaseRenderer.d.ts.map +0 -1
  108. package/dist/renderers/BaseRenderer.js +0 -56
  109. package/dist/renderers/BaseRenderer.js.map +0 -1
  110. package/dist/renderers/CheckboxRenderer.d.ts +0 -4
  111. package/dist/renderers/CheckboxRenderer.d.ts.map +0 -1
  112. package/dist/renderers/CheckboxRenderer.js +0 -22
  113. package/dist/renderers/CheckboxRenderer.js.map +0 -1
  114. package/dist/renderers/DateTimeRenderer.d.ts +0 -4
  115. package/dist/renderers/DateTimeRenderer.d.ts.map +0 -1
  116. package/dist/renderers/DateTimeRenderer.js +0 -21
  117. package/dist/renderers/DateTimeRenderer.js.map +0 -1
  118. package/dist/renderers/DropdownRenderer.d.ts +0 -4
  119. package/dist/renderers/DropdownRenderer.d.ts.map +0 -1
  120. package/dist/renderers/DropdownRenderer.js +0 -18
  121. package/dist/renderers/DropdownRenderer.js.map +0 -1
  122. package/dist/renderers/GeneralRenderer.d.ts +0 -4
  123. package/dist/renderers/GeneralRenderer.d.ts.map +0 -1
  124. package/dist/renderers/GeneralRenderer.js +0 -12
  125. package/dist/renderers/GeneralRenderer.js.map +0 -1
  126. package/dist/renderers/HtmlRenderer.d.ts +0 -4
  127. package/dist/renderers/HtmlRenderer.d.ts.map +0 -1
  128. package/dist/renderers/HtmlRenderer.js +0 -6
  129. package/dist/renderers/HtmlRenderer.js.map +0 -1
  130. package/dist/renderers/NumberRenderer.d.ts +0 -4
  131. package/dist/renderers/NumberRenderer.d.ts.map +0 -1
  132. package/dist/renderers/NumberRenderer.js +0 -14
  133. package/dist/renderers/NumberRenderer.js.map +0 -1
  134. package/dist/renderers/SparklineRenderer.d.ts +0 -3
  135. package/dist/renderers/SparklineRenderer.d.ts.map +0 -1
  136. package/dist/renderers/SparklineRenderer.js +0 -8
  137. package/dist/renderers/SparklineRenderer.js.map +0 -1
  138. package/dist/renderers/TextRenderer.d.ts +0 -4
  139. package/dist/renderers/TextRenderer.d.ts.map +0 -1
  140. package/dist/renderers/TextRenderer.js +0 -38
  141. package/dist/renderers/TextRenderer.js.map +0 -1
  142. package/dist/renderers/index.d.ts +0 -12
  143. package/dist/renderers/index.d.ts.map +0 -1
  144. package/dist/renderers/index.js +0 -32
  145. package/dist/renderers/index.js.map +0 -1
  146. package/dist/types.d.ts +0 -10
  147. package/dist/types.d.ts.map +0 -1
  148. package/dist/types.js +0 -2
  149. package/dist/types.js.map +0 -1
  150. package/dist/ui/comment.d.ts +0 -59
  151. package/dist/ui/comment.d.ts.map +0 -1
  152. package/dist/ui/comment.js +0 -284
  153. package/dist/ui/comment.js.map +0 -1
  154. package/dist/ui/comment.style.d.ts +0 -2
  155. package/dist/ui/comment.style.d.ts.map +0 -1
  156. package/dist/ui/comment.style.js +0 -108
  157. package/dist/ui/comment.style.js.map +0 -1
  158. package/dist/ui/elementCache.d.ts +0 -15
  159. package/dist/ui/elementCache.d.ts.map +0 -1
  160. package/dist/ui/elementCache.js +0 -57
  161. package/dist/ui/elementCache.js.map +0 -1
  162. package/dist/ui/filterLabel.d.ts +0 -10
  163. package/dist/ui/filterLabel.d.ts.map +0 -1
  164. package/dist/ui/filterLabel.js +0 -76
  165. package/dist/ui/filterLabel.js.map +0 -1
  166. package/dist/ui/formulaInput.d.ts +0 -56
  167. package/dist/ui/formulaInput.d.ts.map +0 -1
  168. package/dist/ui/formulaInput.js +0 -251
  169. package/dist/ui/formulaInput.js.map +0 -1
  170. package/dist/ui/formulaInput.style.d.ts +0 -2
  171. package/dist/ui/formulaInput.style.d.ts.map +0 -1
  172. package/dist/ui/formulaInput.style.js +0 -65
  173. package/dist/ui/formulaInput.style.js.map +0 -1
  174. package/dist/ui/grid.d.ts +0 -91
  175. package/dist/ui/grid.d.ts.map +0 -1
  176. package/dist/ui/grid.editing.d.ts +0 -61
  177. package/dist/ui/grid.editing.d.ts.map +0 -1
  178. package/dist/ui/grid.editing.js +0 -439
  179. package/dist/ui/grid.editing.js.map +0 -1
  180. package/dist/ui/grid.events.d.ts +0 -97
  181. package/dist/ui/grid.events.d.ts.map +0 -1
  182. package/dist/ui/grid.events.js +0 -581
  183. package/dist/ui/grid.events.js.map +0 -1
  184. package/dist/ui/grid.filtering.d.ts +0 -23
  185. package/dist/ui/grid.filtering.d.ts.map +0 -1
  186. package/dist/ui/grid.filtering.js +0 -68
  187. package/dist/ui/grid.filtering.js.map +0 -1
  188. package/dist/ui/grid.js +0 -297
  189. package/dist/ui/grid.js.map +0 -1
  190. package/dist/ui/grid.menu.d.ts +0 -43
  191. package/dist/ui/grid.menu.d.ts.map +0 -1
  192. package/dist/ui/grid.menu.js +0 -168
  193. package/dist/ui/grid.menu.js.map +0 -1
  194. package/dist/ui/grid.objects.d.ts +0 -24
  195. package/dist/ui/grid.objects.d.ts.map +0 -1
  196. package/dist/ui/grid.objects.js +0 -69
  197. package/dist/ui/grid.objects.js.map +0 -1
  198. package/dist/ui/grid.rendering.d.ts +0 -84
  199. package/dist/ui/grid.rendering.d.ts.map +0 -1
  200. package/dist/ui/grid.rendering.js +0 -471
  201. package/dist/ui/grid.rendering.js.map +0 -1
  202. package/dist/ui/grid.selecting.d.ts +0 -99
  203. package/dist/ui/grid.selecting.d.ts.map +0 -1
  204. package/dist/ui/grid.selecting.js +0 -319
  205. package/dist/ui/grid.selecting.js.map +0 -1
  206. package/dist/ui/grid.sorting.d.ts +0 -23
  207. package/dist/ui/grid.sorting.d.ts.map +0 -1
  208. package/dist/ui/grid.sorting.js +0 -47
  209. package/dist/ui/grid.sorting.js.map +0 -1
  210. package/dist/ui/grid.style.d.ts +0 -2
  211. package/dist/ui/grid.style.d.ts.map +0 -1
  212. package/dist/ui/grid.style.js +0 -39
  213. package/dist/ui/grid.style.js.map +0 -1
  214. package/dist/ui/group.d.ts +0 -71
  215. package/dist/ui/group.d.ts.map +0 -1
  216. package/dist/ui/group.js +0 -312
  217. package/dist/ui/group.js.map +0 -1
  218. package/dist/ui/index.d.ts +0 -19
  219. package/dist/ui/index.d.ts.map +0 -1
  220. package/dist/ui/index.js +0 -19
  221. package/dist/ui/index.js.map +0 -1
  222. package/dist/ui/objectHost.d.ts +0 -30
  223. package/dist/ui/objectHost.d.ts.map +0 -1
  224. package/dist/ui/objectHost.js +0 -114
  225. package/dist/ui/objectHost.js.map +0 -1
  226. package/dist/ui/objectHost.style.d.ts +0 -2
  227. package/dist/ui/objectHost.style.d.ts.map +0 -1
  228. package/dist/ui/objectHost.style.js +0 -43
  229. package/dist/ui/objectHost.style.js.map +0 -1
  230. package/dist/ui/selector.d.ts +0 -97
  231. package/dist/ui/selector.d.ts.map +0 -1
  232. package/dist/ui/selector.js +0 -489
  233. package/dist/ui/selector.js.map +0 -1
  234. package/dist/ui/selector.style.d.ts +0 -2
  235. package/dist/ui/selector.style.d.ts.map +0 -1
  236. package/dist/ui/selector.style.js +0 -106
  237. package/dist/ui/selector.style.js.map +0 -1
  238. package/dist/ui/sortingArrow.d.ts +0 -8
  239. package/dist/ui/sortingArrow.d.ts.map +0 -1
  240. package/dist/ui/sortingArrow.js +0 -42
  241. package/dist/ui/sortingArrow.js.map +0 -1
  242. package/dist/ui/sparkline.d.ts +0 -14
  243. package/dist/ui/sparkline.d.ts.map +0 -1
  244. package/dist/ui/sparkline.js +0 -111
  245. package/dist/ui/sparkline.js.map +0 -1
  246. package/dist/ui/table.d.ts +0 -122
  247. package/dist/ui/table.d.ts.map +0 -1
  248. package/dist/ui/table.js +0 -1063
  249. package/dist/ui/table.js.map +0 -1
  250. package/dist/ui/table.styles.d.ts +0 -2
  251. package/dist/ui/table.styles.d.ts.map +0 -1
  252. package/dist/ui/table.styles.js +0 -249
  253. package/dist/ui/table.styles.js.map +0 -1
  254. package/dist/ui/tooltip.d.ts +0 -9
  255. package/dist/ui/tooltip.d.ts.map +0 -1
  256. package/dist/ui/tooltip.js +0 -32
  257. package/dist/ui/tooltip.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"selector.js","sourceRoot":"","sources":["../../src/ui/selector.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,SAAS,MAAM,cAAc,CAAC;AACrC,OAAO,EAAqD,GAAG,EAAE,MAAM,iBAAiB,CAAC;AACzF,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAEnE,OAAO,EAAE,KAAK,EAAE,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AC;QAC9E,CAAC;IACF,CAAC;;AAzgBM,eAAM,GAAG,CAAC,KAAK,CAAC,AAAV,CAAW;AAwCxB;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAC,CAAC;0CACR;AAGlB;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;yCACxB;AAGjB;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;2CACtB;AAGnB;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;6CACrB;AAGpB;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;uCACX;AAGd;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;6CAC6B;AAGtD;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;0CACxB;AAGjB;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;2CACJ;AAGrB;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;iDACE;AAG3B;IADC,KAAK,CAAC,SAAS,CAAC;2CACS;AAG1B;IADC,KAAK,CAAC,eAAe,CAAC;8CACE;AAGzB;IADC,KAAK,CAAC,cAAc,CAAC;mDACY;AAGlC;IADC,KAAK,CAAC,aAAa,CAAC;kDACY;AAGjC;IADC,KAAK,CAAC,eAAe,CAAC;oDACY;AAGnC;IADC,KAAK,CAAC,gBAAgB,CAAC;qDACY;AAGpC;IADC,KAAK,CAAC,cAAc,CAAC;gDACS;AAvFnB,QAAQ;IADpB,aAAa,CAAC,aAAa,CAAC;GAChB,QAAQ,CA6gBpB","sourcesContent":["import constants from '../constants';\nimport { DiagonalDirection, Direction, DirectionalPosition, dom } from \"@omegagrid/core\";\nimport { CellRange } from \"@omegagrid/grid-core\";\nimport { LitElement, html } from 'lit';\nimport { customElement, property, query } from 'lit/decorators.js';\nimport { TableCell } from \"./table\";\nimport { style } from './selector.style';\nimport { Grid } from './grid';\nimport { styleMap } from 'lit/directives/style-map.js';\nimport { GridEvent } from './grid.events';\n\nexport class SelectorEvent extends GridEvent {\n\n\tselector: Selector;\n\n\tconstructor(type: string, args?: Partial<SelectorEvent>) {\n\t\tsuper(`selector.${type}`, args);\n\t}\n}\n\nexport class SelectorMoveEvent extends SelectorEvent {\n\tfromRange: CellRange;\n\ttoRange: CellRange;\n\tconstructor(args?: Partial<SelectorMoveEvent>) {\n\t\tsuper('move', args);\n\t}\n}\n\n@customElement('og-selector')\nexport class Selector extends LitElement {\n\n\tstatic styles = [style];\n\n\tprivate topLeftCell?: TableCell;\n\tprivate topRightCell?: TableCell;\n\tprivate bottomLeftCell?: TableCell;\n\tprivate bottomRightCell?: TableCell;\n\tprivate activeCell?: TableCell;\n\tprivate autofillSelector: HTMLDivElement;\n\tprivate moveSelector: Selector;\n\tprivate baseCell: CellRange;\n\n\tprivate _animationTimer: number = null;\n\n\tprivate _autofillDirection: Direction;\n\tget autofillDirection() { return this._autofillDirection }\n\t\n\tprivate _autofillRange: CellRange;\n\tget autofillRange() { return this._autofillRange }\n\n\tprivate _autofilling = false;\n\tget isAutofilling() { return this._autofilling }\n\n\tprivate _moving = false;\n\tget isMoving() { return this._moving }\n\n\tprivate _resizing = false;\n\tprivate _resizingDirection: DiagonalDirection;\n\tget isResizing() { return this._resizing }\n\n\tprivate _selecting = false;\n\tget isSelecting() { return this._selecting }\n\n\tget isSelectorOperationActive() { return this._resizing || this._moving || this._autofilling || this._selecting}\n\n\tget table() { return this.grid?.table }\n\n\tindex: number;\n\tgrid: Grid;\n\n\t@property({type: Boolean})\n\tautofill: boolean;\n\n\t@property({type: Boolean, reflect: true})\n\tmovable: boolean;\n\n\t@property({type: Boolean, reflect: true})\n\tresizable: boolean;\n\n\t@property({type: Boolean, reflect: true})\n\tsubselector = false;\n\n\t@property({type: String})\n\tcolor: string;\n\n\t@property({type: Number})\n\tborderWidth: number = constants.SELECTOR_BORDER_WIDTH;\n\n\t@property({type: Boolean, reflect: true})\n\tanimated = false;\n\n\t@property({type: Object})\n\tselection: CellRange;\n\n\t@property({type: Object})\n\tactiveCellRange: CellRange;\n\n\t@query('#handle')\n\thandleElm: HTMLDivElement;\n\n\t@query('#svgAnimation')\n\tsvgAnimation: SVGElement;\n\n\t@query('#handle-left')\n\tmoveHandleLeftElm: HTMLDivElement;\n\n\t@query('#handle-top')\n\tmoveHandleTopElm: HTMLDivElement;\n\n\t@query('#handle-right')\n\tmoveHandleRightElm: HTMLDivElement;\n\n\t@query('#handle-bottom')\n\tmoveHandleBottomElm: HTMLDivElement;\n\t\n\t@query('#subselector')\n\tsubselectorElm: HTMLDivElement;\n\n\tprivate _isVisible = false;\n\tget isVisible() { return this._isVisible }\n\n\thide = () => {\n\t\tthis._isVisible = false;\n\t\tdom.hideElement(this);\n\t\tthis.stopSelectorOperations();\n\t\tthis.stopAnimation();\n\t};\n\tshow = () => {\n\t\tthis._isVisible = true;\n\t\tdom.showElement(this);\n\t\tthis.startAnimation();\n\t}\n\n\n\t// #region Autofill\n\n\thighlightAutofillRange() {\n\t\tconst tlCell = this.table.getCellByModelIndex(this._autofillRange.c1, this._autofillRange.r1);\n\t\tconst trCell = this.table.getCellByModelIndex(this._autofillRange.c2, this._autofillRange.r1);\n\t\tconst brCell = this.table.getCellByModelIndex(this._autofillRange.c2, this._autofillRange.r2);\n\t\tconst blCell = this.table.getCellByModelIndex(this._autofillRange.c1, this._autofillRange.r2);\n\n\t\tlet left = -100;\n\t\tlet top = -100;\n\t\tlet right = this.table.offsetWidth + 100;\n\t\tlet bottom = this.table.offsetHeight + 100;\n\n\t\tif (tlCell) {\n\t\t\tconst offset = dom.getElementOffset(tlCell, this.table);\n\t\t\ttop = offset.top;\n\t\t\tleft = offset.left;\n\t\t}\n\t\tif (trCell) {\n\t\t\tconst offset = dom.getElementOffset(trCell, this.table);\n\t\t\ttop = offset.top;\n\t\t\tright = offset.left + brCell.offsetWidth;\n\t\t}\n\t\tif (blCell) {\n\t\t\tconst offset = dom.getElementOffset(blCell, this.table);\n\t\t\tbottom = offset.top + blCell.offsetHeight;\n\t\t\tleft = offset.left;\n\t\t}\n\t\tif (brCell) {\n\t\t\tconst offset = dom.getElementOffset(brCell, this.table);\n\t\t\tbottom = offset.top + brCell.offsetHeight;\n\t\t\tright = offset.left + brCell.offsetWidth;\n\t\t}\n\n\t\tdom.setPosition(this.autofillSelector, {l: left, t: top});\n\t\tdom.setSize(this.autofillSelector, {w: right - left, h: bottom - top});\n\t\tdom.showElement(this.autofillSelector);\n\t}\n\n\tcreateAutofillSelector() {\n\t\tconst selector = dom.createElement<HTMLDivElement>('div');\n\t\tselector.className = 'autofill';\n\t\tselector.style.border = '1px solid var(--og-accent-color)';\n\t\tselector.style.zIndex = '100';\n\t\tselector.style.pointerEvents = 'none';\n\t\treturn selector;\n\t}\n\n\tstopAutofilling(dispatchEvent = true) {\n\t\tif (!this.isAutofilling) return;\n\t\tthis._autofilling = false;\n\t\tif (dispatchEvent) this.dispatchEvent(new SelectorEvent('autofill', {selector: this, grid: this.grid}));\n\t\t//this.autofillRange = null;\n\t\tthis.autofillSelector.remove();\n\t}\n\n\tupdateAutofilling(c: number, r: number) {\n\t\tconst { c1, r1, c2, r2 } = this.selection;\n\t\tthis._autofillRange = null;\n\t\t// down autofill\n\t\tif (r > r2 && c - c2 <= r - r2) {\n\t\t\tthis._autofillDirection = 'down';\n\t\t\tthis._autofillRange = new CellRange(c1, r2 + 1, c2, r);\n\t\t}\n\t\t// up autofill\n\t\telse if (r < r1 && c1 - c <= r1 - r) {\n\t\t\tthis._autofillDirection = 'up';\n\t\t\tthis._autofillRange = new CellRange(c1, r, c2, r1 - 1);\n\t\t}\n\t\t// right autofill\n\t\telse if (c > c2 && c - c2 > r - r2) {\n\t\t\tthis._autofillDirection = 'right';\n\t\t\tthis._autofillRange = new CellRange(c2 + 1, r1, c, r2);\n\t\t}\n\t\t// left autofill\n\t\telse if (c < c1 && c1 - c > r1 - r) {\n\t\t\tthis._autofillDirection = 'left';\n\t\t\tthis._autofillRange = new CellRange(c, r1, c1 - 1, r2);\n\t\t}\n\n\t\tif (this._autofillRange) this.highlightAutofillRange();\n\t}\n\n\t// #endregion\n\n\n\t// #region Selector moving\n\n\tgetMoveSelector() {\n\t\tif (!this.moveSelector) {\n\t\t\tthis.moveSelector = dom.createElement<Selector>('og-selector');\n\t\t\tthis.moveSelector.grid = this.grid;\n\t\t\tthis.moveSelector.style.borderStyle = 'dotted';\n\t\t\tthis.moveSelector.subselector = false;\n\t\t\tthis.moveSelector.selection = this.selection.clone();\n\t\t\tthis.grid.shadowRoot.appendChild(this.moveSelector);\n\t\t}\n\t\treturn this.moveSelector;\n\t}\n\n\tstartMoving(baseCell: CellRange) {\n\t\tthis.baseCell = baseCell;\n\t\tthis._moving = true;\n\t}\n\n\tupdateMoving(c: number, r: number) {\n\t\tc = this.selection.isRow ? 0 : c - this.baseCell.c1;\n\t\tr = this.selection.isColumn ? 0 : r - this.baseCell.r1;\n\t\tconst moveSelector = this.getMoveSelector();\n\t\tmoveSelector.selection.setCoords(\n\t\t\tthis.selection.c1 + c,\n\t\t\tthis.selection.r1 + r,\n\t\t\tthis.selection.c2 + c,\n\t\t\tthis.selection.r2 + r\n\t\t);\n\t\tmoveSelector.select(moveSelector.selection);\n\t\tdom.showElement(this.moveSelector);\n\t}\n\n\tstopMoving(dispatchEvent = true) {\n\t\tif (!this._moving) return;\n\t\tthis._moving = false;\n\t\tdom.hideElement(this.moveSelector);\n\t\tif (this.moveSelector) {\n\t\t\tconst fromRange = this.selection.clone();\n\t\t\tconst toRange = this.moveSelector.selection.clone();\n\t\t\tif (!fromRange.equals(toRange)) {\n\t\t\t\tthis.selection = toRange;\n\t\t\t\tif (dispatchEvent) this.dispatchEvent(new SelectorMoveEvent({fromRange, toRange, selector: this, grid: this.grid}));\n\t\t\t}\n\t\t}\n\t}\n\n\t// #endregion\n\n\n\t// #region Selector resizing\n\n\tstartResizing(direction: DiagonalDirection) {\n\t\tthis._resizing = true;\n\t\tthis._resizingDirection = direction;\n\t}\n\n\tupdateResizing(c: number, r: number) {\n\t\tconst { c1, r1, c2, r2 } = this.selection;\n\t\tconst range = this.selection.clone();\n\t\tswitch (this._resizingDirection) {\n\t\t\tcase 'nw':\n\t\t\t\tif (r <= r2 && c <= c2) {\n\t\t\t\t\trange.r1 = r;\n\t\t\t\t\trange.c1 = c;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'ne':\n\t\t\t\tif (r <= r2 && c >= c1) {\n\t\t\t\t\trange.r1 = r;\n\t\t\t\t\trange.c2 = c;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'sw':\n\t\t\t\tif (r >= r1 && c <= c2) {\n\t\t\t\t\trange.r2 = r;\n\t\t\t\t\trange.c1 = c;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'se':\n\t\t\t\tif (r >= r1 && c >= c1) {\n\t\t\t\t\trange.r2 = r;\n\t\t\t\t\trange.c2 = c;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\tif (!this.selection.equals(range)) {\n\t\t\tthis.selection.r1 = range.r1;\n\t\t\tthis.selection.r2 = range.r2;\n\t\t\tthis.selection.c1 = range.c1;\n\t\t\tthis.selection.c2 = range.c2;\n\t\t\tthis.updatePosition();\n\t\t}\n\t}\n\n\tstopResizing(dispatchEvent = true) {\n\t\tif (!this._resizing) return;\n\t\tthis._resizing = false;\n\t\tif (dispatchEvent) this.dispatchEvent(new SelectorEvent('resize', {selector: this, grid: this.grid}));\n\t}\n\n\t// #endregion\n\n\n\t// #region Selecting\n\n\tstartSelecting(baseCell: CellRange) {\n\t\tthis.baseCell = baseCell;\n\t\tthis._selecting = true;\n\t\tthis.select(baseCell);\n\t}\n\n\tselect(selection: CellRange, dispatchEvent = true) {\n\t\tthis.selection = selection.clone();\n\t\tif (dispatchEvent) this.dispatchEvent(new SelectorEvent('select', {selector: this, grid: this.grid}));\n\t}\n\n\tstopSelecting(_dispatchEvent = true) {\n\t\tthis._selecting = false;\n\t\tthis.baseCell = null;\n\t}\n\n\t// #endregion\n\n\t/**\n\t * Updates selector state after table moving events\n\t * @param c column index\n\t * @param r row index\n\t */\n\tupdateMovingOperations(c: number, r: number) {\n\t\tif (this.isAutofilling) this.updateAutofilling(c, r);\n\t\tif (this.isMoving) this.updateMoving(c, r);\n\t\tif (this.isResizing) this.updateResizing(c, r);\n\t}\n\n\tstopSelectorOperations(dispatchEvent = true) {\n\t\tthis.stopAutofilling(dispatchEvent);\n\t\tthis.stopMoving(dispatchEvent);\n\t\tthis.stopResizing(dispatchEvent);\n\t\tthis.stopSelecting(dispatchEvent);\n\t}\n\n\t_onMoveHandleMouseDown = (e: PointerEvent, _side: DirectionalPosition) => {\n\t\tconst x = e.offsetX + (e.target as HTMLElement).offsetLeft + this.offsetLeft - this.table.totalHeaderWidth;\n\t\tconst y = e.offsetY + (e.target as HTMLElement).offsetTop + this.offsetTop - this.table.thead.clientHeight;\n\t\tlet i = -1, h = 0, w = 0;\n\t\twhile (h < y && this.table.bRows[++i]) {\n\t\t\th += this.table.bRows[i].clientHeight;\n\t\t}\n\t\tconst row = this.table.bRows[i];\n\t\tif (row) {\n\t\t\ti = -1;\n\t\t\twhile (w < x && row.children[++i]) {\n\t\t\t\tw += row.children[i].tagName == 'TD' ? row.children[i].clientWidth : 0;\n\t\t\t}\n\t\t\tconst cell = row.children[Math.max(i, 0)] as TableCell;\n\t\t\tconst { r, c } = cell;\n\t\t\tthis.startMoving(new CellRange(c, r));\n\t\t}\n\t};\n\n\t_onResizeHandleMouseDown = (e: PointerEvent, direction: DiagonalDirection) => {\n\t\te.stopImmediatePropagation();\n\t\tthis.startResizing(direction);\n\t}\n\n\t_onHandleMouseUp = (e: PointerEvent) => {\n\t\tif (e.button != 0) return;\n\t\tthis.stopMoving();\n\t\tthis.stopResizing();\n\t}\n\n\t_onHandleMouseDown = () => {\n\t\tthis._autofilling = true;\n\t\tthis.autofillSelector = this.autofillSelector ?? this.createAutofillSelector();\n\t\tdom.hideElement(this.autofillSelector);\n\t\tdom.appendElement(this.grid.shadowRoot, this.autofillSelector);\n\t}\n\n\trender = () => html`\n\t\t${this.subselector ? html`<div id=\"subselector\"></div>` : ''}\n\t\t${this.resizable ? html`\n\t\t\t<div id=\"handle-nw\" class=\"handle-resize\" style=\"${styleMap({backgroundColor: this.color})}\" \n\t\t\t\t@pointerdown=\"${(e: PointerEvent) => this._onResizeHandleMouseDown(e, 'nw')}\"\n\t\t\t\t@pointerup=\"${this._onHandleMouseUp}\"></div>\n\t\t\t<div id=\"handle-ne\" class=\"handle-resize\" style=\"${styleMap({backgroundColor: this.color})}\" \n\t\t\t\t@pointerdown=\"${(e: PointerEvent) => this._onResizeHandleMouseDown(e, 'ne')}\"\n\t\t\t\t@pointerup=\"${this._onHandleMouseUp}\"></div>\n\t\t\t<div id=\"handle-sw\" class=\"handle-resize\" style=\"${styleMap({backgroundColor: this.color})}\" \n\t\t\t\t@pointerdown=\"${(e: PointerEvent) => this._onResizeHandleMouseDown(e, 'sw')}\"\n\t\t\t\t@pointerup=\"${this._onHandleMouseUp}\"></div>\n\t\t\t<div id=\"handle-se\" class=\"handle-resize\" style=\"${styleMap({backgroundColor: this.color})}\" \n\t\t\t\t@pointerdown=\"${(e: PointerEvent) => this._onResizeHandleMouseDown(e, 'se')}\"\n\t\t\t\t@pointerup=\"${this._onHandleMouseUp}\"></div>\n\t\t` : (this.autofill ? html`\n\t\t\t<div id=\"handle\" @pointerdown=\"${this._onHandleMouseDown}\"></div>\n\t\t` : '')}\n\t\t\n\t\t${this.movable ? html`\n\t\t\t<div id=\"handle-top\" class=\"handle-move\" \n\t\t\t\t@pointerdown=\"${(e: PointerEvent) => this._onMoveHandleMouseDown(e, 'top')}\"\n\t\t\t\t@pointerup=\"${this._onHandleMouseUp}\"></div>\n\t\t\t<div id=\"handle-right\" class=\"handle-move\" \n\t\t\t\t@pointerdown=\"${(e: PointerEvent) => this._onMoveHandleMouseDown(e, 'right')}\"\n\t\t\t\t@pointerup=\"${this._onHandleMouseUp}\"></div>\n\t\t\t<div id=\"handle-bottom\" class=\"handle-move\" \n\t\t\t\t@pointerdown=\"${(e: PointerEvent) => this._onMoveHandleMouseDown(e, 'bottom')}\"\n\t\t\t\t@pointerup=\"${this._onHandleMouseUp}\"></div>\n\t\t\t<div id=\"handle-left\" class=\"handle-move\" \n\t\t\t\t@pointerdown=\"${(e: PointerEvent) => this._onMoveHandleMouseDown(e, 'left')}\"\n\t\t\t\t@pointerup=\"${this._onHandleMouseUp}\"></div>\n\t\t` : ''}\n\t\t${this.animated ? html`\n\t\t\t<svg id=\"svgAnimation\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t\t\t<rect width=\"100%\" height=\"100%\" fill=\"none\" stroke-width=\"4\" stroke-dasharray=\"6,14\" stroke-dashoffset=\"0\" stroke-linecap=\"square\" />\n\t\t\t</svg>\n\t\t` : ''}\n\t`;\n\n\tstartAnimation() {\n\t\tif (!this.animated || this._animationTimer != null || !this.isVisible) return;\n\t\tlet dashOffset = 0;\n\t\tthis._animationTimer = window.setInterval(() => {\n\t\t\tdashOffset += 2;\n\t\t\tdashOffset = dashOffset == 20 ? 0 : dashOffset;\n\t\t\tthis.svgAnimation.firstElementChild.setAttribute('stroke-dashoffset', dashOffset.toString())\n\t\t}, 50);\n\t}\n\n\tstopAnimation() {\n\t\tif (this._animationTimer != null) window.clearInterval(this._animationTimer);\n\t\tthis._animationTimer = null;\n\t}\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback();\n\t\tthis.grid = dom.findParent(this, 'og-grid');\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.stopAnimation();\n\t}\n\n\twillUpdate() {\n\t\tif (this.color) this.style.borderColor = this.color;\n\t}\n\t\n\tupdated() {\n\t\tthis.updatePosition();\n\t\tif (!this.animated && this._animationTimer != null) this.stopAnimation();\n\t\telse if (this.animated && this._animationTimer == null) this.startAnimation();\n\t}\n\n\tupdatePosition() {\n\t\tif (!this.table?.model) return;\n\t\t\n\t\tconst zoom = this.table.zoom;\n\t\tdom.zoomElement(this, zoom);\n\t\t\n\t\tlet top = -1000, left = -1000, width = 0, height = 0;\n\t\tlet subTop = -1000, subLeft = -1000, subWidth = 0, subHeight = 0;\n\t\tconst options = this.table.model.options;\n\n\t\tif (this.selection) {\n\t\t\tconst cMin = Math.min(this.selection.c1, this.selection.c2);\n\t\t\tconst cMax = Math.max(this.selection.c1, this.selection.c2);\n\t\t\tconst rMin = Math.min(this.selection.r1, this.selection.r2);\n\t\t\tconst rMax = Math.max(this.selection.r1, this.selection.r2);\n\n\t\t\tthis.topLeftCell = this.table.getCellByModelIndex(cMin, rMin);\n\t\t\tthis.topRightCell = this.table.getCellByModelIndex(cMax, rMin);\n\t\t\tthis.bottomLeftCell = this.table.getCellByModelIndex(cMin, rMax);\n\t\t\tthis.bottomRightCell = this.table.getCellByModelIndex(cMax, rMax);\n\n\t\t\tif (this.topLeftCell || this.topRightCell || this.bottomLeftCell || this.bottomRightCell) {\n\t\t\t\tdom.setBorderWidth(this, {\n\t\t\t\t\tr: this.topRightCell || this.bottomRightCell ? this.borderWidth : 0,\n\t\t\t\t\tb: this.bottomRightCell || this.bottomLeftCell ? this.borderWidth : 0,\n\t\t\t\t\tl: this.topLeftCell || this.bottomLeftCell ? this.borderWidth : 0,\n\t\t\t\t\tt: this.topRightCell || this.topLeftCell ? this.borderWidth : 0\n\t\t\t\t});\n\n\t\t\t\ttop = this.topLeftCell || this.topRightCell\n\t\t\t\t\t? dom.getElementOffset(this.topLeftCell || this.topRightCell, this.table).top\n\t\t\t\t\t: dom.getElementOffset(this.table.getCellByGridIndex(0, options.freezeTop), this.table).top;\n\t\t\t\t\t\n\t\t\t\theight = (this.bottomRightCell || this.bottomLeftCell\n\t\t\t\t\t? dom.getElementOffset(this.bottomRightCell || this.bottomLeftCell, this.table).top - top + (this.bottomRightCell || this.bottomLeftCell).offsetHeight\n\t\t\t\t\t: (rMax <= this.table.rowOffset\n\t\t\t\t\t\t? (dom.getElementOffset(this.table.getCellByGridIndex(0, options.freezeTop), this.table).top - top)\n\t\t\t\t\t\t: this.table.offsetHeight - top)) + 1;\n\t\t\t\t\t\n\t\t\t\tleft = this.topLeftCell || this.bottomLeftCell \n\t\t\t\t\t? dom.getElementOffset(this.topLeftCell || this.bottomLeftCell, this.table).left \n\t\t\t\t\t: dom.getElementOffset(this.table.getCellByGridIndex(options.freezeLeft, 0), this.table).left;\n\t\t\t\t\n\t\t\t\twidth = (this.topRightCell || this.bottomRightCell\n\t\t\t\t\t? dom.getElementOffset(this.topRightCell || this.bottomRightCell, this.table).left - left + (this.topRightCell || this.bottomRightCell).offsetWidth\n\t\t\t\t\t: (cMax <= this.table.colOffset\n\t\t\t\t\t\t? (dom.getElementOffset(this.table.getCellByGridIndex(options.freezeLeft, 0), this.table).left - left)\n\t\t\t\t\t\t: this.table.offsetWidth - left)) + 1;\n\t\t\t\t\n\t\t\t\tif (this.activeCellRange) {\n\t\t\t\t\tthis.activeCell = this.table.getCellByModelIndex(cMin + this.activeCellRange.c1, rMin + this.activeCellRange.r1);\n\t\t\t\t\tif (this.activeCell) {\n\t\t\t\t\t\tconst subOffset = dom.getElementOffset(this.activeCell, this.table);\n\t\t\t\t\t\tsubLeft = subOffset.left - left;\n\t\t\t\t\t\tsubTop = subOffset.top - top;\n\t\t\t\t\t\tsubWidth = this.activeCell.offsetWidth;\n\t\t\t\t\t\tsubHeight = this.activeCell.offsetHeight;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tdom.setPosition(this, {l: left * zoom, t: top * zoom});\n\t\tdom.setSize(this, {w: width, h: height});\n\n\t\tif (this.subselectorElm) {\n\t\t\tif (this.activeCellRange) {\n\t\t\t\tdom.setPosition(this.subselectorElm, {l: subLeft - constants.SELECTOR_BORDER_WIDTH, t: subTop - constants.SELECTOR_BORDER_WIDTH});\n\t\t\t\tdom.setSize(this.subselectorElm, {w: subWidth - 1, h: subHeight - 1});\n\t\t\t} else {\n\t\t\t\tdom.hideElement(this.subselectorElm);\n\t\t\t}\n\t\t}\n\n\t\tif (this.svgAnimation) {\n\t\t\tthis.svgAnimation.setAttribute('width', (this.clientWidth + 4).toString());\n\t\t\tthis.svgAnimation.setAttribute('height', (this.clientHeight + 4).toString());\n\t\t}\n\t}\n\n}"]}
@@ -1,2 +0,0 @@
1
- export declare const style: import("lit").CSSResult;
2
- //# sourceMappingURL=selector.style.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"selector.style.d.ts","sourceRoot":"","sources":["../../src/ui/selector.style.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,KAAK,yBAuGjB,CAAC"}
@@ -1,106 +0,0 @@
1
- import { css } from 'lit';
2
- export const style = css `
3
- :host {
4
- pointer-events: none;
5
- position: absolute;
6
- background-color: var(--og-accent-color-alpha);
7
- border: 2px solid var(--og-accent-color);
8
- display: none;
9
- cursor: move;
10
- }
11
-
12
- :host([animated]) {
13
- /* stroke: red;
14
- background-image: url("data:image/svg+xml,%3csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%25' height='100%25' fill='none' stroke='%23333' stroke-width='4' stroke-dasharray='6%2c 14' stroke-dashoffset='0' stroke-linecap='square'/%3e%3c/svg%3e"); */
15
- background-color: transparent;
16
- border-color: transparent;
17
- }
18
-
19
- #svgAnimation {
20
- position: absolute;
21
- top: -2px;
22
- left: -2px;
23
- stroke: var(--og-accent-color);
24
- }
25
-
26
- #handle {
27
- position: absolute;
28
- width: 6px;
29
- height: 6px;
30
- right: -4px;
31
- bottom: -4px;
32
- background-color: var(--og-accent-color);
33
- cursor: crosshair;
34
- pointer-events: all;
35
- }
36
-
37
- #subselector {
38
- z-index: 99;
39
- pointer-events: none;
40
- border: 1px solid var(--og-accent-color);
41
- }
42
-
43
- .handle-move {
44
- position: absolute;
45
- cursor: move;
46
- pointer-events: all;
47
- //background-color: red;
48
- }
49
-
50
- #handle-top {
51
- z-index: 98;
52
- inset: -2px 0 auto 0;
53
- height: 4px;
54
- }
55
-
56
- #handle-bottom {
57
- z-index: 98;
58
- inset: auto 0 -2px 0;
59
- height: 4px;
60
- }
61
-
62
- #handle-right {
63
- z-index: 98;
64
- inset: 0 -2px 0 auto;
65
- width: 4px;
66
- }
67
-
68
- #handle-left {
69
- z-index: 98;
70
- inset: 0 auto 0 -2px;
71
- width: 4px;
72
- }
73
-
74
- .handle-resize {
75
- position: absolute;
76
- width: 6px;
77
- height: 6px;
78
- background-color: var(--og-accent-color);
79
- pointer-events: all;
80
- }
81
-
82
- #handle-se {
83
- right: -4px;
84
- bottom: -4px;
85
- cursor: se-resize;
86
- }
87
-
88
- #handle-sw {
89
- left: -4px;
90
- bottom: -4px;
91
- cursor: sw-resize;
92
- }
93
-
94
- #handle-nw {
95
- left: -4px;
96
- top: -4px;
97
- cursor: nw-resize;
98
- }
99
-
100
- #handle-ne {
101
- right: -4px;
102
- top: -4px;
103
- cursor: ne-resize;
104
- }
105
- `;
106
- //# sourceMappingURL=selector.style.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"selector.style.js","sourceRoot":"","sources":["../../src/ui/selector.style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,KAAK,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuGvB,CAAC","sourcesContent":["import { css } from 'lit';\n\nexport const style = css`\n\t:host {\n\t\tpointer-events: none;\n\t\tposition: absolute;\n\t\tbackground-color: var(--og-accent-color-alpha);\n\t\tborder: 2px solid var(--og-accent-color);\n\t\tdisplay: none;\n\t\tcursor: move;\n\t}\n\n\t:host([animated]) {\n\t\t/* stroke: red;\n\t\tbackground-image: url(\"data:image/svg+xml,%3csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%25' height='100%25' fill='none' stroke='%23333' stroke-width='4' stroke-dasharray='6%2c 14' stroke-dashoffset='0' stroke-linecap='square'/%3e%3c/svg%3e\"); */\n\t\tbackground-color: transparent;\n\t\tborder-color: transparent;\n\t}\n\n\t#svgAnimation {\n\t\tposition: absolute;\n\t\ttop: -2px;\n\t\tleft: -2px;\n\t\tstroke: var(--og-accent-color);\n\t}\n\n\t#handle {\n\t\tposition: absolute;\n\t\twidth: 6px;\n\t\theight: 6px;\n\t\tright: -4px;\n\t\tbottom: -4px;\n\t\tbackground-color: var(--og-accent-color);\n\t\tcursor: crosshair;\n\t\tpointer-events: all;\n\t}\n\n\t#subselector {\n\t\tz-index: 99;\n\t\tpointer-events: none;\n\t\tborder: 1px solid var(--og-accent-color);\n\t}\n\n\t.handle-move {\n\t\tposition: absolute;\n\t\tcursor: move;\n\t\tpointer-events: all;\n\t\t//background-color: red;\n\t}\n\n\t#handle-top {\n\t\tz-index: 98;\n\t\tinset: -2px 0 auto 0;\n\t\theight: 4px;\n\t}\n\n\t#handle-bottom {\n\t\tz-index: 98;\n\t\tinset: auto 0 -2px 0;\n\t\theight: 4px;\n\t}\n\n\t#handle-right {\n\t\tz-index: 98;\n\t\tinset: 0 -2px 0 auto;\n\t\twidth: 4px;\n\t}\n\n\t#handle-left {\n\t\tz-index: 98;\n\t\tinset: 0 auto 0 -2px;\n\t\twidth: 4px;\n\t}\n\n\t.handle-resize {\n\t\tposition: absolute;\n\t\twidth: 6px;\n\t\theight: 6px;\n\t\tbackground-color: var(--og-accent-color);\n\t\tpointer-events: all;\n\t}\n\n\t#handle-se {\n\t\tright: -4px;\n\t\tbottom: -4px;\n\t\tcursor: se-resize;\n\t}\n\n\t#handle-sw {\n\t\tleft: -4px;\n\t\tbottom: -4px;\n\t\tcursor: sw-resize;\n\t}\n\n\t#handle-nw {\n\t\tleft: -4px;\n\t\ttop: -4px;\n\t\tcursor: nw-resize;\n\t}\n\n\t#handle-ne {\n\t\tright: -4px;\n\t\ttop: -4px;\n\t\tcursor: ne-resize;\n\t}\n`;"]}
@@ -1,8 +0,0 @@
1
- import { LitElement } from 'lit';
2
- import { SortSettings } from '@omegagrid/grid-core';
3
- export declare class SortingArrow extends LitElement {
4
- static styles: import("lit").CSSResult;
5
- sortSettings: SortSettings;
6
- render(): import("lit-html").TemplateResult<1> | "";
7
- }
8
- //# sourceMappingURL=sortingArrow.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sortingArrow.d.ts","sourceRoot":"","sources":["../../src/ui/sortingArrow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAG5C,OAAO,EAAa,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAE/D,qBACa,YAAa,SAAQ,UAAU;IAE3C,MAAM,CAAC,MAAM,0BAeX;IAGF,YAAY,EAAE,YAAY,CAAC;IAE3B,MAAM;CAON"}
@@ -1,42 +0,0 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6
- };
7
- import { LitElement, html, css } from 'lit';
8
- import { customElement, property } from 'lit/decorators.js';
9
- import { unsafeHTML } from 'lit/directives/unsafe-html.js';
10
- import { SortOrder } from '@omegagrid/grid-core';
11
- let SortingArrow = class SortingArrow extends LitElement {
12
- render() {
13
- return this.sortSettings ? html `
14
- <span class="arrow">${unsafeHTML(this.sortSettings.ord == SortOrder.Asc ? '&#8593;' : '&#8595;')}</span>
15
- <span class="num">${((this.sortSettings.index ?? 0) + 1).toString()}</span>
16
- ` : '';
17
- }
18
- };
19
- SortingArrow.styles = css `
20
- :host {
21
- display: block;
22
- width: 20px;
23
- height: 100%;
24
- }
25
-
26
- .num {
27
- font-size: 8px;
28
- }
29
-
30
- .arrow {
31
- position: relative;
32
- right: -4px;
33
- }
34
- `;
35
- __decorate([
36
- property({ type: Object, hasChanged: () => true })
37
- ], SortingArrow.prototype, "sortSettings", void 0);
38
- SortingArrow = __decorate([
39
- customElement('og-sortingarrow')
40
- ], SortingArrow);
41
- export { SortingArrow };
42
- //# sourceMappingURL=sortingArrow.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sortingArrow.js","sourceRoot":"","sources":["../../src/ui/sortingArrow.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAgB,MAAM,sBAAsB,CAAC;AAGxD,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,UAAU;IAsB3C,MAAM;QACL,OAAO,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAA;yBACR,UAAU,CAAC,IAAI,CAAC,YAAY,CAAC,GAAG,IAAI,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC;uBAC5E,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,KAAK,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,QAAQ,EAAE;GACnE,CAAC,CAAC,CAAC,EAAE,CAAC;IACR,CAAC;;AAzBM,mBAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;EAelB,AAfY,CAeX;AAGF;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,EAAE,CAAC,IAAI,EAAC,CAAC;kDACtB;AApBf,YAAY;IADxB,aAAa,CAAC,iBAAiB,CAAC;GACpB,YAAY,CA6BxB","sourcesContent":["import { LitElement, html, css } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { unsafeHTML } from 'lit/directives/unsafe-html.js';\nimport { SortOrder, SortSettings } from '@omegagrid/grid-core';\n\n@customElement('og-sortingarrow')\nexport class SortingArrow extends LitElement {\n\n\tstatic styles = css`\n\t\t:host {\n\t\t\tdisplay: block;\n\t\t\twidth: 20px;\n\t\t\theight: 100%;\n\t\t}\n\n\t\t.num {\n\t\t\tfont-size: 8px;\n\t\t}\n\n\t\t.arrow {\n\t\t\tposition: relative;\n\t\t\tright: -4px;\n\t\t}\n\t`;\n\n\t@property({type: Object, hasChanged: () => true})\n\tsortSettings: SortSettings;\n\t\n\trender() {\n\t\treturn this.sortSettings ? html`\n\t\t\t<span class=\"arrow\">${unsafeHTML(this.sortSettings.ord == SortOrder.Asc ? '&#8593;' : '&#8595;')}</span>\n\t\t\t<span class=\"num\">${((this.sortSettings.index ?? 0) + 1).toString()}</span>\n\t\t` : '';\n\t}\n\n}"]}
@@ -1,14 +0,0 @@
1
- import { LitElement } from 'lit';
2
- import { CellModel, SparklineOptions } from '@omegagrid/grid-core';
3
- export declare class Sparkline extends LitElement {
4
- static styles: import("lit").CSSResult;
5
- cell: CellModel;
6
- svg: SVGSVGElement;
7
- createSVGElement(tag: string): SVGElement;
8
- renderLines(points: [number, number][], options: SparklineOptions): void;
9
- renderColumns(points: [number, number][], options: SparklineOptions): void;
10
- renderSparkline(): void;
11
- timeout: number;
12
- updated(): void;
13
- }
14
- //# sourceMappingURL=sparkline.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sparkline.d.ts","sourceRoot":"","sources":["../../src/ui/sparkline.ts"],"names":[],"mappings":"AACA,OAAO,EAAO,UAAU,EAAE,MAAM,KAAK,CAAC;AAEtC,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAEnE,qBACa,SAAU,SAAQ,UAAU;IAExC,MAAM,CAAC,MAAM,0BAOX;IAGF,IAAI,EAAE,SAAS,CAAC;IAEhB,GAAG,EAAE,aAAa,CAAC;IAEnB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU;IAIzC,WAAW,CAAC,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE,gBAAgB;IA0BjE,aAAa,CAAC,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE,gBAAgB;IAenE,eAAe;IAkCf,OAAO,EAAE,MAAM,CAAC;IAEhB,OAAO;CAQP"}
@@ -1,111 +0,0 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6
- };
7
- import constants from '../constants';
8
- import { css, LitElement } from 'lit';
9
- import { customElement, property } from 'lit/decorators.js';
10
- let Sparkline = class Sparkline extends LitElement {
11
- createSVGElement(tag) {
12
- return document.createElementNS('http://www.w3.org/2000/svg', tag);
13
- }
14
- renderLines(points, options) {
15
- let pointGroup = [];
16
- points.forEach((p, i) => {
17
- if (p)
18
- pointGroup.push(p);
19
- if ((!p || points.length == i + 1) && pointGroup.length > 0) {
20
- const polyline = this.createSVGElement('polyline');
21
- polyline.setAttribute('points', pointGroup.map(point => point.join(',')).join(' '));
22
- polyline.setAttribute('stroke', `#${options.style.color}`);
23
- polyline.setAttribute('stroke-width', '2');
24
- this.svg.appendChild(polyline);
25
- pointGroup = [];
26
- }
27
- });
28
- if (options.marker)
29
- points.forEach((p) => {
30
- if (p) {
31
- const circle = this.createSVGElement('circle');
32
- circle.setAttribute('r', '3');
33
- circle.setAttribute('fill', `#${options.marker.color}`);
34
- circle.setAttribute('cx', p[0].toString());
35
- circle.setAttribute('cy', p[1].toString());
36
- this.svg.appendChild(circle);
37
- }
38
- });
39
- }
40
- renderColumns(points, options) {
41
- const pointWidth = ((this.clientWidth - 2 * constants.SPARKLINE_GAP) / points.length) - constants.SPARKLINE_GAP;
42
- points.forEach((p) => {
43
- if (p && pointWidth > 0) {
44
- const rect = this.createSVGElement('rect');
45
- rect.setAttribute('width', pointWidth.toString());
46
- rect.setAttribute('height', (this.clientHeight - p[1]).toString());
47
- rect.setAttribute('fill', `#${options.style.color}`);
48
- rect.setAttribute('x', (p[0] - pointWidth / 2).toString());
49
- rect.setAttribute('y', p[1].toString());
50
- this.svg.appendChild(rect);
51
- }
52
- });
53
- }
54
- renderSparkline() {
55
- if (this.cell && this.cell.hasSparkline) {
56
- const addr = this.cell.address;
57
- const sparklines = this.cell.model.sparklines;
58
- const values = sparklines.getValues(addr);
59
- const [min, max] = sparklines.getExtremes(addr);
60
- if (max != null) {
61
- const pointWidth = ((this.clientWidth - 2 * constants.SPARKLINE_GAP) / values.length);
62
- const size = max - min;
63
- const points = [];
64
- let x, y;
65
- this.svg = this.createSVGElement('svg');
66
- this.svg.setAttribute('width', this.clientWidth.toString());
67
- this.svg.setAttribute('height', this.clientHeight.toString());
68
- this.shadowRoot.appendChild(this.svg);
69
- values.forEach((v, i) => {
70
- if (v == null || isNaN(v))
71
- points.push(null);
72
- else {
73
- x = constants.SPARKLINE_GAP + (i * pointWidth) + (pointWidth / 2);
74
- y = ((this.clientHeight - 2 * constants.SPARKLINE_GAP) * (max - v) / size) + constants.SPARKLINE_GAP;
75
- points.push([x, y]);
76
- }
77
- });
78
- const options = sparklines.groups.get(sparklines.get(addr)[0]);
79
- if (options.type == 'line')
80
- this.renderLines(points, options);
81
- else
82
- this.renderColumns(points, options);
83
- }
84
- }
85
- }
86
- updated() {
87
- this.shadowRoot.innerHTML = '';
88
- if (this.timeout)
89
- window.clearInterval(this.timeout);
90
- this.timeout = window.setTimeout(() => {
91
- this.renderSparkline();
92
- this.timeout = null;
93
- }, 1);
94
- }
95
- };
96
- Sparkline.styles = css `
97
- :host {
98
- display: block;
99
- z-index: 0;
100
- position: absolute;
101
- inset: 0;
102
- }
103
- `;
104
- __decorate([
105
- property({ type: Object })
106
- ], Sparkline.prototype, "cell", void 0);
107
- Sparkline = __decorate([
108
- customElement('og-grid-sparkline')
109
- ], Sparkline);
110
- export { Sparkline };
111
- //# sourceMappingURL=sparkline.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sparkline.js","sourceRoot":"","sources":["../../src/ui/sparkline.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,SAAS,MAAM,cAAc,CAAC;AACrC,OAAO,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAIrD,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,UAAU;IAgBxC,gBAAgB,CAAC,GAAW;QAC3B,OAAO,QAAQ,CAAC,eAAe,CAAC,4BAA4B,EAAE,GAAG,CAAC,CAAC;IACpE,CAAC;IAED,WAAW,CAAC,MAA0B,EAAE,OAAyB;QAChE,IAAI,UAAU,GAAuB,EAAE,CAAC;QACxC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;YACvB,IAAI,CAAC;gBAAE,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAC1B,IAAI,CAAC,CAAC,C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wBAClE,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,YAAY,GAAG,CAAC,GAAG,SAAS,CAAC,aAAa,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,SAAS,CAAC,aAAa,CAAC;wBACrG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;oBACrB,CAAC;gBACF,CAAC,CAAC,CAAC;gBAEH,MAAM,OAAO,GAAG,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;gBAC/D,IAAI,OAAO,CAAC,IAAI,IAAI,MAAM;oBAAE,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;;oBACzD,IAAI,CAAC,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;YAC1C,CAAC;QACF,CAAC;IACF,CAAC;IAID,OAAO;QACN,IAAI,CAAC,UAAU,CAAC,SAAS,GAAG,EAAE,CAAC;QAC/B,IAAI,IAAI,CAAC,OAAO;YAAE,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACrD,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE;YACrC,IAAI,CAAC,eAAe,EAAE,CAAC;YACvB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QACrB,CAAC,EAAE,CAAC,CAAC,CAAC;IACP,CAAC;;AAtGM,gBAAM,GAAG,GAAG,CAAA;;;;;;;EAOlB,AAPY,CAOX;AAGF;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;uCACT;AAZJ,SAAS;IADrB,aAAa,CAAC,mBAAmB,CAAC;GACtB,SAAS,CAyGrB","sourcesContent":["import constants from '../constants';\nimport { css, LitElement } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { CellModel, SparklineOptions } from '@omegagrid/grid-core';\n\n@customElement('og-grid-sparkline')\nexport class Sparkline extends LitElement {\n\n\tstatic styles = css`\n\t\t:host {\n\t\t\tdisplay: block;\n\t\t\tz-index: 0;\n\t\t\tposition: absolute;\n\t\t\tinset: 0;\n\t\t}\n\t`;\n\n\t@property({type: Object})\n\tcell: CellModel;\n\n\tsvg: SVGSVGElement;\n\n\tcreateSVGElement(tag: string): SVGElement {\n\t\treturn document.createElementNS('http://www.w3.org/2000/svg', tag);\n\t}\n\n\trenderLines(points: [number, number][], options: SparklineOptions) {\n\t\tlet pointGroup: [number, number][] = [];\n\t\tpoints.forEach((p, i) => {\n\t\t\tif (p) pointGroup.push(p);\n\t\t\tif ((!p || points.length == i + 1) && pointGroup.length > 0) {\n\t\t\t\tconst polyline = this.createSVGElement('polyline') as SVGPolylineElement;\n\t\t\t\tpolyline.setAttribute('points', pointGroup.map(point => point.join(',')).join(' '));\n\t\t\t\tpolyline.setAttribute('stroke', `#${options.style.color}`);\n\t\t\t\tpolyline.setAttribute('stroke-width', '2');\n\t\t\t\tthis.svg.appendChild(polyline);\n\t\t\t\tpointGroup = [];\n\t\t\t}\n\t\t});\n\n\t\tif (options.marker) points.forEach((p) => {\n\t\t\tif (p) {\n\t\t\t\tconst circle = this.createSVGElement('circle') as SVGCircleElement;\n\t\t\t\tcircle.setAttribute('r', '3');\n\t\t\t\tcircle.setAttribute('fill', `#${options.marker.color}`);\n\t\t\t\tcircle.setAttribute('cx', p[0].toString());\n\t\t\t\tcircle.setAttribute('cy', p[1].toString());\n\t\t\t\tthis.svg.appendChild(circle);\n\t\t\t}\n\t\t});\n\t}\n\n\trenderColumns(points: [number, number][], options: SparklineOptions) {\n\t\tconst pointWidth = ((this.clientWidth - 2 * constants.SPARKLINE_GAP) / points.length) - constants.SPARKLINE_GAP;\n\t\tpoints.forEach((p) => {\n\t\t\tif (p && pointWidth > 0) {\n\t\t\t\tconst rect = this.createSVGElement('rect') as SVGRectElement;\n\t\t\t\trect.setAttribute('width', pointWidth.toString());\n\t\t\t\trect.setAttribute('height', (this.clientHeight - p[1]).toString());\n\t\t\t\trect.setAttribute('fill', `#${options.style.color}`);\n\t\t\t\trect.setAttribute('x', (p[0] - pointWidth / 2).toString());\n\t\t\t\trect.setAttribute('y', p[1].toString());\n\t\t\t\tthis.svg.appendChild(rect);\n\t\t\t}\n\t\t});\n\t}\n\n\trenderSparkline() {\n\t\tif (this.cell && this.cell.hasSparkline) {\n\t\t\tconst addr = this.cell.address;\n\t\t\tconst sparklines = this.cell.model.sparklines;\n\t\t\tconst values = sparklines.getValues(addr);\n\t\t\tconst [min, max] = sparklines.getExtremes(addr);\n\t\t\t\n\t\t\tif (max != null) {\n\t\t\t\tconst pointWidth = ((this.clientWidth - 2 * constants.SPARKLINE_GAP) / values.length);\n\t\t\t\tconst size = max - min;\n\t\t\t\tconst points: [number, number][] = [];\n\t\t\t\tlet x: number, y: number;\n\t\t\t\t\n\t\t\t\tthis.svg = this.createSVGElement('svg') as SVGSVGElement;\n\t\t\t\tthis.svg.setAttribute('width', this.clientWidth.toString());\n\t\t\t\tthis.svg.setAttribute('height', this.clientHeight.toString());\n\t\t\t\tthis.shadowRoot.appendChild(this.svg);\n\t\n\t\t\t\tvalues.forEach((v, i) => {\n\t\t\t\t\tif (v == null || isNaN(v)) points.push(null);\n\t\t\t\t\telse {\n\t\t\t\t\t\tx = constants.SPARKLINE_GAP + (i * pointWidth) + (pointWidth / 2);\n\t\t\t\t\t\ty = ((this.clientHeight - 2 * constants.SPARKLINE_GAP) * (max - v) / size) + constants.SPARKLINE_GAP;\n\t\t\t\t\t\tpoints.push([x, y]);\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tconst options = sparklines.groups.get(sparklines.get(addr)[0]);\n\t\t\t\tif (options.type == 'line') this.renderLines(points, options);\n\t\t\t\telse this.renderColumns(points, options);\n\t\t\t}\n\t\t}\n\t}\n\n\ttimeout: number;\n\t\n\tupdated() {\n\t\tthis.shadowRoot.innerHTML = '';\n\t\tif (this.timeout) window.clearInterval(this.timeout);\n\t\tthis.timeout = window.setTimeout(() => {\n\t\t\tthis.renderSparkline();\n\t\t\tthis.timeout = null;\n\t\t}, 1);\n\t}\n}"]}
@@ -1,122 +0,0 @@
1
- import { Expander } from "@omegagrid/core";
2
- import { LitElement } from 'lit';
3
- import { GridModel, Merge, Viewport, CellModel, RowModel, ColumnModel, CellRange, Style } from "@omegagrid/grid-core";
4
- import { Grid } from './grid';
5
- export type TableCell = HTMLTableCellElement & {
6
- c: number;
7
- r: number;
8
- };
9
- export type TableRow = HTMLTableRowElement & {
10
- r: number;
11
- expander: Expander;
12
- };
13
- export type TableHeaderCell = TableCell;
14
- export type TableRenderOptions = {
15
- vertical?: boolean;
16
- horizontal?: boolean;
17
- };
18
- export declare class TableEvent extends Event {
19
- }
20
- export declare class Table extends LitElement {
21
- static styles: import("lit").CSSResult[];
22
- private _viewport;
23
- private _viewportSize;
24
- private _freezeLeft;
25
- private _freezeTop;
26
- private bCache;
27
- private hCache;
28
- hRows: TableRow[];
29
- bRows: TableRow[];
30
- cols: HTMLTableColElement[];
31
- private _rowMap;
32
- private _colMap;
33
- private cornerDiv;
34
- grid: Grid;
35
- model: GridModel;
36
- hideOuterBorder: boolean;
37
- rowOffset: number;
38
- colOffset: number;
39
- zoom: number;
40
- nogrid: boolean;
41
- renderAll: boolean;
42
- private _thead;
43
- get thead(): HTMLElement;
44
- private _tbody;
45
- get tbody(): HTMLElement;
46
- private _colgroup;
47
- get colgroup(): HTMLElement;
48
- private _table;
49
- get table(): HTMLTableElement;
50
- get colMap(): Map<number, number>;
51
- get rowMap(): Map<number, number>;
52
- getColumnByModelIndex: (c: number) => HTMLTableColElement;
53
- getColumnByGridIndex: (c: number) => HTMLTableColElement;
54
- getRowByModelIndex: (r: number) => TableRow;
55
- getRowByGridIndex: (r: number) => TableRow;
56
- getCellByGridIndex: (c: number, r: number) => TableCell;
57
- getCellByModelIndex: (c: number, r: number) => TableCell;
58
- getCellByCellModel: (m: CellModel) => TableCell;
59
- resetFreezeLeft: () => void;
60
- get freezeLeft(): number;
61
- get freezeTop(): number;
62
- _highlightedColHeaderCells: TableHeaderCell[];
63
- _highlightedRowHeaderCells: TableHeaderCell[];
64
- previewZoom(zoom: number): void;
65
- highlightColHeaderCells(columns: number[]): void;
66
- highlightRowHeaderCells(rows: number[]): void;
67
- get columnHeaderCount(): number;
68
- get rowHeaderCount(): number;
69
- get renderRowCount(): number;
70
- get renderColCount(): number;
71
- get totalHeaderHeight(): number;
72
- get treeHeaderWidth(): number;
73
- get treeHeaderHeight(): number;
74
- get totalHeaderWidth(): number;
75
- get viewportSize(): {
76
- w: number;
77
- h: number;
78
- };
79
- get viewport(): Viewport;
80
- get viewportRange(): CellRange;
81
- findColumnIndexByOffset(offset: number): number;
82
- findRowByOffset(offset: number): TableRow;
83
- findTableCellByOffset(x: number, y: number): TableCell;
84
- /**
85
- * Returns the nearest visible cell to the given offset and exact cell if availible
86
- * @param x
87
- * @param y
88
- * @returns
89
- */
90
- findNearestTableCellByOffset(x: number, y: number): [TableCell, TableCell?];
91
- connectedCallback(): void;
92
- render: () => import("lit-html").TemplateResult<1>;
93
- willUpdate(): void;
94
- updated(): void;
95
- clearHeaderCache: () => void;
96
- clearBodyCache: () => void;
97
- refresh(): void;
98
- createColumns(): void;
99
- createHeaderRows(): void;
100
- createBodyRows(): void;
101
- renderCells(update?: TableRenderOptions): void;
102
- renderEmptyBody(): void;
103
- renderHeader(): void;
104
- renderHeaderRowLetters(tr: HTMLTableRowElement, index: number): void;
105
- renderHeaderRowTree(tr: HTMLTableRowElement, index: number): void;
106
- renderHeaderRowTreeCell(tr: HTMLTableRowElement, rIndex: number, column: ColumnModel, th: HTMLTableCellElement): void;
107
- createExpanderLine(direction: string): HTMLDivElement;
108
- renderHeaderRowLabels(tr: HTMLTableRowElement, rIndex: number, hIndex: number): void;
109
- renderHeaderRowLabelCell(th: TableHeaderCell, column: ColumnModel, rIndex: number, hIndex: number): void;
110
- renderHeaderRowFilters(tr: HTMLTableRowElement, index: number): void;
111
- renderHeaderRowFilterCell(tr: HTMLTableRowElement, rIndex: number, column: ColumnModel, th: TableHeaderCell): void;
112
- renderHeaderRowCornerCell(th: TableCell): void;
113
- cellRenderSchedules: WeakMap<TableCell, number>;
114
- renderBody(): void;
115
- scheduleRenderBodyCell(cellModel: CellModel, cell: TableCell): void;
116
- fixCellBorders(cell: TableCell, style: Style): void;
117
- renderBodyCell(cellModel: CellModel, cell?: TableCell): void;
118
- mergeBodyCells(mergedCells: Merge[]): void;
119
- renderRowTree(): void;
120
- renderRowTreeCell(cIndex: number, row: RowModel, th: HTMLTableCellElement): void;
121
- }
122
- //# sourceMappingURL=table.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../src/ui/table.ts"],"names":[],"mappings":"AACA,OAAO,EAAO,QAAQ,EAAmC,MAAM,iBAAiB,CAAC;AACjF,OAAO,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AAEvC,OAAO,EACN,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,WAAW,EAAgD,SAAS,EAAE,KAAK,EAG5H,MAAM,sBAAsB,CAAC;AAK9B,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAG9B,MAAM,MAAM,SAAS,GAAG,oBAAoB,GAAG;IAC9C,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAA;CACT,CAAA;AAED,MAAM,MAAM,QAAQ,GAAG,mBAAmB,GAAG;IAC5C,CAAC,EAAE,MAAM,CAAC;IACV,QAAQ,EAAE,QAAQ,CAAA;CAClB,CAAA;AAED,MAAM,MAAM,eAAe,GAAG,SAAS,CAAC;AACxC,MAAM,MAAM,kBAAkB,GAAG;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAAC,UAAU,CAAC,EAAE,OAAO,CAAA;CAAC,CAAC;AAE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