@redneckz/wildless-cms-uni-blocks 0.15.340 → 0.15.342

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 (109) hide show
  1. package/bundle/bundle.umd.js +11 -4
  2. package/bundle/bundle.umd.min.js +1 -1
  3. package/bundle/components/OfficesAtmsMap/OfficesAtmsMapProps.d.ts +2 -0
  4. package/bundle/content-page-repository/ContentPageRepository.d.ts +2 -2
  5. package/dist/components/OfficesAtmsMap/AtmsMap.js +4 -0
  6. package/dist/components/OfficesAtmsMap/AtmsMap.js.map +1 -1
  7. package/dist/components/OfficesAtmsMap/OfficesAtmsMapProps.d.ts +2 -0
  8. package/dist/components/OfficesAtmsMap/renderFiltrationForm.js +3 -1
  9. package/dist/components/OfficesAtmsMap/renderFiltrationForm.js.map +1 -1
  10. package/dist/content-page-repository/ContentPageRepository.d.ts +2 -2
  11. package/dist/content-page-repository/ContentPageRepository.js +3 -3
  12. package/dist/content-page-repository/ContentPageRepository.js.map +1 -1
  13. package/dist/content-page-repository/computeImgOutputPath.js +6 -6
  14. package/dist/content-page-repository/computeImgOutputPath.js.map +1 -1
  15. package/dist/content-page-repository/copy.js +2 -2
  16. package/dist/content-page-repository/copy.js.map +1 -1
  17. package/dist/content-page-repository/transformAttachmentLink.js +4 -4
  18. package/dist/content-page-repository/transformAttachmentLink.js.map +1 -1
  19. package/dist/content-page-repository/transformDocument.js +4 -4
  20. package/dist/content-page-repository/transformDocument.js.map +1 -1
  21. package/dist/content-page-repository/transformImg.js +2 -2
  22. package/dist/content-page-repository/transformImg.js.map +1 -1
  23. package/dist/content-page-repository/transformPicture.js +2 -2
  24. package/dist/content-page-repository/transformPicture.js.map +1 -1
  25. package/lib/components/OfficesAtmsMap/AtmsMap.js +4 -0
  26. package/lib/components/OfficesAtmsMap/AtmsMap.js.map +1 -1
  27. package/lib/components/OfficesAtmsMap/OfficesAtmsMapProps.d.ts +2 -0
  28. package/lib/components/OfficesAtmsMap/renderFiltrationForm.js +3 -1
  29. package/lib/components/OfficesAtmsMap/renderFiltrationForm.js.map +1 -1
  30. package/lib/content-page-repository/ContentPageRepository.d.ts +2 -2
  31. package/lib/content-page-repository/ContentPageRepository.js +1 -1
  32. package/lib/content-page-repository/ContentPageRepository.js.map +1 -1
  33. package/lib/content-page-repository/computeImgOutputPath.js +1 -1
  34. package/lib/content-page-repository/computeImgOutputPath.js.map +1 -1
  35. package/lib/content-page-repository/copy.js +1 -1
  36. package/lib/content-page-repository/copy.js.map +1 -1
  37. package/lib/content-page-repository/transformAttachmentLink.js +1 -1
  38. package/lib/content-page-repository/transformAttachmentLink.js.map +1 -1
  39. package/lib/content-page-repository/transformDocument.js +1 -1
  40. package/lib/content-page-repository/transformDocument.js.map +1 -1
  41. package/lib/content-page-repository/transformImg.js +1 -1
  42. package/lib/content-page-repository/transformImg.js.map +1 -1
  43. package/lib/content-page-repository/transformPicture.js +1 -1
  44. package/lib/content-page-repository/transformPicture.js.map +1 -1
  45. package/mobile/bundle/bundle.umd.js +11 -4
  46. package/mobile/bundle/bundle.umd.min.js +1 -1
  47. package/mobile/bundle/components/OfficesAtmsMap/OfficesAtmsMapProps.d.ts +2 -0
  48. package/mobile/bundle/content-page-repository/ContentPageRepository.d.ts +2 -2
  49. package/mobile/dist/components/OfficesAtmsMap/AtmsMap.js +4 -0
  50. package/mobile/dist/components/OfficesAtmsMap/AtmsMap.js.map +1 -1
  51. package/mobile/dist/components/OfficesAtmsMap/OfficesAtmsMapProps.d.ts +2 -0
  52. package/mobile/dist/components/OfficesAtmsMap/renderFiltrationForm.js +3 -1
  53. package/mobile/dist/components/OfficesAtmsMap/renderFiltrationForm.js.map +1 -1
  54. package/mobile/dist/content-page-repository/ContentPageRepository.d.ts +2 -2
  55. package/mobile/dist/content-page-repository/ContentPageRepository.js +3 -3
  56. package/mobile/dist/content-page-repository/ContentPageRepository.js.map +1 -1
  57. package/mobile/dist/content-page-repository/computeImgOutputPath.js +6 -6
  58. package/mobile/dist/content-page-repository/computeImgOutputPath.js.map +1 -1
  59. package/mobile/dist/content-page-repository/copy.js +2 -2
  60. package/mobile/dist/content-page-repository/copy.js.map +1 -1
  61. package/mobile/dist/content-page-repository/transformAttachmentLink.js +4 -4
  62. package/mobile/dist/content-page-repository/transformAttachmentLink.js.map +1 -1
  63. package/mobile/dist/content-page-repository/transformDocument.js +4 -4
  64. package/mobile/dist/content-page-repository/transformDocument.js.map +1 -1
  65. package/mobile/dist/content-page-repository/transformImg.js +2 -2
  66. package/mobile/dist/content-page-repository/transformImg.js.map +1 -1
  67. package/mobile/dist/content-page-repository/transformPicture.js +2 -2
  68. package/mobile/dist/content-page-repository/transformPicture.js.map +1 -1
  69. package/mobile/lib/components/OfficesAtmsMap/AtmsMap.js +4 -0
  70. package/mobile/lib/components/OfficesAtmsMap/AtmsMap.js.map +1 -1
  71. package/mobile/lib/components/OfficesAtmsMap/OfficesAtmsMapProps.d.ts +2 -0
  72. package/mobile/lib/components/OfficesAtmsMap/renderFiltrationForm.js +3 -1
  73. package/mobile/lib/components/OfficesAtmsMap/renderFiltrationForm.js.map +1 -1
  74. package/mobile/lib/content-page-repository/ContentPageRepository.d.ts +2 -2
  75. package/mobile/lib/content-page-repository/ContentPageRepository.js +1 -1
  76. package/mobile/lib/content-page-repository/ContentPageRepository.js.map +1 -1
  77. package/mobile/lib/content-page-repository/computeImgOutputPath.js +1 -1
  78. package/mobile/lib/content-page-repository/computeImgOutputPath.js.map +1 -1
  79. package/mobile/lib/content-page-repository/copy.js +1 -1
  80. package/mobile/lib/content-page-repository/copy.js.map +1 -1
  81. package/mobile/lib/content-page-repository/transformAttachmentLink.js +1 -1
  82. package/mobile/lib/content-page-repository/transformAttachmentLink.js.map +1 -1
  83. package/mobile/lib/content-page-repository/transformDocument.js +1 -1
  84. package/mobile/lib/content-page-repository/transformDocument.js.map +1 -1
  85. package/mobile/lib/content-page-repository/transformImg.js +1 -1
  86. package/mobile/lib/content-page-repository/transformImg.js.map +1 -1
  87. package/mobile/lib/content-page-repository/transformPicture.js +1 -1
  88. package/mobile/lib/content-page-repository/transformPicture.js.map +1 -1
  89. package/mobile/src/components/OfficesAtmsMap/AtmsMap.tsx +4 -0
  90. package/mobile/src/components/OfficesAtmsMap/OfficesAtmsMapProps.tsx +2 -0
  91. package/mobile/src/components/OfficesAtmsMap/renderFiltrationForm.tsx +3 -1
  92. package/mobile/src/content-page-repository/ContentPageRepository.ts +9 -3
  93. package/mobile/src/content-page-repository/computeImgOutputPath.ts +1 -1
  94. package/mobile/src/content-page-repository/copy.ts +1 -1
  95. package/mobile/src/content-page-repository/transformAttachmentLink.ts +1 -1
  96. package/mobile/src/content-page-repository/transformDocument.ts +1 -1
  97. package/mobile/src/content-page-repository/transformImg.ts +1 -1
  98. package/mobile/src/content-page-repository/transformPicture.ts +1 -1
  99. package/package.json +1 -1
  100. package/src/components/OfficesAtmsMap/AtmsMap.tsx +4 -0
  101. package/src/components/OfficesAtmsMap/OfficesAtmsMapProps.tsx +2 -0
  102. package/src/components/OfficesAtmsMap/renderFiltrationForm.tsx +3 -1
  103. package/src/content-page-repository/ContentPageRepository.ts +9 -3
  104. package/src/content-page-repository/computeImgOutputPath.ts +1 -1
  105. package/src/content-page-repository/copy.ts +1 -1
  106. package/src/content-page-repository/transformAttachmentLink.ts +1 -1
  107. package/src/content-page-repository/transformDocument.ts +1 -1
  108. package/src/content-page-repository/transformImg.ts +1 -1
  109. package/src/content-page-repository/transformPicture.ts +1 -1
@@ -1,6 +1,6 @@
1
1
  import fs from 'fs';
2
2
  import glob from 'glob';
3
- import path from 'path';
3
+ import path from 'path/posix';
4
4
  import util from 'util';
5
5
  import { computeAPIFallback } from '../components/ContentPage/computeAPIFallback';
6
6
  import { normalizePage } from '../components/ContentPage/normalizePage';
@@ -46,7 +46,10 @@ export class ContentPageRepository {
46
46
  return JSON.parse(await readFile(filePath, 'utf-8'));
47
47
  }
48
48
 
49
- async generatePageData(slug: Slug, options?: TransformationOptions): Promise<ContentPageDef> {
49
+ async generatePageData(
50
+ slug: Slug,
51
+ options?: Partial<TransformationOptions>,
52
+ ): Promise<ContentPageDef> {
50
53
  const pathname = path.join(this.options.contentDir, ...slug);
51
54
  const indexFilePath = path.join(pathname, `index${PAGE_EXT}`);
52
55
  const pageFilePath = `${pathname}${PAGE_EXT}`;
@@ -58,7 +61,10 @@ export class ContentPageRepository {
58
61
  return { ...data, fallback: (await computeAPIFallback(data)) || {} };
59
62
  }
60
63
 
61
- generatePage(filePath: string, options?: TransformationOptions): Promise<ContentPageDef> {
64
+ generatePage(
65
+ filePath: string,
66
+ options?: Partial<TransformationOptions>,
67
+ ): Promise<ContentPageDef> {
62
68
  return transformContentPage(filePath, { ...this.options, ...options });
63
69
  }
64
70
  }
@@ -1,4 +1,4 @@
1
- import path from 'path';
1
+ import path from 'path/posix';
2
2
  import { type ImgSource } from '../model/Picture';
3
3
  import { type TransformationOptions } from './TransformationOptions';
4
4
 
@@ -1,5 +1,5 @@
1
1
  import fs from 'fs';
2
- import path from 'path';
2
+ import path from 'path/posix';
3
3
  import util from 'util';
4
4
 
5
5
  const mkdir = util.promisify(fs.mkdir);
@@ -1,4 +1,4 @@
1
- import path from 'path';
1
+ import path from 'path/posix';
2
2
  import type { LinkProps } from '../model/LinkProps';
3
3
  import { isUUID } from '../utils/isUUID';
4
4
  import { clearAttachmentHref } from './clearAttachmentHref';
@@ -1,5 +1,5 @@
1
1
  import fs from 'fs';
2
- import path from 'path';
2
+ import path from 'path/posix';
3
3
  import util from 'util';
4
4
  import { type Attachment } from '../model/Attachment';
5
5
  import { isUUID } from '../utils/isUUID';
@@ -1,5 +1,5 @@
1
1
  import fs from 'fs';
2
- import path from 'path';
2
+ import path from 'path/posix';
3
3
  import sharp, { type Sharp } from 'sharp';
4
4
  import util from 'util';
5
5
  import { type ImageSize } from '../model/ImageSize';
@@ -1,4 +1,4 @@
1
- import path from 'path';
1
+ import path from 'path/posix';
2
2
  import sharp from 'sharp';
3
3
  import { type Picture } from '../model/Picture';
4
4
  import { isUUID } from '../utils/isUUID';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redneckz/wildless-cms-uni-blocks",
3
- "version": "0.15.340",
3
+ "version": "0.15.342",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "author": "ЦК",
@@ -11,6 +11,8 @@ const INITIAL_FILTRATION_STATE = {
11
11
  terminalTypeTerm: false,
12
12
  workAllTime: false,
13
13
  billAcceptorEnable: false,
14
+ locationDisabledPeople: false,
15
+ designDisabledPeople: false,
14
16
  };
15
17
 
16
18
  const FILTRATION_PREDICATES = {
@@ -18,6 +20,8 @@ const FILTRATION_PREDICATES = {
18
20
  terminalTypeTerm: (item: Atm) => item.terminalType?.toLowerCase() === 'терминал',
19
21
  workAllTime: (item: Atm) => item.workTime?.toLowerCase() === 'круглосуточно',
20
22
  billAcceptorEnable: (item: Atm) => Boolean(item.billAcceptorEnable),
23
+ locationDisabledPeople: (item: Atm) => Boolean(item.locationDisabledPeople),
24
+ designDisabledPeople: (item: Atm) => Boolean(item.designDisabledPeople),
21
25
  };
22
26
 
23
27
  export interface AtmsMapProps {
@@ -108,4 +108,6 @@ export interface Atm {
108
108
  workTime?: string;
109
109
  gpsLatitude?: number;
110
110
  gpsLongitude?: number;
111
+ locationDisabledPeople?: boolean;
112
+ designDisabledPeople?: boolean;
111
113
  }
@@ -21,6 +21,8 @@ const FILTRATION_LABELS = {
21
21
  bullionOperations: 'Операции со слитками',
22
22
  preciousMetalsOperations: 'Операции с драгоценными металлами',
23
23
  transferringDataToBiometricSystem: 'Передача фото и голоса в Единую биометрическую систему',
24
+ locationDisabledPeople: 'Для маломобильных',
25
+ designDisabledPeople: 'Для слабовидящих',
24
26
  remoteWorkplace: 'Удаленное рабочее место',
25
27
  };
26
28
 
@@ -31,7 +33,7 @@ export const renderFiltrationForm = (
31
33
  { field, reset }: { field: FormFieldRegisterer<any>; reset: () => void },
32
34
  onlyOffice?: boolean,
33
35
  ) => {
34
- const visibleFiltersNum = 4;
36
+ const visibleFiltersNum = onlyOffice ? 4 : 6;
35
37
 
36
38
  const filtersCheckbox = (filters || []).map((key) => (
37
39
  <Checkbox key={key} text={FILTRATION_LABELS[key]} {...field(key)} />
@@ -1,6 +1,6 @@
1
1
  import fs from 'fs';
2
2
  import glob from 'glob';
3
- import path from 'path';
3
+ import path from 'path/posix';
4
4
  import util from 'util';
5
5
  import { computeAPIFallback } from '../components/ContentPage/computeAPIFallback';
6
6
  import { normalizePage } from '../components/ContentPage/normalizePage';
@@ -46,7 +46,10 @@ export class ContentPageRepository {
46
46
  return JSON.parse(await readFile(filePath, 'utf-8'));
47
47
  }
48
48
 
49
- async generatePageData(slug: Slug, options?: TransformationOptions): Promise<ContentPageDef> {
49
+ async generatePageData(
50
+ slug: Slug,
51
+ options?: Partial<TransformationOptions>,
52
+ ): Promise<ContentPageDef> {
50
53
  const pathname = path.join(this.options.contentDir, ...slug);
51
54
  const indexFilePath = path.join(pathname, `index${PAGE_EXT}`);
52
55
  const pageFilePath = `${pathname}${PAGE_EXT}`;
@@ -58,7 +61,10 @@ export class ContentPageRepository {
58
61
  return { ...data, fallback: (await computeAPIFallback(data)) || {} };
59
62
  }
60
63
 
61
- generatePage(filePath: string, options?: TransformationOptions): Promise<ContentPageDef> {
64
+ generatePage(
65
+ filePath: string,
66
+ options?: Partial<TransformationOptions>,
67
+ ): Promise<ContentPageDef> {
62
68
  return transformContentPage(filePath, { ...this.options, ...options });
63
69
  }
64
70
  }
@@ -1,4 +1,4 @@
1
- import path from 'path';
1
+ import path from 'path/posix';
2
2
  import { type ImgSource } from '../model/Picture';
3
3
  import { type TransformationOptions } from './TransformationOptions';
4
4
 
@@ -1,5 +1,5 @@
1
1
  import fs from 'fs';
2
- import path from 'path';
2
+ import path from 'path/posix';
3
3
  import util from 'util';
4
4
 
5
5
  const mkdir = util.promisify(fs.mkdir);
@@ -1,4 +1,4 @@
1
- import path from 'path';
1
+ import path from 'path/posix';
2
2
  import type { LinkProps } from '../model/LinkProps';
3
3
  import { isUUID } from '../utils/isUUID';
4
4
  import { clearAttachmentHref } from './clearAttachmentHref';
@@ -1,5 +1,5 @@
1
1
  import fs from 'fs';
2
- import path from 'path';
2
+ import path from 'path/posix';
3
3
  import util from 'util';
4
4
  import { type Attachment } from '../model/Attachment';
5
5
  import { isUUID } from '../utils/isUUID';
@@ -1,5 +1,5 @@
1
1
  import fs from 'fs';
2
- import path from 'path';
2
+ import path from 'path/posix';
3
3
  import sharp, { type Sharp } from 'sharp';
4
4
  import util from 'util';
5
5
  import { type ImageSize } from '../model/ImageSize';
@@ -1,4 +1,4 @@
1
- import path from 'path';
1
+ import path from 'path/posix';
2
2
  import sharp from 'sharp';
3
3
  import { type Picture } from '../model/Picture';
4
4
  import { isUUID } from '../utils/isUUID';