spoko-design-system 1.1.0 → 1.1.2

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 (111) hide show
  1. package/.claude/settings.local.json +2 -1
  2. package/.github/workflows/code-quality.yml +3 -3
  3. package/.github/workflows/sonarcloud.yml +1 -1
  4. package/.prettierrc +1 -0
  5. package/CHANGELOG.md +12 -0
  6. package/package.json +8 -2
  7. package/src/MyComponent.astro +1 -1
  8. package/src/components/Badge.vue +2 -2
  9. package/src/components/Badges.vue +17 -7
  10. package/src/components/Breadcrumbs.vue +47 -39
  11. package/src/components/Button.vue +31 -30
  12. package/src/components/ButtonCopy.astro +12 -17
  13. package/src/components/ButtonCopy.vue +26 -25
  14. package/src/components/Card.astro +4 -6
  15. package/src/components/Carousel.astro +4 -4
  16. package/src/components/Category/CategoriesCarousel.astro +75 -75
  17. package/src/components/Category/CategoryDetails.astro +75 -79
  18. package/src/components/Category/CategoryLink.vue +8 -12
  19. package/src/components/Category/CategorySidebarToggler.vue +2 -7
  20. package/src/components/Category/CategoryTile.astro +3 -3
  21. package/src/components/Category/CategoryViewToggler.astro +18 -18
  22. package/src/components/Category/SubCategoryLink.vue +13 -13
  23. package/src/components/Faq.astro +16 -17
  24. package/src/components/FaqItem.astro +27 -27
  25. package/src/components/FeaturesList.vue +19 -29
  26. package/src/components/FuckRussia.vue +40 -27
  27. package/src/components/HandDrive.astro +11 -15
  28. package/src/components/Header/Header.astro +165 -166
  29. package/src/components/Header/SkipToContent.astro +1 -1
  30. package/src/components/Headline.vue +44 -27
  31. package/src/components/Image.astro +5 -7
  32. package/src/components/Input.vue +143 -153
  33. package/src/components/Jumbotron/index.astro +143 -156
  34. package/src/components/Jumbotron/types.ts +28 -29
  35. package/src/components/Jumbotron/variants/Default.astro +44 -40
  36. package/src/components/Jumbotron/variants/Hero.astro +45 -53
  37. package/src/components/Jumbotron/variants/Post.astro +68 -64
  38. package/src/components/Jumbotron/variants/PostSplit.astro +89 -81
  39. package/src/components/Jumbotron.astro +12 -12
  40. package/src/components/LanguageSuggestion.astro +66 -69
  41. package/src/components/LeftSidebar.astro +10 -10
  42. package/src/components/MainColors.vue +2 -2
  43. package/src/components/MainInput.vue +6 -3
  44. package/src/components/Modal.astro +2 -2
  45. package/src/components/PartNumber.vue +2 -3
  46. package/src/components/Post/PostCategories.astro +2 -4
  47. package/src/components/Post/PostCategories.vue +2 -2
  48. package/src/components/PostHeader.astro +4 -6
  49. package/src/components/PrCode.vue +20 -19
  50. package/src/components/Product/ProductButton.vue +2 -5
  51. package/src/components/Product/ProductCarousel.astro +38 -27
  52. package/src/components/Product/ProductColors.vue +46 -42
  53. package/src/components/Product/ProductDetailName.vue +22 -22
  54. package/src/components/Product/ProductDetails.vue +115 -99
  55. package/src/components/Product/ProductDoc.vue +27 -25
  56. package/src/components/Product/ProductEngineType.vue +13 -10
  57. package/src/components/Product/ProductImage.astro +18 -19
  58. package/src/components/Product/ProductLink.vue +55 -58
  59. package/src/components/Product/ProductLinkInfo.astro +15 -18
  60. package/src/components/Product/ProductModel.vue +25 -24
  61. package/src/components/Product/ProductModels.vue +29 -33
  62. package/src/components/Product/ProductName.vue +15 -15
  63. package/src/components/Product/ProductNumber.astro +23 -31
  64. package/src/components/Product/ProductPositions.vue +32 -34
  65. package/src/components/ProductCarousel.astro +5 -5
  66. package/src/components/ProductCodes.vue +12 -14
  67. package/src/components/ProductDetailName.vue +18 -20
  68. package/src/components/ProductDetailsList.vue +48 -27
  69. package/src/components/Quote.vue +8 -6
  70. package/src/components/ReloadPrompt.astro +39 -47
  71. package/src/components/SlimBanner.vue +44 -19
  72. package/src/components/Table.vue +4 -6
  73. package/src/components/Translations.vue +17 -8
  74. package/src/components/flags/FlagPL.vue +4 -3
  75. package/src/components/flags/FlagUA.vue +2 -2
  76. package/src/components/layout/CallToAction.astro +17 -12
  77. package/src/components/layout/Container.astro +3 -1
  78. package/src/components/layout/Header.astro +12 -21
  79. package/src/config.ts +43 -43
  80. package/src/design.config.ts +63 -63
  81. package/src/env.d.ts +4 -4
  82. package/src/layouts/Layout.astro +10 -19
  83. package/src/layouts/MainLayout.astro +13 -19
  84. package/src/layouts/partials/FooterCommon.astro +2 -2
  85. package/src/layouts/partials/HeadCommon.astro +9 -9
  86. package/src/layouts/partials/HeadSEO.astro +12 -5
  87. package/src/pages/components/icons.astro +130 -121
  88. package/src/pages/core/shadows.astro +18 -11
  89. package/src/pages/index.astro +178 -75
  90. package/src/pwa.ts +4 -4
  91. package/src/styles/base/base.css +14 -19
  92. package/src/styles/base/grid.css +54 -58
  93. package/src/styles/base/typography.css +40 -40
  94. package/src/styles/content.css +25 -23
  95. package/src/styles/main.css +5 -6
  96. package/src/types/Product.ts +31 -31
  97. package/src/types/astro.d.ts +1 -1
  98. package/src/types/index.ts +234 -237
  99. package/src/utils/api/getCategories.ts +9 -9
  100. package/src/utils/category/getMainCategoryList.ts +22 -22
  101. package/src/utils/category/getSortedCategories.ts +7 -11
  102. package/src/utils/product/getPriceFormatted.ts +14 -11
  103. package/src/utils/product/getProductChecklist.ts +10 -11
  104. package/src/utils/product/useFormatProductNumber.ts +18 -9
  105. package/src/utils/seo/getShorterDescription.ts +6 -4
  106. package/src/utils/text/formatDate.ts +2 -3
  107. package/src/utils/text/formatLocaleNumber.ts +2 -2
  108. package/src/utils/text/formatPad.ts +2 -2
  109. package/src/utils/text/getNumberFormatted.ts +10 -10
  110. package/src/utils/text/getTranslatedLink.ts +3 -3
  111. package/src/utils/text.ts +11 -8
@@ -1,237 +1,234 @@
1
- /// <reference types="vite/client" />
2
-
3
- export interface Breadcrumb {
4
- name: string,
5
- path: string
6
- }
7
-
8
-
9
- export interface Navigation {
10
- currentIndex: number | null
11
- prev: Product | null
12
- next: Product | null
13
- }
14
-
15
- export interface ResponsiveImage {
16
- media: string
17
- src: string
18
- }
19
-
20
- export interface SubCategory {
21
- id: number
22
- name: string
23
- parent_id: number
24
- title?: string
25
- desc?: string
26
- slug: string
27
- sort: number | null
28
- description?: string
29
- hasProducts: boolean
30
- photo?: string | null
31
- children?: SubCategory[]
32
- seoTitle?: string
33
- }
34
-
35
- export interface Category {
36
- id: number
37
- parent_id: number | null
38
- title?: string
39
- slug: string
40
- sort: number | null
41
- description?: string
42
- hasProducts: boolean
43
- photo?: string | null
44
- children: SubCategory[]
45
- seoTitle?: string
46
- }
47
-
48
- export interface CatObject {
49
- id: number
50
- name: string
51
- desc: string
52
- parent_id: number | null
53
- title?: string
54
- slug: string
55
- sort?: number | null
56
- description?: string
57
- hasProducts: boolean
58
- photo?: string | null
59
- children: SubCategory[]
60
- seoTitle?: string
61
- }
62
-
63
- export interface CatLevels {
64
- lvl1: Category|CatObject | null
65
- lvl2: CatObject | null
66
- lvl3: CatObject | null
67
- }
68
- export interface CatInfo {
69
- category: CatObject | null
70
- subcategory: CatObject | null
71
- subsubcategory: CatObject | null
72
- }
73
-
74
- export interface Replacement {
75
- date: string | null
76
- info: string | null
77
- number: string
78
- prcodes: string[] | null
79
- manufacturer: string | null
80
- }
81
-
82
- export interface Color {
83
- id: Number
84
- slug: String
85
- name?: String
86
- }
87
-
88
- export interface DetailList {
89
- name: string
90
- id: string
91
- value: string | number[] | Color[]
92
- translated: boolean
93
- icon: boolean | null
94
- isArrayValue: boolean | null
95
- }
96
-
97
- export interface importantDetail {
98
- name: string
99
- id: string
100
- value: string | number[]
101
- translated: boolean
102
- icon: boolean | null
103
- isArrayValue: boolean | null
104
- }
105
-
106
- export interface Detail {
107
- name: string
108
- value: string | number[]
109
- translated: boolean
110
- icon: boolean | null
111
- isArrayValue: boolean | null
112
- }
113
-
114
- export interface DetailObject {
115
- importantDetails: importantDetail[]
116
- list: DetailList[],
117
- checklist: DetailList[]
118
- }
119
-
120
-
121
- export interface Image {
122
- id: number
123
- path: string
124
- }
125
-
126
- export interface ImageType {
127
- id: number
128
- path: string
129
- }
130
-
131
- export interface ImageApi {
132
- id: number
133
- slug: string
134
- path: string
135
- }
136
-
137
- export interface ImageObject {
138
- id: number
139
- path: string
140
- }
141
-
142
- export interface ProductFile {
143
- id: number
144
- name: string
145
- slug: string
146
- path: string
147
- type: number
148
- }
149
-
150
- export interface Product {
151
- id: number
152
- number: string
153
- info: string | null
154
- date: string | null
155
- prcodes: string[] | null
156
- engines: string[] | null
157
- engine_type: EngineType[] | null
158
- manufacturer: string[] | null
159
- manufacturer_number: string | null
160
- related: string[] | null
161
- color_ids: string[] | null
162
- position: string[] | null
163
- model: string[] | null
164
- replacement: Replacement[] | null
165
- details: DetailList[] | null
166
- photo: string
167
- files: number[] | null
168
- images: Image[] | null
169
- category_id: number
170
- hand_drive: number | null
171
- materials: MaterialsObject[] | null
172
- sort: number
173
- created_at: string
174
- updated_at: string
175
- }
176
-
177
- export interface MaterialsObject {
178
- name: string,
179
- list: Material[]
180
- }
181
-
182
-
183
- export interface Product2FullSearch {
184
- number: string
185
- category_id: number
186
- photo: string
187
- hand_drive: number | null
188
- manufacturer: string[] | null
189
- date: string | null
190
- text: string
191
- details: DetailList[] | null
192
- }
193
-
194
- export interface Link {
195
- path: String
196
- name: String
197
- }
198
- export interface EngineType {
199
- id: Number
200
- type: String
201
- }
202
-
203
- export interface Model {
204
- id: Number
205
- slug: String
206
- sort: Number
207
- name: String
208
- }
209
-
210
- export interface Material {
211
- id: Number
212
- name: String
213
- slug: String
214
- sort: Number | null
215
- value?: String | null
216
- }
217
-
218
- export interface ProductImage {
219
- title: string
220
- alt: string
221
- link: string
222
- style?: string
223
- __typename: string
224
- }
225
-
226
- export interface Position {
227
- id: number
228
- slug: string
229
- sort: number
230
- name: string
231
- }
232
-
233
- export interface Hreflang {
234
- rel: 'alternate' | 'canonical'
235
- href: string
236
- hreflang: 'en' | 'pl' | 'x-default'
237
- }
1
+ /// <reference types="vite/client" />
2
+
3
+ export interface Breadcrumb {
4
+ name: string;
5
+ path: string;
6
+ }
7
+
8
+ export interface Navigation {
9
+ currentIndex: number | null;
10
+ prev: Product | null;
11
+ next: Product | null;
12
+ }
13
+
14
+ export interface ResponsiveImage {
15
+ media: string;
16
+ src: string;
17
+ }
18
+
19
+ export interface SubCategory {
20
+ id: number;
21
+ name: string;
22
+ parent_id: number;
23
+ title?: string;
24
+ desc?: string;
25
+ slug: string;
26
+ sort: number | null;
27
+ description?: string;
28
+ hasProducts: boolean;
29
+ photo?: string | null;
30
+ children?: SubCategory[];
31
+ seoTitle?: string;
32
+ }
33
+
34
+ export interface Category {
35
+ id: number;
36
+ parent_id: number | null;
37
+ title?: string;
38
+ slug: string;
39
+ sort: number | null;
40
+ description?: string;
41
+ hasProducts: boolean;
42
+ photo?: string | null;
43
+ children: SubCategory[];
44
+ seoTitle?: string;
45
+ }
46
+
47
+ export interface CatObject {
48
+ id: number;
49
+ name: string;
50
+ desc: string;
51
+ parent_id: number | null;
52
+ title?: string;
53
+ slug: string;
54
+ sort?: number | null;
55
+ description?: string;
56
+ hasProducts: boolean;
57
+ photo?: string | null;
58
+ children: SubCategory[];
59
+ seoTitle?: string;
60
+ }
61
+
62
+ export interface CatLevels {
63
+ lvl1: Category | CatObject | null;
64
+ lvl2: CatObject | null;
65
+ lvl3: CatObject | null;
66
+ }
67
+ export interface CatInfo {
68
+ category: CatObject | null;
69
+ subcategory: CatObject | null;
70
+ subsubcategory: CatObject | null;
71
+ }
72
+
73
+ export interface Replacement {
74
+ date: string | null;
75
+ info: string | null;
76
+ number: string;
77
+ prcodes: string[] | null;
78
+ manufacturer: string | null;
79
+ }
80
+
81
+ export interface Color {
82
+ id: Number;
83
+ slug: String;
84
+ name?: String;
85
+ }
86
+
87
+ export interface DetailList {
88
+ name: string;
89
+ id: string;
90
+ value: string | number[] | Color[];
91
+ translated: boolean;
92
+ icon: boolean | null;
93
+ isArrayValue: boolean | null;
94
+ }
95
+
96
+ export interface importantDetail {
97
+ name: string;
98
+ id: string;
99
+ value: string | number[];
100
+ translated: boolean;
101
+ icon: boolean | null;
102
+ isArrayValue: boolean | null;
103
+ }
104
+
105
+ export interface Detail {
106
+ name: string;
107
+ value: string | number[];
108
+ translated: boolean;
109
+ icon: boolean | null;
110
+ isArrayValue: boolean | null;
111
+ }
112
+
113
+ export interface DetailObject {
114
+ importantDetails: importantDetail[];
115
+ list: DetailList[];
116
+ checklist: DetailList[];
117
+ }
118
+
119
+ export interface Image {
120
+ id: number;
121
+ path: string;
122
+ }
123
+
124
+ export interface ImageType {
125
+ id: number;
126
+ path: string;
127
+ }
128
+
129
+ export interface ImageApi {
130
+ id: number;
131
+ slug: string;
132
+ path: string;
133
+ }
134
+
135
+ export interface ImageObject {
136
+ id: number;
137
+ path: string;
138
+ }
139
+
140
+ export interface ProductFile {
141
+ id: number;
142
+ name: string;
143
+ slug: string;
144
+ path: string;
145
+ type: number;
146
+ }
147
+
148
+ export interface Product {
149
+ id: number;
150
+ number: string;
151
+ info: string | null;
152
+ date: string | null;
153
+ prcodes: string[] | null;
154
+ engines: string[] | null;
155
+ engine_type: EngineType[] | null;
156
+ manufacturer: string[] | null;
157
+ manufacturer_number: string | null;
158
+ related: string[] | null;
159
+ color_ids: string[] | null;
160
+ position: string[] | null;
161
+ model: string[] | null;
162
+ replacement: Replacement[] | null;
163
+ details: DetailList[] | null;
164
+ photo: string;
165
+ files: number[] | null;
166
+ images: Image[] | null;
167
+ category_id: number;
168
+ hand_drive: number | null;
169
+ materials: MaterialsObject[] | null;
170
+ sort: number;
171
+ created_at: string;
172
+ updated_at: string;
173
+ }
174
+
175
+ export interface MaterialsObject {
176
+ name: string;
177
+ list: Material[];
178
+ }
179
+
180
+ export interface Product2FullSearch {
181
+ number: string;
182
+ category_id: number;
183
+ photo: string;
184
+ hand_drive: number | null;
185
+ manufacturer: string[] | null;
186
+ date: string | null;
187
+ text: string;
188
+ details: DetailList[] | null;
189
+ }
190
+
191
+ export interface Link {
192
+ path: String;
193
+ name: String;
194
+ }
195
+ export interface EngineType {
196
+ id: Number;
197
+ type: String;
198
+ }
199
+
200
+ export interface Model {
201
+ id: Number;
202
+ slug: String;
203
+ sort: Number;
204
+ name: String;
205
+ }
206
+
207
+ export interface Material {
208
+ id: Number;
209
+ name: String;
210
+ slug: String;
211
+ sort: Number | null;
212
+ value?: String | null;
213
+ }
214
+
215
+ export interface ProductImage {
216
+ title: string;
217
+ alt: string;
218
+ link: string;
219
+ style?: string;
220
+ __typename: string;
221
+ }
222
+
223
+ export interface Position {
224
+ id: number;
225
+ slug: string;
226
+ sort: number;
227
+ name: string;
228
+ }
229
+
230
+ export interface Hreflang {
231
+ rel: 'alternate' | 'canonical';
232
+ href: string;
233
+ hreflang: 'en' | 'pl' | 'x-default';
234
+ }
@@ -1,9 +1,9 @@
1
- import { getData } from "../getData"
2
-
3
- export const getApiCategories = getData('categories')
4
-
5
- // const getApiCategories = async () => {
6
- // return await getData('categories');
7
- // }
8
-
9
- export default getApiCategories;
1
+ import { getData } from '../getData';
2
+
3
+ export const getApiCategories = getData('categories');
4
+
5
+ // const getApiCategories = async () => {
6
+ // return await getData('categories');
7
+ // }
8
+
9
+ export default getApiCategories;
@@ -1,22 +1,22 @@
1
- import type { CatObject } from "@types/index";
2
-
3
- import { getApiCategories } from "@utils/api/getCategories";
4
- import { getSortedCategories } from "@utils/category/getSortedCategories";
5
-
6
- // Retrieve main categories:
7
- export const getMainCategoryList = async (locale: string = 'en'): Promise<CatObject[]> => {
8
- // Fetch categories from API
9
- const categories = await getApiCategories();
10
-
11
- // Use category data directly (English only)
12
- const processedCategories = categories.map((category) => {
13
- return {
14
- ...category,
15
- name: category.name || category.slug,
16
- desc: category.desc || ''
17
- };
18
- });
19
-
20
- // Sort and return processed categories
21
- return processedCategories.sort(getSortedCategories);
22
- };
1
+ import type { CatObject } from '@types/index';
2
+
3
+ import { getApiCategories } from '@utils/api/getCategories';
4
+ import { getSortedCategories } from '@utils/category/getSortedCategories';
5
+
6
+ // Retrieve main categories:
7
+ export const getMainCategoryList = async (locale: string = 'en'): Promise<CatObject[]> => {
8
+ // Fetch categories from API
9
+ const categories = await getApiCategories();
10
+
11
+ // Use category data directly (English only)
12
+ const processedCategories = categories.map(category => {
13
+ return {
14
+ ...category,
15
+ name: category.name || category.slug,
16
+ desc: category.desc || '',
17
+ };
18
+ });
19
+
20
+ // Sort and return processed categories
21
+ return processedCategories.sort(getSortedCategories);
22
+ };
@@ -1,11 +1,7 @@
1
- import type { CatObject, SubCategory } from "@types/index";
2
-
3
-
4
- // compareFn
5
- export const getSortedCategories = (a: CatObject|SubCategory, b: CatObject|SubCategory) => {
6
- if (a.sort && b.sort)
7
- return (a.sort - b.sort)
8
-
9
- else
10
- return 0
11
- }
1
+ import type { CatObject, SubCategory } from '@types/index';
2
+
3
+ // compareFn
4
+ export const getSortedCategories = (a: CatObject | SubCategory, b: CatObject | SubCategory) => {
5
+ if (a.sort && b.sort) return a.sort - b.sort;
6
+ else return 0;
7
+ };
@@ -1,13 +1,16 @@
1
- export const getPriceFormatted = (product: any) => {
2
- // Default to EUR formatting for English-only design system
3
- if (product.price_eur) {
4
- return new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(product.price_eur)
5
- }
6
- if (product.price_pln) {
7
- return new Intl.NumberFormat('pl-PL', { style: 'currency', currency: 'PLN' }).format(product.price_pln)
8
- }
9
- return 'no price'
1
+ export const getPriceFormatted = (product: any) => {
2
+ // Default to EUR formatting for English-only design system
3
+ if (product.price_eur) {
4
+ return new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(
5
+ product.price_eur
6
+ );
10
7
  }
11
-
8
+ if (product.price_pln) {
9
+ return new Intl.NumberFormat('pl-PL', { style: 'currency', currency: 'PLN' }).format(
10
+ product.price_pln
11
+ );
12
+ }
13
+ return 'no price';
14
+ };
12
15
 
13
- export default getPriceFormatted;
16
+ export default getPriceFormatted;
@@ -1,16 +1,15 @@
1
+ export const getProductCheckList = productDetails => {
2
+ if (!productDetails || !productDetails.length) {
3
+ return null;
4
+ }
1
5
 
2
- export const getProductCheckList = (productDetails) => {
3
- if (!productDetails || !productDetails.length) {
4
- return null;
5
- }
6
+ const list = productDetails.filter(item => item.icon);
6
7
 
7
- const list = productDetails.filter(item => item.icon);
8
+ if (!list.length) {
9
+ return null;
10
+ }
8
11
 
9
- if (!list.length) {
10
- return null;
11
- }
12
-
13
- return list.map(detail => detail.value || 'Detail');
14
- }
12
+ return list.map(detail => detail.value || 'Detail');
13
+ };
15
14
 
16
15
  export default getProductCheckList;
@@ -11,32 +11,41 @@ interface FormattedNumbers {
11
11
  dash: string;
12
12
  }
13
13
 
14
- export default function useFormatProductNumber(productNumber: string | null): { formattedNumbers: FormattedNumbers | null } {
14
+ export default function useFormatProductNumber(productNumber: string | null): {
15
+ formattedNumbers: FormattedNumbers | null;
16
+ } {
15
17
  if (!productNumber) return { formattedNumbers: null };
16
18
 
17
19
  const formatProductNumber = (number: string, separator: string): string => {
18
20
  let formatted = number;
19
21
 
20
22
  if (isLetter(number[0]) && !isLetter(number[1]) && number.length === 9) {
21
- formatted = formatted.replace(LIQUIDS_PATTERN, `$1${separator}$2${separator}$3${separator}$4`);
23
+ formatted = formatted.replace(
24
+ LIQUIDS_PATTERN,
25
+ `$1${separator}$2${separator}$3${separator}$4`
26
+ );
22
27
  } else if (number.length >= 13) {
23
- formatted = formatted.replace(WHEELS_EMBLEMS_PATTERN, `$1${separator}$2${separator}$3${separator}$4${separator}$5`);
28
+ formatted = formatted.replace(
29
+ WHEELS_EMBLEMS_PATTERN,
30
+ `$1${separator}$2${separator}$3${separator}$4${separator}$5`
31
+ );
24
32
  } else if (number.length > 12) {
25
- formatted = formatted.replace(ACCESSORIES_MATS_PATTERN, `$1${separator}$2${separator}$3${separator}$4${separator}$5`);
33
+ formatted = formatted.replace(
34
+ ACCESSORIES_MATS_PATTERN,
35
+ `$1${separator}$2${separator}$3${separator}$4${separator}$5`
36
+ );
26
37
  } else {
27
38
  formatted = formatted.replace(OTHER_PARTS_PATTERN, `$1${separator}`);
28
39
  }
29
40
 
30
- return formatted
31
- .replace(' ', separator)
32
- .replace(/[^a-zA-Z0-9]$/, ''); // Remove the end trailing separator
41
+ return formatted.replace(' ', separator).replace(/[^a-zA-Z0-9]$/, ''); // Remove the end trailing separator
33
42
  };
34
43
 
35
44
  const formattedNumbers: FormattedNumbers = {
36
45
  standard: formatProductNumber(productNumber, '\u00A0'),
37
46
  dot: formatProductNumber(productNumber, '.'),
38
- dash: formatProductNumber(productNumber, '-')
47
+ dash: formatProductNumber(productNumber, '-'),
39
48
  };
40
49
 
41
50
  return { formattedNumbers };
42
- }
51
+ }