@dartcom/ui-kit 10.0.5 → 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.
- package/dist/components/date-field/date-field.d.ts +4 -0
- package/dist/components/date-field/date-field.d.ts.map +1 -0
- package/dist/components/date-field/date-field.stories.d.ts +7 -0
- package/dist/components/date-field/date-field.stories.d.ts.map +1 -0
- package/dist/components/date-field/index.d.ts +2 -0
- package/dist/components/date-field/index.d.ts.map +1 -0
- package/dist/components/date-field/types.d.ts +6 -0
- package/dist/components/date-field/types.d.ts.map +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/layers/leaflet/layers/traffic-sign/constants.d.ts +17 -0
- package/dist/components/layers/leaflet/layers/traffic-sign/constants.d.ts.map +1 -1
- package/dist/components/layers/leaflet/layers/traffic-sign/index.d.ts +1 -0
- package/dist/components/layers/leaflet/layers/traffic-sign/index.d.ts.map +1 -1
- package/dist/components/layers/leaflet/layers/traffic-sign/types.d.ts +34 -0
- package/dist/components/layers/leaflet/layers/traffic-sign/types.d.ts.map +1 -0
- package/dist/components/layers/leaflet/layers/traffic-sign/utils.d.ts +6 -0
- package/dist/components/layers/leaflet/layers/traffic-sign/utils.d.ts.map +1 -1
- package/dist/components/select/types.d.ts +1 -1
- package/dist/components/select/types.d.ts.map +1 -1
- package/dist/components/text-field/text-field.d.ts +2 -2
- package/dist/components/text-field/text-field.d.ts.map +1 -1
- package/dist/index.cjs +131 -43
- package/dist/index.cjs.map +1 -1
- package/dist/index.esm.js +2 -2
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
|
@@ -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 @@
|
|
|
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 @@
|
|
|
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"}
|
|
@@ -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,8 +1,11 @@
|
|
|
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;
|
|
4
6
|
preview: number;
|
|
5
7
|
};
|
|
8
|
+
export declare const trafficSignLayerName = "traffic-sign";
|
|
6
9
|
export declare const trafficSignExtension = "svg";
|
|
7
10
|
export declare const trafficSignNumbersSizes: Map<string, {
|
|
8
11
|
width: number;
|
|
@@ -15,4 +18,18 @@ export declare const trafficSignHeights: {
|
|
|
15
18
|
40: string[];
|
|
16
19
|
68: string[];
|
|
17
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
|
+
};
|
|
18
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,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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/layers/leaflet/layers/traffic-sign/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/layers/leaflet/layers/traffic-sign/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Nullable } from '../../../../../types';
|
|
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'> & {
|
|
8
|
+
readonly dop_id: string;
|
|
9
|
+
dop_sign_number: string;
|
|
10
|
+
dop_sign_title: string;
|
|
11
|
+
dop_sign_text: string;
|
|
12
|
+
};
|
|
13
|
+
export type TrafficSign = {
|
|
14
|
+
readonly traffic_sign_id: string;
|
|
15
|
+
readonly dit_id: number;
|
|
16
|
+
readonly tsodd_id: number;
|
|
17
|
+
readonly pillar_id: Nullable<string>;
|
|
18
|
+
comment: Nullable<string>;
|
|
19
|
+
direction: Nullable<number>;
|
|
20
|
+
traffic_sign_number: string;
|
|
21
|
+
traffic_sign_title: string;
|
|
22
|
+
traffic_sign_value: Nullable<string>;
|
|
23
|
+
traffic_sign_type: string;
|
|
24
|
+
dops: TrafficSignDop[];
|
|
25
|
+
lat: number;
|
|
26
|
+
lon: number;
|
|
27
|
+
future_maintanance_date: string;
|
|
28
|
+
placement_date: string;
|
|
29
|
+
rapair_performed_date: string;
|
|
30
|
+
verification_date: string;
|
|
31
|
+
warranty_expr_date: string;
|
|
32
|
+
status: TrafficSignStatus;
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +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,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,3 +1,9 @@
|
|
|
1
1
|
import { TangramCustomLayer, TangramSourceNames } from '../../types';
|
|
2
|
+
import { trafficSignWidths } from './constants';
|
|
3
|
+
import { TrafficSign } from './types';
|
|
2
4
|
export declare const getTrafficSignLayers: (source: TangramSourceNames) => TangramCustomLayer[];
|
|
5
|
+
export declare const getTrafficSignImgSrc: ({ type, number, }: {
|
|
6
|
+
type: keyof typeof trafficSignWidths;
|
|
7
|
+
number: TrafficSign["traffic_sign_number"];
|
|
8
|
+
}) => string;
|
|
3
9
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../../src/components/layers/leaflet/layers/traffic-sign/utils.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,kBAAkB,EAClB,kBAAkB,EACnB,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../../src/components/layers/leaflet/layers/traffic-sign/utils.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,kBAAkB,EAClB,kBAAkB,EACnB,MAAM,aAAa,CAAC;AAErB,OAAO,EAKL,iBAAiB,EAClB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEtC,eAAO,MAAM,oBAAoB,GAAI,QAAQ,kBAAkB,yBAkE9D,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,mBAGlC;IACD,IAAI,EAAE,MAAM,OAAO,iBAAiB,CAAC;IACrC,MAAM,EAAE,WAAW,CAAC,qBAAqB,CAAC,CAAC;CAC5C,WAMA,CAAC"}
|
|
@@ -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;
|
|
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
|
|
4
|
-
export default
|
|
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,
|
|
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
|
-
|
|
150
|
+
return new Date(data);
|
|
153
151
|
}
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
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:
|
|
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
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
fieldRef.
|
|
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
|
|
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(
|
|
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(
|
|
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',
|
|
@@ -18975,6 +19000,7 @@ const trafficSignWidths = {
|
|
|
18975
19000
|
map: 20,
|
|
18976
19001
|
preview: 40,
|
|
18977
19002
|
};
|
|
19003
|
+
const trafficSignLayerName = 'traffic-sign';
|
|
18978
19004
|
const trafficSignExtension = 'svg';
|
|
18979
19005
|
const trafficSignNumbersSizes = new Map();
|
|
18980
19006
|
const trafficSignHeights = {
|
|
@@ -19354,6 +19380,44 @@ Object.entries(trafficSignHeights).forEach(([height, trafficSignNumbers]) => {
|
|
|
19354
19380
|
});
|
|
19355
19381
|
});
|
|
19356
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
|
+
};
|
|
19357
19421
|
|
|
19358
19422
|
const getTrafficSignLayers = (source) => {
|
|
19359
19423
|
const layers = [];
|
|
@@ -19361,17 +19425,19 @@ const getTrafficSignLayers = (source) => {
|
|
|
19361
19425
|
source,
|
|
19362
19426
|
layer: exports.SourceLayers.TRAFFIC_SIGN,
|
|
19363
19427
|
};
|
|
19364
|
-
const layerName = 'traffic-sign';
|
|
19365
19428
|
const textures = {};
|
|
19366
19429
|
const sublayers = {};
|
|
19367
19430
|
trafficSignNumbers.forEach((trafficSignNumber) => {
|
|
19368
|
-
const texture = `${
|
|
19431
|
+
const texture = `${trafficSignLayerName}-${trafficSignNumber}`;
|
|
19369
19432
|
const size = trafficSignNumbersSizes.get(trafficSignNumber);
|
|
19370
19433
|
if (size) {
|
|
19371
19434
|
const { width, height } = size;
|
|
19372
|
-
const
|
|
19435
|
+
const url = getTrafficSignImgSrc({
|
|
19436
|
+
type: 'map',
|
|
19437
|
+
number: trafficSignNumber,
|
|
19438
|
+
});
|
|
19373
19439
|
textures[texture] = {
|
|
19374
|
-
url
|
|
19440
|
+
url,
|
|
19375
19441
|
filtering: 'mipmap',
|
|
19376
19442
|
sprites: {
|
|
19377
19443
|
base: [0, 0, width, height],
|
|
@@ -19406,6 +19472,11 @@ const getTrafficSignLayers = (source) => {
|
|
|
19406
19472
|
layers.push(layer);
|
|
19407
19473
|
return layers;
|
|
19408
19474
|
};
|
|
19475
|
+
const getTrafficSignImgSrc = ({ type, number, }) => {
|
|
19476
|
+
const width = trafficSignWidths[type];
|
|
19477
|
+
const textureUrl = `${imagesPath}/msk/${trafficSignLayerName}_${width}/${number}.${trafficSignExtension}`;
|
|
19478
|
+
return textureUrl;
|
|
19479
|
+
};
|
|
19409
19480
|
|
|
19410
19481
|
const size$2 = 20;
|
|
19411
19482
|
const extension$2 = 'svg';
|
|
@@ -26349,6 +26420,16 @@ const CustomModal = ({ name, children, onClose, onOpen, }) => {
|
|
|
26349
26420
|
};
|
|
26350
26421
|
var modal = observer(CustomModal);
|
|
26351
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
|
+
|
|
26352
26433
|
const useShowSnackbar = () => {
|
|
26353
26434
|
const { enqueueSnackbar } = useSnackbar();
|
|
26354
26435
|
const showSnackbar = ({ variant, message, }) => {
|
|
@@ -28873,6 +28954,7 @@ exports.Checkbox = CustomCheckbox;
|
|
|
28873
28954
|
exports.DartcomAuthProvider = auth;
|
|
28874
28955
|
exports.DartcomMobxProvider = DartcomMobxProvider;
|
|
28875
28956
|
exports.DartcomProviders = DartcomProviders;
|
|
28957
|
+
exports.DateField = DateField;
|
|
28876
28958
|
exports.DeleteButton = DeleteButton;
|
|
28877
28959
|
exports.DragList = DragList;
|
|
28878
28960
|
exports.EditButton = EditButton;
|
|
@@ -28923,6 +29005,7 @@ exports.getPillarLayers = getPillarLayers;
|
|
|
28923
29005
|
exports.getPointAddressLayers = getPointAddressLayers;
|
|
28924
29006
|
exports.getRailroadLayers = getRailroadLayers;
|
|
28925
29007
|
exports.getRoadPolyLayers = getRoadPolyLayers;
|
|
29008
|
+
exports.getTrafficSignImgSrc = getTrafficSignImgSrc;
|
|
28926
29009
|
exports.getTrafficSignLayers = getTrafficSignLayers;
|
|
28927
29010
|
exports.getTrafficSignalLayers = getTrafficSignalLayers;
|
|
28928
29011
|
exports.getUrlencodedBody = getUrlencodedBody;
|
|
@@ -28937,9 +29020,14 @@ exports.sourceUrl = sourceUrl;
|
|
|
28937
29020
|
exports.text_source = text_source;
|
|
28938
29021
|
exports.tile_size = tile_size;
|
|
28939
29022
|
exports.trafficSignExtension = trafficSignExtension;
|
|
29023
|
+
exports.trafficSignFieldsTitles = trafficSignFieldsTitles;
|
|
28940
29024
|
exports.trafficSignHeights = trafficSignHeights;
|
|
29025
|
+
exports.trafficSignLayerName = trafficSignLayerName;
|
|
28941
29026
|
exports.trafficSignNumbers = trafficSignNumbers;
|
|
28942
29027
|
exports.trafficSignNumbersSizes = trafficSignNumbersSizes;
|
|
29028
|
+
exports.trafficSignStatusOptions = trafficSignStatusOptions;
|
|
29029
|
+
exports.trafficSignTypes = trafficSignTypes;
|
|
29030
|
+
exports.trafficSignTypesOptions = trafficSignTypesOptions;
|
|
28943
29031
|
exports.trafficSignWidths = trafficSignWidths;
|
|
28944
29032
|
exports.useFormContext = useFormContext;
|
|
28945
29033
|
exports.useGetLeafletLayer = useGetLeafletLayer;
|