@kanda-libs/ks-component-ts 0.2.249-qa → 0.2.250

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 (29) hide show
  1. package/app/.yalc/@kanda-libs/ks-component-ts/dist/index.esm.js +3 -3
  2. package/app/.yalc/@kanda-libs/ks-component-ts/dist/index.esm.js.map +3 -3
  3. package/app/.yalc/@kanda-libs/ks-component-ts/package.json +2 -2
  4. package/app/.yalc/@kanda-libs/ks-component-ts/yalc.sig +1 -1
  5. package/app/src/App.tsx +15 -12
  6. package/app/yalc.lock +1 -1
  7. package/dist/index.d.ts +9912 -9912
  8. package/dist/index.esm.js +3 -3
  9. package/dist/index.esm.js.map +3 -3
  10. package/package.json +1 -1
  11. package/src/field/components/BasicNumberInput/BasicNumberInputUncontrolled/index.tsx +2 -1
  12. package/src/field/components/BasicNumberInput/BasicNumberInputUncontrolled/useBasicNumberInputUncontrolledProps.ts +5 -0
  13. package/src/generated/components/parameters/index.ts +5 -4
  14. package/src/generated/components/parameters/{xKandaBid.ts → x_kanda_bid.ts} +1 -1
  15. package/src/generated/components/parameters/{xKandaCid.ts → x_kanda_cid.ts} +1 -1
  16. package/src/generated/components/parameters/{xKandaEid.ts → x_kanda_eid.ts} +1 -1
  17. package/src/generated/components/parameters/x_kanda_protected.ts +8 -0
  18. package/src/generated/components/parameters/{xKandaTid.ts → x_kanda_tid.ts} +1 -1
  19. package/src/generated/operations/deleteLead.ts +8 -8
  20. package/src/generated/operations/getLead.ts +8 -8
  21. package/src/generated/operations/getLeads.ts +8 -8
  22. package/src/generated/operations/postLead.ts +28 -9
  23. package/src/generated/operations/postMe.ts +7 -2
  24. package/src/generated/operations/putLead.ts +8 -8
  25. package/src/generated/operations/quoteLead.ts +8 -8
  26. package/src/generated/operations/referLead.ts +8 -8
  27. package/src/generated/operations/tradeLead.ts +8 -8
  28. package/src/generated/operations/tradeQuoteApprovalLead.ts +8 -8
  29. package/src/generated/widget/index.tsx +43719 -43718
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kanda-libs/ks-component-ts",
3
- "version": "0.2.249-qa",
3
+ "version": "0.2.250",
4
4
  "description": "Kanda form component library",
5
5
  "main": "dist/index.esm.js",
6
6
  "module": "dist/index.esm.js",
@@ -50,7 +50,8 @@ const BasicNumberInputUncontrolled: FunctionComponent<BasicNumberInputUncontroll
50
50
  isAllowed,
51
51
  });
52
52
 
53
- const focusedValue = currentValue ? formatForDisplay(currentValue) : "";
53
+ const focusedValue =
54
+ typeof currentValue !== "undefined" ? formatForDisplay(currentValue) : "";
54
55
  const readOnlyProps = stripUnneededProps(props);
55
56
 
56
57
  // DEV_NOTE: removed register here as need to register name and
@@ -66,6 +66,11 @@ export default function useBasicInputUncontrolledProps({
66
66
 
67
67
  initialOnChange(e);
68
68
 
69
+ if (value.length === 0) {
70
+ setValue(name as string, undefined);
71
+ return;
72
+ }
73
+
69
74
  const nextValue = formatForValue(parseFloat(value)) || 0;
70
75
  const formattedNextValue = nextValue >= 0 ? nextValue : nextValue * -1;
71
76
 
@@ -1,6 +1,7 @@
1
1
  export * from "./format";
2
2
  export * from "./q";
3
- export * from "./xKandaBid";
4
- export * from "./xKandaCid";
5
- export * from "./xKandaEid";
6
- export * from "./xKandaTid";
3
+ export * from "./x_kanda_bid";
4
+ export * from "./x_kanda_cid";
5
+ export * from "./x_kanda_eid";
6
+ export * from "./x_kanda_protected";
7
+ export * from "./x_kanda_tid";
@@ -1,6 +1,6 @@
1
1
  import { OperationParameter } from "@openapi-io-ts/runtime";
2
2
 
3
- export const xKandaBid: OperationParameter = {
3
+ export const x_kanda_bid: OperationParameter = {
4
4
  _tag: "FormParameter",
5
5
  explode: false,
6
6
  in: "header",
@@ -1,6 +1,6 @@
1
1
  import { OperationParameter } from "@openapi-io-ts/runtime";
2
2
 
3
- export const xKandaCid: OperationParameter = {
3
+ export const x_kanda_cid: OperationParameter = {
4
4
  _tag: "FormParameter",
5
5
  explode: false,
6
6
  in: "header",
@@ -1,6 +1,6 @@
1
1
  import { OperationParameter } from "@openapi-io-ts/runtime";
2
2
 
3
- export const xKandaEid: OperationParameter = {
3
+ export const x_kanda_eid: OperationParameter = {
4
4
  _tag: "FormParameter",
5
5
  explode: false,
6
6
  in: "header",
@@ -0,0 +1,8 @@
1
+ import { OperationParameter } from "@openapi-io-ts/runtime";
2
+
3
+ export const x_kanda_protected: OperationParameter = {
4
+ _tag: "FormParameter",
5
+ explode: false,
6
+ in: "header",
7
+ name: "x_kanda_protected",
8
+ };
@@ -1,6 +1,6 @@
1
1
  import { OperationParameter } from "@openapi-io-ts/runtime";
2
2
 
3
- export const xKandaTid: OperationParameter = {
3
+ export const x_kanda_tid: OperationParameter = {
4
4
  _tag: "FormParameter",
5
5
  explode: false,
6
6
  in: "header",
@@ -4,10 +4,10 @@ import * as schemas from "../components/schemas";
4
4
 
5
5
  export type DeleteLeadRequestParameters = {
6
6
  id: string;
7
- xKandaBid?: string;
8
- xKandaCid?: string;
9
- xKandaEid?: string;
10
- xKandaTid?: string;
7
+ x_kanda_bid?: string;
8
+ x_kanda_cid?: string;
9
+ x_kanda_eid?: string;
10
+ x_kanda_tid?: string;
11
11
  };
12
12
 
13
13
  export const deleteLeadOperation = {
@@ -24,10 +24,10 @@ export const deleteLeadOperation = {
24
24
  in: "path",
25
25
  name: "id",
26
26
  },
27
- parameters.xKandaBid,
28
- parameters.xKandaCid,
29
- parameters.xKandaEid,
30
- parameters.xKandaTid,
27
+ parameters.x_kanda_bid,
28
+ parameters.x_kanda_cid,
29
+ parameters.x_kanda_eid,
30
+ parameters.x_kanda_tid,
31
31
  ],
32
32
  requestDefaultHeaders: { Accept: "application/json" },
33
33
  } as const;
@@ -4,10 +4,10 @@ import * as schemas from "../components/schemas";
4
4
 
5
5
  export type GetLeadRequestParameters = {
6
6
  id: string;
7
- xKandaBid?: string;
8
- xKandaCid?: string;
9
- xKandaEid?: string;
10
- xKandaTid?: string;
7
+ x_kanda_bid?: string;
8
+ x_kanda_cid?: string;
9
+ x_kanda_eid?: string;
10
+ x_kanda_tid?: string;
11
11
  };
12
12
 
13
13
  export const getLeadOperation = {
@@ -24,10 +24,10 @@ export const getLeadOperation = {
24
24
  in: "path",
25
25
  name: "id",
26
26
  },
27
- parameters.xKandaBid,
28
- parameters.xKandaCid,
29
- parameters.xKandaEid,
30
- parameters.xKandaTid,
27
+ parameters.x_kanda_bid,
28
+ parameters.x_kanda_cid,
29
+ parameters.x_kanda_eid,
30
+ parameters.x_kanda_tid,
31
31
  ],
32
32
  requestDefaultHeaders: { Accept: "application/json" },
33
33
  } as const;
@@ -6,10 +6,10 @@ import * as schemas from "../components/schemas";
6
6
  export type GetLeadsRequestParameters = {
7
7
  format?: "reduced" | "full";
8
8
  q?: string;
9
- xKandaBid?: string;
10
- xKandaCid?: string;
11
- xKandaEid?: string;
12
- xKandaTid?: string;
9
+ x_kanda_bid?: string;
10
+ x_kanda_cid?: string;
11
+ x_kanda_eid?: string;
12
+ x_kanda_tid?: string;
13
13
  };
14
14
 
15
15
  export const getLeadsOperation = {
@@ -22,10 +22,10 @@ export const getLeadsOperation = {
22
22
  parameters: [
23
23
  parameters.format,
24
24
  parameters.q,
25
- parameters.xKandaBid,
26
- parameters.xKandaCid,
27
- parameters.xKandaEid,
28
- parameters.xKandaTid,
25
+ parameters.x_kanda_bid,
26
+ parameters.x_kanda_cid,
27
+ parameters.x_kanda_eid,
28
+ parameters.x_kanda_tid,
29
29
  ],
30
30
  requestDefaultHeaders: { Accept: "application/json" },
31
31
  } as const;
@@ -1,12 +1,11 @@
1
1
  import type { RequestFunction } from "@openapi-io-ts/runtime";
2
- import * as parameters from "../components/parameters";
3
2
  import * as schemas from "../components/schemas";
4
3
 
5
4
  export type PostLeadRequestParameters = {
6
- xKandaBid?: string;
7
- xKandaCid?: string;
8
- xKandaEid?: string;
9
- xKandaTid?: string;
5
+ x_kanda_bid?: string;
6
+ x_kanda_cid?: string;
7
+ x_kanda_eid?: string;
8
+ x_kanda_tid?: string;
10
9
  };
11
10
 
12
11
  export const postLeadOperation = {
@@ -17,10 +16,30 @@ export const postLeadOperation = {
17
16
  default: { _tag: "JsonResponse", decoder: schemas.Error },
18
17
  },
19
18
  parameters: [
20
- parameters.xKandaBid,
21
- parameters.xKandaCid,
22
- parameters.xKandaEid,
23
- parameters.xKandaTid,
19
+ {
20
+ _tag: "FormParameter",
21
+ explode: false,
22
+ in: "header",
23
+ name: "x_kanda_bid",
24
+ },
25
+ {
26
+ _tag: "FormParameter",
27
+ explode: false,
28
+ in: "header",
29
+ name: "x_kanda_cid",
30
+ },
31
+ {
32
+ _tag: "FormParameter",
33
+ explode: false,
34
+ in: "header",
35
+ name: "x_kanda_eid",
36
+ },
37
+ {
38
+ _tag: "FormParameter",
39
+ explode: false,
40
+ in: "header",
41
+ name: "x_kanda_tid",
42
+ },
24
43
  ],
25
44
  requestDefaultHeaders: {
26
45
  "Content-Type": "application/json",
@@ -1,6 +1,11 @@
1
1
  import type { RequestFunction } from "@openapi-io-ts/runtime";
2
+ import * as parameters from "../components/parameters";
2
3
  import * as schemas from "../components/schemas";
3
4
 
5
+ export type PostMeRequestParameters = {
6
+ x_kanda_protected: "yes" | "no";
7
+ };
8
+
4
9
  export const postMeOperation = {
5
10
  path: "/api/me",
6
11
  method: "post",
@@ -8,7 +13,7 @@ export const postMeOperation = {
8
13
  "200": { _tag: "JsonResponse", decoder: schemas.AuthUser },
9
14
  default: { _tag: "JsonResponse", decoder: schemas.Error },
10
15
  },
11
- parameters: [],
16
+ parameters: [parameters.x_kanda_protected],
12
17
  requestDefaultHeaders: {
13
18
  "Content-Type": "application/json",
14
19
  Accept: "application/json",
@@ -19,6 +24,6 @@ export const postMeOperation = {
19
24
  } as const;
20
25
 
21
26
  export type PostMeRequestFunction = RequestFunction<
22
- { body: schemas.InfoMe },
27
+ { params: PostMeRequestParameters; body: schemas.InfoMe },
23
28
  schemas.AuthUser
24
29
  >;
@@ -4,10 +4,10 @@ import * as schemas from "../components/schemas";
4
4
 
5
5
  export type PutLeadRequestParameters = {
6
6
  id: string;
7
- xKandaBid?: string;
8
- xKandaCid?: string;
9
- xKandaEid?: string;
10
- xKandaTid?: string;
7
+ x_kanda_bid?: string;
8
+ x_kanda_cid?: string;
9
+ x_kanda_eid?: string;
10
+ x_kanda_tid?: string;
11
11
  };
12
12
 
13
13
  export const putLeadOperation = {
@@ -24,10 +24,10 @@ export const putLeadOperation = {
24
24
  in: "path",
25
25
  name: "id",
26
26
  },
27
- parameters.xKandaBid,
28
- parameters.xKandaCid,
29
- parameters.xKandaEid,
30
- parameters.xKandaTid,
27
+ parameters.x_kanda_bid,
28
+ parameters.x_kanda_cid,
29
+ parameters.x_kanda_eid,
30
+ parameters.x_kanda_tid,
31
31
  ],
32
32
  requestDefaultHeaders: {
33
33
  "Content-Type": "application/json",
@@ -4,10 +4,10 @@ import * as schemas from "../components/schemas";
4
4
 
5
5
  export type QuoteLeadRequestParameters = {
6
6
  id: string;
7
- xKandaBid?: string;
8
- xKandaCid?: string;
9
- xKandaEid?: string;
10
- xKandaTid?: string;
7
+ x_kanda_bid?: string;
8
+ x_kanda_cid?: string;
9
+ x_kanda_eid?: string;
10
+ x_kanda_tid?: string;
11
11
  };
12
12
 
13
13
  export const quoteLeadOperation = {
@@ -24,10 +24,10 @@ export const quoteLeadOperation = {
24
24
  in: "path",
25
25
  name: "id",
26
26
  },
27
- parameters.xKandaBid,
28
- parameters.xKandaCid,
29
- parameters.xKandaEid,
30
- parameters.xKandaTid,
27
+ parameters.x_kanda_bid,
28
+ parameters.x_kanda_cid,
29
+ parameters.x_kanda_eid,
30
+ parameters.x_kanda_tid,
31
31
  ],
32
32
  requestDefaultHeaders: {
33
33
  "Content-Type": "application/json",
@@ -5,10 +5,10 @@ import * as schemas from "../components/schemas";
5
5
 
6
6
  export type ReferLeadRequestParameters = {
7
7
  id: string;
8
- xKandaBid?: string;
9
- xKandaCid?: string;
10
- xKandaEid?: string;
11
- xKandaTid?: string;
8
+ x_kanda_bid?: string;
9
+ x_kanda_cid?: string;
10
+ x_kanda_eid?: string;
11
+ x_kanda_tid?: string;
12
12
  };
13
13
 
14
14
  export const ReferLeadRequestBodySchema = t.type({
@@ -33,10 +33,10 @@ export const referLeadOperation = {
33
33
  in: "path",
34
34
  name: "id",
35
35
  },
36
- parameters.xKandaBid,
37
- parameters.xKandaCid,
38
- parameters.xKandaEid,
39
- parameters.xKandaTid,
36
+ parameters.x_kanda_bid,
37
+ parameters.x_kanda_cid,
38
+ parameters.x_kanda_eid,
39
+ parameters.x_kanda_tid,
40
40
  ],
41
41
  requestDefaultHeaders: {
42
42
  "Content-Type": "application/json",
@@ -4,10 +4,10 @@ import * as schemas from "../components/schemas";
4
4
 
5
5
  export type TradeLeadRequestParameters = {
6
6
  id: string;
7
- xKandaBid?: string;
8
- xKandaCid?: string;
9
- xKandaEid?: string;
10
- xKandaTid?: string;
7
+ x_kanda_bid?: string;
8
+ x_kanda_cid?: string;
9
+ x_kanda_eid?: string;
10
+ x_kanda_tid?: string;
11
11
  };
12
12
 
13
13
  export const tradeLeadOperation = {
@@ -24,10 +24,10 @@ export const tradeLeadOperation = {
24
24
  in: "path",
25
25
  name: "id",
26
26
  },
27
- parameters.xKandaBid,
28
- parameters.xKandaCid,
29
- parameters.xKandaEid,
30
- parameters.xKandaTid,
27
+ parameters.x_kanda_bid,
28
+ parameters.x_kanda_cid,
29
+ parameters.x_kanda_eid,
30
+ parameters.x_kanda_tid,
31
31
  ],
32
32
  requestDefaultHeaders: {
33
33
  "Content-Type": "application/json",
@@ -4,10 +4,10 @@ import * as schemas from "../components/schemas";
4
4
 
5
5
  export type TradeQuoteApprovalLeadRequestParameters = {
6
6
  id: string;
7
- xKandaBid?: string;
8
- xKandaCid?: string;
9
- xKandaEid?: string;
10
- xKandaTid?: string;
7
+ x_kanda_bid?: string;
8
+ x_kanda_cid?: string;
9
+ x_kanda_eid?: string;
10
+ x_kanda_tid?: string;
11
11
  };
12
12
 
13
13
  export const tradeQuoteApprovalLeadOperation = {
@@ -24,10 +24,10 @@ export const tradeQuoteApprovalLeadOperation = {
24
24
  in: "path",
25
25
  name: "id",
26
26
  },
27
- parameters.xKandaBid,
28
- parameters.xKandaCid,
29
- parameters.xKandaEid,
30
- parameters.xKandaTid,
27
+ parameters.x_kanda_bid,
28
+ parameters.x_kanda_cid,
29
+ parameters.x_kanda_eid,
30
+ parameters.x_kanda_tid,
31
31
  ],
32
32
  requestDefaultHeaders: { Accept: "application/json" },
33
33
  } as const;