tot-ui-kit 1.0.0

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/dist/index.cjs ADDED
@@ -0,0 +1,1222 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __commonJS = (cb, mod) => function __require() {
9
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
10
+ };
11
+ var __export = (target, all) => {
12
+ for (var name in all)
13
+ __defProp(target, name, { get: all[name], enumerable: true });
14
+ };
15
+ var __copyProps = (to, from, except, desc) => {
16
+ if (from && typeof from === "object" || typeof from === "function") {
17
+ for (let key of __getOwnPropNames(from))
18
+ if (!__hasOwnProp.call(to, key) && key !== except)
19
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
20
+ }
21
+ return to;
22
+ };
23
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
24
+ // If the importer is in node compatibility mode or this is not an ESM
25
+ // file that has been converted to a CommonJS file using a Babel-
26
+ // compatible transform (i.e. "__esModule" has not been set), then set
27
+ // "default" to the CommonJS "module.exports" for node compatibility.
28
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
29
+ mod
30
+ ));
31
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
32
+
33
+ // src/data/singleMenuData.json
34
+ var require_singleMenuData = __commonJS({
35
+ "src/data/singleMenuData.json"(exports2, module2) {
36
+ module2.exports = [
37
+ {
38
+ client_id: "dashboard",
39
+ app_name: "Dashboard",
40
+ link: "https://dashboard.ladoga.sberanalytics.ru/",
41
+ description: "\u0413\u043B\u0430\u0432\u043D\u044B\u0439 \u044D\u043A\u0440\u0430\u043D",
42
+ order: 1,
43
+ available: true
44
+ },
45
+ {
46
+ client_id: "users",
47
+ app_name: "\u041F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u0438 \u0438 \u0440\u043E\u043B\u0438",
48
+ link: "https://users.ladoga.sberanalytics.ru/",
49
+ description: "\u0423\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435 \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F\u043C\u0438 \u0438 \u0440\u043E\u043B\u044F\u043C\u0438",
50
+ order: 2,
51
+ available: true
52
+ },
53
+ {
54
+ client_id: "logging",
55
+ app_name: "\u041B\u043E\u0433\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u0435",
56
+ link: "",
57
+ description: "\u041D\u043E\u0432\u044B\u0439 \u043C\u043E\u0434\u0443\u043B\u044C (\u0435\u0449\u0435 \u043D\u0435 \u0440\u0435\u0430\u043B\u0438\u0437\u043E\u0432\u0430\u043D)",
58
+ order: 3,
59
+ available: false
60
+ },
61
+ {
62
+ client_id: "sc",
63
+ app_name: "\u0426\u0435\u043D\u0442\u0440 \u0443\u0441\u0442\u0430\u043D\u043E\u0432\u043E\u043A",
64
+ link: "https://ladoga.sberanalytics.ru/sc/",
65
+ description: "\u0421\u0438\u0441\u0442\u0435\u043C\u043D\u044B\u0439 \u0431\u043B\u043E\u043A, \u043F\u043E\u0437\u0432\u043E\u043B\u044F\u0435\u0442 \u0443\u043F\u0440\u0430\u0432\u043B\u044F\u0442\u044C \u0430\u0440\u0445\u0438\u0442\u0435\u043A\u0442\u0443\u0440\u043E\u0439 \u0441\u0438\u0441\u0442\u0435\u043C\u044B",
66
+ order: 4,
67
+ available: true
68
+ },
69
+ {
70
+ client_id: "dwh_bridge",
71
+ app_name: "\u041C\u043E\u0441\u0442 \u0434\u0430\u043D\u043D\u044B\u0445",
72
+ link: "https://bridge-dwh.ladoga.sberanalytics.ru/",
73
+ description: "\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430 \u0434\u0430\u043D\u043D\u044B\u0445 \u0438\u0437 \u0440\u0430\u0437\u043B\u0438\u0447\u043D\u044B\u0445 \u0438\u0441\u0442\u043E\u0447\u043D\u0438\u043A\u043E\u0432",
74
+ order: 5,
75
+ available: true
76
+ },
77
+ {
78
+ client_id: "transformation",
79
+ app_name: "\u0422\u0440\u0430\u043D\u0441\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u044F",
80
+ link: "https://modeling-dwh.ladoga.sberanalytics.ru/",
81
+ description: "\u041C\u043E\u0434\u0435\u043B\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u0435 \u0438 \u0442\u0440\u0430\u043D\u0441\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u044F \u0434\u0430\u043D\u043D\u044B\u0445",
82
+ order: 6,
83
+ available: true
84
+ },
85
+ {
86
+ client_id: "table_manager",
87
+ app_name: "\u0422\u0430\u0431\u043B\u0438\u0447\u043D\u044B\u0439 \u043C\u0435\u043D\u0435\u0434\u0436\u0435\u0440",
88
+ link: "https://table-manager.ladoga.sberanalytics.ru/",
89
+ description: "\u0423\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435 \u0442\u0430\u0431\u043B\u0438\u0446\u0430\u043C\u0438 \u0434\u0430\u043D\u043D\u044B\u0445",
90
+ order: 7,
91
+ available: true
92
+ },
93
+ {
94
+ client_id: "metadata",
95
+ app_name: "\u041C\u0435\u0442\u0430\u0434\u0430\u043D\u043D\u044B\u0435",
96
+ link: "https://openmetadata.ladoga.sberanalytics.ru/",
97
+ description: "\u041C\u0435\u0442\u0430\u0434\u0430\u043D\u043D\u044B\u0435 \u0441\u0438\u0441\u0442\u0435\u043C\u044B",
98
+ order: 8,
99
+ available: true
100
+ },
101
+ {
102
+ client_id: "navigator",
103
+ app_name: "\u041D\u0430\u0432\u0438\u0433\u0430\u0442\u043E\u0440",
104
+ link: "https://navigator.ladoga.sberanalytics.ru/",
105
+ description: "\u041D\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u044F \u043F\u043E \u0434\u0430\u043D\u043D\u044B\u043C",
106
+ order: 9,
107
+ available: true
108
+ }
109
+ ];
110
+ }
111
+ });
112
+
113
+ // src/index.ts
114
+ var index_exports = {};
115
+ __export(index_exports, {
116
+ Layout: () => Layout_default,
117
+ MainMenuBase: () => MainMenuBase_default,
118
+ MainMenuFull: () => MainMenuFull_default,
119
+ PageLabel: () => PageLabel_default,
120
+ ScMainMenu: () => ScMainMenu_default,
121
+ UpperMenu: () => UpperMenu_default,
122
+ getCurrentTheme: () => getCurrentTheme,
123
+ useTheme: () => useTheme
124
+ });
125
+ module.exports = __toCommonJS(index_exports);
126
+
127
+ // src/components/Layout/Layout.tsx
128
+ var import_react2 = require("react");
129
+
130
+ // src/components/MainMenu/ScMainMenu.tsx
131
+ var import_react = require("react");
132
+
133
+ // src/assets/icons/index.tsx
134
+ var import_jsx_runtime = require("react/jsx-runtime");
135
+ var AppsGridIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
136
+ "svg",
137
+ {
138
+ viewBox: "0 0 20 20",
139
+ fill: "none",
140
+ xmlns: "http://www.w3.org/2000/svg",
141
+ ...props,
142
+ children: [
143
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
144
+ "rect",
145
+ {
146
+ x: 3,
147
+ y: 3,
148
+ width: 6,
149
+ height: 6,
150
+ rx: 1.5,
151
+ stroke: "currentColor",
152
+ strokeWidth: 1.5
153
+ }
154
+ ),
155
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
156
+ "rect",
157
+ {
158
+ x: 11,
159
+ y: 3,
160
+ width: 6,
161
+ height: 6,
162
+ rx: 1.5,
163
+ stroke: "currentColor",
164
+ strokeWidth: 1.5
165
+ }
166
+ ),
167
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
168
+ "rect",
169
+ {
170
+ x: 3,
171
+ y: 11,
172
+ width: 6,
173
+ height: 6,
174
+ rx: 1.5,
175
+ stroke: "currentColor",
176
+ strokeWidth: 1.5
177
+ }
178
+ ),
179
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
180
+ "rect",
181
+ {
182
+ x: 11,
183
+ y: 11,
184
+ width: 6,
185
+ height: 6,
186
+ rx: 1.5,
187
+ stroke: "currentColor",
188
+ strokeWidth: 1.5
189
+ }
190
+ )
191
+ ]
192
+ }
193
+ );
194
+ var UsersIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
195
+ "svg",
196
+ {
197
+ viewBox: "0 0 20 20",
198
+ fill: "none",
199
+ xmlns: "http://www.w3.org/2000/svg",
200
+ ...props,
201
+ children: [
202
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("g", { clipPath: "url(#clip0_users)", children: [
203
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
204
+ "path",
205
+ {
206
+ d: "M6.66701 10C8.27324 10 9.57535 8.6979 9.57535 7.09167C9.57535 5.48544 8.27324 4.18333 6.66701 4.18333C5.06079 4.18333 3.75868 5.48544 3.75868 7.09167C3.75868 8.6979 5.06079 10 6.66701 10Z",
207
+ stroke: "currentColor",
208
+ strokeWidth: 1.5,
209
+ strokeLinecap: "round",
210
+ strokeLinejoin: "round"
211
+ }
212
+ ),
213
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
214
+ "path",
215
+ {
216
+ d: "M14.1667 10C15.3173 10 16.25 9.06726 16.25 7.91667C16.25 6.76607 15.3173 5.83333 14.1667 5.83333C13.0161 5.83333 12.0833 6.76607 12.0833 7.91667C12.0833 9.06726 13.0161 10 14.1667 10Z",
217
+ stroke: "currentColor",
218
+ strokeWidth: 1.5,
219
+ strokeLinecap: "round",
220
+ strokeLinejoin: "round"
221
+ }
222
+ ),
223
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
224
+ "path",
225
+ {
226
+ d: "M1.66667 16.6667V15.8192C1.66667 13.9858 3.1525 12.5 4.98583 12.5H8.3475C10.1808 12.5 11.6667 13.9858 11.6667 15.8192V16.6667",
227
+ stroke: "currentColor",
228
+ strokeWidth: 1.5,
229
+ strokeLinecap: "round",
230
+ strokeLinejoin: "round"
231
+ }
232
+ ),
233
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
234
+ "path",
235
+ {
236
+ d: "M14.1667 12.5H15.085C16.9183 12.5 18.4042 13.9858 18.4042 15.8192V16.6667",
237
+ stroke: "currentColor",
238
+ strokeWidth: 1.5,
239
+ strokeLinecap: "round",
240
+ strokeLinejoin: "round"
241
+ }
242
+ )
243
+ ] }),
244
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("clipPath", { id: "clip0_users", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("rect", { width: 20, height: 20, fill: "white" }) }) })
245
+ ]
246
+ }
247
+ );
248
+ var DownloadsCenterIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
249
+ "svg",
250
+ {
251
+ viewBox: "0 0 20 20",
252
+ fill: "none",
253
+ xmlns: "http://www.w3.org/2000/svg",
254
+ ...props,
255
+ children: [
256
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
257
+ "path",
258
+ {
259
+ d: "M5.5,7h-3c-.8,0-1.5-.7-1.5-1.5v-3c0-.8.7-1.5,1.5-1.5h3c.8,0,1.5.7,1.5,1.5v3c0,.8-.7,1.5-1.5,1.5Z",
260
+ stroke: "currentColor",
261
+ strokeWidth: 1.5,
262
+ strokeLinecap: "round",
263
+ strokeLinejoin: "round",
264
+ fill: "none"
265
+ }
266
+ ),
267
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
268
+ "path",
269
+ {
270
+ d: "M17.5,7h-6c-.8,0-1.5-.7-1.5-1.5v-3c0-.8.7-1.5,1.5-1.5h6c.8,0,1.5.7,1.5,1.5v3c0,.8-.7,1.5-1.5,1.5Z",
271
+ stroke: "currentColor",
272
+ strokeWidth: 1.5,
273
+ strokeLinecap: "round",
274
+ strokeLinejoin: "round",
275
+ fill: "none"
276
+ }
277
+ ),
278
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
279
+ "path",
280
+ {
281
+ d: "M17.5,16h-3c-.8,0-1.5-.7-1.5-1.5v-3c0-.8.7-1.5,1.5-1.5h3c.8,0,1.5.7,1.5,1.5v3c0,.8-.7,1.5-1.5,1.5Z",
282
+ stroke: "currentColor",
283
+ strokeWidth: 1.5,
284
+ strokeLinecap: "round",
285
+ strokeLinejoin: "round",
286
+ fill: "none"
287
+ }
288
+ ),
289
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
290
+ "path",
291
+ {
292
+ d: "M8,19H3c-.5,0-1-.2-1.4-.6-.4-.4-.6-.9-.6-1.4v-4.6c0-.5.2-1,.6-1.4.4-.4.9-.6,1.4-.6h5c.5,0,1,.2,1.4.6.4.4.6.9.6,1.4v4.6c0,.5-.2,1-.6,1.4s-.9.6-1.4.6Z",
293
+ stroke: "currentColor",
294
+ strokeWidth: 1.5,
295
+ strokeLinecap: "round",
296
+ strokeLinejoin: "round",
297
+ fill: "none"
298
+ }
299
+ ),
300
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
301
+ "path",
302
+ {
303
+ d: "M6.9,14l-1.8,1.8-1.1-1.1",
304
+ stroke: "currentColor",
305
+ strokeWidth: 1.5,
306
+ strokeLinecap: "round",
307
+ strokeLinejoin: "round",
308
+ fill: "none"
309
+ }
310
+ )
311
+ ]
312
+ }
313
+ );
314
+ var NetworkSquaresIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
315
+ "svg",
316
+ {
317
+ viewBox: "0 0 20 20",
318
+ fill: "none",
319
+ xmlns: "http://www.w3.org/2000/svg",
320
+ ...props,
321
+ children: [
322
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
323
+ "path",
324
+ {
325
+ d: "M15 14.1667H16.6667C17.1267 14.1667 17.5 14.54 17.5 15V16.6667C17.5 17.1267 17.1267 17.5 16.6667 17.5H15C14.54 17.5 14.1667 17.1267 14.1667 16.6667V15C14.1667 14.54 14.54 14.1667 15 14.1667Z",
326
+ stroke: "currentColor",
327
+ strokeWidth: 1.5,
328
+ strokeLinecap: "round",
329
+ strokeLinejoin: "round"
330
+ }
331
+ ),
332
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
333
+ "path",
334
+ {
335
+ d: "M3.33333 2.5H5C5.46 2.5 5.83333 2.87333 5.83333 3.33333V5C5.83333 5.46 5.46 5.83333 5 5.83333H3.33333C2.87333 5.83333 2.5 5.46 2.5 5V3.33333C2.5 2.87333 2.87333 2.5 3.33333 2.5Z",
336
+ stroke: "currentColor",
337
+ strokeWidth: 1.5,
338
+ strokeLinecap: "round",
339
+ strokeLinejoin: "round"
340
+ }
341
+ ),
342
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
343
+ "path",
344
+ {
345
+ d: "M9.16667 8.33333H10.8333C11.2933 8.33333 11.6667 8.70667 11.6667 9.16667V10.8333C11.6667 11.2933 11.2933 11.6667 10.8333 11.6667H9.16667C8.70667 11.6667 8.33333 11.2933 8.33333 10.8333V9.16667C8.33333 8.70667 8.70667 8.33333 9.16667 8.33333Z",
346
+ stroke: "currentColor",
347
+ strokeWidth: 1.5,
348
+ strokeLinecap: "round",
349
+ strokeLinejoin: "round"
350
+ }
351
+ ),
352
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
353
+ "path",
354
+ {
355
+ d: "M9.16667 4.16667H15.8333C16.7542 4.16667 17.5 4.9125 17.5 5.83333V8.33333C17.5 9.25417 16.7542 10 15.8333 10H14.1667",
356
+ stroke: "currentColor",
357
+ strokeWidth: 1.5,
358
+ strokeLinecap: "round",
359
+ strokeLinejoin: "round"
360
+ }
361
+ ),
362
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
363
+ "path",
364
+ {
365
+ d: "M10.8333 15.8333H4.16667C3.24583 15.8333 2.5 15.0875 2.5 14.1667V11.6667C2.5 10.7458 3.24583 10 4.16667 10H5.83333",
366
+ stroke: "currentColor",
367
+ strokeWidth: 1.5,
368
+ strokeLinecap: "round",
369
+ strokeLinejoin: "round"
370
+ }
371
+ )
372
+ ]
373
+ }
374
+ );
375
+ var QuestionIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
376
+ "svg",
377
+ {
378
+ viewBox: "0 0 24 24",
379
+ fill: "none",
380
+ xmlns: "http://www.w3.org/2000/svg",
381
+ ...props,
382
+ children: [
383
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("circle", { cx: 12, cy: 12, r: 10, stroke: "currentColor", strokeWidth: 2 }),
384
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
385
+ "path",
386
+ {
387
+ d: "M9.09 9A3 3 0 0 1 14.92 10a3.12 3.12 0 0 1-1.5 2.06L12.5 13.5",
388
+ stroke: "currentColor",
389
+ strokeWidth: 2,
390
+ strokeLinecap: "round",
391
+ strokeLinejoin: "round"
392
+ }
393
+ ),
394
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
395
+ "path",
396
+ {
397
+ d: "M12 17h.01",
398
+ stroke: "currentColor",
399
+ strokeWidth: 2,
400
+ strokeLinecap: "round"
401
+ }
402
+ )
403
+ ]
404
+ }
405
+ );
406
+ var MoonIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
407
+ "svg",
408
+ {
409
+ viewBox: "0 0 24 24",
410
+ fill: "none",
411
+ xmlns: "http://www.w3.org/2000/svg",
412
+ ...props,
413
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
414
+ "path",
415
+ {
416
+ d: "M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",
417
+ stroke: "currentColor",
418
+ strokeWidth: 2,
419
+ strokeLinecap: "round",
420
+ strokeLinejoin: "round"
421
+ }
422
+ )
423
+ }
424
+ );
425
+ var MetadataIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
426
+ "svg",
427
+ {
428
+ viewBox: "0 0 20 20",
429
+ fill: "none",
430
+ xmlns: "http://www.w3.org/2000/svg",
431
+ ...props,
432
+ children: [
433
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
434
+ "path",
435
+ {
436
+ d: "M5,1h10c2.2,0,4,1.8,4,4v10c0,2.2-1.8,4-4,4H5c-2.2,0-4-1.8-4-4V5C1,2.8,2.8,1,5,1Z",
437
+ stroke: "currentColor",
438
+ strokeWidth: 1.5,
439
+ strokeLinecap: "round",
440
+ strokeLinejoin: "round",
441
+ fill: "none"
442
+ }
443
+ ),
444
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
445
+ "path",
446
+ {
447
+ d: "M10,10h5",
448
+ stroke: "currentColor",
449
+ strokeWidth: 1.5,
450
+ strokeLinecap: "round",
451
+ strokeLinejoin: "round",
452
+ fill: "none"
453
+ }
454
+ ),
455
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
456
+ "path",
457
+ {
458
+ d: "M13,5h2",
459
+ stroke: "currentColor",
460
+ strokeWidth: 1.5,
461
+ strokeLinecap: "round",
462
+ strokeLinejoin: "round",
463
+ fill: "none"
464
+ }
465
+ ),
466
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
467
+ "path",
468
+ {
469
+ d: "M5,5h5",
470
+ stroke: "currentColor",
471
+ strokeWidth: 1.5,
472
+ strokeLinecap: "round",
473
+ strokeLinejoin: "round",
474
+ fill: "none"
475
+ }
476
+ ),
477
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
478
+ "path",
479
+ {
480
+ d: "M5,10h2",
481
+ stroke: "currentColor",
482
+ strokeWidth: 1.5,
483
+ strokeLinecap: "round",
484
+ strokeLinejoin: "round",
485
+ fill: "none"
486
+ }
487
+ ),
488
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
489
+ "path",
490
+ {
491
+ d: "M5,15h5",
492
+ stroke: "currentColor",
493
+ strokeWidth: 1.5,
494
+ strokeLinecap: "round",
495
+ strokeLinejoin: "round",
496
+ fill: "none"
497
+ }
498
+ ),
499
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
500
+ "path",
501
+ {
502
+ d: "M13,15h2",
503
+ stroke: "currentColor",
504
+ strokeWidth: 1.5,
505
+ strokeLinecap: "round",
506
+ strokeLinejoin: "round",
507
+ fill: "none"
508
+ }
509
+ )
510
+ ]
511
+ }
512
+ );
513
+ var ChevronLeftIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
514
+ "svg",
515
+ {
516
+ viewBox: "0 0 16 16",
517
+ fill: "none",
518
+ xmlns: "http://www.w3.org/2000/svg",
519
+ ...props,
520
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
521
+ "path",
522
+ {
523
+ d: "M9.70711 11.7071C9.31658 12.0976 8.68342 12.0976 8.29289 11.7071L5.29289 8.70711C5.10536 8.51957 5 8.26522 5 8C5 7.73478 5.10536 7.48043 5.29289 7.29289L8.29289 4.29289C8.68342 3.90237 9.31658 3.90237 9.70711 4.29289C10.0976 4.68342 10.0976 5.31658 9.70711 5.70711L7.41421 8L9.70711 10.2929C10.0976 10.6834 10.0976 11.3166 9.70711 11.7071Z",
524
+ fill: "currentColor",
525
+ fillRule: "evenodd",
526
+ clipRule: "evenodd"
527
+ }
528
+ )
529
+ }
530
+ );
531
+ var SunIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
532
+ "svg",
533
+ {
534
+ viewBox: "0 0 16 16",
535
+ fill: "none",
536
+ xmlns: "http://www.w3.org/2000/svg",
537
+ ...props,
538
+ children: [
539
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("g", { clipPath: "url(#clip0_sun)", children: [
540
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
541
+ "path",
542
+ {
543
+ d: "M8 5C6.34315 5 5 6.34315 5 8C5 9.65685 6.34315 11 8 11C9.65685 11 11 9.65685 11 8C11 6.34315 9.65685 5 8 5ZM3 8C3 5.23858 5.23858 3 8 3C10.7614 3 13 5.23858 13 8C13 10.7614 10.7614 13 8 13C5.23858 13 3 10.7614 3 8Z",
544
+ fill: "currentColor",
545
+ fillRule: "evenodd",
546
+ clipRule: "evenodd"
547
+ }
548
+ ),
549
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
550
+ "path",
551
+ {
552
+ d: "M9 1C9 1.55228 8.55228 2 8 2C7.44772 2 7 1.55228 7 1C7 0.447715 7.44772 0 8 0C8.55228 0 9 0.447715 9 1Z",
553
+ fill: "currentColor"
554
+ }
555
+ ),
556
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
557
+ "path",
558
+ {
559
+ d: "M9 15C9 15.5523 8.55228 16 8 16C7.44772 16 7 15.5523 7 15C7 14.4477 7.44772 14 8 14C8.55228 14 9 14.4477 9 15Z",
560
+ fill: "currentColor"
561
+ }
562
+ ),
563
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
564
+ "path",
565
+ {
566
+ d: "M15 9C14.4477 9 14 8.55228 14 8C14 7.44772 14.4477 7 15 7C15.5523 7 16 7.44772 16 8C16 8.55228 15.5523 9 15 9Z",
567
+ fill: "currentColor"
568
+ }
569
+ ),
570
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
571
+ "path",
572
+ {
573
+ d: "M1 9C0.447715 9 -6.78525e-08 8.55228 -4.37114e-08 8C-1.95703e-08 7.44771 0.447715 7 1 7C1.55228 7 2 7.44771 2 8C2 8.55228 1.55228 9 1 9Z",
574
+ fill: "currentColor"
575
+ }
576
+ )
577
+ ] }),
578
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("clipPath", { id: "clip0_sun", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("rect", { width: 16, height: 16, fill: "white" }) }) })
579
+ ]
580
+ }
581
+ );
582
+ var TransformationIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
583
+ "svg",
584
+ {
585
+ viewBox: "0 0 18 20",
586
+ fill: "none",
587
+ xmlns: "http://www.w3.org/2000/svg",
588
+ ...props,
589
+ children: [
590
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
591
+ "path",
592
+ {
593
+ d: "M14.7509 4.8C15.8554 4.8 16.7509 3.89338 16.7509 2.775C16.7509 1.65662 15.8554 0.75 14.7509 0.75C13.6463 0.75 12.7509 1.65662 12.7509 2.775C12.7509 3.89338 13.6463 4.8 14.7509 4.8Z",
594
+ stroke: "currentColor",
595
+ strokeWidth: 1.5,
596
+ strokeLinecap: "round",
597
+ strokeLinejoin: "round"
598
+ }
599
+ ),
600
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
601
+ "path",
602
+ {
603
+ d: "M14.7509 11.7748C15.8554 11.7748 16.7509 10.8682 16.7509 9.74983C16.7509 8.63145 15.8554 7.72483 14.7509 7.72483C13.6463 7.72483 12.7509 8.63145 12.7509 9.74983C12.7509 10.8682 13.6463 11.7748 14.7509 11.7748Z",
604
+ stroke: "currentColor",
605
+ strokeWidth: 1.5,
606
+ strokeLinecap: "round",
607
+ strokeLinejoin: "round"
608
+ }
609
+ ),
610
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
611
+ "path",
612
+ {
613
+ d: "M2.75 11.775C3.85457 11.775 4.75 10.8684 4.75 9.75C4.75 8.63162 3.85457 7.725 2.75 7.725C1.64543 7.725 0.75 8.63162 0.75 9.75C0.75 10.8684 1.64543 11.775 2.75 11.775Z",
614
+ stroke: "currentColor",
615
+ strokeWidth: 1.5,
616
+ strokeLinecap: "round",
617
+ strokeLinejoin: "round"
618
+ }
619
+ ),
620
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
621
+ "path",
622
+ {
623
+ d: "M14.7509 18.7497C15.8554 18.7497 16.7509 17.843 16.7509 16.7247C16.7509 15.6063 15.8554 14.6997 14.7509 14.6997C13.6463 14.6997 12.7509 15.6063 12.7509 16.7247C12.7509 17.843 13.6463 18.7497 14.7509 18.7497Z",
624
+ stroke: "currentColor",
625
+ strokeWidth: 1.5,
626
+ strokeLinecap: "round",
627
+ strokeLinejoin: "round"
628
+ }
629
+ ),
630
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
631
+ "path",
632
+ {
633
+ d: "M12.7491 2.77474H10.5269C9.54469 2.77474 8.74913 3.58024 8.74913 4.57474V14.9247C8.74913 15.9192 9.54469 16.7247 10.5269 16.7247H12.7491",
634
+ stroke: "currentColor",
635
+ strokeWidth: 1.5,
636
+ strokeLinecap: "round",
637
+ strokeLinejoin: "round"
638
+ }
639
+ ),
640
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
641
+ "path",
642
+ {
643
+ d: "M12.7517 9.74957H4.75174",
644
+ stroke: "currentColor",
645
+ strokeWidth: 1.5,
646
+ strokeLinecap: "round",
647
+ strokeLinejoin: "round"
648
+ }
649
+ )
650
+ ]
651
+ }
652
+ );
653
+ var NavigatorIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
654
+ "svg",
655
+ {
656
+ viewBox: "0 0 24 23",
657
+ fill: "none",
658
+ xmlns: "http://www.w3.org/2000/svg",
659
+ ...props,
660
+ children: [
661
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
662
+ "path",
663
+ {
664
+ d: "M11.1498 2.53201C16.4179 2.53201 20.7123 6.77868 20.7123 11.9925C20.7123 17.2064 16.4214 21.4531 11.1498 21.4531C5.87828 21.4531 1.58736 17.2064 1.58736 11.9925C1.58736 6.77868 5.88179 2.53201 11.1498 2.53201ZM11.1498 1.31348C5.19061 1.31348 0.359375 6.09574 0.359375 11.9925C0.359375 17.8893 5.19236 22.6716 11.1498 22.6716C17.1073 22.6716 21.9403 17.8893 21.9403 11.9925C21.9403 6.09574 17.1091 1.31348 11.1498 1.31348Z",
665
+ fill: "currentColor"
666
+ }
667
+ ),
668
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
669
+ "path",
670
+ {
671
+ d: "M11.1495 12.804C11.6021 12.804 11.967 12.4435 11.967 11.9928C11.967 11.5422 11.6021 11.1816 11.1495 11.1816C10.6969 11.1816 10.332 11.5422 10.332 11.9928C10.332 12.4435 10.6969 12.804 11.1495 12.804Z",
672
+ fill: "currentColor"
673
+ }
674
+ ),
675
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
676
+ "path",
677
+ {
678
+ d: "M11.1494 4.24121C15.4736 4.24133 18.9824 7.71364 18.9824 11.9932C18.9822 16.2725 15.4769 19.744 11.1494 19.7441C6.82532 19.7441 3.31667 16.2777 3.31641 11.9932C3.31641 7.70836 6.82516 4.24121 11.1494 4.24121ZM15.251 15.2432C14.7984 15.2432 14.4336 15.6041 14.4336 16.0547C14.4338 16.5052 14.7985 16.8652 15.251 16.8652C15.7035 16.8652 16.0682 16.5052 16.0684 16.0547C16.0684 15.604 15.7036 15.2432 15.251 15.2432ZM15.4805 7.71582C15.3577 7.59475 15.1686 7.55346 15.0039 7.61914L13.9229 8.05762C12.3739 8.68333 10.9107 9.27638 9.45996 9.88477C9.18117 9.99924 9.01604 10.3148 8.94238 10.4863C8.35125 11.8833 7.76743 13.2874 7.14648 14.8057L6.73535 15.7969C6.67051 15.9598 6.70245 16.1455 6.83398 16.2686C6.91643 16.35 7.03075 16.3984 7.14648 16.3984C7.20429 16.3984 7.26247 16.3895 7.31152 16.3652L8.01855 16.0811C9.68312 15.4069 11.2441 14.7741 12.7842 14.1328C13.0051 14.0427 13.228 13.8159 13.3193 13.6045C13.9684 12.0618 14.6109 10.5185 15.2881 8.87012L15.5664 8.1875C15.6331 8.02459 15.6032 7.83955 15.4805 7.72168V7.71582ZM7.04395 7.12305C6.59139 7.1231 6.22656 7.48394 6.22656 7.93457C6.22674 8.38505 6.5915 8.74506 7.04395 8.74512C7.49644 8.74512 7.86115 8.38509 7.86133 7.93457C7.86133 7.4839 7.49654 7.12305 7.04395 7.12305Z",
679
+ fill: "currentColor"
680
+ }
681
+ )
682
+ ]
683
+ }
684
+ );
685
+ var TableManagerIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
686
+ "svg",
687
+ {
688
+ viewBox: "0 0 20 20",
689
+ fill: "none",
690
+ xmlns: "http://www.w3.org/2000/svg",
691
+ ...props,
692
+ children: [
693
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
694
+ "path",
695
+ {
696
+ d: "M0.75 3.71296V15.5648C0.75 16.3506 1.06217 17.1043 1.61783 17.6599C2.1735 18.2156 2.92714 18.5278 3.71296 18.5278H15.5648C16.3506 18.5278 17.1043 18.2156 17.6599 17.6599C18.2156 17.1043 18.5278 16.3506 18.5278 15.5648V3.71296C18.5278 2.92714 18.2156 2.1735 17.6599 1.61783C17.1043 1.06217 16.3506 0.75 15.5648 0.75H3.71296C2.92714 0.75 2.1735 1.06217 1.61783 1.61783C1.06217 2.1735 0.75 2.92714 0.75 3.71296Z",
697
+ stroke: "currentColor",
698
+ strokeWidth: 1.5,
699
+ strokeLinecap: "round",
700
+ strokeLinejoin: "round"
701
+ }
702
+ ),
703
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
704
+ "path",
705
+ {
706
+ d: "M12.6033 18.5273V6.7347",
707
+ stroke: "currentColor",
708
+ strokeWidth: 1.5,
709
+ strokeLinecap: "round",
710
+ strokeLinejoin: "round"
711
+ }
712
+ ),
713
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
714
+ "path",
715
+ {
716
+ d: "M18.5263 6.7347H8.64979C8.1259 6.7347 7.62348 6.94281 7.25303 7.31325C6.88259 7.6837 6.67448 8.18612 6.67448 8.71001V18.5273",
717
+ stroke: "currentColor",
718
+ strokeWidth: 1.5,
719
+ strokeLinecap: "round",
720
+ strokeLinejoin: "round"
721
+ }
722
+ ),
723
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
724
+ "path",
725
+ {
726
+ d: "M18.5263 12.6608H6.67448",
727
+ stroke: "currentColor",
728
+ strokeWidth: 1.5,
729
+ strokeLinecap: "round",
730
+ strokeLinejoin: "round"
731
+ }
732
+ )
733
+ ]
734
+ }
735
+ );
736
+
737
+ // src/components/MainMenu/MainMenuBase.tsx
738
+ var import_jsx_runtime2 = require("react/jsx-runtime");
739
+ var styles = {
740
+ root: "sc-main-menu",
741
+ layout_full: "sc-main-menu_layout_full",
742
+ layout_compact: "sc-main-menu_layout_compact",
743
+ root_theme_light: "sc-main-menu_theme_light",
744
+ root_theme_dark: "sc-main-menu_theme_dark",
745
+ left: "sc-main-menu__left",
746
+ systemLogo: "sc-main-menu__systemLogo",
747
+ center: "sc-main-menu__center",
748
+ right: "sc-main-menu__right",
749
+ divider: "sc-main-menu__divider",
750
+ appItem: "sc-main-menu__appItem",
751
+ appItem_active: "sc-main-menu__appItem_active",
752
+ appIcon: "sc-main-menu__appIcon",
753
+ toggleButton: "sc-main-menu__toggleButton",
754
+ toggleIcon: "sc-main-menu__toggleIcon",
755
+ toggleIconRotated: "sc-main-menu__toggleIconRotated",
756
+ toggleText: "sc-main-menu__toggleText",
757
+ appName: "sc-main-menu__appName"
758
+ };
759
+ var getThemeClassName = (theme) => theme === "dark" ? styles.root_theme_dark : styles.root_theme_light;
760
+ var MainMenuBase = ({
761
+ layout,
762
+ apps = [],
763
+ activeAppId,
764
+ onAppClick,
765
+ theme,
766
+ onThemeToggle,
767
+ systemTitle = "\u0426\u0435\u043D\u0442\u0440 \u0443\u0441\u0442\u0430\u043D\u043E\u0432\u043E\u043A",
768
+ systemLogoUrl,
769
+ rightSlot,
770
+ centerOverride,
771
+ className,
772
+ onLayoutToggle
773
+ }) => {
774
+ const rootClassName = [
775
+ styles.root,
776
+ styles[`layout_${layout}`],
777
+ getThemeClassName(theme),
778
+ className
779
+ ].filter(Boolean).join(" ");
780
+ const handleAppClick = (app) => {
781
+ if (onAppClick) {
782
+ onAppClick(app);
783
+ return;
784
+ }
785
+ if (app.href) {
786
+ window.location.href = app.href;
787
+ }
788
+ };
789
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("nav", { className: rootClassName, "aria-label": "\u0413\u043B\u0430\u0432\u043D\u043E\u0435 \u043C\u0435\u043D\u044E \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0439", children: [
790
+ systemLogoUrl && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: styles.left, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
791
+ "img",
792
+ {
793
+ src: systemLogoUrl,
794
+ alt: systemTitle,
795
+ className: styles.systemLogo
796
+ }
797
+ ) }),
798
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: styles.center, children: centerOverride ?? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_jsx_runtime2.Fragment, { children: apps.map((app) => {
799
+ const isActive = app.id === activeAppId;
800
+ const appClassName = [
801
+ styles.appItem,
802
+ isActive ? styles.appItem_active : ""
803
+ ].filter(Boolean).join(" ");
804
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
805
+ "button",
806
+ {
807
+ type: "button",
808
+ className: appClassName,
809
+ onClick: () => handleAppClick(app),
810
+ title: app.name,
811
+ children: [
812
+ app.iconNode ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: styles.appIcon, children: app.iconNode }) : app.iconUrl ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
813
+ "img",
814
+ {
815
+ src: app.iconUrl,
816
+ alt: app.name,
817
+ className: styles.appIcon
818
+ }
819
+ ) : null,
820
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: styles.appName, children: app.shortName ?? app.name })
821
+ ]
822
+ },
823
+ app.id + (app.href ?? "")
824
+ );
825
+ }) }) }),
826
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: styles.right, children: [
827
+ onThemeToggle && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
828
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
829
+ "button",
830
+ {
831
+ type: "button",
832
+ className: styles.appItem,
833
+ onClick: onThemeToggle,
834
+ title: "\u041F\u0435\u0440\u0435\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0442\u0435\u043C\u0443",
835
+ children: [
836
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: styles.appIcon, children: theme === "dark" ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(SunIcon, { width: 16, height: 16 }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(MoonIcon, { width: 16, height: 16 }) }),
837
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: styles.appName, children: theme === "dark" ? "\u0421\u0432\u0435\u0442\u043B\u0430\u044F \u0442\u0435\u043C\u0430" : "\u0422\u0435\u043C\u043D\u0430\u044F \u0442\u0435\u043C\u0430" })
838
+ ]
839
+ }
840
+ ),
841
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("hr", { className: styles.divider })
842
+ ] }),
843
+ rightSlot,
844
+ onLayoutToggle && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
845
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("hr", { className: styles.divider }),
846
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
847
+ "button",
848
+ {
849
+ type: "button",
850
+ className: styles.toggleButton,
851
+ onClick: onLayoutToggle,
852
+ title: layout === "compact" ? "\u0420\u0430\u0437\u0432\u0435\u0440\u043D\u0443\u0442\u044C \u043C\u0435\u043D\u044E" : "\u0421\u0432\u0435\u0440\u043D\u0443\u0442\u044C \u043C\u0435\u043D\u044E",
853
+ children: [
854
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
855
+ "span",
856
+ {
857
+ className: `${styles.toggleIcon} ${layout === "full" ? styles.toggleIconRotated : ""}`,
858
+ children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(ChevronLeftIcon, { width: 16, height: 16 })
859
+ }
860
+ ),
861
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: styles.toggleText, children: layout === "compact" ? "\u0420\u0430\u0437\u0432\u0435\u0440\u043D\u0443\u0442\u044C" : "\u0421\u0432\u0435\u0440\u043D\u0443\u0442\u044C" })
862
+ ]
863
+ }
864
+ )
865
+ ] })
866
+ ] })
867
+ ] });
868
+ };
869
+ var MainMenuBase_default = MainMenuBase;
870
+
871
+ // src/components/MainMenu/MainMenuFull.tsx
872
+ var import_jsx_runtime3 = require("react/jsx-runtime");
873
+ var MainMenuFull = ({
874
+ layout = "compact",
875
+ onLayoutToggle,
876
+ ...restProps
877
+ }) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
878
+ MainMenuBase_default,
879
+ {
880
+ ...restProps,
881
+ layout,
882
+ onLayoutToggle
883
+ }
884
+ );
885
+ var MainMenuFull_default = MainMenuFull;
886
+
887
+ // src/components/MainMenu/ScMainMenu.tsx
888
+ var import_jsx_runtime4 = require("react/jsx-runtime");
889
+ var defaultMockMenuData = null;
890
+ var loadDefaultMockMenuData = async () => {
891
+ if (defaultMockMenuData) {
892
+ return defaultMockMenuData;
893
+ }
894
+ try {
895
+ const module2 = await Promise.resolve().then(() => __toESM(require_singleMenuData(), 1));
896
+ const json = module2.default ?? [];
897
+ defaultMockMenuData = json;
898
+ return json;
899
+ } catch {
900
+ defaultMockMenuData = [];
901
+ return [];
902
+ }
903
+ };
904
+ var mapMenuItemsToApps = (items, iconResolver) => {
905
+ const filtered = items.filter((item) => item.available !== false).sort((a, b) => (a.order ?? 999) - (b.order ?? 999));
906
+ return filtered.map(
907
+ (item, index) => iconResolver ? iconResolver(item, index) : {
908
+ id: `${item.client_id}:${index}`,
909
+ name: item.app_name,
910
+ shortName: item.app_name,
911
+ href: item.link,
912
+ iconNode: resolveIconNode(item)
913
+ }
914
+ );
915
+ };
916
+ var appIconMap = {
917
+ dashboard: AppsGridIcon,
918
+ users: UsersIcon,
919
+ sc: DownloadsCenterIcon,
920
+ dwh_bridge: NetworkSquaresIcon,
921
+ transformation: TransformationIcon,
922
+ table_manager: TableManagerIcon,
923
+ metadata: MetadataIcon,
924
+ navigator: NavigatorIcon,
925
+ question: QuestionIcon
926
+ };
927
+ var resolveIconNode = (item) => {
928
+ const IconComponent = appIconMap[item.client_id] ?? AppsGridIcon;
929
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(IconComponent, { width: 20, height: 20 });
930
+ };
931
+ var buildMenuDataUrl = (baseUrl, menuId) => {
932
+ if (!baseUrl || !menuId) {
933
+ return void 0;
934
+ }
935
+ const normalizedBase = baseUrl.replace(/\/+$/, "");
936
+ const endpoint = "/idp/single-menu-data";
937
+ const baseWithEndpoint = normalizedBase.endsWith(endpoint) ? normalizedBase : `${normalizedBase}${endpoint}`;
938
+ return `${baseWithEndpoint}/${menuId}`;
939
+ };
940
+ var ScMainMenu = ({
941
+ apps,
942
+ dataUrl,
943
+ baseUrl,
944
+ menuId,
945
+ fetchOptions,
946
+ fetcher,
947
+ useMockData,
948
+ mockData,
949
+ onAppsLoaded,
950
+ onError,
951
+ iconResolver,
952
+ defaultLayout = "compact",
953
+ layout,
954
+ onLayoutChange,
955
+ defaultTheme = "light",
956
+ theme,
957
+ onThemeChange,
958
+ ...rest
959
+ }) => {
960
+ const resolvedDataUrl = dataUrl ?? buildMenuDataUrl(baseUrl, menuId);
961
+ const [internalApps, setInternalApps] = (0, import_react.useState)(apps ?? []);
962
+ const [internalLayout, setInternalLayout] = (0, import_react.useState)(
963
+ defaultLayout
964
+ );
965
+ const [internalTheme, setInternalTheme] = (0, import_react.useState)(defaultTheme);
966
+ const currentLayout = layout ?? internalLayout;
967
+ const currentTheme = theme ?? internalTheme;
968
+ (0, import_react.useEffect)(() => {
969
+ if (apps) {
970
+ setInternalApps(apps);
971
+ }
972
+ }, [apps]);
973
+ (0, import_react.useEffect)(() => {
974
+ let cancelled = false;
975
+ const load = async () => {
976
+ if (useMockData) {
977
+ const source = mockData && mockData.length > 0 ? mockData : await loadDefaultMockMenuData();
978
+ if (cancelled) {
979
+ return;
980
+ }
981
+ const mapped = mapMenuItemsToApps(source, iconResolver);
982
+ setInternalApps(mapped);
983
+ onAppsLoaded?.(mapped);
984
+ return;
985
+ }
986
+ if (!resolvedDataUrl) {
987
+ return;
988
+ }
989
+ const fetchFn = fetcher ?? fetch;
990
+ try {
991
+ const res = await fetchFn(resolvedDataUrl, {
992
+ headers: { accept: "*/*" },
993
+ ...fetchOptions
994
+ });
995
+ if (!res.ok) {
996
+ throw new Error(`HTTP ${res.status}`);
997
+ }
998
+ const data = await res.json();
999
+ if (cancelled) {
1000
+ return;
1001
+ }
1002
+ const mapped = mapMenuItemsToApps(data, iconResolver);
1003
+ setInternalApps(mapped);
1004
+ onAppsLoaded?.(mapped);
1005
+ } catch (error) {
1006
+ if (!cancelled) {
1007
+ setInternalApps([]);
1008
+ onError?.(error);
1009
+ }
1010
+ }
1011
+ };
1012
+ load();
1013
+ return () => {
1014
+ cancelled = true;
1015
+ };
1016
+ }, [
1017
+ resolvedDataUrl,
1018
+ fetcher,
1019
+ fetchOptions,
1020
+ iconResolver,
1021
+ onAppsLoaded,
1022
+ onError,
1023
+ useMockData,
1024
+ mockData
1025
+ ]);
1026
+ const toggleLayout = () => {
1027
+ const next = currentLayout === "compact" ? "full" : "compact";
1028
+ if (layout === void 0) {
1029
+ setInternalLayout(next);
1030
+ }
1031
+ onLayoutChange?.(next);
1032
+ };
1033
+ const toggleTheme = () => {
1034
+ const next = currentTheme === "light" ? "dark" : "light";
1035
+ if (theme === void 0) {
1036
+ setInternalTheme(next);
1037
+ }
1038
+ onThemeChange?.(next);
1039
+ };
1040
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1041
+ MainMenuFull_default,
1042
+ {
1043
+ ...rest,
1044
+ apps: apps ?? internalApps,
1045
+ layout: currentLayout,
1046
+ onLayoutToggle: toggleLayout,
1047
+ theme: currentTheme,
1048
+ onThemeToggle: toggleTheme
1049
+ }
1050
+ );
1051
+ };
1052
+ var ScMainMenu_default = ScMainMenu;
1053
+
1054
+ // src/components/Layout/Layout.tsx
1055
+ var import_jsx_runtime5 = require("react/jsx-runtime");
1056
+ var styles2 = {
1057
+ app: "sc-layout",
1058
+ theme_light: "sc-layout_theme_light",
1059
+ theme_dark: "sc-layout_theme_dark",
1060
+ menu_full: "sc-layout_menu_full",
1061
+ menu_compact: "sc-layout_menu_compact",
1062
+ main: "sc-layout__main"
1063
+ };
1064
+ var THEME_STORAGE_KEY = "tot-ui-kit-theme";
1065
+ var Layout = ({
1066
+ children,
1067
+ menuProps = {},
1068
+ initialMenuLayout = "compact",
1069
+ initialTheme = "light",
1070
+ pageBackgroundColor,
1071
+ contentBackgroundColor,
1072
+ menuBackgroundColor
1073
+ }) => {
1074
+ const [menuLayout, setMenuLayout] = (0, import_react2.useState)(
1075
+ initialMenuLayout
1076
+ );
1077
+ const [theme, setTheme] = (0, import_react2.useState)(() => {
1078
+ try {
1079
+ const saved = window.localStorage.getItem(THEME_STORAGE_KEY);
1080
+ if (saved === "light" || saved === "dark") {
1081
+ return saved;
1082
+ }
1083
+ } catch {
1084
+ }
1085
+ return initialTheme;
1086
+ });
1087
+ (0, import_react2.useEffect)(() => {
1088
+ const root = document.documentElement;
1089
+ root.setAttribute("data-theme", theme);
1090
+ root.classList.remove("triplex-theme-light", "triplex-theme-dark");
1091
+ root.classList.add(
1092
+ theme === "dark" ? "triplex-theme-dark" : "triplex-theme-light"
1093
+ );
1094
+ try {
1095
+ window.localStorage.setItem(THEME_STORAGE_KEY, theme);
1096
+ } catch {
1097
+ }
1098
+ }, [theme]);
1099
+ const sidebarWidth = menuLayout === "full" ? 220 : 48;
1100
+ const appClassName = [
1101
+ styles2.app,
1102
+ styles2[`theme_${theme}`],
1103
+ styles2[`menu_${menuLayout}`]
1104
+ ].filter(Boolean).join(" ");
1105
+ const handleLayoutChange = (next) => {
1106
+ setMenuLayout(next);
1107
+ menuProps.onLayoutChange?.(next);
1108
+ };
1109
+ const handleThemeChange = (next) => {
1110
+ setTheme(next);
1111
+ menuProps.onThemeChange?.(next);
1112
+ };
1113
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
1114
+ "div",
1115
+ {
1116
+ className: appClassName,
1117
+ style: {
1118
+ paddingLeft: `${sidebarWidth}px`,
1119
+ ...pageBackgroundColor ? { "--sc-page-bg": pageBackgroundColor } : {},
1120
+ ...contentBackgroundColor ? { "--sc-main-bg": contentBackgroundColor } : {},
1121
+ ...menuBackgroundColor ? { "--sc-menu-bg": menuBackgroundColor } : {}
1122
+ },
1123
+ children: [
1124
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1125
+ ScMainMenu_default,
1126
+ {
1127
+ ...menuProps,
1128
+ layout: menuLayout,
1129
+ theme,
1130
+ onLayoutChange: handleLayoutChange,
1131
+ onThemeChange: handleThemeChange
1132
+ }
1133
+ ),
1134
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("main", { className: styles2.main, children })
1135
+ ]
1136
+ }
1137
+ );
1138
+ };
1139
+ var Layout_default = Layout;
1140
+
1141
+ // src/components/PageLabel/PageLabel.tsx
1142
+ var import_triplex_next = require("@sberbusiness/triplex-next");
1143
+ var import_jsx_runtime6 = require("react/jsx-runtime");
1144
+ var PageLabel = ({ title, subtitle }) => {
1145
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { children: [
1146
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_triplex_next.Text, { size: import_triplex_next.ETextSize.B2, type: import_triplex_next.EFontType.PRIMARY, children: title }),
1147
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_triplex_next.Text, { size: import_triplex_next.ETextSize.B2, type: import_triplex_next.EFontType.SECONDARY, children: subtitle })
1148
+ ] });
1149
+ };
1150
+ var PageLabel_default = PageLabel;
1151
+
1152
+ // src/components/UpperMenu/UpperMenu.tsx
1153
+ var import_triplex_next2 = require("@sberbusiness/triplex-next");
1154
+ var import_jsx_runtime7 = require("react/jsx-runtime");
1155
+ var styles3 = {
1156
+ root: "sc-upper-menu",
1157
+ left: "sc-upper-menu__left",
1158
+ right: "sc-upper-menu__right",
1159
+ app: "sc-upper-menu__app"
1160
+ };
1161
+ var UpperMenu = ({
1162
+ title = "\u0421\u0431\u0435\u0440\u0410\u043D\u0430\u043B\u0438\u0442\u0438\u043A\u0430",
1163
+ subtitle = "\u0426\u0435\u043D\u0442\u0440 \u043F\u0440\u043E\u0433\u0440\u0430\u043C\u043C\u043D\u043E\u0433\u043E \u043E\u0431\u0435\u0441\u043F\u0435\u0447\u0435\u043D\u0438\u044F",
1164
+ rightSlot
1165
+ }) => {
1166
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: styles3.root, children: [
1167
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: styles3.left, children: [
1168
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_triplex_next2.Text, { size: import_triplex_next2.ETextSize.B2, type: import_triplex_next2.EFontType.PRIMARY, children: title }),
1169
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_triplex_next2.Text, { size: import_triplex_next2.ETextSize.B3, type: import_triplex_next2.EFontType.SECONDARY, children: subtitle })
1170
+ ] }),
1171
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: styles3.right, children: rightSlot ?? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_triplex_next2.Text, { size: import_triplex_next2.ETextSize.B3, type: import_triplex_next2.EFontType.SECONDARY, children: "\u041F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044C" }) })
1172
+ ] });
1173
+ };
1174
+ var UpperMenu_default = UpperMenu;
1175
+
1176
+ // src/theme.ts
1177
+ var import_react3 = require("react");
1178
+ var THEME_STORAGE_KEY2 = "tot-ui-kit-theme";
1179
+ function getCurrentTheme() {
1180
+ try {
1181
+ const saved = window.localStorage.getItem(THEME_STORAGE_KEY2);
1182
+ if (saved === "light" || saved === "dark") {
1183
+ return saved;
1184
+ }
1185
+ } catch {
1186
+ }
1187
+ return "light";
1188
+ }
1189
+ function useTheme() {
1190
+ const [theme, setTheme] = (0, import_react3.useState)(getCurrentTheme);
1191
+ (0, import_react3.useEffect)(() => {
1192
+ const handleStorageChange = (e) => {
1193
+ if (e.key === THEME_STORAGE_KEY2 && (e.newValue === "light" || e.newValue === "dark")) {
1194
+ setTheme(e.newValue);
1195
+ }
1196
+ };
1197
+ window.addEventListener("storage", handleStorageChange);
1198
+ const checkTheme = () => {
1199
+ const currentTheme = getCurrentTheme();
1200
+ if (currentTheme !== theme) {
1201
+ setTheme(currentTheme);
1202
+ }
1203
+ };
1204
+ const interval = setInterval(checkTheme, 100);
1205
+ return () => {
1206
+ window.removeEventListener("storage", handleStorageChange);
1207
+ clearInterval(interval);
1208
+ };
1209
+ }, [theme]);
1210
+ return theme;
1211
+ }
1212
+ // Annotate the CommonJS export names for ESM import in node:
1213
+ 0 && (module.exports = {
1214
+ Layout,
1215
+ MainMenuBase,
1216
+ MainMenuFull,
1217
+ PageLabel,
1218
+ ScMainMenu,
1219
+ UpperMenu,
1220
+ getCurrentTheme,
1221
+ useTheme
1222
+ });