slick-table 0.0.13 → 0.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (337) hide show
  1. package/package.json +2 -1
  2. package/.prettierignore +0 -2
  3. package/.prettierrc +0 -22
  4. package/eslint.config.js +0 -23
  5. package/index.html +0 -13
  6. package/src/App.tsx +0 -9
  7. package/src/app/styles/global.scss +0 -31
  8. package/src/app/styles/slickgrid.scss +0 -13
  9. package/src/app/types/index.d.ts +0 -9
  10. package/src/entities/portal/index.ts +0 -3
  11. package/src/entities/portal/lib/index.ts +0 -1
  12. package/src/entities/portal/lib/visibility/index.ts +0 -1
  13. package/src/entities/portal/lib/visibility/makeVisible.ts +0 -9
  14. package/src/entities/portal/model/index.ts +0 -1
  15. package/src/entities/portal/model/portalId.ts +0 -1
  16. package/src/entities/portal/ui/Overlay/Overlay.style.ts +0 -14
  17. package/src/entities/portal/ui/Overlay/Overlay.test.tsx +0 -19
  18. package/src/entities/portal/ui/Overlay/Overlay.tsx +0 -20
  19. package/src/entities/portal/ui/Overlay/index.ts +0 -1
  20. package/src/entities/portal/ui/Portal.style.ts +0 -20
  21. package/src/entities/portal/ui/Portal.test.tsx +0 -48
  22. package/src/entities/portal/ui/Portal.tsx +0 -26
  23. package/src/entities/portal/ui/index.ts +0 -1
  24. package/src/features/column-filters/index.ts +0 -1
  25. package/src/features/column-filters/lib/filter/applyFilter.ts +0 -25
  26. package/src/features/column-filters/lib/filter/index.ts +0 -1
  27. package/src/features/column-filters/lib/hooks/index.ts +0 -2
  28. package/src/features/column-filters/lib/hooks/useOpenMenu.ts +0 -43
  29. package/src/features/column-filters/lib/hooks/useSubscribeToEvent.ts +0 -17
  30. package/src/features/column-filters/lib/index.ts +0 -4
  31. package/src/features/column-filters/lib/props/datePickerProps.tsx +0 -11
  32. package/src/features/column-filters/lib/props/index.ts +0 -1
  33. package/src/features/column-filters/lib/select/firstIn.ts +0 -22
  34. package/src/features/column-filters/lib/select/index.ts +0 -1
  35. package/src/features/column-filters/model/consts/defaultValue.ts +0 -6
  36. package/src/features/column-filters/model/consts/index.ts +0 -2
  37. package/src/features/column-filters/model/consts/label.ts +0 -5
  38. package/src/features/column-filters/model/index.ts +0 -2
  39. package/src/features/column-filters/model/types/IProps.ts +0 -9
  40. package/src/features/column-filters/model/types/index.ts +0 -1
  41. package/src/features/column-filters/ui/BooleanInput/BooleanInput.style.ts +0 -10
  42. package/src/features/column-filters/ui/BooleanInput/BooleanInput.tsx +0 -53
  43. package/src/features/column-filters/ui/BooleanInput/index.ts +0 -1
  44. package/src/features/column-filters/ui/ButtonReset/ButtonReset.style.ts +0 -10
  45. package/src/features/column-filters/ui/ButtonReset/ButtonReset.tsx +0 -39
  46. package/src/features/column-filters/ui/ButtonReset/index.ts +0 -1
  47. package/src/features/column-filters/ui/ColumnFilters.style.ts +0 -12
  48. package/src/features/column-filters/ui/ColumnFilters.tsx +0 -41
  49. package/src/features/column-filters/ui/DateBetween/DateBetween.tsx +0 -52
  50. package/src/features/column-filters/ui/DateBetween/index.ts +0 -1
  51. package/src/features/column-filters/ui/DateInput/DateInput.tsx +0 -36
  52. package/src/features/column-filters/ui/DateInput/index.ts +0 -1
  53. package/src/features/column-filters/ui/InputArea/InputArea.tsx +0 -63
  54. package/src/features/column-filters/ui/InputArea/index.ts +0 -1
  55. package/src/features/column-filters/ui/MultipleSelect/index.ts +0 -1
  56. package/src/features/column-filters/ui/MultipleSelect/lib/index.ts +0 -2
  57. package/src/features/column-filters/ui/MultipleSelect/lib/props/index.ts +0 -1
  58. package/src/features/column-filters/ui/MultipleSelect/lib/props/props.ts +0 -36
  59. package/src/features/column-filters/ui/MultipleSelect/lib/sorting/ascending.ts +0 -17
  60. package/src/features/column-filters/ui/MultipleSelect/lib/sorting/index.ts +0 -1
  61. package/src/features/column-filters/ui/MultipleSelect/model/IValue.ts +0 -1
  62. package/src/features/column-filters/ui/MultipleSelect/model/index.ts +0 -1
  63. package/src/features/column-filters/ui/MultipleSelect/ui/MultipleSelect.style.ts +0 -9
  64. package/src/features/column-filters/ui/MultipleSelect/ui/MultipleSelect.tsx +0 -72
  65. package/src/features/column-filters/ui/MultipleSelect/ui/index.ts +0 -1
  66. package/src/features/column-filters/ui/NumberBetween/NumberBetween.tsx +0 -42
  67. package/src/features/column-filters/ui/NumberBetween/index.ts +0 -1
  68. package/src/features/column-filters/ui/NumberInput/NumberInput.tsx +0 -24
  69. package/src/features/column-filters/ui/NumberInput/index.ts +0 -1
  70. package/src/features/column-filters/ui/SelectFilter/index.ts +0 -1
  71. package/src/features/column-filters/ui/SelectFilter/model/index.ts +0 -1
  72. package/src/features/column-filters/ui/SelectFilter/model/options/index.ts +0 -1
  73. package/src/features/column-filters/ui/SelectFilter/model/options/options.ts +0 -66
  74. package/src/features/column-filters/ui/SelectFilter/ui/SelectFilter.tsx +0 -50
  75. package/src/features/column-filters/ui/SelectFilter/ui/index.ts +0 -1
  76. package/src/features/column-filters/ui/TextInput/TextInput.tsx +0 -23
  77. package/src/features/column-filters/ui/TextInput/index.ts +0 -1
  78. package/src/features/column-filters/ui/index.ts +0 -1
  79. package/src/features/context-menu/index.ts +0 -1
  80. package/src/features/context-menu/lib/hooks/index.ts +0 -1
  81. package/src/features/context-menu/lib/hooks/useSubscribeToEvent.ts +0 -25
  82. package/src/features/context-menu/lib/index.ts +0 -1
  83. package/src/features/context-menu/ui/ButtonDownloadCSV/ButtonDownloadCSV.tsx +0 -34
  84. package/src/features/context-menu/ui/ButtonDownloadCSV/index.ts +0 -1
  85. package/src/features/context-menu/ui/ButtonGroup/ButtonGroup.tsx +0 -28
  86. package/src/features/context-menu/ui/ButtonGroup/index.ts +0 -1
  87. package/src/features/context-menu/ui/ButtonResetFilters/index.ts +0 -1
  88. package/src/features/context-menu/ui/ButtonResetFilters/lib/index.ts +0 -1
  89. package/src/features/context-menu/ui/ButtonResetFilters/lib/visibility/hasFiltersApplied.ts +0 -8
  90. package/src/features/context-menu/ui/ButtonResetFilters/lib/visibility/index.ts +0 -1
  91. package/src/features/context-menu/ui/ButtonResetFilters/ui/ButtonResetFilters.tsx +0 -39
  92. package/src/features/context-menu/ui/ButtonResetFilters/ui/index.ts +0 -1
  93. package/src/features/context-menu/ui/ButtonUngroup/ButtonUngroup.tsx +0 -28
  94. package/src/features/context-menu/ui/ButtonUngroup/index.ts +0 -1
  95. package/src/features/context-menu/ui/CollapseAll/CollapseAll.tsx +0 -31
  96. package/src/features/context-menu/ui/CollapseAll/index.ts +0 -1
  97. package/src/features/context-menu/ui/ContextMenu.style.ts +0 -29
  98. package/src/features/context-menu/ui/ContextMenu.tsx +0 -51
  99. package/src/features/context-menu/ui/CopyToClipboard/CopyToClipboard.tsx +0 -42
  100. package/src/features/context-menu/ui/CopyToClipboard/index.ts +0 -1
  101. package/src/features/context-menu/ui/ExpandAll/ExpandAll.tsx +0 -30
  102. package/src/features/context-menu/ui/ExpandAll/index.ts +0 -1
  103. package/src/features/context-menu/ui/Print/index.ts +0 -1
  104. package/src/features/context-menu/ui/Print/ui/Print.tsx +0 -25
  105. package/src/features/context-menu/ui/Print/ui/index.ts +0 -1
  106. package/src/features/context-menu/ui/index.ts +0 -1
  107. package/src/index.scss +0 -2
  108. package/src/index.ts +0 -5
  109. package/src/main.tsx +0 -15
  110. package/src/pages/main/index.ts +0 -1
  111. package/src/pages/main/lib/columns.ts +0 -33
  112. package/src/pages/main/lib/index.ts +0 -3
  113. package/src/pages/main/lib/options.ts +0 -6
  114. package/src/pages/main/lib/table.ts +0 -11
  115. package/src/pages/main/ui/Main.style.ts +0 -18
  116. package/src/pages/main/ui/Main.tsx +0 -30
  117. package/src/pages/main/ui/index.ts +0 -1
  118. package/src/setupTests.ts +0 -5
  119. package/src/shared/lib/an-event/index.ts +0 -31
  120. package/src/shared/lib/datetime/dateToString.spec.ts +0 -11
  121. package/src/shared/lib/datetime/dateToString.ts +0 -8
  122. package/src/shared/lib/datetime/getTime.spec.ts +0 -10
  123. package/src/shared/lib/datetime/getTime.ts +0 -3
  124. package/src/shared/lib/datetime/index.ts +0 -2
  125. package/src/shared/lib/debounce/index.ts +0 -11
  126. package/src/shared/lib/dom/elementNotVisible.spec.ts +0 -72
  127. package/src/shared/lib/dom/elementNotVisible.ts +0 -9
  128. package/src/shared/lib/dom/index.ts +0 -1
  129. package/src/shared/lib/format/IOptions.ts +0 -11
  130. package/src/shared/lib/format/addParentheses.spec.ts +0 -9
  131. package/src/shared/lib/format/addParentheses.ts +0 -7
  132. package/src/shared/lib/format/formatNumber.spec.ts +0 -50
  133. package/src/shared/lib/format/formatNumber.ts +0 -62
  134. package/src/shared/lib/format/index.ts +0 -2
  135. package/src/shared/lib/numbers/index.ts +0 -1
  136. package/src/shared/lib/numbers/toNumber.spec.ts +0 -25
  137. package/src/shared/lib/numbers/toNumber.ts +0 -11
  138. package/src/shared/lib/regexp/dates.spec.ts +0 -23
  139. package/src/shared/lib/regexp/dates.ts +0 -6
  140. package/src/shared/lib/regexp/escapeSpecialChar.spec.ts +0 -24
  141. package/src/shared/lib/regexp/escapeSpecialChar.ts +0 -4
  142. package/src/shared/lib/regexp/index.ts +0 -2
  143. package/src/shared/lib/slickgrid/index.ts +0 -68
  144. package/src/shared/lib/slickgrid/lib/callbacks/getOnKeyDownCallback.ts +0 -12
  145. package/src/shared/lib/slickgrid/lib/callbacks/index.ts +0 -4
  146. package/src/shared/lib/slickgrid/lib/callbacks/onCellChange.ts +0 -14
  147. package/src/shared/lib/slickgrid/lib/callbacks/onRowCountChanged.ts +0 -12
  148. package/src/shared/lib/slickgrid/lib/callbacks/onRowsChanged.ts +0 -8
  149. package/src/shared/lib/slickgrid/lib/contextMenu/index.ts +0 -1
  150. package/src/shared/lib/slickgrid/lib/contextMenu/openContextMenu.ts +0 -17
  151. package/src/shared/lib/slickgrid/lib/editors/Autocomplete/Autocomplete.ts +0 -152
  152. package/src/shared/lib/slickgrid/lib/editors/Autocomplete/EditorAutocomplete.ts +0 -66
  153. package/src/shared/lib/slickgrid/lib/editors/Autocomplete/EditorSelectWithSearch.ts +0 -79
  154. package/src/shared/lib/slickgrid/lib/editors/Autocomplete/index.ts +0 -3
  155. package/src/shared/lib/slickgrid/lib/editors/EditorAmount.ts +0 -82
  156. package/src/shared/lib/slickgrid/lib/editors/EditorDate.ts +0 -127
  157. package/src/shared/lib/slickgrid/lib/editors/EditorSelectNumber.ts +0 -16
  158. package/src/shared/lib/slickgrid/lib/editors/EditorSelectString.ts +0 -95
  159. package/src/shared/lib/slickgrid/lib/editors/index.ts +0 -9
  160. package/src/shared/lib/slickgrid/lib/formatters/DateFormatter.ts +0 -9
  161. package/src/shared/lib/slickgrid/lib/formatters/FormatterCheck.ts +0 -11
  162. package/src/shared/lib/slickgrid/lib/formatters/PercentFormatter.spec.ts +0 -11
  163. package/src/shared/lib/slickgrid/lib/formatters/PercentFormatter.ts +0 -8
  164. package/src/shared/lib/slickgrid/lib/formatters/StringFormatter.ts +0 -2
  165. package/src/shared/lib/slickgrid/lib/formatters/getFormatterNumber.ts +0 -17
  166. package/src/shared/lib/slickgrid/lib/formatters/index.ts +0 -5
  167. package/src/shared/lib/slickgrid/lib/functions/addNewRow.ts +0 -23
  168. package/src/shared/lib/slickgrid/lib/functions/commitCurrentEdit.ts +0 -6
  169. package/src/shared/lib/slickgrid/lib/functions/copySelectedRows.ts +0 -35
  170. package/src/shared/lib/slickgrid/lib/functions/deleteRows.ts +0 -20
  171. package/src/shared/lib/slickgrid/lib/functions/getActiveRowId.ts +0 -16
  172. package/src/shared/lib/slickgrid/lib/functions/getDisplayedRows.ts +0 -13
  173. package/src/shared/lib/slickgrid/lib/functions/getLastRow.ts +0 -6
  174. package/src/shared/lib/slickgrid/lib/functions/getMaxId.ts +0 -13
  175. package/src/shared/lib/slickgrid/lib/functions/index.ts +0 -10
  176. package/src/shared/lib/slickgrid/lib/functions/isDeletionDangerous.ts +0 -21
  177. package/src/shared/lib/slickgrid/lib/functions/wereEdited.ts +0 -12
  178. package/src/shared/lib/slickgrid/lib/grouping/index.ts +0 -1
  179. package/src/shared/lib/slickgrid/lib/grouping/sumTotalsFormatter.ts +0 -21
  180. package/src/shared/lib/slickgrid/lib/highlighting/getColumnsHash.ts +0 -8
  181. package/src/shared/lib/slickgrid/lib/highlighting/highlightCell.ts +0 -21
  182. package/src/shared/lib/slickgrid/lib/highlighting/highlightColumns.ts +0 -24
  183. package/src/shared/lib/slickgrid/lib/highlighting/index.ts +0 -2
  184. package/src/shared/lib/slickgrid/lib/hooks/eventClickOnTable.ts +0 -17
  185. package/src/shared/lib/slickgrid/lib/hooks/index.ts +0 -3
  186. package/src/shared/lib/slickgrid/lib/hooks/useHotKeys.ts +0 -39
  187. package/src/shared/lib/slickgrid/lib/hooks/useListenIfTablesWereEdited.ts +0 -36
  188. package/src/shared/lib/slickgrid/lib/hooks/useUpdateTotal.ts +0 -19
  189. package/src/shared/lib/slickgrid/lib/hotKeys/hotKeysCopy.ts +0 -7
  190. package/src/shared/lib/slickgrid/lib/hotKeys/hotKeysDelete.ts +0 -7
  191. package/src/shared/lib/slickgrid/lib/hotKeys/hotKeysRedo.ts +0 -7
  192. package/src/shared/lib/slickgrid/lib/hotKeys/hotKeysReverse.ts +0 -7
  193. package/src/shared/lib/slickgrid/lib/hotKeys/hotKeysUndo.ts +0 -7
  194. package/src/shared/lib/slickgrid/lib/hotKeys/index.ts +0 -7
  195. package/src/shared/lib/slickgrid/lib/hotKeys/nothingToCopy.ts +0 -14
  196. package/src/shared/lib/slickgrid/lib/hotKeys/positionToPaste.ts +0 -12
  197. package/src/shared/lib/slickgrid/lib/index.ts +0 -59
  198. package/src/shared/lib/slickgrid/lib/selection/getUpdates.ts +0 -41
  199. package/src/shared/lib/slickgrid/lib/selection/index.ts +0 -2
  200. package/src/shared/lib/slickgrid/lib/selection/selectedRows.ts +0 -17
  201. package/src/shared/lib/slickgrid/lib/sorting/ColumnSorter.ts +0 -89
  202. package/src/shared/lib/slickgrid/lib/sorting/index.ts +0 -1
  203. package/src/shared/lib/slickgrid/lib/totals-row/addTitle.ts +0 -8
  204. package/src/shared/lib/slickgrid/lib/totals-row/addTotalSum.ts +0 -16
  205. package/src/shared/lib/slickgrid/lib/totals-row/index.ts +0 -2
  206. package/src/shared/lib/slickgrid/lib/totals-row/totalAmountOf.ts +0 -13
  207. package/src/shared/lib/slickgrid/lib/totals-row/updateTotal.ts +0 -25
  208. package/src/shared/lib/slickgrid/lib/totals-row/updateTotals.ts +0 -10
  209. package/src/shared/lib/slickgrid/lib/validators/DateValidator.ts +0 -12
  210. package/src/shared/lib/slickgrid/lib/validators/EmptyStringValidator.ts +0 -5
  211. package/src/shared/lib/slickgrid/lib/validators/LengthValidator.ts +0 -7
  212. package/src/shared/lib/slickgrid/lib/validators/index.ts +0 -3
  213. package/src/shared/lib/slickgrid/model/SlickTable/csvDownloadManager/DownloadManager.ts +0 -110
  214. package/src/shared/lib/slickgrid/model/SlickTable/csvDownloadManager/index.ts +0 -1
  215. package/src/shared/lib/slickgrid/model/SlickTable/filters/DeletedRowsFilter.test.ts +0 -36
  216. package/src/shared/lib/slickgrid/model/SlickTable/filters/DeletedRowsFilter.ts +0 -12
  217. package/src/shared/lib/slickgrid/model/SlickTable/filters/Filter.ts +0 -54
  218. package/src/shared/lib/slickgrid/model/SlickTable/filters/WithoutFilter.ts +0 -30
  219. package/src/shared/lib/slickgrid/model/SlickTable/filters/decorators/ColumnFilter/DecoratorColumnFilter.ts +0 -53
  220. package/src/shared/lib/slickgrid/model/SlickTable/filters/decorators/ColumnFilter/Filter.ts +0 -108
  221. package/src/shared/lib/slickgrid/model/SlickTable/filters/decorators/ColumnFilter/index.ts +0 -1
  222. package/src/shared/lib/slickgrid/model/SlickTable/filters/decorators/DecoratorEndingDate.ts +0 -16
  223. package/src/shared/lib/slickgrid/model/SlickTable/filters/decorators/DecoratorFilter.ts +0 -55
  224. package/src/shared/lib/slickgrid/model/SlickTable/filters/decorators/DecoratorPeriod.ts +0 -24
  225. package/src/shared/lib/slickgrid/model/SlickTable/filters/decorators/index.ts +0 -4
  226. package/src/shared/lib/slickgrid/model/SlickTable/filters/index.ts +0 -9
  227. package/src/shared/lib/slickgrid/model/SlickTable/hotKeys/DefaultHotKeys.ts +0 -118
  228. package/src/shared/lib/slickgrid/model/SlickTable/hotKeys/WithoutHotKeys.ts +0 -20
  229. package/src/shared/lib/slickgrid/model/SlickTable/hotKeys/decorators/HotKeysDecorator.ts +0 -32
  230. package/src/shared/lib/slickgrid/model/SlickTable/hotKeys/decorators/PreventCopying.ts +0 -21
  231. package/src/shared/lib/slickgrid/model/SlickTable/hotKeys/decorators/RedoUndoOnly.ts +0 -25
  232. package/src/shared/lib/slickgrid/model/SlickTable/hotKeys/decorators/WithConfirmationOfDeletion.ts +0 -33
  233. package/src/shared/lib/slickgrid/model/SlickTable/hotKeys/decorators/index.ts +0 -4
  234. package/src/shared/lib/slickgrid/model/SlickTable/hotKeys/index.ts +0 -9
  235. package/src/shared/lib/slickgrid/model/SlickTable/index.ts +0 -18
  236. package/src/shared/lib/slickgrid/model/SlickTable/printer/DefaultPrinter.ts +0 -179
  237. package/src/shared/lib/slickgrid/model/SlickTable/printer/index.ts +0 -1
  238. package/src/shared/lib/slickgrid/model/SlickTable/printer/model/consts/cssStyles.ts +0 -46
  239. package/src/shared/lib/slickgrid/model/SlickTable/printer/model/consts/index.ts +0 -1
  240. package/src/shared/lib/slickgrid/model/SlickTable/printer/model/index.ts +0 -1
  241. package/src/shared/lib/slickgrid/model/SlickTable/table/SlickTable.ts +0 -148
  242. package/src/shared/lib/slickgrid/model/SlickTable/table/index.ts +0 -1
  243. package/src/shared/lib/slickgrid/model/events/eventContextMenu.ts +0 -10
  244. package/src/shared/lib/slickgrid/model/events/index.ts +0 -1
  245. package/src/shared/lib/slickgrid/model/index.ts +0 -17
  246. package/src/shared/lib/slickgrid/ui/HeaderButtons/index.ts +0 -2
  247. package/src/shared/lib/slickgrid/ui/HeaderButtons/lib/handleClick/handleHeaderButtons.ts +0 -27
  248. package/src/shared/lib/slickgrid/ui/HeaderButtons/lib/handleClick/index.ts +0 -1
  249. package/src/shared/lib/slickgrid/ui/HeaderButtons/lib/highlighting/headerButtons.ts +0 -45
  250. package/src/shared/lib/slickgrid/ui/HeaderButtons/lib/highlighting/index.ts +0 -1
  251. package/src/shared/lib/slickgrid/ui/HeaderButtons/lib/index.ts +0 -2
  252. package/src/shared/lib/slickgrid/ui/HeaderButtons/model/buttons/index.ts +0 -1
  253. package/src/shared/lib/slickgrid/ui/HeaderButtons/model/buttons/openColumnFilter.ts +0 -10
  254. package/src/shared/lib/slickgrid/ui/HeaderButtons/model/event/eventOpenColumnFilters.ts +0 -13
  255. package/src/shared/lib/slickgrid/ui/HeaderButtons/model/event/index.ts +0 -1
  256. package/src/shared/lib/slickgrid/ui/HeaderButtons/model/index.ts +0 -2
  257. package/src/shared/lib/slickgrid/ui/SlickgridTable/index.ts +0 -1
  258. package/src/shared/lib/slickgrid/ui/SlickgridTable/lib/callbacks/index.ts +0 -1
  259. package/src/shared/lib/slickgrid/ui/SlickgridTable/lib/callbacks/onAddNewRow.ts +0 -34
  260. package/src/shared/lib/slickgrid/ui/SlickgridTable/lib/hooks/index.ts +0 -1
  261. package/src/shared/lib/slickgrid/ui/SlickgridTable/lib/hooks/useGrid.ts +0 -140
  262. package/src/shared/lib/slickgrid/ui/SlickgridTable/lib/index.ts +0 -2
  263. package/src/shared/lib/slickgrid/ui/SlickgridTable/model/defaultOptions.ts +0 -8
  264. package/src/shared/lib/slickgrid/ui/SlickgridTable/model/index.ts +0 -2
  265. package/src/shared/lib/slickgrid/ui/SlickgridTable/model/types/Props.ts +0 -42
  266. package/src/shared/lib/slickgrid/ui/SlickgridTable/model/types/index.ts +0 -1
  267. package/src/shared/lib/slickgrid/ui/SlickgridTable/ui/SlickgridTable.tsx +0 -51
  268. package/src/shared/lib/slickgrid/ui/SlickgridTable/ui/index.ts +0 -1
  269. package/src/shared/lib/slickgrid/ui/columns/columnCheckboxSelector/columnCheckboxSelector.ts +0 -7
  270. package/src/shared/lib/slickgrid/ui/columns/columnCheckboxSelector/index.ts +0 -1
  271. package/src/shared/lib/slickgrid/ui/columns/columnIsEdited/index.ts +0 -1
  272. package/src/shared/lib/slickgrid/ui/columns/columnIsEdited/lib/index.ts +0 -1
  273. package/src/shared/lib/slickgrid/ui/columns/columnIsEdited/lib/setEditedMark.spec.ts +0 -11
  274. package/src/shared/lib/slickgrid/ui/columns/columnIsEdited/lib/setEditedMark.ts +0 -7
  275. package/src/shared/lib/slickgrid/ui/columns/columnIsEdited/ui/columnIsEdited.ts +0 -16
  276. package/src/shared/lib/slickgrid/ui/columns/columnIsEdited/ui/index.ts +0 -1
  277. package/src/shared/lib/slickgrid/ui/columns/index.ts +0 -2
  278. package/src/shared/lib/slickgrid/ui/index.ts +0 -9
  279. package/src/shared/lib/slickgrid/ui/styles/WithTableStyles/WithTableStyles.style.ts +0 -156
  280. package/src/shared/lib/slickgrid/ui/styles/WithTableStyles/WithTableStyles.tsx +0 -11
  281. package/src/shared/lib/slickgrid/ui/styles/WithTableStyles/index.ts +0 -1
  282. package/src/shared/lib/slickgrid/ui/styles/index.ts +0 -1
  283. package/src/shared/lib/slickgrid/ui/styles/keyframes/index.ts +0 -1
  284. package/src/shared/lib/slickgrid/ui/styles/keyframes/wink.ts +0 -7
  285. package/src/shared/lib/sorting/Sort.ts +0 -26
  286. package/src/shared/lib/sorting/index.ts +0 -1
  287. package/src/shared/lib/stringCalculator/index.ts +0 -2
  288. package/src/shared/lib/stringCalculator/stringCalculator.js +0 -834
  289. package/src/shared/lib/stringCalculator/stringCalculator.spec.ts +0 -16
  290. package/src/shared/lib/strings/deleteDoubleQuotes.spec.ts +0 -11
  291. package/src/shared/lib/strings/deleteDoubleQuotes.ts +0 -5
  292. package/src/shared/lib/strings/index.ts +0 -3
  293. package/src/shared/lib/strings/removeHtml.spec.ts +0 -29
  294. package/src/shared/lib/strings/removeHtml.ts +0 -5
  295. package/src/shared/lib/strings/toStringWithCommas.spec.ts +0 -16
  296. package/src/shared/lib/strings/toStringWithCommas.ts +0 -15
  297. package/src/shared/model/consts/columnId.ts +0 -1
  298. package/src/shared/model/consts/dateFormats.ts +0 -5
  299. package/src/shared/model/consts/index.ts +0 -4
  300. package/src/shared/model/consts/invalidDate.ts +0 -1
  301. package/src/shared/model/consts/noPrivilegesMessage.ts +0 -1
  302. package/src/shared/model/enums/EColumnFilter.ts +0 -16
  303. package/src/shared/model/enums/EColumnFiltersGroup.ts +0 -10
  304. package/src/shared/model/enums/EDateFormat.ts +0 -11
  305. package/src/shared/model/enums/EKey.ts +0 -8
  306. package/src/shared/model/enums/EKeyCode.ts +0 -8
  307. package/src/shared/model/enums/ESortType.ts +0 -6
  308. package/src/shared/model/enums/index.ts +0 -6
  309. package/src/shared/model/types/IArguments.ts +0 -14
  310. package/src/shared/model/types/IColumn.ts +0 -13
  311. package/src/shared/model/types/IColumnFilterValue.ts +0 -4
  312. package/src/shared/model/types/IDownloadManager.ts +0 -6
  313. package/src/shared/model/types/IEditedRow.ts +0 -5
  314. package/src/shared/model/types/IExternalVariables.ts +0 -1
  315. package/src/shared/model/types/IFilter.ts +0 -30
  316. package/src/shared/model/types/IGrouping.ts +0 -12
  317. package/src/shared/model/types/IHotKeysBehavior.ts +0 -15
  318. package/src/shared/model/types/IObserver.ts +0 -3
  319. package/src/shared/model/types/IPrinter.ts +0 -24
  320. package/src/shared/model/types/ISlickRow.ts +0 -1
  321. package/src/shared/model/types/ISlickTable.ts +0 -38
  322. package/src/shared/model/types/TGridRow.ts +0 -6
  323. package/src/shared/model/types/index.ts +0 -14
  324. package/src/shared/ui/ContextSelect/ContextSelect.style.ts +0 -9
  325. package/src/shared/ui/ContextSelect/ContextSelect.tsx +0 -87
  326. package/src/shared/ui/ContextSelect/index.ts +0 -2
  327. package/src/shared/ui/notification/index.ts +0 -1
  328. package/src/shared/ui/notification/model/index.ts +0 -1
  329. package/src/shared/ui/notification/ui/index.style.ts +0 -13
  330. package/src/shared/ui/notification/ui/index.tsx +0 -41
  331. package/src/shared/ui/styles/WithDatePickerStyles.ts +0 -11
  332. package/src/shared/ui/styles/index.ts +0 -1
  333. package/src/vite-env.d.ts +0 -1
  334. package/tsconfig.build-types.json +0 -21
  335. package/tsconfig.build.json +0 -17
  336. package/tsconfig.json +0 -23
  337. package/vite.config.ts +0 -34
@@ -1,834 +0,0 @@
1
- export const stringCalculator = (function () {
2
- /* eslint-disable */
3
- const o = function (k, v, o, l) {
4
- for (o = o || {}, l = k.length; l--; o[k[l]] = v);
5
- return o;
6
- },
7
- $V0 = [1, 3],
8
- $V1 = [1, 4],
9
- $V2 = [1, 5],
10
- $V3 = [1, 6],
11
- $V4 = [1, 7],
12
- $V5 = [1, 9],
13
- $V6 = [1, 10],
14
- $V7 = [1, 11],
15
- $V8 = [1, 12],
16
- $V9 = [1, 13],
17
- $Va = [1, 14],
18
- $Vb = [1, 15],
19
- $Vc = [5, 6, 7, 8, 9, 10, 11, 12, 14],
20
- $Vd = [5, 6, 7, 14],
21
- $Ve = [5, 6, 7, 8, 9, 14];
22
- const parser = {
23
- trace: function trace() {},
24
- yy: {},
25
- symbols_: {
26
- error: 2,
27
- expressions: 3,
28
- e: 4,
29
- EOF: 5,
30
- "+": 6,
31
- "-": 7,
32
- "*": 8,
33
- "/": 9,
34
- "^": 10,
35
- "!": 11,
36
- "%": 12,
37
- "(": 13,
38
- ")": 14,
39
- NUMBER: 15,
40
- E: 16,
41
- PI: 17,
42
- $accept: 0,
43
- $end: 1,
44
- },
45
- terminals_: {
46
- 2: "error",
47
- 5: "EOF",
48
- 6: "+",
49
- 7: "-",
50
- 8: "*",
51
- 9: "/",
52
- 10: "^",
53
- 11: "!",
54
- 12: "%",
55
- 13: "(",
56
- 14: ")",
57
- 15: "NUMBER",
58
- 16: "E",
59
- 17: "PI",
60
- },
61
- productions_: [
62
- 0,
63
- [3, 2],
64
- [4, 3],
65
- [4, 3],
66
- [4, 3],
67
- [4, 3],
68
- [4, 3],
69
- [4, 2],
70
- [4, 2],
71
- [4, 2],
72
- [4, 3],
73
- [4, 1],
74
- [4, 1],
75
- [4, 1],
76
- ],
77
- performAction: function anonymous(
78
- yytext,
79
- yyleng,
80
- yylineno,
81
- yy,
82
- yystate /* action[1] */,
83
- $$ /* vstack */,
84
- _$ /* lstack */,
85
- ) {
86
- /* this == yyval */
87
-
88
- const $0 = $$.length - 1;
89
- switch (yystate) {
90
- case 1:
91
- // eslint-disable-next-line no-restricted-globals
92
- //typeof console !== 'undefined' ? console.log($$[$0-1]) : print($$[$0-1]);
93
- return $$[$0 - 1];
94
- break;
95
- case 2:
96
- this.$ = $$[$0 - 2] + $$[$0];
97
- break;
98
- case 3:
99
- this.$ = $$[$0 - 2] - $$[$0];
100
- break;
101
- case 4:
102
- this.$ = $$[$0 - 2] * $$[$0];
103
- break;
104
- case 5:
105
- this.$ = $$[$0 - 2] / $$[$0];
106
- break;
107
- case 6:
108
- this.$ = Math.pow($$[$0 - 2], $$[$0]);
109
- break;
110
- case 7:
111
- this.$ = (function fact(n) {
112
- return n == 0 ? 1 : fact(n - 1) * n;
113
- })($$[$0 - 1]);
114
-
115
- break;
116
- case 8:
117
- this.$ = $$[$0 - 1] / 100;
118
- break;
119
- case 9:
120
- this.$ = -$$[$0];
121
- break;
122
- case 10:
123
- this.$ = $$[$0 - 1];
124
- break;
125
- case 11:
126
- this.$ = Number(yytext);
127
- break;
128
- case 12:
129
- this.$ = Math.E;
130
- break;
131
- case 13:
132
- this.$ = Math.PI;
133
- break;
134
- }
135
- },
136
- table: [
137
- { 3: 1, 4: 2, 7: $V0, 13: $V1, 15: $V2, 16: $V3, 17: $V4 },
138
- { 1: [3] },
139
- { 5: [1, 8], 6: $V5, 7: $V6, 8: $V7, 9: $V8, 10: $V9, 11: $Va, 12: $Vb },
140
- { 4: 16, 7: $V0, 13: $V1, 15: $V2, 16: $V3, 17: $V4 },
141
- { 4: 17, 7: $V0, 13: $V1, 15: $V2, 16: $V3, 17: $V4 },
142
- o($Vc, [2, 11]),
143
- o($Vc, [2, 12]),
144
- o($Vc, [2, 13]),
145
- { 1: [2, 1] },
146
- { 4: 18, 7: $V0, 13: $V1, 15: $V2, 16: $V3, 17: $V4 },
147
- { 4: 19, 7: $V0, 13: $V1, 15: $V2, 16: $V3, 17: $V4 },
148
- { 4: 20, 7: $V0, 13: $V1, 15: $V2, 16: $V3, 17: $V4 },
149
- { 4: 21, 7: $V0, 13: $V1, 15: $V2, 16: $V3, 17: $V4 },
150
- { 4: 22, 7: $V0, 13: $V1, 15: $V2, 16: $V3, 17: $V4 },
151
- o($Vc, [2, 7]),
152
- o($Vc, [2, 8]),
153
- o($Vc, [2, 9]),
154
- {
155
- 6: $V5,
156
- 7: $V6,
157
- 8: $V7,
158
- 9: $V8,
159
- 10: $V9,
160
- 11: $Va,
161
- 12: $Vb,
162
- 14: [1, 23],
163
- },
164
- o($Vd, [2, 2], { 8: $V7, 9: $V8, 10: $V9, 11: $Va, 12: $Vb }),
165
- o($Vd, [2, 3], { 8: $V7, 9: $V8, 10: $V9, 11: $Va, 12: $Vb }),
166
- o($Ve, [2, 4], { 10: $V9, 11: $Va, 12: $Vb }),
167
- o($Ve, [2, 5], { 10: $V9, 11: $Va, 12: $Vb }),
168
- o([5, 6, 7, 8, 9, 10, 14], [2, 6], { 11: $Va, 12: $Vb }),
169
- o($Vc, [2, 10]),
170
- ],
171
- defaultActions: { 8: [2, 1] },
172
- parseError: function parseError(str, hash) {
173
- if (hash.recoverable) {
174
- this.trace(str);
175
- } else {
176
- const error = new Error(str);
177
- error.hash = hash;
178
- throw error;
179
- }
180
- },
181
- parse: function parse(input) {
182
- const self = this;
183
- let stack = [0];
184
- const tstack = [];
185
- let vstack = [null];
186
- let lstack = [];
187
- const table = this.table;
188
- let yytext = "";
189
- let yylineno = 0;
190
- let yyleng = 0;
191
- let recovering = 0;
192
- const TERROR = 2;
193
- const EOF = 1;
194
- const args = lstack.slice.call(arguments, 1);
195
- const lexer = Object.create(this.lexer);
196
- const sharedState = { yy: {} };
197
- for (let k in this.yy) {
198
- if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
199
- sharedState.yy[k] = this.yy[k];
200
- }
201
- }
202
- lexer.setInput(input, sharedState.yy);
203
- sharedState.yy.lexer = lexer;
204
- sharedState.yy.parser = this;
205
- if (typeof lexer.yylloc == "undefined") {
206
- lexer.yylloc = {};
207
- }
208
- let yyloc = lexer.yylloc;
209
- lstack.push(yyloc);
210
- const ranges = lexer.options && lexer.options.ranges;
211
- if (typeof sharedState.yy.parseError === "function") {
212
- this.parseError = sharedState.yy.parseError;
213
- } else {
214
- this.parseError = Object.getPrototypeOf(this).parseError;
215
- }
216
- function popStack(n) {
217
- stack.length = stack.length - 2 * n;
218
- vstack.length = vstack.length - n;
219
- lstack.length = lstack.length - n;
220
- }
221
- _token_stack: var lex = function () {
222
- let token;
223
- token = lexer.lex() || EOF;
224
- if (typeof token !== "number") {
225
- token = self.symbols_[token] || token;
226
- }
227
- return token;
228
- };
229
- // eslint-disable-next-line no-constant-condition
230
- let symbol;
231
- let preErrorSymbol;
232
- let state;
233
- let action;
234
- let a;
235
- let r;
236
- const yyval = {};
237
- let p;
238
- let len;
239
- let newState;
240
- let expected;
241
- // eslint-disable-next-line no-constant-condition
242
- while (true) {
243
- state = stack[stack.length - 1];
244
- if (this.defaultActions[state]) {
245
- action = this.defaultActions[state];
246
- } else {
247
- if (symbol === null || typeof symbol == "undefined") {
248
- symbol = lex();
249
- }
250
- action = table[state] && table[state][symbol];
251
- }
252
- if (typeof action === "undefined" || !action.length || !action[0]) {
253
- let errStr = "";
254
- expected = [];
255
- for (p in table[state]) {
256
- if (this.terminals_[p] && p > TERROR) {
257
- expected.push("'" + this.terminals_[p] + "'");
258
- }
259
- }
260
- if (lexer.showPosition) {
261
- errStr =
262
- "Parse error on line " +
263
- (yylineno + 1) +
264
- ":\n" +
265
- lexer.showPosition() +
266
- "\nExpecting " +
267
- expected.join(", ") +
268
- ", got '" +
269
- (this.terminals_[symbol] || symbol) +
270
- "'";
271
- } else {
272
- errStr =
273
- "Parse error on line " +
274
- (yylineno + 1) +
275
- ": Unexpected " +
276
- (symbol == EOF
277
- ? "end of input"
278
- : "'" + (this.terminals_[symbol] || symbol) + "'");
279
- }
280
- this.parseError(errStr, {
281
- text: lexer.match,
282
- token: this.terminals_[symbol] || symbol,
283
- line: lexer.yylineno,
284
- loc: yyloc,
285
- expected: expected,
286
- });
287
- }
288
- if (action[0] instanceof Array && action.length > 1) {
289
- throw new Error(
290
- "Parse Error: multiple actions possible at state: " +
291
- state +
292
- ", token: " +
293
- symbol,
294
- );
295
- }
296
- switch (action[0]) {
297
- case 1:
298
- stack.push(symbol);
299
- vstack.push(lexer.yytext);
300
- lstack.push(lexer.yylloc);
301
- stack.push(action[1]);
302
- symbol = null;
303
- if (!preErrorSymbol) {
304
- yyleng = lexer.yyleng;
305
- yytext = lexer.yytext;
306
- yylineno = lexer.yylineno;
307
- yyloc = lexer.yylloc;
308
- if (recovering > 0) {
309
- recovering--;
310
- }
311
- } else {
312
- symbol = preErrorSymbol;
313
- preErrorSymbol = null;
314
- }
315
- break;
316
- case 2:
317
- len = this.productions_[action[1]][1];
318
- yyval.$ = vstack[vstack.length - len];
319
- yyval._$ = {
320
- first_line: lstack[lstack.length - (len || 1)].first_line,
321
- last_line: lstack[lstack.length - 1].last_line,
322
- first_column: lstack[lstack.length - (len || 1)].first_column,
323
- last_column: lstack[lstack.length - 1].last_column,
324
- };
325
- if (ranges) {
326
- yyval._$.range = [
327
- lstack[lstack.length - (len || 1)].range[0],
328
- lstack[lstack.length - 1].range[1],
329
- ];
330
- }
331
- r = this.performAction.apply(
332
- yyval,
333
- [
334
- yytext,
335
- yyleng,
336
- yylineno,
337
- sharedState.yy,
338
- action[1],
339
- vstack,
340
- lstack,
341
- ].concat(args),
342
- );
343
- if (typeof r !== "undefined") {
344
- return r;
345
- }
346
- if (len) {
347
- stack = stack.slice(0, -1 * len * 2);
348
- vstack = vstack.slice(0, -1 * len);
349
- lstack = lstack.slice(0, -1 * len);
350
- }
351
- stack.push(this.productions_[action[1]][0]);
352
- vstack.push(yyval.$);
353
- lstack.push(yyval._$);
354
- newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
355
- stack.push(newState);
356
- break;
357
- case 3:
358
- return true;
359
- }
360
- }
361
- return true;
362
- },
363
- };
364
- /* generated by jison-lex 0.3.4 */
365
- const lexer = (function () {
366
- const lexer = {
367
- EOF: 1,
368
-
369
- parseError: function parseError(str, hash) {
370
- if (this.yy.parser) {
371
- this.yy.parser.parseError(str, hash);
372
- } else {
373
- throw new Error(str);
374
- }
375
- },
376
-
377
- // resets the lexer, sets new input
378
- setInput: function (input, yy) {
379
- this.yy = yy || this.yy || {};
380
- this._input = input;
381
- this._more = this._backtrack = this.done = false;
382
- this.yylineno = this.yyleng = 0;
383
- this.yytext = this.matched = this.match = "";
384
- this.conditionStack = ["INITIAL"];
385
- this.yylloc = {
386
- first_line: 1,
387
- first_column: 0,
388
- last_line: 1,
389
- last_column: 0,
390
- };
391
- if (this.options.ranges) {
392
- this.yylloc.range = [0, 0];
393
- }
394
- this.offset = 0;
395
- return this;
396
- },
397
-
398
- // consumes and returns one char from the input
399
- input: function () {
400
- const ch = this._input[0];
401
- this.yytext += ch;
402
- this.yyleng++;
403
- this.offset++;
404
- this.match += ch;
405
- this.matched += ch;
406
- const lines = ch.match(/(?:\r\n?|\n).*/g);
407
- if (lines) {
408
- this.yylineno++;
409
- this.yylloc.last_line++;
410
- } else {
411
- this.yylloc.last_column++;
412
- }
413
- if (this.options.ranges) {
414
- this.yylloc.range[1]++;
415
- }
416
-
417
- this._input = this._input.slice(1);
418
- return ch;
419
- },
420
-
421
- // unshifts one char (or a string) into the input
422
- unput: function (ch) {
423
- const len = ch.length;
424
- const lines = ch.split(/(?:\r\n?|\n)/g);
425
-
426
- this._input = ch + this._input;
427
- this.yytext = this.yytext.substr(0, this.yytext.length - len);
428
- //this.yyleng -= len;
429
- this.offset -= len;
430
- const oldLines = this.match.split(/(?:\r\n?|\n)/g);
431
- this.match = this.match.substr(0, this.match.length - 1);
432
- this.matched = this.matched.substr(0, this.matched.length - 1);
433
-
434
- if (lines.length - 1) {
435
- this.yylineno -= lines.length - 1;
436
- }
437
- const r = this.yylloc.range;
438
-
439
- this.yylloc = {
440
- first_line: this.yylloc.first_line,
441
- last_line: this.yylineno + 1,
442
- first_column: this.yylloc.first_column,
443
- last_column: lines
444
- ? (lines.length === oldLines.length
445
- ? this.yylloc.first_column
446
- : 0) +
447
- oldLines[oldLines.length - lines.length].length -
448
- lines[0].length
449
- : this.yylloc.first_column - len,
450
- };
451
-
452
- if (this.options.ranges) {
453
- this.yylloc.range = [r[0], r[0] + this.yyleng - len];
454
- }
455
- this.yyleng = this.yytext.length;
456
- return this;
457
- },
458
-
459
- // When called from action, caches matched text and appends it on next action
460
- more: function () {
461
- this._more = true;
462
- return this;
463
- },
464
-
465
- // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
466
- reject: function () {
467
- if (this.options.backtrack_lexer) {
468
- this._backtrack = true;
469
- } else {
470
- return this.parseError(
471
- "Lexical error on line " +
472
- (this.yylineno + 1) +
473
- ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" +
474
- this.showPosition(),
475
- {
476
- text: "",
477
- token: null,
478
- line: this.yylineno,
479
- },
480
- );
481
- }
482
- return this;
483
- },
484
-
485
- // retain first n characters of the match
486
- less: function (n) {
487
- this.unput(this.match.slice(n));
488
- },
489
-
490
- // displays already matched input, i.e. for error messages
491
- pastInput: function () {
492
- const past = this.matched.substr(
493
- 0,
494
- this.matched.length - this.match.length,
495
- );
496
- return (
497
- (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, "")
498
- );
499
- },
500
-
501
- // displays upcoming input, i.e. for error messages
502
- upcomingInput: function () {
503
- let next = this.match;
504
- if (next.length < 20) {
505
- next += this._input.substr(0, 20 - next.length);
506
- }
507
- return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(
508
- /\n/g,
509
- "",
510
- );
511
- },
512
-
513
- // displays the character position where the lexing error occurred, i.e. for error messages
514
- showPosition: function () {
515
- const pre = this.pastInput();
516
- const c = new Array(pre.length + 1).join("-");
517
- return pre + this.upcomingInput() + "\n" + c + "^";
518
- },
519
-
520
- // test the lexed token: return FALSE when not a match, otherwise return token
521
- test_match: function (match, indexed_rule) {
522
- let token;
523
- let lines;
524
- let backup;
525
-
526
- if (this.options.backtrack_lexer) {
527
- // save context
528
- backup = {
529
- yylineno: this.yylineno,
530
- yylloc: {
531
- first_line: this.yylloc.first_line,
532
- last_line: this.last_line,
533
- first_column: this.yylloc.first_column,
534
- last_column: this.yylloc.last_column,
535
- },
536
- yytext: this.yytext,
537
- match: this.match,
538
- matches: this.matches,
539
- matched: this.matched,
540
- yyleng: this.yyleng,
541
- offset: this.offset,
542
- _more: this._more,
543
- _input: this._input,
544
- yy: this.yy,
545
- conditionStack: this.conditionStack.slice(0),
546
- done: this.done,
547
- };
548
- if (this.options.ranges) {
549
- backup.yylloc.range = this.yylloc.range.slice(0);
550
- }
551
- }
552
-
553
- lines = match[0].match(/(?:\r\n?|\n).*/g);
554
- if (lines) {
555
- this.yylineno += lines.length;
556
- }
557
- this.yylloc = {
558
- first_line: this.yylloc.last_line,
559
- last_line: this.yylineno + 1,
560
- first_column: this.yylloc.last_column,
561
- last_column: lines
562
- ? lines[lines.length - 1].length -
563
- lines[lines.length - 1].match(/\r?\n?/)[0].length
564
- : this.yylloc.last_column + match[0].length,
565
- };
566
- this.yytext += match[0];
567
- this.match += match[0];
568
- this.matches = match;
569
- this.yyleng = this.yytext.length;
570
- if (this.options.ranges) {
571
- this.yylloc.range = [this.offset, (this.offset += this.yyleng)];
572
- }
573
- this._more = false;
574
- this._backtrack = false;
575
- this._input = this._input.slice(match[0].length);
576
- this.matched += match[0];
577
- token = this.performAction.call(
578
- this,
579
- this.yy,
580
- this,
581
- indexed_rule,
582
- this.conditionStack[this.conditionStack.length - 1],
583
- );
584
- if (this.done && this._input) {
585
- this.done = false;
586
- }
587
- if (token) {
588
- return token;
589
- } else if (this._backtrack) {
590
- // recover context
591
- for (let k in backup) {
592
- this[k] = backup[k];
593
- }
594
- return false; // rule action called reject() implying the next rule should be tested instead.
595
- }
596
- return false;
597
- },
598
-
599
- // return next match in input
600
- next: function () {
601
- if (this.done) {
602
- return this.EOF;
603
- }
604
- if (!this._input) {
605
- this.done = true;
606
- }
607
-
608
- let token;
609
- let match;
610
- let tempMatch;
611
- let index;
612
- if (!this._more) {
613
- this.yytext = "";
614
- this.match = "";
615
- }
616
- const rules = this._currentRules();
617
- for (let i = 0; i < rules.length; i++) {
618
- tempMatch = this._input.match(this.rules[rules[i]]);
619
- if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
620
- match = tempMatch;
621
- index = i;
622
- if (this.options.backtrack_lexer) {
623
- token = this.test_match(tempMatch, rules[i]);
624
- if (token !== false) {
625
- return token;
626
- } else if (this._backtrack) {
627
- match = false;
628
- continue; // rule action called reject() implying a rule MISmatch.
629
- } else {
630
- // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)
631
- return false;
632
- }
633
- } else if (!this.options.flex) {
634
- break;
635
- }
636
- }
637
- }
638
- if (match) {
639
- token = this.test_match(match, rules[index]);
640
- if (token !== false) {
641
- return token;
642
- }
643
- // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)
644
- return false;
645
- }
646
- if (this._input === "") {
647
- return this.EOF;
648
- } else {
649
- return this.parseError(
650
- "Lexical error on line " +
651
- (this.yylineno + 1) +
652
- ". Unrecognized text.\n" +
653
- this.showPosition(),
654
- {
655
- text: "",
656
- token: null,
657
- line: this.yylineno,
658
- },
659
- );
660
- }
661
- },
662
-
663
- // return next match that has a token
664
- lex: function lex() {
665
- const r = this.next();
666
- if (r) {
667
- return r;
668
- } else {
669
- return this.lex();
670
- }
671
- },
672
-
673
- // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
674
- begin: function begin(condition) {
675
- this.conditionStack.push(condition);
676
- },
677
-
678
- // pop the previously active lexer condition state off the condition stack
679
- popState: function popState() {
680
- const n = this.conditionStack.length - 1;
681
- if (n > 0) {
682
- return this.conditionStack.pop();
683
- } else {
684
- return this.conditionStack[0];
685
- }
686
- },
687
-
688
- // produce the lexer rule set which is active for the currently active lexer condition state
689
- _currentRules: function _currentRules() {
690
- if (
691
- this.conditionStack.length &&
692
- this.conditionStack[this.conditionStack.length - 1]
693
- ) {
694
- return this.conditions[
695
- this.conditionStack[this.conditionStack.length - 1]
696
- ].rules;
697
- } else {
698
- return this.conditions["INITIAL"].rules;
699
- }
700
- },
701
-
702
- // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
703
- topState: function topState(n) {
704
- n = this.conditionStack.length - 1 - Math.abs(n || 0);
705
- if (n >= 0) {
706
- return this.conditionStack[n];
707
- } else {
708
- return "INITIAL";
709
- }
710
- },
711
-
712
- // alias for begin(condition)
713
- pushState: function pushState(condition) {
714
- this.begin(condition);
715
- },
716
-
717
- // return the number of states currently on the stack
718
- stateStackSize: function stateStackSize() {
719
- return this.conditionStack.length;
720
- },
721
- options: {},
722
- performAction: function anonymous(
723
- yy,
724
- yy_,
725
- $avoiding_name_collisions,
726
- YY_START,
727
- ) {
728
- const YYSTATE = YY_START;
729
- switch ($avoiding_name_collisions) {
730
- case 0 /* skip whitespace */:
731
- break;
732
- case 1:
733
- return 15;
734
- break;
735
- case 2:
736
- return 8;
737
- break;
738
- case 3:
739
- return 9;
740
- break;
741
- case 4:
742
- return 7;
743
- break;
744
- case 5:
745
- return 6;
746
- break;
747
- case 6:
748
- return 10;
749
- break;
750
- case 7:
751
- return 11;
752
- break;
753
- case 8:
754
- return 12;
755
- break;
756
- case 9:
757
- return 13;
758
- break;
759
- case 10:
760
- return 14;
761
- break;
762
- case 11:
763
- return 17;
764
- break;
765
- case 12:
766
- return 16;
767
- break;
768
- case 13:
769
- return 5;
770
- break;
771
- case 14:
772
- return "INVALID";
773
- break;
774
- }
775
- },
776
- rules: [
777
- /^(?:\s+)/,
778
- /^(?:[0-9]+(\.[0-9]+)?\b)/,
779
- /^(?:\*)/,
780
- /^(?:\/)/,
781
- /^(?:-)/,
782
- /^(?:\+)/,
783
- /^(?:\^)/,
784
- /^(?:!)/,
785
- /^(?:%)/,
786
- /^(?:\()/,
787
- /^(?:\))/,
788
- /^(?:PI\b)/,
789
- /^(?:E\b)/,
790
- /^(?:$)/,
791
- /^(?:.)/,
792
- ],
793
- conditions: {
794
- INITIAL: {
795
- rules: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14],
796
- inclusive: true,
797
- },
798
- },
799
- };
800
- return lexer;
801
- })();
802
- parser.lexer = lexer;
803
- function Parser() {
804
- this.yy = {};
805
- // to get rid of TS error when using method stringCalculator.parse()
806
- this.parse = this.parse.bind(this);
807
- }
808
- Parser.prototype = parser;
809
- parser.Parser = Parser;
810
- return new Parser();
811
- })();
812
-
813
- if (typeof require !== "undefined" && typeof exports !== "undefined") {
814
- exports.parser = stringCalculator;
815
- exports.Parser = stringCalculator.Parser;
816
- exports.parse = function () {
817
- return stringCalculator.parse.apply(stringCalculator, arguments);
818
- };
819
- // exports.main = function commonjsMain(args) {
820
- // if (!args[1]) {
821
- // console.log("Usage: " + args[0] + " FILE");
822
- // process.exit(1);
823
- // }
824
- // const source = require("fs").readFileSync(
825
- // require("path").normalize(args[1]),
826
- // "utf8",
827
- // );
828
- // return exports.parser.parse(source);
829
- // };
830
- // if (typeof module !== "undefined" && require.main === module) {
831
- // exports.main(process.argv.slice(1));
832
- // }
833
- }
834
- /* eslint-enable */