amotify 0.0.59 → 0.0.62
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/@types/_.tsx +5 -5
- package/@types/amot.tsx +11 -11
- package/@types/fn.tsx +14 -1
- package/@types/module.tsx +1 -1
- package/dist/amotify.js +1 -1
- package/dist/amotify.min.css +3 -3
- package/package.json +1 -1
- package/src/@atoms.tsx +3 -3
- package/src/@functions.tsx +11 -11
- package/src/@global.tsx +40 -40
- package/src/@jsminAmotifyExtension/_.tsx +4 -4
- package/src/@jsminAmotifyExtension/fetch.tsx +30 -30
- package/src/@jsminAmotifyExtension/formCollect.tsx +32 -32
- package/src/@jsminAmotifyExtension/spreadSheet.tsx +71 -71
- package/src/@jsminAmotifyExtension/variables.tsx +38 -38
- package/src/@molecules.tsx +6 -6
- package/src/@styles/props.scss +1 -1
- package/src/@styles/var.scss +0 -1
- package/src/@templates.tsx +1 -1
- package/src/@variables.tsx +2 -2
- package/src/atoms/FAI/parts.tsx +105 -105
- package/src/atoms/Logo/parts.tsx +19 -19
- package/src/atoms/Various/parts.tsx +26 -26
- package/src/config.tsx +62 -59
- package/src/functions/Button/_.tsx +49 -49
- package/src/functions/Cropper/parts.tsx +249 -249
- package/src/functions/Effects/Fade.tsx +18 -18
- package/src/functions/Effects/Ripple.tsx +24 -24
- package/src/functions/Effects/_.tsx +5 -5
- package/src/functions/Input/Chips/Selector.tsx +107 -107
- package/src/functions/Input/Chips/_.tsx +66 -66
- package/src/functions/Input/Contenteditable.tsx +18 -18
- package/src/functions/Input/DigitCharacters.tsx +48 -48
- package/src/functions/Input/File/_.tsx +114 -114
- package/src/functions/Input/Hidden.tsx +3 -3
- package/src/functions/Input/List/_.tsx +61 -61
- package/src/functions/Input/RichSelect/_.tsx +38 -38
- package/src/functions/Input/Segmented/_.tsx +30 -30
- package/src/functions/Input/Select/_.tsx +42 -42
- package/src/functions/Input/Slider/_.tsx +93 -93
- package/src/functions/Input/Switch/_.tsx +21 -21
- package/src/functions/Input/Text.tsx +99 -97
- package/src/functions/Input/TextArea.tsx +17 -17
- package/src/functions/Input/Time/Picker.tsx +199 -199
- package/src/functions/Input/Time/_.tsx +173 -173
- package/src/functions/Input/_.tsx +135 -135
- package/src/functions/Input/core.tsx +96 -96
- package/src/functions/Inputs/_.tsx +1 -1
- package/src/functions/Inputs/text.tsx +5 -5
- package/src/functions/Layout/PageNotFound.tsx +6 -6
- package/src/functions/Layout/PageRouter.tsx +28 -44
- package/src/functions/Layout/PageViewController/parts.tsx +7 -7
- package/src/functions/Layout/Plate.tsx +5 -5
- package/src/functions/Layout/RootViewController/parts.tsx +94 -71
- package/src/functions/Layout/RootViewController/style.module.scss +0 -1
- package/src/functions/Layout/SwipeView/parts.tsx +90 -90
- package/src/functions/Layout/TabBar.tsx +10 -10
- package/src/functions/Layout/_.tsx +7 -7
- package/src/functions/Loader/corner.tsx +10 -10
- package/src/functions/Loader/mini.tsx +25 -25
- package/src/functions/Loader/parts.tsx +31 -31
- package/src/functions/Loader/top.tsx +10 -10
- package/src/functions/Sheet/parts.tsx +219 -219
- package/src/functions/Sheet/style.module.scss +0 -20
- package/src/functions/SnackBar/parts.tsx +50 -50
- package/src/functions/Table/Data/parts.tsx +202 -202
- package/src/functions/Table/Drag/parts.tsx +76 -76
- package/src/functions/Table/Normal/parts.tsx +23 -23
- package/src/functions/Table/_.tsx +33 -33
- package/src/functions/Tooltips/parts.tsx +7 -7
- package/src/global/LaunchReactApplication.tsx +28 -28
- package/src/global/styleConverter.tsx +133 -133
- package/src/launch.tsx +27 -27
- package/src/molecules/Accordion/parts.tsx +41 -41
- package/src/molecules/LinkifyText/parts.tsx +18 -18
- package/src/molecules/List.tsx +6 -6
- package/src/preload.tsx +5 -45
- package/src/templates/PlayGround/parts.tsx +8 -8
- package/webpack.config.js +9 -9
|
@@ -1,134 +1,134 @@
|
|
|
1
1
|
export { }
|
|
2
|
-
import { publicURI } from '../launch'
|
|
2
|
+
import { publicURI } from '../launch'
|
|
3
3
|
|
|
4
4
|
declare global {
|
|
5
|
-
var ExcelJS: any
|
|
5
|
+
var ExcelJS: any
|
|
6
6
|
}
|
|
7
7
|
{
|
|
8
8
|
const D: JsminExtension.SpreadSheet.Instance = ( wb,fn ) => {
|
|
9
|
-
return new ( D.fn as any ).SpreadSheet( wb,fn )
|
|
9
|
+
return new ( D.fn as any ).SpreadSheet( wb,fn )
|
|
10
10
|
}
|
|
11
11
|
D.fn = D.prototype = {} as any
|
|
12
12
|
$.extend( {
|
|
13
13
|
SpreadSheet: function ( workbook: JsminExtension.SpreadSheet.Method,fileName: string ) {
|
|
14
|
-
this.ok = true
|
|
14
|
+
this.ok = true
|
|
15
15
|
try {
|
|
16
|
-
this.workbook = workbook
|
|
17
|
-
this.fileName = fileName
|
|
16
|
+
this.workbook = workbook
|
|
17
|
+
this.fileName = fileName
|
|
18
18
|
} catch ( error ) {
|
|
19
|
-
console.log( error )
|
|
20
|
-
this.ok = false
|
|
19
|
+
console.log( error )
|
|
20
|
+
this.ok = false
|
|
21
21
|
}
|
|
22
|
-
return this
|
|
22
|
+
return this
|
|
23
23
|
},
|
|
24
24
|
isValid: function () {
|
|
25
|
-
return this.ok
|
|
25
|
+
return this.ok
|
|
26
26
|
},
|
|
27
27
|
getWorkbook: function () {
|
|
28
|
-
return this.workbook
|
|
28
|
+
return this.workbook
|
|
29
29
|
},
|
|
30
30
|
updateFileName: function ( fileName: string ) {
|
|
31
|
-
this.fileName = fileName
|
|
32
|
-
return this
|
|
31
|
+
this.fileName = fileName
|
|
32
|
+
return this
|
|
33
33
|
},
|
|
34
34
|
updateMerges: function ( merges: JsminExtension.SpreadSheet.MergeTypes[][] ) {
|
|
35
|
-
let json = this.toJson() as JsminExtension.SpreadSheet.JsonTypes
|
|
35
|
+
let json = this.toJson() as JsminExtension.SpreadSheet.JsonTypes
|
|
36
36
|
json.sheets.forEach( ( sheet,index ) => {
|
|
37
|
-
let sheetMerges = merges[ index ]
|
|
38
|
-
const worksheet = this.workbook.getWorksheet( sheet.sheetName )
|
|
37
|
+
let sheetMerges = merges[ index ]
|
|
38
|
+
const worksheet = this.workbook.getWorksheet( sheet.sheetName )
|
|
39
39
|
for ( let [ from,to ] of sheetMerges ) {
|
|
40
|
-
if ( from && to ) worksheet.mergeCells( from + ':' + to )
|
|
40
|
+
if ( from && to ) worksheet.mergeCells( from + ':' + to )
|
|
41
41
|
}
|
|
42
|
-
} )
|
|
42
|
+
} )
|
|
43
43
|
},
|
|
44
44
|
updateStyles: function ( styles: JsminExtension.SpreadSheet.StyleTypes[][] ) {
|
|
45
|
-
let json = this.toJson() as JsminExtension.SpreadSheet.JsonTypes
|
|
45
|
+
let json = this.toJson() as JsminExtension.SpreadSheet.JsonTypes
|
|
46
46
|
json.sheets.forEach( ( sheet,index ) => {
|
|
47
|
-
let sheetStyles = styles[ index ]
|
|
48
|
-
const worksheet = this.workbook.getWorksheet( sheet.sheetName )
|
|
47
|
+
let sheetStyles = styles[ index ]
|
|
48
|
+
const worksheet = this.workbook.getWorksheet( sheet.sheetName )
|
|
49
49
|
for ( let style of sheetStyles ) {
|
|
50
50
|
let {
|
|
51
51
|
type,
|
|
52
52
|
target,
|
|
53
53
|
values
|
|
54
|
-
} = style
|
|
55
|
-
let Targets = $.flatArray( target )
|
|
54
|
+
} = style
|
|
55
|
+
let Targets = $.flatArray( target )
|
|
56
56
|
|
|
57
57
|
for ( let [ key,value ] of Object.entries( values ) )
|
|
58
58
|
for ( let Target of Targets )
|
|
59
|
-
worksheet[ 'get' + type.toCapital() ]( Target )[ key ] = value
|
|
59
|
+
worksheet[ 'get' + type.toCapital() ]( Target )[ key ] = value
|
|
60
60
|
}
|
|
61
|
-
} )
|
|
61
|
+
} )
|
|
62
62
|
},
|
|
63
63
|
toJson: function () {
|
|
64
64
|
let json: any = {
|
|
65
65
|
fileName: this.fileName,
|
|
66
66
|
sheets: []
|
|
67
|
-
}
|
|
67
|
+
}
|
|
68
68
|
this.workbook.eachSheet( ( sheet: any,id: any ) => {
|
|
69
69
|
let sheetJson: any = {
|
|
70
70
|
sheetName: sheet.name,
|
|
71
71
|
rows: []
|
|
72
|
-
}
|
|
72
|
+
}
|
|
73
73
|
sheet.eachRow( ( row: any,rowIndex: any ) => {
|
|
74
|
-
let [ emp,...values ] = row.values
|
|
75
|
-
sheetJson.rows.push( values )
|
|
76
|
-
} )
|
|
77
|
-
json.sheets.push( sheetJson )
|
|
78
|
-
} )
|
|
79
|
-
return json
|
|
74
|
+
let [ emp,...values ] = row.values
|
|
75
|
+
sheetJson.rows.push( values )
|
|
76
|
+
} )
|
|
77
|
+
json.sheets.push( sheetJson )
|
|
78
|
+
} )
|
|
79
|
+
return json
|
|
80
80
|
},
|
|
81
81
|
export: async function ( fileType?: 'xlsx' | 'csv' ) {
|
|
82
|
-
fileType = fileType || 'xlsx'
|
|
82
|
+
fileType = fileType || 'xlsx'
|
|
83
83
|
|
|
84
|
-
const uint8Array = await this.workbook[ fileType ].writeBuffer()
|
|
85
|
-
const blob = new Blob( [ uint8Array ],{ type: 'application/octet-binary' } )
|
|
86
|
-
const dummyAnchor = document.createElement( 'a' )
|
|
87
|
-
dummyAnchor.href = ( window.URL || window.webkitURL ).createObjectURL( blob )
|
|
88
|
-
dummyAnchor.download = this.fileName + '.' + fileType
|
|
89
|
-
dummyAnchor.click()
|
|
90
|
-
dummyAnchor.remove()
|
|
84
|
+
const uint8Array = await this.workbook[ fileType ].writeBuffer()
|
|
85
|
+
const blob = new Blob( [ uint8Array ],{ type: 'application/octet-binary' } )
|
|
86
|
+
const dummyAnchor = document.createElement( 'a' )
|
|
87
|
+
dummyAnchor.href = ( window.URL || window.webkitURL ).createObjectURL( blob )
|
|
88
|
+
dummyAnchor.download = this.fileName + '.' + fileType
|
|
89
|
+
dummyAnchor.click()
|
|
90
|
+
dummyAnchor.remove()
|
|
91
91
|
},
|
|
92
92
|
},D );
|
|
93
93
|
|
|
94
94
|
( D.fn as any ).SpreadSheet.prototype = D.fn;
|
|
95
95
|
( D.fn as any ).SpreadSheet.prototype.constructor = D;
|
|
96
96
|
|
|
97
|
-
let cdn_excelJS = publicURI + '@env/@foreign/exceljs.min.js'
|
|
97
|
+
let cdn_excelJS = publicURI + '@env/@foreign/exceljs.min.js'
|
|
98
98
|
|
|
99
99
|
$.spreadSheet = {
|
|
100
100
|
readFromFile: async ( file ) => {
|
|
101
|
-
if ( !window.ExcelJS ) await amotify.config.readExtraCDN( cdn_excelJS )
|
|
102
|
-
if ( !window.ExcelJS ) return
|
|
103
|
-
let fileType = file.type
|
|
104
|
-
let fileName = file.name.replace( /\.[^/.]+$/,'' )
|
|
101
|
+
if ( !window.ExcelJS ) await amotify.config.readExtraCDN( cdn_excelJS )
|
|
102
|
+
if ( !window.ExcelJS ) return
|
|
103
|
+
let fileType = file.type
|
|
104
|
+
let fileName = file.name.replace( /\.[^/.]+$/,'' )
|
|
105
105
|
if ( fileType.match( /csv/ ) ) {
|
|
106
|
-
let csv = await file.text()
|
|
107
|
-
const rows = csv.split( /[\n\r]+/ ).map( row => row.split( /,/ ) )
|
|
106
|
+
let csv = await file.text()
|
|
107
|
+
const rows = csv.split( /[\n\r]+/ ).map( row => row.split( /,/ ) )
|
|
108
108
|
|
|
109
|
-
const workbook = new ExcelJS.Workbook()
|
|
110
|
-
const workSheet = workbook.addWorksheet( 'Sheet1' )
|
|
111
|
-
rows.forEach( row => workSheet.addRow( row ) )
|
|
112
|
-
return D( workbook,fileName )
|
|
109
|
+
const workbook = new ExcelJS.Workbook()
|
|
110
|
+
const workSheet = workbook.addWorksheet( 'Sheet1' )
|
|
111
|
+
rows.forEach( row => workSheet.addRow( row ) )
|
|
112
|
+
return D( workbook,fileName )
|
|
113
113
|
}
|
|
114
114
|
|
|
115
|
-
const workbook = new ExcelJS.Workbook()
|
|
116
|
-
const buffer = ( await file.read( 'binaryString' ) as any ).target.result
|
|
117
|
-
return D( await workbook.xlsx.load( buffer ),fileName )
|
|
115
|
+
const workbook = new ExcelJS.Workbook()
|
|
116
|
+
const buffer = ( await file.read( 'binaryString' ) as any ).target.result
|
|
117
|
+
return D( await workbook.xlsx.load( buffer ),fileName )
|
|
118
118
|
},
|
|
119
119
|
readFromJson: async ( params ) => {
|
|
120
120
|
if ( !window.ExcelJS ) {
|
|
121
|
-
await amotify.config.readExtraCDN( cdn_excelJS )
|
|
121
|
+
await amotify.config.readExtraCDN( cdn_excelJS )
|
|
122
122
|
}
|
|
123
|
-
if ( !window.ExcelJS ) return
|
|
123
|
+
if ( !window.ExcelJS ) return
|
|
124
124
|
|
|
125
125
|
let {
|
|
126
126
|
sheets,
|
|
127
127
|
fileName = ''
|
|
128
|
-
} = params
|
|
129
|
-
fileName = fileName || $.uuidGen()
|
|
128
|
+
} = params
|
|
129
|
+
fileName = fileName || $.uuidGen()
|
|
130
130
|
|
|
131
|
-
const workbook = new ExcelJS.Workbook()
|
|
131
|
+
const workbook = new ExcelJS.Workbook()
|
|
132
132
|
|
|
133
133
|
sheets.forEach( ( sheet,index ) => {
|
|
134
134
|
let {
|
|
@@ -136,30 +136,30 @@ declare global {
|
|
|
136
136
|
rows,
|
|
137
137
|
merges = [],
|
|
138
138
|
styles = []
|
|
139
|
-
} = sheet
|
|
140
|
-
sheetName = sheetName || 'シート' + ( index + 1 )
|
|
139
|
+
} = sheet
|
|
140
|
+
sheetName = sheetName || 'シート' + ( index + 1 )
|
|
141
141
|
|
|
142
|
-
workbook.addWorksheet( sheetName )
|
|
143
|
-
const worksheet = workbook.getWorksheet( sheetName )
|
|
144
|
-
worksheet.addRows( rows )
|
|
142
|
+
workbook.addWorksheet( sheetName )
|
|
143
|
+
const worksheet = workbook.getWorksheet( sheetName )
|
|
144
|
+
worksheet.addRows( rows )
|
|
145
145
|
|
|
146
146
|
for ( let [ from,to ] of merges )
|
|
147
|
-
if ( from && to ) worksheet.mergeCells( from + ':' + to )
|
|
147
|
+
if ( from && to ) worksheet.mergeCells( from + ':' + to )
|
|
148
148
|
for ( let style of styles ) {
|
|
149
149
|
let {
|
|
150
150
|
type,
|
|
151
151
|
target,
|
|
152
152
|
values
|
|
153
|
-
} = style
|
|
154
|
-
let Targets = $.flatArray( target )
|
|
153
|
+
} = style
|
|
154
|
+
let Targets = $.flatArray( target )
|
|
155
155
|
|
|
156
156
|
for ( let [ key,value ] of Object.entries( values ) )
|
|
157
157
|
for ( let Target of Targets )
|
|
158
|
-
worksheet[ 'get' + type.toCapital() ]( Target )[ key ] = value
|
|
158
|
+
worksheet[ 'get' + type.toCapital() ]( Target )[ key ] = value
|
|
159
159
|
}
|
|
160
|
-
} )
|
|
160
|
+
} )
|
|
161
161
|
|
|
162
|
-
return D( workbook,fileName )
|
|
162
|
+
return D( workbook,fileName )
|
|
163
163
|
}
|
|
164
164
|
}
|
|
165
165
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
React
|
|
3
|
-
} from '@global'
|
|
3
|
+
} from '@global'
|
|
4
4
|
|
|
5
5
|
$.NoticeHttpStatus = ( params ) => {
|
|
6
6
|
let {
|
|
@@ -8,7 +8,7 @@ $.NoticeHttpStatus = ( params ) => {
|
|
|
8
8
|
statusText,
|
|
9
9
|
label,
|
|
10
10
|
...others
|
|
11
|
-
} = params
|
|
11
|
+
} = params
|
|
12
12
|
|
|
13
13
|
if ( status >= 400 ) {
|
|
14
14
|
others = {
|
|
@@ -27,12 +27,12 @@ $.NoticeHttpStatus = ( params ) => {
|
|
|
27
27
|
</amotify.mols.Text.Normal>
|
|
28
28
|
</amotify.atoms.Box>,
|
|
29
29
|
...others
|
|
30
|
-
} )
|
|
30
|
+
} )
|
|
31
31
|
}
|
|
32
32
|
$.copyToClipboard = async ( rawData,notice = true ) => {
|
|
33
|
-
let data = ''
|
|
33
|
+
let data = ''
|
|
34
34
|
if ( $.is.string( rawData ) ) data = rawData
|
|
35
|
-
else if ( $.is.function( rawData ) ) data = rawData() as any
|
|
35
|
+
else if ( $.is.function( rawData ) ) data = rawData() as any
|
|
36
36
|
|
|
37
37
|
let response = {
|
|
38
38
|
ok: false,
|
|
@@ -40,7 +40,7 @@ $.copyToClipboard = async ( rawData,notice = true ) => {
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
await ( async () => {
|
|
43
|
-
let result
|
|
43
|
+
let result
|
|
44
44
|
if ( navigator.clipboard ) {
|
|
45
45
|
result = await navigator
|
|
46
46
|
.clipboard
|
|
@@ -49,34 +49,34 @@ $.copyToClipboard = async ( rawData,notice = true ) => {
|
|
|
49
49
|
() => true,
|
|
50
50
|
() => false
|
|
51
51
|
)
|
|
52
|
-
if ( !result ) return
|
|
52
|
+
if ( !result ) return
|
|
53
53
|
} else {
|
|
54
|
-
let input = document.createElement( 'input' )
|
|
55
|
-
$( document.body ).append( input )
|
|
56
|
-
input.value = data
|
|
57
|
-
input.select()
|
|
58
|
-
result = document.execCommand( 'copy' )
|
|
59
|
-
document.body.removeChild( input )
|
|
54
|
+
let input = document.createElement( 'input' )
|
|
55
|
+
$( document.body ).append( input )
|
|
56
|
+
input.value = data
|
|
57
|
+
input.select()
|
|
58
|
+
result = document.execCommand( 'copy' )
|
|
59
|
+
document.body.removeChild( input )
|
|
60
60
|
|
|
61
|
-
if ( !result ) return
|
|
61
|
+
if ( !result ) return
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
if ( notice ) {
|
|
65
65
|
amotify.fn.SnackBar.add( {
|
|
66
66
|
children: 'クリップボードにコピーしました'
|
|
67
|
-
} )
|
|
67
|
+
} )
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
response = {
|
|
71
71
|
ok: true,
|
|
72
72
|
body: ''
|
|
73
|
-
}
|
|
74
|
-
} )()
|
|
73
|
+
}
|
|
74
|
+
} )()
|
|
75
75
|
|
|
76
|
-
return response
|
|
76
|
+
return response
|
|
77
77
|
}
|
|
78
78
|
$.isJSXElement = function ( v ): v is JSX.Element {
|
|
79
|
-
return v.$$typeof === Symbol.for( 'react.element' )
|
|
79
|
+
return v.$$typeof === Symbol.for( 'react.element' )
|
|
80
80
|
}
|
|
81
81
|
$.getCurrentLocation = () => {
|
|
82
82
|
return new Promise( ( resolve,reject ) => {
|
|
@@ -84,7 +84,7 @@ $.getCurrentLocation = () => {
|
|
|
84
84
|
let {
|
|
85
85
|
latitude,
|
|
86
86
|
longitude
|
|
87
|
-
} = position.coords
|
|
87
|
+
} = position.coords
|
|
88
88
|
resolve( {
|
|
89
89
|
ok: true,
|
|
90
90
|
status: 200,
|
|
@@ -92,7 +92,7 @@ $.getCurrentLocation = () => {
|
|
|
92
92
|
lat: latitude,
|
|
93
93
|
lng: longitude
|
|
94
94
|
}
|
|
95
|
-
} )
|
|
95
|
+
} )
|
|
96
96
|
},( error ) => {
|
|
97
97
|
resolve( {
|
|
98
98
|
ok: false,
|
|
@@ -100,38 +100,38 @@ $.getCurrentLocation = () => {
|
|
|
100
100
|
body: {
|
|
101
101
|
reason: error
|
|
102
102
|
}
|
|
103
|
-
} )
|
|
104
|
-
} )
|
|
105
|
-
} )
|
|
103
|
+
} )
|
|
104
|
+
} )
|
|
105
|
+
} )
|
|
106
106
|
}
|
|
107
107
|
$.CDNReader = ( url ) => {
|
|
108
108
|
return new Promise( ( resolve,reject ) => {
|
|
109
|
-
let tag = document.createElement( 'script' )
|
|
110
|
-
tag.src = url
|
|
109
|
+
let tag = document.createElement( 'script' )
|
|
110
|
+
tag.src = url
|
|
111
111
|
tag.addEventListener( 'load',() => {
|
|
112
|
-
resolve( 'OK' )
|
|
113
|
-
} )
|
|
114
|
-
$( document.body ).append( tag )
|
|
115
|
-
} )
|
|
112
|
+
resolve( 'OK' )
|
|
113
|
+
} )
|
|
114
|
+
$( document.body ).append( tag )
|
|
115
|
+
} )
|
|
116
116
|
}
|
|
117
117
|
$.ImageLoader = ( dataUrl,img ) => {
|
|
118
118
|
return new Promise( ( resolve,reject ) => {
|
|
119
|
-
let Img = img ? img : new Image()
|
|
120
|
-
Img.onload = () => resolve( Img )
|
|
121
|
-
Img.onerror = ( e ) => reject( e )
|
|
122
|
-
Img.src = dataUrl
|
|
123
|
-
} )
|
|
119
|
+
let Img = img ? img : new Image()
|
|
120
|
+
Img.onload = () => resolve( Img )
|
|
121
|
+
Img.onerror = ( e ) => reject( e )
|
|
122
|
+
Img.src = dataUrl
|
|
123
|
+
} )
|
|
124
124
|
}
|
|
125
125
|
$.extend( {
|
|
126
126
|
zen2hanNumber: function ( this: string ) {
|
|
127
127
|
return this.replace( /[0-9]/g,function ( s: any ) {
|
|
128
|
-
return String.fromCharCode( s.charCodeAt( 0 ) - 0xFEE0 )
|
|
128
|
+
return String.fromCharCode( s.charCodeAt( 0 ) - 0xFEE0 )
|
|
129
129
|
} )
|
|
130
130
|
.replace( /[--﹣−‐⁃‑‒–—﹘―⎯⏤ーー─━]/g,'-' )
|
|
131
131
|
.replace( /¥/,'¥' )
|
|
132
132
|
.replace( /、/,',' )
|
|
133
133
|
.replace( /(/,'(' )
|
|
134
134
|
.replace( /)/,')' )
|
|
135
|
-
.replace( /+/,'+' )
|
|
135
|
+
.replace( /+/,'+' )
|
|
136
136
|
}
|
|
137
|
-
},String )
|
|
137
|
+
},String )
|
package/src/@molecules.tsx
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import React from 'react'
|
|
1
|
+
import React from 'react'
|
|
2
2
|
import {
|
|
3
3
|
Span,
|
|
4
4
|
Box,
|
|
5
5
|
Flex
|
|
6
|
-
} from '@atoms'
|
|
7
|
-
import { List } from './molecules/List'
|
|
8
|
-
import { Accordion } from './molecules/Accordion/parts'
|
|
9
|
-
import { LinkifyText } from './molecules/LinkifyText/parts'
|
|
6
|
+
} from '@atoms'
|
|
7
|
+
import { List } from './molecules/List'
|
|
8
|
+
import { Accordion } from './molecules/Accordion/parts'
|
|
9
|
+
import { LinkifyText } from './molecules/LinkifyText/parts'
|
|
10
10
|
|
|
11
11
|
const Text = {
|
|
12
12
|
Title: ( params: amotify.atoms.BoxInput ) => ( <Box
|
|
@@ -85,7 +85,7 @@ const Column = ( params: amotify.atoms.FlexProps ) => ( <Flex
|
|
|
85
85
|
flexType='col'
|
|
86
86
|
gap={ 1 }
|
|
87
87
|
{ ...params }
|
|
88
|
-
/> )
|
|
88
|
+
/> )
|
|
89
89
|
export {
|
|
90
90
|
List,
|
|
91
91
|
Accordion,
|
package/src/@styles/props.scss
CHANGED
package/src/@styles/var.scss
CHANGED
package/src/@templates.tsx
CHANGED
package/src/@variables.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export const launchID = $.uuidGen()
|
|
1
|
+
export const launchID = $.uuidGen()
|
|
2
2
|
|
|
3
3
|
export const ColorObjects: {
|
|
4
4
|
key: amotify.ThemeColorTypes
|
|
@@ -71,4 +71,4 @@ export const ColorObjects: {
|
|
|
71
71
|
{ key: 'googleGreen',isBrand: true,isAvocado: false },
|
|
72
72
|
{ key: 'googleYellow',isBrand: true,isAvocado: false },
|
|
73
73
|
{ key: 'googleRed',isBrand: true,isAvocado: false },
|
|
74
|
-
]
|
|
74
|
+
]
|