@praxisui/core 1.0.0-beta.16 → 1.0.0-beta.19
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/fesm2022/praxisui-core.mjs +28 -1
- package/fesm2022/praxisui-core.mjs.map +1 -1
- package/index.d.ts +24 -2
- package/package.json +1 -1
|
@@ -4131,6 +4131,13 @@ function normalizeFormConfig(config) {
|
|
|
4131
4131
|
return config;
|
|
4132
4132
|
const normalized = { ...config };
|
|
4133
4133
|
normalized.fieldMetadata = normalizeFormMetadata(config.fieldMetadata);
|
|
4134
|
+
// Ensure hints exist and fill missing values with defaults
|
|
4135
|
+
try {
|
|
4136
|
+
const defaults = getDefaultFormHints();
|
|
4137
|
+
const current = normalized.hints;
|
|
4138
|
+
normalized.hints = fillUndefined(current || {}, defaults);
|
|
4139
|
+
}
|
|
4140
|
+
catch { }
|
|
4134
4141
|
return normalized;
|
|
4135
4142
|
}
|
|
4136
4143
|
/**
|
|
@@ -4262,6 +4269,8 @@ function createDefaultFormConfig() {
|
|
|
4262
4269
|
],
|
|
4263
4270
|
},
|
|
4264
4271
|
],
|
|
4272
|
+
// Default mode hints (didactic tooltips)
|
|
4273
|
+
hints: getDefaultFormHints(),
|
|
4265
4274
|
};
|
|
4266
4275
|
return ensureIds(config);
|
|
4267
4276
|
}
|
|
@@ -4274,6 +4283,24 @@ function isValidFormConfig(config) {
|
|
|
4274
4283
|
function createEmptyFormConfig() {
|
|
4275
4284
|
return { sections: [] };
|
|
4276
4285
|
}
|
|
4286
|
+
/**
|
|
4287
|
+
* Default hint texts for data and UI modes.
|
|
4288
|
+
*/
|
|
4289
|
+
function getDefaultFormHints() {
|
|
4290
|
+
return {
|
|
4291
|
+
dataModes: {
|
|
4292
|
+
create: 'Criar novo registro. Campos editáveis e ações de salvar habilitadas.',
|
|
4293
|
+
edit: 'Editar registro existente. Campos editáveis e ações de salvar habilitadas.',
|
|
4294
|
+
view: 'Visualizar registro. Sem edição por padrão; combine com Modo Leitura ou Apresentação.',
|
|
4295
|
+
},
|
|
4296
|
+
uiModes: {
|
|
4297
|
+
presentation: 'Modo apresentação: exibe rótulo + valor formatado e oculta inputs/ações. Efetivo apenas em Visualizar.',
|
|
4298
|
+
readonly: 'Modo leitura: mantém os inputs visíveis, porém bloqueados (sem interação). Continua participando da validação e do envio.',
|
|
4299
|
+
disabled: 'Desabilitado: aparência inativa; ideal para bloquear interação visualmente. Evite desativar campos essenciais.',
|
|
4300
|
+
visible: 'Visibilidade: controla exibição sem destruir controles (útil para regras condicionais).',
|
|
4301
|
+
},
|
|
4302
|
+
};
|
|
4303
|
+
}
|
|
4277
4304
|
/**
|
|
4278
4305
|
* Merges field metadata into a FormConfig
|
|
4279
4306
|
* Useful when combining layout with server-loaded metadata
|
|
@@ -7069,5 +7096,5 @@ function provideHookWhitelist(allowed) {
|
|
|
7069
7096
|
* Generated bundle index. Do not edit.
|
|
7070
7097
|
*/
|
|
7071
7098
|
|
|
7072
|
-
export { API_URL, AllowedFileTypes, ApiEndpoint, CONFIG_STORAGE, CONNECTION_STORAGE, ComponentMetadataRegistry, ConnectionManagerService, DEFAULT_TABLE_CONFIG, DynamicFormService, DynamicGridPageComponent, DynamicWidgetLoaderDirective, DynamicWidgetPageComponent, EmptyStateCardComponent, ErrorMessageService, FORM_HOOKS, FORM_HOOKS_PRESETS, FORM_HOOKS_WHITELIST, FORM_HOOK_RESOLVERS, FieldControlType, FieldDataType, FormHooksRegistry, GLOBAL_CONFIG, GenericCrudService, GlobalConfigService, IconPickerService, IconPosition, IconSize, LocalConnectionStorage, LocalStorageCacheAdapter, LocalStorageConfigService, NumericFormat, OVERLAY_DECIDER_DEBUG, OVERLAY_DECISION_MATRIX, OverlayDeciderService, PraxisCore, PraxisIconDirective, PraxisIconPickerComponent, ResourceQuickConnectComponent, SCHEMA_VIEWER_CONTEXT, SETTINGS_PANEL_BRIDGE, SETTINGS_PANEL_DATA, STEPPER_CONFIG_EDITOR, SchemaMetadataClient, SchemaNormalizerService, SchemaViewerComponent, TABLE_CONFIG_EDITOR, TableConfigService, TelemetryService, ValidationPattern, applyLocalCustomizations$2 as applyLocalCustomizations, applyLocalCustomizations$1 as applyLocalFormCustomizations, buildAngularValidators, buildApiUrl, buildBaseColumnFromDef, buildBaseFormField, buildHeaders, buildPageKey, buildSchemaId, buildValidatorsFromValidatorOptions, cancelIfCpfInvalidHook, cloneTableConfig, cnpjAlphaValidator, collapseWhitespace, composeHeadersWithVersion, conditionalAsyncValidator, convertFormLayoutToConfig, createCpfCnpjValidator, createDefaultFormConfig, createDefaultTableConfig, createEmptyFormConfig, createPersistedPage, customAsyncValidatorFn, customValidatorFn, debounceAsyncValidator, deepMerge, ensureIds, ensureNoConflictsHookFactory, ensurePageIds, fetchWithETag, fileTypeValidator, fillUndefined, generateId, getEssentialConfig, getReferencedFieldMetadata, getTextTransformer, isCssTextTransform, isTableConfigV2, isValidFormConfig, isValidTableConfig, legacyCnpjValidator, legacyCpfValidator, logOnErrorHook, mapFieldDefinitionToMetadata, mapFieldDefinitionsToMetadata, matchFieldValidator, maxFileSizeValidator, mergeFieldMetadata, mergeTableConfigs, minWordsValidator, normalizeFieldConstraints, normalizeFormConfig, normalizeFormMetadata, normalizePath, notifySuccessHook, prefillFromContextHook, provideDefaultFormHooks, provideFormHookPresets, provideFormHooks, provideGlobalConfig, provideGlobalConfigSeed, provideGlobalConfigTenant, provideHookResolvers, provideHookWhitelist, provideOverlayDecisionMatrix, provideRemoteGlobalConfig, reconcileFilterConfig, reconcileFormConfig, reconcileTableConfig, removeDiacritics, reportTelemetryHookFactory, requiredCheckedValidator, resolveHidden, resolveOffset, resolveOrder, resolveSpan, slugify, stripMasksHook, syncWithServerMetadata, toCamel, toCapitalize, toKebab, toPascal, toSentenceCase, toSnake, toTitleCase, trim, uniqueAsyncValidator, urlValidator, withMessage };
|
|
7099
|
+
export { API_URL, AllowedFileTypes, ApiEndpoint, CONFIG_STORAGE, CONNECTION_STORAGE, ComponentMetadataRegistry, ConnectionManagerService, DEFAULT_TABLE_CONFIG, DynamicFormService, DynamicGridPageComponent, DynamicWidgetLoaderDirective, DynamicWidgetPageComponent, EmptyStateCardComponent, ErrorMessageService, FORM_HOOKS, FORM_HOOKS_PRESETS, FORM_HOOKS_WHITELIST, FORM_HOOK_RESOLVERS, FieldControlType, FieldDataType, FormHooksRegistry, GLOBAL_CONFIG, GenericCrudService, GlobalConfigService, IconPickerService, IconPosition, IconSize, LocalConnectionStorage, LocalStorageCacheAdapter, LocalStorageConfigService, NumericFormat, OVERLAY_DECIDER_DEBUG, OVERLAY_DECISION_MATRIX, OverlayDeciderService, PraxisCore, PraxisIconDirective, PraxisIconPickerComponent, ResourceQuickConnectComponent, SCHEMA_VIEWER_CONTEXT, SETTINGS_PANEL_BRIDGE, SETTINGS_PANEL_DATA, STEPPER_CONFIG_EDITOR, SchemaMetadataClient, SchemaNormalizerService, SchemaViewerComponent, TABLE_CONFIG_EDITOR, TableConfigService, TelemetryService, ValidationPattern, applyLocalCustomizations$2 as applyLocalCustomizations, applyLocalCustomizations$1 as applyLocalFormCustomizations, buildAngularValidators, buildApiUrl, buildBaseColumnFromDef, buildBaseFormField, buildHeaders, buildPageKey, buildSchemaId, buildValidatorsFromValidatorOptions, cancelIfCpfInvalidHook, cloneTableConfig, cnpjAlphaValidator, collapseWhitespace, composeHeadersWithVersion, conditionalAsyncValidator, convertFormLayoutToConfig, createCpfCnpjValidator, createDefaultFormConfig, createDefaultTableConfig, createEmptyFormConfig, createPersistedPage, customAsyncValidatorFn, customValidatorFn, debounceAsyncValidator, deepMerge, ensureIds, ensureNoConflictsHookFactory, ensurePageIds, fetchWithETag, fileTypeValidator, fillUndefined, generateId, getDefaultFormHints, getEssentialConfig, getReferencedFieldMetadata, getTextTransformer, isCssTextTransform, isTableConfigV2, isValidFormConfig, isValidTableConfig, legacyCnpjValidator, legacyCpfValidator, logOnErrorHook, mapFieldDefinitionToMetadata, mapFieldDefinitionsToMetadata, matchFieldValidator, maxFileSizeValidator, mergeFieldMetadata, mergeTableConfigs, minWordsValidator, normalizeFieldConstraints, normalizeFormConfig, normalizeFormMetadata, normalizePath, notifySuccessHook, prefillFromContextHook, provideDefaultFormHooks, provideFormHookPresets, provideFormHooks, provideGlobalConfig, provideGlobalConfigSeed, provideGlobalConfigTenant, provideHookResolvers, provideHookWhitelist, provideOverlayDecisionMatrix, provideRemoteGlobalConfig, reconcileFilterConfig, reconcileFormConfig, reconcileTableConfig, removeDiacritics, reportTelemetryHookFactory, requiredCheckedValidator, resolveHidden, resolveOffset, resolveOrder, resolveSpan, slugify, stripMasksHook, syncWithServerMetadata, toCamel, toCapitalize, toKebab, toPascal, toSentenceCase, toSnake, toTitleCase, trim, uniqueAsyncValidator, urlValidator, withMessage };
|
|
7073
7100
|
//# sourceMappingURL=praxisui-core.mjs.map
|