@goodhood-web/nebenan-base 4.4.0-development.1 → 4.4.0-development.10

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 (81) hide show
  1. package/index.d.ts +2 -1
  2. package/index.js +120 -120
  3. package/index.mjs +16387 -14827
  4. package/lib/CardCarousel/CardCarousel.d.ts +4 -0
  5. package/lib/CardCarousel/CardCarousel.types.d.ts +8 -0
  6. package/lib/ContentCreator/ContentCreator.d.ts +1 -1
  7. package/lib/ContentCreator/ContentCreator.types.d.ts +19 -4
  8. package/lib/ContentCreator/Store/contentCreator.d.ts +11 -0
  9. package/lib/ContentCreator/components/ContentCreatorFieldWrapper/ContentCreatorFieldsWrapper.d.ts +1 -1
  10. package/lib/ContentCreator/components/ContentCreatorFieldWrapper/components/ContentFieldsSheet/ContentFieldsSheet.d.ts +3 -3
  11. package/lib/ContentCreator/components/ContentCreatorFieldWrapper/components/ContentFieldsSheet/ContentFieldsSheet.types.d.ts +10 -4
  12. package/lib/ContentCreator/components/ContentCreatorFieldWrapper/components/ContentTypeField/ContentTypeField.d.ts +1 -1
  13. package/lib/ContentCreator/components/ContentCreatorFieldWrapper/components/ContentTypeField/ContentTypeField.types.d.ts +5 -0
  14. package/lib/ContentCreator/components/ContentCreatorFieldWrapper/components/EventFields/EventFields.d.ts +3 -0
  15. package/lib/ContentCreator/components/ContentCreatorFieldWrapper/components/EventFields/EventFields.types.d.ts +3 -0
  16. package/lib/ContentCreator/components/ContentCreatorFieldWrapper/components/ListModalField/CategoryModalField.d.ts +3 -0
  17. package/lib/ContentCreator/components/ContentCreatorFieldWrapper/components/ListModalField/DropdownButton.d.ts +3 -0
  18. package/lib/ContentCreator/components/ContentCreatorFieldWrapper/components/ListModalField/FormModalFields/FormCategory.d.ts +4 -0
  19. package/lib/ContentCreator/components/ContentCreatorFieldWrapper/components/ListModalField/FormModalFields/FormLocation.d.ts +5 -0
  20. package/lib/ContentCreator/components/ContentCreatorFieldWrapper/components/ListModalField/FormModalFields/FormModalsFields.types.d.ts +6 -0
  21. package/lib/ContentCreator/components/ContentCreatorFieldWrapper/components/ListModalField/FormModalFields/network.d.ts +12 -0
  22. package/lib/ContentCreator/components/ContentCreatorFieldWrapper/components/ListModalField/ListModalField.types.d.ts +26 -0
  23. package/lib/ContentCreator/components/ContentCreatorFieldWrapper/components/ListModalField/LocationModalField.d.ts +3 -0
  24. package/lib/ContentCreator/components/ContentCreatorFieldWrapper/components/MarketplaceFields/FormCurrencyInput.d.ts +4 -0
  25. package/lib/ContentCreator/components/ContentCreatorFieldWrapper/components/MarketplaceFields/FormMarketplaceImageCropper.d.ts +11 -0
  26. package/lib/ContentCreator/components/ContentCreatorFieldWrapper/components/MarketplaceFields/MarketplaceFields.d.ts +2 -1
  27. package/lib/ContentCreator/components/ContentCreatorFieldWrapper/components/MarketplaceFields/MarketplaceFields.types.d.ts +8 -0
  28. package/lib/ContentCreator/{validationSchemas/searchSchema.d.ts → components/ContentCreatorFieldWrapper/components/PostFields/FormRichTextArea.d.ts} +64 -57
  29. package/lib/ContentCreator/components/ContentCreatorFieldWrapper/components/ReachTypeField/ReachTypeField.d.ts +1 -1
  30. package/lib/ContentCreator/components/ContentCreatorFieldWrapper/components/index.d.ts +1 -1
  31. package/lib/ContentCreator/constants.d.ts +81 -0
  32. package/lib/ContentCreator/network.d.ts +2 -1
  33. package/lib/ContentCreator/utils/general.d.ts +23 -0
  34. package/lib/ContentCreator/utils/images.d.ts +15 -0
  35. package/lib/ContentCreator/utils/payloadGenerators.d.ts +46 -0
  36. package/lib/ContentCreator/validationSchemas/commonSchemas.d.ts +3 -2
  37. package/lib/ContentCreator/validationSchemas/dynamicValidationSchema.d.ts +158 -17
  38. package/lib/ContentCreator/validationSchemas/eventSchema.d.ts +61 -3
  39. package/lib/ContentCreator/validationSchemas/index.d.ts +0 -2
  40. package/lib/ContentCreator/validationSchemas/marketplaceSchema.d.ts +96 -4
  41. package/lib/ContentCreator/validationSchemas/postSchema.d.ts +246 -3
  42. package/lib/Feed/Aggregators/GridFeedAggregator/GridFeedAggregator.d.ts +1 -1
  43. package/lib/Feed/Aggregators/GridFeedAggregator/GridFeedAggregator.types.d.ts +1 -0
  44. package/lib/Feed/Aggregators/GridFeedAggregator/components/FeedEmptyStateCard/FeedEmptyStateCard.d.ts +1 -1
  45. package/lib/Feed/Aggregators/GridFeedAggregator/components/FeedEmptyStateCard/FeedEmptyStateCard.types.d.ts +5 -0
  46. package/lib/Feed/Aggregators/GridFeedAggregator/utils.d.ts +2 -2
  47. package/lib/Feed/Feed/Feed.d.ts +1 -1
  48. package/lib/Feed/Feed/Feed.types.d.ts +2 -0
  49. package/lib/Feed/Feed/utils.d.ts +1 -1
  50. package/lib/Feed/FeedItem/Marketplace/MarketplaceItemCardless/MarketplaceItemCardless.types.d.ts +1 -1
  51. package/lib/Forms/Fields/FormDateTimeInput.d.ts +9 -0
  52. package/lib/Forms/Fields/FormSwitcherToggle.d.ts +10 -0
  53. package/lib/Gallery/Gallery.types.d.ts +1 -1
  54. package/lib/ImageAttachment/ImageAttachment.types.d.ts +5 -1
  55. package/lib/ImageAttachment/components/SwiperImageAttachment/SwiperImageAttachment.d.ts +3 -1
  56. package/lib/MarketplaceImageCropper/MarketplaceImageCropper.d.ts +1 -1
  57. package/lib/MarketplaceImageCropper/MarketplaceImageCropper.types.d.ts +4 -0
  58. package/lib/MarketplaceImageCropper/components/ImageThumbnailGrid/ImageThumbnailGrid.d.ts +2 -1
  59. package/lib/MarketplaceImageCropper/constants.d.ts +1 -0
  60. package/lib/MultiImageCropper/MultiImageCropper.d.ts +1 -1
  61. package/lib/MultiImageCropper/MultiImageCropper.types.d.ts +1 -1
  62. package/lib/RichTextArea/RichTextArea.types.d.ts +3 -0
  63. package/lib/RichTextArea/components/POI/POIRecommendation.d.ts +1 -1
  64. package/lib/RichTextArea/components/POI/POIRecommendation.types.d.ts +9 -0
  65. package/lib/RichTextArea/components/POI/components/Intro/Intro.d.ts +1 -3
  66. package/lib/RichTextArea/components/POI/components/NewItemAddition/NewItemAddition.d.ts +6 -0
  67. package/lib/RichTextArea/components/POI/network.d.ts +1 -1
  68. package/lib/RichTextArea/lexical/LexicalImagesPreview.d.ts +4 -1
  69. package/lib/RichTextArea/useImageUpload.d.ts +5 -1
  70. package/lib/SearchableList/SearchableList.types.d.ts +1 -0
  71. package/lib/SearchableList/components/Content/Content.d.ts +1 -1
  72. package/lib/SearchableList/components/Content/Content.types.d.ts +1 -0
  73. package/lib/utils/client.d.ts +1 -1
  74. package/package.json +1 -1
  75. package/style.css +1 -1
  76. package/lib/ContentCreator/components/ContentCreatorFieldWrapper/components/EventFields/EventField.d.ts +0 -2
  77. package/lib/ContentCreator/utils.d.ts +0 -14
  78. package/lib/ContentCreator/validationSchemas/recommendationSchema.d.ts +0 -127
  79. package/lib/Forms/Fields/FormRichTextArea.d.ts +0 -10
  80. package/lib/RichTextArea/ImagesPreview/ImagesPreview.d.ts +0 -7
  81. /package/lib/ContentCreator/components/ContentCreatorFieldWrapper/components/ReachTypeField/{ReachTypeFields.type.d.ts → ReachTypeFields.types.d.ts} +0 -0
@@ -79,7 +79,6 @@ export declare const postValidationSchema: z.ZodObject<{
79
79
  } | undefined;
80
80
  }>;
81
81
  content_type: z.ZodLiteral<"post">;
82
- hood_group_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
83
82
  reach: z.ZodEnum<["profile", "hood", "extended", "public"]>;
84
83
  subject: z.ZodString;
85
84
  }, "strip", z.ZodTypeAny, {
@@ -102,7 +101,6 @@ export declare const postValidationSchema: z.ZodObject<{
102
101
  content_type: "post";
103
102
  subject: string;
104
103
  reach: "profile" | "public" | "hood" | "extended";
105
- hood_group_id?: number | null | undefined;
106
104
  }, {
107
105
  content: {
108
106
  body: string;
@@ -123,5 +121,250 @@ export declare const postValidationSchema: z.ZodObject<{
123
121
  content_type: "post";
124
122
  subject: string;
125
123
  reach: "profile" | "public" | "hood" | "extended";
126
- hood_group_id?: number | null | undefined;
124
+ }>;
125
+ export declare const searchValidationSchema: z.ZodObject<{
126
+ content: z.ZodObject<{
127
+ attachments: z.ZodOptional<z.ZodObject<{
128
+ images: z.ZodOptional<z.ZodArray<z.ZodObject<{
129
+ croppedImg: z.ZodType<File, z.ZodTypeDef, File>;
130
+ id: z.ZodString;
131
+ originalImg: z.ZodType<File, z.ZodTypeDef, File>;
132
+ signedId: z.ZodOptional<z.ZodString>;
133
+ }, "strip", z.ZodTypeAny, {
134
+ id: string;
135
+ croppedImg: File;
136
+ originalImg: File;
137
+ signedId?: string | undefined;
138
+ }, {
139
+ id: string;
140
+ croppedImg: File;
141
+ originalImg: File;
142
+ signedId?: string | undefined;
143
+ }>, "many">>;
144
+ }, "strip", z.ZodTypeAny, {
145
+ images?: {
146
+ id: string;
147
+ croppedImg: File;
148
+ originalImg: File;
149
+ signedId?: string | undefined;
150
+ }[] | undefined;
151
+ }, {
152
+ images?: {
153
+ id: string;
154
+ croppedImg: File;
155
+ originalImg: File;
156
+ signedId?: string | undefined;
157
+ }[] | undefined;
158
+ }>>;
159
+ body: z.ZodString;
160
+ embeddables: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
161
+ gid: z.ZodString;
162
+ indices: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber, "many">>>;
163
+ role: z.ZodEnum<["mention", "link", "profile"]>;
164
+ }, "strip", z.ZodTypeAny, {
165
+ role: "link" | "profile" | "mention";
166
+ gid: string;
167
+ indices?: number[] | null | undefined;
168
+ }, {
169
+ role: "link" | "profile" | "mention";
170
+ gid: string;
171
+ indices?: number[] | null | undefined;
172
+ }>, "many">>>;
173
+ }, "strip", z.ZodTypeAny, {
174
+ body: string;
175
+ embeddables?: {
176
+ role: "link" | "profile" | "mention";
177
+ gid: string;
178
+ indices?: number[] | null | undefined;
179
+ }[] | null | undefined;
180
+ attachments?: {
181
+ images?: {
182
+ id: string;
183
+ croppedImg: File;
184
+ originalImg: File;
185
+ signedId?: string | undefined;
186
+ }[] | undefined;
187
+ } | undefined;
188
+ }, {
189
+ body: string;
190
+ embeddables?: {
191
+ role: "link" | "profile" | "mention";
192
+ gid: string;
193
+ indices?: number[] | null | undefined;
194
+ }[] | null | undefined;
195
+ attachments?: {
196
+ images?: {
197
+ id: string;
198
+ croppedImg: File;
199
+ originalImg: File;
200
+ signedId?: string | undefined;
201
+ }[] | undefined;
202
+ } | undefined;
203
+ }>;
204
+ content_type: z.ZodLiteral<"search">;
205
+ reach: z.ZodEnum<["profile", "hood", "extended", "public"]>;
206
+ subject: z.ZodString;
207
+ }, "strip", z.ZodTypeAny, {
208
+ content: {
209
+ body: string;
210
+ embeddables?: {
211
+ role: "link" | "profile" | "mention";
212
+ gid: string;
213
+ indices?: number[] | null | undefined;
214
+ }[] | null | undefined;
215
+ attachments?: {
216
+ images?: {
217
+ id: string;
218
+ croppedImg: File;
219
+ originalImg: File;
220
+ signedId?: string | undefined;
221
+ }[] | undefined;
222
+ } | undefined;
223
+ };
224
+ content_type: "search";
225
+ subject: string;
226
+ reach: "profile" | "public" | "hood" | "extended";
227
+ }, {
228
+ content: {
229
+ body: string;
230
+ embeddables?: {
231
+ role: "link" | "profile" | "mention";
232
+ gid: string;
233
+ indices?: number[] | null | undefined;
234
+ }[] | null | undefined;
235
+ attachments?: {
236
+ images?: {
237
+ id: string;
238
+ croppedImg: File;
239
+ originalImg: File;
240
+ signedId?: string | undefined;
241
+ }[] | undefined;
242
+ } | undefined;
243
+ };
244
+ content_type: "search";
245
+ subject: string;
246
+ reach: "profile" | "public" | "hood" | "extended";
247
+ }>;
248
+ export declare const recommendationValidationSchema: z.ZodObject<{
249
+ content: z.ZodObject<{
250
+ attachments: z.ZodOptional<z.ZodObject<{
251
+ images: z.ZodOptional<z.ZodArray<z.ZodObject<{
252
+ croppedImg: z.ZodType<File, z.ZodTypeDef, File>;
253
+ id: z.ZodString;
254
+ originalImg: z.ZodType<File, z.ZodTypeDef, File>;
255
+ signedId: z.ZodOptional<z.ZodString>;
256
+ }, "strip", z.ZodTypeAny, {
257
+ id: string;
258
+ croppedImg: File;
259
+ originalImg: File;
260
+ signedId?: string | undefined;
261
+ }, {
262
+ id: string;
263
+ croppedImg: File;
264
+ originalImg: File;
265
+ signedId?: string | undefined;
266
+ }>, "many">>;
267
+ }, "strip", z.ZodTypeAny, {
268
+ images?: {
269
+ id: string;
270
+ croppedImg: File;
271
+ originalImg: File;
272
+ signedId?: string | undefined;
273
+ }[] | undefined;
274
+ }, {
275
+ images?: {
276
+ id: string;
277
+ croppedImg: File;
278
+ originalImg: File;
279
+ signedId?: string | undefined;
280
+ }[] | undefined;
281
+ }>>;
282
+ body: z.ZodString;
283
+ embeddables: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
284
+ gid: z.ZodString;
285
+ indices: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber, "many">>>;
286
+ role: z.ZodEnum<["mention", "link", "profile"]>;
287
+ }, "strip", z.ZodTypeAny, {
288
+ role: "link" | "profile" | "mention";
289
+ gid: string;
290
+ indices?: number[] | null | undefined;
291
+ }, {
292
+ role: "link" | "profile" | "mention";
293
+ gid: string;
294
+ indices?: number[] | null | undefined;
295
+ }>, "many">>>;
296
+ }, "strip", z.ZodTypeAny, {
297
+ body: string;
298
+ embeddables?: {
299
+ role: "link" | "profile" | "mention";
300
+ gid: string;
301
+ indices?: number[] | null | undefined;
302
+ }[] | null | undefined;
303
+ attachments?: {
304
+ images?: {
305
+ id: string;
306
+ croppedImg: File;
307
+ originalImg: File;
308
+ signedId?: string | undefined;
309
+ }[] | undefined;
310
+ } | undefined;
311
+ }, {
312
+ body: string;
313
+ embeddables?: {
314
+ role: "link" | "profile" | "mention";
315
+ gid: string;
316
+ indices?: number[] | null | undefined;
317
+ }[] | null | undefined;
318
+ attachments?: {
319
+ images?: {
320
+ id: string;
321
+ croppedImg: File;
322
+ originalImg: File;
323
+ signedId?: string | undefined;
324
+ }[] | undefined;
325
+ } | undefined;
326
+ }>;
327
+ content_type: z.ZodLiteral<"recommendation">;
328
+ reach: z.ZodEnum<["profile", "hood", "extended", "public"]>;
329
+ subject: z.ZodString;
330
+ }, "strip", z.ZodTypeAny, {
331
+ content: {
332
+ body: string;
333
+ embeddables?: {
334
+ role: "link" | "profile" | "mention";
335
+ gid: string;
336
+ indices?: number[] | null | undefined;
337
+ }[] | null | undefined;
338
+ attachments?: {
339
+ images?: {
340
+ id: string;
341
+ croppedImg: File;
342
+ originalImg: File;
343
+ signedId?: string | undefined;
344
+ }[] | undefined;
345
+ } | undefined;
346
+ };
347
+ content_type: "recommendation";
348
+ subject: string;
349
+ reach: "profile" | "public" | "hood" | "extended";
350
+ }, {
351
+ content: {
352
+ body: string;
353
+ embeddables?: {
354
+ role: "link" | "profile" | "mention";
355
+ gid: string;
356
+ indices?: number[] | null | undefined;
357
+ }[] | null | undefined;
358
+ attachments?: {
359
+ images?: {
360
+ id: string;
361
+ croppedImg: File;
362
+ originalImg: File;
363
+ signedId?: string | undefined;
364
+ }[] | undefined;
365
+ } | undefined;
366
+ };
367
+ content_type: "recommendation";
368
+ subject: string;
369
+ reach: "profile" | "public" | "hood" | "extended";
127
370
  }>;
@@ -1,2 +1,2 @@
1
1
  import { GridFeedAggregatorProps } from './GridFeedAggregator.types';
2
- export default function GridFeedAggregator({ feedType, items }: GridFeedAggregatorProps): import("react/jsx-runtime").JSX.Element;
2
+ export default function GridFeedAggregator({ feedType, items, onCreateContent, }: GridFeedAggregatorProps): import("react/jsx-runtime").JSX.Element;
@@ -2,6 +2,7 @@ import { GridFeedAd, GridFeedHoodMessage, GridFeedProps } from '../../Feed/Feed.
2
2
  export type GridFeedAggregatorProps = {
3
3
  feedType: GridFeedProps['feedType'];
4
4
  items: (GridFeedAd | GridFeedHoodMessage)[];
5
+ onCreateContent?: () => void;
5
6
  };
6
7
  export declare const GridFeedAggregatorNavigateEnum: {
7
8
  readonly event: "";
@@ -1,2 +1,2 @@
1
1
  import { FeedEmptyStateCardProps } from './FeedEmptyStateCard.types';
2
- export default function FeedEmptyStateCard({ classNameButtonDesktop, classNameButtonMobile, feedType, isCard, onClick, }: FeedEmptyStateCardProps): import("react/jsx-runtime").JSX.Element;
2
+ export default function FeedEmptyStateCard({ classNameButtonDesktop, classNameButtonMobile, feedType, icon, iconColor, isCard, onClick, primaryText, secondaryText, }: FeedEmptyStateCardProps): import("react/jsx-runtime").JSX.Element;
@@ -1,8 +1,13 @@
1
+ import { StickerProps } from '../../../../../../../../ui/src/lib/Atoms/Badges/Sticker/Sticker.types';
1
2
  import { GridFeedProps } from '../../../../Feed/Feed.types';
2
3
  export interface FeedEmptyStateCardProps {
3
4
  classNameButtonDesktop?: string;
4
5
  classNameButtonMobile?: string;
5
6
  feedType: GridFeedProps['feedType'];
7
+ icon?: StickerProps['icon'];
8
+ iconColor?: StickerProps['color'];
6
9
  isCard?: boolean;
7
10
  onClick: () => void;
11
+ primaryText?: string;
12
+ secondaryText?: string;
8
13
  }
@@ -1,2 +1,2 @@
1
- export declare const showFeedEmptyStateCard: (isDesktop: boolean, length: number) => boolean;
2
- export declare const getEmptyStateCardSpan: (isDesktop: boolean, length: number) => number;
1
+ export declare const showFeedEmptyStateCard: (isDesktop: boolean | undefined, length: number) => boolean;
2
+ export declare const getEmptyStateCardSpan: (isDesktop: boolean | undefined, length: number) => number;
@@ -1,3 +1,3 @@
1
1
  import { GridFeedProps } from './Feed.types';
2
- declare const Feed: ({ ads, feedItems, feedType, viewMode, }: GridFeedProps) => import("react/jsx-runtime").JSX.Element | null;
2
+ declare const Feed: ({ ads, feedItems, feedType, onCreateContent, viewMode, }: GridFeedProps) => import("react/jsx-runtime").JSX.Element | null;
3
3
  export default Feed;
@@ -30,12 +30,14 @@ export interface GridFeedHoodMessage extends GridFeedItem {
30
30
  }
31
31
  export interface GridFeedFeedAggregator extends GridFeedItem {
32
32
  items: (GridFeedHoodMessage | GridFeedAd)[];
33
+ onCreateContent?: () => void;
33
34
  type: 'grid-feed-aggregator';
34
35
  }
35
36
  export type GridFeedProps = {
36
37
  ads?: GridFeedAd[];
37
38
  feedItems: PostResponse[];
38
39
  feedType: (typeof GridFeedTypeEnum)[keyof typeof GridFeedTypeEnum];
40
+ onCreateContent?: () => void;
39
41
  viewMode?: (typeof FeedViewMode)[keyof typeof FeedViewMode];
40
42
  };
41
43
  export {};
@@ -21,7 +21,7 @@ export declare const filterAdsByFeedLength: (ads: GridFeedAd[] | undefined, feed
21
21
  * Example: block: 1 means "show after the 1st chunk"
22
22
  */
23
23
  export declare const splitIntoChunks: (feedItems: PostResponse[], ads?: GridFeedAd[], chunkSize?: number) => GridFeedItem[];
24
- export declare const formatCurrency: (cents: number | null) => string;
24
+ export declare const formatCurrency: (cents: number | null) => string | null;
25
25
  export declare const getLang: <T>(lang: Record<string, T>, selectedLang?: string) => T;
26
26
  export declare const interweaveWithAds: (feedItems: PostResponse[], ads?: GridFeedAd[], chunkSize?: number) => FeedItem[];
27
27
  export {};
@@ -6,7 +6,7 @@ export interface MarketplaceItemCardlessTypes {
6
6
  image?: string;
7
7
  onClick?: () => void;
8
8
  premiumFeature?: boolean;
9
- price: string;
9
+ price: string | null;
10
10
  reserved: boolean;
11
11
  reservedText: string;
12
12
  timeStamp: string;
@@ -0,0 +1,9 @@
1
+ import { UseControllerProps } from 'react-hook-form';
2
+ import { DateTimeInputProps } from '../../../../../ui/src/lib/Atoms/Inputs/DateTimeInput/DateTimeInput.types';
3
+ export type FormDateInputProps = UseControllerProps & Partial<DateTimeInputProps> & {
4
+ error?: string | null;
5
+ name: string;
6
+ type: 'date' | 'time';
7
+ };
8
+ export declare const FormDateTimeInput: ({ error, name, type, ...props }: FormDateInputProps) => import("react/jsx-runtime").JSX.Element;
9
+ export default FormDateTimeInput;
@@ -0,0 +1,10 @@
1
+ import { UseControllerProps } from 'react-hook-form';
2
+ import { SwitcherToggleProps } from '../../../../../ui/src/lib/Molecules/Selections/SwitcherToggle/SwitcherToggle.types';
3
+ export type FormTextInputProps = UseControllerProps & Partial<SwitcherToggleProps> & {
4
+ defaultCheckedItemId?: string;
5
+ items: SwitcherToggleProps['items'];
6
+ name: string;
7
+ onClick?: (value: string) => void;
8
+ };
9
+ declare const FormSwitcherToggle: ({ defaultCheckedItemId, items, name, onClick, ...props }: FormTextInputProps) => import("react/jsx-runtime").JSX.Element;
10
+ export default FormSwitcherToggle;
@@ -11,7 +11,7 @@ export type GalleryProps = {
11
11
  ads?: GalleryAdType[];
12
12
  ctaSlot?: ImageAttachmentProps['ctaSlot'];
13
13
  footerAd?: GalleryAdType;
14
- images: ImageAttachmentProps['images'];
14
+ images: string[];
15
15
  reserved?: ImageAttachmentProps['reserved'];
16
16
  stickerSlot?: ImageAttachmentProps['stickerSlot'];
17
17
  type?: ImageAttachmentProps['type'];
@@ -1,8 +1,12 @@
1
1
  import { ReactElement } from 'react';
2
+ export type CollageImage = string | {
3
+ src: string;
4
+ uploadFailed?: boolean;
5
+ };
2
6
  export type ImageAttachmentProps = {
3
7
  activeIndex?: number;
4
8
  ctaSlot?: ReactElement;
5
- images: string[];
9
+ images: CollageImage[];
6
10
  onImageClick: (index: number) => void;
7
11
  reserved?: boolean;
8
12
  stickerSlot?: ReactElement;
@@ -1,2 +1,4 @@
1
1
  import { ImageAttachmentProps } from '../../ImageAttachment.types';
2
- export declare const SwiperImageAttachment: ({ activeIndex, ctaSlot, images, onImageClick, stickerSlot, }: Omit<ImageAttachmentProps, "type">) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const SwiperImageAttachment: ({ activeIndex, ctaSlot, images, onImageClick, stickerSlot, }: Omit<ImageAttachmentProps, "type" | "images"> & {
3
+ images: string[];
4
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import { ImageFile } from '../RichTextArea/RichTextArea.types';
2
2
  import { MarketplaceImageCropperProps } from './MarketplaceImageCropper.types';
3
3
  export declare function updateImageById(files: ImageFile[], targetId: string, updates: Partial<ImageFile>): ImageFile[];
4
- declare const MarketplaceImageCropper: ({ imageFiles, setImageFiles, }: MarketplaceImageCropperProps) => import("react/jsx-runtime").JSX.Element;
4
+ declare const MarketplaceImageCropper: ({ CCFormSelectedImage, errorMessage, imageFiles, isEventImageCropper, isInContentCreator, setImageFiles, }: MarketplaceImageCropperProps) => import("react/jsx-runtime").JSX.Element;
5
5
  export default MarketplaceImageCropper;
@@ -1,6 +1,10 @@
1
1
  import { Dispatch, SetStateAction } from 'react';
2
2
  import { ImageFile } from '../RichTextArea/RichTextArea.types';
3
3
  export type MarketplaceImageCropperProps = {
4
+ CCFormSelectedImage?: ImageFile | null;
5
+ errorMessage?: string;
4
6
  imageFiles: ImageFile[];
7
+ isEventImageCropper?: boolean;
8
+ isInContentCreator?: boolean;
5
9
  setImageFiles: Dispatch<SetStateAction<ImageFile[]>>;
6
10
  };
@@ -2,9 +2,10 @@ import { Dispatch, SetStateAction } from 'react';
2
2
  import { ImageFile } from '../../../RichTextArea/RichTextArea.types';
3
3
  interface ImageThumbnailGridProps {
4
4
  imageFiles: ImageFile[];
5
+ isInContentCreator?: boolean;
5
6
  selectedImg: ImageFile | null;
6
7
  setImageFiles: Dispatch<SetStateAction<ImageFile[]>>;
7
8
  setSelectedImg: (img: ImageFile | null) => void;
8
9
  }
9
- declare const ImageThumbnailGrid: ({ imageFiles, selectedImg, setImageFiles, setSelectedImg, }: ImageThumbnailGridProps) => import("react/jsx-runtime").JSX.Element;
10
+ declare const ImageThumbnailGrid: ({ imageFiles, isInContentCreator, selectedImg, setImageFiles, setSelectedImg, }: ImageThumbnailGridProps) => import("react/jsx-runtime").JSX.Element;
10
11
  export default ImageThumbnailGrid;
@@ -0,0 +1 @@
1
+ export declare const NETWORK_ERROR = "Failed to fetch";
@@ -1,3 +1,3 @@
1
1
  import { MultiImageCropperProps } from './MultiImageCropper.types';
2
- declare const MultiImageCropper: ({ aspectRatio, imageFiles, setImageFiles, setOpenCropper, translations: t, }: MultiImageCropperProps) => import("react/jsx-runtime").JSX.Element;
2
+ declare const MultiImageCropper: ({ aspectRatio, imageFiles, onUpdateImages, setImageFiles, setOpenCropper, translations: t, }: MultiImageCropperProps) => import("react/jsx-runtime").JSX.Element;
3
3
  export default MultiImageCropper;
@@ -2,6 +2,7 @@ import { ImageFile } from '../RichTextArea/RichTextArea.types';
2
2
  export type MultiImageCropperProps = {
3
3
  aspectRatio?: number;
4
4
  imageFiles: ImageFile[];
5
+ onUpdateImages: (imageFiles: ImageFile[]) => void;
5
6
  setImageFiles: (imageFiles: ImageFile[]) => void;
6
7
  setOpenCropper: (openCropper: boolean) => void;
7
8
  translations?: {
@@ -11,4 +12,3 @@ export type MultiImageCropperProps = {
11
12
  title: string;
12
13
  };
13
14
  };
14
- export type SelectedImageRef = React.MutableRefObject<ImageFile | null>;
@@ -15,6 +15,8 @@ export type RichTextAreaProps = {
15
15
  errorText?: string;
16
16
  hintText?: string;
17
17
  id?: string;
18
+ isWithImagePreview?: boolean;
19
+ isWithPoiPreview?: boolean;
18
20
  label?: string;
19
21
  name?: string;
20
22
  onBlur?: (event: FocusEvent<HTMLDivElement>) => void;
@@ -50,6 +52,7 @@ export type ImageFile = {
50
52
  id: string;
51
53
  originalImg: File;
52
54
  signedId?: string;
55
+ uploadFailed?: boolean;
53
56
  };
54
57
  export type CoreV3PostInput = {
55
58
  body: string;
@@ -1,3 +1,3 @@
1
1
  import { POIRecommendationProps } from './POIRecommendation.types';
2
- declare const POIRecommendation: ({ onDismiss, onSelect, openSheet, }: POIRecommendationProps) => import("react/jsx-runtime").JSX.Element;
2
+ declare const POIRecommendation: ({ onAddLocation, onDismiss, onSelect, openSheet, purpose, searchableListProps, }: POIRecommendationProps) => import("react/jsx-runtime").JSX.Element;
3
3
  export default POIRecommendation;
@@ -1,8 +1,17 @@
1
1
  import { Poi } from '../../../../../../api/src/lib/core_v2';
2
+ import { SearchableListProps } from '../../../SearchableList/SearchableList.types';
2
3
  export type POIRecommendationProps = {
4
+ onAddLocation?: (name: string) => void;
3
5
  onDismiss: () => void;
4
6
  onSelect: (poi: Poi) => void;
5
7
  openSheet: boolean;
8
+ purpose?: 'recommendation' | 'event_location';
9
+ searchableListProps?: {
10
+ headerProps?: SearchableListProps['headerProps'];
11
+ inputProps?: SearchableListProps['inputProps'];
12
+ intro?: SearchableListProps['intro'];
13
+ withNewItemAddition?: boolean;
14
+ };
6
15
  };
7
16
  export type POICategory = {
8
17
  key: string;
@@ -1,4 +1,2 @@
1
- declare const Intro: ({ isMobile }: {
2
- isMobile: boolean;
3
- }) => import("react/jsx-runtime").JSX.Element;
1
+ declare const Intro: () => import("react/jsx-runtime").JSX.Element;
4
2
  export default Intro;
@@ -0,0 +1,6 @@
1
+ type NewItemAdditionProps = {
2
+ onClick: () => void;
3
+ query: string;
4
+ };
5
+ declare const NewItemAddition: ({ onClick, query }: NewItemAdditionProps) => import("react/jsx-runtime").JSX.Element;
6
+ export default NewItemAddition;
@@ -1,3 +1,3 @@
1
1
  export declare const fetchBusinessProfile: (id: number) => Promise<import('../../../../../../api/src/lib/types/newsFeeds').LinkedBusinessProfile>;
2
2
  export declare const fetchProfile: () => Promise<import('../../../../../../api/src/lib/core_v2').ProfileResponse>;
3
- export declare const fetchPOIs: (searchQuery: string) => Promise<import('../../../../../../api/src/lib/core_v2').Poi[]>;
3
+ export declare const fetchPOIs: (searchQuery: string, purpose: string) => Promise<import('../../../../../../api/src/lib/core_v2').Poi[]>;
@@ -1,7 +1,10 @@
1
+ import { Dispatch, SetStateAction } from 'react';
1
2
  import { ImageFile } from '../RichTextArea.types';
2
3
  type LexicalImagesPreviewProps = {
3
4
  imageFiles: ImageFile[];
5
+ onUpdateImages: (files: ImageFile[]) => void;
6
+ setHasImageUploadError: Dispatch<SetStateAction<boolean>>;
4
7
  setImageFiles: (files: ImageFile[]) => void;
5
8
  };
6
- declare const LexicalImagesPreview: ({ imageFiles, setImageFiles, }: LexicalImagesPreviewProps) => import("react/jsx-runtime").JSX.Element | null;
9
+ declare const LexicalImagesPreview: ({ imageFiles, onUpdateImages, setHasImageUploadError, setImageFiles, }: LexicalImagesPreviewProps) => import("react/jsx-runtime").JSX.Element | null;
7
10
  export default LexicalImagesPreview;
@@ -2,10 +2,14 @@ interface UploadResult {
2
2
  signedId: string;
3
3
  url: string;
4
4
  }
5
+ interface UploadImageReturn {
6
+ error: string | null;
7
+ result: UploadResult | null;
8
+ }
5
9
  interface UseImageUploadReturn {
6
10
  error: string | null;
7
11
  isUploading: boolean;
8
- uploadImage: (file: File) => Promise<UploadResult | null>;
12
+ uploadImage: (file: File) => Promise<UploadImageReturn>;
9
13
  }
10
14
  export declare const useImageUpload: () => UseImageUploadReturn;
11
15
  export {};
@@ -2,6 +2,7 @@ import { Dispatch, SetStateAction } from 'react';
2
2
  import { ContentProps } from './components/Content/Content.types';
3
3
  import { SearchInputProps } from './components/SearchInput/SearchInput.types';
4
4
  export type SearchableListProps = {
5
+ addNewItem?: React.ReactNode;
5
6
  content?: React.ReactNode;
6
7
  contentProps?: ContentProps;
7
8
  headerProps: {
@@ -1,3 +1,3 @@
1
1
  import { ContentProps } from './Content.types';
2
- declare const Content: ({ content, emptyStateProps, length, loading, loadMore, }: ContentProps) => import("react/jsx-runtime").JSX.Element;
2
+ declare const Content: ({ content, emptyState, emptyStateProps, length, loading, loadMore, }: ContentProps) => import("react/jsx-runtime").JSX.Element;
3
3
  export default Content;
@@ -1,6 +1,7 @@
1
1
  import { default as EmptyStateProps } from '../../../../../../ui/src/lib/Molecules/Notices/EmptyState/EmptyState.types';
2
2
  export type ContentProps = {
3
3
  content?: React.ReactNode;
4
+ emptyState?: React.ReactNode;
4
5
  emptyStateProps?: Omit<EmptyStateProps, 'size'> & {
5
6
  size?: EmptyStateProps['size'];
6
7
  };
@@ -1,5 +1,5 @@
1
1
  export declare const isMobile: (mobileScreenSize?: number) => boolean;
2
- export declare const useIsBreakpointMatch: (tabletScreenBreakpoint?: number) => boolean;
2
+ export declare const useIsBreakpointMatch: (tabletScreenBreakpoint?: number) => boolean | undefined;
3
3
  /**
4
4
  * Extracts the numeric ID from a gid string like "gid://something/12345".
5
5
  * Returns 0 if extraction fails or result is not a number.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@goodhood-web/nebenan-base",
3
- "version": "4.4.0-development.1",
3
+ "version": "4.4.0-development.10",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "repository": "https://github.com/good-hood-gmbh/goodhood-web",