chore: update deps (#38128)

This commit is contained in:
Stephen Zhou
2026-06-29 02:41:30 +00:00
committed by GitHub
parent 93d6506443
commit 358cf8be33
13 changed files with 3367 additions and 2704 deletions
@@ -61,7 +61,7 @@ const ChatWrapper = () => {
const appSourceType = isInstalledApp ? AppSourceType.installedApp : AppSourceType.webApp
const timezone = appSourceType === AppSourceType.webApp
? Intl.DateTimeFormat().resolvedOptions().timeZone
? new Intl.DateTimeFormat().resolvedOptions().timeZone
: undefined
// Semantic variable for better code readability
@@ -85,7 +85,7 @@ const ChatWrapper = () => {
} as ChatConfig
}, [appParams, currentConversationItem?.introduction])
const timezone = appSourceType === AppSourceType.webApp
? Intl.DateTimeFormat().resolvedOptions().timeZone
? new Intl.DateTimeFormat().resolvedOptions().timeZone
: undefined
const {
chatList,
@@ -1,3 +1,5 @@
import type { CSSProperties } from 'react'
export function hexToRGBA(hex: string, opacity: number): string {
hex = hex.replace('#', '')
@@ -13,11 +15,11 @@ export function hexToRGBA(hex: string, opacity: number): string {
* Since strings cannot be directly assigned to the 'style' attribute in JSX,
* this method transforms the string into an object representation of the styles.
*/
export function CssTransform(cssString: string): object {
export function CssTransform(cssString: string): CSSProperties {
if (cssString.length === 0)
return {}
const style: object = {}
const style: CSSProperties = {}
const propertyValuePairs = cssString.split(';')
for (const pair of propertyValuePairs) {
if (pair.trim().length > 0) {
@@ -129,7 +129,8 @@ const nodeDefault: NodeDefault<ScheduleTriggerNodeType> = {
// Validate timezone format if provided (timezone will be auto-filled by use-config.ts if undefined)
if (!errorMessages && payload.timezone) {
try {
Intl.DateTimeFormat(undefined, { timeZone: payload.timezone })
// eslint-disable-next-line no-new
new Intl.DateTimeFormat(undefined, { timeZone: payload.timezone })
}
catch {
errorMessages = t('nodes.triggerSchedule.invalidTimezone', { ns: 'workflow' })
@@ -9,7 +9,7 @@ const resolveTimezone = (timezone?: string): string => {
return timezone
try {
return Intl.DateTimeFormat().resolvedOptions().timeZone || DEFAULT_TIMEZONE
return new Intl.DateTimeFormat().resolvedOptions().timeZone || DEFAULT_TIMEZONE
}
catch {
return DEFAULT_TIMEZONE
@@ -53,7 +53,7 @@ const ObjectValueItem: FC<Props> = ({
const newList = produce(list, (draft) => {
draft[index].type = type
if (type === ChatVarType.Number)
draft[index].value = isNaN(Number(draft[index].value)) ? undefined : Number(draft[index].value)
draft[index].value = Number.isNaN(Number(draft[index].value)) ? undefined : Number(draft[index].value)
else
draft[index].value = draft[index].value ? String(draft[index].value) : undefined
})
@@ -64,7 +64,7 @@ const ObjectValueItem: FC<Props> = ({
const handleValueChange = useCallback((index: number) => {
return (e: React.ChangeEvent<HTMLInputElement>) => {
const newList = produce(list, (draft: any[]) => {
draft[index].value = draft[index].type === ChatVarType.String ? e.target.value : isNaN(Number(e.target.value)) ? undefined : Number(e.target.value)
draft[index].value = draft[index].type === ChatVarType.String ? e.target.value : Number.isNaN(Number(e.target.value)) ? undefined : Number(e.target.value)
})
onChange(newList)
}
+1 -1
View File
@@ -14,7 +14,7 @@ type UseTimestampOptions = {
}
const getBrowserTimezone = () => {
return Intl.DateTimeFormat().resolvedOptions().timeZone
return new Intl.DateTimeFormat().resolvedOptions().timeZone
}
const useTimestamp = ({ timezone: timezoneOverride }: UseTimestampOptions = {}) => {
+1 -1
View File
@@ -10,5 +10,5 @@ export const getBrowserTimezone = () => {
if (typeof Intl === 'undefined')
return undefined
return Intl.DateTimeFormat().resolvedOptions().timeZone || undefined
return new Intl.DateTimeFormat().resolvedOptions().timeZone || undefined
}