fui-material 2.7.16 → 2.7.18
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 +640 -386
- 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/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
|
|
@@ -715,26 +715,26 @@ const FPaper = ({
|
|
|
715
715
|
}
|
|
716
716
|
);
|
|
717
717
|
};
|
|
718
|
-
const bordered = "
|
|
719
|
-
const left$1 = "
|
|
720
|
-
const center = "
|
|
721
|
-
const right = "
|
|
718
|
+
const bordered = "_bordered_1clfu_18";
|
|
719
|
+
const left$1 = "_left_1clfu_40";
|
|
720
|
+
const center = "_center_1clfu_43";
|
|
721
|
+
const right = "_right_1clfu_46";
|
|
722
722
|
const styles$t = {
|
|
723
|
-
"f-table-component": "_f-table-
|
|
724
|
-
"f-table-component__table": "_f-table-
|
|
723
|
+
"f-table-component": "_f-table-component_1clfu_1",
|
|
724
|
+
"f-table-component__table": "_f-table-component__table_1clfu_7",
|
|
725
725
|
bordered,
|
|
726
|
-
"bordered-half": "_bordered-
|
|
727
|
-
"f-table-component__table_header": "_f-table-
|
|
728
|
-
"is-sticky": "_is-
|
|
729
|
-
"f-table-component__table_header-cell": "_f-table-component__table_header-
|
|
726
|
+
"bordered-half": "_bordered-half_1clfu_22",
|
|
727
|
+
"f-table-component__table_header": "_f-table-component__table_header_1clfu_25",
|
|
728
|
+
"is-sticky": "_is-sticky_1clfu_29",
|
|
729
|
+
"f-table-component__table_header-cell": "_f-table-component__table_header-cell_1clfu_37",
|
|
730
730
|
left: left$1,
|
|
731
731
|
center,
|
|
732
732
|
right,
|
|
733
|
-
"f-table-component__table_body": "_f-table-
|
|
734
|
-
"f-table-component__table_row": "_f-table-
|
|
735
|
-
"f-table-component__table_row_no-hover": "_f-table-component__table_row_no-
|
|
736
|
-
"f-table-component__table_body-cell": "_f-table-component__table_body-
|
|
737
|
-
"f-table-component__table_footer": "_f-table-
|
|
733
|
+
"f-table-component__table_body": "_f-table-component__table_body_1clfu_65",
|
|
734
|
+
"f-table-component__table_row": "_f-table-component__table_row_1clfu_68",
|
|
735
|
+
"f-table-component__table_row_no-hover": "_f-table-component__table_row_no-hover_1clfu_68",
|
|
736
|
+
"f-table-component__table_body-cell": "_f-table-component__table_body-cell_1clfu_81",
|
|
737
|
+
"f-table-component__table_footer": "_f-table-component__table_footer_1clfu_97"
|
|
738
738
|
};
|
|
739
739
|
const FTableHead = ({
|
|
740
740
|
st,
|
|
@@ -1021,20 +1021,20 @@ const FTableFooter = ({
|
|
|
1021
1021
|
}
|
|
1022
1022
|
);
|
|
1023
1023
|
};
|
|
1024
|
-
const entering = "
|
|
1025
|
-
const exiting = "
|
|
1026
|
-
const hide = "
|
|
1024
|
+
const entering = "_entering_wcyn4_19";
|
|
1025
|
+
const exiting = "_exiting_wcyn4_25";
|
|
1026
|
+
const hide = "_hide_wcyn4_50";
|
|
1027
1027
|
const styles$s = {
|
|
1028
|
-
"f-dialog": "_f-
|
|
1028
|
+
"f-dialog": "_f-dialog_wcyn4_1",
|
|
1029
1029
|
entering,
|
|
1030
|
-
"f-dialog__content": "_f-
|
|
1030
|
+
"f-dialog__content": "_f-dialog__content_wcyn4_22",
|
|
1031
1031
|
exiting,
|
|
1032
1032
|
hide,
|
|
1033
|
-
"f-dialog__header": "_f-
|
|
1034
|
-
"f-dialog__header_title": "_f-
|
|
1035
|
-
"f-dialog__header_close": "_f-
|
|
1036
|
-
"f-dialog__body": "_f-
|
|
1037
|
-
"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"
|
|
1038
1038
|
};
|
|
1039
1039
|
let openDialogsCount = 0;
|
|
1040
1040
|
const FDialog = ({
|
|
@@ -1164,14 +1164,22 @@ FCloseIcon.displayName = "FCloseIcon";
|
|
|
1164
1164
|
const FDialogHeader = ({ title: title2, handleClose }) => {
|
|
1165
1165
|
return /* @__PURE__ */ jsxs("div", { className: styles$s["f-dialog__header"], children: [
|
|
1166
1166
|
/* @__PURE__ */ jsx("h3", { className: styles$s["f-dialog__header_title"], children: title2 }),
|
|
1167
|
-
handleClose && /* @__PURE__ */ jsx(
|
|
1168
|
-
|
|
1167
|
+
handleClose && /* @__PURE__ */ jsx(
|
|
1168
|
+
"button",
|
|
1169
1169
|
{
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
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
|
+
)
|
|
1173
1181
|
}
|
|
1174
|
-
)
|
|
1182
|
+
)
|
|
1175
1183
|
] });
|
|
1176
1184
|
};
|
|
1177
1185
|
const FDialogBody = ({ st, children, scroll = true }) => {
|
|
@@ -1192,26 +1200,26 @@ const FDialogFooter = ({ children, className, st, id }) => {
|
|
|
1192
1200
|
}
|
|
1193
1201
|
);
|
|
1194
1202
|
};
|
|
1195
|
-
const loader = "
|
|
1196
|
-
const primary = "
|
|
1197
|
-
const secondary = "
|
|
1198
|
-
const success$
|
|
1199
|
-
const danger = "
|
|
1200
|
-
const warning$
|
|
1201
|
-
const info$
|
|
1202
|
-
const light = "
|
|
1203
|
-
const dark = "
|
|
1204
|
-
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";
|
|
1205
1213
|
const styles$r = {
|
|
1206
|
-
"authorization-spinner": "_authorization-
|
|
1207
|
-
"spinner-item": "_spinner-
|
|
1214
|
+
"authorization-spinner": "_authorization-spinner_1glrn_1",
|
|
1215
|
+
"spinner-item": "_spinner-item_1glrn_7",
|
|
1208
1216
|
loader,
|
|
1209
1217
|
primary,
|
|
1210
1218
|
secondary,
|
|
1211
|
-
success: success$
|
|
1219
|
+
success: success$2,
|
|
1212
1220
|
danger,
|
|
1213
|
-
warning: warning$
|
|
1214
|
-
info: info$
|
|
1221
|
+
warning: warning$5,
|
|
1222
|
+
info: info$3,
|
|
1215
1223
|
light,
|
|
1216
1224
|
dark,
|
|
1217
1225
|
link
|
|
@@ -1261,7 +1269,7 @@ const FPreloader = ({
|
|
|
1261
1269
|
);
|
|
1262
1270
|
};
|
|
1263
1271
|
const styles$p = {
|
|
1264
|
-
"f-checkbox": "_f-
|
|
1272
|
+
"f-checkbox": "_f-checkbox_1hxs0_1"
|
|
1265
1273
|
};
|
|
1266
1274
|
const FCheckbox = forwardRef(
|
|
1267
1275
|
({
|
|
@@ -1284,7 +1292,7 @@ const FCheckbox = forwardRef(
|
|
|
1284
1292
|
}
|
|
1285
1293
|
);
|
|
1286
1294
|
const styles$o = {
|
|
1287
|
-
"f-radio": "_f-
|
|
1295
|
+
"f-radio": "_f-radio_1oidm_1"
|
|
1288
1296
|
};
|
|
1289
1297
|
const FRadioButton = forwardRef(
|
|
1290
1298
|
({
|
|
@@ -1353,14 +1361,14 @@ const usePagination = ({
|
|
|
1353
1361
|
}, [totalCount, pageSize, siblingCount, currentPage]);
|
|
1354
1362
|
return paginationRange;
|
|
1355
1363
|
};
|
|
1356
|
-
const dots = "
|
|
1357
|
-
const selected$1 = "
|
|
1358
|
-
const disabled$3 = "
|
|
1359
|
-
const arrow = "
|
|
1360
|
-
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";
|
|
1361
1369
|
const styles$n = {
|
|
1362
|
-
"pagination-container": "_pagination-
|
|
1363
|
-
"pagination-item": "_pagination-
|
|
1370
|
+
"pagination-container": "_pagination-container_uiqea_1",
|
|
1371
|
+
"pagination-item": "_pagination-item_uiqea_9",
|
|
1364
1372
|
dots,
|
|
1365
1373
|
selected: selected$1,
|
|
1366
1374
|
disabled: disabled$3,
|
|
@@ -1673,16 +1681,16 @@ const FOpenImgFull = ({
|
|
|
1673
1681
|
}
|
|
1674
1682
|
);
|
|
1675
1683
|
};
|
|
1676
|
-
const card$2 = "
|
|
1677
|
-
const warning$
|
|
1678
|
-
const info$
|
|
1679
|
-
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";
|
|
1680
1688
|
const styles$k = {
|
|
1681
1689
|
card: card$2,
|
|
1682
|
-
warning: warning$
|
|
1683
|
-
info: info$
|
|
1690
|
+
warning: warning$4,
|
|
1691
|
+
info: info$2,
|
|
1684
1692
|
alert,
|
|
1685
|
-
"fv-accord-title": "_fv-accord-
|
|
1693
|
+
"fv-accord-title": "_fv-accord-title_1wjhl_57"
|
|
1686
1694
|
};
|
|
1687
1695
|
const FAccordion = ({
|
|
1688
1696
|
variant = "info",
|
|
@@ -1722,14 +1730,14 @@ const FAccordion = ({
|
|
|
1722
1730
|
}
|
|
1723
1731
|
);
|
|
1724
1732
|
};
|
|
1725
|
-
const container$1 = "
|
|
1733
|
+
const container$1 = "_container_qk7bc_1";
|
|
1726
1734
|
const styles$j = {
|
|
1727
1735
|
container: container$1,
|
|
1728
|
-
"custom-file": "_custom-
|
|
1729
|
-
"custom-file-input": "_custom-file-
|
|
1730
|
-
"custom-file-dropzone": "_custom-file-
|
|
1731
|
-
"custom-file-label": "_custom-file-
|
|
1732
|
-
"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"
|
|
1733
1741
|
};
|
|
1734
1742
|
const FInputFileForm = ({
|
|
1735
1743
|
id,
|
|
@@ -2068,15 +2076,15 @@ const FFullDateField = forwardRef(
|
|
|
2068
2076
|
);
|
|
2069
2077
|
}
|
|
2070
2078
|
);
|
|
2071
|
-
const active$3 = "
|
|
2079
|
+
const active$3 = "_active_1h0yy_41";
|
|
2072
2080
|
const styles$h = {
|
|
2073
|
-
"f-select-search-db": "_f-select-search-
|
|
2074
|
-
"f-select-search-db__input": "_f-select-search-
|
|
2075
|
-
"f-select-search-db__input_field": "_f-select-search-
|
|
2076
|
-
"f-select-search-db__input_arrow": "_f-select-search-
|
|
2077
|
-
"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",
|
|
2078
2086
|
active: active$3,
|
|
2079
|
-
"f-select-search-db__dropdown_content": "_f-select-search-
|
|
2087
|
+
"f-select-search-db__dropdown_content": "_f-select-search-db__dropdown_content_1h0yy_45"
|
|
2080
2088
|
};
|
|
2081
2089
|
const FSelectSearchDb = ({
|
|
2082
2090
|
fetchingFunc,
|
|
@@ -2427,8 +2435,8 @@ const FAlert = ({
|
|
|
2427
2435
|
buttonClose = false,
|
|
2428
2436
|
size
|
|
2429
2437
|
}) => {
|
|
2430
|
-
const
|
|
2431
|
-
const
|
|
2438
|
+
const visible2 = useRef();
|
|
2439
|
+
const hidden2 = useRef();
|
|
2432
2440
|
const close = useRef();
|
|
2433
2441
|
const [randomId] = useState(fGenerateUniqueId());
|
|
2434
2442
|
let newTime = displayTime;
|
|
@@ -2446,7 +2454,7 @@ const FAlert = ({
|
|
|
2446
2454
|
});
|
|
2447
2455
|
}
|
|
2448
2456
|
}
|
|
2449
|
-
|
|
2457
|
+
visible2.current = setTimeout(() => {
|
|
2450
2458
|
if (open) {
|
|
2451
2459
|
const el = document.querySelector(`#f-block-alert-${randomId}`);
|
|
2452
2460
|
if (el !== null) {
|
|
@@ -2461,7 +2469,7 @@ const FAlert = ({
|
|
|
2461
2469
|
const el = document.querySelector(`#f-block-alert-${randomId}`);
|
|
2462
2470
|
if (el !== null) {
|
|
2463
2471
|
progress2.style.transition = `${newTime}s linear`;
|
|
2464
|
-
|
|
2472
|
+
hidden2.current = setTimeout(() => {
|
|
2465
2473
|
el.classList.remove("f-alert-visible");
|
|
2466
2474
|
el.classList.add("f-alert-hidden");
|
|
2467
2475
|
}, (newTime - 1) * 1e3);
|
|
@@ -2616,8 +2624,8 @@ const FAlert = ({
|
|
|
2616
2624
|
onClose(false);
|
|
2617
2625
|
el.classList.remove("f-alert-visible");
|
|
2618
2626
|
el.classList.remove("f-alert-hidden");
|
|
2619
|
-
clearTimeout(
|
|
2620
|
-
clearTimeout(
|
|
2627
|
+
clearTimeout(visible2.current);
|
|
2628
|
+
clearTimeout(hidden2.current);
|
|
2621
2629
|
clearTimeout(close.current);
|
|
2622
2630
|
}
|
|
2623
2631
|
}
|
|
@@ -2707,14 +2715,14 @@ const FNative = ({
|
|
|
2707
2715
|
)
|
|
2708
2716
|
] });
|
|
2709
2717
|
};
|
|
2710
|
-
const horizontal = "
|
|
2711
|
-
const vertical = "
|
|
2712
|
-
const active$2 = "
|
|
2718
|
+
const horizontal = "_horizontal_1djm2_1";
|
|
2719
|
+
const vertical = "_vertical_1djm2_7";
|
|
2720
|
+
const active$2 = "_active_1djm2_51";
|
|
2713
2721
|
const styles$f = {
|
|
2714
|
-
"f-tabs": "_f-
|
|
2722
|
+
"f-tabs": "_f-tabs_1djm2_1",
|
|
2715
2723
|
horizontal,
|
|
2716
2724
|
vertical,
|
|
2717
|
-
"f-tabs__tab": "_f-
|
|
2725
|
+
"f-tabs__tab": "_f-tabs__tab_1djm2_16",
|
|
2718
2726
|
active: active$2
|
|
2719
2727
|
};
|
|
2720
2728
|
const FTabs = ({
|
|
@@ -2857,12 +2865,12 @@ const FDropdownItem = ({
|
|
|
2857
2865
|
);
|
|
2858
2866
|
};
|
|
2859
2867
|
const styles$d = {
|
|
2860
|
-
"f-search-box": "_f-search-
|
|
2861
|
-
"f-search-box__input": "_f-search-
|
|
2862
|
-
"f-search-box__button": "_f-search-
|
|
2863
|
-
"f-search-box__button_search": "_f-search-
|
|
2864
|
-
"clear-on": "_clear-
|
|
2865
|
-
"f-search-box__button_clear": "_f-search-
|
|
2868
|
+
"f-search-box": "_f-search-box_1myd9_1",
|
|
2869
|
+
"f-search-box__input": "_f-search-box__input_1myd9_6",
|
|
2870
|
+
"f-search-box__button": "_f-search-box__button_1myd9_12",
|
|
2871
|
+
"f-search-box__button_search": "_f-search-box__button_search_1myd9_18",
|
|
2872
|
+
"clear-on": "_clear-on_1myd9_22",
|
|
2873
|
+
"f-search-box__button_clear": "_f-search-box__button_clear_1myd9_25"
|
|
2866
2874
|
};
|
|
2867
2875
|
const FSearchBox = forwardRef(
|
|
2868
2876
|
({
|
|
@@ -3081,9 +3089,9 @@ const FCarouselItem = ({
|
|
|
3081
3089
|
}) => {
|
|
3082
3090
|
return /* @__PURE__ */ jsx("div", { className: `${styles$c["f-carousel-item"]} ${className || ""}`, id, children });
|
|
3083
3091
|
};
|
|
3084
|
-
const skeleton = "
|
|
3092
|
+
const skeleton = "_skeleton_3ica6_1";
|
|
3085
3093
|
const styles$b = {
|
|
3086
|
-
"skeleton-block": "_skeleton-
|
|
3094
|
+
"skeleton-block": "_skeleton-block_3ica6_1",
|
|
3087
3095
|
skeleton
|
|
3088
3096
|
};
|
|
3089
3097
|
const FSkeleton = ({ children, enable, width, height }) => {
|
|
@@ -4571,161 +4579,301 @@ const FArrowDownCircleIcon = React.forwardRef(({
|
|
|
4571
4579
|
);
|
|
4572
4580
|
});
|
|
4573
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";
|
|
4574
4588
|
const styles$5 = {
|
|
4575
|
-
"f-function-block-alert": "_f-function-block-
|
|
4576
|
-
|
|
4577
|
-
|
|
4578
|
-
"
|
|
4579
|
-
"
|
|
4580
|
-
"
|
|
4581
|
-
"
|
|
4582
|
-
"
|
|
4583
|
-
"
|
|
4584
|
-
"
|
|
4585
|
-
"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"
|
|
4586
4609
|
};
|
|
4587
4610
|
const fAlert = ({ title: title2, body, variant = "info" }) => {
|
|
4588
|
-
|
|
4589
|
-
|
|
4590
|
-
|
|
4591
|
-
|
|
4592
|
-
|
|
4593
|
-
|
|
4594
|
-
|
|
4595
|
-
|
|
4596
|
-
|
|
4597
|
-
|
|
4598
|
-
|
|
4599
|
-
|
|
4600
|
-
|
|
4601
|
-
|
|
4602
|
-
|
|
4603
|
-
|
|
4604
|
-
|
|
4605
|
-
|
|
4606
|
-
|
|
4607
|
-
|
|
4608
|
-
|
|
4609
|
-
|
|
4610
|
-
|
|
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}'>
|
|
4611
4646
|
<div class='${styles$5["f-function-alert"]}'>
|
|
4612
|
-
<div class='${styles$5["f-function-alert-
|
|
4613
|
-
<
|
|
4647
|
+
<div class='${styles$5["f-function-alert-top"]}'>
|
|
4648
|
+
<div class='${styles$5["f-function-alert-ico"]} ${styles$5[`${variant}-alert`]}'>
|
|
4614
4649
|
${ico}
|
|
4615
|
-
</
|
|
4616
|
-
</div>
|
|
4617
|
-
<div class='${styles$5["f-function-alert-inside"]}'>
|
|
4650
|
+
</div>
|
|
4618
4651
|
<div class='${styles$5["f-function-alert-header"]}'>
|
|
4619
4652
|
<h4>${title2 || ""}</h4>
|
|
4620
4653
|
</div>
|
|
4621
|
-
<
|
|
4622
|
-
|
|
4623
|
-
|
|
4624
|
-
|
|
4625
|
-
|
|
4626
|
-
|
|
4627
|
-
|
|
4628
|
-
|
|
4629
|
-
|
|
4630
|
-
|
|
4631
|
-
|
|
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>
|
|
4632
4672
|
</div>
|
|
4633
4673
|
</div>
|
|
4634
4674
|
</div>
|
|
4635
|
-
|
|
4636
|
-
|
|
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
|
+
});
|
|
4637
4731
|
};
|
|
4638
|
-
const
|
|
4732
|
+
const visible$1 = "_visible_1jeyg_19";
|
|
4733
|
+
const hidden$1 = "_hidden_1jeyg_22";
|
|
4734
|
+
const warning$2 = "_warning_1jeyg_73";
|
|
4639
4735
|
const styles$4 = {
|
|
4640
|
-
"f-function-block-confirm": "_f-function-block-
|
|
4641
|
-
|
|
4642
|
-
|
|
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",
|
|
4643
4742
|
warning: warning$2,
|
|
4644
|
-
"f-function-confirm-
|
|
4645
|
-
"f-function-confirm-
|
|
4646
|
-
"f-function-confirm-
|
|
4647
|
-
"
|
|
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"
|
|
4648
4749
|
};
|
|
4649
4750
|
const fConfirm = ({ title: title2, body }) => {
|
|
4650
4751
|
return new Promise((resolve) => {
|
|
4752
|
+
const blockId = "f-function-block-confirm-" + fGenerateUniqueId();
|
|
4651
4753
|
window.document.body.insertAdjacentHTML(
|
|
4652
4754
|
"afterbegin",
|
|
4653
4755
|
`
|
|
4654
|
-
<div class='${styles$4["f-function-block-confirm"]}' id='
|
|
4756
|
+
<div class='${styles$4["f-function-block-confirm"]}' id='${blockId}'>
|
|
4655
4757
|
<div class='${styles$4["f-function-confirm"]}'>
|
|
4656
|
-
<div class='${styles$4["f-function-confirm-
|
|
4657
|
-
<
|
|
4658
|
-
<
|
|
4659
|
-
|
|
4660
|
-
|
|
4661
|
-
|
|
4662
|
-
|
|
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>
|
|
4663
4766
|
<div class='${styles$4["f-function-confirm-header"]}'>
|
|
4664
4767
|
<h4>${title2 || ""}</h4>
|
|
4665
4768
|
</div>
|
|
4666
|
-
<
|
|
4667
|
-
<
|
|
4668
|
-
|
|
4669
|
-
|
|
4670
|
-
|
|
4671
|
-
|
|
4672
|
-
|
|
4673
|
-
|
|
4674
|
-
|
|
4675
|
-
|
|
4676
|
-
|
|
4677
|
-
|
|
4678
|
-
|
|
4679
|
-
|
|
4680
|
-
|
|
4681
|
-
|
|
4682
|
-
|
|
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>
|
|
4683
4794
|
</div>
|
|
4684
4795
|
</div>
|
|
4685
4796
|
</div>
|
|
4686
4797
|
`
|
|
4687
4798
|
);
|
|
4688
|
-
const
|
|
4689
|
-
const okBtn = document.getElementById(
|
|
4690
|
-
const cancelBtn = document.getElementById(
|
|
4691
|
-
const
|
|
4692
|
-
|
|
4693
|
-
okBtn == null ? void 0 : okBtn.removeEventListener("click", handleOk);
|
|
4694
|
-
cancelBtn == null ? void 0 : cancelBtn.removeEventListener("click", handleCancel);
|
|
4695
|
-
modalBlock == null ? void 0 : modalBlock.remove();
|
|
4696
|
-
};
|
|
4697
|
-
const handleOk = () => {
|
|
4698
|
-
closeModal();
|
|
4699
|
-
resolve(true);
|
|
4700
|
-
};
|
|
4701
|
-
const handleCancel = () => {
|
|
4702
|
-
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) {
|
|
4703
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);
|
|
4704
4838
|
};
|
|
4705
4839
|
const handleKeyDown = (e) => {
|
|
4706
4840
|
if (e.key === "Enter") {
|
|
4707
4841
|
e.preventDefault();
|
|
4708
|
-
|
|
4709
|
-
}
|
|
4710
|
-
|
|
4711
|
-
|
|
4842
|
+
closeModal(true);
|
|
4843
|
+
} else if (e.key === "Escape") {
|
|
4844
|
+
e.preventDefault();
|
|
4845
|
+
closeModal(false);
|
|
4712
4846
|
}
|
|
4713
4847
|
};
|
|
4714
|
-
|
|
4715
|
-
|
|
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));
|
|
4716
4856
|
window.addEventListener("keydown", handleKeyDown);
|
|
4717
4857
|
});
|
|
4718
4858
|
};
|
|
4719
|
-
const
|
|
4859
|
+
const visible = "_visible_1nxa7_19";
|
|
4860
|
+
const hidden = "_hidden_1nxa7_22";
|
|
4861
|
+
const warning$1 = "_warning_1nxa7_73";
|
|
4720
4862
|
const styles$3 = {
|
|
4721
|
-
"f-function-block-prompt": "_f-function-block-
|
|
4722
|
-
|
|
4723
|
-
|
|
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",
|
|
4724
4869
|
warning: warning$1,
|
|
4725
|
-
"f-function-prompt-
|
|
4726
|
-
"f-function-prompt-
|
|
4727
|
-
"f-function-prompt-
|
|
4728
|
-
"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"
|
|
4729
4877
|
};
|
|
4730
4878
|
function getValue(element) {
|
|
4731
4879
|
if (element) {
|
|
@@ -4736,59 +4884,119 @@ function getValue(element) {
|
|
|
4736
4884
|
}
|
|
4737
4885
|
const fPrompt = ({ title: title2, body }) => {
|
|
4738
4886
|
return new Promise((resolve) => {
|
|
4887
|
+
const blockId = "f-function-block-prompt-" + fGenerateUniqueId();
|
|
4739
4888
|
window.document.body.insertAdjacentHTML(
|
|
4740
4889
|
"afterbegin",
|
|
4741
4890
|
`
|
|
4742
|
-
<div class='${styles$3["f-function-block-prompt"]}' id='
|
|
4891
|
+
<div class='${styles$3["f-function-block-prompt"]}' id='${blockId}'>
|
|
4743
4892
|
<div class='${styles$3["f-function-prompt"]}'>
|
|
4744
|
-
|
|
4745
|
-
<
|
|
4746
|
-
<
|
|
4747
|
-
|
|
4748
|
-
|
|
4749
|
-
|
|
4750
|
-
<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>
|
|
4751
4899
|
<div class='${styles$3["f-function-prompt-header"]}'>
|
|
4752
4900
|
<h4>${title2 || ""}</h4>
|
|
4753
4901
|
</div>
|
|
4754
|
-
<
|
|
4755
|
-
<
|
|
4756
|
-
|
|
4757
|
-
|
|
4758
|
-
|
|
4759
|
-
|
|
4760
|
-
|
|
4761
|
-
|
|
4762
|
-
|
|
4763
|
-
|
|
4764
|
-
|
|
4765
|
-
|
|
4766
|
-
|
|
4767
|
-
|
|
4768
|
-
|
|
4769
|
-
|
|
4770
|
-
|
|
4771
|
-
|
|
4772
|
-
|
|
4773
|
-
|
|
4774
|
-
|
|
4775
|
-
|
|
4776
|
-
|
|
4777
|
-
|
|
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>
|
|
4778
4934
|
</div>
|
|
4779
4935
|
</div>
|
|
4780
4936
|
</div>
|
|
4781
4937
|
`
|
|
4782
4938
|
);
|
|
4783
|
-
const
|
|
4784
|
-
const
|
|
4785
|
-
const
|
|
4786
|
-
|
|
4787
|
-
|
|
4788
|
-
|
|
4789
|
-
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) {
|
|
4790
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
|
+
}
|
|
4791
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);
|
|
4792
5000
|
});
|
|
4793
5001
|
};
|
|
4794
5002
|
class TSZip {
|
|
@@ -7786,34 +7994,61 @@ const fExportingHtmlToXlsx = async (data) => {
|
|
|
7786
7994
|
}
|
|
7787
7995
|
};
|
|
7788
7996
|
const fInstallFormatCodeXlsx = (data) => installFormatCode(data);
|
|
7789
|
-
const info = "
|
|
7790
|
-
const error = "
|
|
7791
|
-
const success = "
|
|
7792
|
-
const warning = "
|
|
7997
|
+
const info = "_info_hz0rr_93";
|
|
7998
|
+
const error = "_error_hz0rr_97";
|
|
7999
|
+
const success = "_success_hz0rr_101";
|
|
8000
|
+
const warning = "_warning_hz0rr_105";
|
|
7793
8001
|
const styles$1 = {
|
|
7794
|
-
"f-function-block-notification": "_f-function-block-
|
|
7795
|
-
"f-function-notification": "_f-function-
|
|
7796
|
-
"f-function-notification-
|
|
7797
|
-
"
|
|
7798
|
-
"
|
|
7799
|
-
"
|
|
7800
|
-
"
|
|
7801
|
-
"
|
|
7802
|
-
"
|
|
7803
|
-
"f-function-notification-
|
|
7804
|
-
"f-function-notification-
|
|
7805
|
-
"notification-
|
|
7806
|
-
"
|
|
7807
|
-
"notification-
|
|
7808
|
-
"f-notification-progress": "_f-notification-
|
|
7809
|
-
"f-notification-progress-
|
|
7810
|
-
"
|
|
8002
|
+
"f-function-block-notification": "_f-function-block-notification_hz0rr_35",
|
|
8003
|
+
"f-function-notification-visible": "_f-function-notification-visible_hz0rr_45",
|
|
8004
|
+
"f-function-notification-hidden": "_f-function-notification-hidden_hz0rr_50",
|
|
8005
|
+
"f-function-notification": "_f-function-notification_hz0rr_45",
|
|
8006
|
+
"f-function-notification-ico": "_f-function-notification-ico_hz0rr_79",
|
|
8007
|
+
"info-notification": "_info-notification_hz0rr_93",
|
|
8008
|
+
"error-notification": "_error-notification_hz0rr_97",
|
|
8009
|
+
"success-notification": "_success-notification_hz0rr_101",
|
|
8010
|
+
"warning-notification": "_warning-notification_hz0rr_105",
|
|
8011
|
+
"f-function-notification-inside": "_f-function-notification-inside_hz0rr_109",
|
|
8012
|
+
"f-function-notification-header": "_f-function-notification-header_hz0rr_117",
|
|
8013
|
+
"f-function-notification-body": "_f-function-notification-body_hz0rr_136",
|
|
8014
|
+
"close-not": "_close-not_hz0rr_153",
|
|
8015
|
+
"f-notification-progress": "_f-notification-progress_hz0rr_179",
|
|
8016
|
+
"f-notification-progress-bar": "_f-notification-progress-bar_hz0rr_188",
|
|
8017
|
+
"f-notification-progress-value": "_f-notification-progress-value_hz0rr_193",
|
|
8018
|
+
"notification-progress-shrink": "_notification-progress-shrink_hz0rr_1",
|
|
7811
8019
|
info,
|
|
7812
8020
|
error,
|
|
7813
8021
|
success,
|
|
7814
|
-
warning
|
|
7815
|
-
|
|
7816
|
-
|
|
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);
|
|
7817
8052
|
};
|
|
7818
8053
|
const fNotification = ({
|
|
7819
8054
|
title: title2,
|
|
@@ -7827,54 +8062,61 @@ const fNotification = ({
|
|
|
7827
8062
|
let ico = "";
|
|
7828
8063
|
switch (variant) {
|
|
7829
8064
|
case "info":
|
|
7830
|
-
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>`;
|
|
7831
8070
|
break;
|
|
7832
8071
|
case "success":
|
|
7833
|
-
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>`;
|
|
7834
8076
|
break;
|
|
7835
8077
|
case "error":
|
|
7836
|
-
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>`;
|
|
7837
8083
|
break;
|
|
7838
8084
|
case "warning":
|
|
7839
|
-
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>`;
|
|
7840
8090
|
break;
|
|
7841
8091
|
}
|
|
7842
|
-
const arrBody =
|
|
7843
|
-
body.split("\n").map((opt) => {
|
|
7844
|
-
arrBody.push(
|
|
7845
|
-
`<span>${opt}</span>`
|
|
7846
|
-
);
|
|
7847
|
-
});
|
|
8092
|
+
const arrBody = body.split("\n").map((opt) => `<span>${opt}</span>`);
|
|
7848
8093
|
const randId = fGenerateUniqueId();
|
|
7849
|
-
const
|
|
8094
|
+
const elementId = id !== void 0 ? id : "f-function-block-notification-" + randId;
|
|
7850
8095
|
const not = `
|
|
7851
|
-
<div class='${styles$1["f-function-block-notification"]}' id="${
|
|
8096
|
+
<div class='${styles$1["f-function-block-notification"]}' id="${elementId}">
|
|
7852
8097
|
<div class='${styles$1["f-function-notification"]}'>
|
|
7853
8098
|
<div class='${styles$1["f-function-notification-ico"]} ${styles$1[variant + "-notification"]}'>
|
|
7854
|
-
|
|
7855
|
-
${ico}
|
|
7856
|
-
</svg>
|
|
8099
|
+
${ico}
|
|
7857
8100
|
</div>
|
|
7858
8101
|
<div class='${styles$1["f-function-notification-inside"]}'>
|
|
7859
8102
|
<div class='${styles$1["f-function-notification-header"]}'>
|
|
7860
8103
|
<h4>${title2 !== void 0 ? title2 : ""}</h4>
|
|
7861
|
-
${buttonClose ? `<
|
|
7862
|
-
|
|
7863
|
-
|
|
7864
|
-
|
|
7865
|
-
|
|
7866
|
-
|
|
7867
|
-
</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>` : ""}
|
|
7868
8110
|
</div>
|
|
7869
8111
|
<div class='${styles$1["f-function-notification-body"]}'>
|
|
7870
8112
|
${arrBody.join("")}
|
|
7871
8113
|
</div>
|
|
7872
8114
|
</div>
|
|
7873
|
-
|
|
7874
|
-
|
|
7875
|
-
<div class="${styles$1["f-notification-progress-value"]} ${styles$1[variant]}"
|
|
7876
|
-
|
|
7877
|
-
|
|
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>` : ""}
|
|
7878
8120
|
</div>
|
|
7879
8121
|
</div>
|
|
7880
8122
|
`;
|
|
@@ -7887,70 +8129,82 @@ const fNotification = ({
|
|
|
7887
8129
|
}
|
|
7888
8130
|
return blockNotification2;
|
|
7889
8131
|
};
|
|
7890
|
-
const removeEmptyNotificationBlock = () => {
|
|
7891
|
-
var _a;
|
|
7892
|
-
const blockNotification2 = document.querySelector("#block-notification");
|
|
7893
|
-
if (blockNotification2 && blockNotification2.children.length === 0) {
|
|
7894
|
-
(_a = blockNotification2.parentNode) == null ? void 0 : _a.removeChild(blockNotification2);
|
|
7895
|
-
}
|
|
7896
|
-
};
|
|
7897
8132
|
const blockNotification = getOrCreateNotificationBlock();
|
|
7898
8133
|
blockNotification.insertAdjacentHTML("afterbegin", not);
|
|
7899
8134
|
blockNotification.scrollTo({ top: 0, behavior: "smooth" });
|
|
7900
|
-
|
|
7901
|
-
|
|
7902
|
-
|
|
7903
|
-
|
|
7904
|
-
|
|
7905
|
-
|
|
7906
|
-
el.classList.
|
|
7907
|
-
el.classList.add(styles$1["f-function-notification-hidden"]);
|
|
7908
|
-
setTimeout(() => {
|
|
7909
|
-
if (el.parentNode) {
|
|
7910
|
-
el.parentNode.removeChild(el);
|
|
7911
|
-
}
|
|
7912
|
-
removeEmptyNotificationBlock();
|
|
7913
|
-
}, 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"]);
|
|
7914
8142
|
});
|
|
7915
|
-
}
|
|
8143
|
+
});
|
|
8144
|
+
} else {
|
|
8145
|
+
setTimeout(() => {
|
|
8146
|
+
el.classList.add(styles$1["f-function-notification-visible"]);
|
|
8147
|
+
}, 20);
|
|
7916
8148
|
}
|
|
7917
|
-
|
|
7918
|
-
|
|
7919
|
-
|
|
7920
|
-
|
|
7921
|
-
|
|
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
|
+
}
|
|
7922
8157
|
}
|
|
7923
|
-
|
|
7924
|
-
|
|
7925
|
-
|
|
7926
|
-
|
|
7927
|
-
|
|
7928
|
-
|
|
7929
|
-
|
|
7930
|
-
|
|
7931
|
-
|
|
7932
|
-
|
|
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;
|
|
7933
8184
|
}
|
|
7934
|
-
|
|
7935
|
-
|
|
8185
|
+
el.removeEventListener("mouseenter", pauseTimer);
|
|
8186
|
+
el.removeEventListener("mouseleave", resumeTimer);
|
|
8187
|
+
};
|
|
8188
|
+
el.addEventListener("mouseenter", pauseTimer);
|
|
8189
|
+
el.addEventListener("mouseleave", resumeTimer);
|
|
8190
|
+
startTimer();
|
|
7936
8191
|
}
|
|
7937
8192
|
}
|
|
7938
|
-
resolve(`#${
|
|
8193
|
+
resolve(`#${elementId}`);
|
|
7939
8194
|
});
|
|
7940
8195
|
};
|
|
7941
8196
|
const fNotificationDelete = (id) => {
|
|
7942
|
-
|
|
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
|
+
}
|
|
7943
8206
|
if (!el) return;
|
|
7944
|
-
|
|
7945
|
-
if (!container2) return;
|
|
7946
|
-
el.className = styles$1["f-function-notification-hidden"];
|
|
7947
|
-
setTimeout(() => {
|
|
7948
|
-
el.classList.remove(styles$1["f-function-notification-visible"]);
|
|
7949
|
-
}, 1e3);
|
|
7950
|
-
setTimeout(() => {
|
|
7951
|
-
if (el.parentNode) el.parentNode.removeChild(el);
|
|
7952
|
-
if (container2.children.length === 0) container2.remove();
|
|
7953
|
-
}, 2e3);
|
|
8207
|
+
dismissNotificationElement(el);
|
|
7954
8208
|
};
|
|
7955
8209
|
const fConvertFileToBase64 = (file, deletePrefix = false) => {
|
|
7956
8210
|
return new Promise((resolve, reject) => {
|