@vunk/form 2.0.2 → 2.2.0
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/components/card-input-collection/index.cjs +256 -0
- package/components/card-input-collection/index.css +21 -0
- package/components/card-input-collection/index.d.ts +4 -0
- package/components/card-input-collection/index.mjs +250 -0
- package/components/card-input-collection/src/ctx.d.ts +82 -0
- package/components/card-input-collection/src/index.vue.d.ts +542 -0
- package/components/card-input-collection/src/types.d.ts +1 -0
- package/components/cascader/src/ctx.d.ts +1 -1
- package/components/cascader/src/index.vue.d.ts +1 -1
- package/components/checkbox/src/ctx.d.ts +1 -1
- package/components/checkbox/src/index.vue.d.ts +2 -2
- package/components/cloneDeep.cjs +2029 -0
- package/components/cloneDeep.mjs +2027 -0
- package/components/date-picker/src/ctx.d.ts +1 -1
- package/components/date-picker/src/index.vue.d.ts +2 -2
- package/components/esri-input-geojson/index.cjs +484 -2
- package/components/esri-input-geojson/index.mjs +483 -1
- package/components/esri-input-geojson/src/ctx.d.ts +1 -1
- package/components/esri-input-geojson/src/index.vue.d.ts +2 -2
- package/components/form/src/ctx.d.ts +1 -1
- package/components/form/src/index.vue.d.ts +1 -1
- package/components/index2.cjs +0 -19
- package/components/index2.mjs +1 -19
- package/components/input/src/ctx.d.ts +1 -1
- package/components/input/src/index.vue.d.ts +2 -2
- package/components/input-collection/index.cjs +4 -2029
- package/components/input-collection/index.mjs +4 -2029
- package/components/input-collection/src/index.vue.d.ts +1 -1
- package/components/input-link/src/index.vue.d.ts +1 -1
- package/components/input-number/src/ctx.d.ts +1 -1
- package/components/input-number/src/index.vue.d.ts +3 -3
- package/components/radio/src/index.vue.d.ts +1 -1
- package/components/select/index.cjs +12 -0
- package/components/select/index.d.ts +1 -0
- package/components/select/index.mjs +12 -1
- package/components/select/src/ctx.d.ts +2 -0
- package/components/select/src/index.vue.d.ts +2 -2
- package/components/slider/src/index.vue.d.ts +1 -1
- package/components/switch/src/index.vue.d.ts +1 -1
- package/components/tables-select/index.cjs +225 -0
- package/components/tables-select/index.css +3 -0
- package/components/tables-select/index.d.ts +4 -0
- package/components/tables-select/index.mjs +219 -0
- package/components/tables-select/src/ctx.d.ts +338 -0
- package/components/tables-select/src/index.vue.d.ts +4953 -0
- package/components/tables-select/src/types.d.ts +1 -0
- package/components/upload/index.mjs +1 -1
- package/components/upload-plus/index.mjs +1 -1
- package/components/vditor/src/index.vue.d.ts +1 -1
- package/index.css +26 -41
- package/package.json +17 -9
- package/shared/element-plus/ctx.d.ts +1 -1
- package/components/geoinput-update/index.cjs +0 -406
- package/components/geoinput-update/index.css +0 -40
- package/components/geoinput-update/index.d.ts +0 -5
- package/components/geoinput-update/index.mjs +0 -399
- package/components/geoinput-update/src/append.vue.d.ts +0 -815
- package/components/geoinput-update/src/ctx.d.ts +0 -219
- package/components/geoinput-update/src/index.vue.d.ts +0 -1143
- package/components/geoinput-update/src/types.d.ts +0 -6
- package/components/index3.cjs +0 -486
- package/components/index3.mjs +0 -484
|
@@ -7,7 +7,6 @@ import { _ as _export_sfc } from '../_plugin-vue_export-helper.mjs';
|
|
|
7
7
|
import { VaTdtBasemap, VaMapView, VaSketch, VaGraphicsLayer } from '@vuesri/core';
|
|
8
8
|
import MapView from '@arcgis/core/views/MapView';
|
|
9
9
|
import SceneView from '@arcgis/core/views/SceneView';
|
|
10
|
-
import { t as toGeojson } from '../index3.mjs';
|
|
11
10
|
import { VkAsyncTeleport } from '@vunk/core';
|
|
12
11
|
import Graphic from '@arcgis/core/Graphic';
|
|
13
12
|
import { useComputedReadonly } from '@vunk/form/composables';
|
|
@@ -322,6 +321,489 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
322
321
|
}
|
|
323
322
|
var ViewerVue = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__file", "/home/runner/work/private-vunk-form/private-vunk-form/packages/components/esri-input-geojson/src/viewer.vue"]]);
|
|
324
323
|
|
|
324
|
+
function array_cancel() {
|
|
325
|
+
this._array = null;
|
|
326
|
+
return Promise.resolve();
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
function array_read() {
|
|
330
|
+
var array = this._array;
|
|
331
|
+
this._array = null;
|
|
332
|
+
return Promise.resolve(array ? {done: false, value: array} : {done: true, value: undefined});
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
function array(array) {
|
|
336
|
+
return new ArraySource(array instanceof Uint8Array ? array : new Uint8Array(array));
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
function ArraySource(array) {
|
|
340
|
+
this._array = array;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
ArraySource.prototype.read = array_read;
|
|
344
|
+
ArraySource.prototype.cancel = array_cancel;
|
|
345
|
+
|
|
346
|
+
function fetchPath(url) {
|
|
347
|
+
return fetch(url).then(function(response) {
|
|
348
|
+
return response.body && response.body.getReader
|
|
349
|
+
? response.body.getReader()
|
|
350
|
+
: response.arrayBuffer().then(array);
|
|
351
|
+
});
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
function requestPath(url) {
|
|
355
|
+
return new Promise(function(resolve, reject) {
|
|
356
|
+
var request = new XMLHttpRequest;
|
|
357
|
+
request.responseType = "arraybuffer";
|
|
358
|
+
request.onload = function() { resolve(array(request.response)); };
|
|
359
|
+
request.onerror = reject;
|
|
360
|
+
request.ontimeout = reject;
|
|
361
|
+
request.open("GET", url, true);
|
|
362
|
+
request.send();
|
|
363
|
+
});
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
function path(path) {
|
|
367
|
+
return (typeof fetch === "function" ? fetchPath : requestPath)(path);
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
function stream(source) {
|
|
371
|
+
return typeof source.read === "function" ? source : source.getReader();
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
var empty = new Uint8Array(0);
|
|
375
|
+
|
|
376
|
+
function slice_cancel() {
|
|
377
|
+
return this._source.cancel();
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
function concat$1(a, b) {
|
|
381
|
+
if (!a.length) return b;
|
|
382
|
+
if (!b.length) return a;
|
|
383
|
+
var c = new Uint8Array(a.length + b.length);
|
|
384
|
+
c.set(a);
|
|
385
|
+
c.set(b, a.length);
|
|
386
|
+
return c;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
function slice_read() {
|
|
390
|
+
var that = this, array = that._array.subarray(that._index);
|
|
391
|
+
return that._source.read().then(function(result) {
|
|
392
|
+
that._array = empty;
|
|
393
|
+
that._index = 0;
|
|
394
|
+
return result.done ? (array.length > 0
|
|
395
|
+
? {done: false, value: array}
|
|
396
|
+
: {done: true, value: undefined})
|
|
397
|
+
: {done: false, value: concat$1(array, result.value)};
|
|
398
|
+
});
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
function slice_slice(length) {
|
|
402
|
+
if ((length |= 0) < 0) throw new Error("invalid length");
|
|
403
|
+
var that = this, index = this._array.length - this._index;
|
|
404
|
+
|
|
405
|
+
// If the request fits within the remaining buffer, resolve it immediately.
|
|
406
|
+
if (this._index + length <= this._array.length) {
|
|
407
|
+
return Promise.resolve(this._array.subarray(this._index, this._index += length));
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
// Otherwise, read chunks repeatedly until the request is fulfilled.
|
|
411
|
+
var array = new Uint8Array(length);
|
|
412
|
+
array.set(this._array.subarray(this._index));
|
|
413
|
+
return (function read() {
|
|
414
|
+
return that._source.read().then(function(result) {
|
|
415
|
+
|
|
416
|
+
// When done, it’s possible the request wasn’t fully fullfilled!
|
|
417
|
+
// If so, the pre-allocated array is too big and needs slicing.
|
|
418
|
+
if (result.done) {
|
|
419
|
+
that._array = empty;
|
|
420
|
+
that._index = 0;
|
|
421
|
+
return index > 0 ? array.subarray(0, index) : null;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
// If this chunk fulfills the request, return the resulting array.
|
|
425
|
+
if (index + result.value.length >= length) {
|
|
426
|
+
that._array = result.value;
|
|
427
|
+
that._index = length - index;
|
|
428
|
+
array.set(result.value.subarray(0, length - index), index);
|
|
429
|
+
return array;
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
// Otherwise copy this chunk into the array, then read the next chunk.
|
|
433
|
+
array.set(result.value, index);
|
|
434
|
+
index += result.value.length;
|
|
435
|
+
return read();
|
|
436
|
+
});
|
|
437
|
+
})();
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
function slice(source) {
|
|
441
|
+
return typeof source.slice === "function" ? source :
|
|
442
|
+
new SliceSource(typeof source.read === "function" ? source
|
|
443
|
+
: source.getReader());
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
function SliceSource(source) {
|
|
447
|
+
this._source = source;
|
|
448
|
+
this._array = empty;
|
|
449
|
+
this._index = 0;
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
SliceSource.prototype.read = slice_read;
|
|
453
|
+
SliceSource.prototype.slice = slice_slice;
|
|
454
|
+
SliceSource.prototype.cancel = slice_cancel;
|
|
455
|
+
|
|
456
|
+
function dbf_cancel() {
|
|
457
|
+
return this._source.cancel();
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
function readBoolean(value) {
|
|
461
|
+
return /^[nf]$/i.test(value) ? false
|
|
462
|
+
: /^[yt]$/i.test(value) ? true
|
|
463
|
+
: null;
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
function readDate(value) {
|
|
467
|
+
return new Date(+value.substring(0, 4), value.substring(4, 6) - 1, +value.substring(6, 8));
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
function readNumber(value) {
|
|
471
|
+
return !(value = value.trim()) || isNaN(value = +value) ? null : value;
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
function readString(value) {
|
|
475
|
+
return value.trim() || null;
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
var types$1 = {
|
|
479
|
+
B: readNumber,
|
|
480
|
+
C: readString,
|
|
481
|
+
D: readDate,
|
|
482
|
+
F: readNumber,
|
|
483
|
+
L: readBoolean,
|
|
484
|
+
M: readNumber,
|
|
485
|
+
N: readNumber
|
|
486
|
+
};
|
|
487
|
+
|
|
488
|
+
function dbf_read() {
|
|
489
|
+
var that = this, i = 1;
|
|
490
|
+
return that._source.slice(that._recordLength).then(function(value) {
|
|
491
|
+
return value && (value[0] !== 0x1a) ? {done: false, value: that._fields.reduce(function(p, f) {
|
|
492
|
+
p[f.name] = types$1[f.type](that._decode(value.subarray(i, i += f.length)));
|
|
493
|
+
return p;
|
|
494
|
+
}, {})} : {done: true, value: undefined};
|
|
495
|
+
});
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
function view(array) {
|
|
499
|
+
return new DataView(array.buffer, array.byteOffset, array.byteLength);
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
function dbf(source, decoder) {
|
|
503
|
+
source = slice(source);
|
|
504
|
+
return source.slice(32).then(function(array) {
|
|
505
|
+
var head = view(array);
|
|
506
|
+
return source.slice(head.getUint16(8, true) - 32).then(function(array) {
|
|
507
|
+
return new Dbf(source, decoder, head, view(array));
|
|
508
|
+
});
|
|
509
|
+
});
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
function Dbf(source, decoder, head, body) {
|
|
513
|
+
this._source = source;
|
|
514
|
+
this._decode = decoder.decode.bind(decoder);
|
|
515
|
+
this._recordLength = head.getUint16(10, true);
|
|
516
|
+
this._fields = [];
|
|
517
|
+
for (var n = 0; body.getUint8(n) !== 0x0d; n += 32) {
|
|
518
|
+
for (var j = 0; j < 11; ++j) if (body.getUint8(n + j) === 0) break;
|
|
519
|
+
this._fields.push({
|
|
520
|
+
name: this._decode(new Uint8Array(body.buffer, body.byteOffset + n, j)),
|
|
521
|
+
type: String.fromCharCode(body.getUint8(n + 11)),
|
|
522
|
+
length: body.getUint8(n + 16)
|
|
523
|
+
});
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
var prototype$2 = Dbf.prototype;
|
|
528
|
+
prototype$2.read = dbf_read;
|
|
529
|
+
prototype$2.cancel = dbf_cancel;
|
|
530
|
+
|
|
531
|
+
function cancel() {
|
|
532
|
+
return this._source.cancel();
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
function parseMultiPoint(record) {
|
|
536
|
+
var i = 40, j, n = record.getInt32(36, true), coordinates = new Array(n);
|
|
537
|
+
for (j = 0; j < n; ++j, i += 16) coordinates[j] = [record.getFloat64(i, true), record.getFloat64(i + 8, true)];
|
|
538
|
+
return {type: "MultiPoint", coordinates: coordinates};
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
function parseNull() {
|
|
542
|
+
return null;
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
function parsePoint(record) {
|
|
546
|
+
return {type: "Point", coordinates: [record.getFloat64(4, true), record.getFloat64(12, true)]};
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
function parsePolygon(record) {
|
|
550
|
+
var i = 44, j, n = record.getInt32(36, true), m = record.getInt32(40, true), parts = new Array(n), points = new Array(m), polygons = [], holes = [];
|
|
551
|
+
for (j = 0; j < n; ++j, i += 4) parts[j] = record.getInt32(i, true);
|
|
552
|
+
for (j = 0; j < m; ++j, i += 16) points[j] = [record.getFloat64(i, true), record.getFloat64(i + 8, true)];
|
|
553
|
+
|
|
554
|
+
parts.forEach(function(i, j) {
|
|
555
|
+
var ring = points.slice(i, parts[j + 1]);
|
|
556
|
+
if (ringClockwise(ring)) polygons.push([ring]);
|
|
557
|
+
else holes.push(ring);
|
|
558
|
+
});
|
|
559
|
+
|
|
560
|
+
holes.forEach(function(hole) {
|
|
561
|
+
polygons.some(function(polygon) {
|
|
562
|
+
if (ringContainsSome(polygon[0], hole)) {
|
|
563
|
+
polygon.push(hole);
|
|
564
|
+
return true;
|
|
565
|
+
}
|
|
566
|
+
}) || polygons.push([hole]);
|
|
567
|
+
});
|
|
568
|
+
|
|
569
|
+
return polygons.length === 1
|
|
570
|
+
? {type: "Polygon", coordinates: polygons[0]}
|
|
571
|
+
: {type: "MultiPolygon", coordinates: polygons};
|
|
572
|
+
}
|
|
573
|
+
function ringClockwise(ring) {
|
|
574
|
+
if ((n = ring.length) < 4) return false;
|
|
575
|
+
var i = 0, n, area = ring[n - 1][1] * ring[0][0] - ring[n - 1][0] * ring[0][1];
|
|
576
|
+
while (++i < n) area += ring[i - 1][1] * ring[i][0] - ring[i - 1][0] * ring[i][1];
|
|
577
|
+
return area >= 0;
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
function ringContainsSome(ring, hole) {
|
|
581
|
+
var i = -1, n = hole.length, c;
|
|
582
|
+
while (++i < n) {
|
|
583
|
+
if (c = ringContains(ring, hole[i])) {
|
|
584
|
+
return c > 0;
|
|
585
|
+
}
|
|
586
|
+
}
|
|
587
|
+
return false;
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
function ringContains(ring, point) {
|
|
591
|
+
var x = point[0], y = point[1], contains = -1;
|
|
592
|
+
for (var i = 0, n = ring.length, j = n - 1; i < n; j = i++) {
|
|
593
|
+
var pi = ring[i], xi = pi[0], yi = pi[1],
|
|
594
|
+
pj = ring[j], xj = pj[0], yj = pj[1];
|
|
595
|
+
if (segmentContains(pi, pj, point)) {
|
|
596
|
+
return 0;
|
|
597
|
+
}
|
|
598
|
+
if (((yi > y) !== (yj > y)) && ((x < (xj - xi) * (y - yi) / (yj - yi) + xi))) {
|
|
599
|
+
contains = -contains;
|
|
600
|
+
}
|
|
601
|
+
}
|
|
602
|
+
return contains;
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
function segmentContains(p0, p1, p2) {
|
|
606
|
+
var x20 = p2[0] - p0[0], y20 = p2[1] - p0[1];
|
|
607
|
+
if (x20 === 0 && y20 === 0) return true;
|
|
608
|
+
var x10 = p1[0] - p0[0], y10 = p1[1] - p0[1];
|
|
609
|
+
if (x10 === 0 && y10 === 0) return false;
|
|
610
|
+
var t = (x20 * x10 + y20 * y10) / (x10 * x10 + y10 * y10);
|
|
611
|
+
return t < 0 || t > 1 ? false : t === 0 || t === 1 ? true : t * x10 === x20 && t * y10 === y20;
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
function parsePolyLine(record) {
|
|
615
|
+
var i = 44, j, n = record.getInt32(36, true), m = record.getInt32(40, true), parts = new Array(n), points = new Array(m);
|
|
616
|
+
for (j = 0; j < n; ++j, i += 4) parts[j] = record.getInt32(i, true);
|
|
617
|
+
for (j = 0; j < m; ++j, i += 16) points[j] = [record.getFloat64(i, true), record.getFloat64(i + 8, true)];
|
|
618
|
+
return n === 1
|
|
619
|
+
? {type: "LineString", coordinates: points}
|
|
620
|
+
: {type: "MultiLineString", coordinates: parts.map(function(i, j) { return points.slice(i, parts[j + 1]); })};
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
function concat(a, b) {
|
|
624
|
+
var ab = new Uint8Array(a.length + b.length);
|
|
625
|
+
ab.set(a, 0);
|
|
626
|
+
ab.set(b, a.length);
|
|
627
|
+
return ab;
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
function shp_read() {
|
|
631
|
+
var that = this;
|
|
632
|
+
++that._index;
|
|
633
|
+
return that._source.slice(12).then(function(array) {
|
|
634
|
+
if (array == null) return {done: true, value: undefined};
|
|
635
|
+
var header = view(array);
|
|
636
|
+
|
|
637
|
+
// If the record starts with an invalid shape type (see #36), scan ahead in
|
|
638
|
+
// four-byte increments to find the next valid record, identified by the
|
|
639
|
+
// expected index, a non-empty content length and a valid shape type.
|
|
640
|
+
function skip() {
|
|
641
|
+
return that._source.slice(4).then(function(chunk) {
|
|
642
|
+
if (chunk == null) return {done: true, value: undefined};
|
|
643
|
+
header = view(array = concat(array.slice(4), chunk));
|
|
644
|
+
return header.getInt32(0, false) !== that._index ? skip() : read();
|
|
645
|
+
});
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
// All records should have at least four bytes (for the record shape type),
|
|
649
|
+
// so an invalid content length indicates corruption.
|
|
650
|
+
function read() {
|
|
651
|
+
var length = header.getInt32(4, false) * 2 - 4, type = header.getInt32(8, true);
|
|
652
|
+
return length < 0 || (type && type !== that._type) ? skip() : that._source.slice(length).then(function(chunk) {
|
|
653
|
+
return {done: false, value: type ? that._parse(view(concat(array.slice(8), chunk))) : null};
|
|
654
|
+
});
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
return read();
|
|
658
|
+
});
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
var parsers = {
|
|
662
|
+
0: parseNull,
|
|
663
|
+
1: parsePoint,
|
|
664
|
+
3: parsePolyLine,
|
|
665
|
+
5: parsePolygon,
|
|
666
|
+
8: parseMultiPoint,
|
|
667
|
+
11: parsePoint, // PointZ
|
|
668
|
+
13: parsePolyLine, // PolyLineZ
|
|
669
|
+
15: parsePolygon, // PolygonZ
|
|
670
|
+
18: parseMultiPoint, // MultiPointZ
|
|
671
|
+
21: parsePoint, // PointM
|
|
672
|
+
23: parsePolyLine, // PolyLineM
|
|
673
|
+
25: parsePolygon, // PolygonM
|
|
674
|
+
28: parseMultiPoint // MultiPointM
|
|
675
|
+
};
|
|
676
|
+
|
|
677
|
+
function shp(source) {
|
|
678
|
+
source = slice(source);
|
|
679
|
+
return source.slice(100).then(function(array) {
|
|
680
|
+
return new Shp(source, view(array));
|
|
681
|
+
});
|
|
682
|
+
}
|
|
683
|
+
function Shp(source, header) {
|
|
684
|
+
var type = header.getInt32(32, true);
|
|
685
|
+
if (!(type in parsers)) throw new Error("unsupported shape type: " + type);
|
|
686
|
+
this._source = source;
|
|
687
|
+
this._type = type;
|
|
688
|
+
this._index = 0;
|
|
689
|
+
this._parse = parsers[type];
|
|
690
|
+
this.bbox = [header.getFloat64(36, true), header.getFloat64(44, true), header.getFloat64(52, true), header.getFloat64(60, true)];
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
var prototype$1 = Shp.prototype;
|
|
694
|
+
prototype$1.read = shp_read;
|
|
695
|
+
prototype$1.cancel = cancel;
|
|
696
|
+
|
|
697
|
+
function noop() {}
|
|
698
|
+
|
|
699
|
+
function shapefile_cancel() {
|
|
700
|
+
return Promise.all([
|
|
701
|
+
this._dbf && this._dbf.cancel(),
|
|
702
|
+
this._shp.cancel()
|
|
703
|
+
]).then(noop);
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
function shapefile_read() {
|
|
707
|
+
var that = this;
|
|
708
|
+
return Promise.all([
|
|
709
|
+
that._dbf ? that._dbf.read() : {value: {}},
|
|
710
|
+
that._shp.read()
|
|
711
|
+
]).then(function(results) {
|
|
712
|
+
var dbf = results[0], shp = results[1];
|
|
713
|
+
return shp.done ? shp : {
|
|
714
|
+
done: false,
|
|
715
|
+
value: {
|
|
716
|
+
type: "Feature",
|
|
717
|
+
properties: dbf.value,
|
|
718
|
+
geometry: shp.value
|
|
719
|
+
}
|
|
720
|
+
};
|
|
721
|
+
});
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
function shapefile(shpSource, dbfSource, decoder) {
|
|
725
|
+
return Promise.all([
|
|
726
|
+
shp(shpSource),
|
|
727
|
+
dbfSource && dbf(dbfSource, decoder)
|
|
728
|
+
]).then(function(sources) {
|
|
729
|
+
return new Shapefile(sources[0], sources[1]);
|
|
730
|
+
});
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
function Shapefile(shp, dbf) {
|
|
734
|
+
this._shp = shp;
|
|
735
|
+
this._dbf = dbf;
|
|
736
|
+
this.bbox = shp.bbox;
|
|
737
|
+
}
|
|
738
|
+
|
|
739
|
+
var prototype = Shapefile.prototype;
|
|
740
|
+
prototype.read = shapefile_read;
|
|
741
|
+
prototype.cancel = shapefile_cancel;
|
|
742
|
+
|
|
743
|
+
function open(shp, dbf, options) {
|
|
744
|
+
if (typeof dbf === "string") {
|
|
745
|
+
if (!/\.dbf$/.test(dbf)) dbf += ".dbf";
|
|
746
|
+
dbf = path(dbf);
|
|
747
|
+
} else if (dbf instanceof ArrayBuffer || dbf instanceof Uint8Array) {
|
|
748
|
+
dbf = array(dbf);
|
|
749
|
+
} else if (dbf != null) {
|
|
750
|
+
dbf = stream(dbf);
|
|
751
|
+
}
|
|
752
|
+
if (typeof shp === "string") {
|
|
753
|
+
if (!/\.shp$/.test(shp)) shp += ".shp";
|
|
754
|
+
if (dbf === undefined) dbf = path(shp.substring(0, shp.length - 4) + ".dbf").catch(function() {});
|
|
755
|
+
shp = path(shp);
|
|
756
|
+
} else if (shp instanceof ArrayBuffer || shp instanceof Uint8Array) {
|
|
757
|
+
shp = array(shp);
|
|
758
|
+
} else {
|
|
759
|
+
shp = stream(shp);
|
|
760
|
+
}
|
|
761
|
+
return Promise.all([shp, dbf]).then(function(sources) {
|
|
762
|
+
var shp = sources[0], dbf = sources[1], encoding = "windows-1252";
|
|
763
|
+
return shapefile(shp, dbf, dbf && new TextDecoder(encoding));
|
|
764
|
+
});
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
const shpToGeojson = (file) => {
|
|
768
|
+
return new Promise((resolve, reject) => {
|
|
769
|
+
const reader = new FileReader();
|
|
770
|
+
reader.readAsArrayBuffer(file);
|
|
771
|
+
const data = {
|
|
772
|
+
type: "FeatureCollection",
|
|
773
|
+
features: []
|
|
774
|
+
};
|
|
775
|
+
reader.onload = function() {
|
|
776
|
+
open(this.result).then((source) => source.read().then(
|
|
777
|
+
function log(result) {
|
|
778
|
+
if (!result.done) {
|
|
779
|
+
data.features.push(result.value);
|
|
780
|
+
source.read().then(log);
|
|
781
|
+
} else {
|
|
782
|
+
if (result.value) {
|
|
783
|
+
data.features.push(result.value);
|
|
784
|
+
}
|
|
785
|
+
resolve(data);
|
|
786
|
+
}
|
|
787
|
+
}
|
|
788
|
+
)).catch(reject);
|
|
789
|
+
};
|
|
790
|
+
});
|
|
791
|
+
};
|
|
792
|
+
|
|
793
|
+
const toGeojson = (file) => {
|
|
794
|
+
const actions = {
|
|
795
|
+
shp: shpToGeojson
|
|
796
|
+
};
|
|
797
|
+
return new Promise((resolve, reject) => {
|
|
798
|
+
const suffix = file.name.split(".").pop();
|
|
799
|
+
if (suffix && actions[suffix]) {
|
|
800
|
+
resolve(actions[suffix](file));
|
|
801
|
+
} else {
|
|
802
|
+
reject(new Error(`Can't resolve the .${suffix} file`));
|
|
803
|
+
}
|
|
804
|
+
});
|
|
805
|
+
};
|
|
806
|
+
|
|
325
807
|
/* @preserve
|
|
326
808
|
* @terraformer/arcgis - v2.1.1 - MIT
|
|
327
809
|
* Copyright (c) 2012-2022 Environmental Systems Research Institute, Inc.
|
|
@@ -209,7 +209,7 @@ export declare const props: {
|
|
|
209
209
|
inputStyle: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => string | import("vue").CSSProperties | import("vue").StyleValue[]) | (() => import("vue").StyleValue) | ((new (...args: any[]) => string | import("vue").CSSProperties | import("vue").StyleValue[]) | (() => import("vue").StyleValue))[], unknown, unknown, () => import("element-plus/es/utils").Mutable<{}>, boolean>;
|
|
210
210
|
autofocus: BooleanConstructor;
|
|
211
211
|
};
|
|
212
|
-
export declare const createBindProps: <T2 extends import("@vunk/core").NormalObject, EX extends (Extract<"size", keyof T2> | Extract<"disabled", keyof T2> | Extract<"type", keyof T2> | Extract<"autofocus", keyof T2> | Extract<"required", keyof T2> | Extract<"formItemSize", keyof T2> | Extract<"formItemSlots", keyof T2> | Extract<"elRef", keyof T2> | Extract<"inline", keyof T2> | Extract<"readonly", keyof T2> | Extract<"formItemTip", keyof T2> | Extract<"formItemTipClass", keyof T2> | Extract<"labelTip", keyof T2> | Extract<"label", keyof T2> | Extract<"labelWidth", keyof T2> | Extract<"labelPosition", keyof T2> | Extract<"prop", keyof T2> | Extract<"rules", keyof T2> | Extract<"error", keyof T2> | Extract<"validateStatus", keyof T2> | Extract<"for", keyof T2> | Extract<"inlineMessage", keyof T2> | Extract<"showMessage", keyof T2> | Extract<"visibleElements", keyof T2> | Extract<"
|
|
212
|
+
export declare const createBindProps: <T2 extends import("@vunk/core").NormalObject, EX extends (Extract<"size", keyof T2> | Extract<"disabled", keyof T2> | Extract<"type", keyof T2> | Extract<"autofocus", keyof T2> | Extract<"required", keyof T2> | Extract<"formItemSize", keyof T2> | Extract<"formItemSlots", keyof T2> | Extract<"elRef", keyof T2> | Extract<"inline", keyof T2> | Extract<"readonly", keyof T2> | Extract<"formItemTip", keyof T2> | Extract<"formItemTipClass", keyof T2> | Extract<"labelTip", keyof T2> | Extract<"label", keyof T2> | Extract<"labelWidth", keyof T2> | Extract<"labelPosition", keyof T2> | Extract<"prop", keyof T2> | Extract<"rules", keyof T2> | Extract<"error", keyof T2> | Extract<"validateStatus", keyof T2> | Extract<"for", keyof T2> | Extract<"inlineMessage", keyof T2> | Extract<"showMessage", keyof T2> | Extract<"visibleElements", keyof T2> | Extract<"id", keyof T2> | Extract<"multiple", keyof T2> | Extract<"modelValue", keyof T2> | Extract<"placeholder", keyof T2> | Extract<"clearable", keyof T2> | Extract<"validateEvent", keyof T2> | Extract<"tabindex", keyof T2> | Extract<"ariaLabel", keyof T2> | Extract<"prefixIcon", keyof T2> | Extract<"maxlength", keyof T2> | Extract<"minlength", keyof T2> | Extract<"resize", keyof T2> | Extract<"autosize", keyof T2> | Extract<"autocomplete", keyof T2> | Extract<"formatter", keyof T2> | Extract<"parser", keyof T2> | Extract<"form", keyof T2> | Extract<"showPassword", keyof T2> | Extract<"showWordLimit", keyof T2> | Extract<"suffixIcon", keyof T2> | Extract<"containerRole", keyof T2> | Extract<"inputStyle", keyof T2> | Extract<"rows", keyof T2> | Extract<"view", keyof T2> | Extract<"viewComponent", keyof T2> | Extract<"viewComponentAttrs", keyof T2> | Extract<"viewModelActiveFillSymbol", keyof T2> | Extract<"editTypes", keyof T2> | Extract<"viewModelActiveLineSymbol", keyof T2> | Extract<"viewModelActivePointSymbol", keyof T2> | Extract<"skipSave", keyof T2> | Extract<"showMap", keyof T2> | Extract<"dialogEdit", keyof T2> | Extract<"dialogEditFullscreen", keyof T2> | Extract<"dialogEditTitle", keyof T2> | Extract<"flying", keyof T2> | Extract<"layerIndex", keyof T2> | Extract<"inputSlots", keyof T2>)[]>(propsArg: T2, excludes?: EX) => import("vue").ComputedRef<{ [P in EX extends (infer KE)[] ? Exclude<Extract<"size" | "disabled" | "type" | "autofocus" | "required" | "formItemSize" | "formItemSlots" | "elRef" | "inline" | "readonly" | "formItemTip" | "formItemTipClass" | "labelTip" | "label" | "labelWidth" | "labelPosition" | "prop" | "rules" | "error" | "validateStatus" | "for" | "inlineMessage" | "showMessage" | "visibleElements" | "id" | "multiple" | "modelValue" | "placeholder" | "clearable" | "validateEvent" | "tabindex" | "ariaLabel" | "prefixIcon" | "maxlength" | "minlength" | "resize" | "autosize" | "autocomplete" | "formatter" | "parser" | "form" | "showPassword" | "showWordLimit" | "suffixIcon" | "containerRole" | "inputStyle" | "rows" | "view" | "viewComponent" | "viewComponentAttrs" | "viewModelActiveFillSymbol" | "editTypes" | "viewModelActiveLineSymbol" | "viewModelActivePointSymbol" | "skipSave" | "showMap" | "dialogEdit" | "dialogEditFullscreen" | "dialogEditTitle" | "flying" | "layerIndex" | "inputSlots", keyof T2>, KE> : Extract<"size" | "disabled" | "type" | "autofocus" | "required" | "formItemSize" | "formItemSlots" | "elRef" | "inline" | "readonly" | "formItemTip" | "formItemTipClass" | "labelTip" | "label" | "labelWidth" | "labelPosition" | "prop" | "rules" | "error" | "validateStatus" | "for" | "inlineMessage" | "showMessage" | "visibleElements" | "id" | "multiple" | "modelValue" | "placeholder" | "clearable" | "validateEvent" | "tabindex" | "ariaLabel" | "prefixIcon" | "maxlength" | "minlength" | "resize" | "autosize" | "autocomplete" | "formatter" | "parser" | "form" | "showPassword" | "showWordLimit" | "suffixIcon" | "containerRole" | "inputStyle" | "rows" | "view" | "viewComponent" | "viewComponentAttrs" | "viewModelActiveFillSymbol" | "editTypes" | "viewModelActiveLineSymbol" | "viewModelActivePointSymbol" | "skipSave" | "showMap" | "dialogEdit" | "dialogEditFullscreen" | "dialogEditTitle" | "flying" | "layerIndex" | "inputSlots", keyof T2>]: { [k in Extract<"size" | "disabled" | "type" | "autofocus" | "required" | "formItemSize" | "formItemSlots" | "elRef" | "inline" | "readonly" | "formItemTip" | "formItemTipClass" | "labelTip" | "label" | "labelWidth" | "labelPosition" | "prop" | "rules" | "error" | "validateStatus" | "for" | "inlineMessage" | "showMessage" | "visibleElements" | "id" | "multiple" | "modelValue" | "placeholder" | "clearable" | "validateEvent" | "tabindex" | "ariaLabel" | "prefixIcon" | "maxlength" | "minlength" | "resize" | "autosize" | "autocomplete" | "formatter" | "parser" | "form" | "showPassword" | "showWordLimit" | "suffixIcon" | "containerRole" | "inputStyle" | "rows" | "view" | "viewComponent" | "viewComponentAttrs" | "viewModelActiveFillSymbol" | "editTypes" | "viewModelActiveLineSymbol" | "viewModelActivePointSymbol" | "skipSave" | "showMap" | "dialogEdit" | "dialogEditFullscreen" | "dialogEditTitle" | "flying" | "layerIndex" | "inputSlots", keyof T2>]: T2[k]; }[P]; }>;
|
|
213
213
|
export declare const emits: {
|
|
214
214
|
'update:modelValue': (e: FeatureCollection) => FeatureCollection<Geometry, {
|
|
215
215
|
[name: string]: any;
|
|
@@ -548,11 +548,11 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
548
548
|
inlineMessage: import("element-plus/es/utils").EpPropMergeType<readonly [StringConstructor, BooleanConstructor], unknown, unknown>;
|
|
549
549
|
showMessage: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
550
550
|
visibleElements: __esri.SketchVisibleElements;
|
|
551
|
-
multiple: boolean;
|
|
552
551
|
id: string;
|
|
552
|
+
multiple: boolean;
|
|
553
|
+
modelValue: import("geojson").FeatureCollection<import("geojson").Geometry, any>;
|
|
553
554
|
clearable: boolean;
|
|
554
555
|
validateEvent: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
555
|
-
modelValue: import("geojson").FeatureCollection<import("geojson").Geometry, any>;
|
|
556
556
|
tabindex: import("element-plus/es/utils").EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
|
|
557
557
|
autosize: false;
|
|
558
558
|
autocomplete: string;
|
|
@@ -82,7 +82,7 @@ export declare const props: {
|
|
|
82
82
|
};
|
|
83
83
|
disabled: BooleanConstructor;
|
|
84
84
|
};
|
|
85
|
-
export declare const createBindProps: <T2 extends import("@vunk/core").NormalObject, EX extends (Extract<"size", keyof T2> | Extract<"disabled", keyof T2> | Extract<"data", keyof T2> | Extract<"elRef", keyof T2> | Extract<"inline", keyof T2> | Extract<"readonly", keyof T2> | Extract<"labelWidth", keyof T2> | Extract<"labelPosition", keyof T2> | Extract<"rules", keyof T2> | Extract<"inlineMessage", keyof T2> | Extract<"showMessage", keyof T2> | Extract<"model", keyof T2> | Extract<"requireAsteriskPosition", keyof T2> | Extract<"labelSuffix", keyof T2> | Extract<"statusIcon", keyof T2> | Extract<"validateOnRuleChange", keyof T2> | Extract<"hideRequiredAsterisk", keyof T2> | Extract<"scrollToError", keyof T2> | Extract<"scrollIntoViewOptions", keyof T2> | Extract<"formItems", keyof T2> | Extract<"
|
|
85
|
+
export declare const createBindProps: <T2 extends import("@vunk/core").NormalObject, EX extends (Extract<"size", keyof T2> | Extract<"disabled", keyof T2> | Extract<"data", keyof T2> | Extract<"elRef", keyof T2> | Extract<"inline", keyof T2> | Extract<"readonly", keyof T2> | Extract<"labelWidth", keyof T2> | Extract<"labelPosition", keyof T2> | Extract<"rules", keyof T2> | Extract<"inlineMessage", keyof T2> | Extract<"showMessage", keyof T2> | Extract<"model", keyof T2> | Extract<"requireAsteriskPosition", keyof T2> | Extract<"labelSuffix", keyof T2> | Extract<"statusIcon", keyof T2> | Extract<"validateOnRuleChange", keyof T2> | Extract<"hideRequiredAsterisk", keyof T2> | Extract<"scrollToError", keyof T2> | Extract<"scrollIntoViewOptions", keyof T2> | Extract<"formItems", keyof T2> | Extract<"inheritTemplates", keyof T2> | Extract<"layout", keyof T2> | Extract<"rowSource", keyof T2> | Extract<"colSource", keyof T2>)[]>(propsArg: T2, excludes?: EX) => import("vue").ComputedRef<{ [P in EX extends (infer KE)[] ? Exclude<Extract<"size" | "disabled" | "data" | "elRef" | "inline" | "readonly" | "labelWidth" | "labelPosition" | "rules" | "inlineMessage" | "showMessage" | "model" | "requireAsteriskPosition" | "labelSuffix" | "statusIcon" | "validateOnRuleChange" | "hideRequiredAsterisk" | "scrollToError" | "scrollIntoViewOptions" | "formItems" | "inheritTemplates" | "layout" | "rowSource" | "colSource", keyof T2>, KE> : Extract<"size" | "disabled" | "data" | "elRef" | "inline" | "readonly" | "labelWidth" | "labelPosition" | "rules" | "inlineMessage" | "showMessage" | "model" | "requireAsteriskPosition" | "labelSuffix" | "statusIcon" | "validateOnRuleChange" | "hideRequiredAsterisk" | "scrollToError" | "scrollIntoViewOptions" | "formItems" | "inheritTemplates" | "layout" | "rowSource" | "colSource", keyof T2>]: { [k in Extract<"size" | "disabled" | "data" | "elRef" | "inline" | "readonly" | "labelWidth" | "labelPosition" | "rules" | "inlineMessage" | "showMessage" | "model" | "requireAsteriskPosition" | "labelSuffix" | "statusIcon" | "validateOnRuleChange" | "hideRequiredAsterisk" | "scrollToError" | "scrollIntoViewOptions" | "formItems" | "inheritTemplates" | "layout" | "rowSource" | "colSource", keyof T2>]: T2[k]; }[P]; }>;
|
|
86
86
|
export declare const emits: {
|
|
87
87
|
setData: (e: SetDataEvent) => SetDataEvent;
|
|
88
88
|
validate: any;
|
|
@@ -358,10 +358,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
358
358
|
hideRequiredAsterisk: boolean;
|
|
359
359
|
scrollToError: boolean;
|
|
360
360
|
formItems: any[];
|
|
361
|
+
inheritTemplates: boolean;
|
|
361
362
|
layout: boolean;
|
|
362
363
|
rowSource: Partial<RowItem>;
|
|
363
364
|
colSource: Partial<import("./types").ColItem>;
|
|
364
|
-
inheritTemplates: boolean;
|
|
365
365
|
}, {}, {
|
|
366
366
|
VkfTemplateInstancesProvider: {
|
|
367
367
|
new (...args: any[]): any;
|
package/components/index2.cjs
CHANGED
|
@@ -22,24 +22,6 @@ var check_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ vue.defi
|
|
|
22
22
|
|
|
23
23
|
// src/components/check.vue
|
|
24
24
|
var check_default = check_vue_vue_type_script_setup_true_lang_default;
|
|
25
|
-
var checked_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ vue.defineComponent({
|
|
26
|
-
name: "Checked",
|
|
27
|
-
__name: "checked",
|
|
28
|
-
setup(__props) {
|
|
29
|
-
return (_ctx, _cache) => (vue.openBlock(), vue.createElementBlock("svg", {
|
|
30
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
31
|
-
viewBox: "0 0 1024 1024"
|
|
32
|
-
}, [
|
|
33
|
-
vue.createElementVNode("path", {
|
|
34
|
-
fill: "currentColor",
|
|
35
|
-
d: "M704 192h160v736H160V192h160.064v64H704zM311.616 537.28l-45.312 45.248L447.36 763.52l316.8-316.8-45.312-45.184L447.36 673.024zM384 192V96h256v96z"
|
|
36
|
-
})
|
|
37
|
-
]));
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
// src/components/checked.vue
|
|
42
|
-
var checked_default = checked_vue_vue_type_script_setup_true_lang_default;
|
|
43
25
|
var circle_check_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ vue.defineComponent({
|
|
44
26
|
name: "CircleCheck",
|
|
45
27
|
__name: "circle-check",
|
|
@@ -360,7 +342,6 @@ var zoom_in_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ vue.de
|
|
|
360
342
|
var zoom_in_default = zoom_in_vue_vue_type_script_setup_true_lang_default;
|
|
361
343
|
|
|
362
344
|
exports.check_default = check_default;
|
|
363
|
-
exports.checked_default = checked_default;
|
|
364
345
|
exports.circle_check_default = circle_check_default;
|
|
365
346
|
exports.circle_close_filled_default = circle_close_filled_default;
|
|
366
347
|
exports.close_default = close_default;
|
package/components/index2.mjs
CHANGED
|
@@ -20,24 +20,6 @@ var check_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCo
|
|
|
20
20
|
|
|
21
21
|
// src/components/check.vue
|
|
22
22
|
var check_default = check_vue_vue_type_script_setup_true_lang_default;
|
|
23
|
-
var checked_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
24
|
-
name: "Checked",
|
|
25
|
-
__name: "checked",
|
|
26
|
-
setup(__props) {
|
|
27
|
-
return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
|
|
28
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
29
|
-
viewBox: "0 0 1024 1024"
|
|
30
|
-
}, [
|
|
31
|
-
createElementVNode("path", {
|
|
32
|
-
fill: "currentColor",
|
|
33
|
-
d: "M704 192h160v736H160V192h160.064v64H704zM311.616 537.28l-45.312 45.248L447.36 763.52l316.8-316.8-45.312-45.184L447.36 673.024zM384 192V96h256v96z"
|
|
34
|
-
})
|
|
35
|
-
]));
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
// src/components/checked.vue
|
|
40
|
-
var checked_default = checked_vue_vue_type_script_setup_true_lang_default;
|
|
41
23
|
var circle_check_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
42
24
|
name: "CircleCheck",
|
|
43
25
|
__name: "circle-check",
|
|
@@ -357,4 +339,4 @@ var zoom_in_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ define
|
|
|
357
339
|
// src/components/zoom-in.vue
|
|
358
340
|
var zoom_in_default = zoom_in_vue_vue_type_script_setup_true_lang_default;
|
|
359
341
|
|
|
360
|
-
export { document_checked_default as a,
|
|
342
|
+
export { document_checked_default as a, minus_default as b, circle_close_filled_default as c, download_default as d, edit_default as e, check_default as f, delete_default as g, close_default as h, circle_check_default as i, document_default as j, upload_filled_default as k, map_location_default as m, plus_default as p, right_default as r, success_filled_default as s, upload_default as u, warning_default as w, zoom_in_default as z };
|