@maggioli-design-system/mds-table-row 4.4.2 → 4.5.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/dist/cjs/{index-74074cfd.js → index-7b6fb148.js} +22 -14
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/mds-table-row.cjs.entry.js +2 -2
- package/dist/cjs/mds-table-row.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/common/file.js +48 -0
- package/dist/collection/common/icon.js +15 -0
- package/dist/collection/common/unit.js +15 -3
- package/dist/collection/common/yugop/core.js +16 -0
- package/dist/collection/common/yugop/index.js +3 -0
- package/dist/collection/common/yugop/random-text.js +59 -0
- package/dist/collection/common/yugop/utils/math.js +11 -0
- package/dist/collection/common/yugop/utils/noop.js +1 -0
- package/dist/collection/common/yugop/utils/prng.js +21 -0
- package/dist/collection/common/yugop/utils/string.js +2 -0
- package/dist/collection/components/mds-table-row/mds-table-row.css +142 -2
- package/dist/collection/dictionary/file-extensions.js +64 -0
- package/dist/collection/dictionary/icon.js +6 -1
- package/dist/collection/dictionary/text.js +6 -0
- package/dist/collection/dictionary/variant.js +18 -1
- package/dist/collection/fixtures/filenames.js +57 -0
- package/dist/collection/type/file-types.js +1 -0
- package/dist/collection/type/text.js +1 -0
- package/dist/collection/type/variant-file-format.js +111 -0
- package/dist/components/mds-table-row.js +1 -1
- package/dist/documentation.d.ts +1 -21
- package/dist/documentation.json +3 -3
- package/dist/esm/{index-152f5146.js → index-9f40909f.js} +22 -14
- package/dist/esm/loader.js +2 -2
- package/dist/esm/mds-table-row.entry.js +2 -2
- package/dist/esm/mds-table-row.js +3 -3
- package/dist/esm-es5/index-9f40909f.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/mds-table-row.entry.js +1 -1
- package/dist/esm-es5/mds-table-row.js +1 -1
- package/dist/mds-table-row/mds-table-row.esm.js +1 -1
- package/dist/mds-table-row/mds-table-row.js +1 -1
- package/dist/mds-table-row/p-24e0f761.system.js +2 -0
- package/dist/mds-table-row/p-4e5a0559.js +2 -0
- package/dist/mds-table-row/{p-1bbb8bb6.system.js → p-65fbbba9.system.js} +1 -1
- package/dist/mds-table-row/p-ab9fb13e.entry.js +1 -0
- package/dist/mds-table-row/p-f8b0aa6b.system.entry.js +1 -0
- package/dist/stats.json +77 -35
- package/dist/types/common/file.d.ts +12 -0
- package/dist/types/common/icon.d.ts +5 -0
- package/dist/types/common/unit.d.ts +2 -1
- package/dist/types/common/yugop/core.d.ts +10 -0
- package/dist/types/common/yugop/index.d.ts +1 -0
- package/dist/types/common/yugop/random-text.d.ts +31 -0
- package/dist/types/common/yugop/utils/math.d.ts +3 -0
- package/dist/types/common/yugop/utils/noop.d.ts +1 -0
- package/dist/types/common/yugop/utils/prng.d.ts +8 -0
- package/dist/types/common/yugop/utils/string.d.ts +1 -0
- package/dist/types/dictionary/file-extensions.d.ts +11 -0
- package/dist/types/dictionary/icon.d.ts +2 -1
- package/dist/types/dictionary/text.d.ts +2 -0
- package/dist/types/dictionary/variant.d.ts +2 -1
- package/dist/types/fixtures/filenames.d.ts +2 -0
- package/dist/types/type/file-types.d.ts +1 -0
- package/dist/types/type/text.d.ts +1 -0
- package/dist/types/type/variant-file-format.d.ts +11 -0
- package/dist/types/type/variant.d.ts +1 -0
- package/documentation.json +47 -12
- package/package.json +4 -4
- package/src/common/file.ts +63 -0
- package/src/common/icon.ts +25 -0
- package/src/common/unit.ts +21 -2
- package/src/common/yugop/core.ts +47 -0
- package/src/common/yugop/index.ts +4 -0
- package/src/common/yugop/random-text.ts +95 -0
- package/src/common/yugop/utils/math.ts +21 -0
- package/src/common/yugop/utils/noop.ts +1 -0
- package/src/common/yugop/utils/prng.ts +35 -0
- package/src/common/yugop/utils/string.ts +4 -0
- package/src/dictionary/file-extensions.ts +81 -0
- package/src/dictionary/icon.ts +6 -0
- package/src/dictionary/text.ts +9 -0
- package/src/dictionary/variant.ts +19 -0
- package/src/fixtures/filenames.ts +60 -0
- package/src/fixtures/icons.json +10 -0
- package/src/fixtures/iconsauce.json +3 -0
- package/src/type/file-types.ts +55 -0
- package/src/type/text.ts +4 -0
- package/src/type/variant-file-format.ts +128 -0
- package/src/type/variant.ts +17 -0
- package/www/build/mds-table-row.esm.js +1 -1
- package/www/build/mds-table-row.js +1 -1
- package/www/build/p-24e0f761.system.js +2 -0
- package/www/build/p-4e5a0559.js +2 -0
- package/www/build/{p-1bbb8bb6.system.js → p-65fbbba9.system.js} +1 -1
- package/www/build/p-ab9fb13e.entry.js +1 -0
- package/www/build/p-f8b0aa6b.system.entry.js +1 -0
- package/dist/esm-es5/index-152f5146.js +0 -1
- package/dist/mds-table-row/p-0461a91a.system.entry.js +0 -1
- package/dist/mds-table-row/p-6d1e82c7.system.js +0 -2
- package/dist/mds-table-row/p-8b036a2e.entry.js +0 -1
- package/dist/mds-table-row/p-ccb2cba7.js +0 -2
- package/www/build/p-0461a91a.system.entry.js +0 -1
- package/www/build/p-6d1e82c7.system.js +0 -2
- package/www/build/p-8b036a2e.entry.js +0 -1
- package/www/build/p-ccb2cba7.js +0 -2
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
const BASE64_SVG_ICON = 'data:image/svg+xml;base64,'
|
|
2
|
+
const MARKUP_SVG_ICON = '<svg '
|
|
3
|
+
|
|
4
|
+
const isIconFormatIsBase64 = (icon?: string): boolean => {
|
|
5
|
+
if (!icon) {
|
|
6
|
+
return false
|
|
7
|
+
}
|
|
8
|
+
return icon.startsWith(BASE64_SVG_ICON)
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const isIconFormatIsSVG = (icon?: string): boolean => {
|
|
12
|
+
if (!icon) {
|
|
13
|
+
return false
|
|
14
|
+
}
|
|
15
|
+
return icon.startsWith(MARKUP_SVG_ICON)
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
export {
|
|
21
|
+
isIconFormatIsBase64,
|
|
22
|
+
isIconFormatIsSVG,
|
|
23
|
+
BASE64_SVG_ICON,
|
|
24
|
+
MARKUP_SVG_ICON,
|
|
25
|
+
}
|
package/src/common/unit.ts
CHANGED
|
@@ -1,14 +1,33 @@
|
|
|
1
1
|
const cssDurationToMilliseconds = (duration: string, defaultValue = 1000): number => {
|
|
2
|
+
|
|
3
|
+
if (duration.includes('ms')) {
|
|
4
|
+
return Number(duration.replace('ms', ''))
|
|
5
|
+
}
|
|
6
|
+
|
|
2
7
|
if (duration.includes('s')) {
|
|
3
8
|
return Number(duration.replace('s', '')) * 1000
|
|
4
9
|
}
|
|
5
10
|
|
|
6
|
-
|
|
7
|
-
|
|
11
|
+
return defaultValue
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const cssSizeToNumber = (size: string, defaultValue = 0): number => {
|
|
15
|
+
if (size.includes('px')) {
|
|
16
|
+
return Number(size.replace('px', ''))
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
if (size.includes('rem')) {
|
|
20
|
+
return Number(size.replace('rem', '')) * 16
|
|
8
21
|
}
|
|
9
22
|
|
|
23
|
+
if (size.includes('em')) {
|
|
24
|
+
return Number(size.replace('em', '')) * 16
|
|
25
|
+
}
|
|
26
|
+
|
|
10
27
|
return defaultValue
|
|
11
28
|
}
|
|
29
|
+
|
|
12
30
|
export {
|
|
13
31
|
cssDurationToMilliseconds,
|
|
32
|
+
cssSizeToNumber,
|
|
14
33
|
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { generator } from './utils/prng'
|
|
2
|
+
import { strToCharCodeArray } from './utils/string'
|
|
3
|
+
import { randomSign, minMaxLooped } from './utils/math'
|
|
4
|
+
const rand = generator()
|
|
5
|
+
|
|
6
|
+
const random: (arg0: number, arg1: number) => () => number = (
|
|
7
|
+
base,
|
|
8
|
+
offset,
|
|
9
|
+
) => () => (base + rand.range(0, offset)) * randomSign()
|
|
10
|
+
|
|
11
|
+
export const generateRandomCharCodeArray: (
|
|
12
|
+
arg0: number,
|
|
13
|
+
arg1: number
|
|
14
|
+
) => (arg0: string) => number[] = (base, offset) => str =>
|
|
15
|
+
strToCharCodeArray(str).map(random(base, offset))
|
|
16
|
+
type Options = {
|
|
17
|
+
str: string
|
|
18
|
+
minCharCode: number
|
|
19
|
+
maxCharCode: number
|
|
20
|
+
placeholderChar: string
|
|
21
|
+
charStep: number
|
|
22
|
+
}
|
|
23
|
+
export const charCodeArrayToString: (
|
|
24
|
+
arg0: Options
|
|
25
|
+
) => (arg0: number[]) => string = ({
|
|
26
|
+
str,
|
|
27
|
+
minCharCode,
|
|
28
|
+
maxCharCode,
|
|
29
|
+
placeholderChar,
|
|
30
|
+
charStep,
|
|
31
|
+
}) => charCodes =>
|
|
32
|
+
charCodes.reduce((acc, item, index) => {
|
|
33
|
+
if (item !== 0) {
|
|
34
|
+
if (Math.abs(item) > charStep) {
|
|
35
|
+
return acc + placeholderChar
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
return (
|
|
39
|
+
acc +
|
|
40
|
+
String.fromCharCode(
|
|
41
|
+
minMaxLooped(minCharCode, maxCharCode)(str.charCodeAt(index) + item),
|
|
42
|
+
)
|
|
43
|
+
)
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
return acc + str.charAt(index)
|
|
47
|
+
}, '')
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { generateRandomCharCodeArray, charCodeArrayToString } from './core'
|
|
2
|
+
import { noop } from './utils/noop'
|
|
3
|
+
|
|
4
|
+
type Options = {
|
|
5
|
+
str: string
|
|
6
|
+
speed?: number
|
|
7
|
+
placeholderChar?: string
|
|
8
|
+
frameOffset?: number
|
|
9
|
+
charOffset?: number
|
|
10
|
+
charStep?: number
|
|
11
|
+
minCharCode?: number
|
|
12
|
+
maxCharCode?: number
|
|
13
|
+
onProgress?: (arg0: string) => void
|
|
14
|
+
onComplete?: (arg0: string) => void
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
class RandomText {
|
|
18
|
+
static defaults: Options = {
|
|
19
|
+
str: '',
|
|
20
|
+
speed: 2,
|
|
21
|
+
placeholderChar: '_',
|
|
22
|
+
frameOffset: 30,
|
|
23
|
+
charOffset: 20,
|
|
24
|
+
charStep: 10,
|
|
25
|
+
minCharCode: 32,
|
|
26
|
+
maxCharCode: 122,
|
|
27
|
+
onProgress: noop,
|
|
28
|
+
onComplete: noop,
|
|
29
|
+
}
|
|
30
|
+
str: string
|
|
31
|
+
speed: number
|
|
32
|
+
placeholderChar: string
|
|
33
|
+
frameOffset: number
|
|
34
|
+
charOffset: number
|
|
35
|
+
charStep: number
|
|
36
|
+
minCharCode: number
|
|
37
|
+
maxCharCode: number
|
|
38
|
+
onProgress: (...args: Array<string>) => string
|
|
39
|
+
onComplete: (...args: Array<string>) => string
|
|
40
|
+
rafId: number // TODO: should be #rafId for private
|
|
41
|
+
|
|
42
|
+
constructor (options: Options) {
|
|
43
|
+
Object.assign(this, { ...RandomText.defaults, ...options })
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
start = (): void => {
|
|
47
|
+
const { frameOffset, charOffset, str, speed } = this
|
|
48
|
+
const randoms = generateRandomCharCodeArray(frameOffset, charOffset)(str)
|
|
49
|
+
this.stop()
|
|
50
|
+
this.rafId = requestAnimationFrame(() => {
|
|
51
|
+
this.step(randoms, speed, speed)
|
|
52
|
+
})
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
stop (): void {
|
|
56
|
+
cancelAnimationFrame(this.rafId)
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
step (randoms: number[], stepCount: number, speed: number): void {
|
|
60
|
+
const {
|
|
61
|
+
str,
|
|
62
|
+
charStep,
|
|
63
|
+
minCharCode,
|
|
64
|
+
maxCharCode,
|
|
65
|
+
placeholderChar,
|
|
66
|
+
onProgress,
|
|
67
|
+
onComplete,
|
|
68
|
+
} = this
|
|
69
|
+
const stepArray = randoms.slice(0, stepCount)
|
|
70
|
+
const steppedArray = stepArray.map(item => {
|
|
71
|
+
if (item > 0) return item - 1
|
|
72
|
+
if (item < 0) return item + 1
|
|
73
|
+
return 0
|
|
74
|
+
})
|
|
75
|
+
const output = charCodeArrayToString({
|
|
76
|
+
str,
|
|
77
|
+
minCharCode,
|
|
78
|
+
maxCharCode,
|
|
79
|
+
placeholderChar,
|
|
80
|
+
charStep,
|
|
81
|
+
})(steppedArray)
|
|
82
|
+
const updatedRandoms = [...steppedArray, ...randoms.slice(stepCount)]
|
|
83
|
+
onProgress(output)
|
|
84
|
+
|
|
85
|
+
if (output !== str) {
|
|
86
|
+
this.rafId = requestAnimationFrame(() => {
|
|
87
|
+
this.step(updatedRandoms, stepCount + speed, speed)
|
|
88
|
+
})
|
|
89
|
+
} else {
|
|
90
|
+
onComplete(output)
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export default RandomText
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { generator } from './prng'
|
|
2
|
+
|
|
3
|
+
const rand = generator()
|
|
4
|
+
export const randomSign: () => number = () =>
|
|
5
|
+
(Math.round(Math.random()) - 0.5) * 2
|
|
6
|
+
export const generateRandomNumbers: (
|
|
7
|
+
arg0: number
|
|
8
|
+
) => (
|
|
9
|
+
arg0: number
|
|
10
|
+
) => (arg0: number) => number[] = base => charOffset => length =>
|
|
11
|
+
[...Array(length)].map(
|
|
12
|
+
() => (base + rand.range(0, charOffset)) * randomSign(),
|
|
13
|
+
)
|
|
14
|
+
export const minMaxLooped: (
|
|
15
|
+
arg0: number,
|
|
16
|
+
arg1: number
|
|
17
|
+
) => (arg0: number) => number = (min, max) => value => {
|
|
18
|
+
if (value > max) return min + (value - max)
|
|
19
|
+
if (value < min) return max + (value - min)
|
|
20
|
+
return value
|
|
21
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const noop: (...rest: unknown[]) => unknown = () => {}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
const int32 = 2147483647
|
|
2
|
+
|
|
3
|
+
const gen: (arg0: number) => number = v => (v * 16807) % int32
|
|
4
|
+
|
|
5
|
+
const randomFloat: (arg0: number) => number = v => gen(v) / int32
|
|
6
|
+
|
|
7
|
+
const randomInt: (arg0: number) => number = v => gen(v)
|
|
8
|
+
|
|
9
|
+
type Generator = (
|
|
10
|
+
_?: number
|
|
11
|
+
) => {
|
|
12
|
+
random: () => number
|
|
13
|
+
randomFloat: () => number
|
|
14
|
+
range: (min: number, max: number) => number
|
|
15
|
+
rangeFloat: (min: number, max: number) => number
|
|
16
|
+
}
|
|
17
|
+
export const generator: Generator = (seed = 1) => {
|
|
18
|
+
let value = seed < 1 ? 1 : seed
|
|
19
|
+
|
|
20
|
+
const next: () => number = () => {
|
|
21
|
+
value = randomInt(value)
|
|
22
|
+
return value
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
return {
|
|
26
|
+
random: () => next(),
|
|
27
|
+
randomFloat: () => randomFloat(next()),
|
|
28
|
+
range: (min, max) => {
|
|
29
|
+
const minimum = min - 0.4999
|
|
30
|
+
const maximum = max + 0.4999
|
|
31
|
+
return Math.round(minimum + (maximum - minimum) * randomFloat(next()))
|
|
32
|
+
},
|
|
33
|
+
rangeFloat: (min, max) => min + (max - min) * randomFloat(next()),
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
interface FileExtenstion {
|
|
2
|
+
[key: string]: ExtensionInfo
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
interface ExtensionInfo {
|
|
6
|
+
preview?: boolean
|
|
7
|
+
format: string
|
|
8
|
+
description: string
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const fileExtensionsDictionary: FileExtenstion = {
|
|
12
|
+
'7z': { format: 'archive', description: 'Archivio compresso' },
|
|
13
|
+
ace: { format: 'archive', description: 'Archivio compresso' },
|
|
14
|
+
ai: { format: 'vector', description: 'Vettoriale Adobe Illustrator' },
|
|
15
|
+
dart: { format: 'code', description: 'Dart' },
|
|
16
|
+
db: { format: 'data', description: 'File di database' },
|
|
17
|
+
default: { format: 'attachment', description: 'Formato sconosciuto' },
|
|
18
|
+
dmg: { format: 'executable', description: 'Apple Disk Image' },
|
|
19
|
+
doc: { format: 'text', description: 'Documento Microsoft Word' },
|
|
20
|
+
docm: { format: 'text', description: 'Documento Microsoft Word' },
|
|
21
|
+
docx: { format: 'text', description: 'Documento Microsoft Word Compresso' },
|
|
22
|
+
eml: { format: 'email', description: 'E-mail di posta elettronica' },
|
|
23
|
+
eps: { format: 'vector', description: 'Vettoriale Corel Draw' },
|
|
24
|
+
exe: { format: 'executable', description: 'File eseguibile Windows' },
|
|
25
|
+
flac: { format: 'audio', description: 'Audio non compresso' },
|
|
26
|
+
gif: { format: 'image', description: 'Immagine compressa', preview: true },
|
|
27
|
+
htm: { format: 'markup', description: 'Pagina web' },
|
|
28
|
+
heic: { format: 'image', description: 'High Efficiency Image File Format' },
|
|
29
|
+
html: { format: 'markup', description: 'Pagina web' },
|
|
30
|
+
jpe: { format: 'image', description: 'Immagine compressa', preview: true },
|
|
31
|
+
jpeg: { format: 'image', description: 'Immagine compressa', preview: true },
|
|
32
|
+
jpg: { format: 'image', description: 'Immagine compressa', preview: true },
|
|
33
|
+
js: { format: 'code', description: 'JavaScript' },
|
|
34
|
+
json: { format: 'data', description: 'JavaScript Object Notation' },
|
|
35
|
+
jsx: { format: 'code', description: 'JavaScript' },
|
|
36
|
+
m2v: { format: 'video', description: 'Filmato SD' },
|
|
37
|
+
mp2: { format: 'audio', description: 'Audio compresso' },
|
|
38
|
+
mp3: { format: 'audio', description: 'Audio compresso' },
|
|
39
|
+
mp4: { format: 'video', description: 'Filmato HD' },
|
|
40
|
+
mp4v: { format: 'video', description: 'Filmato HD' },
|
|
41
|
+
mpeg: { format: 'video', description: 'Filmato SD' },
|
|
42
|
+
mpg4: { format: 'video', description: 'Filmato SD' },
|
|
43
|
+
mpg: { format: 'video', description: 'Filmato SD' },
|
|
44
|
+
mpga: { format: 'audio', description: 'Audio compresso' },
|
|
45
|
+
odp: { format: 'slide', description: 'Slide di presentazione LibreOffice' },
|
|
46
|
+
ods: { format: 'spreadsheet', description: 'Foglio di calcolo LibreOffice' },
|
|
47
|
+
odt: { format: 'text', description: 'File di testo LibreOffice' },
|
|
48
|
+
pdf: { format: 'document', description: 'Documento Adobe' },
|
|
49
|
+
php: { format: 'code', description: 'Hypertext Preprocessor' },
|
|
50
|
+
png: { format: 'image', description: 'Immagine Portable Network Graphics', preview: true },
|
|
51
|
+
ppt: { format: 'slide', description: 'Slide di presentazione PowerPoint' },
|
|
52
|
+
rar: { format: 'archive', description: 'Archivio compresso' },
|
|
53
|
+
rtf: { format: 'text', description: 'Documento di testo Rich Text Format' },
|
|
54
|
+
sass: { format: 'code', description: 'Syntactically Awesome StyleSheets' },
|
|
55
|
+
shtml: { format: 'markup', description: 'Pagina web' },
|
|
56
|
+
svg: { format: 'vector', description: 'Scalable Vector Graphics', preview: true },
|
|
57
|
+
tar: { format: 'archive', description: 'Archivio non compresso' },
|
|
58
|
+
tiff: { format: 'image', description: 'Tag Image File Format' },
|
|
59
|
+
ts: { format: 'code', description: 'TypeScript' },
|
|
60
|
+
tsx: { format: 'code', description: 'TypeScript Extended Syntax' },
|
|
61
|
+
txt: { format: 'text', description: 'Documento di testo non formattato' },
|
|
62
|
+
wav: { format: 'audio', description: 'Audio non compresso' },
|
|
63
|
+
webp: { format: 'image', description: 'Immagine Web Picture', preview: true },
|
|
64
|
+
xar: { format: 'archive', description: 'Archivio compresso' },
|
|
65
|
+
xls: { format: 'spreadsheet', description: 'Foglio di calcolo Office' },
|
|
66
|
+
xlsx: { format: 'spreadsheet', description: 'Foglio di calcolo Office' },
|
|
67
|
+
zip: { format: 'archive', description: 'Archivio compresso' },
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
const genericMimeToExt: Map<string, string[]> = new Map([
|
|
71
|
+
['image', ['.png', '.jpg', '.jpeg', '.tiff', '.webp', '.jpe', '.gif', '.heic']],
|
|
72
|
+
['audio', ['.mp2', '.mp3', '.mpga', '.wav', '.flac']],
|
|
73
|
+
['video', ['.mv2', '.mp4', '.mp4v', '.mpeg', '.mpg4', '.mpg']],
|
|
74
|
+
])
|
|
75
|
+
|
|
76
|
+
export {
|
|
77
|
+
FileExtenstion,
|
|
78
|
+
ExtensionInfo,
|
|
79
|
+
fileExtensionsDictionary,
|
|
80
|
+
genericMimeToExt,
|
|
81
|
+
}
|
package/src/dictionary/icon.ts
CHANGED
|
@@ -2,8 +2,14 @@ import jsonIconsDictionary from '../fixtures/icons.json'
|
|
|
2
2
|
import jsonMggIconsDictionary from '../fixtures/iconsauce.json'
|
|
3
3
|
const iconsDictionary = jsonIconsDictionary
|
|
4
4
|
const mggIconsDictionary = jsonMggIconsDictionary
|
|
5
|
+
const svgIconsDictionary = [
|
|
6
|
+
`${location.origin}/svg/mi/baseline/email.svg`,
|
|
7
|
+
'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgLTk2MCA5NjAgOTYwIiB3aWR0aD0iMjQiPjxwYXRoIGQ9Im0yMzMtODAgNjUtMjgxTDgwLTU1MGwyODgtMjUgMTEyLTI2NSAxMTIgMjY1IDI4OCAyNS0yMTggMTg5IDY1IDI4MS0yNDctMTQ5TDIzMy04MFoiLz48L3N2Zz4=',
|
|
8
|
+
'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M12 5V1L7 6l5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6s-6-2.69-6-6H4c0 4.42 3.58 8 8 8s8-3.58 8-8s-3.58-8-8-8z"/></svg>',
|
|
9
|
+
]
|
|
5
10
|
|
|
6
11
|
export {
|
|
7
12
|
iconsDictionary,
|
|
8
13
|
mggIconsDictionary,
|
|
14
|
+
svgIconsDictionary,
|
|
9
15
|
}
|
|
@@ -39,6 +39,24 @@ const themeFullVariantDictionary = [
|
|
|
39
39
|
'yellow',
|
|
40
40
|
]
|
|
41
41
|
|
|
42
|
+
const themeFullVariantAvatarDictionary = [
|
|
43
|
+
'amaranth',
|
|
44
|
+
'aqua',
|
|
45
|
+
'blue',
|
|
46
|
+
'error',
|
|
47
|
+
'green',
|
|
48
|
+
'info',
|
|
49
|
+
'lime',
|
|
50
|
+
'orange',
|
|
51
|
+
'orchid',
|
|
52
|
+
'primary',
|
|
53
|
+
'sky',
|
|
54
|
+
'success',
|
|
55
|
+
'violet',
|
|
56
|
+
'warning',
|
|
57
|
+
'yellow',
|
|
58
|
+
]
|
|
59
|
+
|
|
42
60
|
const themeLabelVariantDictionary = [
|
|
43
61
|
'amaranth',
|
|
44
62
|
'aqua',
|
|
@@ -80,6 +98,7 @@ const toneMinimalVariantDictionary = [
|
|
|
80
98
|
]
|
|
81
99
|
|
|
82
100
|
export {
|
|
101
|
+
themeFullVariantAvatarDictionary,
|
|
83
102
|
themeFullVariantDictionary,
|
|
84
103
|
themeLabelVariantDictionary,
|
|
85
104
|
themeLuminanceVariantDictionary,
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
const filesList = [
|
|
2
|
+
'alarm_circuit_plastic.eps',
|
|
3
|
+
'awesome_orchestration.png',
|
|
4
|
+
'b2c_tan_sports.svg',
|
|
5
|
+
'bedfordshire_iceland_identity.txt',
|
|
6
|
+
'books_monetize_arizona.htm',
|
|
7
|
+
'brand.shtml',
|
|
8
|
+
'brunei_logistical.eml',
|
|
9
|
+
'buckinghamshire_macao.jpg',
|
|
10
|
+
'calculating.json',
|
|
11
|
+
'complexity_deposit.mpg',
|
|
12
|
+
'compressing_black_colorado.ods',
|
|
13
|
+
'connect_local_visualize.pdf',
|
|
14
|
+
'copying.default',
|
|
15
|
+
'explicit.mp2',
|
|
16
|
+
'fish.php',
|
|
17
|
+
'flexibility_auto_money.html',
|
|
18
|
+
'foreground_overriding.ai',
|
|
19
|
+
'forge_face.ts',
|
|
20
|
+
'forges.doc',
|
|
21
|
+
'frozen_haptic.7z',
|
|
22
|
+
'gorgeous_manager_savings.ppt',
|
|
23
|
+
'graphic_frozen_bedfordshire.tar',
|
|
24
|
+
'hdd_navigate_panama.xlsx',
|
|
25
|
+
'https://i2.wp.com/clipart.info/images/ccovers/1495750818Apple-PNG-Clip-Art.png',
|
|
26
|
+
'impactful_alarm_handmade.mpeg',
|
|
27
|
+
'initiatives_group.gif',
|
|
28
|
+
'intelligent_radical.jpe',
|
|
29
|
+
'interface_bedfordshire_solid.m2v',
|
|
30
|
+
'iowa_installation.jpeg',
|
|
31
|
+
'liaison_panel_central.flac',
|
|
32
|
+
'matrix_black_hat.db',
|
|
33
|
+
'metrics_lempira_account.xls',
|
|
34
|
+
'monitor.js',
|
|
35
|
+
'nebraska.mp4',
|
|
36
|
+
'needs_based_solid.odp',
|
|
37
|
+
'officer_somalia.docm',
|
|
38
|
+
'open_source.webp',
|
|
39
|
+
'open_source_gorgeous.sass',
|
|
40
|
+
'optimization_radical.mp3',
|
|
41
|
+
'ports_copy_granite.mpga',
|
|
42
|
+
'pound.rtf',
|
|
43
|
+
'protocol_designer.dmg',
|
|
44
|
+
'reduced_regional_greenland.mp4v',
|
|
45
|
+
'revolutionize.mpg4',
|
|
46
|
+
'rss_systematic_avon.exe',
|
|
47
|
+
'salad_compressing.odt',
|
|
48
|
+
'sky_marketing.ace',
|
|
49
|
+
'synergistic.wav',
|
|
50
|
+
'this_is_an_extensionless_file',
|
|
51
|
+
'tuna_table_fall.zip',
|
|
52
|
+
'unbranded.rar',
|
|
53
|
+
'upgradable_gold.docx',
|
|
54
|
+
'wisconsin_bypassing_small.xar',
|
|
55
|
+
'wooden.jsx',
|
|
56
|
+
]
|
|
57
|
+
|
|
58
|
+
export {
|
|
59
|
+
filesList,
|
|
60
|
+
}
|
package/src/fixtures/icons.json
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
"mdi/delete",
|
|
7
7
|
"mdi/dots-vertical",
|
|
8
8
|
"mdi/email",
|
|
9
|
+
"mdi/file-document-remove-outline",
|
|
9
10
|
"mdi/harddisk",
|
|
10
11
|
"mdi/map-marker",
|
|
11
12
|
"mdi/replay",
|
|
@@ -21,6 +22,7 @@
|
|
|
21
22
|
"mgg/action-show-right-side",
|
|
22
23
|
"mgg/action-show-sidebar-left",
|
|
23
24
|
"mgg/action-show-sidebar-right",
|
|
25
|
+
"mgg/activation-key",
|
|
24
26
|
"mgg/activity-list",
|
|
25
27
|
"mgg/add-document-settings",
|
|
26
28
|
"mgg/additional-contents",
|
|
@@ -227,6 +229,7 @@
|
|
|
227
229
|
"mgg/todo-running-completed",
|
|
228
230
|
"mgg/todo-suspended",
|
|
229
231
|
"mgg/touchpoint-laptop-info",
|
|
232
|
+
"mgg/touchpoint-laptop-search",
|
|
230
233
|
"mgg/traffic-cone",
|
|
231
234
|
"mgg/trending-down",
|
|
232
235
|
"mgg/tribute",
|
|
@@ -239,20 +242,24 @@
|
|
|
239
242
|
"mgg/user-signed-out",
|
|
240
243
|
"mgg/view-chart-gantt",
|
|
241
244
|
"mgg/view-side-by-side",
|
|
245
|
+
"mgg/warning-superscript",
|
|
242
246
|
"mgg/work-book",
|
|
243
247
|
"mi/baseline/account-balance",
|
|
244
248
|
"mi/baseline/account-balance-wallet",
|
|
245
249
|
"mi/baseline/add",
|
|
250
|
+
"mi/baseline/add-circle",
|
|
246
251
|
"mi/baseline/adobe",
|
|
247
252
|
"mi/baseline/agriculture",
|
|
248
253
|
"mi/baseline/arrow-back",
|
|
249
254
|
"mi/baseline/arrow-forward",
|
|
250
255
|
"mi/baseline/attach-file",
|
|
256
|
+
"mi/baseline/attachment",
|
|
251
257
|
"mi/baseline/audiotrack",
|
|
252
258
|
"mi/baseline/badge",
|
|
253
259
|
"mi/baseline/book",
|
|
254
260
|
"mi/baseline/border-all",
|
|
255
261
|
"mi/baseline/cancel",
|
|
262
|
+
"mi/baseline/category",
|
|
256
263
|
"mi/baseline/check-box",
|
|
257
264
|
"mi/baseline/check-box-outline-blank",
|
|
258
265
|
"mi/baseline/check-circle",
|
|
@@ -265,6 +272,7 @@
|
|
|
265
272
|
"mi/baseline/email",
|
|
266
273
|
"mi/baseline/error",
|
|
267
274
|
"mi/baseline/explore",
|
|
275
|
+
"mi/baseline/file-download-done",
|
|
268
276
|
"mi/baseline/folder-zip",
|
|
269
277
|
"mi/baseline/groups",
|
|
270
278
|
"mi/baseline/horizontal-rule",
|
|
@@ -284,6 +292,7 @@
|
|
|
284
292
|
"mi/baseline/radio-button-checked",
|
|
285
293
|
"mi/baseline/radio-button-unchecked",
|
|
286
294
|
"mi/baseline/remove",
|
|
295
|
+
"mi/baseline/remove-circle",
|
|
287
296
|
"mi/baseline/route",
|
|
288
297
|
"mi/baseline/settings",
|
|
289
298
|
"mi/baseline/terminal",
|
|
@@ -295,6 +304,7 @@
|
|
|
295
304
|
"mi/baseline/web",
|
|
296
305
|
"mi/baseline/wysiwyg",
|
|
297
306
|
"mi/outline/help-outline",
|
|
307
|
+
"mi/outline/schedule",
|
|
298
308
|
"mi/round/arrow-circle-down",
|
|
299
309
|
"mi/round/email",
|
|
300
310
|
"mi/round/groups",
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"mgg/action-show-right-side",
|
|
11
11
|
"mgg/action-show-sidebar-left",
|
|
12
12
|
"mgg/action-show-sidebar-right",
|
|
13
|
+
"mgg/activation-key",
|
|
13
14
|
"mgg/activity-list",
|
|
14
15
|
"mgg/add-document-settings",
|
|
15
16
|
"mgg/additional-contents",
|
|
@@ -216,6 +217,7 @@
|
|
|
216
217
|
"mgg/todo-suspended",
|
|
217
218
|
"mgg/todo",
|
|
218
219
|
"mgg/touchpoint-laptop-info",
|
|
220
|
+
"mgg/touchpoint-laptop-search",
|
|
219
221
|
"mgg/traffic-cone",
|
|
220
222
|
"mgg/trending-down",
|
|
221
223
|
"mgg/tribute",
|
|
@@ -228,5 +230,6 @@
|
|
|
228
230
|
"mgg/user-signed-out",
|
|
229
231
|
"mgg/view-chart-gantt",
|
|
230
232
|
"mgg/view-side-by-side",
|
|
233
|
+
"mgg/warning-superscript",
|
|
231
234
|
"mgg/work-book"
|
|
232
235
|
]
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
export type ExtensionSuffixType =
|
|
2
|
+
| '7z'
|
|
3
|
+
| 'ace'
|
|
4
|
+
| 'ai'
|
|
5
|
+
| 'db'
|
|
6
|
+
| 'default'
|
|
7
|
+
| 'dmg'
|
|
8
|
+
| 'doc'
|
|
9
|
+
| 'docm'
|
|
10
|
+
| 'docx'
|
|
11
|
+
| 'eml'
|
|
12
|
+
| 'eps'
|
|
13
|
+
| 'exe'
|
|
14
|
+
| 'flac'
|
|
15
|
+
| 'gif'
|
|
16
|
+
| 'heic'
|
|
17
|
+
| 'htm'
|
|
18
|
+
| 'html'
|
|
19
|
+
| 'jpe'
|
|
20
|
+
| 'jpeg'
|
|
21
|
+
| 'jpg'
|
|
22
|
+
| 'js'
|
|
23
|
+
| 'json'
|
|
24
|
+
| 'jsx'
|
|
25
|
+
| 'm2v'
|
|
26
|
+
| 'mp2'
|
|
27
|
+
| 'mp3'
|
|
28
|
+
| 'mp4'
|
|
29
|
+
| 'mp4v'
|
|
30
|
+
| 'mpeg'
|
|
31
|
+
| 'mpg'
|
|
32
|
+
| 'mpg4'
|
|
33
|
+
| 'mpga'
|
|
34
|
+
| 'odp'
|
|
35
|
+
| 'ods'
|
|
36
|
+
| 'odt'
|
|
37
|
+
| 'pdf'
|
|
38
|
+
| 'php'
|
|
39
|
+
| 'png'
|
|
40
|
+
| 'ppt'
|
|
41
|
+
| 'rar'
|
|
42
|
+
| 'rtf'
|
|
43
|
+
| 'sass'
|
|
44
|
+
| 'shtml'
|
|
45
|
+
| 'svg'
|
|
46
|
+
| 'tar'
|
|
47
|
+
| 'tiff'
|
|
48
|
+
| 'ts'
|
|
49
|
+
| 'txt'
|
|
50
|
+
| 'wav'
|
|
51
|
+
| 'webp'
|
|
52
|
+
| 'xar'
|
|
53
|
+
| 'xls'
|
|
54
|
+
| 'xlsx'
|
|
55
|
+
| 'zip'
|
package/src/type/text.ts
ADDED