@globalbrain/sefirot 3.40.0 → 3.40.2

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.
@@ -4,7 +4,7 @@ import { type Day } from '../support/Day'
4
4
 
5
5
  const props = defineProps<{
6
6
  value?: Day | null
7
- record: any
7
+ record?: any
8
8
  align?: 'left' | 'center' | 'right'
9
9
  getter?: Day | null
10
10
  format?: string
@@ -7,7 +7,7 @@ import SLink from './SLink.vue'
7
7
 
8
8
  const props = defineProps<{
9
9
  value?: any
10
- record: any
10
+ record?: any
11
11
  align?: 'left' | 'center' | 'right'
12
12
  icon?: any
13
13
  getter?: number | null
@@ -4,7 +4,7 @@ import SPill, { type Mode } from './SPill.vue'
4
4
 
5
5
  const props = defineProps<{
6
6
  value?: any
7
- record: any
7
+ record?: any
8
8
  getter?: string | ((value: any, record: any) => string)
9
9
  color?: Mode | ((value: any, record: any) => Mode)
10
10
  }>()
@@ -4,12 +4,16 @@ import { type TableCellPillItem } from '../composables/Table'
4
4
  import STableCellPill from './STableCellPill.vue'
5
5
 
6
6
  const props = defineProps<{
7
- value: string[]
8
- record: any
9
- pills(value: string[], record: any): TableCellPillItem[]
7
+ value?: any
8
+ record?: any
9
+ pills: TableCellPillItem[] | ((value: any, record: any) => TableCellPillItem[])
10
10
  }>()
11
11
 
12
- const items = computed(() => props.pills(props.value, props.record))
12
+ const items = computed(() => {
13
+ return Array.isArray(props.pills)
14
+ ? props.pills
15
+ : props.pills(props.value, props.record)
16
+ })
13
17
  </script>
14
18
 
15
19
  <template>
@@ -173,11 +173,11 @@ export function useErrorHandler({
173
173
  }
174
174
 
175
175
  return function errorHandler(
176
- error: any,
176
+ e: any,
177
177
  instance: ComponentPublicInstance | null = null,
178
178
  info: string = ''
179
179
  ) {
180
- error.set(error)
180
+ error.set(e)
181
181
 
182
182
  if (enabled) {
183
183
  pauseTracking()
@@ -187,7 +187,7 @@ export function useErrorHandler({
187
187
  userValue = null
188
188
  }
189
189
 
190
- if (![403, 404].includes(error?.cause?.statusCode)) {
190
+ if (![403, 404].includes(e?.cause?.statusCode)) {
191
191
  const $ = instance && instance.$
192
192
  const metadata = $ && {
193
193
  componentName: formatComponentName($),
@@ -200,7 +200,7 @@ export function useErrorHandler({
200
200
  Sentry.withScope((scope) => {
201
201
  scope.setUser(userValue)
202
202
  scope.setContext('vue', metadata)
203
- Sentry.captureException(error)
203
+ Sentry.captureException(e)
204
204
  })
205
205
  })
206
206
  }
@@ -140,7 +140,7 @@ export type TableCellPillColor = ColorModes
140
140
 
141
141
  export interface TableCellPills<V = any, R = any> extends TableCellBase {
142
142
  type: 'pills'
143
- pills(value: V, record: R): TableCellPillItem[]
143
+ pills: TableCellPillItem[] | ((value: V, record: R) => TableCellPillItem[])
144
144
  }
145
145
 
146
146
  export interface TableCellPillItem {
@@ -131,7 +131,11 @@ function deepAssign(target: Record<string, any>, source: Record<string, any>) {
131
131
  const value = source[key]
132
132
 
133
133
  if (Array.isArray(value)) {
134
- target[key].splice(0, target[key].length, ...value)
134
+ if (Array.isArray(target[key])) {
135
+ target[key].splice(0, target[key].length, ...value)
136
+ } else {
137
+ target[key] = value
138
+ }
135
139
  } else if (value && typeof value === 'object') {
136
140
  target[key] = deepAssign(target[key] || {}, value)
137
141
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@globalbrain/sefirot",
3
- "version": "3.40.0",
3
+ "version": "3.40.2",
4
4
  "packageManager": "pnpm@8.15.5",
5
5
  "description": "Vue Components for Global Brain Design System.",
6
6
  "author": "Kia Ishii <ka.ishii@globalbrains.com>",
@@ -62,7 +62,7 @@
62
62
  "vue-router": "^4.3.0"
63
63
  },
64
64
  "dependencies": {
65
- "@sentry/browser": "8.0.0-alpha.5",
65
+ "@sentry/browser": "^8.0.0-alpha.7",
66
66
  "@tanstack/vue-virtual": "3.0.0-beta.62",
67
67
  "@tinyhttp/content-disposition": "^2.2.0",
68
68
  "@tinyhttp/cookie": "^2.1.0",
@@ -74,7 +74,7 @@
74
74
  "qs": "^6.12.0"
75
75
  },
76
76
  "devDependencies": {
77
- "@globalbrain/eslint-config": "^1.5.2",
77
+ "@globalbrain/eslint-config": "^1.6.0",
78
78
  "@histoire/plugin-vue": "^0.17.14",
79
79
  "@iconify-icons/ph": "^1.2.5",
80
80
  "@iconify-icons/ri": "^1.2.10",