From 0e450cb6cbbaeaf5197a1362a2caef1f6e1c9f42 Mon Sep 17 00:00:00 2001
From: Carlos Valente <34649812+cpvalente@users.noreply.github.com>
Date: Sun, 4 Sep 2022 22:44:03 +0200
Subject: [PATCH] Feat/table part1 (#197)
* feat(csv): export data as csv file
* feat(table): toggle fullscreen
* ux: coordinate tooltip open delay
* feat(excelDates): update tests
* refactor: folder structure
---
.../components/buttons/ActionButtons.jsx | 4 +-
.../components/buttons/PauseIconBtn.jsx | 4 +-
.../common/components/buttons/RollIconBtn.jsx | 4 +-
.../components/buttons/StartIconBtn.jsx | 4 +-
.../components/buttons/TooltipActionBtn.jsx | 7 +-
.../components/buttons/TransportIconBtn.jsx | 4 +-
.../components/buttons/UnloadIconBtn.jsx | 4 +-
client/src/common/components/nav/NavLogo.jsx | 23 +---
client/src/common/hooks/useFullscreen.js | 31 +++++
client/src/common/utils/dateConfig.js | 6 +-
client/src/common/utils/time.js | 5 +-
client/src/common/utils/timeConstants.js | 24 ++++
.../src/features/control/message/InputRow.jsx | 8 +-
.../control/message/MessageControl.jsx | 4 +-
.../message/MessageControl.module.scss | 5 +
.../control/playback/PlaybackTimer.jsx | 9 +-
.../editors/EntryBlock/EntryBlock.jsx | 7 +-
client/src/features/modals/AliasesModal.jsx | 7 +-
client/src/features/table/OntimeTable.jsx | 3 +-
client/src/features/table/Table.module.scss | 25 +++-
client/src/features/table/TableHeader.jsx | 35 ++++-
client/src/features/table/TableWrapper.jsx | 94 ++++++++-----
.../__snapshots__/utils.test.js.snap | 49 +++++++
.../features/table/__tests__/utils.test.js | 93 +++++++++++++
.../table/tableElements/PlaybackIcon.jsx | 10 +-
.../table/tableElements/SortableCell.jsx | 4 +-
client/src/features/table/utils.js | 107 +++++++++++++++
.../countdown/__tests__/Countdown.test.js | 2 +-
client/src/ontimeConfig.js | 3 +
server/package.json | 2 +-
server/src/app.js | 2 +-
server/src/classes/{ => timer}/EventTimer.js | 8 +-
server/src/classes/{ => timer}/Timer.js | 2 +-
.../{ => timer}/__tests__/classUtils.test.js | 0
.../{ => timer}/__tests__/eventtimer.test.js | 0
.../{ => timer}/__tests__/timer.test.js | 0
server/src/classes/{ => timer}/classUtils.js | 0
.../classes/{ => timer}/integrations/Http.js | 0
.../classes/{ => timer}/integrations/Osc.js | 0
.../integrations/__tests__/Osc.test.js | 0
server/src/utils/__tests__/time.test.js | 28 ++++
server/src/utils/parser.js | 6 +-
server/src/utils/time.js | 127 ++++++++++++++----
43 files changed, 631 insertions(+), 129 deletions(-)
create mode 100644 client/src/common/hooks/useFullscreen.js
create mode 100644 client/src/common/utils/timeConstants.js
create mode 100644 client/src/features/table/__tests__/__snapshots__/utils.test.js.snap
create mode 100644 client/src/features/table/__tests__/utils.test.js
create mode 100644 client/src/features/table/utils.js
create mode 100644 client/src/ontimeConfig.js
rename server/src/classes/{ => timer}/EventTimer.js (99%)
rename server/src/classes/{ => timer}/Timer.js (99%)
rename server/src/classes/{ => timer}/__tests__/classUtils.test.js (100%)
rename server/src/classes/{ => timer}/__tests__/eventtimer.test.js (100%)
rename server/src/classes/{ => timer}/__tests__/timer.test.js (100%)
rename server/src/classes/{ => timer}/classUtils.js (100%)
rename server/src/classes/{ => timer}/integrations/Http.js (100%)
rename server/src/classes/{ => timer}/integrations/Osc.js (100%)
rename server/src/classes/{ => timer}/integrations/__tests__/Osc.test.js (100%)
create mode 100644 server/src/utils/__tests__/time.test.js
diff --git a/client/src/common/components/buttons/ActionButtons.jsx b/client/src/common/components/buttons/ActionButtons.jsx
index f2253d37be..b6c66e17e6 100644
--- a/client/src/common/components/buttons/ActionButtons.jsx
+++ b/client/src/common/components/buttons/ActionButtons.jsx
@@ -7,6 +7,8 @@ import { FiMinusCircle } from '@react-icons/all-files/fi/FiMinusCircle';
import { FiPlus } from '@react-icons/all-files/fi/FiPlus';
import PropTypes from 'prop-types';
+import { tooltipDelayMid } from '../../../ontimeConfig';
+
export default function ActionButtons(props) {
const { showAdd, showDelay, showBlock, actionHandler } = props;
@@ -17,7 +19,7 @@ export default function ActionButtons(props) {
return (