amotify 0.0.4 → 0.0.6

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.
Files changed (233) hide show
  1. package/dist/@jsminAmotifyExtension/formCollect.js +1 -1
  2. package/dist/Atoms/Logo/parts.js +1 -1
  3. package/dist/Atoms/Various/parts.js +1 -1
  4. package/dist/Functions/Button/_.js +1 -1
  5. package/dist/Functions/Cropper/parts.js +4 -4
  6. package/dist/Functions/Effects/Fade.js +2 -2
  7. package/dist/Functions/Input/Chips/Selector.js +4 -4
  8. package/dist/Functions/Input/Chips/_.js +3 -3
  9. package/dist/Functions/Input/DigitCharacters.js +3 -3
  10. package/dist/Functions/Input/File/_.js +4 -4
  11. package/dist/Functions/Input/List/_.js +3 -3
  12. package/dist/Functions/Input/Segmented/_.js +1 -1
  13. package/dist/Functions/Input/Select/_.js +2 -2
  14. package/dist/Functions/Input/Slider/_.js +3 -3
  15. package/dist/Functions/Input/Switch/_.js +4 -4
  16. package/dist/Functions/Input/Text.js +2 -2
  17. package/dist/Functions/Input/TextArea.js +1 -1
  18. package/dist/Functions/Input/Time/Picker.js +4 -4
  19. package/dist/Functions/Input/Time/_.js +3 -3
  20. package/dist/Functions/Input/_.js +4 -4
  21. package/dist/Functions/Input/core.js +4 -4
  22. package/dist/Functions/Inputs/text.js +1 -1
  23. package/dist/Functions/Layout/PageNotFound.js +3 -3
  24. package/dist/Functions/Layout/PageRouter.js +2 -2
  25. package/dist/Functions/Layout/PageViewController/parts.js +2 -2
  26. package/dist/Functions/Layout/Plate.js +1 -1
  27. package/dist/Functions/Layout/RootViewController/parts.js +4 -4
  28. package/dist/Functions/Layout/SwipeView/parts.js +2 -2
  29. package/dist/Functions/Layout/TabBar.js +3 -3
  30. package/dist/Functions/Loader/corner.js +2 -2
  31. package/dist/Functions/Loader/mini.js +2 -2
  32. package/dist/Functions/Loader/parts.js +1 -1
  33. package/dist/Functions/Loader/top.js +2 -2
  34. package/dist/Functions/Sheet/parts.js +4 -4
  35. package/dist/Functions/SnackBar/parts.js +4 -4
  36. package/dist/Functions/Table/Data/parts.js +4 -4
  37. package/dist/Functions/Table/Drag/parts.js +3 -3
  38. package/dist/Functions/Table/_.js +2 -2
  39. package/dist/Functions/Tooltips/parts.js +2 -2
  40. package/dist/Molecules/@export.js +1 -1
  41. package/dist/Molecules/Accordion/parts.js +2 -2
  42. package/dist/Molecules/LinkifyText/parts.js +2 -2
  43. package/dist/Molecules/List.js +1 -1
  44. package/dist/Organisms/DisplayStyleInput/darkmode.js +4 -4
  45. package/dist/Organisms/DisplayStyleInput/themeColor.js +4 -4
  46. package/dist/Templates/PlayGround/parts.js +5 -5
  47. package/dist/launch.js +6 -6
  48. package/package.json +6 -5
  49. package/public/amotify.js +310 -0
  50. package/public/amotify.min.css +12724 -0
  51. package/dist/src/@jsminAmotifyExtension/_.d.ts +0 -4
  52. package/dist/src/@jsminAmotifyExtension/fetch.d.ts +0 -9
  53. package/dist/src/@jsminAmotifyExtension/formCollect.d.ts +0 -1
  54. package/dist/src/@jsminAmotifyExtension/spreadSheet.d.ts +0 -4
  55. package/dist/src/@jsminAmotifyExtension/variables.d.ts +0 -0
  56. package/dist/src/@types/_.d.ts +0 -6
  57. package/dist/src/@types/amot.d.ts +0 -260
  58. package/dist/src/@types/fn.d.ts +0 -1040
  59. package/dist/src/@types/index.d.ts +0 -62
  60. package/dist/src/@types/jsminAmotifyExtension.d.ts +0 -134
  61. package/dist/src/@types/module.d.ts +0 -2
  62. package/dist/src/@types/state.d.ts +0 -145
  63. package/dist/src/Atoms/@export.d.ts +0 -4
  64. package/dist/src/Atoms/FAIcon/parts.d.ts +0 -2
  65. package/dist/src/Atoms/Logo/parts.d.ts +0 -1
  66. package/dist/src/Atoms/Various/parts.d.ts +0 -9
  67. package/dist/src/Functions/@export.d.ts +0 -12
  68. package/dist/src/Functions/Button/_.d.ts +0 -1
  69. package/dist/src/Functions/Cropper/parts.d.ts +0 -1
  70. package/dist/src/Functions/Effects/Fade.d.ts +0 -1
  71. package/dist/src/Functions/Effects/Ripple.d.ts +0 -1
  72. package/dist/src/Functions/Effects/_.d.ts +0 -3
  73. package/dist/src/Functions/Input/Chips/Selector.d.ts +0 -1
  74. package/dist/src/Functions/Input/Chips/_.d.ts +0 -2
  75. package/dist/src/Functions/Input/DigitCharacters.d.ts +0 -1
  76. package/dist/src/Functions/Input/File/_.d.ts +0 -2
  77. package/dist/src/Functions/Input/Hidden.d.ts +0 -1
  78. package/dist/src/Functions/Input/List/_.d.ts +0 -1
  79. package/dist/src/Functions/Input/Segmented/_.d.ts +0 -1
  80. package/dist/src/Functions/Input/Select/_.d.ts +0 -1
  81. package/dist/src/Functions/Input/Slider/_.d.ts +0 -1
  82. package/dist/src/Functions/Input/Switch/_.d.ts +0 -1
  83. package/dist/src/Functions/Input/Text.d.ts +0 -5
  84. package/dist/src/Functions/Input/TextArea.d.ts +0 -1
  85. package/dist/src/Functions/Input/Time/Picker.d.ts +0 -1
  86. package/dist/src/Functions/Input/Time/_.d.ts +0 -2
  87. package/dist/src/Functions/Input/_.d.ts +0 -5
  88. package/dist/src/Functions/Input/core.d.ts +0 -34
  89. package/dist/src/Functions/Inputs/_.d.ts +0 -3
  90. package/dist/src/Functions/Inputs/text.d.ts +0 -12
  91. package/dist/src/Functions/Layout/PageNotFound.d.ts +0 -1
  92. package/dist/src/Functions/Layout/PageRouter.d.ts +0 -2
  93. package/dist/src/Functions/Layout/PageViewController/parts.d.ts +0 -1
  94. package/dist/src/Functions/Layout/Plate.d.ts +0 -1
  95. package/dist/src/Functions/Layout/RootViewController/parts.d.ts +0 -1
  96. package/dist/src/Functions/Layout/SwipeView/parts.d.ts +0 -2
  97. package/dist/src/Functions/Layout/TabBar.d.ts +0 -1
  98. package/dist/src/Functions/Layout/_.d.ts +0 -2
  99. package/dist/src/Functions/Loader/corner.d.ts +0 -1
  100. package/dist/src/Functions/Loader/mini.d.ts +0 -33
  101. package/dist/src/Functions/Loader/parts.d.ts +0 -3
  102. package/dist/src/Functions/Loader/top.d.ts +0 -1
  103. package/dist/src/Functions/Sheet/parts.d.ts +0 -2
  104. package/dist/src/Functions/SnackBar/parts.d.ts +0 -2
  105. package/dist/src/Functions/Table/Data/parts.d.ts +0 -3
  106. package/dist/src/Functions/Table/Drag/parts.d.ts +0 -1
  107. package/dist/src/Functions/Table/Normal/parts.d.ts +0 -1
  108. package/dist/src/Functions/Table/_.d.ts +0 -9
  109. package/dist/src/Functions/Tooltips/parts.d.ts +0 -2
  110. package/dist/src/Global/@export.d.ts +0 -12
  111. package/dist/src/Global/LaunchReactApplication.d.ts +0 -1
  112. package/dist/src/Global/styleConverter.d.ts +0 -2
  113. package/dist/src/Molecules/@export.d.ts +0 -21
  114. package/dist/src/Molecules/Accordion/parts.d.ts +0 -2
  115. package/dist/src/Molecules/LinkifyText/parts.d.ts +0 -1
  116. package/dist/src/Molecules/List.d.ts +0 -1
  117. package/dist/src/Organisms/@export.d.ts +0 -2
  118. package/dist/src/Organisms/DisplayStyleInput/_.d.ts +0 -1
  119. package/dist/src/Organisms/DisplayStyleInput/darkmode.d.ts +0 -1
  120. package/dist/src/Organisms/DisplayStyleInput/themeColor.d.ts +0 -27
  121. package/dist/src/Templates/@export.d.ts +0 -2
  122. package/dist/src/Templates/PlayGround/parts.d.ts +0 -1
  123. package/dist/src/config.d.ts +0 -16
  124. package/dist/src/launch.d.ts +0 -9
  125. package/dist/src/preload.d.ts +0 -1
  126. package/src/@jsminAmotifyExtension/_.tsx +0 -4
  127. package/src/@jsminAmotifyExtension/fetch.tsx +0 -107
  128. package/src/@jsminAmotifyExtension/formCollect.tsx +0 -89
  129. package/src/@jsminAmotifyExtension/spreadSheet.tsx +0 -159
  130. package/src/@jsminAmotifyExtension/variables.tsx +0 -130
  131. package/src/@styles/@app.scss +0 -4
  132. package/src/@styles/@variables/customProps.scss +0 -109
  133. package/src/@styles/@variables/styleSet.scss +0 -38
  134. package/src/@styles/@variables/themeColor.scss +0 -71
  135. package/src/@styles/@variables/var.scss +0 -171
  136. package/src/@styles/UniStyling.scss +0 -996
  137. package/src/@styles/init.scss +0 -154
  138. package/src/@types/_.tsx +0 -6
  139. package/src/@types/amot.tsx +0 -323
  140. package/src/@types/fn.tsx +0 -1210
  141. package/src/@types/index.tsx +0 -74
  142. package/src/@types/jsminAmotifyExtension.tsx +0 -143
  143. package/src/@types/module.tsx +0 -2
  144. package/src/@types/state.tsx +0 -199
  145. package/src/Atoms/@export.tsx +0 -32
  146. package/src/Atoms/FAIcon/parts.tsx +0 -117
  147. package/src/Atoms/FAIcon/style.module.scss +0 -9
  148. package/src/Atoms/Logo/parts.tsx +0 -335
  149. package/src/Atoms/Logo/style.module.scss +0 -96
  150. package/src/Atoms/Various/parts.tsx +0 -157
  151. package/src/Atoms/Various/style.module.scss +0 -40
  152. package/src/Functions/@export.tsx +0 -29
  153. package/src/Functions/Button/_.tsx +0 -305
  154. package/src/Functions/Button/style.module.scss +0 -183
  155. package/src/Functions/Cropper/parts.tsx +0 -1061
  156. package/src/Functions/Cropper/style.module.scss +0 -62
  157. package/src/Functions/Effects/Fade.tsx +0 -81
  158. package/src/Functions/Effects/Ripple.tsx +0 -141
  159. package/src/Functions/Effects/_.tsx +0 -33
  160. package/src/Functions/Effects/style.module.scss +0 -83
  161. package/src/Functions/Input/Chips/Selector.tsx +0 -451
  162. package/src/Functions/Input/Chips/_.tsx +0 -286
  163. package/src/Functions/Input/Chips/style.module.scss +0 -6
  164. package/src/Functions/Input/DigitCharacters.tsx +0 -241
  165. package/src/Functions/Input/File/_.tsx +0 -596
  166. package/src/Functions/Input/File/style.module.scss +0 -34
  167. package/src/Functions/Input/Hidden.tsx +0 -18
  168. package/src/Functions/Input/List/_.tsx +0 -383
  169. package/src/Functions/Input/List/style.module.scss +0 -84
  170. package/src/Functions/Input/Segmented/_.tsx +0 -238
  171. package/src/Functions/Input/Segmented/style.module.scss +0 -81
  172. package/src/Functions/Input/Select/_.tsx +0 -225
  173. package/src/Functions/Input/Select/style.module.scss +0 -10
  174. package/src/Functions/Input/Slider/_.tsx +0 -519
  175. package/src/Functions/Input/Slider/style.module.scss +0 -67
  176. package/src/Functions/Input/Switch/_.tsx +0 -177
  177. package/src/Functions/Input/Switch/style.module.scss +0 -18
  178. package/src/Functions/Input/Text.tsx +0 -437
  179. package/src/Functions/Input/TextArea.tsx +0 -115
  180. package/src/Functions/Input/Time/Picker.tsx +0 -950
  181. package/src/Functions/Input/Time/_.tsx +0 -736
  182. package/src/Functions/Input/Time/style.module.scss +0 -72
  183. package/src/Functions/Input/_.tsx +0 -793
  184. package/src/Functions/Input/core.tsx +0 -461
  185. package/src/Functions/Input/style.module.scss +0 -43
  186. package/src/Functions/Inputs/_.tsx +0 -5
  187. package/src/Functions/Inputs/style.module.scss +0 -15
  188. package/src/Functions/Inputs/text.tsx +0 -67
  189. package/src/Functions/Inputs/types.d.ts +0 -1
  190. package/src/Functions/Layout/PageNotFound.tsx +0 -81
  191. package/src/Functions/Layout/PageRouter.tsx +0 -107
  192. package/src/Functions/Layout/PageViewController/parts.tsx +0 -32
  193. package/src/Functions/Layout/Plate.tsx +0 -30
  194. package/src/Functions/Layout/RootViewController/parts.tsx +0 -290
  195. package/src/Functions/Layout/RootViewController/style.module.scss +0 -24
  196. package/src/Functions/Layout/SwipeView/parts.tsx +0 -380
  197. package/src/Functions/Layout/SwipeView/style.module.scss +0 -19
  198. package/src/Functions/Layout/TabBar.tsx +0 -64
  199. package/src/Functions/Layout/_.tsx +0 -20
  200. package/src/Functions/Loader/corner.tsx +0 -78
  201. package/src/Functions/Loader/mini.tsx +0 -117
  202. package/src/Functions/Loader/parts.tsx +0 -105
  203. package/src/Functions/Loader/style.module.scss +0 -222
  204. package/src/Functions/Loader/top.tsx +0 -90
  205. package/src/Functions/Sheet/parts.tsx +0 -972
  206. package/src/Functions/Sheet/style.module.scss +0 -235
  207. package/src/Functions/SnackBar/parts.tsx +0 -215
  208. package/src/Functions/SnackBar/style.module.scss +0 -25
  209. package/src/Functions/Table/Data/parts.tsx +0 -955
  210. package/src/Functions/Table/Drag/parts.tsx +0 -448
  211. package/src/Functions/Table/Normal/parts.tsx +0 -123
  212. package/src/Functions/Table/_.tsx +0 -170
  213. package/src/Functions/Table/style.module.scss +0 -92
  214. package/src/Functions/Tooltips/parts.tsx +0 -52
  215. package/src/Global/@export.tsx +0 -138
  216. package/src/Global/LaunchReactApplication.tsx +0 -30
  217. package/src/Global/exe.tsx +0 -0
  218. package/src/Global/styleConverter.tsx +0 -435
  219. package/src/Molecules/@export.tsx +0 -95
  220. package/src/Molecules/Accordion/parts.tsx +0 -146
  221. package/src/Molecules/Accordion/style.module.scss +0 -13
  222. package/src/Molecules/LinkifyText/parts.tsx +0 -54
  223. package/src/Molecules/List.tsx +0 -30
  224. package/src/Organisms/@export.tsx +0 -5
  225. package/src/Organisms/DisplayStyleInput/_.tsx +0 -18
  226. package/src/Organisms/DisplayStyleInput/darkmode.tsx +0 -112
  227. package/src/Organisms/DisplayStyleInput/themeColor.tsx +0 -210
  228. package/src/Templates/@export.tsx +0 -7
  229. package/src/Templates/PlayGround/parts.tsx +0 -115
  230. package/src/Templates/PlayGround/style.module.scss +0 -38
  231. package/src/config.tsx +0 -132
  232. package/src/launch.tsx +0 -100
  233. package/src/preload.tsx +0 -49
@@ -1,170 +0,0 @@
1
- import {
2
- StyleConverter,
3
- useStore
4
- } from '@global';
5
-
6
- import {
7
- Box,
8
- FAIcon
9
- } from '@atoms';
10
-
11
- export const Comps: amotify.fn.Tables.CompsMethods = {
12
- Table: ( params ) => ( <table { ...StyleConverter.ToClassName( params ) } /> ),
13
- Head: ( params ) => ( <thead { ...StyleConverter.ToClassName( params ) } /> ),
14
- Body: ( params ) => ( <tbody { ...StyleConverter.ToClassName( params ) } /> ),
15
- Row: ( params ) => ( <tr { ...StyleConverter.ToClassName( params ) } /> ),
16
-
17
- TH: ( params ) => ( <th { ...StyleConverter.ToClassName( params ) } /> ),
18
- TD: ( params ) => ( <td { ...StyleConverter.ToClassName( params ) } /> ),
19
-
20
- RightIndicator: {
21
- type: 'td',
22
- unitWidth: 4,
23
- // data: '',
24
- children: <FAIcon.AngleRight
25
- fontColor={ 'theme' }
26
- fontSize={ '4.thirdTitle' }
27
- />
28
- }
29
- }
30
-
31
- import { NormalTable } from './Normal/parts';
32
- import {
33
- DataTable,
34
- DataFNs,
35
- DataComps
36
- } from './Data/parts';
37
- import { DragTable } from './Drag/parts';
38
-
39
- import style from './style.module.scss';
40
-
41
- const Wrapper: FNC<amotify.fn.Tables.Uni.Params & {
42
- type: amotify.fn.Tables.Types
43
- }> = ( params ) => {
44
- let {
45
- tone,
46
- type,
47
- } = params;
48
- params.tableID = params.tableID || $.uuidGen();
49
- tone = tone || 'auto';
50
-
51
- if ( tone == 'auto' ) {
52
- if ( type == 'drag' ) {
53
- tone = 'rowBorder';
54
- } else {
55
- tone = 'border';
56
- }
57
- }
58
-
59
- let Params = {
60
- ...tone != 'plain' ? {
61
- backgroundColor: '1.layer.base',
62
- borderRadius: '1.tone.primary',
63
- } as amotifyUniStyleParams : {},
64
- ...params,
65
- cellStyles: {
66
- padding: '3/4',
67
- backgroundColor: '1.layer.base',
68
- transition: 'short',
69
- textAlign: 'center',
70
- ...DefaultCellStyles( type,tone! ),
71
- ...params.cellStyles
72
- },
73
- tone
74
- }
75
-
76
- let {
77
- className,
78
- style: freeCSS,
79
- ...others
80
- } = StyleConverter.ToClassName( Params as any );
81
-
82
- let ClassName = [
83
- className,
84
- style.Wrap,
85
- style[ 'TableType_' + type ],
86
- style[ 'RowClickable_' + !!( params as any ).onRowClick ]
87
- ].join( ' ' );
88
-
89
- let TableComponent = {
90
- 'normal': NormalTable,
91
- 'data': DataTable,
92
- 'drag': DragTable,
93
- 'spread': ''
94
- }[ type ];
95
-
96
- return ( <Box
97
- className={ ClassName }
98
- style={ freeCSS }
99
- >
100
- <TableComponent { ...others as any } />
101
- </Box> );
102
- }
103
-
104
- let DataComponent: any = ( props: any ) => ( <Wrapper type='data' { ...props } /> );
105
- Object.entries( DataFNs ).forEach( ( [ key,value ] ) => {
106
- DataComponent[ key ] = value;
107
- } );
108
- Object.entries( DataComps ).forEach( ( [ key,value ] ) => {
109
- DataComponent[ key ] = value;
110
- } );
111
-
112
- export const Table: amotify.fn.Tables.Methods = {
113
- Normal: ( props ) => ( <Wrapper type='normal' { ...props } /> ),
114
- Data: DataComponent as amotify.fn.Tables.Data.Methods,
115
- Drag: ( props ) => ( <Wrapper type='drag' { ...props } /> ),
116
- Spread: () => ( <>Table.Spread ( in Progress )</> ),
117
-
118
- Comps
119
- }
120
-
121
- export const DefaultCellStyles = ( type: amotify.fn.Tables.Types,tone: amotify.fn.Tables.Tones ) => {
122
- if ( tone == 'plain' ) return {}
123
-
124
- let Styles: amotifyUniStyleParams = {}
125
- if ( type == 'drag' ) {
126
- Styles.padding = 1;
127
- }
128
-
129
- if ( [ 'border','rowBorder','cellBorder' ].includes( tone ) ) {
130
- Styles.borderBottom = '2.normal';
131
- }
132
-
133
- if ( [ 'border','cellBorder' ].includes( tone ) ) {
134
- Styles.borderRight = '2.normal';
135
- }
136
-
137
- return Styles;
138
- }
139
-
140
- export const DefaultCellSystemStyles = ( args: {
141
- top: boolean
142
- bottom: boolean
143
- left: boolean
144
- right: boolean
145
- } ) => {
146
- let Styles: amotifyUniStyleParams = {}
147
- if ( args.right ) {
148
- Styles.borderRight = 'unset';
149
- }
150
-
151
- if ( args.top ) {
152
- if ( args.left ) {
153
- Styles.borderTopLeftRadius = 'inherit';
154
- }
155
- if ( args.right ) {
156
- Styles.borderTopRightRadius = 'inherit';
157
- }
158
- }
159
- if ( args.bottom ) {
160
- Styles.borderBottom = 'unset';
161
- if ( args.left ) {
162
- Styles.borderBottomLeftRadius = 'inherit';
163
- }
164
- if ( args.right ) {
165
- Styles.borderBottomRightRadius = 'inherit';
166
- }
167
- }
168
-
169
- return Styles;
170
- }
@@ -1,92 +0,0 @@
1
- @use '@uniVar' as *;
2
- @use'@styleSet' as *;
3
- .Wrap {
4
- &.RowClickable_true {
5
- .Row {
6
- &.BodyRow:not(.DataNotFound) {
7
- cursor: pointer;
8
- &:hover .Cell {
9
- background-color: $color-layer2;
10
- }
11
- &:active .Cell {
12
- background-color: $color-layer3;
13
- }
14
- }
15
- }
16
- }
17
- .Table {
18
- @include pureTable();
19
- height: 100%;
20
- border-radius: inherit;
21
- .Row {
22
- border-radius: inherit;
23
- }
24
- }
25
- }
26
- .TableType_ {
27
- &drag {
28
- * {
29
- @include DisableduserSelect();
30
- }
31
- .DraggerOrigin {
32
- .Cell {
33
- transition: $animation-time-middle;
34
- background-color: $color-layer4;
35
- opacity: .8;
36
- pointer-events: none;
37
- }
38
- }
39
- .DragableButton {
40
- cursor: grab;
41
- &:hover {
42
- color: $color-theme;
43
- }
44
- &:active {
45
- color: $color-theme;
46
- }
47
- }
48
- }
49
- &data {
50
- .Console {
51
- width: 100%;
52
- border-bottom: $border-normal;
53
- position: relative;
54
- z-index: 2;
55
- flex: none;
56
- + .TableBase {
57
- border-top-left-radius: 0;
58
- border-top-right-radius: 0;
59
- }
60
- }
61
- .TableBase {
62
- border-radius: inherit;
63
- .Table {
64
- border-radius: inherit;
65
- .HeadRow {
66
- border-radius: inherit;
67
- position: relative;
68
- z-index: 2 !important;
69
- min-width: 100%;
70
- .Cell {
71
- .FilterRegion {
72
- font-size: inherit;
73
- .Filtering_true {
74
- border: none;
75
- background-color: $color-theme !important;
76
- color: #fff !important;
77
- box-shadow: $shadow2;
78
- }
79
- }
80
- }
81
- }
82
- .BodyRow {
83
- position: relative;
84
- z-index: 1;
85
- }
86
- }
87
- }
88
- }
89
- }
90
- .Cell {
91
- font-weight: normal;
92
- }
@@ -1,52 +0,0 @@
1
- import {
2
- Box
3
- } from '@atoms';
4
- import {
5
- Sheet
6
- } from '@functions';
7
-
8
- const Tooltips: amotify.fn.Tooltips.Methods = {
9
- __memoryID: $.uuidGen(),
10
- open: ( params ) => {
11
- let {
12
- tipsID = $.uuidGen(),
13
- tipsGroups = [],
14
- ...sheetParams
15
- } = params;
16
-
17
- Sheet.open( {
18
- sheetID: tipsID!,
19
- sheetGroups: [
20
- 'tooltips',
21
- ...tipsGroups,
22
- ],
23
- closeOption: {
24
- aroundClick: true,
25
- elementBlur: params.parent,
26
- escapeKeyDown: true,
27
- pageTransit: true,
28
- ...params.closeOption,
29
- },
30
- type: 'custom',
31
- ...sheetParams
32
- } );
33
- },
34
- close: ( tipsID ) => {
35
- Sheet.close( tipsID );
36
- },
37
- closeALL: () => {
38
- Sheet.closeGroup( 'tooltips' );
39
- },
40
- Comps: {
41
- Body: ( params ) => ( <Box
42
- padding={ [ '1/3','2/3' ] }
43
- backgroundColor='dark'
44
- borderRadius={ '2.tone.secondary' }
45
- fontColor='white'
46
- boxShadow={ 2 }
47
- { ...params }
48
- /> )
49
- }
50
- }
51
-
52
- export { Tooltips }
@@ -1,138 +0,0 @@
1
- import React from 'react';
2
- import * as ReactDom from 'react-dom';
3
- import * as ReactRouterDom from 'react-router-dom';
4
-
5
- import { LaunchReactApplication } from './LaunchReactApplication';
6
-
7
- const Inmemory: {
8
- [ key: string ]: {
9
- privateKey?: string
10
- value: any
11
- }
12
- } = {}
13
- const useStore: amotify.glob.useStoreParams = {
14
- set: ( params ) => {
15
- let {
16
- key,
17
- value,
18
- privateKey
19
- } = params;
20
- let Prev = Inmemory[ key ] || {}
21
- if ( Prev && Prev.privateKey && Prev.privateKey != privateKey ) return false;
22
-
23
- Inmemory[ key ] = {
24
- privateKey,
25
- value
26
- }
27
- return true;
28
- },
29
- update: ( params ) => {
30
- let {
31
- key,
32
- value,
33
- privateKey
34
- } = params;
35
-
36
- let Prev = Inmemory[ key ] || {}
37
- if ( Prev && Prev.privateKey && Prev.privateKey != privateKey ) return false;
38
-
39
- Inmemory[ key ] = {
40
- ...Inmemory[ key ],
41
- value: {
42
- ...Inmemory[ key ]?.value,
43
- ...value
44
- }
45
- }
46
- return true;
47
- },
48
- get: ( key,privateKey ) => {
49
- let Data = Inmemory[ key ];
50
- if ( Data && Data.privateKey && Data.privateKey != privateKey ) return void 0;
51
- return Data?.value;
52
- },
53
- delete: ( key,privateKey ) => {
54
- let Data = Inmemory[ key ];
55
- if ( Data && Data.privateKey && Data.privateKey != privateKey ) return false;
56
- delete Inmemory[ key ];
57
- return true;
58
- }
59
- }
60
- const useRecycle: amotify.glob.useRecycleParams = {
61
- set: ( key ) => {
62
- let [ val_recycleID ] = React.useState( $.uuidGen() );
63
- let [ val_refresh,set_refresh ] = React.useState( $.uuidGen() );
64
-
65
- useStore.set( {
66
- key: 'RecycleKey_' + val_recycleID,
67
- value: () => {
68
- set_refresh( $.uuidGen() );
69
- }
70
- } )
71
- useStore.update( {
72
- key: 'RecycleKeys_' + key,
73
- value: {
74
- keys: [
75
- ...useStore.get( 'RecycleKeys_' + key )?.keys || [],
76
- val_recycleID
77
- ]
78
- }
79
- } )
80
- return val_refresh;
81
- },
82
- do: ( key ) => {
83
- let Keys = useStore.get( 'RecycleKeys_' + key )?.keys || [];
84
-
85
- if ( !Keys.length ) return;
86
- for ( let key of Keys ) {
87
- let receiver = useStore.get( 'RecycleKey_' + key );
88
- if ( receiver ) receiver();
89
- }
90
- }
91
- }
92
-
93
- const pageTransit: amotify.glob.PageTransitParams = {
94
- open: ( url ) => {
95
- window.open( url );
96
- },
97
- pushSync: ( url ) => {
98
- window.location.href = url;
99
- },
100
- pushAsync: ( url ) => {
101
- if ( url.match( /https?:\/\// ) ) {
102
- pageTransit.pushSync( url );
103
- return;
104
- }
105
- useStore.get( 'history' ).push( url );
106
- },
107
- push: ( url,newTab ) => {
108
- if ( newTab ) {
109
- pageTransit.open( url );
110
- return;
111
- }
112
- pageTransit.pushAsync( url );
113
- },
114
- back: () => {
115
- useStore.get( 'history' ).goBack();
116
- },
117
- }
118
-
119
- import {
120
- ReadStyleSet,
121
- ToClassName
122
- } from './styleConverter';
123
-
124
- const StyleConverter = {
125
- ReadStyleSet,
126
- ToClassName
127
- }
128
-
129
- export {
130
- React,
131
- ReactDom,
132
- ReactRouterDom,
133
- pageTransit,
134
- useStore,
135
- useRecycle,
136
- StyleConverter,
137
- LaunchReactApplication
138
- }
@@ -1,30 +0,0 @@
1
- import * as ReactDom from 'react-dom';
2
- import * as ReactRouterDom from 'react-router-dom';
3
-
4
- export const LaunchReactApplication: amotify.glob.LaunchReactApplicationParams = ( props ) => {
5
- let {
6
- baseElement = '#ROOT',
7
- reactElement,
8
- nonRouter = false,
9
- appearances
10
- } = props;
11
- let Base = $( baseElement )[ 0 ];
12
-
13
- if ( !Base || !reactElement ) return;
14
- if ( appearances ) {
15
- let {
16
- roundness,
17
- tone,
18
- themeColor,
19
- darkMode
20
- } = appearances;
21
-
22
- if ( $.is.exist( roundness ) ) amotify.config.update.roundness( roundness! );
23
- if ( $.is.exist( tone ) ) amotify.config.update.tone( tone! );
24
- if ( $.is.exist( themeColor ) ) amotify.config.update.themeColor( themeColor! );
25
- if ( $.is.exist( darkMode ) ) amotify.config.update.darkMode( darkMode! );
26
- }
27
- let reactDom = nonRouter ? reactElement : <ReactRouterDom.BrowserRouter children={ reactElement } />;
28
-
29
- ReactDom.createRoot( Base ).render( <React.StrictMode children={ reactDom } /> );
30
- }
File without changes