fui-material 2.7.15 → 2.7.17
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/f-ui-kit.es.js +656 -399
- package/dist/f-ui-kit.es.js.map +1 -1
- package/dist/f-ui-kit.umd.js +2 -2
- package/dist/f-ui-kit.umd.js.map +1 -1
- package/dist/index.css +1 -1
- package/dist/types/function-elements/Notification/fNotification/fNotification.d.ts +11 -30
- package/dist/types/function-elements/Notification/fNotificationDelete/fNotificationDelete.d.ts +3 -3
- package/dist/types/function-elements/fAlert/fAlert.d.ts +6 -20
- package/dist/types/function-elements/fConfirm/fConfirm.d.ts +5 -21
- package/dist/types/function-elements/fPrompt/fPrompt.d.ts +5 -24
- package/dist/types/material/FPaper/FPaper.d.ts +14 -0
- package/package.json +1 -1
package/dist/f-ui-kit.es.js
CHANGED
|
@@ -7,32 +7,32 @@ import { renderToStaticMarkup } from "react-dom/server";
|
|
|
7
7
|
import { initializeModule as initializeModule$1, installFormatCode } from "allorion-exporting-html-to-xlsx";
|
|
8
8
|
import axios from "axios";
|
|
9
9
|
import { useQueryClient, useMutation, useQuery } from "@tanstack/react-query";
|
|
10
|
-
import './index.css';const btn = "
|
|
11
|
-
const disabled$4 = "
|
|
12
|
-
const
|
|
10
|
+
import './index.css';const btn = "_btn_1s0n3_1";
|
|
11
|
+
const disabled$4 = "_disabled_1s0n3_31";
|
|
12
|
+
const styles$A = {
|
|
13
13
|
btn,
|
|
14
14
|
disabled: disabled$4,
|
|
15
|
-
"btn-xs": "_btn-
|
|
16
|
-
"btn-sm": "_btn-
|
|
17
|
-
"btn-lg": "_btn-
|
|
18
|
-
"btn-primary": "_btn-
|
|
19
|
-
"btn-outline-primary": "_btn-outline-
|
|
20
|
-
"btn-secondary": "_btn-
|
|
21
|
-
"btn-outline-secondary": "_btn-outline-
|
|
22
|
-
"btn-success": "_btn-
|
|
23
|
-
"btn-outline-success": "_btn-outline-
|
|
24
|
-
"btn-danger": "_btn-
|
|
25
|
-
"btn-outline-danger": "_btn-outline-
|
|
26
|
-
"btn-warning": "_btn-
|
|
27
|
-
"btn-outline-warning": "_btn-outline-
|
|
28
|
-
"btn-info": "_btn-
|
|
29
|
-
"btn-outline-info": "_btn-outline-
|
|
30
|
-
"btn-light": "_btn-
|
|
31
|
-
"btn-outline-light": "_btn-outline-
|
|
32
|
-
"btn-dark": "_btn-
|
|
33
|
-
"btn-outline-dark": "_btn-outline-
|
|
34
|
-
"btn-link": "_btn-
|
|
35
|
-
"btn-outline-link": "_btn-outline-
|
|
15
|
+
"btn-xs": "_btn-xs_1s0n3_40",
|
|
16
|
+
"btn-sm": "_btn-sm_1s0n3_51",
|
|
17
|
+
"btn-lg": "_btn-lg_1s0n3_62",
|
|
18
|
+
"btn-primary": "_btn-primary_1s0n3_73",
|
|
19
|
+
"btn-outline-primary": "_btn-outline-primary_1s0n3_87",
|
|
20
|
+
"btn-secondary": "_btn-secondary_1s0n3_104",
|
|
21
|
+
"btn-outline-secondary": "_btn-outline-secondary_1s0n3_118",
|
|
22
|
+
"btn-success": "_btn-success_1s0n3_135",
|
|
23
|
+
"btn-outline-success": "_btn-outline-success_1s0n3_149",
|
|
24
|
+
"btn-danger": "_btn-danger_1s0n3_166",
|
|
25
|
+
"btn-outline-danger": "_btn-outline-danger_1s0n3_180",
|
|
26
|
+
"btn-warning": "_btn-warning_1s0n3_197",
|
|
27
|
+
"btn-outline-warning": "_btn-outline-warning_1s0n3_211",
|
|
28
|
+
"btn-info": "_btn-info_1s0n3_228",
|
|
29
|
+
"btn-outline-info": "_btn-outline-info_1s0n3_242",
|
|
30
|
+
"btn-light": "_btn-light_1s0n3_259",
|
|
31
|
+
"btn-outline-light": "_btn-outline-light_1s0n3_274",
|
|
32
|
+
"btn-dark": "_btn-dark_1s0n3_291",
|
|
33
|
+
"btn-outline-dark": "_btn-outline-dark_1s0n3_305",
|
|
34
|
+
"btn-link": "_btn-link_1s0n3_322",
|
|
35
|
+
"btn-outline-link": "_btn-outline-link_1s0n3_338"
|
|
36
36
|
};
|
|
37
37
|
const FButton = forwardRef(({
|
|
38
38
|
children,
|
|
@@ -55,9 +55,9 @@ const FButton = forwardRef(({
|
|
|
55
55
|
};
|
|
56
56
|
const variantClass = variant === "contained" ? `btn-${color}` : `btn-outline-${color}`;
|
|
57
57
|
const buttonClasses = [
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
58
|
+
styles$A["btn"],
|
|
59
|
+
styles$A[size],
|
|
60
|
+
styles$A[variantClass],
|
|
61
61
|
className
|
|
62
62
|
].filter(Boolean).join(" ");
|
|
63
63
|
return /* @__PURE__ */ jsx(
|
|
@@ -75,8 +75,8 @@ const FButton = forwardRef(({
|
|
|
75
75
|
});
|
|
76
76
|
FButton.displayName = "FButton";
|
|
77
77
|
const defaultStyles = {
|
|
78
|
-
"f-button-file": "_f-button-
|
|
79
|
-
"file-preview-list": "_file-preview-
|
|
78
|
+
"f-button-file": "_f-button-file_7ljnt_1",
|
|
79
|
+
"file-preview-list": "_file-preview-list_7ljnt_1"
|
|
80
80
|
};
|
|
81
81
|
const FTrashIcon = React.forwardRef(({
|
|
82
82
|
color = "primary",
|
|
@@ -120,15 +120,15 @@ const FTrashIcon = React.forwardRef(({
|
|
|
120
120
|
);
|
|
121
121
|
});
|
|
122
122
|
FTrashIcon.displayName = "FTrashIcon";
|
|
123
|
-
const progressBar = "
|
|
124
|
-
const completed = "
|
|
125
|
-
const progress = "
|
|
123
|
+
const progressBar = "_progressBar_1iwax_48";
|
|
124
|
+
const completed = "_completed_1iwax_60";
|
|
125
|
+
const progress = "_progress_1iwax_48";
|
|
126
126
|
const styles$z = {
|
|
127
|
-
"file-preview-card": "_file-preview-
|
|
128
|
-
"file-preview-info": "_file-preview-
|
|
129
|
-
"file-preview-name": "_file-preview-
|
|
130
|
-
"file-preview-size": "_file-preview-
|
|
131
|
-
"trash-icon": "_trash-
|
|
127
|
+
"file-preview-card": "_file-preview-card_1iwax_1",
|
|
128
|
+
"file-preview-info": "_file-preview-info_1iwax_22",
|
|
129
|
+
"file-preview-name": "_file-preview-name_1iwax_28",
|
|
130
|
+
"file-preview-size": "_file-preview-size_1iwax_36",
|
|
131
|
+
"trash-icon": "_trash-icon_1iwax_42",
|
|
132
132
|
progressBar,
|
|
133
133
|
completed,
|
|
134
134
|
progress
|
|
@@ -653,17 +653,19 @@ const FContainer = ({
|
|
|
653
653
|
}
|
|
654
654
|
);
|
|
655
655
|
};
|
|
656
|
-
const panel = "
|
|
656
|
+
const panel = "_panel_d74rg_1";
|
|
657
|
+
const compact = "_compact_d74rg_29";
|
|
657
658
|
const styles$u = {
|
|
658
659
|
panel,
|
|
659
|
-
"panel-default": "_panel-
|
|
660
|
-
"panel-heading": "_panel-
|
|
661
|
-
"panel-body": "_panel-
|
|
662
|
-
|
|
663
|
-
"panel-title": "_panel-
|
|
664
|
-
"
|
|
665
|
-
"panel-group
|
|
666
|
-
"
|
|
660
|
+
"panel-default": "_panel-default_d74rg_6",
|
|
661
|
+
"panel-heading": "_panel-heading_d74rg_12",
|
|
662
|
+
"panel-body": "_panel-body_d74rg_24",
|
|
663
|
+
compact,
|
|
664
|
+
"panel-title": "_panel-title_d74rg_40",
|
|
665
|
+
"portlet-body": "_portlet-body_d74rg_44",
|
|
666
|
+
"panel-group": "_panel-group_d74rg_45",
|
|
667
|
+
"panel-group-accordion": "_panel-group-accordion_d74rg_45",
|
|
668
|
+
"form-title": "_form-title_d74rg_46"
|
|
667
669
|
};
|
|
668
670
|
const FPaper = ({
|
|
669
671
|
label,
|
|
@@ -674,7 +676,8 @@ const FPaper = ({
|
|
|
674
676
|
id,
|
|
675
677
|
className,
|
|
676
678
|
onAnimationEnd,
|
|
677
|
-
animated
|
|
679
|
+
animated,
|
|
680
|
+
compact: compact2 = false
|
|
678
681
|
}) => {
|
|
679
682
|
useEffect(() => {
|
|
680
683
|
if (animated) {
|
|
@@ -687,7 +690,7 @@ const FPaper = ({
|
|
|
687
690
|
return /* @__PURE__ */ jsxs(
|
|
688
691
|
"div",
|
|
689
692
|
{
|
|
690
|
-
className: `${styles$u["panel"]} ${styles$u["panel-default"]} ${className || ""} ${animated ? `${styles$u[`animated-${animated.name}`]} ${animated.name}` : ""}`,
|
|
693
|
+
className: `${styles$u["panel"]} ${styles$u["panel-default"]} ${compact2 ? styles$u["compact"] : ""} ${className || ""} ${animated ? `${styles$u[`animated-${animated.name}`]} ${animated.name}` : ""}`,
|
|
691
694
|
style: st,
|
|
692
695
|
id,
|
|
693
696
|
onAnimationEnd,
|
|
@@ -712,26 +715,26 @@ const FPaper = ({
|
|
|
712
715
|
}
|
|
713
716
|
);
|
|
714
717
|
};
|
|
715
|
-
const bordered = "
|
|
716
|
-
const left$1 = "
|
|
717
|
-
const center = "
|
|
718
|
-
const right = "
|
|
718
|
+
const bordered = "_bordered_1blpv_18";
|
|
719
|
+
const left$1 = "_left_1blpv_40";
|
|
720
|
+
const center = "_center_1blpv_43";
|
|
721
|
+
const right = "_right_1blpv_46";
|
|
719
722
|
const styles$t = {
|
|
720
|
-
"f-table-component": "_f-table-
|
|
721
|
-
"f-table-component__table": "_f-table-
|
|
723
|
+
"f-table-component": "_f-table-component_1blpv_1",
|
|
724
|
+
"f-table-component__table": "_f-table-component__table_1blpv_7",
|
|
722
725
|
bordered,
|
|
723
|
-
"bordered-half": "_bordered-
|
|
724
|
-
"f-table-component__table_header": "_f-table-
|
|
725
|
-
"is-sticky": "_is-
|
|
726
|
-
"f-table-component__table_header-cell": "_f-table-component__table_header-
|
|
726
|
+
"bordered-half": "_bordered-half_1blpv_22",
|
|
727
|
+
"f-table-component__table_header": "_f-table-component__table_header_1blpv_25",
|
|
728
|
+
"is-sticky": "_is-sticky_1blpv_29",
|
|
729
|
+
"f-table-component__table_header-cell": "_f-table-component__table_header-cell_1blpv_37",
|
|
727
730
|
left: left$1,
|
|
728
731
|
center,
|
|
729
732
|
right,
|
|
730
|
-
"f-table-component__table_body": "_f-table-
|
|
731
|
-
"f-table-component__table_row": "_f-table-
|
|
732
|
-
"f-table-component__table_row_no-hover": "_f-table-component__table_row_no-
|
|
733
|
-
"f-table-component__table_body-cell": "_f-table-component__table_body-
|
|
734
|
-
"f-table-component__table_footer": "_f-table-
|
|
733
|
+
"f-table-component__table_body": "_f-table-component__table_body_1blpv_65",
|
|
734
|
+
"f-table-component__table_row": "_f-table-component__table_row_1blpv_68",
|
|
735
|
+
"f-table-component__table_row_no-hover": "_f-table-component__table_row_no-hover_1blpv_68",
|
|
736
|
+
"f-table-component__table_body-cell": "_f-table-component__table_body-cell_1blpv_81",
|
|
737
|
+
"f-table-component__table_footer": "_f-table-component__table_footer_1blpv_97"
|
|
735
738
|
};
|
|
736
739
|
const FTableHead = ({
|
|
737
740
|
st,
|
|
@@ -1018,20 +1021,20 @@ const FTableFooter = ({
|
|
|
1018
1021
|
}
|
|
1019
1022
|
);
|
|
1020
1023
|
};
|
|
1021
|
-
const entering = "
|
|
1022
|
-
const exiting = "
|
|
1023
|
-
const hide = "
|
|
1024
|
+
const entering = "_entering_wcyn4_19";
|
|
1025
|
+
const exiting = "_exiting_wcyn4_25";
|
|
1026
|
+
const hide = "_hide_wcyn4_50";
|
|
1024
1027
|
const styles$s = {
|
|
1025
|
-
"f-dialog": "_f-
|
|
1028
|
+
"f-dialog": "_f-dialog_wcyn4_1",
|
|
1026
1029
|
entering,
|
|
1027
|
-
"f-dialog__content": "_f-
|
|
1030
|
+
"f-dialog__content": "_f-dialog__content_wcyn4_22",
|
|
1028
1031
|
exiting,
|
|
1029
1032
|
hide,
|
|
1030
|
-
"f-dialog__header": "_f-
|
|
1031
|
-
"f-dialog__header_title": "_f-
|
|
1032
|
-
"f-dialog__header_close": "_f-
|
|
1033
|
-
"f-dialog__body": "_f-
|
|
1034
|
-
"f-dialog__footer": "_f-
|
|
1033
|
+
"f-dialog__header": "_f-dialog__header_wcyn4_61",
|
|
1034
|
+
"f-dialog__header_title": "_f-dialog__header_title_wcyn4_73",
|
|
1035
|
+
"f-dialog__header_close": "_f-dialog__header_close_wcyn4_84",
|
|
1036
|
+
"f-dialog__body": "_f-dialog__body_wcyn4_110",
|
|
1037
|
+
"f-dialog__footer": "_f-dialog__footer_wcyn4_134"
|
|
1035
1038
|
};
|
|
1036
1039
|
let openDialogsCount = 0;
|
|
1037
1040
|
const FDialog = ({
|
|
@@ -1161,14 +1164,22 @@ FCloseIcon.displayName = "FCloseIcon";
|
|
|
1161
1164
|
const FDialogHeader = ({ title: title2, handleClose }) => {
|
|
1162
1165
|
return /* @__PURE__ */ jsxs("div", { className: styles$s["f-dialog__header"], children: [
|
|
1163
1166
|
/* @__PURE__ */ jsx("h3", { className: styles$s["f-dialog__header_title"], children: title2 }),
|
|
1164
|
-
handleClose && /* @__PURE__ */ jsx(
|
|
1165
|
-
|
|
1167
|
+
handleClose && /* @__PURE__ */ jsx(
|
|
1168
|
+
"button",
|
|
1166
1169
|
{
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
+
type: "button",
|
|
1171
|
+
className: styles$s["f-dialog__header_close"],
|
|
1172
|
+
onClick: handleClose,
|
|
1173
|
+
"aria-label": "Закрыть диалог",
|
|
1174
|
+
children: /* @__PURE__ */ jsx(
|
|
1175
|
+
FCloseIcon,
|
|
1176
|
+
{
|
|
1177
|
+
color: "secondary",
|
|
1178
|
+
size: 18
|
|
1179
|
+
}
|
|
1180
|
+
)
|
|
1170
1181
|
}
|
|
1171
|
-
)
|
|
1182
|
+
)
|
|
1172
1183
|
] });
|
|
1173
1184
|
};
|
|
1174
1185
|
const FDialogBody = ({ st, children, scroll = true }) => {
|
|
@@ -1189,26 +1200,26 @@ const FDialogFooter = ({ children, className, st, id }) => {
|
|
|
1189
1200
|
}
|
|
1190
1201
|
);
|
|
1191
1202
|
};
|
|
1192
|
-
const loader = "
|
|
1193
|
-
const primary = "
|
|
1194
|
-
const secondary = "
|
|
1195
|
-
const success$
|
|
1196
|
-
const danger = "
|
|
1197
|
-
const warning$
|
|
1198
|
-
const info$
|
|
1199
|
-
const light = "
|
|
1200
|
-
const dark = "
|
|
1201
|
-
const link = "
|
|
1203
|
+
const loader = "_loader_1glrn_1";
|
|
1204
|
+
const primary = "_primary_1glrn_42";
|
|
1205
|
+
const secondary = "_secondary_1glrn_46";
|
|
1206
|
+
const success$2 = "_success_1glrn_50";
|
|
1207
|
+
const danger = "_danger_1glrn_54";
|
|
1208
|
+
const warning$5 = "_warning_1glrn_58";
|
|
1209
|
+
const info$3 = "_info_1glrn_62";
|
|
1210
|
+
const light = "_light_1glrn_66";
|
|
1211
|
+
const dark = "_dark_1glrn_70";
|
|
1212
|
+
const link = "_link_1glrn_74";
|
|
1202
1213
|
const styles$r = {
|
|
1203
|
-
"authorization-spinner": "_authorization-
|
|
1204
|
-
"spinner-item": "_spinner-
|
|
1214
|
+
"authorization-spinner": "_authorization-spinner_1glrn_1",
|
|
1215
|
+
"spinner-item": "_spinner-item_1glrn_7",
|
|
1205
1216
|
loader,
|
|
1206
1217
|
primary,
|
|
1207
1218
|
secondary,
|
|
1208
|
-
success: success$
|
|
1219
|
+
success: success$2,
|
|
1209
1220
|
danger,
|
|
1210
|
-
warning: warning$
|
|
1211
|
-
info: info$
|
|
1221
|
+
warning: warning$5,
|
|
1222
|
+
info: info$3,
|
|
1212
1223
|
light,
|
|
1213
1224
|
dark,
|
|
1214
1225
|
link
|
|
@@ -1258,7 +1269,7 @@ const FPreloader = ({
|
|
|
1258
1269
|
);
|
|
1259
1270
|
};
|
|
1260
1271
|
const styles$p = {
|
|
1261
|
-
"f-checkbox": "_f-
|
|
1272
|
+
"f-checkbox": "_f-checkbox_1j5ck_1"
|
|
1262
1273
|
};
|
|
1263
1274
|
const FCheckbox = forwardRef(
|
|
1264
1275
|
({
|
|
@@ -1281,7 +1292,7 @@ const FCheckbox = forwardRef(
|
|
|
1281
1292
|
}
|
|
1282
1293
|
);
|
|
1283
1294
|
const styles$o = {
|
|
1284
|
-
"f-radio": "_f-
|
|
1295
|
+
"f-radio": "_f-radio_1oidm_1"
|
|
1285
1296
|
};
|
|
1286
1297
|
const FRadioButton = forwardRef(
|
|
1287
1298
|
({
|
|
@@ -1350,14 +1361,14 @@ const usePagination = ({
|
|
|
1350
1361
|
}, [totalCount, pageSize, siblingCount, currentPage]);
|
|
1351
1362
|
return paginationRange;
|
|
1352
1363
|
};
|
|
1353
|
-
const dots = "
|
|
1354
|
-
const selected$1 = "
|
|
1355
|
-
const disabled$3 = "
|
|
1356
|
-
const arrow = "
|
|
1357
|
-
const left = "
|
|
1364
|
+
const dots = "_dots_uiqea_29";
|
|
1365
|
+
const selected$1 = "_selected_uiqea_33";
|
|
1366
|
+
const disabled$3 = "_disabled_uiqea_37";
|
|
1367
|
+
const arrow = "_arrow_uiqea_43";
|
|
1368
|
+
const left = "_left_uiqea_56";
|
|
1358
1369
|
const styles$n = {
|
|
1359
|
-
"pagination-container": "_pagination-
|
|
1360
|
-
"pagination-item": "_pagination-
|
|
1370
|
+
"pagination-container": "_pagination-container_uiqea_1",
|
|
1371
|
+
"pagination-item": "_pagination-item_uiqea_9",
|
|
1361
1372
|
dots,
|
|
1362
1373
|
selected: selected$1,
|
|
1363
1374
|
disabled: disabled$3,
|
|
@@ -1670,16 +1681,16 @@ const FOpenImgFull = ({
|
|
|
1670
1681
|
}
|
|
1671
1682
|
);
|
|
1672
1683
|
};
|
|
1673
|
-
const card$2 = "
|
|
1674
|
-
const warning$
|
|
1675
|
-
const info$
|
|
1676
|
-
const alert = "
|
|
1684
|
+
const card$2 = "_card_1wjhl_1";
|
|
1685
|
+
const warning$4 = "_warning_1wjhl_16";
|
|
1686
|
+
const info$2 = "_info_1wjhl_24";
|
|
1687
|
+
const alert = "_alert_1wjhl_32";
|
|
1677
1688
|
const styles$k = {
|
|
1678
1689
|
card: card$2,
|
|
1679
|
-
warning: warning$
|
|
1680
|
-
info: info$
|
|
1690
|
+
warning: warning$4,
|
|
1691
|
+
info: info$2,
|
|
1681
1692
|
alert,
|
|
1682
|
-
"fv-accord-title": "_fv-accord-
|
|
1693
|
+
"fv-accord-title": "_fv-accord-title_1wjhl_57"
|
|
1683
1694
|
};
|
|
1684
1695
|
const FAccordion = ({
|
|
1685
1696
|
variant = "info",
|
|
@@ -1719,14 +1730,14 @@ const FAccordion = ({
|
|
|
1719
1730
|
}
|
|
1720
1731
|
);
|
|
1721
1732
|
};
|
|
1722
|
-
const container$1 = "
|
|
1733
|
+
const container$1 = "_container_qk7bc_1";
|
|
1723
1734
|
const styles$j = {
|
|
1724
1735
|
container: container$1,
|
|
1725
|
-
"custom-file": "_custom-
|
|
1726
|
-
"custom-file-input": "_custom-file-
|
|
1727
|
-
"custom-file-dropzone": "_custom-file-
|
|
1728
|
-
"custom-file-label": "_custom-file-
|
|
1729
|
-
"custom-files-preview": "_custom-files-
|
|
1736
|
+
"custom-file": "_custom-file_qk7bc_6",
|
|
1737
|
+
"custom-file-input": "_custom-file-input_qk7bc_9",
|
|
1738
|
+
"custom-file-dropzone": "_custom-file-dropzone_qk7bc_24",
|
|
1739
|
+
"custom-file-label": "_custom-file-label_qk7bc_24",
|
|
1740
|
+
"custom-files-preview": "_custom-files-preview_qk7bc_71"
|
|
1730
1741
|
};
|
|
1731
1742
|
const FInputFileForm = ({
|
|
1732
1743
|
id,
|
|
@@ -2065,15 +2076,15 @@ const FFullDateField = forwardRef(
|
|
|
2065
2076
|
);
|
|
2066
2077
|
}
|
|
2067
2078
|
);
|
|
2068
|
-
const active$3 = "
|
|
2079
|
+
const active$3 = "_active_1h0yy_41";
|
|
2069
2080
|
const styles$h = {
|
|
2070
|
-
"f-select-search-db": "_f-select-search-
|
|
2071
|
-
"f-select-search-db__input": "_f-select-search-
|
|
2072
|
-
"f-select-search-db__input_field": "_f-select-search-
|
|
2073
|
-
"f-select-search-db__input_arrow": "_f-select-search-
|
|
2074
|
-
"f-select-search-db__dropdown": "_f-select-search-
|
|
2081
|
+
"f-select-search-db": "_f-select-search-db_1h0yy_1",
|
|
2082
|
+
"f-select-search-db__input": "_f-select-search-db__input_1h0yy_7",
|
|
2083
|
+
"f-select-search-db__input_field": "_f-select-search-db__input_field_1h0yy_11",
|
|
2084
|
+
"f-select-search-db__input_arrow": "_f-select-search-db__input_arrow_1h0yy_14",
|
|
2085
|
+
"f-select-search-db__dropdown": "_f-select-search-db__dropdown_1h0yy_21",
|
|
2075
2086
|
active: active$3,
|
|
2076
|
-
"f-select-search-db__dropdown_content": "_f-select-search-
|
|
2087
|
+
"f-select-search-db__dropdown_content": "_f-select-search-db__dropdown_content_1h0yy_45"
|
|
2077
2088
|
};
|
|
2078
2089
|
const FSelectSearchDb = ({
|
|
2079
2090
|
fetchingFunc,
|
|
@@ -2424,8 +2435,8 @@ const FAlert = ({
|
|
|
2424
2435
|
buttonClose = false,
|
|
2425
2436
|
size
|
|
2426
2437
|
}) => {
|
|
2427
|
-
const
|
|
2428
|
-
const
|
|
2438
|
+
const visible2 = useRef();
|
|
2439
|
+
const hidden2 = useRef();
|
|
2429
2440
|
const close = useRef();
|
|
2430
2441
|
const [randomId] = useState(fGenerateUniqueId());
|
|
2431
2442
|
let newTime = displayTime;
|
|
@@ -2443,7 +2454,7 @@ const FAlert = ({
|
|
|
2443
2454
|
});
|
|
2444
2455
|
}
|
|
2445
2456
|
}
|
|
2446
|
-
|
|
2457
|
+
visible2.current = setTimeout(() => {
|
|
2447
2458
|
if (open) {
|
|
2448
2459
|
const el = document.querySelector(`#f-block-alert-${randomId}`);
|
|
2449
2460
|
if (el !== null) {
|
|
@@ -2458,7 +2469,7 @@ const FAlert = ({
|
|
|
2458
2469
|
const el = document.querySelector(`#f-block-alert-${randomId}`);
|
|
2459
2470
|
if (el !== null) {
|
|
2460
2471
|
progress2.style.transition = `${newTime}s linear`;
|
|
2461
|
-
|
|
2472
|
+
hidden2.current = setTimeout(() => {
|
|
2462
2473
|
el.classList.remove("f-alert-visible");
|
|
2463
2474
|
el.classList.add("f-alert-hidden");
|
|
2464
2475
|
}, (newTime - 1) * 1e3);
|
|
@@ -2613,8 +2624,8 @@ const FAlert = ({
|
|
|
2613
2624
|
onClose(false);
|
|
2614
2625
|
el.classList.remove("f-alert-visible");
|
|
2615
2626
|
el.classList.remove("f-alert-hidden");
|
|
2616
|
-
clearTimeout(
|
|
2617
|
-
clearTimeout(
|
|
2627
|
+
clearTimeout(visible2.current);
|
|
2628
|
+
clearTimeout(hidden2.current);
|
|
2618
2629
|
clearTimeout(close.current);
|
|
2619
2630
|
}
|
|
2620
2631
|
}
|
|
@@ -2704,14 +2715,14 @@ const FNative = ({
|
|
|
2704
2715
|
)
|
|
2705
2716
|
] });
|
|
2706
2717
|
};
|
|
2707
|
-
const horizontal = "
|
|
2708
|
-
const vertical = "
|
|
2709
|
-
const active$2 = "
|
|
2718
|
+
const horizontal = "_horizontal_hbjfv_1";
|
|
2719
|
+
const vertical = "_vertical_hbjfv_7";
|
|
2720
|
+
const active$2 = "_active_hbjfv_50";
|
|
2710
2721
|
const styles$f = {
|
|
2711
|
-
"f-tabs": "_f-
|
|
2722
|
+
"f-tabs": "_f-tabs_hbjfv_1",
|
|
2712
2723
|
horizontal,
|
|
2713
2724
|
vertical,
|
|
2714
|
-
"f-tabs__tab": "_f-
|
|
2725
|
+
"f-tabs__tab": "_f-tabs__tab_hbjfv_16",
|
|
2715
2726
|
active: active$2
|
|
2716
2727
|
};
|
|
2717
2728
|
const FTabs = ({
|
|
@@ -2854,12 +2865,12 @@ const FDropdownItem = ({
|
|
|
2854
2865
|
);
|
|
2855
2866
|
};
|
|
2856
2867
|
const styles$d = {
|
|
2857
|
-
"f-search-box": "_f-search-
|
|
2858
|
-
"f-search-box__input": "_f-search-
|
|
2859
|
-
"f-search-box__button": "_f-search-
|
|
2860
|
-
"f-search-box__button_search": "_f-search-
|
|
2861
|
-
"clear-on": "_clear-
|
|
2862
|
-
"f-search-box__button_clear": "_f-search-
|
|
2868
|
+
"f-search-box": "_f-search-box_1yju1_1",
|
|
2869
|
+
"f-search-box__input": "_f-search-box__input_1yju1_6",
|
|
2870
|
+
"f-search-box__button": "_f-search-box__button_1yju1_12",
|
|
2871
|
+
"f-search-box__button_search": "_f-search-box__button_search_1yju1_18",
|
|
2872
|
+
"clear-on": "_clear-on_1yju1_22",
|
|
2873
|
+
"f-search-box__button_clear": "_f-search-box__button_clear_1yju1_25"
|
|
2863
2874
|
};
|
|
2864
2875
|
const FSearchBox = forwardRef(
|
|
2865
2876
|
({
|
|
@@ -2900,7 +2911,7 @@ const FSearchBox = forwardRef(
|
|
|
2900
2911
|
/* @__PURE__ */ jsx(
|
|
2901
2912
|
FButton,
|
|
2902
2913
|
{
|
|
2903
|
-
className: `${styles$d["f-search-box__button_search"]} ${clearDataFromInput ? styles$d["clear-on"] : ""}`,
|
|
2914
|
+
className: `${styles$d["f-search-box__button_search"]} ${clearDataFromInput ? styles$d["clear-on"] : ""} f-search-box__button_search-st`,
|
|
2904
2915
|
type: "button",
|
|
2905
2916
|
disabled: disabled2,
|
|
2906
2917
|
onClick: onClickButton,
|
|
@@ -2912,7 +2923,7 @@ const FSearchBox = forwardRef(
|
|
|
2912
2923
|
clearDataFromInput && /* @__PURE__ */ jsx(
|
|
2913
2924
|
FButton,
|
|
2914
2925
|
{
|
|
2915
|
-
className: `${styles$d["f-search-box__button_clear"]}`,
|
|
2926
|
+
className: `${styles$d["f-search-box__button_clear"]} f-search-box__button_clear-st`,
|
|
2916
2927
|
type: "button",
|
|
2917
2928
|
disabled: disabled2,
|
|
2918
2929
|
onClick: clearDataFromInput,
|
|
@@ -3078,9 +3089,9 @@ const FCarouselItem = ({
|
|
|
3078
3089
|
}) => {
|
|
3079
3090
|
return /* @__PURE__ */ jsx("div", { className: `${styles$c["f-carousel-item"]} ${className || ""}`, id, children });
|
|
3080
3091
|
};
|
|
3081
|
-
const skeleton = "
|
|
3092
|
+
const skeleton = "_skeleton_3ica6_1";
|
|
3082
3093
|
const styles$b = {
|
|
3083
|
-
"skeleton-block": "_skeleton-
|
|
3094
|
+
"skeleton-block": "_skeleton-block_3ica6_1",
|
|
3084
3095
|
skeleton
|
|
3085
3096
|
};
|
|
3086
3097
|
const FSkeleton = ({ children, enable, width, height }) => {
|
|
@@ -4568,161 +4579,301 @@ const FArrowDownCircleIcon = React.forwardRef(({
|
|
|
4568
4579
|
);
|
|
4569
4580
|
});
|
|
4570
4581
|
FArrowDownCircleIcon.displayName = "FArrowDownCircleIcon";
|
|
4582
|
+
const visible$2 = "_visible_1ryqy_19";
|
|
4583
|
+
const hidden$2 = "_hidden_1ryqy_22";
|
|
4584
|
+
const info$1 = "_info_1ryqy_71";
|
|
4585
|
+
const success$1 = "_success_1ryqy_79";
|
|
4586
|
+
const warning$3 = "_warning_1ryqy_83";
|
|
4587
|
+
const error$1 = "_error_1ryqy_75";
|
|
4571
4588
|
const styles$5 = {
|
|
4572
|
-
"f-function-block-alert": "_f-function-block-
|
|
4573
|
-
|
|
4574
|
-
|
|
4575
|
-
"
|
|
4576
|
-
"
|
|
4577
|
-
"
|
|
4578
|
-
"
|
|
4579
|
-
"
|
|
4580
|
-
"
|
|
4581
|
-
"
|
|
4582
|
-
"f-function-alert-
|
|
4589
|
+
"f-function-block-alert": "_f-function-block-alert_1ryqy_1",
|
|
4590
|
+
visible: visible$2,
|
|
4591
|
+
hidden: hidden$2,
|
|
4592
|
+
"f-function-alert": "_f-function-alert_1ryqy_27",
|
|
4593
|
+
"f-function-alert-top": "_f-function-alert-top_1ryqy_51",
|
|
4594
|
+
"f-function-alert-ico": "_f-function-alert-ico_1ryqy_57",
|
|
4595
|
+
"info-alert": "_info-alert_1ryqy_71",
|
|
4596
|
+
"error-alert": "_error-alert_1ryqy_75",
|
|
4597
|
+
"success-alert": "_success-alert_1ryqy_79",
|
|
4598
|
+
"warning-alert": "_warning-alert_1ryqy_83",
|
|
4599
|
+
"f-function-alert-inside": "_f-function-alert-inside_1ryqy_87",
|
|
4600
|
+
"f-function-alert-header": "_f-function-alert-header_1ryqy_94",
|
|
4601
|
+
"f-function-alert-body": "_f-function-alert-body_1ryqy_112",
|
|
4602
|
+
"f-function-alert-footer": "_f-function-alert-footer_1ryqy_128",
|
|
4603
|
+
"btn-action": "_btn-action_1ryqy_135",
|
|
4604
|
+
info: info$1,
|
|
4605
|
+
success: success$1,
|
|
4606
|
+
warning: warning$3,
|
|
4607
|
+
error: error$1,
|
|
4608
|
+
"close-btn": "_close-btn_1ryqy_197"
|
|
4583
4609
|
};
|
|
4584
4610
|
const fAlert = ({ title: title2, body, variant = "info" }) => {
|
|
4585
|
-
|
|
4586
|
-
|
|
4587
|
-
|
|
4588
|
-
|
|
4589
|
-
|
|
4590
|
-
|
|
4591
|
-
|
|
4592
|
-
|
|
4593
|
-
|
|
4594
|
-
|
|
4595
|
-
|
|
4596
|
-
|
|
4597
|
-
|
|
4598
|
-
|
|
4599
|
-
|
|
4600
|
-
|
|
4601
|
-
|
|
4602
|
-
|
|
4603
|
-
|
|
4604
|
-
|
|
4605
|
-
|
|
4606
|
-
|
|
4607
|
-
|
|
4611
|
+
return new Promise((resolve) => {
|
|
4612
|
+
let ico = "";
|
|
4613
|
+
switch (variant) {
|
|
4614
|
+
case "info":
|
|
4615
|
+
ico = `<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
4616
|
+
<circle cx="12" cy="12" r="10"/>
|
|
4617
|
+
<line x1="12" y1="16" x2="12" y2="12"/>
|
|
4618
|
+
<line x1="12" y1="8" x2="12.01" y2="8"/>
|
|
4619
|
+
</svg>`;
|
|
4620
|
+
break;
|
|
4621
|
+
case "success":
|
|
4622
|
+
ico = `<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
4623
|
+
<circle cx="12" cy="12" r="10"/>
|
|
4624
|
+
<path d="m9 12 2 2 4-4"/>
|
|
4625
|
+
</svg>`;
|
|
4626
|
+
break;
|
|
4627
|
+
case "error":
|
|
4628
|
+
ico = `<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
4629
|
+
<circle cx="12" cy="12" r="10"/>
|
|
4630
|
+
<line x1="15" y1="9" x2="9" y2="15"/>
|
|
4631
|
+
<line x1="9" y1="9" x2="15" y2="15"/>
|
|
4632
|
+
</svg>`;
|
|
4633
|
+
break;
|
|
4634
|
+
case "warning":
|
|
4635
|
+
ico = `<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
4636
|
+
<path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z"/>
|
|
4637
|
+
<line x1="12" y1="9" x2="12" y2="13"/>
|
|
4638
|
+
<line x1="12" y1="17" x2="12.01" y2="17"/>
|
|
4639
|
+
</svg>`;
|
|
4640
|
+
break;
|
|
4641
|
+
}
|
|
4642
|
+
const arrBody = body.split("\n").map((opt) => `<span>${opt}</span>`);
|
|
4643
|
+
const blockId = "f-function-block-alert-" + fGenerateUniqueId();
|
|
4644
|
+
const alertHtml = `
|
|
4645
|
+
<div class='${styles$5["f-function-block-alert"]}' id='${blockId}'>
|
|
4608
4646
|
<div class='${styles$5["f-function-alert"]}'>
|
|
4609
|
-
<div class='${styles$5["f-function-alert-
|
|
4610
|
-
<
|
|
4647
|
+
<div class='${styles$5["f-function-alert-top"]}'>
|
|
4648
|
+
<div class='${styles$5["f-function-alert-ico"]} ${styles$5[`${variant}-alert`]}'>
|
|
4611
4649
|
${ico}
|
|
4612
|
-
</
|
|
4613
|
-
</div>
|
|
4614
|
-
<div class='${styles$5["f-function-alert-inside"]}'>
|
|
4650
|
+
</div>
|
|
4615
4651
|
<div class='${styles$5["f-function-alert-header"]}'>
|
|
4616
4652
|
<h4>${title2 || ""}</h4>
|
|
4617
4653
|
</div>
|
|
4618
|
-
<
|
|
4619
|
-
|
|
4620
|
-
|
|
4621
|
-
|
|
4622
|
-
|
|
4623
|
-
|
|
4624
|
-
|
|
4625
|
-
|
|
4626
|
-
|
|
4627
|
-
|
|
4628
|
-
|
|
4654
|
+
<button type="button" aria-label="Закрыть" class="${styles$5["close-btn"]}" id="${blockId}-close-x">
|
|
4655
|
+
<svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round">
|
|
4656
|
+
<line x1="18" y1="6" x2="6" y2="18"/>
|
|
4657
|
+
<line x1="6" y1="6" x2="18" y2="18"/>
|
|
4658
|
+
</svg>
|
|
4659
|
+
</button>
|
|
4660
|
+
</div>
|
|
4661
|
+
<div class='${styles$5["f-function-alert-body"]}'>
|
|
4662
|
+
${arrBody.join("")}
|
|
4663
|
+
</div>
|
|
4664
|
+
<div class='${styles$5["f-function-alert-footer"]}'>
|
|
4665
|
+
<button
|
|
4666
|
+
type="button"
|
|
4667
|
+
class='${styles$5["btn-action"]} ${styles$5[variant]}'
|
|
4668
|
+
id='${blockId}-ok'
|
|
4669
|
+
>
|
|
4670
|
+
Закрыть
|
|
4671
|
+
</button>
|
|
4629
4672
|
</div>
|
|
4630
4673
|
</div>
|
|
4631
4674
|
</div>
|
|
4632
|
-
|
|
4633
|
-
|
|
4675
|
+
`;
|
|
4676
|
+
window.document.body.insertAdjacentHTML("afterbegin", alertHtml);
|
|
4677
|
+
const block = document.getElementById(blockId);
|
|
4678
|
+
const okBtn = document.getElementById(`${blockId}-ok`);
|
|
4679
|
+
const closeXBtn = document.getElementById(`${blockId}-close-x`);
|
|
4680
|
+
if (!block) {
|
|
4681
|
+
resolve();
|
|
4682
|
+
return;
|
|
4683
|
+
}
|
|
4684
|
+
if (typeof requestAnimationFrame === "function") {
|
|
4685
|
+
requestAnimationFrame(() => {
|
|
4686
|
+
requestAnimationFrame(() => {
|
|
4687
|
+
block.classList.add(styles$5["visible"]);
|
|
4688
|
+
});
|
|
4689
|
+
});
|
|
4690
|
+
} else {
|
|
4691
|
+
setTimeout(() => {
|
|
4692
|
+
block.classList.add(styles$5["visible"]);
|
|
4693
|
+
}, 20);
|
|
4694
|
+
}
|
|
4695
|
+
let isClosing = false;
|
|
4696
|
+
const closeModal = () => {
|
|
4697
|
+
if (isClosing) return;
|
|
4698
|
+
isClosing = true;
|
|
4699
|
+
window.removeEventListener("keydown", handleKeyDown);
|
|
4700
|
+
block.classList.remove(styles$5["visible"]);
|
|
4701
|
+
block.classList.add(styles$5["hidden"]);
|
|
4702
|
+
let isCleanedUp = false;
|
|
4703
|
+
const cleanup = () => {
|
|
4704
|
+
if (isCleanedUp) return;
|
|
4705
|
+
isCleanedUp = true;
|
|
4706
|
+
block.remove();
|
|
4707
|
+
resolve();
|
|
4708
|
+
};
|
|
4709
|
+
block.addEventListener("transitionend", (e) => {
|
|
4710
|
+
if (e.target === block) {
|
|
4711
|
+
cleanup();
|
|
4712
|
+
}
|
|
4713
|
+
});
|
|
4714
|
+
setTimeout(cleanup, 280);
|
|
4715
|
+
};
|
|
4716
|
+
const handleKeyDown = (e) => {
|
|
4717
|
+
if (e.key === "Escape" || e.key === "Enter") {
|
|
4718
|
+
e.preventDefault();
|
|
4719
|
+
closeModal();
|
|
4720
|
+
}
|
|
4721
|
+
};
|
|
4722
|
+
block.addEventListener("click", (e) => {
|
|
4723
|
+
if (e.target === block) {
|
|
4724
|
+
closeModal();
|
|
4725
|
+
}
|
|
4726
|
+
});
|
|
4727
|
+
okBtn == null ? void 0 : okBtn.addEventListener("click", closeModal);
|
|
4728
|
+
closeXBtn == null ? void 0 : closeXBtn.addEventListener("click", closeModal);
|
|
4729
|
+
window.addEventListener("keydown", handleKeyDown);
|
|
4730
|
+
});
|
|
4634
4731
|
};
|
|
4635
|
-
const
|
|
4732
|
+
const visible$1 = "_visible_1jeyg_19";
|
|
4733
|
+
const hidden$1 = "_hidden_1jeyg_22";
|
|
4734
|
+
const warning$2 = "_warning_1jeyg_73";
|
|
4636
4735
|
const styles$4 = {
|
|
4637
|
-
"f-function-block-confirm": "_f-function-block-
|
|
4638
|
-
|
|
4639
|
-
|
|
4736
|
+
"f-function-block-confirm": "_f-function-block-confirm_1jeyg_1",
|
|
4737
|
+
visible: visible$1,
|
|
4738
|
+
hidden: hidden$1,
|
|
4739
|
+
"f-function-confirm": "_f-function-confirm_1jeyg_27",
|
|
4740
|
+
"f-function-confirm-top": "_f-function-confirm-top_1jeyg_51",
|
|
4741
|
+
"f-function-confirm-ico": "_f-function-confirm-ico_1jeyg_57",
|
|
4640
4742
|
warning: warning$2,
|
|
4641
|
-
"f-function-confirm-
|
|
4642
|
-
"f-function-confirm-
|
|
4643
|
-
"f-function-confirm-
|
|
4644
|
-
"
|
|
4743
|
+
"f-function-confirm-header": "_f-function-confirm-header_1jeyg_84",
|
|
4744
|
+
"f-function-confirm-body": "_f-function-confirm-body_1jeyg_102",
|
|
4745
|
+
"f-function-confirm-footer": "_f-function-confirm-footer_1jeyg_118",
|
|
4746
|
+
"btn-cancel": "_btn-cancel_1jeyg_125",
|
|
4747
|
+
"btn-ok": "_btn-ok_1jeyg_147",
|
|
4748
|
+
"close-btn": "_close-btn_1jeyg_171"
|
|
4645
4749
|
};
|
|
4646
4750
|
const fConfirm = ({ title: title2, body }) => {
|
|
4647
4751
|
return new Promise((resolve) => {
|
|
4752
|
+
const blockId = "f-function-block-confirm-" + fGenerateUniqueId();
|
|
4648
4753
|
window.document.body.insertAdjacentHTML(
|
|
4649
4754
|
"afterbegin",
|
|
4650
4755
|
`
|
|
4651
|
-
<div class='${styles$4["f-function-block-confirm"]}' id='
|
|
4756
|
+
<div class='${styles$4["f-function-block-confirm"]}' id='${blockId}'>
|
|
4652
4757
|
<div class='${styles$4["f-function-confirm"]}'>
|
|
4653
|
-
<div class='${styles$4["f-function-confirm-
|
|
4654
|
-
<
|
|
4655
|
-
<
|
|
4656
|
-
|
|
4657
|
-
|
|
4658
|
-
|
|
4659
|
-
|
|
4758
|
+
<div class='${styles$4["f-function-confirm-top"]}'>
|
|
4759
|
+
<div class='${styles$4["f-function-confirm-ico"]} ${styles$4.warning}'>
|
|
4760
|
+
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
4761
|
+
<path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"/>
|
|
4762
|
+
<line x1="12" y1="9" x2="12" y2="13"/>
|
|
4763
|
+
<line x1="12" y1="17" x2="12.01" y2="17"/>
|
|
4764
|
+
</svg>
|
|
4765
|
+
</div>
|
|
4660
4766
|
<div class='${styles$4["f-function-confirm-header"]}'>
|
|
4661
4767
|
<h4>${title2 || ""}</h4>
|
|
4662
4768
|
</div>
|
|
4663
|
-
<
|
|
4664
|
-
<
|
|
4665
|
-
|
|
4666
|
-
|
|
4667
|
-
|
|
4668
|
-
|
|
4669
|
-
|
|
4670
|
-
|
|
4671
|
-
|
|
4672
|
-
|
|
4673
|
-
|
|
4674
|
-
|
|
4675
|
-
|
|
4676
|
-
|
|
4677
|
-
|
|
4678
|
-
|
|
4679
|
-
|
|
4769
|
+
<button type="button" aria-label="Закрыть" class="${styles$4["close-btn"]}" id="${blockId}-close-x">
|
|
4770
|
+
<svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round">
|
|
4771
|
+
<line x1="18" y1="6" x2="6" y2="18"/>
|
|
4772
|
+
<line x1="6" y1="6" x2="18" y2="18"/>
|
|
4773
|
+
</svg>
|
|
4774
|
+
</button>
|
|
4775
|
+
</div>
|
|
4776
|
+
<div class='${styles$4["f-function-confirm-body"]}'>
|
|
4777
|
+
<span>${body}</span>
|
|
4778
|
+
</div>
|
|
4779
|
+
<div class='${styles$4["f-function-confirm-footer"]}'>
|
|
4780
|
+
<button
|
|
4781
|
+
type="button"
|
|
4782
|
+
id="${blockId}-cancel"
|
|
4783
|
+
class='${styles$4["btn-cancel"]}'
|
|
4784
|
+
>
|
|
4785
|
+
Отменить
|
|
4786
|
+
</button>
|
|
4787
|
+
<button
|
|
4788
|
+
type="button"
|
|
4789
|
+
id="${blockId}-ok"
|
|
4790
|
+
class='${styles$4["btn-ok"]}'
|
|
4791
|
+
>
|
|
4792
|
+
Ок
|
|
4793
|
+
</button>
|
|
4680
4794
|
</div>
|
|
4681
4795
|
</div>
|
|
4682
4796
|
</div>
|
|
4683
4797
|
`
|
|
4684
4798
|
);
|
|
4685
|
-
const
|
|
4686
|
-
const okBtn = document.getElementById(
|
|
4687
|
-
const cancelBtn = document.getElementById(
|
|
4688
|
-
const
|
|
4689
|
-
|
|
4690
|
-
okBtn == null ? void 0 : okBtn.removeEventListener("click", handleOk);
|
|
4691
|
-
cancelBtn == null ? void 0 : cancelBtn.removeEventListener("click", handleCancel);
|
|
4692
|
-
modalBlock == null ? void 0 : modalBlock.remove();
|
|
4693
|
-
};
|
|
4694
|
-
const handleOk = () => {
|
|
4695
|
-
closeModal();
|
|
4696
|
-
resolve(true);
|
|
4697
|
-
};
|
|
4698
|
-
const handleCancel = () => {
|
|
4699
|
-
closeModal();
|
|
4799
|
+
const block = document.getElementById(blockId);
|
|
4800
|
+
const okBtn = document.getElementById(`${blockId}-ok`);
|
|
4801
|
+
const cancelBtn = document.getElementById(`${blockId}-cancel`);
|
|
4802
|
+
const closeXBtn = document.getElementById(`${blockId}-close-x`);
|
|
4803
|
+
if (!block) {
|
|
4700
4804
|
resolve(false);
|
|
4805
|
+
return;
|
|
4806
|
+
}
|
|
4807
|
+
if (typeof requestAnimationFrame === "function") {
|
|
4808
|
+
requestAnimationFrame(() => {
|
|
4809
|
+
requestAnimationFrame(() => {
|
|
4810
|
+
block.classList.add(styles$4["visible"]);
|
|
4811
|
+
});
|
|
4812
|
+
});
|
|
4813
|
+
} else {
|
|
4814
|
+
setTimeout(() => {
|
|
4815
|
+
block.classList.add(styles$4["visible"]);
|
|
4816
|
+
}, 20);
|
|
4817
|
+
}
|
|
4818
|
+
let isClosing = false;
|
|
4819
|
+
const closeModal = (result) => {
|
|
4820
|
+
if (isClosing) return;
|
|
4821
|
+
isClosing = true;
|
|
4822
|
+
window.removeEventListener("keydown", handleKeyDown);
|
|
4823
|
+
block.classList.remove(styles$4["visible"]);
|
|
4824
|
+
block.classList.add(styles$4["hidden"]);
|
|
4825
|
+
let isCleanedUp = false;
|
|
4826
|
+
const cleanup = () => {
|
|
4827
|
+
if (isCleanedUp) return;
|
|
4828
|
+
isCleanedUp = true;
|
|
4829
|
+
block.remove();
|
|
4830
|
+
resolve(result);
|
|
4831
|
+
};
|
|
4832
|
+
block.addEventListener("transitionend", (e) => {
|
|
4833
|
+
if (e.target === block) {
|
|
4834
|
+
cleanup();
|
|
4835
|
+
}
|
|
4836
|
+
});
|
|
4837
|
+
setTimeout(cleanup, 280);
|
|
4701
4838
|
};
|
|
4702
4839
|
const handleKeyDown = (e) => {
|
|
4703
4840
|
if (e.key === "Enter") {
|
|
4704
4841
|
e.preventDefault();
|
|
4705
|
-
|
|
4706
|
-
}
|
|
4707
|
-
|
|
4708
|
-
|
|
4842
|
+
closeModal(true);
|
|
4843
|
+
} else if (e.key === "Escape") {
|
|
4844
|
+
e.preventDefault();
|
|
4845
|
+
closeModal(false);
|
|
4709
4846
|
}
|
|
4710
4847
|
};
|
|
4711
|
-
|
|
4712
|
-
|
|
4848
|
+
block.addEventListener("click", (e) => {
|
|
4849
|
+
if (e.target === block) {
|
|
4850
|
+
closeModal(false);
|
|
4851
|
+
}
|
|
4852
|
+
});
|
|
4853
|
+
okBtn == null ? void 0 : okBtn.addEventListener("click", () => closeModal(true));
|
|
4854
|
+
cancelBtn == null ? void 0 : cancelBtn.addEventListener("click", () => closeModal(false));
|
|
4855
|
+
closeXBtn == null ? void 0 : closeXBtn.addEventListener("click", () => closeModal(false));
|
|
4713
4856
|
window.addEventListener("keydown", handleKeyDown);
|
|
4714
4857
|
});
|
|
4715
4858
|
};
|
|
4716
|
-
const
|
|
4859
|
+
const visible = "_visible_1nxa7_19";
|
|
4860
|
+
const hidden = "_hidden_1nxa7_22";
|
|
4861
|
+
const warning$1 = "_warning_1nxa7_73";
|
|
4717
4862
|
const styles$3 = {
|
|
4718
|
-
"f-function-block-prompt": "_f-function-block-
|
|
4719
|
-
|
|
4720
|
-
|
|
4863
|
+
"f-function-block-prompt": "_f-function-block-prompt_1nxa7_1",
|
|
4864
|
+
visible,
|
|
4865
|
+
hidden,
|
|
4866
|
+
"f-function-prompt": "_f-function-prompt_1nxa7_27",
|
|
4867
|
+
"f-function-prompt-top": "_f-function-prompt-top_1nxa7_51",
|
|
4868
|
+
"f-function-prompt-ico": "_f-function-prompt-ico_1nxa7_57",
|
|
4721
4869
|
warning: warning$1,
|
|
4722
|
-
"f-function-prompt-
|
|
4723
|
-
"f-function-prompt-
|
|
4724
|
-
"f-function-prompt-
|
|
4725
|
-
"f-function-prompt-footer": "_f-function-prompt-
|
|
4870
|
+
"f-function-prompt-header": "_f-function-prompt-header_1nxa7_84",
|
|
4871
|
+
"f-function-prompt-body": "_f-function-prompt-body_1nxa7_102",
|
|
4872
|
+
"f-function-prompt-input": "_f-function-prompt-input_1nxa7_121",
|
|
4873
|
+
"f-function-prompt-footer": "_f-function-prompt-footer_1nxa7_142",
|
|
4874
|
+
"btn-cancel": "_btn-cancel_1nxa7_149",
|
|
4875
|
+
"btn-ok": "_btn-ok_1nxa7_171",
|
|
4876
|
+
"close-btn": "_close-btn_1nxa7_195"
|
|
4726
4877
|
};
|
|
4727
4878
|
function getValue(element) {
|
|
4728
4879
|
if (element) {
|
|
@@ -4733,59 +4884,119 @@ function getValue(element) {
|
|
|
4733
4884
|
}
|
|
4734
4885
|
const fPrompt = ({ title: title2, body }) => {
|
|
4735
4886
|
return new Promise((resolve) => {
|
|
4887
|
+
const blockId = "f-function-block-prompt-" + fGenerateUniqueId();
|
|
4736
4888
|
window.document.body.insertAdjacentHTML(
|
|
4737
4889
|
"afterbegin",
|
|
4738
4890
|
`
|
|
4739
|
-
<div class='${styles$3["f-function-block-prompt"]}' id='
|
|
4891
|
+
<div class='${styles$3["f-function-block-prompt"]}' id='${blockId}'>
|
|
4740
4892
|
<div class='${styles$3["f-function-prompt"]}'>
|
|
4741
|
-
|
|
4742
|
-
<
|
|
4743
|
-
<
|
|
4744
|
-
|
|
4745
|
-
|
|
4746
|
-
|
|
4747
|
-
<div class='${styles$3["f-function-prompt-inside"]}'>
|
|
4893
|
+
<div class='${styles$3["f-function-prompt-top"]}'>
|
|
4894
|
+
<div class='${styles$3["f-function-prompt-ico"]} ${styles$3.warning}'>
|
|
4895
|
+
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
4896
|
+
<path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"/>
|
|
4897
|
+
</svg>
|
|
4898
|
+
</div>
|
|
4748
4899
|
<div class='${styles$3["f-function-prompt-header"]}'>
|
|
4749
4900
|
<h4>${title2 || ""}</h4>
|
|
4750
4901
|
</div>
|
|
4751
|
-
<
|
|
4752
|
-
<
|
|
4753
|
-
|
|
4754
|
-
|
|
4755
|
-
|
|
4756
|
-
|
|
4757
|
-
|
|
4758
|
-
|
|
4759
|
-
|
|
4760
|
-
|
|
4761
|
-
|
|
4762
|
-
|
|
4763
|
-
|
|
4764
|
-
|
|
4765
|
-
|
|
4766
|
-
|
|
4767
|
-
|
|
4768
|
-
|
|
4769
|
-
|
|
4770
|
-
|
|
4771
|
-
|
|
4772
|
-
|
|
4773
|
-
|
|
4774
|
-
|
|
4902
|
+
<button type="button" aria-label="Закрыть" class="${styles$3["close-btn"]}" id="${blockId}-close-x">
|
|
4903
|
+
<svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round">
|
|
4904
|
+
<line x1="18" y1="6" x2="6" y2="18"/>
|
|
4905
|
+
<line x1="6" y1="6" x2="18" y2="18"/>
|
|
4906
|
+
</svg>
|
|
4907
|
+
</button>
|
|
4908
|
+
</div>
|
|
4909
|
+
<div class='${styles$3["f-function-prompt-body"]}'>
|
|
4910
|
+
${body ? `<span>${body}</span>` : ""}
|
|
4911
|
+
<input
|
|
4912
|
+
type="text"
|
|
4913
|
+
id="${blockId}-input"
|
|
4914
|
+
class="${styles$3["f-function-prompt-input"]}"
|
|
4915
|
+
placeholder="Введите значение..."
|
|
4916
|
+
autocomplete="off"
|
|
4917
|
+
/>
|
|
4918
|
+
</div>
|
|
4919
|
+
<div class='${styles$3["f-function-prompt-footer"]}'>
|
|
4920
|
+
<button
|
|
4921
|
+
type="button"
|
|
4922
|
+
id="${blockId}-cancel"
|
|
4923
|
+
class='${styles$3["btn-cancel"]}'
|
|
4924
|
+
>
|
|
4925
|
+
Отменить
|
|
4926
|
+
</button>
|
|
4927
|
+
<button
|
|
4928
|
+
type="button"
|
|
4929
|
+
id="${blockId}-ok"
|
|
4930
|
+
class='${styles$3["btn-ok"]}'
|
|
4931
|
+
>
|
|
4932
|
+
Ок
|
|
4933
|
+
</button>
|
|
4775
4934
|
</div>
|
|
4776
4935
|
</div>
|
|
4777
4936
|
</div>
|
|
4778
4937
|
`
|
|
4779
4938
|
);
|
|
4780
|
-
const
|
|
4781
|
-
const
|
|
4782
|
-
const
|
|
4783
|
-
|
|
4784
|
-
|
|
4785
|
-
|
|
4786
|
-
cancellation.addEventListener("click", function() {
|
|
4939
|
+
const block = document.getElementById(blockId);
|
|
4940
|
+
const okBtn = document.getElementById(`${blockId}-ok`);
|
|
4941
|
+
const cancelBtn = document.getElementById(`${blockId}-cancel`);
|
|
4942
|
+
const closeXBtn = document.getElementById(`${blockId}-close-x`);
|
|
4943
|
+
const input = document.getElementById(`${blockId}-input`);
|
|
4944
|
+
if (!block) {
|
|
4787
4945
|
resolve(null);
|
|
4946
|
+
return;
|
|
4947
|
+
}
|
|
4948
|
+
if (typeof requestAnimationFrame === "function") {
|
|
4949
|
+
requestAnimationFrame(() => {
|
|
4950
|
+
requestAnimationFrame(() => {
|
|
4951
|
+
block.classList.add(styles$3["visible"]);
|
|
4952
|
+
input == null ? void 0 : input.focus();
|
|
4953
|
+
});
|
|
4954
|
+
});
|
|
4955
|
+
} else {
|
|
4956
|
+
setTimeout(() => {
|
|
4957
|
+
block.classList.add(styles$3["visible"]);
|
|
4958
|
+
input == null ? void 0 : input.focus();
|
|
4959
|
+
}, 20);
|
|
4960
|
+
}
|
|
4961
|
+
let isClosing = false;
|
|
4962
|
+
const closeModal = (result) => {
|
|
4963
|
+
if (isClosing) return;
|
|
4964
|
+
isClosing = true;
|
|
4965
|
+
window.removeEventListener("keydown", handleKeyDown);
|
|
4966
|
+
block.classList.remove(styles$3["visible"]);
|
|
4967
|
+
block.classList.add(styles$3["hidden"]);
|
|
4968
|
+
let isCleanedUp = false;
|
|
4969
|
+
const cleanup = () => {
|
|
4970
|
+
if (isCleanedUp) return;
|
|
4971
|
+
isCleanedUp = true;
|
|
4972
|
+
block.remove();
|
|
4973
|
+
resolve(result);
|
|
4974
|
+
};
|
|
4975
|
+
block.addEventListener("transitionend", (e) => {
|
|
4976
|
+
if (e.target === block) {
|
|
4977
|
+
cleanup();
|
|
4978
|
+
}
|
|
4979
|
+
});
|
|
4980
|
+
setTimeout(cleanup, 280);
|
|
4981
|
+
};
|
|
4982
|
+
const handleKeyDown = (e) => {
|
|
4983
|
+
if (e.key === "Enter") {
|
|
4984
|
+
e.preventDefault();
|
|
4985
|
+
closeModal(getValue(input));
|
|
4986
|
+
} else if (e.key === "Escape") {
|
|
4987
|
+
e.preventDefault();
|
|
4988
|
+
closeModal(null);
|
|
4989
|
+
}
|
|
4990
|
+
};
|
|
4991
|
+
block.addEventListener("click", (e) => {
|
|
4992
|
+
if (e.target === block) {
|
|
4993
|
+
closeModal(null);
|
|
4994
|
+
}
|
|
4788
4995
|
});
|
|
4996
|
+
okBtn == null ? void 0 : okBtn.addEventListener("click", () => closeModal(getValue(input)));
|
|
4997
|
+
cancelBtn == null ? void 0 : cancelBtn.addEventListener("click", () => closeModal(null));
|
|
4998
|
+
closeXBtn == null ? void 0 : closeXBtn.addEventListener("click", () => closeModal(null));
|
|
4999
|
+
window.addEventListener("keydown", handleKeyDown);
|
|
4789
5000
|
});
|
|
4790
5001
|
};
|
|
4791
5002
|
class TSZip {
|
|
@@ -7783,34 +7994,61 @@ const fExportingHtmlToXlsx = async (data) => {
|
|
|
7783
7994
|
}
|
|
7784
7995
|
};
|
|
7785
7996
|
const fInstallFormatCodeXlsx = (data) => installFormatCode(data);
|
|
7786
|
-
const info = "
|
|
7787
|
-
const error = "
|
|
7788
|
-
const success = "
|
|
7789
|
-
const warning = "
|
|
7997
|
+
const info = "_info_1s6rj_93";
|
|
7998
|
+
const error = "_error_1s6rj_97";
|
|
7999
|
+
const success = "_success_1s6rj_101";
|
|
8000
|
+
const warning = "_warning_1s6rj_105";
|
|
7790
8001
|
const styles$1 = {
|
|
7791
|
-
"f-function-block-notification": "_f-function-block-
|
|
7792
|
-
"f-function-notification": "_f-function-
|
|
7793
|
-
"f-function-notification-
|
|
7794
|
-
"
|
|
7795
|
-
"
|
|
7796
|
-
"
|
|
7797
|
-
"
|
|
7798
|
-
"
|
|
7799
|
-
"
|
|
7800
|
-
"f-function-notification-
|
|
7801
|
-
"f-function-notification-
|
|
7802
|
-
"notification-
|
|
7803
|
-
"
|
|
7804
|
-
"notification-
|
|
7805
|
-
"f-notification-progress": "_f-notification-
|
|
7806
|
-
"f-notification-progress-
|
|
7807
|
-
"
|
|
8002
|
+
"f-function-block-notification": "_f-function-block-notification_1s6rj_35",
|
|
8003
|
+
"f-function-notification-visible": "_f-function-notification-visible_1s6rj_45",
|
|
8004
|
+
"f-function-notification-hidden": "_f-function-notification-hidden_1s6rj_50",
|
|
8005
|
+
"f-function-notification": "_f-function-notification_1s6rj_45",
|
|
8006
|
+
"f-function-notification-ico": "_f-function-notification-ico_1s6rj_79",
|
|
8007
|
+
"info-notification": "_info-notification_1s6rj_93",
|
|
8008
|
+
"error-notification": "_error-notification_1s6rj_97",
|
|
8009
|
+
"success-notification": "_success-notification_1s6rj_101",
|
|
8010
|
+
"warning-notification": "_warning-notification_1s6rj_105",
|
|
8011
|
+
"f-function-notification-inside": "_f-function-notification-inside_1s6rj_109",
|
|
8012
|
+
"f-function-notification-header": "_f-function-notification-header_1s6rj_117",
|
|
8013
|
+
"f-function-notification-body": "_f-function-notification-body_1s6rj_136",
|
|
8014
|
+
"close-not": "_close-not_1s6rj_153",
|
|
8015
|
+
"f-notification-progress": "_f-notification-progress_1s6rj_179",
|
|
8016
|
+
"f-notification-progress-bar": "_f-notification-progress-bar_1s6rj_188",
|
|
8017
|
+
"f-notification-progress-value": "_f-notification-progress-value_1s6rj_193",
|
|
8018
|
+
"notification-progress-shrink": "_notification-progress-shrink_1s6rj_1",
|
|
7808
8019
|
info,
|
|
7809
8020
|
error,
|
|
7810
8021
|
success,
|
|
7811
|
-
warning
|
|
7812
|
-
|
|
7813
|
-
|
|
8022
|
+
warning
|
|
8023
|
+
};
|
|
8024
|
+
const dismissNotificationElement = (el) => {
|
|
8025
|
+
if (!el || el.dataset.closing === "true") return;
|
|
8026
|
+
el.dataset.closing = "true";
|
|
8027
|
+
const cancelTimer = el._cancelTimer;
|
|
8028
|
+
if (typeof cancelTimer === "function") {
|
|
8029
|
+
cancelTimer();
|
|
8030
|
+
}
|
|
8031
|
+
el.classList.remove(styles$1["f-function-notification-visible"]);
|
|
8032
|
+
el.classList.add(styles$1["f-function-notification-hidden"]);
|
|
8033
|
+
let isCleanedUp = false;
|
|
8034
|
+
const cleanup = () => {
|
|
8035
|
+
var _a;
|
|
8036
|
+
if (isCleanedUp) return;
|
|
8037
|
+
isCleanedUp = true;
|
|
8038
|
+
if (el.parentNode) {
|
|
8039
|
+
el.parentNode.removeChild(el);
|
|
8040
|
+
}
|
|
8041
|
+
const blockNotification = document.querySelector("#block-notification");
|
|
8042
|
+
if (blockNotification && blockNotification.children.length === 0) {
|
|
8043
|
+
(_a = blockNotification.parentNode) == null ? void 0 : _a.removeChild(blockNotification);
|
|
8044
|
+
}
|
|
8045
|
+
};
|
|
8046
|
+
el.addEventListener("transitionend", (e) => {
|
|
8047
|
+
if (e.target === el) {
|
|
8048
|
+
cleanup();
|
|
8049
|
+
}
|
|
8050
|
+
});
|
|
8051
|
+
setTimeout(cleanup, 360);
|
|
7814
8052
|
};
|
|
7815
8053
|
const fNotification = ({
|
|
7816
8054
|
title: title2,
|
|
@@ -7824,54 +8062,61 @@ const fNotification = ({
|
|
|
7824
8062
|
let ico = "";
|
|
7825
8063
|
switch (variant) {
|
|
7826
8064
|
case "info":
|
|
7827
|
-
ico =
|
|
8065
|
+
ico = `<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
8066
|
+
<circle cx="12" cy="12" r="10"/>
|
|
8067
|
+
<line x1="12" y1="16" x2="12" y2="12"/>
|
|
8068
|
+
<line x1="12" y1="8" x2="12.01" y2="8"/>
|
|
8069
|
+
</svg>`;
|
|
7828
8070
|
break;
|
|
7829
8071
|
case "success":
|
|
7830
|
-
ico =
|
|
8072
|
+
ico = `<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
8073
|
+
<circle cx="12" cy="12" r="10"/>
|
|
8074
|
+
<path d="m9 12 2 2 4-4"/>
|
|
8075
|
+
</svg>`;
|
|
7831
8076
|
break;
|
|
7832
8077
|
case "error":
|
|
7833
|
-
ico =
|
|
8078
|
+
ico = `<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
8079
|
+
<circle cx="12" cy="12" r="10"/>
|
|
8080
|
+
<line x1="15" y1="9" x2="9" y2="15"/>
|
|
8081
|
+
<line x1="9" y1="9" x2="15" y2="15"/>
|
|
8082
|
+
</svg>`;
|
|
7834
8083
|
break;
|
|
7835
8084
|
case "warning":
|
|
7836
|
-
ico =
|
|
8085
|
+
ico = `<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
8086
|
+
<path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z"/>
|
|
8087
|
+
<line x1="12" y1="9" x2="12" y2="13"/>
|
|
8088
|
+
<line x1="12" y1="17" x2="12.01" y2="17"/>
|
|
8089
|
+
</svg>`;
|
|
7837
8090
|
break;
|
|
7838
8091
|
}
|
|
7839
|
-
const arrBody =
|
|
7840
|
-
body.split("\n").map((opt) => {
|
|
7841
|
-
arrBody.push(
|
|
7842
|
-
`<span>${opt}</span>`
|
|
7843
|
-
);
|
|
7844
|
-
});
|
|
8092
|
+
const arrBody = body.split("\n").map((opt) => `<span>${opt}</span>`);
|
|
7845
8093
|
const randId = fGenerateUniqueId();
|
|
7846
|
-
const
|
|
8094
|
+
const elementId = id !== void 0 ? id : "f-function-block-notification-" + randId;
|
|
7847
8095
|
const not = `
|
|
7848
|
-
<div class='${styles$1["f-function-block-notification"]}' id="${
|
|
8096
|
+
<div class='${styles$1["f-function-block-notification"]}' id="${elementId}">
|
|
7849
8097
|
<div class='${styles$1["f-function-notification"]}'>
|
|
7850
8098
|
<div class='${styles$1["f-function-notification-ico"]} ${styles$1[variant + "-notification"]}'>
|
|
7851
|
-
|
|
7852
|
-
${ico}
|
|
7853
|
-
</svg>
|
|
8099
|
+
${ico}
|
|
7854
8100
|
</div>
|
|
7855
8101
|
<div class='${styles$1["f-function-notification-inside"]}'>
|
|
7856
8102
|
<div class='${styles$1["f-function-notification-header"]}'>
|
|
7857
8103
|
<h4>${title2 !== void 0 ? title2 : ""}</h4>
|
|
7858
|
-
${buttonClose ? `<
|
|
7859
|
-
|
|
7860
|
-
|
|
7861
|
-
|
|
7862
|
-
|
|
7863
|
-
|
|
7864
|
-
</svg>` : ""}
|
|
8104
|
+
${buttonClose ? `<button type="button" aria-label="Закрыть" class="${styles$1["close-not"]}">
|
|
8105
|
+
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round">
|
|
8106
|
+
<line x1="18" y1="6" x2="6" y2="18"/>
|
|
8107
|
+
<line x1="6" y1="6" x2="18" y2="18"/>
|
|
8108
|
+
</svg>
|
|
8109
|
+
</button>` : ""}
|
|
7865
8110
|
</div>
|
|
7866
8111
|
<div class='${styles$1["f-function-notification-body"]}'>
|
|
7867
8112
|
${arrBody.join("")}
|
|
7868
8113
|
</div>
|
|
7869
8114
|
</div>
|
|
7870
|
-
|
|
7871
|
-
|
|
7872
|
-
<div class="${styles$1["f-notification-progress-value"]} ${styles$1[variant]}"
|
|
7873
|
-
|
|
7874
|
-
|
|
8115
|
+
${timeSecClose ? `<div class="${styles$1["f-notification-progress"]}">
|
|
8116
|
+
<div class="${styles$1["f-notification-progress-bar"]}">
|
|
8117
|
+
<div class="${styles$1["f-notification-progress-value"]} ${styles$1[variant]}" style="animation-duration: ${timeSecClose}s;"></div>
|
|
8118
|
+
</div>
|
|
8119
|
+
</div>` : ""}
|
|
7875
8120
|
</div>
|
|
7876
8121
|
</div>
|
|
7877
8122
|
`;
|
|
@@ -7884,70 +8129,82 @@ const fNotification = ({
|
|
|
7884
8129
|
}
|
|
7885
8130
|
return blockNotification2;
|
|
7886
8131
|
};
|
|
7887
|
-
const removeEmptyNotificationBlock = () => {
|
|
7888
|
-
var _a;
|
|
7889
|
-
const blockNotification2 = document.querySelector("#block-notification");
|
|
7890
|
-
if (blockNotification2 && blockNotification2.children.length === 0) {
|
|
7891
|
-
(_a = blockNotification2.parentNode) == null ? void 0 : _a.removeChild(blockNotification2);
|
|
7892
|
-
}
|
|
7893
|
-
};
|
|
7894
8132
|
const blockNotification = getOrCreateNotificationBlock();
|
|
7895
8133
|
blockNotification.insertAdjacentHTML("afterbegin", not);
|
|
7896
8134
|
blockNotification.scrollTo({ top: 0, behavior: "smooth" });
|
|
7897
|
-
|
|
7898
|
-
|
|
7899
|
-
|
|
7900
|
-
|
|
7901
|
-
|
|
7902
|
-
|
|
7903
|
-
el.classList.
|
|
7904
|
-
el.classList.add(styles$1["f-function-notification-hidden"]);
|
|
7905
|
-
setTimeout(() => {
|
|
7906
|
-
if (el.parentNode) {
|
|
7907
|
-
el.parentNode.removeChild(el);
|
|
7908
|
-
}
|
|
7909
|
-
removeEmptyNotificationBlock();
|
|
7910
|
-
}, 1e3);
|
|
8135
|
+
const el = window.document.querySelector(`#${elementId}`);
|
|
8136
|
+
if (el !== null) {
|
|
8137
|
+
el._dismiss = () => dismissNotificationElement(el);
|
|
8138
|
+
if (typeof requestAnimationFrame === "function") {
|
|
8139
|
+
requestAnimationFrame(() => {
|
|
8140
|
+
requestAnimationFrame(() => {
|
|
8141
|
+
el.classList.add(styles$1["f-function-notification-visible"]);
|
|
7911
8142
|
});
|
|
7912
|
-
}
|
|
8143
|
+
});
|
|
8144
|
+
} else {
|
|
8145
|
+
setTimeout(() => {
|
|
8146
|
+
el.classList.add(styles$1["f-function-notification-visible"]);
|
|
8147
|
+
}, 20);
|
|
7913
8148
|
}
|
|
7914
|
-
|
|
7915
|
-
|
|
7916
|
-
|
|
7917
|
-
|
|
7918
|
-
|
|
8149
|
+
if (buttonClose) {
|
|
8150
|
+
const closeBtn = el.querySelector(`.${styles$1["close-not"]}`);
|
|
8151
|
+
if (closeBtn !== null) {
|
|
8152
|
+
closeBtn.addEventListener("click", (e) => {
|
|
8153
|
+
e.stopPropagation();
|
|
8154
|
+
dismissNotificationElement(el);
|
|
8155
|
+
});
|
|
8156
|
+
}
|
|
7919
8157
|
}
|
|
7920
|
-
|
|
7921
|
-
|
|
7922
|
-
|
|
7923
|
-
|
|
7924
|
-
|
|
7925
|
-
|
|
7926
|
-
|
|
7927
|
-
|
|
7928
|
-
|
|
7929
|
-
|
|
8158
|
+
if (timeSecClose !== void 0 && timeSecClose > 0) {
|
|
8159
|
+
let timer = null;
|
|
8160
|
+
let startTime = Date.now();
|
|
8161
|
+
let remaining = timeSecClose * 1e3;
|
|
8162
|
+
const startTimer = () => {
|
|
8163
|
+
startTime = Date.now();
|
|
8164
|
+
timer = setTimeout(() => {
|
|
8165
|
+
dismissNotificationElement(el);
|
|
8166
|
+
}, remaining);
|
|
8167
|
+
};
|
|
8168
|
+
const pauseTimer = () => {
|
|
8169
|
+
if (timer) {
|
|
8170
|
+
clearTimeout(timer);
|
|
8171
|
+
timer = null;
|
|
8172
|
+
remaining -= Date.now() - startTime;
|
|
8173
|
+
}
|
|
8174
|
+
};
|
|
8175
|
+
const resumeTimer = () => {
|
|
8176
|
+
if (remaining > 0 && el.dataset.closing !== "true") {
|
|
8177
|
+
startTimer();
|
|
8178
|
+
}
|
|
8179
|
+
};
|
|
8180
|
+
el._cancelTimer = () => {
|
|
8181
|
+
if (timer) {
|
|
8182
|
+
clearTimeout(timer);
|
|
8183
|
+
timer = null;
|
|
7930
8184
|
}
|
|
7931
|
-
|
|
7932
|
-
|
|
8185
|
+
el.removeEventListener("mouseenter", pauseTimer);
|
|
8186
|
+
el.removeEventListener("mouseleave", resumeTimer);
|
|
8187
|
+
};
|
|
8188
|
+
el.addEventListener("mouseenter", pauseTimer);
|
|
8189
|
+
el.addEventListener("mouseleave", resumeTimer);
|
|
8190
|
+
startTimer();
|
|
7933
8191
|
}
|
|
7934
8192
|
}
|
|
7935
|
-
resolve(`#${
|
|
8193
|
+
resolve(`#${elementId}`);
|
|
7936
8194
|
});
|
|
7937
8195
|
};
|
|
7938
8196
|
const fNotificationDelete = (id) => {
|
|
7939
|
-
|
|
8197
|
+
if (!id) return;
|
|
8198
|
+
const selector = id.startsWith("#") ? id : `#${id}`;
|
|
8199
|
+
let el = window.document.querySelector(selector);
|
|
8200
|
+
if (!el) {
|
|
8201
|
+
try {
|
|
8202
|
+
el = window.document.querySelector(id);
|
|
8203
|
+
} catch {
|
|
8204
|
+
}
|
|
8205
|
+
}
|
|
7940
8206
|
if (!el) return;
|
|
7941
|
-
|
|
7942
|
-
if (!container2) return;
|
|
7943
|
-
el.className = styles$1["f-function-notification-hidden"];
|
|
7944
|
-
setTimeout(() => {
|
|
7945
|
-
el.classList.remove(styles$1["f-function-notification-visible"]);
|
|
7946
|
-
}, 1e3);
|
|
7947
|
-
setTimeout(() => {
|
|
7948
|
-
if (el.parentNode) el.parentNode.removeChild(el);
|
|
7949
|
-
if (container2.children.length === 0) container2.remove();
|
|
7950
|
-
}, 2e3);
|
|
8207
|
+
dismissNotificationElement(el);
|
|
7951
8208
|
};
|
|
7952
8209
|
const fConvertFileToBase64 = (file, deletePrefix = false) => {
|
|
7953
8210
|
return new Promise((resolve, reject) => {
|