@dartcom/ui-kit 10.0.6 → 10.0.7

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.
@@ -0,0 +1,4 @@
1
+ import { ComponentProps } from './types';
2
+ declare function DateField<T>({ name, label }: ComponentProps<T>): import("react/jsx-runtime").JSX.Element;
3
+ export default DateField;
4
+ //# sourceMappingURL=date-field.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"date-field.d.ts","sourceRoot":"","sources":["../../../src/components/date-field/date-field.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEzC,iBAAS,SAAS,CAAC,CAAC,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,cAAc,CAAC,CAAC,CAAC,2CAyBvD;AAED,eAAe,SAAS,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-vite';
2
+ import { DateField } from '.';
3
+ declare const meta: Meta<typeof DateField>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof meta>;
6
+ export declare const Primary: Story;
7
+ //# sourceMappingURL=date-field.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"date-field.stories.d.ts","sourceRoot":"","sources":["../../../src/components/date-field/date-field.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAS5D,OAAO,EAAE,SAAS,EAAE,MAAM,GAAG,CAAC;AAQ9B,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,SAAS,CAmDhC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { default as DateField } from './date-field';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/date-field/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,cAAc,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { Path } from 'react-hook-form';
2
+ export type ComponentProps<T> = {
3
+ label: string;
4
+ name: Path<T>;
5
+ };
6
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/date-field/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAEvC,MAAM,MAAM,cAAc,CAAC,CAAC,IAAI;IAC9B,KAAK,EAAE,MAAM,CAAC;IAEd,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;CACf,CAAC"}
@@ -11,4 +11,5 @@ export * from './card';
11
11
  export * from './loader';
12
12
  export * from './error-boundary';
13
13
  export * from './modal';
14
+ export * from './date-field';
14
15
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC"}
@@ -1,3 +1,5 @@
1
+ import { SelectOptionItem } from '../../../../../components/select';
2
+ import { TrafficSign } from './types';
1
3
  export declare const trafficSignNumbers: string[];
2
4
  export declare const trafficSignWidths: {
3
5
  map: number;
@@ -16,4 +18,18 @@ export declare const trafficSignHeights: {
16
18
  40: string[];
17
19
  68: string[];
18
20
  };
21
+ export declare const trafficSignTypes: {
22
+ '\u041F\u0440\u0435\u0434\u0443\u043F\u0440\u0435\u0436\u0434\u0430\u044E\u0449\u0438\u0435 \u0437\u043D\u0430\u043A\u0438': never[];
23
+ '\u0417\u043D\u0430\u043A\u0438 \u043F\u0440\u0438\u043E\u0440\u0438\u0442\u0435\u0442\u0430': never[];
24
+ '\u0417\u0430\u043F\u0440\u0435\u0449\u0430\u044E\u0449\u0438\u0435 \u0437\u043D\u0430\u043A\u0438': never[];
25
+ '\u041F\u0440\u0435\u0434\u043F\u0438\u0441\u044B\u0432\u0430\u044E\u0449\u0438\u0435 \u0437\u043D\u0430\u043A\u0438': never[];
26
+ '\u0417\u043D\u0430\u043A\u0438 \u043E\u0441\u043E\u0431\u044B\u0445 \u043F\u0440\u0435\u0434\u043F\u0438\u0441\u0430\u043D\u0438\u0439': never[];
27
+ '\u0418\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u043E\u043D\u043D\u044B\u0435 \u0437\u043D\u0430\u043A\u0438': never[];
28
+ '\u0417\u043D\u0430\u043A\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u0430': never[];
29
+ };
30
+ export declare const trafficSignTypesOptions: SelectOptionItem[];
31
+ export declare const trafficSignStatusOptions: SelectOptionItem[];
32
+ export declare const trafficSignFieldsTitles: {
33
+ [K in keyof TrafficSign]: string;
34
+ };
19
35
  //# sourceMappingURL=constants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../../src/components/layers/leaflet/layers/traffic-sign/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,UA8W9B,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;CAG7B,CAAC;AAEF,eAAO,MAAM,oBAAoB,iBAAiB,CAAC;AAEnD,eAAO,MAAM,oBAAoB,QAAQ,CAAC;AAE1C,eAAO,MAAM,uBAAuB;WAGzB,MAAM;YACL,MAAM;EAEf,CAAC;AAEJ,eAAO,MAAM,kBAAkB;;;;;;CAoX9B,CAAC"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../../src/components/layers/leaflet/layers/traffic-sign/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD,OAAO,EAAE,WAAW,EAAqB,MAAM,SAAS,CAAC;AAEzD,eAAO,MAAM,kBAAkB,UA8W9B,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;CAG7B,CAAC;AAEF,eAAO,MAAM,oBAAoB,iBAAiB,CAAC;AAEnD,eAAO,MAAM,oBAAoB,QAAQ,CAAC;AAE1C,eAAO,MAAM,uBAAuB;WAGzB,MAAM;YACL,MAAM;EAEf,CAAC;AAEJ,eAAO,MAAM,kBAAkB;;;;;;CAoX9B,CAAC;AAWF,eAAO,MAAM,gBAAgB;;;;;;;;CAc5B,CAAC;AAEF,eAAO,MAAM,uBAAuB,oBAKjC,CAAC;AAEJ,eAAO,MAAM,wBAAwB,oBAKlC,CAAC;AAEJ,eAAO,MAAM,uBAAuB,EAAE;KACnC,CAAC,IAAI,MAAM,WAAW,GAAG,MAAM;CAsBjC,CAAC"}
@@ -1,18 +1,14 @@
1
1
  import { Nullable } from '../../../../../types';
2
- export type TrafficSignStatus = 'OK';
3
- export type TrafficSignDop = {
4
- readonly traffic_sign_id: string;
2
+ export declare enum TrafficSignStatus {
3
+ ACTIVE = "\u0414\u0435\u0439\u0441\u0442\u0432\u0443\u044E\u0449\u0438\u0439",
4
+ INACTIVE = "\u041D\u0435\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044E\u0449\u0438\u0439",
5
+ TEMPORARY = "\u0412\u0440\u0435\u043C\u0435\u043D\u043D\u044B\u0439"
6
+ }
7
+ export type TrafficSignDop = Pick<TrafficSign, 'traffic_sign_id' | 'status' | 'placement_date' | 'verification_date' | 'future_maintanance_date' | 'rapair_performed_date' | 'warranty_expr_date' | 'comment'> & {
5
8
  readonly dop_id: string;
6
9
  dop_sign_number: string;
7
10
  dop_sign_title: string;
8
11
  dop_sign_text: string;
9
- status: string;
10
- placement_date: string;
11
- verification_date: string;
12
- future_maintanance_date: string;
13
- rapair_performed_date: string;
14
- warranty_expr_date: string;
15
- comment: string;
16
12
  };
17
13
  export type TrafficSign = {
18
14
  readonly traffic_sign_id: string;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/components/layers/leaflet/layers/traffic-sign/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEnC,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAAC;AAErC,MAAM,MAAM,cAAc,GAAG;IAC3B,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAExB,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,MAAM,CAAC;IACvB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,uBAAuB,EAAE,MAAM,CAAC;IAChC,qBAAqB,EAAE,MAAM,CAAC;IAC9B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IAErC,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC1B,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IAE5B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,kBAAkB,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IACrC,iBAAiB,EAAE,MAAM,CAAC;IAE1B,IAAI,EAAE,cAAc,EAAE,CAAC;IAEvB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IAGZ,uBAAuB,EAAE,MAAM,CAAC;IAChC,cAAc,EAAE,MAAM,CAAC;IACvB,qBAAqB,EAAE,MAAM,CAAC;IAC9B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,kBAAkB,EAAE,MAAM,CAAC;IAE3B,MAAM,EAAE,iBAAiB,CAAC;CAC3B,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/components/layers/leaflet/layers/traffic-sign/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEnC,oBAAY,iBAAiB;IAC3B,MAAM,uEAAgB;IACtB,QAAQ,mFAAkB;IAC1B,SAAS,2DAAc;CACxB;AAED,MAAM,MAAM,cAAc,GAAG,IAAI,CAC/B,WAAW,EACT,iBAAiB,GACjB,QAAQ,GACR,gBAAgB,GAChB,mBAAmB,GACnB,yBAAyB,GACzB,uBAAuB,GACvB,oBAAoB,GACpB,SAAS,CACZ,GAAG;IACF,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAExB,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IAErC,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC1B,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IAE5B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,kBAAkB,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IACrC,iBAAiB,EAAE,MAAM,CAAC;IAE1B,IAAI,EAAE,cAAc,EAAE,CAAC;IAEvB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IAGZ,uBAAuB,EAAE,MAAM,CAAC;IAChC,cAAc,EAAE,MAAM,CAAC;IACvB,qBAAqB,EAAE,MAAM,CAAC;IAC9B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,kBAAkB,EAAE,MAAM,CAAC;IAE3B,MAAM,EAAE,iBAAiB,CAAC;CAC3B,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { StringOrNumber } from '../../types';
2
- export type SelectOptionItem<T extends StringOrNumber> = {
2
+ export type SelectOptionItem<T extends StringOrNumber = string> = {
3
3
  label: string;
4
4
  value: T;
5
5
  };
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/select/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEzC,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS,cAAc,IAAI;IACvD,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,CAAC,CAAC;CACV,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/select/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEzC,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS,cAAc,GAAG,MAAM,IAAI;IAChE,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,CAAC,CAAC;CACV,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
2
  import { CustomTextFieldProps } from './types';
3
- declare const CustomTextField: React.FC<CustomTextFieldProps>;
4
- export default CustomTextField;
3
+ declare const TextField: React.FC<CustomTextFieldProps>;
4
+ export default TextField;
5
5
  //# sourceMappingURL=text-field.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"text-field.d.ts","sourceRoot":"","sources":["../../../src/components/text-field/text-field.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAE/C,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAEnD,CAAC;AAEF,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"text-field.d.ts","sourceRoot":"","sources":["../../../src/components/text-field/text-field.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAE/C,QAAA,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAE7C,CAAC;AAEF,eAAe,SAAS,CAAC"}
package/dist/index.cjs CHANGED
@@ -16,6 +16,7 @@ var Box = require('@mui/material/Box');
16
16
  var Modal = require('@mui/material/Modal');
17
17
  var xDatePickers = require('@mui/x-date-pickers');
18
18
  var AdapterDateFns = require('@mui/x-date-pickers/AdapterDateFns');
19
+ var DateField$1 = require('@mui/x-date-pickers/DateField');
19
20
 
20
21
  function _interopNamespaceDefault(e) {
21
22
  var n = Object.create(null);
@@ -145,29 +146,23 @@ var isWeb = typeof window !== 'undefined' &&
145
146
  typeof document !== 'undefined';
146
147
 
147
148
  function cloneObject(data) {
148
- let copy;
149
- const isArray = Array.isArray(data);
150
- const isFileListInstance = typeof FileList !== 'undefined' ? data instanceof FileList : false;
151
149
  if (data instanceof Date) {
152
- copy = new Date(data);
150
+ return new Date(data);
153
151
  }
154
- else if (!(isWeb && (data instanceof Blob || isFileListInstance)) &&
155
- (isArray || isObject$3(data))) {
156
- copy = isArray ? [] : Object.create(Object.getPrototypeOf(data));
157
- if (!isArray && !isPlainObject$3(data)) {
158
- copy = data;
159
- }
160
- else {
161
- for (const key in data) {
162
- if (data.hasOwnProperty(key)) {
163
- copy[key] = cloneObject(data[key]);
164
- }
165
- }
166
- }
152
+ const isFileListInstance = typeof FileList !== 'undefined' && data instanceof FileList;
153
+ if (isWeb && (data instanceof Blob || isFileListInstance)) {
154
+ return data;
167
155
  }
168
- else {
156
+ const isArray = Array.isArray(data);
157
+ if (!isArray && !(isObject$3(data) && isPlainObject$3(data))) {
169
158
  return data;
170
159
  }
160
+ const copy = isArray ? [] : Object.create(Object.getPrototypeOf(data));
161
+ for (const key in data) {
162
+ if (Object.prototype.hasOwnProperty.call(data, key)) {
163
+ copy[key] = cloneObject(data[key]);
164
+ }
165
+ }
171
166
  return copy;
172
167
  }
173
168
 
@@ -193,6 +188,8 @@ var get = (object, path, defaultValue) => {
193
188
 
194
189
  var isBoolean$1 = (value) => typeof value === 'boolean';
195
190
 
191
+ var isFunction$3 = (value) => typeof value === 'function';
192
+
196
193
  var set = (object, path, value) => {
197
194
  let index = -1;
198
195
  const tempPath = isKey(path) ? [path] : stringToPath(path);
@@ -616,12 +613,12 @@ function useController(props) {
616
613
  }), [name, control._formValues]);
617
614
  const ref = React.useCallback((elm) => {
618
615
  const field = get(control._fields, name);
619
- if (field && elm) {
616
+ if (field && field._f && elm) {
620
617
  field._f.ref = {
621
- focus: () => elm.focus && elm.focus(),
622
- select: () => elm.select && elm.select(),
623
- setCustomValidity: (message) => elm.setCustomValidity(message),
624
- reportValidity: () => elm.reportValidity(),
618
+ focus: () => isFunction$3(elm.focus) && elm.focus(),
619
+ select: () => isFunction$3(elm.select) && elm.select(),
620
+ setCustomValidity: (message) => isFunction$3(elm.setCustomValidity) && elm.setCustomValidity(message),
621
+ reportValidity: () => isFunction$3(elm.reportValidity) && elm.reportValidity(),
625
622
  };
626
623
  }
627
624
  }, [control._fields, name]);
@@ -792,8 +789,6 @@ var isEmptyObject$1 = (value) => isObject$3(value) && !Object.keys(value).length
792
789
 
793
790
  var isFileInput = (element) => element.type === 'file';
794
791
 
795
- var isFunction$3 = (value) => typeof value === 'function';
796
-
797
792
  var isHTMLElement$1 = (value) => {
798
793
  if (!isWeb) {
799
794
  return false;
@@ -1361,6 +1356,7 @@ function createFormControl(props = {}) {
1361
1356
  action: false,
1362
1357
  mount: false,
1363
1358
  watch: false,
1359
+ keepIsValid: false,
1364
1360
  };
1365
1361
  let _names = {
1366
1362
  mount: new Set(),
@@ -1371,7 +1367,7 @@ function createFormControl(props = {}) {
1371
1367
  };
1372
1368
  let delayErrorCallback;
1373
1369
  let timer = 0;
1374
- const _proxyFormState = {
1370
+ const defaultProxyFormState = {
1375
1371
  isDirty: false,
1376
1372
  dirtyFields: false,
1377
1373
  validatingFields: false,
@@ -1380,6 +1376,9 @@ function createFormControl(props = {}) {
1380
1376
  isValid: false,
1381
1377
  errors: false,
1382
1378
  };
1379
+ const _proxyFormState = {
1380
+ ...defaultProxyFormState,
1381
+ };
1383
1382
  let _proxySubscribeFormState = {
1384
1383
  ..._proxyFormState,
1385
1384
  };
@@ -1393,13 +1392,21 @@ function createFormControl(props = {}) {
1393
1392
  timer = setTimeout(callback, wait);
1394
1393
  };
1395
1394
  const _setValid = async (shouldUpdateValid) => {
1395
+ if (_state.keepIsValid) {
1396
+ return;
1397
+ }
1396
1398
  if (!_options.disabled &&
1397
1399
  (_proxyFormState.isValid ||
1398
1400
  _proxySubscribeFormState.isValid ||
1399
1401
  shouldUpdateValid)) {
1400
- const isValid = _options.resolver
1401
- ? isEmptyObject$1((await _runSchema()).errors)
1402
- : await executeBuiltInValidation(_fields, true);
1402
+ let isValid;
1403
+ if (_options.resolver) {
1404
+ isValid = isEmptyObject$1((await _runSchema()).errors);
1405
+ _updateIsValidating();
1406
+ }
1407
+ else {
1408
+ isValid = await executeBuiltInValidation(_fields, true);
1409
+ }
1403
1410
  if (isValid !== _formState.isValid) {
1404
1411
  _subjects.state.next({
1405
1412
  isValid,
@@ -1562,11 +1569,11 @@ function createFormControl(props = {}) {
1562
1569
  const _runSchema = async (name) => {
1563
1570
  _updateIsValidating(name, true);
1564
1571
  const result = await _options.resolver(_formValues, _options.context, getResolverOptions(name || _names.mount, _fields, _options.criteriaMode, _options.shouldUseNativeValidation));
1565
- _updateIsValidating(name);
1566
1572
  return result;
1567
1573
  };
1568
1574
  const executeSchemaAndUpdateState = async (names) => {
1569
1575
  const { errors } = await _runSchema(names);
1576
+ _updateIsValidating(names);
1570
1577
  if (names) {
1571
1578
  for (const name of names) {
1572
1579
  const error = get(errors, name);
@@ -1802,6 +1809,7 @@ function createFormControl(props = {}) {
1802
1809
  !isBlurEvent && watched && _subjects.state.next({ ..._formState });
1803
1810
  if (_options.resolver) {
1804
1811
  const { errors } = await _runSchema([name]);
1812
+ _updateIsValidating([name]);
1805
1813
  _updateIsFieldValueUpdated(fieldValue);
1806
1814
  if (isFieldValueUpdated) {
1807
1815
  const previousErrorLookupResult = schemaErrorLookup(_formState.errors, _fields, name);
@@ -1947,7 +1955,10 @@ function createFormControl(props = {}) {
1947
1955
  };
1948
1956
  return _subscribe({
1949
1957
  ...props,
1950
- formState: _proxySubscribeFormState,
1958
+ formState: {
1959
+ ...defaultProxyFormState,
1960
+ ...props.formState,
1961
+ },
1951
1962
  });
1952
1963
  };
1953
1964
  const unregister = (name, options = {}) => {
@@ -2100,6 +2111,7 @@ function createFormControl(props = {}) {
2100
2111
  });
2101
2112
  if (_options.resolver) {
2102
2113
  const { errors, values } = await _runSchema();
2114
+ _updateIsValidating();
2103
2115
  _formState.errors = errors;
2104
2116
  fieldValues = cloneObject(values);
2105
2117
  }
@@ -2240,6 +2252,7 @@ function createFormControl(props = {}) {
2240
2252
  !!keepStateOptions.keepDirtyValues ||
2241
2253
  (!_options.shouldUnregister && !isEmptyObject$1(values));
2242
2254
  _state.watch = !!_options.shouldUnregister;
2255
+ _state.keepIsValid = !!keepStateOptions.keepIsValid;
2243
2256
  _state.action = false;
2244
2257
  // Clear errors synchronously to prevent validation errors on subsequent submissions
2245
2258
  // This fixes the issue where form.reset() causes validation errors on subsequent
@@ -2284,7 +2297,7 @@ function createFormControl(props = {}) {
2284
2297
  };
2285
2298
  const reset = (formValues, keepStateOptions) => _reset(isFunction$3(formValues)
2286
2299
  ? formValues(_formValues)
2287
- : formValues, keepStateOptions);
2300
+ : formValues, { ..._options.resetOptions, ...keepStateOptions });
2288
2301
  const setFocus = (name, options = {}) => {
2289
2302
  const field = get(_fields, name);
2290
2303
  const fieldReference = field && field._f;
@@ -2293,10 +2306,14 @@ function createFormControl(props = {}) {
2293
2306
  ? fieldReference.refs[0]
2294
2307
  : fieldReference.ref;
2295
2308
  if (fieldRef.focus) {
2296
- fieldRef.focus();
2297
- options.shouldSelect &&
2298
- isFunction$3(fieldRef.select) &&
2299
- fieldRef.select();
2309
+ // Use setTimeout to ensure focus happens after any pending state updates
2310
+ // This fixes the issue where setFocus doesn't work immediately after setError
2311
+ setTimeout(() => {
2312
+ fieldRef.focus();
2313
+ options.shouldSelect &&
2314
+ isFunction$3(fieldRef.select) &&
2315
+ fieldRef.select();
2316
+ });
2300
2317
  }
2301
2318
  }
2302
2319
  };
@@ -2322,6 +2339,7 @@ function createFormControl(props = {}) {
2322
2339
  setError,
2323
2340
  _subscribe,
2324
2341
  _runSchema,
2342
+ _updateIsValidating,
2325
2343
  _focusError,
2326
2344
  _getWatch,
2327
2345
  _getDirty,
@@ -2608,7 +2626,7 @@ const useFormContext = () => {
2608
2626
  return formContext;
2609
2627
  };
2610
2628
 
2611
- const CustomTextField = (props) => {
2629
+ const TextField = (props) => {
2612
2630
  return jsxRuntime.jsx(material.TextField, { size: "small", ...props });
2613
2631
  };
2614
2632
 
@@ -2624,14 +2642,14 @@ function CustomSelect({ name, items, label, sx, getLabel, getValue, getKey, }) {
2624
2642
  else {
2625
2643
  resetField(name);
2626
2644
  }
2627
- }, renderInput: (params) => jsxRuntime.jsx(CustomTextField, { ...params, label: label }) }));
2645
+ }, renderInput: (params) => jsxRuntime.jsx(TextField, { ...params, label: label }) }));
2628
2646
  }
2629
2647
 
2630
2648
  function CustomInput(props) {
2631
2649
  const { name, type } = props;
2632
2650
  const textFieldId = React__namespace.useId();
2633
2651
  const { control } = useFormContext$1();
2634
- return (jsxRuntime.jsx(Controller, { name: name, control: control, render: ({ field }) => (jsxRuntime.jsx(CustomTextField, { id: textFieldId, size: "small", ...props, ...field, onChange: (event) => {
2652
+ return (jsxRuntime.jsx(Controller, { name: name, control: control, render: ({ field }) => (jsxRuntime.jsx(TextField, { id: textFieldId, size: "small", ...props, ...field, onChange: (event) => {
2635
2653
  const { target } = event;
2636
2654
  const { value } = target;
2637
2655
  switch (type) {
@@ -18604,6 +18622,13 @@ const getNatureForestLayers = () => {
18604
18622
  return layers;
18605
18623
  };
18606
18624
 
18625
+ exports.TrafficSignStatus = void 0;
18626
+ (function (TrafficSignStatus) {
18627
+ TrafficSignStatus["ACTIVE"] = "\u0414\u0435\u0439\u0441\u0442\u0432\u0443\u044E\u0449\u0438\u0439";
18628
+ TrafficSignStatus["INACTIVE"] = "\u041D\u0435\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044E\u0449\u0438\u0439";
18629
+ TrafficSignStatus["TEMPORARY"] = "\u0412\u0440\u0435\u043C\u0435\u043D\u043D\u044B\u0439";
18630
+ })(exports.TrafficSignStatus || (exports.TrafficSignStatus = {}));
18631
+
18607
18632
  const trafficSignNumbers = [
18608
18633
  '1.1',
18609
18634
  '1.10',
@@ -19355,6 +19380,44 @@ Object.entries(trafficSignHeights).forEach(([height, trafficSignNumbers]) => {
19355
19380
  });
19356
19381
  });
19357
19382
  });
19383
+ const trafficSignTypes = {
19384
+ 'Предупреждающие знаки': [],
19385
+ 'Знаки приоритета': [],
19386
+ 'Запрещающие знаки': [],
19387
+ 'Предписывающие знаки': [],
19388
+ 'Знаки особых предписаний': [],
19389
+ 'Информационные знаки': [],
19390
+ 'Знаки сервиса': [],
19391
+ };
19392
+ const trafficSignTypesOptions = Object.keys(trafficSignTypes).map((trafficSignType) => ({
19393
+ label: trafficSignType,
19394
+ value: trafficSignType,
19395
+ }));
19396
+ const trafficSignStatusOptions = Object.values(exports.TrafficSignStatus).map((status) => ({
19397
+ label: status,
19398
+ value: status,
19399
+ }));
19400
+ const trafficSignFieldsTitles = {
19401
+ traffic_sign_id: '',
19402
+ dit_id: '',
19403
+ tsodd_id: '',
19404
+ pillar_id: '',
19405
+ dops: '',
19406
+ comment: 'Комментарий',
19407
+ direction: 'Направление',
19408
+ traffic_sign_number: 'Номер знака',
19409
+ traffic_sign_title: 'Название знака',
19410
+ traffic_sign_value: 'Название знака',
19411
+ traffic_sign_type: 'Тип знака',
19412
+ lat: 'Широта',
19413
+ lon: 'Долгота',
19414
+ future_maintanance_date: 'Дата следующего обслуживания',
19415
+ placement_date: 'Дата установки',
19416
+ rapair_performed_date: 'Дата последнего ремонта',
19417
+ verification_date: 'Дата поверки',
19418
+ warranty_expr_date: 'Дата окончания гарантии',
19419
+ status: 'Статус',
19420
+ };
19358
19421
 
19359
19422
  const getTrafficSignLayers = (source) => {
19360
19423
  const layers = [];
@@ -26357,6 +26420,16 @@ const CustomModal = ({ name, children, onClose, onOpen, }) => {
26357
26420
  };
26358
26421
  var modal = observer(CustomModal);
26359
26422
 
26423
+ function DateField({ name, label }) {
26424
+ const { control } = useFormContext$1();
26425
+ const id = React__namespace.useId();
26426
+ return (jsxRuntime.jsx(Controller, { control: control, name: name, render: ({ field }) => {
26427
+ return (jsxRuntime.jsx(DateField$1.DateField, { ...field, id: id, label: label, slots: {
26428
+ field: TextField,
26429
+ } }));
26430
+ } }));
26431
+ }
26432
+
26360
26433
  const useShowSnackbar = () => {
26361
26434
  const { enqueueSnackbar } = useSnackbar();
26362
26435
  const showSnackbar = ({ variant, message, }) => {
@@ -28881,6 +28954,7 @@ exports.Checkbox = CustomCheckbox;
28881
28954
  exports.DartcomAuthProvider = auth;
28882
28955
  exports.DartcomMobxProvider = DartcomMobxProvider;
28883
28956
  exports.DartcomProviders = DartcomProviders;
28957
+ exports.DateField = DateField;
28884
28958
  exports.DeleteButton = DeleteButton;
28885
28959
  exports.DragList = DragList;
28886
28960
  exports.EditButton = EditButton;
@@ -28946,10 +29020,14 @@ exports.sourceUrl = sourceUrl;
28946
29020
  exports.text_source = text_source;
28947
29021
  exports.tile_size = tile_size;
28948
29022
  exports.trafficSignExtension = trafficSignExtension;
29023
+ exports.trafficSignFieldsTitles = trafficSignFieldsTitles;
28949
29024
  exports.trafficSignHeights = trafficSignHeights;
28950
29025
  exports.trafficSignLayerName = trafficSignLayerName;
28951
29026
  exports.trafficSignNumbers = trafficSignNumbers;
28952
29027
  exports.trafficSignNumbersSizes = trafficSignNumbersSizes;
29028
+ exports.trafficSignStatusOptions = trafficSignStatusOptions;
29029
+ exports.trafficSignTypes = trafficSignTypes;
29030
+ exports.trafficSignTypesOptions = trafficSignTypesOptions;
28953
29031
  exports.trafficSignWidths = trafficSignWidths;
28954
29032
  exports.useFormContext = useFormContext;
28955
29033
  exports.useGetLeafletLayer = useGetLeafletLayer;