@dartcom/ui-kit 10.0.4 → 10.0.6
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/layers/leaflet/layers/traffic-sign/constants.d.ts +6 -2
- 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 +2 -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 +38 -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/index.cjs +25 -7
- 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 +2 -1
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
export declare const trafficSignNumbers: string[];
|
|
2
|
-
export declare const
|
|
3
|
-
|
|
2
|
+
export declare const trafficSignWidths: {
|
|
3
|
+
map: number;
|
|
4
|
+
preview: number;
|
|
5
|
+
};
|
|
6
|
+
export declare const trafficSignLayerName = "traffic-sign";
|
|
7
|
+
export declare const trafficSignExtension = "svg";
|
|
4
8
|
export declare const trafficSignNumbersSizes: Map<string, {
|
|
5
9
|
width: number;
|
|
6
10
|
height: number;
|
|
@@ -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,
|
|
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 +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"}
|
|
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,38 @@
|
|
|
1
|
+
import { Nullable } from '../../../../../types';
|
|
2
|
+
export type TrafficSignStatus = 'OK';
|
|
3
|
+
export type TrafficSignDop = {
|
|
4
|
+
readonly traffic_sign_id: string;
|
|
5
|
+
readonly dop_id: string;
|
|
6
|
+
dop_sign_number: string;
|
|
7
|
+
dop_sign_title: string;
|
|
8
|
+
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
|
+
};
|
|
17
|
+
export type TrafficSign = {
|
|
18
|
+
readonly traffic_sign_id: string;
|
|
19
|
+
readonly dit_id: number;
|
|
20
|
+
readonly tsodd_id: number;
|
|
21
|
+
readonly pillar_id: Nullable<string>;
|
|
22
|
+
comment: Nullable<string>;
|
|
23
|
+
direction: Nullable<number>;
|
|
24
|
+
traffic_sign_number: string;
|
|
25
|
+
traffic_sign_title: string;
|
|
26
|
+
traffic_sign_value: Nullable<string>;
|
|
27
|
+
traffic_sign_type: string;
|
|
28
|
+
dops: TrafficSignDop[];
|
|
29
|
+
lat: number;
|
|
30
|
+
lon: number;
|
|
31
|
+
future_maintanance_date: string;
|
|
32
|
+
placement_date: string;
|
|
33
|
+
rapair_performed_date: string;
|
|
34
|
+
verification_date: string;
|
|
35
|
+
warranty_expr_date: string;
|
|
36
|
+
status: TrafficSignStatus;
|
|
37
|
+
};
|
|
38
|
+
//# 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,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,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"}
|
package/dist/index.cjs
CHANGED
|
@@ -18971,8 +18971,12 @@ const trafficSignNumbers = [
|
|
|
18971
18971
|
'8.9.2',
|
|
18972
18972
|
'8.9.3',
|
|
18973
18973
|
];
|
|
18974
|
-
const
|
|
18975
|
-
|
|
18974
|
+
const trafficSignWidths = {
|
|
18975
|
+
map: 20,
|
|
18976
|
+
preview: 40,
|
|
18977
|
+
};
|
|
18978
|
+
const trafficSignLayerName = 'traffic-sign';
|
|
18979
|
+
const trafficSignExtension = 'svg';
|
|
18976
18980
|
const trafficSignNumbersSizes = new Map();
|
|
18977
18981
|
const trafficSignHeights = {
|
|
18978
18982
|
20: [
|
|
@@ -19346,7 +19350,7 @@ const trafficSignHeights = {
|
|
|
19346
19350
|
Object.entries(trafficSignHeights).forEach(([height, trafficSignNumbers]) => {
|
|
19347
19351
|
trafficSignNumbers.forEach((trafficSignNumber) => {
|
|
19348
19352
|
trafficSignNumbersSizes.set(trafficSignNumber, {
|
|
19349
|
-
width,
|
|
19353
|
+
width: trafficSignWidths.map,
|
|
19350
19354
|
height: +height,
|
|
19351
19355
|
});
|
|
19352
19356
|
});
|
|
@@ -19358,17 +19362,19 @@ const getTrafficSignLayers = (source) => {
|
|
|
19358
19362
|
source,
|
|
19359
19363
|
layer: exports.SourceLayers.TRAFFIC_SIGN,
|
|
19360
19364
|
};
|
|
19361
|
-
const layerName = 'traffic-sign';
|
|
19362
19365
|
const textures = {};
|
|
19363
19366
|
const sublayers = {};
|
|
19364
19367
|
trafficSignNumbers.forEach((trafficSignNumber) => {
|
|
19365
|
-
const texture = `${
|
|
19368
|
+
const texture = `${trafficSignLayerName}-${trafficSignNumber}`;
|
|
19366
19369
|
const size = trafficSignNumbersSizes.get(trafficSignNumber);
|
|
19367
19370
|
if (size) {
|
|
19368
19371
|
const { width, height } = size;
|
|
19369
|
-
const
|
|
19372
|
+
const url = getTrafficSignImgSrc({
|
|
19373
|
+
type: 'map',
|
|
19374
|
+
number: trafficSignNumber,
|
|
19375
|
+
});
|
|
19370
19376
|
textures[texture] = {
|
|
19371
|
-
url
|
|
19377
|
+
url,
|
|
19372
19378
|
filtering: 'mipmap',
|
|
19373
19379
|
sprites: {
|
|
19374
19380
|
base: [0, 0, width, height],
|
|
@@ -19403,6 +19409,11 @@ const getTrafficSignLayers = (source) => {
|
|
|
19403
19409
|
layers.push(layer);
|
|
19404
19410
|
return layers;
|
|
19405
19411
|
};
|
|
19412
|
+
const getTrafficSignImgSrc = ({ type, number, }) => {
|
|
19413
|
+
const width = trafficSignWidths[type];
|
|
19414
|
+
const textureUrl = `${imagesPath}/msk/${trafficSignLayerName}_${width}/${number}.${trafficSignExtension}`;
|
|
19415
|
+
return textureUrl;
|
|
19416
|
+
};
|
|
19406
19417
|
|
|
19407
19418
|
const size$2 = 20;
|
|
19408
19419
|
const extension$2 = 'svg';
|
|
@@ -28920,6 +28931,7 @@ exports.getPillarLayers = getPillarLayers;
|
|
|
28920
28931
|
exports.getPointAddressLayers = getPointAddressLayers;
|
|
28921
28932
|
exports.getRailroadLayers = getRailroadLayers;
|
|
28922
28933
|
exports.getRoadPolyLayers = getRoadPolyLayers;
|
|
28934
|
+
exports.getTrafficSignImgSrc = getTrafficSignImgSrc;
|
|
28923
28935
|
exports.getTrafficSignLayers = getTrafficSignLayers;
|
|
28924
28936
|
exports.getTrafficSignalLayers = getTrafficSignalLayers;
|
|
28925
28937
|
exports.getUrlencodedBody = getUrlencodedBody;
|
|
@@ -28933,6 +28945,12 @@ exports.rootStore = rootStore;
|
|
|
28933
28945
|
exports.sourceUrl = sourceUrl;
|
|
28934
28946
|
exports.text_source = text_source;
|
|
28935
28947
|
exports.tile_size = tile_size;
|
|
28948
|
+
exports.trafficSignExtension = trafficSignExtension;
|
|
28949
|
+
exports.trafficSignHeights = trafficSignHeights;
|
|
28950
|
+
exports.trafficSignLayerName = trafficSignLayerName;
|
|
28951
|
+
exports.trafficSignNumbers = trafficSignNumbers;
|
|
28952
|
+
exports.trafficSignNumbersSizes = trafficSignNumbersSizes;
|
|
28953
|
+
exports.trafficSignWidths = trafficSignWidths;
|
|
28936
28954
|
exports.useFormContext = useFormContext;
|
|
28937
28955
|
exports.useGetLeafletLayer = useGetLeafletLayer;
|
|
28938
28956
|
exports.useGetUser = useGetUser;
|