@rpcbase/ui 0.161.0 → 0.162.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/DayPickerField/index.d.ts.map +1 -1
- package/dist/index10.js +1 -1
- package/dist/index11.js +97 -89
- package/dist/index11.js.map +1 -1
- package/dist/index112.js +36 -36
- package/dist/index113.js +1 -1
- package/dist/index12.js +1 -1
- package/dist/index124.js +6 -6
- package/dist/index127.js +10 -10
- package/dist/index129.js +2 -2
- package/dist/index13.js +2 -2
- package/dist/index130.js +3 -3
- package/dist/index131.js +1 -1
- package/dist/index133.js +2 -2
- package/dist/index135.js +1 -1
- package/dist/index14.js +4 -4
- package/dist/index15.js +1 -1
- package/dist/index158.js +2 -2
- package/dist/index159.js +2 -2
- package/dist/index16.js +1 -1
- package/dist/index160.js +2 -2
- package/dist/index161.js +3 -3
- package/dist/index163.js +1 -1
- package/dist/index164.js +5 -5
- package/dist/index165.js +2 -2
- package/dist/index166.js +1 -1
- package/dist/index167.js +1 -1
- package/dist/index169.js +1 -1
- package/dist/index17.js +1 -1
- package/dist/index170.js +1 -1
- package/dist/index176.js +1 -1
- package/dist/index177.js +599 -40
- package/dist/index177.js.map +1 -1
- package/dist/index178.js +41 -200
- package/dist/index178.js.map +1 -1
- package/dist/index179.js +204 -20
- package/dist/index179.js.map +1 -1
- package/dist/index18.js +236 -236
- package/dist/index18.js.map +1 -1
- package/dist/index180.js +22 -25
- package/dist/index180.js.map +1 -1
- package/dist/index181.js +23 -398
- package/dist/index181.js.map +1 -1
- package/dist/index182.js +383 -589
- package/dist/index182.js.map +1 -1
- package/dist/index184.js +4 -4
- package/dist/index189.js +1 -1
- package/dist/index19.js +7 -7
- package/dist/index190.js +1 -1
- package/dist/index197.js +1 -1
- package/dist/index198.js +6 -6
- package/dist/index20.js +2 -2
- package/dist/index200.js +4 -4
- package/dist/index202.js +1 -1
- package/dist/index205.js +1 -1
- package/dist/index206.js +1 -1
- package/dist/index21.js +1 -1
- package/dist/index211.js +3 -16
- package/dist/index211.js.map +1 -1
- package/dist/index212.js +57 -4
- package/dist/index212.js.map +1 -1
- package/dist/index213.js +8 -5
- package/dist/index213.js.map +1 -1
- package/dist/index214.js +55 -47
- package/dist/index214.js.map +1 -1
- package/dist/index215.js +17 -64
- package/dist/index215.js.map +1 -1
- package/dist/index216.js +16 -6
- package/dist/index216.js.map +1 -1
- package/dist/index217.js +5 -4
- package/dist/index217.js.map +1 -1
- package/dist/index218.js +5 -7
- package/dist/index218.js.map +1 -1
- package/dist/index219.js +6 -17
- package/dist/index219.js.map +1 -1
- package/dist/index22.js +1 -1
- package/dist/index220.js +4 -5
- package/dist/index220.js.map +1 -1
- package/dist/index221.js +7 -5
- package/dist/index221.js.map +1 -1
- package/dist/index222.js +17 -13
- package/dist/index222.js.map +1 -1
- package/dist/index223.js +5 -10
- package/dist/index223.js.map +1 -1
- package/dist/index224.js +5 -14
- package/dist/index224.js.map +1 -1
- package/dist/index225.js +13 -14
- package/dist/index225.js.map +1 -1
- package/dist/index226.js +10 -5
- package/dist/index226.js.map +1 -1
- package/dist/index227.js +14 -6
- package/dist/index227.js.map +1 -1
- package/dist/index228.js +14 -7
- package/dist/index228.js.map +1 -1
- package/dist/index229.js +5 -6
- package/dist/index229.js.map +1 -1
- package/dist/index23.js +1 -1
- package/dist/index230.js +6 -9
- package/dist/index230.js.map +1 -1
- package/dist/index231.js +7 -5
- package/dist/index231.js.map +1 -1
- package/dist/index232.js +6 -5
- package/dist/index232.js.map +1 -1
- package/dist/index233.js +8 -8
- package/dist/index233.js.map +1 -1
- package/dist/index234.js +5 -5
- package/dist/index234.js.map +1 -1
- package/dist/index235.js +5 -5
- package/dist/index235.js.map +1 -1
- package/dist/index236.js +9 -4
- package/dist/index236.js.map +1 -1
- package/dist/index237.js +5 -11
- package/dist/index237.js.map +1 -1
- package/dist/index238.js +5 -10
- package/dist/index238.js.map +1 -1
- package/dist/index239.js +4 -10
- package/dist/index239.js.map +1 -1
- package/dist/index24.js +1 -1
- package/dist/index240.js +11 -11
- package/dist/index240.js.map +1 -1
- package/dist/index241.js +10 -11
- package/dist/index241.js.map +1 -1
- package/dist/index242.js +10 -10
- package/dist/index242.js.map +1 -1
- package/dist/index243.js +11 -7
- package/dist/index243.js.map +1 -1
- package/dist/index244.js +11 -6
- package/dist/index244.js.map +1 -1
- package/dist/index245.js +10 -5
- package/dist/index245.js.map +1 -1
- package/dist/index246.js +7 -6
- package/dist/index246.js.map +1 -1
- package/dist/index247.js +6 -7
- package/dist/index247.js.map +1 -1
- package/dist/index248.js +5 -6
- package/dist/index248.js.map +1 -1
- package/dist/index249.js +6 -55
- package/dist/index249.js.map +1 -1
- package/dist/index250.js +7 -8
- package/dist/index250.js.map +1 -1
- package/dist/index251.js +6 -19
- package/dist/index251.js.map +1 -1
- package/dist/index252.js +53 -21
- package/dist/index252.js.map +1 -1
- package/dist/index253.js +22 -15
- package/dist/index253.js.map +1 -1
- package/dist/index254.js +16 -7
- package/dist/index254.js.map +1 -1
- package/dist/index255.js +7 -10
- package/dist/index255.js.map +1 -1
- package/dist/index256.js +9 -9
- package/dist/index256.js.map +1 -1
- package/dist/index257.js +10 -21
- package/dist/index257.js.map +1 -1
- package/dist/index258.js +21 -10
- package/dist/index258.js.map +1 -1
- package/dist/index259.js +10 -9
- package/dist/index259.js.map +1 -1
- package/dist/index260.js +6 -6
- package/dist/index260.js.map +1 -1
- package/dist/index261.js +9 -4
- package/dist/index261.js.map +1 -1
- package/dist/index262.js +4 -5
- package/dist/index262.js.map +1 -1
- package/dist/index263.js +5 -16
- package/dist/index263.js.map +1 -1
- package/dist/index264.js +16 -9
- package/dist/index264.js.map +1 -1
- package/dist/index265.js +9 -18
- package/dist/index265.js.map +1 -1
- package/dist/index266.js +15 -12
- package/dist/index266.js.map +1 -1
- package/dist/index267.js +12 -9
- package/dist/index267.js.map +1 -1
- package/dist/index268.js +12 -29
- package/dist/index268.js.map +1 -1
- package/dist/index269.js +62 -10
- package/dist/index269.js.map +1 -1
- package/dist/index27.js +3 -37
- package/dist/index27.js.map +1 -1
- package/dist/index270.js +48 -25
- package/dist/index270.js.map +1 -1
- package/dist/index271.js +39 -5
- package/dist/index271.js.map +1 -1
- package/dist/index272.js +98 -62
- package/dist/index272.js.map +1 -1
- package/dist/index273.js +96 -47
- package/dist/index273.js.map +1 -1
- package/dist/index274.js +88 -28
- package/dist/index274.js.map +1 -1
- package/dist/index275.js +29 -100
- package/dist/index275.js.map +1 -1
- package/dist/index276.js +12 -97
- package/dist/index276.js.map +1 -1
- package/dist/index277.js +23 -97
- package/dist/index277.js.map +1 -1
- package/dist/index278.js +5 -3
- package/dist/index278.js.map +1 -1
- package/dist/index279.js +65 -22
- package/dist/index279.js.map +1 -1
- package/dist/index28.js +125 -3
- package/dist/index28.js.map +1 -1
- package/dist/index280.js +179 -27
- package/dist/index280.js.map +1 -1
- package/dist/index281.js +47 -5
- package/dist/index281.js.map +1 -1
- package/dist/index282.js +22 -65
- package/dist/index282.js.map +1 -1
- package/dist/index283.js +27 -179
- package/dist/index283.js.map +1 -1
- package/dist/index284.js +5 -47
- package/dist/index284.js.map +1 -1
- package/dist/index285.js +31 -2
- package/dist/index285.js.map +1 -1
- package/dist/index286.js +10 -2
- package/dist/index286.js.map +1 -1
- package/dist/index287.js +46 -12
- package/dist/index287.js.map +1 -1
- package/dist/index288.js +10 -153
- package/dist/index288.js.map +1 -1
- package/dist/index289.js +42 -28
- package/dist/index289.js.map +1 -1
- package/dist/index29.js +47 -124
- package/dist/index29.js.map +1 -1
- package/dist/index290.js +95 -9
- package/dist/index290.js.map +1 -1
- package/dist/index291.js +82 -43
- package/dist/index291.js.map +1 -1
- package/dist/index292.js +104 -10
- package/dist/index292.js.map +1 -1
- package/dist/index293.js +50 -42
- package/dist/index293.js.map +1 -1
- package/dist/index294.js +12 -94
- package/dist/index294.js.map +1 -1
- package/dist/index295.js +10 -85
- package/dist/index295.js.map +1 -1
- package/dist/index296.js +28 -96
- package/dist/index296.js.map +1 -1
- package/dist/index297.js +8 -52
- package/dist/index297.js.map +1 -1
- package/dist/index298.js +153 -10
- package/dist/index298.js.map +1 -1
- package/dist/index299.js +110 -31
- package/dist/index299.js.map +1 -1
- package/dist/index30.js +219 -47
- package/dist/index30.js.map +1 -1
- package/dist/index300.js +17 -8
- package/dist/index300.js.map +1 -1
- package/dist/index301.js +13 -114
- package/dist/index301.js.map +1 -1
- package/dist/index302.js +3 -17
- package/dist/index302.js.map +1 -1
- package/dist/index303.js +33 -12
- package/dist/index303.js.map +1 -1
- package/dist/index304.js +20 -3
- package/dist/index304.js.map +1 -1
- package/dist/index305.js +9 -36
- package/dist/index305.js.map +1 -1
- package/dist/index306.js +8 -20
- package/dist/index306.js.map +1 -1
- package/dist/index307.js +19 -9
- package/dist/index307.js.map +1 -1
- package/dist/index308.js +28 -8
- package/dist/index308.js.map +1 -1
- package/dist/index309.js +15 -18
- package/dist/index309.js.map +1 -1
- package/dist/index31.js +40 -216
- package/dist/index31.js.map +1 -1
- package/dist/index310.js +2 -29
- package/dist/index310.js.map +1 -1
- package/dist/index311.js +2 -17
- package/dist/index311.js.map +1 -1
- package/dist/index318.js +1 -1
- package/dist/index319.js +1 -1
- package/dist/index32.js +38 -41
- package/dist/index32.js.map +1 -1
- package/dist/index33.js +24 -36
- package/dist/index33.js.map +1 -1
- package/dist/index331.js +2 -2
- package/dist/index334.js +1 -1
- package/dist/index335.js +2 -2
- package/dist/index337.js +1 -1
- package/dist/index338.js +1 -1
- package/dist/index339.js +1 -1
- package/dist/index34.js +38 -21
- package/dist/index34.js.map +1 -1
- package/dist/index340.js +1 -1
- package/dist/index341.js +1 -1
- package/dist/index342.js +1 -1
- package/dist/index345.js +1 -1
- package/dist/index35.js +30 -44
- package/dist/index35.js.map +1 -1
- package/dist/index359.js +11 -21
- package/dist/index359.js.map +1 -1
- package/dist/index36.js +26 -30
- package/dist/index36.js.map +1 -1
- package/dist/index360.js +26 -11
- package/dist/index360.js.map +1 -1
- package/dist/index361.js +4 -27
- package/dist/index361.js.map +1 -1
- package/dist/index362.js +22 -4
- package/dist/index362.js.map +1 -1
- package/dist/index37.js +23 -28
- package/dist/index37.js.map +1 -1
- package/dist/index38.js +123 -17
- package/dist/index38.js.map +1 -1
- package/dist/index39.js +230 -127
- package/dist/index39.js.map +1 -1
- package/dist/index40.js +49 -230
- package/dist/index40.js.map +1 -1
- package/dist/index41.js +2640 -50
- package/dist/index41.js.map +1 -1
- package/dist/index42.js +351 -2598
- package/dist/index42.js.map +1 -1
- package/dist/index43.js +214 -375
- package/dist/index43.js.map +1 -1
- package/dist/index44.js +19 -230
- package/dist/index44.js.map +1 -1
- package/dist/index45.js +138 -18
- package/dist/index45.js.map +1 -1
- package/dist/index46.js +170 -125
- package/dist/index46.js.map +1 -1
- package/dist/index47.js +64 -174
- package/dist/index47.js.map +1 -1
- package/dist/index48.js +88 -74
- package/dist/index48.js.map +1 -1
- package/dist/index49.js +5 -90
- package/dist/index49.js.map +1 -1
- package/dist/index5.js +1 -1
- package/dist/index50.js +843 -5
- package/dist/index50.js.map +1 -1
- package/dist/index51.js +54 -832
- package/dist/index51.js.map +1 -1
- package/dist/index52.js +37 -66
- package/dist/index52.js.map +1 -1
- package/dist/index55.js +1 -1
- package/dist/index56.js +1 -1
- package/dist/index57.js +2 -2
- package/dist/index59.js +1 -1
- package/dist/index64.js +2 -2
- package/dist/index65.js +1 -1
- package/dist/index66.js +1 -1
- package/dist/index68.js +1 -1
- package/dist/index70.js +5 -5
- package/dist/index71.js +1 -1
- package/dist/index72.js +1 -1
- package/dist/index76.js +1 -1
- package/dist/index78.js +3 -3
- package/dist/index79.js +53 -5
- package/dist/index79.js.map +1 -1
- package/dist/index8.js +1 -1
- package/dist/index80.js +2 -8
- package/dist/index80.js.map +1 -1
- package/dist/index81.js +2 -6
- package/dist/index81.js.map +1 -1
- package/dist/index82.js +5 -53
- package/dist/index82.js.map +1 -1
- package/dist/index83.js +8 -2
- package/dist/index83.js.map +1 -1
- package/dist/index84.js +6 -2
- package/dist/index84.js.map +1 -1
- package/dist/index9.js +1 -1
- package/package.json +1 -1
package/dist/index273.js
CHANGED
|
@@ -1,52 +1,101 @@
|
|
|
1
|
-
import { DIRECTION as
|
|
2
|
-
class
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
get
|
|
24
|
-
return this.
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
1
|
+
import { DIRECTION as s } from "./index269.js";
|
|
2
|
+
class f {
|
|
3
|
+
constructor(t, e) {
|
|
4
|
+
this.masked = t, this._log = [];
|
|
5
|
+
const {
|
|
6
|
+
offset: i,
|
|
7
|
+
index: h
|
|
8
|
+
} = t._mapPosToBlock(e) || (e < 0 ? (
|
|
9
|
+
// first
|
|
10
|
+
{
|
|
11
|
+
index: 0,
|
|
12
|
+
offset: 0
|
|
13
|
+
}
|
|
14
|
+
) : (
|
|
15
|
+
// last
|
|
16
|
+
{
|
|
17
|
+
index: this.masked._blocks.length,
|
|
18
|
+
offset: 0
|
|
19
|
+
}
|
|
20
|
+
));
|
|
21
|
+
this.offset = i, this.index = h, this.ok = !1;
|
|
22
|
+
}
|
|
23
|
+
get block() {
|
|
24
|
+
return this.masked._blocks[this.index];
|
|
25
|
+
}
|
|
26
|
+
get pos() {
|
|
27
|
+
return this.masked._blockStartPos(this.index) + this.offset;
|
|
28
|
+
}
|
|
29
|
+
get state() {
|
|
30
|
+
return {
|
|
31
|
+
index: this.index,
|
|
32
|
+
offset: this.offset,
|
|
33
|
+
ok: this.ok
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
set state(t) {
|
|
37
|
+
Object.assign(this, t);
|
|
38
|
+
}
|
|
39
|
+
pushState() {
|
|
40
|
+
this._log.push(this.state);
|
|
41
|
+
}
|
|
42
|
+
popState() {
|
|
43
|
+
const t = this._log.pop();
|
|
44
|
+
return t && (this.state = t), t;
|
|
45
|
+
}
|
|
46
|
+
bindBlock() {
|
|
47
|
+
this.block || (this.index < 0 && (this.index = 0, this.offset = 0), this.index >= this.masked._blocks.length && (this.index = this.masked._blocks.length - 1, this.offset = this.block.displayValue.length));
|
|
48
|
+
}
|
|
49
|
+
_pushLeft(t) {
|
|
50
|
+
for (this.pushState(), this.bindBlock(); 0 <= this.index; --this.index, this.offset = ((e = this.block) == null ? void 0 : e.displayValue.length) || 0) {
|
|
51
|
+
var e;
|
|
52
|
+
if (t()) return this.ok = !0;
|
|
53
|
+
}
|
|
54
|
+
return this.ok = !1;
|
|
55
|
+
}
|
|
56
|
+
_pushRight(t) {
|
|
57
|
+
for (this.pushState(), this.bindBlock(); this.index < this.masked._blocks.length; ++this.index, this.offset = 0)
|
|
58
|
+
if (t()) return this.ok = !0;
|
|
59
|
+
return this.ok = !1;
|
|
60
|
+
}
|
|
61
|
+
pushLeftBeforeFilled() {
|
|
62
|
+
return this._pushLeft(() => {
|
|
63
|
+
if (!(this.block.isFixed || !this.block.value) && (this.offset = this.block.nearestInputPos(this.offset, s.FORCE_LEFT), this.offset !== 0))
|
|
64
|
+
return !0;
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
pushLeftBeforeInput() {
|
|
68
|
+
return this._pushLeft(() => {
|
|
69
|
+
if (!this.block.isFixed)
|
|
70
|
+
return this.offset = this.block.nearestInputPos(this.offset, s.LEFT), !0;
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
pushLeftBeforeRequired() {
|
|
74
|
+
return this._pushLeft(() => {
|
|
75
|
+
if (!(this.block.isFixed || this.block.isOptional && !this.block.value))
|
|
76
|
+
return this.offset = this.block.nearestInputPos(this.offset, s.LEFT), !0;
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
pushRightBeforeFilled() {
|
|
80
|
+
return this._pushRight(() => {
|
|
81
|
+
if (!(this.block.isFixed || !this.block.value) && (this.offset = this.block.nearestInputPos(this.offset, s.FORCE_RIGHT), this.offset !== this.block.value.length))
|
|
82
|
+
return !0;
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
pushRightBeforeInput() {
|
|
86
|
+
return this._pushRight(() => {
|
|
87
|
+
if (!this.block.isFixed)
|
|
88
|
+
return this.offset = this.block.nearestInputPos(this.offset, s.NONE), !0;
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
pushRightBeforeRequired() {
|
|
92
|
+
return this._pushRight(() => {
|
|
93
|
+
if (!(this.block.isFixed || this.block.isOptional && !this.block.value))
|
|
94
|
+
return this.offset = this.block.nearestInputPos(this.offset, s.NONE), !0;
|
|
95
|
+
});
|
|
47
96
|
}
|
|
48
97
|
}
|
|
49
98
|
export {
|
|
50
|
-
|
|
99
|
+
f as default
|
|
51
100
|
};
|
|
52
101
|
//# sourceMappingURL=index273.js.map
|
package/dist/index273.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index273.js","sources":["../../../node_modules/imask/esm/
|
|
1
|
+
{"version":3,"file":"index273.js","sources":["../../../node_modules/imask/esm/masked/pattern/cursor.js"],"sourcesContent":["import { DIRECTION } from '../../core/utils.js';\n\nclass PatternCursor {\n constructor(masked, pos) {\n this.masked = masked;\n this._log = [];\n const {\n offset,\n index\n } = masked._mapPosToBlock(pos) || (pos < 0 ?\n // first\n {\n index: 0,\n offset: 0\n } :\n // last\n {\n index: this.masked._blocks.length,\n offset: 0\n });\n this.offset = offset;\n this.index = index;\n this.ok = false;\n }\n get block() {\n return this.masked._blocks[this.index];\n }\n get pos() {\n return this.masked._blockStartPos(this.index) + this.offset;\n }\n get state() {\n return {\n index: this.index,\n offset: this.offset,\n ok: this.ok\n };\n }\n set state(s) {\n Object.assign(this, s);\n }\n pushState() {\n this._log.push(this.state);\n }\n popState() {\n const s = this._log.pop();\n if (s) this.state = s;\n return s;\n }\n bindBlock() {\n if (this.block) return;\n if (this.index < 0) {\n this.index = 0;\n this.offset = 0;\n }\n if (this.index >= this.masked._blocks.length) {\n this.index = this.masked._blocks.length - 1;\n this.offset = this.block.displayValue.length; // TODO this is stupid type error, `block` depends on index that was changed above\n }\n }\n _pushLeft(fn) {\n this.pushState();\n for (this.bindBlock(); 0 <= this.index; --this.index, this.offset = ((_this$block = this.block) == null ? void 0 : _this$block.displayValue.length) || 0) {\n var _this$block;\n if (fn()) return this.ok = true;\n }\n return this.ok = false;\n }\n _pushRight(fn) {\n this.pushState();\n for (this.bindBlock(); this.index < this.masked._blocks.length; ++this.index, this.offset = 0) {\n if (fn()) return this.ok = true;\n }\n return this.ok = false;\n }\n pushLeftBeforeFilled() {\n return this._pushLeft(() => {\n if (this.block.isFixed || !this.block.value) return;\n this.offset = this.block.nearestInputPos(this.offset, DIRECTION.FORCE_LEFT);\n if (this.offset !== 0) return true;\n });\n }\n pushLeftBeforeInput() {\n // cases:\n // filled input: 00|\n // optional empty input: 00[]|\n // nested block: XX<[]>|\n return this._pushLeft(() => {\n if (this.block.isFixed) return;\n this.offset = this.block.nearestInputPos(this.offset, DIRECTION.LEFT);\n return true;\n });\n }\n pushLeftBeforeRequired() {\n return this._pushLeft(() => {\n if (this.block.isFixed || this.block.isOptional && !this.block.value) return;\n this.offset = this.block.nearestInputPos(this.offset, DIRECTION.LEFT);\n return true;\n });\n }\n pushRightBeforeFilled() {\n return this._pushRight(() => {\n if (this.block.isFixed || !this.block.value) return;\n this.offset = this.block.nearestInputPos(this.offset, DIRECTION.FORCE_RIGHT);\n if (this.offset !== this.block.value.length) return true;\n });\n }\n pushRightBeforeInput() {\n return this._pushRight(() => {\n if (this.block.isFixed) return;\n\n // const o = this.offset;\n this.offset = this.block.nearestInputPos(this.offset, DIRECTION.NONE);\n // HACK cases like (STILL DOES NOT WORK FOR NESTED)\n // aa|X\n // aa<X|[]>X_ - this will not work\n // if (o && o === this.offset && this.block instanceof PatternInputDefinition) continue;\n return true;\n });\n }\n pushRightBeforeRequired() {\n return this._pushRight(() => {\n if (this.block.isFixed || this.block.isOptional && !this.block.value) return;\n\n // TODO check |[*]XX_\n this.offset = this.block.nearestInputPos(this.offset, DIRECTION.NONE);\n return true;\n });\n }\n}\n\nexport { PatternCursor as default };\n"],"names":["PatternCursor","masked","pos","offset","index","s","fn","_this$block","DIRECTION"],"mappings":";AAEA,MAAMA,EAAc;AAAA,EAClB,YAAYC,GAAQC,GAAK;AACvB,SAAK,SAASD,GACd,KAAK,OAAO,CAAA;AACZ,UAAM;AAAA,MACJ,QAAAE;AAAA,MACA,OAAAC;AAAA,IACN,IAAQH,EAAO,eAAeC,CAAG,MAAMA,IAAM;AAAA;AAAA,MAEzC;AAAA,QACE,OAAO;AAAA,QACP,QAAQ;AAAA,MACd;AAAA;AAAA;AAAA,MAEI;AAAA,QACE,OAAO,KAAK,OAAO,QAAQ;AAAA,QAC3B,QAAQ;AAAA,MACd;AAAA;AACI,SAAK,SAASC,GACd,KAAK,QAAQC,GACb,KAAK,KAAK;AAAA,EACZ;AAAA,EACA,IAAI,QAAQ;AACV,WAAO,KAAK,OAAO,QAAQ,KAAK,KAAK;AAAA,EACvC;AAAA,EACA,IAAI,MAAM;AACR,WAAO,KAAK,OAAO,eAAe,KAAK,KAAK,IAAI,KAAK;AAAA,EACvD;AAAA,EACA,IAAI,QAAQ;AACV,WAAO;AAAA,MACL,OAAO,KAAK;AAAA,MACZ,QAAQ,KAAK;AAAA,MACb,IAAI,KAAK;AAAA,IACf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UAAU,MAAM;AAC1B,UAAI,MAAK,MAAM;AACf,oBAAK,SAAS,KAAK,MAAM,gBAAgB,KAAK,QAAQA,EAAU,IAAI,GAC7D;AAAA,IACT,CAAC;AAAA,EACH;AAAA,EACA,yBAAyB;AACvB,WAAO,KAAK,UAAU,MAAM;AAC1B,UAAI,OAAK,MAAM,WAAW,KAAK,MAAM,cAAc,CAAC,KAAK,MAAM;AAC/D,oBAAK,SAAS,KAAK,MAAM,gBAAgB,KAAK,QAAQA,EAAU,IAAI,GAC7D;AAAA,IACT,CAAC;AAAA,EACH;AAAA,EACA,wBAAwB;AACtB,WAAO,KAAK,WAAW,MAAM;AAC3B,UAAI,OAAK,MAAM,WAAW,CAAC,KAAK,MAAM,WACtC,KAAK,SAAS,KAAK,MAAM,gBAAgB,KAAK,QAAQA,EAAU,WAAW,GACvE,KAAK,WAAW,KAAK,MAAM,MAAM;AAAQ,eAAO;AAAA,IACtD,CAAC;AAAA,EACH;AAAA,EACA,uBAAuB;AACrB,WAAO,KAAK,WAAW,MAAM;AAC3B,UAAI,MAAK,MAAM;AAGf,oBAAK,SAAS,KAAK,MAAM,gBAAgB,KAAK,QAAQA,EAAU,IAAI,GAK7D;AAAA,IACT,CAAC;AAAA,EACH;AAAA,EACA,0BAA0B;AACxB,WAAO,KAAK,WAAW,MAAM;AAC3B,UAAI,OAAK,MAAM,WAAW,KAAK,MAAM,cAAc,CAAC,KAAK,MAAM;AAG/D,oBAAK,SAAS,KAAK,MAAM,gBAAgB,KAAK,QAAQA,EAAU,IAAI,GAC7D;AAAA,IACT,CAAC;AAAA,EACH;AACF;","x_google_ignoreList":[0]}
|
package/dist/index274.js
CHANGED
|
@@ -1,43 +1,103 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import n from "./index157.js";
|
|
2
|
+
import { DIRECTION as a, isString as l } from "./index269.js";
|
|
3
|
+
import u from "./index271.js";
|
|
4
|
+
class c {
|
|
5
|
+
/** */
|
|
6
|
+
/** */
|
|
7
|
+
/** */
|
|
8
|
+
/** */
|
|
9
|
+
/** */
|
|
10
|
+
/** */
|
|
11
|
+
constructor(e) {
|
|
12
|
+
Object.assign(this, e), this._value = "", this.isFixed = !0;
|
|
13
|
+
}
|
|
14
|
+
get value() {
|
|
15
|
+
return this._value;
|
|
16
|
+
}
|
|
17
|
+
get unmaskedValue() {
|
|
18
|
+
return this.isUnmasking ? this.value : "";
|
|
19
|
+
}
|
|
20
|
+
get rawInputValue() {
|
|
21
|
+
return this._isRawInput ? this.value : "";
|
|
22
|
+
}
|
|
23
|
+
get displayValue() {
|
|
9
24
|
return this.value;
|
|
10
25
|
}
|
|
11
|
-
|
|
12
|
-
this.
|
|
26
|
+
reset() {
|
|
27
|
+
this._isRawInput = !1, this._value = "";
|
|
28
|
+
}
|
|
29
|
+
remove(e, t) {
|
|
30
|
+
return e === void 0 && (e = 0), t === void 0 && (t = this._value.length), this._value = this._value.slice(0, e) + this._value.slice(t), this._value || (this._isRawInput = !1), new n();
|
|
31
|
+
}
|
|
32
|
+
nearestInputPos(e, t) {
|
|
33
|
+
t === void 0 && (t = a.NONE);
|
|
34
|
+
const i = 0, s = this._value.length;
|
|
35
|
+
switch (t) {
|
|
36
|
+
case a.LEFT:
|
|
37
|
+
case a.FORCE_LEFT:
|
|
38
|
+
return i;
|
|
39
|
+
case a.NONE:
|
|
40
|
+
case a.RIGHT:
|
|
41
|
+
case a.FORCE_RIGHT:
|
|
42
|
+
default:
|
|
43
|
+
return s;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
totalInputPositions(e, t) {
|
|
47
|
+
return e === void 0 && (e = 0), t === void 0 && (t = this._value.length), this._isRawInput ? t - e : 0;
|
|
48
|
+
}
|
|
49
|
+
extractInput(e, t, i) {
|
|
50
|
+
return e === void 0 && (e = 0), t === void 0 && (t = this._value.length), i === void 0 && (i = {}), i.raw && this._isRawInput && this._value.slice(e, t) || "";
|
|
51
|
+
}
|
|
52
|
+
get isComplete() {
|
|
53
|
+
return !0;
|
|
13
54
|
}
|
|
14
|
-
|
|
15
|
-
return
|
|
55
|
+
get isFilled() {
|
|
56
|
+
return !!this._value;
|
|
57
|
+
}
|
|
58
|
+
_appendChar(e, t) {
|
|
59
|
+
if (t === void 0 && (t = {}), this.isFilled) return new n();
|
|
60
|
+
const i = this.eager === !0 || this.eager === "append", r = this.char === e && (this.isUnmasking || t.input || t.raw) && (!t.raw || !i) && !t.tail, h = new n({
|
|
61
|
+
inserted: this.char,
|
|
62
|
+
rawInserted: r ? this.char : ""
|
|
63
|
+
});
|
|
64
|
+
return this._value = this.char, this._isRawInput = r && (t.raw || t.input), h;
|
|
65
|
+
}
|
|
66
|
+
_appendEager() {
|
|
67
|
+
return this._appendChar(this.char, {
|
|
16
68
|
tail: !0
|
|
17
|
-
})
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
_appendPlaceholder() {
|
|
72
|
+
const e = new n();
|
|
73
|
+
return this.isFilled || (this._value = e.inserted = this.char), e;
|
|
74
|
+
}
|
|
75
|
+
extractTail() {
|
|
76
|
+
return new u("");
|
|
77
|
+
}
|
|
78
|
+
appendTail(e) {
|
|
79
|
+
return l(e) && (e = new u(String(e))), e.appendTo(this);
|
|
80
|
+
}
|
|
81
|
+
append(e, t, i) {
|
|
82
|
+
const s = this._appendChar(e[0], t);
|
|
83
|
+
return i != null && (s.tailShift += this.appendTail(i).tailShift), s;
|
|
84
|
+
}
|
|
85
|
+
doCommit() {
|
|
18
86
|
}
|
|
19
87
|
get state() {
|
|
20
88
|
return {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
stop: this.stop
|
|
89
|
+
_value: this._value,
|
|
90
|
+
_rawInputValue: this.rawInputValue
|
|
24
91
|
};
|
|
25
92
|
}
|
|
26
|
-
set state(
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
unshift(t) {
|
|
30
|
-
if (!this.value.length || t != null && this.from >= t) return "";
|
|
31
|
-
const i = this.value[0];
|
|
32
|
-
return this.value = this.value.slice(1), i;
|
|
93
|
+
set state(e) {
|
|
94
|
+
this._value = e._value, this._isRawInput = !!e._rawInputValue;
|
|
33
95
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
const t = this.value[this.value.length - 1];
|
|
37
|
-
return this.value = this.value.slice(0, -1), t;
|
|
96
|
+
pad(e) {
|
|
97
|
+
return this._appendPlaceholder();
|
|
38
98
|
}
|
|
39
99
|
}
|
|
40
100
|
export {
|
|
41
|
-
|
|
101
|
+
c as default
|
|
42
102
|
};
|
|
43
103
|
//# sourceMappingURL=index274.js.map
|
package/dist/index274.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index274.js","sources":["../../../node_modules/imask/esm/
|
|
1
|
+
{"version":3,"file":"index274.js","sources":["../../../node_modules/imask/esm/masked/pattern/fixed-definition.js"],"sourcesContent":["import ChangeDetails from '../../core/change-details.js';\nimport { DIRECTION, isString } from '../../core/utils.js';\nimport ContinuousTailDetails from '../../core/continuous-tail-details.js';\nimport '../../core/holder.js';\n\nclass PatternFixedDefinition {\n /** */\n\n /** */\n\n /** */\n\n /** */\n\n /** */\n\n /** */\n\n constructor(opts) {\n Object.assign(this, opts);\n this._value = '';\n this.isFixed = true;\n }\n get value() {\n return this._value;\n }\n get unmaskedValue() {\n return this.isUnmasking ? this.value : '';\n }\n get rawInputValue() {\n return this._isRawInput ? this.value : '';\n }\n get displayValue() {\n return this.value;\n }\n reset() {\n this._isRawInput = false;\n this._value = '';\n }\n remove(fromPos, toPos) {\n if (fromPos === void 0) {\n fromPos = 0;\n }\n if (toPos === void 0) {\n toPos = this._value.length;\n }\n this._value = this._value.slice(0, fromPos) + this._value.slice(toPos);\n if (!this._value) this._isRawInput = false;\n return new ChangeDetails();\n }\n nearestInputPos(cursorPos, direction) {\n if (direction === void 0) {\n direction = DIRECTION.NONE;\n }\n const minPos = 0;\n const maxPos = this._value.length;\n switch (direction) {\n case DIRECTION.LEFT:\n case DIRECTION.FORCE_LEFT:\n return minPos;\n case DIRECTION.NONE:\n case DIRECTION.RIGHT:\n case DIRECTION.FORCE_RIGHT:\n default:\n return maxPos;\n }\n }\n totalInputPositions(fromPos, toPos) {\n if (fromPos === void 0) {\n fromPos = 0;\n }\n if (toPos === void 0) {\n toPos = this._value.length;\n }\n return this._isRawInput ? toPos - fromPos : 0;\n }\n extractInput(fromPos, toPos, flags) {\n if (fromPos === void 0) {\n fromPos = 0;\n }\n if (toPos === void 0) {\n toPos = this._value.length;\n }\n if (flags === void 0) {\n flags = {};\n }\n return flags.raw && this._isRawInput && this._value.slice(fromPos, toPos) || '';\n }\n get isComplete() {\n return true;\n }\n get isFilled() {\n return Boolean(this._value);\n }\n _appendChar(ch, flags) {\n if (flags === void 0) {\n flags = {};\n }\n if (this.isFilled) return new ChangeDetails();\n const appendEager = this.eager === true || this.eager === 'append';\n const appended = this.char === ch;\n const isResolved = appended && (this.isUnmasking || flags.input || flags.raw) && (!flags.raw || !appendEager) && !flags.tail;\n const details = new ChangeDetails({\n inserted: this.char,\n rawInserted: isResolved ? this.char : ''\n });\n this._value = this.char;\n this._isRawInput = isResolved && (flags.raw || flags.input);\n return details;\n }\n _appendEager() {\n return this._appendChar(this.char, {\n tail: true\n });\n }\n _appendPlaceholder() {\n const details = new ChangeDetails();\n if (this.isFilled) return details;\n this._value = details.inserted = this.char;\n return details;\n }\n extractTail() {\n return new ContinuousTailDetails('');\n }\n appendTail(tail) {\n if (isString(tail)) tail = new ContinuousTailDetails(String(tail));\n return tail.appendTo(this);\n }\n append(str, flags, tail) {\n const details = this._appendChar(str[0], flags);\n if (tail != null) {\n details.tailShift += this.appendTail(tail).tailShift;\n }\n return details;\n }\n doCommit() {}\n get state() {\n return {\n _value: this._value,\n _rawInputValue: this.rawInputValue\n };\n }\n set state(state) {\n this._value = state._value;\n this._isRawInput = Boolean(state._rawInputValue);\n }\n pad(flags) {\n return this._appendPlaceholder();\n }\n}\n\nexport { PatternFixedDefinition as default };\n"],"names":["PatternFixedDefinition","opts","fromPos","toPos","ChangeDetails","cursorPos","direction","DIRECTION","minPos","maxPos","flags","ch","appendEager","isResolved","details","ContinuousTailDetails","tail","isString","str","state"],"mappings":";;;AAKA,MAAMA,EAAuB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAa3B,YAAYC,GAAM;AAChB,WAAO,OAAO,MAAMA,CAAI,GACxB,KAAK,SAAS,IACd,KAAK,UAAU;AAAA,EACjB;AAAA,EACA,IAAI,QAAQ;AACV,WAAO,KAAK;AAAA,EACd;AAAA,EACA,IAAI,gBAAgB;AAClB,WAAO,KAAK,cAAc,KAAK,QAAQ;AAAA,EACzC;AAAA,EACA,IAAI,gBAAgB;AAClB,WAAO,KAAK,cAAc,KAAK,QAAQ;AAAA,EACzC;AAAA,EACA,IAAI,eAAe;AACjB,WAAO,KAAK;AAAA,EACd;AAAA,EACA,QAAQ;AACN,SAAK,cAAc,IACnB,KAAK,SAAS;AAAA,EAChB;AAAA,EACA,OAAOC,GAASC,GAAO;AACrB,WAAID,MAAY,WACdA,IAAU,IAERC,MAAU,WACZA,IAAQ,KAAK,OAAO,SAEtB,KAAK,SAAS,KAAK,OAAO,MAAM,GAAGD,CAAO,IAAI,KAAK,OAAO,MAAMC,CAAK,GAChE,KAAK,WAAQ,KAAK,cAAc,KAC9B,IAAIC,EAAa;AAAA,EAC1B;AAAA,EACA,gBAAgBC,GAAWC,GAAW;AACpC,IAAIA,MAAc,WAChBA,IAAYC,EAAU;AAExB,UAAMC,IAAS,GACTC,IAAS,KAAK,OAAO;AAC3B,YAAQH,GAAS;AAAA,MACf,KAAKC,EAAU;AAAA,MACf,KAAKA,EAAU;AACb,eAAOC;AAAA,MACT,KAAKD,EAAU;AAAA,MACf,KAAKA,EAAU;AAAA,MACf,KAAKA,EAAU;AAAA,MACf;AACE,eAAOE;AAAA,IACf;AAAA,EACE;AAAA,EACA,oBAAoBP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AAIC,EAASD,CAAI,MAAGA,IAAO,IAAID,EAAsB,OAAOC,CAAI,CAAC,IAC1DA,EAAK,SAAS,IAAI;AAAA,EAC3B;AAAA,EACA,OAAOE,GAAKR,GAAOM,GAAM;AACvB,UAAMF,IAAU,KAAK,YAAYI,EAAI,CAAC,GAAGR,CAAK;AAC9C,WAAIM,KAAQ,SACVF,EAAQ,aAAa,KAAK,WAAWE,CAAI,EAAE,YAEtCF;AAAA,EACT;AAAA,EACA,WAAW;AAAA,EAAC;AAAA,EACZ,IAAI,QAAQ;AACV,WAAO;AAAA,MACL,QAAQ,KAAK;AAAA,MACb,gBAAgB,KAAK;AAAA,IAC3B;AAAA,EACE;AAAA,EACA,IAAI,MAAMK,GAAO;AACf,SAAK,SAASA,EAAM,QACpB,KAAK,cAAc,EAAQA,EAAM;AAAA,EACnC;AAAA,EACA,IAAIT,GAAO;AACT,WAAO,KAAK,mBAAkB;AAAA,EAChC;AACF;","x_google_ignoreList":[0]}
|
package/dist/index275.js
CHANGED
|
@@ -1,104 +1,33 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
if (
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
30
|
-
appendTo(t) {
|
|
31
|
-
if (!(t instanceof u.MaskedPattern))
|
|
32
|
-
return new c(this.toString()).appendTo(t);
|
|
33
|
-
const s = new p();
|
|
34
|
-
for (let n = 0; n < this.chunks.length; ++n) {
|
|
35
|
-
const e = this.chunks[n], i = t._mapPosToBlock(t.displayValue.length), o = e.stop;
|
|
36
|
-
let h;
|
|
37
|
-
if (o != null && // if block not found or stop is behind lastBlock
|
|
38
|
-
(!i || i.index <= o) && ((e instanceof r || // for continuous block also check if stop is exist
|
|
39
|
-
t._stops.indexOf(o) >= 0) && s.aggregate(t._appendPlaceholder(o)), h = e instanceof r && t._blocks[o]), h) {
|
|
40
|
-
const f = h.appendTail(e);
|
|
41
|
-
s.aggregate(f);
|
|
42
|
-
const l = e.toString().slice(f.rawInserted.length);
|
|
43
|
-
l && s.aggregate(t.append(l, {
|
|
44
|
-
tail: !0
|
|
45
|
-
}));
|
|
46
|
-
} else
|
|
47
|
-
s.aggregate(t.append(e.toString(), {
|
|
48
|
-
tail: !0
|
|
49
|
-
}));
|
|
50
|
-
}
|
|
51
|
-
return s;
|
|
52
|
-
}
|
|
53
|
-
get state() {
|
|
54
|
-
return {
|
|
55
|
-
chunks: this.chunks.map((t) => t.state),
|
|
56
|
-
from: this.from,
|
|
57
|
-
stop: this.stop,
|
|
58
|
-
blockIndex: this.blockIndex
|
|
59
|
-
};
|
|
60
|
-
}
|
|
61
|
-
set state(t) {
|
|
62
|
-
const {
|
|
63
|
-
chunks: s,
|
|
64
|
-
...n
|
|
65
|
-
} = t;
|
|
66
|
-
Object.assign(this, n), this.chunks = s.map((e) => {
|
|
67
|
-
const i = "chunks" in e ? new r() : new c();
|
|
68
|
-
return i.state = e, i;
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
unshift(t) {
|
|
72
|
-
if (!this.chunks.length || t != null && this.from >= t) return "";
|
|
73
|
-
const s = t != null ? t - this.from : t;
|
|
74
|
-
let n = 0;
|
|
75
|
-
for (; n < this.chunks.length; ) {
|
|
76
|
-
const e = this.chunks[n], i = e.unshift(s);
|
|
77
|
-
if (e.toString()) {
|
|
78
|
-
if (!i) break;
|
|
79
|
-
++n;
|
|
80
|
-
} else
|
|
81
|
-
this.chunks.splice(n, 1);
|
|
82
|
-
if (i) return i;
|
|
83
|
-
}
|
|
84
|
-
return "";
|
|
85
|
-
}
|
|
86
|
-
shift() {
|
|
87
|
-
if (!this.chunks.length) return "";
|
|
88
|
-
let t = this.chunks.length - 1;
|
|
89
|
-
for (; 0 <= t; ) {
|
|
90
|
-
const s = this.chunks[t], n = s.shift();
|
|
91
|
-
if (s.toString()) {
|
|
92
|
-
if (!n) break;
|
|
93
|
-
--t;
|
|
94
|
-
} else
|
|
95
|
-
this.chunks.splice(t, 1);
|
|
96
|
-
if (n) return n;
|
|
97
|
-
}
|
|
98
|
-
return "";
|
|
99
|
-
}
|
|
1
|
+
import { defaultDateLib as D } from "./index112.js";
|
|
2
|
+
function w(f, g, n = 0, s = 0, l = !1, u = D) {
|
|
3
|
+
const { from: o, to: i } = g || {}, { isSameDay: r, isAfter: m, isBefore: c } = u;
|
|
4
|
+
let e;
|
|
5
|
+
if (!o && !i)
|
|
6
|
+
e = { from: f, to: n > 0 ? void 0 : f };
|
|
7
|
+
else if (o && !i)
|
|
8
|
+
r(o, f) ? n === 0 ? e = { from: o, to: f } : l ? e = { from: o, to: void 0 } : e = void 0 : c(f, o) ? e = { from: f, to: o } : e = { from: o, to: f };
|
|
9
|
+
else if (o && i)
|
|
10
|
+
if (r(o, f) && r(i, f))
|
|
11
|
+
l ? e = { from: o, to: i } : e = void 0;
|
|
12
|
+
else if (r(o, f))
|
|
13
|
+
e = { from: o, to: n > 0 ? void 0 : f };
|
|
14
|
+
else if (r(i, f))
|
|
15
|
+
e = { from: f, to: n > 0 ? void 0 : f };
|
|
16
|
+
else if (c(f, o))
|
|
17
|
+
e = { from: f, to: i };
|
|
18
|
+
else if (m(f, o))
|
|
19
|
+
e = { from: o, to: f };
|
|
20
|
+
else if (m(f, i))
|
|
21
|
+
e = { from: o, to: f };
|
|
22
|
+
else
|
|
23
|
+
throw new Error("Invalid range");
|
|
24
|
+
if (e?.from && e?.to) {
|
|
25
|
+
const t = u.differenceInCalendarDays(e.to, e.from);
|
|
26
|
+
s > 0 && t > s ? e = { from: f, to: void 0 } : n > 1 && t < n && (e = { from: f, to: void 0 });
|
|
27
|
+
}
|
|
28
|
+
return e;
|
|
100
29
|
}
|
|
101
30
|
export {
|
|
102
|
-
|
|
31
|
+
w as addToRange
|
|
103
32
|
};
|
|
104
33
|
//# sourceMappingURL=index275.js.map
|
package/dist/index275.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index275.js","sources":["../../../node_modules/
|
|
1
|
+
{"version":3,"file":"index275.js","sources":["../../../node_modules/react-day-picker/dist/esm/utils/addToRange.js"],"sourcesContent":["import { defaultDateLib } from \"../classes/DateLib.js\";\n/**\n * Adds a date to an existing range, considering constraints like minimum and\n * maximum range size.\n *\n * @param date - The date to add to the range.\n * @param initialRange - The initial range to which the date will be added.\n * @param min - The minimum number of days in the range.\n * @param max - The maximum number of days in the range.\n * @param required - Whether the range must always include at least one date.\n * @param dateLib - The date utility library instance.\n * @returns The updated date range, or `undefined` if the range is cleared.\n * @group Utilities\n */\nexport function addToRange(date, initialRange, min = 0, max = 0, required = false, dateLib = defaultDateLib) {\n const { from, to } = initialRange || {};\n const { isSameDay, isAfter, isBefore } = dateLib;\n let range;\n if (!from && !to) {\n // the range is empty, add the date\n range = { from: date, to: min > 0 ? undefined : date };\n }\n else if (from && !to) {\n // adding date to an incomplete range\n if (isSameDay(from, date)) {\n // adding a date equal to the start of the range\n if (min === 0) {\n range = { from, to: date };\n }\n else if (required) {\n range = { from, to: undefined };\n }\n else {\n range = undefined;\n }\n }\n else if (isBefore(date, from)) {\n // adding a date before the start of the range\n range = { from: date, to: from };\n }\n else {\n // adding a date after the start of the range\n range = { from, to: date };\n }\n }\n else if (from && to) {\n // adding date to a complete range\n if (isSameDay(from, date) && isSameDay(to, date)) {\n // adding a date that is equal to both start and end of the range\n if (required) {\n range = { from, to };\n }\n else {\n range = undefined;\n }\n }\n else if (isSameDay(from, date)) {\n // adding a date equal to the the start of the range\n range = { from, to: min > 0 ? undefined : date };\n }\n else if (isSameDay(to, date)) {\n // adding a dare equal to the end of the range\n range = { from: date, to: min > 0 ? undefined : date };\n }\n else if (isBefore(date, from)) {\n // adding a date before the start of the range\n range = { from: date, to: to };\n }\n else if (isAfter(date, from)) {\n // adding a date after the start of the range\n range = { from, to: date };\n }\n else if (isAfter(date, to)) {\n // adding a date after the end of the range\n range = { from, to: date };\n }\n else {\n throw new Error(\"Invalid range\");\n }\n }\n // check for min / max\n if (range?.from && range?.to) {\n const diff = dateLib.differenceInCalendarDays(range.to, range.from);\n if (max > 0 && diff > max) {\n range = { from: date, to: undefined };\n }\n else if (min > 1 && diff < min) {\n range = { from: date, to: undefined };\n }\n }\n return range;\n}\n"],"names":["addToRange","date","initialRange","min","max","required","dateLib","defaultDateLib","from","to","isSameDay","isAfter","isBefore","range","diff"],"mappings":";AAcO,SAASA,EAAWC,GAAMC,GAAcC,IAAM,GAAGC,IAAM,GAAGC,IAAW,IAAOC,IAAUC,GAAgB;AACzG,QAAM,EAAE,MAAAC,GAAM,IAAAC,EAAE,IAAKP,KAAgB,CAAA,GAC/B,EAAE,WAAAQ,GAAW,SAAAC,GAAS,UAAAC,EAAQ,IAAKN;AACzC,MAAIO;AACJ,MAAI,CAACL,KAAQ,CAACC;AAEV,IAAAI,IAAQ,EAAE,MAAMZ,GAAM,IAAIE,IAAM,IAAI,SAAYF,EAAI;AAAA,WAE/CO,KAAQ,CAACC;AAEd,IAAIC,EAAUF,GAAMP,CAAI,IAEhBE,MAAQ,IACRU,IAAQ,EAAE,MAAAL,GAAM,IAAIP,EAAI,IAEnBI,IACLQ,IAAQ,EAAE,MAAAL,GAAM,IAAI,OAAS,IAG7BK,IAAQ,SAGPD,EAASX,GAAMO,CAAI,IAExBK,IAAQ,EAAE,MAAMZ,GAAM,IAAIO,EAAI,IAI9BK,IAAQ,EAAE,MAAAL,GAAM,IAAIP,EAAI;AAAA,WAGvBO,KAAQC;AAEb,QAAIC,EAAUF,GAAMP,CAAI,KAAKS,EAAUD,GAAIR,CAAI;AAE3C,MAAII,IACAQ,IAAQ,EAAE,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