@mint-ui/map 0.1.8-beta → 0.1.9-beta
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/.eslintrc.js +109 -109
- package/LICENSE +21 -21
- package/README.md +53 -53
- package/dist/components/mint-map/MintMap.d.ts +92 -90
- package/dist/components/mint-map/MintMap.js +19 -3
- package/dist/components/mint-map/core/MintMapController.d.ts +33 -33
- package/dist/components/mint-map/core/MintMapCore.d.ts +3 -3
- package/dist/components/mint-map/core/advanced/MapBuildingProjection.d.ts +15 -15
- package/dist/components/mint-map/core/advanced/index.d.ts +1 -1
- package/dist/components/mint-map/core/hooks/MarkerMovingHook.d.ts +6 -6
- package/dist/components/mint-map/core/hooks/index.d.ts +1 -1
- package/dist/components/mint-map/core/index.d.ts +7 -7
- package/dist/components/mint-map/core/provider/MintMapProvider.d.ts +8 -8
- package/dist/components/mint-map/core/provider/index.d.ts +1 -1
- package/dist/components/mint-map/core/util/animation.d.ts +16 -16
- package/dist/components/mint-map/core/util/calculate.d.ts +34 -29
- package/dist/components/mint-map/core/util/calculate.js +68 -8
- package/dist/components/mint-map/core/util/index.d.ts +3 -3
- package/dist/components/mint-map/core/util/waiting.d.ts +1 -1
- package/dist/components/mint-map/core/wrapper/MapControlWrapper.d.ts +11 -11
- package/dist/components/mint-map/core/wrapper/MapMarkerWrapper.d.ts +23 -23
- package/dist/components/mint-map/core/wrapper/MapMarkerWrapper.js +2 -2
- package/dist/components/mint-map/core/wrapper/MapPolygonWrapper.d.ts +5 -5
- package/dist/components/mint-map/core/wrapper/MapPolylineWrapper.d.ts +5 -5
- package/dist/components/mint-map/core/wrapper/index.d.ts +4 -4
- package/dist/components/mint-map/google/GoogleMintMapController.d.ts +35 -35
- package/dist/components/mint-map/google/GoogleMintMapController.js +3 -0
- package/dist/components/mint-map/index.d.ts +4 -4
- package/dist/components/mint-map/naver/NaverMintMapController.d.ts +38 -38
- package/dist/components/mint-map/naver/NaverMintMapController.js +3 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.es.js +95 -16
- package/dist/index.umd.js +95 -16
- package/package.json +76 -76
- package/test.ts +6 -6
package/dist/index.es.js
CHANGED
|
@@ -158,22 +158,82 @@ var PolygonCalculator = function () {
|
|
|
158
158
|
return false;
|
|
159
159
|
};
|
|
160
160
|
|
|
161
|
+
PolygonCalculator.getIncludedPositions = function (polygon, position) {
|
|
162
|
+
var targets = Array.isArray(position) ? position : [position];
|
|
163
|
+
var result = [];
|
|
164
|
+
var maxX = Math.max.apply(Math, polygon.map(function (pos) {
|
|
165
|
+
return pos.lng;
|
|
166
|
+
})) + 1;
|
|
167
|
+
var lines = this.convertPolygonToLinePoints(polygon);
|
|
168
|
+
|
|
169
|
+
for (var _i = 0, targets_1 = targets; _i < targets_1.length; _i++) {
|
|
170
|
+
var target = targets_1[_i];
|
|
171
|
+
var tempLine = this.convertPositionToPoints(target, new Position(target.lat, maxX));
|
|
172
|
+
var crossPoints = this.getCrossPointAll(lines, tempLine);
|
|
173
|
+
|
|
174
|
+
if (crossPoints.length > 0 && crossPoints.length % 2 != 0) {
|
|
175
|
+
result.push(target);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
return result;
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
PolygonCalculator.convertPolygonToLinePoints = function (polygon) {
|
|
183
|
+
var lines = [];
|
|
184
|
+
|
|
185
|
+
for (var i = 0; i < polygon.length; i++) {
|
|
186
|
+
lines.push(this.convertPositionToPoints(polygon[i], polygon[i + 1 === polygon.length ? 0 : i + 1]));
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
return lines;
|
|
190
|
+
};
|
|
191
|
+
|
|
161
192
|
PolygonCalculator.convertPositionToPoints = function (pos1, pos2) {
|
|
162
193
|
return new LinePoints(pos1.lng, pos1.lat, pos2.lng, pos2.lat);
|
|
163
194
|
};
|
|
164
195
|
|
|
165
|
-
PolygonCalculator.
|
|
196
|
+
PolygonCalculator.getCrossPoint = function (sr, tr) {
|
|
197
|
+
var p1 = (sr.x1 - sr.x2) * (tr.y1 - tr.y2) - (sr.y1 - sr.y2) * (tr.x1 - tr.x2);
|
|
198
|
+
|
|
199
|
+
if (p1 != 0) {
|
|
200
|
+
var x = ((sr.x1 * sr.y2 - sr.y1 * sr.x2) * (tr.x1 - tr.x2) - (sr.x1 - sr.x2) * (tr.x1 * tr.y2 - tr.y1 * tr.x2)) / p1;
|
|
201
|
+
var y = ((sr.x1 * sr.y2 - sr.y1 * sr.x2) * (tr.y1 - tr.y2) - (sr.y1 - sr.y2) * (tr.x1 * tr.y2 - tr.y1 * tr.x2)) / p1;
|
|
202
|
+
|
|
203
|
+
if (this.toFixedPosition((x - sr.x1) * (x - sr.x2)) <= 0 && this.toFixedPosition((y - sr.y1) * (y - sr.y2)) <= 0 && this.toFixedPosition((x - tr.x1) * (x - tr.x2)) <= 0 && this.toFixedPosition((y - tr.y1) * (y - tr.y2)) <= 0) {
|
|
204
|
+
return {
|
|
205
|
+
x: x,
|
|
206
|
+
y: y
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
};
|
|
211
|
+
|
|
212
|
+
PolygonCalculator.toFixedPosition = function (n) {
|
|
213
|
+
return Number(n.toFixed(15));
|
|
214
|
+
};
|
|
215
|
+
|
|
216
|
+
PolygonCalculator.getCrossPointAll = function (sr, tr) {
|
|
217
|
+
var result = [];
|
|
218
|
+
|
|
166
219
|
for (var _i = 0, sr_1 = sr; _i < sr_1.length; _i++) {
|
|
167
220
|
var tmp = sr_1[_i];
|
|
168
|
-
var
|
|
221
|
+
var p = this.getCrossPoint(tmp, tr);
|
|
169
222
|
|
|
170
|
-
if (
|
|
171
|
-
|
|
172
|
-
|
|
223
|
+
if (p) {
|
|
224
|
+
result.push(p);
|
|
225
|
+
}
|
|
226
|
+
}
|
|
173
227
|
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
228
|
+
return result;
|
|
229
|
+
};
|
|
230
|
+
|
|
231
|
+
PolygonCalculator.findCrossPoint = function (sr, tr) {
|
|
232
|
+
for (var _i = 0, sr_2 = sr; _i < sr_2.length; _i++) {
|
|
233
|
+
var tmp = sr_2[_i];
|
|
234
|
+
|
|
235
|
+
if (this.getCrossPoint(tmp, tr)) {
|
|
236
|
+
return true;
|
|
177
237
|
}
|
|
178
238
|
}
|
|
179
239
|
|
|
@@ -362,7 +422,7 @@ var NaverMintMapController = function (_super) {
|
|
|
362
422
|
});
|
|
363
423
|
}).setClear(function (item) {
|
|
364
424
|
item.setMap(null);
|
|
365
|
-
}).createPool(1000).setCheckLiveTimeInterval(1000);
|
|
425
|
+
}).createPool(this.mapProps.markerCachePoolSize && this.mapProps.markerCachePoolSize > 0 ? this.mapProps.markerCachePoolSize : 1000).setCheckLiveTimeInterval(1000);
|
|
366
426
|
};
|
|
367
427
|
|
|
368
428
|
NaverMintMapController.prototype.createPolyline = function (polyline) {
|
|
@@ -738,12 +798,12 @@ var NaverMintMapController = function (_super) {
|
|
|
738
798
|
} else {
|
|
739
799
|
_this.dragged = true;
|
|
740
800
|
}
|
|
741
|
-
|
|
801
|
+
});
|
|
802
|
+
map.addListener('idle', function () {
|
|
742
803
|
_this.mapProps.onBoundsChanged && _this.mapProps.onBoundsChanged(_this.getCurrBounds());
|
|
743
804
|
});
|
|
744
805
|
map.addListener('zoom_changed', function () {
|
|
745
806
|
_this.map && _this.mapProps.onZoomChanged && _this.mapProps.onZoomChanged(_this.map.getZoom());
|
|
746
|
-
_this.mapProps.onBoundsChanged && _this.mapProps.onBoundsChanged(_this.getCurrBounds());
|
|
747
807
|
});
|
|
748
808
|
map.addListener('click', function (e) {
|
|
749
809
|
console.log('map click', e);
|
|
@@ -1186,6 +1246,9 @@ var GoogleMintMapController = function (_super) {
|
|
|
1186
1246
|
console.log('map dragend');
|
|
1187
1247
|
_this.mapProps.onBoundsChanged && _this.mapProps.onBoundsChanged(_this.getCurrBounds());
|
|
1188
1248
|
});
|
|
1249
|
+
map.addListener('idle', function () {
|
|
1250
|
+
_this.mapProps.onBoundsChanged && _this.mapProps.onBoundsChanged(_this.getCurrBounds());
|
|
1251
|
+
});
|
|
1189
1252
|
map.addListener('zoom_changed', function () {
|
|
1190
1253
|
console.log('zoom_changed');
|
|
1191
1254
|
_this.map && _this.mapProps.onZoomChanged && _this.mapProps.onZoomChanged(_this.map.getZoom());
|
|
@@ -1300,10 +1363,26 @@ var Bounds = function () {
|
|
|
1300
1363
|
return new Position(this.nw.lat + (this.se.lat - this.nw.lat) / 2, this.nw.lng + (this.se.lng - this.nw.lng) / 2);
|
|
1301
1364
|
};
|
|
1302
1365
|
|
|
1303
|
-
Bounds.prototype.
|
|
1366
|
+
Bounds.prototype.getIncludedPositions = function (positions) {
|
|
1367
|
+
var result = [];
|
|
1368
|
+
|
|
1304
1369
|
for (var _i = 0, positions_1 = positions; _i < positions_1.length; _i++) {
|
|
1305
1370
|
var pos = positions_1[_i];
|
|
1306
1371
|
|
|
1372
|
+
if (!(this.nw.lat > pos.lat || this.se.lat < pos.lat || this.nw.lng > pos.lng || this.se.lng < pos.lng)) {
|
|
1373
|
+
result.push(pos);
|
|
1374
|
+
}
|
|
1375
|
+
}
|
|
1376
|
+
|
|
1377
|
+
return result;
|
|
1378
|
+
};
|
|
1379
|
+
|
|
1380
|
+
Bounds.prototype.includes = function (positions) {
|
|
1381
|
+
positions = Array.isArray(positions) ? positions : [positions];
|
|
1382
|
+
|
|
1383
|
+
for (var _i = 0, positions_2 = positions; _i < positions_2.length; _i++) {
|
|
1384
|
+
var pos = positions_2[_i];
|
|
1385
|
+
|
|
1307
1386
|
if (this.nw.lat > pos.lat || this.se.lat < pos.lat || this.nw.lng > pos.lng || this.se.lng < pos.lng) {
|
|
1308
1387
|
return false;
|
|
1309
1388
|
}
|
|
@@ -1313,8 +1392,8 @@ var Bounds = function () {
|
|
|
1313
1392
|
};
|
|
1314
1393
|
|
|
1315
1394
|
Bounds.prototype.includesOnlyOnePoint = function (positions) {
|
|
1316
|
-
for (var _i = 0,
|
|
1317
|
-
var pos =
|
|
1395
|
+
for (var _i = 0, positions_3 = positions; _i < positions_3.length; _i++) {
|
|
1396
|
+
var pos = positions_3[_i];
|
|
1318
1397
|
|
|
1319
1398
|
if (!(this.nw.lat > pos.lat || this.se.lat < pos.lat || this.nw.lng > pos.lng || this.se.lng < pos.lng)) {
|
|
1320
1399
|
return true;
|
|
@@ -1784,7 +1863,7 @@ function MapMarkerWrapper(_a) {
|
|
|
1784
1863
|
divCloneRef.current && divCloneRef.current.removeEventListener('animationend', aniListener_1);
|
|
1785
1864
|
|
|
1786
1865
|
if (markerRef.current) {
|
|
1787
|
-
|
|
1866
|
+
controller.clearDrawable(markerRef.current);
|
|
1788
1867
|
}
|
|
1789
1868
|
|
|
1790
1869
|
divCloneRef.current = undefined;
|
|
@@ -1797,7 +1876,7 @@ function MapMarkerWrapper(_a) {
|
|
|
1797
1876
|
divElement.removeEventListener('mouseover', onMouseOverHandler);
|
|
1798
1877
|
|
|
1799
1878
|
if (markerRef.current) {
|
|
1800
|
-
|
|
1879
|
+
controller.clearDrawable(markerRef.current);
|
|
1801
1880
|
}
|
|
1802
1881
|
}
|
|
1803
1882
|
};
|
package/dist/index.umd.js
CHANGED
|
@@ -163,22 +163,82 @@
|
|
|
163
163
|
return false;
|
|
164
164
|
};
|
|
165
165
|
|
|
166
|
+
PolygonCalculator.getIncludedPositions = function (polygon, position) {
|
|
167
|
+
var targets = Array.isArray(position) ? position : [position];
|
|
168
|
+
var result = [];
|
|
169
|
+
var maxX = Math.max.apply(Math, polygon.map(function (pos) {
|
|
170
|
+
return pos.lng;
|
|
171
|
+
})) + 1;
|
|
172
|
+
var lines = this.convertPolygonToLinePoints(polygon);
|
|
173
|
+
|
|
174
|
+
for (var _i = 0, targets_1 = targets; _i < targets_1.length; _i++) {
|
|
175
|
+
var target = targets_1[_i];
|
|
176
|
+
var tempLine = this.convertPositionToPoints(target, new Position(target.lat, maxX));
|
|
177
|
+
var crossPoints = this.getCrossPointAll(lines, tempLine);
|
|
178
|
+
|
|
179
|
+
if (crossPoints.length > 0 && crossPoints.length % 2 != 0) {
|
|
180
|
+
result.push(target);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
return result;
|
|
185
|
+
};
|
|
186
|
+
|
|
187
|
+
PolygonCalculator.convertPolygonToLinePoints = function (polygon) {
|
|
188
|
+
var lines = [];
|
|
189
|
+
|
|
190
|
+
for (var i = 0; i < polygon.length; i++) {
|
|
191
|
+
lines.push(this.convertPositionToPoints(polygon[i], polygon[i + 1 === polygon.length ? 0 : i + 1]));
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
return lines;
|
|
195
|
+
};
|
|
196
|
+
|
|
166
197
|
PolygonCalculator.convertPositionToPoints = function (pos1, pos2) {
|
|
167
198
|
return new LinePoints(pos1.lng, pos1.lat, pos2.lng, pos2.lat);
|
|
168
199
|
};
|
|
169
200
|
|
|
170
|
-
PolygonCalculator.
|
|
201
|
+
PolygonCalculator.getCrossPoint = function (sr, tr) {
|
|
202
|
+
var p1 = (sr.x1 - sr.x2) * (tr.y1 - tr.y2) - (sr.y1 - sr.y2) * (tr.x1 - tr.x2);
|
|
203
|
+
|
|
204
|
+
if (p1 != 0) {
|
|
205
|
+
var x = ((sr.x1 * sr.y2 - sr.y1 * sr.x2) * (tr.x1 - tr.x2) - (sr.x1 - sr.x2) * (tr.x1 * tr.y2 - tr.y1 * tr.x2)) / p1;
|
|
206
|
+
var y = ((sr.x1 * sr.y2 - sr.y1 * sr.x2) * (tr.y1 - tr.y2) - (sr.y1 - sr.y2) * (tr.x1 * tr.y2 - tr.y1 * tr.x2)) / p1;
|
|
207
|
+
|
|
208
|
+
if (this.toFixedPosition((x - sr.x1) * (x - sr.x2)) <= 0 && this.toFixedPosition((y - sr.y1) * (y - sr.y2)) <= 0 && this.toFixedPosition((x - tr.x1) * (x - tr.x2)) <= 0 && this.toFixedPosition((y - tr.y1) * (y - tr.y2)) <= 0) {
|
|
209
|
+
return {
|
|
210
|
+
x: x,
|
|
211
|
+
y: y
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
};
|
|
216
|
+
|
|
217
|
+
PolygonCalculator.toFixedPosition = function (n) {
|
|
218
|
+
return Number(n.toFixed(15));
|
|
219
|
+
};
|
|
220
|
+
|
|
221
|
+
PolygonCalculator.getCrossPointAll = function (sr, tr) {
|
|
222
|
+
var result = [];
|
|
223
|
+
|
|
171
224
|
for (var _i = 0, sr_1 = sr; _i < sr_1.length; _i++) {
|
|
172
225
|
var tmp = sr_1[_i];
|
|
173
|
-
var
|
|
226
|
+
var p = this.getCrossPoint(tmp, tr);
|
|
174
227
|
|
|
175
|
-
if (
|
|
176
|
-
|
|
177
|
-
|
|
228
|
+
if (p) {
|
|
229
|
+
result.push(p);
|
|
230
|
+
}
|
|
231
|
+
}
|
|
178
232
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
233
|
+
return result;
|
|
234
|
+
};
|
|
235
|
+
|
|
236
|
+
PolygonCalculator.findCrossPoint = function (sr, tr) {
|
|
237
|
+
for (var _i = 0, sr_2 = sr; _i < sr_2.length; _i++) {
|
|
238
|
+
var tmp = sr_2[_i];
|
|
239
|
+
|
|
240
|
+
if (this.getCrossPoint(tmp, tr)) {
|
|
241
|
+
return true;
|
|
182
242
|
}
|
|
183
243
|
}
|
|
184
244
|
|
|
@@ -367,7 +427,7 @@
|
|
|
367
427
|
});
|
|
368
428
|
}).setClear(function (item) {
|
|
369
429
|
item.setMap(null);
|
|
370
|
-
}).createPool(1000).setCheckLiveTimeInterval(1000);
|
|
430
|
+
}).createPool(this.mapProps.markerCachePoolSize && this.mapProps.markerCachePoolSize > 0 ? this.mapProps.markerCachePoolSize : 1000).setCheckLiveTimeInterval(1000);
|
|
371
431
|
};
|
|
372
432
|
|
|
373
433
|
NaverMintMapController.prototype.createPolyline = function (polyline) {
|
|
@@ -743,12 +803,12 @@
|
|
|
743
803
|
} else {
|
|
744
804
|
_this.dragged = true;
|
|
745
805
|
}
|
|
746
|
-
|
|
806
|
+
});
|
|
807
|
+
map.addListener('idle', function () {
|
|
747
808
|
_this.mapProps.onBoundsChanged && _this.mapProps.onBoundsChanged(_this.getCurrBounds());
|
|
748
809
|
});
|
|
749
810
|
map.addListener('zoom_changed', function () {
|
|
750
811
|
_this.map && _this.mapProps.onZoomChanged && _this.mapProps.onZoomChanged(_this.map.getZoom());
|
|
751
|
-
_this.mapProps.onBoundsChanged && _this.mapProps.onBoundsChanged(_this.getCurrBounds());
|
|
752
812
|
});
|
|
753
813
|
map.addListener('click', function (e) {
|
|
754
814
|
console.log('map click', e);
|
|
@@ -1191,6 +1251,9 @@
|
|
|
1191
1251
|
console.log('map dragend');
|
|
1192
1252
|
_this.mapProps.onBoundsChanged && _this.mapProps.onBoundsChanged(_this.getCurrBounds());
|
|
1193
1253
|
});
|
|
1254
|
+
map.addListener('idle', function () {
|
|
1255
|
+
_this.mapProps.onBoundsChanged && _this.mapProps.onBoundsChanged(_this.getCurrBounds());
|
|
1256
|
+
});
|
|
1194
1257
|
map.addListener('zoom_changed', function () {
|
|
1195
1258
|
console.log('zoom_changed');
|
|
1196
1259
|
_this.map && _this.mapProps.onZoomChanged && _this.mapProps.onZoomChanged(_this.map.getZoom());
|
|
@@ -1305,10 +1368,26 @@
|
|
|
1305
1368
|
return new Position(this.nw.lat + (this.se.lat - this.nw.lat) / 2, this.nw.lng + (this.se.lng - this.nw.lng) / 2);
|
|
1306
1369
|
};
|
|
1307
1370
|
|
|
1308
|
-
Bounds.prototype.
|
|
1371
|
+
Bounds.prototype.getIncludedPositions = function (positions) {
|
|
1372
|
+
var result = [];
|
|
1373
|
+
|
|
1309
1374
|
for (var _i = 0, positions_1 = positions; _i < positions_1.length; _i++) {
|
|
1310
1375
|
var pos = positions_1[_i];
|
|
1311
1376
|
|
|
1377
|
+
if (!(this.nw.lat > pos.lat || this.se.lat < pos.lat || this.nw.lng > pos.lng || this.se.lng < pos.lng)) {
|
|
1378
|
+
result.push(pos);
|
|
1379
|
+
}
|
|
1380
|
+
}
|
|
1381
|
+
|
|
1382
|
+
return result;
|
|
1383
|
+
};
|
|
1384
|
+
|
|
1385
|
+
Bounds.prototype.includes = function (positions) {
|
|
1386
|
+
positions = Array.isArray(positions) ? positions : [positions];
|
|
1387
|
+
|
|
1388
|
+
for (var _i = 0, positions_2 = positions; _i < positions_2.length; _i++) {
|
|
1389
|
+
var pos = positions_2[_i];
|
|
1390
|
+
|
|
1312
1391
|
if (this.nw.lat > pos.lat || this.se.lat < pos.lat || this.nw.lng > pos.lng || this.se.lng < pos.lng) {
|
|
1313
1392
|
return false;
|
|
1314
1393
|
}
|
|
@@ -1318,8 +1397,8 @@
|
|
|
1318
1397
|
};
|
|
1319
1398
|
|
|
1320
1399
|
Bounds.prototype.includesOnlyOnePoint = function (positions) {
|
|
1321
|
-
for (var _i = 0,
|
|
1322
|
-
var pos =
|
|
1400
|
+
for (var _i = 0, positions_3 = positions; _i < positions_3.length; _i++) {
|
|
1401
|
+
var pos = positions_3[_i];
|
|
1323
1402
|
|
|
1324
1403
|
if (!(this.nw.lat > pos.lat || this.se.lat < pos.lat || this.nw.lng > pos.lng || this.se.lng < pos.lng)) {
|
|
1325
1404
|
return true;
|
|
@@ -1789,7 +1868,7 @@
|
|
|
1789
1868
|
divCloneRef.current && divCloneRef.current.removeEventListener('animationend', aniListener_1);
|
|
1790
1869
|
|
|
1791
1870
|
if (markerRef.current) {
|
|
1792
|
-
|
|
1871
|
+
controller.clearDrawable(markerRef.current);
|
|
1793
1872
|
}
|
|
1794
1873
|
|
|
1795
1874
|
divCloneRef.current = undefined;
|
|
@@ -1802,7 +1881,7 @@
|
|
|
1802
1881
|
divElement.removeEventListener('mouseover', onMouseOverHandler);
|
|
1803
1882
|
|
|
1804
1883
|
if (markerRef.current) {
|
|
1805
|
-
|
|
1884
|
+
controller.clearDrawable(markerRef.current);
|
|
1806
1885
|
}
|
|
1807
1886
|
}
|
|
1808
1887
|
};
|
package/package.json
CHANGED
|
@@ -1,76 +1,76 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@mint-ui/map",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"main": "./dist/index.js",
|
|
5
|
-
"module": "./dist/index.es.js",
|
|
6
|
-
"browser": "./dist/index.umd.js",
|
|
7
|
-
"types": "./dist/index.d.ts",
|
|
8
|
-
"repository": "https://github.com/dev-rsquare/mint-ui-map",
|
|
9
|
-
"author": "RSQUARE",
|
|
10
|
-
"keywords": ["react", "map", "google", "naver", "library", "typescript"],
|
|
11
|
-
"license": "MIT",
|
|
12
|
-
"private": false,
|
|
13
|
-
"devDependencies": {
|
|
14
|
-
"@babel/core": "^7.18.2",
|
|
15
|
-
"@rollup/plugin-babel": "^5.3.1",
|
|
16
|
-
"@rollup/plugin-commonjs": "^22.0.0",
|
|
17
|
-
"@rollup/plugin-node-resolve": "^13.3.0",
|
|
18
|
-
"@rollup/plugin-typescript": "^8.3.2",
|
|
19
|
-
"@storybook/addon-actions": "^6.5.7",
|
|
20
|
-
"@storybook/addon-essentials": "^6.5.7",
|
|
21
|
-
"@storybook/addon-interactions": "^6.5.7",
|
|
22
|
-
"@storybook/addon-links": "^6.5.7",
|
|
23
|
-
"@storybook/builder-webpack5": "^6.5.7",
|
|
24
|
-
"@storybook/manager-webpack5": "^6.5.7",
|
|
25
|
-
"@storybook/preset-scss": "^1.0.3",
|
|
26
|
-
"@storybook/react": "^6.5.7",
|
|
27
|
-
"@storybook/testing-library": "^0.0.11",
|
|
28
|
-
"@types/classnames": "^2.3.1",
|
|
29
|
-
"@types/react": "^18.0.12",
|
|
30
|
-
"@types/react-dom": "^18.0.9",
|
|
31
|
-
"@types/uuid": "^9.0.0",
|
|
32
|
-
"@typescript-eslint/eslint-plugin": "^5.27.0",
|
|
33
|
-
"@typescript-eslint/parser": "^5.27.0",
|
|
34
|
-
"babel-loader": "^8.2.5",
|
|
35
|
-
"babel-plugin-react-icons": "^0.1.1",
|
|
36
|
-
"css-loader": "^6.7.1",
|
|
37
|
-
"eslint": "^8.17.0",
|
|
38
|
-
"eslint-config-airbnb": "^19.0.4",
|
|
39
|
-
"eslint-config-prettier": "^8.5.0",
|
|
40
|
-
"eslint-plugin-import": "^2.26.0",
|
|
41
|
-
"eslint-plugin-jsx-a11y": "^6.5.1",
|
|
42
|
-
"eslint-plugin-prettier": "^4.0.0",
|
|
43
|
-
"eslint-plugin-react": "^7.30.0",
|
|
44
|
-
"eslint-plugin-react-hooks": "^4.5.0",
|
|
45
|
-
"eslint-plugin-sort-keys-fix": "^1.1.2",
|
|
46
|
-
"eslint-plugin-storybook": "^0.5.12",
|
|
47
|
-
"postcss": "^8.4.14",
|
|
48
|
-
"react": "^18.1.0",
|
|
49
|
-
"react-dom": "^18.1.0",
|
|
50
|
-
"rollup": "^2.75.5",
|
|
51
|
-
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
52
|
-
"rollup-plugin-postcss": "^4.0.2",
|
|
53
|
-
"sass": "^1.52.2",
|
|
54
|
-
"sass-loader": "^13.0.0",
|
|
55
|
-
"shx": "^0.3.4",
|
|
56
|
-
"style-loader": "^3.3.1",
|
|
57
|
-
"typescript": "^4.7.3"
|
|
58
|
-
},
|
|
59
|
-
"dependencies": {
|
|
60
|
-
"@types/google.maps": "^3.50.5",
|
|
61
|
-
"@types/navermaps": "^3.6.1",
|
|
62
|
-
"@mint-ui/tools":"1.0.3",
|
|
63
|
-
"axios": "^1.2.0",
|
|
64
|
-
"classnames": "^2.3.1",
|
|
65
|
-
"style-inject": "^0.3.0",
|
|
66
|
-
"uuid": "^9.0.0",
|
|
67
|
-
"xml-js": "^1.6.11"
|
|
68
|
-
},
|
|
69
|
-
"scripts": {
|
|
70
|
-
"storybook": "start-storybook -p 3000",
|
|
71
|
-
"build-storybook": "build-storybook",
|
|
72
|
-
"prebuild": "shx rm -rf ./dist",
|
|
73
|
-
"build": "rollup -c",
|
|
74
|
-
"postbuild": "shx rm -rf ./dist/dist"
|
|
75
|
-
}
|
|
76
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@mint-ui/map",
|
|
3
|
+
"version": "0.1.9-beta",
|
|
4
|
+
"main": "./dist/index.js",
|
|
5
|
+
"module": "./dist/index.es.js",
|
|
6
|
+
"browser": "./dist/index.umd.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"repository": "https://github.com/dev-rsquare/mint-ui-map",
|
|
9
|
+
"author": "RSQUARE",
|
|
10
|
+
"keywords": ["react", "map", "google", "naver", "library", "typescript"],
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"private": false,
|
|
13
|
+
"devDependencies": {
|
|
14
|
+
"@babel/core": "^7.18.2",
|
|
15
|
+
"@rollup/plugin-babel": "^5.3.1",
|
|
16
|
+
"@rollup/plugin-commonjs": "^22.0.0",
|
|
17
|
+
"@rollup/plugin-node-resolve": "^13.3.0",
|
|
18
|
+
"@rollup/plugin-typescript": "^8.3.2",
|
|
19
|
+
"@storybook/addon-actions": "^6.5.7",
|
|
20
|
+
"@storybook/addon-essentials": "^6.5.7",
|
|
21
|
+
"@storybook/addon-interactions": "^6.5.7",
|
|
22
|
+
"@storybook/addon-links": "^6.5.7",
|
|
23
|
+
"@storybook/builder-webpack5": "^6.5.7",
|
|
24
|
+
"@storybook/manager-webpack5": "^6.5.7",
|
|
25
|
+
"@storybook/preset-scss": "^1.0.3",
|
|
26
|
+
"@storybook/react": "^6.5.7",
|
|
27
|
+
"@storybook/testing-library": "^0.0.11",
|
|
28
|
+
"@types/classnames": "^2.3.1",
|
|
29
|
+
"@types/react": "^18.0.12",
|
|
30
|
+
"@types/react-dom": "^18.0.9",
|
|
31
|
+
"@types/uuid": "^9.0.0",
|
|
32
|
+
"@typescript-eslint/eslint-plugin": "^5.27.0",
|
|
33
|
+
"@typescript-eslint/parser": "^5.27.0",
|
|
34
|
+
"babel-loader": "^8.2.5",
|
|
35
|
+
"babel-plugin-react-icons": "^0.1.1",
|
|
36
|
+
"css-loader": "^6.7.1",
|
|
37
|
+
"eslint": "^8.17.0",
|
|
38
|
+
"eslint-config-airbnb": "^19.0.4",
|
|
39
|
+
"eslint-config-prettier": "^8.5.0",
|
|
40
|
+
"eslint-plugin-import": "^2.26.0",
|
|
41
|
+
"eslint-plugin-jsx-a11y": "^6.5.1",
|
|
42
|
+
"eslint-plugin-prettier": "^4.0.0",
|
|
43
|
+
"eslint-plugin-react": "^7.30.0",
|
|
44
|
+
"eslint-plugin-react-hooks": "^4.5.0",
|
|
45
|
+
"eslint-plugin-sort-keys-fix": "^1.1.2",
|
|
46
|
+
"eslint-plugin-storybook": "^0.5.12",
|
|
47
|
+
"postcss": "^8.4.14",
|
|
48
|
+
"react": "^18.1.0",
|
|
49
|
+
"react-dom": "^18.1.0",
|
|
50
|
+
"rollup": "^2.75.5",
|
|
51
|
+
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
52
|
+
"rollup-plugin-postcss": "^4.0.2",
|
|
53
|
+
"sass": "^1.52.2",
|
|
54
|
+
"sass-loader": "^13.0.0",
|
|
55
|
+
"shx": "^0.3.4",
|
|
56
|
+
"style-loader": "^3.3.1",
|
|
57
|
+
"typescript": "^4.7.3"
|
|
58
|
+
},
|
|
59
|
+
"dependencies": {
|
|
60
|
+
"@types/google.maps": "^3.50.5",
|
|
61
|
+
"@types/navermaps": "^3.6.1",
|
|
62
|
+
"@mint-ui/tools":"1.0.3",
|
|
63
|
+
"axios": "^1.2.0",
|
|
64
|
+
"classnames": "^2.3.1",
|
|
65
|
+
"style-inject": "^0.3.0",
|
|
66
|
+
"uuid": "^9.0.0",
|
|
67
|
+
"xml-js": "^1.6.11"
|
|
68
|
+
},
|
|
69
|
+
"scripts": {
|
|
70
|
+
"storybook": "start-storybook -p 3000",
|
|
71
|
+
"build-storybook": "build-storybook",
|
|
72
|
+
"prebuild": "shx rm -rf ./dist",
|
|
73
|
+
"build": "rollup -c",
|
|
74
|
+
"postbuild": "shx rm -rf ./dist/dist"
|
|
75
|
+
}
|
|
76
|
+
}
|
package/test.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const aa = [1,2,3]
|
|
2
|
-
|
|
3
|
-
aa.push = new Proxy(aa.push, {
|
|
4
|
-
apply(target, thisArg, argArray) {
|
|
5
|
-
|
|
6
|
-
},
|
|
1
|
+
const aa = [1,2,3]
|
|
2
|
+
|
|
3
|
+
aa.push = new Proxy(aa.push, {
|
|
4
|
+
apply(target, thisArg, argArray) {
|
|
5
|
+
|
|
6
|
+
},
|
|
7
7
|
})
|