@daisforge/ui 1.11.0 → 1.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/chunks/FormDatePickers-BCyW24Pr.cjs +1 -0
- package/chunks/{FormDatePickers-BClwflaz.mjs → FormDatePickers-DfdGdbwP.mjs} +205 -202
- package/chunks/{FormTextArea-CS8BIeFe.mjs → FormTextArea-CCrYx4pL.mjs} +58 -59
- package/chunks/FormTextArea-sly1mY7h.cjs +1 -0
- package/chunks/{GridDND-Dn1CrBX6.mjs → GridDND-Bycwiynh.mjs} +150 -146
- package/chunks/GridDND-MsZt1fXJ.cjs +1 -0
- package/chunks/{TableCanvas-Cv7CvnON.cjs → TableCanvas-D-sndY82.cjs} +1 -1
- package/chunks/{TableCanvas-BF6IgvLA.mjs → TableCanvas-D4Bck7wv.mjs} +9 -6
- package/components/GridDND/GridDND.styled.d.ts +1 -0
- package/components/GridDND/index.cjs +1 -1
- package/components/GridDND/index.d.ts +1 -0
- package/components/GridDND/index.mjs +5 -4
- package/components/GridDND/utils/index.cjs +1 -1
- package/components/GridDND/utils/index.mjs +3 -3
- package/components/TableCanvas/TableGlideInstance/adapters/column/index.cjs +1 -1
- package/components/TableCanvas/TableGlideInstance/adapters/column/index.mjs +1 -1
- package/components/TableCanvas/TableGlideInstance/adapters/index.cjs +1 -1
- package/components/TableCanvas/TableGlideInstance/adapters/index.mjs +1 -1
- package/components/TableCanvas/TableGlideInstance/index.cjs +1 -1
- package/components/TableCanvas/TableGlideInstance/index.mjs +1 -1
- package/components/TableCanvas/TableGlideInstance/utils/column/index.cjs +1 -1
- package/components/TableCanvas/TableGlideInstance/utils/column/index.mjs +1 -1
- package/components/TableCanvas/TableGlideInstance/utils/index.cjs +1 -1
- package/components/TableCanvas/TableGlideInstance/utils/index.mjs +1 -1
- package/components/TableCanvas/components/SplitIconButton/index.cjs +1 -1
- package/components/TableCanvas/components/SplitIconButton/index.mjs +1 -1
- package/components/TableCanvas/components/TableDropdown/index.cjs +1 -1
- package/components/TableCanvas/components/TableDropdown/index.mjs +1 -1
- package/components/TableCanvas/feature-cell-transfer/index.cjs +1 -1
- package/components/TableCanvas/feature-cell-transfer/index.mjs +1 -1
- package/components/TableCanvas/feature-collapse-table/index.cjs +1 -1
- package/components/TableCanvas/feature-collapse-table/index.mjs +1 -1
- package/components/TableCanvas/feature-column-control/ColumnsList/index.cjs +1 -1
- package/components/TableCanvas/feature-column-control/ColumnsList/index.mjs +1 -1
- package/components/TableCanvas/feature-column-control/index.cjs +1 -1
- package/components/TableCanvas/feature-column-control/index.mjs +1 -1
- package/components/TableCanvas/feature-columns-grouping/index.cjs +1 -1
- package/components/TableCanvas/feature-columns-grouping/index.mjs +1 -1
- package/components/TableCanvas/feature-content-state/index.cjs +1 -1
- package/components/TableCanvas/feature-content-state/index.mjs +1 -1
- package/components/TableCanvas/feature-context-menu/index.cjs +1 -1
- package/components/TableCanvas/feature-context-menu/index.mjs +1 -1
- package/components/TableCanvas/feature-edit/index.cjs +1 -1
- package/components/TableCanvas/feature-edit/index.mjs +1 -1
- package/components/TableCanvas/feature-filtering/combobox/index.cjs +1 -1
- package/components/TableCanvas/feature-filtering/combobox/index.mjs +1 -1
- package/components/TableCanvas/feature-filtering/filter-list-block/index.cjs +1 -1
- package/components/TableCanvas/feature-filtering/filter-list-block/index.mjs +1 -1
- package/components/TableCanvas/feature-filtering/header-filter-button/index.cjs +1 -1
- package/components/TableCanvas/feature-filtering/header-filter-button/index.mjs +1 -1
- package/components/TableCanvas/feature-filtering/index.cjs +1 -1
- package/components/TableCanvas/feature-filtering/index.mjs +1 -1
- package/components/TableCanvas/feature-filtering/sidebar-filter-block/index.cjs +1 -1
- package/components/TableCanvas/feature-filtering/sidebar-filter-block/index.mjs +1 -1
- package/components/TableCanvas/feature-infinity-scroll/index.cjs +1 -1
- package/components/TableCanvas/feature-infinity-scroll/index.mjs +1 -1
- package/components/TableCanvas/feature-key-text/index.cjs +1 -1
- package/components/TableCanvas/feature-key-text/index.mjs +1 -1
- package/components/TableCanvas/feature-notifications/index.cjs +1 -1
- package/components/TableCanvas/feature-notifications/index.mjs +1 -1
- package/components/TableCanvas/feature-pagination/index.cjs +1 -1
- package/components/TableCanvas/feature-pagination/index.mjs +1 -1
- package/components/TableCanvas/feature-popover-table/context/index.cjs +1 -1
- package/components/TableCanvas/feature-popover-table/context/index.mjs +1 -1
- package/components/TableCanvas/feature-popover-table/hooks/index.cjs +1 -1
- package/components/TableCanvas/feature-popover-table/hooks/index.mjs +1 -1
- package/components/TableCanvas/feature-popover-table/index.cjs +1 -1
- package/components/TableCanvas/feature-popover-table/index.mjs +1 -1
- package/components/TableCanvas/feature-popover-table/utils/index.cjs +1 -1
- package/components/TableCanvas/feature-popover-table/utils/index.mjs +1 -1
- package/components/TableCanvas/feature-right-sidebar/index.cjs +1 -1
- package/components/TableCanvas/feature-right-sidebar/index.mjs +1 -1
- package/components/TableCanvas/feature-row-detail/index.cjs +1 -1
- package/components/TableCanvas/feature-row-detail/index.mjs +1 -1
- package/components/TableCanvas/feature-row-instruments/index.cjs +1 -1
- package/components/TableCanvas/feature-row-instruments/index.mjs +1 -1
- package/components/TableCanvas/feature-row-markers/index.cjs +1 -1
- package/components/TableCanvas/feature-row-markers/index.mjs +1 -1
- package/components/TableCanvas/feature-row-size/index.cjs +1 -1
- package/components/TableCanvas/feature-row-size/index.mjs +1 -1
- package/components/TableCanvas/feature-rows-grouping/index.cjs +1 -1
- package/components/TableCanvas/feature-rows-grouping/index.mjs +1 -1
- package/components/TableCanvas/feature-searching/index.cjs +1 -1
- package/components/TableCanvas/feature-searching/index.mjs +1 -1
- package/components/TableCanvas/feature-select-row/index.cjs +1 -1
- package/components/TableCanvas/feature-select-row/index.mjs +1 -1
- package/components/TableCanvas/feature-sorting/index.cjs +1 -1
- package/components/TableCanvas/feature-sorting/index.mjs +1 -1
- package/components/TableCanvas/feature-table-settings/index.cjs +1 -1
- package/components/TableCanvas/feature-table-settings/index.mjs +1 -1
- package/components/TableCanvas/feature-tooltip/index.cjs +1 -1
- package/components/TableCanvas/feature-tooltip/index.mjs +1 -1
- package/components/TableCanvas/feature-tooltip/utils/index.cjs +1 -1
- package/components/TableCanvas/feature-tooltip/utils/index.mjs +1 -1
- package/components/TableCanvas/feature-tree/index.cjs +1 -1
- package/components/TableCanvas/feature-tree/index.mjs +1 -1
- package/components/TableCanvas/index.cjs +1 -1
- package/components/TableCanvas/index.mjs +1 -1
- package/components/TableCanvas/renders/formatCell/index.cjs +1 -1
- package/components/TableCanvas/renders/formatCell/index.mjs +1 -1
- package/components/TableCanvas/styles/index.cjs +1 -1
- package/components/TableCanvas/styles/index.mjs +1 -1
- package/components/TableCanvas/table-hooks/index.cjs +1 -1
- package/components/TableCanvas/table-hooks/index.mjs +1 -1
- package/components/TableCanvas/types/index.cjs +1 -1
- package/components/TableCanvas/types/index.mjs +1 -1
- package/components/TableCanvas/utils/index.cjs +1 -1
- package/components/TableCanvas/utils/index.mjs +1 -1
- package/components/TableCanvas/widgets/control-block/compression/index.cjs +1 -1
- package/components/TableCanvas/widgets/control-block/compression/index.mjs +1 -1
- package/components/TableCanvas/widgets/control-block/index.cjs +1 -1
- package/components/TableCanvas/widgets/control-block/index.mjs +1 -1
- package/components/TableCanvas/widgets/control-block/right-side/index.cjs +1 -1
- package/components/TableCanvas/widgets/control-block/right-side/index.mjs +1 -1
- package/components/TableCanvas/widgets/index.cjs +1 -1
- package/components/TableCanvas/widgets/index.mjs +1 -1
- package/components/TableCanvas/widgets/mass-actions/hooks/index.cjs +1 -1
- package/components/TableCanvas/widgets/mass-actions/hooks/index.mjs +1 -1
- package/components/TableCanvas/widgets/mass-actions/index.cjs +1 -1
- package/components/TableCanvas/widgets/mass-actions/index.mjs +1 -1
- package/components/TableGlide/lib/canvas/utils/portalHoverEvents.d.ts +3 -1
- package/formComponents/FormAutocomplete/FormAutocomplete.d.ts +1 -1
- package/formComponents/FormAutocomplete/index.cjs +1 -1
- package/formComponents/FormAutocomplete/index.mjs +40 -38
- package/formComponents/FormCombobox/index.cjs +1 -1
- package/formComponents/FormCombobox/index.mjs +29 -29
- package/formComponents/FormDatePickers/FormDatePicker/FormDatePicker.d.ts +1 -1
- package/formComponents/FormDatePickers/FormDatePicker/index.cjs +1 -1
- package/formComponents/FormDatePickers/FormDatePicker/index.mjs +1 -1
- package/formComponents/FormDatePickers/FormDatePickerRange/FormDatePickerRange.d.ts +1 -1
- package/formComponents/FormDatePickers/FormDatePickerRange/index.cjs +1 -1
- package/formComponents/FormDatePickers/FormDatePickerRange/index.mjs +1 -1
- package/formComponents/FormDatePickers/FormDatePickerRange/lib/utils/index.cjs +1 -1
- package/formComponents/FormDatePickers/FormDatePickerRange/lib/utils/index.mjs +1 -1
- package/formComponents/FormDatePickers/index.cjs +1 -1
- package/formComponents/FormDatePickers/index.mjs +1 -1
- package/formComponents/FormMask/FormMask.d.ts +1 -1
- package/formComponents/FormMask/index.cjs +1 -1
- package/formComponents/FormMask/index.mjs +34 -32
- package/formComponents/FormNumberFormat/FormNumberFormat.d.ts +1 -1
- package/formComponents/FormNumberFormat/index.cjs +1 -1
- package/formComponents/FormNumberFormat/index.mjs +36 -34
- package/formComponents/FormSelect/index.cjs +1 -1
- package/formComponents/FormSelect/index.mjs +21 -21
- package/formComponents/FormTextArea/index.cjs +1 -1
- package/formComponents/FormTextArea/index.mjs +1 -1
- package/formComponents/FormTextArea/ui/index.cjs +1 -1
- package/formComponents/FormTextArea/ui/index.mjs +1 -1
- package/formComponents/FormTextField/index.cjs +1 -1
- package/formComponents/FormTextField/index.mjs +21 -21
- package/index.cjs +1 -1
- package/index.mjs +1552 -1551
- package/package.json +1 -1
- package/chunks/FormDatePickers-k_9RxQ8v.cjs +0 -1
- package/chunks/FormTextArea-C-iavwsX.cjs +0 -1
- package/chunks/GridDND-2-SOnXN6.cjs +0 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { j } from "./vendor-BG4P-329.mjs";
|
|
2
2
|
import { useState as Z } from "react";
|
|
3
3
|
import { Controller as w } from "react-hook-form";
|
|
4
|
-
import { getRuleValue as I, getPriorityRequired as M, hasValidationRule as L, useChangedFormContext as O, getIsRequired as
|
|
4
|
+
import { getRuleValue as I, getPriorityRequired as M, hasValidationRule as L, useChangedFormContext as O, getIsRequired as se } from "../formComponents/utils/index.mjs";
|
|
5
5
|
import { DatePicker as me } from "../components/DatePicker/index.mjs";
|
|
6
|
-
import { EmbedIconButton as ue, DatePickerRange as
|
|
6
|
+
import { EmbedIconButton as ue, DatePickerRange as ce } from "@salutejs/sdds-finai";
|
|
7
7
|
import ee from "styled-components";
|
|
8
|
-
import { IconCalendarOutline as
|
|
9
|
-
const
|
|
8
|
+
import { IconCalendarOutline as le } from "@salutejs/plasma-icons";
|
|
9
|
+
const de = {
|
|
10
10
|
"янв.": 0,
|
|
11
11
|
"фев.": 1,
|
|
12
12
|
"мар.": 2,
|
|
@@ -26,7 +26,7 @@ const le = {
|
|
|
26
26
|
"окт.": 9,
|
|
27
27
|
"ноя.": 10,
|
|
28
28
|
"дек.": 11
|
|
29
|
-
},
|
|
29
|
+
}, fe = {
|
|
30
30
|
января: 0,
|
|
31
31
|
январь: 0,
|
|
32
32
|
февраля: 1,
|
|
@@ -52,69 +52,69 @@ const le = {
|
|
|
52
52
|
декабря: 11,
|
|
53
53
|
декабрь: 11
|
|
54
54
|
}, te = {
|
|
55
|
-
...
|
|
56
|
-
...
|
|
57
|
-
},
|
|
55
|
+
...de,
|
|
56
|
+
...fe
|
|
57
|
+
}, ge = (e) => Object.keys(e).map((t) => t.replace(".", "\\.")).join("|"), J = `(${ge(te)})`, De = [["MMMM", J, "month-text"], ["MMM", J, "month-text"], ["YYYY", "(\\d{4})", "year"], ["DD", "(\\d{2})", "day"], ["YY", "(\\d{2})", "year"], ["MM", "(\\d{2})", "month-num"]], ke = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), X = /* @__PURE__ */ new Map(), ye = (e) => {
|
|
58
58
|
let t = e, i = "^";
|
|
59
|
-
const
|
|
59
|
+
const f = [];
|
|
60
60
|
for (; t.length > 0; ) {
|
|
61
|
-
let
|
|
62
|
-
for (const [u,
|
|
61
|
+
let o = !1;
|
|
62
|
+
for (const [u, c, l] of De)
|
|
63
63
|
if (t.startsWith(u)) {
|
|
64
|
-
i +=
|
|
64
|
+
i += c, f.push(l), t = t.slice(u.length), o = !0;
|
|
65
65
|
break;
|
|
66
66
|
}
|
|
67
|
-
|
|
67
|
+
o || (i += ke(t.charAt(0)), t = t.slice(1));
|
|
68
68
|
}
|
|
69
69
|
return i += "$", {
|
|
70
70
|
regex: new RegExp(i),
|
|
71
|
-
tokens:
|
|
71
|
+
tokens: f
|
|
72
72
|
};
|
|
73
|
-
},
|
|
73
|
+
}, Ne = (e) => {
|
|
74
74
|
let t = X.get(e);
|
|
75
|
-
return t || (t =
|
|
76
|
-
},
|
|
75
|
+
return t || (t = ye(e), X.set(e, t)), t;
|
|
76
|
+
}, be = (e) => e < 100 ? 2e3 + e : e, re = ({
|
|
77
77
|
date: e,
|
|
78
78
|
format: t
|
|
79
79
|
}) => {
|
|
80
80
|
const {
|
|
81
81
|
regex: i,
|
|
82
|
-
tokens:
|
|
83
|
-
} =
|
|
84
|
-
if (!
|
|
82
|
+
tokens: f
|
|
83
|
+
} = Ne(t), o = e.match(i);
|
|
84
|
+
if (!o)
|
|
85
85
|
return "";
|
|
86
86
|
try {
|
|
87
|
-
let u = 1,
|
|
88
|
-
for (let
|
|
89
|
-
const
|
|
90
|
-
if (!
|
|
87
|
+
let u = 1, c = 0, l = (/* @__PURE__ */ new Date()).getFullYear(), g = !1;
|
|
88
|
+
for (let s = 0; s < f.length; s++) {
|
|
89
|
+
const m = o[s + 1];
|
|
90
|
+
if (!m)
|
|
91
91
|
return "";
|
|
92
|
-
switch (
|
|
92
|
+
switch (f[s]) {
|
|
93
93
|
case "day":
|
|
94
|
-
if (u = Number(
|
|
94
|
+
if (u = Number(m), Number.isNaN(u))
|
|
95
95
|
return "";
|
|
96
96
|
break;
|
|
97
97
|
case "month-num":
|
|
98
|
-
if (
|
|
98
|
+
if (c = Number(m) - 1, Number.isNaN(c))
|
|
99
99
|
return "";
|
|
100
|
-
|
|
100
|
+
g = !0;
|
|
101
101
|
break;
|
|
102
102
|
case "month-text": {
|
|
103
|
-
const
|
|
104
|
-
if (typeof
|
|
103
|
+
const F = te[m];
|
|
104
|
+
if (typeof F != "number")
|
|
105
105
|
return "";
|
|
106
|
-
|
|
106
|
+
c = F, g = !0;
|
|
107
107
|
break;
|
|
108
108
|
}
|
|
109
109
|
case "year":
|
|
110
|
-
if (
|
|
110
|
+
if (l = be(Number(m)), Number.isNaN(l))
|
|
111
111
|
return "";
|
|
112
112
|
break;
|
|
113
113
|
default:
|
|
114
114
|
break;
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
|
-
return
|
|
117
|
+
return g ? new Date(l, c, u).toISOString() : "";
|
|
118
118
|
} catch {
|
|
119
119
|
return "";
|
|
120
120
|
}
|
|
@@ -122,44 +122,45 @@ const le = {
|
|
|
122
122
|
min: e,
|
|
123
123
|
max: t,
|
|
124
124
|
required: i,
|
|
125
|
-
invalidFormatMessage:
|
|
126
|
-
format:
|
|
125
|
+
invalidFormatMessage: f,
|
|
126
|
+
format: o
|
|
127
127
|
}) => {
|
|
128
128
|
const u = t && I({
|
|
129
129
|
rule: t,
|
|
130
130
|
typeValue: "number"
|
|
131
|
-
}),
|
|
131
|
+
}), c = e && I({
|
|
132
132
|
rule: e,
|
|
133
133
|
typeValue: "number"
|
|
134
134
|
});
|
|
135
|
-
return (
|
|
136
|
-
let
|
|
137
|
-
typeof
|
|
138
|
-
date:
|
|
139
|
-
format:
|
|
140
|
-
}),
|
|
141
|
-
const
|
|
142
|
-
return
|
|
135
|
+
return (l) => {
|
|
136
|
+
let g, s = null;
|
|
137
|
+
typeof l == "string" && o && (g = re({
|
|
138
|
+
date: l,
|
|
139
|
+
format: o
|
|
140
|
+
}), g && (s = new Date(g))), (l instanceof Date || typeof l == "string" && !o) && (s = new Date(l));
|
|
141
|
+
const m = s && !Number.isNaN(s.getTime()) ? s.getTime() : null;
|
|
142
|
+
return m !== null ? typeof c == "number" && m <= c ? typeof e == "object" && "message" in e ? e == null ? void 0 : e.message : !1 : typeof u == "number" && m >= u ? typeof t == "object" && "message" in t ? t == null ? void 0 : t.message : !1 : !0 : l && typeof l == "string" && l.length ? f : i ? typeof i == "object" && "message" in i ? i == null ? void 0 : i.message : !1 : !0;
|
|
143
143
|
};
|
|
144
|
-
},
|
|
144
|
+
}, ve = ee(me).withConfig({
|
|
145
145
|
displayName: "DatePickerStyled"
|
|
146
|
-
})(["width:100%;"]),
|
|
146
|
+
})(["width:100%;"]), Ce = ({
|
|
147
147
|
name: e,
|
|
148
148
|
options: t,
|
|
149
149
|
portal: i,
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
150
|
+
label: f,
|
|
151
|
+
onChange: o,
|
|
152
|
+
textHint: u,
|
|
153
|
+
format: c = "DD.MM.YYYY",
|
|
154
|
+
invalidFormatMessage: l = "Формат даты указан не верно",
|
|
155
|
+
size: g = "s",
|
|
156
|
+
requiredPlacement: s = "right",
|
|
156
157
|
maskWithFormat: m = !0,
|
|
157
|
-
offset:
|
|
158
|
-
leftHelper:
|
|
159
|
-
defaultDate:
|
|
160
|
-
ref:
|
|
158
|
+
offset: h = [0, 2],
|
|
159
|
+
leftHelper: F,
|
|
160
|
+
defaultDate: ie,
|
|
161
|
+
ref: oe,
|
|
161
162
|
min: V,
|
|
162
|
-
max:
|
|
163
|
+
max: P,
|
|
163
164
|
opened: $,
|
|
164
165
|
required: Y,
|
|
165
166
|
...r
|
|
@@ -167,34 +168,34 @@ const le = {
|
|
|
167
168
|
const [H, C] = Z($ ?? !1), a = {
|
|
168
169
|
...t,
|
|
169
170
|
required: M({ options: t, ruleName: "required" }) ? t == null ? void 0 : t.required : Y
|
|
170
|
-
},
|
|
171
|
+
}, R = {
|
|
171
172
|
min: (() => {
|
|
172
173
|
if (V) {
|
|
173
|
-
const
|
|
174
|
-
return typeof (a == null ? void 0 : a.min) == "object" && "message" in a.min ? { value:
|
|
174
|
+
const b = V.getTime();
|
|
175
|
+
return typeof (a == null ? void 0 : a.min) == "object" && "message" in a.min ? { value: b, message: a.min.message } : b;
|
|
175
176
|
}
|
|
176
177
|
return L({ options: a, ruleName: "min" }) ? a == null ? void 0 : a.min : void 0;
|
|
177
178
|
})(),
|
|
178
179
|
max: (() => {
|
|
179
|
-
if (
|
|
180
|
-
const
|
|
181
|
-
return typeof (a == null ? void 0 : a.max) == "object" && "message" in a.max ? { value:
|
|
180
|
+
if (P) {
|
|
181
|
+
const b = P.getTime();
|
|
182
|
+
return typeof (a == null ? void 0 : a.max) == "object" && "message" in a.max ? { value: b, message: a.max.message } : b;
|
|
182
183
|
}
|
|
183
184
|
return L({ options: a, ruleName: "max" }) ? a == null ? void 0 : a.max : void 0;
|
|
184
185
|
})(),
|
|
185
186
|
required: a == null ? void 0 : a.required,
|
|
186
|
-
invalidFormatMessage:
|
|
187
|
-
format:
|
|
188
|
-
}, p = ae(
|
|
187
|
+
invalidFormatMessage: l,
|
|
188
|
+
format: c
|
|
189
|
+
}, p = ae(R), z = O({
|
|
189
190
|
...a,
|
|
190
|
-
validate: (
|
|
191
|
-
const
|
|
192
|
-
if (
|
|
193
|
-
return
|
|
194
|
-
const
|
|
195
|
-
return
|
|
191
|
+
validate: (b) => {
|
|
192
|
+
const n = a == null ? void 0 : a.validate;
|
|
193
|
+
if (n)
|
|
194
|
+
return n(b);
|
|
195
|
+
const y = p(b);
|
|
196
|
+
return y !== !0 ? y : !0;
|
|
196
197
|
}
|
|
197
|
-
}), { control: G, rules: W, remOptions: _, clearErrors: A } = z, S = (
|
|
198
|
+
}), { control: G, rules: W, remOptions: _, clearErrors: A } = z, S = (P == null ? void 0 : P.getTime()) ?? I({ rule: a == null ? void 0 : a.max, typeValue: "number" }), B = (V == null ? void 0 : V.getTime()) ?? I({ rule: a == null ? void 0 : a.min, typeValue: "number" });
|
|
198
199
|
return /* @__PURE__ */ j.jsxDEV(
|
|
199
200
|
w,
|
|
200
201
|
{
|
|
@@ -204,38 +205,39 @@ const le = {
|
|
|
204
205
|
..._,
|
|
205
206
|
render: ({
|
|
206
207
|
field: {
|
|
207
|
-
name:
|
|
208
|
-
ref:
|
|
209
|
-
onBlur:
|
|
208
|
+
name: b,
|
|
209
|
+
ref: n,
|
|
210
|
+
onBlur: y,
|
|
210
211
|
onChange: D,
|
|
211
|
-
...
|
|
212
|
+
...d
|
|
212
213
|
},
|
|
213
214
|
fieldState: { error: k }
|
|
214
215
|
}) => {
|
|
215
|
-
const T =
|
|
216
|
+
const T = d == null ? void 0 : d.value, K = T != null && T !== "" ? T : "";
|
|
216
217
|
return /* @__PURE__ */ j.jsxDEV(
|
|
217
|
-
|
|
218
|
+
ve,
|
|
218
219
|
{
|
|
219
|
-
...
|
|
220
|
-
|
|
220
|
+
...d,
|
|
221
|
+
label: f,
|
|
222
|
+
ref: n,
|
|
221
223
|
maskWithFormat: m,
|
|
222
224
|
value: K,
|
|
223
|
-
format:
|
|
225
|
+
format: c,
|
|
224
226
|
frame: i,
|
|
225
227
|
max: S && new Date(S) || void 0,
|
|
226
228
|
min: B && new Date(B) || void 0,
|
|
227
|
-
offset:
|
|
229
|
+
offset: h,
|
|
228
230
|
opened: H,
|
|
229
|
-
required:
|
|
230
|
-
requiredPlacement:
|
|
231
|
-
hasRequiredIndicator:
|
|
231
|
+
required: !!a.required || void 0,
|
|
232
|
+
requiredPlacement: s,
|
|
233
|
+
hasRequiredIndicator: !!a.required || void 0,
|
|
232
234
|
includeEdgeDates: !0,
|
|
233
|
-
size:
|
|
235
|
+
size: g,
|
|
234
236
|
usePortal: !!i,
|
|
235
237
|
valueError: !!k,
|
|
236
|
-
onChange: (
|
|
237
|
-
if (typeof
|
|
238
|
-
const x =
|
|
238
|
+
onChange: (v) => {
|
|
239
|
+
if (typeof v == "object" && v && "target" in v) {
|
|
240
|
+
const x = v, q = {
|
|
239
241
|
target: {
|
|
240
242
|
value: x.target.value,
|
|
241
243
|
name: x.target.name,
|
|
@@ -243,24 +245,24 @@ const le = {
|
|
|
243
245
|
isoDate: x.target.isoDate
|
|
244
246
|
}
|
|
245
247
|
};
|
|
246
|
-
|
|
248
|
+
o == null || o(q), D(q);
|
|
247
249
|
} else {
|
|
248
|
-
const x =
|
|
249
|
-
|
|
250
|
+
const x = v;
|
|
251
|
+
o == null || o(x), D(x);
|
|
250
252
|
}
|
|
251
253
|
},
|
|
252
|
-
onCommitDate: (
|
|
253
|
-
A(e), D(
|
|
254
|
+
onCommitDate: (v) => {
|
|
255
|
+
A(e), D(v), C(!1);
|
|
254
256
|
},
|
|
255
|
-
onToggle: (
|
|
256
|
-
leftHelper: k != null && k.message ||
|
|
257
|
+
onToggle: (v) => C(v),
|
|
258
|
+
leftHelper: k != null && k.message || u ? (k == null ? void 0 : k.message) || u : void 0,
|
|
257
259
|
...r
|
|
258
260
|
},
|
|
259
261
|
void 0,
|
|
260
262
|
!1,
|
|
261
263
|
{
|
|
262
264
|
fileName: "/home/runner/work/dais-ui/dais-ui/packages/ui-kit/src/formComponents/FormDatePickers/FormDatePicker/FormDatePicker.tsx",
|
|
263
|
-
lineNumber:
|
|
265
|
+
lineNumber: 165,
|
|
264
266
|
columnNumber: 11
|
|
265
267
|
},
|
|
266
268
|
void 0
|
|
@@ -271,12 +273,12 @@ const le = {
|
|
|
271
273
|
!1,
|
|
272
274
|
{
|
|
273
275
|
fileName: "/home/runner/work/dais-ui/dais-ui/packages/ui-kit/src/formComponents/FormDatePickers/FormDatePicker/FormDatePicker.tsx",
|
|
274
|
-
lineNumber:
|
|
276
|
+
lineNumber: 142,
|
|
275
277
|
columnNumber: 5
|
|
276
278
|
},
|
|
277
279
|
void 0
|
|
278
280
|
);
|
|
279
|
-
},
|
|
281
|
+
}, Fe = ({
|
|
280
282
|
datePickerSize: e
|
|
281
283
|
}) => /* @__PURE__ */ j.jsxDEV(
|
|
282
284
|
ue,
|
|
@@ -288,7 +290,7 @@ const le = {
|
|
|
288
290
|
marginTop: "2px"
|
|
289
291
|
},
|
|
290
292
|
children: /* @__PURE__ */ j.jsxDEV(
|
|
291
|
-
|
|
293
|
+
le,
|
|
292
294
|
{
|
|
293
295
|
color: "inherit",
|
|
294
296
|
size: e === "xs" ? "xs" : "s"
|
|
@@ -311,135 +313,136 @@ const le = {
|
|
|
311
313
|
columnNumber: 1
|
|
312
314
|
},
|
|
313
315
|
void 0
|
|
314
|
-
),
|
|
316
|
+
), Te = ({
|
|
315
317
|
required: e,
|
|
316
318
|
validateRange: t,
|
|
317
319
|
externalValidates: i
|
|
318
|
-
}) => (
|
|
320
|
+
}) => (f, o) => {
|
|
319
321
|
const {
|
|
320
322
|
dateFrom: u,
|
|
321
|
-
dateTo:
|
|
322
|
-
} =
|
|
323
|
-
if (!
|
|
323
|
+
dateTo: c
|
|
324
|
+
} = f;
|
|
325
|
+
if (!se({
|
|
324
326
|
required: e
|
|
325
327
|
}))
|
|
326
328
|
return !0;
|
|
327
|
-
let
|
|
328
|
-
if (typeof e == "string" ?
|
|
329
|
-
return
|
|
330
|
-
if (u && !
|
|
329
|
+
let g = "поле обязательно";
|
|
330
|
+
if (typeof e == "string" ? g = e : typeof e == "object" && e.message && (g = e.message), !u && !c)
|
|
331
|
+
return g;
|
|
332
|
+
if (u && !c || !u && c)
|
|
331
333
|
return "Заполните обе даты диапазона";
|
|
332
|
-
const
|
|
333
|
-
if (typeof
|
|
334
|
-
return
|
|
334
|
+
const s = t(f, o);
|
|
335
|
+
if (typeof s == "string")
|
|
336
|
+
return s;
|
|
335
337
|
if (typeof i == "function")
|
|
336
|
-
return i(
|
|
338
|
+
return i(f, o);
|
|
337
339
|
if (i) {
|
|
338
|
-
for (const
|
|
339
|
-
if (Object.prototype.hasOwnProperty.call(i,
|
|
340
|
-
const h = i[
|
|
340
|
+
for (const m in i)
|
|
341
|
+
if (Object.prototype.hasOwnProperty.call(i, m)) {
|
|
342
|
+
const h = i[m];
|
|
341
343
|
if (h) {
|
|
342
|
-
const
|
|
343
|
-
if (typeof
|
|
344
|
-
return
|
|
344
|
+
const F = h(f, o);
|
|
345
|
+
if (typeof F == "string")
|
|
346
|
+
return F;
|
|
345
347
|
}
|
|
346
348
|
}
|
|
347
349
|
}
|
|
348
350
|
return !0;
|
|
349
|
-
},
|
|
351
|
+
}, xe = ({
|
|
350
352
|
min: e,
|
|
351
353
|
max: t,
|
|
352
354
|
required: i,
|
|
353
|
-
invalidFormatMessage:
|
|
354
|
-
format:
|
|
355
|
+
invalidFormatMessage: f,
|
|
356
|
+
format: o
|
|
355
357
|
}) => {
|
|
356
358
|
const u = ae({
|
|
357
359
|
min: e,
|
|
358
360
|
max: t,
|
|
359
361
|
required: i,
|
|
360
|
-
invalidFormatMessage:
|
|
361
|
-
format:
|
|
362
|
+
invalidFormatMessage: f,
|
|
363
|
+
format: o
|
|
362
364
|
});
|
|
363
|
-
return (
|
|
365
|
+
return (c) => {
|
|
364
366
|
const {
|
|
365
|
-
dateFrom:
|
|
366
|
-
dateTo:
|
|
367
|
-
} =
|
|
368
|
-
if (typeof
|
|
369
|
-
return
|
|
370
|
-
const
|
|
371
|
-
return typeof
|
|
367
|
+
dateFrom: l = void 0,
|
|
368
|
+
dateTo: g = void 0
|
|
369
|
+
} = c || {}, s = u(l);
|
|
370
|
+
if (typeof s == "string")
|
|
371
|
+
return s;
|
|
372
|
+
const m = u(g);
|
|
373
|
+
return typeof m == "string" ? m : !0;
|
|
372
374
|
};
|
|
373
|
-
},
|
|
375
|
+
}, he = ee(ce).withConfig({ displayName: "FormDatePickerRangeStyled__DatePickerRangeStyled" })(["width:100%;&:where(.popover-target >:first-child,.popover-target,.popover-wrapper){width:100%;}"]), _e = ({
|
|
374
376
|
name: e,
|
|
375
377
|
options: t,
|
|
376
378
|
portal: i,
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
379
|
+
label: f,
|
|
380
|
+
onChange: o,
|
|
381
|
+
textHint: u,
|
|
382
|
+
format: c = "DD.MM.YYYY",
|
|
383
|
+
invalidFormatMessage: l = "Формат даты указан не верно",
|
|
384
|
+
ref: g,
|
|
385
|
+
min: s,
|
|
383
386
|
max: m,
|
|
384
|
-
onChangeFirstValue:
|
|
385
|
-
onChangeSecondValue:
|
|
386
|
-
defaultFirstDate:
|
|
387
|
-
defaultSecondDate:
|
|
387
|
+
onChangeFirstValue: h,
|
|
388
|
+
onChangeSecondValue: F,
|
|
389
|
+
defaultFirstDate: ie,
|
|
390
|
+
defaultSecondDate: oe,
|
|
388
391
|
required: V,
|
|
389
|
-
...
|
|
392
|
+
...P
|
|
390
393
|
}) => {
|
|
391
394
|
const [$, Y] = Z(!1), r = {
|
|
392
395
|
...t,
|
|
393
396
|
required: M({ options: t, ruleName: "required" }) ? t == null ? void 0 : t.required : V
|
|
394
397
|
}, H = {
|
|
395
398
|
min: (() => {
|
|
396
|
-
if (
|
|
397
|
-
const
|
|
398
|
-
return typeof (r == null ? void 0 : r.min) == "object" && "message" in r.min ? { value:
|
|
399
|
+
if (s) {
|
|
400
|
+
const n = s.getTime();
|
|
401
|
+
return typeof (r == null ? void 0 : r.min) == "object" && "message" in r.min ? { value: n, message: r.min.message } : n;
|
|
399
402
|
}
|
|
400
403
|
return L({ options: r, ruleName: "min" }) ? r == null ? void 0 : r.min : void 0;
|
|
401
404
|
})(),
|
|
402
405
|
max: (() => {
|
|
403
406
|
if (m) {
|
|
404
|
-
const
|
|
405
|
-
return typeof (r == null ? void 0 : r.max) == "object" && "message" in r.max ? { value:
|
|
407
|
+
const n = m.getTime();
|
|
408
|
+
return typeof (r == null ? void 0 : r.max) == "object" && "message" in r.max ? { value: n, message: r.max.message } : n;
|
|
406
409
|
}
|
|
407
410
|
return L({ options: r, ruleName: "max" }) ? r == null ? void 0 : r.max : void 0;
|
|
408
411
|
})(),
|
|
409
412
|
required: r == null ? void 0 : r.required,
|
|
410
|
-
invalidFormatMessage:
|
|
411
|
-
}, C =
|
|
413
|
+
invalidFormatMessage: l
|
|
414
|
+
}, C = xe({ ...H, format: c }), a = Te({
|
|
412
415
|
required: r == null ? void 0 : r.required,
|
|
413
416
|
validateRange: C,
|
|
414
417
|
externalValidates: r == null ? void 0 : r.validate
|
|
415
|
-
}),
|
|
418
|
+
}), R = O({
|
|
416
419
|
...r,
|
|
417
|
-
validate: (
|
|
418
|
-
const
|
|
419
|
-
dateFrom:
|
|
420
|
-
dateTo:
|
|
420
|
+
validate: (n) => {
|
|
421
|
+
const y = n ? {
|
|
422
|
+
dateFrom: n.dateFrom,
|
|
423
|
+
dateTo: n.dateTo
|
|
421
424
|
} : { dateFrom: void 0, dateTo: void 0 };
|
|
422
|
-
return a(
|
|
425
|
+
return a(y, R.getValues());
|
|
423
426
|
}
|
|
424
|
-
}), { control: p, rules: z, remOptions: G, clearErrors: W } =
|
|
425
|
-
if (!
|
|
427
|
+
}), { control: p, rules: z, remOptions: G, clearErrors: W } = R, _ = (m == null ? void 0 : m.getTime()) ?? I({ rule: r == null ? void 0 : r.max, typeValue: "number" }), A = (s == null ? void 0 : s.getTime()) ?? I({ rule: r == null ? void 0 : r.min, typeValue: "number" }), S = (n, y, D, d) => {
|
|
428
|
+
if (!n)
|
|
426
429
|
return;
|
|
427
|
-
if (
|
|
428
|
-
|
|
430
|
+
if (y) {
|
|
431
|
+
R.setError(`${e}`, {
|
|
429
432
|
type: "custom",
|
|
430
433
|
message: "Ошибка значения"
|
|
431
434
|
}), Y(!1);
|
|
432
435
|
return;
|
|
433
436
|
}
|
|
434
|
-
const k =
|
|
437
|
+
const k = R.getValues(e) || {};
|
|
435
438
|
re({
|
|
436
|
-
date: typeof
|
|
437
|
-
format:
|
|
439
|
+
date: typeof n == "string" ? n : n.toDateString(),
|
|
440
|
+
format: c
|
|
438
441
|
}) && D({
|
|
439
442
|
...k,
|
|
440
|
-
[
|
|
443
|
+
[d]: n
|
|
441
444
|
});
|
|
442
|
-
}, B = (
|
|
445
|
+
}, B = (n, y, D) => S(n, y, D, "dateFrom"), b = (n, y, D) => S(n, y, D, "dateTo");
|
|
443
446
|
return /* @__PURE__ */ j.jsxDEV(
|
|
444
447
|
w,
|
|
445
448
|
{
|
|
@@ -448,68 +451,68 @@ const le = {
|
|
|
448
451
|
rules: z,
|
|
449
452
|
...G,
|
|
450
453
|
render: ({
|
|
451
|
-
field: { value:
|
|
452
|
-
fieldState: { error:
|
|
454
|
+
field: { value: n, ref: y, ...D },
|
|
455
|
+
fieldState: { error: d }
|
|
453
456
|
}) => {
|
|
454
457
|
var q, U;
|
|
455
|
-
const { dateFrom: k, dateTo: T } =
|
|
458
|
+
const { dateFrom: k, dateTo: T } = n || { dateFrom: "", dateTo: "" }, K = k != null && k !== "" ? k : "", v = T != null && T !== "" ? T : "", x = (d == null ? void 0 : d.message) || ((q = d == null ? void 0 : d.dateFrom) == null ? void 0 : q.message) || ((U = d == null ? void 0 : d.dateTo) == null ? void 0 : U.message);
|
|
456
459
|
return /* @__PURE__ */ j.jsxDEV(
|
|
457
|
-
|
|
460
|
+
he,
|
|
458
461
|
{
|
|
459
462
|
...D,
|
|
460
|
-
ref:
|
|
463
|
+
ref: y,
|
|
461
464
|
isDoubleCalendar: !0,
|
|
462
465
|
closeOnOverlayClick: !0,
|
|
463
|
-
contentRight: /* @__PURE__ */ j.jsxDEV(
|
|
466
|
+
contentRight: /* @__PURE__ */ j.jsxDEV(Fe, { datePickerSize: P.size }, void 0, !1, {
|
|
464
467
|
fileName: "/home/runner/work/dais-ui/dais-ui/packages/ui-kit/src/formComponents/FormDatePickers/FormDatePickerRange/FormDatePickerRange.tsx",
|
|
465
|
-
lineNumber:
|
|
468
|
+
lineNumber: 252,
|
|
466
469
|
columnNumber: 27
|
|
467
470
|
}, void 0),
|
|
468
|
-
value: [K,
|
|
469
|
-
firstValueError: !!
|
|
470
|
-
format:
|
|
471
|
+
value: [K, v],
|
|
472
|
+
firstValueError: !!d,
|
|
473
|
+
format: c,
|
|
471
474
|
frame: i,
|
|
472
|
-
label:
|
|
475
|
+
label: f,
|
|
473
476
|
max: _ && new Date(_) || void 0,
|
|
474
477
|
min: A && new Date(A) || void 0,
|
|
475
478
|
name: e,
|
|
476
479
|
opened: $,
|
|
477
480
|
maskWithFormat: !0,
|
|
478
|
-
required:
|
|
481
|
+
required: !!r.required || void 0,
|
|
479
482
|
requiredPlacement: "right",
|
|
480
|
-
hasRequiredIndicator:
|
|
481
|
-
secondValueError: !!
|
|
483
|
+
hasRequiredIndicator: !!r.required || void 0,
|
|
484
|
+
secondValueError: !!d,
|
|
482
485
|
usePortal: !!i,
|
|
483
|
-
onChange: ({ target:
|
|
484
|
-
"value" in
|
|
486
|
+
onChange: ({ target: N }) => {
|
|
487
|
+
"value" in N && (o == null || o(N.value || ""), d && W(e));
|
|
485
488
|
},
|
|
486
|
-
onChangeFirstValue: (
|
|
489
|
+
onChangeFirstValue: (N, E = "") => {
|
|
487
490
|
const Q = {
|
|
488
|
-
...
|
|
491
|
+
...R.getValues(e) || {},
|
|
489
492
|
dateFrom: E
|
|
490
493
|
};
|
|
491
|
-
D.onChange(Q),
|
|
494
|
+
D.onChange(Q), h == null || h(N);
|
|
492
495
|
},
|
|
493
|
-
onChangeSecondValue: (
|
|
496
|
+
onChangeSecondValue: (N, E = "") => {
|
|
494
497
|
const Q = {
|
|
495
|
-
...
|
|
498
|
+
...R.getValues(e) || {},
|
|
496
499
|
dateTo: E
|
|
497
500
|
};
|
|
498
|
-
D.onChange(Q),
|
|
501
|
+
D.onChange(Q), F == null || F(N);
|
|
499
502
|
},
|
|
500
|
-
onCommitSecondDate: (
|
|
501
|
-
onCommitFirstDate: (
|
|
502
|
-
onToggle: (
|
|
503
|
-
Y(
|
|
503
|
+
onCommitSecondDate: (N, E) => b(N, E.error, D.onChange),
|
|
504
|
+
onCommitFirstDate: (N, E) => B(N, E.error, D.onChange),
|
|
505
|
+
onToggle: (N) => {
|
|
506
|
+
Y(N);
|
|
504
507
|
},
|
|
505
|
-
leftHelper: x ||
|
|
506
|
-
...
|
|
508
|
+
leftHelper: x || u ? x || u : void 0,
|
|
509
|
+
...P
|
|
507
510
|
},
|
|
508
511
|
void 0,
|
|
509
512
|
!1,
|
|
510
513
|
{
|
|
511
514
|
fileName: "/home/runner/work/dais-ui/dais-ui/packages/ui-kit/src/formComponents/FormDatePickers/FormDatePickerRange/FormDatePickerRange.tsx",
|
|
512
|
-
lineNumber:
|
|
515
|
+
lineNumber: 247,
|
|
513
516
|
columnNumber: 11
|
|
514
517
|
},
|
|
515
518
|
void 0
|
|
@@ -520,16 +523,16 @@ const le = {
|
|
|
520
523
|
!1,
|
|
521
524
|
{
|
|
522
525
|
fileName: "/home/runner/work/dais-ui/dais-ui/packages/ui-kit/src/formComponents/FormDatePickers/FormDatePickerRange/FormDatePickerRange.tsx",
|
|
523
|
-
lineNumber:
|
|
526
|
+
lineNumber: 220,
|
|
524
527
|
columnNumber: 5
|
|
525
528
|
},
|
|
526
529
|
void 0
|
|
527
530
|
);
|
|
528
531
|
};
|
|
529
|
-
var
|
|
532
|
+
var Pe = /* @__PURE__ */ ((e) => (e.DATE_IS_SMALLER = "Дата меньше минимальной", e.DATE_IS_BIGGER = "Дата больше максимальной", e.DATE_FORMAT_IS_INVALID = "Формат даты указан не верно", e.DATE_IS_REQUIRED = "Выбор даты обязателен", e))(Pe || {});
|
|
530
533
|
export {
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
534
|
+
Pe as D,
|
|
535
|
+
Ce as F,
|
|
536
|
+
_e as a,
|
|
537
|
+
Te as v
|
|
535
538
|
};
|