@sigmaott/base-library-next 2.2.5 → 2.2.7
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/.npmrc +3 -0
- package/locales/en.yaml +289 -289
- package/locales/vi.yaml +294 -294
- package/nuxt.config.ts +18 -18
- package/package.json +32 -33
- package/public/routes.json +33 -33
- package/src/api/axios.ts +3 -3
- package/src/api/index.ts +86 -86
- package/src/api-client-library/.openapi-generator/FILES +20 -20
- package/src/api-client-library/.openapi-generator-ignore +23 -23
- package/src/api-client-library/api/health-api.ts +119 -119
- package/src/api-client-library/api/presets-api.ts +599 -599
- package/src/api-client-library/api/profiles-api.ts +676 -676
- package/src/api-client-library/api.ts +20 -20
- package/src/api-client-library/base.ts +72 -72
- package/src/api-client-library/common.ts +150 -150
- package/src/api-client-library/configuration.ts +101 -101
- package/src/api-client-library/git_push.sh +57 -57
- package/src/api-client-library/index.ts +18 -18
- package/src/api-client-library/models/create-preset-dto.ts +223 -223
- package/src/api-client-library/models/create-profile-dto.ts +45 -45
- package/src/api-client-library/models/health-controller-get-health200-response-info-value.ts +32 -32
- package/src/api-client-library/models/health-controller-get-health200-response.ts +51 -51
- package/src/api-client-library/models/health-controller-get-health503-response.ts +51 -51
- package/src/api-client-library/models/index.ts +7 -7
- package/src/api-client-library/models/update-preset-dto.ts +223 -223
- package/src/api-client-library/models/update-profile-dto.ts +45 -45
- package/src/components/MediaSelection.vue +40 -40
- package/src/components/PresetModify.vue +154 -154
- package/src/components/PresetTable.vue +114 -114
- package/src/components/ProfileAllList.vue +137 -137
- package/src/components/ProfileFormModal.vue +79 -79
- package/src/components/ProfileModify.vue +152 -152
- package/src/components/ProfileTable.vue +68 -68
- package/src/components/WatermarkDraggableItem.vue +88 -88
- package/src/components/channel/ConfigWatermarkItem.vue +239 -239
- package/src/components/channel/WatermarkPreview.vue +19 -19
- package/src/components/common/Vue3DraggableResizable/Container.vue +71 -71
- package/src/components/common/Vue3DraggableResizable/index.vue +1327 -1327
- package/src/components/common/Vue3DraggableResizable/utils/dom.js +63 -63
- package/src/components/common/Vue3DraggableResizable/utils/fns.js +37 -37
- package/src/components/common/VueDraggableResizable/dom.js +63 -63
- package/src/components/common/VueDraggableResizable/fns.js +37 -37
- package/src/components/common/VueDraggableResizable/index.vue +958 -958
- package/src/components/preset/ConfigItem.vue +956 -956
- package/src/components/profile/ConfigItem.vue +765 -765
- package/src/components/profile/TableColumns.vue +137 -137
- package/src/components/shared/AudioInfoViewer.vue +101 -101
- package/src/components/shared/MediaInfoViewer.vue +249 -249
- package/src/components/shared/MediaInfoViewerSmall.vue +111 -105
- package/src/components/shared/PopoverProfile.vue +17 -17
- package/src/components/shared/VideoInfoViewer.vue +136 -136
- package/src/components/shared/fileSizeFilter.ts +26 -26
- package/src/composables/preset.ts +141 -141
- package/src/public/build-time.json +1 -1
- package/src/public/favicon.svg +15 -15
- package/src/public/logo.svg +9 -9
- package/src/public/routes.json +86 -86
- package/src/utils/common.ts +175 -175
- package/src/utils/config.ts +19 -19
- package/src/utils/preset.ts +353 -353
- package/src/utils/profile.ts +30 -30
- package/tsconfig.json +3 -3
|
@@ -1,63 +1,63 @@
|
|
|
1
|
-
import { isFunction } from './fns'
|
|
2
|
-
|
|
3
|
-
export function matchesSelectorToParentElements(el, selector, baseNode) {
|
|
4
|
-
let node = el
|
|
5
|
-
|
|
6
|
-
const matchesSelectorFunc = [
|
|
7
|
-
'matches',
|
|
8
|
-
'webkitMatchesSelector',
|
|
9
|
-
'mozMatchesSelector',
|
|
10
|
-
'msMatchesSelector',
|
|
11
|
-
'oMatchesSelector',
|
|
12
|
-
].find(func => isFunction(node[func]))
|
|
13
|
-
|
|
14
|
-
if (!isFunction(node[matchesSelectorFunc]))
|
|
15
|
-
return false
|
|
16
|
-
|
|
17
|
-
do {
|
|
18
|
-
if (node[matchesSelectorFunc](selector))
|
|
19
|
-
return true
|
|
20
|
-
if (node === baseNode)
|
|
21
|
-
return false
|
|
22
|
-
node = node.parentNode
|
|
23
|
-
} while (node)
|
|
24
|
-
|
|
25
|
-
return false
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export function getComputedSize($el) {
|
|
29
|
-
const style = window.getComputedStyle($el)
|
|
30
|
-
|
|
31
|
-
return [
|
|
32
|
-
parseFloat(style.getPropertyValue('width'), 10),
|
|
33
|
-
parseFloat(style.getPropertyValue('height'), 10),
|
|
34
|
-
]
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export function addEvent(el, event, handler) {
|
|
38
|
-
if (!el)
|
|
39
|
-
return
|
|
40
|
-
|
|
41
|
-
if (el.attachEvent)
|
|
42
|
-
el.attachEvent(`on${event}`, handler)
|
|
43
|
-
|
|
44
|
-
else if (el.addEventListener)
|
|
45
|
-
el.addEventListener(event, handler, true)
|
|
46
|
-
|
|
47
|
-
else
|
|
48
|
-
el[`on${event}`] = handler
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export function removeEvent(el, event, handler) {
|
|
52
|
-
if (!el)
|
|
53
|
-
return
|
|
54
|
-
|
|
55
|
-
if (el.detachEvent)
|
|
56
|
-
el.detachEvent(`on${event}`, handler)
|
|
57
|
-
|
|
58
|
-
else if (el.removeEventListener)
|
|
59
|
-
el.removeEventListener(event, handler, true)
|
|
60
|
-
|
|
61
|
-
else
|
|
62
|
-
el[`on${event}`] = null
|
|
63
|
-
}
|
|
1
|
+
import { isFunction } from './fns'
|
|
2
|
+
|
|
3
|
+
export function matchesSelectorToParentElements(el, selector, baseNode) {
|
|
4
|
+
let node = el
|
|
5
|
+
|
|
6
|
+
const matchesSelectorFunc = [
|
|
7
|
+
'matches',
|
|
8
|
+
'webkitMatchesSelector',
|
|
9
|
+
'mozMatchesSelector',
|
|
10
|
+
'msMatchesSelector',
|
|
11
|
+
'oMatchesSelector',
|
|
12
|
+
].find(func => isFunction(node[func]))
|
|
13
|
+
|
|
14
|
+
if (!isFunction(node[matchesSelectorFunc]))
|
|
15
|
+
return false
|
|
16
|
+
|
|
17
|
+
do {
|
|
18
|
+
if (node[matchesSelectorFunc](selector))
|
|
19
|
+
return true
|
|
20
|
+
if (node === baseNode)
|
|
21
|
+
return false
|
|
22
|
+
node = node.parentNode
|
|
23
|
+
} while (node)
|
|
24
|
+
|
|
25
|
+
return false
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export function getComputedSize($el) {
|
|
29
|
+
const style = window.getComputedStyle($el)
|
|
30
|
+
|
|
31
|
+
return [
|
|
32
|
+
parseFloat(style.getPropertyValue('width'), 10),
|
|
33
|
+
parseFloat(style.getPropertyValue('height'), 10),
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export function addEvent(el, event, handler) {
|
|
38
|
+
if (!el)
|
|
39
|
+
return
|
|
40
|
+
|
|
41
|
+
if (el.attachEvent)
|
|
42
|
+
el.attachEvent(`on${event}`, handler)
|
|
43
|
+
|
|
44
|
+
else if (el.addEventListener)
|
|
45
|
+
el.addEventListener(event, handler, true)
|
|
46
|
+
|
|
47
|
+
else
|
|
48
|
+
el[`on${event}`] = handler
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function removeEvent(el, event, handler) {
|
|
52
|
+
if (!el)
|
|
53
|
+
return
|
|
54
|
+
|
|
55
|
+
if (el.detachEvent)
|
|
56
|
+
el.detachEvent(`on${event}`, handler)
|
|
57
|
+
|
|
58
|
+
else if (el.removeEventListener)
|
|
59
|
+
el.removeEventListener(event, handler, true)
|
|
60
|
+
|
|
61
|
+
else
|
|
62
|
+
el[`on${event}`] = null
|
|
63
|
+
}
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
export function isFunction(func) {
|
|
2
|
-
return (
|
|
3
|
-
typeof func === 'function'
|
|
4
|
-
|| Object.prototype.toString.call(func) === '[object Function]'
|
|
5
|
-
)
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export function snapToGrid(grid, pendingX, pendingY, scale = 1) {
|
|
9
|
-
const [scaleX, scaleY] = typeof scale === 'number' ? [scale, scale] : scale
|
|
10
|
-
const x = Math.round(pendingX / scaleX / grid[0]) * grid[0]
|
|
11
|
-
const y = Math.round(pendingY / scaleY / grid[1]) * grid[1]
|
|
12
|
-
return [x, y]
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export function getSize(el) {
|
|
16
|
-
const rect = el.getBoundingClientRect()
|
|
17
|
-
|
|
18
|
-
return [parseInt(rect.width), parseInt(rect.height)]
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export function computeWidth(parentWidth, left, right) {
|
|
22
|
-
return parentWidth - left - right
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export function computeHeight(parentHeight, top, bottom) {
|
|
26
|
-
return parentHeight - top - bottom
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export function restrictToBounds(value, min, max) {
|
|
30
|
-
if (min !== null && value < min)
|
|
31
|
-
return min
|
|
32
|
-
|
|
33
|
-
if (max !== null && max < value)
|
|
34
|
-
return max
|
|
35
|
-
|
|
36
|
-
return value
|
|
37
|
-
}
|
|
1
|
+
export function isFunction(func) {
|
|
2
|
+
return (
|
|
3
|
+
typeof func === 'function'
|
|
4
|
+
|| Object.prototype.toString.call(func) === '[object Function]'
|
|
5
|
+
)
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export function snapToGrid(grid, pendingX, pendingY, scale = 1) {
|
|
9
|
+
const [scaleX, scaleY] = typeof scale === 'number' ? [scale, scale] : scale
|
|
10
|
+
const x = Math.round(pendingX / scaleX / grid[0]) * grid[0]
|
|
11
|
+
const y = Math.round(pendingY / scaleY / grid[1]) * grid[1]
|
|
12
|
+
return [x, y]
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function getSize(el) {
|
|
16
|
+
const rect = el.getBoundingClientRect()
|
|
17
|
+
|
|
18
|
+
return [parseInt(rect.width), parseInt(rect.height)]
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export function computeWidth(parentWidth, left, right) {
|
|
22
|
+
return parentWidth - left - right
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export function computeHeight(parentHeight, top, bottom) {
|
|
26
|
+
return parentHeight - top - bottom
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export function restrictToBounds(value, min, max) {
|
|
30
|
+
if (min !== null && value < min)
|
|
31
|
+
return min
|
|
32
|
+
|
|
33
|
+
if (max !== null && max < value)
|
|
34
|
+
return max
|
|
35
|
+
|
|
36
|
+
return value
|
|
37
|
+
}
|
|
@@ -1,63 +1,63 @@
|
|
|
1
|
-
import { isFunction } from './fns'
|
|
2
|
-
|
|
3
|
-
export function matchesSelectorToParentElements(el, selector, baseNode) {
|
|
4
|
-
let node = el
|
|
5
|
-
|
|
6
|
-
const matchesSelectorFunc = [
|
|
7
|
-
'matches',
|
|
8
|
-
'webkitMatchesSelector',
|
|
9
|
-
'mozMatchesSelector',
|
|
10
|
-
'msMatchesSelector',
|
|
11
|
-
'oMatchesSelector',
|
|
12
|
-
].find(func => isFunction(node[func]))
|
|
13
|
-
|
|
14
|
-
if (!isFunction(node[matchesSelectorFunc]))
|
|
15
|
-
return false
|
|
16
|
-
|
|
17
|
-
do {
|
|
18
|
-
if (node[matchesSelectorFunc](selector))
|
|
19
|
-
return true
|
|
20
|
-
if (node === baseNode)
|
|
21
|
-
return false
|
|
22
|
-
node = node.parentNode
|
|
23
|
-
} while (node)
|
|
24
|
-
|
|
25
|
-
return false
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export function getComputedSize($el) {
|
|
29
|
-
const style = window.getComputedStyle($el)
|
|
30
|
-
|
|
31
|
-
return [
|
|
32
|
-
parseFloat(style.getPropertyValue('width'), 10),
|
|
33
|
-
parseFloat(style.getPropertyValue('height'), 10),
|
|
34
|
-
]
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export function addEvent(el, event, handler) {
|
|
38
|
-
if (!el)
|
|
39
|
-
return
|
|
40
|
-
|
|
41
|
-
if (el.attachEvent)
|
|
42
|
-
el.attachEvent(`on${event}`, handler)
|
|
43
|
-
|
|
44
|
-
else if (el.addEventListener)
|
|
45
|
-
el.addEventListener(event, handler, true)
|
|
46
|
-
|
|
47
|
-
else
|
|
48
|
-
el[`on${event}`] = handler
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export function removeEvent(el, event, handler) {
|
|
52
|
-
if (!el)
|
|
53
|
-
return
|
|
54
|
-
|
|
55
|
-
if (el.detachEvent)
|
|
56
|
-
el.detachEvent(`on${event}`, handler)
|
|
57
|
-
|
|
58
|
-
else if (el.removeEventListener)
|
|
59
|
-
el.removeEventListener(event, handler, true)
|
|
60
|
-
|
|
61
|
-
else
|
|
62
|
-
el[`on${event}`] = null
|
|
63
|
-
}
|
|
1
|
+
import { isFunction } from './fns'
|
|
2
|
+
|
|
3
|
+
export function matchesSelectorToParentElements(el, selector, baseNode) {
|
|
4
|
+
let node = el
|
|
5
|
+
|
|
6
|
+
const matchesSelectorFunc = [
|
|
7
|
+
'matches',
|
|
8
|
+
'webkitMatchesSelector',
|
|
9
|
+
'mozMatchesSelector',
|
|
10
|
+
'msMatchesSelector',
|
|
11
|
+
'oMatchesSelector',
|
|
12
|
+
].find(func => isFunction(node[func]))
|
|
13
|
+
|
|
14
|
+
if (!isFunction(node[matchesSelectorFunc]))
|
|
15
|
+
return false
|
|
16
|
+
|
|
17
|
+
do {
|
|
18
|
+
if (node[matchesSelectorFunc](selector))
|
|
19
|
+
return true
|
|
20
|
+
if (node === baseNode)
|
|
21
|
+
return false
|
|
22
|
+
node = node.parentNode
|
|
23
|
+
} while (node)
|
|
24
|
+
|
|
25
|
+
return false
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export function getComputedSize($el) {
|
|
29
|
+
const style = window.getComputedStyle($el)
|
|
30
|
+
|
|
31
|
+
return [
|
|
32
|
+
parseFloat(style.getPropertyValue('width'), 10),
|
|
33
|
+
parseFloat(style.getPropertyValue('height'), 10),
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export function addEvent(el, event, handler) {
|
|
38
|
+
if (!el)
|
|
39
|
+
return
|
|
40
|
+
|
|
41
|
+
if (el.attachEvent)
|
|
42
|
+
el.attachEvent(`on${event}`, handler)
|
|
43
|
+
|
|
44
|
+
else if (el.addEventListener)
|
|
45
|
+
el.addEventListener(event, handler, true)
|
|
46
|
+
|
|
47
|
+
else
|
|
48
|
+
el[`on${event}`] = handler
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function removeEvent(el, event, handler) {
|
|
52
|
+
if (!el)
|
|
53
|
+
return
|
|
54
|
+
|
|
55
|
+
if (el.detachEvent)
|
|
56
|
+
el.detachEvent(`on${event}`, handler)
|
|
57
|
+
|
|
58
|
+
else if (el.removeEventListener)
|
|
59
|
+
el.removeEventListener(event, handler, true)
|
|
60
|
+
|
|
61
|
+
else
|
|
62
|
+
el[`on${event}`] = null
|
|
63
|
+
}
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
export function isFunction(func) {
|
|
2
|
-
return (typeof func === 'function' || Object.prototype.toString.call(func) === '[object Function]')
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
export function snapToGrid(grid, pendingX, pendingY, scale = 1) {
|
|
6
|
-
const [scaleX, scaleY] = typeof scale === 'number' ? [scale, scale] : scale
|
|
7
|
-
const x = Math.round((pendingX / scaleX) / grid[0]) * grid[0]
|
|
8
|
-
const y = Math.round((pendingY / scaleY) / grid[1]) * grid[1]
|
|
9
|
-
return [x, y]
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export function getSize(el) {
|
|
13
|
-
const rect = el.getBoundingClientRect()
|
|
14
|
-
|
|
15
|
-
return [
|
|
16
|
-
parseInt(rect.width),
|
|
17
|
-
parseInt(rect.height),
|
|
18
|
-
]
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export function computeWidth(parentWidth, left, right) {
|
|
22
|
-
return parentWidth - left - right
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export function computeHeight(parentHeight, top, bottom) {
|
|
26
|
-
return parentHeight - top - bottom
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export function restrictToBounds(value, min, max) {
|
|
30
|
-
if (min !== null && value < min)
|
|
31
|
-
return min
|
|
32
|
-
|
|
33
|
-
if (max !== null && max < value)
|
|
34
|
-
return max
|
|
35
|
-
|
|
36
|
-
return value
|
|
37
|
-
}
|
|
1
|
+
export function isFunction(func) {
|
|
2
|
+
return (typeof func === 'function' || Object.prototype.toString.call(func) === '[object Function]')
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
export function snapToGrid(grid, pendingX, pendingY, scale = 1) {
|
|
6
|
+
const [scaleX, scaleY] = typeof scale === 'number' ? [scale, scale] : scale
|
|
7
|
+
const x = Math.round((pendingX / scaleX) / grid[0]) * grid[0]
|
|
8
|
+
const y = Math.round((pendingY / scaleY) / grid[1]) * grid[1]
|
|
9
|
+
return [x, y]
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export function getSize(el) {
|
|
13
|
+
const rect = el.getBoundingClientRect()
|
|
14
|
+
|
|
15
|
+
return [
|
|
16
|
+
parseInt(rect.width),
|
|
17
|
+
parseInt(rect.height),
|
|
18
|
+
]
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export function computeWidth(parentWidth, left, right) {
|
|
22
|
+
return parentWidth - left - right
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export function computeHeight(parentHeight, top, bottom) {
|
|
26
|
+
return parentHeight - top - bottom
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export function restrictToBounds(value, min, max) {
|
|
30
|
+
if (min !== null && value < min)
|
|
31
|
+
return min
|
|
32
|
+
|
|
33
|
+
if (max !== null && max < value)
|
|
34
|
+
return max
|
|
35
|
+
|
|
36
|
+
return value
|
|
37
|
+
}
|