@movvjs/svelte-schedule-view 0.0.1

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 (98) hide show
  1. package/README.md +26 -0
  2. package/dist/alert/component.svelte +23 -0
  3. package/dist/alert/component.svelte.d.ts +14 -0
  4. package/dist/alert/index.d.ts +7 -0
  5. package/dist/alert/index.js +20 -0
  6. package/dist/alert/types.d.ts +9 -0
  7. package/dist/alert/types.js +1 -0
  8. package/dist/api/booking/dto.d.ts +60 -0
  9. package/dist/api/booking/dto.js +1 -0
  10. package/dist/api/booking/index.d.ts +28 -0
  11. package/dist/api/booking/index.js +159 -0
  12. package/dist/api/common/dto.d.ts +11 -0
  13. package/dist/api/common/dto.js +1 -0
  14. package/dist/api/common/index.d.ts +18 -0
  15. package/dist/api/common/index.js +117 -0
  16. package/dist/assets/icon/dest.png +0 -0
  17. package/dist/assets/icon/place.png +0 -0
  18. package/dist/assets/icon/start.png +0 -0
  19. package/dist/assets/icon/transparent.png +0 -0
  20. package/dist/assets/scss/indie_booking.scss +4464 -0
  21. package/dist/axios/index.d.ts +1 -0
  22. package/dist/axios/index.js +71 -0
  23. package/dist/components/BaseSearchInput.svelte +115 -0
  24. package/dist/components/BaseSearchInput.svelte.d.ts +31 -0
  25. package/dist/components/Layout.svelte +33 -0
  26. package/dist/components/Layout.svelte.d.ts +17 -0
  27. package/dist/confirm/component.svelte +35 -0
  28. package/dist/confirm/component.svelte.d.ts +14 -0
  29. package/dist/confirm/index.d.ts +8 -0
  30. package/dist/confirm/index.js +32 -0
  31. package/dist/confirm/types.d.ts +14 -0
  32. package/dist/confirm/types.js +1 -0
  33. package/dist/constant/index.d.ts +58 -0
  34. package/dist/constant/index.js +58 -0
  35. package/dist/contents/telCodes.json +235 -0
  36. package/dist/dayjs/index.d.ts +11 -0
  37. package/dist/dayjs/index.js +30 -0
  38. package/dist/i18n/index.js +8 -0
  39. package/dist/i18n/locales/en.json +116 -0
  40. package/dist/i18n/locales/ko.json +92 -0
  41. package/dist/i18n/locales/vi.json +92 -0
  42. package/dist/i18n/locales/zh-cn.json +92 -0
  43. package/dist/i18n/locales/zh-tw.json +92 -0
  44. package/dist/index.d.ts +3 -0
  45. package/dist/index.js +3 -0
  46. package/dist/init.d.ts +11 -0
  47. package/dist/init.js +14 -0
  48. package/dist/loaders/component.svelte +7 -0
  49. package/dist/loaders/component.svelte.d.ts +16 -0
  50. package/dist/loaders/index.d.ts +6 -0
  51. package/dist/loaders/index.js +16 -0
  52. package/dist/schedule/BookingInfo.svelte +547 -0
  53. package/dist/schedule/BookingInfo.svelte.d.ts +14 -0
  54. package/dist/schedule/CarSearch.svelte +22 -0
  55. package/dist/schedule/CarSearch.svelte.d.ts +23 -0
  56. package/dist/schedule/FileUploader.svelte +76 -0
  57. package/dist/schedule/FileUploader.svelte.d.ts +23 -0
  58. package/dist/schedule/FlightSearch.svelte +261 -0
  59. package/dist/schedule/FlightSearch.svelte.d.ts +24 -0
  60. package/dist/schedule/Map.svelte +132 -0
  61. package/dist/schedule/Map.svelte.d.ts +14 -0
  62. package/dist/schedule/PhoneNumberInput.svelte +82 -0
  63. package/dist/schedule/PhoneNumberInput.svelte.d.ts +19 -0
  64. package/dist/schedule/PickupPointView.svelte +88 -0
  65. package/dist/schedule/PickupPointView.svelte.d.ts +17 -0
  66. package/dist/schedule/PlaceSearch.svelte +27 -0
  67. package/dist/schedule/PlaceSearch.svelte.d.ts +21 -0
  68. package/dist/schedule/Plan.svelte +175 -0
  69. package/dist/schedule/Plan.svelte.d.ts +14 -0
  70. package/dist/schedule/PlanItem.svelte +174 -0
  71. package/dist/schedule/PlanItem.svelte.d.ts +34 -0
  72. package/dist/schedule/Schedule.svelte +183 -0
  73. package/dist/schedule/Schedule.svelte.d.ts +45 -0
  74. package/dist/schedule/ServiceZone.svelte +76 -0
  75. package/dist/schedule/ServiceZone.svelte.d.ts +14 -0
  76. package/dist/schedule/ServiceZoneItem.svelte +73 -0
  77. package/dist/schedule/ServiceZoneItem.svelte.d.ts +33 -0
  78. package/dist/schedule/Translation.svelte +136 -0
  79. package/dist/schedule/Translation.svelte.d.ts +17 -0
  80. package/dist/schedule/booking.d.ts +114 -0
  81. package/dist/schedule/booking.js +150 -0
  82. package/dist/store/env.d.ts +16 -0
  83. package/dist/store/env.js +33 -0
  84. package/dist/types/booking.d.ts +88 -0
  85. package/dist/types/booking.js +40 -0
  86. package/dist/types/common.d.ts +28 -0
  87. package/dist/types/common.js +14 -0
  88. package/dist/types/file.d.ts +13 -0
  89. package/dist/types/file.js +5 -0
  90. package/dist/types/flight.d.ts +25 -0
  91. package/dist/types/flight.js +1 -0
  92. package/dist/types/index.d.ts +5 -0
  93. package/dist/types/index.js +5 -0
  94. package/dist/types/price.d.ts +18 -0
  95. package/dist/types/price.js +1 -0
  96. package/dist/utils/index.d.ts +14 -0
  97. package/dist/utils/index.js +48 -0
  98. package/package.json +62 -0
@@ -0,0 +1,88 @@
1
+ import type { BaseLocation } from './common';
2
+ export declare enum BookingManualType {
3
+ admin = "ADMIN",
4
+ supplier = "MANUAL",
5
+ api = "API"
6
+ }
7
+ export declare enum BookingRentalType {
8
+ driverInclude = "INCLUDE",
9
+ carOnly = "ONLY",
10
+ driverIncludeOrNot = "MAYBE"
11
+ }
12
+ export declare enum BookingStatus {
13
+ request = "REQUEST",
14
+ pending = "PENDING",
15
+ pendingReject = "PENDING_REJECT",
16
+ reserve = "RESERV",
17
+ modifyRequest = "MODIFY_REQUEST",
18
+ modifyReject = "MODIFY_REJECT",
19
+ cancel = "CANCEL",
20
+ cancelRequest = "CANCEL_REQUEST",
21
+ ing = "ING",
22
+ complete = "COMPLETE",
23
+ finish = "FINISH"
24
+ }
25
+ export declare enum BookingServiceType {
26
+ day = "DAY",
27
+ pickup = "PICKUP",
28
+ sending = "SENDING",
29
+ oneWay = "ONE_WAY",
30
+ roundTrip = "ROUND_TRIP",
31
+ pointPoint = "POINT_POINT"
32
+ }
33
+ export interface BookingLocation extends BaseLocation {
34
+ nation: string;
35
+ code: string;
36
+ iata?: string;
37
+ }
38
+ export interface BookingPlanItem extends BaseLocation {
39
+ ref: number;
40
+ }
41
+ export interface ExtraPoi {
42
+ title: string;
43
+ code: string;
44
+ address: string;
45
+ llc: string;
46
+ type: 'PICKUP' | 'DROPOFF';
47
+ customerPrice: number;
48
+ partnerPrice: number;
49
+ customerForex: string;
50
+ partnerForex: string;
51
+ lat: number;
52
+ lng: number;
53
+ }
54
+ export declare enum ExtraServiceType {
55
+ baby = "BABY",
56
+ picket = "PICKET"
57
+ }
58
+ export interface BookingExtraService {
59
+ type: ExtraServiceType;
60
+ price: number;
61
+ file?: any[];
62
+ }
63
+ export interface BookingServiceZone {
64
+ code: string;
65
+ title: string;
66
+ type: 'ORIGIN' | 'DEST' | 'WAYPOINT';
67
+ }
68
+ export interface CarInfo {
69
+ category: string;
70
+ maker: string;
71
+ model: string;
72
+ seat: number;
73
+ img: string;
74
+ luggage: [];
75
+ service: {
76
+ tollgate: boolean;
77
+ parking: boolean;
78
+ meals: boolean;
79
+ fuel: boolean;
80
+ driverTip: boolean;
81
+ };
82
+ notice: [];
83
+ content: string;
84
+ extra: any[];
85
+ type: 'SINGLE' | 'MULTI';
86
+ subModelList: string[];
87
+ maxPerson: number;
88
+ }
@@ -0,0 +1,40 @@
1
+ export var BookingManualType;
2
+ (function (BookingManualType) {
3
+ BookingManualType["admin"] = "ADMIN";
4
+ BookingManualType["supplier"] = "MANUAL";
5
+ BookingManualType["api"] = "API";
6
+ })(BookingManualType || (BookingManualType = {}));
7
+ export var BookingRentalType;
8
+ (function (BookingRentalType) {
9
+ BookingRentalType["driverInclude"] = "INCLUDE";
10
+ BookingRentalType["carOnly"] = "ONLY";
11
+ BookingRentalType["driverIncludeOrNot"] = "MAYBE";
12
+ })(BookingRentalType || (BookingRentalType = {}));
13
+ export var BookingStatus;
14
+ (function (BookingStatus) {
15
+ BookingStatus["request"] = "REQUEST";
16
+ BookingStatus["pending"] = "PENDING";
17
+ BookingStatus["pendingReject"] = "PENDING_REJECT";
18
+ BookingStatus["reserve"] = "RESERV";
19
+ BookingStatus["modifyRequest"] = "MODIFY_REQUEST";
20
+ BookingStatus["modifyReject"] = "MODIFY_REJECT";
21
+ BookingStatus["cancel"] = "CANCEL";
22
+ BookingStatus["cancelRequest"] = "CANCEL_REQUEST";
23
+ BookingStatus["ing"] = "ING";
24
+ BookingStatus["complete"] = "COMPLETE";
25
+ BookingStatus["finish"] = "FINISH";
26
+ })(BookingStatus || (BookingStatus = {}));
27
+ export var BookingServiceType;
28
+ (function (BookingServiceType) {
29
+ BookingServiceType["day"] = "DAY";
30
+ BookingServiceType["pickup"] = "PICKUP";
31
+ BookingServiceType["sending"] = "SENDING";
32
+ BookingServiceType["oneWay"] = "ONE_WAY";
33
+ BookingServiceType["roundTrip"] = "ROUND_TRIP";
34
+ BookingServiceType["pointPoint"] = "POINT_POINT";
35
+ })(BookingServiceType || (BookingServiceType = {}));
36
+ export var ExtraServiceType;
37
+ (function (ExtraServiceType) {
38
+ ExtraServiceType["baby"] = "BABY";
39
+ ExtraServiceType["picket"] = "PICKET";
40
+ })(ExtraServiceType || (ExtraServiceType = {}));
@@ -0,0 +1,28 @@
1
+ export type Locale = 'ko' | 'en' | 'zh-tw' | 'zh-cn' | 'vi';
2
+ export type Target = 'B2B' | 'FMS';
3
+ export interface Coordinate {
4
+ lat: number;
5
+ lng: number;
6
+ }
7
+ export interface BaseLocation extends Coordinate {
8
+ lat: number;
9
+ lng: number;
10
+ title: string;
11
+ address: string;
12
+ }
13
+ export interface Person {
14
+ adult: number;
15
+ child: number;
16
+ }
17
+ export declare enum Currency {
18
+ KRW = "KRW",
19
+ USD = "USD"
20
+ }
21
+ export declare enum TranslateLanguage {
22
+ korean = "ko",
23
+ english = "en",
24
+ japanese = "ja",
25
+ chinese_simplified = "zh-CN",
26
+ chinese_traditional = "zh-TW",
27
+ vietnamese = "vi"
28
+ }
@@ -0,0 +1,14 @@
1
+ export var Currency;
2
+ (function (Currency) {
3
+ Currency["KRW"] = "KRW";
4
+ Currency["USD"] = "USD";
5
+ })(Currency || (Currency = {}));
6
+ export var TranslateLanguage;
7
+ (function (TranslateLanguage) {
8
+ TranslateLanguage["korean"] = "ko";
9
+ TranslateLanguage["english"] = "en";
10
+ TranslateLanguage["japanese"] = "ja";
11
+ TranslateLanguage["chinese_simplified"] = "zh-CN";
12
+ TranslateLanguage["chinese_traditional"] = "zh-TW";
13
+ TranslateLanguage["vietnamese"] = "vi";
14
+ })(TranslateLanguage || (TranslateLanguage = {}));
@@ -0,0 +1,13 @@
1
+ export declare enum FileType {
2
+ default = "DEFAULT",
3
+ picket = "PICKET"
4
+ }
5
+ export interface BaseFile {
6
+ name: string;
7
+ ext: string;
8
+ url: string;
9
+ }
10
+ export interface UploadFile extends BaseFile {
11
+ type: FileType;
12
+ auto?: boolean;
13
+ }
@@ -0,0 +1,5 @@
1
+ export var FileType;
2
+ (function (FileType) {
3
+ FileType["default"] = "DEFAULT";
4
+ FileType["picket"] = "PICKET";
5
+ })(FileType || (FileType = {}));
@@ -0,0 +1,25 @@
1
+ /**
2
+ * 항공편
3
+ */
4
+ interface BaseFlight {
5
+ ymd: string;
6
+ name: string;
7
+ iata: string;
8
+ selectType: 'AUTO' | 'MANUAL';
9
+ }
10
+ export interface FlightAuto extends BaseFlight {
11
+ selectType: 'AUTO';
12
+ arrive: string;
13
+ departure: string;
14
+ carrier: string;
15
+ flightNumber: string;
16
+ arrivalAirport: string;
17
+ departureAirport: string;
18
+ delay: boolean;
19
+ arrivalTerminal: string;
20
+ }
21
+ export interface FlightManual extends BaseFlight {
22
+ selectType: 'MANUAL';
23
+ }
24
+ export type Flight = FlightAuto | FlightManual;
25
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ export * from './booking';
2
+ export * from './common';
3
+ export * from './file';
4
+ export * from './flight';
5
+ export * from './price';
@@ -0,0 +1,5 @@
1
+ export * from './booking';
2
+ export * from './common';
3
+ export * from './file';
4
+ export * from './flight';
5
+ export * from './price';
@@ -0,0 +1,18 @@
1
+ import type { CarInfo } from './booking';
2
+ export interface SearchPriceV2 {
3
+ serviceType: string;
4
+ psno: string;
5
+ useTime: number;
6
+ calcType: string;
7
+ price: number;
8
+ forex: string;
9
+ partnerName: string;
10
+ carInfo: CarInfo;
11
+ cacheCode: string;
12
+ serviceZone: {
13
+ code: string;
14
+ title: string;
15
+ type: string;
16
+ }[];
17
+ wayPoints: any[];
18
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,14 @@
1
+ export declare const randomize: (length: number) => string;
2
+ export declare const comma: (param: number | string) => string;
3
+ export declare function getCarName(carKind: {
4
+ type: string;
5
+ maker: string;
6
+ model: string;
7
+ subModelList: string[];
8
+ seat: number;
9
+ }, option?: {
10
+ subModel?: boolean;
11
+ brand?: boolean;
12
+ seat?: boolean;
13
+ seatPostfix?: string;
14
+ }): string;
@@ -0,0 +1,48 @@
1
+ export const randomize = (length) => {
2
+ let result = '';
3
+ const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
4
+ for (var i = 0; i < length; i++) {
5
+ result += characters.charAt(Math.floor(Math.random() * characters.length));
6
+ }
7
+ return result;
8
+ };
9
+ export const comma = (param) => {
10
+ return !param && param !== 0 ? '0' : param.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
11
+ };
12
+ export function getCarName(carKind, option = { subModel: false, brand: false, seat: false, seatPostfix: null }) {
13
+ const data = {
14
+ type: null,
15
+ maker: null,
16
+ model: null,
17
+ subModelList: [],
18
+ seat: null,
19
+ ...carKind
20
+ };
21
+ const { type, maker, model, subModelList, seat } = data;
22
+ let carName = '';
23
+ if (type === 'MULTI') {
24
+ let names = [];
25
+ if (model)
26
+ names.push(model);
27
+ if (option.subModel && subModelList?.length > 0) {
28
+ names.push(`(${carKind.subModelList?.join(',')})`);
29
+ }
30
+ carName = names.join(' ');
31
+ }
32
+ else {
33
+ // type이 없거나, single일때
34
+ let names = [];
35
+ if (option.brand && maker)
36
+ names.push(maker);
37
+ if (model)
38
+ names.push(model);
39
+ carName = names.join(' / ');
40
+ }
41
+ let result = [];
42
+ if (carName)
43
+ result.push(carName);
44
+ if (option.seat && seat) {
45
+ result.push(option.seatPostfix ? `${seat} ${option.seatPostfix}` : `${seat}`);
46
+ }
47
+ return result.join(' / ');
48
+ }
package/package.json ADDED
@@ -0,0 +1,62 @@
1
+ {
2
+ "name": "@movvjs/svelte-schedule-view",
3
+ "version": "0.0.1",
4
+ "type": "module",
5
+ "license": "ISC",
6
+ "author": {
7
+ "name": "Hyeok Jun Kim"
8
+ },
9
+ "scripts": {
10
+ "dev": "vite dev",
11
+ "build": "vite build && npm run package",
12
+ "preview": "vite preview",
13
+ "package": "svelte-kit sync && svelte-package && publint",
14
+ "prepublishOnly": "npm run package",
15
+ "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
16
+ "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch"
17
+ },
18
+ "exports": {
19
+ ".": {
20
+ "types": "./dist/index.d.ts",
21
+ "svelte": "./dist/index.js"
22
+ }
23
+ },
24
+ "files": [
25
+ "dist",
26
+ "!dist/**/*.test.*",
27
+ "!dist/**/*.spec.*"
28
+ ],
29
+ "peerDependencies": {
30
+ "svelte": "^4.0.0"
31
+ },
32
+ "devDependencies": {
33
+ "@sveltejs/adapter-auto": "^3.0.0",
34
+ "@sveltejs/kit": "^2.0.0",
35
+ "@sveltejs/package": "^2.0.0",
36
+ "@sveltejs/vite-plugin-svelte": "^3.0.0",
37
+ "@types/google.maps": "^3.55.8",
38
+ "@types/lodash-es": "^4.17.12",
39
+ "@types/qs": "^6.9.15",
40
+ "@types/sortablejs": "^1.15.8",
41
+ "publint": "^0.1.9",
42
+ "sass": "^1.77.0",
43
+ "svelte": "^4.2.7",
44
+ "svelte-check": "^3.6.0",
45
+ "tslib": "^2.4.1",
46
+ "typescript": "^5.0.0",
47
+ "vite": "^5.0.11"
48
+ },
49
+ "svelte": "./dist/index.js",
50
+ "types": "./dist/index.d.ts",
51
+ "dependencies": {
52
+ "axios": "^1.6.8",
53
+ "dayjs": "^1.11.11",
54
+ "intl-messageformat": "^10.5.12",
55
+ "lodash-es": "^4.17.21",
56
+ "qs": "^6.12.1",
57
+ "sortablejs": "^1.15.2",
58
+ "svelte-french-toast": "^1.2.0",
59
+ "svelte-i18n": "^4.0.0",
60
+ "svelte-portal": "^2.2.1"
61
+ }
62
+ }