Skip to content

Commit a0c7f6c

Browse files
authored
Merge pull request #7 from schubergphilis/bugfix/date-check
fix: IsValidDateString check
2 parents b65934c + 0d33e9e commit a0c7f6c

File tree

10 files changed

+791
-624
lines changed

10 files changed

+791
-624
lines changed

sbp-frontend-style/package.json

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@schubergphilis/sbp-frontend-style",
3-
"version": "1.7.0",
3+
"version": "1.7.1-4",
44
"license": "MIT",
55
"type": "module",
66
"types": "./dist/index.d.ts",
@@ -41,61 +41,61 @@
4141
"styled-components": "^6.1.19"
4242
},
4343
"devDependencies": {
44-
"@eslint/compat": "^1.3.1",
44+
"@eslint/compat": "^1.3.2",
4545
"@eslint/eslintrc": "^3.3.1",
46-
"@eslint/js": "^9.32.0",
46+
"@eslint/js": "^9.35.0",
4747
"@inrupt/jest-jsdom-polyfills": "^4.0.5",
48-
"@reduxjs/toolkit": "^2.8.2",
48+
"@reduxjs/toolkit": "^2.9.0",
4949
"@rollup/plugin-commonjs": "^28.0.6",
5050
"@rollup/plugin-node-resolve": "^16.0.1",
5151
"@rollup/plugin-sucrase": "^5.0.2",
5252
"@rollup/plugin-typescript": "^11.1.2",
5353
"@testing-library/dom": "^10.4.1",
54-
"@testing-library/jest-dom": "^6.6.4",
54+
"@testing-library/jest-dom": "^6.8.0",
5555
"@testing-library/react": "^16.3.0",
5656
"@testing-library/user-event": "^14.6.1",
5757
"@types/jest": "^30.0.0",
58-
"@types/node": "^24.2.0",
59-
"@types/react": "^19.1.9",
60-
"@types/react-dom": "^19.1.7",
58+
"@types/node": "^24.3.1",
59+
"@types/react": "^19.1.12",
60+
"@types/react-dom": "^19.1.9",
6161
"@types/react-redux": "^7.1.34",
6262
"@types/react-syntax-highlighter": "^15.5.13",
6363
"@types/styled-components": "^5.1.34",
64-
"@typescript-eslint/eslint-plugin": "^8.39.0",
65-
"@typescript-eslint/parser": "^8.39.0",
66-
"@vitejs/plugin-react": "^4.7.0",
67-
"@vitejs/plugin-react-swc": "^3.11.0",
64+
"@typescript-eslint/eslint-plugin": "^8.43.0",
65+
"@typescript-eslint/parser": "^8.43.0",
66+
"@vitejs/plugin-react": "^5.0.2",
67+
"@vitejs/plugin-react-swc": "^4.0.1",
6868
"directory-tree": "^3.5.2",
69-
"eslint": "9.32.0",
70-
"eslint-config-prettier": "^10.1.8",
71-
"eslint-plugin-prettier": "^5.5.3",
69+
"eslint": "9.35.0",
70+
"eslint-config-prettier": "10.1.5",
71+
"eslint-plugin-prettier": "5.5.4",
7272
"eslint-plugin-react": "^7.37.5",
7373
"eslint-plugin-react-hooks": "^5.2.0",
7474
"eslint-plugin-react-refresh": "^0.4.20",
7575
"globals": "^16.3.0",
7676
"html-react-parser": "^5.2.6",
77-
"jest": "^30.0.5",
78-
"jest-environment-jsdom": "^30.0.5",
79-
"jest-environment-node": "^30.0.5",
77+
"jest": "^30.1.3",
78+
"jest-environment-jsdom": "^30.1.2",
79+
"jest-environment-node": "^30.1.2",
8080
"prettier": "^3.6.2",
8181
"prettier-plugin-organize-imports": "^4.2.0",
8282
"react": "^19.1.1",
8383
"react-dom": "^19.1.1",
8484
"react-element-to-jsx-string": "^17.0.1",
8585
"react-redux": "^9.2.0",
86-
"react-router-dom": "^7.7.1",
87-
"react-syntax-highlighter": "^15.6.1",
86+
"react-router-dom": "^7.8.2",
87+
"react-syntax-highlighter": "^15.6.6",
8888
"rimraf": "^6.0.1",
89-
"rollup": "^4.46.2",
89+
"rollup": "^4.50.1",
9090
"rollup-plugin-delete": "^3.0.1",
91-
"rollup-plugin-dts": "^6.2.1",
91+
"rollup-plugin-dts": "^6.2.3",
9292
"rollup-plugin-peer-deps-external": "^2.2.4",
9393
"rollup-plugin-terser": "^7.0.2",
9494
"rollup-plugin-tsconfig-paths": "^1.5.2",
9595
"standard-version": "^9.5.0",
9696
"ts-jest": "^29.4.1",
9797
"typescript": "5.9.2",
98-
"vite": "^7.0.6",
98+
"vite": "^7.1.5",
9999
"vite-tsconfig-paths": "^5.1.4",
100100
"web-vitals": "^5.1.0"
101101
},

sbp-frontend-style/src/components/atoms/debugger/PageSize.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const Size = styled.div`
2626
position: sticky;
2727
bottom: 0;
2828
left: 0;
29-
z-index: 2;
29+
z-index: 1000;
3030
opacity: 0.8;
3131
cursor: pointer;
3232
width: 5em;

sbp-frontend-style/src/components/atoms/forms/SelectInput.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const SelectInput = ({ children, ...props }: Props) => {
2020
}
2121

2222
const SelectInputElement = styled.select<{ readOnly?: boolean }>`
23-
border: 1px solid ${({ theme }) => theme.style.borderColor};
23+
border: 1px solid ${({ theme }) => theme.style.inputBorderColor};
2424
border-radius: ${({ theme }) => theme.style.radius}px;
2525
background-color: ${({ theme }) => theme.style.inputColorBg};
2626
padding: 0.5em;

sbp-frontend-style/src/components/atoms/forms/TextInput.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { styled } from 'styled-components'
22

33
const TextInput = styled.input`
4-
border: 1px solid ${({ theme }) => theme.style.borderColor};
4+
border: 1px solid ${({ theme }) => theme.style.inputBorderColor};
55
border-radius: ${({ theme }) => theme.style.radius}px;
66
background-color: ${({ theme }) => theme.style.inputColorBg};
77
padding: 0.5em;

sbp-frontend-style/src/components/molecules/cards/CardHeader.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { styled } from 'styled-components'
55

66
interface Props extends HTMLAttributes<HTMLDivElement> {
77
isOpen?: boolean
8-
onClick?: VoidFunction
8+
onClick?: VoidFunction | ((ev: React.MouseEvent<HTMLElement>) => void)
99
icon?: JSX.Element
1010
disabled?: boolean
1111
isRemove?: boolean
@@ -25,7 +25,10 @@ const CardHeader = ({
2525
}: Props) => {
2626
const handleOnClick = useCallback(
2727
(e: MouseEvent<HTMLButtonElement>): void => {
28-
if (onClick) onClick()
28+
if (onClick) {
29+
onClick(e)
30+
return
31+
}
2932
e.stopPropagation()
3033
},
3134
[onClick]

sbp-frontend-style/src/components/molecules/notifications/Notification.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ import {
99
CardFooter,
1010
CardHeader
1111
} from 'components/molecules/cards'
12+
13+
import { parser } from 'helpers/HtmlHelper'
1214
import { useCallback, useEffect, useRef, useState } from 'react'
1315
import { styled } from 'styled-components'
1416
import { NotificationType } from '../../../datatypes/NotificationType'
@@ -101,7 +103,7 @@ const Notification = ({
101103
</NotificationHeader>
102104
{description && description !== '' ? (
103105
<Collapse $isOpen={showMore ? isOpen : true}>
104-
<NotificationContent>{description}</NotificationContent>
106+
<NotificationContent>{parser(description)}</NotificationContent>
105107
{date && (
106108
<NotificationFooter hasPadding>
107109
<DateInfo>{new Date(date).toLocaleString()}</DateInfo>

sbp-frontend-style/src/helpers/FunctionHelpers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,6 @@ export const IsValidDateString = (cell: any) => {
4848
!isNaN(date.getTime()) &&
4949
typeof cell === 'string' &&
5050
cell.trim().length > 0 &&
51-
/^[\d/\-.\s:TZ]+$/.test(cell) // Only numbers, / - . : and spaces
51+
/^[\d\\/\-.\s:TZ\\+]+$/.test(cell) // Only numbers, / - . : + and spaces
5252
)
5353
}

sbp-frontend-style/src/styling/ThemeConfig.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ const lightStyle: DefaultStyle = {
135135
cardColorBg: 'rgba(232, 242, 253, .90)',
136136
inputColorActive: 'rgb(30, 128, 237)',
137137
inputColorBg: 'rgb(255, 255, 255)',
138+
inputBorderColor: 'rgb(0, 0, 0)',
138139
inputPlaceholder: 'rgba(22, 12, 23, .5)',
139140
navigationColorBg: 'rgba(232, 242, 253, .90)',
140141
tooltipColor: 'rgb(255, 255, 255)',
@@ -153,6 +154,7 @@ const darkStyle: DefaultStyle = {
153154
buttonDisabledColorBg: 'rgba(232, 242, 253, .75)',
154155
buttonDragColor: 'rgb(2, 12, 23)',
155156
cardColorBg: 'rgba(232, 242, 253, .10)',
157+
inputBorderColor: 'rgba(232, 242, 253, .75)',
156158
inputColorBg: 'rgba(232, 242, 253, .10)',
157159
inputPlaceholder: 'rgba(255, 255, 255, .5)',
158160
navigationColorBg: 'rgba(232, 242, 253, .10)',

sbp-frontend-style/src/types/styled-components.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ declare module 'styled-components' {
4646
notificationErrorColor?: CssColorType
4747
notificationErrorColorBg?: CssColorType
4848
cardColorBg?: CssColorType
49+
inputBorderColor?: CssColorType
4950
inputColorActive?: CssColorType
5051
inputColorBg?: CssColorType
5152
inputPlaceholder?: CssColorType

0 commit comments

Comments
 (0)