svelte-tel-input 3.1.0 → 3.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.
Files changed (38) hide show
  1. package/LICENSE.md +1 -21
  2. package/README.md +1 -232
  3. package/{assets → dist/assets}/allCountry.d.ts +1 -1
  4. package/dist/assets/index.d.ts +1 -0
  5. package/dist/assets/index.js +1 -0
  6. package/dist/assets/regions.d.ts +1 -0
  7. package/dist/assets/regions.js +43 -0
  8. package/dist/assets/telTypes.d.ts +5 -0
  9. package/dist/assets/telTypes.js +16 -0
  10. package/{components → dist/components}/Input/TelInput.svelte +4 -4
  11. package/{components → dist/components}/Input/TelInput.svelte.d.ts +1 -1
  12. package/dist/index.d.ts +4 -0
  13. package/dist/index.js +4 -0
  14. package/{stores → dist/stores}/index.d.ts +2 -1
  15. package/{utils → dist/utils}/directives/clickOutsideAction.d.ts +1 -1
  16. package/dist/utils/directives/clickOutsideAction.js +18 -0
  17. package/dist/utils/directives/focusAction.d.ts +8 -0
  18. package/dist/utils/directives/focusAction.js +71 -0
  19. package/{utils → dist/utils}/directives/telInputAction.js +1 -1
  20. package/{utils → dist/utils}/helpers.d.ts +1 -1
  21. package/dist/utils/index.d.ts +4 -0
  22. package/dist/utils/index.js +4 -0
  23. package/dist/utils/typeCheck.d.ts +1 -0
  24. package/dist/utils/typeCheck.js +3 -0
  25. package/package.json +85 -35
  26. package/CHANGELOG.md +0 -396
  27. package/assets/index.d.ts +0 -1
  28. package/assets/index.js +0 -1
  29. package/index.d.ts +0 -5
  30. package/index.js +0 -5
  31. package/utils/directives/clickOutsideAction.js +0 -9
  32. /package/{assets → dist/assets}/allCountry.js +0 -0
  33. /package/{assets → dist/assets}/flags_responsive.png +0 -0
  34. /package/{stores → dist/stores}/index.js +0 -0
  35. /package/{styles → dist/styles}/flags.css +0 -0
  36. /package/{types → dist/types}/index.d.ts +0 -0
  37. /package/{utils → dist/utils}/directives/telInputAction.d.ts +0 -0
  38. /package/{utils → dist/utils}/helpers.js +0 -0
package/LICENSE.md CHANGED
@@ -1,21 +1 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2022 - Present Gyorgy Kallai, Budapest, Hungary.
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ ../../LICENSE.md
package/README.md CHANGED
@@ -1,232 +1 @@
1
- <a name="readme-top"></a>
2
-
3
- [![npm version](https://badge.fury.io/js/svelte-tel-input.svg)](https://badge.fury.io/js/svelte-tel-input)
4
-
5
- # Svelte Tel Input
6
-
7
- > Lightweight svelte tel/phone input standardizer.
8
-
9
- <img src="https://raw.githubusercontent.com/gyurielf/svelte-tel-input/main/static/demo.gif" width="600px" align="center">
10
-
11
- 🔥 Check it out live [here](https://svelte-tel-input.vercel.app/)
12
-
13
- ## Installation
14
-
15
- Svelte Tel Input is distributed via [npm](https://www.npmjs.com/package/svelte-tel-input).
16
-
17
- ```bash
18
- npm install --save svelte-tel-input
19
- ```
20
-
21
- ## Features
22
-
23
- - Parse and validate phone number.You can store one exact format (`E164`), no matter how users type their phone numbers.
24
- - Format (specified to its country), to make it more readable.
25
- - Prevent non-digits typing into the input, except the leading `+` sign (and `space` optionally).
26
- - Handle copy-pasted phone numbers, it's sanitize non-digit characters except the leading `+` sign (and `space` optionally).
27
- - Automatic placeholder generation for the selected country.
28
-
29
- ## Usage
30
-
31
- ### Advanced
32
-
33
- _Snippet would be too long_ - [REPL](https://stackblitz.com/edit/svelte-tel-input-repl-1jfaar?file=README.md) (StackBlitz)
34
-
35
- ### Basic
36
-
37
- [REPL](https://stackblitz.com/edit/svelte-tel-input-repl?file=README.md) (StackBlitz)
38
-
39
- ```html
40
- <script lang="ts">
41
- import { TelInput, normalizedCountries } from 'svelte-tel-input';
42
- import type { DetailedValue, CountryCode, E164Number } from 'svelte-tel-input/types';
43
-
44
- // Any Country Code Alpha-2 (ISO 3166)
45
- let selectedCountry: CountryCode | null = 'HU';
46
-
47
- // You must use E164 number format. It's guarantee the parsing and storing consistency.
48
- let value: E164Number | null = '+36301234567';
49
-
50
- // Validity
51
- let valid = true;
52
-
53
- // Optional - Extended details about the parsed phone number
54
- let detailedValue: DetailedValue | null = null;
55
- </script>
56
-
57
- <div class="wrapper">
58
- <select
59
- class="country-select {!valid && 'invalid'}"
60
- aria-label="Default select example"
61
- name="Country"
62
- bind:value={selectedCountry}
63
- >
64
- <option value={null} hidden={selectedCountry !== null}>Please select</option>
65
- {#each normalizedCountries as country (country.id)}
66
- <option
67
- value={country.iso2}
68
- selected={country.iso2 === selectedCountry}
69
- aria-selected={country.iso2 === selectedCountry}
70
- >
71
- {country.iso2} (+{country.dialCode})
72
- </option>
73
- {/each}
74
- </select>
75
- <TelInput bind:country={selectedCountry} bind:value bind:valid bind:detailedValue class="basic-tel-input {!isValid && 'invalid'}" />
76
- </div>
77
-
78
- <style>
79
- .wrapper :global(.basic-tel-input) {
80
- height: 32px;
81
- padding-left: 12px;
82
- padding-right: 12px;
83
- border-radius: 6px;
84
- border: 1px solid;
85
- outline: none;
86
- }
87
-
88
- .wrapper :global(.country-select) {
89
- height: 36px;
90
- padding-left: 12px;
91
- padding-right: 12px;
92
- border-radius: 6px;
93
- border: 1px solid;
94
- outline: none;
95
- }
96
-
97
- .wrapper :global(.invalid) {
98
- border-color: red;
99
- }
100
- </style>
101
- ```
102
-
103
- <p align="right">(<a href="#readme-top">back to top</a>)</p>
104
-
105
- ## Props
106
-
107
- The default export of the library is the main TelInput component. It has the following props:
108
-
109
- | Property name | Type | Default Value | Usage |
110
- | ------------- | ---------------------- | ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
111
- | value | `E164Number \| null` | `null` | [E164](https://en.wikipedia.org/wiki/E.164) is the international format of phone.numbers. This is the main entry point to store and/or load an existent phone number. |
112
- | country | `CountryCode \| null` | `null` | It's accept any Country Code Alpha-2 (ISO 3166). You can set manually (e.g: by the user via a select). The parser will inspect the entered phone number and if it detect a valid country calling code, then it's automatically set the country to according to the detected country calling code. E.g: `+36` -> `HU` |
113
- | disabled | `boolean` | `false` | It's block the parser and prevent entering input. You must handle its styling on your own. |
114
- | valid | `boolean` | `true` | Indicates whether the entered tel number validity. |
115
- | detailedValue | `DetailedValue \|null` | `null` | All of the formatted results of the tel input. |
116
- | class | `string` | `` | You can pass down any classname to the component |
117
- | required | `boolean \| null` | `null` | Set the required attribute on the input element |
118
- | options | `TelInputOptions` | check below | Allow or disallow spaces in the input field |
119
-
120
- Config options:
121
-
122
- ```javascript
123
- {
124
- // Generates country specific placeholder for the selected country.
125
- autoPlaceholder: true,
126
- // Allow or disallow spaces in the input field
127
- spaces: true,
128
- // If you have a parsed phone number and you change country manually from outside, then it's set the `valid` prop to false.
129
- invalidateOnCountryChange: false
130
- }
131
- ```
132
-
133
- <p align="right">(<a href="#readme-top">back to top</a>)</p>
134
-
135
- ## Dispatched Events
136
-
137
- The default export of the library is the main TelInput component. It has the following props:
138
-
139
- | Event name | Type |
140
- | ------------------- | ---------------------- |
141
- | updateValue | `E164Number \| null` |
142
- | updateDetailedValue | `DetailedValue \|null` |
143
- | updateCountry | `CountryCode \| null` |
144
- | updateValid | `boolean` |
145
- | parseError | `string` |
146
-
147
- ## Use case of the event driven behavior
148
-
149
- ```typescript
150
- <script lang="ts">
151
- // Imports, etc....
152
- let value: E164Number | null = null;
153
- const yourHandler = (e: CustomEvent<E164Number | null>) => {
154
- value = e.detail //
155
- // do stuff...
156
- };
157
- </script>
158
-
159
- <TelInput value={cachedValue ?? value} on:updateValue={yourHandler} ... />
160
- ```
161
-
162
- <p align="right">(<a href="#readme-top">back to top</a>)</p>
163
-
164
- ## Caveats
165
-
166
- - In order to reset `value` and/or `country` from outside (you must pass (or set if you binded) `null` for the property) have some side-effects:
167
-
168
- - Reseting the `value` will set (keep the `country` as is):
169
- - `detailedValue` to `null`
170
- - dispatch `updateDetailedValue` event
171
- - Reseting the `country` will set:
172
- - `value` to `null`
173
- - `detailedValue` to `null`
174
- - `valid` to `true` if `invalidateOnCountryChange` config option is false (_@default false_). Otherwise it will be `false`.
175
- - and dispatch `updateValid`, `updateValue` `updateDetailedValue` events
176
- - Reseting both `value` and `country` will set:
177
- - `valid` to `true`
178
- - `detailedValue` to `null`;
179
-
180
- - Let's assume you pass a `US` `E164` number, which can be a partial `E164`, but long enough to determine the country and you pass `DE` country directly. The country will be updated to `US`, which is determined from the `E164` in this example. If the `E164` is not long enough to determine its country, then the country will stay what you passed to the component (`DE`).
181
-
182
- <p align="right">(<a href="#readme-top">back to top</a>)</p>
183
-
184
- ## Goals
185
-
186
- - Solve the problem that a users can enter the same phone number in different formats.
187
- - Storing a phone number in a standard format, that can be indexable and searchable in any database.
188
- - Should be accessible for the the browser. Eg. for a `<a href="tel+36201234567 />`.
189
- - The stored phone number format can be useable for any SMS gateway(e.g for 2FA) and if somebody can call the number from anywhere, it should work.
190
-
191
- ## Dependencies
192
-
193
- [svelte](https://svelte.dev/)
194
-
195
- [libphonenumber-js](https://gitlab.com/catamphetamine/libphonenumber-js)
196
-
197
- <p align="right">(<a href="#readme-top">back to top</a>)</p>
198
-
199
- ## Changelog
200
-
201
- | Package | Changelog |
202
- | ------------------------------ | ------------------------- |
203
- | [@gyurielf/svelte-tel-input]() | [Changelog](CHANGELOG.md) |
204
-
205
- <p align="right">(<a href="#readme-top">back to top</a>)</p>
206
-
207
- ## Roadmap
208
-
209
- - [x] Add Changelog
210
- - [x] Add CI/CD
211
- - [x] Integrate libphonenumber
212
- - [x] Implement parser
213
- - [x] Add basics docs and examples
214
- - [x] Add advanced examples
215
- - [x] Generate placeholders autimatically
216
- - [ ] Improve A11Y
217
-
218
- See the [open issues](https://github.com/gyurielf/svelte-tel-input/issues) for a list of proposed features (and known issues).
219
-
220
- <p align="right">(<a href="#readme-top">back to top</a>)</p>
221
-
222
- ## Support
223
-
224
- <a href="https://www.buymeacoffee.com/gyurielf" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" style="height: 60px !important;width: 217px !important;" ></a>
225
-
226
- <p align="right">(<a href="#readme-top">back to top</a>)</p>
227
-
228
- ## License
229
-
230
- Distributed under the MIT License. See `LICENSE.md` for more information.
231
-
232
- <p align="right">(<a href="#readme-top">back to top</a>)</p>
1
+ ../../README.md
@@ -1,2 +1,2 @@
1
- import type { Country } from '../types';
1
+ import type { Country } from '../types/index.js';
2
2
  export declare const normalizedCountries: Country[];
@@ -0,0 +1 @@
1
+ export { normalizedCountries } from './allCountry.js';
@@ -0,0 +1 @@
1
+ export { normalizedCountries } from './allCountry.js';
@@ -0,0 +1 @@
1
+ export declare const rawRegions: (string | number | string[])[][];
@@ -0,0 +1,43 @@
1
+ // Country model:
2
+ // [
3
+ // Country name,
4
+ // Regions,
5
+ // iso2 code,
6
+ // International dial code,
7
+ // Format (if available),
8
+ // Order priority (if >1 country with same dial code),
9
+ // Area codes (if >1 country with same dial code)
10
+ // ]
11
+ //
12
+ // Regions:
13
+ // ['america', 'europe', 'asia', 'oceania', 'africa']
14
+ //
15
+ // Sub-regions:
16
+ // ['north-america', 'south-america', 'central-america', 'carribean',
17
+ // 'eu-union', 'ex-ussr', 'ex-yugos', 'baltic', 'middle-east', 'north-africa']
18
+ export const rawRegions = [
19
+ ['American Samoa', ['oceania'], 'as', '1684'],
20
+ ['Anguilla', ['america', 'carribean'], 'ai', '1264'],
21
+ ['Bermuda', ['america', 'north-america'], 'bm', '1441'],
22
+ ['British Virgin Islands', ['america', 'carribean'], 'vg', '1284'],
23
+ ['Cayman Islands', ['america', 'carribean'], 'ky', '1345'],
24
+ ['Cook Islands', ['oceania'], 'ck', '682'],
25
+ ['Falkland Islands', ['america', 'south-america'], 'fk', '500'],
26
+ ['Faroe Islands', ['europe'], 'fo', '298'],
27
+ ['Gibraltar', ['europe'], 'gi', '350'],
28
+ ['Greenland', ['america'], 'gl', '299'],
29
+ ['Jersey', ['europe', 'eu-union'], 'je', '44', '.... ......'],
30
+ ['Montserrat', ['america', 'carribean'], 'ms', '1664'],
31
+ ['Niue', ['asia'], 'nu', '683'],
32
+ ['Norfolk Island', ['oceania'], 'nf', '672'],
33
+ ['Northern Mariana Islands', ['oceania'], 'mp', '1670'],
34
+ ['Saint Barthélemy', ['america', 'carribean'], 'bl', '590', '', 1],
35
+ ['Saint Helena', ['africa'], 'sh', '290'],
36
+ ['Saint Martin', ['america', 'carribean'], 'mf', '590', '', 2],
37
+ ['Saint Pierre and Miquelon', ['america', 'north-america'], 'pm', '508'],
38
+ ['Sint Maarten', ['america', 'carribean'], 'sx', '1721'],
39
+ ['Tokelau', ['oceania'], 'tk', '690'],
40
+ ['Turks and Caicos Islands', ['america', 'carribean'], 'tc', '1649'],
41
+ ['U.S. Virgin Islands', ['america', 'carribean'], 'vi', '1340'],
42
+ ['Wallis and Futuna', ['oceania'], 'wf', '681']
43
+ ];
@@ -0,0 +1,5 @@
1
+ export declare const telTypes: {
2
+ id: string;
3
+ value: string;
4
+ label: string;
5
+ }[];
@@ -0,0 +1,16 @@
1
+ import { capitalize } from '../utils/index.js';
2
+ export const telTypes = [
3
+ 'PREMIUM_RATE',
4
+ 'TOLL_FREE',
5
+ 'SHARED_COST',
6
+ 'VOIP',
7
+ 'PERSONAL_NUMBER',
8
+ 'PAGER',
9
+ 'UAN',
10
+ 'VOICEMAIL',
11
+ 'FIXED_LINE_OR_MOBILE',
12
+ 'FIXED_LINE',
13
+ 'MOBILE'
14
+ ].map((el) => {
15
+ return { id: el, value: el, label: capitalize(el.split('_').join(' ')) };
16
+ });
@@ -1,12 +1,12 @@
1
1
  <script>import { createEventDispatcher, onMount } from "svelte";
2
2
  import { parsePhoneNumberWithError, ParseError } from "libphonenumber-js/max";
3
- import { telInputAction } from "../../utils/directives/telInputAction";
4
3
  import {
5
4
  normalizeTelInput,
6
5
  getCountryForPartialE164Number,
7
- generatePlaceholder
8
- } from "../../utils/helpers";
9
- import { watcher } from "../../stores";
6
+ generatePlaceholder,
7
+ telInputAction
8
+ } from "../../utils/index.js";
9
+ import { watcher } from "../../stores/index.js";
10
10
  const dispatch = createEventDispatcher();
11
11
  const defaultOptions = {
12
12
  autoPlaceholder: true,
@@ -1,7 +1,7 @@
1
1
  import { SvelteComponentTyped } from "svelte";
2
2
  import type { DetailedValue, CountryCode, E164Number, TelInputOptions } from '../../types';
3
3
  declare const __propDef: {
4
- /** Set the required attribute on the input element */ props: {
4
+ props: {
5
5
  [x: string]: any;
6
6
  country: CountryCode | null;
7
7
  value: E164Number | null;
@@ -0,0 +1,4 @@
1
+ export { default as TelInput } from './components/Input/TelInput.svelte';
2
+ export { getCurrentCountry, inputParser, inspectAllowedChars, normalizeTelInput, getCountryForPartialE164Number, clickOutsideAction, isSelected } from './utils/index.js';
3
+ export { parsePhoneNumberWithError, ParseError } from 'libphonenumber-js/max';
4
+ export { normalizedCountries } from './assets/index.js';
package/dist/index.js ADDED
@@ -0,0 +1,4 @@
1
+ export { default as TelInput } from './components/Input/TelInput.svelte';
2
+ export { getCurrentCountry, inputParser, inspectAllowedChars, normalizeTelInput, getCountryForPartialE164Number, clickOutsideAction, isSelected } from './utils/index.js';
3
+ export { parsePhoneNumberWithError, ParseError } from 'libphonenumber-js/max';
4
+ export { normalizedCountries } from './assets/index.js';
@@ -1,4 +1,5 @@
1
+ /// <reference types="svelte" />
1
2
  export declare const watcher: (initialValue: string | null, watchFunction: (oldVal: string | null, newVal: string | null) => void) => {
2
- subscribe: (this: void, run: import("svelte/store").Subscriber<string | null>, invalidate?: ((value?: string | null | undefined) => void) | undefined) => import("svelte/store").Unsubscriber;
3
+ subscribe: (this: void, run: import("svelte/store").Subscriber<string | null>, invalidate?: import("svelte/store").Invalidator<string | null> | undefined) => import("svelte/store").Unsubscriber;
3
4
  set: (value: string | null) => void;
4
5
  };
@@ -1,3 +1,3 @@
1
- export declare const clickOutsideAction: (node: HTMLElement, handler: () => void) => {
1
+ export declare const clickOutsideAction: (node: HTMLElement, handler: () => void, skipPrevented?: boolean) => {
2
2
  destroy: () => void;
3
3
  };
@@ -0,0 +1,18 @@
1
+ export const clickOutsideAction = (node, handler, skipPrevented = true) => {
2
+ const handleClick = async (event) => {
3
+ if (skipPrevented) {
4
+ if (!node.contains(event.target) && !event.defaultPrevented)
5
+ handler();
6
+ }
7
+ else {
8
+ if (!node.contains(event.target))
9
+ handler();
10
+ }
11
+ };
12
+ document.addEventListener('click', handleClick, true);
13
+ return {
14
+ destroy() {
15
+ document.removeEventListener('click', handleClick, true);
16
+ }
17
+ };
18
+ };
@@ -0,0 +1,8 @@
1
+ export declare function focusable_children(node: HTMLElement): {
2
+ next: (selector: string) => void;
3
+ prev: (selector: string) => void;
4
+ update: (d: number) => void;
5
+ };
6
+ export declare function trap(node: HTMLElement): {
7
+ destroy: () => void;
8
+ };
@@ -0,0 +1,71 @@
1
+ export function focusable_children(node) {
2
+ const nodes = Array.from(node.querySelectorAll('a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])'));
3
+ const index = document.activeElement ? nodes.indexOf(document.activeElement) : -1;
4
+ const update = (d) => {
5
+ let i = index + d;
6
+ i += nodes.length;
7
+ i %= nodes.length;
8
+ // @ts-expect-error Element is not HTMLElement
9
+ nodes[i].focus();
10
+ };
11
+ return {
12
+ next: (selector) => {
13
+ const reordered = [...nodes.slice(index + 1), ...nodes.slice(0, index + 1)];
14
+ for (let i = 0; i < reordered.length; i += 1) {
15
+ if (!selector || reordered[i].matches(selector)) {
16
+ // @ts-expect-error Element is not HTMLElement
17
+ reordered[i].focus();
18
+ return;
19
+ }
20
+ }
21
+ },
22
+ prev: (selector) => {
23
+ const reordered = [...nodes.slice(index + 1), ...nodes.slice(0, index + 1)];
24
+ for (let i = reordered.length - 2; i >= 0; i -= 1) {
25
+ if (!selector || reordered[i].matches(selector)) {
26
+ // @ts-expect-error Element is not HTMLElement
27
+ reordered[i].focus();
28
+ return;
29
+ }
30
+ }
31
+ },
32
+ update
33
+ };
34
+ }
35
+ export function trap(node) {
36
+ const handle_keydown = (e) => {
37
+ if (e.key === 'Tab') {
38
+ e.preventDefault();
39
+ const group = focusable_children(node);
40
+ if (e.shiftKey) {
41
+ // @ts-expect-error Element is not HTMLElement
42
+ group.prev();
43
+ }
44
+ else {
45
+ // @ts-expect-error Element is not HTMLElement
46
+ group.next();
47
+ }
48
+ }
49
+ };
50
+ node.addEventListener('keydown', handle_keydown);
51
+ return {
52
+ destroy: () => {
53
+ node.removeEventListener('keydown', handle_keydown);
54
+ }
55
+ };
56
+ }
57
+ // Put onto the element, where you want to use the keyboard navigation.
58
+ // on:keydown={(e) => {
59
+ // if (e.key === 'ArrowDown' || e.key === 'ArrowUp') {
60
+ // e.preventDefault();
61
+ // const group = focusable_children(e.currentTarget);
62
+ // // when using arrow keys (as opposed to tab), don't focus buttons
63
+ // const selector = 'a, input';
64
+ // if (e.key === 'ArrowDown') {
65
+ // group.next(selector);
66
+ // } else {
67
+ // group.prev(selector);
68
+ // }
69
+ // }
70
+ // }}
71
+ // use:trap
@@ -1,4 +1,4 @@
1
- import { inspectAllowedChars, inputParser } from '../..';
1
+ import { inspectAllowedChars, inputParser } from '../../index.js';
2
2
  export const telInputAction = (node, { handler, spaces }) => {
3
3
  const onInput = (event) => {
4
4
  if (node && node.contains(event.target)) {
@@ -1,4 +1,4 @@
1
- import type { PhoneNumber, MetadataJson, Countries, E164Number, CountryCode } from '../types';
1
+ import type { PhoneNumber, MetadataJson, Countries, E164Number, CountryCode } from '../types/index.js';
2
2
  export declare const capitalize: (str: string) => string;
3
3
  export declare const getCurrentCountry: () => Promise<string | undefined>;
4
4
  export declare const isNumber: (value: number) => boolean;
@@ -0,0 +1,4 @@
1
+ export * from './helpers.js';
2
+ export * from './typeCheck.js';
3
+ export * from './directives/clickOutsideAction.js';
4
+ export * from './directives/telInputAction.js';
@@ -0,0 +1,4 @@
1
+ export * from './helpers.js';
2
+ export * from './typeCheck.js';
3
+ export * from './directives/clickOutsideAction.js';
4
+ export * from './directives/telInputAction.js';
@@ -0,0 +1 @@
1
+ export declare const isStringArray: (items: unknown) => items is string[];
@@ -0,0 +1,3 @@
1
+ export const isStringArray = (items) => {
2
+ return Array.isArray(items) && items.length > 0 && typeof items[0] === 'string';
3
+ };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "svelte-tel-input",
3
3
  "description": "svelte-tel-input",
4
- "version": "3.1.0",
4
+ "version": "3.2.0",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/gyurielf/svelte-tel-input.git"
@@ -9,63 +9,113 @@
9
9
  "homepage": "https://github.com/gyurielf/svelte-tel-input#readme",
10
10
  "keywords": [
11
11
  "svelte",
12
+ "svelte kit",
13
+ "sveltekit",
12
14
  "tel input",
13
15
  "phone",
14
16
  "phone input",
17
+ "svelte phone input",
18
+ "svelte tel input",
15
19
  "intl",
16
- "intl tel input"
20
+ "intl tel input",
21
+ "svelte intl tel input"
17
22
  ],
18
23
  "engines": {
19
24
  "npm": ">= 8",
20
- "yarn": ">=2",
21
- "node": ">= 16",
22
- "pnpm": ">= 7"
25
+ "yarn": ">= 2",
26
+ "node": ">= 18",
27
+ "pnpm": ">= 8"
28
+ },
29
+ "peerDependencies": {
30
+ "libphonenumber-js": "^1.10.30",
31
+ "svelte": "^3.58.0 || ^4.0.0"
23
32
  },
24
33
  "dependencies": {
25
- "libphonenumber-js": "^1.10.36",
26
- "svelte": "^3.58.0"
34
+ "libphonenumber-js": "^1.10.37",
35
+ "svelte": "^4.0.5"
27
36
  },
28
37
  "devDependencies": {
29
- "@changesets/cli": "^2.26.1",
30
- "@changesets/get-github-info": "^0.5.2",
31
- "@changesets/types": "^5.2.1",
32
- "@macfja/svelte-persistent-store": "^2.3.0",
33
- "@playwright/test": "^1.35.1",
34
- "@sveltejs/adapter-static": "^2.0.2",
35
- "@sveltejs/kit": "^1.20.4",
36
- "@sveltejs/package": "^1.0.2",
37
- "@testing-library/svelte": "^3.2.2",
38
+ "@sveltejs/adapter-auto": "2.1.0",
39
+ "@sveltejs/kit": "^1.22.3",
40
+ "@sveltejs/package": "^2.2.0",
41
+ "@testing-library/svelte": "^4.0.3",
38
42
  "@testing-library/user-event": "^14.4.3",
39
- "@typescript-eslint/eslint-plugin": "^5.60.0",
40
- "@typescript-eslint/parser": "^5.60.0",
43
+ "@types/micromatch": "^4.0.2",
44
+ "@typescript-eslint/eslint-plugin": "^6.0.0",
45
+ "@typescript-eslint/parser": "^6.0.0",
41
46
  "autoprefixer": "^10.4.14",
42
47
  "cssnano": "^6.0.1",
43
48
  "dotenv": "^16.3.1",
44
- "edit-package-json": "^0.8.14",
45
- "eslint": "^8.43.0",
49
+ "eslint": "^8.45.0",
46
50
  "eslint-config-prettier": "^8.8.0",
47
- "eslint-plugin-svelte3": "^4.0.0",
48
- "husky": "^8.0.3",
51
+ "eslint-plugin-import": "^2.27.5",
52
+ "eslint-plugin-svelte": "^2.32.2",
49
53
  "jsdom": "^22.1.0",
50
54
  "micromatch": "^4.0.5",
51
- "postcss": "^8.4.24",
55
+ "postcss": "^8.4.26",
52
56
  "prettier": "^2.8.8",
53
57
  "prettier-plugin-svelte": "^2.10.1",
54
- "schema-dts": "^1.1.2",
55
- "svelte-check": "^3.4.3",
56
- "svelte2tsx": "^0.6.15",
57
- "tailwindcss": "^3.3.2",
58
- "tslib": "^2.5.3",
59
- "typescript": "^5.0.4",
60
- "vite": "^4.3.9",
61
- "vitest": "^0.32.2"
58
+ "publint": "^0.1.16",
59
+ "svelte-check": "^3.4.6",
60
+ "svelte2tsx": "^0.6.19",
61
+ "tailwindcss": "^3.3.3",
62
+ "tslib": "^2.6.0",
63
+ "typescript": "^5.1.6",
64
+ "vite": "^4.4.4",
65
+ "vitest": "^0.33.0"
62
66
  },
63
67
  "type": "module",
64
68
  "license": "MIT",
69
+ "files": [
70
+ "dist"
71
+ ],
72
+ "types": "./dist/index.d.ts",
73
+ "typesVersions": {
74
+ "*": {
75
+ "types": [
76
+ "./dist/types/index.d.ts"
77
+ ],
78
+ "utils": [
79
+ "./dist/utils/index.d.ts"
80
+ ],
81
+ "assets": [
82
+ "./dist/assets/index.d.ts"
83
+ ]
84
+ }
85
+ },
65
86
  "exports": {
66
- "./package.json": "./package.json",
67
- ".": "./index.js",
68
- "./styles/flags.css": "./styles/flags.css"
87
+ ".": {
88
+ "types": "./dist/index.d.ts",
89
+ "svelte": "./dist/index.js",
90
+ "default": "./dist/index.js"
91
+ },
92
+ "./types": {
93
+ "types": "./dist/types/index.d.ts",
94
+ "default": "./dist/types/index.d.ts"
95
+ },
96
+ "./utils": {
97
+ "types": "./dist/utils/index.d.ts",
98
+ "default": "./dist/utils/index.js"
99
+ },
100
+ "./assets": {
101
+ "types": "./dist/assets/index.d.ts",
102
+ "default": "./dist/assets/index.js"
103
+ },
104
+ "./styles/flags.css": "./dist/styles/flags.css"
69
105
  },
70
- "svelte": "./index.js"
106
+ "scripts": {
107
+ "check:publint": "publint . --strict",
108
+ "eslint": "eslint --ext .js,.ts,.svelte .",
109
+ "eslint:fix": "eslint --fix",
110
+ "lint": "npm run prettier:check && npm run eslint && npm run ts && npm run svelte-check",
111
+ "lint:fix": "npm run eslint:fix && npm run prettier:fix",
112
+ "package:watch": "svelte-kit sync && svelte-package --watch",
113
+ "package": "svelte-kit sync && svelte-package && npm run check:publint",
114
+ "prettier:check": "prettier --check --plugin-search-dir=. .",
115
+ "prettier:fix": "prettier --write --plugin-search-dir=. .",
116
+ "svelte-check": "svelte-kit sync && svelte-check --ignore 'dist,build,coverage,.svelte-kit,package' --fail-on-warnings",
117
+ "sync": "svelte-kit sync",
118
+ "test": "vitest",
119
+ "ts": "tsc --noEmit"
120
+ }
71
121
  }
package/CHANGELOG.md DELETED
@@ -1,396 +0,0 @@
1
- # svelte-tel-input
2
-
3
- ## 3.1.0
4
-
5
- ### Minor Changes
6
-
7
- - feat: value can be reseted without country reset ([#165](https://github.com/gyurielf/svelte-tel-input/pull/165))
8
-
9
- - In order to reset `value` and/or `country` from outside (you must pass (or set if you binded) `null` for the property) have some side-effects:
10
-
11
- - Reseting the `value` will set (keep the `country` as is):
12
- - `detailedValue` to `null`
13
- - dispatch `updateDetailedValue` event
14
- - Reseting the `country` will set:
15
- - `value` to `null`
16
- - `detailedValue` to `null`
17
- - `valid` to `true` if `invalidateOnCountryChange` config option is false (_@default false_). Otherwise it will be `false`.
18
- - and dispatch `updateValid`, `updateValue` `updateDetailedValue` events
19
- - Reseting both `value` and `country` will set:
20
- - `valid` to `true`
21
- - `detailedValue` to `null`;
22
-
23
- ## 3.0.1
24
-
25
- ### Patch Changes
26
-
27
- - chore: update readme with advanced example REPL ([#162](https://github.com/gyurielf/svelte-tel-input/pull/162))
28
-
29
- - fix: auto country update after manual country change ([#162](https://github.com/gyurielf/svelte-tel-input/pull/162))
30
-
31
- ## 3.0.0
32
-
33
- ### Major Changes
34
-
35
- - breaking: rename `parsedTelInput` property: ([#156](https://github.com/gyurielf/svelte-tel-input/pull/156))
36
- `parsedTelInput` is `detailedValue` from now.
37
-
38
- ```diff
39
- -<TelInput bind:parsedTelInput ... />;
40
- +<TelInput bind:detailedValue ... />;
41
- ```
42
-
43
- breaking: rename dispatched events:
44
- `parseInput` is splitted to two (`updateValue` and `updateDetailedValue` ) event.
45
- `valid` is `updateValid` from now.
46
-
47
- ```diff
48
- -<TelInput on:parseInput={...} on:valid={...} ... />;
49
- +<TelInput on:updateValue={...} on:updateDetailedValue={...} on:updateValid={...} on:updateCountry={...} ... />;
50
- ```
51
-
52
- breaking: rename `NormalizedTelNumber` type to `DetailedValue`:
53
-
54
- ```diff
55
- -import type { NormalizedTelNumber } from 'svelte-tel-input/types';
56
- +import type { DetailedValue } from 'svelte-tel-input/types';
57
- ```
58
-
59
- feat: new event added: `updateCountry`
60
-
61
- ```html
62
- <TelInput on:updateCountry="{...}" ... />;
63
- ```
64
-
65
- feat: now the component is fully supports the event driven behavior. So you don't have to bind properties.
66
-
67
- ```diff
68
- -<TelInput bind:value ... />;
69
- +<TelInput value={yourValue} ... />;
70
- ```
71
-
72
- ## 2.1.1
73
-
74
- ### Patch Changes
75
-
76
- - fix: US flag is now more representative ([#154](https://github.com/gyurielf/svelte-tel-input/pull/154))
77
-
78
- ## 2.1.0
79
-
80
- ### Minor Changes
81
-
82
- - feat: support event driven behavior ([#150](https://github.com/gyurielf/svelte-tel-input/pull/150))
83
-
84
- ## 2.0.1
85
-
86
- ### Patch Changes
87
-
88
- - fix: component export ([#147](https://github.com/gyurielf/svelte-tel-input/pull/147))
89
-
90
- ## 2.0.0
91
-
92
- ### Major Changes
93
-
94
- - breaking: switch from default to named export to export TelInput component. Use named import in the future. From now Svelte >= 3.58.0 is required. ([#143](https://github.com/gyurielf/svelte-tel-input/pull/143))
95
-
96
- ### Minor Changes
97
-
98
- - feat: space config option added, it will enable or disable spaces in the input field. ([#143](https://github.com/gyurielf/svelte-tel-input/pull/143))
99
-
100
- - feat: autoPlaceholder feature added, it generates placeholder for each country. ([#143](https://github.com/gyurielf/svelte-tel-input/pull/143))
101
-
102
- ### Patch Changes
103
-
104
- - chore: update deps, re-generate package-lock.json ([#143](https://github.com/gyurielf/svelte-tel-input/pull/143))
105
-
106
- - feat: added options panel to example page to be able to try out config opts. ([#143](https://github.com/gyurielf/svelte-tel-input/pull/143))
107
-
108
- ## 1.3.2
109
-
110
- ### Patch Changes
111
-
112
- - chore: export ParseError class ([#141](https://github.com/gyurielf/svelte-tel-input/pull/141))
113
-
114
- ## 1.3.1
115
-
116
- ### Patch Changes
117
-
118
- - chore: extend method exports ([#139](https://github.com/gyurielf/svelte-tel-input/pull/139))
119
-
120
- ## 1.3.0
121
-
122
- ### Minor Changes
123
-
124
- - fix: validation on select all and delete ([#137](https://github.com/gyurielf/svelte-tel-input/pull/137))
125
-
126
- ## 1.2.0
127
-
128
- ### Minor Changes
129
-
130
- - fix: improved validation ([#132](https://github.com/gyurielf/svelte-tel-input/pull/132))
131
-
132
- ## 1.1.3
133
-
134
- ### Patch Changes
135
-
136
- - fix: make parsedTelInput prop optional ([#129](https://github.com/gyurielf/svelte-tel-input/pull/129))
137
-
138
- ## 1.1.2
139
-
140
- ### Patch Changes
141
-
142
- - feat: seo improvement and deps update ([#127](https://github.com/gyurielf/svelte-tel-input/pull/127))
143
-
144
- - fix: prevent commit to the main branch ([#127](https://github.com/gyurielf/svelte-tel-input/pull/127))
145
-
146
- ## 1.1.1
147
-
148
- ### Patch Changes
149
-
150
- - fix: advanced input handleSelect method fix ([#125](https://github.com/gyurielf/svelte-tel-input/pull/125))
151
-
152
- - fix: modify style export in package.json and in post-build.js ([#125](https://github.com/gyurielf/svelte-tel-input/pull/125))
153
-
154
- - fix: set flags assets import relative in flags.css ([#125](https://github.com/gyurielf/svelte-tel-input/pull/125))
155
-
156
- ## 1.1.0
157
-
158
- ### Minor Changes
159
-
160
- - feat: vitests and e2e (playwright) added ([#123](https://github.com/gyurielf/svelte-tel-input/pull/123))
161
-
162
- - chore: remove unnecessary dependencies ([#123](https://github.com/gyurielf/svelte-tel-input/pull/123))
163
-
164
- ## 1.0.2
165
-
166
- ### Patch Changes
167
-
168
- - chore: extend REPL example ([#119](https://github.com/gyurielf/svelte-tel-input/pull/119))
169
-
170
- - chore: polish readme ([#119](https://github.com/gyurielf/svelte-tel-input/pull/119))
171
-
172
- - chore: update dependencies ([#119](https://github.com/gyurielf/svelte-tel-input/pull/119))
173
-
174
- ## 1.0.1
175
-
176
- ### Patch Changes
177
-
178
- - fix: remove types field right before packaging ([#116](https://github.com/gyurielf/svelte-tel-input/pull/116))
179
-
180
- ## 1.0.0
181
-
182
- ### Major Changes
183
-
184
- - feat: prevent typing non-tel input characters into the input field. ([#108](https://github.com/gyurielf/svelte-tel-input/pull/108))
185
-
186
- - fix: now you can use value prop as a single entry ([#108](https://github.com/gyurielf/svelte-tel-input/pull/108))
187
-
188
- - feat: support monorepos ([#108](https://github.com/gyurielf/svelte-tel-input/pull/108))
189
-
190
- - feat: sanitize pasted E164 number ([#108](https://github.com/gyurielf/svelte-tel-input/pull/108))
191
-
192
- - feat: switch country automatically if the pasted/entered phone number contains a valid country calling code ([#108](https://github.com/gyurielf/svelte-tel-input/pull/108))
193
-
194
- - fix: clear input on manual country change ([#108](https://github.com/gyurielf/svelte-tel-input/pull/108))
195
-
196
- ### Minor Changes
197
-
198
- - chore: tweak types ([#108](https://github.com/gyurielf/svelte-tel-input/pull/108))
199
-
200
- ## 0.14.2
201
-
202
- ### Patch Changes
203
-
204
- - update something ([#105](https://github.com/gyurielf/svelte-tel-input/pull/105))
205
-
206
- ## 0.14.1
207
-
208
- ### Patch Changes
209
-
210
- - chore: export tests ([#100](https://github.com/gyurielf/svelte-tel-input/pull/100))
211
-
212
- ## 0.14.0
213
-
214
- ### Minor Changes
215
-
216
- - Prevent circular import ([#98](https://github.com/gyurielf/svelte-tel-input/pull/98))
217
-
218
- ## 0.13.1
219
-
220
- ### Patch Changes
221
-
222
- - chore: simplify part one ([#94](https://github.com/gyurielf/svelte-tel-input/pull/94))
223
-
224
- ## 0.13.0
225
-
226
- ### Minor Changes
227
-
228
- - Simplify structure ([#91](https://github.com/gyurielf/svelte-tel-input/pull/91))
229
-
230
- ## 0.12.0
231
-
232
- ### Minor Changes
233
-
234
- - feat: Update exports to make the package as simple to use as possible. ([#85](https://github.com/gyurielf/svelte-tel-input/pull/85))
235
-
236
- ## 0.11.1
237
-
238
- ### Patch Changes
239
-
240
- - Update readme and prepare to 1.0 ([#79](https://github.com/gyurielf/svelte-tel-input/pull/79))
241
-
242
- ## 0.11.0
243
-
244
- ### Minor Changes
245
-
246
- - feat: dark mode, example page enhancemet ([#76](https://github.com/gyurielf/svelte-tel-input/pull/76))
247
-
248
- ## 0.10.0
249
-
250
- ### Minor Changes
251
-
252
- - refactor: components and views ([#74](https://github.com/gyurielf/svelte-tel-input/pull/74))
253
-
254
- ## 0.9.0
255
-
256
- ### Minor Changes
257
-
258
- - feat: masking/formatting and parsing extends ([#72](https://github.com/gyurielf/svelte-tel-input/pull/72))
259
-
260
- ## 0.8.0
261
-
262
- ### Minor Changes
263
-
264
- - feat: example improvements, extend functionality ([#70](https://github.com/gyurielf/svelte-tel-input/pull/70))
265
-
266
- ## 0.7.0
267
-
268
- ### Minor Changes
269
-
270
- - feat: example page payload feature, parsing improvements" ([#68](https://github.com/gyurielf/svelte-tel-input/pull/68))
271
-
272
- ## 0.6.5
273
-
274
- ### Patch Changes
275
-
276
- - fix: add changeset ([#61](https://github.com/gyurielf/svelte-tel-input/pull/61))
277
-
278
- ## 0.6.4
279
-
280
- ### Patch Changes
281
-
282
- - chore: update to vite 3 ([#58](https://github.com/gyurielf/svelte-tel-input/pull/58))
283
-
284
- ## 0.6.3
285
-
286
- ### Patch Changes
287
-
288
- - update dependencies ([#56](https://github.com/gyurielf/svelte-tel-input/pull/56))
289
-
290
- ## 0.6.2
291
-
292
- ### Patch Changes
293
-
294
- - Update readme & update packages ([#54](https://github.com/gyurielf/svelte-tel-input/pull/54))
295
-
296
- ## 0.6.1
297
-
298
- ### Patch Changes
299
-
300
- - Readme update ([#52](https://github.com/gyurielf/svelte-tel-input/pull/52))
301
-
302
- ## 0.6.0
303
-
304
- ### Minor Changes
305
-
306
- - feat: example page preparations & extend functionality (part 1) ([#50](https://github.com/gyurielf/svelte-tel-input/pull/50))
307
-
308
- ## 0.5.1
309
-
310
- ### Patch Changes
311
-
312
- - chore: update packages and resolve breaking changes ([#46](https://github.com/gyurielf/svelte-tel-input/pull/46))
313
-
314
- ## 0.5.0
315
-
316
- ### Minor Changes
317
-
318
- - feat: prepare github pages deployment ([#43](https://github.com/gyurielf/svelte-tel-input/pull/43))
319
-
320
- * feat: implement selects and input ([#43](https://github.com/gyurielf/svelte-tel-input/pull/43))
321
-
322
- - feat: basic stores created ([#43](https://github.com/gyurielf/svelte-tel-input/pull/43))
323
-
324
- ## 0.4.2
325
-
326
- ### Patch Changes
327
-
328
- - fix: fix readme ([#41](https://github.com/gyurielf/svelte-tel-input/pull/41))
329
-
330
- ## 0.4.1
331
-
332
- ### Patch Changes
333
-
334
- - fix: readme fix ([#39](https://github.com/gyurielf/svelte-tel-input/pull/39))
335
-
336
- ## 0.4.0
337
-
338
- ### Minor Changes
339
-
340
- - fix: rework ci
341
-
342
- ### Patch Changes
343
-
344
- - fix: minor ci fix ([#34](https://github.com/gyurielf/svelte-tel-input/pull/34))
345
-
346
- * fix: fix ci again ([#35](https://github.com/gyurielf/svelte-tel-input/pull/35))
347
-
348
- - fix: last ci fix for today ([#36](https://github.com/gyurielf/svelte-tel-input/pull/36))
349
-
350
- * fix: ci fixxx ([#33](https://github.com/gyurielf/svelte-tel-input/pull/33))
351
-
352
- - something 1 ([#37](https://github.com/gyurielf/svelte-tel-input/pull/37))
353
-
354
- * fix: ci extend 321 ([#32](https://github.com/gyurielf/svelte-tel-input/pull/32))
355
-
356
- ## 0.3.2
357
-
358
- ### Patch Changes
359
-
360
- - feat: add MIT license ([#29](https://github.com/gyurielf/svelte-tel-input/pull/29))
361
-
362
- * fix: fix readme deps ([#29](https://github.com/gyurielf/svelte-tel-input/pull/29))
363
-
364
- ## 0.3.1
365
-
366
- ### Patch Changes
367
-
368
- - fix: lets check with different folder structure ([#25](https://github.com/gyurielf/svelte-tel-input/pull/25))
369
-
370
- ## 0.3.0
371
-
372
- ### Minor Changes
373
-
374
- - fix: ci modifications ([#22](https://github.com/gyurielf/svelte-tel-input/pull/22))
375
-
376
- ## 0.2.0
377
-
378
- ### Minor Changes
379
-
380
- - remove unused packages, cleanup, fix ci ([#19](https://github.com/gyurielf/svelte-tel-input/pull/19))
381
-
382
- * fix: another CI fix ([#20](https://github.com/gyurielf/svelte-tel-input/pull/20))
383
-
384
- ## 0.1.0
385
-
386
- ### Minor Changes
387
-
388
- - test_1
389
-
390
- ### Patch Changes
391
-
392
- - szo
393
-
394
- * test 2
395
-
396
- - test3
package/assets/index.d.ts DELETED
@@ -1 +0,0 @@
1
- export { normalizedCountries } from './allCountry';
package/assets/index.js DELETED
@@ -1 +0,0 @@
1
- export { normalizedCountries } from './allCountry';
package/index.d.ts DELETED
@@ -1,5 +0,0 @@
1
- export { default as TelInput } from './components/Input/TelInput.svelte';
2
- export { getCurrentCountry, isSelected, inputParser, inspectAllowedChars, normalizeTelInput, getCountryForPartialE164Number } from './utils/helpers';
3
- export { parsePhoneNumberWithError, ParseError } from 'libphonenumber-js/max';
4
- export { clickOutsideAction } from './utils/directives/clickOutsideAction';
5
- export { normalizedCountries } from './assets';
package/index.js DELETED
@@ -1,5 +0,0 @@
1
- export { default as TelInput } from './components/Input/TelInput.svelte';
2
- export { getCurrentCountry, isSelected, inputParser, inspectAllowedChars, normalizeTelInput, getCountryForPartialE164Number } from './utils/helpers';
3
- export { parsePhoneNumberWithError, ParseError } from 'libphonenumber-js/max';
4
- export { clickOutsideAction } from './utils/directives/clickOutsideAction';
5
- export { normalizedCountries } from './assets';
@@ -1,9 +0,0 @@
1
- export const clickOutsideAction = (node, handler) => {
2
- const onClick = (event) => node && !node.contains(event.target) && !event.defaultPrevented && handler();
3
- document.addEventListener('click', onClick, true);
4
- return {
5
- destroy() {
6
- document.removeEventListener('click', onClick, true);
7
- }
8
- };
9
- };
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes