@praxisui/metadata-editor 1.0.0-beta.13 → 1.0.0-beta.15
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.
|
@@ -2738,6 +2738,69 @@ const yearInputProperties = [
|
|
|
2738
2738
|
{ name: 'autoFocus', label: 'Focar automaticamente', editorType: 'checkbox', group: 'Formato/Comportamento' },
|
|
2739
2739
|
];
|
|
2740
2740
|
|
|
2741
|
+
const avatarProperties = [
|
|
2742
|
+
// Geral
|
|
2743
|
+
{ name: 'label', label: 'Label', editorType: 'text', group: 'Geral' },
|
|
2744
|
+
{ name: 'hint', label: 'Hint', editorType: 'text', group: 'Geral' },
|
|
2745
|
+
// Fonte de conteúdo (extras)
|
|
2746
|
+
{ name: 'extra.imageSrc', label: 'Imagem (URL)', editorType: 'text', group: 'Conteúdo' },
|
|
2747
|
+
{ name: 'extra.imageAlt', label: 'Imagem: alt', editorType: 'text', group: 'Conteúdo' },
|
|
2748
|
+
{ name: 'extra.icon', label: 'Ícone (ligature ou mi:*)', editorType: 'text', group: 'Conteúdo', hint: "Material Symbols (ex.: mi:person). Use o seletor ao lado para buscar." },
|
|
2749
|
+
{ name: 'extra.defaultIcon', label: 'Ícone padrão (fallback)', editorType: 'text', group: 'Conteúdo', hint: 'Será usado quando imagem/ícone/iniciais não forem definidos' },
|
|
2750
|
+
{ name: 'extra.initials', label: 'Iniciais', editorType: 'text', group: 'Conteúdo', hint: 'Ex.: MB' },
|
|
2751
|
+
// Aparência (extras)
|
|
2752
|
+
{ name: 'extra.class', label: 'CSS classes', editorType: 'text', group: 'Aparência', hint: 'Classes CSS adicionais (separadas por espaço)' },
|
|
2753
|
+
{ name: 'extra.style', label: 'Estilo (JSON)', editorType: 'textarea', group: 'Aparência', hint: 'Objeto JSON de estilos (ex.: { "border": "1px solid #ccc" })' },
|
|
2754
|
+
{
|
|
2755
|
+
name: 'extra.themeColor', label: 'Tema', editorType: 'select', group: 'Aparência', options: [
|
|
2756
|
+
{ value: 'primary', text: 'Primária' },
|
|
2757
|
+
{ value: 'secondary', text: 'Secundária' },
|
|
2758
|
+
{ value: 'tertiary', text: 'Terciária' },
|
|
2759
|
+
{ value: 'base', text: 'Base' },
|
|
2760
|
+
{ value: 'info', text: 'Info' },
|
|
2761
|
+
{ value: 'success', text: 'Sucesso' },
|
|
2762
|
+
{ value: 'warning', text: 'Atenção' },
|
|
2763
|
+
{ value: 'error', text: 'Erro' },
|
|
2764
|
+
{ value: 'dark', text: 'Escuro' },
|
|
2765
|
+
{ value: 'light', text: 'Claro' },
|
|
2766
|
+
{ value: 'inverse', text: 'Inverso' },
|
|
2767
|
+
{ value: 'none', text: 'Herdar (nenhum)' },
|
|
2768
|
+
]
|
|
2769
|
+
},
|
|
2770
|
+
{
|
|
2771
|
+
name: 'extra.size', label: 'Tamanho', editorType: 'select', group: 'Aparência', options: [
|
|
2772
|
+
{ value: 'small', text: 'Pequeno' },
|
|
2773
|
+
{ value: 'medium', text: 'Médio' },
|
|
2774
|
+
{ value: 'large', text: 'Grande' },
|
|
2775
|
+
{ value: 'none', text: 'Nenhum (auto)' },
|
|
2776
|
+
]
|
|
2777
|
+
},
|
|
2778
|
+
{
|
|
2779
|
+
name: 'extra.rounded', label: 'Arredondamento', editorType: 'select', group: 'Aparência', options: [
|
|
2780
|
+
{ value: 'full', text: 'Total' },
|
|
2781
|
+
{ value: 'large', text: 'Grande' },
|
|
2782
|
+
{ value: 'medium', text: 'Médio' },
|
|
2783
|
+
{ value: 'small', text: 'Pequeno' },
|
|
2784
|
+
{ value: 'none', text: 'Sem raio' },
|
|
2785
|
+
]
|
|
2786
|
+
},
|
|
2787
|
+
{
|
|
2788
|
+
name: 'extra.fillMode', label: 'Preenchimento', editorType: 'select', group: 'Aparência', options: [
|
|
2789
|
+
{ value: 'solid', text: 'Sólido' },
|
|
2790
|
+
{ value: 'outline', text: 'Contorno' },
|
|
2791
|
+
{ value: 'none', text: 'Nenhum (herdar)' },
|
|
2792
|
+
]
|
|
2793
|
+
},
|
|
2794
|
+
{ name: 'extra.border', label: 'Borda', editorType: 'checkbox', group: 'Aparência' },
|
|
2795
|
+
// Acessibilidade / UX
|
|
2796
|
+
{ name: 'extra.tooltip', label: 'Tooltip', editorType: 'text', group: 'Acessibilidade' },
|
|
2797
|
+
{ name: 'extra.ariaLabel', label: 'ARIA label', editorType: 'text', group: 'Acessibilidade' },
|
|
2798
|
+
// Estados gerais de campo
|
|
2799
|
+
{ name: 'readonly', label: 'Somente leitura', editorType: 'checkbox', group: 'Estado' },
|
|
2800
|
+
{ name: 'disabled', label: 'Desabilitado', editorType: 'checkbox', group: 'Estado' },
|
|
2801
|
+
{ name: 'hidden', label: 'Oculto', editorType: 'checkbox', group: 'Estado' },
|
|
2802
|
+
];
|
|
2803
|
+
|
|
2741
2804
|
/** Garante que minLength <= maxLength quando ambos definidos. */
|
|
2742
2805
|
function minLenLeMaxLen(group) {
|
|
2743
2806
|
const v = group.value || {};
|
|
@@ -2802,6 +2865,7 @@ class FieldMetadataEditorComponent {
|
|
|
2802
2865
|
{ value: FieldControlType.TRANSFER_LIST, label: 'Transferência de itens' },
|
|
2803
2866
|
{ value: FieldControlType.CPF_CNPJ_INPUT, label: 'CPF/CNPJ' },
|
|
2804
2867
|
{ value: FieldControlType.FILE_UPLOAD, label: 'Upload de Arquivo' },
|
|
2868
|
+
{ value: FieldControlType.AVATAR, label: 'Avatar' },
|
|
2805
2869
|
];
|
|
2806
2870
|
// Settings Panel integration (contract: isDirty$, isValid$, isBusy$)
|
|
2807
2871
|
isDirty$ = new BehaviorSubject(false);
|
|
@@ -2998,6 +3062,10 @@ class FieldMetadataEditorComponent {
|
|
|
2998
3062
|
this.registry.register(this.controlType, yearInputProperties);
|
|
2999
3063
|
props = yearInputProperties;
|
|
3000
3064
|
}
|
|
3065
|
+
else if (this.controlType === FieldControlType.AVATAR) {
|
|
3066
|
+
this.registry.register(this.controlType, avatarProperties);
|
|
3067
|
+
props = avatarProperties;
|
|
3068
|
+
}
|
|
3001
3069
|
else if (this.controlType === FieldControlType.TREE_SELECT ||
|
|
3002
3070
|
this.controlType === FieldControlType.MULTI_SELECT_TREE) {
|
|
3003
3071
|
this.registry.register(this.controlType, treeSelectProperties);
|