@redneckz/wildless-cms-uni-blocks 0.14.663 → 0.14.665

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 (72) hide show
  1. package/bundle/api/RetailAPI/updateUserTask.d.ts +5 -0
  2. package/bundle/bundle.umd.js +22 -8
  3. package/bundle/bundle.umd.min.js +1 -1
  4. package/bundle/components/CreditCardForm/getSixthStepData.d.ts +11 -0
  5. package/dist/api/RetailAPI/updateUserTask.d.ts +5 -0
  6. package/dist/api/RetailAPI/updateUserTask.js.map +1 -1
  7. package/dist/components/CreditCardForm/getCreditCardFormTaskData.js +3 -3
  8. package/dist/components/CreditCardForm/getCreditCardFormTaskData.js.map +1 -1
  9. package/dist/components/CreditCardForm/getSixthStepData.d.ts +11 -0
  10. package/dist/components/CreditCardForm/getSixthStepData.js +21 -0
  11. package/dist/components/CreditCardForm/getSixthStepData.js.map +1 -0
  12. package/dist/ui-kit/VerifyPhoneDialog/InputCode.js +1 -1
  13. package/dist/ui-kit/VerifyPhoneDialog/InputCode.js.map +1 -1
  14. package/dist/ui-kit/VerifyPhoneDialog/SubmitButton.js +1 -1
  15. package/dist/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js +2 -2
  16. package/dist/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
  17. package/lib/api/RetailAPI/updateUserTask.d.ts +5 -0
  18. package/lib/api/RetailAPI/updateUserTask.js.map +1 -1
  19. package/lib/common.css +1 -1
  20. package/lib/components/CreditCardForm/getCreditCardFormTaskData.js +3 -3
  21. package/lib/components/CreditCardForm/getCreditCardFormTaskData.js.map +1 -1
  22. package/lib/components/CreditCardForm/getSixthStepData.d.ts +11 -0
  23. package/lib/components/CreditCardForm/getSixthStepData.js +17 -0
  24. package/lib/components/CreditCardForm/getSixthStepData.js.map +1 -0
  25. package/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.d.ts +1 -1
  26. package/lib/ui-kit/VerifyPhoneDialog/InputCode.js +1 -1
  27. package/lib/ui-kit/VerifyPhoneDialog/InputCode.js.map +1 -1
  28. package/lib/ui-kit/VerifyPhoneDialog/SubmitButton.js +1 -1
  29. package/lib/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js +2 -2
  30. package/lib/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
  31. package/mobile/bundle/api/RetailAPI/updateUserTask.d.ts +5 -0
  32. package/mobile/bundle/bundle.umd.js +22 -8
  33. package/mobile/bundle/bundle.umd.min.js +1 -1
  34. package/mobile/bundle/components/CreditCardForm/getSixthStepData.d.ts +11 -0
  35. package/mobile/dist/api/RetailAPI/updateUserTask.d.ts +5 -0
  36. package/mobile/dist/api/RetailAPI/updateUserTask.js.map +1 -1
  37. package/mobile/dist/components/CreditCardForm/getCreditCardFormTaskData.js +3 -3
  38. package/mobile/dist/components/CreditCardForm/getCreditCardFormTaskData.js.map +1 -1
  39. package/mobile/dist/components/CreditCardForm/getSixthStepData.d.ts +11 -0
  40. package/mobile/dist/components/CreditCardForm/getSixthStepData.js +21 -0
  41. package/mobile/dist/components/CreditCardForm/getSixthStepData.js.map +1 -0
  42. package/mobile/dist/ui-kit/VerifyPhoneDialog/InputCode.js +1 -1
  43. package/mobile/dist/ui-kit/VerifyPhoneDialog/InputCode.js.map +1 -1
  44. package/mobile/dist/ui-kit/VerifyPhoneDialog/SubmitButton.js +1 -1
  45. package/mobile/dist/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js +2 -2
  46. package/mobile/dist/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
  47. package/mobile/lib/api/RetailAPI/updateUserTask.d.ts +5 -0
  48. package/mobile/lib/api/RetailAPI/updateUserTask.js.map +1 -1
  49. package/mobile/lib/common.css +1 -1
  50. package/mobile/lib/components/CreditCardForm/getCreditCardFormTaskData.js +3 -3
  51. package/mobile/lib/components/CreditCardForm/getCreditCardFormTaskData.js.map +1 -1
  52. package/mobile/lib/components/CreditCardForm/getSixthStepData.d.ts +11 -0
  53. package/mobile/lib/components/CreditCardForm/getSixthStepData.js +17 -0
  54. package/mobile/lib/components/CreditCardForm/getSixthStepData.js.map +1 -0
  55. package/mobile/lib/ui-kit/VerifyPhoneDialog/InputCode.js +1 -1
  56. package/mobile/lib/ui-kit/VerifyPhoneDialog/InputCode.js.map +1 -1
  57. package/mobile/lib/ui-kit/VerifyPhoneDialog/SubmitButton.js +1 -1
  58. package/mobile/lib/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js +2 -2
  59. package/mobile/lib/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
  60. package/mobile/src/api/RetailAPI/updateUserTask.ts +5 -0
  61. package/mobile/src/components/CreditCardForm/getCreditCardFormTaskData.ts +3 -3
  62. package/mobile/src/components/CreditCardForm/getSixthStepData.ts +21 -0
  63. package/mobile/src/ui-kit/VerifyPhoneDialog/InputCode.tsx +1 -1
  64. package/mobile/src/ui-kit/VerifyPhoneDialog/SubmitButton.tsx +1 -1
  65. package/mobile/src/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.tsx +6 -5
  66. package/package.json +1 -1
  67. package/src/api/RetailAPI/updateUserTask.ts +5 -0
  68. package/src/components/CreditCardForm/getCreditCardFormTaskData.ts +3 -3
  69. package/src/components/CreditCardForm/getSixthStepData.ts +21 -0
  70. package/src/ui-kit/VerifyPhoneDialog/InputCode.tsx +1 -1
  71. package/src/ui-kit/VerifyPhoneDialog/SubmitButton.tsx +1 -1
  72. package/src/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.tsx +6 -5
@@ -4,6 +4,7 @@ import { getFifthStepData } from './getFifthStepData';
4
4
  import { getFirstStepData } from './getFirstStepData';
5
5
  import { getFourthStepData } from './getFourthStepData';
6
6
  import { getSecondStepData } from './getSecondStepData';
7
+ import { getDeliveryData, getSixthStepData } from './getSixthStepData';
7
8
  import { getThirdStepData } from './getThirdStepData';
8
9
 
9
10
  type getCreditCardFormTaskDataProps = {
@@ -44,6 +45,7 @@ export const getCreditCardFormTaskData = ({
44
45
  ...getCurrentStepData(step, formData),
45
46
  },
46
47
  ],
48
+ ...getDeliveryData(formData),
47
49
  },
48
50
  };
49
51
  };
@@ -61,9 +63,7 @@ const getCurrentStepData = (step: number, formData: FormState): Partial<Particip
61
63
  case 4:
62
64
  return getFifthStepData(formData);
63
65
  case 5:
64
- return {
65
- //TODO: Сделать адаптер данных способа получения карты
66
- };
66
+ return getSixthStepData(formData);
67
67
  default:
68
68
  return {};
69
69
  }
@@ -0,0 +1,21 @@
1
+ import { formatDate } from '../../utils/formatDate';
2
+ import { type FormState } from '../ApplicationLeadForm/getInitialFormState';
3
+ import { getParticipantAddresses } from '../CreditForm/utils';
4
+
5
+ export const getDeliveryData = (formData: FormState) => {
6
+ const { methodObtain, deliveryDate = '' } = formData;
7
+
8
+ return {
9
+ courierDeliveryFlg: methodObtain === 'courier',
10
+ deliveryDate: formatDate(deliveryDate, true),
11
+ deliveryTimeCd: { value: 'TIME_2' },
12
+ };
13
+ };
14
+
15
+ export const getSixthStepData = (formData: FormState) => {
16
+ const { addressCourier } = formData;
17
+
18
+ return {
19
+ participantAddresses: getParticipantAddresses({ addressCourier }),
20
+ };
21
+ };
@@ -81,7 +81,7 @@ export const InputCode = JSX<InputCodeProps>(({ values, setValues, hasError, err
81
81
  const getInputStyle = (index: number, values: string[], hasError = false) => {
82
82
  const isInputEmpty = !values[index];
83
83
 
84
- return `w-16 h-20 text-3xl text-center p-2 m-2 border ${
84
+ return `w-20 h-24 text-5xl text-center p-lg m-2 border ${
85
85
  hasError && isInputEmpty ? 'border-error' : 'border-gray'
86
86
  } rounded-md caret-transparent outline-none`;
87
87
  };
@@ -11,7 +11,7 @@ interface SubmitButtonProps {
11
11
  export const SubmitButton = JSX<SubmitButtonProps>(({ isDisabled, onClick, text }) => {
12
12
  return (
13
13
  <Button type="button" onClick={onClick} disabled={isDisabled}>
14
- <Text font="font-medium">{text}</Text>
14
+ <Text font="font-normal">{text}</Text>
15
15
  </Button>
16
16
  );
17
17
  });
@@ -67,14 +67,15 @@ export const VerifyPhoneDialog = JSX<VerifyPhoneDialogProps>(
67
67
  }, []);
68
68
 
69
69
  return (
70
- <Dialog className="my-6xl max-w-3xl w-full min-h-fit mx-auto rounded-lg">
71
- <div className="flex flex-col gap-lg items-center rounded-md">
70
+ <Dialog className="my-6xl max-w-3xl w-full min-h-fit mx-auto rounded-xl px-5xl py-0">
71
+ <div className="flex flex-col gap-xl items-center rounded-md">
72
72
  <Headline
73
73
  className="w-full"
74
74
  title={title}
75
75
  description={description}
76
- headlineVersion="S"
76
+ headlineVersion="XS"
77
77
  isEmbedded={true}
78
+ as="h6"
78
79
  />
79
80
  {code ? (
80
81
  <InputCode
@@ -108,9 +109,9 @@ const renderText = (
108
109
  sendCode: () => void,
109
110
  ) =>
110
111
  timeNextReq ? (
111
- <div className="flex flex-row text-l font-light text-primary-main">
112
+ <div className="flex flex-row text-l font-light text-base">
112
113
  Получить новый код можно через
113
- <Timer className="text-primary-main ml-1" time={timeNextReq} setTime={setTimeNextReq} />
114
+ <Timer className="text-base ml-1" time={timeNextReq} setTime={setTimeNextReq} />
114
115
  </div>
115
116
  ) : (
116
117
  <LinkButton onClick={sendCode} className="text-primary-main">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redneckz/wildless-cms-uni-blocks",
3
- "version": "0.14.663",
3
+ "version": "0.14.665",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "author": "ЦК",
@@ -120,6 +120,11 @@ export type UpdateUserTaskBody = {
120
120
  office?: {
121
121
  id: string;
122
122
  };
123
+ courierDeliveryFlg?: boolean;
124
+ deliveryDate?: string;
125
+ deliveryTimeCd?: {
126
+ value: string;
127
+ };
123
128
  authorizedAgentId?: number;
124
129
  participants: Participant[];
125
130
  esiaAccountTypeCd?: {
@@ -4,6 +4,7 @@ import { getFifthStepData } from './getFifthStepData';
4
4
  import { getFirstStepData } from './getFirstStepData';
5
5
  import { getFourthStepData } from './getFourthStepData';
6
6
  import { getSecondStepData } from './getSecondStepData';
7
+ import { getDeliveryData, getSixthStepData } from './getSixthStepData';
7
8
  import { getThirdStepData } from './getThirdStepData';
8
9
 
9
10
  type getCreditCardFormTaskDataProps = {
@@ -44,6 +45,7 @@ export const getCreditCardFormTaskData = ({
44
45
  ...getCurrentStepData(step, formData),
45
46
  },
46
47
  ],
48
+ ...getDeliveryData(formData),
47
49
  },
48
50
  };
49
51
  };
@@ -61,9 +63,7 @@ const getCurrentStepData = (step: number, formData: FormState): Partial<Particip
61
63
  case 4:
62
64
  return getFifthStepData(formData);
63
65
  case 5:
64
- return {
65
- //TODO: Сделать адаптер данных способа получения карты
66
- };
66
+ return getSixthStepData(formData);
67
67
  default:
68
68
  return {};
69
69
  }
@@ -0,0 +1,21 @@
1
+ import { formatDate } from '../../utils/formatDate';
2
+ import { type FormState } from '../ApplicationLeadForm/getInitialFormState';
3
+ import { getParticipantAddresses } from '../CreditForm/utils';
4
+
5
+ export const getDeliveryData = (formData: FormState) => {
6
+ const { methodObtain, deliveryDate = '' } = formData;
7
+
8
+ return {
9
+ courierDeliveryFlg: methodObtain === 'courier',
10
+ deliveryDate: formatDate(deliveryDate, true),
11
+ deliveryTimeCd: { value: 'TIME_2' },
12
+ };
13
+ };
14
+
15
+ export const getSixthStepData = (formData: FormState) => {
16
+ const { addressCourier } = formData;
17
+
18
+ return {
19
+ participantAddresses: getParticipantAddresses({ addressCourier }),
20
+ };
21
+ };
@@ -81,7 +81,7 @@ export const InputCode = JSX<InputCodeProps>(({ values, setValues, hasError, err
81
81
  const getInputStyle = (index: number, values: string[], hasError = false) => {
82
82
  const isInputEmpty = !values[index];
83
83
 
84
- return `w-16 h-20 text-3xl text-center p-2 m-2 border ${
84
+ return `w-20 h-24 text-5xl text-center p-lg m-2 border ${
85
85
  hasError && isInputEmpty ? 'border-error' : 'border-gray'
86
86
  } rounded-md caret-transparent outline-none`;
87
87
  };
@@ -11,7 +11,7 @@ interface SubmitButtonProps {
11
11
  export const SubmitButton = JSX<SubmitButtonProps>(({ isDisabled, onClick, text }) => {
12
12
  return (
13
13
  <Button type="button" onClick={onClick} disabled={isDisabled}>
14
- <Text font="font-medium">{text}</Text>
14
+ <Text font="font-normal">{text}</Text>
15
15
  </Button>
16
16
  );
17
17
  });
@@ -67,14 +67,15 @@ export const VerifyPhoneDialog = JSX<VerifyPhoneDialogProps>(
67
67
  }, []);
68
68
 
69
69
  return (
70
- <Dialog className="my-6xl max-w-3xl w-full min-h-fit mx-auto rounded-lg">
71
- <div className="flex flex-col gap-lg items-center rounded-md">
70
+ <Dialog className="my-6xl max-w-3xl w-full min-h-fit mx-auto rounded-xl px-5xl py-0">
71
+ <div className="flex flex-col gap-xl items-center rounded-md">
72
72
  <Headline
73
73
  className="w-full"
74
74
  title={title}
75
75
  description={description}
76
- headlineVersion="S"
76
+ headlineVersion="XS"
77
77
  isEmbedded={true}
78
+ as="h6"
78
79
  />
79
80
  {code ? (
80
81
  <InputCode
@@ -108,9 +109,9 @@ const renderText = (
108
109
  sendCode: () => void,
109
110
  ) =>
110
111
  timeNextReq ? (
111
- <div className="flex flex-row text-l font-light text-primary-main">
112
+ <div className="flex flex-row text-l font-light text-base">
112
113
  Получить новый код можно через
113
- <Timer className="text-primary-main ml-1" time={timeNextReq} setTime={setTimeNextReq} />
114
+ <Timer className="text-base ml-1" time={timeNextReq} setTime={setTimeNextReq} />
114
115
  </div>
115
116
  ) : (
116
117
  <LinkButton onClick={sendCode} className="text-primary-main">