slick-table 0.0.1 → 0.0.3
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/dist/myWorkLogo.ico +0 -0
- package/dist/slick-table.es.js +18734 -0
- package/dist/slick-table.umd.js +281 -0
- package/package.json +13 -2
- package/src/shared/lib/sorting/Sort.ts +1 -1
- package/tsconfig.build-types.json +21 -0
- package/tsconfig.tsbuildinfo +1 -0
- package/vite.config.ts +15 -0
- package/dist/entities/portal/index.js +0 -3
- package/dist/entities/portal/lib/index.js +0 -1
- package/dist/entities/portal/lib/visibility/index.js +0 -1
- package/dist/entities/portal/lib/visibility/makeVisible.js +0 -9
- package/dist/entities/portal/model/index.js +0 -1
- package/dist/entities/portal/model/portalId.js +0 -1
- package/dist/entities/portal/ui/Overlay/Overlay.js +0 -8
- package/dist/entities/portal/ui/Overlay/Overlay.style.js +0 -12
- package/dist/entities/portal/ui/Overlay/index.js +0 -1
- package/dist/entities/portal/ui/Portal.js +0 -12
- package/dist/entities/portal/ui/Portal.style.js +0 -18
- package/dist/entities/portal/ui/index.js +0 -1
- package/dist/features/column-filters/index.js +0 -1
- package/dist/features/column-filters/lib/filter/applyFilter.js +0 -24
- package/dist/features/column-filters/lib/filter/index.js +0 -1
- package/dist/features/column-filters/lib/hooks/index.js +0 -2
- package/dist/features/column-filters/lib/hooks/useOpenMenu.js +0 -36
- package/dist/features/column-filters/lib/hooks/useSubscribeToEvent.js +0 -13
- package/dist/features/column-filters/lib/index.js +0 -4
- package/dist/features/column-filters/lib/props/datePickerProps.js +0 -9
- package/dist/features/column-filters/lib/props/index.js +0 -1
- package/dist/features/column-filters/lib/select/firstIn.js +0 -21
- package/dist/features/column-filters/lib/select/index.js +0 -1
- package/dist/features/column-filters/model/consts/defaultValue.js +0 -4
- package/dist/features/column-filters/model/consts/index.js +0 -2
- package/dist/features/column-filters/model/consts/label.js +0 -5
- package/dist/features/column-filters/model/index.js +0 -1
- package/dist/features/column-filters/model/types/IProps.js +0 -1
- package/dist/features/column-filters/model/types/index.js +0 -1
- package/dist/features/column-filters/ui/BooleanInput/BooleanInput.js +0 -11
- package/dist/features/column-filters/ui/BooleanInput/BooleanInput.style.js +0 -8
- package/dist/features/column-filters/ui/BooleanInput/index.js +0 -1
- package/dist/features/column-filters/ui/ButtonReset/ButtonReset.js +0 -21
- package/dist/features/column-filters/ui/ButtonReset/ButtonReset.style.js +0 -8
- package/dist/features/column-filters/ui/ButtonReset/index.js +0 -1
- package/dist/features/column-filters/ui/ColumnFilters.js +0 -20
- package/dist/features/column-filters/ui/ColumnFilters.style.js +0 -10
- package/dist/features/column-filters/ui/DateBetween/DateBetween.js +0 -30
- package/dist/features/column-filters/ui/DateBetween/index.js +0 -1
- package/dist/features/column-filters/ui/DateInput/DateInput.js +0 -21
- package/dist/features/column-filters/ui/DateInput/index.js +0 -1
- package/dist/features/column-filters/ui/InputArea/InputArea.js +0 -14
- package/dist/features/column-filters/ui/InputArea/index.js +0 -1
- package/dist/features/column-filters/ui/MultipleSelect/index.js +0 -1
- package/dist/features/column-filters/ui/MultipleSelect/lib/index.js +0 -2
- package/dist/features/column-filters/ui/MultipleSelect/lib/props/index.js +0 -1
- package/dist/features/column-filters/ui/MultipleSelect/lib/props/props.js +0 -29
- package/dist/features/column-filters/ui/MultipleSelect/lib/sorting/ascending.js +0 -16
- package/dist/features/column-filters/ui/MultipleSelect/lib/sorting/index.js +0 -1
- package/dist/features/column-filters/ui/MultipleSelect/model/IValue.js +0 -1
- package/dist/features/column-filters/ui/MultipleSelect/model/index.js +0 -1
- package/dist/features/column-filters/ui/MultipleSelect/ui/MultipleSelect.js +0 -31
- package/dist/features/column-filters/ui/MultipleSelect/ui/MultipleSelect.style.js +0 -7
- package/dist/features/column-filters/ui/MultipleSelect/ui/index.js +0 -1
- package/dist/features/column-filters/ui/NumberBetween/NumberBetween.js +0 -18
- package/dist/features/column-filters/ui/NumberBetween/index.js +0 -1
- package/dist/features/column-filters/ui/NumberInput/NumberInput.js +0 -11
- package/dist/features/column-filters/ui/NumberInput/index.js +0 -1
- package/dist/features/column-filters/ui/SelectFilter/index.js +0 -1
- package/dist/features/column-filters/ui/SelectFilter/model/index.js +0 -1
- package/dist/features/column-filters/ui/SelectFilter/model/options/index.js +0 -1
- package/dist/features/column-filters/ui/SelectFilter/model/options/options.js +0 -60
- package/dist/features/column-filters/ui/SelectFilter/ui/SelectFilter.js +0 -31
- package/dist/features/column-filters/ui/SelectFilter/ui/index.js +0 -1
- package/dist/features/column-filters/ui/TextInput/TextInput.js +0 -12
- package/dist/features/column-filters/ui/TextInput/index.js +0 -1
- package/dist/features/column-filters/ui/index.js +0 -1
- package/dist/features/context-menu/index.js +0 -1
- package/dist/features/context-menu/lib/hooks/index.js +0 -1
- package/dist/features/context-menu/lib/hooks/useSubscribeToEvent.js +0 -21
- package/dist/features/context-menu/lib/index.js +0 -1
- package/dist/features/context-menu/ui/ButtonDownloadCSV/ButtonDownloadCSV.js +0 -16
- package/dist/features/context-menu/ui/ButtonDownloadCSV/index.js +0 -1
- package/dist/features/context-menu/ui/ButtonGroup/ButtonGroup.js +0 -15
- package/dist/features/context-menu/ui/ButtonGroup/index.js +0 -1
- package/dist/features/context-menu/ui/ButtonResetFilters/index.js +0 -1
- package/dist/features/context-menu/ui/ButtonResetFilters/lib/index.js +0 -1
- package/dist/features/context-menu/ui/ButtonResetFilters/lib/visibility/hasFiltersApplied.js +0 -5
- package/dist/features/context-menu/ui/ButtonResetFilters/lib/visibility/index.js +0 -1
- package/dist/features/context-menu/ui/ButtonResetFilters/ui/ButtonResetFilters.js +0 -23
- package/dist/features/context-menu/ui/ButtonResetFilters/ui/index.js +0 -1
- package/dist/features/context-menu/ui/ButtonUngroup/ButtonUngroup.js +0 -15
- package/dist/features/context-menu/ui/ButtonUngroup/index.js +0 -1
- package/dist/features/context-menu/ui/CollapseAll/CollapseAll.js +0 -17
- package/dist/features/context-menu/ui/CollapseAll/index.js +0 -1
- package/dist/features/context-menu/ui/ContextMenu.js +0 -20
- package/dist/features/context-menu/ui/ContextMenu.style.js +0 -25
- package/dist/features/context-menu/ui/CopyToClipboard/CopyToClipboard.js +0 -27
- package/dist/features/context-menu/ui/CopyToClipboard/index.js +0 -1
- package/dist/features/context-menu/ui/ExpandAll/ExpandAll.js +0 -17
- package/dist/features/context-menu/ui/ExpandAll/index.js +0 -1
- package/dist/features/context-menu/ui/Print/index.js +0 -1
- package/dist/features/context-menu/ui/Print/ui/Print.js +0 -11
- package/dist/features/context-menu/ui/Print/ui/index.js +0 -1
- package/dist/features/context-menu/ui/index.js +0 -1
- package/dist/index.js +0 -1
- package/dist/shared/lib/an-event/index.js +0 -22
- package/dist/shared/lib/datetime/dateToString.js +0 -6
- package/dist/shared/lib/datetime/getTime.js +0 -3
- package/dist/shared/lib/datetime/index.js +0 -2
- package/dist/shared/lib/debounce/index.js +0 -11
- package/dist/shared/lib/dom/elementNotVisible.js +0 -8
- package/dist/shared/lib/dom/index.js +0 -1
- package/dist/shared/lib/format/IOptions.js +0 -1
- package/dist/shared/lib/format/addParentheses.js +0 -6
- package/dist/shared/lib/format/formatNumber.js +0 -48
- package/dist/shared/lib/format/index.js +0 -1
- package/dist/shared/lib/numbers/index.js +0 -1
- package/dist/shared/lib/numbers/toNumber.js +0 -14
- package/dist/shared/lib/regexp/dates.js +0 -6
- package/dist/shared/lib/regexp/escapeSpecialChar.js +0 -4
- package/dist/shared/lib/regexp/index.js +0 -2
- package/dist/shared/lib/slickgrid/index.js +0 -3
- package/dist/shared/lib/slickgrid/lib/callbacks/getOnKeyDownCallback.js +0 -7
- package/dist/shared/lib/slickgrid/lib/callbacks/index.js +0 -4
- package/dist/shared/lib/slickgrid/lib/callbacks/onCellChange.js +0 -8
- package/dist/shared/lib/slickgrid/lib/callbacks/onRowCountChanged.js +0 -7
- package/dist/shared/lib/slickgrid/lib/callbacks/onRowsChanged.js +0 -4
- package/dist/shared/lib/slickgrid/lib/contextMenu/index.js +0 -1
- package/dist/shared/lib/slickgrid/lib/contextMenu/openContextMenu.js +0 -12
- package/dist/shared/lib/slickgrid/lib/editors/Autocomplete/Autocomplete.js +0 -141
- package/dist/shared/lib/slickgrid/lib/editors/Autocomplete/EditorAutocomplete.js +0 -57
- package/dist/shared/lib/slickgrid/lib/editors/Autocomplete/EditorSelectWithSearch.js +0 -60
- package/dist/shared/lib/slickgrid/lib/editors/Autocomplete/index.js +0 -3
- package/dist/shared/lib/slickgrid/lib/editors/EditorAmount.js +0 -70
- package/dist/shared/lib/slickgrid/lib/editors/EditorDate.js +0 -101
- package/dist/shared/lib/slickgrid/lib/editors/EditorSelectNumber.js +0 -7
- package/dist/shared/lib/slickgrid/lib/editors/EditorSelectString.js +0 -70
- package/dist/shared/lib/slickgrid/lib/editors/index.js +0 -5
- package/dist/shared/lib/slickgrid/lib/formatters/DateFormatter.js +0 -4
- package/dist/shared/lib/slickgrid/lib/formatters/FormatterCheck.js +0 -6
- package/dist/shared/lib/slickgrid/lib/formatters/PercentFormatter.js +0 -4
- package/dist/shared/lib/slickgrid/lib/formatters/StringFormatter.js +0 -1
- package/dist/shared/lib/slickgrid/lib/formatters/getFormatterNumber.js +0 -9
- package/dist/shared/lib/slickgrid/lib/formatters/index.js +0 -5
- package/dist/shared/lib/slickgrid/lib/functions/addNewRow.js +0 -16
- package/dist/shared/lib/slickgrid/lib/functions/commitCurrentEdit.js +0 -5
- package/dist/shared/lib/slickgrid/lib/functions/copySelectedRows.js +0 -33
- package/dist/shared/lib/slickgrid/lib/functions/deleteRows.js +0 -17
- package/dist/shared/lib/slickgrid/lib/functions/getActiveRowId.js +0 -13
- package/dist/shared/lib/slickgrid/lib/functions/getDisplayedRows.js +0 -11
- package/dist/shared/lib/slickgrid/lib/functions/getLastRow.js +0 -4
- package/dist/shared/lib/slickgrid/lib/functions/getMaxId.js +0 -11
- package/dist/shared/lib/slickgrid/lib/functions/index.js +0 -10
- package/dist/shared/lib/slickgrid/lib/functions/isDeletionDangerous.js +0 -18
- package/dist/shared/lib/slickgrid/lib/functions/wereEdited.js +0 -10
- package/dist/shared/lib/slickgrid/lib/grouping/index.js +0 -1
- package/dist/shared/lib/slickgrid/lib/grouping/sumTotalsFormatter.js +0 -10
- package/dist/shared/lib/slickgrid/lib/highlighting/getColumnsHash.js +0 -6
- package/dist/shared/lib/slickgrid/lib/highlighting/highlightCell.js +0 -16
- package/dist/shared/lib/slickgrid/lib/highlighting/highlightColumns.js +0 -20
- package/dist/shared/lib/slickgrid/lib/highlighting/index.js +0 -2
- package/dist/shared/lib/slickgrid/lib/hooks/eventClickOnTable.js +0 -16
- package/dist/shared/lib/slickgrid/lib/hooks/index.js +0 -3
- package/dist/shared/lib/slickgrid/lib/hooks/useHotKeys.js +0 -33
- package/dist/shared/lib/slickgrid/lib/hooks/useListenIfTablesWereEdited.js +0 -28
- package/dist/shared/lib/slickgrid/lib/hooks/useUpdateTotal.js +0 -16
- package/dist/shared/lib/slickgrid/lib/hotKeys/hotKeysCopy.js +0 -4
- package/dist/shared/lib/slickgrid/lib/hotKeys/hotKeysDelete.js +0 -4
- package/dist/shared/lib/slickgrid/lib/hotKeys/hotKeysRedo.js +0 -4
- package/dist/shared/lib/slickgrid/lib/hotKeys/hotKeysReverse.js +0 -4
- package/dist/shared/lib/slickgrid/lib/hotKeys/hotKeysUndo.js +0 -4
- package/dist/shared/lib/slickgrid/lib/hotKeys/index.js +0 -7
- package/dist/shared/lib/slickgrid/lib/hotKeys/nothingToCopy.js +0 -11
- package/dist/shared/lib/slickgrid/lib/hotKeys/positionToPaste.js +0 -9
- package/dist/shared/lib/slickgrid/lib/index.js +0 -12
- package/dist/shared/lib/slickgrid/lib/selection/getUpdates.js +0 -30
- package/dist/shared/lib/slickgrid/lib/selection/index.js +0 -2
- package/dist/shared/lib/slickgrid/lib/selection/selectedRows.js +0 -14
- package/dist/shared/lib/slickgrid/lib/sorting/ColumnSorter.js +0 -70
- package/dist/shared/lib/slickgrid/lib/sorting/index.js +0 -1
- package/dist/shared/lib/slickgrid/lib/totals-row/addTitle.js +0 -6
- package/dist/shared/lib/slickgrid/lib/totals-row/addTotalSum.js +0 -11
- package/dist/shared/lib/slickgrid/lib/totals-row/index.js +0 -2
- package/dist/shared/lib/slickgrid/lib/totals-row/totalAmountOf.js +0 -8
- package/dist/shared/lib/slickgrid/lib/totals-row/updateTotal.js +0 -17
- package/dist/shared/lib/slickgrid/lib/totals-row/updateTotals.js +0 -7
- package/dist/shared/lib/slickgrid/lib/validators/DateValidator.js +0 -9
- package/dist/shared/lib/slickgrid/lib/validators/EmptyStringValidator.js +0 -3
- package/dist/shared/lib/slickgrid/lib/validators/LengthValidator.js +0 -3
- package/dist/shared/lib/slickgrid/lib/validators/index.js +0 -3
- package/dist/shared/lib/slickgrid/model/SlickTable/csvDownloadManager/IDownloadManager.js +0 -1
- package/dist/shared/lib/slickgrid/model/SlickTable/csvDownloadManager/downloadManager.js +0 -95
- package/dist/shared/lib/slickgrid/model/SlickTable/csvDownloadManager/index.js +0 -1
- package/dist/shared/lib/slickgrid/model/SlickTable/filters/DeletedRowsFilter.js +0 -7
- package/dist/shared/lib/slickgrid/model/SlickTable/filters/Filter.js +0 -53
- package/dist/shared/lib/slickgrid/model/SlickTable/filters/WithoutFilter.js +0 -27
- package/dist/shared/lib/slickgrid/model/SlickTable/filters/decorators/ColumnFilter/DecoratorColumnFilter.js +0 -40
- package/dist/shared/lib/slickgrid/model/SlickTable/filters/decorators/ColumnFilter/Filter.js +0 -108
- package/dist/shared/lib/slickgrid/model/SlickTable/filters/decorators/ColumnFilter/index.js +0 -1
- package/dist/shared/lib/slickgrid/model/SlickTable/filters/decorators/DecoratorEndingDate.js +0 -10
- package/dist/shared/lib/slickgrid/model/SlickTable/filters/decorators/DecoratorFilter.js +0 -43
- package/dist/shared/lib/slickgrid/model/SlickTable/filters/decorators/DecoratorPeriod.js +0 -17
- package/dist/shared/lib/slickgrid/model/SlickTable/filters/decorators/index.js +0 -4
- package/dist/shared/lib/slickgrid/model/SlickTable/filters/index.js +0 -4
- package/dist/shared/lib/slickgrid/model/SlickTable/filters/model/IFilter.js +0 -1
- package/dist/shared/lib/slickgrid/model/SlickTable/filters/model/index.js +0 -1
- package/dist/shared/lib/slickgrid/model/SlickTable/hotKeys/DefaultHotKeys.js +0 -101
- package/dist/shared/lib/slickgrid/model/SlickTable/hotKeys/HotKeysBehavior.js +0 -1
- package/dist/shared/lib/slickgrid/model/SlickTable/hotKeys/WithoutHotKeys.js +0 -17
- package/dist/shared/lib/slickgrid/model/SlickTable/hotKeys/decorators/HotKeysDecorator.js +0 -20
- package/dist/shared/lib/slickgrid/model/SlickTable/hotKeys/decorators/PreventCopying.js +0 -15
- package/dist/shared/lib/slickgrid/model/SlickTable/hotKeys/decorators/RedoUndoOnly.js +0 -17
- package/dist/shared/lib/slickgrid/model/SlickTable/hotKeys/decorators/WithConfirmationOfDeletion.js +0 -28
- package/dist/shared/lib/slickgrid/model/SlickTable/hotKeys/decorators/index.js +0 -4
- package/dist/shared/lib/slickgrid/model/SlickTable/hotKeys/index.js +0 -3
- package/dist/shared/lib/slickgrid/model/SlickTable/index.js +0 -5
- package/dist/shared/lib/slickgrid/model/SlickTable/printer/DefaultPrinter.js +0 -161
- package/dist/shared/lib/slickgrid/model/SlickTable/printer/index.js +0 -1
- package/dist/shared/lib/slickgrid/model/SlickTable/printer/model/Printer.js +0 -1
- package/dist/shared/lib/slickgrid/model/SlickTable/printer/model/consts/cssStyles.js +0 -46
- package/dist/shared/lib/slickgrid/model/SlickTable/printer/model/consts/index.js +0 -1
- package/dist/shared/lib/slickgrid/model/SlickTable/printer/model/index.js +0 -1
- package/dist/shared/lib/slickgrid/model/SlickTable/table/SlickTable.js +0 -109
- package/dist/shared/lib/slickgrid/model/SlickTable/table/index.js +0 -1
- package/dist/shared/lib/slickgrid/model/events/eventContextMenu.js +0 -9
- package/dist/shared/lib/slickgrid/model/events/index.js +0 -1
- package/dist/shared/lib/slickgrid/model/index.js +0 -2
- package/dist/shared/lib/slickgrid/model/types/IColumn.js +0 -1
- package/dist/shared/lib/slickgrid/model/types/IColumnFilterValue.js +0 -1
- package/dist/shared/lib/slickgrid/model/types/IGrouping.js +0 -1
- package/dist/shared/lib/slickgrid/model/types/ISlickRow.js +0 -1
- package/dist/shared/lib/slickgrid/model/types/index.js +0 -1
- package/dist/shared/lib/slickgrid/ui/HeaderButtons/index.js +0 -2
- package/dist/shared/lib/slickgrid/ui/HeaderButtons/lib/handleClick/handleHeaderButtons.js +0 -16
- package/dist/shared/lib/slickgrid/ui/HeaderButtons/lib/handleClick/index.js +0 -1
- package/dist/shared/lib/slickgrid/ui/HeaderButtons/lib/highlighting/headerButtons.js +0 -47
- package/dist/shared/lib/slickgrid/ui/HeaderButtons/lib/highlighting/index.js +0 -1
- package/dist/shared/lib/slickgrid/ui/HeaderButtons/lib/index.js +0 -2
- package/dist/shared/lib/slickgrid/ui/HeaderButtons/model/buttons/index.js +0 -1
- package/dist/shared/lib/slickgrid/ui/HeaderButtons/model/buttons/openColumnFilter.js +0 -6
- package/dist/shared/lib/slickgrid/ui/HeaderButtons/model/event/eventOpenColumnFilters.js +0 -13
- package/dist/shared/lib/slickgrid/ui/HeaderButtons/model/event/index.js +0 -1
- package/dist/shared/lib/slickgrid/ui/HeaderButtons/model/index.js +0 -2
- package/dist/shared/lib/slickgrid/ui/SlickgridTable/index.js +0 -1
- package/dist/shared/lib/slickgrid/ui/SlickgridTable/lib/callbacks/index.js +0 -1
- package/dist/shared/lib/slickgrid/ui/SlickgridTable/lib/callbacks/onAddNewRow.js +0 -21
- package/dist/shared/lib/slickgrid/ui/SlickgridTable/lib/hooks/index.js +0 -1
- package/dist/shared/lib/slickgrid/ui/SlickgridTable/lib/hooks/useGrid.js +0 -95
- package/dist/shared/lib/slickgrid/ui/SlickgridTable/lib/index.js +0 -2
- package/dist/shared/lib/slickgrid/ui/SlickgridTable/model/defaultOptions.js +0 -7
- package/dist/shared/lib/slickgrid/ui/SlickgridTable/model/index.js +0 -1
- package/dist/shared/lib/slickgrid/ui/SlickgridTable/model/types/Props.js +0 -1
- package/dist/shared/lib/slickgrid/ui/SlickgridTable/model/types/index.js +0 -1
- package/dist/shared/lib/slickgrid/ui/SlickgridTable/ui/SlickgridTable.js +0 -26
- package/dist/shared/lib/slickgrid/ui/SlickgridTable/ui/index.js +0 -1
- package/dist/shared/lib/slickgrid/ui/columns/columnCheckboxSelector/columnCheckboxSelector.js +0 -5
- package/dist/shared/lib/slickgrid/ui/columns/columnCheckboxSelector/index.js +0 -1
- package/dist/shared/lib/slickgrid/ui/columns/columnIsEdited/index.js +0 -1
- package/dist/shared/lib/slickgrid/ui/columns/columnIsEdited/lib/index.js +0 -1
- package/dist/shared/lib/slickgrid/ui/columns/columnIsEdited/lib/setEditedMark.js +0 -3
- package/dist/shared/lib/slickgrid/ui/columns/columnIsEdited/ui/columnIsEdited.js +0 -13
- package/dist/shared/lib/slickgrid/ui/columns/columnIsEdited/ui/index.js +0 -1
- package/dist/shared/lib/slickgrid/ui/columns/index.js +0 -2
- package/dist/shared/lib/slickgrid/ui/index.js +0 -4
- package/dist/shared/lib/slickgrid/ui/styles/WithTableStyles/WithTableStyles.js +0 -5
- package/dist/shared/lib/slickgrid/ui/styles/WithTableStyles/WithTableStyles.style.js +0 -150
- package/dist/shared/lib/slickgrid/ui/styles/WithTableStyles/index.js +0 -1
- package/dist/shared/lib/slickgrid/ui/styles/index.js +0 -1
- package/dist/shared/lib/slickgrid/ui/styles/keyframes/index.js +0 -1
- package/dist/shared/lib/slickgrid/ui/styles/keyframes/wink.js +0 -6
- package/dist/shared/lib/sorting/Sort.js +0 -22
- package/dist/shared/lib/sorting/index.js +0 -1
- package/dist/shared/lib/stringCalculator/index.js +0 -2
- package/dist/shared/lib/strings/deleteDoubleQuotes.js +0 -6
- package/dist/shared/lib/strings/index.js +0 -3
- package/dist/shared/lib/strings/removeHtml.js +0 -5
- package/dist/shared/lib/strings/toStringWithCommas.js +0 -12
- package/dist/shared/model/consts/columnId.js +0 -1
- package/dist/shared/model/consts/dateFormats.js +0 -3
- package/dist/shared/model/consts/index.js +0 -4
- package/dist/shared/model/consts/invalidDate.js +0 -1
- package/dist/shared/model/consts/noPrivilegesMessage.js +0 -1
- package/dist/shared/model/enums/EColumnFilter.js +0 -17
- package/dist/shared/model/enums/EColumnFiltersGroup.js +0 -11
- package/dist/shared/model/enums/EDateFormat.js +0 -12
- package/dist/shared/model/enums/EKey.js +0 -9
- package/dist/shared/model/enums/EKeyCode.js +0 -9
- package/dist/shared/model/enums/ESortType.js +0 -7
- package/dist/shared/model/enums/index.js +0 -6
- package/dist/shared/model/types/index.js +0 -1
- package/dist/shared/model/types/slickgrid/IEditedRow.js +0 -1
- package/dist/shared/model/types/slickgrid/TGridRow.js +0 -1
- package/dist/shared/model/types/slickgrid/index.js +0 -1
- package/dist/shared/ui/ContextSelect/ContextSelect.js +0 -16
- package/dist/shared/ui/ContextSelect/ContextSelect.style.js +0 -7
- package/dist/shared/ui/ContextSelect/index.js +0 -1
- package/dist/shared/ui/notification/index.js +0 -1
- package/dist/shared/ui/notification/model/index.js +0 -1
- package/dist/shared/ui/notification/ui/index.js +0 -22
- package/dist/shared/ui/notification/ui/index.style.js +0 -11
- package/dist/shared/ui/styles/WithDatePickerStyles.js +0 -10
- package/dist/shared/ui/styles/index.js +0 -1
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { EColumnFilter, EColumnFiltersGroup } from "shared/model/enums";
|
|
2
|
-
const dateBetween = {
|
|
3
|
-
id: EColumnFilter.DateBetween,
|
|
4
|
-
name: "Between",
|
|
5
|
-
};
|
|
6
|
-
const dateEqual = {
|
|
7
|
-
id: EColumnFilter.DateEqual,
|
|
8
|
-
name: "Equal",
|
|
9
|
-
};
|
|
10
|
-
const dateFrom = {
|
|
11
|
-
id: EColumnFilter.DateFrom,
|
|
12
|
-
name: "From",
|
|
13
|
-
};
|
|
14
|
-
const dateTo = { id: EColumnFilter.DateTo, name: "To" };
|
|
15
|
-
const numberBetween = {
|
|
16
|
-
id: EColumnFilter.NumberBetween,
|
|
17
|
-
name: "Between",
|
|
18
|
-
};
|
|
19
|
-
const numberEqual = {
|
|
20
|
-
id: EColumnFilter.NumberEqual,
|
|
21
|
-
name: "Equal",
|
|
22
|
-
};
|
|
23
|
-
const numberFrom = {
|
|
24
|
-
id: EColumnFilter.NumberFrom,
|
|
25
|
-
name: "From",
|
|
26
|
-
};
|
|
27
|
-
const numberTo = {
|
|
28
|
-
id: EColumnFilter.NumberTo,
|
|
29
|
-
name: "To",
|
|
30
|
-
};
|
|
31
|
-
const textContain = {
|
|
32
|
-
id: EColumnFilter.TextContain,
|
|
33
|
-
name: "Contains",
|
|
34
|
-
};
|
|
35
|
-
const textEqual = {
|
|
36
|
-
id: EColumnFilter.TextEqual,
|
|
37
|
-
name: "Equal",
|
|
38
|
-
};
|
|
39
|
-
const textNotContain = {
|
|
40
|
-
id: EColumnFilter.TextNotContain,
|
|
41
|
-
name: "Does not contain",
|
|
42
|
-
};
|
|
43
|
-
const textNotEqual = {
|
|
44
|
-
id: EColumnFilter.TextNotEqual,
|
|
45
|
-
name: "Not equal",
|
|
46
|
-
};
|
|
47
|
-
const numberFilters = [numberEqual, numberFrom, numberTo, numberBetween];
|
|
48
|
-
export const options = {
|
|
49
|
-
[EColumnFiltersGroup.Boolean]: [],
|
|
50
|
-
[EColumnFiltersGroup.Date]: [dateEqual, dateFrom, dateTo, dateBetween],
|
|
51
|
-
[EColumnFiltersGroup.MultipleSelect]: [],
|
|
52
|
-
[EColumnFiltersGroup.Number]: numberFilters,
|
|
53
|
-
[EColumnFiltersGroup.NumberFormatted]: numberFilters,
|
|
54
|
-
[EColumnFiltersGroup.Text]: [
|
|
55
|
-
textContain,
|
|
56
|
-
textNotContain,
|
|
57
|
-
textEqual,
|
|
58
|
-
textNotEqual,
|
|
59
|
-
],
|
|
60
|
-
};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { eventOpenColumnFilters } from "shared/lib/slickgrid";
|
|
3
|
-
import { ContextSelect } from "shared/ui/ContextSelect";
|
|
4
|
-
import { options } from "../model";
|
|
5
|
-
export const SelectFilter = ({ filterId, setFilterId }) => {
|
|
6
|
-
const list = options[eventOpenColumnFilters.group];
|
|
7
|
-
const value = list.some(({ id }) => id === filterId) ? filterId : list[0]?.id;
|
|
8
|
-
function onChange(event) {
|
|
9
|
-
const { columnId, table } = eventOpenColumnFilters;
|
|
10
|
-
if (!columnId || !table)
|
|
11
|
-
return;
|
|
12
|
-
const args = table.filter.args;
|
|
13
|
-
const id = event.target.value;
|
|
14
|
-
if (!args.columnFilters)
|
|
15
|
-
return;
|
|
16
|
-
table.filter.args = {
|
|
17
|
-
...args,
|
|
18
|
-
columnFilters: {
|
|
19
|
-
...args.columnFilters,
|
|
20
|
-
[columnId]: {
|
|
21
|
-
...args.columnFilters[columnId],
|
|
22
|
-
filterId: id,
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
};
|
|
26
|
-
setFilterId(id);
|
|
27
|
-
}
|
|
28
|
-
if (!value)
|
|
29
|
-
return null;
|
|
30
|
-
return (_jsx(ContextSelect, { name: "", list: list, onChange: onChange, width: "100%", showSelect: false, value: value }));
|
|
31
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { SelectFilter } from "./SelectFilter";
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { TextField } from "@mui/material";
|
|
3
|
-
import { applyFilter } from "../../lib";
|
|
4
|
-
import { label } from "../../model";
|
|
5
|
-
export const TextInput = ({ setValue, value }) => {
|
|
6
|
-
function onChange(event) {
|
|
7
|
-
const newValue = { ...value, 1: event.target.value };
|
|
8
|
-
setValue(newValue);
|
|
9
|
-
applyFilter(newValue);
|
|
10
|
-
}
|
|
11
|
-
return (_jsx(TextField, { label: label.filter, value: value[1], onChange: onChange, size: "small", autoComplete: "off" }));
|
|
12
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { TextInput } from "./TextInput";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { ColumnFilters } from "./ColumnFilters";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { ContextMenu } from "./ui";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { useSubscribeToEvent } from "./useSubscribeToEvent";
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { useEffect } from "react";
|
|
2
|
-
import { eventContextMenu } from "shared/lib/slickgrid";
|
|
3
|
-
import { PORTAL_ID, makeVisible } from "entities/portal";
|
|
4
|
-
export function useSubscribeToEvent(setIsOpened) {
|
|
5
|
-
useEffect(() => {
|
|
6
|
-
function callback() {
|
|
7
|
-
setIsOpened(true);
|
|
8
|
-
setTimeout(() => {
|
|
9
|
-
const menu = document.getElementById(PORTAL_ID);
|
|
10
|
-
if (!menu)
|
|
11
|
-
return;
|
|
12
|
-
const { x, y } = eventContextMenu;
|
|
13
|
-
makeVisible(menu, x, y);
|
|
14
|
-
}, 0);
|
|
15
|
-
}
|
|
16
|
-
eventContextMenu.subscribe(callback);
|
|
17
|
-
return () => {
|
|
18
|
-
eventContextMenu.unsubscribe(callback);
|
|
19
|
-
};
|
|
20
|
-
}, []);
|
|
21
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { useSubscribeToEvent } from "./hooks";
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { eventContextMenu } from "shared/lib/slickgrid";
|
|
3
|
-
import Styled from "../ContextMenu.style";
|
|
4
|
-
export const ButtonDownloadCSV = ({ setIsOpened }) => {
|
|
5
|
-
const onClick = () => {
|
|
6
|
-
const table = eventContextMenu.table;
|
|
7
|
-
const grid = table?.grid;
|
|
8
|
-
if (!table || !grid) {
|
|
9
|
-
setIsOpened(false);
|
|
10
|
-
return;
|
|
11
|
-
}
|
|
12
|
-
table.downloadManager.download(table);
|
|
13
|
-
setIsOpened(false);
|
|
14
|
-
};
|
|
15
|
-
return (_jsxs(Styled.Li, { onClick: onClick, children: [_jsx(Styled.Icon, { className: "sgi sgi-download" }), "Download as CSV"] }));
|
|
16
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { ButtonDownloadCSV } from "./ButtonDownloadCSV";
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { eventContextMenu } from "shared/lib/slickgrid";
|
|
3
|
-
import Styled from "../ContextMenu.style";
|
|
4
|
-
export const ButtonGroup = ({ setIsOpened }) => {
|
|
5
|
-
const table = eventContextMenu.table;
|
|
6
|
-
function group() {
|
|
7
|
-
if (!table)
|
|
8
|
-
return;
|
|
9
|
-
table.grouping = { isGrouped: true };
|
|
10
|
-
setIsOpened(false);
|
|
11
|
-
}
|
|
12
|
-
if (table?.grouping.isGrouped !== false)
|
|
13
|
-
return null;
|
|
14
|
-
return (_jsxs(Styled.Li, { onClick: group, children: [_jsx(Styled.Icon, { className: "sgi sgi-link" }), "Group"] }));
|
|
15
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { ButtonGroup } from "./ButtonGroup";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { ButtonResetFilters } from "./ui";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { hasFiltersApplied } from "./visibility";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { hasFiltersApplied } from "./hasFiltersApplied";
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Divider } from "@mui/material";
|
|
3
|
-
import { Fragment } from "react";
|
|
4
|
-
import { eventContextMenu, headerButtons } from "shared/lib/slickgrid";
|
|
5
|
-
import { hasFiltersApplied } from "../lib";
|
|
6
|
-
import Styled from "../../ContextMenu.style";
|
|
7
|
-
export const ButtonResetFilters = ({ setIsOpened }) => {
|
|
8
|
-
const table = eventContextMenu.table;
|
|
9
|
-
function onClick() {
|
|
10
|
-
if (!table) {
|
|
11
|
-
setIsOpened(false);
|
|
12
|
-
return;
|
|
13
|
-
}
|
|
14
|
-
const args = table.filter.args;
|
|
15
|
-
delete args.columnFilters;
|
|
16
|
-
table.filter.args = args;
|
|
17
|
-
headerButtons.highlightAllColumns(args, table.id);
|
|
18
|
-
setIsOpened(false);
|
|
19
|
-
}
|
|
20
|
-
if (!hasFiltersApplied(table))
|
|
21
|
-
return null;
|
|
22
|
-
return (_jsxs(Fragment, { children: [_jsx(Divider, {}), _jsxs(Styled.Li, { onClick: onClick, children: [_jsx(Styled.Icon, { className: "sgi sgi-notification-clear-all" }), "Reset column filters"] })] }));
|
|
23
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { ButtonResetFilters } from "./ButtonResetFilters";
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { eventContextMenu } from "shared/lib/slickgrid";
|
|
3
|
-
import Styled from "../ContextMenu.style";
|
|
4
|
-
export const ButtonUngroup = ({ setIsOpened }) => {
|
|
5
|
-
const table = eventContextMenu.table;
|
|
6
|
-
function group() {
|
|
7
|
-
if (!table)
|
|
8
|
-
return;
|
|
9
|
-
table.grouping = { isGrouped: false };
|
|
10
|
-
setIsOpened(false);
|
|
11
|
-
}
|
|
12
|
-
if (!table?.grouping.isGrouped)
|
|
13
|
-
return null;
|
|
14
|
-
return (_jsxs(Styled.Li, { onClick: group, children: [_jsx(Styled.Icon, { className: "sgi sgi-link-off" }), "Ungroup"] }));
|
|
15
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { ButtonUngroup } from "./ButtonUngroup";
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { eventContextMenu } from "shared/lib/slickgrid";
|
|
3
|
-
import Styled from "../ContextMenu.style";
|
|
4
|
-
export const CollapseAll = ({ setIsOpened }) => {
|
|
5
|
-
const table = eventContextMenu.table;
|
|
6
|
-
function onClick() {
|
|
7
|
-
const grid = table?.grid;
|
|
8
|
-
if (!grid)
|
|
9
|
-
return;
|
|
10
|
-
const dataView = grid.getData();
|
|
11
|
-
dataView.collapseAllGroups();
|
|
12
|
-
setIsOpened(false);
|
|
13
|
-
}
|
|
14
|
-
if (!table?.grouping.isGrouped)
|
|
15
|
-
return null;
|
|
16
|
-
return (_jsxs(Styled.Li, { onClick: onClick, children: [_jsx(Styled.Icon, { className: "sgi sgi-collapse-all-outline" }), "Collapse all groups"] }));
|
|
17
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { CollapseAll } from "./CollapseAll";
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useState } from "react";
|
|
3
|
-
import { Portal } from "entities/portal";
|
|
4
|
-
import { useSubscribeToEvent } from "../lib";
|
|
5
|
-
import { ButtonDownloadCSV } from "./ButtonDownloadCSV";
|
|
6
|
-
import { ButtonGroup } from "./ButtonGroup";
|
|
7
|
-
import { ButtonResetFilters } from "./ButtonResetFilters";
|
|
8
|
-
import { ButtonUngroup } from "./ButtonUngroup";
|
|
9
|
-
import { CollapseAll } from "./CollapseAll";
|
|
10
|
-
import { CopyToClipboard } from "./CopyToClipboard";
|
|
11
|
-
import { ExpandAll } from "./ExpandAll";
|
|
12
|
-
import { Print } from "./Print";
|
|
13
|
-
import Styled from "./ContextMenu.style";
|
|
14
|
-
export const ContextMenu = () => {
|
|
15
|
-
const [isOpened, setIsOpened] = useState(false);
|
|
16
|
-
useSubscribeToEvent(setIsOpened);
|
|
17
|
-
if (!isOpened)
|
|
18
|
-
return null;
|
|
19
|
-
return (_jsx(Portal, { setIsOpened: setIsOpened, children: _jsxs(Styled.Ul, { children: [_jsx(Print, { setIsOpened: setIsOpened }), _jsx(CopyToClipboard, { setIsOpened: setIsOpened }), _jsx(ButtonDownloadCSV, { setIsOpened: setIsOpened }), _jsx(ButtonResetFilters, { setIsOpened: setIsOpened }), _jsx(ButtonUngroup, { setIsOpened: setIsOpened }), _jsx(ButtonGroup, { setIsOpened: setIsOpened }), _jsx(ExpandAll, { setIsOpened: setIsOpened }), _jsx(CollapseAll, { setIsOpened: setIsOpened })] }) }));
|
|
20
|
-
};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { styled } from "@mui/material";
|
|
2
|
-
const UlStyled = styled("ul")({
|
|
3
|
-
display: "flex",
|
|
4
|
-
flexDirection: "column",
|
|
5
|
-
rowGap: "0.5em",
|
|
6
|
-
margin: "0",
|
|
7
|
-
paddingLeft: "0.5em",
|
|
8
|
-
});
|
|
9
|
-
const LiStyled = styled("li")({
|
|
10
|
-
display: "flex",
|
|
11
|
-
alignItems: "center",
|
|
12
|
-
columnGap: "0.5em",
|
|
13
|
-
cursor: "pointer",
|
|
14
|
-
"&:hover": {
|
|
15
|
-
scale: "1.05",
|
|
16
|
-
},
|
|
17
|
-
});
|
|
18
|
-
const Icon = styled("span")(({ theme }) => ({
|
|
19
|
-
backgroundColor: theme.palette.text.primary,
|
|
20
|
-
}));
|
|
21
|
-
export default {
|
|
22
|
-
Ul: UlStyled,
|
|
23
|
-
Li: LiStyled,
|
|
24
|
-
Icon,
|
|
25
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { eventContextMenu } from "shared/lib/slickgrid";
|
|
3
|
-
import { showNotification } from "shared/ui/notification";
|
|
4
|
-
import Styled from "../ContextMenu.style";
|
|
5
|
-
export const CopyToClipboard = ({ setIsOpened }) => {
|
|
6
|
-
function onClick() {
|
|
7
|
-
const table = eventContextMenu.table;
|
|
8
|
-
const grid = table?.grid;
|
|
9
|
-
if (!grid || !table) {
|
|
10
|
-
setIsOpened(false);
|
|
11
|
-
return;
|
|
12
|
-
}
|
|
13
|
-
window.navigator.clipboard
|
|
14
|
-
.writeText(table.downloadManager.createCSV(table))
|
|
15
|
-
.then(() => {
|
|
16
|
-
showNotification("Copied to clipboard", "info");
|
|
17
|
-
})
|
|
18
|
-
.catch(() => {
|
|
19
|
-
showNotification("Failed to copy to clipboard", "warning");
|
|
20
|
-
});
|
|
21
|
-
if (grid.getSelectionModel()) {
|
|
22
|
-
grid.setSelectedRows([]);
|
|
23
|
-
}
|
|
24
|
-
setIsOpened(false);
|
|
25
|
-
}
|
|
26
|
-
return (_jsxs(Styled.Li, { onClick: onClick, children: [_jsx(Styled.Icon, { className: "sgi sgi-content-copy" }), "Copy to clipboard"] }));
|
|
27
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { CopyToClipboard } from "./CopyToClipboard";
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { eventContextMenu } from "shared/lib/slickgrid";
|
|
3
|
-
import Styled from "../ContextMenu.style";
|
|
4
|
-
export const ExpandAll = ({ setIsOpened }) => {
|
|
5
|
-
const table = eventContextMenu.table;
|
|
6
|
-
function onClick() {
|
|
7
|
-
const grid = table?.grid;
|
|
8
|
-
if (!grid)
|
|
9
|
-
return;
|
|
10
|
-
const dataView = grid.getData();
|
|
11
|
-
dataView.expandAllGroups();
|
|
12
|
-
setIsOpened(false);
|
|
13
|
-
}
|
|
14
|
-
if (!table?.grouping.isGrouped)
|
|
15
|
-
return null;
|
|
16
|
-
return (_jsxs(Styled.Li, { onClick: onClick, children: [_jsx(Styled.Icon, { className: "sgi sgi-expand-all-outline" }), "Expand all groups"] }));
|
|
17
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { ExpandAll } from "./ExpandAll";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Print } from "./ui";
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { eventContextMenu } from "shared/lib/slickgrid";
|
|
3
|
-
import Styled from "../../ContextMenu.style";
|
|
4
|
-
export const Print = ({ setIsOpened }) => {
|
|
5
|
-
function onClick() {
|
|
6
|
-
const table = eventContextMenu.table;
|
|
7
|
-
table?.printer.print(table);
|
|
8
|
-
setIsOpened(false);
|
|
9
|
-
}
|
|
10
|
-
return (_jsxs(Styled.Li, { onClick: onClick, children: [_jsx(Styled.Icon, { className: "sgi sgi-printer" }), "Print"] }));
|
|
11
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Print } from "./Print";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { ContextMenu } from "./ContextMenu";
|
package/dist/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { SlickTable } from "shared/lib/slickgrid";
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export class AnEvent {
|
|
2
|
-
constructor() {
|
|
3
|
-
this.observers = [];
|
|
4
|
-
}
|
|
5
|
-
subscribe(observer) {
|
|
6
|
-
const index = this.observers.indexOf(observer);
|
|
7
|
-
if (!~index) {
|
|
8
|
-
this.observers.push(observer);
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
unsubscribe(observer) {
|
|
12
|
-
const index = this.observers.indexOf(observer);
|
|
13
|
-
if (~this.observers.indexOf(observer)) {
|
|
14
|
-
this.observers.splice(index, 1);
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
notify() {
|
|
18
|
-
for (const observer of this.observers) {
|
|
19
|
-
observer();
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
// todo define types
|
|
2
|
-
export function debounce(callBackFn, delay = 300) {
|
|
3
|
-
let timeout;
|
|
4
|
-
//@ts-ignore
|
|
5
|
-
return function (...args) {
|
|
6
|
-
//@ts-ignore
|
|
7
|
-
const fnCall = () => callBackFn.apply(this, args);
|
|
8
|
-
clearTimeout(timeout);
|
|
9
|
-
timeout = setTimeout(fnCall, delay);
|
|
10
|
-
};
|
|
11
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export function elementNotVisible(selector) {
|
|
2
|
-
const container = document.querySelector(selector);
|
|
3
|
-
if (!container)
|
|
4
|
-
return true;
|
|
5
|
-
const { scrollHeight, scrollWidth } = document.documentElement;
|
|
6
|
-
const { bottom, left, right, top } = container.getBoundingClientRect();
|
|
7
|
-
return (bottom <= 0 || left >= scrollWidth || right <= 0 || top >= scrollHeight);
|
|
8
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { elementNotVisible } from "./elementNotVisible";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { addParentheses } from "./addParentheses";
|
|
2
|
-
/**
|
|
3
|
-
* @param {(number | null | undefined)} value Money amount to be formatted.
|
|
4
|
-
* @param {Object} [options] Formatting options.
|
|
5
|
-
* @param {boolean} [options.currencySymbol = ""] Currency symbol.
|
|
6
|
-
* @param {number} [options.decimalPlaces = 2] Number of decimal places.
|
|
7
|
-
* @param {string} [options.decimalSeparator = "."] Decimal separator.
|
|
8
|
-
* @param {boolean} options.negativeClass Style class name for negative numbers.
|
|
9
|
-
* @param {boolean} [options.negativeInParentheses = true] Enclose negative numbers in parentheses.
|
|
10
|
-
* @param {boolean} [options.noHTML = false] Return plain text without HTML.
|
|
11
|
-
* @param {boolean} options.positiveClass Style class name for positive numbers.
|
|
12
|
-
* @param {string} [options.thousandsSeparator = ","] Thousands separator.
|
|
13
|
-
* @param {boolean} [options.zeroAsBlank = false] Display zero as en empty string.
|
|
14
|
-
* */
|
|
15
|
-
export function formatNumber(value, options = {}) {
|
|
16
|
-
const { currencySymbol = "", decimalPlaces = 2, decimalSeparator = ".", negativeClass, negativeInParentheses = true, noHTML = false, positiveClass, thousandsSeparator = ",", zeroAsBlank = false, } = options;
|
|
17
|
-
if (value === undefined || value === null || value === "") {
|
|
18
|
-
return "";
|
|
19
|
-
}
|
|
20
|
-
else if (!Number(value) && zeroAsBlank)
|
|
21
|
-
return "";
|
|
22
|
-
const isNegative = (Number(value) || 0) < 0;
|
|
23
|
-
const valueFixed = Math.abs(Number(value) || 0).toFixed(decimalPlaces);
|
|
24
|
-
const integerPart = parseInt(valueFixed).toString();
|
|
25
|
-
const remainder = integerPart.length > 3 ? integerPart.length % 3 : 0;
|
|
26
|
-
const withThousandsSeparator = (remainder ? integerPart.slice(0, remainder) + thousandsSeparator : "") +
|
|
27
|
-
integerPart
|
|
28
|
-
.slice(remainder)
|
|
29
|
-
.replace(/(\d{3})(?=\d)/g, `$1${thousandsSeparator}`);
|
|
30
|
-
const withDecimalPlaces = withThousandsSeparator +
|
|
31
|
-
(decimalPlaces ? decimalSeparator + valueFixed.slice(-decimalPlaces) : "");
|
|
32
|
-
const withCurrency = `${currencySymbol}${withDecimalPlaces}`;
|
|
33
|
-
const withMinus = isNegative ? `-${withCurrency}` : withCurrency;
|
|
34
|
-
const withParentheses = isNegative && negativeInParentheses ? addParentheses(withMinus) : withMinus;
|
|
35
|
-
if (noHTML) {
|
|
36
|
-
return withParentheses;
|
|
37
|
-
}
|
|
38
|
-
else if (isNegative) {
|
|
39
|
-
return negativeClass
|
|
40
|
-
? `<span class="${negativeClass}">${withParentheses}</span>`
|
|
41
|
-
: withParentheses;
|
|
42
|
-
}
|
|
43
|
-
else {
|
|
44
|
-
return positiveClass
|
|
45
|
-
? `<span class="${positiveClass}">${withParentheses}</span>`
|
|
46
|
-
: withParentheses;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { formatNumber } from "./formatNumber";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { toNumber } from "./toNumber";
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export const toNumber = (value) => {
|
|
2
|
-
if (!value)
|
|
3
|
-
return 0;
|
|
4
|
-
if (typeof value === "number")
|
|
5
|
-
return value;
|
|
6
|
-
const stringWithoutCommas = value.replace(/\$|,|\s/g, "");
|
|
7
|
-
const absValueString = stringWithoutCommas.replace(/\(|\)/g, "");
|
|
8
|
-
if (isNaN(Number(absValueString)))
|
|
9
|
-
return 0;
|
|
10
|
-
return stringWithoutCommas.startsWith("(") &&
|
|
11
|
-
stringWithoutCommas.endsWith(")")
|
|
12
|
-
? 0 - Number(absValueString)
|
|
13
|
-
: Number(stringWithoutCommas);
|
|
14
|
-
};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export { Autocomplete, ColumnSorter, DateFormatter, DateValidator, EditorAmount, EditorAutocomplete, EditorDate, EditorSelectString, EditorSelectNumber, EditorSelectWithSearch, EmptyStringValidator, FORMATTER_NUMBER, FormatterCheck, getFormatterNumber, LengthValidator, PercentFormatter, FormatterCheckPrinter, StringFormatter, columnSorter, commitCurrentEdit, deleteRows, getDisplayedRows, getLastRow, getMaxId, highlightCell, highlightColumns, isDeletionDangerous, onCellChange, onRowCountChanged, onRowsChanged, selectedRows, sumTotalsFormatter, totalAmountOf, updateTotals, useHotKeys, getUpdates, useListenIfTablesWereEdited, useUpdateTotal, wereEdited, } from "./lib";
|
|
2
|
-
export { DownloadManager, DecoratorEndingDate, DecoratorFilter, DecoratorColumnFilter, DecoratorPeriod, DefaultHotKeys, DefaultPrinter, DeletedRowsFilter, Filter, PreventCopying, RedoUndoOnly, SlickTable, WithConfirmationOfDeletion, WithoutHotKeys, eventContextMenu, } from "./model";
|
|
3
|
-
export { SlickgridTable, WithTableStyles, columnCheckboxSelector, columnIsEdited, eventOpenColumnFilters, handleHeaderButtons, headerButtons, openColumnFilter, } from "./ui";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { openContextMenu } from "./openContextMenu";
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { eventContextMenu } from "../../model";
|
|
2
|
-
import { commitCurrentEdit } from "../functions";
|
|
3
|
-
export function openContextMenu(table) {
|
|
4
|
-
return function (e) {
|
|
5
|
-
e.preventDefault();
|
|
6
|
-
commitCurrentEdit();
|
|
7
|
-
eventContextMenu.table = table;
|
|
8
|
-
eventContextMenu.x = e.pageX || 0;
|
|
9
|
-
eventContextMenu.y = e.pageY || 0;
|
|
10
|
-
eventContextMenu.notify();
|
|
11
|
-
};
|
|
12
|
-
}
|