@kanda-libs/ks-component-ts 0.2.267 → 0.2.269
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/index.d.ts +9455 -9127
- package/dist/index.esm.js +3 -3
- package/dist/index.esm.js.map +3 -3
- package/package.json +1 -1
- package/src/field/components/AutoSizeTextArea/AutoSizeTextAreaUncontrolled/index.tsx +1 -1
- package/src/field/components/AutoSizeTextArea/AutoSizeTextAreaUncontrolled/types.d.ts +4 -0
- package/src/field/components/TextAreaInput/TextAreaInputUncontrolled.tsx +3 -2
- package/src/generated/components/schemas/CompanyInfo.ts +3 -0
- package/src/generated/components/schemas/Enterprise.ts +4 -1
- package/src/generated/components/schemas/InfoTrade.ts +17 -0
- package/src/generated/components/schemas/LatLng.ts +11 -0
- package/src/generated/components/schemas/Lead.ts +4 -0
- package/src/generated/components/schemas/TradeSummary.ts +25 -0
- package/src/generated/components/schemas/index.ts +3 -0
- package/src/generated/operations/connectTradesLead.ts +45 -0
- package/src/generated/operations/index.ts +30 -0
- package/src/generated/operations/matchTradesLead.ts +39 -0
- package/src/generated/operations/quoteJob.ts +35 -0
- package/src/generated/widget/index.tsx +47972 -46565
package/package.json
CHANGED
|
@@ -48,7 +48,7 @@ const AutoSizeTextAreaUncontrolled: FunctionComponent<
|
|
|
48
48
|
</div>
|
|
49
49
|
</div>
|
|
50
50
|
) : (
|
|
51
|
-
<div className="flex flex-row
|
|
51
|
+
<div className="relative flex flex-row w-full overflow-hidden">
|
|
52
52
|
{showPlaceholder && (
|
|
53
53
|
<span className={placeholderClassName}>{value}</span>
|
|
54
54
|
)}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import React, { type FunctionComponent } from "react";
|
|
1
|
+
import React, { type HTMLProps, type FunctionComponent } from "react";
|
|
2
2
|
import Skeleton from "react-loading-skeleton";
|
|
3
3
|
import useTextAreaInputClasses from "./useTextAreaInputClasses";
|
|
4
4
|
import { SKELETON_COUNT } from "./constants";
|
|
5
5
|
import { DefaultFormFieldProps } from "~/field/types";
|
|
6
6
|
import { Uncontrolled as AutoSizeTextArea } from "~/field/components/AutoSizeTextArea";
|
|
7
7
|
|
|
8
|
-
export interface TextAreaInputUncontrolledProps
|
|
8
|
+
export interface TextAreaInputUncontrolledProps
|
|
9
|
+
extends HTMLProps<HTMLTextAreaElement> {
|
|
9
10
|
className?: string;
|
|
10
11
|
autoSize?: string;
|
|
11
12
|
}
|
|
@@ -3,6 +3,7 @@ import { ContractAgreement } from "./ContractAgreement";
|
|
|
3
3
|
import { Document } from "./Document";
|
|
4
4
|
import { OnlinePresence } from "./OnlinePresence";
|
|
5
5
|
import { Pence } from "./Pence";
|
|
6
|
+
import { WorkType } from "./WorkType";
|
|
6
7
|
|
|
7
8
|
export const CompanyInfo = t.intersection([
|
|
8
9
|
t.type({
|
|
@@ -80,6 +81,7 @@ export const CompanyInfo = t.intersection([
|
|
|
80
81
|
online_presence: OnlinePresence,
|
|
81
82
|
insurance_document: Document,
|
|
82
83
|
contract_agreement: ContractAgreement,
|
|
84
|
+
work_types: t.array(WorkType),
|
|
83
85
|
}),
|
|
84
86
|
]);
|
|
85
87
|
|
|
@@ -154,4 +156,5 @@ export interface CompanyInfo {
|
|
|
154
156
|
online_presence?: OnlinePresence;
|
|
155
157
|
insurance_document?: Document;
|
|
156
158
|
contract_agreement?: ContractAgreement;
|
|
159
|
+
work_types?: Array<WorkType>;
|
|
157
160
|
}
|
|
@@ -7,6 +7,7 @@ export const Enterprise = t.intersection([
|
|
|
7
7
|
t.type({
|
|
8
8
|
enterprise_type: t.union([
|
|
9
9
|
t.literal("main_office"),
|
|
10
|
+
t.literal("region_office"),
|
|
10
11
|
t.literal("branch_office"),
|
|
11
12
|
]),
|
|
12
13
|
contact_info: ContactInfo,
|
|
@@ -17,6 +18,7 @@ export const Enterprise = t.intersection([
|
|
|
17
18
|
aid: t.string,
|
|
18
19
|
oid: t.string,
|
|
19
20
|
eid: t.string,
|
|
21
|
+
rid: t.string,
|
|
20
22
|
bid: t.string,
|
|
21
23
|
subdomain: t.string,
|
|
22
24
|
branch_code: t.string,
|
|
@@ -32,8 +34,9 @@ export interface Enterprise {
|
|
|
32
34
|
aid?: string;
|
|
33
35
|
oid?: string;
|
|
34
36
|
eid?: string;
|
|
37
|
+
rid?: string;
|
|
35
38
|
bid?: string;
|
|
36
|
-
enterprise_type: "main_office" | "branch_office";
|
|
39
|
+
enterprise_type: "main_office" | "region_office" | "branch_office";
|
|
37
40
|
subdomain?: string;
|
|
38
41
|
branch_code?: string;
|
|
39
42
|
emails?: Array<string>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as t from "io-ts";
|
|
2
|
+
import { Address } from "./Address";
|
|
3
|
+
import { LatLng } from "./LatLng";
|
|
4
|
+
|
|
5
|
+
export const InfoTrade = t.intersection([
|
|
6
|
+
t.type({
|
|
7
|
+
address: Address,
|
|
8
|
+
}),
|
|
9
|
+
t.partial({
|
|
10
|
+
lat_lng: LatLng,
|
|
11
|
+
}),
|
|
12
|
+
]);
|
|
13
|
+
|
|
14
|
+
export interface InfoTrade {
|
|
15
|
+
address: Address;
|
|
16
|
+
lat_lng?: LatLng;
|
|
17
|
+
}
|
|
@@ -11,6 +11,8 @@ import { Money } from "./Money";
|
|
|
11
11
|
export const Lead = t.intersection([
|
|
12
12
|
t.type({
|
|
13
13
|
expired_at: DateFromISOString,
|
|
14
|
+
connected: t.array(t.string),
|
|
15
|
+
accepted: t.array(t.string),
|
|
14
16
|
status: t.union([
|
|
15
17
|
t.literal("issued"),
|
|
16
18
|
t.literal("open"),
|
|
@@ -59,6 +61,8 @@ export interface Lead {
|
|
|
59
61
|
expired_at: Date;
|
|
60
62
|
xid?: string;
|
|
61
63
|
xref?: string;
|
|
64
|
+
connected: Array<string>;
|
|
65
|
+
accepted: Array<string>;
|
|
62
66
|
status:
|
|
63
67
|
| "issued"
|
|
64
68
|
| "open"
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as t from "io-ts";
|
|
2
|
+
import { ContactInfo } from "./ContactInfo";
|
|
3
|
+
import { Document } from "./Document";
|
|
4
|
+
import { LatLng } from "./LatLng";
|
|
5
|
+
import { WorkType } from "./WorkType";
|
|
6
|
+
|
|
7
|
+
export const TradeSummary = t.partial({
|
|
8
|
+
cid: t.string,
|
|
9
|
+
contact_info: ContactInfo,
|
|
10
|
+
trading_type: t.string,
|
|
11
|
+
company_logo: Document,
|
|
12
|
+
work_types: t.array(WorkType),
|
|
13
|
+
lat_lng: LatLng,
|
|
14
|
+
distance: t.number,
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
export interface TradeSummary {
|
|
18
|
+
cid?: string;
|
|
19
|
+
contact_info?: ContactInfo;
|
|
20
|
+
trading_type?: string;
|
|
21
|
+
company_logo?: Document;
|
|
22
|
+
work_types?: Array<WorkType>;
|
|
23
|
+
lat_lng?: LatLng;
|
|
24
|
+
distance?: number;
|
|
25
|
+
}
|
|
@@ -51,12 +51,14 @@ export * from "./InfoOnboarding";
|
|
|
51
51
|
export * from "./InfoPartnerBranding";
|
|
52
52
|
export * from "./InfoQuery";
|
|
53
53
|
export * from "./InfoSession";
|
|
54
|
+
export * from "./InfoTrade";
|
|
54
55
|
export * from "./InfoValidationEmail";
|
|
55
56
|
export * from "./Job";
|
|
56
57
|
export * from "./JobCompanyInfo";
|
|
57
58
|
export * from "./JobCreditState";
|
|
58
59
|
export * from "./JobItem";
|
|
59
60
|
export * from "./JobOverride";
|
|
61
|
+
export * from "./LatLng";
|
|
60
62
|
export * from "./Lead";
|
|
61
63
|
export * from "./LeadApplicant";
|
|
62
64
|
export * from "./LeadQuote";
|
|
@@ -92,6 +94,7 @@ export * from "./SoleTraderInfo";
|
|
|
92
94
|
export * from "./Subscription";
|
|
93
95
|
export * from "./Tally";
|
|
94
96
|
export * from "./Title";
|
|
97
|
+
export * from "./TradeSummary";
|
|
95
98
|
export * from "./UserEvent";
|
|
96
99
|
export * from "./UserType";
|
|
97
100
|
export * from "./UTM";
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { RequestFunction } from "@openapi-io-ts/runtime";
|
|
2
|
+
import * as t from "io-ts";
|
|
3
|
+
import * as parameters from "../components/parameters";
|
|
4
|
+
import * as schemas from "../components/schemas";
|
|
5
|
+
|
|
6
|
+
export type ConnectTradesLeadRequestParameters = {
|
|
7
|
+
id: string;
|
|
8
|
+
x_kanda_bid?: string;
|
|
9
|
+
x_kanda_cid?: string;
|
|
10
|
+
x_kanda_eid?: string;
|
|
11
|
+
x_kanda_tid?: string;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export const connectTradesLeadOperation = {
|
|
15
|
+
path: "/api/lead/{id}/connect-trades",
|
|
16
|
+
method: "post",
|
|
17
|
+
responses: {
|
|
18
|
+
"200": { _tag: "JsonResponse", decoder: t.array(schemas.TradeSummary) },
|
|
19
|
+
default: { _tag: "JsonResponse", decoder: schemas.Error },
|
|
20
|
+
},
|
|
21
|
+
parameters: [
|
|
22
|
+
{
|
|
23
|
+
_tag: "FormParameter",
|
|
24
|
+
explode: false,
|
|
25
|
+
in: "path",
|
|
26
|
+
name: "id",
|
|
27
|
+
},
|
|
28
|
+
parameters.x_kanda_bid,
|
|
29
|
+
parameters.x_kanda_cid,
|
|
30
|
+
parameters.x_kanda_eid,
|
|
31
|
+
parameters.x_kanda_tid,
|
|
32
|
+
],
|
|
33
|
+
requestDefaultHeaders: {
|
|
34
|
+
"Content-Type": "application/json",
|
|
35
|
+
Accept: "application/json",
|
|
36
|
+
},
|
|
37
|
+
body: {
|
|
38
|
+
_tag: "JsonBody",
|
|
39
|
+
},
|
|
40
|
+
} as const;
|
|
41
|
+
|
|
42
|
+
export type ConnectTradesLeadRequestFunction = RequestFunction<
|
|
43
|
+
{ params: ConnectTradesLeadRequestParameters; body: Array<unknown> },
|
|
44
|
+
Array<schemas.TradeSummary>
|
|
45
|
+
>;
|
|
@@ -25,6 +25,10 @@ import {
|
|
|
25
25
|
completeJobOperation,
|
|
26
26
|
CompleteJobRequestFunction,
|
|
27
27
|
} from "./completeJob";
|
|
28
|
+
import {
|
|
29
|
+
connectTradesLeadOperation,
|
|
30
|
+
ConnectTradesLeadRequestFunction,
|
|
31
|
+
} from "./connectTradesLead";
|
|
28
32
|
import {
|
|
29
33
|
declineCompanyOperation,
|
|
30
34
|
DeclineCompanyRequestFunction,
|
|
@@ -225,6 +229,10 @@ import {
|
|
|
225
229
|
markPaymentOperation,
|
|
226
230
|
MarkPaymentRequestFunction,
|
|
227
231
|
} from "./markPayment";
|
|
232
|
+
import {
|
|
233
|
+
matchTradesLeadOperation,
|
|
234
|
+
MatchTradesLeadRequestFunction,
|
|
235
|
+
} from "./matchTradesLead";
|
|
228
236
|
import { meOperation, MeRequestFunction } from "./me";
|
|
229
237
|
import {
|
|
230
238
|
overrideJobOperation,
|
|
@@ -332,6 +340,7 @@ import {
|
|
|
332
340
|
quoteCreditOperation,
|
|
333
341
|
QuoteCreditRequestFunction,
|
|
334
342
|
} from "./quoteCredit";
|
|
343
|
+
import { quoteJobOperation, QuoteJobRequestFunction } from "./quoteJob";
|
|
335
344
|
import { quoteLeadOperation, QuoteLeadRequestFunction } from "./quoteLead";
|
|
336
345
|
import { reapplyJobOperation, ReapplyJobRequestFunction } from "./reapplyJob";
|
|
337
346
|
import { referLeadOperation, ReferLeadRequestFunction } from "./referLead";
|
|
@@ -426,6 +435,7 @@ export const operations: Operations = {
|
|
|
426
435
|
completeJob: completeJobOperation,
|
|
427
436
|
archiveJob: archiveJobOperation,
|
|
428
437
|
unarchiveJob: unarchiveJobOperation,
|
|
438
|
+
quoteJob: quoteJobOperation,
|
|
429
439
|
applyJob: applyJobOperation,
|
|
430
440
|
reapplyJob: reapplyJobOperation,
|
|
431
441
|
payJob: payJobOperation,
|
|
@@ -465,6 +475,8 @@ export const operations: Operations = {
|
|
|
465
475
|
quoteLead: quoteLeadOperation,
|
|
466
476
|
tradeLead: tradeLeadOperation,
|
|
467
477
|
tradeQuoteApprovalLead: tradeQuoteApprovalLeadOperation,
|
|
478
|
+
matchTradesLead: matchTradesLeadOperation,
|
|
479
|
+
connectTradesLead: connectTradesLeadOperation,
|
|
468
480
|
referLead: referLeadOperation,
|
|
469
481
|
getSubscriptions: getSubscriptionsOperation,
|
|
470
482
|
postSubscription: postSubscriptionOperation,
|
|
@@ -558,6 +570,7 @@ export interface OperationRequestFunctionMap {
|
|
|
558
570
|
completeJob: CompleteJobRequestFunction;
|
|
559
571
|
archiveJob: ArchiveJobRequestFunction;
|
|
560
572
|
unarchiveJob: UnarchiveJobRequestFunction;
|
|
573
|
+
quoteJob: QuoteJobRequestFunction;
|
|
561
574
|
applyJob: ApplyJobRequestFunction;
|
|
562
575
|
reapplyJob: ReapplyJobRequestFunction;
|
|
563
576
|
payJob: PayJobRequestFunction;
|
|
@@ -597,6 +610,8 @@ export interface OperationRequestFunctionMap {
|
|
|
597
610
|
quoteLead: QuoteLeadRequestFunction;
|
|
598
611
|
tradeLead: TradeLeadRequestFunction;
|
|
599
612
|
tradeQuoteApprovalLead: TradeQuoteApprovalLeadRequestFunction;
|
|
613
|
+
matchTradesLead: MatchTradesLeadRequestFunction;
|
|
614
|
+
connectTradesLead: ConnectTradesLeadRequestFunction;
|
|
600
615
|
referLead: ReferLeadRequestFunction;
|
|
601
616
|
getSubscriptions: GetSubscriptionsRequestFunction;
|
|
602
617
|
postSubscription: PostSubscriptionRequestFunction;
|
|
@@ -782,6 +797,7 @@ export const requestFunctionsBuilder = (
|
|
|
782
797
|
completeJob: requestFunctionBuilder(operations.completeJob, requestAdapter),
|
|
783
798
|
archiveJob: requestFunctionBuilder(operations.archiveJob, requestAdapter),
|
|
784
799
|
unarchiveJob: requestFunctionBuilder(operations.unarchiveJob, requestAdapter),
|
|
800
|
+
quoteJob: requestFunctionBuilder(operations.quoteJob, requestAdapter),
|
|
785
801
|
applyJob: requestFunctionBuilder(operations.applyJob, requestAdapter),
|
|
786
802
|
reapplyJob: requestFunctionBuilder(operations.reapplyJob, requestAdapter),
|
|
787
803
|
payJob: requestFunctionBuilder(operations.payJob, requestAdapter),
|
|
@@ -845,6 +861,14 @@ export const requestFunctionsBuilder = (
|
|
|
845
861
|
operations.tradeQuoteApprovalLead,
|
|
846
862
|
requestAdapter
|
|
847
863
|
),
|
|
864
|
+
matchTradesLead: requestFunctionBuilder(
|
|
865
|
+
operations.matchTradesLead,
|
|
866
|
+
requestAdapter
|
|
867
|
+
),
|
|
868
|
+
connectTradesLead: requestFunctionBuilder(
|
|
869
|
+
operations.connectTradesLead,
|
|
870
|
+
requestAdapter
|
|
871
|
+
),
|
|
848
872
|
referLead: requestFunctionBuilder(operations.referLead, requestAdapter),
|
|
849
873
|
getSubscriptions: requestFunctionBuilder(
|
|
850
874
|
operations.getSubscriptions,
|
|
@@ -964,6 +988,7 @@ export const jobServiceBuilder = (
|
|
|
964
988
|
completeJob: requestFunctions.completeJob,
|
|
965
989
|
archiveJob: requestFunctions.archiveJob,
|
|
966
990
|
unarchiveJob: requestFunctions.unarchiveJob,
|
|
991
|
+
quoteJob: requestFunctions.quoteJob,
|
|
967
992
|
applyJob: requestFunctions.applyJob,
|
|
968
993
|
reapplyJob: requestFunctions.reapplyJob,
|
|
969
994
|
payJob: requestFunctions.payJob,
|
|
@@ -1146,6 +1171,8 @@ export const leadServiceBuilder = (
|
|
|
1146
1171
|
quoteLead: requestFunctions.quoteLead,
|
|
1147
1172
|
tradeLead: requestFunctions.tradeLead,
|
|
1148
1173
|
tradeQuoteApprovalLead: requestFunctions.tradeQuoteApprovalLead,
|
|
1174
|
+
matchTradesLead: requestFunctions.matchTradesLead,
|
|
1175
|
+
connectTradesLead: requestFunctions.connectTradesLead,
|
|
1149
1176
|
referLead: requestFunctions.referLead,
|
|
1150
1177
|
});
|
|
1151
1178
|
|
|
@@ -1259,6 +1286,7 @@ export interface Operations {
|
|
|
1259
1286
|
completeJob: typeof completeJobOperation;
|
|
1260
1287
|
archiveJob: typeof archiveJobOperation;
|
|
1261
1288
|
unarchiveJob: typeof unarchiveJobOperation;
|
|
1289
|
+
quoteJob: typeof quoteJobOperation;
|
|
1262
1290
|
applyJob: typeof applyJobOperation;
|
|
1263
1291
|
reapplyJob: typeof reapplyJobOperation;
|
|
1264
1292
|
payJob: typeof payJobOperation;
|
|
@@ -1298,6 +1326,8 @@ export interface Operations {
|
|
|
1298
1326
|
quoteLead: typeof quoteLeadOperation;
|
|
1299
1327
|
tradeLead: typeof tradeLeadOperation;
|
|
1300
1328
|
tradeQuoteApprovalLead: typeof tradeQuoteApprovalLeadOperation;
|
|
1329
|
+
matchTradesLead: typeof matchTradesLeadOperation;
|
|
1330
|
+
connectTradesLead: typeof connectTradesLeadOperation;
|
|
1301
1331
|
referLead: typeof referLeadOperation;
|
|
1302
1332
|
getSubscriptions: typeof getSubscriptionsOperation;
|
|
1303
1333
|
postSubscription: typeof postSubscriptionOperation;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { RequestFunction } from "@openapi-io-ts/runtime";
|
|
2
|
+
import * as t from "io-ts";
|
|
3
|
+
import * as parameters from "../components/parameters";
|
|
4
|
+
import * as schemas from "../components/schemas";
|
|
5
|
+
|
|
6
|
+
export type MatchTradesLeadRequestParameters = {
|
|
7
|
+
id: string;
|
|
8
|
+
x_kanda_bid?: string;
|
|
9
|
+
x_kanda_cid?: string;
|
|
10
|
+
x_kanda_eid?: string;
|
|
11
|
+
x_kanda_tid?: string;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export const matchTradesLeadOperation = {
|
|
15
|
+
path: "/api/lead/{id}/match-trades",
|
|
16
|
+
method: "post",
|
|
17
|
+
responses: {
|
|
18
|
+
"200": { _tag: "JsonResponse", decoder: t.array(schemas.TradeSummary) },
|
|
19
|
+
default: { _tag: "JsonResponse", decoder: schemas.Error },
|
|
20
|
+
},
|
|
21
|
+
parameters: [
|
|
22
|
+
{
|
|
23
|
+
_tag: "FormParameter",
|
|
24
|
+
explode: false,
|
|
25
|
+
in: "path",
|
|
26
|
+
name: "id",
|
|
27
|
+
},
|
|
28
|
+
parameters.x_kanda_bid,
|
|
29
|
+
parameters.x_kanda_cid,
|
|
30
|
+
parameters.x_kanda_eid,
|
|
31
|
+
parameters.x_kanda_tid,
|
|
32
|
+
],
|
|
33
|
+
requestDefaultHeaders: { Accept: "application/json" },
|
|
34
|
+
} as const;
|
|
35
|
+
|
|
36
|
+
export type MatchTradesLeadRequestFunction = RequestFunction<
|
|
37
|
+
{ params: MatchTradesLeadRequestParameters },
|
|
38
|
+
Array<schemas.TradeSummary>
|
|
39
|
+
>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { RequestFunction } from "@openapi-io-ts/runtime";
|
|
2
|
+
import * as schemas from "../components/schemas";
|
|
3
|
+
|
|
4
|
+
export type QuoteJobRequestParameters = {
|
|
5
|
+
id: string;
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export const quoteJobOperation = {
|
|
9
|
+
path: "/api/job/{id}/quote",
|
|
10
|
+
method: "post",
|
|
11
|
+
responses: {
|
|
12
|
+
"200": { _tag: "JsonResponse", decoder: schemas.Job },
|
|
13
|
+
default: { _tag: "JsonResponse", decoder: schemas.Error },
|
|
14
|
+
},
|
|
15
|
+
parameters: [
|
|
16
|
+
{
|
|
17
|
+
_tag: "FormParameter",
|
|
18
|
+
explode: false,
|
|
19
|
+
in: "path",
|
|
20
|
+
name: "id",
|
|
21
|
+
},
|
|
22
|
+
],
|
|
23
|
+
requestDefaultHeaders: {
|
|
24
|
+
"Content-Type": "application/json",
|
|
25
|
+
Accept: "application/json",
|
|
26
|
+
},
|
|
27
|
+
body: {
|
|
28
|
+
_tag: "JsonBody",
|
|
29
|
+
},
|
|
30
|
+
} as const;
|
|
31
|
+
|
|
32
|
+
export type QuoteJobRequestFunction = RequestFunction<
|
|
33
|
+
{ params: QuoteJobRequestParameters; body: schemas.LeadApplicant },
|
|
34
|
+
schemas.Job
|
|
35
|
+
>;
|