@code-plate/iran-cities 1.0.1 → 1.1.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/README.fa.md +56 -20
- package/README.md +56 -20
- package/dist/index.cjs +2642 -428
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +15 -21
- package/dist/index.d.ts +15 -21
- package/dist/index.mjs +2635 -428
- package/dist/index.mjs.map +1 -1
- package/dist/react.cjs +2647 -422
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.mts +11 -20
- package/dist/react.d.ts +11 -20
- package/dist/react.mjs +2648 -423
- package/dist/react.mjs.map +1 -1
- package/dist/types-DzSw8Uw2.d.mts +52 -0
- package/dist/types-DzSw8Uw2.d.ts +52 -0
- package/package.json +21 -14
- package/dist/types--eoWJy5A.d.mts +0 -27
- package/dist/types--eoWJy5A.d.ts +0 -27
package/dist/index.d.mts
CHANGED
|
@@ -1,31 +1,25 @@
|
|
|
1
|
-
import { F as FlatCity, C as City, P as Province, S as SearchOptions } from './types
|
|
2
|
-
export { L as Locale } from './types
|
|
1
|
+
import { F as FlatCity, Q as Query, C as City, a as CityId, b as CityKey, P as Province, c as ProvinceId, d as ProvinceListItem, S as SearchOptions } from './types-DzSw8Uw2.mjs';
|
|
2
|
+
export { e as Coordinates, L as Locale } from './types-DzSw8Uw2.mjs';
|
|
3
3
|
|
|
4
|
-
/** لیست کامل استانها به همراه شهرهای هرکدام */
|
|
5
4
|
declare function getProvinces(): Province[];
|
|
6
|
-
|
|
7
|
-
declare function
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}[];
|
|
11
|
-
/** پیدا کردن یک استان با شناسه انگلیسی یا نام فارسی (دقیق، نرمالشده) */
|
|
12
|
-
declare function getProvince(query: string): Province | undefined;
|
|
13
|
-
/** لیست شهرهای یک استان بر اساس شناسه انگلیسی یا نام فارسی استان */
|
|
14
|
-
declare function getCities(provinceQuery: string): City[];
|
|
15
|
-
/** لیست تمام شهرهای کشور به صورت مسطح، همراه با اطلاعات استان مربوطه */
|
|
5
|
+
declare function getProvincesList(): ProvinceListItem[];
|
|
6
|
+
declare function getProvinceById(id: ProvinceId): Province | undefined;
|
|
7
|
+
declare function getProvince(query: Query): Province | undefined;
|
|
8
|
+
declare function getCities(provinceQuery: Query): City[];
|
|
16
9
|
declare function getAllCities(): FlatCity[];
|
|
17
|
-
|
|
18
|
-
declare function
|
|
19
|
-
|
|
20
|
-
declare function
|
|
21
|
-
|
|
10
|
+
declare function getCityById(id: CityId): FlatCity | undefined;
|
|
11
|
+
declare function getCityBySlug(slug: CityKey): FlatCity | undefined;
|
|
12
|
+
declare function getCity(cityQuery: Query, provinceQuery?: Query): FlatCity | undefined;
|
|
13
|
+
declare function getCitiesByName(cityQuery: string): FlatCity[];
|
|
14
|
+
declare function getProvinceOfCity(cityQuery: Query): Province | undefined;
|
|
15
|
+
declare function getCapital(provinceQuery: Query): FlatCity | undefined;
|
|
16
|
+
declare function getCapitals(): FlatCity[];
|
|
17
|
+
declare function getProvinceByPhoneCode(code: string | number): Province | undefined;
|
|
22
18
|
declare function searchProvinces(query: string, options?: SearchOptions): Province[];
|
|
23
|
-
/** جستجوی fuzzy (شاملشونده) در بین تمام شهرهای کشور بر اساس بخشی از نام */
|
|
24
19
|
declare function searchCities(query: string, options?: SearchOptions): FlatCity[];
|
|
25
|
-
/** آمار کلی: تعداد استانها و تعداد کل شهرها */
|
|
26
20
|
declare function getStats(): {
|
|
27
21
|
provinceCount: number;
|
|
28
22
|
cityCount: number;
|
|
29
23
|
};
|
|
30
24
|
|
|
31
|
-
export { City, FlatCity, Province, SearchOptions, getAllCities, getCities, getCity, getProvince, getProvinceOfCity, getProvinces, getProvincesList, getStats, searchCities, searchProvinces };
|
|
25
|
+
export { City, CityId, CityKey, FlatCity, Province, ProvinceId, ProvinceListItem, Query, SearchOptions, getAllCities, getCapital, getCapitals, getCities, getCitiesByName, getCity, getCityById, getCityBySlug, getProvince, getProvinceById, getProvinceByPhoneCode, getProvinceOfCity, getProvinces, getProvincesList, getStats, searchCities, searchProvinces };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,31 +1,25 @@
|
|
|
1
|
-
import { F as FlatCity, C as City, P as Province, S as SearchOptions } from './types
|
|
2
|
-
export { L as Locale } from './types
|
|
1
|
+
import { F as FlatCity, Q as Query, C as City, a as CityId, b as CityKey, P as Province, c as ProvinceId, d as ProvinceListItem, S as SearchOptions } from './types-DzSw8Uw2.js';
|
|
2
|
+
export { e as Coordinates, L as Locale } from './types-DzSw8Uw2.js';
|
|
3
3
|
|
|
4
|
-
/** لیست کامل استانها به همراه شهرهای هرکدام */
|
|
5
4
|
declare function getProvinces(): Province[];
|
|
6
|
-
|
|
7
|
-
declare function
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}[];
|
|
11
|
-
/** پیدا کردن یک استان با شناسه انگلیسی یا نام فارسی (دقیق، نرمالشده) */
|
|
12
|
-
declare function getProvince(query: string): Province | undefined;
|
|
13
|
-
/** لیست شهرهای یک استان بر اساس شناسه انگلیسی یا نام فارسی استان */
|
|
14
|
-
declare function getCities(provinceQuery: string): City[];
|
|
15
|
-
/** لیست تمام شهرهای کشور به صورت مسطح، همراه با اطلاعات استان مربوطه */
|
|
5
|
+
declare function getProvincesList(): ProvinceListItem[];
|
|
6
|
+
declare function getProvinceById(id: ProvinceId): Province | undefined;
|
|
7
|
+
declare function getProvince(query: Query): Province | undefined;
|
|
8
|
+
declare function getCities(provinceQuery: Query): City[];
|
|
16
9
|
declare function getAllCities(): FlatCity[];
|
|
17
|
-
|
|
18
|
-
declare function
|
|
19
|
-
|
|
20
|
-
declare function
|
|
21
|
-
|
|
10
|
+
declare function getCityById(id: CityId): FlatCity | undefined;
|
|
11
|
+
declare function getCityBySlug(slug: CityKey): FlatCity | undefined;
|
|
12
|
+
declare function getCity(cityQuery: Query, provinceQuery?: Query): FlatCity | undefined;
|
|
13
|
+
declare function getCitiesByName(cityQuery: string): FlatCity[];
|
|
14
|
+
declare function getProvinceOfCity(cityQuery: Query): Province | undefined;
|
|
15
|
+
declare function getCapital(provinceQuery: Query): FlatCity | undefined;
|
|
16
|
+
declare function getCapitals(): FlatCity[];
|
|
17
|
+
declare function getProvinceByPhoneCode(code: string | number): Province | undefined;
|
|
22
18
|
declare function searchProvinces(query: string, options?: SearchOptions): Province[];
|
|
23
|
-
/** جستجوی fuzzy (شاملشونده) در بین تمام شهرهای کشور بر اساس بخشی از نام */
|
|
24
19
|
declare function searchCities(query: string, options?: SearchOptions): FlatCity[];
|
|
25
|
-
/** آمار کلی: تعداد استانها و تعداد کل شهرها */
|
|
26
20
|
declare function getStats(): {
|
|
27
21
|
provinceCount: number;
|
|
28
22
|
cityCount: number;
|
|
29
23
|
};
|
|
30
24
|
|
|
31
|
-
export { City, FlatCity, Province, SearchOptions, getAllCities, getCities, getCity, getProvince, getProvinceOfCity, getProvinces, getProvincesList, getStats, searchCities, searchProvinces };
|
|
25
|
+
export { City, CityId, CityKey, FlatCity, Province, ProvinceId, ProvinceListItem, Query, SearchOptions, getAllCities, getCapital, getCapitals, getCities, getCitiesByName, getCity, getCityById, getCityBySlug, getProvince, getProvinceById, getProvinceByPhoneCode, getProvinceOfCity, getProvinces, getProvincesList, getStats, searchCities, searchProvinces };
|