amotify 0.0.4 → 0.0.5
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/package.json +1 -1
- package/public/amotify.js +1 -0
- package/public/amotify.min.css +24 -0
- package/dist/src/@jsminAmotifyExtension/_.d.ts +0 -4
- package/dist/src/@jsminAmotifyExtension/fetch.d.ts +0 -9
- package/dist/src/@jsminAmotifyExtension/formCollect.d.ts +0 -1
- package/dist/src/@jsminAmotifyExtension/spreadSheet.d.ts +0 -4
- package/dist/src/@jsminAmotifyExtension/variables.d.ts +0 -0
- package/dist/src/@types/_.d.ts +0 -6
- package/dist/src/@types/amot.d.ts +0 -260
- package/dist/src/@types/fn.d.ts +0 -1040
- package/dist/src/@types/index.d.ts +0 -62
- package/dist/src/@types/jsminAmotifyExtension.d.ts +0 -134
- package/dist/src/@types/module.d.ts +0 -2
- package/dist/src/@types/state.d.ts +0 -145
- package/dist/src/Atoms/@export.d.ts +0 -4
- package/dist/src/Atoms/FAIcon/parts.d.ts +0 -2
- package/dist/src/Atoms/Logo/parts.d.ts +0 -1
- package/dist/src/Atoms/Various/parts.d.ts +0 -9
- package/dist/src/Functions/@export.d.ts +0 -12
- package/dist/src/Functions/Button/_.d.ts +0 -1
- package/dist/src/Functions/Cropper/parts.d.ts +0 -1
- package/dist/src/Functions/Effects/Fade.d.ts +0 -1
- package/dist/src/Functions/Effects/Ripple.d.ts +0 -1
- package/dist/src/Functions/Effects/_.d.ts +0 -3
- package/dist/src/Functions/Input/Chips/Selector.d.ts +0 -1
- package/dist/src/Functions/Input/Chips/_.d.ts +0 -2
- package/dist/src/Functions/Input/DigitCharacters.d.ts +0 -1
- package/dist/src/Functions/Input/File/_.d.ts +0 -2
- package/dist/src/Functions/Input/Hidden.d.ts +0 -1
- package/dist/src/Functions/Input/List/_.d.ts +0 -1
- package/dist/src/Functions/Input/Segmented/_.d.ts +0 -1
- package/dist/src/Functions/Input/Select/_.d.ts +0 -1
- package/dist/src/Functions/Input/Slider/_.d.ts +0 -1
- package/dist/src/Functions/Input/Switch/_.d.ts +0 -1
- package/dist/src/Functions/Input/Text.d.ts +0 -5
- package/dist/src/Functions/Input/TextArea.d.ts +0 -1
- package/dist/src/Functions/Input/Time/Picker.d.ts +0 -1
- package/dist/src/Functions/Input/Time/_.d.ts +0 -2
- package/dist/src/Functions/Input/_.d.ts +0 -5
- package/dist/src/Functions/Input/core.d.ts +0 -34
- package/dist/src/Functions/Inputs/_.d.ts +0 -3
- package/dist/src/Functions/Inputs/text.d.ts +0 -12
- package/dist/src/Functions/Layout/PageNotFound.d.ts +0 -1
- package/dist/src/Functions/Layout/PageRouter.d.ts +0 -2
- package/dist/src/Functions/Layout/PageViewController/parts.d.ts +0 -1
- package/dist/src/Functions/Layout/Plate.d.ts +0 -1
- package/dist/src/Functions/Layout/RootViewController/parts.d.ts +0 -1
- package/dist/src/Functions/Layout/SwipeView/parts.d.ts +0 -2
- package/dist/src/Functions/Layout/TabBar.d.ts +0 -1
- package/dist/src/Functions/Layout/_.d.ts +0 -2
- package/dist/src/Functions/Loader/corner.d.ts +0 -1
- package/dist/src/Functions/Loader/mini.d.ts +0 -33
- package/dist/src/Functions/Loader/parts.d.ts +0 -3
- package/dist/src/Functions/Loader/top.d.ts +0 -1
- package/dist/src/Functions/Sheet/parts.d.ts +0 -2
- package/dist/src/Functions/SnackBar/parts.d.ts +0 -2
- package/dist/src/Functions/Table/Data/parts.d.ts +0 -3
- package/dist/src/Functions/Table/Drag/parts.d.ts +0 -1
- package/dist/src/Functions/Table/Normal/parts.d.ts +0 -1
- package/dist/src/Functions/Table/_.d.ts +0 -9
- package/dist/src/Functions/Tooltips/parts.d.ts +0 -2
- package/dist/src/Global/@export.d.ts +0 -12
- package/dist/src/Global/LaunchReactApplication.d.ts +0 -1
- package/dist/src/Global/styleConverter.d.ts +0 -2
- package/dist/src/Molecules/@export.d.ts +0 -21
- package/dist/src/Molecules/Accordion/parts.d.ts +0 -2
- package/dist/src/Molecules/LinkifyText/parts.d.ts +0 -1
- package/dist/src/Molecules/List.d.ts +0 -1
- package/dist/src/Organisms/@export.d.ts +0 -2
- package/dist/src/Organisms/DisplayStyleInput/_.d.ts +0 -1
- package/dist/src/Organisms/DisplayStyleInput/darkmode.d.ts +0 -1
- package/dist/src/Organisms/DisplayStyleInput/themeColor.d.ts +0 -27
- package/dist/src/Templates/@export.d.ts +0 -2
- package/dist/src/Templates/PlayGround/parts.d.ts +0 -1
- package/dist/src/config.d.ts +0 -16
- package/dist/src/launch.d.ts +0 -9
- package/dist/src/preload.d.ts +0 -1
- package/src/@jsminAmotifyExtension/_.tsx +0 -4
- package/src/@jsminAmotifyExtension/fetch.tsx +0 -107
- package/src/@jsminAmotifyExtension/formCollect.tsx +0 -89
- package/src/@jsminAmotifyExtension/spreadSheet.tsx +0 -159
- package/src/@jsminAmotifyExtension/variables.tsx +0 -130
- package/src/@styles/@app.scss +0 -4
- package/src/@styles/@variables/customProps.scss +0 -109
- package/src/@styles/@variables/styleSet.scss +0 -38
- package/src/@styles/@variables/themeColor.scss +0 -71
- package/src/@styles/@variables/var.scss +0 -171
- package/src/@styles/UniStyling.scss +0 -996
- package/src/@styles/init.scss +0 -154
- package/src/@types/_.tsx +0 -6
- package/src/@types/amot.tsx +0 -323
- package/src/@types/fn.tsx +0 -1210
- package/src/@types/index.tsx +0 -74
- package/src/@types/jsminAmotifyExtension.tsx +0 -143
- package/src/@types/module.tsx +0 -2
- package/src/@types/state.tsx +0 -199
- package/src/Atoms/@export.tsx +0 -32
- package/src/Atoms/FAIcon/parts.tsx +0 -117
- package/src/Atoms/FAIcon/style.module.scss +0 -9
- package/src/Atoms/Logo/parts.tsx +0 -335
- package/src/Atoms/Logo/style.module.scss +0 -96
- package/src/Atoms/Various/parts.tsx +0 -157
- package/src/Atoms/Various/style.module.scss +0 -40
- package/src/Functions/@export.tsx +0 -29
- package/src/Functions/Button/_.tsx +0 -305
- package/src/Functions/Button/style.module.scss +0 -183
- package/src/Functions/Cropper/parts.tsx +0 -1061
- package/src/Functions/Cropper/style.module.scss +0 -62
- package/src/Functions/Effects/Fade.tsx +0 -81
- package/src/Functions/Effects/Ripple.tsx +0 -141
- package/src/Functions/Effects/_.tsx +0 -33
- package/src/Functions/Effects/style.module.scss +0 -83
- package/src/Functions/Input/Chips/Selector.tsx +0 -451
- package/src/Functions/Input/Chips/_.tsx +0 -286
- package/src/Functions/Input/Chips/style.module.scss +0 -6
- package/src/Functions/Input/DigitCharacters.tsx +0 -241
- package/src/Functions/Input/File/_.tsx +0 -596
- package/src/Functions/Input/File/style.module.scss +0 -34
- package/src/Functions/Input/Hidden.tsx +0 -18
- package/src/Functions/Input/List/_.tsx +0 -383
- package/src/Functions/Input/List/style.module.scss +0 -84
- package/src/Functions/Input/Segmented/_.tsx +0 -238
- package/src/Functions/Input/Segmented/style.module.scss +0 -81
- package/src/Functions/Input/Select/_.tsx +0 -225
- package/src/Functions/Input/Select/style.module.scss +0 -10
- package/src/Functions/Input/Slider/_.tsx +0 -519
- package/src/Functions/Input/Slider/style.module.scss +0 -67
- package/src/Functions/Input/Switch/_.tsx +0 -177
- package/src/Functions/Input/Switch/style.module.scss +0 -18
- package/src/Functions/Input/Text.tsx +0 -437
- package/src/Functions/Input/TextArea.tsx +0 -115
- package/src/Functions/Input/Time/Picker.tsx +0 -950
- package/src/Functions/Input/Time/_.tsx +0 -736
- package/src/Functions/Input/Time/style.module.scss +0 -72
- package/src/Functions/Input/_.tsx +0 -793
- package/src/Functions/Input/core.tsx +0 -461
- package/src/Functions/Input/style.module.scss +0 -43
- package/src/Functions/Inputs/_.tsx +0 -5
- package/src/Functions/Inputs/style.module.scss +0 -15
- package/src/Functions/Inputs/text.tsx +0 -67
- package/src/Functions/Inputs/types.d.ts +0 -1
- package/src/Functions/Layout/PageNotFound.tsx +0 -81
- package/src/Functions/Layout/PageRouter.tsx +0 -107
- package/src/Functions/Layout/PageViewController/parts.tsx +0 -32
- package/src/Functions/Layout/Plate.tsx +0 -30
- package/src/Functions/Layout/RootViewController/parts.tsx +0 -290
- package/src/Functions/Layout/RootViewController/style.module.scss +0 -24
- package/src/Functions/Layout/SwipeView/parts.tsx +0 -380
- package/src/Functions/Layout/SwipeView/style.module.scss +0 -19
- package/src/Functions/Layout/TabBar.tsx +0 -64
- package/src/Functions/Layout/_.tsx +0 -20
- package/src/Functions/Loader/corner.tsx +0 -78
- package/src/Functions/Loader/mini.tsx +0 -117
- package/src/Functions/Loader/parts.tsx +0 -105
- package/src/Functions/Loader/style.module.scss +0 -222
- package/src/Functions/Loader/top.tsx +0 -90
- package/src/Functions/Sheet/parts.tsx +0 -972
- package/src/Functions/Sheet/style.module.scss +0 -235
- package/src/Functions/SnackBar/parts.tsx +0 -215
- package/src/Functions/SnackBar/style.module.scss +0 -25
- package/src/Functions/Table/Data/parts.tsx +0 -955
- package/src/Functions/Table/Drag/parts.tsx +0 -448
- package/src/Functions/Table/Normal/parts.tsx +0 -123
- package/src/Functions/Table/_.tsx +0 -170
- package/src/Functions/Table/style.module.scss +0 -92
- package/src/Functions/Tooltips/parts.tsx +0 -52
- package/src/Global/@export.tsx +0 -138
- package/src/Global/LaunchReactApplication.tsx +0 -30
- package/src/Global/exe.tsx +0 -0
- package/src/Global/styleConverter.tsx +0 -435
- package/src/Molecules/@export.tsx +0 -95
- package/src/Molecules/Accordion/parts.tsx +0 -146
- package/src/Molecules/Accordion/style.module.scss +0 -13
- package/src/Molecules/LinkifyText/parts.tsx +0 -54
- package/src/Molecules/List.tsx +0 -30
- package/src/Organisms/@export.tsx +0 -5
- package/src/Organisms/DisplayStyleInput/_.tsx +0 -18
- package/src/Organisms/DisplayStyleInput/darkmode.tsx +0 -112
- package/src/Organisms/DisplayStyleInput/themeColor.tsx +0 -210
- package/src/Templates/@export.tsx +0 -7
- package/src/Templates/PlayGround/parts.tsx +0 -115
- package/src/Templates/PlayGround/style.module.scss +0 -38
- package/src/config.tsx +0 -132
- package/src/launch.tsx +0 -100
- package/src/preload.tsx +0 -49
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import * as ReactDom from 'react-dom';
|
|
3
|
-
import * as ReactRouterDom from 'react-router-dom';
|
|
4
|
-
import { LaunchReactApplication } from './LaunchReactApplication';
|
|
5
|
-
declare const useStore: amotify.glob.useStoreParams;
|
|
6
|
-
declare const useRecycle: amotify.glob.useRecycleParams;
|
|
7
|
-
declare const pageTransit: amotify.glob.PageTransitParams;
|
|
8
|
-
declare const StyleConverter: {
|
|
9
|
-
ReadStyleSet: amotify.glob.StyleConverter.ReadStyleSet;
|
|
10
|
-
ToClassName: amotify.glob.StyleConverter.ToClassName;
|
|
11
|
-
};
|
|
12
|
-
export { React, ReactDom, ReactRouterDom, pageTransit, useStore, useRecycle, StyleConverter, LaunchReactApplication };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const LaunchReactApplication: amotify.glob.LaunchReactApplicationParams;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { List } from './List';
|
|
2
|
-
import { Accordion } from './Accordion/parts';
|
|
3
|
-
import { LinkifyText } from './LinkifyText/parts';
|
|
4
|
-
declare const Text: {
|
|
5
|
-
Title: (params: amotify.atoms.BoxInput) => JSX.Element;
|
|
6
|
-
SubTitle: (params: amotify.atoms.BoxInput) => JSX.Element;
|
|
7
|
-
ThirdTitle: (params: amotify.atoms.BoxInput) => JSX.Element;
|
|
8
|
-
Paragraph: (params: amotify.atoms.BoxInput) => JSX.Element;
|
|
9
|
-
Normal: (params: amotify.atoms.BoxInput) => JSX.Element;
|
|
10
|
-
Description: (params: amotify.atoms.BoxInput) => JSX.Element;
|
|
11
|
-
Supplement: (params: amotify.atoms.BoxInput) => JSX.Element;
|
|
12
|
-
NowrapSpan: (params: amotify.atoms.SpanProps) => JSX.Element;
|
|
13
|
-
};
|
|
14
|
-
declare const Row: {
|
|
15
|
-
Center: (params: amotify.atoms.FlexProps) => JSX.Element;
|
|
16
|
-
Left: (params: amotify.atoms.FlexProps) => JSX.Element;
|
|
17
|
-
Right: (params: amotify.atoms.FlexProps) => JSX.Element;
|
|
18
|
-
Separate: (params: amotify.atoms.FlexProps) => JSX.Element;
|
|
19
|
-
};
|
|
20
|
-
declare const Column: (params: amotify.atoms.FlexProps) => JSX.Element;
|
|
21
|
-
export { List, Accordion, LinkifyText, Text, Column, Row };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const LinkifyText: FNC<amotify.mols.LinkifyTextProps>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const List: FNC<amotify.mols.List.Params>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const DisplayStyleInput: amotify.orgs.DisplayStyleInput.Methods;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const Darkmode: (params: amotify.orgs.DisplayStyleInput.DarkmodeInput) => JSX.Element;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export declare const Colors: {
|
|
2
|
-
Basics: ({
|
|
3
|
-
key: string;
|
|
4
|
-
icon: JSX.Element;
|
|
5
|
-
} | {
|
|
6
|
-
key: string;
|
|
7
|
-
icon: string;
|
|
8
|
-
})[];
|
|
9
|
-
Brands: {
|
|
10
|
-
key: string;
|
|
11
|
-
icon: JSX.Element;
|
|
12
|
-
label: string;
|
|
13
|
-
}[];
|
|
14
|
-
Originals: ({
|
|
15
|
-
key: string;
|
|
16
|
-
icon: string;
|
|
17
|
-
label?: undefined;
|
|
18
|
-
} | {
|
|
19
|
-
key: string;
|
|
20
|
-
icon: string;
|
|
21
|
-
label: string;
|
|
22
|
-
})[];
|
|
23
|
-
};
|
|
24
|
-
export declare const ThemeColorALL: FNC<amotify.orgs.DisplayStyleInput.ThemeColorInput>;
|
|
25
|
-
export declare const ThemeColorBasic: FNC<amotify.orgs.DisplayStyleInput.ThemeColorInput>;
|
|
26
|
-
export declare const ThemeColorOriginal: FNC<amotify.orgs.DisplayStyleInput.ThemeColorInput>;
|
|
27
|
-
export declare const ThemeColorBrands: FNC<amotify.orgs.DisplayStyleInput.ThemeColorInput>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const PlayGround: FNC<{}>;
|
package/dist/src/config.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export declare const script: HTMLOrSVGScriptElement | null;
|
|
2
|
-
export declare const fileName: string | null | undefined;
|
|
3
|
-
export declare const Version: string;
|
|
4
|
-
export declare const userAgent: string;
|
|
5
|
-
export declare const deviceType: string;
|
|
6
|
-
export declare const deviceIdentifier: () => {
|
|
7
|
-
isWhat: "Windows";
|
|
8
|
-
isTouchDevice: boolean;
|
|
9
|
-
isPhone: boolean;
|
|
10
|
-
isIOS: boolean;
|
|
11
|
-
isSystemDarkmode: () => boolean;
|
|
12
|
-
isBreakpoint: () => boolean;
|
|
13
|
-
isPhonepoint: () => boolean;
|
|
14
|
-
};
|
|
15
|
-
export declare const SetThemeColorTag: () => void;
|
|
16
|
-
export declare const defaultConfig: amotify.config.Methods;
|
package/dist/src/launch.d.ts
DELETED
package/dist/src/preload.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
declare let tags: Jsmin.CreateElement.Args[];
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
const fetcher = async ( params: JsminExtension.Fetch.Input & {
|
|
2
|
-
method: string
|
|
3
|
-
},callback?: JsminExtension.Fetch.callback ) => {
|
|
4
|
-
let {
|
|
5
|
-
method,
|
|
6
|
-
key = $.uuidGen( 16 ),
|
|
7
|
-
url = '',
|
|
8
|
-
trafficControl = 500,
|
|
9
|
-
// trafficControl = 1000,
|
|
10
|
-
preventMultiRequest = true,
|
|
11
|
-
topLoader = false,
|
|
12
|
-
cornerLoader = true,
|
|
13
|
-
...Params
|
|
14
|
-
} = params || {}
|
|
15
|
-
|
|
16
|
-
let result: Jsmin.Fetch.Output = await ( async () => {
|
|
17
|
-
let exist = $.fetch.waitList.includes( key );
|
|
18
|
-
|
|
19
|
-
if ( preventMultiRequest && exist ) {
|
|
20
|
-
return {
|
|
21
|
-
ok: false,
|
|
22
|
-
status: 405,
|
|
23
|
-
statusText: 'NoAcceptedMultiRequests',
|
|
24
|
-
body: 'NoAcceptedMultiRequests',
|
|
25
|
-
requestTime: 0,
|
|
26
|
-
rawData: null as any
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
$.fetch.waitList = [ ...$.fetch.waitList,key ];
|
|
31
|
-
|
|
32
|
-
if ( !url.match( /https?:/ ) ) {
|
|
33
|
-
url = '/' + url.replace( /^\//,"" );
|
|
34
|
-
|
|
35
|
-
Params.headers = {
|
|
36
|
-
...$.fetch.defaultHeaders || {},
|
|
37
|
-
...Params.headers || {}
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
amotify.fn.Loader.fn.mini.active( params.key || '' );
|
|
42
|
-
!topLoader || amotify.fn.Loader.fn.top.active();
|
|
43
|
-
!cornerLoader || amotify.fn.Loader.fn.corner.active();
|
|
44
|
-
|
|
45
|
-
let result = await $.ajax( {
|
|
46
|
-
method,
|
|
47
|
-
url,
|
|
48
|
-
...Params
|
|
49
|
-
} );
|
|
50
|
-
if ( $.fetch.defaultResultCallback ) $.fetch.defaultResultCallback( result );
|
|
51
|
-
|
|
52
|
-
if ( trafficControl ) {
|
|
53
|
-
let { requestTime } = result;
|
|
54
|
-
if ( requestTime <= trafficControl ) {
|
|
55
|
-
let CoolDownTime = Number( trafficControl - requestTime );
|
|
56
|
-
await ( () => {
|
|
57
|
-
result.requestTime = trafficControl;
|
|
58
|
-
return new Promise( ( resolve,reject ) => {
|
|
59
|
-
setTimeout( () => {
|
|
60
|
-
resolve( void 0 );
|
|
61
|
-
},CoolDownTime );
|
|
62
|
-
} );
|
|
63
|
-
} )();
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
amotify.fn.Loader.fn.mini.stop( params.key || '' );
|
|
68
|
-
!topLoader || amotify.fn.Loader.fn.top.stop();
|
|
69
|
-
!cornerLoader || amotify.fn.Loader.fn.corner.stop();
|
|
70
|
-
$.fetch.waitList.splice( $.fetch.waitList.findIndex( ( a ) => a == key ),1 );
|
|
71
|
-
return result;
|
|
72
|
-
} )();
|
|
73
|
-
|
|
74
|
-
if ( callback ) callback( result );
|
|
75
|
-
return result;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
$.fetch = {
|
|
79
|
-
get: async ( params,callback ) => {
|
|
80
|
-
return await fetcher( { ...params,method: 'get' },callback );
|
|
81
|
-
},
|
|
82
|
-
post: async ( params,callback ) => {
|
|
83
|
-
return await fetcher( { ...params,method: 'post' },callback );
|
|
84
|
-
},
|
|
85
|
-
options: async ( params,callback ) => {
|
|
86
|
-
return await fetcher( { ...params,method: 'options' },callback );
|
|
87
|
-
},
|
|
88
|
-
put: async ( params,callback ) => {
|
|
89
|
-
return await fetcher( { ...params,method: 'put' },callback );
|
|
90
|
-
},
|
|
91
|
-
waitList: [],
|
|
92
|
-
defaultHeaders: {},
|
|
93
|
-
defaultResultCallback: ( result ) => {
|
|
94
|
-
let {
|
|
95
|
-
status,
|
|
96
|
-
statusText
|
|
97
|
-
} = result;
|
|
98
|
-
if ( status == 500 ) {
|
|
99
|
-
$.NoticeHttpStatus( {
|
|
100
|
-
status,statusText,
|
|
101
|
-
label: <>
|
|
102
|
-
Internal Server Error
|
|
103
|
-
</>
|
|
104
|
-
} );
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
}
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
useStore
|
|
3
|
-
} from '@global';
|
|
4
|
-
|
|
5
|
-
let formProcess = false;
|
|
6
|
-
$.formCollect = async ( form ) => {
|
|
7
|
-
if ( formProcess ) return {
|
|
8
|
-
valid: false,
|
|
9
|
-
data: {}
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
let focusElement: HTMLElement = document.activeElement as any;
|
|
13
|
-
if ( focusElement ) focusElement.blur();
|
|
14
|
-
|
|
15
|
-
formProcess = true;
|
|
16
|
-
let Inputs = $( `[data-form="${ form }"]` ),
|
|
17
|
-
totalValid = 1,
|
|
18
|
-
Values: plainObject = {}
|
|
19
|
-
|
|
20
|
-
for ( let index = 0; index < Inputs.length; index++ ) {
|
|
21
|
-
let Input = Inputs[ index ];
|
|
22
|
-
|
|
23
|
-
let { componentId = '' } = Input.dataset;
|
|
24
|
-
let componentData = useStore.get( componentId );
|
|
25
|
-
|
|
26
|
-
if ( componentData && componentData.Refresh ) await componentData.Refresh();
|
|
27
|
-
|
|
28
|
-
let {
|
|
29
|
-
value: displayValue,
|
|
30
|
-
name,
|
|
31
|
-
checked,
|
|
32
|
-
dataset: {
|
|
33
|
-
value,
|
|
34
|
-
inputType = '',
|
|
35
|
-
validation
|
|
36
|
-
}
|
|
37
|
-
} = Inputs[ index ] as any;
|
|
38
|
-
let Value: any = value;
|
|
39
|
-
|
|
40
|
-
validation = Number( ( validation ?? 'true' ) == 'true' );
|
|
41
|
-
|
|
42
|
-
if ( inputType == 'hidden' ) {
|
|
43
|
-
if ( Value ) Value = JSON.parse( Value );
|
|
44
|
-
} else if ( [ 'radio','checkbox','checker' ].includes( inputType ) ) {
|
|
45
|
-
if ( Value ) {
|
|
46
|
-
Value = JSON.parse( Value );
|
|
47
|
-
if ( $.is.array( Value ) ) {
|
|
48
|
-
Value = Value.map( ( v ) => JSON.parse( v ) )
|
|
49
|
-
} else {
|
|
50
|
-
Value = JSON.parse( Value );
|
|
51
|
-
}
|
|
52
|
-
if ( inputType == 'radio' ) {
|
|
53
|
-
Value = Value[ 0 ];
|
|
54
|
-
}
|
|
55
|
-
if ( inputType == 'checker' ) {
|
|
56
|
-
Value = Boolean( Value[ 0 ] );
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
} else if ( [ 'chips-single','chips-multi' ].includes( inputType ) ) {
|
|
60
|
-
Value = JSON.parse( Value );
|
|
61
|
-
if ( Value.length ) {
|
|
62
|
-
if ( inputType == 'chips-single' ) Value = Value[ 0 ];
|
|
63
|
-
}
|
|
64
|
-
} else if ( inputType == 'time' ) {
|
|
65
|
-
if ( Value ) Value = JSON.parse( Value );
|
|
66
|
-
} else if ( inputType == 'select' ) {
|
|
67
|
-
if ( Value ) Value = JSON.parse( Value );
|
|
68
|
-
} else if ( inputType == 'file' ) {
|
|
69
|
-
if ( componentData ) {
|
|
70
|
-
let files = componentData.Files;
|
|
71
|
-
Value = files;
|
|
72
|
-
}
|
|
73
|
-
} else if ( inputType == 'slider' ) {
|
|
74
|
-
if ( Value ) Value = JSON.parse( Value );
|
|
75
|
-
} else if ( inputType == 'switch' ) {
|
|
76
|
-
Value = checked | 0;
|
|
77
|
-
}
|
|
78
|
-
let valid = ( validation ?? 1 ) | 0;
|
|
79
|
-
totalValid &= valid;
|
|
80
|
-
|
|
81
|
-
if ( validation ) Values[ name ] = Value;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
formProcess = false;
|
|
85
|
-
return {
|
|
86
|
-
valid: Boolean( totalValid ),
|
|
87
|
-
data: Values
|
|
88
|
-
};
|
|
89
|
-
}
|
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
export { }
|
|
2
|
-
import { publicURI } from '../launch';
|
|
3
|
-
|
|
4
|
-
declare global {
|
|
5
|
-
var ExcelJS: any;
|
|
6
|
-
}
|
|
7
|
-
{
|
|
8
|
-
const D: JsminExtension.SpreadSheet.Instance = ( wb,fn ) => {
|
|
9
|
-
return new ( D.fn as any ).SpreadSheet( wb,fn );
|
|
10
|
-
}
|
|
11
|
-
D.fn = D.prototype = {} as any
|
|
12
|
-
$.extend( {
|
|
13
|
-
SpreadSheet: function ( workbook: JsminExtension.SpreadSheet.Method,fileName: string ) {
|
|
14
|
-
this.workbook = workbook;
|
|
15
|
-
this.fileName = fileName;
|
|
16
|
-
return this;
|
|
17
|
-
},
|
|
18
|
-
getWorkbook: function () {
|
|
19
|
-
return this.workbook;
|
|
20
|
-
},
|
|
21
|
-
updateFileName: function ( fileName: string ) {
|
|
22
|
-
this.fileName = fileName;
|
|
23
|
-
return this;
|
|
24
|
-
},
|
|
25
|
-
updateMerges: function ( merges: JsminExtension.SpreadSheet.MergeTypes[][] ) {
|
|
26
|
-
let json = this.toJson() as JsminExtension.SpreadSheet.JsonTypes;
|
|
27
|
-
json.sheets.forEach( ( sheet,index ) => {
|
|
28
|
-
let sheetMerges = merges[ index ];
|
|
29
|
-
const worksheet = this.workbook.getWorksheet( sheet.sheetName );
|
|
30
|
-
for ( let [ from,to ] of sheetMerges ) {
|
|
31
|
-
if ( from && to ) worksheet.mergeCells( from + ':' + to );
|
|
32
|
-
}
|
|
33
|
-
} );
|
|
34
|
-
},
|
|
35
|
-
updateStyles: function ( styles: JsminExtension.SpreadSheet.StyleTypes[][] ) {
|
|
36
|
-
let json = this.toJson() as JsminExtension.SpreadSheet.JsonTypes;
|
|
37
|
-
json.sheets.forEach( ( sheet,index ) => {
|
|
38
|
-
let sheetStyles = styles[ index ];
|
|
39
|
-
const worksheet = this.workbook.getWorksheet( sheet.sheetName );
|
|
40
|
-
for ( let style of sheetStyles ) {
|
|
41
|
-
let {
|
|
42
|
-
type,
|
|
43
|
-
target,
|
|
44
|
-
values
|
|
45
|
-
} = style;
|
|
46
|
-
let Targets = $.flatArray( target );
|
|
47
|
-
|
|
48
|
-
for ( let [ key,value ] of Object.entries( values ) )
|
|
49
|
-
for ( let Target of Targets )
|
|
50
|
-
worksheet[ 'get' + type.toCapital() ]( Target )[ key ] = value;
|
|
51
|
-
}
|
|
52
|
-
} );
|
|
53
|
-
},
|
|
54
|
-
toJson: function () {
|
|
55
|
-
let json: any = {
|
|
56
|
-
fileName: this.fileName,
|
|
57
|
-
sheets: []
|
|
58
|
-
};
|
|
59
|
-
this.workbook.eachSheet( ( sheet: any,id: any ) => {
|
|
60
|
-
let sheetJson: any = {
|
|
61
|
-
sheetName: sheet.name,
|
|
62
|
-
rows: []
|
|
63
|
-
};
|
|
64
|
-
sheet.eachRow( ( row: any,rowIndex: any ) => {
|
|
65
|
-
let [ emp,...values ] = row.values;
|
|
66
|
-
sheetJson.rows.push( values );
|
|
67
|
-
} );
|
|
68
|
-
json.sheets.push( sheetJson );
|
|
69
|
-
} );
|
|
70
|
-
return json;
|
|
71
|
-
},
|
|
72
|
-
export: async function ( fileType?: 'xlsx' | 'csv' ) {
|
|
73
|
-
fileType = fileType || 'xlsx';
|
|
74
|
-
|
|
75
|
-
const uint8Array = await this.workbook[ fileType ].writeBuffer();
|
|
76
|
-
const blob = new Blob( [ uint8Array ],{ type: 'application/octet-binary' } );
|
|
77
|
-
const dummyAnchor = document.createElement( 'a' );
|
|
78
|
-
dummyAnchor.href = ( window.URL || window.webkitURL ).createObjectURL( blob );
|
|
79
|
-
dummyAnchor.download = this.fileName + '.' + fileType;
|
|
80
|
-
dummyAnchor.click();
|
|
81
|
-
dummyAnchor.remove();
|
|
82
|
-
},
|
|
83
|
-
},D );
|
|
84
|
-
|
|
85
|
-
( D.fn as any ).SpreadSheet.prototype = D.fn;
|
|
86
|
-
( D.fn as any ).SpreadSheet.prototype.constructor = D;
|
|
87
|
-
|
|
88
|
-
$.spreadSheet = {
|
|
89
|
-
readFromFile: async ( file ) => {
|
|
90
|
-
if ( !window.ExcelJS ) {
|
|
91
|
-
await amotify.config.readExtraCDN( publicURI + '@env/@foreign/exceljs.min.js' );
|
|
92
|
-
}
|
|
93
|
-
if ( !window.ExcelJS ) return;
|
|
94
|
-
|
|
95
|
-
const workbook = new ExcelJS.Workbook();
|
|
96
|
-
let readFile = await file.read( 'binaryString' );
|
|
97
|
-
const buffer = ( readFile as any ).target.result;
|
|
98
|
-
let fileName = file.name.replace( /\.[^/.]+$/,'' );
|
|
99
|
-
return D( await workbook.xlsx.load( buffer ),fileName );
|
|
100
|
-
},
|
|
101
|
-
readFromJson: async ( params ) => {
|
|
102
|
-
if ( !window.ExcelJS ) {
|
|
103
|
-
await amotify.config.readExtraCDN( publicURI + '@env/@foreign/exceljs.min.js' );
|
|
104
|
-
}
|
|
105
|
-
if ( !window.ExcelJS ) return;
|
|
106
|
-
|
|
107
|
-
let {
|
|
108
|
-
sheets,
|
|
109
|
-
fileName = ''
|
|
110
|
-
} = params;
|
|
111
|
-
fileName = fileName || $.uuidGen();
|
|
112
|
-
|
|
113
|
-
const workbook = new ExcelJS.Workbook();
|
|
114
|
-
|
|
115
|
-
sheets.forEach( ( sheet,index ) => {
|
|
116
|
-
let {
|
|
117
|
-
sheetName,
|
|
118
|
-
headers = [],
|
|
119
|
-
rows,
|
|
120
|
-
merges = [],
|
|
121
|
-
styles = []
|
|
122
|
-
} = sheet;
|
|
123
|
-
sheetName = sheetName || 'シート' + ( index + 1 );
|
|
124
|
-
|
|
125
|
-
workbook.addWorksheet( sheetName );
|
|
126
|
-
const worksheet = workbook.getWorksheet( sheetName );
|
|
127
|
-
|
|
128
|
-
let Headers = headers.map( ( header,index ) => {
|
|
129
|
-
let { key,value } = header;
|
|
130
|
-
return {
|
|
131
|
-
key: key,
|
|
132
|
-
header: value
|
|
133
|
-
}
|
|
134
|
-
} );
|
|
135
|
-
|
|
136
|
-
worksheet.columns = Headers;
|
|
137
|
-
worksheet.addRows( rows );
|
|
138
|
-
|
|
139
|
-
for ( let [ from,to ] of merges ) {
|
|
140
|
-
if ( from && to ) worksheet.mergeCells( from + ':' + to );
|
|
141
|
-
}
|
|
142
|
-
for ( let style of styles ) {
|
|
143
|
-
let {
|
|
144
|
-
type,
|
|
145
|
-
target,
|
|
146
|
-
values
|
|
147
|
-
} = style;
|
|
148
|
-
let Targets = $.flatArray( target );
|
|
149
|
-
|
|
150
|
-
for ( let [ key,value ] of Object.entries( values ) )
|
|
151
|
-
for ( let Target of Targets )
|
|
152
|
-
worksheet[ 'get' + type.toCapital() ]( Target )[ key ] = value;
|
|
153
|
-
}
|
|
154
|
-
} );
|
|
155
|
-
|
|
156
|
-
return D( workbook,fileName );
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
}
|
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
$.NoticeHttpStatus = ( params ) => {
|
|
2
|
-
let {
|
|
3
|
-
status,
|
|
4
|
-
statusText,
|
|
5
|
-
label,
|
|
6
|
-
...others
|
|
7
|
-
} = params;
|
|
8
|
-
|
|
9
|
-
if ( status >= 400 ) {
|
|
10
|
-
others = {
|
|
11
|
-
backgroundColor: 'nega',
|
|
12
|
-
...others,
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
amotify.fn.SnackBar.add( {
|
|
17
|
-
children: <amotify.atoms.Box>
|
|
18
|
-
<amotify.mols.Text.Paragraph>
|
|
19
|
-
通信ステータス : { status } { statusText }
|
|
20
|
-
</amotify.mols.Text.Paragraph>
|
|
21
|
-
<amotify.mols.Text.Normal>
|
|
22
|
-
{ label }
|
|
23
|
-
</amotify.mols.Text.Normal>
|
|
24
|
-
</amotify.atoms.Box>,
|
|
25
|
-
...others
|
|
26
|
-
} );
|
|
27
|
-
}
|
|
28
|
-
$.copyToClipboard = async ( rawData ) => {
|
|
29
|
-
let data = '';
|
|
30
|
-
if ( $.is.string( rawData ) ) data = rawData
|
|
31
|
-
else if ( $.is.function( rawData ) ) data = rawData() as any;
|
|
32
|
-
|
|
33
|
-
let response = {
|
|
34
|
-
ok: false,
|
|
35
|
-
body: 'NotSupported'
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
await ( async () => {
|
|
39
|
-
let result;
|
|
40
|
-
if ( navigator.clipboard ) {
|
|
41
|
-
result = await navigator
|
|
42
|
-
.clipboard
|
|
43
|
-
.writeText( data )
|
|
44
|
-
.then(
|
|
45
|
-
() => true,
|
|
46
|
-
() => false
|
|
47
|
-
)
|
|
48
|
-
if ( !result ) return;
|
|
49
|
-
} else {
|
|
50
|
-
let input = document.createElement( 'input' );
|
|
51
|
-
$( document.body ).append( input );
|
|
52
|
-
input.value = data;
|
|
53
|
-
input.select();
|
|
54
|
-
result = document.execCommand( 'copy' );
|
|
55
|
-
document.body.removeChild( input );
|
|
56
|
-
|
|
57
|
-
if ( !result ) return;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
amotify.fn.SnackBar.add( {
|
|
61
|
-
children: 'クリップボードにコピーしました'
|
|
62
|
-
} );
|
|
63
|
-
response = {
|
|
64
|
-
ok: true,
|
|
65
|
-
body: ''
|
|
66
|
-
};
|
|
67
|
-
} )();
|
|
68
|
-
|
|
69
|
-
return response;
|
|
70
|
-
}
|
|
71
|
-
$.isJSXElement = function ( v ): v is JSX.Element {
|
|
72
|
-
return v.$$typeof === Symbol.for( 'react.element' );
|
|
73
|
-
}
|
|
74
|
-
$.getCurrentLocation = () => {
|
|
75
|
-
return new Promise( ( resolve,reject ) => {
|
|
76
|
-
navigator.geolocation.getCurrentPosition( ( position ) => {
|
|
77
|
-
let {
|
|
78
|
-
latitude,
|
|
79
|
-
longitude
|
|
80
|
-
} = position.coords;
|
|
81
|
-
resolve( {
|
|
82
|
-
ok: true,
|
|
83
|
-
status: 200,
|
|
84
|
-
body: {
|
|
85
|
-
lat: latitude,
|
|
86
|
-
lng: longitude
|
|
87
|
-
}
|
|
88
|
-
} );
|
|
89
|
-
},( error ) => {
|
|
90
|
-
resolve( {
|
|
91
|
-
ok: false,
|
|
92
|
-
status: 500,
|
|
93
|
-
body: {
|
|
94
|
-
reason: error
|
|
95
|
-
}
|
|
96
|
-
} );
|
|
97
|
-
} );
|
|
98
|
-
} );
|
|
99
|
-
}
|
|
100
|
-
$.CDNReader = ( url ) => {
|
|
101
|
-
return new Promise( ( resolve,reject ) => {
|
|
102
|
-
let tag = document.createElement( 'script' );
|
|
103
|
-
tag.src = url;
|
|
104
|
-
tag.addEventListener( 'load',() => {
|
|
105
|
-
resolve( 'OK' );
|
|
106
|
-
} );
|
|
107
|
-
$( document.body ).append( tag );
|
|
108
|
-
} );
|
|
109
|
-
}
|
|
110
|
-
$.ImageLoader = ( dataUrl,img ) => {
|
|
111
|
-
return new Promise( ( resolve,reject ) => {
|
|
112
|
-
let Img = img ? img : new Image();
|
|
113
|
-
Img.onload = () => resolve( Img );
|
|
114
|
-
Img.onerror = ( e ) => reject( e );
|
|
115
|
-
Img.src = dataUrl;
|
|
116
|
-
} );
|
|
117
|
-
}
|
|
118
|
-
$.extend( {
|
|
119
|
-
zen2hanNumber: function ( this: string ) {
|
|
120
|
-
return this.replace( /[0-9]/g,function ( s: any ) {
|
|
121
|
-
return String.fromCharCode( s.charCodeAt( 0 ) - 0xFEE0 );
|
|
122
|
-
} )
|
|
123
|
-
.replace( /[--﹣−‐⁃‑‒–—﹘―⎯⏤ーー─━]/g,'-' )
|
|
124
|
-
.replace( /¥/,'¥' )
|
|
125
|
-
.replace( /、/,',' )
|
|
126
|
-
.replace( /(/,'(' )
|
|
127
|
-
.replace( /)/,')' )
|
|
128
|
-
.replace( /+/,'+' );
|
|
129
|
-
}
|
|
130
|
-
},String );
|
package/src/@styles/@app.scss
DELETED