@praxisui/metadata-editor 9.0.62 → 9.0.63
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.
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": "1.0.0",
|
|
3
|
-
"generatedAt": "2026-09-
|
|
3
|
+
"generatedAt": "2026-09-05T19:46:18.619Z",
|
|
4
4
|
"packageName": "@praxisui/metadata-editor",
|
|
5
|
-
"packageVersion": "9.0.
|
|
5
|
+
"packageVersion": "9.0.63",
|
|
6
6
|
"sourceRegistry": "praxis-component-registry-ingestion",
|
|
7
7
|
"sourceRegistryVersion": "1.0.0",
|
|
8
8
|
"componentCount": 1,
|
|
@@ -442,6 +442,25 @@ const METADATA_EDITOR_EN_US = {
|
|
|
442
442
|
'praxis.metadataEditor.fieldResource.hint': 'Select from the host governed catalog. The saved value remains resourcePath.',
|
|
443
443
|
'praxis.metadataEditor.common.help': 'Help',
|
|
444
444
|
'praxis.metadataEditor.common.iconMaterialSymbolsHint': 'Use the icon name (Material Symbols)',
|
|
445
|
+
'praxis.metadataEditor.cpfCnpj.group': 'Brazilian document',
|
|
446
|
+
'praxis.metadataEditor.cpfCnpj.documentType.label': 'Document type',
|
|
447
|
+
'praxis.metadataEditor.cpfCnpj.documentType.hint': 'Defines whether the field accepts CPF, CNPJ, or detects the document from its content.',
|
|
448
|
+
'praxis.metadataEditor.cpfCnpj.documentType.option.auto': 'Automatic',
|
|
449
|
+
'praxis.metadataEditor.cpfCnpj.documentType.option.cpf': 'CPF',
|
|
450
|
+
'praxis.metadataEditor.cpfCnpj.documentType.option.cnpj': 'CNPJ',
|
|
451
|
+
'praxis.metadataEditor.cpfCnpj.version.label': 'Document format',
|
|
452
|
+
'praxis.metadataEditor.cpfCnpj.version.hint': 'Use legacy for numeric documents or alphanumeric when CNPJ may contain letters.',
|
|
453
|
+
'praxis.metadataEditor.cpfCnpj.version.option.auto': 'Detect automatically',
|
|
454
|
+
'praxis.metadataEditor.cpfCnpj.version.option.legacy': 'Legacy (numeric)',
|
|
455
|
+
'praxis.metadataEditor.cpfCnpj.version.option.alpha': 'Alphanumeric',
|
|
456
|
+
'praxis.metadataEditor.cpfCnpj.mask.label': 'Display mask',
|
|
457
|
+
'praxis.metadataEditor.cpfCnpj.mask.hint': 'Optional. Use 0 for digits and X for alphanumeric characters; empty uses the selected type default.',
|
|
458
|
+
'praxis.metadataEditor.cpfCnpj.allowFormattedInput.label': 'Format while typing',
|
|
459
|
+
'praxis.metadataEditor.cpfCnpj.allowFormattedInput.hint': 'Displays the mask while the user types. Disable it to show only canonical characters; pasted values are still sanitized.',
|
|
460
|
+
'praxis.metadataEditor.cpfCnpj.unmaskOnSubmit.label': 'Submit without mask',
|
|
461
|
+
'praxis.metadataEditor.cpfCnpj.unmaskOnSubmit.hint': 'Keeps punctuation only in the display and submits the canonical unmasked value.',
|
|
462
|
+
'praxis.metadataEditor.cpfCnpj.validator.label': 'Validate check digits',
|
|
463
|
+
'praxis.metadataEditor.cpfCnpj.validator.hint': 'Enable for complete documents. Partial-search filters should normally keep this option off.',
|
|
445
464
|
'praxis.metadataEditor.priceRange.discrete.label': 'Show value while adjusting',
|
|
446
465
|
'praxis.metadataEditor.priceRange.discrete.hint': 'Shows the monetary value next to the thumb while it is adjusted.',
|
|
447
466
|
'praxis.metadataEditor.inlineRating.gradient.group': 'Star gradient',
|
|
@@ -661,6 +680,25 @@ const METADATA_EDITOR_PT_BR = {
|
|
|
661
680
|
'praxis.metadataEditor.fieldResource.hint': 'Selecione no cat\u00e1logo governado do host. O valor gravado continua sendo resourcePath.',
|
|
662
681
|
'praxis.metadataEditor.common.help': 'Ajuda',
|
|
663
682
|
'praxis.metadataEditor.common.iconMaterialSymbolsHint': 'Use o nome do \u00edcone (Material Symbols)',
|
|
683
|
+
'praxis.metadataEditor.cpfCnpj.group': 'Documento brasileiro',
|
|
684
|
+
'praxis.metadataEditor.cpfCnpj.documentType.label': 'Tipo de documento',
|
|
685
|
+
'praxis.metadataEditor.cpfCnpj.documentType.hint': 'Define se o campo aceita CPF, CNPJ ou detecta o documento pelo conte\u00fado.',
|
|
686
|
+
'praxis.metadataEditor.cpfCnpj.documentType.option.auto': 'Autom\u00e1tico',
|
|
687
|
+
'praxis.metadataEditor.cpfCnpj.documentType.option.cpf': 'CPF',
|
|
688
|
+
'praxis.metadataEditor.cpfCnpj.documentType.option.cnpj': 'CNPJ',
|
|
689
|
+
'praxis.metadataEditor.cpfCnpj.version.label': 'Formato do documento',
|
|
690
|
+
'praxis.metadataEditor.cpfCnpj.version.hint': 'Use legado para documentos num\u00e9ricos ou alfanum\u00e9rico quando o CNPJ puder conter letras.',
|
|
691
|
+
'praxis.metadataEditor.cpfCnpj.version.option.auto': 'Detectar automaticamente',
|
|
692
|
+
'praxis.metadataEditor.cpfCnpj.version.option.legacy': 'Legado (num\u00e9rico)',
|
|
693
|
+
'praxis.metadataEditor.cpfCnpj.version.option.alpha': 'Alfanum\u00e9rico',
|
|
694
|
+
'praxis.metadataEditor.cpfCnpj.mask.label': 'M\u00e1scara de exibi\u00e7\u00e3o',
|
|
695
|
+
'praxis.metadataEditor.cpfCnpj.mask.hint': 'Opcional. Use 0 para d\u00edgitos e X para caracteres alfanum\u00e9ricos; vazio usa o padr\u00e3o do tipo escolhido.',
|
|
696
|
+
'praxis.metadataEditor.cpfCnpj.allowFormattedInput.label': 'Formatar durante a digita\u00e7\u00e3o',
|
|
697
|
+
'praxis.metadataEditor.cpfCnpj.allowFormattedInput.hint': 'Exibe a m\u00e1scara enquanto o usu\u00e1rio digita. Desative para mostrar somente os caracteres can\u00f4nicos; valores colados continuam sendo sanitizados.',
|
|
698
|
+
'praxis.metadataEditor.cpfCnpj.unmaskOnSubmit.label': 'Enviar sem m\u00e1scara',
|
|
699
|
+
'praxis.metadataEditor.cpfCnpj.unmaskOnSubmit.hint': 'Mant\u00e9m a pontua\u00e7\u00e3o apenas na exibi\u00e7\u00e3o e envia o valor can\u00f4nico sem m\u00e1scara.',
|
|
700
|
+
'praxis.metadataEditor.cpfCnpj.validator.label': 'Validar d\u00edgitos verificadores',
|
|
701
|
+
'praxis.metadataEditor.cpfCnpj.validator.hint': 'Ative para documentos completos. Filtros de busca parcial normalmente devem manter esta op\u00e7\u00e3o desligada.',
|
|
664
702
|
'praxis.metadataEditor.priceRange.discrete.label': 'Exibir valor ao ajustar',
|
|
665
703
|
'praxis.metadataEditor.priceRange.discrete.hint': 'Mostra o valor monet\u00e1rio junto ao manipulador durante o ajuste.',
|
|
666
704
|
'praxis.metadataEditor.inlineRating.gradient.group': 'Gradiente das estrelas',
|
|
@@ -2342,7 +2380,6 @@ class DynamicEditorRendererComponent {
|
|
|
2342
2380
|
return (editorType === 'text' ||
|
|
2343
2381
|
editorType === 'number' ||
|
|
2344
2382
|
editorType === 'textarea' ||
|
|
2345
|
-
editorType === 'select' ||
|
|
2346
2383
|
editorType === 'date' ||
|
|
2347
2384
|
editorType === 'datetime-local' ||
|
|
2348
2385
|
editorType === 'color' ||
|
|
@@ -7524,6 +7561,85 @@ const priceRangeProperties = [
|
|
|
7524
7561
|
{ name: 'ariaLabelledby', label: 'ARIA labelledby', editorType: 'text', group: 'Acessibilidade', hint: 'ID do elemento que rotula. Ex.: "label-id".' },
|
|
7525
7562
|
];
|
|
7526
7563
|
|
|
7564
|
+
const cpfCnpjDocumentProperties = [
|
|
7565
|
+
{
|
|
7566
|
+
name: 'documentType',
|
|
7567
|
+
label: 'Tipo de documento',
|
|
7568
|
+
labelKey: 'cpfCnpj.documentType.label',
|
|
7569
|
+
editorType: 'select',
|
|
7570
|
+
group: 'Documento brasileiro',
|
|
7571
|
+
groupKey: 'cpfCnpj.group',
|
|
7572
|
+
hint: 'Define se o campo aceita CPF, CNPJ ou detecta o documento pelo conteúdo.',
|
|
7573
|
+
hintKey: 'cpfCnpj.documentType.hint',
|
|
7574
|
+
defaultValue: 'auto',
|
|
7575
|
+
options: [
|
|
7576
|
+
{ value: 'auto', text: 'Automático', textKey: 'cpfCnpj.documentType.option.auto' },
|
|
7577
|
+
{ value: 'cpf', text: 'CPF', textKey: 'cpfCnpj.documentType.option.cpf' },
|
|
7578
|
+
{ value: 'cnpj', text: 'CNPJ', textKey: 'cpfCnpj.documentType.option.cnpj' },
|
|
7579
|
+
],
|
|
7580
|
+
},
|
|
7581
|
+
{
|
|
7582
|
+
name: 'version',
|
|
7583
|
+
label: 'Formato do documento',
|
|
7584
|
+
labelKey: 'cpfCnpj.version.label',
|
|
7585
|
+
editorType: 'select',
|
|
7586
|
+
group: 'Documento brasileiro',
|
|
7587
|
+
groupKey: 'cpfCnpj.group',
|
|
7588
|
+
hint: 'Use legado para documentos numéricos ou alfa quando o CNPJ puder conter letras.',
|
|
7589
|
+
hintKey: 'cpfCnpj.version.hint',
|
|
7590
|
+
defaultValue: 'auto',
|
|
7591
|
+
options: [
|
|
7592
|
+
{ value: 'auto', text: 'Detectar automaticamente', textKey: 'cpfCnpj.version.option.auto' },
|
|
7593
|
+
{ value: 'legacy', text: 'Legado (numérico)', textKey: 'cpfCnpj.version.option.legacy' },
|
|
7594
|
+
{ value: 'alpha', text: 'Alfanumérico', textKey: 'cpfCnpj.version.option.alpha' },
|
|
7595
|
+
],
|
|
7596
|
+
},
|
|
7597
|
+
{
|
|
7598
|
+
name: 'mask',
|
|
7599
|
+
label: 'Máscara de exibição',
|
|
7600
|
+
labelKey: 'cpfCnpj.mask.label',
|
|
7601
|
+
editorType: 'text',
|
|
7602
|
+
group: 'Documento brasileiro',
|
|
7603
|
+
groupKey: 'cpfCnpj.group',
|
|
7604
|
+
hint: 'Opcional. Use 0 para dígitos e X para caracteres alfanuméricos; vazio usa o padrão do tipo escolhido.',
|
|
7605
|
+
hintKey: 'cpfCnpj.mask.hint',
|
|
7606
|
+
},
|
|
7607
|
+
];
|
|
7608
|
+
const cpfCnpjSubmissionProperties = [
|
|
7609
|
+
{
|
|
7610
|
+
name: 'allowFormattedInput',
|
|
7611
|
+
label: 'Formatar durante a digitação',
|
|
7612
|
+
labelKey: 'cpfCnpj.allowFormattedInput.label',
|
|
7613
|
+
editorType: 'checkbox',
|
|
7614
|
+
group: 'Documento brasileiro',
|
|
7615
|
+
groupKey: 'cpfCnpj.group',
|
|
7616
|
+
hint: 'Exibe a máscara enquanto o usuário digita. Desative para mostrar somente os caracteres canônicos; valores colados continuam sendo sanitizados.',
|
|
7617
|
+
hintKey: 'cpfCnpj.allowFormattedInput.hint',
|
|
7618
|
+
defaultValue: true,
|
|
7619
|
+
},
|
|
7620
|
+
{
|
|
7621
|
+
name: 'unmaskOnSubmit',
|
|
7622
|
+
label: 'Enviar sem máscara',
|
|
7623
|
+
labelKey: 'cpfCnpj.unmaskOnSubmit.label',
|
|
7624
|
+
editorType: 'checkbox',
|
|
7625
|
+
group: 'Documento brasileiro',
|
|
7626
|
+
groupKey: 'cpfCnpj.group',
|
|
7627
|
+
hint: 'Mantém a pontuação apenas na exibição e envia o valor canônico sem máscara.',
|
|
7628
|
+
hintKey: 'cpfCnpj.unmaskOnSubmit.hint',
|
|
7629
|
+
defaultValue: true,
|
|
7630
|
+
},
|
|
7631
|
+
];
|
|
7632
|
+
const cpfCnpjValidationProperties = [
|
|
7633
|
+
{
|
|
7634
|
+
name: 'validators.cpfCnpj',
|
|
7635
|
+
label: 'Validar dígitos verificadores',
|
|
7636
|
+
labelKey: 'cpfCnpj.validator.label',
|
|
7637
|
+
editorType: 'checkbox',
|
|
7638
|
+
group: 'Validação',
|
|
7639
|
+
hint: 'Ative para documentos completos. Filtros de busca parcial normalmente devem manter esta opção desligada.',
|
|
7640
|
+
hintKey: 'cpfCnpj.validator.hint',
|
|
7641
|
+
},
|
|
7642
|
+
];
|
|
7527
7643
|
const cpfCnpjProperties = [
|
|
7528
7644
|
// Geral
|
|
7529
7645
|
{ name: 'label', label: 'Label', editorType: 'text', group: 'Geral' },
|
|
@@ -7540,24 +7656,15 @@ const cpfCnpjProperties = [
|
|
|
7540
7656
|
// Dados/Opções
|
|
7541
7657
|
// (sem opções específicas)
|
|
7542
7658
|
// Formato/Comportamento
|
|
7543
|
-
|
|
7544
|
-
|
|
7545
|
-
{ value: 'cpf', text: 'CPF' },
|
|
7546
|
-
{ value: 'cnpj', text: 'CNPJ' },
|
|
7547
|
-
] },
|
|
7548
|
-
{ name: 'version', label: 'Versão (parsing)', editorType: 'select', group: 'Formato/Comportamento', options: [
|
|
7549
|
-
{ value: 'auto', text: 'Auto' },
|
|
7550
|
-
{ value: 'legacy', text: 'Legacy (numérico)' },
|
|
7551
|
-
{ value: 'alpha', text: 'Alpha (alfa-numérico para CNPJ)' },
|
|
7552
|
-
] },
|
|
7553
|
-
{ name: 'allowFormattedInput', label: 'Permitir entrada formatada', editorType: 'checkbox', group: 'Formato/Comportamento', hint: 'Aceita CPF/CNPJ com pontuação.' },
|
|
7554
|
-
{ name: 'unmaskOnSubmit', label: 'Enviar sem máscara (modelo)', editorType: 'checkbox', group: 'Formato/Comportamento', hint: 'Remove pontuação ao enviar.' },
|
|
7659
|
+
...cpfCnpjDocumentProperties,
|
|
7660
|
+
...cpfCnpjSubmissionProperties,
|
|
7555
7661
|
{ name: 'autocomplete', label: 'Autocomplete', editorType: 'text', group: 'Formato/Comportamento' },
|
|
7556
7662
|
{ name: 'readonly', label: 'Somente leitura', editorType: 'checkbox', group: 'Formato/Comportamento' },
|
|
7557
7663
|
{ name: 'disabled', label: 'Desabilitado', editorType: 'checkbox', group: 'Formato/Comportamento' },
|
|
7558
7664
|
{ name: 'autoFocus', label: 'Focar automaticamente', editorType: 'checkbox', group: 'Formato/Comportamento' },
|
|
7559
7665
|
// Validação
|
|
7560
7666
|
{ name: 'required', label: 'Obrigatório', editorType: 'checkbox', group: 'Validação' },
|
|
7667
|
+
...cpfCnpjValidationProperties,
|
|
7561
7668
|
{ name: 'validators.requiredMessage', label: 'Mensagem: obrigatório', editorType: 'text', group: 'Validação' },
|
|
7562
7669
|
{ name: 'validators.patternMessage', label: 'Mensagem: formato inválido', editorType: 'text', group: 'Validação' },
|
|
7563
7670
|
// Ações
|
|
@@ -9883,6 +9990,23 @@ const inlineScorePriorityProperties = [
|
|
|
9883
9990
|
},
|
|
9884
9991
|
];
|
|
9885
9992
|
|
|
9993
|
+
function mergeEditorProperties(base, contextual) {
|
|
9994
|
+
const overrides = new Map(contextual.map((property) => [property.name, property]));
|
|
9995
|
+
const merged = base.map((property) => overrides.get(property.name) ?? property);
|
|
9996
|
+
for (const property of contextual) {
|
|
9997
|
+
if (!base.some((candidate) => candidate.name === property.name)) {
|
|
9998
|
+
merged.push(property);
|
|
9999
|
+
}
|
|
10000
|
+
}
|
|
10001
|
+
return merged;
|
|
10002
|
+
}
|
|
10003
|
+
function hasCanonicalDocumentSemantics(metadata) {
|
|
10004
|
+
if (!metadata || typeof metadata !== 'object' || Array.isArray(metadata)) {
|
|
10005
|
+
return false;
|
|
10006
|
+
}
|
|
10007
|
+
const documentType = String(metadata['documentType'] ?? '').toLowerCase();
|
|
10008
|
+
return documentType === 'cpf' || documentType === 'cnpj' || documentType === 'auto';
|
|
10009
|
+
}
|
|
9886
10010
|
const INLINE_FILTER_EDITOR_PROPERTIES_BY_CONTROL_TYPE = Object.freeze({
|
|
9887
10011
|
[INLINE_FILTER_CONTROL_TYPES.SELECT]: selectProperties,
|
|
9888
10012
|
[INLINE_FILTER_CONTROL_TYPES.SEARCHABLE_SELECT]: selectProperties,
|
|
@@ -9913,11 +10037,16 @@ const INLINE_FILTER_EDITOR_PROPERTIES_BY_CONTROL_TYPE = Object.freeze({
|
|
|
9913
10037
|
[INLINE_FILTER_CONTROL_TYPES.SENTIMENT]: inlineSentimentProperties,
|
|
9914
10038
|
[INLINE_FILTER_CONTROL_TYPES.COLOR_LABEL]: inlineColorLabelProperties,
|
|
9915
10039
|
});
|
|
9916
|
-
function resolveInlineFilterEditorProperties(controlType) {
|
|
10040
|
+
function resolveInlineFilterEditorProperties(controlType, metadata) {
|
|
9917
10041
|
const inlineType = resolveInlineFilterControlType(controlType);
|
|
9918
10042
|
if (!inlineType)
|
|
9919
10043
|
return undefined;
|
|
9920
|
-
|
|
10044
|
+
const properties = INLINE_FILTER_EDITOR_PROPERTIES_BY_CONTROL_TYPE[inlineType];
|
|
10045
|
+
if (inlineType === INLINE_FILTER_CONTROL_TYPES.INPUT &&
|
|
10046
|
+
hasCanonicalDocumentSemantics(metadata)) {
|
|
10047
|
+
return mergeEditorProperties(properties, cpfCnpjDocumentProperties);
|
|
10048
|
+
}
|
|
10049
|
+
return properties;
|
|
9921
10050
|
}
|
|
9922
10051
|
|
|
9923
10052
|
class FieldMetadataEditorComponent {
|
|
@@ -10034,7 +10163,7 @@ class FieldMetadataEditorComponent {
|
|
|
10034
10163
|
this.rebuildEditorForType(this.controlType);
|
|
10035
10164
|
}
|
|
10036
10165
|
resolveCanonicalEditorProperties(controlType, controlTypeToken) {
|
|
10037
|
-
const inlineProps = resolveInlineFilterEditorProperties(controlTypeToken);
|
|
10166
|
+
const inlineProps = resolveInlineFilterEditorProperties(controlTypeToken, this.seed);
|
|
10038
10167
|
if (inlineProps?.length)
|
|
10039
10168
|
return inlineProps;
|
|
10040
10169
|
if (controlType === FieldControlType.INPUT)
|
|
@@ -10132,13 +10261,20 @@ class FieldMetadataEditorComponent {
|
|
|
10132
10261
|
const controlTypeToken = normalizeControlTypeToken(this.controlType);
|
|
10133
10262
|
const canonicalProps = this.resolveCanonicalEditorProperties(this.controlType, controlTypeToken);
|
|
10134
10263
|
if (canonicalProps?.length) {
|
|
10135
|
-
const
|
|
10136
|
-
const
|
|
10137
|
-
|
|
10138
|
-
if (hasInlineConfigDrift) {
|
|
10139
|
-
this.registry.register(this.controlType, canonicalProps);
|
|
10264
|
+
const staticInlineProps = resolveInlineFilterEditorProperties(controlTypeToken);
|
|
10265
|
+
const isContextualInlineEditor = !!staticInlineProps && canonicalProps !== staticInlineProps;
|
|
10266
|
+
if (isContextualInlineEditor) {
|
|
10140
10267
|
props = canonicalProps;
|
|
10141
10268
|
}
|
|
10269
|
+
else {
|
|
10270
|
+
const currentPropNames = new Set(props.map((prop) => prop.name));
|
|
10271
|
+
const hasInlineConfigDrift = !props.length ||
|
|
10272
|
+
canonicalProps.some((inlineProp) => !currentPropNames.has(inlineProp.name));
|
|
10273
|
+
if (hasInlineConfigDrift) {
|
|
10274
|
+
this.registry.register(this.controlType, canonicalProps);
|
|
10275
|
+
props = canonicalProps;
|
|
10276
|
+
}
|
|
10277
|
+
}
|
|
10142
10278
|
}
|
|
10143
10279
|
try {
|
|
10144
10280
|
(console.log || console.debug)('[FieldMetadataEditor] init', {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@praxisui/metadata-editor",
|
|
3
|
-
"version": "9.0.
|
|
3
|
+
"version": "9.0.63",
|
|
4
4
|
"description": "Metadata editor for Praxis UI fields and components with runtime integration.",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@angular/common": "^21.0.0",
|
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
"@angular/cdk": "^21.0.0",
|
|
9
9
|
"@angular/forms": "^21.0.0",
|
|
10
10
|
"@angular/material": "^21.0.0",
|
|
11
|
-
"@praxisui/ai": "^9.0.
|
|
12
|
-
"@praxisui/core": "^9.0.
|
|
13
|
-
"@praxisui/dynamic-fields": "^9.0.
|
|
14
|
-
"@praxisui/settings-panel": "^9.0.
|
|
11
|
+
"@praxisui/ai": "^9.0.63",
|
|
12
|
+
"@praxisui/core": "^9.0.63",
|
|
13
|
+
"@praxisui/dynamic-fields": "^9.0.63",
|
|
14
|
+
"@praxisui/settings-panel": "^9.0.63",
|
|
15
15
|
"rxjs": "~7.8.0"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|