@e1011/es-kit 1.1.44 → 1.1.48

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 (50) hide show
  1. package/dist/hooks/esm/index.css +242 -242
  2. package/dist/hooks/index.css +242 -242
  3. package/dist/lib/cjs/src/core/ui/components/icon/IconBase.js +1 -1
  4. package/dist/lib/cjs/src/core/ui/components/icon/IconBase.js.map +1 -1
  5. package/dist/lib/cjs/src/core/utils/appState/peregrineMQ/index.js +1 -1
  6. package/dist/lib/cjs/src/core/utils/appState/peregrineMQ/index.js.map +1 -1
  7. package/dist/lib/cjs/src/core/utils/appState/peregrineMQ/usePeregrineMQ.react.js +2 -0
  8. package/dist/lib/cjs/src/core/utils/appState/peregrineMQ/usePeregrineMQ.react.js.map +1 -0
  9. package/dist/lib/cjs/src/core/utils/appState/store/store.vanillajs.js +1 -1
  10. package/dist/lib/cjs/src/core/utils/appState/store/store.vanillajs.js.map +1 -1
  11. package/dist/lib/cjs/src/index.js +1 -1
  12. package/dist/lib/esm/src/core/ui/components/icon/IconBase.js +1 -1
  13. package/dist/lib/esm/src/core/ui/components/icon/IconBase.js.map +1 -1
  14. package/dist/lib/esm/src/core/utils/appState/peregrineMQ/index.js +1 -1
  15. package/dist/lib/esm/src/core/utils/appState/peregrineMQ/index.js.map +1 -1
  16. package/dist/lib/esm/src/core/utils/appState/peregrineMQ/usePeregrineMQ.react.js +2 -0
  17. package/dist/lib/esm/src/core/utils/appState/peregrineMQ/usePeregrineMQ.react.js.map +1 -0
  18. package/dist/lib/esm/src/core/utils/appState/store/store.vanillajs.js +1 -1
  19. package/dist/lib/esm/src/core/utils/appState/store/store.vanillajs.js.map +1 -1
  20. package/dist/lib/esm/src/index.js +1 -1
  21. package/dist/lib/tsconfig.tsbuildinfo +1 -1
  22. package/dist/types/src/core/ui/components/icon/IconBase.d.ts +2 -1
  23. package/dist/types/src/core/ui/components/icon/IconBase.d.ts.map +1 -1
  24. package/dist/types/src/core/utils/appState/peregrineMQ/index.d.ts +1 -2
  25. package/dist/types/src/core/utils/appState/peregrineMQ/index.d.ts.map +1 -1
  26. package/dist/types/src/core/utils/appState/peregrineMQ/usePeregrineMQ.react.d.ts +1 -3
  27. package/dist/types/src/core/utils/appState/peregrineMQ/usePeregrineMQ.react.d.ts.map +1 -1
  28. package/dist/types/src/core/utils/appState/store/store.stories.d.ts.map +1 -1
  29. package/dist/types/src/core/utils/appState/store/store.vanillajs.d.ts.map +1 -1
  30. package/dist/ui/esm/src/core/ui/components/icon/IconBase.js +1 -1
  31. package/dist/ui/esm/src/core/ui/components/icon/IconBase.js.map +1 -1
  32. package/dist/ui/src/core/ui/components/icon/IconBase.js +1 -1
  33. package/dist/ui/src/core/ui/components/icon/IconBase.js.map +1 -1
  34. package/dist/utils/esm/index.css +242 -242
  35. package/dist/utils/esm/src/core/utils/appState/peregrineMQ/index.js +1 -1
  36. package/dist/utils/esm/src/core/utils/appState/peregrineMQ/index.js.map +1 -1
  37. package/dist/utils/esm/src/core/utils/appState/peregrineMQ/usePeregrineMQ.react.js +2 -0
  38. package/dist/utils/esm/src/core/utils/appState/peregrineMQ/usePeregrineMQ.react.js.map +1 -0
  39. package/dist/utils/esm/src/core/utils/appState/store/store.vanillajs.js +1 -1
  40. package/dist/utils/esm/src/core/utils/appState/store/store.vanillajs.js.map +1 -1
  41. package/dist/utils/esm/src/core/utils/index.js +1 -1
  42. package/dist/utils/index.css +242 -242
  43. package/dist/utils/src/core/utils/appState/peregrineMQ/index.js +1 -1
  44. package/dist/utils/src/core/utils/appState/peregrineMQ/index.js.map +1 -1
  45. package/dist/utils/src/core/utils/appState/peregrineMQ/usePeregrineMQ.react.js +2 -0
  46. package/dist/utils/src/core/utils/appState/peregrineMQ/usePeregrineMQ.react.js.map +1 -0
  47. package/dist/utils/src/core/utils/appState/store/store.vanillajs.js +1 -1
  48. package/dist/utils/src/core/utils/appState/store/store.vanillajs.js.map +1 -1
  49. package/dist/utils/src/core/utils/index.js +1 -1
  50. package/package.json +2 -1
@@ -1,22 +1,3 @@
1
- .divider-module_divider-line__6CesR {
2
- position: relative;
3
- display: block;
4
- transition: opacity, width, height 250ms ease-in-out;
5
- background-color: var(--color);
6
- opacity: var(--opacity);
7
- }
8
- .divider-module_divider-line__6CesR.divider-module_vertical__qSVWD {
9
- height: var(--length);
10
- left: var(--left);
11
- width: var(--width);
12
- margin: var(--margin);
13
- }
14
- .divider-module_divider-line__6CesR.divider-module_horizontal__Gz-Oj {
15
- width: var(--length);
16
- left: var(--left);
17
- height: var(--height);
18
- margin: var(--margin);
19
- }
20
1
  .icon-module_icon-base-parent__nOMvW {
21
2
  line-height: 1px !important;
22
3
  }
@@ -80,15 +61,6 @@
80
61
  max-width: var(--prop-value);
81
62
  opacity: 1;
82
63
  }
83
- .errorBoundary-module_errorBoundary__gk9ps {
84
- background: #EFEFEF;
85
- width: 100%;
86
- height: 100%;
87
- }
88
-
89
- .errorBoundary-module_StyledIcon__IYHiU {
90
- margin-right: 10px;
91
- }
92
64
  .field-module_field__UfKm3 {
93
65
  opacity: 1;
94
66
  pointer-events: auto;
@@ -163,6 +135,58 @@
163
135
  .field-module_field__UfKm3 label {
164
136
  text-align: left;
165
137
  }
138
+ .errorBoundary-module_errorBoundary__gk9ps {
139
+ background: #EFEFEF;
140
+ width: 100%;
141
+ height: 100%;
142
+ }
143
+
144
+ .errorBoundary-module_StyledIcon__IYHiU {
145
+ margin-right: 10px;
146
+ }
147
+ .divider-module_divider-line__6CesR {
148
+ position: relative;
149
+ display: block;
150
+ transition: opacity, width, height 250ms ease-in-out;
151
+ background-color: var(--color);
152
+ opacity: var(--opacity);
153
+ }
154
+ .divider-module_divider-line__6CesR.divider-module_vertical__qSVWD {
155
+ height: var(--length);
156
+ left: var(--left);
157
+ width: var(--width);
158
+ margin: var(--margin);
159
+ }
160
+ .divider-module_divider-line__6CesR.divider-module_horizontal__Gz-Oj {
161
+ width: var(--length);
162
+ left: var(--left);
163
+ height: var(--height);
164
+ margin: var(--margin);
165
+ }
166
+ .layoutBox-module_layout-box__ZIID8 {
167
+ display: flex;
168
+ position: relative;
169
+ flex-direction: row;
170
+ flex: 0;
171
+ flex-grow: 0;
172
+ flex-shrink: 0;
173
+ flex-basis: auto;
174
+ flex-wrap: nowrap;
175
+ gap: 0;
176
+ text-align: left;
177
+ justify-content: flex-start;
178
+ align-items: flex-start;
179
+ align-self: auto;
180
+ margin: 0;
181
+ padding: 0;
182
+ width: auto;
183
+ height: auto;
184
+ max-width: none;
185
+ max-height: none;
186
+ min-width: 0;
187
+ min-height: 0;
188
+ border-radius: initial;
189
+ }
166
190
  .lazyComponent-module_loader__brMEW {
167
191
  position: relative;
168
192
  width: 100px;
@@ -206,48 +230,77 @@
206
230
  stroke-dashoffset: -124;
207
231
  }
208
232
  }
209
- .layoutBox-module_layout-box__ZIID8 {
210
- display: flex;
211
- position: relative;
212
- flex-direction: row;
213
- flex: 0;
233
+ :root {
234
+ --divider-line: #4a4b4b;
235
+ }
236
+
237
+ .typography-module_overflow-hidden__UmQ-v, .typography-module_text-truncate__8MgV9 {
238
+ overflow: hidden !important;
239
+ }
240
+
241
+ .typography-module_text-nowrap__dt3uu, .typography-module_text-truncate__8MgV9 {
242
+ white-space: nowrap !important;
243
+ }
244
+
245
+ .typography-module_text-ellipsis__iyHeZ, .typography-module_text-truncate__8MgV9 {
246
+ text-overflow: ellipsis !important;
247
+ }
248
+
249
+ .typography-module_headline__b0XlP {
250
+ font-size: 28px;
251
+ line-height: 32px;
252
+ }
253
+
254
+ .typography-module_headlineSecondary__IDnhT {
255
+ font-size: 24px;
256
+ line-height: 28px;
257
+ }
258
+
259
+ .typography-module_headlineTertiary__mlG-v {
260
+ font-size: 18px;
261
+ line-height: 24x;
262
+ }
263
+
264
+ .typography-module_paragraph__tgBAx, .typography-module_paragraphBold__PmcZU, .typography-module_paragraphBoldSmall__qExmY, .typography-module_paragraphSmall__vTMiI {
265
+ font-size: 14px;
266
+ line-height: 18px;
267
+ font-weight: 300;
268
+ }
269
+
270
+ .typography-module_paragraphSmall__vTMiI, .typography-module_paragraphBoldSmall__qExmY {
271
+ font-size: 12px;
272
+ }
273
+
274
+ .typography-module_paragraphBold__PmcZU, .typography-module_paragraphBoldSmall__qExmY {
275
+ font-weight: 600;
276
+ }
277
+
278
+ .typography-module_link__DWurf {
279
+ overflow: hidden !important;
280
+ white-space: nowrap !important;
281
+ text-overflow: ellipsis !important;
282
+ text-decoration: none;
283
+ color: #65C5F6;
284
+ display: inline;
285
+ gap: 4px;
214
286
  flex-grow: 0;
215
- flex-shrink: 0;
216
- flex-basis: auto;
217
- flex-wrap: nowrap;
218
- gap: 0;
219
- text-align: left;
220
- justify-content: flex-start;
221
- align-items: flex-start;
222
- align-self: auto;
223
- margin: 0;
224
- padding: 0;
225
- width: auto;
226
- height: auto;
227
- max-width: none;
228
- max-height: none;
229
- min-width: 0;
230
- min-height: 0;
231
- border-radius: initial;
287
+ max-width: 400px;
288
+ position: relative;
289
+ vertical-align: center;
290
+ }
291
+ .typography-module_link__DWurf:hover:not(.typography-module_disabled__hjK8C) {
292
+ text-decoration: underline;
293
+ color: #65C5F6;
294
+ }
295
+ .typography-module_link__DWurf.typography-module_disabled__hjK8C {
296
+ pointer-events: none;
297
+ opacity: 0.6;
232
298
  }
233
299
  .textAndContent-module_textAndContent__X5P1n {
234
300
  align-items: baseline;
235
301
  flex-shrink: 1;
236
302
  gap: 8px;
237
303
  }
238
- .flowLayout-module_flowLayout__VHpnY {
239
- overflow: auto;
240
- }
241
- .flowLayout-module_flowLayout__VHpnY .flowLayout-module_beforeContent__rY-mW {
242
- display: flex;
243
- width: 100%;
244
- min-width: 0;
245
- }
246
- .flowLayout-module_flowLayout__VHpnY .flowLayout-module_afterContent__Hlh8v {
247
- display: flex;
248
- width: 100%;
249
- min-width: 0;
250
- }
251
304
  :root {
252
305
  --divider-line: #4a4b4b;
253
306
  }
@@ -362,71 +415,132 @@
362
415
  .cui-theme-light .button-module_button__NDMQS {
363
416
  color: #090A0A;
364
417
  }
418
+ .flowLayout-module_flowLayout__VHpnY {
419
+ overflow: auto;
420
+ }
421
+ .flowLayout-module_flowLayout__VHpnY .flowLayout-module_beforeContent__rY-mW {
422
+ display: flex;
423
+ width: 100%;
424
+ min-width: 0;
425
+ }
426
+ .flowLayout-module_flowLayout__VHpnY .flowLayout-module_afterContent__Hlh8v {
427
+ display: flex;
428
+ width: 100%;
429
+ min-width: 0;
430
+ }
365
431
  :root {
366
432
  --divider-line: #4a4b4b;
367
433
  }
368
434
 
369
- .typography-module_overflow-hidden__UmQ-v, .typography-module_text-truncate__8MgV9 {
435
+ .tooltip-module_overflow-hidden__YDzdx, .tooltip-module_text-truncate__CPvp3 {
370
436
  overflow: hidden !important;
371
437
  }
372
438
 
373
- .typography-module_text-nowrap__dt3uu, .typography-module_text-truncate__8MgV9 {
439
+ .tooltip-module_text-nowrap__g6kzP, .tooltip-module_text-truncate__CPvp3 {
374
440
  white-space: nowrap !important;
375
441
  }
376
442
 
377
- .typography-module_text-ellipsis__iyHeZ, .typography-module_text-truncate__8MgV9 {
443
+ .tooltip-module_text-ellipsis__AYivV, .tooltip-module_text-truncate__CPvp3 {
378
444
  text-overflow: ellipsis !important;
379
445
  }
380
446
 
381
- .typography-module_headline__b0XlP {
382
- font-size: 28px;
383
- line-height: 32px;
447
+ .tooltip-module_popover-tooltip__sAhKa {
448
+ position: fixed;
449
+ z-index: 999;
450
+ will-change: opacity;
451
+ transition: opacity 450ms ease;
452
+ opacity: 0;
453
+ visibility: hidden;
454
+ border-radius: 4px;
455
+ background-color: #1B1D1D;
456
+ box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.16);
384
457
  }
385
-
386
- .typography-module_headlineSecondary__IDnhT {
387
- font-size: 24px;
388
- line-height: 28px;
458
+ .tooltip-module_popover-tooltip__sAhKa span, .tooltip-module_popover-tooltip__sAhKa p, .tooltip-module_popover-tooltip__sAhKa h3 {
459
+ margin: 0;
460
+ padding: 0;
389
461
  }
390
-
391
- .typography-module_headlineTertiary__mlG-v {
392
- font-size: 18px;
393
- line-height: 24x;
462
+ .tooltip-module_popover-tooltip__sAhKa p {
463
+ display: -webkit-box;
464
+ -webkit-line-clamp: 4; /* number of lines to show */
465
+ line-clamp: 4;
466
+ -webkit-box-orient: vertical;
467
+ margin: 0;
468
+ width: 100%;
469
+ white-space: normal;
470
+ overflow: auto;
394
471
  }
395
-
396
- .typography-module_paragraph__tgBAx, .typography-module_paragraphBold__PmcZU, .typography-module_paragraphBoldSmall__qExmY, .typography-module_paragraphSmall__vTMiI {
397
- font-size: 14px;
398
- line-height: 18px;
399
- font-weight: 300;
472
+ .tooltip-module_popover-tooltip__sAhKa[data-show] {
473
+ opacity: 1;
474
+ visibility: visible;
400
475
  }
401
-
402
- .typography-module_paragraphSmall__vTMiI, .typography-module_paragraphBoldSmall__qExmY {
403
- font-size: 12px;
476
+ .tooltip-module_popover-tooltip__sAhKa[data-show=false] {
477
+ opacity: 0;
478
+ visibility: hidden;
479
+ }
480
+ .tooltip-module_popover-tooltip__sAhKa[data-popper-placement^=top] .tooltip-module_arrow__pqqOi {
481
+ bottom: -16px;
482
+ }
483
+ .tooltip-module_popover-tooltip__sAhKa[data-popper-placement^=top] .tooltip-module_arrow__pqqOi .tooltip-module_arrow-inner__IqzxY {
484
+ transform: rotate(0deg);
485
+ }
486
+ .tooltip-module_popover-tooltip__sAhKa[data-popper-placement^=bottom] .tooltip-module_arrow__pqqOi {
487
+ top: -16px;
488
+ }
489
+ .tooltip-module_popover-tooltip__sAhKa[data-popper-placement^=bottom] .tooltip-module_arrow__pqqOi .tooltip-module_arrow-inner__IqzxY {
490
+ transform: rotate(180deg);
491
+ }
492
+ .tooltip-module_popover-tooltip__sAhKa[data-popper-placement^=left] .tooltip-module_arrow__pqqOi {
493
+ right: -16px;
494
+ }
495
+ .tooltip-module_popover-tooltip__sAhKa[data-popper-placement^=left] .tooltip-module_arrow__pqqOi .tooltip-module_arrow-inner__IqzxY {
496
+ transform: rotate(-90deg);
497
+ }
498
+ .tooltip-module_popover-tooltip__sAhKa[data-popper-placement^=right] .tooltip-module_arrow__pqqOi {
499
+ left: -16px;
500
+ }
501
+ .tooltip-module_popover-tooltip__sAhKa[data-popper-placement^=right] .tooltip-module_arrow__pqqOi .tooltip-module_arrow-inner__IqzxY {
502
+ transform: rotate(90deg);
503
+ }
504
+ .tooltip-module_popover-tooltip__sAhKa .tooltip-module_arrow__pqqOi {
505
+ position: absolute;
506
+ }
507
+ .tooltip-module_popover-tooltip__sAhKa .tooltip-module_arrow__pqqOi .tooltip-module_arrow-inner__IqzxY {
508
+ content: "";
509
+ border-width: 8px;
510
+ border-style: solid;
511
+ border-color: #1B1D1D transparent transparent transparent;
404
512
  }
405
513
 
406
- .typography-module_paragraphBold__PmcZU, .typography-module_paragraphBoldSmall__qExmY {
407
- font-weight: 600;
514
+ .tooltip-module_close-button__o8OBN {
515
+ cursor: pointer;
516
+ line-height: 1px;
517
+ background-color: rgba(255, 255, 255, 0);
518
+ }
519
+ .tooltip-module_close-button__o8OBN .icon-base {
520
+ background-color: #FDDA0D;
521
+ width: 9px !important;
522
+ height: 9px !important;
523
+ line-height: 1px !important;
524
+ }
525
+ .tooltip-module_close-button__o8OBN:hover .icon-base {
526
+ background-color: #FFEA00;
408
527
  }
409
528
 
410
- .typography-module_link__DWurf {
411
- overflow: hidden !important;
412
- white-space: nowrap !important;
413
- text-overflow: ellipsis !important;
414
- text-decoration: none;
415
- color: #65C5F6;
416
- display: inline;
417
- gap: 4px;
418
- flex-grow: 0;
419
- max-width: 400px;
420
- position: relative;
421
- vertical-align: center;
529
+ .cui-theme-dark .tooltip-module_popover-tooltip__sAhKa {
530
+ background-color: #1B1D1D;
531
+ color: #F4F4F4;
422
532
  }
423
- .typography-module_link__DWurf:hover:not(.typography-module_disabled__hjK8C) {
424
- text-decoration: underline;
425
- color: #65C5F6;
533
+ .cui-theme-dark .tooltip-module_popover-tooltip__sAhKa .tooltip-module_arrow-inner__IqzxY {
534
+ border-color: #1B1D1D transparent transparent transparent;
426
535
  }
427
- .typography-module_link__DWurf.typography-module_disabled__hjK8C {
428
- pointer-events: none;
429
- opacity: 0.6;
536
+ .cui-theme-light {
537
+ color: #1B1D1D;
538
+ }
539
+ .cui-theme-light .tooltip-module_popover-tooltip__sAhKa {
540
+ background-color: #515757;
541
+ }
542
+ .cui-theme-light .tooltip-module_popover-tooltip__sAhKa .tooltip-module_arrow-inner__IqzxY {
543
+ border-color: #515757 transparent transparent transparent;
430
544
  }
431
545
  :root {
432
546
  --divider-line: #4a4b4b;
@@ -592,6 +706,29 @@
592
706
  border-color: #FD8F3E;
593
707
  color: #632E03;
594
708
  }
709
+ .popup-overlay-module_popup-modal-overlay__dlJqM {
710
+ z-index: 1;
711
+ position: fixed;
712
+ width: 100%;
713
+ height: 100%;
714
+ top: 0;
715
+ left: 0;
716
+ background: rgba(40, 80, 120, 0.8) !important;
717
+ pointer-events: all;
718
+ user-select: none;
719
+ will-change: opacity;
720
+ transition: opacity 450ms ease-in-out;
721
+ opacity: 0;
722
+ visibility: hidden;
723
+ }
724
+ .popup-overlay-module_popup-modal-overlay__dlJqM[data-show] {
725
+ opacity: 1;
726
+ visibility: visible;
727
+ }
728
+ .popup-overlay-module_popup-modal-overlay__dlJqM[data-show=false] {
729
+ opacity: 0;
730
+ visibility: hidden;
731
+ }
595
732
  :root {
596
733
  --divider-line: #4a4b4b;
597
734
  }
@@ -688,143 +825,6 @@
688
825
  background-color: #090A0A;
689
826
  color: #F4F4F4;
690
827
  }
691
- .popup-overlay-module_popup-modal-overlay__dlJqM {
692
- z-index: 1;
693
- position: fixed;
694
- width: 100%;
695
- height: 100%;
696
- top: 0;
697
- left: 0;
698
- background: rgba(40, 80, 120, 0.8) !important;
699
- pointer-events: all;
700
- user-select: none;
701
- will-change: opacity;
702
- transition: opacity 450ms ease-in-out;
703
- opacity: 0;
704
- visibility: hidden;
705
- }
706
- .popup-overlay-module_popup-modal-overlay__dlJqM[data-show] {
707
- opacity: 1;
708
- visibility: visible;
709
- }
710
- .popup-overlay-module_popup-modal-overlay__dlJqM[data-show=false] {
711
- opacity: 0;
712
- visibility: hidden;
713
- }
714
- :root {
715
- --divider-line: #4a4b4b;
716
- }
717
-
718
- .tooltip-module_overflow-hidden__YDzdx, .tooltip-module_text-truncate__CPvp3 {
719
- overflow: hidden !important;
720
- }
721
-
722
- .tooltip-module_text-nowrap__g6kzP, .tooltip-module_text-truncate__CPvp3 {
723
- white-space: nowrap !important;
724
- }
725
-
726
- .tooltip-module_text-ellipsis__AYivV, .tooltip-module_text-truncate__CPvp3 {
727
- text-overflow: ellipsis !important;
728
- }
729
-
730
- .tooltip-module_popover-tooltip__sAhKa {
731
- position: fixed;
732
- z-index: 999;
733
- will-change: opacity;
734
- transition: opacity 450ms ease;
735
- opacity: 0;
736
- visibility: hidden;
737
- border-radius: 4px;
738
- background-color: #1B1D1D;
739
- box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.16);
740
- }
741
- .tooltip-module_popover-tooltip__sAhKa span, .tooltip-module_popover-tooltip__sAhKa p, .tooltip-module_popover-tooltip__sAhKa h3 {
742
- margin: 0;
743
- padding: 0;
744
- }
745
- .tooltip-module_popover-tooltip__sAhKa p {
746
- display: -webkit-box;
747
- -webkit-line-clamp: 4; /* number of lines to show */
748
- line-clamp: 4;
749
- -webkit-box-orient: vertical;
750
- margin: 0;
751
- width: 100%;
752
- white-space: normal;
753
- overflow: auto;
754
- }
755
- .tooltip-module_popover-tooltip__sAhKa[data-show] {
756
- opacity: 1;
757
- visibility: visible;
758
- }
759
- .tooltip-module_popover-tooltip__sAhKa[data-show=false] {
760
- opacity: 0;
761
- visibility: hidden;
762
- }
763
- .tooltip-module_popover-tooltip__sAhKa[data-popper-placement^=top] .tooltip-module_arrow__pqqOi {
764
- bottom: -16px;
765
- }
766
- .tooltip-module_popover-tooltip__sAhKa[data-popper-placement^=top] .tooltip-module_arrow__pqqOi .tooltip-module_arrow-inner__IqzxY {
767
- transform: rotate(0deg);
768
- }
769
- .tooltip-module_popover-tooltip__sAhKa[data-popper-placement^=bottom] .tooltip-module_arrow__pqqOi {
770
- top: -16px;
771
- }
772
- .tooltip-module_popover-tooltip__sAhKa[data-popper-placement^=bottom] .tooltip-module_arrow__pqqOi .tooltip-module_arrow-inner__IqzxY {
773
- transform: rotate(180deg);
774
- }
775
- .tooltip-module_popover-tooltip__sAhKa[data-popper-placement^=left] .tooltip-module_arrow__pqqOi {
776
- right: -16px;
777
- }
778
- .tooltip-module_popover-tooltip__sAhKa[data-popper-placement^=left] .tooltip-module_arrow__pqqOi .tooltip-module_arrow-inner__IqzxY {
779
- transform: rotate(-90deg);
780
- }
781
- .tooltip-module_popover-tooltip__sAhKa[data-popper-placement^=right] .tooltip-module_arrow__pqqOi {
782
- left: -16px;
783
- }
784
- .tooltip-module_popover-tooltip__sAhKa[data-popper-placement^=right] .tooltip-module_arrow__pqqOi .tooltip-module_arrow-inner__IqzxY {
785
- transform: rotate(90deg);
786
- }
787
- .tooltip-module_popover-tooltip__sAhKa .tooltip-module_arrow__pqqOi {
788
- position: absolute;
789
- }
790
- .tooltip-module_popover-tooltip__sAhKa .tooltip-module_arrow__pqqOi .tooltip-module_arrow-inner__IqzxY {
791
- content: "";
792
- border-width: 8px;
793
- border-style: solid;
794
- border-color: #1B1D1D transparent transparent transparent;
795
- }
796
-
797
- .tooltip-module_close-button__o8OBN {
798
- cursor: pointer;
799
- line-height: 1px;
800
- background-color: rgba(255, 255, 255, 0);
801
- }
802
- .tooltip-module_close-button__o8OBN .icon-base {
803
- background-color: #FDDA0D;
804
- width: 9px !important;
805
- height: 9px !important;
806
- line-height: 1px !important;
807
- }
808
- .tooltip-module_close-button__o8OBN:hover .icon-base {
809
- background-color: #FFEA00;
810
- }
811
-
812
- .cui-theme-dark .tooltip-module_popover-tooltip__sAhKa {
813
- background-color: #1B1D1D;
814
- color: #F4F4F4;
815
- }
816
- .cui-theme-dark .tooltip-module_popover-tooltip__sAhKa .tooltip-module_arrow-inner__IqzxY {
817
- border-color: #1B1D1D transparent transparent transparent;
818
- }
819
- .cui-theme-light {
820
- color: #1B1D1D;
821
- }
822
- .cui-theme-light .tooltip-module_popover-tooltip__sAhKa {
823
- background-color: #515757;
824
- }
825
- .cui-theme-light .tooltip-module_popover-tooltip__sAhKa .tooltip-module_arrow-inner__IqzxY {
826
- border-color: #515757 transparent transparent transparent;
827
- }
828
828
  :root {
829
829
  --divider-line: #4a4b4b;
830
830
  }
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./peregrineMQ.js");const r=new e.PeregrineMQ;exports.PeregrineMQ=e.PeregrineMQ,exports.PeregrineMQClearError=e.PeregrineMQClearError,exports.default=r,exports.peregrineMQInstance=r;
1
+ "use strict";var e=require("./peregrineMQ.js");const r=new e.PeregrineMQ;exports.PeregrineMQ=e.PeregrineMQ,exports.PeregrineMQClearError=e.PeregrineMQClearError,exports.peregrineMQInstance=r;
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../../../src/core/utils/appState/peregrineMQ/index.ts"],"sourcesContent":["import { PeregrineMQ } from './peregrineMQ'\n\nexport { PeregrineMQ, PeregrineMQClearError } from './peregrineMQ'\n\nexport const peregrineMQInstance = new PeregrineMQ()\n\nexport default peregrineMQInstance\n\n\nexport type * from './peregrineMQ.types'\nexport type * from './usePeregrineMQ.react'\n"],"names":["peregrineMQInstance","PeregrineMQ"],"mappings":"4GAIaA,EAAsB,IAAIC,EAAWA"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../../../src/core/utils/appState/peregrineMQ/index.ts"],"sourcesContent":["import { PeregrineMQ } from './peregrineMQ'\n\nexport { PeregrineMQ, PeregrineMQClearError } from './peregrineMQ'\n\nexport const peregrineMQInstance = new PeregrineMQ()\n\nexport type * from './peregrineMQ.types'\nexport * from './usePeregrineMQ.react'\n"],"names":["peregrineMQInstance","PeregrineMQ"],"mappings":"qDAIaA,EAAsB,IAAIC,EAAWA"}
@@ -0,0 +1,2 @@
1
+ "use strict";var e=require("react");exports.usePeregrineMQ=(r,u,s)=>{const t=e.useCallback(s,[s]),c=e.useRef();return e.useEffect((()=>(c.current=r.subscribe(u,t),()=>{c?.current?.()})),[t,u,r]),[c.current,r.publish]};
2
+ //# sourceMappingURL=usePeregrineMQ.react.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePeregrineMQ.react.js","sources":["../../../../../../../src/core/utils/appState/peregrineMQ/usePeregrineMQ.react.ts"],"sourcesContent":["import { useCallback, useEffect, useRef } from 'react'\n\nimport { PeregrineMQ } from './peregrineMQ'\nimport { Callback } from './peregrineMQ.types'\n\nexport type usePeregrineMQReturnType = [\n (() => boolean) | undefined,\n <T>(channel: string, data?: T) => boolean\n]\n\nexport const usePeregrineMQ = (\n peregrineInstance: PeregrineMQ, channel: string, callback: Callback,\n): usePeregrineMQReturnType => {\n const memCallback = useCallback(callback, [callback])\n\n const unsubscribeRef = useRef<ReturnType<typeof peregrineInstance.subscribe>>()\n\n useEffect(() => {\n unsubscribeRef.current = peregrineInstance.subscribe(channel, memCallback)\n\n return (): void => {\n unsubscribeRef?.current?.()\n }\n }, [memCallback, channel, peregrineInstance])\n\n return [unsubscribeRef.current, peregrineInstance.publish]\n}\n"],"names":["usePeregrineMQ","peregrineInstance","channel","callback","memCallback","useCallback","unsubscribeRef","useRef","useEffect","current","subscribe","publish"],"mappings":"2DAU8BA,CAC5BC,EAAgCC,EAAiBC,KAEjD,MAAMC,EAAcC,EAAWA,YAACF,EAAU,CAACA,IAErCG,EAAiBC,EAAAA,SAUvB,OARAC,EAAAA,WAAU,KACRF,EAAeG,QAAUR,EAAkBS,UAAUR,EAASE,GAEvD,KACLE,GAAgBG,WAAW,IAE5B,CAACL,EAAaF,EAASD,IAEnB,CAACK,EAAeG,QAASR,EAAkBU,QAAQ"}
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("../../../../../_virtual/_rollupPluginBabelHelpers.js"),r=require("../../helpers/other.js");exports.createStore=(t,n,o)=>{let s=t;const l=new Set,c=()=>s,u=function(){var r=e.asyncToGenerator((function*(e){s=e;for(const e of l){const r=e?.selector,t=r?r(s):s;void 0!==e.previousValue&&e.previousValue===t||(e.previousValue=t,yield e(t))}return s}));return function(e){return r.apply(this,arguments)}}(),i={getState:c,setState:u,subscribe:(e,r)=>{if(r&&e.selector&&e.selector!==r)throw new Error("Error, mismatch selector, listener.selector !== selector.");return r&&!e.selector&&(e.selector=r),e.selector&&(e.previousValue=e.selector(c())),l.add(e),()=>l.delete(e)},unsubscribe:e=>{l.delete(e)}},a=n?Object.entries(n)?.reduce(((t,n)=>{let[s,l]=n;return{...t,[s]:e.asyncToGenerator((function*(){const e=r.isFunctionAsync(l);e&&u({...c(),[`${s}Error`]:null,[`${s}Pending`]:!0});try{for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];const r=yield l(c,u,...n);return o&&u(o(c(),s,...n)),e&&u({...c(),[`${s}Pending`]:!1}),r}catch(r){throw e&&u({...c(),[`${s}Pending`]:!1,[`${s}Error`]:r}),r}}))}}),{}):null,d={...i,...a?{actions:{...a}}:{}};return d};
1
+ "use strict";var e=require("../../../../../_virtual/_rollupPluginBabelHelpers.js"),r=require("../../helpers/other.js");exports.createStore=(t,n,o)=>{let s=t;const l=new Set,c=()=>s,u=function(){var r=e.asyncToGenerator((function*(e){s=e;for(const e of l){const r=e?.selector,t=r?r(s):s;void 0!==e.previousValue&&e.previousValue===t||(e.previousValue=t,yield e(t))}return s}));return function(e){return r.apply(this,arguments)}}(),i={getState:c,setState:u,subscribe:(e,r)=>{if(r&&e.selector&&e.selector!==r)throw new Error("Error, mismatch selector, listener.selector !== selector.");return r&&!e.selector&&(e.selector=r),e.selector&&(e.previousValue=e.selector(c())),l.add(e),()=>l.delete(e)},unsubscribe:e=>{l.delete(e)}},a=n?Object.entries(n)?.reduce(((t,n)=>{let[s,l]=n;return t[s]=e.asyncToGenerator((function*(){const e=r.isFunctionAsync(l);e&&u({...c(),[`${s}Error`]:null,[`${s}Pending`]:!0});try{for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];const r=yield l(c,u,...n);return o&&u(o(c(),s,...n)),e&&u({...c(),[`${s}Pending`]:!1}),r}catch(r){throw e&&u({...c(),[`${s}Pending`]:!1,[`${s}Error`]:r}),r}})),t}),{}):null,d={...i,...a?{actions:{...a}}:{}};return d};
2
2
  //# sourceMappingURL=store.vanillajs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"store.vanillajs.js","sources":["../../../../../../../src/core/utils/appState/store/store.vanillajs.ts"],"sourcesContent":["\n// TinyStore, inspired by https://github.com/jherr/syncexternalstore/blob/main/csr/src/store.js\n\nimport { isFunctionAsync } from '../../helpers'\n\n/**\n * Represents the callback function for a store listener.\n */\nexport type ListenerCallBack<T> = (state: Partial<T>) => void\n\n/**\n * Represents a selector function that transforms the store state.\n */\n// export type Selector<T> = (state: Partial<T>) => Partial<T>;\nexport type SelectedValueType<T> = Partial<T> | Partial<keyof T>\n| string | number | boolean | undefined | string[] | number[] | boolean[] | undefined[];\nexport type Selector<T> = (state: Partial<T>) => SelectedValueType<T>;\n\n\n/**\n * Represents a listener for the store.\n */\nexport type Listener<T> = {\n selector?: Selector<T>\n previousValue?: SelectedValueType<T>\n} & ListenerCallBack<T>\n\n/**\n * Represents a store.\n */\nexport type Store<T> = {\n /**\n * Get the current state of the store.\n * @returns The current state of the store.\n */\n getState: () => Partial<T>\n /**\n * Set the state of the store.\n * @param state - The new state to set.\n * @returns A promise that resolves to the new state.\n */\n setState: (state: Partial<T>) => Promise<Partial<T>>\n /**\n * Subscribe a listener to the store.\n * @param listener - The listener function to be subscribed.\n * @param selector - Optional selector function to transform the store state.\n * @returns A function to unsubscribe the listener.\n */\n subscribe: (listener: Listener<T>, selector?: Selector<T>) => () => void\n /**\n * Unubscribe a listener from the store.\n * @param listener - The listener function to be unsubscribed.\n */\n unsubscribe: (listener: Listener<T>) => void\n}\n// & { actions?: { [actionName: string]: ActionHandlerCaller } }\n\n// TODO infer actionNames from createStore arguments\n/**\n * Represents a store with additional actions.\n */\nexport type StoreWithActions<T> = Store<T> & { actions: { [actionName: string]: ActionHandlerCaller<T> } }\n\n/**\n * Represents an action handler function.\n */\nexport type ActionHandler<T> = (\n getState: Store<T>['getState'], // Function to get the current state of the store\n setState: Store<T>['setState'], // Function to set the state of the store\n ...rest: unknown[]\n) => void | Partial<T> | Promise<void | Partial<T>>\n\n/**\n * Represents an reducer function.\n */\nexport type Reducer<T> = (\n state: Partial<T>,\n action: string,\n ...rest: unknown[]\n) => Partial<T>\n\n\n/**\n * Represents a function that calls an action handler.\n */\nexport type ActionHandlerCaller<T> = (...args: unknown[]) => void | Partial<T> | Promise<void | Partial<T>>\n\n\ntype Actions<T> = { [key: string]: ActionHandler<T>}\n/**\n * Creates a new store.\n * @param initialState - The initial state of the store.\n * @param actions - Optional actions for the store.\n * @returns The created store.\n */\nexport const createStore = <T>(\n initialState: Partial<T>,\n actions?: Actions<T>,\n reducer?: Reducer<T>,\n): Store<T> | StoreWithActions<T> => {\n let currentState: Partial<T> = initialState\n const listeners = new Set<Listener<T>>()\n\n /**\n * Gets the current state of the store.\n * @returns The current state of the store.\n */\n const getState = (): Partial<T> => currentState\n\n // TODO debounce, batch? what is the meaningful time between setState ofr UI to be rendered and registerd by User?\n /**\n * Sets the state of the store.\n * @param newState - The new state to set.\n * @returns A promise that resolves to the new state.\n */\n const setState = async (newState: Partial<T>): Promise<Partial<T>> => {\n currentState = newState\n\n // eslint-disable-next-line no-restricted-syntax\n for (const listener of listeners) {\n // has Listener selector?\n const selector: Selector<T> | undefined = listener?.selector\n\n // TODO compare selected value to the previous values of that listener/selector pair\n // if listener.previousValue === selector(currentState) no call\n // else listener.previousValue = selector(currentState) and call\n // l1 cache, weak references?\n const newValue: SelectedValueType<T> = selector ? selector(currentState) : currentState\n\n // TODO plugin equality\n if (listener.previousValue === undefined || listener.previousValue !== newValue) {\n listener.previousValue = newValue\n // eslint-disable-next-line no-await-in-loop\n await listener(newValue as Partial<T>)\n }\n }\n return currentState\n }\n\n /**\n * Represents the basic API of the store.\n */\n const storeBaseicApi: Store<T> = {\n /**\n * Get the current state of the store.\n * @returns The current state of the store.\n */\n getState,\n /**\n * Set the state of the store.\n * @param state - The new state to set.\n * @returns A promise that resolves to the new state.\n */\n setState,\n /**\n * Subscribe a listener to the store.\n * @param listener - The listener function to be subscribed.\n * @returns A function to unsubscribe the listener.\n */\n subscribe: (listener: Listener<T>, selector?: Selector<T>) => {\n if (selector && listener.selector && listener.selector !== selector) {\n throw new Error('Error, mismatch selector, listener.selector !== selector.')\n }\n if (selector && !listener.selector) {\n // eslint-disable-next-line no-param-reassign\n listener.selector = selector\n }\n\n if (listener.selector) {\n // setting the previousValue for the next cache/equality check\n // eslint-disable-next-line no-param-reassign\n listener.previousValue = listener.selector(getState())\n }\n\n listeners.add(listener)\n return () => listeners.delete(listener)\n },\n /**\n * Unsubscribe a listener from the store.\n * @param listener - The listener function to be unsubscribed.\n */\n unsubscribe: (listener: Listener<T>) => {\n listeners.delete(listener)\n },\n }\n\n /**\n * Resolves the actions and creates action handlers.\n */\n const resolvedActions: Actions<T> | null | undefined\n = actions ? Object.entries(actions)?.reduce(\n (\n aggregator: Record<string, ActionHandlerCaller<T>>,\n [actionName, actionHandler]: [string, ActionHandler<T>],\n ) => ({\n ...aggregator,\n [actionName]: async(...rest: unknown[]): Promise<void | Partial<T>> => {\n // TODO try to not call subscriber too many times becuase of Error and Pending values\n const isAsync = isFunctionAsync(actionHandler as () => unknown)\n\n if (isAsync) {\n setState({\n ...getState(),\n [`${actionName}Error`]: null,\n [`${actionName}Pending`]: true,\n })\n }\n\n try {\n const resultOfAction = await actionHandler(getState, setState, ...rest)\n\n // TODO try to mutate state only once with the results, that means pass custom setState to action,\n // so that it would matk pending and error already inside action\n if (reducer) {\n setState(reducer(getState(), actionName, ...rest))\n }\n\n if (isAsync) {\n setState({ ...getState(), [`${actionName}Pending`]: false })\n }\n\n return resultOfAction\n } catch (error) {\n if (isAsync) {\n setState({\n ...getState(),\n [`${actionName}Pending`]: false,\n [`${actionName}Error`]: error,\n })\n }\n throw error\n }\n },\n }),\n {},\n ) : null\n\n /**\n * Represents the store combined with actions.\n */\n const storeCombinedWithActions = {\n ...storeBaseicApi,\n ...(resolvedActions ? { actions: { ...resolvedActions } } : {}),\n }\n\n return resolvedActions\n ? storeCombinedWithActions as StoreWithActions<T>\n : storeCombinedWithActions as Store<T>\n}\n"],"names":["createStore","initialState","actions","reducer","currentState","listeners","Set","getState","setState","_ref","_asyncToGenerator","newState","listener","selector","newValue","undefined","previousValue","_x","apply","this","arguments","storeBaseicApi","subscribe","Error","add","delete","unsubscribe","resolvedActions","Object","entries","reduce","aggregator","_ref2","actionName","actionHandler","isAsync","isFunctionAsync","_len","length","rest","Array","_key","resultOfAction","error","storeCombinedWithActions"],"mappings":"2IA+F2BA,CACzBC,EACAC,EACAC,KAEA,IAAIC,EAA2BH,EAC/B,MAAMI,EAAY,IAAIC,IAMhBC,EAAWA,IAAkBH,EAQ7BI,EAAQ,WAAA,IAAAC,EAAAC,oBAAG,UAAOC,GACtBP,EAAeO,EAGf,IAAK,MAAMC,KAAYP,EAAW,CAEhC,MAAMQ,EAAoCD,GAAUC,SAM9CC,EAAiCD,EAAWA,EAAST,GAAgBA,OAG5CW,IAA3BH,EAASI,eAA+BJ,EAASI,gBAAkBF,IACrEF,EAASI,cAAgBF,QAEnBF,EAASE,GAEnB,CACA,OAAOV,KACR,OAtBKI,SAAQS,GAAA,OAAAR,EAAAS,MAAAC,KAAAC,UAAA,EAAA,GA2BRC,EAA2B,CAK/Bd,WAMAC,WAMAc,UAAWA,CAACV,EAAuBC,KACjC,GAAIA,GAAYD,EAASC,UAAYD,EAASC,WAAaA,EACzD,MAAM,IAAIU,MAAM,6DAclB,OAZIV,IAAaD,EAASC,WAExBD,EAASC,SAAWA,GAGlBD,EAASC,WAGXD,EAASI,cAAgBJ,EAASC,SAASN,MAG7CF,EAAUmB,IAAIZ,GACP,IAAMP,EAAUoB,OAAOb,EAAS,EAMzCc,YAAcd,IACZP,EAAUoB,OAAOb,EAAS,GAOxBe,EACFzB,EAAU0B,OAAOC,QAAQ3B,IAAU4B,QACnC,CACEC,EAAkDC,KAAA,IACjDC,EAAYC,GAA0CF,EAAA,MACnD,IACDD,EACHE,CAACA,GAAUvB,EAAAA,kBAAG,YAEZ,MAAMyB,EAAUC,kBAAgBF,GAE5BC,GACF3B,EAAS,IACJD,IACH,CAAC,GAAG0B,UAAoB,KACxB,CAAC,GAAGA,aAAsB,IAI9B,IAAI,IAAA,IAAAI,EAAAjB,UAAAkB,OAZiBC,EAAIC,IAAAA,MAAAH,GAAAI,EAAA,EAAAA,EAAAJ,EAAAI,IAAJF,EAAIE,GAAArB,UAAAqB,GAavB,MAAMC,QAAuBR,EAAc3B,EAAUC,KAAa+B,GAYlE,OARIpC,GACFK,EAASL,EAAQI,IAAY0B,KAAeM,IAG1CJ,GACF3B,EAAS,IAAKD,IAAY,CAAC,GAAG0B,aAAsB,IAG/CS,CACR,CAAC,MAAOC,GAQP,MAPIR,GACF3B,EAAS,IACJD,IACH,CAAC,GAAG0B,aAAsB,EAC1B,CAAC,GAAGA,UAAoBU,IAGtBA,CACR,KAEH,GACD,CAAA,GACE,KAKAC,EAA2B,IAC5BvB,KACCM,EAAkB,CAAEzB,QAAS,IAAKyB,IAAsB,IAG9D,OACIiB,CACoC"}
1
+ {"version":3,"file":"store.vanillajs.js","sources":["../../../../../../../src/core/utils/appState/store/store.vanillajs.ts"],"sourcesContent":["\n// TinyStore, inspired by https://github.com/jherr/syncexternalstore/blob/main/csr/src/store.js\n\nimport { isFunctionAsync } from '../../helpers'\n\n/**\n * Represents the callback function for a store listener.\n */\nexport type ListenerCallBack<T> = (state: Partial<T>) => void\n\n/**\n * Represents a selector function that transforms the store state.\n */\n// export type Selector<T> = (state: Partial<T>) => Partial<T>;\nexport type SelectedValueType<T> = Partial<T> | Partial<keyof T>\n| string | number | boolean | undefined | string[] | number[] | boolean[] | undefined[];\nexport type Selector<T> = (state: Partial<T>) => SelectedValueType<T>;\n\n\n/**\n * Represents a listener for the store.\n */\nexport type Listener<T> = {\n selector?: Selector<T>\n previousValue?: SelectedValueType<T>\n} & ListenerCallBack<T>\n\n/**\n * Represents a store.\n */\nexport type Store<T> = {\n /**\n * Get the current state of the store.\n * @returns The current state of the store.\n */\n getState: () => Partial<T>\n /**\n * Set the state of the store.\n * @param state - The new state to set.\n * @returns A promise that resolves to the new state.\n */\n setState: (state: Partial<T>) => Promise<Partial<T>>\n /**\n * Subscribe a listener to the store.\n * @param listener - The listener function to be subscribed.\n * @param selector - Optional selector function to transform the store state.\n * @returns A function to unsubscribe the listener.\n */\n subscribe: (listener: Listener<T>, selector?: Selector<T>) => () => void\n /**\n * Unubscribe a listener from the store.\n * @param listener - The listener function to be unsubscribed.\n */\n unsubscribe: (listener: Listener<T>) => void\n}\n// & { actions?: { [actionName: string]: ActionHandlerCaller } }\n\n// TODO infer actionNames from createStore arguments\n/**\n * Represents a store with additional actions.\n */\nexport type StoreWithActions<T> = Store<T> & { actions: { [actionName: string]: ActionHandlerCaller<T> } }\n\n// export type PendingAction<A> = `${A}Pending`\n// export type ErrorAction<A> = `${A}Error`\n// export type ActionName<A> = `${A}`\n\n// export type ActionsReturnType<A, TActionHandler> = Record<ActionName<A>, TActionHandler>\n\n// export type ActionsStateReturnType<A>\n// = Partial<Record<PendingAction<A>, boolean>> & Partial<Record<ErrorAction<A>, boolean>>\n\n\n// function invert<T, ActionName extends string>(\n// arr: ActionName[], state: Partial<T>, actionHandler: ActionHandlerCaller<T>,\n// ): Partial<T> & ActionsStateReturnType<ActionName> {\n// arr.forEach((x) => {\n// state[`${x}Error`] = true\n// state[`${x}Pending`] = true\n// })\n\n// return state as (Partial<T> & ActionsStateReturnType<ActionName>)\n// }\n\n// function invert2<T, A extends string>(\n// arr: A[], actions: ActionsReturnType<A>, actionHandler: ActionHandlerCaller<T>,\n// ): ActionsReturnType<A, ActionHandlerCaller<T>> {\n// arr.forEach((x) => {\n// actions[`${x}`] = actionHandler\n// })\n\n// return actions as ActionsReturnType<A>\n// }\n\n// function invert3<T, A extends string>(\n// arr: A[], actions: ActionsReturnType<A>, state: Partial<T>, actionHandler: ActionHandlerCaller<T>,\n// ): [Partial<T> & ActionsStateReturnType<A>, ActionsReturnType<A, ActionHandlerCaller<T>>] {\n// arr.forEach((x) => {\n// state[`${x}Error`] = actionHandler\n// state[`${x}Pending`] = actionHandler\n// actions[`${x}`] = actionHandler\n// })\n\n// return [state, actions] as [Partial<T> & ActionsStateReturnType<A>, ActionsReturnType<A, ActionHandlerCaller<T>>]\n// }\n\n// const example = invert(['foo', 'bar', 'baz'], {}, () => {})\n// const example2 = invert2(['foo', 'bar', 'baz'], {}, () => {})\n// const example3 = invert3(['foo', 'bar', 'baz'], {}, () => {})\n\n\n\n/**\n * Represents an action handler function.\n */\nexport type ActionHandler<T> = (\n getState: Store<T>['getState'], // Function to get the current state of the store\n setState: Store<T>['setState'], // Function to set the state of the store\n ...rest: unknown[]\n) => void | Partial<T> | Promise<void | Partial<T>>\n\n/**\n * Represents an reducer function.\n */\nexport type Reducer<T> = (\n state: Partial<T>,\n action: string,\n ...rest: unknown[]\n) => Partial<T>\n\n\n/**\n * Represents a function that calls an action handler.\n */\nexport type ActionHandlerCaller<T> = (...args: unknown[]) => void | Partial<T> | Promise<void | Partial<T>>\n\n\ntype Actions<T> = { [key: string]: ActionHandler<T>}\n/**\n * Creates a new store.\n * @param initialState - The initial state of the store.\n * @param actions - Optional actions for the store.\n * @returns The created store.\n */\nexport const createStore = <T>(\n initialState: Partial<T>,\n actions?: Actions<T>,\n reducer?: Reducer<T>,\n): Store<T> | StoreWithActions<T> => {\n let currentState: Partial<T> = initialState\n const listeners = new Set<Listener<T>>()\n\n /**\n * Gets the current state of the store.\n * @returns The current state of the store.\n */\n const getState = (): Partial<T> => currentState\n\n // TODO debounce, batch? what is the meaningful time between setState ofr UI to be rendered and registerd by User?\n /**\n * Sets the state of the store.\n * @param newState - The new state to set.\n * @returns A promise that resolves to the new state.\n */\n const setState = async (newState: Partial<T>): Promise<Partial<T>> => {\n currentState = newState\n\n // eslint-disable-next-line no-restricted-syntax\n for (const listener of listeners) {\n // has Listener selector?\n const selector: Selector<T> | undefined = listener?.selector\n\n // TODO compare selected value to the previous values of that listener/selector pair\n // if listener.previousValue === selector(currentState) no call\n // else listener.previousValue = selector(currentState) and call\n // l1 cache, weak references?\n const newValue: SelectedValueType<T> = selector ? selector(currentState) : currentState\n\n // TODO plugin equality\n if (listener.previousValue === undefined || listener.previousValue !== newValue) {\n listener.previousValue = newValue\n // eslint-disable-next-line no-await-in-loop\n await listener(newValue as Partial<T>)\n }\n }\n return currentState\n }\n\n /**\n * Represents the basic API of the store.\n */\n const storeBaseicApi: Store<T> = {\n /**\n * Get the current state of the store.\n * @returns The current state of the store.\n */\n getState,\n /**\n * Set the state of the store.\n * @param state - The new state to set.\n * @returns A promise that resolves to the new state.\n */\n setState,\n /**\n * Subscribe a listener to the store.\n * @param listener - The listener function to be subscribed.\n * @returns A function to unsubscribe the listener.\n */\n subscribe: (listener: Listener<T>, selector?: Selector<T>) => {\n if (selector && listener.selector && listener.selector !== selector) {\n throw new Error('Error, mismatch selector, listener.selector !== selector.')\n }\n if (selector && !listener.selector) {\n // eslint-disable-next-line no-param-reassign\n listener.selector = selector\n }\n\n if (listener.selector) {\n // setting the previousValue for the next cache/equality check\n // eslint-disable-next-line no-param-reassign\n listener.previousValue = listener.selector(getState())\n }\n\n listeners.add(listener)\n return () => listeners.delete(listener)\n },\n /**\n * Unsubscribe a listener from the store.\n * @param listener - The listener function to be unsubscribed.\n */\n unsubscribe: (listener: Listener<T>) => {\n listeners.delete(listener)\n },\n }\n\n /**\n * Resolves the actions and creates action handlers.\n */\n const resolvedActions: Actions<T> | null | undefined\n = actions ? Object.entries(actions)?.reduce(\n (\n aggregator: Record<string, ActionHandlerCaller<T>>,\n [actionName, actionHandler]: [string, ActionHandler<T>],\n ) => {\n // eslint-disable-next-line no-param-reassign\n aggregator[actionName] = async(...rest: unknown[]): Promise<void | Partial<T>> => {\n // TODO try to not call subscriber too many times becuase of Error and Pending values\n const isAsync = isFunctionAsync(actionHandler as () => unknown)\n\n if (isAsync) {\n setState({\n ...getState(),\n [`${actionName}Error`]: null,\n [`${actionName}Pending`]: true,\n })\n }\n\n try {\n const resultOfAction = await actionHandler(getState, setState, ...rest)\n\n // TODO try to mutate state only once with the results, that means pass custom setState to action,\n // so that it would matk pending and error already inside action\n if (reducer) {\n setState(reducer(getState(), actionName, ...rest))\n }\n\n if (isAsync) {\n setState({ ...getState(), [`${actionName}Pending`]: false })\n }\n\n return resultOfAction\n } catch (error) {\n if (isAsync) {\n setState({\n ...getState(),\n [`${actionName}Pending`]: false,\n [`${actionName}Error`]: error,\n })\n }\n throw error\n }\n }\n\n return aggregator\n },\n {},\n ) : null\n\n /**\n * Represents the store combined with actions.\n */\n const storeCombinedWithActions = {\n ...storeBaseicApi,\n ...(resolvedActions ? { actions: { ...resolvedActions } } : {}),\n }\n\n return resolvedActions\n ? storeCombinedWithActions as StoreWithActions<T>\n // ? storeCombinedWithActions as StoreWithActions<T> & ActionsStateReturnType<A>\n : storeCombinedWithActions as Store<T>\n}\n"],"names":["createStore","initialState","actions","reducer","currentState","listeners","Set","getState","setState","_ref","_asyncToGenerator","newState","listener","selector","newValue","undefined","previousValue","_x","apply","this","arguments","storeBaseicApi","subscribe","Error","add","delete","unsubscribe","resolvedActions","Object","entries","reduce","aggregator","_ref2","actionName","actionHandler","isAsync","isFunctionAsync","_len","length","rest","Array","_key","resultOfAction","error","storeCombinedWithActions"],"mappings":"2IAgJ2BA,CACzBC,EACAC,EACAC,KAEA,IAAIC,EAA2BH,EAC/B,MAAMI,EAAY,IAAIC,IAMhBC,EAAWA,IAAkBH,EAQ7BI,EAAQ,WAAA,IAAAC,EAAAC,oBAAG,UAAOC,GACtBP,EAAeO,EAGf,IAAK,MAAMC,KAAYP,EAAW,CAEhC,MAAMQ,EAAoCD,GAAUC,SAM9CC,EAAiCD,EAAWA,EAAST,GAAgBA,OAG5CW,IAA3BH,EAASI,eAA+BJ,EAASI,gBAAkBF,IACrEF,EAASI,cAAgBF,QAEnBF,EAASE,GAEnB,CACA,OAAOV,KACR,OAtBKI,SAAQS,GAAA,OAAAR,EAAAS,MAAAC,KAAAC,UAAA,EAAA,GA2BRC,EAA2B,CAK/Bd,WAMAC,WAMAc,UAAWA,CAACV,EAAuBC,KACjC,GAAIA,GAAYD,EAASC,UAAYD,EAASC,WAAaA,EACzD,MAAM,IAAIU,MAAM,6DAclB,OAZIV,IAAaD,EAASC,WAExBD,EAASC,SAAWA,GAGlBD,EAASC,WAGXD,EAASI,cAAgBJ,EAASC,SAASN,MAG7CF,EAAUmB,IAAIZ,GACP,IAAMP,EAAUoB,OAAOb,EAAS,EAMzCc,YAAcd,IACZP,EAAUoB,OAAOb,EAAS,GAOxBe,EACFzB,EAAU0B,OAAOC,QAAQ3B,IAAU4B,QACnC,CACEC,EAAkDC,KAE/C,IADFC,EAAYC,GAA0CF,EAyCvD,OAtCAD,EAAWE,GAAWvB,EAAAA,kBAAG,YAEvB,MAAMyB,EAAUC,kBAAgBF,GAE5BC,GACF3B,EAAS,IACJD,IACH,CAAC,GAAG0B,UAAoB,KACxB,CAAC,GAAGA,aAAsB,IAI9B,IAAI,IAAA,IAAAI,EAAAjB,UAAAkB,OAZ4BC,EAAIC,IAAAA,MAAAH,GAAAI,EAAA,EAAAA,EAAAJ,EAAAI,IAAJF,EAAIE,GAAArB,UAAAqB,GAalC,MAAMC,QAAuBR,EAAc3B,EAAUC,KAAa+B,GAYlE,OARIpC,GACFK,EAASL,EAAQI,IAAY0B,KAAeM,IAG1CJ,GACF3B,EAAS,IAAKD,IAAY,CAAC,GAAG0B,aAAsB,IAG/CS,CACR,CAAC,MAAOC,GAQP,MAPIR,GACF3B,EAAS,IACJD,IACH,CAAC,GAAG0B,aAAsB,EAC1B,CAAC,GAAGA,UAAoBU,IAGtBA,CACR,KAGKZ,CAAU,GAEnB,CAAA,GACE,KAKAa,EAA2B,IAC5BvB,KACCM,EAAkB,CAAEzB,QAAS,IAAKyB,IAAsB,IAG9D,OACIiB,CAEoC"}
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("./keyExtractor.js"),t=require("./date.js"),r=require("./appState/peregrineMQ/index.js"),a=require("./helpers/birthnumber.validator.js"),s=require("./helpers/birthnumberCZSKvalidator.js"),o=require("./helpers/fileValidator.js"),i=require("./helpers/date.js"),p=require("./helpers/deviceInfo.js"),n=require("./helpers/emailMatcher.js"),l=require("./helpers/file.js"),x=require("./helpers/objectOperations.js"),m=require("./helpers/other.js"),c=require("./helpers/textValueOperations.js"),u=require("./helpers/valueOperations.js"),d=require("./helpers/cancelableDelayedFunction.js"),S=require("./helpers/ui.js"),T=require("./helpers/text.js"),h=require("./webComponents/webComponent.utils.js"),g=require("./appState/store/store.vanillajs.js"),v=require("./appState/store/store.vanillajs.templates.js"),b=require("./appState/store/useStore.react.js"),M=require("./appState/peregrineMQ/peregrineMQ.js"),j=require("./appState/stateMachine/tiny-state-machine.base.js");exports.keyExtractor=e.keyExtractor,exports.keyExtractorFunction=e.keyExtractorFunction,exports.dateRangeFormat=t.dateRangeFormat,exports.getDateTime=t.getDateTime,exports.getTimeFromNow=t.getTimeFromNow,exports.getTimeFromNowOriginal=t.getTimeFromNowOriginal,exports.getTimeTo=t.getTimeTo,exports.peregrineMQInstance=r.peregrineMQInstance,exports.isBirthNumberValid=a.isBirthNumberValid,exports.getMatch=s.getMatch,exports.isValidFormat=s.isValidFormat,exports.isValidModulo11=s.isValidModulo11,exports.parse=s.parse,exports.regex=s.regex,exports.parseCSVdata=o.parseCSVdata,exports.validateCSVFile=o.validateCSVFile,exports.validateCSVlines=o.validateCSVlines,exports.validateJSONFile=o.validateJSONFile,exports.validateLineCellTrimmed=o.validateLineCellTrimmed,exports.validateLineNumColumns=o.validateLineNumColumns,exports.validateSDFFile=o.validateSDFFile,exports.DATE_FORMAT=i.DATE_FORMAT,exports.DATE_TIME_FORMAT=i.DATE_TIME_FORMAT,exports.formatDate=i.formatDate,exports.formatDateTime=i.formatDateTime,exports.formatDateToTimestamp=i.formatDateToTimestamp,exports.getDate=i.getDate,exports.getDeviceId=p.getDeviceId,exports.emailMatch=n.emailMatch,exports.emailMatcher=n.emailMatcher,exports.regexBuilder=n.regexBuilder,exports.cleanCsvLines=l.cleanCsvLines,exports.formatFilePath=l.formatFilePath,exports.arrayToObjectTree=x.arrayToObjectTree,exports.chunkArray=x.chunkArray,exports.duplicatesInArray=x.duplicatesInArray,exports.formatJsonString=x.formatJsonString,exports.formatObj=x.formatObj,exports.formatObj2=x.formatObj2,exports.AsyncFunctionTemplate=m.AsyncFunctionTemplate,exports.debounce=m.debounce,exports.delay=m.delay,exports.isFunctionAsync=m.isFunctionAsync,exports.memoize=m.memoize,exports.memoizeComplex=m.memoizeComplex,exports.memoizer=m.memoizer,exports.nestedTernary=m.nestedTernary,exports.escapeRegExp=c.escapeRegExp,exports.fileNameExt=c.fileNameExt,exports.findStringInText=c.findStringInText,exports.normalizeString=c.normalizeString,exports.removeWhitespaces=c.removeWhitespaces,exports.sanitizeId=c.sanitizeId,exports.sanitizePathId=c.sanitizePathId,exports.toLowerCase=c.toLowerCase,exports.toUpperCase=c.toUpperCase,exports.truncateText=c.truncateText,exports.Operation=u.Operation,exports.decrementValue=u.decrementValue,exports.incerementValue=u.incerementValue,exports.numberDefined=u.numberDefined,exports.numberOperation=u.numberOperation,exports.restrictNumberInLimits=u.restrictNumberInLimits,exports.setValue=u.setValue,exports.cancelableSetInterval=d.cancelableSetInterval,exports.cancelableSetTimeout=d.cancelableSetTimeout,exports.anchorClick=S.anchorClick,exports.classNames=S.classNames,exports.generateId=S.generateId,exports.mapSerReplacer=S.mapSerReplacer,exports.noop=S.noop,exports.parseProps=S.parseProps,exports.composeId=T.composeId,exports.defaultSanitizeConfig=T.defaultSanitizeConfig,exports.sanitizeHtml=T.sanitizeHtml,exports.ced=h.ced,exports.createResolveAttribute=h.createResolveAttribute,exports.customElementDefine=h.customElementDefine,exports.resolveAttributes=h.resolveAttributes,exports.createStore=g.createStore,exports.createDataStore=v.createDataStore,exports.useStore=b.useStore,exports.useStoreApi=b.useStoreApi,exports.PeregrineMQ=M.PeregrineMQ,exports.PeregrineMQClearError=M.PeregrineMQClearError,exports.TinyStateMachine=j.TinyStateMachine,exports.TinyStateMachineEvent=j.TinyStateMachineEvent,exports.TinyStateMachineEventType=j.TinyStateMachineEventType,exports.TinyStateMachineState=j.TinyStateMachineState,exports.createStates=j.createStates,exports.stateIterator=j.stateIterator;
1
+ "use strict";var e=require("./keyExtractor.js"),t=require("./date.js"),r=require("./appState/peregrineMQ/index.js"),a=require("./helpers/birthnumber.validator.js"),s=require("./helpers/birthnumberCZSKvalidator.js"),o=require("./helpers/fileValidator.js"),i=require("./helpers/date.js"),p=require("./helpers/deviceInfo.js"),n=require("./helpers/emailMatcher.js"),l=require("./helpers/file.js"),x=require("./helpers/objectOperations.js"),m=require("./helpers/other.js"),c=require("./helpers/textValueOperations.js"),u=require("./helpers/valueOperations.js"),d=require("./helpers/cancelableDelayedFunction.js"),S=require("./helpers/ui.js"),T=require("./helpers/text.js"),g=require("./webComponents/webComponent.utils.js"),h=require("./appState/store/store.vanillajs.js"),M=require("./appState/store/store.vanillajs.templates.js"),v=require("./appState/store/useStore.react.js"),b=require("./appState/peregrineMQ/peregrineMQ.js"),j=require("./appState/peregrineMQ/usePeregrineMQ.react.js"),y=require("./appState/stateMachine/tiny-state-machine.base.js");exports.keyExtractor=e.keyExtractor,exports.keyExtractorFunction=e.keyExtractorFunction,exports.dateRangeFormat=t.dateRangeFormat,exports.getDateTime=t.getDateTime,exports.getTimeFromNow=t.getTimeFromNow,exports.getTimeFromNowOriginal=t.getTimeFromNowOriginal,exports.getTimeTo=t.getTimeTo,exports.peregrineMQInstance=r.peregrineMQInstance,exports.isBirthNumberValid=a.isBirthNumberValid,exports.getMatch=s.getMatch,exports.isValidFormat=s.isValidFormat,exports.isValidModulo11=s.isValidModulo11,exports.parse=s.parse,exports.regex=s.regex,exports.parseCSVdata=o.parseCSVdata,exports.validateCSVFile=o.validateCSVFile,exports.validateCSVlines=o.validateCSVlines,exports.validateJSONFile=o.validateJSONFile,exports.validateLineCellTrimmed=o.validateLineCellTrimmed,exports.validateLineNumColumns=o.validateLineNumColumns,exports.validateSDFFile=o.validateSDFFile,exports.DATE_FORMAT=i.DATE_FORMAT,exports.DATE_TIME_FORMAT=i.DATE_TIME_FORMAT,exports.formatDate=i.formatDate,exports.formatDateTime=i.formatDateTime,exports.formatDateToTimestamp=i.formatDateToTimestamp,exports.getDate=i.getDate,exports.getDeviceId=p.getDeviceId,exports.emailMatch=n.emailMatch,exports.emailMatcher=n.emailMatcher,exports.regexBuilder=n.regexBuilder,exports.cleanCsvLines=l.cleanCsvLines,exports.formatFilePath=l.formatFilePath,exports.arrayToObjectTree=x.arrayToObjectTree,exports.chunkArray=x.chunkArray,exports.duplicatesInArray=x.duplicatesInArray,exports.formatJsonString=x.formatJsonString,exports.formatObj=x.formatObj,exports.formatObj2=x.formatObj2,exports.AsyncFunctionTemplate=m.AsyncFunctionTemplate,exports.debounce=m.debounce,exports.delay=m.delay,exports.isFunctionAsync=m.isFunctionAsync,exports.memoize=m.memoize,exports.memoizeComplex=m.memoizeComplex,exports.memoizer=m.memoizer,exports.nestedTernary=m.nestedTernary,exports.escapeRegExp=c.escapeRegExp,exports.fileNameExt=c.fileNameExt,exports.findStringInText=c.findStringInText,exports.normalizeString=c.normalizeString,exports.removeWhitespaces=c.removeWhitespaces,exports.sanitizeId=c.sanitizeId,exports.sanitizePathId=c.sanitizePathId,exports.toLowerCase=c.toLowerCase,exports.toUpperCase=c.toUpperCase,exports.truncateText=c.truncateText,exports.Operation=u.Operation,exports.decrementValue=u.decrementValue,exports.incerementValue=u.incerementValue,exports.numberDefined=u.numberDefined,exports.numberOperation=u.numberOperation,exports.restrictNumberInLimits=u.restrictNumberInLimits,exports.setValue=u.setValue,exports.cancelableSetInterval=d.cancelableSetInterval,exports.cancelableSetTimeout=d.cancelableSetTimeout,exports.anchorClick=S.anchorClick,exports.classNames=S.classNames,exports.generateId=S.generateId,exports.mapSerReplacer=S.mapSerReplacer,exports.noop=S.noop,exports.parseProps=S.parseProps,exports.composeId=T.composeId,exports.defaultSanitizeConfig=T.defaultSanitizeConfig,exports.sanitizeHtml=T.sanitizeHtml,exports.ced=g.ced,exports.createResolveAttribute=g.createResolveAttribute,exports.customElementDefine=g.customElementDefine,exports.resolveAttributes=g.resolveAttributes,exports.createStore=h.createStore,exports.createDataStore=M.createDataStore,exports.useStore=v.useStore,exports.useStoreApi=v.useStoreApi,exports.PeregrineMQ=b.PeregrineMQ,exports.PeregrineMQClearError=b.PeregrineMQClearError,exports.usePeregrineMQ=j.usePeregrineMQ,exports.TinyStateMachine=y.TinyStateMachine,exports.TinyStateMachineEvent=y.TinyStateMachineEvent,exports.TinyStateMachineEventType=y.TinyStateMachineEventType,exports.TinyStateMachineState=y.TinyStateMachineState,exports.createStates=y.createStates,exports.stateIterator=y.stateIterator;
2
2
  //# sourceMappingURL=index.js.map