@redneckz/wildless-cms-uni-blocks 0.14.218 → 0.14.220

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 (77) hide show
  1. package/bin/migration-scripts/0.14.214.js +25 -0
  2. package/bundle/blocks.schema.json +1 -1
  3. package/bundle/bundle.umd.js +8 -5
  4. package/bundle/bundle.umd.min.js +1 -1
  5. package/bundle/components/ApplicationFormCustom/ApplicationFormCustomContent.d.ts +4 -4
  6. package/bundle/hooks/useLocation.d.ts +1 -0
  7. package/bundle/ui-kit/LocationDialog/LocationDialog.d.ts +1 -0
  8. package/dist/components/ApplicationFormCustom/ApplicationFormCustomContent.d.ts +4 -4
  9. package/dist/components/ApplicationFormCustom/getField.js +2 -1
  10. package/dist/components/ApplicationFormCustom/getField.js.map +1 -1
  11. package/dist/components/ApplicationFormCustom/getObjectValidator.js +1 -0
  12. package/dist/components/ApplicationFormCustom/getObjectValidator.js.map +1 -1
  13. package/dist/hooks/useLocation.d.ts +1 -0
  14. package/dist/hooks/useLocation.js.map +1 -1
  15. package/dist/ui-kit/Input/InputControl.js +1 -1
  16. package/dist/ui-kit/Input/InputControl.js.map +1 -1
  17. package/dist/ui-kit/LocationDialog/LocationDialog.d.ts +1 -0
  18. package/dist/ui-kit/LocationDialog/LocationDialog.js +4 -2
  19. package/dist/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
  20. package/lib/components/ApplicationFormCustom/ApplicationFormCustom.fixture.d.ts +1 -0
  21. package/lib/components/ApplicationFormCustom/ApplicationFormCustomContent.d.ts +4 -4
  22. package/lib/components/ApplicationFormCustom/getField.js +2 -1
  23. package/lib/components/ApplicationFormCustom/getField.js.map +1 -1
  24. package/lib/components/ApplicationFormCustom/getObjectValidator.js +1 -0
  25. package/lib/components/ApplicationFormCustom/getObjectValidator.js.map +1 -1
  26. package/lib/hooks/useLocation.d.ts +1 -0
  27. package/lib/hooks/useLocation.js.map +1 -1
  28. package/lib/ui-kit/Input/InputControl.js +1 -1
  29. package/lib/ui-kit/Input/InputControl.js.map +1 -1
  30. package/lib/ui-kit/LocationDialog/LocationDialog.d.ts +1 -0
  31. package/lib/ui-kit/LocationDialog/LocationDialog.js +4 -2
  32. package/lib/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
  33. package/mobile/bundle/bundle.umd.js +8 -5
  34. package/mobile/bundle/bundle.umd.min.js +1 -1
  35. package/mobile/bundle/components/ApplicationFormCustom/ApplicationFormCustomContent.d.ts +4 -4
  36. package/mobile/bundle/hooks/useLocation.d.ts +1 -0
  37. package/mobile/bundle/ui-kit/LocationDialog/LocationDialog.d.ts +1 -0
  38. package/mobile/dist/components/ApplicationFormCustom/ApplicationFormCustomContent.d.ts +4 -4
  39. package/mobile/dist/components/ApplicationFormCustom/getField.js +2 -1
  40. package/mobile/dist/components/ApplicationFormCustom/getField.js.map +1 -1
  41. package/mobile/dist/components/ApplicationFormCustom/getObjectValidator.js +1 -0
  42. package/mobile/dist/components/ApplicationFormCustom/getObjectValidator.js.map +1 -1
  43. package/mobile/dist/hooks/useLocation.d.ts +1 -0
  44. package/mobile/dist/hooks/useLocation.js.map +1 -1
  45. package/mobile/dist/ui-kit/Input/InputControl.js +1 -1
  46. package/mobile/dist/ui-kit/Input/InputControl.js.map +1 -1
  47. package/mobile/dist/ui-kit/LocationDialog/LocationDialog.d.ts +1 -0
  48. package/mobile/dist/ui-kit/LocationDialog/LocationDialog.js +4 -2
  49. package/mobile/dist/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
  50. package/mobile/lib/components/ApplicationFormCustom/ApplicationFormCustomContent.d.ts +4 -4
  51. package/mobile/lib/components/ApplicationFormCustom/getField.js +2 -1
  52. package/mobile/lib/components/ApplicationFormCustom/getField.js.map +1 -1
  53. package/mobile/lib/components/ApplicationFormCustom/getObjectValidator.js +1 -0
  54. package/mobile/lib/components/ApplicationFormCustom/getObjectValidator.js.map +1 -1
  55. package/mobile/lib/hooks/useLocation.d.ts +1 -0
  56. package/mobile/lib/hooks/useLocation.js.map +1 -1
  57. package/mobile/lib/ui-kit/Input/InputControl.js +1 -1
  58. package/mobile/lib/ui-kit/Input/InputControl.js.map +1 -1
  59. package/mobile/lib/ui-kit/LocationDialog/LocationDialog.d.ts +1 -0
  60. package/mobile/lib/ui-kit/LocationDialog/LocationDialog.js +4 -2
  61. package/mobile/lib/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
  62. package/mobile/src/components/ApplicationFormCustom/ApplicationFormCustom.example.json +38 -13
  63. package/mobile/src/components/ApplicationFormCustom/ApplicationFormCustomContent.ts +5 -4
  64. package/mobile/src/components/ApplicationFormCustom/getField.tsx +10 -1
  65. package/mobile/src/components/ApplicationFormCustom/getObjectValidator.tsx +1 -0
  66. package/mobile/src/hooks/useLocation.ts +1 -0
  67. package/mobile/src/ui-kit/Input/InputControl.tsx +13 -2
  68. package/mobile/src/ui-kit/LocationDialog/LocationDialog.tsx +63 -52
  69. package/package.json +1 -1
  70. package/src/components/ApplicationFormCustom/ApplicationFormCustom.example.json +38 -13
  71. package/src/components/ApplicationFormCustom/ApplicationFormCustom.fixture.tsx +32 -1
  72. package/src/components/ApplicationFormCustom/ApplicationFormCustomContent.ts +5 -4
  73. package/src/components/ApplicationFormCustom/getField.tsx +10 -1
  74. package/src/components/ApplicationFormCustom/getObjectValidator.tsx +1 -0
  75. package/src/hooks/useLocation.ts +1 -0
  76. package/src/ui-kit/Input/InputControl.tsx +13 -2
  77. package/src/ui-kit/LocationDialog/LocationDialog.tsx +63 -52
@@ -1201,7 +1201,7 @@
1201
1201
 
1202
1202
  const DatePickerControl = JSX(({ className, label, error, ...rest }) => (jsxs("div", { className: style('shrink-0 w-full', className), children: [jsx(DatePicker, { label: label && rest?.errors ? `${label}*` : label, valid: Boolean(!error), ...rest }), renderErrorText(error)] })));
1203
1203
 
1204
- const InputControl = JSX(({ className, label, value = '', placeholder, error, onChange, onBlur, isTextarea, ...rest }) => (jsxs("div", { className: style('shrink-0 w-full', className), children: [jsx(Input, { type: "text", "aria-label": label, label: label && rest?.errors ? `${label}*` : label, valid: Boolean(!error), value: value, onChange: onChange, onBlur: onBlur, isTextarea: isTextarea, placeholder: rest?.errors && !label ? `${placeholder}*` : placeholder }), renderErrorText(error)] })));
1204
+ const InputControl = JSX(({ className, label, value = '', placeholder, error, onChange, onBlur, isTextarea, type, ...rest }) => (jsxs("div", { className: style('shrink-0 w-full', className), children: [jsx(Input, { type: type || 'text', "aria-label": label, label: label && rest?.errors ? `${label}*` : label, valid: Boolean(!error), value: value, onChange: onChange, onBlur: onBlur, isTextarea: isTextarea, placeholder: rest?.errors && !label ? `${placeholder}*` : placeholder }), renderErrorText(error)] })));
1205
1205
 
1206
1206
  const isPlaceholder = (_) => _ === '_';
1207
1207
  const isDigit = (_) => /\d/.test(_);
@@ -1383,6 +1383,7 @@
1383
1383
  fullName: defaultValidator,
1384
1384
  inn: innValidator,
1385
1385
  partnerComments: defaultValidator,
1386
+ collectionCount: defaultValidator,
1386
1387
  comment: defaultValidator,
1387
1388
  acquiringType: defaultSelectValidator,
1388
1389
  serviceType: defaultSelectValidator,
@@ -1535,7 +1536,8 @@
1535
1536
  addressBranch: jsx(AddressBranchField, { field: field, input: input, isPremium: isPremium }),
1536
1537
  birthday: (jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u0440\u043E\u0436\u0434\u0435\u043D\u0438\u044F", ...getValidation(field('birthday'), validatorObj.birthday, required) })),
1537
1538
  isClient: (jsx(CheckboxWithError, { ...field('isClient'), text: '\u042F\u0432\u043B\u044F\u044E\u0441\u044C \u043A\u043B\u0438\u0435\u043D\u0442\u043E\u043C \u0431\u0430\u043D\u043A\u0430 \u0410\u041E "\u0420\u043E\u0441\u0441\u0435\u043B\u044C\u0445\u043E\u0437\u0431\u0430\u043D\u043A"' })),
1538
- partnerComments: (jsx(InputControl, { label: "\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043E\u0431\u044A\u0435\u043A\u0442\u043E\u0432 \u0438\u043D\u043A\u0430\u0441\u0441\u0430\u0446\u0438\u0438", ...getValidation(field('partnerComments'), validatorObj.partnerComments, required) })),
1539
+ partnerComments: (jsx(InputControl, { ...getValidation(field('partnerComments'), validatorObj.partnerComments, required), placeholder: "\u0423\u043A\u0430\u0436\u0438\u0442\u0435 \u0438\u043D\u0442\u0435\u0440\u0435\u0441\u0443\u044E\u0449\u0438\u0439 \u0432\u0430\u0441 \u0432\u043E\u043F\u0440\u043E\u0441", isTextarea: true, ...rest })),
1540
+ collectionCount: (jsx(InputControl, { label: "\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043E\u0431\u044A\u0435\u043A\u0442\u043E\u0432 \u0438\u043D\u043A\u0430\u0441\u0441\u0430\u0446\u0438\u0438", type: "number", ...getValidation(field('partnerComments'), validatorObj.collectionCount, required) })),
1539
1541
  acquiringType: jsx(AcquiringField, { field: field, input: input }),
1540
1542
  onlineCheckout: jsx(OnlineCheckoutField, { field: field }),
1541
1543
  posTerminal: jsx(PosTerminalField, { field: field }),
@@ -4127,7 +4129,7 @@
4127
4129
  });
4128
4130
 
4129
4131
  const SEARCH_TERM_MIN_LENGTH = 3;
4130
- const LocationDialog = JSX(({ foreignOffices, defaultLocation }) => {
4132
+ const LocationDialog = JSX(({ foreignOffices, defaultLocation, officesLink }) => {
4131
4133
  const [currentLocation, selectCurrentLocation] = useLocation(defaultLocation);
4132
4134
  const [query, setQuery] = useState('');
4133
4135
  const regions = cleanUpRegions(useRegions()).sort((a, b) => a.name.localeCompare(b.name));
@@ -4137,7 +4139,8 @@
4137
4139
  selectCurrentLocation(region);
4138
4140
  close();
4139
4141
  }, []);
4140
- return (jsxs(Dialog, { className: "pb-20", head: jsxs("div", { children: [jsx(Text, { size: "text-h4", color: "text-primary-text", children: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0444\u0438\u043B\u0438\u0430\u043B" }), currentLocation ? (jsxs("div", { className: "mb-s", children: [jsx(Text, { size: "text-l", font: "font-light", children: "\u0421\u0435\u0439\u0447\u0430\u0441 \u0432\u044B\u0431\u0440\u0430\u043D:\u00A0" }), jsx("button", { type: "button", onClick: () => selectCurrentLocation(currentLocation), children: jsx(Text, { color: "text-primary-main", children: currentLocation.name }) })] })) : null, jsx(SearchBar, { onSearch: setQuery, searchTerm: query })] }), children: [query && query.length >= SEARCH_TERM_MIN_LENGTH ? (jsx("div", { children: regions
4142
+ const currentOfficeHref = `${officesLink}/${currentLocation.slug}`;
4143
+ return (jsxs(Dialog, { className: "pb-20", head: jsxs("div", { children: [jsx(Text, { size: "text-h4", color: "text-primary-text", children: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0444\u0438\u043B\u0438\u0430\u043B" }), currentLocation ? (jsxs("div", { className: "mb-s", children: [jsx(Text, { size: "text-l", font: "font-light", children: "\u0421\u0435\u0439\u0447\u0430\u0441 \u0432\u044B\u0431\u0440\u0430\u043D:\u00A0" }), jsx(LinkButton, { href: currentOfficeHref, onClick: () => selectCurrentLocation(currentLocation), children: jsx(Text, { color: "text-primary-main", children: currentLocation.name }) })] })) : null, jsx(SearchBar, { onSearch: setQuery, searchTerm: query })] }), children: [query && query.length >= SEARCH_TERM_MIN_LENGTH ? (jsx("div", { children: regions
4141
4144
  .filter(({ name }) => name && jaroWinklerDistance(name.toLowerCase())(query.toLowerCase()) >= 0.8)
4142
4145
  .map(renderRegion(handleChangeLocation)) })) : (jsx("div", { className: "columns-1 sm:columns-5", children: Array.from(regionsGroupByLetter.entries()).map(renderRegionGroup(handleChangeLocation)) })), renderForeignOffices(foreignOffices)] }));
4143
4146
  });
@@ -6010,7 +6013,7 @@
6010
6013
  slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
6011
6014
  });
6012
6015
 
6013
- const packageVersion = "0.14.217";
6016
+ const packageVersion = "0.14.219";
6014
6017
 
6015
6018
  exports.Blocks = Blocks;
6016
6019
  exports.ContentPage = ContentPage;