@praxisui/core 7.0.0-beta.0 → 8.0.0-beta.1
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 +62 -0
- package/fesm2022/praxisui-core.mjs +901 -207
- package/index.d.ts +126 -19
- package/package.json +1 -1
- package/theme-bridge.css +174 -0
package/README.md
CHANGED
|
@@ -59,6 +59,15 @@ Exemplo completo (app de referência)
|
|
|
59
59
|
|
|
60
60
|
### 1) `PraxisIconDirective`
|
|
61
61
|
|
|
62
|
+
Hosts devem carregar Material Symbols para ícones `mso:*` e Material Icons classic quando usarem `mi:*`, componentes legados baseados em ligature classic, ou `mat-icon.material-icons`. Sem Material Icons classic, a ligature pode aparecer como texto visível, por exemplo `clear` dentro de um select.
|
|
63
|
+
|
|
64
|
+
Para alinhar tokens e superfícies Angular Material/Praxis, importe o asset canônico do pacote depois do tema Angular Material e do CSS do CDK Overlay:
|
|
65
|
+
|
|
66
|
+
```scss
|
|
67
|
+
@import "@angular/cdk/overlay-prebuilt.css";
|
|
68
|
+
@import "@praxisui/core/theme-bridge.css";
|
|
69
|
+
```
|
|
70
|
+
|
|
62
71
|
```ts
|
|
63
72
|
import { Component } from '@angular/core';
|
|
64
73
|
import { MatIconModule } from '@angular/material/icon';
|
|
@@ -111,6 +120,59 @@ export class GridDemoComponent {
|
|
|
111
120
|
|
|
112
121
|
Observação: os IDs de widgets usados na página devem estar registrados via `ComponentMetadataRegistry` para que o carregador dinâmico resolva os componentes.
|
|
113
122
|
|
|
123
|
+
### Component config editors
|
|
124
|
+
|
|
125
|
+
`ComponentDocMeta.configEditor` é a superfície pública canônica para um
|
|
126
|
+
componente declarar como seus `definition.inputs` devem ser editados em hosts
|
|
127
|
+
visuais como `praxis-dynamic-page` e `@praxisui/page-builder`.
|
|
128
|
+
|
|
129
|
+
O editor pertence à lib dona da semântica do componente, não ao host. O host
|
|
130
|
+
deve apenas descobrir `configEditor` via `ComponentMetadataRegistry`, abrir o
|
|
131
|
+
componente no `SETTINGS_PANEL_BRIDGE` e aplicar/salvar o payload retornado.
|
|
132
|
+
|
|
133
|
+
Contrato esperado:
|
|
134
|
+
|
|
135
|
+
```ts
|
|
136
|
+
registry.register({
|
|
137
|
+
id: 'praxis-rich-content',
|
|
138
|
+
selector: 'praxis-rich-content',
|
|
139
|
+
component: PraxisRichContent,
|
|
140
|
+
friendlyName: 'Praxis Rich Content',
|
|
141
|
+
configEditor: {
|
|
142
|
+
component: PraxisRichContentConfigEditor,
|
|
143
|
+
title: 'Configurar rich content',
|
|
144
|
+
},
|
|
145
|
+
});
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
Payload recomendado para editores de inputs de widget:
|
|
149
|
+
|
|
150
|
+
```ts
|
|
151
|
+
{
|
|
152
|
+
inputs: {
|
|
153
|
+
// mesmo shape consumido por WidgetDefinition.definition.inputs
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
Regra de plataforma: não crie editor local no host para uma semântica que já
|
|
159
|
+
tem dono canônico. Corrija ou publique o `configEditor` no metadata da lib dona
|
|
160
|
+
do componente.
|
|
161
|
+
|
|
162
|
+
### Widget Shell body layout
|
|
163
|
+
|
|
164
|
+
`WidgetShellConfig.bodyLayout` declares how projected widget content should use
|
|
165
|
+
the shell body:
|
|
166
|
+
|
|
167
|
+
- `content`: default natural document flow for tables, lists, forms and mixed content.
|
|
168
|
+
- `fill`: makes the shell body a flex container whose direct child fills the usable body; use it for resizable charts, maps and canvases that own their viewport.
|
|
169
|
+
- `scroll`: makes the shell body a flex container with body scrolling for content that may exceed the widget height.
|
|
170
|
+
|
|
171
|
+
For corporate dashboards, pair chart contracts that use
|
|
172
|
+
`sizing.mode = "fill-container"` with `bodyLayout: "fill"`. Avoid using `fill`
|
|
173
|
+
for long textual content unless the widget supplies its own compact or empty
|
|
174
|
+
state, because the fill body intentionally hides overflow.
|
|
175
|
+
|
|
114
176
|
## 📚 API Surface
|
|
115
177
|
|
|
116
178
|
- Exports públicos: consulte o arquivo
|