@globalbrain/sefirot 3.49.0 → 4.0.0-0
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.
- package/config/nuxt.d.ts +4 -0
- package/config/nuxt.js +31 -0
- package/config/vite.d.ts +8 -0
- package/config/vite.js +69 -0
- package/lib/components/SActionList.vue +0 -1
- package/lib/components/SActionListItem.vue +3 -11
- package/lib/components/SAlert.vue +8 -13
- package/lib/components/SButton.vue +9 -10
- package/lib/components/SCardBlock.vue +0 -6
- package/lib/components/SControlActionBarClose.vue +1 -1
- package/lib/components/SControlActionBarCollapse.vue +2 -2
- package/lib/components/SControlInputSearch.vue +2 -2
- package/lib/components/SDescAvatar.vue +1 -2
- package/lib/components/SDescFile.vue +4 -6
- package/lib/components/SDescPill.vue +1 -2
- package/lib/components/SDescText.vue +1 -1
- package/lib/components/SDropdownSectionDateRange.vue +2 -2
- package/lib/components/SDropdownSectionDateRangeDateFromTo.vue +2 -2
- package/lib/components/SDropdownSectionDateRangeYear.vue +2 -2
- package/lib/components/SDropdownSectionDateRangeYearHalf.vue +2 -2
- package/lib/components/SDropdownSectionDateRangeYearQuarter.vue +2 -2
- package/lib/components/SDropdownSectionFilter.vue +4 -6
- package/lib/components/SIndicator.vue +10 -16
- package/lib/components/SInputAddon.vue +6 -8
- package/lib/components/SInputBase.vue +6 -8
- package/lib/components/SInputCheckbox.vue +7 -11
- package/lib/components/SInputCheckboxes.vue +3 -4
- package/lib/components/SInputDate.vue +3 -4
- package/lib/components/SInputDropdown.vue +10 -13
- package/lib/components/SInputDropdownItemAvatar.vue +2 -3
- package/lib/components/SInputDropdownItemText.vue +2 -3
- package/lib/components/SInputFile.vue +3 -4
- package/lib/components/SInputHMS.vue +4 -5
- package/lib/components/SInputImage.vue +5 -7
- package/lib/components/SInputNumber.vue +10 -11
- package/lib/components/SInputRadio.vue +3 -4
- package/lib/components/SInputRadios.vue +3 -4
- package/lib/components/SInputSegments.vue +3 -4
- package/lib/components/SInputSelect.vue +7 -9
- package/lib/components/SInputSwitch.vue +3 -4
- package/lib/components/SInputSwitches.vue +3 -4
- package/lib/components/SInputText.vue +7 -9
- package/lib/components/SInputTextarea.vue +3 -4
- package/lib/components/SInputYMD.vue +4 -5
- package/lib/components/SLink.vue +1 -1
- package/lib/components/SLocalNavMenu.vue +3 -4
- package/lib/components/SLoginPage.vue +79 -22
- package/lib/components/SLoginPagePasswordDialog.vue +95 -0
- package/lib/components/SPagination.vue +2 -2
- package/lib/components/SPill.vue +1 -5
- package/lib/components/SSnackbar.vue +2 -3
- package/lib/components/SStep.vue +4 -5
- package/lib/components/STable.vue +1 -2
- package/lib/components/STableCell.vue +5 -13
- package/lib/components/STableCellAvatar.vue +10 -27
- package/lib/components/STableCellAvatars.vue +6 -19
- package/lib/components/STableCellDay.vue +4 -11
- package/lib/components/STableCellNumber.vue +8 -9
- package/lib/components/STableCellPill.vue +5 -33
- package/lib/components/STableCellPills.vue +4 -14
- package/lib/components/STableCellState.vue +3 -3
- package/lib/components/STableCellText.vue +22 -50
- package/lib/components/STableColumn.vue +4 -6
- package/lib/components/STableFooter.vue +4 -5
- package/lib/components/STableHeader.vue +2 -19
- package/lib/components/STableHeaderMenu.vue +1 -2
- package/lib/components/STableHeaderMenuItem.vue +2 -3
- package/lib/components/STableItem.vue +1 -1
- package/lib/composables/Data.ts +8 -102
- package/lib/composables/Error.ts +3 -3
- package/lib/composables/Table.ts +17 -22
- package/lib/composables/Utils.ts +2 -2
- package/lib/composables/Validation.ts +76 -14
- package/lib/http/Http.ts +27 -10
- package/lib/mixins/Card.ts +0 -27
- package/lib/mixins/Fundamental.ts +0 -3
- package/lib/support/Day.ts +5 -5
- package/lib/support/Utils.ts +35 -14
- package/lib/validation/validators/maxLength.ts +2 -2
- package/lib/validation/validators/maxValue.ts +2 -2
- package/lib/validation/validators/minLength.ts +2 -2
- package/lib/validation/validators/minValue.ts +2 -2
- package/lib/validation/validators/required.ts +4 -4
- package/package.json +40 -40
- package/lib/components/SCardFooter.vue +0 -22
- package/lib/components/SCardFooterAction.vue +0 -31
- package/lib/components/SCardFooterActions.vue +0 -18
- package/lib/components/SCardHeader.vue +0 -15
- package/lib/components/SCardHeaderAction.vue +0 -28
- package/lib/components/SCardHeaderActionClose.vue +0 -27
- package/lib/components/SCardHeaderActionCollapse.vue +0 -47
- package/lib/components/SCardHeaderActions.vue +0 -13
- package/lib/components/SCardHeaderTitle.vue +0 -29
- package/lib/components/SIcon.vue +0 -13
- package/lib/components/SSheet.vue +0 -87
- package/lib/components/SSheetFooter.vue +0 -16
- package/lib/components/SSheetFooterAction.vue +0 -34
- package/lib/components/SSheetFooterActions.vue +0 -14
- package/lib/components/SSheetForm.vue +0 -15
- package/lib/components/SSheetMedium.vue +0 -72
- package/lib/components/SSheetTitle.vue +0 -13
- package/lib/components/STableHeaderActions.vue +0 -20
- package/lib/composables/D.ts +0 -21
- package/lib/composables/Form.ts +0 -109
- package/lib/composables/V.ts +0 -97
- package/lib/mixins/Sheet.ts +0 -30
package/lib/http/Http.ts
CHANGED
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import { parse as parseContentDisposition } from '@tinyhttp/content-disposition'
|
|
2
2
|
import { parse as parseCookie } from '@tinyhttp/cookie'
|
|
3
3
|
import FileSaver from 'file-saver'
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
FetchError,
|
|
6
|
+
type FetchOptions,
|
|
7
|
+
type FetchRequest,
|
|
8
|
+
type FetchResponse,
|
|
9
|
+
ofetch
|
|
10
|
+
} from 'ofetch'
|
|
5
11
|
import { stringify } from 'qs'
|
|
6
12
|
import { type Lang } from '../composables/Lang'
|
|
13
|
+
import { isBlob, isError, isFormData, isRequest, isResponse, isString } from '../support/Utils'
|
|
7
14
|
|
|
8
15
|
export interface HttpClient {
|
|
9
16
|
<T = any>(request: FetchRequest, options?: Omit<FetchOptions, 'method'>): Promise<T>
|
|
@@ -106,11 +113,11 @@ export class Http {
|
|
|
106
113
|
}
|
|
107
114
|
|
|
108
115
|
async post<T = any>(url: string, body?: any, options?: FetchOptions): Promise<T> {
|
|
109
|
-
if (body && !(body
|
|
116
|
+
if (body && !isFormData(body)) {
|
|
110
117
|
let hasFile = false
|
|
111
118
|
|
|
112
119
|
const payload = JSON.stringify(body, (_, value) => {
|
|
113
|
-
if (value
|
|
120
|
+
if (isBlob(value)) {
|
|
114
121
|
hasFile = true
|
|
115
122
|
return undefined
|
|
116
123
|
}
|
|
@@ -177,15 +184,11 @@ export class Http {
|
|
|
177
184
|
return
|
|
178
185
|
}
|
|
179
186
|
|
|
180
|
-
if (
|
|
181
|
-
typeof obj[property] === 'object'
|
|
182
|
-
&& !(obj[property] instanceof Blob)
|
|
183
|
-
&& obj[property] !== null
|
|
184
|
-
) {
|
|
187
|
+
if (typeof obj[property] === 'object' && !isBlob(obj[property]) && obj[property] !== null) {
|
|
185
188
|
this.objectToFormData(obj[property], fd, property, onlyFiles)
|
|
186
189
|
} else {
|
|
187
190
|
const value = obj[property] === null ? '' : obj[property]
|
|
188
|
-
if (onlyFiles && !(value
|
|
191
|
+
if (onlyFiles && !isBlob(value)) {
|
|
189
192
|
return
|
|
190
193
|
}
|
|
191
194
|
fd.append(formKey, value)
|
|
@@ -196,4 +199,18 @@ export class Http {
|
|
|
196
199
|
}
|
|
197
200
|
}
|
|
198
201
|
|
|
199
|
-
export
|
|
202
|
+
export function isFetchError(e: unknown): e is FetchError {
|
|
203
|
+
return (
|
|
204
|
+
e instanceof FetchError
|
|
205
|
+
|| (isError(e)
|
|
206
|
+
&& (isString((e as FetchError).request) || isRequest((e as FetchError).request))
|
|
207
|
+
&& ((e as FetchError).response === undefined || isResponse((e as FetchError).response))
|
|
208
|
+
&& e.message.startsWith(
|
|
209
|
+
`[${((e as FetchError).request as Request | undefined)?.method || (e as FetchError).options?.method || 'GET'}] ${
|
|
210
|
+
JSON.stringify(((e as FetchError).request as Request | undefined)?.url || String((e as FetchError).request) || '/')
|
|
211
|
+
}: `
|
|
212
|
+
))
|
|
213
|
+
)
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
export { FetchError, type FetchOptions, type FetchRequest, type FetchResponse } from 'ofetch'
|
package/lib/mixins/Card.ts
CHANGED
|
@@ -1,42 +1,15 @@
|
|
|
1
1
|
import { type App } from 'vue'
|
|
2
2
|
import SCard from '../components/SCard.vue'
|
|
3
3
|
import SCardBlock from '../components/SCardBlock.vue'
|
|
4
|
-
import SCardFooter from '../components/SCardFooter.vue'
|
|
5
|
-
import SCardFooterAction from '../components/SCardFooterAction.vue'
|
|
6
|
-
import SCardFooterActions from '../components/SCardFooterActions.vue'
|
|
7
|
-
import SCardHeader from '../components/SCardHeader.vue'
|
|
8
|
-
import SCardHeaderAction from '../components/SCardHeaderAction.vue'
|
|
9
|
-
import SCardHeaderActionClose from '../components/SCardHeaderActionClose.vue'
|
|
10
|
-
import SCardHeaderActionCollapse from '../components/SCardHeaderActionCollapse.vue'
|
|
11
|
-
import SCardHeaderActions from '../components/SCardHeaderActions.vue'
|
|
12
|
-
import SCardHeaderTitle from '../components/SCardHeaderTitle.vue'
|
|
13
4
|
|
|
14
5
|
export function mixin(app: App): void {
|
|
15
6
|
app.component('SCard', SCard)
|
|
16
7
|
app.component('SCardBlock', SCardBlock)
|
|
17
|
-
app.component('SCardFooter', SCardFooter)
|
|
18
|
-
app.component('SCardFooterAction', SCardFooterAction)
|
|
19
|
-
app.component('SCardFooterActions', SCardFooterActions)
|
|
20
|
-
app.component('SCardHeader', SCardHeader)
|
|
21
|
-
app.component('SCardHeaderAction', SCardHeaderAction)
|
|
22
|
-
app.component('SCardHeaderActionClose', SCardHeaderActionClose)
|
|
23
|
-
app.component('SCardHeaderActionCollapse', SCardHeaderActionCollapse)
|
|
24
|
-
app.component('SCardHeaderActions', SCardHeaderActions)
|
|
25
|
-
app.component('SCardHeaderTitle', SCardHeaderTitle)
|
|
26
8
|
}
|
|
27
9
|
|
|
28
10
|
declare module 'vue' {
|
|
29
11
|
export interface GlobalComponents {
|
|
30
12
|
SCard: typeof SCard
|
|
31
13
|
SCardBlock: typeof SCardBlock
|
|
32
|
-
SCardFooter: typeof SCardFooter
|
|
33
|
-
SCardFooterAction: typeof SCardFooterAction
|
|
34
|
-
SCardFooterActions: typeof SCardFooterActions
|
|
35
|
-
SCardHeader: typeof SCardHeader
|
|
36
|
-
SCardHeaderAction: typeof SCardHeaderAction
|
|
37
|
-
SCardHeaderActionClose: typeof SCardHeaderActionClose
|
|
38
|
-
SCardHeaderActionCollapse: typeof SCardHeaderActionCollapse
|
|
39
|
-
SCardHeaderActions: typeof SCardHeaderActions
|
|
40
|
-
SCardHeaderTitle: typeof SCardHeaderTitle
|
|
41
14
|
}
|
|
42
15
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { type App } from 'vue'
|
|
2
2
|
import SContent from '../components/SContent.vue'
|
|
3
3
|
import SDivider from '../components/SDivider.vue'
|
|
4
|
-
import SIcon from '../components/SIcon.vue'
|
|
5
4
|
import SLink from '../components/SLink.vue'
|
|
6
5
|
import SModal from '../components/SModal.vue'
|
|
7
6
|
import STrans from '../components/STrans.vue'
|
|
@@ -22,7 +21,6 @@ export function mixin(app: App): void {
|
|
|
22
21
|
|
|
23
22
|
app.component('SContent', SContent)
|
|
24
23
|
app.component('SDivider', SDivider)
|
|
25
|
-
app.component('SIcon', SIcon)
|
|
26
24
|
app.component('SLink', SLink)
|
|
27
25
|
app.component('SModal', SModal)
|
|
28
26
|
app.component('STrans', STrans)
|
|
@@ -32,7 +30,6 @@ declare module 'vue' {
|
|
|
32
30
|
export interface GlobalComponents {
|
|
33
31
|
SContent: typeof SContent
|
|
34
32
|
SDivider: typeof SDivider
|
|
35
|
-
SIcon: typeof SIcon
|
|
36
33
|
SLink: typeof SLink
|
|
37
34
|
SModal: typeof SModal
|
|
38
35
|
STrans: typeof STrans
|
package/lib/support/Day.ts
CHANGED
|
@@ -2,7 +2,7 @@ import dayjs, { type ConfigType, type Dayjs } from 'dayjs'
|
|
|
2
2
|
import PluginRelativeTime from 'dayjs/plugin/relativeTime'
|
|
3
3
|
import PluginTimezone from 'dayjs/plugin/timezone'
|
|
4
4
|
import PluginUtc from 'dayjs/plugin/utc'
|
|
5
|
-
import {
|
|
5
|
+
import { isNumber, isObject, isString } from './Utils'
|
|
6
6
|
|
|
7
7
|
dayjs.extend(PluginUtc)
|
|
8
8
|
dayjs.extend(PluginTimezone)
|
|
@@ -67,7 +67,7 @@ export function createYmd(
|
|
|
67
67
|
month: number | null = null,
|
|
68
68
|
date: number | null = null
|
|
69
69
|
): Ymd {
|
|
70
|
-
if (isNumber(yearOrDay) ||
|
|
70
|
+
if (isNumber(yearOrDay) || yearOrDay == null) {
|
|
71
71
|
return {
|
|
72
72
|
year: yearOrDay,
|
|
73
73
|
month,
|
|
@@ -92,7 +92,7 @@ export function createHms(
|
|
|
92
92
|
minute: string | null = null,
|
|
93
93
|
second: string | null = null
|
|
94
94
|
): Hms {
|
|
95
|
-
if (isString(hourOrDay) ||
|
|
95
|
+
if (isString(hourOrDay) || hourOrDay == null) {
|
|
96
96
|
return {
|
|
97
97
|
hour: hourOrDay,
|
|
98
98
|
minute,
|
|
@@ -108,7 +108,7 @@ export function createHms(
|
|
|
108
108
|
}
|
|
109
109
|
|
|
110
110
|
export function isYmd(value: unknown, required: YmdType[] = ['y', 'm', 'd']): value is Ymd {
|
|
111
|
-
if (
|
|
111
|
+
if (value == null || !isObject(value)) {
|
|
112
112
|
return false
|
|
113
113
|
}
|
|
114
114
|
|
|
@@ -121,7 +121,7 @@ export function isYmd(value: unknown, required: YmdType[] = ['y', 'm', 'd']): va
|
|
|
121
121
|
}
|
|
122
122
|
|
|
123
123
|
export function isHms(value: unknown, required: HmsType[] = ['h', 'm', 's']): value is Hms {
|
|
124
|
-
if (
|
|
124
|
+
if (value == null || !isObject(value)) {
|
|
125
125
|
return false
|
|
126
126
|
}
|
|
127
127
|
|
package/lib/support/Utils.ts
CHANGED
|
@@ -1,28 +1,49 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
// eslint-disable-next-line @typescript-eslint/prefer-ts-expect-error
|
|
2
|
+
// @ts-ignore internal
|
|
3
|
+
import baseGetTag from 'lodash-es/_baseGetTag'
|
|
4
|
+
|
|
5
|
+
import _isDate from 'lodash-es/isDate'
|
|
6
|
+
import _isError from 'lodash-es/isError'
|
|
7
|
+
import _isNumber from 'lodash-es/isNumber'
|
|
8
|
+
import _isPlainObject from 'lodash-es/isPlainObject'
|
|
9
|
+
import _isString from 'lodash-es/isString'
|
|
10
|
+
|
|
11
|
+
export function isBlob(value: unknown): value is Blob {
|
|
12
|
+
return value instanceof Blob || baseGetTag(value) === '[object Blob]'
|
|
3
13
|
}
|
|
4
14
|
|
|
5
|
-
export function
|
|
6
|
-
return
|
|
15
|
+
export function isDate(value: unknown): value is Date {
|
|
16
|
+
return _isDate(value)
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export function isError(value: unknown): value is Error {
|
|
20
|
+
return _isError(value)
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export function isFile(value: unknown): value is File {
|
|
24
|
+
return value instanceof File || baseGetTag(value) === '[object File]'
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export function isFormData(value: unknown): value is FormData {
|
|
28
|
+
return value instanceof FormData || baseGetTag(value) === '[object FormData]'
|
|
7
29
|
}
|
|
8
30
|
|
|
9
31
|
export function isNumber(value: unknown): value is number {
|
|
10
|
-
return
|
|
32
|
+
return _isNumber(value)
|
|
11
33
|
}
|
|
12
34
|
|
|
13
|
-
export function
|
|
14
|
-
return
|
|
35
|
+
export function isObject(value: unknown): value is Record<string, unknown> {
|
|
36
|
+
return _isPlainObject(value)
|
|
15
37
|
}
|
|
16
38
|
|
|
17
|
-
export function
|
|
18
|
-
return
|
|
39
|
+
export function isRequest(value: unknown): value is Request {
|
|
40
|
+
return value instanceof Request || baseGetTag(value) === '[object Request]'
|
|
19
41
|
}
|
|
20
42
|
|
|
21
|
-
export function
|
|
22
|
-
return value instanceof
|
|
43
|
+
export function isResponse(value: unknown): value is Response {
|
|
44
|
+
return value instanceof Response || baseGetTag(value) === '[object Response]'
|
|
23
45
|
}
|
|
24
46
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
return typeof value === 'function'
|
|
47
|
+
export function isString(value: unknown): value is string {
|
|
48
|
+
return _isString(value)
|
|
28
49
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { isString } from '../../support/Utils'
|
|
2
2
|
|
|
3
3
|
export function maxLength(value: unknown, length: number): boolean {
|
|
4
|
-
if (!(isString(value) || isArray(value))) {
|
|
4
|
+
if (!(isString(value) || Array.isArray(value))) {
|
|
5
5
|
return false
|
|
6
6
|
}
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { isNumber, isString } from '../../support/Utils'
|
|
1
|
+
import { isDate, isNumber, isString } from '../../support/Utils'
|
|
2
2
|
|
|
3
3
|
export function maxValue(value: unknown, max: number) {
|
|
4
|
-
if (isNumber(value) || isString(value) || value
|
|
4
|
+
if (isNumber(value) || isString(value) || isDate(value)) {
|
|
5
5
|
return +value <= max
|
|
6
6
|
}
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { isString } from '../../support/Utils'
|
|
2
2
|
|
|
3
3
|
export function minLength(value: unknown, length: number): boolean {
|
|
4
|
-
if (!(isString(value) || isArray(value))) {
|
|
4
|
+
if (!(isString(value) || Array.isArray(value))) {
|
|
5
5
|
return false
|
|
6
6
|
}
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { isNumber, isString } from '../../support/Utils'
|
|
1
|
+
import { isDate, isNumber, isString } from '../../support/Utils'
|
|
2
2
|
|
|
3
3
|
export function minValue(value: unknown, min: number) {
|
|
4
|
-
if (isNumber(value) || isString(value) || value
|
|
4
|
+
if (isNumber(value) || isString(value) || isDate(value)) {
|
|
5
5
|
return +value >= min
|
|
6
6
|
}
|
|
7
7
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { isDate, isString } from '../../support/Utils'
|
|
2
2
|
|
|
3
3
|
export function required(value: unknown): boolean {
|
|
4
4
|
if (isString(value)) {
|
|
@@ -9,11 +9,11 @@ export function required(value: unknown): boolean {
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
export function _required(value: unknown): boolean {
|
|
12
|
-
if (isArray(value)) {
|
|
12
|
+
if (Array.isArray(value)) {
|
|
13
13
|
return !!value.length
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
if (
|
|
16
|
+
if (value == null) {
|
|
17
17
|
return false
|
|
18
18
|
}
|
|
19
19
|
|
|
@@ -21,7 +21,7 @@ export function _required(value: unknown): boolean {
|
|
|
21
21
|
return true
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
if (value
|
|
24
|
+
if (isDate(value)) {
|
|
25
25
|
return !Number.isNaN(value.getTime())
|
|
26
26
|
}
|
|
27
27
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@globalbrain/sefirot",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "4.0.0-0",
|
|
5
|
+
"packageManager": "pnpm@9.5.0",
|
|
5
6
|
"description": "Vue Components for Global Brain Design System.",
|
|
6
7
|
"author": "Kia Ishii <ka.ishii@globalbrains.com>",
|
|
7
8
|
"license": "MIT",
|
|
@@ -18,7 +19,8 @@
|
|
|
18
19
|
"vue component"
|
|
19
20
|
],
|
|
20
21
|
"files": [
|
|
21
|
-
"lib"
|
|
22
|
+
"lib",
|
|
23
|
+
"config"
|
|
22
24
|
],
|
|
23
25
|
"scripts": {
|
|
24
26
|
"docs": "pnpm docs:dev",
|
|
@@ -40,81 +42,79 @@
|
|
|
40
42
|
"release": "release-it"
|
|
41
43
|
},
|
|
42
44
|
"peerDependencies": {
|
|
43
|
-
"@iconify-
|
|
44
|
-
"@iconify-
|
|
45
|
-
"@iconify/vue": "^4.1.2",
|
|
45
|
+
"@iconify-json/ph": "^1.1.13",
|
|
46
|
+
"@iconify-json/ri": "^1.1.21",
|
|
46
47
|
"@types/body-scroll-lock": "^3.1.2",
|
|
47
48
|
"@types/lodash-es": "^4.17.12",
|
|
48
49
|
"@types/markdown-it": "^14.1.1",
|
|
49
|
-
"@vue/reactivity": "^3.4.
|
|
50
|
-
"@vue/runtime-core": "^3.4.27",
|
|
50
|
+
"@vue/reactivity": "^3.4.33",
|
|
51
51
|
"@vuelidate/core": "^2.0.3",
|
|
52
52
|
"@vuelidate/validators": "^2.0.4",
|
|
53
|
-
"@vueuse/core": "^10.
|
|
53
|
+
"@vueuse/core": "^10.11.0",
|
|
54
54
|
"body-scroll-lock": "4.0.0-beta.0",
|
|
55
|
-
"dayjs": "^1.11.
|
|
55
|
+
"dayjs": "^1.11.12",
|
|
56
56
|
"fuse.js": "^7.0.0",
|
|
57
57
|
"lodash-es": "^4.17.21",
|
|
58
58
|
"markdown-it": "^14.1.0",
|
|
59
59
|
"normalize.css": "^8.0.1",
|
|
60
60
|
"pinia": "^2.1.7",
|
|
61
|
-
"postcss": "^8.4.
|
|
62
|
-
"postcss-nested": "^6.0
|
|
61
|
+
"postcss": "^8.4.39",
|
|
62
|
+
"postcss-nested": "^6.2.0",
|
|
63
|
+
"unplugin-icons": "^0.19.0",
|
|
63
64
|
"v-calendar": "^3.1.2",
|
|
64
|
-
"vue": "^3.4.
|
|
65
|
-
"vue-router": "^4.
|
|
65
|
+
"vue": "^3.4.33",
|
|
66
|
+
"vue-router": "^4.4.0"
|
|
66
67
|
},
|
|
67
68
|
"dependencies": {
|
|
68
|
-
"@sentry/browser": "^8.
|
|
69
|
+
"@sentry/browser": "^8.19.0",
|
|
69
70
|
"@tanstack/vue-virtual": "3.0.0-beta.62",
|
|
70
|
-
"@tinyhttp/content-disposition": "^2.2.
|
|
71
|
-
"@tinyhttp/cookie": "^2.1.
|
|
71
|
+
"@tinyhttp/content-disposition": "^2.2.1",
|
|
72
|
+
"@tinyhttp/cookie": "^2.1.1",
|
|
72
73
|
"@types/file-saver": "^2.0.7",
|
|
73
74
|
"@types/qs": "^6.9.15",
|
|
74
75
|
"file-saver": "^2.0.5",
|
|
75
76
|
"ofetch": "^1.3.4",
|
|
76
|
-
"qs": "^6.12.
|
|
77
|
+
"qs": "^6.12.3"
|
|
77
78
|
},
|
|
78
79
|
"devDependencies": {
|
|
79
80
|
"@globalbrain/eslint-config": "^1.6.0",
|
|
80
81
|
"@histoire/plugin-vue": "0.16.5",
|
|
81
|
-
"@iconify-
|
|
82
|
-
"@iconify-
|
|
83
|
-
"@iconify/vue": "^4.1.2",
|
|
82
|
+
"@iconify-json/ph": "^1.1.13",
|
|
83
|
+
"@iconify-json/ri": "^1.1.21",
|
|
84
84
|
"@release-it/conventional-changelog": "^8.0.1",
|
|
85
85
|
"@types/body-scroll-lock": "^3.1.2",
|
|
86
86
|
"@types/lodash-es": "^4.17.12",
|
|
87
87
|
"@types/markdown-it": "^14.1.1",
|
|
88
|
-
"@types/node": "^20.
|
|
89
|
-
"@vitejs/plugin-vue": "^5.0.
|
|
90
|
-
"@vitest/coverage-v8": "^
|
|
91
|
-
"@vue/reactivity": "^3.4.
|
|
92
|
-
"@vue/runtime-core": "^3.4.27",
|
|
88
|
+
"@types/node": "^20.14.11",
|
|
89
|
+
"@vitejs/plugin-vue": "^5.0.5",
|
|
90
|
+
"@vitest/coverage-v8": "^2.0.3",
|
|
91
|
+
"@vue/reactivity": "^3.4.33",
|
|
93
92
|
"@vue/test-utils": "^2.4.6",
|
|
94
93
|
"@vuelidate/core": "^2.0.3",
|
|
95
94
|
"@vuelidate/validators": "^2.0.4",
|
|
96
|
-
"@vueuse/core": "^10.
|
|
95
|
+
"@vueuse/core": "^10.11.0",
|
|
97
96
|
"body-scroll-lock": "4.0.0-beta.0",
|
|
98
|
-
"dayjs": "^1.11.
|
|
99
|
-
"eslint": "
|
|
97
|
+
"dayjs": "^1.11.12",
|
|
98
|
+
"eslint": "8.57.0",
|
|
100
99
|
"fuse.js": "^7.0.0",
|
|
101
|
-
"happy-dom": "^14.
|
|
100
|
+
"happy-dom": "^14.12.3",
|
|
102
101
|
"histoire": "0.16.5",
|
|
103
102
|
"lodash-es": "^4.17.21",
|
|
104
103
|
"markdown-it": "^14.1.0",
|
|
105
104
|
"normalize.css": "^8.0.1",
|
|
106
105
|
"pinia": "^2.1.7",
|
|
107
|
-
"postcss": "^8.4.
|
|
108
|
-
"postcss-nested": "^6.0
|
|
106
|
+
"postcss": "^8.4.39",
|
|
107
|
+
"postcss-nested": "^6.2.0",
|
|
109
108
|
"punycode": "^2.3.1",
|
|
110
|
-
"release-it": "^17.
|
|
111
|
-
"typescript": "~5.
|
|
109
|
+
"release-it": "^17.6.0",
|
|
110
|
+
"typescript": "~5.5.3",
|
|
111
|
+
"unplugin-icons": "npm:@globalbrain/unplugin-icons@^0.19.1",
|
|
112
112
|
"v-calendar": "^3.1.2",
|
|
113
|
-
"vite": "^5.
|
|
114
|
-
"vitepress": "^1.1
|
|
115
|
-
"vitest": "^
|
|
116
|
-
"vue": "^3.4.
|
|
117
|
-
"vue-router": "^4.
|
|
118
|
-
"vue-tsc": "^
|
|
113
|
+
"vite": "^5.3.4",
|
|
114
|
+
"vitepress": "^1.3.1",
|
|
115
|
+
"vitest": "^2.0.3",
|
|
116
|
+
"vue": "^3.4.33",
|
|
117
|
+
"vue-router": "^4.4.0",
|
|
118
|
+
"vue-tsc": "^2.0.26"
|
|
119
119
|
}
|
|
120
120
|
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
export type Space = 'compact' | 'wide' | 'xwide'
|
|
3
|
-
|
|
4
|
-
defineProps<{
|
|
5
|
-
space?: Space
|
|
6
|
-
}>()
|
|
7
|
-
</script>
|
|
8
|
-
|
|
9
|
-
<template>
|
|
10
|
-
<div class="SCardFooter" :class="[space ?? 'compact']">
|
|
11
|
-
<slot />
|
|
12
|
-
</div>
|
|
13
|
-
</template>
|
|
14
|
-
|
|
15
|
-
<style scoped lang="postcss">
|
|
16
|
-
.SCardFooter {
|
|
17
|
-
display: flex;
|
|
18
|
-
align-items: center;
|
|
19
|
-
border-radius: 0 0 5px 5px;
|
|
20
|
-
background-color: var(--c-bg-elv-3);
|
|
21
|
-
}
|
|
22
|
-
</style>
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import SButton, { type Mode, type Tooltip } from './SButton.vue'
|
|
3
|
-
|
|
4
|
-
defineProps<{
|
|
5
|
-
mode?: Mode
|
|
6
|
-
label?: string
|
|
7
|
-
labelMode?: Mode
|
|
8
|
-
loading?: boolean
|
|
9
|
-
disabled?: boolean
|
|
10
|
-
tooltip?: string | Tooltip
|
|
11
|
-
}>()
|
|
12
|
-
|
|
13
|
-
defineEmits<{
|
|
14
|
-
(e: 'click'): void
|
|
15
|
-
}>()
|
|
16
|
-
</script>
|
|
17
|
-
|
|
18
|
-
<template>
|
|
19
|
-
<div class="SCardFooterAction">
|
|
20
|
-
<SButton
|
|
21
|
-
size="medium"
|
|
22
|
-
:mode="mode"
|
|
23
|
-
:label="label"
|
|
24
|
-
:label-mode="labelMode"
|
|
25
|
-
:loading="loading"
|
|
26
|
-
:disabled="disabled"
|
|
27
|
-
:tooltip="tooltip"
|
|
28
|
-
@click="$emit('click')"
|
|
29
|
-
/>
|
|
30
|
-
</div>
|
|
31
|
-
</template>
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="SCardFooterActions">
|
|
3
|
-
<slot />
|
|
4
|
-
</div>
|
|
5
|
-
</template>
|
|
6
|
-
|
|
7
|
-
<style scoped lang="postcss">
|
|
8
|
-
.SCardFooterActions {
|
|
9
|
-
display: flex;
|
|
10
|
-
justify-content: flex-end;
|
|
11
|
-
flex-grow: 1;
|
|
12
|
-
gap: 12px;
|
|
13
|
-
|
|
14
|
-
.SCardFooter.compact > & { padding: 12px 24px; }
|
|
15
|
-
.SCardFooter.wide > & { padding: 16px 32px; }
|
|
16
|
-
.SCardFooter.xwide > & { padding: 24px 48px; }
|
|
17
|
-
}
|
|
18
|
-
</style>
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="SCardHeader">
|
|
3
|
-
<slot />
|
|
4
|
-
</div>
|
|
5
|
-
</template>
|
|
6
|
-
|
|
7
|
-
<style scoped lang="postcss">
|
|
8
|
-
.SCardHeader {
|
|
9
|
-
display: flex;
|
|
10
|
-
align-items: center;
|
|
11
|
-
border-radius: 5px 5px 0 0;
|
|
12
|
-
height: 48px;
|
|
13
|
-
background-color: var(--c-bg-elv-4);
|
|
14
|
-
}
|
|
15
|
-
</style>
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { type IconifyIcon } from '@iconify/vue/dist/offline'
|
|
3
|
-
import SButton, { type Tooltip } from './SButton.vue'
|
|
4
|
-
|
|
5
|
-
defineProps<{
|
|
6
|
-
icon: IconifyIcon
|
|
7
|
-
disabled?: boolean
|
|
8
|
-
tooltip?: string | Tooltip
|
|
9
|
-
}>()
|
|
10
|
-
|
|
11
|
-
defineEmits<{
|
|
12
|
-
(e: 'click'): void
|
|
13
|
-
}>()
|
|
14
|
-
</script>
|
|
15
|
-
|
|
16
|
-
<template>
|
|
17
|
-
<div class="SCardHeaderAction">
|
|
18
|
-
<SButton
|
|
19
|
-
type="text"
|
|
20
|
-
mode="mute"
|
|
21
|
-
size="small"
|
|
22
|
-
:icon="icon"
|
|
23
|
-
:disabled="disabled"
|
|
24
|
-
:tooltip="tooltip"
|
|
25
|
-
@click="$emit('click')"
|
|
26
|
-
/>
|
|
27
|
-
</div>
|
|
28
|
-
</template>
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import IconX from '@iconify-icons/ph/x-bold'
|
|
3
|
-
import SButton, { type Tooltip } from './SButton.vue'
|
|
4
|
-
|
|
5
|
-
defineProps<{
|
|
6
|
-
disabled?: boolean
|
|
7
|
-
tooltip?: string | Tooltip
|
|
8
|
-
}>()
|
|
9
|
-
|
|
10
|
-
defineEmits<{
|
|
11
|
-
(e: 'click'): void
|
|
12
|
-
}>()
|
|
13
|
-
</script>
|
|
14
|
-
|
|
15
|
-
<template>
|
|
16
|
-
<div class="SCardHeaderActionClose">
|
|
17
|
-
<SButton
|
|
18
|
-
type="text"
|
|
19
|
-
mode="mute"
|
|
20
|
-
size="small"
|
|
21
|
-
:icon="IconX"
|
|
22
|
-
:disabled="disabled"
|
|
23
|
-
:tooltip="tooltip"
|
|
24
|
-
@click="$emit('click')"
|
|
25
|
-
/>
|
|
26
|
-
</div>
|
|
27
|
-
</template>
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import IconArrowsInLineVertical from '@iconify-icons/ph/arrows-in-line-vertical-bold'
|
|
3
|
-
import IconArrowsOutLineVertical from '@iconify-icons/ph/arrows-out-line-vertical-bold'
|
|
4
|
-
import { computed, shallowRef } from 'vue'
|
|
5
|
-
import { useCardState } from '../composables/Card'
|
|
6
|
-
import SButton, { type Tooltip } from './SButton.vue'
|
|
7
|
-
|
|
8
|
-
const props = defineProps<{
|
|
9
|
-
collapsed?: boolean
|
|
10
|
-
disabled?: boolean
|
|
11
|
-
tooltip?: string | Tooltip
|
|
12
|
-
}>()
|
|
13
|
-
|
|
14
|
-
defineEmits<{
|
|
15
|
-
(e: 'click'): void
|
|
16
|
-
}>()
|
|
17
|
-
|
|
18
|
-
const { isCollapsed, setCollapse, toggleCollapse } = useCardState()
|
|
19
|
-
|
|
20
|
-
setCollapse(props.collapsed)
|
|
21
|
-
|
|
22
|
-
const el = shallowRef<HTMLElement | null>(null)
|
|
23
|
-
|
|
24
|
-
const icon = computed(() => {
|
|
25
|
-
return isCollapsed.value
|
|
26
|
-
? IconArrowsOutLineVertical
|
|
27
|
-
: IconArrowsInLineVertical
|
|
28
|
-
})
|
|
29
|
-
</script>
|
|
30
|
-
|
|
31
|
-
<template>
|
|
32
|
-
<div
|
|
33
|
-
class="SCardHeaderActionCollapse"
|
|
34
|
-
:class="{ collapsed: isCollapsed }"
|
|
35
|
-
ref="el"
|
|
36
|
-
>
|
|
37
|
-
<SButton
|
|
38
|
-
type="text"
|
|
39
|
-
mode="mute"
|
|
40
|
-
size="small"
|
|
41
|
-
:icon="icon"
|
|
42
|
-
:disabled="disabled"
|
|
43
|
-
:tooltip="tooltip"
|
|
44
|
-
@click="toggleCollapse"
|
|
45
|
-
/>
|
|
46
|
-
</div>
|
|
47
|
-
</template>
|