@praxisui/core 8.0.0-beta.11 → 8.0.0-beta.13
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 +42 -0
- package/fesm2022/praxisui-core.mjs +803 -13
- package/index.d.ts +192 -15
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -14,6 +14,18 @@
|
|
|
14
14
|
- Keep icon, config and dynamic widget infrastructure aligned in the host app
|
|
15
15
|
- Avoid duplicating low-level primitives across multiple business libraries
|
|
16
16
|
|
|
17
|
+
## Form Layout Contract
|
|
18
|
+
|
|
19
|
+
`FormColumn.items` and the exported `FormLayoutItem` contract define the
|
|
20
|
+
canonical ordered content of a form column. Items with `kind: 'field'` reference
|
|
21
|
+
`fieldMetadata[].name`; items with `kind: 'richContent'` host visual content and
|
|
22
|
+
do not participate in `fieldMetadata`, `formData`, or submit payloads.
|
|
23
|
+
|
|
24
|
+
`FormColumn.fields` is still accepted as migration input and as a derived
|
|
25
|
+
projection of `kind: 'field'` items. New authors and tools should use `items[]`
|
|
26
|
+
as the canonical source and the helpers exported from
|
|
27
|
+
`form-layout-items.model`.
|
|
28
|
+
|
|
17
29
|
## 🌟 Visão Geral
|
|
18
30
|
|
|
19
31
|
A biblioteca `@praxisui/core` é o núcleo do Praxis UI Workspace, fornecendo interfaces robustas, serviços base e utilitários essenciais para todas as outras bibliotecas do ecossistema. Com a arquitetura unificada, oferece uma experiência de desenvolvimento consistente e type-safe.
|
|
@@ -215,6 +227,28 @@ state, because the fill body intentionally hides overflow.
|
|
|
215
227
|
[`public-api.ts`](https://github.com/codexrodrigues/praxis/blob/main/frontend-libs/praxis-ui-workspace/projects/praxis-core/src/public-api.ts)
|
|
216
228
|
para a lista consolidada de serviços, tokens, modelos e utilitários disponíveis para importação.
|
|
217
229
|
|
|
230
|
+
### Collection Export
|
|
231
|
+
|
|
232
|
+
`PraxisCollectionExportService` é o contrato canônico para exportação de coleções usado por Table, List e próximos componentes de dados.
|
|
233
|
+
|
|
234
|
+
- sem provider registrado, CSV/JSON local usa `loadedItems` e aplica escape de fórmulas para planilhas;
|
|
235
|
+
- com `providePraxisHttpCollectionExportProvider()`, o host registra o provider HTTP oficial;
|
|
236
|
+
- o provider HTTP envia `POST /{resourcePath}/export` usando `API_URL`;
|
|
237
|
+
- escopos remotos `filtered` e `all` omitem `loadedItems` por padrão e delegam query/sort/paginação/seleção ao backend;
|
|
238
|
+
- a resposta pode ser um arquivo binário com `content-disposition` ou um `PraxisCollectionExportResult` JSON;
|
|
239
|
+
- resultados JSON suportam `status: 'completed' | 'deferred'`, `downloadUrl`, `jobId`, `warnings` e `metadata`;
|
|
240
|
+
- resultados `completed` sem `content` nem `downloadUrl` são tratados como erro de contrato pelo runtime.
|
|
241
|
+
|
|
242
|
+
```ts
|
|
243
|
+
import { providePraxisHttpCollectionExportProvider } from '@praxisui/core';
|
|
244
|
+
|
|
245
|
+
export const appConfig = {
|
|
246
|
+
providers: [
|
|
247
|
+
providePraxisHttpCollectionExportProvider(),
|
|
248
|
+
],
|
|
249
|
+
};
|
|
250
|
+
```
|
|
251
|
+
|
|
218
252
|
## 📄 Documentacao Tecnica da Lib
|
|
219
253
|
|
|
220
254
|
- `projects/praxis-core/docs/connection-editor.md` (historico legado; fora do fluxo ativo)
|
|
@@ -1065,6 +1099,9 @@ export interface TableAppearanceConfig;
|
|
|
1065
1099
|
export interface ToolbarConfig;
|
|
1066
1100
|
export interface TableActionsConfig;
|
|
1067
1101
|
export interface ExportConfig;
|
|
1102
|
+
export interface PraxisCollectionExportRequest;
|
|
1103
|
+
export interface PraxisCollectionExportProvider;
|
|
1104
|
+
export interface PraxisCollectionSelectionState;
|
|
1068
1105
|
export interface MessagesConfig;
|
|
1069
1106
|
export interface LocalizationConfig;
|
|
1070
1107
|
export interface PerformanceConfig;
|
|
@@ -1072,6 +1109,8 @@ export interface AccessibilityConfig;
|
|
|
1072
1109
|
|
|
1073
1110
|
// Serviços
|
|
1074
1111
|
export class TableConfigService;
|
|
1112
|
+
export class PraxisCollectionExportService;
|
|
1113
|
+
export class PraxisHttpCollectionExportProvider;
|
|
1075
1114
|
|
|
1076
1115
|
// Helper Functions
|
|
1077
1116
|
export function createDefaultTableConfig(): TableConfig;
|
|
@@ -1080,10 +1119,13 @@ export function isTableConfigV2(config: any): config is TableConfig;
|
|
|
1080
1119
|
export function cloneTableConfig(config: TableConfig): TableConfig;
|
|
1081
1120
|
export function mergeTableConfigs(base: TableConfig, override: Partial<TableConfig>): TableConfig;
|
|
1082
1121
|
export function getEssentialConfig(config: TableConfig): Partial<TableConfig>;
|
|
1122
|
+
export function providePraxisHttpCollectionExportProvider();
|
|
1083
1123
|
|
|
1084
1124
|
// Type Aliases
|
|
1085
1125
|
export type TableConfig = TableConfigV2;
|
|
1086
1126
|
export type TableConfigModern = TableConfigV2;
|
|
1127
|
+
export type PraxisExportFormat;
|
|
1128
|
+
export type PraxisExportScope;
|
|
1087
1129
|
|
|
1088
1130
|
// Legacy (Deprecated)
|
|
1089
1131
|
export type LegacyTableConfig = TableConfig;
|