@adatechnology/content-ui 0.2.0 → 0.3.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 +15 -0
- package/dist/index.d.ts +206 -17
- package/dist/index.js +1102 -175
- package/dist/index.js.map +1 -1
- package/dist/styles.css +292 -2
- package/dist/styles.css.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -48,6 +48,21 @@ const adminApi: ContentAdminApi = {
|
|
|
48
48
|
| `StatusChip` | `status` |
|
|
49
49
|
| `TagsInput` | `value`, `onChange`, `suggestions?`, `label` |
|
|
50
50
|
|
|
51
|
+
### Abas, modelos, republicar e publicação automática
|
|
52
|
+
|
|
53
|
+
Tudo opt-in pela API injetada (sem o método, a peça não aparece): `countPosts` liga as abas
|
|
54
|
+
**Publicados / Agendados / Rascunhos / Modelos** com contagem; `saveAsTemplate` e `createFromTemplate`
|
|
55
|
+
ligam "Salvar como modelo" e "Novo a partir do modelo"; `republishPost` liga "Republicar" (nova data, mesmo
|
|
56
|
+
link); `listRecurrences`/`createRecurrence`/`updateRecurrence`/`removeRecurrence` ligam o painel de
|
|
57
|
+
publicação automática na aba Modelos. Estado é sempre ícone + palavra + cor, e a dica usa o `Tooltip` do
|
|
58
|
+
pacote (hover e foco, nunca `title`). Para o host manter os próprios controles, o `ContentWorkspace` aceita
|
|
59
|
+
`renderDateTimeInput` e `renderSelect`; sem eles os diálogos usam `datetime-local` e `<select>` nativos.
|
|
60
|
+
|
|
61
|
+
A lista segue a regra de listagens: **busca primeiro e à esquerda**, depois filtros (abas por situação e tags
|
|
62
|
+
multisseleção) e as ações à direita; cabeçalhos ordenáveis (`aria-sort`), caixas de marcar próprias com ações em
|
|
63
|
+
lote (publicar, despublicar, excluir), paginação do servidor com "x–y de total" e itens por página. Com
|
|
64
|
+
`syncUrl`, busca, aba, tags, página, tamanho e ordem vão para a query string (`?tab=&q=&tags=&page=&size=&sort=&order=`).
|
|
65
|
+
|
|
51
66
|
O editor protege alterações não salvas (aviso do navegador ao fechar a aba e confirmação no botão
|
|
52
67
|
Voltar), valida com o mesmo schema do servidor, gera o slug do título enquanto o autor não o edita
|
|
53
68
|
e esconde o upload quando a API não tem `uploadCoverImage`.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { ReactNode } from 'react';
|
|
2
|
+
import { ReactNode, ReactElement } from 'react';
|
|
3
3
|
import * as _adatechnology_content_contracts from '@adatechnology/content-contracts';
|
|
4
|
-
import { PostStatus, Paginated, PostSummary, Post, CreatePostInput, UpdatePostInput, PublishPostInput, TagCount, PublicPostSummary, PublicPost } from '@adatechnology/content-contracts';
|
|
4
|
+
import { PostStatus, PostSortField, Paginated, PostSummary, Post, CreatePostInput, UpdatePostInput, PublishPostInput, PostCounts, SaveAsTemplateInput, CreateFromTemplateInput, RepublishPostInput, RecurrenceRule, CreateRecurrenceInput, UpdateRecurrenceInput, TagCount, PublicPostSummary, PublicPost } from '@adatechnology/content-contracts';
|
|
5
5
|
|
|
6
6
|
var statusDraft = "Rascunho";
|
|
7
7
|
var statusScheduled = "Agendado";
|
|
@@ -65,7 +65,7 @@ var schedule = "Agendar";
|
|
|
65
65
|
var unpublish = "Despublicar";
|
|
66
66
|
var archive = "Arquivar";
|
|
67
67
|
var archiveConfirm = "Arquivar este post? Ele sai do site.";
|
|
68
|
-
var close = "
|
|
68
|
+
var close = "Fechar";
|
|
69
69
|
var unsavedConfirm = "Há alterações não salvas. Sair mesmo assim?";
|
|
70
70
|
var unsavedBadge = "Alterações não salvas";
|
|
71
71
|
var saveError = "Não foi possível salvar.";
|
|
@@ -92,6 +92,57 @@ var shareOn = "Compartilhar no {network}";
|
|
|
92
92
|
var notFound = "Post não encontrado.";
|
|
93
93
|
var postsEmpty = "Nenhum post publicado ainda.";
|
|
94
94
|
var clearFilters = "Limpar filtros";
|
|
95
|
+
var statusTemplate = "Modelo";
|
|
96
|
+
var tabsLabel = "Situação dos posts";
|
|
97
|
+
var tabPublished = "Publicados";
|
|
98
|
+
var tabScheduled = "Agendados";
|
|
99
|
+
var tabDraft = "Rascunhos";
|
|
100
|
+
var tabTemplates = "Modelos";
|
|
101
|
+
var columnActions = "Ações";
|
|
102
|
+
var dialogCancel = "Cancelar";
|
|
103
|
+
var actionError = "Não foi possível concluir. Tente de novo.";
|
|
104
|
+
var emptyTemplates = "Nenhum modelo ainda. Em qualquer post, use “Salvar como modelo”.";
|
|
105
|
+
var saveAsTemplate = "Salvar como modelo";
|
|
106
|
+
var saveAsTemplateTip = "Cria uma cópia reutilizável. O post original não muda.";
|
|
107
|
+
var templateNameLabel = "Nome do modelo";
|
|
108
|
+
var newFromTemplate = "Novo a partir do modelo";
|
|
109
|
+
var newFromTemplateTip = "Cria um rascunho com o conteúdo do modelo.";
|
|
110
|
+
var newPostTitleLabel = "Título do novo post";
|
|
111
|
+
var createDraft = "Criar rascunho";
|
|
112
|
+
var republish = "Republicar";
|
|
113
|
+
var republishTip = "Muda a data e mantém o mesmo link: o jeito certo para buscadores.";
|
|
114
|
+
var republishDateLabel = "Nova data de publicação";
|
|
115
|
+
var republishHint = "O endereço do post não muda. Use agora ou uma data passada: data futura tiraria o post do ar.";
|
|
116
|
+
var recurrenceTitle = "Publicação automática";
|
|
117
|
+
var recurrenceNew = "Nova recorrência";
|
|
118
|
+
var recurrenceCreate = "Criar recorrência";
|
|
119
|
+
var recurrenceTemplate = "Modelo";
|
|
120
|
+
var recurrenceFrequency = "Repete";
|
|
121
|
+
var recurrenceStart = "Primeira publicação";
|
|
122
|
+
var frequencyWeekly = "Toda semana";
|
|
123
|
+
var frequencyMonthly = "Todo mês";
|
|
124
|
+
var recurrenceHint = "A cada data, um post novo é publicado sozinho a partir do modelo.";
|
|
125
|
+
var recurrenceNext = "próxima {date}";
|
|
126
|
+
var recurrenceActive = "Ativa";
|
|
127
|
+
var recurrencePaused = "Pausada";
|
|
128
|
+
var recurrencePause = "Pausar";
|
|
129
|
+
var recurrenceResume = "Retomar";
|
|
130
|
+
var recurrenceRemove = "Apagar regra";
|
|
131
|
+
var recurrenceRemoveTip = "Apaga só a regra. Os posts já publicados continuam no ar.";
|
|
132
|
+
var recurrenceEmpty = "Nenhuma recorrência. Crie uma para publicar sozinho toda semana ou mês.";
|
|
133
|
+
var recurrenceNeedsTemplate = "Crie um modelo primeiro para agendar publicações automáticas.";
|
|
134
|
+
var selectAll = "Selecionar todos";
|
|
135
|
+
var selectRow = "Selecionar {title}";
|
|
136
|
+
var selectedCount = "Selecionados: {count}";
|
|
137
|
+
var clearSelection = "Limpar seleção";
|
|
138
|
+
var batchLabel = "Ações em lote";
|
|
139
|
+
var batchPublish = "Publicar";
|
|
140
|
+
var batchUnpublish = "Despublicar";
|
|
141
|
+
var batchArchive = "Excluir";
|
|
142
|
+
var batchArchiveConfirm = "Excluir {count} posts? Eles saem do site; o conteúdo fica arquivado.";
|
|
143
|
+
var batchPartial = "Só {done} de {total} concluídos. Tente de novo nos demais.";
|
|
144
|
+
var itemsPerPage = "Por página";
|
|
145
|
+
var rangeLabel = "{from}–{to} de {total}";
|
|
95
146
|
var bodyHintToolbar = "Selecione o texto e use os botões acima. Atalhos: Ctrl+B negrito, Ctrl+I itálico, Ctrl+K link.";
|
|
96
147
|
var toolbarLabel = "Formatação do texto";
|
|
97
148
|
var formatBold = "Negrito";
|
|
@@ -111,7 +162,6 @@ var linkText = "Texto do link";
|
|
|
111
162
|
var imageDialogTitle = "Inserir imagem";
|
|
112
163
|
var imageUploadFromDevice = "Enviar do aparelho";
|
|
113
164
|
var dialogInsert = "Inserir";
|
|
114
|
-
var dialogCancel = "Cancelar";
|
|
115
165
|
var fileNoneChosen = "Nenhum arquivo escolhido";
|
|
116
166
|
var emojiTitle = "Escolher emoji";
|
|
117
167
|
var emojiSearch = "Buscar emoji";
|
|
@@ -214,6 +264,57 @@ var ptBR = {
|
|
|
214
264
|
notFound: notFound,
|
|
215
265
|
postsEmpty: postsEmpty,
|
|
216
266
|
clearFilters: clearFilters,
|
|
267
|
+
statusTemplate: statusTemplate,
|
|
268
|
+
tabsLabel: tabsLabel,
|
|
269
|
+
tabPublished: tabPublished,
|
|
270
|
+
tabScheduled: tabScheduled,
|
|
271
|
+
tabDraft: tabDraft,
|
|
272
|
+
tabTemplates: tabTemplates,
|
|
273
|
+
columnActions: columnActions,
|
|
274
|
+
dialogCancel: dialogCancel,
|
|
275
|
+
actionError: actionError,
|
|
276
|
+
emptyTemplates: emptyTemplates,
|
|
277
|
+
saveAsTemplate: saveAsTemplate,
|
|
278
|
+
saveAsTemplateTip: saveAsTemplateTip,
|
|
279
|
+
templateNameLabel: templateNameLabel,
|
|
280
|
+
newFromTemplate: newFromTemplate,
|
|
281
|
+
newFromTemplateTip: newFromTemplateTip,
|
|
282
|
+
newPostTitleLabel: newPostTitleLabel,
|
|
283
|
+
createDraft: createDraft,
|
|
284
|
+
republish: republish,
|
|
285
|
+
republishTip: republishTip,
|
|
286
|
+
republishDateLabel: republishDateLabel,
|
|
287
|
+
republishHint: republishHint,
|
|
288
|
+
recurrenceTitle: recurrenceTitle,
|
|
289
|
+
recurrenceNew: recurrenceNew,
|
|
290
|
+
recurrenceCreate: recurrenceCreate,
|
|
291
|
+
recurrenceTemplate: recurrenceTemplate,
|
|
292
|
+
recurrenceFrequency: recurrenceFrequency,
|
|
293
|
+
recurrenceStart: recurrenceStart,
|
|
294
|
+
frequencyWeekly: frequencyWeekly,
|
|
295
|
+
frequencyMonthly: frequencyMonthly,
|
|
296
|
+
recurrenceHint: recurrenceHint,
|
|
297
|
+
recurrenceNext: recurrenceNext,
|
|
298
|
+
recurrenceActive: recurrenceActive,
|
|
299
|
+
recurrencePaused: recurrencePaused,
|
|
300
|
+
recurrencePause: recurrencePause,
|
|
301
|
+
recurrenceResume: recurrenceResume,
|
|
302
|
+
recurrenceRemove: recurrenceRemove,
|
|
303
|
+
recurrenceRemoveTip: recurrenceRemoveTip,
|
|
304
|
+
recurrenceEmpty: recurrenceEmpty,
|
|
305
|
+
recurrenceNeedsTemplate: recurrenceNeedsTemplate,
|
|
306
|
+
selectAll: selectAll,
|
|
307
|
+
selectRow: selectRow,
|
|
308
|
+
selectedCount: selectedCount,
|
|
309
|
+
clearSelection: clearSelection,
|
|
310
|
+
batchLabel: batchLabel,
|
|
311
|
+
batchPublish: batchPublish,
|
|
312
|
+
batchUnpublish: batchUnpublish,
|
|
313
|
+
batchArchive: batchArchive,
|
|
314
|
+
batchArchiveConfirm: batchArchiveConfirm,
|
|
315
|
+
batchPartial: batchPartial,
|
|
316
|
+
itemsPerPage: itemsPerPage,
|
|
317
|
+
rangeLabel: rangeLabel,
|
|
217
318
|
bodyHintToolbar: bodyHintToolbar,
|
|
218
319
|
toolbarLabel: toolbarLabel,
|
|
219
320
|
formatBold: formatBold,
|
|
@@ -233,7 +334,6 @@ var ptBR = {
|
|
|
233
334
|
imageDialogTitle: imageDialogTitle,
|
|
234
335
|
imageUploadFromDevice: imageUploadFromDevice,
|
|
235
336
|
dialogInsert: dialogInsert,
|
|
236
|
-
dialogCancel: dialogCancel,
|
|
237
337
|
fileNoneChosen: fileNoneChosen,
|
|
238
338
|
emojiTitle: emojiTitle,
|
|
239
339
|
emojiSearch: emojiSearch,
|
|
@@ -273,8 +373,13 @@ type ListPostsParams = {
|
|
|
273
373
|
readonly page?: number;
|
|
274
374
|
readonly pageSize?: number;
|
|
275
375
|
readonly status?: PostStatus;
|
|
376
|
+
/** Uma tag, ou várias separadas por vírgula (basta ter uma). */
|
|
276
377
|
readonly tag?: string;
|
|
277
378
|
readonly search?: string;
|
|
379
|
+
readonly sort?: PostSortField;
|
|
380
|
+
readonly order?: 'asc' | 'desc';
|
|
381
|
+
/** `true`: só modelos. */
|
|
382
|
+
readonly isTemplate?: boolean;
|
|
278
383
|
};
|
|
279
384
|
type ContentAdminApi = {
|
|
280
385
|
listPosts(params: ListPostsParams): Promise<Paginated<PostSummary>>;
|
|
@@ -284,6 +389,18 @@ type ContentAdminApi = {
|
|
|
284
389
|
publishPost(id: string, input?: PublishPostInput): Promise<Post>;
|
|
285
390
|
unpublishPost(id: string): Promise<Post>;
|
|
286
391
|
archivePost(id: string): Promise<void>;
|
|
392
|
+
/** Ausente: a lista não tem abas por situação nem contagens (filtro de status em lista suspensa). */
|
|
393
|
+
countPosts?(): Promise<PostCounts>;
|
|
394
|
+
/** Ausente: sem "Salvar como modelo" e sem a aba Modelos. */
|
|
395
|
+
saveAsTemplate?(id: string, input?: SaveAsTemplateInput): Promise<Post>;
|
|
396
|
+
createFromTemplate?(id: string, input?: CreateFromTemplateInput): Promise<Post>;
|
|
397
|
+
/** Ausente: sem "Republicar". */
|
|
398
|
+
republishPost?(id: string, input?: RepublishPostInput): Promise<Post>;
|
|
399
|
+
/** Ausentes: sem o painel de publicação automática (recorrência). */
|
|
400
|
+
listRecurrences?(): Promise<readonly RecurrenceRule[]>;
|
|
401
|
+
createRecurrence?(input: CreateRecurrenceInput): Promise<RecurrenceRule>;
|
|
402
|
+
updateRecurrence?(id: string, input: UpdateRecurrenceInput): Promise<RecurrenceRule>;
|
|
403
|
+
removeRecurrence?(id: string): Promise<void>;
|
|
287
404
|
/** Ausente: o filtro de tag vira campo livre e o editor não sugere tags. */
|
|
288
405
|
listTags?(): Promise<readonly TagCount[]>;
|
|
289
406
|
/** Ausente: a capa é só por URL — sem alvo de upload que sempre falharia. */
|
|
@@ -323,6 +440,18 @@ type DateTimeInputProps = {
|
|
|
323
440
|
};
|
|
324
441
|
/** Troca o `<input type="datetime-local">` nativo pelo seletor de data e hora do host. */
|
|
325
442
|
type RenderDateTimeInput = (props: DateTimeInputProps) => ReactNode;
|
|
443
|
+
type SelectInputProps = {
|
|
444
|
+
readonly id: string;
|
|
445
|
+
readonly label: string;
|
|
446
|
+
readonly value: string;
|
|
447
|
+
readonly options: readonly {
|
|
448
|
+
readonly id: string;
|
|
449
|
+
readonly label: string;
|
|
450
|
+
}[];
|
|
451
|
+
readonly onChange: (value: string) => void;
|
|
452
|
+
};
|
|
453
|
+
/** Troca o `<select>` nativo pelo menu de seleção do host. */
|
|
454
|
+
type RenderSelect = (props: SelectInputProps) => ReactNode;
|
|
326
455
|
|
|
327
456
|
type ContentProviderProps = {
|
|
328
457
|
/** Painel: lista e editor. Site público não precisa passar. */
|
|
@@ -394,10 +523,16 @@ type ContentWorkspaceProps = {
|
|
|
394
523
|
/** Valores iniciais do post novo (ex.: autor logado). */
|
|
395
524
|
readonly newPostDefaults?: Partial<PostDraft>;
|
|
396
525
|
readonly onPostSaved?: (post: Post) => void;
|
|
397
|
-
|
|
526
|
+
/** Seletor de data e hora do host (padrão: `datetime-local` nativo). */
|
|
398
527
|
readonly renderDateTimeInput?: RenderDateTimeInput;
|
|
528
|
+
/** Menu de seleção do host (padrão: `<select>` nativo). */
|
|
529
|
+
readonly renderSelect?: RenderSelect;
|
|
530
|
+
/** Busca, aba, tags, página, tamanho e ordem da lista na URL (padrão: não). */
|
|
531
|
+
readonly syncUrl?: boolean;
|
|
532
|
+
/** Barra de formatação do corpo do post (padrão: ligada). */
|
|
533
|
+
readonly showFormattingToolbar?: boolean;
|
|
399
534
|
};
|
|
400
|
-
declare function ContentWorkspace({ pageSize, newPostDefaults, onPostSaved,
|
|
535
|
+
declare function ContentWorkspace({ pageSize, newPostDefaults, onPostSaved, renderDateTimeInput, renderSelect, syncUrl, showFormattingToolbar, }: ContentWorkspaceProps): react.JSX.Element;
|
|
401
536
|
|
|
402
537
|
type PostListProps = {
|
|
403
538
|
readonly onSelect: (post: PostSummary) => void;
|
|
@@ -406,8 +541,12 @@ type PostListProps = {
|
|
|
406
541
|
readonly pageSize?: number;
|
|
407
542
|
/** Mude o valor para forçar recarga (ex.: depois de salvar no editor). */
|
|
408
543
|
readonly reloadKey?: number;
|
|
544
|
+
/** Guarda busca, aba, tags, página, tamanho e ordem na query string. */
|
|
545
|
+
readonly syncUrl?: boolean;
|
|
546
|
+
readonly renderDateTimeInput?: RenderDateTimeInput;
|
|
547
|
+
readonly renderSelect?: RenderSelect;
|
|
409
548
|
};
|
|
410
|
-
declare function PostList({ onSelect, onCreate, pageSize, reloadKey }: PostListProps): react.JSX.Element;
|
|
549
|
+
declare function PostList({ onSelect, onCreate, pageSize, reloadKey, syncUrl, renderDateTimeInput, renderSelect, }: PostListProps): react.JSX.Element;
|
|
411
550
|
|
|
412
551
|
type PostEditorProps = {
|
|
413
552
|
/** Ausente: post novo. */
|
|
@@ -425,6 +564,12 @@ type PostEditorProps = {
|
|
|
425
564
|
};
|
|
426
565
|
declare function PostEditor({ postId, defaults, onSaved, onArchived, onClose, showFormattingToolbar, renderDateTimeInput, }: PostEditorProps): react.JSX.Element;
|
|
427
566
|
|
|
567
|
+
type TooltipProps = {
|
|
568
|
+
readonly text: string;
|
|
569
|
+
readonly children: ReactElement;
|
|
570
|
+
};
|
|
571
|
+
declare function Tooltip({ text, children }: TooltipProps): react.JSX.Element;
|
|
572
|
+
|
|
428
573
|
declare const COVER_MAX_BYTES: number;
|
|
429
574
|
declare const COVER_MIME_TYPES: readonly string[];
|
|
430
575
|
type EditorFeedback = 'saved' | 'saveError' | 'coverTooLarge' | 'coverInvalidType' | 'coverUploadError' | 'errorSchedule';
|
|
@@ -500,8 +645,10 @@ declare function FilePicker({ buttonLabel, emptyLabel, accept, isBusy, onPick }:
|
|
|
500
645
|
|
|
501
646
|
type StatusChipProps = {
|
|
502
647
|
readonly status: PostStatus;
|
|
648
|
+
/** Modelo mostra "Modelo" no lugar do status (ele nunca vai ao ar). */
|
|
649
|
+
readonly isTemplate?: boolean;
|
|
503
650
|
};
|
|
504
|
-
declare function StatusChip({ status }: StatusChipProps): react.JSX.Element;
|
|
651
|
+
declare function StatusChip({ status, isTemplate }: StatusChipProps): react.JSX.Element;
|
|
505
652
|
|
|
506
653
|
/**
|
|
507
654
|
* Copyright (c) 2026 Ada Technology. MIT License.
|
|
@@ -630,21 +777,63 @@ type AsyncResource<TData> = {
|
|
|
630
777
|
*/
|
|
631
778
|
declare function useAsyncResource<TData>(load: () => Promise<TData>, key: string): AsyncResource<TData>;
|
|
632
779
|
|
|
780
|
+
/**
|
|
781
|
+
* Copyright (c) 2026 Ada Technology. MIT License.
|
|
782
|
+
*
|
|
783
|
+
* Estado da lista na URL (`?q=&tab=&tags=&page=&size=&sort=&order=`): recarregar a página, voltar do
|
|
784
|
+
* editor e mandar o link a um colega reabrem a lista exatamente como estava.
|
|
785
|
+
*/
|
|
786
|
+
|
|
787
|
+
declare const PAGE_SIZE_OPTIONS: readonly [10, 20, 50, 100];
|
|
788
|
+
type ListUrlState = {
|
|
789
|
+
readonly tab?: PostListTab;
|
|
790
|
+
readonly search: string;
|
|
791
|
+
readonly tags: readonly string[];
|
|
792
|
+
readonly page: number;
|
|
793
|
+
readonly pageSize?: number;
|
|
794
|
+
readonly sort: PostSortField;
|
|
795
|
+
readonly order: 'asc' | 'desc';
|
|
796
|
+
};
|
|
797
|
+
/** Lê a URL tolerando lixo: valor inválido cai no padrão, nunca quebra a tela. */
|
|
798
|
+
declare function parseListUrlState(search: string): ListUrlState;
|
|
799
|
+
/** Só grava o que difere do padrão: a URL de uma lista intocada fica limpa. */
|
|
800
|
+
declare function serializeListUrlState(state: ListUrlState): string;
|
|
801
|
+
|
|
802
|
+
/** Aba da lista: só existe quando a API injetada sabe contar (`countPosts`). */
|
|
803
|
+
declare const POST_LIST_TAB: {
|
|
804
|
+
readonly PUBLISHED: "published";
|
|
805
|
+
readonly SCHEDULED: "scheduled";
|
|
806
|
+
readonly DRAFT: "draft";
|
|
807
|
+
readonly TEMPLATES: "templates";
|
|
808
|
+
};
|
|
809
|
+
type PostListTab = (typeof POST_LIST_TAB)[keyof typeof POST_LIST_TAB];
|
|
633
810
|
type PostListFilters = {
|
|
634
|
-
readonly
|
|
635
|
-
readonly
|
|
636
|
-
readonly search?: string;
|
|
811
|
+
readonly tags: readonly string[];
|
|
812
|
+
readonly search: string;
|
|
637
813
|
};
|
|
638
814
|
declare function usePostList(params: {
|
|
639
815
|
readonly pageSize: number;
|
|
640
816
|
readonly reloadKey?: number;
|
|
817
|
+
/** Espelha busca, aba, tags, página, tamanho e ordem na query string da URL. */
|
|
818
|
+
readonly syncUrl?: boolean;
|
|
641
819
|
}): {
|
|
642
820
|
posts: AsyncResource<_adatechnology_content_contracts.Paginated<_adatechnology_content_contracts.PostSummary>>;
|
|
821
|
+
counts: PostCounts | undefined;
|
|
643
822
|
tags: readonly TagCount[] | undefined;
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
823
|
+
state: ListUrlState;
|
|
824
|
+
tab: PostListTab | undefined;
|
|
825
|
+
pageSize: number;
|
|
826
|
+
selectedIds: ReadonlySet<string>;
|
|
827
|
+
setSelectedIds: react.Dispatch<react.SetStateAction<ReadonlySet<string>>>;
|
|
828
|
+
toggleSelected: (id: string) => void;
|
|
829
|
+
toggleSort: (field: PostSortField) => void;
|
|
830
|
+
toggleTag: (tag: string) => void;
|
|
831
|
+
setTab: (next: PostListTab) => void;
|
|
832
|
+
setSearch: (search: string) => void;
|
|
833
|
+
setPageSize: (next: number) => void;
|
|
834
|
+
setPage: (page: number) => void;
|
|
835
|
+
clearFilters: () => void;
|
|
836
|
+
refresh: () => void;
|
|
648
837
|
hasFilters: boolean;
|
|
649
838
|
};
|
|
650
839
|
|
|
@@ -759,4 +948,4 @@ declare function buildPageItems(params: {
|
|
|
759
948
|
readonly siblings?: number;
|
|
760
949
|
}): PageItem[];
|
|
761
950
|
|
|
762
|
-
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 ListPostsParams, type ListPublishedPostsParams, MarkdownContent, type MarkdownContentProps, MarkdownEditor, type MarkdownEditorProps, type PageItem, Pagination, type PaginationProps, PostCard, type PostCardProps, type PostDraft, PostEditor, type PostEditorProps, type PostEditorState, PostList, type PostListFilters, PostListPage, type PostListPageProps, type PostListProps, type PostMeta, PostPage, type PostPageProps, type RenderDateTimeInput, type RenderLink, type RenderLinkProps, SHARE_NETWORK, SHARE_NETWORKS, ShareButtons, type ShareButtonsProps, type ShareLink, type ShareNetwork, StatusChip, type StatusChipProps, TagsInput, type TagsInputProps, type TextSelection, type UploadImageResult, buildPageItems, buildPostMeta, buildShareLinks, deriveSlug, draftFromPost, draftToInput, formatPostDate, fromDateTimeLocalValue, insertImage, insertLink, insertText, interpolate, isDraftDirty, resolveContentMessages, searchEmoji, splitTagInput, toDateTimeLocalValue, toggleLinePrefix, toggleWrap, useAsyncResource, useContentAdminApi, useContentPublicApi, useContentText, usePostEditor, usePostList, useRenderLink, useUnsavedChangesGuard, validateDraft };
|
|
951
|
+
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 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 };
|