@rfkit/charts 1.2.20 → 1.2.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/index.js +1066 -741
- package/package.json +1 -1
- package/types/store.d.ts +13 -1
package/index.js
CHANGED
|
@@ -2218,9 +2218,11 @@ var __webpack_modules__ = {
|
|
|
2218
2218
|
|
|
2219
2219
|
.slider-Gua7k5 {
|
|
2220
2220
|
box-sizing: border-box;
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2221
|
+
grid-template: "left-edge top-edge right-edge"
|
|
2222
|
+
"left-edge middle right-edge" 1fr
|
|
2223
|
+
"left-edge bottom-edge right-edge"
|
|
2224
|
+
/ auto 1fr auto;
|
|
2225
|
+
display: grid;
|
|
2224
2226
|
position: absolute;
|
|
2225
2227
|
}
|
|
2226
2228
|
|
|
@@ -2228,28 +2230,20 @@ var __webpack_modules__ = {
|
|
|
2228
2230
|
content: "";
|
|
2229
2231
|
border: 2px dashed var(--theme-color-base);
|
|
2230
2232
|
pointer-events: none;
|
|
2231
|
-
border-left: none;
|
|
2232
|
-
border-right: none;
|
|
2233
2233
|
position: absolute;
|
|
2234
2234
|
inset: 0;
|
|
2235
2235
|
}
|
|
2236
2236
|
|
|
2237
2237
|
.slider-Gua7k5:hover:after {
|
|
2238
2238
|
border: 4px dashed var(--theme-color-base);
|
|
2239
|
-
border-left: none;
|
|
2240
|
-
border-right: none;
|
|
2241
2239
|
}
|
|
2242
2240
|
|
|
2243
2241
|
.sliderEdge-tcylcl {
|
|
2244
|
-
cursor: ns-resize;
|
|
2245
2242
|
-webkit-backdrop-filter: blur();
|
|
2246
2243
|
backdrop-filter: blur();
|
|
2247
2244
|
box-sizing: border-box;
|
|
2248
2245
|
justify-content: center;
|
|
2249
2246
|
align-items: center;
|
|
2250
|
-
width: 100%;
|
|
2251
|
-
height: auto;
|
|
2252
|
-
padding: 4px 0;
|
|
2253
2247
|
display: flex;
|
|
2254
2248
|
position: relative;
|
|
2255
2249
|
}
|
|
@@ -2270,9 +2264,40 @@ var __webpack_modules__ = {
|
|
|
2270
2264
|
opacity: .4;
|
|
2271
2265
|
}
|
|
2272
2266
|
|
|
2267
|
+
.sliderEdgeTop-X8FA2i {
|
|
2268
|
+
cursor: ns-resize;
|
|
2269
|
+
grid-area: top-edge;
|
|
2270
|
+
width: 100%;
|
|
2271
|
+
height: 6px;
|
|
2272
|
+
}
|
|
2273
|
+
|
|
2274
|
+
.sliderEdgeBottom-zX26bU {
|
|
2275
|
+
cursor: ns-resize;
|
|
2276
|
+
grid-area: bottom-edge;
|
|
2277
|
+
width: 100%;
|
|
2278
|
+
height: 6px;
|
|
2279
|
+
}
|
|
2280
|
+
|
|
2281
|
+
.sliderEdgeLeft-Gb0Gi6 {
|
|
2282
|
+
cursor: ew-resize;
|
|
2283
|
+
grid-area: left-edge;
|
|
2284
|
+
width: 6px;
|
|
2285
|
+
height: 100%;
|
|
2286
|
+
}
|
|
2287
|
+
|
|
2288
|
+
.sliderEdgeRight-zQLFdT {
|
|
2289
|
+
cursor: ew-resize;
|
|
2290
|
+
grid-area: right-edge;
|
|
2291
|
+
width: 6px;
|
|
2292
|
+
height: 100%;
|
|
2293
|
+
}
|
|
2294
|
+
|
|
2273
2295
|
.sliderMiddle-nnq5jr {
|
|
2274
2296
|
cursor: move;
|
|
2275
|
-
|
|
2297
|
+
grid-area: middle;
|
|
2298
|
+
justify-content: center;
|
|
2299
|
+
align-items: center;
|
|
2300
|
+
display: flex;
|
|
2276
2301
|
position: relative;
|
|
2277
2302
|
}
|
|
2278
2303
|
|
|
@@ -2292,14 +2317,127 @@ var __webpack_modules__ = {
|
|
|
2292
2317
|
opacity: .2;
|
|
2293
2318
|
}
|
|
2294
2319
|
|
|
2295
|
-
.
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2320
|
+
.middleInfo-uRmQqh {
|
|
2321
|
+
font-size: var(--size-font-second);
|
|
2322
|
+
padding: var(--size-gap-base);
|
|
2323
|
+
border-radius: var(--size-border-radius-second);
|
|
2324
|
+
border: 1px solid var(--theme-border-base);
|
|
2325
|
+
pointer-events: none;
|
|
2326
|
+
white-space: nowrap;
|
|
2327
|
+
z-index: 10;
|
|
2328
|
+
flex-direction: column;
|
|
2329
|
+
align-items: flex-start;
|
|
2330
|
+
gap: 2px;
|
|
2331
|
+
display: flex;
|
|
2332
|
+
position: relative;
|
|
2333
|
+
}
|
|
2334
|
+
|
|
2335
|
+
.middleInfo-uRmQqh:before {
|
|
2336
|
+
content: "";
|
|
2337
|
+
background: var(--theme-bg-second);
|
|
2338
|
+
opacity: .8;
|
|
2339
|
+
border-radius: inherit;
|
|
2340
|
+
z-index: -1;
|
|
2341
|
+
position: absolute;
|
|
2342
|
+
inset: 0;
|
|
2343
|
+
}
|
|
2344
|
+
|
|
2345
|
+
.middleInfoOutside-XT5SaD {
|
|
2346
|
+
position: absolute;
|
|
2347
|
+
top: 100%;
|
|
2348
|
+
left: 50%;
|
|
2349
|
+
transform: translateX(-50%)translateY(4px);
|
|
2350
|
+
}
|
|
2351
|
+
|
|
2352
|
+
.middleInfoAbove-N2rp8G {
|
|
2353
|
+
top: auto;
|
|
2354
|
+
bottom: 100%;
|
|
2355
|
+
transform: translateX(-50%)translateY(-4px);
|
|
2356
|
+
}
|
|
2357
|
+
|
|
2358
|
+
.externalLabel-viIhBd {
|
|
2359
|
+
font-size: var(--size-font-second);
|
|
2360
|
+
padding: calc(var(--size-gap-base) / 2);
|
|
2361
|
+
border-radius: var(--size-border-radius-second);
|
|
2362
|
+
border: 1px solid var(--theme-border-base);
|
|
2363
|
+
pointer-events: none;
|
|
2364
|
+
white-space: nowrap;
|
|
2365
|
+
z-index: 10;
|
|
2366
|
+
position: absolute;
|
|
2367
|
+
}
|
|
2368
|
+
|
|
2369
|
+
.externalLabel-viIhBd:before {
|
|
2370
|
+
content: "";
|
|
2371
|
+
background: var(--theme-bg-base);
|
|
2372
|
+
opacity: .8;
|
|
2373
|
+
border-radius: inherit;
|
|
2374
|
+
z-index: -1;
|
|
2375
|
+
position: absolute;
|
|
2376
|
+
inset: 0;
|
|
2377
|
+
}
|
|
2378
|
+
|
|
2379
|
+
.externalLabelLeft-LF34dy {
|
|
2380
|
+
transform: translate(-100%, -50%)translateX(-4px);
|
|
2381
|
+
}
|
|
2382
|
+
|
|
2383
|
+
.externalLabelRight-vsWp89 {
|
|
2384
|
+
transform: translate(0%, -50%)translateX(4px);
|
|
2385
|
+
}
|
|
2386
|
+
|
|
2387
|
+
.externalLabelTop-IX6khq {
|
|
2388
|
+
transform: translate(-50%, -100%)translateY(-4px);
|
|
2389
|
+
}
|
|
2390
|
+
|
|
2391
|
+
.externalLabelBottom-wtvHvR {
|
|
2392
|
+
transform: translate(-50%)translateY(4px);
|
|
2393
|
+
}
|
|
2394
|
+
|
|
2395
|
+
.externalLabelLeftInner-_wVg4C {
|
|
2396
|
+
transform: translate(0%, -50%)translateX(4px);
|
|
2397
|
+
}
|
|
2398
|
+
|
|
2399
|
+
.externalLabelRightInner-y93qhb {
|
|
2400
|
+
transform: translate(-100%, -50%)translateX(-4px);
|
|
2401
|
+
}
|
|
2402
|
+
|
|
2403
|
+
.externalLabelTopInner-MlYikk {
|
|
2404
|
+
transform: translate(-50%)translateY(4px);
|
|
2405
|
+
}
|
|
2406
|
+
|
|
2407
|
+
.externalLabelBottomInner-Nttz_A {
|
|
2408
|
+
transform: translate(-50%, -100%)translateY(-4px);
|
|
2409
|
+
}
|
|
2410
|
+
|
|
2411
|
+
.externalLabelTop-IX6khq.externalLabelHorizontalLeft-fnQkmH {
|
|
2412
|
+
transform: translate(-100%, -100%)translateX(-4px)translateY(-4px);
|
|
2413
|
+
}
|
|
2414
|
+
|
|
2415
|
+
.externalLabelTop-IX6khq.externalLabelHorizontalRight-Nc5hKi {
|
|
2416
|
+
transform: translate(0%, -100%)translateX(4px)translateY(-4px);
|
|
2417
|
+
}
|
|
2418
|
+
|
|
2419
|
+
.externalLabelTopInner-MlYikk.externalLabelHorizontalLeft-fnQkmH {
|
|
2420
|
+
transform: translate(-100%)translateX(-4px)translateY(4px);
|
|
2421
|
+
}
|
|
2422
|
+
|
|
2423
|
+
.externalLabelTopInner-MlYikk.externalLabelHorizontalRight-Nc5hKi {
|
|
2424
|
+
transform: translate(0%)translateX(4px)translateY(4px);
|
|
2425
|
+
}
|
|
2426
|
+
|
|
2427
|
+
.externalLabelBottom-wtvHvR.externalLabelHorizontalLeft-fnQkmH {
|
|
2428
|
+
transform: translate(-100%)translateX(-4px)translateY(4px);
|
|
2429
|
+
}
|
|
2430
|
+
|
|
2431
|
+
.externalLabelBottom-wtvHvR.externalLabelHorizontalRight-Nc5hKi {
|
|
2432
|
+
transform: translate(0%)translateX(4px)translateY(4px);
|
|
2433
|
+
}
|
|
2434
|
+
|
|
2435
|
+
.externalLabelBottomInner-Nttz_A.externalLabelHorizontalLeft-fnQkmH {
|
|
2436
|
+
transform: translate(-100%, -100%)translateX(-4px)translateY(-4px);
|
|
2437
|
+
}
|
|
2438
|
+
|
|
2439
|
+
.externalLabelBottomInner-Nttz_A.externalLabelHorizontalRight-Nc5hKi {
|
|
2440
|
+
transform: translate(0%, -100%)translateX(4px)translateY(-4px);
|
|
2303
2441
|
}
|
|
2304
2442
|
`,
|
|
2305
2443
|
""
|
|
@@ -2308,8 +2446,25 @@ var __webpack_modules__ = {
|
|
|
2308
2446
|
sliderContainer: "sliderContainer-lJQLJn",
|
|
2309
2447
|
slider: "slider-Gua7k5",
|
|
2310
2448
|
sliderEdge: "sliderEdge-tcylcl",
|
|
2449
|
+
sliderEdgeTop: "sliderEdgeTop-X8FA2i",
|
|
2450
|
+
sliderEdgeBottom: "sliderEdgeBottom-zX26bU",
|
|
2451
|
+
sliderEdgeLeft: "sliderEdgeLeft-Gb0Gi6",
|
|
2452
|
+
sliderEdgeRight: "sliderEdgeRight-zQLFdT",
|
|
2311
2453
|
sliderMiddle: "sliderMiddle-nnq5jr",
|
|
2312
|
-
|
|
2454
|
+
middleInfo: "middleInfo-uRmQqh",
|
|
2455
|
+
middleInfoOutside: "middleInfoOutside-XT5SaD",
|
|
2456
|
+
middleInfoAbove: "middleInfoAbove-N2rp8G",
|
|
2457
|
+
externalLabel: "externalLabel-viIhBd",
|
|
2458
|
+
externalLabelLeft: "externalLabelLeft-LF34dy",
|
|
2459
|
+
externalLabelRight: "externalLabelRight-vsWp89",
|
|
2460
|
+
externalLabelTop: "externalLabelTop-IX6khq",
|
|
2461
|
+
externalLabelBottom: "externalLabelBottom-wtvHvR",
|
|
2462
|
+
externalLabelLeftInner: "externalLabelLeftInner-_wVg4C",
|
|
2463
|
+
externalLabelRightInner: "externalLabelRightInner-y93qhb",
|
|
2464
|
+
externalLabelTopInner: "externalLabelTopInner-MlYikk",
|
|
2465
|
+
externalLabelBottomInner: "externalLabelBottomInner-Nttz_A",
|
|
2466
|
+
externalLabelHorizontalLeft: "externalLabelHorizontalLeft-fnQkmH",
|
|
2467
|
+
externalLabelHorizontalRight: "externalLabelHorizontalRight-Nc5hKi"
|
|
2313
2468
|
};
|
|
2314
2469
|
const __WEBPACK_DEFAULT_EXPORT__ = ___CSS_LOADER_EXPORT___;
|
|
2315
2470
|
},
|
|
@@ -7273,99 +7428,558 @@ function useAxisYWidth_useAxisYWidth() {
|
|
|
7273
7428
|
pluginBoxWidth: `calc(100% - ${w}px`
|
|
7274
7429
|
};
|
|
7275
7430
|
}
|
|
7276
|
-
var
|
|
7277
|
-
var
|
|
7278
|
-
|
|
7279
|
-
|
|
7280
|
-
|
|
7281
|
-
|
|
7282
|
-
|
|
7283
|
-
injectStylesIntoStyleTag_default()(
|
|
7284
|
-
const
|
|
7285
|
-
|
|
7286
|
-
|
|
7287
|
-
|
|
7288
|
-
|
|
7289
|
-
|
|
7290
|
-
|
|
7291
|
-
|
|
7292
|
-
|
|
7293
|
-
|
|
7294
|
-
|
|
7295
|
-
|
|
7296
|
-
|
|
7297
|
-
|
|
7298
|
-
|
|
7299
|
-
|
|
7300
|
-
|
|
7301
|
-
|
|
7302
|
-
|
|
7303
|
-
|
|
7304
|
-
|
|
7305
|
-
|
|
7306
|
-
|
|
7307
|
-
|
|
7308
|
-
|
|
7309
|
-
|
|
7310
|
-
|
|
7311
|
-
|
|
7312
|
-
|
|
7313
|
-
|
|
7314
|
-
|
|
7315
|
-
|
|
7316
|
-
|
|
7317
|
-
|
|
7318
|
-
top: position
|
|
7319
|
-
},
|
|
7320
|
-
children: timeValues[index]
|
|
7321
|
-
}, index))
|
|
7322
|
-
});
|
|
7323
|
-
};
|
|
7324
|
-
const FullTicks = /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__["default"].memo(FullTicks_Ticks);
|
|
7325
|
-
var Ticks_styles_module = __webpack_require__("../../../../../../node_modules/.pnpm/@rsbuild+core@1.3.18/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[11].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[11].use[2]!../../../../../../node_modules/.pnpm/@rsbuild+plugin-less@1.5.0_@rsbuild+core@1.6.7/node_modules/@rsbuild/plugin-less/compiled/less-loader/index.js??ruleSet[1].rules[11].use[3]!./src/components/AxisY/heatmap/components/Ticks/styles.module.less");
|
|
7326
|
-
var Ticks_styles_module_options = {};
|
|
7327
|
-
Ticks_styles_module_options.styleTagTransform = styleTagTransform_default();
|
|
7328
|
-
Ticks_styles_module_options.setAttributes = setAttributesWithoutAttributes_default();
|
|
7329
|
-
Ticks_styles_module_options.insert = insertBySelector_default().bind(null, "head");
|
|
7330
|
-
Ticks_styles_module_options.domAPI = styleDomAPI_default();
|
|
7331
|
-
Ticks_styles_module_options.insertStyleElement = insertStyleElement_default();
|
|
7332
|
-
injectStylesIntoStyleTag_default()(Ticks_styles_module.Z, Ticks_styles_module_options);
|
|
7333
|
-
const components_Ticks_styles_module = Ticks_styles_module.Z && Ticks_styles_module.Z.locals ? Ticks_styles_module.Z.locals : void 0;
|
|
7334
|
-
const Ticks_COMPONENT_KEY = 'AxisYHeatmapTicks';
|
|
7335
|
-
const Ticks_Ticks = (props)=>{
|
|
7336
|
-
const { id, inside = false } = props;
|
|
7337
|
-
const { state: { globalID } } = useStore_useStore();
|
|
7338
|
-
const [tickFormat, setTickFormat] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)();
|
|
7339
|
-
(0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>{
|
|
7340
|
-
if (id && globalID) withUpdateData(id, Ticks_COMPONENT_KEY, ()=>{
|
|
7341
|
-
let { waterfallData: d } = withDatabase(globalID).getAllRawData();
|
|
7342
|
-
if (d?.length > 0) {
|
|
7343
|
-
if (d.at(0)?.length === 0) d = d?.filter?.((i)=>i?.length > 0);
|
|
7344
|
-
const start = d.at(-1)?.timestamp;
|
|
7345
|
-
const end = d.at(0)?.timestamp;
|
|
7346
|
-
if (start && end) setTickFormat((start - end) / 1e3);
|
|
7347
|
-
}
|
|
7348
|
-
});
|
|
7431
|
+
var AxisX_styles_module = __webpack_require__("../../../node_modules/.pnpm/@rsbuild+core@1.3.18/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[11].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[11].use[2]!../../../node_modules/.pnpm/@rsbuild+plugin-less@1.5.0_@rsbuild+core@1.6.7/node_modules/@rsbuild/plugin-less/compiled/less-loader/index.js??ruleSet[1].rules[11].use[3]!./src/components/AxisX/styles.module.less");
|
|
7432
|
+
var AxisX_styles_module_options = {};
|
|
7433
|
+
AxisX_styles_module_options.styleTagTransform = styleTagTransform_default();
|
|
7434
|
+
AxisX_styles_module_options.setAttributes = setAttributesWithoutAttributes_default();
|
|
7435
|
+
AxisX_styles_module_options.insert = insertBySelector_default().bind(null, "head");
|
|
7436
|
+
AxisX_styles_module_options.domAPI = styleDomAPI_default();
|
|
7437
|
+
AxisX_styles_module_options.insertStyleElement = insertStyleElement_default();
|
|
7438
|
+
injectStylesIntoStyleTag_default()(AxisX_styles_module.Z, AxisX_styles_module_options);
|
|
7439
|
+
const components_AxisX_styles_module = AxisX_styles_module.Z && AxisX_styles_module.Z.locals ? AxisX_styles_module.Z.locals : void 0;
|
|
7440
|
+
var RulerTicks_styles_module = __webpack_require__("../../../node_modules/.pnpm/@rsbuild+core@1.3.18/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[11].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[11].use[2]!../../../node_modules/.pnpm/@rsbuild+plugin-less@1.5.0_@rsbuild+core@1.6.7/node_modules/@rsbuild/plugin-less/compiled/less-loader/index.js??ruleSet[1].rules[11].use[3]!./src/components/RulerTicks/styles.module.less");
|
|
7441
|
+
var RulerTicks_styles_module_options = {};
|
|
7442
|
+
RulerTicks_styles_module_options.styleTagTransform = styleTagTransform_default();
|
|
7443
|
+
RulerTicks_styles_module_options.setAttributes = setAttributesWithoutAttributes_default();
|
|
7444
|
+
RulerTicks_styles_module_options.insert = insertBySelector_default().bind(null, "head");
|
|
7445
|
+
RulerTicks_styles_module_options.domAPI = styleDomAPI_default();
|
|
7446
|
+
RulerTicks_styles_module_options.insertStyleElement = insertStyleElement_default();
|
|
7447
|
+
injectStylesIntoStyleTag_default()(RulerTicks_styles_module.Z, RulerTicks_styles_module_options);
|
|
7448
|
+
const components_RulerTicks_styles_module = RulerTicks_styles_module.Z && RulerTicks_styles_module.Z.locals ? RulerTicks_styles_module.Z.locals : void 0;
|
|
7449
|
+
const RulerTicks_RulerTicks = ({ length = 10, tickColor = 'var(--theme-color-base)', tickHeight = 8, strokeWidth = 1, orientation = 'horizontal', split = 2 })=>{
|
|
7450
|
+
const renderTick = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((index)=>{
|
|
7451
|
+
const tickSpacing = 100 / length;
|
|
7452
|
+
const position = index * tickSpacing;
|
|
7453
|
+
let tickHeightUse = 'horizontal' === orientation && index % split === 0 || 'vertical' === orientation && index % split !== 0 ? 1.68 * tickHeight : tickHeight;
|
|
7454
|
+
if ('horizontal' === orientation) tickHeightUse /= 0.5;
|
|
7455
|
+
if (!position) return null;
|
|
7456
|
+
return 'horizontal' === orientation ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("line", {
|
|
7457
|
+
x1: position,
|
|
7458
|
+
y1: "0",
|
|
7459
|
+
x2: position,
|
|
7460
|
+
y2: tickHeightUse,
|
|
7461
|
+
stroke: tickColor,
|
|
7462
|
+
strokeWidth: strokeWidth,
|
|
7463
|
+
vectorEffect: "non-scaling-stroke"
|
|
7464
|
+
}, `tick-${index}`) : /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("line", {
|
|
7465
|
+
x1: "100",
|
|
7466
|
+
y1: position,
|
|
7467
|
+
x2: 100 - tickHeightUse,
|
|
7468
|
+
y2: position,
|
|
7469
|
+
stroke: tickColor,
|
|
7470
|
+
strokeWidth: strokeWidth,
|
|
7471
|
+
vectorEffect: "non-scaling-stroke"
|
|
7472
|
+
}, `tick-${index}`);
|
|
7349
7473
|
}, [
|
|
7350
|
-
|
|
7351
|
-
|
|
7474
|
+
length,
|
|
7475
|
+
tickColor,
|
|
7476
|
+
strokeWidth,
|
|
7477
|
+
orientation
|
|
7352
7478
|
]);
|
|
7353
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("
|
|
7354
|
-
className:
|
|
7355
|
-
|
|
7356
|
-
|
|
7357
|
-
|
|
7479
|
+
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("svg", {
|
|
7480
|
+
className: components_RulerTicks_styles_module.RulerTicks,
|
|
7481
|
+
width: "100%",
|
|
7482
|
+
height: "100%",
|
|
7483
|
+
preserveAspectRatio: "none",
|
|
7484
|
+
viewBox: "0 0 100 100",
|
|
7358
7485
|
children: [
|
|
7359
|
-
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("
|
|
7360
|
-
|
|
7361
|
-
|
|
7486
|
+
'horizontal' === orientation ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("line", {
|
|
7487
|
+
x1: "0",
|
|
7488
|
+
y1: "0",
|
|
7489
|
+
x2: "100",
|
|
7490
|
+
y2: "0",
|
|
7491
|
+
stroke: tickColor,
|
|
7492
|
+
strokeWidth: strokeWidth,
|
|
7493
|
+
vectorEffect: "non-scaling-stroke"
|
|
7494
|
+
}) : /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("line", {
|
|
7495
|
+
x1: "100",
|
|
7496
|
+
y1: "0",
|
|
7497
|
+
x2: "100",
|
|
7498
|
+
y2: "100",
|
|
7499
|
+
stroke: tickColor,
|
|
7500
|
+
strokeWidth: strokeWidth,
|
|
7501
|
+
vectorEffect: "non-scaling-stroke"
|
|
7362
7502
|
}),
|
|
7363
|
-
|
|
7364
|
-
|
|
7365
|
-
|
|
7366
|
-
|
|
7367
|
-
|
|
7368
|
-
|
|
7503
|
+
Array.from({
|
|
7504
|
+
length: length + 1
|
|
7505
|
+
}).map((_, index)=>renderTick(index))
|
|
7506
|
+
]
|
|
7507
|
+
});
|
|
7508
|
+
};
|
|
7509
|
+
const components_RulerTicks = RulerTicks_RulerTicks;
|
|
7510
|
+
var ZoomOffsetContainer_styles_module = __webpack_require__("../../../../node_modules/.pnpm/@rsbuild+core@1.3.18/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[11].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[11].use[2]!../../../../node_modules/.pnpm/@rsbuild+plugin-less@1.5.0_@rsbuild+core@1.6.7/node_modules/@rsbuild/plugin-less/compiled/less-loader/index.js??ruleSet[1].rules[11].use[3]!./src/components/Zoom/ZoomOffsetContainer/styles.module.less");
|
|
7511
|
+
var ZoomOffsetContainer_styles_module_options = {};
|
|
7512
|
+
ZoomOffsetContainer_styles_module_options.styleTagTransform = styleTagTransform_default();
|
|
7513
|
+
ZoomOffsetContainer_styles_module_options.setAttributes = setAttributesWithoutAttributes_default();
|
|
7514
|
+
ZoomOffsetContainer_styles_module_options.insert = insertBySelector_default().bind(null, "head");
|
|
7515
|
+
ZoomOffsetContainer_styles_module_options.domAPI = styleDomAPI_default();
|
|
7516
|
+
ZoomOffsetContainer_styles_module_options.insertStyleElement = insertStyleElement_default();
|
|
7517
|
+
injectStylesIntoStyleTag_default()(ZoomOffsetContainer_styles_module.Z, ZoomOffsetContainer_styles_module_options);
|
|
7518
|
+
const Zoom_ZoomOffsetContainer_styles_module = ZoomOffsetContainer_styles_module.Z && ZoomOffsetContainer_styles_module.Z.locals ? ZoomOffsetContainer_styles_module.Z.locals : void 0;
|
|
7519
|
+
const ZoomOffsetContainer = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.forwardRef)(({ children, className }, ref)=>{
|
|
7520
|
+
const { state: { zoom: { style } } } = useStore_useStore();
|
|
7521
|
+
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
7522
|
+
ref: ref,
|
|
7523
|
+
className: `${Zoom_ZoomOffsetContainer_styles_module.ZoomOffsetContainer} ${className}`,
|
|
7524
|
+
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
7525
|
+
className: Zoom_ZoomOffsetContainer_styles_module.con,
|
|
7526
|
+
style: style,
|
|
7527
|
+
children: children
|
|
7528
|
+
})
|
|
7529
|
+
});
|
|
7530
|
+
});
|
|
7531
|
+
const Zoom_ZoomOffsetContainer = ZoomOffsetContainer;
|
|
7532
|
+
const ThreeFixedTicks = ()=>{
|
|
7533
|
+
const { state: { zoom: { interval: { start: intervalStart, end: intervalEnd } }, axisX: { unit, unitKHz }, segments } } = useStore_useStore();
|
|
7534
|
+
const { totalPoints } = segments;
|
|
7535
|
+
const endIndex = totalPoints - 1;
|
|
7536
|
+
const { start, bandwidth = 0 } = segments[0] ?? {};
|
|
7537
|
+
const center = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>{
|
|
7538
|
+
if (!endIndex || !bandwidth || void 0 === start) return 0;
|
|
7539
|
+
const midIndex = (0, utils.wF)(intervalStart, intervalEnd);
|
|
7540
|
+
const safeIndex = Math.max(0, Math.min(midIndex, endIndex));
|
|
7541
|
+
return (0, utils.lj)(start + safeIndex * bandwidth / (1000 * endIndex));
|
|
7542
|
+
}, [
|
|
7543
|
+
intervalStart,
|
|
7544
|
+
intervalEnd,
|
|
7545
|
+
start,
|
|
7546
|
+
endIndex,
|
|
7547
|
+
bandwidth
|
|
7548
|
+
]);
|
|
7549
|
+
const bandwidthDiff = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>{
|
|
7550
|
+
if (!totalPoints || !bandwidth) return 0;
|
|
7551
|
+
const intervalWidth = intervalEnd - intervalStart + 1;
|
|
7552
|
+
return (0, utils.lj)(intervalWidth * bandwidth / (2 * totalPoints));
|
|
7553
|
+
}, [
|
|
7554
|
+
intervalStart,
|
|
7555
|
+
intervalEnd,
|
|
7556
|
+
totalPoints,
|
|
7557
|
+
bandwidth
|
|
7558
|
+
]);
|
|
7559
|
+
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
|
|
7560
|
+
className: components_AxisX_styles_module.con,
|
|
7561
|
+
children: [
|
|
7562
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(FrequencyLabel, {
|
|
7563
|
+
value: bandwidthDiff,
|
|
7564
|
+
unit: unitKHz,
|
|
7565
|
+
prefix: "-"
|
|
7566
|
+
}),
|
|
7567
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(FrequencyLabel, {
|
|
7568
|
+
value: center,
|
|
7569
|
+
unit: unit
|
|
7570
|
+
}),
|
|
7571
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(FrequencyLabel, {
|
|
7572
|
+
value: bandwidthDiff,
|
|
7573
|
+
unit: unitKHz,
|
|
7574
|
+
prefix: "+"
|
|
7575
|
+
}),
|
|
7576
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(components_RulerTicks, {
|
|
7577
|
+
length: 10,
|
|
7578
|
+
split: 5
|
|
7579
|
+
})
|
|
7580
|
+
]
|
|
7581
|
+
});
|
|
7582
|
+
};
|
|
7583
|
+
const FrequencyLabel = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.memo)(({ value, unit, prefix = '' })=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
|
|
7584
|
+
style: {
|
|
7585
|
+
paddingLeft: '5px'
|
|
7586
|
+
},
|
|
7587
|
+
children: [
|
|
7588
|
+
prefix,
|
|
7589
|
+
value,
|
|
7590
|
+
unit
|
|
7591
|
+
]
|
|
7592
|
+
}));
|
|
7593
|
+
const FrequencyTick = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.memo)(({ value, index, total })=>{
|
|
7594
|
+
const leftPercentage = index / total * 100;
|
|
7595
|
+
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
7596
|
+
className: `${components_AxisX_styles_module.frequencyTick} ${0 === index ? components_AxisX_styles_module.first : index === total ? components_AxisX_styles_module.last : ''}`,
|
|
7597
|
+
style: {
|
|
7598
|
+
left: `${leftPercentage}%`
|
|
7599
|
+
},
|
|
7600
|
+
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("span", {
|
|
7601
|
+
children: value
|
|
7602
|
+
})
|
|
7603
|
+
});
|
|
7604
|
+
});
|
|
7605
|
+
const TICK_COUNT = 5;
|
|
7606
|
+
const DataNFixedTicks = ()=>{
|
|
7607
|
+
const { state: { segments: { totalPoints }, zoom: { interval: { start: intervalStart, end: intervalEnd } }, axisX: { frequencyFormat } } } = useStore_useStore();
|
|
7608
|
+
const getFrequencyByIndex = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((index)=>{
|
|
7609
|
+
if (!totalPoints) return 0;
|
|
7610
|
+
const percentage = Math.min(100 * index / totalPoints, 100);
|
|
7611
|
+
return frequencyFormat(percentage);
|
|
7612
|
+
}, [
|
|
7613
|
+
totalPoints,
|
|
7614
|
+
frequencyFormat
|
|
7615
|
+
]);
|
|
7616
|
+
const ticks = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>{
|
|
7617
|
+
const step = (intervalEnd - intervalStart + 1) / TICK_COUNT;
|
|
7618
|
+
return Array.from({
|
|
7619
|
+
length: TICK_COUNT + 1
|
|
7620
|
+
}, (_, i)=>getFrequencyByIndex(intervalStart + step * i));
|
|
7621
|
+
}, [
|
|
7622
|
+
intervalStart,
|
|
7623
|
+
intervalEnd,
|
|
7624
|
+
getFrequencyByIndex
|
|
7625
|
+
]);
|
|
7626
|
+
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
|
|
7627
|
+
className: components_AxisX_styles_module.con,
|
|
7628
|
+
children: [
|
|
7629
|
+
ticks.map((tick, index)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(FrequencyTick, {
|
|
7630
|
+
value: tick,
|
|
7631
|
+
index: index,
|
|
7632
|
+
total: ticks.length - 1
|
|
7633
|
+
}, `tick-${index}`)),
|
|
7634
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(components_RulerTicks, {
|
|
7635
|
+
length: 10,
|
|
7636
|
+
split: 2
|
|
7637
|
+
})
|
|
7638
|
+
]
|
|
7639
|
+
});
|
|
7640
|
+
};
|
|
7641
|
+
const MScanTicks = ()=>{
|
|
7642
|
+
const { state: { segments } } = useStore_useStore();
|
|
7643
|
+
const style = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>({
|
|
7644
|
+
display: 'flex',
|
|
7645
|
+
flex: 1,
|
|
7646
|
+
justifyContent: 'center',
|
|
7647
|
+
alignItems: 'center'
|
|
7648
|
+
}), []);
|
|
7649
|
+
const t = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>segments.map((item)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
7650
|
+
style: style,
|
|
7651
|
+
children: item.label
|
|
7652
|
+
}, item.index)), [
|
|
7653
|
+
segments
|
|
7654
|
+
]);
|
|
7655
|
+
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
|
|
7656
|
+
className: components_AxisX_styles_module.con,
|
|
7657
|
+
children: [
|
|
7658
|
+
t,
|
|
7659
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(components_RulerTicks, {
|
|
7660
|
+
length: 2 * segments.length,
|
|
7661
|
+
split: 2
|
|
7662
|
+
})
|
|
7663
|
+
]
|
|
7664
|
+
});
|
|
7665
|
+
};
|
|
7666
|
+
const AxisXTicks = ({ type })=>{
|
|
7667
|
+
const { state: { axisX: { show } } } = useStore_useStore();
|
|
7668
|
+
if (!show) return null;
|
|
7669
|
+
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
7670
|
+
className: components_AxisX_styles_module.AxisXTicks,
|
|
7671
|
+
children: type === constants_ChartType.Scan || type === constants_ChartType.ScanDF360 ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(DataNFixedTicks, {}) : type === constants_ChartType.MScan ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Zoom_ZoomOffsetContainer, {
|
|
7672
|
+
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(MScanTicks, {})
|
|
7673
|
+
}) : /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(ThreeFixedTicks, {})
|
|
7674
|
+
});
|
|
7675
|
+
};
|
|
7676
|
+
const AxisX_Ticks = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.memo)(AxisXTicks);
|
|
7677
|
+
const AxisX_AxisX = ({ type })=>{
|
|
7678
|
+
const { state: { axisX } } = useStore_useStore();
|
|
7679
|
+
const { children, unit, ticks } = axisX;
|
|
7680
|
+
const { width, pluginBoxWidth } = useAxisYWidth_useAxisYWidth();
|
|
7681
|
+
const ref = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(null);
|
|
7682
|
+
const axisStyle = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>({
|
|
7683
|
+
marginLeft: width,
|
|
7684
|
+
width: pluginBoxWidth
|
|
7685
|
+
}), [
|
|
7686
|
+
width,
|
|
7687
|
+
pluginBoxWidth
|
|
7688
|
+
]);
|
|
7689
|
+
if (!axisX) return null;
|
|
7690
|
+
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(components_Tooltip, {
|
|
7691
|
+
content: `\u{5355}\u{4F4D}${unit}`,
|
|
7692
|
+
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
|
|
7693
|
+
ref: ref,
|
|
7694
|
+
className: components_AxisX_styles_module.axisx,
|
|
7695
|
+
style: axisStyle,
|
|
7696
|
+
children: [
|
|
7697
|
+
ticks && /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(__WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.Fragment, {
|
|
7698
|
+
children: [
|
|
7699
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
7700
|
+
className: components_AxisX_styles_module.unit,
|
|
7701
|
+
children: unit
|
|
7702
|
+
}),
|
|
7703
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(AxisX_Ticks, {
|
|
7704
|
+
type: type
|
|
7705
|
+
})
|
|
7706
|
+
]
|
|
7707
|
+
}),
|
|
7708
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
7709
|
+
children: children
|
|
7710
|
+
})
|
|
7711
|
+
]
|
|
7712
|
+
})
|
|
7713
|
+
});
|
|
7714
|
+
};
|
|
7715
|
+
const AxisX = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.memo)(AxisX_AxisX);
|
|
7716
|
+
var FlexBox_styles_module = __webpack_require__("../../../node_modules/.pnpm/@rsbuild+core@1.3.18/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[11].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[11].use[2]!../../../node_modules/.pnpm/@rsbuild+plugin-less@1.5.0_@rsbuild+core@1.6.7/node_modules/@rsbuild/plugin-less/compiled/less-loader/index.js??ruleSet[1].rules[11].use[3]!./src/components/FlexBox/styles.module.less");
|
|
7717
|
+
var FlexBox_styles_module_options = {};
|
|
7718
|
+
FlexBox_styles_module_options.styleTagTransform = styleTagTransform_default();
|
|
7719
|
+
FlexBox_styles_module_options.setAttributes = setAttributesWithoutAttributes_default();
|
|
7720
|
+
FlexBox_styles_module_options.insert = insertBySelector_default().bind(null, "head");
|
|
7721
|
+
FlexBox_styles_module_options.domAPI = styleDomAPI_default();
|
|
7722
|
+
FlexBox_styles_module_options.insertStyleElement = insertStyleElement_default();
|
|
7723
|
+
injectStylesIntoStyleTag_default()(FlexBox_styles_module.Z, FlexBox_styles_module_options);
|
|
7724
|
+
const components_FlexBox_styles_module = FlexBox_styles_module.Z && FlexBox_styles_module.Z.locals ? FlexBox_styles_module.Z.locals : void 0;
|
|
7725
|
+
const FlexBox = (props)=>{
|
|
7726
|
+
const { children, className, style } = props;
|
|
7727
|
+
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
7728
|
+
className: `${components_FlexBox_styles_module.FlexBox} ${className}`,
|
|
7729
|
+
style: style,
|
|
7730
|
+
children: children
|
|
7731
|
+
});
|
|
7732
|
+
};
|
|
7733
|
+
const components_FlexBox = FlexBox;
|
|
7734
|
+
function useChannel() {
|
|
7735
|
+
const { state: { marker, globalID }, dispatch } = useStore_useStore();
|
|
7736
|
+
(0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>{
|
|
7737
|
+
if (marker?.mode === store_MarkerMode.DDC) dispatch({
|
|
7738
|
+
payload: {
|
|
7739
|
+
marker: {
|
|
7740
|
+
...marker,
|
|
7741
|
+
enabled: true,
|
|
7742
|
+
visible: true
|
|
7743
|
+
}
|
|
7744
|
+
}
|
|
7745
|
+
});
|
|
7746
|
+
}, [
|
|
7747
|
+
marker?.mode
|
|
7748
|
+
]);
|
|
7749
|
+
const updateChannel = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)(()=>{}, [
|
|
7750
|
+
globalID
|
|
7751
|
+
]);
|
|
7752
|
+
return updateChannel;
|
|
7753
|
+
}
|
|
7754
|
+
function useSegments() {
|
|
7755
|
+
const { state: { segments, zoom, points, axisX }, dispatch } = useStore_useStore();
|
|
7756
|
+
(0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>{}, [
|
|
7757
|
+
segments
|
|
7758
|
+
]);
|
|
7759
|
+
const setSegments = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((s)=>{
|
|
7760
|
+
if (s.totalPoints) {
|
|
7761
|
+
const endIndex = s.totalPoints - 1;
|
|
7762
|
+
zoom.interval = {
|
|
7763
|
+
start: 0,
|
|
7764
|
+
end: endIndex
|
|
7765
|
+
};
|
|
7766
|
+
const payload = {
|
|
7767
|
+
segments: s,
|
|
7768
|
+
zoom,
|
|
7769
|
+
axisX
|
|
7770
|
+
};
|
|
7771
|
+
if (0 === points.length) payload.axisX.frequencyFormat = (0, utils.Ax)(s);
|
|
7772
|
+
dispatch({
|
|
7773
|
+
payload
|
|
7774
|
+
});
|
|
7775
|
+
}
|
|
7776
|
+
}, [
|
|
7777
|
+
points
|
|
7778
|
+
]);
|
|
7779
|
+
return [
|
|
7780
|
+
segments,
|
|
7781
|
+
setSegments
|
|
7782
|
+
];
|
|
7783
|
+
}
|
|
7784
|
+
const SET_SEGMENTS_DISPLAY = (globalID, func)=>subscription_createSubscriptionManager(`SET_SEGMENTS_DISPLAY-${globalID}`, '0', func);
|
|
7785
|
+
function useSpectrumRule(type) {
|
|
7786
|
+
const { state: { zoom, globalID }, dispatch } = useStore_useStore();
|
|
7787
|
+
const [segments, setSegments] = useSegments();
|
|
7788
|
+
const updateSegments = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((e)=>{
|
|
7789
|
+
const { event = constants_SegmentsEvent.Cover, index } = e;
|
|
7790
|
+
const { totalPoints } = segments;
|
|
7791
|
+
let start = 0;
|
|
7792
|
+
let end = 0;
|
|
7793
|
+
let isScanSegmentsUpdateMagnify = false;
|
|
7794
|
+
if (event === constants_SegmentsEvent.Focus && totalPoints) {
|
|
7795
|
+
const endIndex = totalPoints - 1;
|
|
7796
|
+
if (index < segments.length) {
|
|
7797
|
+
for(let i = 0; i < index; i += 1)start += segments[i].point + 1;
|
|
7798
|
+
const { point } = segments[index];
|
|
7799
|
+
end = start + point;
|
|
7800
|
+
isScanSegmentsUpdateMagnify = true;
|
|
7801
|
+
} else if (void 0 === index) {
|
|
7802
|
+
start = 0;
|
|
7803
|
+
end = endIndex;
|
|
7804
|
+
isScanSegmentsUpdateMagnify = false;
|
|
7805
|
+
}
|
|
7806
|
+
}
|
|
7807
|
+
zoom.interval = {
|
|
7808
|
+
start,
|
|
7809
|
+
end
|
|
7810
|
+
};
|
|
7811
|
+
zoom.isScanSegmentsUpdateMagnify = isScanSegmentsUpdateMagnify;
|
|
7812
|
+
dispatch({
|
|
7813
|
+
payload: {
|
|
7814
|
+
zoom
|
|
7815
|
+
}
|
|
7816
|
+
});
|
|
7817
|
+
if (event === constants_SegmentsEvent.Cover) setSegments((0, utils.sl)(e.data));
|
|
7818
|
+
}, [
|
|
7819
|
+
segments
|
|
7820
|
+
]);
|
|
7821
|
+
(0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>{
|
|
7822
|
+
SET_SEGMENTS_DISPLAY(globalID, (index)=>{
|
|
7823
|
+
updateSegments?.({
|
|
7824
|
+
pstype: constants_PSType.Segments,
|
|
7825
|
+
event: constants_SegmentsEvent.Focus,
|
|
7826
|
+
index
|
|
7827
|
+
});
|
|
7828
|
+
});
|
|
7829
|
+
}, [
|
|
7830
|
+
globalID,
|
|
7831
|
+
updateSegments
|
|
7832
|
+
]);
|
|
7833
|
+
const pointsRef = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(3);
|
|
7834
|
+
const ruleRef = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)({
|
|
7835
|
+
frequency: 0,
|
|
7836
|
+
bandwidth: 0
|
|
7837
|
+
});
|
|
7838
|
+
const generateSegmentsFromPoints = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((points, newRule = ruleRef.current)=>{
|
|
7839
|
+
if (newRule.bandwidth && newRule.frequency && points) {
|
|
7840
|
+
const segments = (0, utils.IS)({
|
|
7841
|
+
frequency: newRule?.frequency,
|
|
7842
|
+
bandwidth: newRule?.bandwidth,
|
|
7843
|
+
totalPoints: points
|
|
7844
|
+
});
|
|
7845
|
+
if ('function' == typeof setSegments) setSegments(segments);
|
|
7846
|
+
}
|
|
7847
|
+
}, [
|
|
7848
|
+
setSegments
|
|
7849
|
+
]);
|
|
7850
|
+
const updateBandwidthRule = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((e)=>{
|
|
7851
|
+
const { frequency, bandwidth } = e;
|
|
7852
|
+
if (!frequency || !bandwidth) return;
|
|
7853
|
+
ruleRef.current = {
|
|
7854
|
+
frequency,
|
|
7855
|
+
bandwidth
|
|
7856
|
+
};
|
|
7857
|
+
generateSegmentsFromPoints(pointsRef.current, e);
|
|
7858
|
+
}, []);
|
|
7859
|
+
const updateData = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((data)=>{
|
|
7860
|
+
if (!data) return;
|
|
7861
|
+
const newPoints = data?.length;
|
|
7862
|
+
if (newPoints && newPoints !== pointsRef.current) {
|
|
7863
|
+
pointsRef.current = newPoints;
|
|
7864
|
+
generateSegmentsFromPoints(newPoints);
|
|
7865
|
+
if (type === constants_ChartType.LiteNormalized) setSegments((0, utils.uq)(newPoints));
|
|
7866
|
+
}
|
|
7867
|
+
}, [
|
|
7868
|
+
generateSegmentsFromPoints,
|
|
7869
|
+
setSegments,
|
|
7870
|
+
type
|
|
7871
|
+
]);
|
|
7872
|
+
useChannel();
|
|
7873
|
+
const handleSpectrumRule = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((e)=>{
|
|
7874
|
+
switch(e.pstype){
|
|
7875
|
+
case constants_PSType.Spectrum:
|
|
7876
|
+
if (e.data) updateData(e.data);
|
|
7877
|
+
break;
|
|
7878
|
+
case constants_PSType.SpectrumBandwidth:
|
|
7879
|
+
updateBandwidthRule(e);
|
|
7880
|
+
break;
|
|
7881
|
+
case constants_PSType.Segments:
|
|
7882
|
+
updateSegments?.(e);
|
|
7883
|
+
break;
|
|
7884
|
+
default:
|
|
7885
|
+
break;
|
|
7886
|
+
}
|
|
7887
|
+
}, []);
|
|
7888
|
+
return handleSpectrumRule;
|
|
7889
|
+
}
|
|
7890
|
+
var FullTicks_styles_module = __webpack_require__("../../../../../../node_modules/.pnpm/@rsbuild+core@1.3.18/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[11].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[11].use[2]!../../../../../../node_modules/.pnpm/@rsbuild+plugin-less@1.5.0_@rsbuild+core@1.6.7/node_modules/@rsbuild/plugin-less/compiled/less-loader/index.js??ruleSet[1].rules[11].use[3]!./src/components/AxisY/heatmap/components/FullTicks/styles.module.less");
|
|
7891
|
+
var FullTicks_styles_module_options = {};
|
|
7892
|
+
FullTicks_styles_module_options.styleTagTransform = styleTagTransform_default();
|
|
7893
|
+
FullTicks_styles_module_options.setAttributes = setAttributesWithoutAttributes_default();
|
|
7894
|
+
FullTicks_styles_module_options.insert = insertBySelector_default().bind(null, "head");
|
|
7895
|
+
FullTicks_styles_module_options.domAPI = styleDomAPI_default();
|
|
7896
|
+
FullTicks_styles_module_options.insertStyleElement = insertStyleElement_default();
|
|
7897
|
+
injectStylesIntoStyleTag_default()(FullTicks_styles_module.Z, FullTicks_styles_module_options);
|
|
7898
|
+
const components_FullTicks_styles_module = FullTicks_styles_module.Z && FullTicks_styles_module.Z.locals ? FullTicks_styles_module.Z.locals : void 0;
|
|
7899
|
+
const COMPONENT_KEY = 'AxisYHeatmapTicks';
|
|
7900
|
+
const HEATMAP_FULL_TICKS = 10;
|
|
7901
|
+
const FullTicks_Ticks = (props)=>{
|
|
7902
|
+
const { id } = props;
|
|
7903
|
+
const { state: { globalID } } = useStore_useStore();
|
|
7904
|
+
const [timeValues, setTimeValues] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)(Array(HEATMAP_FULL_TICKS).fill(''));
|
|
7905
|
+
const positions = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>{
|
|
7906
|
+
const pos = [];
|
|
7907
|
+
for(let i = 0; i < HEATMAP_FULL_TICKS; i++)pos.push(`${100 - i / (HEATMAP_FULL_TICKS - 1) * 100}%`);
|
|
7908
|
+
return pos;
|
|
7909
|
+
}, []);
|
|
7910
|
+
(0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>{
|
|
7911
|
+
if (id && globalID) withUpdateData(id, COMPONENT_KEY, ()=>{
|
|
7912
|
+
const { waterfallData } = withDatabase(globalID).getAllRawData();
|
|
7913
|
+
const values = [];
|
|
7914
|
+
const dataLength = waterfallData.length;
|
|
7915
|
+
for(let i = 0; i < HEATMAP_FULL_TICKS; i++){
|
|
7916
|
+
const index = Math.floor((dataLength - 1) * i / (HEATMAP_FULL_TICKS - 1));
|
|
7917
|
+
const data = waterfallData[index];
|
|
7918
|
+
const value = data?.timestamp ? (0, utils.Fc)(data.timestamp, void 0, void 0, true) : '';
|
|
7919
|
+
values.push(value);
|
|
7920
|
+
}
|
|
7921
|
+
setTimeValues(values);
|
|
7922
|
+
});
|
|
7923
|
+
}, [
|
|
7924
|
+
id,
|
|
7925
|
+
globalID
|
|
7926
|
+
]);
|
|
7927
|
+
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
7928
|
+
className: components_FullTicks_styles_module.ticks,
|
|
7929
|
+
children: positions.map((position, index)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
7930
|
+
className: components_FullTicks_styles_module.tick,
|
|
7931
|
+
style: {
|
|
7932
|
+
top: position
|
|
7933
|
+
},
|
|
7934
|
+
children: timeValues[index]
|
|
7935
|
+
}, index))
|
|
7936
|
+
});
|
|
7937
|
+
};
|
|
7938
|
+
const FullTicks = /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__["default"].memo(FullTicks_Ticks);
|
|
7939
|
+
var Ticks_styles_module = __webpack_require__("../../../../../../node_modules/.pnpm/@rsbuild+core@1.3.18/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[11].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[11].use[2]!../../../../../../node_modules/.pnpm/@rsbuild+plugin-less@1.5.0_@rsbuild+core@1.6.7/node_modules/@rsbuild/plugin-less/compiled/less-loader/index.js??ruleSet[1].rules[11].use[3]!./src/components/AxisY/heatmap/components/Ticks/styles.module.less");
|
|
7940
|
+
var Ticks_styles_module_options = {};
|
|
7941
|
+
Ticks_styles_module_options.styleTagTransform = styleTagTransform_default();
|
|
7942
|
+
Ticks_styles_module_options.setAttributes = setAttributesWithoutAttributes_default();
|
|
7943
|
+
Ticks_styles_module_options.insert = insertBySelector_default().bind(null, "head");
|
|
7944
|
+
Ticks_styles_module_options.domAPI = styleDomAPI_default();
|
|
7945
|
+
Ticks_styles_module_options.insertStyleElement = insertStyleElement_default();
|
|
7946
|
+
injectStylesIntoStyleTag_default()(Ticks_styles_module.Z, Ticks_styles_module_options);
|
|
7947
|
+
const components_Ticks_styles_module = Ticks_styles_module.Z && Ticks_styles_module.Z.locals ? Ticks_styles_module.Z.locals : void 0;
|
|
7948
|
+
const Ticks_COMPONENT_KEY = 'AxisYHeatmapTicks';
|
|
7949
|
+
const Ticks_Ticks = (props)=>{
|
|
7950
|
+
const { id, inside = false } = props;
|
|
7951
|
+
const { state: { globalID } } = useStore_useStore();
|
|
7952
|
+
const [tickFormat, setTickFormat] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)();
|
|
7953
|
+
(0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>{
|
|
7954
|
+
if (id && globalID) withUpdateData(id, Ticks_COMPONENT_KEY, ()=>{
|
|
7955
|
+
let { waterfallData: d } = withDatabase(globalID).getAllRawData();
|
|
7956
|
+
if (d?.length > 0) {
|
|
7957
|
+
if (d.at(0)?.length === 0) d = d?.filter?.((i)=>i?.length > 0);
|
|
7958
|
+
const start = d.at(-1)?.timestamp;
|
|
7959
|
+
const end = d.at(0)?.timestamp;
|
|
7960
|
+
if (start && end) setTickFormat((start - end) / 1e3);
|
|
7961
|
+
}
|
|
7962
|
+
});
|
|
7963
|
+
}, [
|
|
7964
|
+
id,
|
|
7965
|
+
globalID
|
|
7966
|
+
]);
|
|
7967
|
+
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
|
|
7968
|
+
className: components_Ticks_styles_module.ticks,
|
|
7969
|
+
style: {
|
|
7970
|
+
alignItems: inside ? 'flex-start' : 'flex-end'
|
|
7971
|
+
},
|
|
7972
|
+
children: [
|
|
7973
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
7974
|
+
className: components_Ticks_styles_module.start,
|
|
7975
|
+
children: "0"
|
|
7976
|
+
}),
|
|
7977
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
7978
|
+
className: components_Ticks_styles_module.end,
|
|
7979
|
+
title: "\u5355\u4F4D\uFF1A\u79D2",
|
|
7980
|
+
children: tickFormat?.toFixed(1)
|
|
7981
|
+
})
|
|
7982
|
+
]
|
|
7369
7983
|
});
|
|
7370
7984
|
};
|
|
7371
7985
|
const components_Ticks = Ticks_Ticks;
|
|
@@ -7378,7 +7992,7 @@ Default_styles_module_options.domAPI = styleDomAPI_default();
|
|
|
7378
7992
|
Default_styles_module_options.insertStyleElement = insertStyleElement_default();
|
|
7379
7993
|
injectStylesIntoStyleTag_default()(Default_styles_module.Z, Default_styles_module_options);
|
|
7380
7994
|
const type_Default_styles_module = Default_styles_module.Z && Default_styles_module.Z.locals ? Default_styles_module.Z.locals : void 0;
|
|
7381
|
-
const
|
|
7995
|
+
const Default_Default = (props)=>{
|
|
7382
7996
|
const { state: { axisY: { heatmapFullTicks } } } = useStore_useStore();
|
|
7383
7997
|
const { axisYWidth, marginLeft } = useAxisYWidth_useAxisYWidth();
|
|
7384
7998
|
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
@@ -7394,7 +8008,7 @@ const Default = (props)=>{
|
|
|
7394
8008
|
})
|
|
7395
8009
|
});
|
|
7396
8010
|
};
|
|
7397
|
-
const
|
|
8011
|
+
const Default = Default_Default;
|
|
7398
8012
|
var Default_GradientRibbon_styles_module = __webpack_require__("../../../../../../../node_modules/.pnpm/@rsbuild+core@1.3.18/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[11].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[11].use[2]!../../../../../../../node_modules/.pnpm/@rsbuild+plugin-less@1.5.0_@rsbuild+core@1.6.7/node_modules/@rsbuild/plugin-less/compiled/less-loader/index.js??ruleSet[1].rules[11].use[3]!./src/components/AxisY/heatmap/type/Default/GradientRibbon/styles.module.less");
|
|
7399
8013
|
var Default_GradientRibbon_styles_module_options = {};
|
|
7400
8014
|
Default_GradientRibbon_styles_module_options.styleTagTransform = styleTagTransform_default();
|
|
@@ -7415,7 +8029,7 @@ const AxisYHeatmap = (props)=>{
|
|
|
7415
8029
|
renderRange
|
|
7416
8030
|
]);
|
|
7417
8031
|
if (false === show) return null;
|
|
7418
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
8032
|
+
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Default, {
|
|
7419
8033
|
...props
|
|
7420
8034
|
});
|
|
7421
8035
|
};
|
|
@@ -7538,28 +8152,6 @@ const Popover = ({ children })=>{
|
|
|
7538
8152
|
});
|
|
7539
8153
|
};
|
|
7540
8154
|
const components_Popover = Popover;
|
|
7541
|
-
var ZoomOffsetContainer_styles_module = __webpack_require__("../../../../node_modules/.pnpm/@rsbuild+core@1.3.18/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[11].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[11].use[2]!../../../../node_modules/.pnpm/@rsbuild+plugin-less@1.5.0_@rsbuild+core@1.6.7/node_modules/@rsbuild/plugin-less/compiled/less-loader/index.js??ruleSet[1].rules[11].use[3]!./src/components/Zoom/ZoomOffsetContainer/styles.module.less");
|
|
7542
|
-
var ZoomOffsetContainer_styles_module_options = {};
|
|
7543
|
-
ZoomOffsetContainer_styles_module_options.styleTagTransform = styleTagTransform_default();
|
|
7544
|
-
ZoomOffsetContainer_styles_module_options.setAttributes = setAttributesWithoutAttributes_default();
|
|
7545
|
-
ZoomOffsetContainer_styles_module_options.insert = insertBySelector_default().bind(null, "head");
|
|
7546
|
-
ZoomOffsetContainer_styles_module_options.domAPI = styleDomAPI_default();
|
|
7547
|
-
ZoomOffsetContainer_styles_module_options.insertStyleElement = insertStyleElement_default();
|
|
7548
|
-
injectStylesIntoStyleTag_default()(ZoomOffsetContainer_styles_module.Z, ZoomOffsetContainer_styles_module_options);
|
|
7549
|
-
const Zoom_ZoomOffsetContainer_styles_module = ZoomOffsetContainer_styles_module.Z && ZoomOffsetContainer_styles_module.Z.locals ? ZoomOffsetContainer_styles_module.Z.locals : void 0;
|
|
7550
|
-
const ZoomOffsetContainer = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.forwardRef)(({ children, className }, ref)=>{
|
|
7551
|
-
const { state: { zoom: { style } } } = useStore_useStore();
|
|
7552
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
7553
|
-
ref: ref,
|
|
7554
|
-
className: `${Zoom_ZoomOffsetContainer_styles_module.ZoomOffsetContainer} ${className}`,
|
|
7555
|
-
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
7556
|
-
className: Zoom_ZoomOffsetContainer_styles_module.con,
|
|
7557
|
-
style: style,
|
|
7558
|
-
children: children
|
|
7559
|
-
})
|
|
7560
|
-
});
|
|
7561
|
-
});
|
|
7562
|
-
const Zoom_ZoomOffsetContainer = ZoomOffsetContainer;
|
|
7563
8155
|
const withStationDataUpdate = (globalID, name, func)=>{
|
|
7564
8156
|
const subscriptionId = `stationData-update-${globalID}`;
|
|
7565
8157
|
if (name && func) {
|
|
@@ -8635,7 +9227,7 @@ function useKeyEvent(globalID, EID) {
|
|
|
8635
9227
|
EID
|
|
8636
9228
|
]);
|
|
8637
9229
|
}
|
|
8638
|
-
const
|
|
9230
|
+
const EventBus = ({ id })=>{
|
|
8639
9231
|
const { state: { globalID } } = useStore_useStore();
|
|
8640
9232
|
const EID = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>getEID(id), [
|
|
8641
9233
|
id
|
|
@@ -8758,25 +9350,7 @@ const EventBus_EventBus = ({ id })=>{
|
|
|
8758
9350
|
})
|
|
8759
9351
|
});
|
|
8760
9352
|
};
|
|
8761
|
-
const
|
|
8762
|
-
var FlexBox_styles_module = __webpack_require__("../../../node_modules/.pnpm/@rsbuild+core@1.3.18/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[11].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[11].use[2]!../../../node_modules/.pnpm/@rsbuild+plugin-less@1.5.0_@rsbuild+core@1.6.7/node_modules/@rsbuild/plugin-less/compiled/less-loader/index.js??ruleSet[1].rules[11].use[3]!./src/components/FlexBox/styles.module.less");
|
|
8763
|
-
var FlexBox_styles_module_options = {};
|
|
8764
|
-
FlexBox_styles_module_options.styleTagTransform = styleTagTransform_default();
|
|
8765
|
-
FlexBox_styles_module_options.setAttributes = setAttributesWithoutAttributes_default();
|
|
8766
|
-
FlexBox_styles_module_options.insert = insertBySelector_default().bind(null, "head");
|
|
8767
|
-
FlexBox_styles_module_options.domAPI = styleDomAPI_default();
|
|
8768
|
-
FlexBox_styles_module_options.insertStyleElement = insertStyleElement_default();
|
|
8769
|
-
injectStylesIntoStyleTag_default()(FlexBox_styles_module.Z, FlexBox_styles_module_options);
|
|
8770
|
-
const components_FlexBox_styles_module = FlexBox_styles_module.Z && FlexBox_styles_module.Z.locals ? FlexBox_styles_module.Z.locals : void 0;
|
|
8771
|
-
const FlexBox = (props)=>{
|
|
8772
|
-
const { children, className, style } = props;
|
|
8773
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
8774
|
-
className: `${components_FlexBox_styles_module.FlexBox} ${className}`,
|
|
8775
|
-
style: style,
|
|
8776
|
-
children: children
|
|
8777
|
-
});
|
|
8778
|
-
};
|
|
8779
|
-
const components_FlexBox = FlexBox;
|
|
9353
|
+
const components_EventBus = EventBus;
|
|
8780
9354
|
var Boundary_styles_module = __webpack_require__("../../../../node_modules/.pnpm/@rsbuild+core@1.3.18/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[11].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[11].use[2]!../../../../node_modules/.pnpm/@rsbuild+plugin-less@1.5.0_@rsbuild+core@1.6.7/node_modules/@rsbuild/plugin-less/compiled/less-loader/index.js??ruleSet[1].rules[11].use[3]!./src/components/GridLines/Boundary/styles.module.less");
|
|
8781
9355
|
var Boundary_styles_module_options = {};
|
|
8782
9356
|
Boundary_styles_module_options.styleTagTransform = styleTagTransform_default();
|
|
@@ -8794,7 +9368,7 @@ const Boundary_Boundary = ()=>{
|
|
|
8794
9368
|
};
|
|
8795
9369
|
const Boundary = Boundary_Boundary;
|
|
8796
9370
|
const PERCENTAGE = 100;
|
|
8797
|
-
const
|
|
9371
|
+
const tools_PRECISION = 1e4;
|
|
8798
9372
|
const defaultAreaInfoResult = {
|
|
8799
9373
|
startIndex: 0,
|
|
8800
9374
|
endIndex: 0,
|
|
@@ -8826,8 +9400,8 @@ function calculateAreaInfo({ endLeft, startLeft, startTop, endTop, frequencyForm
|
|
|
8826
9400
|
end: Math.max(0, Math.min(colCount - 1, Math.ceil(colCount * endLeft / PERCENTAGE) - 1))
|
|
8827
9401
|
};
|
|
8828
9402
|
const frequencies = {
|
|
8829
|
-
start: Math.round(Number(frequencyFormat(startLeft)) *
|
|
8830
|
-
end: Math.round(Number(frequencyFormat(endLeft)) *
|
|
9403
|
+
start: Math.round(Number(frequencyFormat(startLeft)) * tools_PRECISION) / tools_PRECISION,
|
|
9404
|
+
end: Math.round(Number(frequencyFormat(endLeft)) * tools_PRECISION) / tools_PRECISION
|
|
8831
9405
|
};
|
|
8832
9406
|
const bandwidth = Math.abs(frequencies.end - frequencies.start);
|
|
8833
9407
|
const startTimestamp = waterfallData[indices.top]?.timestamp || 0;
|
|
@@ -8865,7 +9439,7 @@ Area_styles_module_options.insertStyleElement = insertStyleElement_default();
|
|
|
8865
9439
|
injectStylesIntoStyleTag_default()(Area_styles_module.Z, Area_styles_module_options);
|
|
8866
9440
|
const HeatmapCapture_Area_styles_module = Area_styles_module.Z && Area_styles_module.Z.locals ? Area_styles_module.Z.locals : void 0;
|
|
8867
9441
|
const Area_COMPONENT_KEY = constants_ToolType.HeatmapCapture;
|
|
8868
|
-
const
|
|
9442
|
+
const Area_Area = (props)=>{
|
|
8869
9443
|
const { state: { heatmapCapture, segments, axisX: { frequencyFormat, unit }, system, globalID } } = useStore_useStore();
|
|
8870
9444
|
const { id } = props;
|
|
8871
9445
|
const { type, show, sync, onChange } = heatmapCapture;
|
|
@@ -9032,7 +9606,7 @@ const Area = (props)=>{
|
|
|
9032
9606
|
]
|
|
9033
9607
|
});
|
|
9034
9608
|
};
|
|
9035
|
-
const
|
|
9609
|
+
const Area = Area_Area;
|
|
9036
9610
|
var RowIndex_styles_module = __webpack_require__("../../../../node_modules/.pnpm/@rsbuild+core@1.3.18/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[11].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[11].use[2]!../../../../node_modules/.pnpm/@rsbuild+plugin-less@1.5.0_@rsbuild+core@1.6.7/node_modules/@rsbuild/plugin-less/compiled/less-loader/index.js??ruleSet[1].rules[11].use[3]!./src/components/HeatmapCapture/RowIndex/styles.module.less");
|
|
9037
9611
|
var RowIndex_styles_module_options = {};
|
|
9038
9612
|
RowIndex_styles_module_options.styleTagTransform = styleTagTransform_default();
|
|
@@ -9170,24 +9744,36 @@ injectStylesIntoStyleTag_default()(Slider_styles_module.Z, Slider_styles_module_
|
|
|
9170
9744
|
const HeatmapCapture_Slider_styles_module = Slider_styles_module.Z && Slider_styles_module.Z.locals ? Slider_styles_module.Z.locals : void 0;
|
|
9171
9745
|
const DEFAULT_HEIGHT = 30;
|
|
9172
9746
|
const DEFAULT_POSITION = 100 - DEFAULT_HEIGHT;
|
|
9173
|
-
const
|
|
9174
|
-
const
|
|
9747
|
+
const MAX_SIZE = 100;
|
|
9748
|
+
const MIN_SIZE = 5;
|
|
9749
|
+
const SNAP_THRESHOLD = 2;
|
|
9175
9750
|
const Slider = ({ id })=>{
|
|
9176
|
-
const { state: { globalID, heatmapCapture: { type, show, display, interval, onChange } } } = useStore_useStore();
|
|
9751
|
+
const { state: { globalID, heatmapCapture: { type, show, display, interval, onChange }, axisX: { frequencyFormat, unit, unitKHz } } } = useStore_useStore();
|
|
9177
9752
|
const canSlider = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>type === store_HeatmapCaptureType.Slider && show && display, [
|
|
9178
9753
|
type,
|
|
9179
9754
|
show,
|
|
9180
9755
|
display
|
|
9181
9756
|
]);
|
|
9182
|
-
const [
|
|
9183
|
-
|
|
9757
|
+
const [rect, setRect] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)({
|
|
9758
|
+
position: DEFAULT_POSITION,
|
|
9759
|
+
height: Math.min(DEFAULT_HEIGHT, MAX_SIZE),
|
|
9760
|
+
leftPosition: 0,
|
|
9761
|
+
width: 100
|
|
9762
|
+
});
|
|
9184
9763
|
const [isDragging, setIsDragging] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)(false);
|
|
9185
9764
|
const [dragType, setDragType] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)(null);
|
|
9186
|
-
const [startY, setStartY] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)(0);
|
|
9187
|
-
const [startPosition, setStartPosition] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)(0);
|
|
9188
|
-
const [startHeight, setStartHeight] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)(0);
|
|
9189
9765
|
const [info, setInfo] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)();
|
|
9190
9766
|
const containerRef = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(null);
|
|
9767
|
+
const dragStartRef = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)({
|
|
9768
|
+
x: 0,
|
|
9769
|
+
y: 0,
|
|
9770
|
+
rect: rect
|
|
9771
|
+
});
|
|
9772
|
+
const rectRef = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(rect);
|
|
9773
|
+
const frequencyFormatRef = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(frequencyFormat);
|
|
9774
|
+
rectRef.current = rect;
|
|
9775
|
+
frequencyFormatRef.current = frequencyFormat;
|
|
9776
|
+
const { position, height, leftPosition, width } = rect;
|
|
9191
9777
|
const getHeatmapData = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)(()=>{
|
|
9192
9778
|
const { waterfallData } = withDatabase(globalID).getAllRawData();
|
|
9193
9779
|
return [
|
|
@@ -9197,100 +9783,135 @@ const Slider = ({ id })=>{
|
|
|
9197
9783
|
}, [
|
|
9198
9784
|
globalID
|
|
9199
9785
|
]);
|
|
9200
|
-
const
|
|
9201
|
-
(0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>{
|
|
9202
|
-
if (!id || !globalID) return;
|
|
9203
|
-
const cleanup = withUpdateData(id, 'Slider', ()=>{
|
|
9204
|
-
setUpdateKey((prev)=>prev + 1);
|
|
9205
|
-
});
|
|
9206
|
-
return cleanup;
|
|
9207
|
-
}, [
|
|
9208
|
-
id,
|
|
9209
|
-
globalID
|
|
9210
|
-
]);
|
|
9211
|
-
const calculateSliderInfo = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((newPosition, newHeight)=>{
|
|
9786
|
+
const calculateSliderInfo = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((r)=>{
|
|
9212
9787
|
const [heatmapData, len] = getHeatmapData();
|
|
9213
9788
|
if (len <= 0) return null;
|
|
9214
|
-
const
|
|
9215
|
-
const
|
|
9789
|
+
const { position: pos, height: h, leftPosition: left, width: w } = r;
|
|
9790
|
+
const endIndex = Math.round((100 - pos) / 100 * (len - 1));
|
|
9791
|
+
const startIndex = Math.round((100 - (pos + h)) / 100 * (len - 1));
|
|
9216
9792
|
const startTimestamp = heatmapData[startIndex]?.timestamp;
|
|
9217
|
-
const startTimestampFormat = (0, utils.Fc)(startTimestamp);
|
|
9218
9793
|
const endTimestamp = heatmapData[endIndex]?.timestamp;
|
|
9219
|
-
const endTimestampFormat = (0, utils.Fc)(endTimestamp);
|
|
9220
9794
|
const duration = endTimestamp - startTimestamp;
|
|
9221
|
-
const
|
|
9795
|
+
const colCount = heatmapData[0]?.length || 0;
|
|
9796
|
+
const startCol = Math.max(0, Math.min(colCount - 1, Math.ceil(colCount * left / 100) - 1));
|
|
9797
|
+
const endCol = Math.max(0, Math.min(colCount - 1, Math.ceil(colCount * (left + w) / 100) - 1));
|
|
9798
|
+
const formatFn = frequencyFormatRef.current;
|
|
9799
|
+
const startFreqStr = formatFn?.(left);
|
|
9800
|
+
const endFreqStr = formatFn?.(left + w);
|
|
9801
|
+
const PRECISION = 1e4;
|
|
9802
|
+
const startFrequency = startFreqStr ? Math.round(Number(startFreqStr) * PRECISION) / PRECISION : 0;
|
|
9803
|
+
const endFrequency = endFreqStr ? Math.round(Number(endFreqStr) * PRECISION) / PRECISION : 0;
|
|
9222
9804
|
return {
|
|
9223
9805
|
startIndex,
|
|
9224
9806
|
endIndex,
|
|
9225
9807
|
startTimestamp,
|
|
9226
|
-
startTimestampFormat,
|
|
9808
|
+
startTimestampFormat: (0, utils.Fc)(startTimestamp),
|
|
9227
9809
|
endTimestamp,
|
|
9228
|
-
endTimestampFormat,
|
|
9810
|
+
endTimestampFormat: (0, utils.Fc)(endTimestamp),
|
|
9229
9811
|
duration,
|
|
9230
|
-
durationFormat
|
|
9812
|
+
durationFormat: (duration / 1000).toFixed(3),
|
|
9813
|
+
startCol,
|
|
9814
|
+
endCol,
|
|
9815
|
+
startFrequency,
|
|
9816
|
+
startFrequencyFormat: String(startFrequency),
|
|
9817
|
+
endFrequency,
|
|
9818
|
+
endFrequencyFormat: String(endFrequency),
|
|
9819
|
+
bandwidth: Math.abs(endFrequency - startFrequency),
|
|
9820
|
+
bandwidthFormat: (0, utils.lj)(Math.abs(endFrequency - startFrequency))
|
|
9231
9821
|
};
|
|
9232
9822
|
}, [
|
|
9233
9823
|
getHeatmapData
|
|
9234
9824
|
]);
|
|
9825
|
+
const [updateKey, setUpdateKey] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)(0);
|
|
9826
|
+
(0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>{
|
|
9827
|
+
if (!id || !globalID) return;
|
|
9828
|
+
return withUpdateData(id, 'Slider', ()=>setUpdateKey((prev)=>prev + 1));
|
|
9829
|
+
}, [
|
|
9830
|
+
id,
|
|
9831
|
+
globalID
|
|
9832
|
+
]);
|
|
9235
9833
|
(0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>{
|
|
9236
9834
|
if (!canSlider || !globalID) return;
|
|
9237
|
-
const newInfo = calculateSliderInfo(
|
|
9835
|
+
const newInfo = calculateSliderInfo(rect);
|
|
9238
9836
|
if (newInfo) {
|
|
9239
9837
|
setInfo(newInfo);
|
|
9240
9838
|
onChange?.(newInfo);
|
|
9241
9839
|
}
|
|
9242
9840
|
}, [
|
|
9243
|
-
updateKey
|
|
9841
|
+
updateKey,
|
|
9842
|
+
frequencyFormat
|
|
9244
9843
|
]);
|
|
9245
9844
|
const handleMouseDown = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((e, type)=>{
|
|
9246
9845
|
e.preventDefault();
|
|
9247
9846
|
setIsDragging(true);
|
|
9248
9847
|
setDragType(type);
|
|
9249
|
-
|
|
9250
|
-
|
|
9251
|
-
|
|
9848
|
+
dragStartRef.current = {
|
|
9849
|
+
x: e.clientX,
|
|
9850
|
+
y: e.clientY,
|
|
9851
|
+
rect: {
|
|
9852
|
+
...rect
|
|
9853
|
+
}
|
|
9854
|
+
};
|
|
9252
9855
|
}, [
|
|
9253
|
-
|
|
9254
|
-
height
|
|
9856
|
+
rect
|
|
9255
9857
|
]);
|
|
9256
9858
|
const handleMouseMove = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((e)=>{
|
|
9257
9859
|
if (!isDragging || !containerRef.current) return;
|
|
9258
|
-
const
|
|
9259
|
-
const
|
|
9260
|
-
const
|
|
9261
|
-
|
|
9262
|
-
let
|
|
9860
|
+
const container = containerRef.current;
|
|
9861
|
+
const { x: startX, y: startY, rect: startRect } = dragStartRef.current;
|
|
9862
|
+
const deltaY = (e.clientY - startY) / container.clientHeight * 100;
|
|
9863
|
+
const deltaX = (e.clientX - startX) / container.clientWidth * 100;
|
|
9864
|
+
let { position: newPos, height: newH, leftPosition: newLeft, width: newW } = startRect;
|
|
9263
9865
|
switch(dragType){
|
|
9264
9866
|
case 'top':
|
|
9265
9867
|
{
|
|
9266
|
-
const
|
|
9267
|
-
|
|
9268
|
-
|
|
9269
|
-
if (
|
|
9270
|
-
|
|
9271
|
-
|
|
9868
|
+
const bottom = startRect.position + startRect.height;
|
|
9869
|
+
newPos = Math.max(0, Math.min(startRect.position + deltaY, bottom - MIN_SIZE));
|
|
9870
|
+
newH = bottom - newPos;
|
|
9871
|
+
if (newH > MAX_SIZE) {
|
|
9872
|
+
newH = MAX_SIZE;
|
|
9873
|
+
newPos = bottom - MAX_SIZE;
|
|
9272
9874
|
}
|
|
9273
9875
|
break;
|
|
9274
9876
|
}
|
|
9275
9877
|
case 'bottom':
|
|
9276
|
-
|
|
9878
|
+
newH = Math.max(MIN_SIZE, Math.min(MAX_SIZE, startRect.height + deltaY, 100 - startRect.position));
|
|
9879
|
+
break;
|
|
9880
|
+
case 'left':
|
|
9881
|
+
{
|
|
9882
|
+
const right = startRect.leftPosition + startRect.width;
|
|
9883
|
+
newLeft = Math.max(0, Math.min(startRect.leftPosition + deltaX, right - MIN_SIZE));
|
|
9884
|
+
newW = right - newLeft;
|
|
9885
|
+
if (newW > MAX_SIZE) {
|
|
9886
|
+
newW = MAX_SIZE;
|
|
9887
|
+
newLeft = right - MAX_SIZE;
|
|
9888
|
+
}
|
|
9889
|
+
break;
|
|
9890
|
+
}
|
|
9891
|
+
case 'right':
|
|
9892
|
+
newW = Math.max(MIN_SIZE, Math.min(MAX_SIZE, startRect.width + deltaX, 100 - startRect.leftPosition));
|
|
9277
9893
|
break;
|
|
9278
9894
|
case 'middle':
|
|
9279
|
-
|
|
9895
|
+
newPos = Math.max(0, Math.min(startRect.position + deltaY, 100 - startRect.height));
|
|
9896
|
+
newLeft = Math.max(0, Math.min(startRect.leftPosition + deltaX, 100 - startRect.width));
|
|
9280
9897
|
break;
|
|
9281
9898
|
}
|
|
9282
|
-
|
|
9283
|
-
|
|
9284
|
-
|
|
9899
|
+
if (newPos < SNAP_THRESHOLD) newPos = 0;
|
|
9900
|
+
if (newPos + newH > 100 - SNAP_THRESHOLD) newPos = 100 - newH;
|
|
9901
|
+
if (newLeft < SNAP_THRESHOLD) newLeft = 0;
|
|
9902
|
+
if (newLeft + newW > 100 - SNAP_THRESHOLD) newLeft = 100 - newW;
|
|
9903
|
+
const newRect = {
|
|
9904
|
+
position: newPos,
|
|
9905
|
+
height: newH,
|
|
9906
|
+
leftPosition: newLeft,
|
|
9907
|
+
width: newW
|
|
9908
|
+
};
|
|
9909
|
+
setRect(newRect);
|
|
9910
|
+
const newInfo = calculateSliderInfo(newRect);
|
|
9285
9911
|
if (newInfo) setInfo(newInfo);
|
|
9286
9912
|
}, [
|
|
9287
9913
|
isDragging,
|
|
9288
9914
|
dragType,
|
|
9289
|
-
startY,
|
|
9290
|
-
startPosition,
|
|
9291
|
-
startHeight,
|
|
9292
|
-
position,
|
|
9293
|
-
height,
|
|
9294
9915
|
calculateSliderInfo
|
|
9295
9916
|
]);
|
|
9296
9917
|
const handleMouseUp = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)(()=>{
|
|
@@ -9317,46 +9938,88 @@ const Slider = ({ id })=>{
|
|
|
9317
9938
|
handleMouseMove,
|
|
9318
9939
|
handleMouseUp
|
|
9319
9940
|
]);
|
|
9320
|
-
(0, __WEBPACK_EXTERNAL_MODULE_react__.
|
|
9321
|
-
|
|
9322
|
-
const { startIndex, endIndex } = interval;
|
|
9941
|
+
const applyInterval = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((newInterval)=>{
|
|
9942
|
+
const { startIndex, endIndex, startFrequency, endFrequency } = newInterval;
|
|
9323
9943
|
const [_, len] = getHeatmapData();
|
|
9324
|
-
const
|
|
9325
|
-
|
|
9326
|
-
|
|
9327
|
-
|
|
9328
|
-
|
|
9329
|
-
|
|
9330
|
-
const
|
|
9331
|
-
|
|
9332
|
-
|
|
9333
|
-
|
|
9944
|
+
const currentRect = rectRef.current;
|
|
9945
|
+
const rowChanged = !(startIndex === info?.startIndex && endIndex === info?.endIndex) && len > 0 && startIndex >= 0 && endIndex <= len && endIndex - startIndex >= Math.ceil(MIN_SIZE * len / 100);
|
|
9946
|
+
let freqChanged = false;
|
|
9947
|
+
let newLeftPosition = currentRect.leftPosition;
|
|
9948
|
+
let newWidth = currentRect.width;
|
|
9949
|
+
if (void 0 !== startFrequency && void 0 !== endFrequency && frequencyFormat) {
|
|
9950
|
+
const minFreqStr = frequencyFormat(0);
|
|
9951
|
+
const maxFreqStr = frequencyFormat(100);
|
|
9952
|
+
const minFreq = minFreqStr ? Number(minFreqStr) : 0;
|
|
9953
|
+
const maxFreq = maxFreqStr ? Number(maxFreqStr) : 0;
|
|
9954
|
+
const freqSpan = maxFreq - minFreq;
|
|
9955
|
+
if (freqSpan > 0) {
|
|
9956
|
+
const leftPercent = (startFrequency - minFreq) / freqSpan * 100;
|
|
9957
|
+
const rightPercent = (endFrequency - minFreq) / freqSpan * 100;
|
|
9958
|
+
const widthPercent = rightPercent - leftPercent;
|
|
9959
|
+
if (leftPercent >= 0 && rightPercent <= 100 && widthPercent >= MIN_SIZE) {
|
|
9960
|
+
const posChanged = Math.abs(leftPercent - currentRect.leftPosition) > 0.01 || Math.abs(widthPercent - currentRect.width) > 0.01;
|
|
9961
|
+
if (posChanged) {
|
|
9962
|
+
freqChanged = true;
|
|
9963
|
+
newLeftPosition = leftPercent;
|
|
9964
|
+
newWidth = widthPercent;
|
|
9965
|
+
}
|
|
9966
|
+
}
|
|
9334
9967
|
}
|
|
9335
9968
|
}
|
|
9969
|
+
if (!rowChanged && !freqChanged) return;
|
|
9970
|
+
const newRect = {
|
|
9971
|
+
position: rowChanged ? (1 - endIndex / len) * 100 : currentRect.position,
|
|
9972
|
+
height: rowChanged ? (endIndex - startIndex) / len * 100 : currentRect.height,
|
|
9973
|
+
leftPosition: newLeftPosition,
|
|
9974
|
+
width: newWidth
|
|
9975
|
+
};
|
|
9976
|
+
setRect(newRect);
|
|
9977
|
+
const newInfo = calculateSliderInfo(newRect);
|
|
9978
|
+
if (newInfo) {
|
|
9979
|
+
setInfo(newInfo);
|
|
9980
|
+
onChange?.(newInfo);
|
|
9981
|
+
}
|
|
9336
9982
|
}, [
|
|
9337
|
-
interval,
|
|
9338
|
-
canSlider,
|
|
9339
9983
|
getHeatmapData,
|
|
9340
|
-
|
|
9984
|
+
frequencyFormat,
|
|
9985
|
+
info?.startIndex,
|
|
9986
|
+
info?.endIndex,
|
|
9987
|
+
calculateSliderInfo,
|
|
9988
|
+
onChange
|
|
9341
9989
|
]);
|
|
9342
9990
|
(0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>{
|
|
9343
|
-
if (
|
|
9344
|
-
|
|
9345
|
-
|
|
9346
|
-
|
|
9347
|
-
|
|
9348
|
-
|
|
9349
|
-
|
|
9350
|
-
|
|
9351
|
-
|
|
9352
|
-
|
|
9353
|
-
|
|
9354
|
-
|
|
9355
|
-
|
|
9356
|
-
}
|
|
9991
|
+
if (interval && canSlider) applyInterval(interval);
|
|
9992
|
+
}, [
|
|
9993
|
+
interval?.startIndex,
|
|
9994
|
+
interval?.endIndex,
|
|
9995
|
+
interval?.startFrequency,
|
|
9996
|
+
interval?.endFrequency,
|
|
9997
|
+
canSlider,
|
|
9998
|
+
applyInterval
|
|
9999
|
+
]);
|
|
10000
|
+
(0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>{
|
|
10001
|
+
if (!globalID) return;
|
|
10002
|
+
heatmapCaptureUpdate(globalID, (e)=>{
|
|
10003
|
+
if (e.interval && canSlider) applyInterval(e.interval);
|
|
9357
10004
|
});
|
|
9358
10005
|
}, [
|
|
9359
|
-
globalID
|
|
10006
|
+
globalID,
|
|
10007
|
+
canSlider,
|
|
10008
|
+
applyInterval
|
|
10009
|
+
]);
|
|
10010
|
+
const bounds = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>({
|
|
10011
|
+
nearLeft: leftPosition < 10,
|
|
10012
|
+
nearRight: leftPosition + width > 90,
|
|
10013
|
+
nearTop: position < 8,
|
|
10014
|
+
nearBottom: position + height > 92,
|
|
10015
|
+
centerNearLeft: leftPosition + width / 2 < 10,
|
|
10016
|
+
centerNearRight: leftPosition + width / 2 > 90,
|
|
10017
|
+
isSmall: height < 15 && width < 20
|
|
10018
|
+
}), [
|
|
10019
|
+
leftPosition,
|
|
10020
|
+
width,
|
|
10021
|
+
position,
|
|
10022
|
+
height
|
|
9360
10023
|
]);
|
|
9361
10024
|
if (!canSlider) return null;
|
|
9362
10025
|
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(Zoom_ZoomOffsetContainer, {
|
|
@@ -9375,32 +10038,104 @@ const Slider = ({ id })=>{
|
|
|
9375
10038
|
bottom: '0%'
|
|
9376
10039
|
}
|
|
9377
10040
|
}),
|
|
10041
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
10042
|
+
className: HeatmapCapture_Slider_styles_module.boundaryLine,
|
|
10043
|
+
style: {
|
|
10044
|
+
left: '0%'
|
|
10045
|
+
}
|
|
10046
|
+
}),
|
|
10047
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
10048
|
+
className: HeatmapCapture_Slider_styles_module.boundaryLine,
|
|
10049
|
+
style: {
|
|
10050
|
+
right: '0%'
|
|
10051
|
+
}
|
|
10052
|
+
}),
|
|
10053
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
|
|
10054
|
+
className: `${HeatmapCapture_Slider_styles_module.externalLabel} ${bounds.nearLeft ? HeatmapCapture_Slider_styles_module.externalLabelLeftInner : HeatmapCapture_Slider_styles_module.externalLabelLeft}`,
|
|
10055
|
+
style: {
|
|
10056
|
+
top: `${position + height / 2}%`,
|
|
10057
|
+
left: `${leftPosition}%`
|
|
10058
|
+
},
|
|
10059
|
+
children: [
|
|
10060
|
+
info?.startFrequencyFormat,
|
|
10061
|
+
unit
|
|
10062
|
+
]
|
|
10063
|
+
}),
|
|
10064
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
|
|
10065
|
+
className: `${HeatmapCapture_Slider_styles_module.externalLabel} ${bounds.nearRight ? HeatmapCapture_Slider_styles_module.externalLabelRightInner : HeatmapCapture_Slider_styles_module.externalLabelRight}`,
|
|
10066
|
+
style: {
|
|
10067
|
+
top: `${position + height / 2}%`,
|
|
10068
|
+
left: `${leftPosition + width}%`
|
|
10069
|
+
},
|
|
10070
|
+
children: [
|
|
10071
|
+
info?.endFrequencyFormat,
|
|
10072
|
+
unit
|
|
10073
|
+
]
|
|
10074
|
+
}),
|
|
10075
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
10076
|
+
className: `${HeatmapCapture_Slider_styles_module.externalLabel} ${bounds.nearTop ? HeatmapCapture_Slider_styles_module.externalLabelTopInner : HeatmapCapture_Slider_styles_module.externalLabelTop} ${bounds.centerNearLeft ? HeatmapCapture_Slider_styles_module.externalLabelHorizontalRight : bounds.centerNearRight ? HeatmapCapture_Slider_styles_module.externalLabelHorizontalLeft : ''}`,
|
|
10077
|
+
style: {
|
|
10078
|
+
top: `${position}%`,
|
|
10079
|
+
left: `${leftPosition + width / 2}%`
|
|
10080
|
+
},
|
|
10081
|
+
children: info?.endTimestampFormat
|
|
10082
|
+
}),
|
|
10083
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
10084
|
+
className: `${HeatmapCapture_Slider_styles_module.externalLabel} ${bounds.nearBottom ? HeatmapCapture_Slider_styles_module.externalLabelBottomInner : HeatmapCapture_Slider_styles_module.externalLabelBottom} ${bounds.centerNearLeft ? HeatmapCapture_Slider_styles_module.externalLabelHorizontalRight : bounds.centerNearRight ? HeatmapCapture_Slider_styles_module.externalLabelHorizontalLeft : ''}`,
|
|
10085
|
+
style: {
|
|
10086
|
+
top: `${position + height}%`,
|
|
10087
|
+
left: `${leftPosition + width / 2}%`
|
|
10088
|
+
},
|
|
10089
|
+
children: info?.startTimestampFormat
|
|
10090
|
+
}),
|
|
9378
10091
|
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
|
|
9379
10092
|
className: HeatmapCapture_Slider_styles_module.slider,
|
|
9380
10093
|
style: {
|
|
9381
10094
|
top: `${position}%`,
|
|
9382
|
-
height: `${height}
|
|
10095
|
+
height: `${height}%`,
|
|
10096
|
+
left: `${leftPosition}%`,
|
|
10097
|
+
width: `${width}%`
|
|
9383
10098
|
},
|
|
9384
10099
|
children: [
|
|
9385
10100
|
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
9386
|
-
className: HeatmapCapture_Slider_styles_module.sliderEdge
|
|
9387
|
-
onMouseDown: (e)=>handleMouseDown(e, 'top')
|
|
9388
|
-
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
9389
|
-
className: HeatmapCapture_Slider_styles_module.edgeText,
|
|
9390
|
-
children: info?.endTimestampFormat
|
|
9391
|
-
})
|
|
10101
|
+
className: `${HeatmapCapture_Slider_styles_module.sliderEdge} ${HeatmapCapture_Slider_styles_module.sliderEdgeTop}`,
|
|
10102
|
+
onMouseDown: (e)=>handleMouseDown(e, 'top')
|
|
9392
10103
|
}),
|
|
9393
10104
|
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
9394
|
-
className: HeatmapCapture_Slider_styles_module.
|
|
9395
|
-
onMouseDown: (e)=>handleMouseDown(e, '
|
|
10105
|
+
className: `${HeatmapCapture_Slider_styles_module.sliderEdge} ${HeatmapCapture_Slider_styles_module.sliderEdgeLeft}`,
|
|
10106
|
+
onMouseDown: (e)=>handleMouseDown(e, 'left')
|
|
9396
10107
|
}),
|
|
9397
10108
|
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
9398
|
-
className: HeatmapCapture_Slider_styles_module.
|
|
9399
|
-
onMouseDown: (e)=>handleMouseDown(e, '
|
|
9400
|
-
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.
|
|
9401
|
-
className: HeatmapCapture_Slider_styles_module.
|
|
9402
|
-
children:
|
|
10109
|
+
className: HeatmapCapture_Slider_styles_module.sliderMiddle,
|
|
10110
|
+
onMouseDown: (e)=>handleMouseDown(e, 'middle'),
|
|
10111
|
+
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
|
|
10112
|
+
className: `${HeatmapCapture_Slider_styles_module.middleInfo} ${bounds.isSmall ? HeatmapCapture_Slider_styles_module.middleInfoOutside : ''} ${bounds.isSmall && position > 50 ? HeatmapCapture_Slider_styles_module.middleInfoAbove : ''}`,
|
|
10113
|
+
children: [
|
|
10114
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
|
|
10115
|
+
children: [
|
|
10116
|
+
"\u5E26\u5BBD:",
|
|
10117
|
+
' ',
|
|
10118
|
+
info?.bandwidth !== void 0 ? (1000 * info.bandwidth).toFixed(2) : '',
|
|
10119
|
+
unitKHz
|
|
10120
|
+
]
|
|
10121
|
+
}),
|
|
10122
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
|
|
10123
|
+
children: [
|
|
10124
|
+
"\u65F6\u957F: ",
|
|
10125
|
+
info?.durationFormat,
|
|
10126
|
+
"s"
|
|
10127
|
+
]
|
|
10128
|
+
})
|
|
10129
|
+
]
|
|
9403
10130
|
})
|
|
10131
|
+
}),
|
|
10132
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
10133
|
+
className: `${HeatmapCapture_Slider_styles_module.sliderEdge} ${HeatmapCapture_Slider_styles_module.sliderEdgeRight}`,
|
|
10134
|
+
onMouseDown: (e)=>handleMouseDown(e, 'right')
|
|
10135
|
+
}),
|
|
10136
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
10137
|
+
className: `${HeatmapCapture_Slider_styles_module.sliderEdge} ${HeatmapCapture_Slider_styles_module.sliderEdgeBottom}`,
|
|
10138
|
+
onMouseDown: (e)=>handleMouseDown(e, 'bottom')
|
|
9404
10139
|
})
|
|
9405
10140
|
]
|
|
9406
10141
|
})
|
|
@@ -9416,7 +10151,7 @@ const HeatmapCapture_HeatmapCapture = (props)=>{
|
|
|
9416
10151
|
...props
|
|
9417
10152
|
}) : type === store_HeatmapCaptureType.RowIndex ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(HeatmapCapture_RowIndex, {
|
|
9418
10153
|
...props
|
|
9419
|
-
}) : /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
10154
|
+
}) : /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Area, {
|
|
9420
10155
|
...props
|
|
9421
10156
|
});
|
|
9422
10157
|
};
|
|
@@ -9878,7 +10613,7 @@ const Heatmap_Heatmap = (props)=>{
|
|
|
9878
10613
|
children: [
|
|
9879
10614
|
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Boundary, {}),
|
|
9880
10615
|
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Chart, {}),
|
|
9881
|
-
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
10616
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(components_EventBus, {
|
|
9882
10617
|
id: id
|
|
9883
10618
|
}),
|
|
9884
10619
|
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(HeatmapCapture, {
|
|
@@ -9906,9 +10641,11 @@ const Heatmap_Chart_Chart = ({ publish, heatmapDefaultData })=>{
|
|
|
9906
10641
|
}
|
|
9907
10642
|
});
|
|
9908
10643
|
}, []);
|
|
10644
|
+
const handleSpectrumRule = useSpectrumRule(constants_ChartType.Scan);
|
|
9909
10645
|
hooks_usePublish({
|
|
9910
10646
|
publish,
|
|
9911
10647
|
subscribe: (e)=>{
|
|
10648
|
+
handleSpectrumRule(e);
|
|
9912
10649
|
const { pstype } = e;
|
|
9913
10650
|
if (pstype === constants_PSType.Heatmap) {
|
|
9914
10651
|
const { data, timestamps } = e;
|
|
@@ -9927,10 +10664,17 @@ const Heatmap_Chart_Chart = ({ publish, heatmapDefaultData })=>{
|
|
|
9927
10664
|
tools(globalID, constants_ModuleType.Heatmap)(e);
|
|
9928
10665
|
}
|
|
9929
10666
|
});
|
|
9930
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.
|
|
9931
|
-
children:
|
|
9932
|
-
|
|
9933
|
-
|
|
10667
|
+
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(components_Container, {
|
|
10668
|
+
children: [
|
|
10669
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(components_FlexBox, {
|
|
10670
|
+
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(modules_Heatmap, {
|
|
10671
|
+
heatmapDefaultData: heatmapDefaultData
|
|
10672
|
+
})
|
|
10673
|
+
}),
|
|
10674
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(AxisX, {
|
|
10675
|
+
type: constants_ChartType.Scan
|
|
10676
|
+
})
|
|
10677
|
+
]
|
|
9934
10678
|
});
|
|
9935
10679
|
};
|
|
9936
10680
|
const Heatmap_Chart = Heatmap_Chart_Chart;
|
|
@@ -10141,76 +10885,6 @@ const GridLines = ()=>{
|
|
|
10141
10885
|
});
|
|
10142
10886
|
};
|
|
10143
10887
|
const components_GridLines = /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__["default"].memo(GridLines);
|
|
10144
|
-
var RulerTicks_styles_module = __webpack_require__("../../../node_modules/.pnpm/@rsbuild+core@1.3.18/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[11].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[11].use[2]!../../../node_modules/.pnpm/@rsbuild+plugin-less@1.5.0_@rsbuild+core@1.6.7/node_modules/@rsbuild/plugin-less/compiled/less-loader/index.js??ruleSet[1].rules[11].use[3]!./src/components/RulerTicks/styles.module.less");
|
|
10145
|
-
var RulerTicks_styles_module_options = {};
|
|
10146
|
-
RulerTicks_styles_module_options.styleTagTransform = styleTagTransform_default();
|
|
10147
|
-
RulerTicks_styles_module_options.setAttributes = setAttributesWithoutAttributes_default();
|
|
10148
|
-
RulerTicks_styles_module_options.insert = insertBySelector_default().bind(null, "head");
|
|
10149
|
-
RulerTicks_styles_module_options.domAPI = styleDomAPI_default();
|
|
10150
|
-
RulerTicks_styles_module_options.insertStyleElement = insertStyleElement_default();
|
|
10151
|
-
injectStylesIntoStyleTag_default()(RulerTicks_styles_module.Z, RulerTicks_styles_module_options);
|
|
10152
|
-
const components_RulerTicks_styles_module = RulerTicks_styles_module.Z && RulerTicks_styles_module.Z.locals ? RulerTicks_styles_module.Z.locals : void 0;
|
|
10153
|
-
const RulerTicks_RulerTicks = ({ length = 10, tickColor = 'var(--theme-color-base)', tickHeight = 8, strokeWidth = 1, orientation = 'horizontal', split = 2 })=>{
|
|
10154
|
-
const renderTick = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((index)=>{
|
|
10155
|
-
const tickSpacing = 100 / length;
|
|
10156
|
-
const position = index * tickSpacing;
|
|
10157
|
-
let tickHeightUse = 'horizontal' === orientation && index % split === 0 || 'vertical' === orientation && index % split !== 0 ? 1.68 * tickHeight : tickHeight;
|
|
10158
|
-
if ('horizontal' === orientation) tickHeightUse /= 0.5;
|
|
10159
|
-
if (!position) return null;
|
|
10160
|
-
return 'horizontal' === orientation ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("line", {
|
|
10161
|
-
x1: position,
|
|
10162
|
-
y1: "0",
|
|
10163
|
-
x2: position,
|
|
10164
|
-
y2: tickHeightUse,
|
|
10165
|
-
stroke: tickColor,
|
|
10166
|
-
strokeWidth: strokeWidth,
|
|
10167
|
-
vectorEffect: "non-scaling-stroke"
|
|
10168
|
-
}, `tick-${index}`) : /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("line", {
|
|
10169
|
-
x1: "100",
|
|
10170
|
-
y1: position,
|
|
10171
|
-
x2: 100 - tickHeightUse,
|
|
10172
|
-
y2: position,
|
|
10173
|
-
stroke: tickColor,
|
|
10174
|
-
strokeWidth: strokeWidth,
|
|
10175
|
-
vectorEffect: "non-scaling-stroke"
|
|
10176
|
-
}, `tick-${index}`);
|
|
10177
|
-
}, [
|
|
10178
|
-
length,
|
|
10179
|
-
tickColor,
|
|
10180
|
-
strokeWidth,
|
|
10181
|
-
orientation
|
|
10182
|
-
]);
|
|
10183
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("svg", {
|
|
10184
|
-
className: components_RulerTicks_styles_module.RulerTicks,
|
|
10185
|
-
width: "100%",
|
|
10186
|
-
height: "100%",
|
|
10187
|
-
preserveAspectRatio: "none",
|
|
10188
|
-
viewBox: "0 0 100 100",
|
|
10189
|
-
children: [
|
|
10190
|
-
'horizontal' === orientation ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("line", {
|
|
10191
|
-
x1: "0",
|
|
10192
|
-
y1: "0",
|
|
10193
|
-
x2: "100",
|
|
10194
|
-
y2: "0",
|
|
10195
|
-
stroke: tickColor,
|
|
10196
|
-
strokeWidth: strokeWidth,
|
|
10197
|
-
vectorEffect: "non-scaling-stroke"
|
|
10198
|
-
}) : /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("line", {
|
|
10199
|
-
x1: "100",
|
|
10200
|
-
y1: "0",
|
|
10201
|
-
x2: "100",
|
|
10202
|
-
y2: "100",
|
|
10203
|
-
stroke: tickColor,
|
|
10204
|
-
strokeWidth: strokeWidth,
|
|
10205
|
-
vectorEffect: "non-scaling-stroke"
|
|
10206
|
-
}),
|
|
10207
|
-
Array.from({
|
|
10208
|
-
length: length + 1
|
|
10209
|
-
}).map((_, index)=>renderTick(index))
|
|
10210
|
-
]
|
|
10211
|
-
});
|
|
10212
|
-
};
|
|
10213
|
-
const components_RulerTicks = RulerTicks_RulerTicks;
|
|
10214
10888
|
var spectrum_components_Ticks_styles_module = __webpack_require__("../../../../../../node_modules/.pnpm/@rsbuild+core@1.3.18/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[11].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[11].use[2]!../../../../../../node_modules/.pnpm/@rsbuild+plugin-less@1.5.0_@rsbuild+core@1.6.7/node_modules/@rsbuild/plugin-less/compiled/less-loader/index.js??ruleSet[1].rules[11].use[3]!./src/components/AxisY/spectrum/components/Ticks/styles.module.less");
|
|
10215
10889
|
var components_Ticks_styles_module_options = {};
|
|
10216
10890
|
components_Ticks_styles_module_options.styleTagTransform = styleTagTransform_default();
|
|
@@ -11381,208 +12055,52 @@ Dropdown_styles_module_options.domAPI = styleDomAPI_default();
|
|
|
11381
12055
|
Dropdown_styles_module_options.insertStyleElement = insertStyleElement_default();
|
|
11382
12056
|
injectStylesIntoStyleTag_default()(Dropdown_styles_module.Z, Dropdown_styles_module_options);
|
|
11383
12057
|
const components_Dropdown_styles_module = Dropdown_styles_module.Z && Dropdown_styles_module.Z.locals ? Dropdown_styles_module.Z.locals : void 0;
|
|
11384
|
-
const Dropdown = ({ value, options, onChange, placeholder = "\u8BF7\u9009\u62E9", closeOnSelect = true })=>{
|
|
11385
|
-
const [isOpen, setIsOpen] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)(false);
|
|
11386
|
-
const handleSelect = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((value)=>{
|
|
11387
|
-
onChange?.(value);
|
|
11388
|
-
if (closeOnSelect) setIsOpen(false);
|
|
11389
|
-
}, [
|
|
11390
|
-
onChange,
|
|
11391
|
-
closeOnSelect
|
|
11392
|
-
]);
|
|
11393
|
-
const selectedOption = options.find((option)=>option.value === value);
|
|
11394
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
|
|
11395
|
-
className: components_Dropdown_styles_module.container,
|
|
11396
|
-
children: [
|
|
11397
|
-
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
|
|
11398
|
-
className: components_Dropdown_styles_module.dropdown,
|
|
11399
|
-
onClick: ()=>setIsOpen(!isOpen),
|
|
11400
|
-
children: [
|
|
11401
|
-
selectedOption?.label ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("span", {
|
|
11402
|
-
className: components_Dropdown_styles_module.selectedText,
|
|
11403
|
-
children: selectedOption.label
|
|
11404
|
-
}) : /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
11405
|
-
className: components_Dropdown_styles_module.placeholder,
|
|
11406
|
-
children: 'string' == typeof placeholder ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("span", {
|
|
11407
|
-
className: components_Dropdown_styles_module.selectedText,
|
|
11408
|
-
children: placeholder
|
|
11409
|
-
}) : placeholder
|
|
11410
|
-
}),
|
|
11411
|
-
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("span", {
|
|
11412
|
-
className: `${components_Dropdown_styles_module.arrow} ${isOpen ? components_Dropdown_styles_module.open : ''}`,
|
|
11413
|
-
children: "\u25BC"
|
|
11414
|
-
})
|
|
11415
|
-
]
|
|
11416
|
-
}),
|
|
11417
|
-
isOpen && /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
11418
|
-
className: components_Dropdown_styles_module.dropdownMenu,
|
|
11419
|
-
children: options.map((option, index)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
11420
|
-
className: `${components_Dropdown_styles_module.dropdownItem} ${value === option.value ? components_Dropdown_styles_module.active : ''}`,
|
|
11421
|
-
style: option.style,
|
|
11422
|
-
onClick: ()=>handleSelect(option.value),
|
|
11423
|
-
children: option.render ? option.render() : option.label
|
|
11424
|
-
}, null !== option.value ? option.value : `null-option-${index}`))
|
|
11425
|
-
})
|
|
11426
|
-
]
|
|
11427
|
-
});
|
|
11428
|
-
};
|
|
11429
|
-
const components_Dropdown = Dropdown;
|
|
11430
|
-
function useChannel() {
|
|
11431
|
-
const { state: { marker, globalID }, dispatch } = useStore_useStore();
|
|
11432
|
-
(0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>{
|
|
11433
|
-
if (marker?.mode === store_MarkerMode.DDC) dispatch({
|
|
11434
|
-
payload: {
|
|
11435
|
-
marker: {
|
|
11436
|
-
...marker,
|
|
11437
|
-
enabled: true,
|
|
11438
|
-
visible: true
|
|
11439
|
-
}
|
|
11440
|
-
}
|
|
11441
|
-
});
|
|
11442
|
-
}, [
|
|
11443
|
-
marker?.mode
|
|
11444
|
-
]);
|
|
11445
|
-
const updateChannel = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)(()=>{}, [
|
|
11446
|
-
globalID
|
|
11447
|
-
]);
|
|
11448
|
-
return updateChannel;
|
|
11449
|
-
}
|
|
11450
|
-
function useSegments() {
|
|
11451
|
-
const { state: { segments, zoom, points, axisX }, dispatch } = useStore_useStore();
|
|
11452
|
-
(0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>{}, [
|
|
11453
|
-
segments
|
|
11454
|
-
]);
|
|
11455
|
-
const setSegments = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((s)=>{
|
|
11456
|
-
if (s.totalPoints) {
|
|
11457
|
-
const endIndex = s.totalPoints - 1;
|
|
11458
|
-
zoom.interval = {
|
|
11459
|
-
start: 0,
|
|
11460
|
-
end: endIndex
|
|
11461
|
-
};
|
|
11462
|
-
const payload = {
|
|
11463
|
-
segments: s,
|
|
11464
|
-
zoom,
|
|
11465
|
-
axisX
|
|
11466
|
-
};
|
|
11467
|
-
if (0 === points.length) payload.axisX.frequencyFormat = (0, utils.Ax)(s);
|
|
11468
|
-
dispatch({
|
|
11469
|
-
payload
|
|
11470
|
-
});
|
|
11471
|
-
}
|
|
11472
|
-
}, [
|
|
11473
|
-
points
|
|
11474
|
-
]);
|
|
11475
|
-
return [
|
|
11476
|
-
segments,
|
|
11477
|
-
setSegments
|
|
11478
|
-
];
|
|
11479
|
-
}
|
|
11480
|
-
const SET_SEGMENTS_DISPLAY = (globalID, func)=>subscription_createSubscriptionManager(`SET_SEGMENTS_DISPLAY-${globalID}`, '0', func);
|
|
11481
|
-
function useSpectrumRule(type) {
|
|
11482
|
-
const { state: { zoom, globalID }, dispatch } = useStore_useStore();
|
|
11483
|
-
const [segments, setSegments] = useSegments();
|
|
11484
|
-
const updateSegments = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((e)=>{
|
|
11485
|
-
const { event = constants_SegmentsEvent.Cover, index } = e;
|
|
11486
|
-
const { totalPoints } = segments;
|
|
11487
|
-
let start = 0;
|
|
11488
|
-
let end = 0;
|
|
11489
|
-
let isScanSegmentsUpdateMagnify = false;
|
|
11490
|
-
if (event === constants_SegmentsEvent.Focus && totalPoints) {
|
|
11491
|
-
const endIndex = totalPoints - 1;
|
|
11492
|
-
if (index < segments.length) {
|
|
11493
|
-
for(let i = 0; i < index; i += 1)start += segments[i].point + 1;
|
|
11494
|
-
const { point } = segments[index];
|
|
11495
|
-
end = start + point;
|
|
11496
|
-
isScanSegmentsUpdateMagnify = true;
|
|
11497
|
-
} else if (void 0 === index) {
|
|
11498
|
-
start = 0;
|
|
11499
|
-
end = endIndex;
|
|
11500
|
-
isScanSegmentsUpdateMagnify = false;
|
|
11501
|
-
}
|
|
11502
|
-
}
|
|
11503
|
-
zoom.interval = {
|
|
11504
|
-
start,
|
|
11505
|
-
end
|
|
11506
|
-
};
|
|
11507
|
-
zoom.isScanSegmentsUpdateMagnify = isScanSegmentsUpdateMagnify;
|
|
11508
|
-
dispatch({
|
|
11509
|
-
payload: {
|
|
11510
|
-
zoom
|
|
11511
|
-
}
|
|
11512
|
-
});
|
|
11513
|
-
if (event === constants_SegmentsEvent.Cover) setSegments((0, utils.sl)(e.data));
|
|
11514
|
-
}, [
|
|
11515
|
-
segments
|
|
11516
|
-
]);
|
|
11517
|
-
(0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>{
|
|
11518
|
-
SET_SEGMENTS_DISPLAY(globalID, (index)=>{
|
|
11519
|
-
updateSegments?.({
|
|
11520
|
-
pstype: constants_PSType.Segments,
|
|
11521
|
-
event: constants_SegmentsEvent.Focus,
|
|
11522
|
-
index
|
|
11523
|
-
});
|
|
11524
|
-
});
|
|
11525
|
-
}, [
|
|
11526
|
-
globalID,
|
|
11527
|
-
updateSegments
|
|
11528
|
-
]);
|
|
11529
|
-
const pointsRef = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(3);
|
|
11530
|
-
const ruleRef = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)({
|
|
11531
|
-
frequency: 0,
|
|
11532
|
-
bandwidth: 0
|
|
11533
|
-
});
|
|
11534
|
-
const generateSegmentsFromPoints = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((points, newRule = ruleRef.current)=>{
|
|
11535
|
-
if (newRule.bandwidth && newRule.frequency && points) {
|
|
11536
|
-
const segments = (0, utils.IS)({
|
|
11537
|
-
frequency: newRule?.frequency,
|
|
11538
|
-
bandwidth: newRule?.bandwidth,
|
|
11539
|
-
totalPoints: points
|
|
11540
|
-
});
|
|
11541
|
-
if ('function' == typeof setSegments) setSegments(segments);
|
|
11542
|
-
}
|
|
11543
|
-
}, [
|
|
11544
|
-
setSegments
|
|
11545
|
-
]);
|
|
11546
|
-
const updateBandwidthRule = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((e)=>{
|
|
11547
|
-
const { frequency, bandwidth } = e;
|
|
11548
|
-
if (!frequency || !bandwidth) return;
|
|
11549
|
-
ruleRef.current = {
|
|
11550
|
-
frequency,
|
|
11551
|
-
bandwidth
|
|
11552
|
-
};
|
|
11553
|
-
generateSegmentsFromPoints(pointsRef.current, e);
|
|
11554
|
-
}, []);
|
|
11555
|
-
const updateData = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((data)=>{
|
|
11556
|
-
if (!data) return;
|
|
11557
|
-
const newPoints = data?.length;
|
|
11558
|
-
if (newPoints && newPoints !== pointsRef.current) {
|
|
11559
|
-
pointsRef.current = newPoints;
|
|
11560
|
-
generateSegmentsFromPoints(newPoints);
|
|
11561
|
-
if (type === constants_ChartType.LiteNormalized) setSegments((0, utils.uq)(newPoints));
|
|
11562
|
-
}
|
|
12058
|
+
const Dropdown = ({ value, options, onChange, placeholder = "\u8BF7\u9009\u62E9", closeOnSelect = true })=>{
|
|
12059
|
+
const [isOpen, setIsOpen] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)(false);
|
|
12060
|
+
const handleSelect = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((value)=>{
|
|
12061
|
+
onChange?.(value);
|
|
12062
|
+
if (closeOnSelect) setIsOpen(false);
|
|
11563
12063
|
}, [
|
|
11564
|
-
|
|
11565
|
-
|
|
11566
|
-
type
|
|
12064
|
+
onChange,
|
|
12065
|
+
closeOnSelect
|
|
11567
12066
|
]);
|
|
11568
|
-
|
|
11569
|
-
|
|
11570
|
-
|
|
11571
|
-
|
|
11572
|
-
|
|
11573
|
-
|
|
11574
|
-
|
|
11575
|
-
|
|
11576
|
-
|
|
11577
|
-
|
|
11578
|
-
|
|
11579
|
-
|
|
11580
|
-
|
|
11581
|
-
|
|
11582
|
-
|
|
11583
|
-
|
|
11584
|
-
|
|
11585
|
-
}
|
|
12067
|
+
const selectedOption = options.find((option)=>option.value === value);
|
|
12068
|
+
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
|
|
12069
|
+
className: components_Dropdown_styles_module.container,
|
|
12070
|
+
children: [
|
|
12071
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
|
|
12072
|
+
className: components_Dropdown_styles_module.dropdown,
|
|
12073
|
+
onClick: ()=>setIsOpen(!isOpen),
|
|
12074
|
+
children: [
|
|
12075
|
+
selectedOption?.label ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("span", {
|
|
12076
|
+
className: components_Dropdown_styles_module.selectedText,
|
|
12077
|
+
children: selectedOption.label
|
|
12078
|
+
}) : /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
12079
|
+
className: components_Dropdown_styles_module.placeholder,
|
|
12080
|
+
children: 'string' == typeof placeholder ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("span", {
|
|
12081
|
+
className: components_Dropdown_styles_module.selectedText,
|
|
12082
|
+
children: placeholder
|
|
12083
|
+
}) : placeholder
|
|
12084
|
+
}),
|
|
12085
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("span", {
|
|
12086
|
+
className: `${components_Dropdown_styles_module.arrow} ${isOpen ? components_Dropdown_styles_module.open : ''}`,
|
|
12087
|
+
children: "\u25BC"
|
|
12088
|
+
})
|
|
12089
|
+
]
|
|
12090
|
+
}),
|
|
12091
|
+
isOpen && /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
12092
|
+
className: components_Dropdown_styles_module.dropdownMenu,
|
|
12093
|
+
children: options.map((option, index)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
12094
|
+
className: `${components_Dropdown_styles_module.dropdownItem} ${value === option.value ? components_Dropdown_styles_module.active : ''}`,
|
|
12095
|
+
style: option.style,
|
|
12096
|
+
onClick: ()=>handleSelect(option.value),
|
|
12097
|
+
children: option.render ? option.render() : option.label
|
|
12098
|
+
}, null !== option.value ? option.value : `null-option-${index}`))
|
|
12099
|
+
})
|
|
12100
|
+
]
|
|
12101
|
+
});
|
|
12102
|
+
};
|
|
12103
|
+
const components_Dropdown = Dropdown;
|
|
11586
12104
|
const SegmentsDisplayControl_SegmentsDisplayControl = ()=>{
|
|
11587
12105
|
const { state: { segments, globalID } } = useStore_useStore();
|
|
11588
12106
|
const [display, setDisplay] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)([]);
|
|
@@ -15099,7 +15617,7 @@ const Spectrum_Spectrum = (props)=>{
|
|
|
15099
15617
|
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(components_Markers, {
|
|
15100
15618
|
id: id
|
|
15101
15619
|
}),
|
|
15102
|
-
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
15620
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(components_EventBus, {
|
|
15103
15621
|
id: id
|
|
15104
15622
|
}),
|
|
15105
15623
|
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(components_Limit, {
|
|
@@ -15223,7 +15741,7 @@ type_Default_styles_module_options.domAPI = styleDomAPI_default();
|
|
|
15223
15741
|
type_Default_styles_module_options.insertStyleElement = insertStyleElement_default();
|
|
15224
15742
|
injectStylesIntoStyleTag_default()(occupancy_type_Default_styles_module.Z, type_Default_styles_module_options);
|
|
15225
15743
|
const AxisY_occupancy_type_Default_styles_module = occupancy_type_Default_styles_module.Z && occupancy_type_Default_styles_module.Z.locals ? occupancy_type_Default_styles_module.Z.locals : void 0;
|
|
15226
|
-
const
|
|
15744
|
+
const type_Default_Default = ()=>{
|
|
15227
15745
|
const { axisYWidth, marginLeft } = useAxisYWidth_useAxisYWidth();
|
|
15228
15746
|
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
15229
15747
|
className: AxisY_occupancy_type_Default_styles_module.axisyoccupancydefault,
|
|
@@ -15234,13 +15752,13 @@ const Default_Default = ()=>{
|
|
|
15234
15752
|
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(occupancy_components_Ticks, {})
|
|
15235
15753
|
});
|
|
15236
15754
|
};
|
|
15237
|
-
const
|
|
15755
|
+
const type_Default = /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__["default"].memo(type_Default_Default);
|
|
15238
15756
|
const AxisYOccupancy = (props)=>{
|
|
15239
15757
|
const { disabled } = props;
|
|
15240
15758
|
const { state: { axisY } } = useStore_useStore();
|
|
15241
15759
|
const { show } = axisY;
|
|
15242
15760
|
if (false === show || disabled) return null;
|
|
15243
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
15761
|
+
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(type_Default, {});
|
|
15244
15762
|
};
|
|
15245
15763
|
const occupancy = AxisYOccupancy;
|
|
15246
15764
|
var Occdahsed_styles_module = __webpack_require__("../../../../node_modules/.pnpm/@rsbuild+core@1.3.18/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[11].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[11].use[2]!../../../../node_modules/.pnpm/@rsbuild+plugin-less@1.5.0_@rsbuild+core@1.6.7/node_modules/@rsbuild/plugin-less/compiled/less-loader/index.js??ruleSet[1].rules[11].use[3]!./src/components/GridLines/Occdahsed/styles.module.less");
|
|
@@ -15277,7 +15795,7 @@ TotalLine_styles_module_options.domAPI = styleDomAPI_default();
|
|
|
15277
15795
|
TotalLine_styles_module_options.insertStyleElement = insertStyleElement_default();
|
|
15278
15796
|
injectStylesIntoStyleTag_default()(TotalLine_styles_module.Z, TotalLine_styles_module_options);
|
|
15279
15797
|
const Occupancy_TotalLine_styles_module = TotalLine_styles_module.Z && TotalLine_styles_module.Z.locals ? TotalLine_styles_module.Z.locals : void 0;
|
|
15280
|
-
const
|
|
15798
|
+
const TotalLine = (props)=>{
|
|
15281
15799
|
const { value } = props;
|
|
15282
15800
|
const style = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>({
|
|
15283
15801
|
bottom: `${value || -200}%`
|
|
@@ -15301,7 +15819,7 @@ const TotalLine_TotalLine = (props)=>{
|
|
|
15301
15819
|
})
|
|
15302
15820
|
});
|
|
15303
15821
|
};
|
|
15304
|
-
const
|
|
15822
|
+
const Occupancy_TotalLine = TotalLine;
|
|
15305
15823
|
const Occupancy_Occupancy = (props)=>{
|
|
15306
15824
|
const { occupancyAxisYDisabled } = props;
|
|
15307
15825
|
const { state: { globalID } } = useStore_useStore();
|
|
@@ -15344,10 +15862,10 @@ const Occupancy_Occupancy = (props)=>{
|
|
|
15344
15862
|
children: [
|
|
15345
15863
|
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Occdahsed, {}),
|
|
15346
15864
|
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Chart, {}),
|
|
15347
|
-
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
15865
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(components_EventBus, {
|
|
15348
15866
|
id: id
|
|
15349
15867
|
}),
|
|
15350
|
-
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
15868
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Occupancy_TotalLine, {
|
|
15351
15869
|
value: value
|
|
15352
15870
|
}),
|
|
15353
15871
|
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(components_Cursor, {
|
|
@@ -15387,199 +15905,6 @@ const OccupancyChart = (props)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_reac
|
|
|
15387
15905
|
});
|
|
15388
15906
|
const lib_Occupancy_Occupancy = withChartPublisher(OccupancyChart, 'Occupancy');
|
|
15389
15907
|
const lib_Occupancy = lib_Occupancy_Occupancy;
|
|
15390
|
-
var AxisX_styles_module = __webpack_require__("../../../node_modules/.pnpm/@rsbuild+core@1.3.18/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[11].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[11].use[2]!../../../node_modules/.pnpm/@rsbuild+plugin-less@1.5.0_@rsbuild+core@1.6.7/node_modules/@rsbuild/plugin-less/compiled/less-loader/index.js??ruleSet[1].rules[11].use[3]!./src/components/AxisX/styles.module.less");
|
|
15391
|
-
var AxisX_styles_module_options = {};
|
|
15392
|
-
AxisX_styles_module_options.styleTagTransform = styleTagTransform_default();
|
|
15393
|
-
AxisX_styles_module_options.setAttributes = setAttributesWithoutAttributes_default();
|
|
15394
|
-
AxisX_styles_module_options.insert = insertBySelector_default().bind(null, "head");
|
|
15395
|
-
AxisX_styles_module_options.domAPI = styleDomAPI_default();
|
|
15396
|
-
AxisX_styles_module_options.insertStyleElement = insertStyleElement_default();
|
|
15397
|
-
injectStylesIntoStyleTag_default()(AxisX_styles_module.Z, AxisX_styles_module_options);
|
|
15398
|
-
const components_AxisX_styles_module = AxisX_styles_module.Z && AxisX_styles_module.Z.locals ? AxisX_styles_module.Z.locals : void 0;
|
|
15399
|
-
const ThreeFixedTicks = ()=>{
|
|
15400
|
-
const { state: { zoom: { interval: { start: intervalStart, end: intervalEnd } }, axisX: { unit, unitKHz }, segments } } = useStore_useStore();
|
|
15401
|
-
const { totalPoints } = segments;
|
|
15402
|
-
const endIndex = totalPoints - 1;
|
|
15403
|
-
const { start, bandwidth = 0 } = segments[0] ?? {};
|
|
15404
|
-
const center = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>{
|
|
15405
|
-
if (!endIndex || !bandwidth || void 0 === start) return 0;
|
|
15406
|
-
const midIndex = (0, utils.wF)(intervalStart, intervalEnd);
|
|
15407
|
-
const safeIndex = Math.max(0, Math.min(midIndex, endIndex));
|
|
15408
|
-
return (0, utils.lj)(start + safeIndex * bandwidth / (1000 * endIndex));
|
|
15409
|
-
}, [
|
|
15410
|
-
intervalStart,
|
|
15411
|
-
intervalEnd,
|
|
15412
|
-
start,
|
|
15413
|
-
endIndex,
|
|
15414
|
-
bandwidth
|
|
15415
|
-
]);
|
|
15416
|
-
const bandwidthDiff = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>{
|
|
15417
|
-
if (!totalPoints || !bandwidth) return 0;
|
|
15418
|
-
const intervalWidth = intervalEnd - intervalStart + 1;
|
|
15419
|
-
return (0, utils.lj)(intervalWidth * bandwidth / (2 * totalPoints));
|
|
15420
|
-
}, [
|
|
15421
|
-
intervalStart,
|
|
15422
|
-
intervalEnd,
|
|
15423
|
-
totalPoints,
|
|
15424
|
-
bandwidth
|
|
15425
|
-
]);
|
|
15426
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
|
|
15427
|
-
className: components_AxisX_styles_module.con,
|
|
15428
|
-
children: [
|
|
15429
|
-
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(FrequencyLabel, {
|
|
15430
|
-
value: bandwidthDiff,
|
|
15431
|
-
unit: unitKHz,
|
|
15432
|
-
prefix: "-"
|
|
15433
|
-
}),
|
|
15434
|
-
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(FrequencyLabel, {
|
|
15435
|
-
value: center,
|
|
15436
|
-
unit: unit
|
|
15437
|
-
}),
|
|
15438
|
-
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(FrequencyLabel, {
|
|
15439
|
-
value: bandwidthDiff,
|
|
15440
|
-
unit: unitKHz,
|
|
15441
|
-
prefix: "+"
|
|
15442
|
-
}),
|
|
15443
|
-
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(components_RulerTicks, {
|
|
15444
|
-
length: 10,
|
|
15445
|
-
split: 5
|
|
15446
|
-
})
|
|
15447
|
-
]
|
|
15448
|
-
});
|
|
15449
|
-
};
|
|
15450
|
-
const FrequencyLabel = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.memo)(({ value, unit, prefix = '' })=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
|
|
15451
|
-
style: {
|
|
15452
|
-
paddingLeft: '5px'
|
|
15453
|
-
},
|
|
15454
|
-
children: [
|
|
15455
|
-
prefix,
|
|
15456
|
-
value,
|
|
15457
|
-
unit
|
|
15458
|
-
]
|
|
15459
|
-
}));
|
|
15460
|
-
const FrequencyTick = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.memo)(({ value, index, total })=>{
|
|
15461
|
-
const leftPercentage = index / total * 100;
|
|
15462
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
15463
|
-
className: `${components_AxisX_styles_module.frequencyTick} ${0 === index ? components_AxisX_styles_module.first : index === total ? components_AxisX_styles_module.last : ''}`,
|
|
15464
|
-
style: {
|
|
15465
|
-
left: `${leftPercentage}%`
|
|
15466
|
-
},
|
|
15467
|
-
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("span", {
|
|
15468
|
-
children: value
|
|
15469
|
-
})
|
|
15470
|
-
});
|
|
15471
|
-
});
|
|
15472
|
-
const TICK_COUNT = 5;
|
|
15473
|
-
const DataNFixedTicks = ()=>{
|
|
15474
|
-
const { state: { segments: { totalPoints }, zoom: { interval: { start: intervalStart, end: intervalEnd } }, axisX: { frequencyFormat } } } = useStore_useStore();
|
|
15475
|
-
const getFrequencyByIndex = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((index)=>{
|
|
15476
|
-
if (!totalPoints) return 0;
|
|
15477
|
-
const percentage = Math.min(100 * index / totalPoints, 100);
|
|
15478
|
-
return frequencyFormat(percentage);
|
|
15479
|
-
}, [
|
|
15480
|
-
totalPoints,
|
|
15481
|
-
frequencyFormat
|
|
15482
|
-
]);
|
|
15483
|
-
const ticks = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>{
|
|
15484
|
-
const step = (intervalEnd - intervalStart + 1) / TICK_COUNT;
|
|
15485
|
-
return Array.from({
|
|
15486
|
-
length: TICK_COUNT + 1
|
|
15487
|
-
}, (_, i)=>getFrequencyByIndex(intervalStart + step * i));
|
|
15488
|
-
}, [
|
|
15489
|
-
intervalStart,
|
|
15490
|
-
intervalEnd,
|
|
15491
|
-
getFrequencyByIndex
|
|
15492
|
-
]);
|
|
15493
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
|
|
15494
|
-
className: components_AxisX_styles_module.con,
|
|
15495
|
-
children: [
|
|
15496
|
-
ticks.map((tick, index)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(FrequencyTick, {
|
|
15497
|
-
value: tick,
|
|
15498
|
-
index: index,
|
|
15499
|
-
total: ticks.length - 1
|
|
15500
|
-
}, `tick-${index}`)),
|
|
15501
|
-
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(components_RulerTicks, {
|
|
15502
|
-
length: 10,
|
|
15503
|
-
split: 2
|
|
15504
|
-
})
|
|
15505
|
-
]
|
|
15506
|
-
});
|
|
15507
|
-
};
|
|
15508
|
-
const MScanTicks = ()=>{
|
|
15509
|
-
const { state: { segments } } = useStore_useStore();
|
|
15510
|
-
const style = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>({
|
|
15511
|
-
display: 'flex',
|
|
15512
|
-
flex: 1,
|
|
15513
|
-
justifyContent: 'center',
|
|
15514
|
-
alignItems: 'center'
|
|
15515
|
-
}), []);
|
|
15516
|
-
const t = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>segments.map((item)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
15517
|
-
style: style,
|
|
15518
|
-
children: item.label
|
|
15519
|
-
}, item.index)), [
|
|
15520
|
-
segments
|
|
15521
|
-
]);
|
|
15522
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
|
|
15523
|
-
className: components_AxisX_styles_module.con,
|
|
15524
|
-
children: [
|
|
15525
|
-
t,
|
|
15526
|
-
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(components_RulerTicks, {
|
|
15527
|
-
length: 2 * segments.length,
|
|
15528
|
-
split: 2
|
|
15529
|
-
})
|
|
15530
|
-
]
|
|
15531
|
-
});
|
|
15532
|
-
};
|
|
15533
|
-
const AxisXTicks = ({ type })=>{
|
|
15534
|
-
const { state: { axisX: { show } } } = useStore_useStore();
|
|
15535
|
-
if (!show) return null;
|
|
15536
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
15537
|
-
className: components_AxisX_styles_module.AxisXTicks,
|
|
15538
|
-
children: type === constants_ChartType.Scan || type === constants_ChartType.ScanDF360 ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(DataNFixedTicks, {}) : type === constants_ChartType.MScan ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Zoom_ZoomOffsetContainer, {
|
|
15539
|
-
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(MScanTicks, {})
|
|
15540
|
-
}) : /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(ThreeFixedTicks, {})
|
|
15541
|
-
});
|
|
15542
|
-
};
|
|
15543
|
-
const AxisX_Ticks = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.memo)(AxisXTicks);
|
|
15544
|
-
const AxisX = ({ type })=>{
|
|
15545
|
-
const { state: { axisX } } = useStore_useStore();
|
|
15546
|
-
const { children, unit, ticks } = axisX;
|
|
15547
|
-
const { width, pluginBoxWidth } = useAxisYWidth_useAxisYWidth();
|
|
15548
|
-
const ref = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(null);
|
|
15549
|
-
const axisStyle = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>({
|
|
15550
|
-
marginLeft: width,
|
|
15551
|
-
width: pluginBoxWidth
|
|
15552
|
-
}), [
|
|
15553
|
-
width,
|
|
15554
|
-
pluginBoxWidth
|
|
15555
|
-
]);
|
|
15556
|
-
if (!axisX) return null;
|
|
15557
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(components_Tooltip, {
|
|
15558
|
-
content: `\u{5355}\u{4F4D}${unit}`,
|
|
15559
|
-
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
|
|
15560
|
-
ref: ref,
|
|
15561
|
-
className: components_AxisX_styles_module.axisx,
|
|
15562
|
-
style: axisStyle,
|
|
15563
|
-
children: [
|
|
15564
|
-
ticks && /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(__WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.Fragment, {
|
|
15565
|
-
children: [
|
|
15566
|
-
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
15567
|
-
className: components_AxisX_styles_module.unit,
|
|
15568
|
-
children: unit
|
|
15569
|
-
}),
|
|
15570
|
-
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(AxisX_Ticks, {
|
|
15571
|
-
type: type
|
|
15572
|
-
})
|
|
15573
|
-
]
|
|
15574
|
-
}),
|
|
15575
|
-
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
15576
|
-
children: children
|
|
15577
|
-
})
|
|
15578
|
-
]
|
|
15579
|
-
})
|
|
15580
|
-
});
|
|
15581
|
-
};
|
|
15582
|
-
const components_AxisX = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.memo)(AxisX);
|
|
15583
15908
|
var Blaze_styles_module = __webpack_require__("../../../node_modules/.pnpm/@rsbuild+core@1.3.18/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[11].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[11].use[2]!../../../node_modules/.pnpm/@rsbuild+plugin-less@1.5.0_@rsbuild+core@1.6.7/node_modules/@rsbuild/plugin-less/compiled/less-loader/index.js??ruleSet[1].rules[11].use[3]!./src/components/Blaze/styles.module.less");
|
|
15584
15909
|
var Blaze_styles_module_options = {};
|
|
15585
15910
|
Blaze_styles_module_options.styleTagTransform = styleTagTransform_default();
|
|
@@ -16230,7 +16555,7 @@ const HeatmapPortal_Chart = (props)=>{
|
|
|
16230
16555
|
type: constants_ChartType.Heatmap
|
|
16231
16556
|
}),
|
|
16232
16557
|
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(modules_Heatmap, {}),
|
|
16233
|
-
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
16558
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(AxisX, {
|
|
16234
16559
|
type: type
|
|
16235
16560
|
})
|
|
16236
16561
|
]
|
|
@@ -16248,7 +16573,7 @@ const OccupancyPortal_Chart = (props)=>{
|
|
|
16248
16573
|
type: constants_ChartType.Occupancy
|
|
16249
16574
|
}),
|
|
16250
16575
|
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(modules_Occupancy, {}),
|
|
16251
|
-
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
16576
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(AxisX, {
|
|
16252
16577
|
type: type
|
|
16253
16578
|
})
|
|
16254
16579
|
]
|
|
@@ -16316,7 +16641,7 @@ const Spectrum_Chart_Chart = (props)=>{
|
|
|
16316
16641
|
})
|
|
16317
16642
|
]
|
|
16318
16643
|
}),
|
|
16319
|
-
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
16644
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(AxisX, {
|
|
16320
16645
|
type: type
|
|
16321
16646
|
})
|
|
16322
16647
|
]
|