@dartcom/ui-kit 10.0.5 → 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 +1 -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 +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 +14 -4
- 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
|
@@ -3,6 +3,7 @@ export declare const trafficSignWidths: {
|
|
|
3
3
|
map: number;
|
|
4
4
|
preview: number;
|
|
5
5
|
};
|
|
6
|
+
export declare const trafficSignLayerName = "traffic-sign";
|
|
6
7
|
export declare const trafficSignExtension = "svg";
|
|
7
8
|
export declare const trafficSignNumbersSizes: Map<string, {
|
|
8
9
|
width: 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,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,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;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,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
|
@@ -18975,6 +18975,7 @@ const trafficSignWidths = {
|
|
|
18975
18975
|
map: 20,
|
|
18976
18976
|
preview: 40,
|
|
18977
18977
|
};
|
|
18978
|
+
const trafficSignLayerName = 'traffic-sign';
|
|
18978
18979
|
const trafficSignExtension = 'svg';
|
|
18979
18980
|
const trafficSignNumbersSizes = new Map();
|
|
18980
18981
|
const trafficSignHeights = {
|
|
@@ -19361,17 +19362,19 @@ const getTrafficSignLayers = (source) => {
|
|
|
19361
19362
|
source,
|
|
19362
19363
|
layer: exports.SourceLayers.TRAFFIC_SIGN,
|
|
19363
19364
|
};
|
|
19364
|
-
const layerName = 'traffic-sign';
|
|
19365
19365
|
const textures = {};
|
|
19366
19366
|
const sublayers = {};
|
|
19367
19367
|
trafficSignNumbers.forEach((trafficSignNumber) => {
|
|
19368
|
-
const texture = `${
|
|
19368
|
+
const texture = `${trafficSignLayerName}-${trafficSignNumber}`;
|
|
19369
19369
|
const size = trafficSignNumbersSizes.get(trafficSignNumber);
|
|
19370
19370
|
if (size) {
|
|
19371
19371
|
const { width, height } = size;
|
|
19372
|
-
const
|
|
19372
|
+
const url = getTrafficSignImgSrc({
|
|
19373
|
+
type: 'map',
|
|
19374
|
+
number: trafficSignNumber,
|
|
19375
|
+
});
|
|
19373
19376
|
textures[texture] = {
|
|
19374
|
-
url
|
|
19377
|
+
url,
|
|
19375
19378
|
filtering: 'mipmap',
|
|
19376
19379
|
sprites: {
|
|
19377
19380
|
base: [0, 0, width, height],
|
|
@@ -19406,6 +19409,11 @@ const getTrafficSignLayers = (source) => {
|
|
|
19406
19409
|
layers.push(layer);
|
|
19407
19410
|
return layers;
|
|
19408
19411
|
};
|
|
19412
|
+
const getTrafficSignImgSrc = ({ type, number, }) => {
|
|
19413
|
+
const width = trafficSignWidths[type];
|
|
19414
|
+
const textureUrl = `${imagesPath}/msk/${trafficSignLayerName}_${width}/${number}.${trafficSignExtension}`;
|
|
19415
|
+
return textureUrl;
|
|
19416
|
+
};
|
|
19409
19417
|
|
|
19410
19418
|
const size$2 = 20;
|
|
19411
19419
|
const extension$2 = 'svg';
|
|
@@ -28923,6 +28931,7 @@ exports.getPillarLayers = getPillarLayers;
|
|
|
28923
28931
|
exports.getPointAddressLayers = getPointAddressLayers;
|
|
28924
28932
|
exports.getRailroadLayers = getRailroadLayers;
|
|
28925
28933
|
exports.getRoadPolyLayers = getRoadPolyLayers;
|
|
28934
|
+
exports.getTrafficSignImgSrc = getTrafficSignImgSrc;
|
|
28926
28935
|
exports.getTrafficSignLayers = getTrafficSignLayers;
|
|
28927
28936
|
exports.getTrafficSignalLayers = getTrafficSignalLayers;
|
|
28928
28937
|
exports.getUrlencodedBody = getUrlencodedBody;
|
|
@@ -28938,6 +28947,7 @@ exports.text_source = text_source;
|
|
|
28938
28947
|
exports.tile_size = tile_size;
|
|
28939
28948
|
exports.trafficSignExtension = trafficSignExtension;
|
|
28940
28949
|
exports.trafficSignHeights = trafficSignHeights;
|
|
28950
|
+
exports.trafficSignLayerName = trafficSignLayerName;
|
|
28941
28951
|
exports.trafficSignNumbers = trafficSignNumbers;
|
|
28942
28952
|
exports.trafficSignNumbersSizes = trafficSignNumbersSizes;
|
|
28943
28953
|
exports.trafficSignWidths = trafficSignWidths;
|