@adatechnology/content-ui 0.4.0 → 0.6.0
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.
- package/README.md +34 -0
- package/dist/index.d.ts +686 -72
- package/dist/index.js +3410 -703
- package/dist/index.js.map +1 -1
- package/dist/styles.css +453 -0
- package/dist/styles.css.map +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode, ReactElement } from 'react';
|
|
3
3
|
import * as _adatechnology_content_contracts from '@adatechnology/content-contracts';
|
|
4
|
-
import { PostStatus, PostSortField,
|
|
4
|
+
import { Paginated, CommunityPost, CreateCommunityPostInput, UpdateCommunityPostInput, PostStatus, PostSortField, PostOriginFilter, PostSummary, Post, CreatePostInput, UpdatePostInput, PublishPostInput, PostCounts, SaveAsTemplateInput, CreateFromTemplateInput, RepublishPostInput, RecurrenceRule, CreateRecurrenceInput, UpdateRecurrenceInput, TagCount, BulkModerationAction, BulkModerationResult, ContentSettings, ReportStatus, PostReport, PostOrigin, PublicPostSummary, PublicPost, CommunityPostStatus } from '@adatechnology/content-contracts';
|
|
5
5
|
|
|
6
6
|
var statusDraft = "Rascunho";
|
|
7
7
|
var statusScheduled = "Agendado";
|
|
8
8
|
var statusPublished = "Publicado";
|
|
9
9
|
var statusArchived = "Arquivado";
|
|
10
|
+
var statusPendingReview = "Em análise";
|
|
11
|
+
var statusRejected = "Recusado";
|
|
10
12
|
var listTitle = "Posts";
|
|
11
13
|
var newPost = "Novo post";
|
|
12
14
|
var searchLabel = "Buscar";
|
|
@@ -163,6 +165,29 @@ var imageDialogTitle = "Inserir imagem";
|
|
|
163
165
|
var imageUploadFromDevice = "Enviar do aparelho";
|
|
164
166
|
var dialogInsert = "Inserir";
|
|
165
167
|
var fileNoneChosen = "Nenhum arquivo escolhido";
|
|
168
|
+
var photoDialogTitle = "Inserir fotos";
|
|
169
|
+
var photoPickButton = "Escolher fotos";
|
|
170
|
+
var photoDropHint = "Arraste as fotos para cá, cole com Ctrl+V ou escolha do aparelho.";
|
|
171
|
+
var photoCount = "{count} de {max} fotos";
|
|
172
|
+
var photoItemLabel = "Foto {position}";
|
|
173
|
+
var photoAltLabel = "Descrição da foto";
|
|
174
|
+
var photoAltWarning = "Sem descrição, quem usa leitor de tela não saberá o que a foto mostra.";
|
|
175
|
+
var photoCaptionLabel = "Legenda (opcional)";
|
|
176
|
+
var photoRemove = "Remover foto";
|
|
177
|
+
var photoMoveUp = "Mover para cima";
|
|
178
|
+
var photoMoveDown = "Mover para baixo";
|
|
179
|
+
var photoStatusWaiting = "Aguardando";
|
|
180
|
+
var photoStatusReducing = "Reduzindo";
|
|
181
|
+
var photoStatusUploading = "Enviando";
|
|
182
|
+
var photoStatusDone = "Pronta";
|
|
183
|
+
var photoStatusError = "Falhou";
|
|
184
|
+
var photoRetry = "Tentar de novo";
|
|
185
|
+
var photoSending = "Enviando fotos…";
|
|
186
|
+
var photoNotImage = "{name} não é uma imagem.";
|
|
187
|
+
var photoLimitReached = "O máximo é {max} fotos por vez; {count} ficaram de fora.";
|
|
188
|
+
var photoErrorDecode = "Não foi possível ler esta foto. Tente JPG, PNG ou WebP.";
|
|
189
|
+
var photoErrorEncode = "Este navegador não consegue preparar a foto para envio.";
|
|
190
|
+
var photoErrorTooLarge = "A foto continua grande demais mesmo depois de reduzida.";
|
|
166
191
|
var emojiTitle = "Escolher emoji";
|
|
167
192
|
var emojiSearch = "Buscar emoji";
|
|
168
193
|
var emojiCategories = "Categorias de emoji";
|
|
@@ -174,11 +199,152 @@ var emojiNature = "Natureza";
|
|
|
174
199
|
var emojiTravel = "Lugares";
|
|
175
200
|
var emojiObjects = "Objetos";
|
|
176
201
|
var emojiSymbols = "Símbolos";
|
|
202
|
+
var imageOpen = "Ampliar foto {n} de {total}";
|
|
203
|
+
var imageViewer = "Visualizador de fotos";
|
|
204
|
+
var imagePosition = "Foto {n} de {total}";
|
|
205
|
+
var imageCounter = "{n} / {total}";
|
|
206
|
+
var imagePrevious = "Foto anterior";
|
|
207
|
+
var imageNext = "Próxima foto";
|
|
208
|
+
var tabsOriginLabel = "Origem dos posts";
|
|
209
|
+
var tabOriginStaff = "Da casa";
|
|
210
|
+
var tabOriginCommunity = "Dos hóspedes";
|
|
211
|
+
var communityBadge = "Hóspede";
|
|
212
|
+
var byCommunityAuthor = "por {name}";
|
|
213
|
+
var stayMonth = "Estadia em {month}";
|
|
214
|
+
var reportButton = "Denunciar";
|
|
215
|
+
var reportDialogTitle = "Denunciar este post";
|
|
216
|
+
var reportReasonLabel = "Motivo da denúncia";
|
|
217
|
+
var reportReasonHint = "Conte em poucas palavras o que há de errado (3 a 300 caracteres).";
|
|
218
|
+
var reportCounter = "{count} de {max}";
|
|
219
|
+
var reportReasonInvalid = "Escreva entre 3 e 300 caracteres.";
|
|
220
|
+
var reportSubmit = "Enviar denúncia";
|
|
221
|
+
var reportSent = "Denúncia enviada. Obrigado.";
|
|
222
|
+
var reportTooMany = "Muitas denúncias em pouco tempo. Tente mais tarde.";
|
|
223
|
+
var reportNotFound = "Este post não está mais disponível.";
|
|
224
|
+
var reportError = "Não foi possível enviar a denúncia. Tente de novo.";
|
|
225
|
+
var communityStatusDraft = "Rascunho";
|
|
226
|
+
var communityStatusPending = "Aguardando aprovação";
|
|
227
|
+
var communityStatusPublished = "Publicado";
|
|
228
|
+
var communityStatusRejected = "Recusado";
|
|
229
|
+
var communityRevisionPending = "Edição aguardando aprovação";
|
|
230
|
+
var communityRevisionRejected = "Edição recusada: {note}";
|
|
231
|
+
var communityRevisionRejectedNoNote = "Edição recusada";
|
|
232
|
+
var communityReviewNote = "Motivo da recusa: {note}";
|
|
233
|
+
var storiesTitle = "Minhas histórias";
|
|
234
|
+
var storiesNew = "Nova história";
|
|
235
|
+
var storiesEmpty = "Você ainda não escreveu nenhuma história.";
|
|
236
|
+
var storiesEdit = "Editar";
|
|
237
|
+
var storiesDelete = "Excluir";
|
|
238
|
+
var storiesDeleteTitle = "Excluir história";
|
|
239
|
+
var storiesDeleteConfirm = "Excluir \"{title}\"? Esta ação não pode ser desfeita.";
|
|
240
|
+
var storiesDeleteAction = "Excluir";
|
|
241
|
+
var storiesEditorNew = "Nova história";
|
|
242
|
+
var storiesEditorEdit = "Editar história";
|
|
243
|
+
var storiesFieldTitle = "Título";
|
|
244
|
+
var storiesFieldDisplayName = "Nome exibido";
|
|
245
|
+
var storiesDisplayNameHint = "Como seu nome aparece no site. Não use e-mail ou telefone.";
|
|
246
|
+
var storiesFieldBody = "Texto da história";
|
|
247
|
+
var storiesSaveDraft = "Salvar rascunho";
|
|
248
|
+
var storiesSaveChanges = "Salvar alterações";
|
|
249
|
+
var storiesSubmit = "Enviar para aprovação";
|
|
250
|
+
var storiesSubmitting = "Enviando…";
|
|
251
|
+
var storiesSaved = "Salvo.";
|
|
252
|
+
var storiesSubmitted = "Enviada! A equipe vai analisar.";
|
|
253
|
+
var storiesPublishedNow = "Enviada e publicada.";
|
|
254
|
+
var storiesTitleRequired = "Dê um título à história.";
|
|
255
|
+
var storiesBodyRequired = "Escreva o texto da história.";
|
|
256
|
+
var storiesTermsIntro = "Para enviar, confirme:";
|
|
257
|
+
var storiesTerms1 = "Tenho direito sobre as fotos e o texto que estou enviando.";
|
|
258
|
+
var storiesTerms2 = "As pessoas que aparecem nas fotos concordaram.";
|
|
259
|
+
var storiesTerms3 = "A empresa pode exibir e remover esta história.";
|
|
260
|
+
var storiesTermsAccept = "Confirmo as três declarações acima";
|
|
261
|
+
var storiesPhotoLimit = "Até {max} fotos por história.";
|
|
262
|
+
var storiesBack = "Voltar às histórias";
|
|
263
|
+
var communityErrorUnauthenticated = "Entre na sua conta para continuar.";
|
|
264
|
+
var communityErrorNotEligible = "Sua conta ainda não pode publicar: é preciso ter uma estadia concluída.";
|
|
265
|
+
var communityErrorDailyLimit = "Você atingiu o limite de histórias por dia. Tente de novo em ~{hours} h.";
|
|
266
|
+
var communityErrorDailyLimitNoTime = "Você atingiu o limite de histórias por dia. Tente de novo mais tarde.";
|
|
267
|
+
var communityErrorTooManyImages = "A história tem fotos demais. O máximo é {max}.";
|
|
268
|
+
var communityErrorImageNotAllowed = "Só é possível usar fotos enviadas por você nesta tela.";
|
|
269
|
+
var communityErrorTermsRequired = "Confirme as declarações para enviar.";
|
|
270
|
+
var communityErrorInvalidTransition = "Esta história mudou de situação. Recarregue a lista e tente de novo.";
|
|
271
|
+
var communityErrorGeneric = "Não foi possível concluir. Tente de novo.";
|
|
272
|
+
var originFilterLabel = "Origem";
|
|
273
|
+
var originAll = "Todos";
|
|
274
|
+
var originStaff = "Da casa";
|
|
275
|
+
var originCommunity = "Dos hóspedes";
|
|
276
|
+
var tabPendingReview = "Aguardando aprovação";
|
|
277
|
+
var authorByline = "por {name}";
|
|
278
|
+
var reportsOpenCount = "{count} denúncia aberta|{count} denúncias abertas";
|
|
279
|
+
var revisionPendingBadge = "Edição pendente";
|
|
280
|
+
var moderationNav = "Moderação";
|
|
281
|
+
var settingsOpen = "Posts dos hóspedes: configurações";
|
|
282
|
+
var reportsOpen = "Denúncias";
|
|
283
|
+
var backToList = "Voltar à lista";
|
|
284
|
+
var reviewTitle = "Revisar post de hóspede";
|
|
285
|
+
var reviewReadOnly = "Post de hóspede: a equipe não edita o texto, só modera.";
|
|
286
|
+
var reviewApprove = "Aprovar";
|
|
287
|
+
var reviewReject = "Recusar";
|
|
288
|
+
var reviewUnpublish = "Despublicar";
|
|
289
|
+
var reviewArchive = "Arquivar";
|
|
290
|
+
var reviewArchiveConfirm = "Arquivar este post? Ele sai do site e do painel do hóspede.";
|
|
291
|
+
var reviewDone = "Pronto.";
|
|
292
|
+
var reviewActionError = "Não foi possível concluir a ação. Tente de novo.";
|
|
293
|
+
var reviewCurrent = "Versão no ar";
|
|
294
|
+
var reviewProposed = "Edição proposta";
|
|
295
|
+
var reviewNoLiveVersion = "Ainda não está no ar.";
|
|
296
|
+
var reviewAuthor = "Autor";
|
|
297
|
+
var reviewOrigin = "Origem";
|
|
298
|
+
var noteDialogRejectTitle = "Recusar post";
|
|
299
|
+
var noteDialogUnpublishTitle = "Despublicar post";
|
|
300
|
+
var noteLabelRequired = "Motivo (o hóspede vai ver)";
|
|
301
|
+
var noteLabelOptional = "Motivo (opcional, o hóspede vai ver)";
|
|
302
|
+
var noteInvalid = "Escreva entre 1 e 500 caracteres.";
|
|
303
|
+
var noteCounter = "{count} de {max}";
|
|
304
|
+
var bulkApprove = "Aprovar";
|
|
305
|
+
var bulkReject = "Recusar";
|
|
306
|
+
var bulkUnpublish = "Despublicar";
|
|
307
|
+
var bulkArchiveCommunity = "Arquivar";
|
|
308
|
+
var bulkArchiveCommunityConfirm = "Arquivar {count} posts?";
|
|
309
|
+
var bulkApproved = "{count} aprovado|{count} aprovados";
|
|
310
|
+
var bulkRejected = "{count} recusado|{count} recusados";
|
|
311
|
+
var bulkUnpublished = "{count} despublicado|{count} despublicados";
|
|
312
|
+
var bulkArchived = "{count} arquivado|{count} arquivados";
|
|
313
|
+
var bulkFailed = "{count} falhou|{count} falharam";
|
|
314
|
+
var settingsTitle = "Posts dos hóspedes";
|
|
315
|
+
var settingsModeration = "Moderação";
|
|
316
|
+
var settingsModerationBefore = "Aprovar antes";
|
|
317
|
+
var settingsModerationAfter = "Publicar direto";
|
|
318
|
+
var settingsModerationBeforeHint = "O post só vai ao ar depois que a equipe aprova.";
|
|
319
|
+
var settingsModerationAfterHint = "O post vai ao ar no envio e a equipe modera depois.";
|
|
320
|
+
var settingsDailyLimit = "Posts por hóspede por dia";
|
|
321
|
+
var settingsMaxImages = "Fotos por post";
|
|
322
|
+
var settingsSave = "Salvar configurações";
|
|
323
|
+
var settingsSaved = "Configurações salvas.";
|
|
324
|
+
var settingsSaveError = "Não foi possível salvar.";
|
|
325
|
+
var settingsLoadError = "Não foi possível carregar as configurações.";
|
|
326
|
+
var stepperDecrease = "Diminuir";
|
|
327
|
+
var stepperIncrease = "Aumentar";
|
|
328
|
+
var stepperRange = "De {min} a {max}";
|
|
329
|
+
var reportsTitle = "Denúncias";
|
|
330
|
+
var reportsFilterOpen = "Abertas";
|
|
331
|
+
var reportsFilterResolved = "Resolvidas";
|
|
332
|
+
var reportsFilterLabel = "Situação das denúncias";
|
|
333
|
+
var reportsEmpty = "Nenhuma denúncia por aqui.";
|
|
334
|
+
var reportsOpenPost = "Abrir o post";
|
|
335
|
+
var reportsResolve = "Marcar como resolvida";
|
|
336
|
+
var reportsResolved = "Resolvida";
|
|
337
|
+
var reportsReceivedOn = "Recebida em {date}";
|
|
338
|
+
var reportsResolveError = "Não foi possível resolver a denúncia.";
|
|
339
|
+
var reportsPrevious = "Anterior";
|
|
340
|
+
var reportsNext = "Próxima";
|
|
177
341
|
var ptBR = {
|
|
178
342
|
statusDraft: statusDraft,
|
|
179
343
|
statusScheduled: statusScheduled,
|
|
180
344
|
statusPublished: statusPublished,
|
|
181
345
|
statusArchived: statusArchived,
|
|
346
|
+
statusPendingReview: statusPendingReview,
|
|
347
|
+
statusRejected: statusRejected,
|
|
182
348
|
listTitle: listTitle,
|
|
183
349
|
newPost: newPost,
|
|
184
350
|
searchLabel: searchLabel,
|
|
@@ -335,6 +501,29 @@ var ptBR = {
|
|
|
335
501
|
imageUploadFromDevice: imageUploadFromDevice,
|
|
336
502
|
dialogInsert: dialogInsert,
|
|
337
503
|
fileNoneChosen: fileNoneChosen,
|
|
504
|
+
photoDialogTitle: photoDialogTitle,
|
|
505
|
+
photoPickButton: photoPickButton,
|
|
506
|
+
photoDropHint: photoDropHint,
|
|
507
|
+
photoCount: photoCount,
|
|
508
|
+
photoItemLabel: photoItemLabel,
|
|
509
|
+
photoAltLabel: photoAltLabel,
|
|
510
|
+
photoAltWarning: photoAltWarning,
|
|
511
|
+
photoCaptionLabel: photoCaptionLabel,
|
|
512
|
+
photoRemove: photoRemove,
|
|
513
|
+
photoMoveUp: photoMoveUp,
|
|
514
|
+
photoMoveDown: photoMoveDown,
|
|
515
|
+
photoStatusWaiting: photoStatusWaiting,
|
|
516
|
+
photoStatusReducing: photoStatusReducing,
|
|
517
|
+
photoStatusUploading: photoStatusUploading,
|
|
518
|
+
photoStatusDone: photoStatusDone,
|
|
519
|
+
photoStatusError: photoStatusError,
|
|
520
|
+
photoRetry: photoRetry,
|
|
521
|
+
photoSending: photoSending,
|
|
522
|
+
photoNotImage: photoNotImage,
|
|
523
|
+
photoLimitReached: photoLimitReached,
|
|
524
|
+
photoErrorDecode: photoErrorDecode,
|
|
525
|
+
photoErrorEncode: photoErrorEncode,
|
|
526
|
+
photoErrorTooLarge: photoErrorTooLarge,
|
|
338
527
|
emojiTitle: emojiTitle,
|
|
339
528
|
emojiSearch: emojiSearch,
|
|
340
529
|
emojiCategories: emojiCategories,
|
|
@@ -345,7 +534,146 @@ var ptBR = {
|
|
|
345
534
|
emojiNature: emojiNature,
|
|
346
535
|
emojiTravel: emojiTravel,
|
|
347
536
|
emojiObjects: emojiObjects,
|
|
348
|
-
emojiSymbols: emojiSymbols
|
|
537
|
+
emojiSymbols: emojiSymbols,
|
|
538
|
+
imageOpen: imageOpen,
|
|
539
|
+
imageViewer: imageViewer,
|
|
540
|
+
imagePosition: imagePosition,
|
|
541
|
+
imageCounter: imageCounter,
|
|
542
|
+
imagePrevious: imagePrevious,
|
|
543
|
+
imageNext: imageNext,
|
|
544
|
+
tabsOriginLabel: tabsOriginLabel,
|
|
545
|
+
tabOriginStaff: tabOriginStaff,
|
|
546
|
+
tabOriginCommunity: tabOriginCommunity,
|
|
547
|
+
communityBadge: communityBadge,
|
|
548
|
+
byCommunityAuthor: byCommunityAuthor,
|
|
549
|
+
stayMonth: stayMonth,
|
|
550
|
+
reportButton: reportButton,
|
|
551
|
+
reportDialogTitle: reportDialogTitle,
|
|
552
|
+
reportReasonLabel: reportReasonLabel,
|
|
553
|
+
reportReasonHint: reportReasonHint,
|
|
554
|
+
reportCounter: reportCounter,
|
|
555
|
+
reportReasonInvalid: reportReasonInvalid,
|
|
556
|
+
reportSubmit: reportSubmit,
|
|
557
|
+
reportSent: reportSent,
|
|
558
|
+
reportTooMany: reportTooMany,
|
|
559
|
+
reportNotFound: reportNotFound,
|
|
560
|
+
reportError: reportError,
|
|
561
|
+
communityStatusDraft: communityStatusDraft,
|
|
562
|
+
communityStatusPending: communityStatusPending,
|
|
563
|
+
communityStatusPublished: communityStatusPublished,
|
|
564
|
+
communityStatusRejected: communityStatusRejected,
|
|
565
|
+
communityRevisionPending: communityRevisionPending,
|
|
566
|
+
communityRevisionRejected: communityRevisionRejected,
|
|
567
|
+
communityRevisionRejectedNoNote: communityRevisionRejectedNoNote,
|
|
568
|
+
communityReviewNote: communityReviewNote,
|
|
569
|
+
storiesTitle: storiesTitle,
|
|
570
|
+
storiesNew: storiesNew,
|
|
571
|
+
storiesEmpty: storiesEmpty,
|
|
572
|
+
storiesEdit: storiesEdit,
|
|
573
|
+
storiesDelete: storiesDelete,
|
|
574
|
+
storiesDeleteTitle: storiesDeleteTitle,
|
|
575
|
+
storiesDeleteConfirm: storiesDeleteConfirm,
|
|
576
|
+
storiesDeleteAction: storiesDeleteAction,
|
|
577
|
+
storiesEditorNew: storiesEditorNew,
|
|
578
|
+
storiesEditorEdit: storiesEditorEdit,
|
|
579
|
+
storiesFieldTitle: storiesFieldTitle,
|
|
580
|
+
storiesFieldDisplayName: storiesFieldDisplayName,
|
|
581
|
+
storiesDisplayNameHint: storiesDisplayNameHint,
|
|
582
|
+
storiesFieldBody: storiesFieldBody,
|
|
583
|
+
storiesSaveDraft: storiesSaveDraft,
|
|
584
|
+
storiesSaveChanges: storiesSaveChanges,
|
|
585
|
+
storiesSubmit: storiesSubmit,
|
|
586
|
+
storiesSubmitting: storiesSubmitting,
|
|
587
|
+
storiesSaved: storiesSaved,
|
|
588
|
+
storiesSubmitted: storiesSubmitted,
|
|
589
|
+
storiesPublishedNow: storiesPublishedNow,
|
|
590
|
+
storiesTitleRequired: storiesTitleRequired,
|
|
591
|
+
storiesBodyRequired: storiesBodyRequired,
|
|
592
|
+
storiesTermsIntro: storiesTermsIntro,
|
|
593
|
+
storiesTerms1: storiesTerms1,
|
|
594
|
+
storiesTerms2: storiesTerms2,
|
|
595
|
+
storiesTerms3: storiesTerms3,
|
|
596
|
+
storiesTermsAccept: storiesTermsAccept,
|
|
597
|
+
storiesPhotoLimit: storiesPhotoLimit,
|
|
598
|
+
storiesBack: storiesBack,
|
|
599
|
+
communityErrorUnauthenticated: communityErrorUnauthenticated,
|
|
600
|
+
communityErrorNotEligible: communityErrorNotEligible,
|
|
601
|
+
communityErrorDailyLimit: communityErrorDailyLimit,
|
|
602
|
+
communityErrorDailyLimitNoTime: communityErrorDailyLimitNoTime,
|
|
603
|
+
communityErrorTooManyImages: communityErrorTooManyImages,
|
|
604
|
+
communityErrorImageNotAllowed: communityErrorImageNotAllowed,
|
|
605
|
+
communityErrorTermsRequired: communityErrorTermsRequired,
|
|
606
|
+
communityErrorInvalidTransition: communityErrorInvalidTransition,
|
|
607
|
+
communityErrorGeneric: communityErrorGeneric,
|
|
608
|
+
originFilterLabel: originFilterLabel,
|
|
609
|
+
originAll: originAll,
|
|
610
|
+
originStaff: originStaff,
|
|
611
|
+
originCommunity: originCommunity,
|
|
612
|
+
tabPendingReview: tabPendingReview,
|
|
613
|
+
authorByline: authorByline,
|
|
614
|
+
reportsOpenCount: reportsOpenCount,
|
|
615
|
+
revisionPendingBadge: revisionPendingBadge,
|
|
616
|
+
moderationNav: moderationNav,
|
|
617
|
+
settingsOpen: settingsOpen,
|
|
618
|
+
reportsOpen: reportsOpen,
|
|
619
|
+
backToList: backToList,
|
|
620
|
+
reviewTitle: reviewTitle,
|
|
621
|
+
reviewReadOnly: reviewReadOnly,
|
|
622
|
+
reviewApprove: reviewApprove,
|
|
623
|
+
reviewReject: reviewReject,
|
|
624
|
+
reviewUnpublish: reviewUnpublish,
|
|
625
|
+
reviewArchive: reviewArchive,
|
|
626
|
+
reviewArchiveConfirm: reviewArchiveConfirm,
|
|
627
|
+
reviewDone: reviewDone,
|
|
628
|
+
reviewActionError: reviewActionError,
|
|
629
|
+
reviewCurrent: reviewCurrent,
|
|
630
|
+
reviewProposed: reviewProposed,
|
|
631
|
+
reviewNoLiveVersion: reviewNoLiveVersion,
|
|
632
|
+
reviewAuthor: reviewAuthor,
|
|
633
|
+
reviewOrigin: reviewOrigin,
|
|
634
|
+
noteDialogRejectTitle: noteDialogRejectTitle,
|
|
635
|
+
noteDialogUnpublishTitle: noteDialogUnpublishTitle,
|
|
636
|
+
noteLabelRequired: noteLabelRequired,
|
|
637
|
+
noteLabelOptional: noteLabelOptional,
|
|
638
|
+
noteInvalid: noteInvalid,
|
|
639
|
+
noteCounter: noteCounter,
|
|
640
|
+
bulkApprove: bulkApprove,
|
|
641
|
+
bulkReject: bulkReject,
|
|
642
|
+
bulkUnpublish: bulkUnpublish,
|
|
643
|
+
bulkArchiveCommunity: bulkArchiveCommunity,
|
|
644
|
+
bulkArchiveCommunityConfirm: bulkArchiveCommunityConfirm,
|
|
645
|
+
bulkApproved: bulkApproved,
|
|
646
|
+
bulkRejected: bulkRejected,
|
|
647
|
+
bulkUnpublished: bulkUnpublished,
|
|
648
|
+
bulkArchived: bulkArchived,
|
|
649
|
+
bulkFailed: bulkFailed,
|
|
650
|
+
settingsTitle: settingsTitle,
|
|
651
|
+
settingsModeration: settingsModeration,
|
|
652
|
+
settingsModerationBefore: settingsModerationBefore,
|
|
653
|
+
settingsModerationAfter: settingsModerationAfter,
|
|
654
|
+
settingsModerationBeforeHint: settingsModerationBeforeHint,
|
|
655
|
+
settingsModerationAfterHint: settingsModerationAfterHint,
|
|
656
|
+
settingsDailyLimit: settingsDailyLimit,
|
|
657
|
+
settingsMaxImages: settingsMaxImages,
|
|
658
|
+
settingsSave: settingsSave,
|
|
659
|
+
settingsSaved: settingsSaved,
|
|
660
|
+
settingsSaveError: settingsSaveError,
|
|
661
|
+
settingsLoadError: settingsLoadError,
|
|
662
|
+
stepperDecrease: stepperDecrease,
|
|
663
|
+
stepperIncrease: stepperIncrease,
|
|
664
|
+
stepperRange: stepperRange,
|
|
665
|
+
reportsTitle: reportsTitle,
|
|
666
|
+
reportsFilterOpen: reportsFilterOpen,
|
|
667
|
+
reportsFilterResolved: reportsFilterResolved,
|
|
668
|
+
reportsFilterLabel: reportsFilterLabel,
|
|
669
|
+
reportsEmpty: reportsEmpty,
|
|
670
|
+
reportsOpenPost: reportsOpenPost,
|
|
671
|
+
reportsResolve: reportsResolve,
|
|
672
|
+
reportsResolved: reportsResolved,
|
|
673
|
+
reportsReceivedOn: reportsReceivedOn,
|
|
674
|
+
reportsResolveError: reportsResolveError,
|
|
675
|
+
reportsPrevious: reportsPrevious,
|
|
676
|
+
reportsNext: reportsNext
|
|
349
677
|
};
|
|
350
678
|
|
|
351
679
|
/**
|
|
@@ -380,6 +708,26 @@ type ListPostsParams = {
|
|
|
380
708
|
readonly order?: 'asc' | 'desc';
|
|
381
709
|
/** `true`: só modelos. */
|
|
382
710
|
readonly isTemplate?: boolean;
|
|
711
|
+
/** Só com a moderação injetada; ausente, o servidor devolve só posts da equipe. */
|
|
712
|
+
readonly origin?: PostOriginFilter;
|
|
713
|
+
};
|
|
714
|
+
type RejectPostParams = {
|
|
715
|
+
readonly id: string;
|
|
716
|
+
readonly note: string;
|
|
717
|
+
};
|
|
718
|
+
type UnpublishCommunityPostParams = {
|
|
719
|
+
readonly id: string;
|
|
720
|
+
readonly note?: string;
|
|
721
|
+
};
|
|
722
|
+
type ModeratePostsParams = {
|
|
723
|
+
readonly action: BulkModerationAction;
|
|
724
|
+
readonly ids: readonly string[];
|
|
725
|
+
readonly note?: string;
|
|
726
|
+
};
|
|
727
|
+
type ListReportsParams = {
|
|
728
|
+
readonly status: ReportStatus;
|
|
729
|
+
readonly page?: number;
|
|
730
|
+
readonly pageSize?: number;
|
|
383
731
|
};
|
|
384
732
|
type ContentAdminApi = {
|
|
385
733
|
listPosts(params: ListPostsParams): Promise<Paginated<PostSummary>>;
|
|
@@ -403,16 +751,71 @@ type ContentAdminApi = {
|
|
|
403
751
|
removeRecurrence?(id: string): Promise<void>;
|
|
404
752
|
/** Ausente: o filtro de tag vira campo livre e o editor não sugere tags. */
|
|
405
753
|
listTags?(): Promise<readonly TagCount[]>;
|
|
754
|
+
/** Upload genérico de foto; ausente, o editor cai em `uploadCoverImage`. */
|
|
755
|
+
uploadImage?(file: File): Promise<{
|
|
756
|
+
readonly url: string;
|
|
757
|
+
readonly key: string;
|
|
758
|
+
}>;
|
|
406
759
|
/** Ausente: a capa é só por URL — sem alvo de upload que sempre falharia. */
|
|
407
760
|
uploadCoverImage?(file: File): Promise<{
|
|
408
761
|
readonly url: string;
|
|
409
762
|
readonly key: string;
|
|
410
763
|
}>;
|
|
764
|
+
/**
|
|
765
|
+
* Moderação de posts dos hóspedes. Ausentes, o painel é o de sempre: sem filtro de origem, sem a
|
|
766
|
+
* aba "Aguardando aprovação", sem configurações nem denúncias.
|
|
767
|
+
*/
|
|
768
|
+
approvePost?(id: string): Promise<Post>;
|
|
769
|
+
rejectPost?(params: RejectPostParams): Promise<Post>;
|
|
770
|
+
unpublishCommunityPost?(params: UnpublishCommunityPostParams): Promise<Post>;
|
|
771
|
+
moderatePosts?(params: ModeratePostsParams): Promise<BulkModerationResult>;
|
|
772
|
+
getSettings?(): Promise<ContentSettings>;
|
|
773
|
+
updateSettings?(settings: ContentSettings): Promise<ContentSettings>;
|
|
774
|
+
listReports?(params: ListReportsParams): Promise<Paginated<PostReport>>;
|
|
775
|
+
resolveReport?(id: string): Promise<PostReport>;
|
|
776
|
+
};
|
|
777
|
+
type CommunityLimits = {
|
|
778
|
+
readonly maxImagesPerPost: number;
|
|
779
|
+
readonly dailyLimit: number;
|
|
780
|
+
};
|
|
781
|
+
/**
|
|
782
|
+
* Porta do hóspede ("Minhas histórias"): o host implementa sobre `/community/posts` com a sessão do
|
|
783
|
+
* hóspede. Separada das portas do painel e do site. Rejeita com erro que traga `statusCode`/`code` e,
|
|
784
|
+
* quando houver, `publicDetails` (`ContentError`).
|
|
785
|
+
*/
|
|
786
|
+
type CommunityContentProvider = {
|
|
787
|
+
listOwnPosts(params?: {
|
|
788
|
+
readonly page?: number;
|
|
789
|
+
readonly pageSize?: number;
|
|
790
|
+
}): Promise<Paginated<CommunityPost>>;
|
|
791
|
+
getOwnPost(id: string): Promise<CommunityPost>;
|
|
792
|
+
createPost(input: CreateCommunityPostInput): Promise<CommunityPost>;
|
|
793
|
+
updatePost(id: string, input: UpdateCommunityPostInput): Promise<CommunityPost>;
|
|
794
|
+
submitPost(params: {
|
|
795
|
+
readonly id: string;
|
|
796
|
+
readonly termsAccepted: boolean;
|
|
797
|
+
}): Promise<CommunityPost>;
|
|
798
|
+
deletePost(id: string): Promise<void>;
|
|
799
|
+
uploadImage(file: File): Promise<{
|
|
800
|
+
readonly url: string;
|
|
801
|
+
readonly key?: string;
|
|
802
|
+
}>;
|
|
803
|
+
/** Ausente: sem teto de fotos no diálogo (o servidor recusa o excesso). */
|
|
804
|
+
getLimits?(): Promise<CommunityLimits>;
|
|
805
|
+
/** Nome sugerido no campo "como seu nome aparece" (primeiro nome + inicial). */
|
|
806
|
+
readonly defaultDisplayName?: string;
|
|
411
807
|
};
|
|
412
808
|
type ListPublishedPostsParams = {
|
|
413
809
|
readonly page?: number;
|
|
414
810
|
readonly pageSize?: number;
|
|
415
811
|
readonly tag?: string;
|
|
812
|
+
/** Ausente: só posts da equipe (o padrão do servidor). */
|
|
813
|
+
readonly origin?: PostOrigin;
|
|
814
|
+
};
|
|
815
|
+
type ReportPostParams = {
|
|
816
|
+
readonly postId: string;
|
|
817
|
+
/** 3 a 300 caracteres, já aparado. */
|
|
818
|
+
readonly reason: string;
|
|
416
819
|
};
|
|
417
820
|
type ContentPublicApi = {
|
|
418
821
|
listPublishedPosts(params: ListPublishedPostsParams): Promise<Paginated<PublicPostSummary>>;
|
|
@@ -420,6 +823,16 @@ type ContentPublicApi = {
|
|
|
420
823
|
getPublishedPost(slug: string): Promise<PublicPost | undefined>;
|
|
421
824
|
/** Ausente: a página de lista não mostra o filtro de tags. */
|
|
422
825
|
listTags?(): Promise<readonly TagCount[]>;
|
|
826
|
+
/**
|
|
827
|
+
* `true`: a lista mostra as abas "Da casa" e "Dos hóspedes". Ausente ou `false`: a página é
|
|
828
|
+
* exatamente a de só equipe. O host liga conforme a configuração do módulo de conteúdo.
|
|
829
|
+
*/
|
|
830
|
+
isCommunityEnabled?: boolean;
|
|
831
|
+
/**
|
|
832
|
+
* Ausente: sem o botão "Denunciar". Rejeita com erro que traga `statusCode` e/ou `code`
|
|
833
|
+
* (`ContentError`): 429 vira "muitas denúncias", `CONTENT_POST_NOT_FOUND` vira "indisponível".
|
|
834
|
+
*/
|
|
835
|
+
reportPost?(params: ReportPostParams): Promise<void>;
|
|
423
836
|
};
|
|
424
837
|
type RenderLinkProps = {
|
|
425
838
|
readonly href: string;
|
|
@@ -428,6 +841,9 @@ type RenderLinkProps = {
|
|
|
428
841
|
readonly 'aria-current'?: 'page';
|
|
429
842
|
readonly 'aria-label'?: string;
|
|
430
843
|
readonly rel?: string;
|
|
844
|
+
/** Só as abas da lista pública; o `renderLink` do host precisa repassar ao elemento. */
|
|
845
|
+
readonly role?: 'tab';
|
|
846
|
+
readonly 'aria-selected'?: boolean;
|
|
431
847
|
};
|
|
432
848
|
/** Troca o `<a>` pelo `Link` do roteador do host (Next, React Router…) sem o pacote conhecê-lo. */
|
|
433
849
|
type RenderLink = (props: RenderLinkProps) => ReactNode;
|
|
@@ -458,6 +874,8 @@ type ContentProviderProps = {
|
|
|
458
874
|
readonly adminApi?: ContentAdminApi;
|
|
459
875
|
/** Site público: lista, página do post. Painel não precisa passar. */
|
|
460
876
|
readonly publicApi?: ContentPublicApi;
|
|
877
|
+
/** Área do hóspede ("Minhas histórias"). Painel e site público não precisam passar. */
|
|
878
|
+
readonly communityApi?: CommunityContentProvider;
|
|
461
879
|
readonly locale?: ContentLocale;
|
|
462
880
|
/** Sobrescreve textos pontuais (ex.: "Posts" → "Novidades") sem trocar o locale inteiro. */
|
|
463
881
|
readonly messages?: Partial<ContentMessages>;
|
|
@@ -465,9 +883,10 @@ type ContentProviderProps = {
|
|
|
465
883
|
readonly renderLink?: RenderLink;
|
|
466
884
|
readonly children: ReactNode;
|
|
467
885
|
};
|
|
468
|
-
declare function ContentProvider({ adminApi, publicApi, locale, messages, renderLink, children, }: ContentProviderProps): react.JSX.Element;
|
|
886
|
+
declare function ContentProvider({ adminApi, publicApi, communityApi, locale, messages, renderLink, children, }: ContentProviderProps): react.JSX.Element;
|
|
469
887
|
declare function useContentAdminApi(): ContentAdminApi;
|
|
470
888
|
declare function useContentPublicApi(): ContentPublicApi;
|
|
889
|
+
declare function useCommunityApi(): CommunityContentProvider;
|
|
471
890
|
type ContentText = {
|
|
472
891
|
readonly messages: ContentMessages;
|
|
473
892
|
readonly locale: ContentLocale;
|
|
@@ -633,8 +1052,10 @@ type MarkdownEditorProps = {
|
|
|
633
1052
|
/** Ausente: o botão de imagem só aceita URL, sem envio de arquivo. */
|
|
634
1053
|
readonly onUploadImage?: (file: File) => Promise<UploadImageResult>;
|
|
635
1054
|
readonly isUploading?: boolean;
|
|
1055
|
+
/** Teto de fotos do diálogo de fotos (padrão do diálogo: 12). */
|
|
1056
|
+
readonly maxImages?: number;
|
|
636
1057
|
};
|
|
637
|
-
declare function MarkdownEditor({ value, onChange, labelledBy, describedBy, showToolbar, onUploadImage, isUploading, }: MarkdownEditorProps): react.JSX.Element;
|
|
1058
|
+
declare function MarkdownEditor({ value, onChange, labelledBy, describedBy, showToolbar, onUploadImage, isUploading, maxImages, }: MarkdownEditorProps): react.JSX.Element;
|
|
638
1059
|
|
|
639
1060
|
/**
|
|
640
1061
|
* Copyright (c) 2026 Ada Technology. MIT License.
|
|
@@ -652,13 +1073,17 @@ declare function EmojiPicker({ onPick, onClose }: EmojiPickerProps): react.JSX.E
|
|
|
652
1073
|
* `<input type="file">` nativo mostra o idioma do navegador e não aceita estilo).
|
|
653
1074
|
*/
|
|
654
1075
|
type FilePickerProps = {
|
|
655
|
-
readonly
|
|
656
|
-
|
|
1076
|
+
readonly labels: {
|
|
1077
|
+
readonly button: string;
|
|
1078
|
+
readonly empty: string;
|
|
1079
|
+
};
|
|
657
1080
|
readonly accept: string;
|
|
658
1081
|
readonly isBusy?: boolean;
|
|
659
|
-
|
|
1082
|
+
/** Com vários, o `onPick` recebe todos de uma vez e o campo mantém o texto vazio (dica). */
|
|
1083
|
+
readonly isMultiple?: boolean;
|
|
1084
|
+
readonly onPick: (files: readonly File[]) => void;
|
|
660
1085
|
};
|
|
661
|
-
declare function FilePicker({
|
|
1086
|
+
declare function FilePicker({ labels, accept, isBusy, isMultiple, onPick }: FilePickerProps): react.JSX.Element;
|
|
662
1087
|
|
|
663
1088
|
type StatusChipProps = {
|
|
664
1089
|
readonly status: PostStatus;
|
|
@@ -678,6 +1103,60 @@ type TagsInputProps = {
|
|
|
678
1103
|
};
|
|
679
1104
|
declare function TagsInput({ value, onChange, suggestions, label }: TagsInputProps): react.JSX.Element;
|
|
680
1105
|
|
|
1106
|
+
/**
|
|
1107
|
+
* Copyright (c) 2026 Ada Technology. MIT License.
|
|
1108
|
+
*
|
|
1109
|
+
* "Minhas histórias" na área do hóspede: lista dos próprios posts ↔ editor. O host só monta a tela
|
|
1110
|
+
* (e a esconde de conta não elegível); a API recusa o resto.
|
|
1111
|
+
*/
|
|
1112
|
+
type CommunityStoriesPageProps = {
|
|
1113
|
+
readonly pageSize?: number;
|
|
1114
|
+
};
|
|
1115
|
+
declare function CommunityStoriesPage({ pageSize }: CommunityStoriesPageProps): react.JSX.Element;
|
|
1116
|
+
|
|
1117
|
+
type CommunityStoryEditorProps = {
|
|
1118
|
+
/** Ausente: história nova. */
|
|
1119
|
+
readonly postId?: string;
|
|
1120
|
+
readonly onChanged?: (post: CommunityPost) => void;
|
|
1121
|
+
/** Só é chamado depois de confirmar alterações não salvas. */
|
|
1122
|
+
readonly onClose: () => void;
|
|
1123
|
+
};
|
|
1124
|
+
declare function CommunityStoryEditor({ postId, onChanged, onClose }: CommunityStoryEditorProps): react.JSX.Element;
|
|
1125
|
+
|
|
1126
|
+
type CommunityStatusPillProps = {
|
|
1127
|
+
readonly status: CommunityPostStatus;
|
|
1128
|
+
};
|
|
1129
|
+
/** Estado do post do hóspede: ícone + palavra + cor, as mesmas cores das pílulas do painel. */
|
|
1130
|
+
declare function CommunityStatusPill({ status }: CommunityStatusPillProps): react.JSX.Element;
|
|
1131
|
+
|
|
1132
|
+
/**
|
|
1133
|
+
* Copyright (c) 2026 Ada Technology. MIT License.
|
|
1134
|
+
*/
|
|
1135
|
+
type CommunityPostReviewProps = {
|
|
1136
|
+
readonly postId: string;
|
|
1137
|
+
/** Depois de qualquer decisão: o host recarrega a lista e a contagem. */
|
|
1138
|
+
readonly onChanged?: () => void;
|
|
1139
|
+
readonly onClose: () => void;
|
|
1140
|
+
};
|
|
1141
|
+
/** Tela de revisão de um post de hóspede: leitura + Aprovar / Recusar / Despublicar / Arquivar. */
|
|
1142
|
+
declare function CommunityPostReview({ postId, onChanged, onClose }: CommunityPostReviewProps): react.JSX.Element;
|
|
1143
|
+
|
|
1144
|
+
type CommunitySettingsPanelProps = {
|
|
1145
|
+
readonly onClose?: () => void;
|
|
1146
|
+
};
|
|
1147
|
+
/** "Posts dos hóspedes": modo de moderação, limite diário e fotos por post. */
|
|
1148
|
+
declare function CommunitySettingsPanel({ onClose }: CommunitySettingsPanelProps): react.JSX.Element;
|
|
1149
|
+
|
|
1150
|
+
/**
|
|
1151
|
+
* Copyright (c) 2026 Ada Technology. MIT License.
|
|
1152
|
+
*/
|
|
1153
|
+
type CommunityReportsPageProps = {
|
|
1154
|
+
/** Abre o post denunciado (o host leva à revisão ou à página pública). */
|
|
1155
|
+
readonly onOpenPost: (postId: string) => void;
|
|
1156
|
+
readonly onClose?: () => void;
|
|
1157
|
+
};
|
|
1158
|
+
declare function CommunityReportsPage({ onOpenPost, onClose }: CommunityReportsPageProps): react.JSX.Element;
|
|
1159
|
+
|
|
681
1160
|
type PostCardProps = {
|
|
682
1161
|
readonly post: PublicPostSummary;
|
|
683
1162
|
readonly href: string;
|
|
@@ -686,12 +1165,96 @@ type PostCardProps = {
|
|
|
686
1165
|
};
|
|
687
1166
|
declare function PostCard({ post, href, headingLevel }: PostCardProps): react.JSX.Element;
|
|
688
1167
|
|
|
1168
|
+
/**
|
|
1169
|
+
* Copyright (c) 2026 Ada Technology. MIT License.
|
|
1170
|
+
*/
|
|
1171
|
+
type AsyncResource<TData> = {
|
|
1172
|
+
readonly data: TData | undefined;
|
|
1173
|
+
readonly isLoading: boolean;
|
|
1174
|
+
readonly error: unknown;
|
|
1175
|
+
readonly reload: () => void;
|
|
1176
|
+
};
|
|
1177
|
+
/**
|
|
1178
|
+
* Carrega um recurso e descarta resposta velha: trocar de página rápido não deixa a resposta da
|
|
1179
|
+
* página anterior chegar por último e sobrescrever a atual. O pacote não traz cliente de cache
|
|
1180
|
+
* próprio — quem quiser TanStack Query implementa a API injetada sobre ele.
|
|
1181
|
+
*/
|
|
1182
|
+
declare function useAsyncResource<TData>(load: () => Promise<TData>, key: string): AsyncResource<TData>;
|
|
1183
|
+
|
|
1184
|
+
/** Aba da lista: só existe quando a API injetada sabe contar (`countPosts`). */
|
|
1185
|
+
declare const POST_LIST_TAB: {
|
|
1186
|
+
readonly PENDING_REVIEW: "pending_review";
|
|
1187
|
+
readonly PUBLISHED: "published";
|
|
1188
|
+
readonly SCHEDULED: "scheduled";
|
|
1189
|
+
readonly DRAFT: "draft";
|
|
1190
|
+
readonly TEMPLATES: "templates";
|
|
1191
|
+
};
|
|
1192
|
+
type PostListTab = (typeof POST_LIST_TAB)[keyof typeof POST_LIST_TAB];
|
|
1193
|
+
type PostListFilters = {
|
|
1194
|
+
readonly tags: readonly string[];
|
|
1195
|
+
readonly search: string;
|
|
1196
|
+
};
|
|
1197
|
+
declare function usePostList(params: {
|
|
1198
|
+
readonly pageSize: number;
|
|
1199
|
+
readonly reloadKey?: number;
|
|
1200
|
+
/** Espelha busca, aba, tags, página, tamanho e ordem na query string da URL. */
|
|
1201
|
+
readonly syncUrl?: boolean;
|
|
1202
|
+
}): {
|
|
1203
|
+
posts: AsyncResource<_adatechnology_content_contracts.Paginated<_adatechnology_content_contracts.PostSummary>>;
|
|
1204
|
+
counts: PostCounts | undefined;
|
|
1205
|
+
tags: readonly TagCount[] | undefined;
|
|
1206
|
+
state: ListUrlState;
|
|
1207
|
+
tab: PostListTab | undefined;
|
|
1208
|
+
pageSize: number;
|
|
1209
|
+
hasModeration: boolean;
|
|
1210
|
+
origin: "staff" | "community" | "all";
|
|
1211
|
+
setOrigin: (next: PostOriginFilter) => void;
|
|
1212
|
+
selectedIds: ReadonlySet<string>;
|
|
1213
|
+
setSelectedIds: react.Dispatch<react.SetStateAction<ReadonlySet<string>>>;
|
|
1214
|
+
toggleSelected: (id: string) => void;
|
|
1215
|
+
toggleSort: (field: PostSortField) => void;
|
|
1216
|
+
toggleTag: (tag: string) => void;
|
|
1217
|
+
setTab: (next: PostListTab) => void;
|
|
1218
|
+
setSearch: (search: string) => void;
|
|
1219
|
+
setPageSize: (next: number) => void;
|
|
1220
|
+
setPage: (page: number) => void;
|
|
1221
|
+
clearFilters: () => void;
|
|
1222
|
+
refresh: () => void;
|
|
1223
|
+
hasFilters: boolean;
|
|
1224
|
+
};
|
|
1225
|
+
|
|
689
1226
|
/**
|
|
690
1227
|
* Copyright (c) 2026 Ada Technology. MIT License.
|
|
691
1228
|
*
|
|
692
|
-
*
|
|
693
|
-
*
|
|
1229
|
+
* Estado da lista na URL (`?q=&tab=&tags=&page=&size=&sort=&order=`): recarregar a página, voltar do
|
|
1230
|
+
* editor e mandar o link a um colega reabrem a lista exatamente como estava.
|
|
694
1231
|
*/
|
|
1232
|
+
|
|
1233
|
+
declare const PAGE_SIZE_OPTIONS: readonly [10, 20, 50, 100];
|
|
1234
|
+
type ListUrlState = {
|
|
1235
|
+
readonly tab?: PostListTab;
|
|
1236
|
+
/** Só com a moderação ligada; ausente = `all`. */
|
|
1237
|
+
readonly origin?: PostOriginFilter;
|
|
1238
|
+
readonly search: string;
|
|
1239
|
+
readonly tags: readonly string[];
|
|
1240
|
+
readonly page: number;
|
|
1241
|
+
readonly pageSize?: number;
|
|
1242
|
+
readonly sort: PostSortField;
|
|
1243
|
+
readonly order: 'asc' | 'desc';
|
|
1244
|
+
};
|
|
1245
|
+
/** Lê a URL tolerando lixo: valor inválido cai no padrão, nunca quebra a tela. */
|
|
1246
|
+
declare function parseListUrlState(search: string): ListUrlState;
|
|
1247
|
+
/** Só grava o que difere do padrão: a URL de uma lista intocada fica limpa. */
|
|
1248
|
+
declare function serializeListUrlState(state: ListUrlState): string;
|
|
1249
|
+
type PublicOriginTab = 'casa' | 'hospedes';
|
|
1250
|
+
declare function parsePublicOriginTab(search: string): PublicOriginTab;
|
|
1251
|
+
/** Query da lista pública: aba "casa" e página 1 ficam fora da URL. */
|
|
1252
|
+
declare function serializePublicListState(state: {
|
|
1253
|
+
readonly origin: PublicOriginTab;
|
|
1254
|
+
readonly page: number;
|
|
1255
|
+
readonly tag?: string;
|
|
1256
|
+
}): string;
|
|
1257
|
+
|
|
695
1258
|
type PostListPageProps = {
|
|
696
1259
|
readonly page?: number;
|
|
697
1260
|
readonly tag?: string;
|
|
@@ -701,11 +1264,31 @@ type PostListPageProps = {
|
|
|
701
1264
|
readonly getListHref: (params: {
|
|
702
1265
|
readonly page: number;
|
|
703
1266
|
readonly tag?: string;
|
|
1267
|
+
/** Só vem quando a aba "Dos hóspedes" está ativa (`casa` é o padrão e fica fora da URL). */
|
|
1268
|
+
readonly origin?: PublicOriginTab;
|
|
704
1269
|
}) => string;
|
|
1270
|
+
/** Aba ativa, lida da URL pelo host (`parsePublicOriginTab`). Só vale com `isCommunityEnabled`. */
|
|
1271
|
+
readonly origin?: PublicOriginTab;
|
|
705
1272
|
/** Título visível da página. Ausente: sem `<h1>` (o host já tem o dele). */
|
|
706
1273
|
readonly title?: string;
|
|
707
1274
|
};
|
|
708
|
-
declare function PostListPage({ page, tag, pageSize, getPostHref, getListHref, title }: PostListPageProps): react.JSX.Element;
|
|
1275
|
+
declare function PostListPage({ page, tag, pageSize, getPostHref, getListHref, title, origin, }: PostListPageProps): react.JSX.Element;
|
|
1276
|
+
|
|
1277
|
+
type PublicOriginTabsProps = {
|
|
1278
|
+
readonly active: PublicOriginTab;
|
|
1279
|
+
/** Link da primeira página da aba; o host decide como a URL leva `?origem=`. */
|
|
1280
|
+
readonly getTabHref: (origin: PublicOriginTab) => string;
|
|
1281
|
+
};
|
|
1282
|
+
/** Abas como links (cada uma é uma URL compartilhável); setas movem o foco, Enter abre. */
|
|
1283
|
+
declare function PublicOriginTabs({ active, getTabHref }: PublicOriginTabsProps): react.JSX.Element;
|
|
1284
|
+
|
|
1285
|
+
type ReportPostDialogProps = {
|
|
1286
|
+
readonly postId: string;
|
|
1287
|
+
readonly onReport: (params: ReportPostParams) => Promise<void>;
|
|
1288
|
+
readonly onSent: () => void;
|
|
1289
|
+
readonly onClose: () => void;
|
|
1290
|
+
};
|
|
1291
|
+
declare function ReportPostDialog({ postId, onReport, onSent, onClose }: ReportPostDialogProps): react.JSX.Element;
|
|
709
1292
|
|
|
710
1293
|
/**
|
|
711
1294
|
* Copyright (c) 2026 Ada Technology. MIT License.
|
|
@@ -781,77 +1364,55 @@ declare function Pagination({ page, totalPages, getPageHref, onPageChange }: Pag
|
|
|
781
1364
|
/**
|
|
782
1365
|
* Copyright (c) 2026 Ada Technology. MIT License.
|
|
783
1366
|
*/
|
|
784
|
-
type AsyncResource<TData> = {
|
|
785
|
-
readonly data: TData | undefined;
|
|
786
|
-
readonly isLoading: boolean;
|
|
787
|
-
readonly error: unknown;
|
|
788
|
-
readonly reload: () => void;
|
|
789
|
-
};
|
|
790
1367
|
/**
|
|
791
|
-
*
|
|
792
|
-
*
|
|
793
|
-
* próprio — quem quiser TanStack Query implementa a API injetada sobre ele.
|
|
1368
|
+
* Posts de hóspedes esperando a equipe (`countPosts().pendingReview`), para o badge do menu do host.
|
|
1369
|
+
* `undefined` enquanto carrega ou quando a API não conta. Mude `reloadKey` para recontar.
|
|
794
1370
|
*/
|
|
795
|
-
declare function
|
|
1371
|
+
declare function usePendingReviewCount(reloadKey?: number): number | undefined;
|
|
796
1372
|
|
|
797
1373
|
/**
|
|
798
1374
|
* Copyright (c) 2026 Ada Technology. MIT License.
|
|
799
|
-
*
|
|
800
|
-
* Estado da lista na URL (`?q=&tab=&tags=&page=&size=&sort=&order=`): recarregar a página, voltar do
|
|
801
|
-
* editor e mandar o link a um colega reabrem a lista exatamente como estava.
|
|
802
1375
|
*/
|
|
803
1376
|
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
readonly
|
|
807
|
-
readonly search: string;
|
|
808
|
-
readonly tags: readonly string[];
|
|
809
|
-
readonly page: number;
|
|
810
|
-
readonly pageSize?: number;
|
|
811
|
-
readonly sort: PostSortField;
|
|
812
|
-
readonly order: 'asc' | 'desc';
|
|
1377
|
+
type CommunityErrorMessage = {
|
|
1378
|
+
readonly key: keyof ContentMessages;
|
|
1379
|
+
readonly values: Readonly<Record<string, string | number>>;
|
|
813
1380
|
};
|
|
814
|
-
/**
|
|
815
|
-
declare function
|
|
816
|
-
/**
|
|
817
|
-
declare function
|
|
1381
|
+
/** `retryAfterSeconds` → horas inteiras para cima (mínimo 1): "Tente de novo em ~3 h". */
|
|
1382
|
+
declare function retryAfterHours(seconds: number): number;
|
|
1383
|
+
/** Mensagem do erro da área do hóspede, pelo `code` (e `statusCode` quando o `code` não veio). */
|
|
1384
|
+
declare function communityErrorMessage(error: unknown): CommunityErrorMessage;
|
|
818
1385
|
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
readonly
|
|
822
|
-
readonly
|
|
823
|
-
readonly DRAFT: "draft";
|
|
824
|
-
readonly TEMPLATES: "templates";
|
|
825
|
-
};
|
|
826
|
-
type PostListTab = (typeof POST_LIST_TAB)[keyof typeof POST_LIST_TAB];
|
|
827
|
-
type PostListFilters = {
|
|
828
|
-
readonly tags: readonly string[];
|
|
829
|
-
readonly search: string;
|
|
1386
|
+
type StoryDraft = {
|
|
1387
|
+
readonly title: string;
|
|
1388
|
+
readonly displayName: string;
|
|
1389
|
+
readonly body: string;
|
|
830
1390
|
};
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
readonly
|
|
1391
|
+
type StoryFeedback = 'saved' | 'submitted' | 'publishedNow';
|
|
1392
|
+
type StoryBusy = 'idle' | 'saving' | 'submitting';
|
|
1393
|
+
declare function useCommunityStoryEditor(params: {
|
|
1394
|
+
readonly postId?: string;
|
|
1395
|
+
readonly onChanged?: (post: CommunityPost) => void;
|
|
836
1396
|
}): {
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
1397
|
+
post: CommunityPost | undefined;
|
|
1398
|
+
draft: StoryDraft;
|
|
1399
|
+
isLoading: boolean;
|
|
1400
|
+
isDirty: boolean;
|
|
1401
|
+
canSubmit: boolean;
|
|
1402
|
+
maxImages: number | undefined;
|
|
1403
|
+
update: <TKey extends keyof StoryDraft>(key: TKey, value: StoryDraft[TKey]) => void;
|
|
1404
|
+
uploadImage: (file: File) => Promise<UploadImageResult>;
|
|
1405
|
+
hasAcceptedTerms: boolean;
|
|
1406
|
+
setHasAcceptedTerms: react.Dispatch<react.SetStateAction<boolean>>;
|
|
1407
|
+
errors: {
|
|
1408
|
+
readonly title: boolean;
|
|
1409
|
+
readonly body: boolean;
|
|
1410
|
+
};
|
|
1411
|
+
save: () => Promise<void>;
|
|
1412
|
+
submit: () => Promise<void>;
|
|
1413
|
+
busy: StoryBusy;
|
|
1414
|
+
feedback: StoryFeedback | undefined;
|
|
1415
|
+
error: CommunityErrorMessage | undefined;
|
|
855
1416
|
};
|
|
856
1417
|
|
|
857
1418
|
/**
|
|
@@ -865,6 +1426,59 @@ declare function useUnsavedChangesGuard(isDirty: boolean, message: string): {
|
|
|
865
1426
|
readonly confirmLeave: () => boolean;
|
|
866
1427
|
};
|
|
867
1428
|
|
|
1429
|
+
/**
|
|
1430
|
+
* Copyright (c) 2026 Ada Technology. MIT License.
|
|
1431
|
+
*/
|
|
1432
|
+
|
|
1433
|
+
type CommunityPostView = {
|
|
1434
|
+
readonly status: CommunityPostStatus;
|
|
1435
|
+
readonly statusLabelKey: keyof ContentMessages;
|
|
1436
|
+
/** Nota da equipe do post recusado; só aparece quando o status é `rejected`. */
|
|
1437
|
+
readonly reviewNote: string | null;
|
|
1438
|
+
/** Edição de post publicado: aguardando ou recusada (com a nota). */
|
|
1439
|
+
readonly revision: {
|
|
1440
|
+
readonly state: 'pending' | 'rejected';
|
|
1441
|
+
readonly note: string | null;
|
|
1442
|
+
} | undefined;
|
|
1443
|
+
};
|
|
1444
|
+
type ViewSource = Pick<CommunityPost, 'status' | 'reviewNote' | 'pendingRevision'>;
|
|
1445
|
+
/** Pílula, nota e estado da edição de um post do hóspede — a regra num lugar só, testável sem tela. */
|
|
1446
|
+
declare function getCommunityPostView(post: ViewSource): CommunityPostView;
|
|
1447
|
+
/** Só rascunho e recusado voltam para a equipe pelo "Enviar"; publicado e em análise se editam e só. */
|
|
1448
|
+
declare function canSubmitCommunityPost(status: CommunityPostStatus): boolean;
|
|
1449
|
+
|
|
1450
|
+
/**
|
|
1451
|
+
* Copyright (c) 2026 Ada Technology. MIT License.
|
|
1452
|
+
*/
|
|
1453
|
+
|
|
1454
|
+
/** Mensagem "um|vários": `Intl.PluralRules` escolhe, e `{count}` entra no texto escolhido. */
|
|
1455
|
+
declare function pluralMessage(message: string, count: number, locale: string): string;
|
|
1456
|
+
type SummaryText = {
|
|
1457
|
+
readonly messages: ContentMessages;
|
|
1458
|
+
readonly locale: string;
|
|
1459
|
+
};
|
|
1460
|
+
/** "3 aprovados, 1 falhou: <motivo>" — motivos repetidos aparecem uma vez. */
|
|
1461
|
+
declare function summarizeBulkResult(result: BulkModerationResult, action: BulkModerationAction, { messages, locale }: SummaryText): string;
|
|
1462
|
+
|
|
1463
|
+
/**
|
|
1464
|
+
* Copyright (c) 2026 Ada Technology. MIT License.
|
|
1465
|
+
*/
|
|
1466
|
+
|
|
1467
|
+
declare const NOTE_MAX_LENGTH = 500;
|
|
1468
|
+
/** Moderação ligada pelo host: sem `approvePost`, o painel é exatamente o de antes. */
|
|
1469
|
+
declare function hasCommunityModeration(api: ContentAdminApi): boolean;
|
|
1470
|
+
type ModerationActions = {
|
|
1471
|
+
readonly approve: boolean;
|
|
1472
|
+
readonly reject: boolean;
|
|
1473
|
+
readonly unpublish: boolean;
|
|
1474
|
+
readonly archive: boolean;
|
|
1475
|
+
};
|
|
1476
|
+
type ActionSource = Pick<Post, 'status' | 'pendingRevision' | 'origin'>;
|
|
1477
|
+
/** O que a equipe pode fazer agora (máquina de estados do desenho §4), só do que a porta do host oferece. */
|
|
1478
|
+
declare function getModerationActions(post: ActionSource, api: ContentAdminApi): ModerationActions;
|
|
1479
|
+
/** Nota obrigatória de 1 a 500 caracteres (recusar); opcional é só o teto. */
|
|
1480
|
+
declare function isNoteValid(note: string, isRequired: boolean): boolean;
|
|
1481
|
+
|
|
868
1482
|
/**
|
|
869
1483
|
* Copyright (c) 2026 Ada Technology. MIT License.
|
|
870
1484
|
*/
|
|
@@ -965,4 +1579,4 @@ declare function buildPageItems(params: {
|
|
|
965
1579
|
readonly siblings?: number;
|
|
966
1580
|
}): PageItem[];
|
|
967
1581
|
|
|
968
|
-
export { type AsyncResource, COVER_MAX_BYTES, COVER_MIME_TYPES, type ContentAdminApi, type ContentLocale, type ContentMessages, ContentProvider, type ContentProviderProps, type ContentPublicApi, type ContentText, ContentWorkspace, type ContentWorkspaceProps, DEFAULT_CONTENT_LOCALE, DRAFT_ERROR, type DateTimeInputProps, type DraftErrorField, EMOJI_BY_CATEGORY, EMOJI_CATEGORIES, EMPTY_POST_DRAFT, type EditorFeedback, EmojiPicker, type EmojiPickerProps, FilePicker, type FilePickerProps, type LinePrefixKind, type ListExportContext, type ListPostsParams, type ListPublishedPostsParams, type ListUrlState, MarkdownContent, type MarkdownContentProps, MarkdownEditor, type MarkdownEditorProps, PAGE_SIZE_OPTIONS, POST_LIST_TAB, type PageItem, Pagination, type PaginationProps, PostCard, type PostCardProps, type PostDraft, PostEditor, type PostEditorProps, type PostEditorState, PostList, type PostListFilters, PostListPage, type PostListPageProps, type PostListProps, type PostListTab, type PostMeta, PostPage, type PostPageProps, type RenderDateTimeInput, type RenderLink, type RenderLinkProps, type RenderSelect, SHARE_NETWORK, SHARE_NETWORKS, type SelectInputProps, ShareButtons, type ShareButtonsProps, type ShareLink, type ShareNetwork, StatusChip, type StatusChipProps, TagsInput, type TagsInputProps, type TextSelection, Tooltip, type TooltipProps, type UploadImageResult, buildPageItems, buildPostMeta, buildShareLinks, deriveSlug, draftFromPost, draftToInput, formatPostDate, fromDateTimeLocalValue, insertImage, insertLink, insertText, interpolate, isDraftDirty, parseListUrlState, resolveContentMessages, searchEmoji, serializeListUrlState, splitTagInput, toDateTimeLocalValue, toggleLinePrefix, toggleWrap, useAsyncResource, useContentAdminApi, useContentPublicApi, useContentText, usePostEditor, usePostList, useRenderLink, useUnsavedChangesGuard, validateDraft };
|
|
1582
|
+
export { type AsyncResource, COVER_MAX_BYTES, COVER_MIME_TYPES, type CommunityContentProvider, type CommunityErrorMessage, type CommunityLimits, CommunityPostReview, type CommunityPostReviewProps, type CommunityPostView, CommunityReportsPage, type CommunityReportsPageProps, CommunitySettingsPanel, type CommunitySettingsPanelProps, CommunityStatusPill, type CommunityStatusPillProps, CommunityStoriesPage, type CommunityStoriesPageProps, CommunityStoryEditor, type CommunityStoryEditorProps, type ContentAdminApi, type ContentLocale, type ContentMessages, ContentProvider, type ContentProviderProps, type ContentPublicApi, type ContentText, ContentWorkspace, type ContentWorkspaceProps, DEFAULT_CONTENT_LOCALE, DRAFT_ERROR, type DateTimeInputProps, type DraftErrorField, EMOJI_BY_CATEGORY, EMOJI_CATEGORIES, EMPTY_POST_DRAFT, type EditorFeedback, EmojiPicker, type EmojiPickerProps, FilePicker, type FilePickerProps, type LinePrefixKind, type ListExportContext, type ListPostsParams, type ListPublishedPostsParams, type ListReportsParams, type ListUrlState, MarkdownContent, type MarkdownContentProps, MarkdownEditor, type MarkdownEditorProps, type ModeratePostsParams, type ModerationActions, NOTE_MAX_LENGTH, PAGE_SIZE_OPTIONS, POST_LIST_TAB, type PageItem, Pagination, type PaginationProps, PostCard, type PostCardProps, type PostDraft, PostEditor, type PostEditorProps, type PostEditorState, PostList, type PostListFilters, PostListPage, type PostListPageProps, type PostListProps, type PostListTab, type PostMeta, PostPage, type PostPageProps, type PublicOriginTab, PublicOriginTabs, type PublicOriginTabsProps, type RejectPostParams, type RenderDateTimeInput, type RenderLink, type RenderLinkProps, type RenderSelect, ReportPostDialog, type ReportPostDialogProps, type ReportPostParams, SHARE_NETWORK, SHARE_NETWORKS, type SelectInputProps, ShareButtons, type ShareButtonsProps, type ShareLink, type ShareNetwork, StatusChip, type StatusChipProps, type StoryDraft, type StoryFeedback, TagsInput, type TagsInputProps, type TextSelection, Tooltip, type TooltipProps, type UnpublishCommunityPostParams, type UploadImageResult, buildPageItems, buildPostMeta, buildShareLinks, canSubmitCommunityPost, communityErrorMessage, deriveSlug, draftFromPost, draftToInput, formatPostDate, fromDateTimeLocalValue, getCommunityPostView, getModerationActions, hasCommunityModeration, insertImage, insertLink, insertText, interpolate, isDraftDirty, isNoteValid, parseListUrlState, parsePublicOriginTab, pluralMessage, resolveContentMessages, retryAfterHours, searchEmoji, serializeListUrlState, serializePublicListState, splitTagInput, summarizeBulkResult, toDateTimeLocalValue, toggleLinePrefix, toggleWrap, useAsyncResource, useCommunityApi, useCommunityStoryEditor, useContentAdminApi, useContentPublicApi, useContentText, usePendingReviewCount, usePostEditor, usePostList, useRenderLink, useUnsavedChangesGuard, validateDraft };
|