* create db event type
* dont use it yet
* convert to and from database type
* type needed in one place in client
* use flatMap to filter out unknow stuff
* leave revision in save file
* move to utils
* make test
* destructur entry
* simple test
* throw in rundownToDatabaseRundown
* clerify comment
* Refactor: avoid shadowing the rundown variable in rundownCache (#1409)
---------
Co-authored-by: Carlos Valente <34649812+cpvalente@users.noreply.github.com>
* rename to DAO
* add simple edit test
* only the generate function clears the state state
* strict guard for custom fields
* fix small strict issues
* ensure deep copy
* safely set isStale
* todo is done
* small type error
* these functions can work on DAO entries
* only reat rundown as DAO on initial load and the cast immediately and esure all fields are present
* eslint comment
Co-authored-by: Carlos Valente <34649812+cpvalente@users.noreply.github.com>
* fix spelling
Co-authored-by: Carlos Valente <34649812+cpvalente@users.noreply.github.com>
* fix spelling
Co-authored-by: Carlos Valente <34649812+cpvalente@users.noreply.github.com>
* comment not needed
* setIsStale
* remove DAO
* clean up commits
* remove unneeded async/await
* revert test
---------
Co-authored-by: Carlos Valente <34649812+cpvalente@users.noreply.github.com>
* remove custom field lowercasing
* don't allow custom field form to submit duplicate field
* remove unused
* update custom field tests
* also keep upper case when editing
* show key in UI
* also kep upper case when creating a new field
* fix test
* allow old forced case keys to stay as is
* allow space
* add extension to import
* supply initial key to CustomFieldForm
* refactor: improve element contrast
* refactor: style and composition
* consistent use of `customFieldLabelToKey`
* fix CopyTag
* remove log
---------
Co-authored-by: arc-alex <ac@omnivox.dk>
Co-authored-by: Carlos Valente <carlosvalente@pm.me>
* pass full rundown to loadNow
* remove prevBlock from state
* refactor: simplify load logic (#1174)
* send clock to client on block start to avoid it showing -1 in the client
---------
Co-authored-by: Carlos Valente <34649812+cpvalente@users.noreply.github.com>
* chore: escalate stack trace to console
* refactor: event finding in roll
* docs: initial roll specification
* refactor: call to roll
* refactor: normalise index
* refactor: roll into next event
* refactor: hot reload on waiting to roll
* refactor: wait to roll next
* add test for linking start time in excel import
* link ids
* add link to UI
* ensure times with cachedRundown
---------
Co-authored-by: Carlos Valente <carlosvalente@pm.me>
* fix: jsdoc comments
* more human casting of string values to boolean
* add coerceColour to get named colors to work
* cue can't pass isKeyOfType event check
* dont mutate value
* alloow cue in eventDef
* lint
* css named or hex formatting
* "sideEffects": false
* test colour hex regex
* roll eventDef back to master
* parse property
* don't export cssColour names
* remove import
* only allow string types to colour
* handle transparent colour
* mix alpha with bg colour
* only allow updating events
* descriptive names
* add test for getAccessibleColour
* readability
* move isColourHex to regex-utils
* simplify and add test
* fix: bug with applying delays
* fix: show delay data only in production screens
* chore: cover delay with feature test
* refactor: simplify type assertion
* use zustand store in `ContextMenuContext`
* add `withDivider` prop to context menu `Option`
* add `isDisabled` prop to `Option`
* create `eventIdSwapping` store
* create swapping context menu options
* fix `key` in ContextMenu
* address `tanstack-eslint` errors
* create initial `requestEventSwap` event
* create initial `swapEvents` action
* use `swapEvents` in `EventBlock`
* move from `emitError` to `logAxiosError`
* remove extra curly brace from Copy ID
* add `clearEventId` func
* finalize context menu swapping logic
* write optimistic swapping logic
* remove unused import and type out handler in `rundownController`
* create `rundownSwapValidator`
* move index increase to `EventBlock`
* move swapping logic from `id` to `index`
* create `swapEvents` endpoint
* move `useEventIdSwapping` hook into its own file
* revert to using event `id`
* logic now uses indexes to swap events
* add `todo` to `swapEvents`
* revert index increment
* create `swapOntimeEvents` and export in `index.ts`
* use `swapOntimeEvents` in frontend & server
* update import path
* remove extra `setCached`
* refactor: extract utilities and types
* refactor: extract and simplify progress bar logic
* refactor: duration validation handles midnight
* fix: prevent stale event loader
* refactor: consider next event in timer invalidation
* refactor: reload changes on changed roll target
* refactor: timer load accounts for midnight
* fix: issues with midnight on roll
* refactor: prevent stale secondary event