@rpcbase/ui 0.218.0 → 0.220.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/dist/components/AddressAutocompleteInput/index.d.ts.map +1 -1
- package/dist/index100.js +4 -5
- package/dist/index100.js.map +1 -1
- package/dist/index101.js +8 -4
- package/dist/index101.js.map +1 -1
- package/dist/index102.js +5 -8
- package/dist/index102.js.map +1 -1
- package/dist/index103.js +4 -5
- package/dist/index103.js.map +1 -1
- package/dist/index104.js +3 -3
- package/dist/index104.js.map +1 -1
- package/dist/index105.js +6 -4
- package/dist/index105.js.map +1 -1
- package/dist/index106.js +145 -6
- package/dist/index106.js.map +1 -1
- package/dist/index107.js +38 -144
- package/dist/index107.js.map +1 -1
- package/dist/index108.js +4 -39
- package/dist/index108.js.map +1 -1
- package/dist/index109.js +7 -4
- package/dist/index109.js.map +1 -1
- package/dist/index110.js +12 -6
- package/dist/index110.js.map +1 -1
- package/dist/index111.js +13 -13
- package/dist/index111.js.map +1 -1
- package/dist/index112.js +7 -13
- package/dist/index112.js.map +1 -1
- package/dist/index113.js +30 -6
- package/dist/index113.js.map +1 -1
- package/dist/index114.js +10 -31
- package/dist/index114.js.map +1 -1
- package/dist/index115.js +10 -10
- package/dist/index115.js.map +1 -1
- package/dist/index116.js +8 -10
- package/dist/index116.js.map +1 -1
- package/dist/index117.js +13 -8
- package/dist/index117.js.map +1 -1
- package/dist/index118.js +101 -13
- package/dist/index118.js.map +1 -1
- package/dist/index119.js +20 -102
- package/dist/index119.js.map +1 -1
- package/dist/index120.js +54 -20
- package/dist/index120.js.map +1 -1
- package/dist/index121.js +70 -51
- package/dist/index121.js.map +1 -1
- package/dist/index122.js +9 -72
- package/dist/index122.js.map +1 -1
- package/dist/index123.js +20 -9
- package/dist/index123.js.map +1 -1
- package/dist/index124.js +16 -20
- package/dist/index124.js.map +1 -1
- package/dist/index125.js +23 -16
- package/dist/index125.js.map +1 -1
- package/dist/index126.js +6 -23
- package/dist/index126.js.map +1 -1
- package/dist/index127.js +5 -6
- package/dist/index127.js.map +1 -1
- package/dist/index128.js +23 -5
- package/dist/index128.js.map +1 -1
- package/dist/index129.js +35 -24
- package/dist/index129.js.map +1 -1
- package/dist/index130.js +16 -35
- package/dist/index130.js.map +1 -1
- package/dist/index131.js +7 -16
- package/dist/index131.js.map +1 -1
- package/dist/index132.js +4 -6
- package/dist/index132.js.map +1 -1
- package/dist/index133.js +4 -4
- package/dist/index133.js.map +1 -1
- package/dist/index134.js +4 -4
- package/dist/index134.js.map +1 -1
- package/dist/index135.js +4 -4
- package/dist/index135.js.map +1 -1
- package/dist/index136.js +3 -4
- package/dist/index136.js.map +1 -1
- package/dist/index137.js +6 -3
- package/dist/index137.js.map +1 -1
- package/dist/index138.js +24 -7
- package/dist/index138.js.map +1 -1
- package/dist/index139.js +8 -24
- package/dist/index139.js.map +1 -1
- package/dist/index140.js +6 -7
- package/dist/index140.js.map +1 -1
- package/dist/index141.js +5 -6
- package/dist/index141.js.map +1 -1
- package/dist/index142.js +3 -5
- package/dist/index142.js.map +1 -1
- package/dist/index143.js +3 -3
- package/dist/index143.js.map +1 -1
- package/dist/index144.js +4 -3
- package/dist/index144.js.map +1 -1
- package/dist/index145.js +3 -4
- package/dist/index145.js.map +1 -1
- package/dist/index146.js +4 -3
- package/dist/index146.js.map +1 -1
- package/dist/index147.js +3 -4
- package/dist/index147.js.map +1 -1
- package/dist/index148.js +3 -3
- package/dist/index148.js.map +1 -1
- package/dist/index149.js +3 -3
- package/dist/index149.js.map +1 -1
- package/dist/index150.js +46 -3
- package/dist/index150.js.map +1 -1
- package/dist/index151.js +1 -1
- package/dist/index153.js +1 -1
- package/dist/index154.js +1 -1
- package/dist/index181.js +1 -1
- package/dist/index228.js +1 -1
- package/dist/index231.js +1 -1
- package/dist/index233.js +1 -1
- package/dist/index234.js +1 -1
- package/dist/index235.js +3 -3
- package/dist/index236.js +2 -2
- package/dist/index269.js +1 -1
- package/dist/index271.js +4 -4
- package/dist/index294.js +69 -65
- package/dist/index294.js.map +1 -1
- package/dist/index295.js +8 -68
- package/dist/index295.js.map +1 -1
- package/dist/index296.js +14 -9
- package/dist/index296.js.map +1 -1
- package/dist/index297.js +66 -14
- package/dist/index297.js.map +1 -1
- package/dist/index298.js +64 -65
- package/dist/index298.js.map +1 -1
- package/dist/index3.js +99 -87
- package/dist/index3.js.map +1 -1
- package/dist/index31.js +5 -5
- package/dist/index32.js +24 -24
- package/dist/index33.js +3 -3
- package/dist/index36.js +1 -1
- package/dist/index37.js +2 -2
- package/dist/index41.js +20 -20
- package/dist/index49.js +1 -1
- package/dist/index50.js +1 -1
- package/dist/index53.js +7 -2
- package/dist/index53.js.map +1 -1
- package/dist/index54.js +34 -2
- package/dist/index54.js.map +1 -1
- package/dist/index55.js +47 -5
- package/dist/index55.js.map +1 -1
- package/dist/index56.js +7 -33
- package/dist/index56.js.map +1 -1
- package/dist/index57.js +11 -48
- package/dist/index57.js.map +1 -1
- package/dist/index58.js +3 -7
- package/dist/index58.js.map +1 -1
- package/dist/index59.js +47 -11
- package/dist/index59.js.map +1 -1
- package/dist/index60.js +50 -3
- package/dist/index60.js.map +1 -1
- package/dist/index61.js +7 -47
- package/dist/index61.js.map +1 -1
- package/dist/index62.js +12 -48
- package/dist/index62.js.map +1 -1
- package/dist/index63.js +133 -7
- package/dist/index63.js.map +1 -1
- package/dist/index64.js +10 -14
- package/dist/index64.js.map +1 -1
- package/dist/index65.js +210 -127
- package/dist/index65.js.map +1 -1
- package/dist/index66.js +12 -10
- package/dist/index66.js.map +1 -1
- package/dist/index67.js +44 -214
- package/dist/index67.js.map +1 -1
- package/dist/index68.js +49 -12
- package/dist/index68.js.map +1 -1
- package/dist/index69.js +4 -47
- package/dist/index69.js.map +1 -1
- package/dist/index70.js +5 -49
- package/dist/index70.js.map +1 -1
- package/dist/index71.js +28 -4
- package/dist/index71.js.map +1 -1
- package/dist/index72.js +50 -6
- package/dist/index72.js.map +1 -1
- package/dist/index73.js +9 -28
- package/dist/index73.js.map +1 -1
- package/dist/index74.js +6 -50
- package/dist/index74.js.map +1 -1
- package/dist/index75.js +8 -9
- package/dist/index75.js.map +1 -1
- package/dist/index76.js +5 -5
- package/dist/index76.js.map +1 -1
- package/dist/index77.js +2 -8
- package/dist/index77.js.map +1 -1
- package/dist/index78.js +2 -6
- package/dist/index78.js.map +1 -1
- package/dist/index79.js +52 -47
- package/dist/index79.js.map +1 -1
- package/dist/index80.js +5 -52
- package/dist/index80.js.map +1 -1
- package/dist/index81.js +4 -4
- package/dist/index81.js.map +1 -1
- package/dist/index82.js +15 -4
- package/dist/index82.js.map +1 -1
- package/dist/index83.js +5 -15
- package/dist/index83.js.map +1 -1
- package/dist/index84.js +7 -5
- package/dist/index84.js.map +1 -1
- package/dist/index85.js +15 -6
- package/dist/index85.js.map +1 -1
- package/dist/index86.js +4 -16
- package/dist/index86.js.map +1 -1
- package/dist/index87.js +1 -1
- package/dist/index87.js.map +1 -1
- package/dist/index88.js +5 -4
- package/dist/index88.js.map +1 -1
- package/dist/index89.js +4 -4
- package/dist/index89.js.map +1 -1
- package/dist/index90.js +4 -5
- package/dist/index90.js.map +1 -1
- package/dist/index91.js +2 -2
- package/dist/index91.js.map +1 -1
- package/dist/index92.js +5 -3
- package/dist/index92.js.map +1 -1
- package/dist/index93.js +24 -6
- package/dist/index93.js.map +1 -1
- package/dist/index94.js +6 -24
- package/dist/index94.js.map +1 -1
- package/dist/index95.js +4 -6
- package/dist/index95.js.map +1 -1
- package/dist/index96.js +5 -3
- package/dist/index96.js.map +1 -1
- package/dist/index97.js +5 -6
- package/dist/index97.js.map +1 -1
- package/dist/index98.js +4 -5
- package/dist/index98.js.map +1 -1
- package/dist/index99.js +4 -3
- package/dist/index99.js.map +1 -1
- package/package.json +1 -1
package/dist/index297.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index297.js","sources":["../../../node_modules/react-remove-scroll/dist/es2015/
|
|
1
|
+
{"version":3,"file":"index297.js","sources":["../../../node_modules/react-remove-scroll/dist/es2015/handleScroll.js"],"sourcesContent":["var alwaysContainsScroll = function (node) {\n // textarea will always _contain_ scroll inside self. It only can be hidden\n return node.tagName === 'TEXTAREA';\n};\nvar elementCanBeScrolled = function (node, overflow) {\n if (!(node instanceof Element)) {\n return false;\n }\n var styles = window.getComputedStyle(node);\n return (\n // not-not-scrollable\n styles[overflow] !== 'hidden' &&\n // contains scroll inside self\n !(styles.overflowY === styles.overflowX && !alwaysContainsScroll(node) && styles[overflow] === 'visible'));\n};\nvar elementCouldBeVScrolled = function (node) { return elementCanBeScrolled(node, 'overflowY'); };\nvar elementCouldBeHScrolled = function (node) { return elementCanBeScrolled(node, 'overflowX'); };\nexport var locationCouldBeScrolled = function (axis, node) {\n var ownerDocument = node.ownerDocument;\n var current = node;\n do {\n // Skip over shadow root\n if (typeof ShadowRoot !== 'undefined' && current instanceof ShadowRoot) {\n current = current.host;\n }\n var isScrollable = elementCouldBeScrolled(axis, current);\n if (isScrollable) {\n var _a = getScrollVariables(axis, current), scrollHeight = _a[1], clientHeight = _a[2];\n if (scrollHeight > clientHeight) {\n return true;\n }\n }\n current = current.parentNode;\n } while (current && current !== ownerDocument.body);\n return false;\n};\nvar getVScrollVariables = function (_a) {\n var scrollTop = _a.scrollTop, scrollHeight = _a.scrollHeight, clientHeight = _a.clientHeight;\n return [\n scrollTop,\n scrollHeight,\n clientHeight,\n ];\n};\nvar getHScrollVariables = function (_a) {\n var scrollLeft = _a.scrollLeft, scrollWidth = _a.scrollWidth, clientWidth = _a.clientWidth;\n return [\n scrollLeft,\n scrollWidth,\n clientWidth,\n ];\n};\nvar elementCouldBeScrolled = function (axis, node) {\n return axis === 'v' ? elementCouldBeVScrolled(node) : elementCouldBeHScrolled(node);\n};\nvar getScrollVariables = function (axis, node) {\n return axis === 'v' ? getVScrollVariables(node) : getHScrollVariables(node);\n};\nvar getDirectionFactor = function (axis, direction) {\n /**\n * If the element's direction is rtl (right-to-left), then scrollLeft is 0 when the scrollbar is at its rightmost position,\n * and then increasingly negative as you scroll towards the end of the content.\n * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollLeft\n */\n return axis === 'h' && direction === 'rtl' ? -1 : 1;\n};\nexport var handleScroll = function (axis, endTarget, event, sourceDelta, noOverscroll) {\n var directionFactor = getDirectionFactor(axis, window.getComputedStyle(endTarget).direction);\n var delta = directionFactor * sourceDelta;\n // find scrollable target\n var target = event.target;\n var targetInLock = endTarget.contains(target);\n var shouldCancelScroll = false;\n var isDeltaPositive = delta > 0;\n var availableScroll = 0;\n var availableScrollTop = 0;\n do {\n if (!target) {\n break;\n }\n var _a = getScrollVariables(axis, target), position = _a[0], scroll_1 = _a[1], capacity = _a[2];\n var elementScroll = scroll_1 - capacity - directionFactor * position;\n if (position || elementScroll) {\n if (elementCouldBeScrolled(axis, target)) {\n availableScroll += elementScroll;\n availableScrollTop += position;\n }\n }\n var parent_1 = target.parentNode;\n // we will \"bubble\" from ShadowDom in case we are, or just to the parent in normal case\n // this is the same logic used in focus-lock\n target = (parent_1 && parent_1.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? parent_1.host : parent_1);\n } while (\n // portaled content\n (!targetInLock && target !== document.body) ||\n // self content\n (targetInLock && (endTarget.contains(target) || endTarget === target)));\n // handle epsilon around 0 (non standard zoom levels)\n if (isDeltaPositive &&\n ((noOverscroll && Math.abs(availableScroll) < 1) || (!noOverscroll && delta > availableScroll))) {\n shouldCancelScroll = true;\n }\n else if (!isDeltaPositive &&\n ((noOverscroll && Math.abs(availableScrollTop) < 1) || (!noOverscroll && -delta > availableScrollTop))) {\n shouldCancelScroll = true;\n }\n return shouldCancelScroll;\n};\n"],"names":["alwaysContainsScroll","node","elementCanBeScrolled","overflow","styles","elementCouldBeVScrolled","elementCouldBeHScrolled","locationCouldBeScrolled","axis","ownerDocument","current","isScrollable","elementCouldBeScrolled","_a","getScrollVariables","scrollHeight","clientHeight","getVScrollVariables","scrollTop","getHScrollVariables","scrollLeft","scrollWidth","clientWidth","getDirectionFactor","direction","handleScroll","endTarget","event","sourceDelta","noOverscroll","directionFactor","delta","target","targetInLock","shouldCancelScroll","isDeltaPositive","availableScroll","availableScrollTop","position","scroll_1","capacity","elementScroll","parent_1"],"mappings":"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","x_google_ignoreList":[0]}
|
package/dist/index298.js
CHANGED
|
@@ -1,69 +1,68 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
},
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
1
|
+
import { __assign as d } from "./index237.js";
|
|
2
|
+
function l(r) {
|
|
3
|
+
return r;
|
|
4
|
+
}
|
|
5
|
+
function h(r, t) {
|
|
6
|
+
t === void 0 && (t = l);
|
|
7
|
+
var e = [], o = !1, c = {
|
|
8
|
+
read: function() {
|
|
9
|
+
if (o)
|
|
10
|
+
throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");
|
|
11
|
+
return e.length ? e[e.length - 1] : r;
|
|
12
|
+
},
|
|
13
|
+
useMedium: function(u) {
|
|
14
|
+
var n = t(u, o);
|
|
15
|
+
return e.push(n), function() {
|
|
16
|
+
e = e.filter(function(i) {
|
|
17
|
+
return i !== n;
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
},
|
|
21
|
+
assignSyncMedium: function(u) {
|
|
22
|
+
for (o = !0; e.length; ) {
|
|
23
|
+
var n = e;
|
|
24
|
+
e = [], n.forEach(u);
|
|
25
|
+
}
|
|
26
|
+
e = {
|
|
27
|
+
push: function(i) {
|
|
28
|
+
return u(i);
|
|
29
|
+
},
|
|
30
|
+
filter: function() {
|
|
31
|
+
return e;
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
},
|
|
35
|
+
assignMedium: function(u) {
|
|
36
|
+
o = !0;
|
|
37
|
+
var n = [];
|
|
38
|
+
if (e.length) {
|
|
39
|
+
var i = e;
|
|
40
|
+
e = [], i.forEach(u), n = e;
|
|
41
|
+
}
|
|
42
|
+
var s = function() {
|
|
43
|
+
var f = n;
|
|
44
|
+
n = [], f.forEach(u);
|
|
45
|
+
}, a = function() {
|
|
46
|
+
return Promise.resolve().then(s);
|
|
47
|
+
};
|
|
48
|
+
a(), e = {
|
|
49
|
+
push: function(f) {
|
|
50
|
+
n.push(f), a();
|
|
51
|
+
},
|
|
52
|
+
filter: function(f) {
|
|
53
|
+
return n = n.filter(f), e;
|
|
54
|
+
}
|
|
55
|
+
};
|
|
25
56
|
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
l
|
|
35
|
-
];
|
|
36
|
-
}, p = function(r) {
|
|
37
|
-
var e = r.scrollLeft, t = r.scrollWidth, l = r.clientWidth;
|
|
38
|
-
return [
|
|
39
|
-
e,
|
|
40
|
-
t,
|
|
41
|
-
l
|
|
42
|
-
];
|
|
43
|
-
}, g = function(r, e) {
|
|
44
|
-
return r === "v" ? D(e) : E(e);
|
|
45
|
-
}, m = function(r, e) {
|
|
46
|
-
return r === "v" ? H(e) : p(e);
|
|
47
|
-
}, B = function(r, e) {
|
|
48
|
-
return r === "h" && e === "rtl" ? -1 : 1;
|
|
49
|
-
}, V = function(r, e, t, l, f) {
|
|
50
|
-
var n = B(r, window.getComputedStyle(e).direction), i = n * l, o = t.target, d = e.contains(o), c = !1, s = i > 0, h = 0, S = 0;
|
|
51
|
-
do {
|
|
52
|
-
if (!o)
|
|
53
|
-
break;
|
|
54
|
-
var u = m(r, o), v = u[0], C = u[1], y = u[2], w = C - y - n * v;
|
|
55
|
-
(v || w) && g(r, o) && (h += w, S += v);
|
|
56
|
-
var a = o.parentNode;
|
|
57
|
-
o = a && a.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? a.host : a;
|
|
58
|
-
} while (
|
|
59
|
-
// portaled content
|
|
60
|
-
!d && o !== document.body || // self content
|
|
61
|
-
d && (e.contains(o) || e === o)
|
|
62
|
-
);
|
|
63
|
-
return (s && Math.abs(h) < 1 || !s && Math.abs(S) < 1) && (c = !0), c;
|
|
64
|
-
};
|
|
57
|
+
};
|
|
58
|
+
return c;
|
|
59
|
+
}
|
|
60
|
+
function v(r) {
|
|
61
|
+
r === void 0 && (r = {});
|
|
62
|
+
var t = h(null);
|
|
63
|
+
return t.options = d({ async: !0, ssr: !1 }, r), t;
|
|
64
|
+
}
|
|
65
65
|
export {
|
|
66
|
-
|
|
67
|
-
T as locationCouldBeScrolled
|
|
66
|
+
v as createSidecarMedium
|
|
68
67
|
};
|
|
69
68
|
//# sourceMappingURL=index298.js.map
|
package/dist/index298.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index298.js","sources":["../../../node_modules/
|
|
1
|
+
{"version":3,"file":"index298.js","sources":["../../../node_modules/use-sidecar/dist/es2015/medium.js"],"sourcesContent":["import { __assign } from \"tslib\";\nfunction ItoI(a) {\n return a;\n}\nfunction innerCreateMedium(defaults, middleware) {\n if (middleware === void 0) { middleware = ItoI; }\n var buffer = [];\n var assigned = false;\n var medium = {\n read: function () {\n if (assigned) {\n throw new Error('Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.');\n }\n if (buffer.length) {\n return buffer[buffer.length - 1];\n }\n return defaults;\n },\n useMedium: function (data) {\n var item = middleware(data, assigned);\n buffer.push(item);\n return function () {\n buffer = buffer.filter(function (x) { return x !== item; });\n };\n },\n assignSyncMedium: function (cb) {\n assigned = true;\n while (buffer.length) {\n var cbs = buffer;\n buffer = [];\n cbs.forEach(cb);\n }\n buffer = {\n push: function (x) { return cb(x); },\n filter: function () { return buffer; },\n };\n },\n assignMedium: function (cb) {\n assigned = true;\n var pendingQueue = [];\n if (buffer.length) {\n var cbs = buffer;\n buffer = [];\n cbs.forEach(cb);\n pendingQueue = buffer;\n }\n var executeQueue = function () {\n var cbs = pendingQueue;\n pendingQueue = [];\n cbs.forEach(cb);\n };\n var cycle = function () { return Promise.resolve().then(executeQueue); };\n cycle();\n buffer = {\n push: function (x) {\n pendingQueue.push(x);\n cycle();\n },\n filter: function (filter) {\n pendingQueue = pendingQueue.filter(filter);\n return buffer;\n },\n };\n },\n };\n return medium;\n}\nexport function createMedium(defaults, middleware) {\n if (middleware === void 0) { middleware = ItoI; }\n return innerCreateMedium(defaults, middleware);\n}\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport function createSidecarMedium(options) {\n if (options === void 0) { options = {}; }\n var medium = innerCreateMedium(null);\n medium.options = __assign({ async: true, ssr: false }, options);\n return medium;\n}\n"],"names":["ItoI","a","innerCreateMedium","defaults","middleware","buffer","assigned","medium","data","item","x","cb","cbs","pendingQueue","executeQueue","cycle","filter","createSidecarMedium","options","__assign"],"mappings":";AACA,SAASA,EAAKC,GAAG;AACb,SAAOA;AACX;AACA,SAASC,EAAkBC,GAAUC,GAAY;AAC7C,EAAIA,MAAe,WAAUA,IAAaJ;AAC1C,MAAIK,IAAS,CAAA,GACTC,IAAW,IACXC,IAAS;AAAA,IACT,MAAM,WAAY;AACd,UAAID;AACA,cAAM,IAAI,MAAM,kGAAkG;AAEtH,aAAID,EAAO,SACAA,EAAOA,EAAO,SAAS,CAAC,IAE5BF;AAAA,IACX;AAAA,IACA,WAAW,SAAUK,GAAM;AACvB,UAAIC,IAAOL,EAAWI,GAAMF,CAAQ;AACpC,aAAAD,EAAO,KAAKI,CAAI,GACT,WAAY;AACf,QAAAJ,IAASA,EAAO,OAAO,SAAUK,GAAG;AAAE,iBAAOA,MAAMD;AAAA,QAAM,CAAC;AAAA,MAC9D;AAAA,IACJ;AAAA,IACA,kBAAkB,SAAUE,GAAI;AAE5B,WADAL,IAAW,IACJD,EAAO,UAAQ;AAClB,YAAIO,IAAMP;AACV,QAAAA,IAAS,CAAA,GACTO,EAAI,QAAQD,CAAE;AAAA,MAClB;AACA,MAAAN,IAAS;AAAA,QACL,MAAM,SAAUK,GAAG;AAAE,iBAAOC,EAAGD,CAAC;AAAA,QAAG;AAAA,QACnC,QAAQ,WAAY;AAAE,iBAAOL;AAAA,QAAQ;AAAA,MACrD;AAAA,IACQ;AAAA,IACA,cAAc,SAAUM,GAAI;AACxB,MAAAL,IAAW;AACX,UAAIO,IAAe,CAAA;AACnB,UAAIR,EAAO,QAAQ;AACf,YAAIO,IAAMP;AACV,QAAAA,IAAS,CAAA,GACTO,EAAI,QAAQD,CAAE,GACdE,IAAeR;AAAA,MACnB;AACA,UAAIS,IAAe,WAAY;AAC3B,YAAIF,IAAMC;AACV,QAAAA,IAAe,CAAA,GACfD,EAAI,QAAQD,CAAE;AAAA,MAClB,GACII,IAAQ,WAAY;AAAE,eAAO,QAAQ,QAAO,EAAG,KAAKD,CAAY;AAAA,MAAG;AACvE,MAAAC,EAAK,GACLV,IAAS;AAAA,QACL,MAAM,SAAUK,GAAG;AACf,UAAAG,EAAa,KAAKH,CAAC,GACnBK,EAAK;AAAA,QACT;AAAA,QACA,QAAQ,SAAUC,GAAQ;AACtB,iBAAAH,IAAeA,EAAa,OAAOG,CAAM,GAClCX;AAAA,QACX;AAAA,MAChB;AAAA,IACQ;AAAA,EACR;AACI,SAAOE;AACX;AAMO,SAASU,EAAoBC,GAAS;AACzC,EAAIA,MAAY,WAAUA,IAAU,CAAA;AACpC,MAAIX,IAASL,EAAkB,IAAI;AACnC,SAAAK,EAAO,UAAUY,EAAS,EAAE,OAAO,IAAM,KAAK,GAAK,GAAID,CAAO,GACvDX;AACX;","x_google_ignoreList":[0]}
|
package/dist/index3.js
CHANGED
|
@@ -1,181 +1,193 @@
|
|
|
1
1
|
import { j as c } from "./index30.js";
|
|
2
|
-
import { c as
|
|
3
|
-
import { useState as
|
|
4
|
-
import { clsx as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
import { c as Z } from "./index28.js";
|
|
3
|
+
import { useState as S, useRef as w, useMemo as ee, useEffect as O } from "react";
|
|
4
|
+
import { clsx as te } from "./index26.js";
|
|
5
|
+
import { Loader2 as re } from "lucide-react";
|
|
6
|
+
import { useMapsLibrary as se } from "./index22.js";
|
|
7
|
+
import { Input as ne } from "./index14.js";
|
|
8
|
+
import { cn as oe } from "./index2.js";
|
|
9
|
+
const le = /* @__PURE__ */ new Set(["street_address", "route", "premise", "subpremise", "intersection", "sublocality", "sublocality_level_1", "sublocality_level_2", "sublocality_level_3", "sublocality_level_4", "sublocality_level_5", "administrative_area_level_1", "administrative_area_level_2", "administrative_area_level_3", "administrative_area_level_4", "administrative_area_level_5", "administrative_area_level_6", "administrative_area_level_7", "postal_code", "locality", "country", "geocode", "plus_code", "political", "neighborhood", "colloquial_area", "lodging", "train_station", "transit_station"]), q = (n) => (n.text?.text ?? "").replace(/, France$/, "").trim(), ie = (n) => {
|
|
10
|
+
const e = Z.c(8), {
|
|
10
11
|
prediction: l
|
|
11
12
|
} = n;
|
|
12
|
-
let r, o,
|
|
13
|
+
let r, o, m;
|
|
13
14
|
if (e[0] !== l) {
|
|
14
|
-
|
|
15
|
+
m = /* @__PURE__ */ Symbol.for("react.early_return_sentinel");
|
|
15
16
|
e: {
|
|
16
|
-
r =
|
|
17
|
-
const h = l.text?.text ?? "",
|
|
18
|
-
if (
|
|
19
|
-
|
|
17
|
+
r = q(l);
|
|
18
|
+
const h = l.text?.text ?? "", P = l.text?.matches ?? [], F = r.length < h.length;
|
|
19
|
+
if (P.length === 0) {
|
|
20
|
+
m = /* @__PURE__ */ c.jsx(c.Fragment, { children: r });
|
|
20
21
|
break e;
|
|
21
22
|
}
|
|
22
23
|
o = [];
|
|
23
24
|
let f = 0;
|
|
24
|
-
|
|
25
|
+
P.forEach((y, u) => {
|
|
25
26
|
if (F && y.startOffset >= r.length)
|
|
26
27
|
return;
|
|
27
28
|
const g = y.startOffset, i = Math.min(y.endOffset, r.length);
|
|
28
29
|
if (g > f && o.push(r.substring(f, g)), i > g) {
|
|
29
|
-
const
|
|
30
|
-
o.push(/* @__PURE__ */ c.jsx("strong", { children:
|
|
30
|
+
const d = r.substring(g, i);
|
|
31
|
+
o.push(/* @__PURE__ */ c.jsx("strong", { children: d }, u));
|
|
31
32
|
}
|
|
32
33
|
f = Math.max(f, i);
|
|
33
34
|
}), f < r.length && o.push(r.substring(f));
|
|
34
35
|
}
|
|
35
|
-
e[0] = l, e[1] = r, e[2] = o, e[3] =
|
|
36
|
+
e[0] = l, e[1] = r, e[2] = o, e[3] = m;
|
|
36
37
|
} else
|
|
37
|
-
r = e[1], o = e[2],
|
|
38
|
-
if (
|
|
39
|
-
return
|
|
38
|
+
r = e[1], o = e[2], m = e[3];
|
|
39
|
+
if (m !== /* @__PURE__ */ Symbol.for("react.early_return_sentinel"))
|
|
40
|
+
return m;
|
|
40
41
|
if (o.length === 0) {
|
|
41
42
|
let h;
|
|
42
43
|
return e[4] !== r ? (h = /* @__PURE__ */ c.jsx(c.Fragment, { children: r }), e[4] = r, e[5] = h) : h = e[5], h;
|
|
43
44
|
}
|
|
44
45
|
let p;
|
|
45
46
|
return e[6] !== o ? (p = /* @__PURE__ */ c.jsx(c.Fragment, { children: o }), e[6] = o, e[7] = p) : p = e[7], p;
|
|
46
|
-
},
|
|
47
|
+
}, ce = (n, e) => !n.types || n.types.length === 0 || !e || e.size === 0 ? !0 : n.types.some((l) => e.has(l)), ae = (n, e) => n.placeId || `${n.text?.text ?? "prediction"}-${e}`, ue = (n) => {
|
|
47
48
|
const e = /* @__PURE__ */ new Map();
|
|
48
49
|
return n.forEach((l) => {
|
|
49
50
|
const r = l.placeId;
|
|
50
51
|
r && (e.has(r) || e.set(r, l));
|
|
51
52
|
}), Array.from(e.values());
|
|
52
|
-
},
|
|
53
|
+
}, fe = (n, e) => n.filter((l) => ce(l, e)), de = (n) => n.sort((e, l) => {
|
|
53
54
|
const r = e.distanceMeters ?? Number.POSITIVE_INFINITY, o = l.distanceMeters ?? Number.POSITIVE_INFINITY;
|
|
54
55
|
return r - o;
|
|
55
|
-
}),
|
|
56
|
+
}), me = (n, e) => de(fe(ue(n), e)), pe = (n, e) => q(n).toLowerCase() === e.trim().toLowerCase(), Ie = ({
|
|
56
57
|
id: n,
|
|
57
58
|
label: e,
|
|
58
59
|
placeholder: l,
|
|
59
60
|
value: r,
|
|
60
61
|
onValueChange: o,
|
|
61
|
-
disabled:
|
|
62
|
+
disabled: m,
|
|
62
63
|
name: p,
|
|
63
64
|
className: h,
|
|
64
|
-
autofillShimName:
|
|
65
|
+
autofillShimName: P,
|
|
65
66
|
googleMapsApiKey: F,
|
|
66
67
|
locationRestriction: f,
|
|
67
68
|
allowedTypes: y
|
|
68
69
|
}) => {
|
|
69
|
-
const [u, g] =
|
|
70
|
+
const [u, g] = S(r ?? ""), [i, d] = S([]), [j, a] = S(!1), [v, M] = S(-1), [H, b] = S(!1), R = w(null), k = w(null), $ = w(!1), N = w(!1), x = w(null), B = w([]), I = w("smooth"), C = se("places", F), Y = ee(() => {
|
|
70
71
|
if (!y)
|
|
71
|
-
return
|
|
72
|
+
return le;
|
|
72
73
|
const t = /* @__PURE__ */ new Set();
|
|
73
74
|
for (const s of y)
|
|
74
75
|
t.add(s);
|
|
75
76
|
return t;
|
|
76
77
|
}, [y]);
|
|
77
78
|
O(() => {
|
|
78
|
-
g(r ?? ""),
|
|
79
|
+
g(r ?? ""), N.current = !1;
|
|
79
80
|
}, [r]), O(() => {
|
|
80
|
-
if (
|
|
81
|
-
|
|
81
|
+
if ($.current) {
|
|
82
|
+
$.current = !1;
|
|
82
83
|
return;
|
|
83
84
|
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
85
|
+
const t = u.trim();
|
|
86
|
+
b(t !== "");
|
|
87
|
+
let s = !0;
|
|
88
|
+
const _ = setTimeout(() => {
|
|
89
|
+
if (!s)
|
|
87
90
|
return;
|
|
88
|
-
if (
|
|
89
|
-
|
|
91
|
+
if (t === "") {
|
|
92
|
+
d([]), a(!1), x.current = null, r !== "" && o("");
|
|
90
93
|
return;
|
|
91
94
|
}
|
|
92
|
-
if (!
|
|
95
|
+
if (!C) return;
|
|
93
96
|
const {
|
|
94
|
-
AutocompleteSuggestion:
|
|
95
|
-
AutocompleteSessionToken:
|
|
96
|
-
} =
|
|
97
|
-
if (!
|
|
98
|
-
console.error("AddressAutocompleteInput: missing AutocompleteSuggestion or AutocompleteSessionToken exports"),
|
|
97
|
+
AutocompleteSuggestion: A,
|
|
98
|
+
AutocompleteSessionToken: L
|
|
99
|
+
} = C;
|
|
100
|
+
if (!A || !L) {
|
|
101
|
+
console.error("AddressAutocompleteInput: missing AutocompleteSuggestion or AutocompleteSessionToken exports"), d([]), a(!1), b(!1);
|
|
99
102
|
return;
|
|
100
103
|
}
|
|
101
|
-
x.current || (x.current = new
|
|
102
|
-
const
|
|
104
|
+
x.current || (x.current = new L());
|
|
105
|
+
const T = {
|
|
103
106
|
input: u,
|
|
104
107
|
sessionToken: x.current ?? void 0,
|
|
105
108
|
includedRegionCodes: ["fr"]
|
|
106
109
|
};
|
|
107
|
-
f && (
|
|
108
|
-
if (!
|
|
110
|
+
f && (T.locationRestriction = f), A.fetchAutocompleteSuggestions(T).then((D) => {
|
|
111
|
+
if (!s)
|
|
109
112
|
return;
|
|
110
|
-
const
|
|
111
|
-
if (!
|
|
112
|
-
|
|
113
|
+
const V = D.suggestions.map((U) => U.placePrediction).filter((U) => !!U), E = me(V, Y), W = E[0], X = W && E.length === 1 && pe(W, u);
|
|
114
|
+
if (!N.current && X) {
|
|
115
|
+
d(E), a(!1), b(!1);
|
|
113
116
|
return;
|
|
114
117
|
}
|
|
115
|
-
|
|
116
|
-
}).catch((
|
|
117
|
-
|
|
118
|
+
E.length > 0 ? (d(E), N.current && a(!0), M(-1)) : (d([]), a(!1)), b(!1);
|
|
119
|
+
}).catch((D) => {
|
|
120
|
+
s && (console.error("AddressAutocompleteInput: suggestion fetch failed", D), d([]), a(!1), b(!1));
|
|
118
121
|
});
|
|
119
122
|
}, 300);
|
|
120
123
|
return () => {
|
|
121
|
-
|
|
124
|
+
s = !1, clearTimeout(_);
|
|
122
125
|
};
|
|
123
|
-
}, [u,
|
|
126
|
+
}, [u, C, o, r, f, Y]), O(() => {
|
|
124
127
|
const t = (s) => {
|
|
125
|
-
|
|
128
|
+
R.current && !R.current.contains(s.target) && k.current && !k.current.contains(s.target) && a(!1);
|
|
126
129
|
};
|
|
127
130
|
return document.addEventListener("mousedown", t), () => {
|
|
128
131
|
document.removeEventListener("mousedown", t);
|
|
129
132
|
};
|
|
130
133
|
}, []);
|
|
131
|
-
const
|
|
132
|
-
|
|
133
|
-
const s =
|
|
134
|
-
g(s), o(s),
|
|
135
|
-
},
|
|
136
|
-
|
|
137
|
-
},
|
|
138
|
-
if (!
|
|
134
|
+
const z = (t) => {
|
|
135
|
+
$.current = !0;
|
|
136
|
+
const s = q(t);
|
|
137
|
+
g(s), o(s), d([]), a(!1), b(!1), x.current = null;
|
|
138
|
+
}, G = (t) => {
|
|
139
|
+
N.current = !0, g(t.target.value);
|
|
140
|
+
}, J = (t) => {
|
|
141
|
+
if (!j || i.length === 0) {
|
|
139
142
|
t.key === "Enter" && (t.preventDefault(), o(u), a(!1), x.current = null);
|
|
140
143
|
return;
|
|
141
144
|
}
|
|
142
|
-
t.key === "ArrowDown" ? (
|
|
143
|
-
},
|
|
145
|
+
t.key === "ArrowDown" ? (I.current = t.repeat ? "auto" : "smooth", t.preventDefault(), M((s) => i.length === 0 ? -1 : s < 0 ? 0 : (s + 1) % i.length)) : t.key === "ArrowUp" ? (I.current = t.repeat ? "auto" : "smooth", t.preventDefault(), M((s) => i.length === 0 ? -1 : s <= 0 ? i.length - 1 : (s - 1) % i.length)) : t.key === "Enter" ? (t.preventDefault(), v > -1 && i[v] ? z(i[v]) : (o(u), a(!1), x.current = null)) : t.key === "Escape" && a(!1);
|
|
146
|
+
}, Q = () => {
|
|
144
147
|
a(!1), r !== u && o(u), x.current = null;
|
|
145
|
-
},
|
|
148
|
+
}, K = P ?? (p ? `${p}_shim` : void 0);
|
|
146
149
|
return O(() => {
|
|
147
|
-
if (!
|
|
148
|
-
|
|
150
|
+
if (!j || v < 0) {
|
|
151
|
+
I.current = "smooth";
|
|
149
152
|
return;
|
|
150
153
|
}
|
|
151
|
-
const t =
|
|
154
|
+
const t = B.current[v], s = k.current;
|
|
152
155
|
if (!t || !s) {
|
|
153
|
-
|
|
156
|
+
I.current = "smooth";
|
|
154
157
|
return;
|
|
155
158
|
}
|
|
156
|
-
const
|
|
157
|
-
|
|
158
|
-
const
|
|
159
|
-
|
|
159
|
+
const _ = I.current;
|
|
160
|
+
I.current = "smooth";
|
|
161
|
+
const A = t.offsetTop, L = A + t.offsetHeight, T = s.scrollTop, D = T + s.clientHeight;
|
|
162
|
+
A >= T && L <= D || t.scrollIntoView({
|
|
160
163
|
block: "nearest",
|
|
161
|
-
behavior:
|
|
164
|
+
behavior: _
|
|
162
165
|
});
|
|
163
|
-
}, [v,
|
|
164
|
-
|
|
166
|
+
}, [v, j]), B.current.length = i.length, /* @__PURE__ */ c.jsxs("div", { className: "relative", children: [
|
|
167
|
+
K && /* @__PURE__ */ c.jsx("input", { tabIndex: -1, autoComplete: "street-address", name: K, "aria-hidden": "true", style: {
|
|
168
|
+
position: "absolute",
|
|
169
|
+
left: "-9999px",
|
|
170
|
+
top: "-9999px",
|
|
171
|
+
height: "1px",
|
|
172
|
+
width: "1px"
|
|
173
|
+
} }),
|
|
165
174
|
/* @__PURE__ */ c.jsx("label", { htmlFor: n, className: "text-left block text-sm font-medium text-gray-700 mb-1 cursor-pointer", children: e }),
|
|
166
|
-
/* @__PURE__ */ c.
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
},
|
|
175
|
+
/* @__PURE__ */ c.jsxs("div", { className: "relative", children: [
|
|
176
|
+
/* @__PURE__ */ c.jsx(ne, { ref: R, id: n, type: "text", placeholder: l, name: p ?? `${n}_input`, value: u, onChange: G, onKeyDown: J, onFocus: () => {
|
|
177
|
+
i.length > 0 && u && a(!0);
|
|
178
|
+
}, onBlur: Q, disabled: m, autoComplete: "new-password", className: oe("w-full", H && "pr-9", h) }),
|
|
179
|
+
H && /* @__PURE__ */ c.jsx(re, { className: "pointer-events-none absolute right-3 top-1/2 h-4 w-4 -translate-y-1/2 animate-spin text-gray-400", "aria-hidden": "true" })
|
|
180
|
+
] }),
|
|
181
|
+
j && i.length > 0 && /* @__PURE__ */ c.jsx("ul", { ref: k, className: "absolute z-10 mt-1 w-full max-h-60 overflow-y-auto rounded-md border border-gray-200 bg-white text-left shadow-lg", role: "listbox", children: i.map((t, s) => /* @__PURE__ */ c.jsx("li", { ref: (_) => {
|
|
182
|
+
B.current[s] = _;
|
|
183
|
+
}, className: te("cursor-pointer px-3 py-2 text-sm text-gray-700 hover:bg-gray-100", {
|
|
172
184
|
"bg-gray-100": v === s
|
|
173
|
-
}), role: "option", onMouseDown: (
|
|
174
|
-
|
|
175
|
-
}, children: /* @__PURE__ */ c.jsx(
|
|
185
|
+
}), role: "option", onMouseDown: (_) => {
|
|
186
|
+
_.preventDefault(), z(t);
|
|
187
|
+
}, children: /* @__PURE__ */ c.jsx(ie, { prediction: t }) }, ae(t, s))) })
|
|
176
188
|
] });
|
|
177
189
|
};
|
|
178
190
|
export {
|
|
179
|
-
|
|
191
|
+
Ie as AddressAutocompleteInput
|
|
180
192
|
};
|
|
181
193
|
//# sourceMappingURL=index3.js.map
|