slick-table 0.0.17 → 0.0.18
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.
- package/package.json +5 -10
- package/.prettierignore +0 -2
- package/.prettierrc +0 -22
- package/eslint.config.js +0 -23
- package/index.html +0 -13
- package/src/App.tsx +0 -9
- package/src/app/styles/global.scss +0 -31
- package/src/app/styles/slickgrid.scss +0 -13
- package/src/app/types/index.d.ts +0 -9
- package/src/entities/portal/index.ts +0 -3
- package/src/entities/portal/lib/index.ts +0 -1
- package/src/entities/portal/lib/visibility/index.ts +0 -1
- package/src/entities/portal/lib/visibility/makeVisible.ts +0 -9
- package/src/entities/portal/model/index.ts +0 -1
- package/src/entities/portal/model/portalId.ts +0 -1
- package/src/entities/portal/ui/Overlay/Overlay.style.ts +0 -14
- package/src/entities/portal/ui/Overlay/Overlay.test.tsx +0 -19
- package/src/entities/portal/ui/Overlay/Overlay.tsx +0 -20
- package/src/entities/portal/ui/Overlay/index.ts +0 -1
- package/src/entities/portal/ui/Portal.style.ts +0 -20
- package/src/entities/portal/ui/Portal.test.tsx +0 -48
- package/src/entities/portal/ui/Portal.tsx +0 -26
- package/src/entities/portal/ui/index.ts +0 -1
- package/src/features/column-filters/index.ts +0 -1
- package/src/features/column-filters/lib/filter/applyFilter.ts +0 -25
- package/src/features/column-filters/lib/filter/index.ts +0 -1
- package/src/features/column-filters/lib/hooks/index.ts +0 -2
- package/src/features/column-filters/lib/hooks/useOpenMenu.ts +0 -43
- package/src/features/column-filters/lib/hooks/useSubscribeToEvent.ts +0 -17
- package/src/features/column-filters/lib/index.ts +0 -4
- package/src/features/column-filters/lib/props/datePickerProps.tsx +0 -11
- package/src/features/column-filters/lib/props/index.ts +0 -1
- package/src/features/column-filters/lib/select/firstIn.ts +0 -22
- package/src/features/column-filters/lib/select/index.ts +0 -1
- package/src/features/column-filters/model/consts/defaultValue.ts +0 -6
- package/src/features/column-filters/model/consts/index.ts +0 -2
- package/src/features/column-filters/model/consts/label.ts +0 -5
- package/src/features/column-filters/model/index.ts +0 -2
- package/src/features/column-filters/model/types/IProps.ts +0 -9
- package/src/features/column-filters/model/types/index.ts +0 -1
- package/src/features/column-filters/ui/BooleanInput/BooleanInput.style.ts +0 -10
- package/src/features/column-filters/ui/BooleanInput/BooleanInput.tsx +0 -53
- package/src/features/column-filters/ui/BooleanInput/index.ts +0 -1
- package/src/features/column-filters/ui/ButtonReset/ButtonReset.style.ts +0 -10
- package/src/features/column-filters/ui/ButtonReset/ButtonReset.tsx +0 -39
- package/src/features/column-filters/ui/ButtonReset/index.ts +0 -1
- package/src/features/column-filters/ui/ColumnFilters.style.ts +0 -12
- package/src/features/column-filters/ui/ColumnFilters.tsx +0 -41
- package/src/features/column-filters/ui/DateBetween/DateBetween.tsx +0 -52
- package/src/features/column-filters/ui/DateBetween/index.ts +0 -1
- package/src/features/column-filters/ui/DateInput/DateInput.tsx +0 -36
- package/src/features/column-filters/ui/DateInput/index.ts +0 -1
- package/src/features/column-filters/ui/InputArea/InputArea.tsx +0 -63
- package/src/features/column-filters/ui/InputArea/index.ts +0 -1
- package/src/features/column-filters/ui/MultipleSelect/index.ts +0 -1
- package/src/features/column-filters/ui/MultipleSelect/lib/index.ts +0 -2
- package/src/features/column-filters/ui/MultipleSelect/lib/props/index.ts +0 -1
- package/src/features/column-filters/ui/MultipleSelect/lib/props/props.ts +0 -36
- package/src/features/column-filters/ui/MultipleSelect/lib/sorting/ascending.ts +0 -17
- package/src/features/column-filters/ui/MultipleSelect/lib/sorting/index.ts +0 -1
- package/src/features/column-filters/ui/MultipleSelect/model/IValue.ts +0 -1
- package/src/features/column-filters/ui/MultipleSelect/model/index.ts +0 -1
- package/src/features/column-filters/ui/MultipleSelect/ui/MultipleSelect.style.ts +0 -9
- package/src/features/column-filters/ui/MultipleSelect/ui/MultipleSelect.tsx +0 -72
- package/src/features/column-filters/ui/MultipleSelect/ui/index.ts +0 -1
- package/src/features/column-filters/ui/NumberBetween/NumberBetween.tsx +0 -42
- package/src/features/column-filters/ui/NumberBetween/index.ts +0 -1
- package/src/features/column-filters/ui/NumberInput/NumberInput.tsx +0 -24
- package/src/features/column-filters/ui/NumberInput/index.ts +0 -1
- package/src/features/column-filters/ui/SelectFilter/index.ts +0 -1
- package/src/features/column-filters/ui/SelectFilter/model/index.ts +0 -1
- package/src/features/column-filters/ui/SelectFilter/model/options/index.ts +0 -1
- package/src/features/column-filters/ui/SelectFilter/model/options/options.ts +0 -66
- package/src/features/column-filters/ui/SelectFilter/ui/SelectFilter.tsx +0 -50
- package/src/features/column-filters/ui/SelectFilter/ui/index.ts +0 -1
- package/src/features/column-filters/ui/TextInput/TextInput.tsx +0 -23
- package/src/features/column-filters/ui/TextInput/index.ts +0 -1
- package/src/features/column-filters/ui/index.ts +0 -1
- package/src/features/context-menu/index.ts +0 -1
- package/src/features/context-menu/lib/hooks/index.ts +0 -1
- package/src/features/context-menu/lib/hooks/useSubscribeToEvent.ts +0 -25
- package/src/features/context-menu/lib/index.ts +0 -1
- package/src/features/context-menu/ui/ButtonDownloadCSV/ButtonDownloadCSV.tsx +0 -34
- package/src/features/context-menu/ui/ButtonDownloadCSV/index.ts +0 -1
- package/src/features/context-menu/ui/ButtonGroup/ButtonGroup.tsx +0 -28
- package/src/features/context-menu/ui/ButtonGroup/index.ts +0 -1
- package/src/features/context-menu/ui/ButtonResetFilters/index.ts +0 -1
- package/src/features/context-menu/ui/ButtonResetFilters/lib/index.ts +0 -1
- package/src/features/context-menu/ui/ButtonResetFilters/lib/visibility/hasFiltersApplied.ts +0 -8
- package/src/features/context-menu/ui/ButtonResetFilters/lib/visibility/index.ts +0 -1
- package/src/features/context-menu/ui/ButtonResetFilters/ui/ButtonResetFilters.tsx +0 -39
- package/src/features/context-menu/ui/ButtonResetFilters/ui/index.ts +0 -1
- package/src/features/context-menu/ui/ButtonUngroup/ButtonUngroup.tsx +0 -28
- package/src/features/context-menu/ui/ButtonUngroup/index.ts +0 -1
- package/src/features/context-menu/ui/CollapseAll/CollapseAll.tsx +0 -31
- package/src/features/context-menu/ui/CollapseAll/index.ts +0 -1
- package/src/features/context-menu/ui/ContextMenu.style.ts +0 -29
- package/src/features/context-menu/ui/ContextMenu.tsx +0 -51
- package/src/features/context-menu/ui/CopyToClipboard/CopyToClipboard.tsx +0 -42
- package/src/features/context-menu/ui/CopyToClipboard/index.ts +0 -1
- package/src/features/context-menu/ui/ExpandAll/ExpandAll.tsx +0 -30
- package/src/features/context-menu/ui/ExpandAll/index.ts +0 -1
- package/src/features/context-menu/ui/Print/index.ts +0 -1
- package/src/features/context-menu/ui/Print/ui/Print.tsx +0 -25
- package/src/features/context-menu/ui/Print/ui/index.ts +0 -1
- package/src/features/context-menu/ui/index.ts +0 -1
- package/src/index.scss +0 -2
- package/src/index.ts +0 -2
- package/src/main.tsx +0 -15
- package/src/pages/main/index.ts +0 -1
- package/src/pages/main/lib/columns.ts +0 -33
- package/src/pages/main/lib/index.ts +0 -3
- package/src/pages/main/lib/options.ts +0 -6
- package/src/pages/main/lib/table.ts +0 -11
- package/src/pages/main/ui/Main.style.ts +0 -18
- package/src/pages/main/ui/Main.tsx +0 -30
- package/src/pages/main/ui/index.ts +0 -1
- package/src/setupTests.ts +0 -5
- package/src/shared/lib/an-event/index.ts +0 -31
- package/src/shared/lib/datetime/dateToString.spec.ts +0 -11
- package/src/shared/lib/datetime/dateToString.ts +0 -8
- package/src/shared/lib/datetime/getTime.spec.ts +0 -10
- package/src/shared/lib/datetime/getTime.ts +0 -3
- package/src/shared/lib/datetime/index.ts +0 -2
- package/src/shared/lib/debounce/index.ts +0 -11
- package/src/shared/lib/dom/elementNotVisible.spec.ts +0 -72
- package/src/shared/lib/dom/elementNotVisible.ts +0 -9
- package/src/shared/lib/dom/index.ts +0 -1
- package/src/shared/lib/format/IOptions.ts +0 -11
- package/src/shared/lib/format/addParentheses.spec.ts +0 -9
- package/src/shared/lib/format/addParentheses.ts +0 -7
- package/src/shared/lib/format/formatNumber.spec.ts +0 -50
- package/src/shared/lib/format/formatNumber.ts +0 -62
- package/src/shared/lib/format/index.ts +0 -2
- package/src/shared/lib/numbers/index.ts +0 -1
- package/src/shared/lib/numbers/toNumber.spec.ts +0 -25
- package/src/shared/lib/numbers/toNumber.ts +0 -11
- package/src/shared/lib/regexp/dates.spec.ts +0 -23
- package/src/shared/lib/regexp/dates.ts +0 -6
- package/src/shared/lib/regexp/escapeSpecialChar.spec.ts +0 -24
- package/src/shared/lib/regexp/escapeSpecialChar.ts +0 -4
- package/src/shared/lib/regexp/index.ts +0 -2
- package/src/shared/lib/slickgrid/index.ts +0 -68
- package/src/shared/lib/slickgrid/lib/callbacks/getOnKeyDownCallback.ts +0 -12
- package/src/shared/lib/slickgrid/lib/callbacks/index.ts +0 -4
- package/src/shared/lib/slickgrid/lib/callbacks/onCellChange.ts +0 -14
- package/src/shared/lib/slickgrid/lib/callbacks/onRowCountChanged.ts +0 -12
- package/src/shared/lib/slickgrid/lib/callbacks/onRowsChanged.ts +0 -8
- package/src/shared/lib/slickgrid/lib/contextMenu/index.ts +0 -1
- package/src/shared/lib/slickgrid/lib/contextMenu/openContextMenu.ts +0 -17
- package/src/shared/lib/slickgrid/lib/editors/Autocomplete/Autocomplete.ts +0 -152
- package/src/shared/lib/slickgrid/lib/editors/Autocomplete/EditorAutocomplete.ts +0 -66
- package/src/shared/lib/slickgrid/lib/editors/Autocomplete/EditorSelectWithSearch.ts +0 -79
- package/src/shared/lib/slickgrid/lib/editors/Autocomplete/index.ts +0 -3
- package/src/shared/lib/slickgrid/lib/editors/EditorAmount.ts +0 -82
- package/src/shared/lib/slickgrid/lib/editors/EditorDate.ts +0 -127
- package/src/shared/lib/slickgrid/lib/editors/EditorSelectNumber.ts +0 -16
- package/src/shared/lib/slickgrid/lib/editors/EditorSelectString.ts +0 -95
- package/src/shared/lib/slickgrid/lib/editors/index.ts +0 -9
- package/src/shared/lib/slickgrid/lib/formatters/DateFormatter.ts +0 -9
- package/src/shared/lib/slickgrid/lib/formatters/FormatterCheck.ts +0 -11
- package/src/shared/lib/slickgrid/lib/formatters/PercentFormatter.spec.ts +0 -11
- package/src/shared/lib/slickgrid/lib/formatters/PercentFormatter.ts +0 -8
- package/src/shared/lib/slickgrid/lib/formatters/StringFormatter.ts +0 -2
- package/src/shared/lib/slickgrid/lib/formatters/getFormatterNumber.ts +0 -17
- package/src/shared/lib/slickgrid/lib/formatters/index.ts +0 -5
- package/src/shared/lib/slickgrid/lib/functions/addNewRow.ts +0 -23
- package/src/shared/lib/slickgrid/lib/functions/commitCurrentEdit.ts +0 -6
- package/src/shared/lib/slickgrid/lib/functions/copySelectedRows.ts +0 -35
- package/src/shared/lib/slickgrid/lib/functions/deleteRows.ts +0 -20
- package/src/shared/lib/slickgrid/lib/functions/getActiveRowId.ts +0 -16
- package/src/shared/lib/slickgrid/lib/functions/getDisplayedRows.ts +0 -13
- package/src/shared/lib/slickgrid/lib/functions/getLastRow.ts +0 -6
- package/src/shared/lib/slickgrid/lib/functions/getMaxId.ts +0 -13
- package/src/shared/lib/slickgrid/lib/functions/index.ts +0 -10
- package/src/shared/lib/slickgrid/lib/functions/isDeletionDangerous.ts +0 -21
- package/src/shared/lib/slickgrid/lib/functions/wereEdited.ts +0 -12
- package/src/shared/lib/slickgrid/lib/grouping/index.ts +0 -1
- package/src/shared/lib/slickgrid/lib/grouping/sumTotalsFormatter.ts +0 -21
- package/src/shared/lib/slickgrid/lib/highlighting/getColumnsHash.ts +0 -8
- package/src/shared/lib/slickgrid/lib/highlighting/highlightCell.ts +0 -21
- package/src/shared/lib/slickgrid/lib/highlighting/highlightColumns.ts +0 -24
- package/src/shared/lib/slickgrid/lib/highlighting/index.ts +0 -2
- package/src/shared/lib/slickgrid/lib/hooks/eventClickOnTable.ts +0 -17
- package/src/shared/lib/slickgrid/lib/hooks/index.ts +0 -3
- package/src/shared/lib/slickgrid/lib/hooks/useHotKeys.ts +0 -39
- package/src/shared/lib/slickgrid/lib/hooks/useListenIfTablesWereEdited.ts +0 -36
- package/src/shared/lib/slickgrid/lib/hooks/useUpdateTotal.ts +0 -19
- package/src/shared/lib/slickgrid/lib/hotKeys/hotKeysCopy.ts +0 -7
- package/src/shared/lib/slickgrid/lib/hotKeys/hotKeysDelete.ts +0 -7
- package/src/shared/lib/slickgrid/lib/hotKeys/hotKeysRedo.ts +0 -7
- package/src/shared/lib/slickgrid/lib/hotKeys/hotKeysReverse.ts +0 -7
- package/src/shared/lib/slickgrid/lib/hotKeys/hotKeysUndo.ts +0 -7
- package/src/shared/lib/slickgrid/lib/hotKeys/index.ts +0 -7
- package/src/shared/lib/slickgrid/lib/hotKeys/nothingToCopy.ts +0 -14
- package/src/shared/lib/slickgrid/lib/hotKeys/positionToPaste.ts +0 -12
- package/src/shared/lib/slickgrid/lib/index.ts +0 -59
- package/src/shared/lib/slickgrid/lib/selection/getUpdates.ts +0 -41
- package/src/shared/lib/slickgrid/lib/selection/index.ts +0 -2
- package/src/shared/lib/slickgrid/lib/selection/selectedRows.ts +0 -17
- package/src/shared/lib/slickgrid/lib/sorting/ColumnSorter.ts +0 -89
- package/src/shared/lib/slickgrid/lib/sorting/index.ts +0 -1
- package/src/shared/lib/slickgrid/lib/totals-row/addTitle.ts +0 -8
- package/src/shared/lib/slickgrid/lib/totals-row/addTotalSum.ts +0 -16
- package/src/shared/lib/slickgrid/lib/totals-row/index.ts +0 -2
- package/src/shared/lib/slickgrid/lib/totals-row/totalAmountOf.ts +0 -13
- package/src/shared/lib/slickgrid/lib/totals-row/updateTotal.ts +0 -25
- package/src/shared/lib/slickgrid/lib/totals-row/updateTotals.ts +0 -10
- package/src/shared/lib/slickgrid/lib/validators/DateValidator.ts +0 -12
- package/src/shared/lib/slickgrid/lib/validators/EmptyStringValidator.ts +0 -5
- package/src/shared/lib/slickgrid/lib/validators/LengthValidator.ts +0 -7
- package/src/shared/lib/slickgrid/lib/validators/index.ts +0 -3
- package/src/shared/lib/slickgrid/model/SlickTable/csvDownloadManager/DownloadManager.ts +0 -110
- package/src/shared/lib/slickgrid/model/SlickTable/csvDownloadManager/index.ts +0 -1
- package/src/shared/lib/slickgrid/model/SlickTable/filters/DeletedRowsFilter.test.ts +0 -36
- package/src/shared/lib/slickgrid/model/SlickTable/filters/DeletedRowsFilter.ts +0 -12
- package/src/shared/lib/slickgrid/model/SlickTable/filters/Filter.ts +0 -54
- package/src/shared/lib/slickgrid/model/SlickTable/filters/WithoutFilter.ts +0 -30
- package/src/shared/lib/slickgrid/model/SlickTable/filters/decorators/ColumnFilter/DecoratorColumnFilter.ts +0 -53
- package/src/shared/lib/slickgrid/model/SlickTable/filters/decorators/ColumnFilter/Filter.ts +0 -108
- package/src/shared/lib/slickgrid/model/SlickTable/filters/decorators/ColumnFilter/index.ts +0 -1
- package/src/shared/lib/slickgrid/model/SlickTable/filters/decorators/DecoratorEndingDate.ts +0 -16
- package/src/shared/lib/slickgrid/model/SlickTable/filters/decorators/DecoratorFilter.ts +0 -55
- package/src/shared/lib/slickgrid/model/SlickTable/filters/decorators/DecoratorPeriod.ts +0 -24
- package/src/shared/lib/slickgrid/model/SlickTable/filters/decorators/index.ts +0 -4
- package/src/shared/lib/slickgrid/model/SlickTable/filters/index.ts +0 -9
- package/src/shared/lib/slickgrid/model/SlickTable/hotKeys/DefaultHotKeys.ts +0 -118
- package/src/shared/lib/slickgrid/model/SlickTable/hotKeys/WithoutHotKeys.ts +0 -20
- package/src/shared/lib/slickgrid/model/SlickTable/hotKeys/decorators/HotKeysDecorator.ts +0 -32
- package/src/shared/lib/slickgrid/model/SlickTable/hotKeys/decorators/PreventCopying.ts +0 -21
- package/src/shared/lib/slickgrid/model/SlickTable/hotKeys/decorators/RedoUndoOnly.ts +0 -25
- package/src/shared/lib/slickgrid/model/SlickTable/hotKeys/decorators/WithConfirmationOfDeletion.ts +0 -33
- package/src/shared/lib/slickgrid/model/SlickTable/hotKeys/decorators/index.ts +0 -4
- package/src/shared/lib/slickgrid/model/SlickTable/hotKeys/index.ts +0 -9
- package/src/shared/lib/slickgrid/model/SlickTable/index.ts +0 -18
- package/src/shared/lib/slickgrid/model/SlickTable/printer/DefaultPrinter.ts +0 -179
- package/src/shared/lib/slickgrid/model/SlickTable/printer/index.ts +0 -1
- package/src/shared/lib/slickgrid/model/SlickTable/printer/model/consts/cssStyles.ts +0 -46
- package/src/shared/lib/slickgrid/model/SlickTable/printer/model/consts/index.ts +0 -1
- package/src/shared/lib/slickgrid/model/SlickTable/printer/model/index.ts +0 -1
- package/src/shared/lib/slickgrid/model/SlickTable/table/SlickTable.ts +0 -148
- package/src/shared/lib/slickgrid/model/SlickTable/table/index.ts +0 -1
- package/src/shared/lib/slickgrid/model/events/eventContextMenu.ts +0 -10
- package/src/shared/lib/slickgrid/model/events/index.ts +0 -1
- package/src/shared/lib/slickgrid/model/index.ts +0 -17
- package/src/shared/lib/slickgrid/ui/HeaderButtons/index.ts +0 -2
- package/src/shared/lib/slickgrid/ui/HeaderButtons/lib/handleClick/handleHeaderButtons.ts +0 -27
- package/src/shared/lib/slickgrid/ui/HeaderButtons/lib/handleClick/index.ts +0 -1
- package/src/shared/lib/slickgrid/ui/HeaderButtons/lib/highlighting/headerButtons.ts +0 -45
- package/src/shared/lib/slickgrid/ui/HeaderButtons/lib/highlighting/index.ts +0 -1
- package/src/shared/lib/slickgrid/ui/HeaderButtons/lib/index.ts +0 -2
- package/src/shared/lib/slickgrid/ui/HeaderButtons/model/buttons/index.ts +0 -1
- package/src/shared/lib/slickgrid/ui/HeaderButtons/model/buttons/openColumnFilter.ts +0 -10
- package/src/shared/lib/slickgrid/ui/HeaderButtons/model/event/eventOpenColumnFilters.ts +0 -13
- package/src/shared/lib/slickgrid/ui/HeaderButtons/model/event/index.ts +0 -1
- package/src/shared/lib/slickgrid/ui/HeaderButtons/model/index.ts +0 -2
- package/src/shared/lib/slickgrid/ui/SlickgridTable/index.ts +0 -1
- package/src/shared/lib/slickgrid/ui/SlickgridTable/lib/callbacks/index.ts +0 -1
- package/src/shared/lib/slickgrid/ui/SlickgridTable/lib/callbacks/onAddNewRow.ts +0 -34
- package/src/shared/lib/slickgrid/ui/SlickgridTable/lib/hooks/index.ts +0 -1
- package/src/shared/lib/slickgrid/ui/SlickgridTable/lib/hooks/useGrid.ts +0 -140
- package/src/shared/lib/slickgrid/ui/SlickgridTable/lib/index.ts +0 -2
- package/src/shared/lib/slickgrid/ui/SlickgridTable/model/defaultOptions.ts +0 -8
- package/src/shared/lib/slickgrid/ui/SlickgridTable/model/index.ts +0 -2
- package/src/shared/lib/slickgrid/ui/SlickgridTable/model/types/Props.ts +0 -42
- package/src/shared/lib/slickgrid/ui/SlickgridTable/model/types/index.ts +0 -1
- package/src/shared/lib/slickgrid/ui/SlickgridTable/ui/SlickgridTable.tsx +0 -51
- package/src/shared/lib/slickgrid/ui/SlickgridTable/ui/index.ts +0 -1
- package/src/shared/lib/slickgrid/ui/columns/columnCheckboxSelector/columnCheckboxSelector.ts +0 -7
- package/src/shared/lib/slickgrid/ui/columns/columnCheckboxSelector/index.ts +0 -1
- package/src/shared/lib/slickgrid/ui/columns/columnIsEdited/index.ts +0 -1
- package/src/shared/lib/slickgrid/ui/columns/columnIsEdited/lib/index.ts +0 -1
- package/src/shared/lib/slickgrid/ui/columns/columnIsEdited/lib/setEditedMark.spec.ts +0 -11
- package/src/shared/lib/slickgrid/ui/columns/columnIsEdited/lib/setEditedMark.ts +0 -7
- package/src/shared/lib/slickgrid/ui/columns/columnIsEdited/ui/columnIsEdited.ts +0 -16
- package/src/shared/lib/slickgrid/ui/columns/columnIsEdited/ui/index.ts +0 -1
- package/src/shared/lib/slickgrid/ui/columns/index.ts +0 -2
- package/src/shared/lib/slickgrid/ui/index.ts +0 -9
- package/src/shared/lib/slickgrid/ui/styles/WithTableStyles/WithTableStyles.style.ts +0 -156
- package/src/shared/lib/slickgrid/ui/styles/WithTableStyles/WithTableStyles.tsx +0 -11
- package/src/shared/lib/slickgrid/ui/styles/WithTableStyles/index.ts +0 -1
- package/src/shared/lib/slickgrid/ui/styles/index.ts +0 -1
- package/src/shared/lib/slickgrid/ui/styles/keyframes/index.ts +0 -1
- package/src/shared/lib/slickgrid/ui/styles/keyframes/wink.ts +0 -7
- package/src/shared/lib/sorting/Sort.ts +0 -26
- package/src/shared/lib/sorting/index.ts +0 -1
- package/src/shared/lib/stringCalculator/index.ts +0 -2
- package/src/shared/lib/stringCalculator/stringCalculator.js +0 -834
- package/src/shared/lib/stringCalculator/stringCalculator.spec.ts +0 -16
- package/src/shared/lib/strings/deleteDoubleQuotes.spec.ts +0 -11
- package/src/shared/lib/strings/deleteDoubleQuotes.ts +0 -5
- package/src/shared/lib/strings/index.ts +0 -3
- package/src/shared/lib/strings/removeHtml.spec.ts +0 -29
- package/src/shared/lib/strings/removeHtml.ts +0 -5
- package/src/shared/lib/strings/toStringWithCommas.spec.ts +0 -16
- package/src/shared/lib/strings/toStringWithCommas.ts +0 -15
- package/src/shared/model/consts/columnId.ts +0 -1
- package/src/shared/model/consts/dateFormats.ts +0 -5
- package/src/shared/model/consts/index.ts +0 -4
- package/src/shared/model/consts/invalidDate.ts +0 -1
- package/src/shared/model/consts/noPrivilegesMessage.ts +0 -1
- package/src/shared/model/enums/EColumnFilter.ts +0 -16
- package/src/shared/model/enums/EColumnFiltersGroup.ts +0 -10
- package/src/shared/model/enums/EDateFormat.ts +0 -11
- package/src/shared/model/enums/EKey.ts +0 -8
- package/src/shared/model/enums/EKeyCode.ts +0 -8
- package/src/shared/model/enums/ESortType.ts +0 -6
- package/src/shared/model/enums/index.ts +0 -6
- package/src/shared/model/types/IArguments.ts +0 -14
- package/src/shared/model/types/IColumn.ts +0 -13
- package/src/shared/model/types/IColumnFilterValue.ts +0 -4
- package/src/shared/model/types/IDownloadManager.ts +0 -6
- package/src/shared/model/types/IEditedRow.ts +0 -5
- package/src/shared/model/types/IExternalVariables.ts +0 -1
- package/src/shared/model/types/IFilter.ts +0 -30
- package/src/shared/model/types/IGrouping.ts +0 -12
- package/src/shared/model/types/IHotKeysBehavior.ts +0 -15
- package/src/shared/model/types/IObserver.ts +0 -3
- package/src/shared/model/types/IPrinter.ts +0 -24
- package/src/shared/model/types/ISlickRow.ts +0 -1
- package/src/shared/model/types/ISlickTable.ts +0 -38
- package/src/shared/model/types/TGridRow.ts +0 -6
- package/src/shared/model/types/index.ts +0 -14
- package/src/shared/ui/ContextSelect/ContextSelect.style.ts +0 -9
- package/src/shared/ui/ContextSelect/ContextSelect.tsx +0 -87
- package/src/shared/ui/ContextSelect/index.ts +0 -2
- package/src/shared/ui/notification/index.ts +0 -1
- package/src/shared/ui/notification/model/index.ts +0 -1
- package/src/shared/ui/notification/ui/index.style.ts +0 -13
- package/src/shared/ui/notification/ui/index.tsx +0 -41
- package/src/shared/ui/styles/WithDatePickerStyles.ts +0 -11
- package/src/shared/ui/styles/index.ts +0 -1
- package/src/vite-env.d.ts +0 -1
- package/tsconfig.build-types.json +0 -21
- package/tsconfig.build.json +0 -17
- package/tsconfig.json +0 -23
- 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 */
|