@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,89 +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 { customElement } from 'lit/decorators.js';
9
- import { BaseFilter } from "./baseFilter";
10
- import { html, css } from 'lit';
11
- import { createRef, ref } from 'lit/directives/ref.js';
12
- let TextFilter = class TextFilter extends BaseFilter {
13
- constructor() {
14
- super(...arguments);
15
- this.inputRef = createRef();
16
- this.filterButtonRef = createRef();
17
- this.clearButtonRef = createRef();
18
- this.render = () => html `
19
- <div class="filter-inner">
20
- <input ${ref(this.inputRef)}
21
- type="text"
22
- @keydown="${this._onInputKeyDown}"
23
- value="${this.currentValue ?? ''}">
24
- <og-button icon="filter" color="accent" ${ref(this.filterButtonRef)} @mousedown="${this._onFilterClick}"></og-button>
25
- <og-button icon="xmark" color="red" ${ref(this.clearButtonRef)} @mousedown="${this._onClearClick}"></og-button>
26
- </div>
27
- `;
28
- }
29
- get input() { return this.inputRef.value; }
30
- get filterButton() { return this.filterButtonRef.value; }
31
- get clearButton() { return this.clearButtonRef.value; }
32
- _onFilterClick() {
33
- this.filter(this.input.value);
34
- }
35
- _onClearClick() {
36
- this.input.value = '';
37
- this.clearFilter();
38
- }
39
- _onInputKeyDown(e) {
40
- if (e.key == 'Enter') {
41
- this.filter(this.input.value);
42
- this.deactivate();
43
- }
44
- }
45
- activate() {
46
- super.activate();
47
- if (this.input) {
48
- this.input.value = this.currentValue ?? '';
49
- }
50
- setTimeout(() => this.input.focus(), 100);
51
- }
52
- deactivate() {
53
- super.deactivate();
54
- }
55
- };
56
- TextFilter.styles = [...BaseFilter.styles, css `
57
- .filter-inner {
58
- height: 100%;
59
- display: flex;
60
- flex-direction: row;
61
- overflow: hidden;
62
- }
63
-
64
- input {
65
- border-width: 0;
66
- outline: none;
67
- height: 100%;
68
- flex: 1;
69
- width: 100%;
70
- background-color: var(--og-background-color);
71
- color: var(--og-text-color);
72
- }
73
-
74
- og-button {
75
- flex: 0;
76
- min-width: 18px;
77
- max-width: 18px;
78
- padding: 0;
79
- text-align: center;
80
- border-width: 0;
81
- border-radius: 0;
82
- height: 100%;
83
- }
84
- `];
85
- TextFilter = __decorate([
86
- customElement(`${constants.PREFIX}-filter-text`)
87
- ], TextFilter);
88
- export { TextFilter };
89
- //# sourceMappingURL=textFilter.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"textFilter.js","sourceRoot":"","sources":["../../src/filters/textFilter.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,SAAS,MAAM,cAAc,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAGhD,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,UAAU;IAAnC;;QAgCE,aAAQ,GAAG,SAAS,EAAoB,CAAC;QAGzC,oBAAe,GAAG,SAAS,EAAqB,CAAC;QAGjD,mBAAc,GAAG,SAAS,EAAqB,CAAC;QAmBxD,WAAM,GAAG,GAAG,EAAE,CAAC,IAAI,CAAA;;YAER,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC;;gBAEd,IAAI,CAAC,eAAe;aACvB,IAAI,CAAC,YAAsB,IAAI,EAAE;6CACD,GAAG,CAAC,IAAI,CAAC,eAAe,CAAC,gBAAgB,IAAI,CAAC,cAAc;yCAChE,GAAG,CAAC,IAAI,CAAC,cAAc,CAAC,gBAAgB,IAAI,CAAC,aAAa;;EAEjG,CAAC;IAcH,CAAC;IA/CA,IAAI,KAAK,KAAK,OAAO,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAA,CAAC,CAAC;IAG1C,IAAI,YAAY,KAAK,OAAO,IAAI,CAAC,eAAe,CAAC,KAAK,CAAA,CAAC,CAAC;IAGxD,IAAI,WAAW,KAAK,OAAO,IAAI,CAAC,cAAc,CAAC,KAAK,CAAA,CAAC,CAAC;IAEtD,cAAc;QACb,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAC/B,CAAC;IAED,aAAa;QACZ,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,EAAE,CAAC;QACtB,IAAI,CAAC,WAAW,EAAE,CAAC;IACpB,CAAC;IAED,eAAe,CAAC,CAAgB;QAC/B,IAAI,CAAC,CAAC,GAAG,IAAI,OAAO,EAAE,CAAC;YACtB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;YAC9B,IAAI,CAAC,UAAU,EAAE,CAAC;QACnB,CAAC;IACF,CAAC;IAaD,QAAQ;QACP,KAAK,CAAC,QAAQ,EAAE,CAAC;QACjB,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YAChB,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC,YAAsB,IAAI,EAAE,CAAC;QACtD,CAAC;QACD,UAAU,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,EAAE,GAAG,CAAC,CAAC;IAC3C,CAAC;IAED,UAAU;QACT,KAAK,CAAC,UAAU,EAAE,CAAC;IACpB,CAAC;;AA5EM,iBAAM,GAAG,CAAC,GAAG,UAAU,CAAC,MAAM,EAAE,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4BzC,CAAC,AA5BW,CA4BV;AA9BS,UAAU;IADtB,aAAa,CAAC,GAAG,SAAS,CAAC,MAAM,cAAc,CAAC;GACpC,UAAU,CAgFtB","sourcesContent":["import constants from \"../constants\";\nimport { customElement } from 'lit/decorators.js';\nimport { BaseFilter } from \"./baseFilter\";\nimport { html, css } from 'lit';\nimport { createRef, ref } from 'lit/directives/ref.js';\n\n@customElement(`${constants.PREFIX}-filter-text`)\nexport class TextFilter extends BaseFilter {\n\t\n\tstatic styles = [...BaseFilter.styles, css`\n\t\t.filter-inner {\n\t\t\theight: 100%;\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: row;\n\t\t\toverflow: hidden;\n\t\t}\n\n\t\tinput {\n\t\t\tborder-width: 0;\n\t\t\toutline: none;\n\t\t\theight: 100%;\n\t\t\tflex: 1;\n\t\t\twidth: 100%;\n\t\t\tbackground-color: var(--og-background-color);\n\t\t\tcolor: var(--og-text-color);\n\t\t}\n\n\t\tog-button {\n\t\t\tflex: 0;\n\t\t\tmin-width: 18px;\n\t\t\tmax-width: 18px;\n\t\t\tpadding: 0;\n\t\t\ttext-align: center;\n\t\t\tborder-width: 0;\n\t\t\tborder-radius: 0;\n\t\t\theight: 100%;\n\t\t}\n\t`];\n\n\tprivate inputRef = createRef<HTMLInputElement>();\n\tget input() { return this.inputRef.value }\n\n\tprivate filterButtonRef = createRef<HTMLButtonElement>();\n\tget filterButton() { return this.filterButtonRef.value }\n\n\tprivate clearButtonRef = createRef<HTMLButtonElement>();\n\tget clearButton() { return this.clearButtonRef.value }\n\t\n\t_onFilterClick() {\n\t\tthis.filter(this.input.value);\n\t}\n\n\t_onClearClick() {\n\t\tthis.input.value = '';\n\t\tthis.clearFilter();\n\t}\n\n\t_onInputKeyDown(e: KeyboardEvent) {\n\t\tif (e.key == 'Enter') {\n\t\t\tthis.filter(this.input.value);\n\t\t\tthis.deactivate();\n\t\t}\n\t}\n\n\trender = () => html`\n\t\t<div class=\"filter-inner\">\n\t\t\t<input ${ref(this.inputRef)}\n\t\t\t\ttype=\"text\" \n\t\t\t\t@keydown=\"${this._onInputKeyDown}\"\n\t\t\t\tvalue=\"${this.currentValue as string ?? ''}\">\n\t\t\t<og-button icon=\"filter\" color=\"accent\" ${ref(this.filterButtonRef)} @mousedown=\"${this._onFilterClick}\"></og-button>\n\t\t\t<og-button icon=\"xmark\" color=\"red\" ${ref(this.clearButtonRef)} @mousedown=\"${this._onClearClick}\"></og-button>\n\t\t</div>\n\t`;\n\n\tactivate() {\n\t\tsuper.activate();\n\t\tif (this.input) {\n\t\t\tthis.input.value = this.currentValue as string ?? '';\n\t\t}\n\t\tsetTimeout(() => this.input.focus(), 100);\n\t}\n\n\tdeactivate() {\n\t\tsuper.deactivate();\n\t}\n\n}"]}
@@ -1,30 +0,0 @@
1
- import { ColumnSource, RowSource, CellSource, FilterValue, SparklineSource, CommentSource, ConditionalFormatSource, Style, OptionSource } from '@omegagrid/grid-core';
2
- import { ComponentAdapter, CustomProperties } from '@omegagrid/core';
3
- import { Grid } from './ui';
4
- export type RequestFilters = {
5
- filter?: {
6
- c: number;
7
- term: FilterValue;
8
- }[];
9
- order?: {
10
- c: number;
11
- ord: number;
12
- }[];
13
- parent?: {
14
- r: number;
15
- props: CustomProperties;
16
- };
17
- offset?: number;
18
- rows?: RowSource[];
19
- };
20
- export declare abstract class GridAdapter extends ComponentAdapter<Grid> {
21
- abstract getColumns(): null | ColumnSource[] | Promise<ColumnSource[]>;
22
- abstract getRows(filters?: RequestFilters): null | RowSource[] | Promise<RowSource[]>;
23
- getCells(filters?: RequestFilters): null | CellSource[] | Promise<CellSource[]>;
24
- getStyles(): null | Style[] | Promise<Style[]>;
25
- getRules(): null | ConditionalFormatSource | Promise<ConditionalFormatSource>;
26
- getComments(): null | CommentSource[] | Promise<CommentSource[]>;
27
- getSparklines(): null | SparklineSource[] | Promise<SparklineSource[]>;
28
- getOptions(): Partial<OptionSource> | Promise<Partial<OptionSource>>;
29
- }
30
- //# sourceMappingURL=gridAdapter.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"gridAdapter.d.ts","sourceRoot":"","sources":["../src/gridAdapter.ts"],"names":[],"mappings":"AAEA,OAAO,EACN,YAAY,EAAE,SAAS,EAAE,UAAU,EAAE,WAAW,EAChD,eAAe,EAAE,aAAa,EAAE,uBAAuB,EAAE,KAAK,EAC9D,YAAY,EACZ,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACrE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAE5B,MAAM,MAAM,cAAc,GAAG;IAC5B,MAAM,CAAC,E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apter } from '@omegagrid/core';
3
- export class GridAdapter extends ComponentAdapter {
4
- getCells(filters) { return null; }
5
- getStyles() { return null; }
6
- getRules() { return null; }
7
- getComments() { return null; }
8
- getSparklines() { return null; }
9
- getOptions() { return null; }
10
- }
11
- //# sourceMappingURL=gridAdapter.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"gridAdapter.js","sourceRoot":"","sources":["../src/gridAdapter.ts"],"names":[],"mappings":"AAAA,uDAAuD;AAQvD,OAAO,EAAE,gBAAgB,EAAoB,MAAM,iBAAiB,CAAC;AAWrE,MAAM,OAAgB,WAAY,SAAQ,gBAAsB;IAG/D,QAAQ,CAAC,OAAwB,IAA6C,OAAO,IAAI,CAAA,CAAC,CAAC;IAC3F,SAAS,KAAoC,OAAO,IAAI,CAAA,CAAC,CAAC;IAC1D,QAAQ,KAAoE,OAAO,IAAI,CAAA,CAAC,CAAC;IACzF,WAAW,KAAoD,OAAO,IAAI,CAAA,CAAC,CAAC;IAC5E,aAAa,KAAwD,OAAO,IAAI,CAAA,CAAC,CAAC;IAClF,UAAU,KAA2D,OAAO,IAAI,CAAA,CAAC,CAAC;CAClF","sourcesContent":["/* eslint \"@typescript-eslint/no-unused-vars\": \"off\" */\n\nimport { \n\tColumnSource, RowSource, CellSource, FilterValue,\n\tSparklineSource, CommentSource, ConditionalFormatSource, Style,\n\tOptionSource, RowModel\n} from '@omegagrid/grid-core';\n\nimport { ComponentAdapter, CustomProperties } from '@omegagrid/core';\nimport { Grid } from './ui';\n\nexport type RequestFilters = {\n\tfilter?: {c: number, term: FilterValue}[],\n\torder?: {c: number, ord: number}[],\n\tparent?: {r: number, props: CustomProperties},\n\toffset?: number,\n\trows?: RowSource[]\n}\n\nexport abstract class GridAdapter extends ComponentAdapter<Grid> {\n\tabstract getColumns(): null|ColumnSource[]|Promise<ColumnSource[]>;\n\tabstract getRows(filters?: RequestFilters): null|RowSource[]|Promise<RowSource[]>;\n\tgetCells(filters?: RequestFilters): null|CellSource[]|Promise<CellSource[]> { return null }\n\tgetStyles(): null|Style[]|Promise<Style[]> { return null }\n\tgetRules(): null|ConditionalFormatSource|Promise<ConditionalFormatSource> { return null }\n\tgetComments(): null|CommentSource[]|Promise<CommentSource[]> { return null }\n\tgetSparklines(): null|SparklineSource[]|Promise<SparklineSource[]> { return null }\n\tgetOptions(): Partial<OptionSource>|Promise<Partial<OptionSource>> { return null }\n}"]}
@@ -1,4 +0,0 @@
1
- import { Translation } from ".";
2
- declare const labels: Translation;
3
- export default labels;
4
- //# sourceMappingURL=en-us.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"en-us.d.ts","sourceRoot":"","sources":["../../src/i18n/en-us.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,GAAG,CAAC;AAEhC,QAAA,MAAM,MAAM,EAAE,WAEb,CAAC;AAEF,eAAe,MAAM,CAAC"}
@@ -1,5 +0,0 @@
1
- const labels = {
2
- OK: 'OK'
3
- };
4
- export default labels;
5
- //# sourceMappingURL=en-us.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"en-us.js","sourceRoot":"","sources":["../../src/i18n/en-us.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,GAAgB;IAC3B,EAAE,EAAE,IAAI;CACR,CAAC;AAEF,eAAe,MAAM,CAAC","sourcesContent":["import { Translation } from \".\";\n\nconst labels: Translation = {\n\tOK: 'OK'\n};\n\nexport default labels;"]}
@@ -1,5 +0,0 @@
1
- export type Translation = {
2
- OK: string;
3
- };
4
- export declare function getLabels(locale: string): Translation;
5
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/i18n/index.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,WAAW,GAAG;IACzB,EAAE,EAAE,MAAM,CAAA;CACV,CAAA;AAMD,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,GAAI,WAAW,CAEtD"}
@@ -1,8 +0,0 @@
1
- import en_us from "./en-us";
2
- const map = new Map([
3
- ['en-us', en_us]
4
- ]);
5
- export function getLabels(locale) {
6
- return map.get(locale);
7
- }
8
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/i18n/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,SAAS,CAAC;AAM5B,MAAM,GAAG,GAAG,IAAI,GAAG,CAAsB;IACxC,CAAC,OAAO,EAAE,KAAK,CAAC;CAChB,CAAC,CAAC;AAEH,MAAM,UAAU,SAAS,CAAC,MAAc;IACvC,OAAO,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACxB,CAAC","sourcesContent":["import en_us from \"./en-us\";\n\nexport type Translation = {\n\tOK: string\n}\n\nconst map = new Map<string, Translation>([\n\t['en-us', en_us]\n]);\n\nexport function getLabels(locale: string) : Translation {\n\treturn map.get(locale);\n}"]}
package/dist/index.d.ts DELETED
@@ -1,7 +0,0 @@
1
- export * as renderers from './renderers';
2
- export * from './commands';
3
- export * from './ui';
4
- export * from './types';
5
- export * from './gridAdapter';
6
- export * from '@omegagrid/grid-core';
7
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,aAAa,CAAC;AACzC,cAAc,YAAY,CAAC;AAC3B,cAAc,MAAM,CAAC;AACrB,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC"}
package/dist/index.js DELETED
@@ -1,7 +0,0 @@
1
- export * as renderers from './renderers';
2
- export * from './commands';
3
- export * from './ui';
4
- export * from './types';
5
- export * from './gridAdapter';
6
- export * from '@omegagrid/grid-core';
7
- //# sourceMappingURL=index.js.map
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,aAAa,CAAC;AACzC,cAAc,YAAY,CAAC;AAC3B,cAAc,MAAM,CAAC;AACrB,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC","sourcesContent":["export * as renderers from './renderers';\nexport * from './commands';\nexport * from './ui';\nexport * from './types';\nexport * from './gridAdapter';\nexport * from '@omegagrid/grid-core';\n"]}
@@ -1,3 +0,0 @@
1
- import { CellModel } from "@omegagrid/grid-core";
2
- export declare function ActionRenderer(div: HTMLDivElement, cell: CellModel): HTMLDivElement;
3
- //# sourceMappingURL=ActionRenderer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ActionRenderer.d.ts","sourceRoot":"","sources":["../../src/renderers/ActionRenderer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAkC7D,wBAAgB,cAAc,CAAC,GAAG,EAAE,cAAc,EAAE,IAAI,EAAE,SAAS,GAAI,cAAc,CAwCpF"}
@@ -1,68 +0,0 @@
1
- import { html, render } from "lit";
2
- import { map } from "lit/directives/map.js";
3
- import { choose } from "lit/directives/choose.js";
4
- import { GridEvent } from "../ui";
5
- import { BaseRenderer } from "./BaseRenderer";
6
- function _onButtonClick(e, grid, cell, action) {
7
- e.stopPropagation();
8
- grid.selecting.select(cell.range);
9
- grid.dispatchEvent(new GridEvent('action', { grid, cell, action: action.action }));
10
- }
11
- function _onMenuSelect(e, grid, cell, cellAction) {
12
- e.stopPropagation();
13
- const action = [cellAction.action, e.item.key || e.item.k].filter(Boolean).join('.');
14
- grid.dispatchEvent(new GridEvent('action', { grid, cell, action }));
15
- }
16
- function showTooltip(grid, action) {
17
- if (!action.title) {
18
- hideTooltip(grid);
19
- return;
20
- }
21
- grid.tooltip.content = action.title;
22
- grid.tooltip.attachToCursor();
23
- }
24
- function hideTooltip(grid) {
25
- grid.tooltip?.hide();
26
- }
27
- export function ActionRenderer(div, cell) {
28
- const actions = ((cell.editorContent ?? cell.value) || []);
29
- div.innerHTML = '';
30
- const grid = this.grid;
31
- render(html `
32
- <div class="actions">
33
- ${map(actions, action => choose(action.type || 'button', [
34
- ['button', () => html `
35
- <og-button
36
- @pointermove="${(e) => e.stopPropagation()}"
37
- @pointerdown="${(e) => e.stopPropagation()}"
38
- @click="${(e) => _onButtonClick(e, grid, cell, action)}"
39
- @mouseenter="${() => showTooltip(grid, action)}"
40
- @mouseout="${() => hideTooltip(grid)}"
41
- .icon="${action.icon}"
42
- .text="${action.text}"
43
- .color="${action.color}"
44
- style="${action.text == null ? '' : 'width: auto'}">
45
- </og-button>
46
- `],
47
- ['menu', () => html `
48
- <og-dropdown-menu
49
- noCaret
50
- dynamicWidth
51
- alignment="left"
52
- @pointermove="${(e) => e.stopPropagation()}"
53
- @pointerdown="${(e) => e.stopPropagation()}"
54
- @click="${(e) => _onButtonClick(e, grid, cell, action)}"
55
- @menu.select="${(e) => _onMenuSelect(e, grid, cell, action)}"
56
- @mouseenter="${() => showTooltip(grid, action)}"
57
- @mouseout="${() => hideTooltip(grid)}"
58
- .icon="${action.icon}"
59
- .color="${action.color}"
60
- .items="${action.items}">
61
- </og-dropdown-menu>
62
- `]
63
- ]))}
64
- </div>
65
- `, div);
66
- return BaseRenderer.call(this, div, cell);
67
- }
68
- //# sourceMappingURL=ActionRenderer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ActionRenderer.js","sourceRoot":"","sources":["../../src/renderers/ActionRenderer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,KAAK,CAAC;AACnC,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAQ,SAAS,EAAS,MAAM,OAAO,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAA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GAAG,EAAE,CAAC,WAAW,CAAC,IAAI,EAAE,MAAM,CAAC;mBACjC,GAAG,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC;eAC3B,MAAM,CAAC,IAAI;gBACV,MAAM,CAAC,KAAK;gBACZ,MAAM,CAAC,KAAK;;KAEvB,CAAC;KACF,CAAC,CAAC;;EAEJ,EAAE,GAAG,CAAC,CAAC;IACR,OAAO,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;AAC3C,CAAC","sourcesContent":["import { CellAction, CellModel } from \"@omegagrid/grid-core\";\nimport { html, render } from \"lit\";\nimport { map } from \"lit/directives/map.js\";\nimport { choose } from \"lit/directives/choose.js\";\nimport { Grid, GridEvent, Table } from \"../ui\";\nimport { BaseRenderer } from \"./BaseRenderer\";\nimport { MenuEvent } from \"@omegagrid/core\";\n\nfunction _onButtonClick(e: Event, grid: Grid, cell: CellModel, action: CellAction) {\n\te.stopPropagation();\n\tgrid.selecting.select(cell.range);\n\tgrid.dispatchEvent(new GridEvent('action', { grid, cell, action: action.action }));\n}\n\nfunction _onMenuSelect(e: MenuEvent, grid: Grid, cell: CellModel, cellAction: CellAction) {\n\te.stopPropagation();\n\tconst action = [cellAction.action, e.item.key || e.item.k].filter(Boolean).join('.');\n\tgrid.dispatchEvent(new GridEvent('action', { grid, cell, action }));\n}\n\nfunction showTooltip(grid: Grid, action: CellAction) {\n\tif (!action.title) {\n\t\thideTooltip(grid);\n\t\treturn;\n\t}\n\n\tgrid.tooltip.content = action.title;\n\tgrid.tooltip.attachToCursor();\n}\n\nfunction hideTooltip(grid: Grid) {\n\tgrid.tooltip?.hide();\n}\n\nexport function ActionRenderer(div: HTMLDivElement, cell: CellModel) : HTMLDivElement {\n\tconst actions = ((cell.editorContent ?? cell.value) || []) as CellAction[];\n\tdiv.innerHTML = '';\n\tconst grid = (this as Table).grid;\n\trender(html`\n\t\t<div class=\"actions\">\n\t\t\t${map(actions, action => choose(action.type || 'button', [\n\t\t\t\t['button', () => html`\n\t\t\t\t\t<og-button\n\t\t\t\t\t\t@pointermove=\"${(e: PointerEvent) => e.stopPropagation()}\"\n\t\t\t\t\t\t@pointerdown=\"${(e: PointerEvent) => e.stopPropagation()}\"\n\t\t\t\t\t\t@click=\"${(e: PointerEvent) => _onButtonClick(e, grid, cell, action)}\"\n\t\t\t\t\t\t@mouseenter=\"${() => showTooltip(grid, action)}\"\n\t\t\t\t\t\t@mouseout=\"${() => hideTooltip(grid)}\"\n\t\t\t\t\t\t.icon=\"${action.icon}\"\n\t\t\t\t\t\t.text=\"${action.text}\"\n\t\t\t\t\t\t.color=\"${action.color}\"\n\t\t\t\t\t\tstyle=\"${action.text == null ? '' : 'width: auto'}\">\n\t\t\t\t\t</og-button>\n\t\t\t\t`],\n\t\t\t\t['menu', () => html`\n\t\t\t\t\t<og-dropdown-menu\n\t\t\t\t\t\tnoCaret\n\t\t\t\t\t\tdynamicWidth\n\t\t\t\t\t\talignment=\"left\"\n\t\t\t\t\t\t@pointermove=\"${(e: PointerEvent) => e.stopPropagation()}\"\n\t\t\t\t\t\t@pointerdown=\"${(e: PointerEvent) => e.stopPropagation()}\"\n\t\t\t\t\t\t@click=\"${(e: PointerEvent) => _onButtonClick(e, grid, cell, action)}\"\n\t\t\t\t\t\t@menu.select=\"${(e: MenuEvent) => _onMenuSelect(e, grid, cell, action)}\"\n\t\t\t\t\t\t@mouseenter=\"${() => showTooltip(grid, action)}\"\n\t\t\t\t\t\t@mouseout=\"${() => hideTooltip(grid)}\"\n\t\t\t\t\t\t.icon=\"${action.icon}\"\n\t\t\t\t\t\t.color=\"${action.color}\"\n\t\t\t\t\t\t.items=\"${action.items}\">\n\t\t\t\t\t</og-dropdown-menu>\n\t\t\t\t`]\n\t\t\t]))}\n\t\t</div>\n\t`, div);\n\treturn BaseRenderer.call(this, div, cell);\n}"]}
@@ -1,6 +0,0 @@
1
- import { CSSStyle } from "@omegagrid/grid-core";
2
- import { CellModel } from "@omegagrid/grid-core";
3
- import { CellRendererOptions } from "../types";
4
- export declare const applyStyle: (div: HTMLDivElement, style: CSSStyle) => void;
5
- export declare function BaseRenderer(div: HTMLDivElement, cell: CellModel, options?: CellRendererOptions): HTMLDivElement;
6
- //# sourceMappingURL=BaseRenderer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BaseRenderer.d.ts","sourceRoot":"","sources":["../../src/renderers/BaseRenderer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAGjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAE/C,eAAO,MAAM,UAAU,GAAI,KAAK,cAAc,EAAE,OAAO,QAAQ,SAI9D,CAAC;AAEF,wBAAgB,YAAY,CAAC,GAAG,EAAE,cAAc,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAAI,cAAc,CA+CjH"}
@@ -1,56 +0,0 @@
1
- import { dom, Expander } from "@omegagrid/core";
2
- import { SparklineRenderer } from "./SparklineRenderer";
3
- export const applyStyle = (div, style) => {
4
- for (const k in style) {
5
- div.style[k] = style[k];
6
- }
7
- };
8
- export function BaseRenderer(div, cell, options) {
9
- if (cell.hasError && !cell.error.handled) {
10
- div.innerHTML = `<span style="color:#fff;background:#f00">!${cell.error.message}</span>`;
11
- }
12
- if (cell.cssStyle)
13
- applyStyle(div, cell.cssStyle);
14
- if (cell.hasSparkline)
15
- SparklineRenderer(div, cell);
16
- let indent = cell.calculatedIndent;
17
- if (indent > 0)
18
- indent *= cell.model.options.cellIndentFactor ?? 1;
19
- if (cell.column.levelButtons) {
20
- if (cell.row.hasChildren) {
21
- const expander = new Expander();
22
- expander.state = cell.row.collapsed ? 'closed' : 'open';
23
- expander.addEventListener('toggle', () => this.grid.rendering.toggleRow(cell.row.index));
24
- expander.addEventListener('click', e => e.stopPropagation());
25
- div.appendChild(expander);
26
- dom.setPosition(expander, { l: 4 + indent, t: (cell.model.options.rowHeight || 20) / 2 - 6 });
27
- }
28
- indent += 20;
29
- }
30
- if (indent > 0)
31
- div.style.paddingLeft = dom.numToPixels(indent);
32
- if (cell.hasComment || cell.hasTooltip || (cell.clickable && (cell.value !== null || cell.model.options.emptyClickable))) {
33
- if (!(options && options.export)) {
34
- const corner = dom.createElement('div');
35
- corner.className = 'crn';
36
- div.appendChild(corner);
37
- if (cell.hasComment)
38
- div.classList.add('cmt');
39
- if (cell.hasTooltip)
40
- div.classList.add('tt');
41
- if (cell.clickable)
42
- div.classList.add('clc');
43
- }
44
- }
45
- if (cell.composedStyle && cell.composedStyle.icon) {
46
- const icon = dom.createElement('og-icon');
47
- icon.icon = cell.composedStyle.icon;
48
- dom.setPosition(icon, { l: 4, t: 2 });
49
- div.appendChild(icon);
50
- }
51
- const afterRenderer = cell.afterRenderer;
52
- if (afterRenderer)
53
- afterRenderer(div, cell);
54
- return div;
55
- }
56
- //# sourceMappingURL=BaseRenderer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BaseRenderer.js","sourceRoot":"","sources":["../../src/renderers/BaseRenderer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAQ,MAAM,iBAAiB,CAAC;AAItD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAGxD,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,GAAmB,EAAE,KAAe,EAAE,EAAE;IAClE,KAAK,MAAM,CAAC,IAAI,KAAK,EAAE,CAAC;QACtB,GAAG,CAAC,KAAkB,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;IACvC,CAAC;AACF,CAAC,CAAC;AAEF,MAAM,UAAU,YAAY,CAAC,GAAmB,EAAE,IAAe,EAAE,OAA6B;IAC/F,IAAI,IAAI,CAAC,QAAQ,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO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C,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IACvB,CAAC;IAED,MAAM,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC;IACzC,IAAI,aAAa;QAAE,aAAa,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;IAC5C,OAAO,GAAG,CAAC;AACZ,CAAC","sourcesContent":["import { dom, Expander, Icon } from \"@omegagrid/core\";\nimport { CSSStyle } from \"@omegagrid/grid-core\";\nimport { CellModel } from \"@omegagrid/grid-core\";\nimport { Table } from \"../ui\";\nimport { SparklineRenderer } from \"./SparklineRenderer\";\nimport { CellRendererOptions } from \"../types\";\n\nexport const applyStyle = (div: HTMLDivElement, style: CSSStyle) => {\n\tfor (const k in style) {\n\t\t(div.style as CSSStyle)[k] = style[k];\n\t}\n};\n\nexport function BaseRenderer(div: HTMLDivElement, cell: CellModel, options?: CellRendererOptions) : HTMLDivElement {\n\tif (cell.hasError && !cell.error.handled) {\n\t\tdiv.innerHTML = `<span style=\"color:#fff;background:#f00\">!${cell.error.message}</span>`;\n\t}\n\tif (cell.cssStyle) applyStyle(div, cell.cssStyle);\n\tif (cell.hasSparkline) SparklineRenderer(div, cell);\n\t\n\tlet indent = cell.calculatedIndent;\n\tif (indent > 0) indent *= cell.model.options.cellIndentFactor ?? 1;\n\n\tif (cell.column.levelButtons) {\n\t\tif (cell.row.hasChildren) {\n\t\t\tconst expander = new Expander();\n\t\t\texpander.state = cell.row.collapsed ? 'closed' : 'open';\n\t\t\texpander.addEventListener('toggle', () => (this as Table).grid.rendering.toggleRow(cell.row.index));\n\t\t\texpander.addEventListener('click', e => e.stopPropagation());\n\t\t\tdiv.appendChild(expander);\n\t\t\tdom.setPosition(expander, {l: 4 + indent, t: (cell.model.options.rowHeight || 20) / 2 - 6});\n\t\t}\n\t\tindent += 20;\n\t}\n\n\tif (indent > 0) div.style.paddingLeft = dom.numToPixels(indent);\n\n\tif (cell.hasComment || cell.hasTooltip || (\n\t\tcell.clickable && (cell.value !== null || cell.model.options.emptyClickable)\n\t)) {\n\t\tif (!(options && options.export)) {\n\t\t\tconst corner = dom.createElement<HTMLDivElement>('div');\n\t\t\tcorner.className = 'crn';\n\t\t\tdiv.appendChild(corner);\n\t\t\tif (cell.hasComment) div.classList.add('cmt');\n\t\t\tif (cell.hasTooltip) div.classList.add('tt');\n\t\t\tif (cell.clickable) div.classList.add('clc');\t\n\t\t}\n\t}\n\n\tif (cell.composedStyle && cell.composedStyle.icon) {\n\t\tconst icon = dom.createElement<Icon>('og-icon');\n\t\ticon.icon = cell.composedStyle.icon;\n\t\tdom.setPosition(icon, {l: 4, t: 2});\n\t\tdiv.appendChild(icon);\n\t}\n\n\tconst afterRenderer = cell.afterRenderer;\n\tif (afterRenderer) afterRenderer(div, cell);\n\treturn div;\n}"]}
@@ -1,4 +0,0 @@
1
- import { CellModel } from "@omegagrid/grid-core";
2
- import { CellRendererOptions } from "../types";
3
- export declare function CheckboxRenderer(div: HTMLDivElement, cell: CellModel, options?: CellRendererOptions): HTMLDivElement;
4
- //# sourceMappingURL=CheckboxRenderer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CheckboxRenderer.d.ts","sourceRoot":"","sources":["../../src/renderers/CheckboxRenderer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAIjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAE/C,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,cAAc,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAAI,cAAc,CAmBrH"}
@@ -1,22 +0,0 @@
1
- import { dom } from "@omegagrid/core";
2
- import { BaseRenderer } from "./BaseRenderer";
3
- export function CheckboxRenderer(div, cell, options) {
4
- div = BaseRenderer.call(this, div, cell, options);
5
- div.style.textAlign = 'center';
6
- div.innerHTML = '';
7
- const checkbox = dom.createElement('og-checkbox');
8
- checkbox.addEventListener('mousedown', (e) => {
9
- e.stopPropagation();
10
- if (!cell.editable)
11
- return;
12
- const grid = this.grid;
13
- const newValue = checkbox.value != 'checked';
14
- grid.editing.updateCell(cell, newValue);
15
- checkbox.value = newValue ? 'checked' : 'none';
16
- });
17
- checkbox.style.cursor = 'pointer';
18
- checkbox.value = cell.value ? 'checked' : 'none';
19
- div.appendChild(checkbox);
20
- return div;
21
- }
22
- //# sourceMappingURL=CheckboxRenderer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CheckboxRenderer.js","sourceRoot":"","sources":["../../src/renderers/CheckboxRenderer.ts"],"names":[],"mappings":"AACA,OAAO,EAAY,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAI9C,MAAM,UAAU,gBAAgB,CAAC,GAAmB,EAAE,IAAe,EAAE,OAA6B;IACnG,GAAG,GAAG,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;IAClD,GAAG,CAAC,KAAK,CAAC,SAAS,GAAG,QAAQ,CAAC;IAC/B,GAAG,CAAC,SAAS,GAAG,EAAE,CAAC;IACnB,MAAM,QAAQ,GAAG,GAAG,CAAC,aAAa,CAAW,aAAa,CAAC,CAAC;IAC5D,QAAQ,CAAC,gBAAgB,CAAC,WAAW,EAAE,CAAC,CAAe,EAAE,EAAE;QAC1D,CAAC,CAAC,eAAe,EAAE,CAAC;QACpB,IAAI,CAAC,IAAI,CAAC,QAAQ;YAAE,OAAO;QAC3B,MAAM,IAAI,GAAI,IAAc,CAAC,IAAI,CAAC;QAClC,MAAM,QAAQ,GAAG,QAAQ,CAAC,KAAK,IAAI,SAAS,CAAC;QAC7C,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;QACxC,QAAQ,CAAC,KAAK,GAAG,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC;IAChD,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC;IAClC,QAAQ,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC;IACjD,GAAG,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;IAE1B,OAAO,GAAG,CAAC;AACZ,CAAC","sourcesContent":["import { CellModel } from \"@omegagrid/grid-core\";\nimport { Checkbox, dom } from \"@omegagrid/core\";\nimport { BaseRenderer } from \"./BaseRenderer\";\nimport { Table } from \"../ui\";\nimport { CellRendererOptions } from \"../types\";\n\nexport function CheckboxRenderer(div: HTMLDivElement, cell: CellModel, options?: CellRendererOptions) : HTMLDivElement {\n\tdiv = BaseRenderer.call(this, div, cell, options);\n\tdiv.style.textAlign = 'center';\n\tdiv.innerHTML = '';\n\tconst checkbox = dom.createElement<Checkbox>('og-checkbox');\n\tcheckbox.addEventListener('mousedown', (e: PointerEvent) => {\n\t\te.stopPropagation();\n\t\tif (!cell.editable) return;\n\t\tconst grid = (this as Table).grid;\n\t\tconst newValue = checkbox.value != 'checked';\n\t\tgrid.editing.updateCell(cell, newValue);\n\t\tcheckbox.value = newValue ? 'checked' : 'none';\n\t});\n\n\tcheckbox.style.cursor = 'pointer';\n\tcheckbox.value = cell.value ? 'checked' : 'none';\n\tdiv.appendChild(checkbox);\n\t\n\treturn div;\n}"]}
@@ -1,4 +0,0 @@
1
- import { CellModel } from "@omegagrid/grid-core";
2
- import { CellRendererOptions } from "../types";
3
- export declare function DateTimeRenderer(div: HTMLDivElement, cell: CellModel, options?: CellRendererOptions): HTMLDivElement;
4
- //# sourceMappingURL=DateTimeRenderer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DateTimeRenderer.d.ts","sourceRoot":"","sources":["../../src/renderers/DateTimeRenderer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAG/C,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,cAAc,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAAI,cAAc,CAkBrH"}
@@ -1,21 +0,0 @@
1
- import { BaseRenderer } from "./BaseRenderer";
2
- import { dom } from "@omegagrid/core";
3
- export function DateTimeRenderer(div, cell, options) {
4
- const opts = cell.model.options;
5
- try {
6
- div.textContent = cell.value
7
- ? opts.dateFormatter(cell.value, cell.format)
8
- : '';
9
- }
10
- catch (_err) {
11
- div.textContent = '!invalid format';
12
- }
13
- if (cell.editable && opts.editing?.dateCalendarEditor) {
14
- const triangle = dom.createElement('div');
15
- triangle.className = 'triangle-down';
16
- dom.setPosition(triangle, { t: 8, r: 8 });
17
- div.appendChild(triangle);
18
- }
19
- return BaseRenderer.call(this, div, cell, options);
20
- }
21
- //# sourceMappingURL=DateTimeRenderer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DateTimeRenderer.js","sourceRoot":"","sources":["../../src/renderers/DateTimeRenderer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAEtC,MAAM,UAAU,gBAAgB,CAAC,GAAmB,EAAE,IAAe,EAAE,OAA6B;IACnG,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC;IAChC,IAAI,CAAC;QACJ,GAAG,CAAC,WAAW,GAAG,IAAI,CAAC,KAAK;YAC3B,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,KAAoB,EAAE,IAAI,CAAC,MAAM,CAAC;YAC5D,CAAC,CAAC,EAAE,CAAC;IACP,CAAC;IAAC,OAAO,IAAI,EAAE,CAAC;QACf,GAAG,CAAC,WAAW,GAAG,iBAAiB,CAAC;IACrC,CAAC;IAED,IAAI,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,OAAO,EAAE,kBAAkB,EAAE,CAAC;QACvD,MAAM,QAAQ,GAAG,GAAG,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QAC1C,QAAQ,CAAC,SAAS,GAAG,eAAe,CAAC;QACrC,GAAG,CAAC,WAAW,CAAC,QAAQ,EAAE,EAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAC,CAAC,CAAC;QACxC,GAAG,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;IAC3B,CAAC;IAED,OAAO,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;AACpD,CAAC","sourcesContent":["import { CellModel } from \"@omegagrid/grid-core\";\nimport { BaseRenderer } from \"./BaseRenderer\";\nimport { CellRendererOptions } from \"../types\";\nimport { dom } from \"@omegagrid/core\";\n\nexport function DateTimeRenderer(div: HTMLDivElement, cell: CellModel, options?: CellRendererOptions) : HTMLDivElement {\n\tconst opts = cell.model.options;\n\ttry {\n\t\tdiv.textContent = cell.value \n\t\t\t? opts.dateFormatter(cell.value as Date|string, cell.format)\n\t\t\t: '';\t\n\t} catch (_err) {\n\t\tdiv.textContent = '!invalid format';\n\t}\n\t\n\tif (cell.editable && opts.editing?.dateCalendarEditor) {\n\t\tconst triangle = dom.createElement('div');\n\t\ttriangle.className = 'triangle-down';\n\t\tdom.setPosition(triangle, {t: 8, r: 8});\n\t\tdiv.appendChild(triangle);\n\t}\n\n\treturn BaseRenderer.call(this, div, cell, options);\n}"]}
@@ -1,4 +0,0 @@
1
- import { CellModel } from "@omegagrid/grid-core";
2
- import { CellRendererOptions } from "../types";
3
- export declare function DropdownRenderer(div: HTMLDivElement, cell: CellModel, options?: CellRendererOptions): HTMLDivElement;
4
- //# sourceMappingURL=DropdownRenderer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DropdownRenderer.d.ts","sourceRoot":"","sources":["../../src/renderers/DropdownRenderer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAE/C,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,cAAc,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAAI,cAAc,CAcrH"}
@@ -1,18 +0,0 @@
1
- import { dom } from "@omegagrid/core";
2
- import { BaseRenderer } from "./BaseRenderer";
3
- export function DropdownRenderer(div, cell, options) {
4
- if (!options || !(options.default === false)) {
5
- if (cell.displayValue != null)
6
- div.textContent = cell.displayValue;
7
- else {
8
- const formatter = cell.valueFormatter;
9
- div.textContent = (formatter ? formatter(cell.value) : cell.value) ?? '';
10
- }
11
- }
12
- const triangle = dom.createElement('div');
13
- triangle.className = 'triangle-down';
14
- dom.setPosition(triangle, { t: 8, r: 8 });
15
- div.appendChild(triangle);
16
- return BaseRenderer.call(this, div, cell, options);
17
- }
18
- //# sourceMappingURL=DropdownRenderer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DropdownRenderer.js","sourceRoot":"","sources":["../../src/renderers/DropdownRenderer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAEtC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAG9C,MAAM,UAAU,gBAAgB,CAAC,GAAmB,EAAE,IAAe,EAAE,OAA6B;IACnG,IAAI,CAAC,OAAO,IAAI,CAAC,CAAC,OAAO,CAAC,OAAO,KAAK,KAAK,CAAC,EAAE,CAAC;QAC9C,IAAI,IAAI,CAAC,YAAY,IAAI,IAAI;YAAE,GAAG,CAAC,WAAW,GAAG,IAAI,CAAC,YAAY,CAAC;aAC9D,CAAC;YACL,MAAM,SAAS,GAAG,IAAI,CAAC,cAAc,CAAC;YACtC,GAAG,CAAC,WAAW,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,KAAe,CAAC,CAAC,CAAC,CAAE,IAAI,CAAC,KAAgB,CAAC,IAAI,EAAE,CAAC;QAChG,CAAC;IACF,CAAC;IAED,MAAM,QAAQ,GAAG,GAAG,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAC1C,QAAQ,CAAC,SAAS,GAAG,eAAe,CAAC;IACrC,GAAG,CAAC,WAAW,CAAC,QAAQ,EAAE,EAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAC,CAAC,CAAC;IACxC,GAAG,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;IAC1B,OAAO,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;AACpD,CAAC","sourcesContent":["import { dom } from \"@omegagrid/core\";\nimport { CellModel } from \"@omegagrid/grid-core\";\nimport { BaseRenderer } from \"./BaseRenderer\";\nimport { CellRendererOptions } from \"../types\";\n\nexport function DropdownRenderer(div: HTMLDivElement, cell: CellModel, options?: CellRendererOptions) : HTMLDivElement {\n\tif (!options || !(options.default === false)) {\n\t\tif (cell.displayValue != null) div.textContent = cell.displayValue;\n\t\telse {\n\t\t\tconst formatter = cell.valueFormatter;\n\t\t\tdiv.textContent = (formatter ? formatter(cell.value as string) : (cell.value as string)) ?? '';\n\t\t}\n\t}\n\n\tconst triangle = dom.createElement('div');\n\ttriangle.className = 'triangle-down';\n\tdom.setPosition(triangle, {t: 8, r: 8});\n\tdiv.appendChild(triangle);\n\treturn BaseRenderer.call(this, div, cell, options);\n}"]}
@@ -1,4 +0,0 @@
1
- import { CellModel } from "@omegagrid/grid-core";
2
- import { CellRendererOptions } from "../types";
3
- export declare function GeneralRenderer(div: HTMLDivElement, cell: CellModel, options?: CellRendererOptions): HTMLDivElement;
4
- //# sourceMappingURL=GeneralRenderer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GeneralRenderer.d.ts","sourceRoot":"","sources":["../../src/renderers/GeneralRenderer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAGjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAE/C,wBAAgB,eAAe,CAAC,GAAG,EAAE,cAAc,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAAI,cAAc,CAOpH"}
@@ -1,12 +0,0 @@
1
- import { NumberRenderer } from "./NumberRenderer";
2
- import { TextRenderer } from "./TextRenderer";
3
- export function GeneralRenderer(div, cell, options) {
4
- const value = cell.value;
5
- if (!isNaN(value) && value !== '') {
6
- return NumberRenderer.call(this, div, cell, options);
7
- }
8
- else {
9
- return TextRenderer.call(this, div, cell, options);
10
- }
11
- }
12
- //# sourceMappingURL=GeneralRenderer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GeneralRenderer.js","sourceRoot":"","sources":["../../src/renderers/GeneralRenderer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAG9C,MAAM,UAAU,eAAe,CAAC,GAAmB,EAAE,IAAe,EAAE,OAA6B;IAClG,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;IACzB,IAAI,CAAC,KAAK,CAAC,KAAe,CAAC,IAAI,KAAK,KAAK,EAAE,EAAE,CAAC;QAC7C,OAAO,cAAc,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;IACtD,CAAC;SAAM,CAAC;QACP,OAAO,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;IACpD,CAAC;AACF,CAAC","sourcesContent":["import { CellModel } from \"@omegagrid/grid-core\";\nimport { NumberRenderer } from \"./NumberRenderer\";\nimport { TextRenderer } from \"./TextRenderer\";\nimport { CellRendererOptions } from \"../types\";\n\nexport function GeneralRenderer(div: HTMLDivElement, cell: CellModel, options?: CellRendererOptions) : HTMLDivElement {\n\tconst value = cell.value;\n\tif (!isNaN(value as number) && value !== '') {\n\t\treturn NumberRenderer.call(this, div, cell, options);\n\t} else {\n\t\treturn TextRenderer.call(this, div, cell, options);\n\t}\n}"]}
@@ -1,4 +0,0 @@
1
- import { CellModel } from "@omegagrid/grid-core";
2
- import { CellRendererOptions } from "../types";
3
- export declare function HtmlRenderer(div: HTMLDivElement, cell: CellModel, options?: CellRendererOptions): HTMLDivElement;
4
- //# sourceMappingURL=HtmlRenderer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"HtmlRenderer.d.ts","sourceRoot":"","sources":["../../src/renderers/HtmlRenderer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAE/C,wBAAgB,YAAY,CAAC,GAAG,EAAE,cAAc,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAAI,cAAc,CAGjH"}
@@ -1,6 +0,0 @@
1
- import { BaseRenderer } from "./BaseRenderer";
2
- export function HtmlRenderer(div, cell, options) {
3
- div.innerHTML = cell.value;
4
- return BaseRenderer.call(this, div, cell, options);
5
- }
6
- //# sourceMappingURL=HtmlRenderer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"HtmlRenderer.js","sourceRoot":"","sources":["../../src/renderers/HtmlRenderer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAG9C,MAAM,UAAU,YAAY,CAAC,GAAmB,EAAE,IAAe,EAAE,OAA6B;IAC/F,GAAG,CAAC,SAAS,GAAG,IAAI,CAAC,KAAe,CAAC;IACrC,OAAO,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;AACpD,CAAC","sourcesContent":["import { CellModel } from \"@omegagrid/grid-core\";\nimport { BaseRenderer } from \"./BaseRenderer\";\nimport { CellRendererOptions } from \"../types\";\n\nexport function HtmlRenderer(div: HTMLDivElement, cell: CellModel, options?: CellRendererOptions) : HTMLDivElement {\n\tdiv.innerHTML = cell.value as string;\n\treturn BaseRenderer.call(this, div, cell, options);\n}"]}
@@ -1,4 +0,0 @@
1
- import { CellModel } from "@omegagrid/grid-core";
2
- import { CellRendererOptions } from "../types";
3
- export declare function NumberRenderer(div: HTMLDivElement, cell: CellModel, options?: CellRendererOptions): HTMLDivElement;
4
- //# sourceMappingURL=NumberRenderer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"NumberRenderer.d.ts","sourceRoot":"","sources":["../../src/renderers/NumberRenderer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAE/C,wBAAgB,cAAc,CAAC,GAAG,EAAE,cAAc,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAAI,cAAc,CAYnH"}
@@ -1,14 +0,0 @@
1
- import { BaseRenderer } from "./BaseRenderer";
2
- export function NumberRenderer(div, cell, options) {
3
- if (!cell.cssStyle || !cell.cssStyle.textAlign) {
4
- div.style.textAlign = 'right';
5
- }
6
- try {
7
- div.innerHTML = cell.formattedValue;
8
- }
9
- catch (error) {
10
- div.textContent = (cell.value ?? '').toString();
11
- }
12
- return BaseRenderer.call(this, div, cell, options);
13
- }
14
- //# sourceMappingURL=NumberRenderer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"NumberRenderer.js","sourceRoot":"","sources":["../../src/renderers/NumberRenderer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAG9C,MAAM,UAAU,cAAc,CAAC,GAAmB,EAAE,IAAe,EAAE,OAA6B;IACjG,IAAI,CAAC,IAAI,CAAC,QAAQ,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE,CAAC;QAChD,GAAG,CAAC,KAAK,CAAC,SAAS,GAAG,OAAO,CAAC;IAC/B,CAAC;IAED,IAAI,CAAC;QACJ,GAAG,CAAC,SAAS,GAAG,IAAI,CAAC,cAAc,CAAC;IACrC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QAChB,GAAG,CAAC,WAAW,GAAG,CAAC,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC;IACjD,CAAC;IAED,OAAO,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;AACpD,CAAC","sourcesContent":["import { CellModel } from \"@omegagrid/grid-core\";\nimport { BaseRenderer } from \"./BaseRenderer\";\nimport { CellRendererOptions } from \"../types\";\n\nexport function NumberRenderer(div: HTMLDivElement, cell: CellModel, options?: CellRendererOptions) : HTMLDivElement {\n\tif (!cell.cssStyle || !cell.cssStyle.textAlign) {\n\t\tdiv.style.textAlign = 'right';\n\t}\n\n\ttry {\n\t\tdiv.innerHTML = cell.formattedValue;\n\t} catch (error) {\n\t\tdiv.textContent = (cell.value ?? '').toString();\n\t}\n\t\n\treturn BaseRenderer.call(this, div, cell, options);\n}"]}
@@ -1,3 +0,0 @@
1
- import { CellModel } from "@omegagrid/grid-core";
2
- export declare function SparklineRenderer(div: HTMLDivElement, cell: CellModel): HTMLDivElement;
3
- //# sourceMappingURL=SparklineRenderer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SparklineRenderer.d.ts","sourceRoot":"","sources":["../../src/renderers/SparklineRenderer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAGjD,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,cAAc,EAAE,IAAI,EAAE,SAAS,GAAI,cAAc,CAKvF"}