wenay-react2 1.0.20 → 1.0.21
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/README.md +383 -382
- package/lib/common/api.d.ts +28 -0
- package/lib/common/api.js +41 -16
- package/lib/common/src/components/Buttons/MiniButton.d.ts +1 -0
- package/lib/common/src/components/Buttons/MiniButton.js +2 -2
- package/lib/common/src/components/Dnd/DraggableOutlineDiv.d.ts +1 -0
- package/lib/common/src/components/Dnd/DraggableOutlineDiv.js +7 -6
- package/lib/common/src/components/Dnd/RNDFunc.js +28 -17
- package/lib/common/src/components/Dnd/RNDFunc3.d.ts +27 -17
- package/lib/common/src/components/Dnd/RNDFunc3.js +107 -105
- package/lib/common/src/components/Dnd/Resizable.js +3 -3
- package/lib/common/src/components/Menu/RightMenu.js +11 -17
- package/lib/common/src/components/Menu/StickerMenu.js +42 -28
- package/lib/common/src/components/Menu/index.d.ts +1 -1
- package/lib/common/src/components/Menu/index.js +1 -1
- package/lib/common/src/components/Modal/LeftModal.d.ts +14 -12
- package/lib/common/src/components/Modal/LeftModal.js +30 -16
- package/lib/common/src/components/Modal/Modal.d.ts +26 -12
- package/lib/common/src/components/Modal/Modal.js +66 -89
- package/lib/common/src/components/Modal/ModalContextProvider.d.ts +20 -3
- package/lib/common/src/components/Modal/ModalContextProvider.js +35 -8
- package/lib/common/src/components/MyResizeObserver.js +15 -18
- package/lib/common/src/components/Other.js +3 -2
- package/lib/common/src/components/Parameters.js +7 -6
- package/lib/common/src/components/ParametersEngine.js +25 -54
- package/lib/common/src/grid/agGrid4/agGrid4.d.ts +53 -0
- package/lib/common/src/grid/agGrid4/agGrid4.js +132 -0
- package/lib/common/src/grid/agGrid4/core.d.ts +56 -0
- package/lib/common/src/grid/agGrid4/core.js +127 -0
- package/lib/common/src/grid/agGrid4/index.d.ts +6 -0
- package/lib/common/src/grid/agGrid4/index.js +3 -0
- package/lib/common/src/grid/agGrid4/theme.d.ts +7 -0
- package/lib/common/src/grid/agGrid4/theme.js +18 -0
- package/lib/common/src/hooks/useAddDownAnyKey.d.ts +21 -2
- package/lib/common/src/hooks/useAddDownAnyKey.js +46 -8
- package/lib/common/src/hooks/useDraggable.d.ts +20 -2
- package/lib/common/src/hooks/useDraggable.js +146 -115
- package/lib/common/src/hooks/useOutside.d.ts +24 -4
- package/lib/common/src/hooks/useOutside.js +76 -27
- package/lib/common/src/logs/logs.d.ts +5 -2
- package/lib/common/src/logs/logs.js +15 -31
- package/lib/common/src/logs/logs3.d.ts +9 -9
- package/lib/common/src/logs/logs3.js +47 -38
- package/lib/common/src/logs/miniLogs.d.ts +3 -3
- package/lib/common/src/logs/miniLogs.js +28 -36
- package/lib/common/src/menu/menu.d.ts +18 -18
- package/lib/common/src/menu/menu.js +48 -24
- package/lib/common/src/menu/menuMouse.js +4 -1
- package/lib/common/src/menu/menuR.d.ts +2 -2
- package/lib/common/src/menu/menuR.js +34 -34
- package/lib/common/src/myChart/1/myChart.d.ts +5 -5
- package/lib/common/src/myChart/1/myChart.js +58 -47
- package/lib/common/src/myChart/1/myChartTest.js +8 -4
- package/lib/common/src/myChart/chartEngine/chartEngineReact.d.ts +24 -27
- package/lib/common/src/myChart/chartEngine/chartEngineReact.js +166 -117
- package/lib/common/src/styles/styleGrid.d.ts +2 -1
- package/lib/common/src/styles/styleGrid.js +10 -12
- package/lib/common/src/styles/tokens.d.ts +39 -0
- package/lib/common/src/styles/tokens.js +40 -0
- package/lib/common/src/utils/applyTransactionAsyncUpdate.d.ts +7 -0
- package/lib/common/src/utils/applyTransactionAsyncUpdate.js +19 -12
- package/lib/common/src/utils/arrayPromise.d.ts +6 -0
- package/lib/common/src/utils/arrayPromise.js +7 -1
- package/lib/common/src/utils/cache.js +24 -21
- package/lib/common/src/utils/inputAutoStep.d.ts +1 -1
- package/lib/common/src/utils/inputAutoStep.js +30 -19
- package/lib/common/src/utils/mapMemory.js +9 -10
- package/lib/common/updateBy.d.ts +21 -2
- package/lib/common/updateBy.js +66 -31
- package/lib/index.js +0 -2
- package/lib/style/menuRight.css +13 -26
- package/lib/style/style.css +51 -39
- package/lib/style/tokens.css +34 -0
- package/package.json +2 -2
package/lib/style/menuRight.css
CHANGED
|
@@ -1,18 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
--base-color-hover: #fff;
|
|
4
|
-
}
|
|
5
|
-
:root {
|
|
6
|
-
--menu-bg-color: rgba(12, 12, 12, 0.91);
|
|
7
|
-
--menu-blur: 10px;
|
|
8
|
-
--menu-border: var(--base-border);
|
|
9
|
-
--menu-active-background: rgba(255, 255, 255, 0.23);
|
|
10
|
-
|
|
11
|
-
--menu-item-color: var(--base-color-hover);
|
|
12
|
-
--menu-item-hover-color: #101010;
|
|
13
|
-
--menu-item-hover-bg-color: var(--base-color-hover);
|
|
14
|
-
|
|
15
|
-
}
|
|
1
|
+
/* Tokens moved to tokens.css (same values) */
|
|
2
|
+
@import "./tokens.css";
|
|
16
3
|
|
|
17
4
|
.menu-container{
|
|
18
5
|
position: fixed;
|
|
@@ -74,8 +61,8 @@
|
|
|
74
61
|
.submenu {
|
|
75
62
|
background: var(--menu-bg-color);
|
|
76
63
|
|
|
77
|
-
backdrop-filter: blur(var(--menu-blur)); /*
|
|
78
|
-
-webkit-backdrop-filter: blur(var(--menu-blur)); /*
|
|
64
|
+
backdrop-filter: blur(var(--menu-blur)); /* Blur */
|
|
65
|
+
-webkit-backdrop-filter: blur(var(--menu-blur)); /* For Safari */
|
|
79
66
|
|
|
80
67
|
border: var(--menu-border);
|
|
81
68
|
min-width: 200px;
|
|
@@ -85,11 +72,11 @@
|
|
|
85
72
|
/*padding: 20px;*/
|
|
86
73
|
/*margin: 20px;*/
|
|
87
74
|
/*background-color: #fff;*/
|
|
88
|
-
/*border: 1px solid #ddd; !*
|
|
75
|
+
/*border: 1px solid #ddd; !* base border, can be removed *!*/
|
|
89
76
|
cursor: pointer;
|
|
90
77
|
}
|
|
91
78
|
|
|
92
|
-
/*
|
|
79
|
+
/* Pseudo-element for drawing the outline */
|
|
93
80
|
.draggable-div::after {
|
|
94
81
|
content: "";
|
|
95
82
|
position: absolute;
|
|
@@ -102,19 +89,19 @@
|
|
|
102
89
|
box-sizing: border-box;
|
|
103
90
|
}
|
|
104
91
|
|
|
105
|
-
/*
|
|
92
|
+
/* Start the animation while the mouse button is held */
|
|
106
93
|
.draggable-div.outline-animation::after {
|
|
107
94
|
animation: running-line 0.5s linear forwards;
|
|
108
95
|
}
|
|
109
96
|
|
|
110
|
-
/*
|
|
97
|
+
/* If the animation completed, the outline remains */
|
|
111
98
|
.draggable-div.outline-complete::after {
|
|
112
99
|
border-color: #007bff;
|
|
113
|
-
/*
|
|
100
|
+
/* Ensure the pseudo-element shows the full outline */
|
|
114
101
|
clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
|
|
115
102
|
}
|
|
116
103
|
|
|
117
|
-
/*
|
|
104
|
+
/* Running line animation */
|
|
118
105
|
@keyframes running-line {
|
|
119
106
|
0% {
|
|
120
107
|
border-color: transparent;
|
|
@@ -122,15 +109,15 @@
|
|
|
122
109
|
}
|
|
123
110
|
25% {
|
|
124
111
|
border-color: #007bff;
|
|
125
|
-
/*
|
|
112
|
+
/* Draw the top line */
|
|
126
113
|
clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
|
|
127
114
|
}
|
|
128
115
|
50% {
|
|
129
|
-
/*
|
|
116
|
+
/* Add the right side */
|
|
130
117
|
clip-path: polygon(0 0, 100% 0, 100% 100%, 100% 100%);
|
|
131
118
|
}
|
|
132
119
|
75% {
|
|
133
|
-
/*
|
|
120
|
+
/* Add the bottom side */
|
|
134
121
|
clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
|
|
135
122
|
}
|
|
136
123
|
100% {
|
package/lib/style/style.css
CHANGED
|
@@ -1,21 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
--color-bg-dark: #131821;
|
|
4
|
-
--color-bg-light: #17202e;
|
|
1
|
+
/* Tokens moved to tokens.css (same values) */
|
|
2
|
+
@import "./tokens.css";
|
|
5
3
|
|
|
6
|
-
|
|
7
|
-
--color-scrollbar-track: rgba(255, 255, 255, 0);
|
|
8
|
-
--color-scrollbar-thumb: #1d262c;
|
|
9
|
-
/* альтернатива для MSTradeScroll */
|
|
10
|
-
--color-scrollbar-thumb-alt: #4c4562;
|
|
11
|
-
|
|
12
|
-
/* Основные текстовые/обводки */
|
|
13
|
-
--color-text-base: #c4c4c4;
|
|
14
|
-
--color-text-theme: #5D9FFA;
|
|
15
|
-
--color-border-common: rgb(50, 62, 71);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
/* Сбрасываем box-sizing */
|
|
4
|
+
/* Reset box-sizing */
|
|
19
5
|
*,
|
|
20
6
|
*::before,
|
|
21
7
|
*::after {
|
|
@@ -24,7 +10,7 @@
|
|
|
24
10
|
box-sizing: border-box;
|
|
25
11
|
}
|
|
26
12
|
|
|
27
|
-
/*
|
|
13
|
+
/* Main backgrounds */
|
|
28
14
|
html,
|
|
29
15
|
.fon {
|
|
30
16
|
background: var(--color-bg-dark);
|
|
@@ -33,16 +19,16 @@ html,
|
|
|
33
19
|
background: var(--color-bg-light);
|
|
34
20
|
}
|
|
35
21
|
|
|
36
|
-
/*
|
|
22
|
+
/* Scrollbar styles */
|
|
37
23
|
body::-webkit-scrollbar {
|
|
38
|
-
width: 12px; /*
|
|
24
|
+
width: 12px; /* scrollbar width */
|
|
39
25
|
}
|
|
40
26
|
::-webkit-scrollbar-track {
|
|
41
|
-
background: var(--color-scrollbar-track); /*
|
|
27
|
+
background: var(--color-scrollbar-track); /* track color */
|
|
42
28
|
}
|
|
43
29
|
::-webkit-scrollbar-thumb {
|
|
44
|
-
background-color: var(--color-scrollbar-thumb); /*
|
|
45
|
-
border-radius: 20px; /*
|
|
30
|
+
background-color: var(--color-scrollbar-thumb); /* thumb color */
|
|
31
|
+
border-radius: 20px; /* thumb rounding */
|
|
46
32
|
}
|
|
47
33
|
|
|
48
34
|
.MSTradeScroll .ag-body-viewport::-webkit-scrollbar-track {
|
|
@@ -53,7 +39,7 @@ body::-webkit-scrollbar {
|
|
|
53
39
|
border-radius: 20px;
|
|
54
40
|
}
|
|
55
41
|
|
|
56
|
-
/*
|
|
42
|
+
/* Duplicate scrollbar selectors for engines that need them */
|
|
57
43
|
*::-webkit-scrollbar {
|
|
58
44
|
width: 12px;
|
|
59
45
|
}
|
|
@@ -65,7 +51,7 @@ body::-webkit-scrollbar {
|
|
|
65
51
|
border-radius: 20px;
|
|
66
52
|
}
|
|
67
53
|
|
|
68
|
-
/*
|
|
54
|
+
/* Buttons */
|
|
69
55
|
.defButton {
|
|
70
56
|
padding: 20px;
|
|
71
57
|
display: block;
|
|
@@ -85,7 +71,7 @@ html {
|
|
|
85
71
|
display: flex;
|
|
86
72
|
}
|
|
87
73
|
|
|
88
|
-
/*
|
|
74
|
+
/* Inputs */
|
|
89
75
|
.toNumberInput {
|
|
90
76
|
width: 70px;
|
|
91
77
|
margin-right: 10%;
|
|
@@ -94,7 +80,7 @@ input:invalid {
|
|
|
94
80
|
box-shadow: 0 0 5px 1px red;
|
|
95
81
|
}
|
|
96
82
|
|
|
97
|
-
/*
|
|
83
|
+
/* Button blocks, mini elements */
|
|
98
84
|
.toButton,
|
|
99
85
|
.miniEl,
|
|
100
86
|
.toButtonA,
|
|
@@ -104,7 +90,7 @@ input:invalid {
|
|
|
104
90
|
cursor: default;
|
|
105
91
|
}
|
|
106
92
|
|
|
107
|
-
/*
|
|
93
|
+
/* Switch buttons */
|
|
108
94
|
.LeftMenuParameters {
|
|
109
95
|
font-size: 12px;
|
|
110
96
|
min-height: 30px;
|
|
@@ -116,7 +102,7 @@ input:invalid {
|
|
|
116
102
|
font-size: 12px;
|
|
117
103
|
}
|
|
118
104
|
|
|
119
|
-
/*
|
|
105
|
+
/* Fill the remaining space with the last div */
|
|
120
106
|
.toSpace,
|
|
121
107
|
.toSpaceColum {
|
|
122
108
|
display: flex;
|
|
@@ -131,7 +117,7 @@ input:invalid {
|
|
|
131
117
|
flex: 1 1 100%;
|
|
132
118
|
}
|
|
133
119
|
|
|
134
|
-
/*
|
|
120
|
+
/* Buttons */
|
|
135
121
|
.toButton {
|
|
136
122
|
padding: 8px 10px;
|
|
137
123
|
height: 30px;
|
|
@@ -148,7 +134,7 @@ input:invalid {
|
|
|
148
134
|
display: block;
|
|
149
135
|
}
|
|
150
136
|
|
|
151
|
-
/*
|
|
137
|
+
/* Menu */
|
|
152
138
|
.MenuR {
|
|
153
139
|
box-shadow: 0 0 20px 14px rgba(34, 60, 80, 0.2);
|
|
154
140
|
margin-top: 4px;
|
|
@@ -178,7 +164,7 @@ input:invalid {
|
|
|
178
164
|
border: solid 1px var(--color-border-common);
|
|
179
165
|
}
|
|
180
166
|
|
|
181
|
-
/*
|
|
167
|
+
/* Hover/activity */
|
|
182
168
|
.toButtonA,
|
|
183
169
|
.miniEl:hover {
|
|
184
170
|
user-select: none;
|
|
@@ -208,7 +194,7 @@ input:invalid {
|
|
|
208
194
|
color: var(--color-text-theme);
|
|
209
195
|
}
|
|
210
196
|
|
|
211
|
-
/*
|
|
197
|
+
/* Menu indicator elements */
|
|
212
198
|
.toIndicatorMenuButton {
|
|
213
199
|
user-select: none;
|
|
214
200
|
padding-left: 10px;
|
|
@@ -220,7 +206,7 @@ input:invalid {
|
|
|
220
206
|
background: #3a4b57;
|
|
221
207
|
}
|
|
222
208
|
|
|
223
|
-
/*
|
|
209
|
+
/* Input styles */
|
|
224
210
|
.inputCan {
|
|
225
211
|
-webkit-writing-mode: horizontal-tb !important;
|
|
226
212
|
text-rendering: auto;
|
|
@@ -254,7 +240,7 @@ input:invalid {
|
|
|
254
240
|
border-image: none;
|
|
255
241
|
}
|
|
256
242
|
|
|
257
|
-
/*
|
|
243
|
+
/* Form buttons */
|
|
258
244
|
button[type="submit"] {
|
|
259
245
|
background: #86b32d;
|
|
260
246
|
border-bottom: 1px solid #5d7d1f;
|
|
@@ -270,7 +256,7 @@ input[type="color"] {
|
|
|
270
256
|
display: block;
|
|
271
257
|
}
|
|
272
258
|
|
|
273
|
-
/*
|
|
259
|
+
/* Main body */
|
|
274
260
|
body {
|
|
275
261
|
color: var(--color-text-base);
|
|
276
262
|
vertical-align: middle;
|
|
@@ -285,13 +271,13 @@ body {
|
|
|
285
271
|
display: flex;
|
|
286
272
|
}
|
|
287
273
|
|
|
288
|
-
/*
|
|
274
|
+
/* Text blocks */
|
|
289
275
|
.toPTextIndicator {
|
|
290
276
|
margin-block-start: 0.7em;
|
|
291
277
|
margin-block-end: 0.7em;
|
|
292
278
|
}
|
|
293
279
|
|
|
294
|
-
/* React
|
|
280
|
+
/* React enter/exit animations */
|
|
295
281
|
.example-exit {
|
|
296
282
|
opacity: 1;
|
|
297
283
|
transform: translateY(0px);
|
|
@@ -302,7 +288,7 @@ body {
|
|
|
302
288
|
transition: 0.3s;
|
|
303
289
|
}
|
|
304
290
|
|
|
305
|
-
/*
|
|
291
|
+
/* Additional .msTradeAlt styles */
|
|
306
292
|
.msTradeAlt {
|
|
307
293
|
font-size: 12px;
|
|
308
294
|
cursor: default;
|
|
@@ -332,3 +318,29 @@ body {
|
|
|
332
318
|
margin-top: -1px;
|
|
333
319
|
margin-left: -1px;
|
|
334
320
|
}
|
|
321
|
+
|
|
322
|
+
/* Window close button (DivRnd3 and others) */
|
|
323
|
+
.wenayCloseBtn {
|
|
324
|
+
width: 28px;
|
|
325
|
+
height: 28px;
|
|
326
|
+
display: flex;
|
|
327
|
+
align-items: center;
|
|
328
|
+
justify-content: center;
|
|
329
|
+
border-radius: 50%;
|
|
330
|
+
background: var(--color-bg-light);
|
|
331
|
+
border: 1px solid var(--color-border-common);
|
|
332
|
+
color: var(--color-text-base);
|
|
333
|
+
cursor: pointer;
|
|
334
|
+
user-select: none;
|
|
335
|
+
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
|
|
336
|
+
transition: background 0.15s, color 0.15s, transform 0.15s;
|
|
337
|
+
}
|
|
338
|
+
.wenayCloseBtn:hover {
|
|
339
|
+
background: #e5484d;
|
|
340
|
+
border-color: #e5484d;
|
|
341
|
+
color: #fff;
|
|
342
|
+
transform: scale(1.08);
|
|
343
|
+
}
|
|
344
|
+
.wenayCloseBtn:active {
|
|
345
|
+
transform: scale(0.95);
|
|
346
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/* Shared library design tokens. Values are collected from style.css and menuRight.css
|
|
2
|
+
without changes. TS mirror for inline styles and ag-grid themes - src/common/src/styles/tokens.ts */
|
|
3
|
+
:root {
|
|
4
|
+
/* Main background colors */
|
|
5
|
+
--color-bg-dark: #131821;
|
|
6
|
+
--color-bg-light: #17202e;
|
|
7
|
+
|
|
8
|
+
/* Scroll */
|
|
9
|
+
--color-scrollbar-track: rgba(255, 255, 255, 0);
|
|
10
|
+
--color-scrollbar-thumb: #1d262c;
|
|
11
|
+
/* alternative for MSTradeScroll */
|
|
12
|
+
--color-scrollbar-thumb-alt: #4c4562;
|
|
13
|
+
|
|
14
|
+
/* Main text/outline colors */
|
|
15
|
+
--color-text-base: #c4c4c4;
|
|
16
|
+
--color-text-theme: #5D9FFA;
|
|
17
|
+
--color-border-common: rgb(50, 62, 71);
|
|
18
|
+
|
|
19
|
+
/* Menu base */
|
|
20
|
+
--base-border: 1px solid rgba(255, 255, 255, 0.41);
|
|
21
|
+
--base-color-hover: #fff;
|
|
22
|
+
|
|
23
|
+
/* Menu */
|
|
24
|
+
--menu-bg-color: rgba(12, 12, 12, 0.91);
|
|
25
|
+
--menu-blur: 10px;
|
|
26
|
+
--menu-border: var(--base-border);
|
|
27
|
+
--menu-active-background: rgba(255, 255, 255, 0.23);
|
|
28
|
+
--menu-item-color: var(--base-color-hover);
|
|
29
|
+
--menu-item-hover-color: #101010;
|
|
30
|
+
--menu-item-hover-bg-color: var(--base-color-hover);
|
|
31
|
+
|
|
32
|
+
/* Layers */
|
|
33
|
+
--wenay-z-modal: 9999;
|
|
34
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wenay-react2",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.21",
|
|
4
4
|
"description": "Common react",
|
|
5
5
|
"strict": true,
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"react": "^19.2.0",
|
|
24
24
|
"react-dom": "^19.2.0",
|
|
25
25
|
"react-rnd": "^10.5.3",
|
|
26
|
-
"wenay-common2": "^1.0.
|
|
26
|
+
"wenay-common2": "^1.0.49"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
29
|
"react": "^19.2.0",
|