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.
Files changed (74) hide show
  1. package/README.md +383 -382
  2. package/lib/common/api.d.ts +28 -0
  3. package/lib/common/api.js +41 -16
  4. package/lib/common/src/components/Buttons/MiniButton.d.ts +1 -0
  5. package/lib/common/src/components/Buttons/MiniButton.js +2 -2
  6. package/lib/common/src/components/Dnd/DraggableOutlineDiv.d.ts +1 -0
  7. package/lib/common/src/components/Dnd/DraggableOutlineDiv.js +7 -6
  8. package/lib/common/src/components/Dnd/RNDFunc.js +28 -17
  9. package/lib/common/src/components/Dnd/RNDFunc3.d.ts +27 -17
  10. package/lib/common/src/components/Dnd/RNDFunc3.js +107 -105
  11. package/lib/common/src/components/Dnd/Resizable.js +3 -3
  12. package/lib/common/src/components/Menu/RightMenu.js +11 -17
  13. package/lib/common/src/components/Menu/StickerMenu.js +42 -28
  14. package/lib/common/src/components/Menu/index.d.ts +1 -1
  15. package/lib/common/src/components/Menu/index.js +1 -1
  16. package/lib/common/src/components/Modal/LeftModal.d.ts +14 -12
  17. package/lib/common/src/components/Modal/LeftModal.js +30 -16
  18. package/lib/common/src/components/Modal/Modal.d.ts +26 -12
  19. package/lib/common/src/components/Modal/Modal.js +66 -89
  20. package/lib/common/src/components/Modal/ModalContextProvider.d.ts +20 -3
  21. package/lib/common/src/components/Modal/ModalContextProvider.js +35 -8
  22. package/lib/common/src/components/MyResizeObserver.js +15 -18
  23. package/lib/common/src/components/Other.js +3 -2
  24. package/lib/common/src/components/Parameters.js +7 -6
  25. package/lib/common/src/components/ParametersEngine.js +25 -54
  26. package/lib/common/src/grid/agGrid4/agGrid4.d.ts +53 -0
  27. package/lib/common/src/grid/agGrid4/agGrid4.js +132 -0
  28. package/lib/common/src/grid/agGrid4/core.d.ts +56 -0
  29. package/lib/common/src/grid/agGrid4/core.js +127 -0
  30. package/lib/common/src/grid/agGrid4/index.d.ts +6 -0
  31. package/lib/common/src/grid/agGrid4/index.js +3 -0
  32. package/lib/common/src/grid/agGrid4/theme.d.ts +7 -0
  33. package/lib/common/src/grid/agGrid4/theme.js +18 -0
  34. package/lib/common/src/hooks/useAddDownAnyKey.d.ts +21 -2
  35. package/lib/common/src/hooks/useAddDownAnyKey.js +46 -8
  36. package/lib/common/src/hooks/useDraggable.d.ts +20 -2
  37. package/lib/common/src/hooks/useDraggable.js +146 -115
  38. package/lib/common/src/hooks/useOutside.d.ts +24 -4
  39. package/lib/common/src/hooks/useOutside.js +76 -27
  40. package/lib/common/src/logs/logs.d.ts +5 -2
  41. package/lib/common/src/logs/logs.js +15 -31
  42. package/lib/common/src/logs/logs3.d.ts +9 -9
  43. package/lib/common/src/logs/logs3.js +47 -38
  44. package/lib/common/src/logs/miniLogs.d.ts +3 -3
  45. package/lib/common/src/logs/miniLogs.js +28 -36
  46. package/lib/common/src/menu/menu.d.ts +18 -18
  47. package/lib/common/src/menu/menu.js +48 -24
  48. package/lib/common/src/menu/menuMouse.js +4 -1
  49. package/lib/common/src/menu/menuR.d.ts +2 -2
  50. package/lib/common/src/menu/menuR.js +34 -34
  51. package/lib/common/src/myChart/1/myChart.d.ts +5 -5
  52. package/lib/common/src/myChart/1/myChart.js +58 -47
  53. package/lib/common/src/myChart/1/myChartTest.js +8 -4
  54. package/lib/common/src/myChart/chartEngine/chartEngineReact.d.ts +24 -27
  55. package/lib/common/src/myChart/chartEngine/chartEngineReact.js +166 -117
  56. package/lib/common/src/styles/styleGrid.d.ts +2 -1
  57. package/lib/common/src/styles/styleGrid.js +10 -12
  58. package/lib/common/src/styles/tokens.d.ts +39 -0
  59. package/lib/common/src/styles/tokens.js +40 -0
  60. package/lib/common/src/utils/applyTransactionAsyncUpdate.d.ts +7 -0
  61. package/lib/common/src/utils/applyTransactionAsyncUpdate.js +19 -12
  62. package/lib/common/src/utils/arrayPromise.d.ts +6 -0
  63. package/lib/common/src/utils/arrayPromise.js +7 -1
  64. package/lib/common/src/utils/cache.js +24 -21
  65. package/lib/common/src/utils/inputAutoStep.d.ts +1 -1
  66. package/lib/common/src/utils/inputAutoStep.js +30 -19
  67. package/lib/common/src/utils/mapMemory.js +9 -10
  68. package/lib/common/updateBy.d.ts +21 -2
  69. package/lib/common/updateBy.js +66 -31
  70. package/lib/index.js +0 -2
  71. package/lib/style/menuRight.css +13 -26
  72. package/lib/style/style.css +51 -39
  73. package/lib/style/tokens.css +34 -0
  74. package/package.json +2 -2
@@ -1,18 +1,5 @@
1
- :root {
2
- --base-border: 1px solid rgba(255, 255, 255, 0.41);
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)); /* Для Safari */
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% {
@@ -1,21 +1,7 @@
1
- :root {
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
- /* Стили прокрутки (scrollbar) */
22
+ /* Scrollbar styles */
37
23
  body::-webkit-scrollbar {
38
- width: 12px; /* ширина scrollbar */
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
- /* Дублирующие селекторы scrollbar, если нужна поддержка под некоторыми движками */
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
- /* Кнопки Switch */
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
- /* input-стили */
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
- /* Доп. стили .msTradeAlt */
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.20",
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.28"
26
+ "wenay-common2": "^1.0.49"
27
27
  },
28
28
  "peerDependencies": {
29
29
  "react": "^19.2.0",