@praxisui/core 4.0.0-beta.0 → 5.0.0-beta.0

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/index.d.ts CHANGED
@@ -91,6 +91,35 @@ interface OptionSourceMetadata {
91
91
  includeIds?: boolean;
92
92
  }
93
93
 
94
+ type RuleContextRoot = 'form' | 'row' | 'computed' | 'meta' | 'source' | 'event' | 'payload' | 'state' | 'context';
95
+ type PraxisNativeJsonLogicOperator = 'var' | '==' | '===' | '!=' | '!==' | '>' | '>=' | '<' | '<=' | '!' | '!!' | 'and' | 'or' | 'if' | 'in' | 'cat' | 'substr' | '+' | '-' | '*' | '/' | '%' | 'min' | 'max' | 'merge' | 'map' | 'filter' | 'reduce' | 'all' | 'some' | 'none';
96
+ type PraxisCustomRuleOperator = 'contains' | 'startsWith' | 'endsWith' | 'matches' | 'isBlank' | 'len' | 'round' | 'ceil' | 'floor' | 'abs' | 'coalesce' | 'now' | 'date' | 'yearsSince' | 'monthsSince' | 'daysSince' | 'toNumber' | 'stringify' | 'jsonGet' | 'hasKey' | 'isToday' | 'inLast' | 'weekdayIn';
97
+ type PraxisRuleOperator = PraxisNativeJsonLogicOperator | PraxisCustomRuleOperator;
98
+ type JsonLogicPrimitive = string | number | boolean | null;
99
+ interface JsonLogicArray extends Array<JsonLogicValue> {
100
+ }
101
+ interface JsonLogicRecord {
102
+ [key: string]: JsonLogicValue;
103
+ }
104
+ type JsonLogicVarReference = string | [path: string] | [path: string, defaultValue: JsonLogicValue];
105
+ interface JsonLogicVarExpression {
106
+ var: JsonLogicVarReference;
107
+ }
108
+ type JsonLogicArguments = JsonLogicValue | JsonLogicArray;
109
+ interface JsonLogicOperationExpression extends Partial<Record<Exclude<PraxisRuleOperator, 'var'>, JsonLogicArguments>> {
110
+ }
111
+ type JsonLogicExpression = JsonLogicPrimitive | JsonLogicVarExpression | JsonLogicOperationExpression;
112
+ type JsonLogicDerivedValueExpression = Exclude<JsonLogicExpression, string>;
113
+ type JsonLogicValue = JsonLogicPrimitive | JsonLogicExpression | JsonLogicArray | JsonLogicRecord;
114
+ interface PraxisRuleContextDescriptor {
115
+ roots: RuleContextRoot[];
116
+ defaultRoot?: RuleContextRoot | null;
117
+ allowImplicitRoot?: boolean;
118
+ }
119
+ interface PraxisConditionalRule<TExpression = JsonLogicExpression | null> {
120
+ condition: TExpression;
121
+ }
122
+
94
123
  /**
95
124
  * Nova arquitetura modular do TableConfig v2.0
96
125
  * Preparada para crescimento exponencial e alinhada com as 5 abas do editor
@@ -133,7 +162,7 @@ interface ColumnDefinition {
133
162
  /** Coluna calculada baseada em expressão */
134
163
  computed?: {
135
164
  /** Expressão segura baseada em campos da linha */
136
- expression: string;
165
+ expression: JsonLogicDerivedValueExpression;
137
166
  /** Tipo do valor calculado para formatação */
138
167
  outputType?: ColumnDefinition['type'];
139
168
  /** Formato opcional do valor calculado */
@@ -221,7 +250,7 @@ interface ColumnDefinition {
221
250
  variant?: 'filled' | 'outlined' | 'text';
222
251
  size?: 'sm' | 'md' | 'lg';
223
252
  ariaLabel?: string;
224
- disabledCondition?: string;
253
+ disabledCondition?: JsonLogicExpression | null;
225
254
  action?: {
226
255
  id: string;
227
256
  payloadExpr?: string;
@@ -263,7 +292,7 @@ interface ColumnDefinition {
263
292
  /** Alternância (toggle) com ação */
264
293
  toggle?: {
265
294
  stateExpr: string;
266
- disabledCondition?: string;
295
+ disabledCondition?: JsonLogicExpression | null;
267
296
  action?: {
268
297
  id: string;
269
298
  payloadExpr?: string;
@@ -271,7 +300,7 @@ interface ColumnDefinition {
271
300
  ariaLabel?: string;
272
301
  };
273
302
  /** Menu de ações
274
- * itemsExpr → Array<{ label: string; icon?: string; id: string; payloadExpr?: string; visibleCondition?: string }> */
303
+ * itemsExpr → Array<{ label: string; icon?: string; id: string; payloadExpr?: string; visibleCondition?: JsonLogicExpression | null }> */
275
304
  menu?: {
276
305
  itemsExpr: string;
277
306
  ariaLabel?: string;
@@ -334,7 +363,7 @@ interface ColumnDefinition {
334
363
  color?: string;
335
364
  variant?: 'filled' | 'outlined' | 'text';
336
365
  size?: 'sm' | 'md' | 'lg';
337
- disabledCondition?: string;
366
+ disabledCondition?: JsonLogicExpression | null;
338
367
  action?: {
339
368
  id: string;
340
369
  payloadExpr?: string;
@@ -371,7 +400,7 @@ interface ColumnDefinition {
371
400
  type: 'toggle';
372
401
  toggle?: {
373
402
  stateExpr: string;
374
- disabledCondition?: string;
403
+ disabledCondition?: JsonLogicExpression | null;
375
404
  action?: {
376
405
  id: string;
377
406
  payloadExpr?: string;
@@ -412,17 +441,17 @@ interface ColumnDefinition {
412
441
  };
413
442
  /** Overrides condicionais do renderer por linha (first‑match wins) */
414
443
  conditionalRenderers?: Array<{
415
- condition: string;
444
+ condition: JsonLogicExpression | null;
416
445
  renderer: Partial<ColumnDefinition['renderer']>;
417
446
  description?: string;
418
447
  enabled?: boolean;
419
448
  }>;
420
449
  /**
421
450
  * Regras de estilo condicionais por coluna (experimental)
422
- * Cada regra contém uma expressão/DSL em `condition` e o efeito visual a aplicar.
451
+ * Cada regra contém uma expressão canônica em `condition` e o efeito visual a aplicar.
423
452
  */
424
453
  conditionalStyles?: Array<{
425
- condition: string;
454
+ condition: JsonLogicExpression | null;
426
455
  cssClass?: string;
427
456
  style?: {
428
457
  [key: string]: string;
@@ -550,7 +579,7 @@ interface TableExpansionConfig {
550
579
  };
551
580
  /** Condição para permitir expansão por linha */
552
581
  rowExpandableWhen?: {
553
- expr?: string;
582
+ expr?: JsonLogicExpression | null;
554
583
  onError?: 'deny' | 'allow';
555
584
  context?: Array<'row' | 'computed' | 'user' | 'env'>;
556
585
  };
@@ -1145,7 +1174,7 @@ interface ToolbarAction {
1145
1174
  /** Ordem de exibição */
1146
1175
  order?: number;
1147
1176
  /** Visibilidade condicional */
1148
- visibleWhen?: string;
1177
+ visibleWhen?: JsonLogicExpression | null;
1149
1178
  /** Sub-ações (para menus) */
1150
1179
  children?: ToolbarAction[];
1151
1180
  }
@@ -1249,7 +1278,7 @@ interface RowAction {
1249
1278
  /** Requer confirmação */
1250
1279
  requiresConfirmation?: boolean;
1251
1280
  /** Visibilidade condicional */
1252
- visibleWhen?: string;
1281
+ visibleWhen?: JsonLogicExpression | null;
1253
1282
  /** Separador após esta ação */
1254
1283
  separator?: boolean;
1255
1284
  /** Habilita exclusão automática ao acionar */
@@ -1313,7 +1342,7 @@ interface ContextAction {
1313
1342
  /** Separador após esta ação */
1314
1343
  separator?: boolean;
1315
1344
  /** Visibilidade condicional */
1316
- visibleWhen?: string;
1345
+ visibleWhen?: JsonLogicExpression | null;
1317
1346
  }
1318
1347
  interface ConfirmationConfig {
1319
1348
  /** Configurações padrão de confirmação */
@@ -1871,7 +1900,7 @@ interface TableConfigV2 {
1871
1900
  * Regras de estilo condicionais aplicadas à linha inteira (escopo global)
1872
1901
  */
1873
1902
  rowConditionalStyles?: Array<{
1874
- condition: string;
1903
+ condition: JsonLogicExpression | null;
1875
1904
  cssClass?: string;
1876
1905
  style?: {
1877
1906
  [key: string]: string;
@@ -1912,2188 +1941,2188 @@ interface ResolvedValuePresentation {
1912
1941
  }
1913
1942
 
1914
1943
  /**
1915
- * Contrato de saída do normalizador de esquema (SchemaNormalizerService):
1916
- * - Converte metadados `x-ui` em FieldDefinition tipado.
1917
- * - Todas as funções expostas são funções reais (nunca strings):
1918
- * - conditionalDisplay: () => boolean
1919
- * - conditionalRequired: () => boolean
1920
- * - transformValueFunction: (val: any) => any
1921
- * - Suporte completo a ValidatorOptions (sincronos e assíncronos),
1922
- * incluindo mensagens e comportamento de validação (gatilhos, debounce, exibição de erros).
1944
+ * Enum que define os tipos de dados (`TYPE`) disponíveis para configuração dos campos de formulário.
1923
1945
  */
1924
- interface FieldDefinition {
1925
- name: string;
1926
- label?: string;
1927
- description?: string;
1928
- type?: string;
1929
- controlType?: string;
1930
- mode?: string;
1931
- placeholder?: string;
1932
- defaultValue?: any;
1933
- group?: string;
1934
- order?: number;
1935
- width?: number | string;
1936
- isFlex?: boolean;
1937
- displayOrientation?: string;
1938
- selectionMode?: 'boolean' | 'single' | 'multiple';
1939
- variant?: string;
1940
- density?: 'compact' | 'comfortable' | 'spacious';
1941
- layout?: 'horizontal' | 'vertical';
1942
- disabled?: boolean;
1943
- readOnly?: boolean;
1944
- multiple?: boolean;
1945
- editable?: boolean;
1946
- validationMode?: string;
1947
- unique?: boolean;
1948
- mask?: string;
1949
- sortable?: boolean;
1950
- /** Função que define obrigatoriedade condicional. */
1951
- conditionalRequired?: () => boolean;
1952
- viewOnlyStyle?: string;
1953
- /** Lista de gatilhos de validação, ex.: ["blur", "change"]. */
1954
- validationTriggers?: string[];
1955
- hidden?: boolean;
1956
- tableHidden?: boolean;
1957
- formHidden?: boolean;
1958
- filterable?: boolean;
1959
- /** Função que controla se o campo é exibido. */
1960
- conditionalDisplay?: () => boolean;
1961
- dependentField?: string;
1962
- resetOnDependentChange?: boolean;
1963
- inlineEditing?: boolean;
1964
- /** Função de transformação de valor antes de salvar/exibir. */
1965
- transformValueFunction?: (val: any) => any;
1966
- debounceTime?: number;
1967
- helpText?: string;
1968
- hint?: string;
1969
- hiddenCondition?: any;
1970
- tooltipOnHover?: boolean;
1971
- icon?: string;
1972
- iconPosition?: string;
1973
- iconSize?: string | number;
1974
- iconColor?: string;
1975
- iconClass?: string;
1976
- iconStyle?: string;
1977
- iconFontSize?: string | number;
1978
- valueField?: string;
1979
- displayField?: string;
1980
- filterField?: string;
1981
- endpoint?: string;
1982
- resourcePath?: string;
1983
- optionSource?: OptionSourceMetadata;
1984
- emptyOptionText?: string;
1985
- options?: {
1986
- key: string;
1987
- value: string;
1988
- }[];
1989
- filter?: any;
1990
- filterCriteria?: any;
1991
- searchable?: boolean;
1992
- selectAll?: boolean;
1993
- maxSelections?: number;
1994
- optionLabelKey?: string;
1995
- optionValueKey?: string;
1996
- filterOptions?: any[];
1997
- numericFormat?: string;
1998
- valuePresentation?: ValuePresentationConfig;
1999
- numericStep?: number;
2000
- numericMin?: number;
2001
- numericMax?: number;
2002
- numericMaxLength?: number;
2003
- optionGroups?: {
2004
- key: string;
2005
- value: string;
2006
- }[];
2007
- disabledOptions?: string[];
2008
- buttons?: any[];
2009
- /** Obrigatório. */
2010
- required?: boolean;
2011
- requiredMessage?: string;
2012
- /** Tamanho mínimo/máximo (strings). */
2013
- minLength?: number;
2014
- minLengthMessage?: string;
2015
- maxLength?: number;
2016
- maxLengthMessage?: string;
2017
- /** Limites numéricos. */
2018
- min?: number;
2019
- max?: number;
2020
- /** Mensagens dedicadas para min/max numéricos. */
2021
- minMessage?: string;
2022
- maxMessage?: string;
2023
- /** Mensagem quando ambos limites (range) são aplicados. */
2024
- rangeMessage?: string;
2025
- /** Padrão (regex). Aceita pattern/regex. */
2026
- pattern?: string;
2027
- patternMessage?: string;
2028
- /** Validação de e-mail. */
2029
- email?: boolean;
2030
- emailMessage?: string;
2031
- /** Validação de URL. */
2032
- url?: boolean;
2033
- urlMessage?: string;
2034
- /** Requer que valor combine com outro campo. */
2035
- matchField?: string;
2036
- matchFieldMessage?: string;
2037
- /** Requer que o checkbox esteja marcado. */
2038
- requiredChecked?: boolean;
2039
- /** Tipos de arquivo permitidos e tamanho máximo. */
2040
- allowedFileTypes?: string[];
2041
- fileTypeMessage?: string;
2042
- maxFileSize?: number;
2043
- /** Validador customizado síncrono. */
2044
- customValidator?: (value: any, model?: any) => any;
2045
- /** Validador customizado assíncrono. */
2046
- asyncValidator?: (value: any, model?: any) => Promise<any>;
2047
- /** Validador de unicidade (ex.: consulta ao backend). */
2048
- uniqueValidator?: (value: any, model?: any) => boolean | Promise<boolean>;
2049
- uniqueMessage?: string;
2050
- /** Validação condicional baseada em outro(s) campos/estado. */
2051
- conditionalValidation?: (value: any, model?: any) => boolean | string | Promise<boolean | string>;
2052
- /** Mínimo de palavras (para textos longos). */
2053
- minWords?: number;
2054
- /** Gatilho(s) de validação (alias de validationTriggers). */
2055
- /** Tempo de debounce (ms) para executar validação. */
2056
- validationDebounce?: number;
2057
- /** Exibir erros inline no campo. */
2058
- showInlineErrors?: boolean;
2059
- /** Posição preferida da mensagem de erro (ex.: below, right). */
2060
- errorPosition?: string;
2061
- [key: string]: any;
2062
- }
2063
-
2064
- declare enum ApiEndpoint {
2065
- Default = "default",
2066
- HumanResources = "humanResources",
2067
- UiWrappersTest = "uiWrappersTest"
2068
- }
2069
-
2070
- interface ApiUrlEntry {
2071
- baseUrl?: string;
2072
- path?: string;
2073
- fullUrl?: string;
2074
- version?: string;
2075
- headers?: HttpHeaders | Record<string, string | string[]>;
2076
- }
2077
- interface ApiUrlConfig {
2078
- [key: string]: ApiUrlEntry;
2079
- }
2080
- declare const API_URL: InjectionToken<ApiUrlConfig>;
2081
- declare function buildApiUrl(entry: ApiUrlEntry): string;
2082
- declare function buildHeaders(entry: ApiUrlEntry): HttpHeaders | undefined;
1946
+ declare const FieldDataType: {
1947
+ readonly TEXT: "text";
1948
+ readonly NUMBER: "number";
1949
+ readonly EMAIL: "email";
1950
+ readonly DATE: "date";
1951
+ readonly PASSWORD: "password";
1952
+ readonly FILE: "file";
1953
+ readonly URL: "url";
1954
+ readonly BOOLEAN: "boolean";
1955
+ readonly JSON: "json";
1956
+ };
1957
+ type FieldDataType = typeof FieldDataType[keyof typeof FieldDataType];
2083
1958
 
2084
1959
  /**
2085
- * SchemaNormalizerService
2086
- * -----------------------
2087
- * Serviço responsável por converter um esquema bruto (OpenAPI + x-ui) em uma
2088
- * lista tipada de FieldDefinition consumida pelo restante do sistema
2089
- * (mapeadores de metadata, criador de FormGroup, carregador de campos dinâmicos, etc.).
2090
- *
2091
- * Entrada esperada
2092
- * - Objeto JSON no formato OpenAPI/JSON Schema contendo:
2093
- * - properties: { [name: string]: { type, title, description, ... , 'x-ui': { ... } } }
2094
- * - Em cada propriedade, o objeto 'x-ui' define aspectos de UI/validação.
2095
- *
2096
- * Saída (FieldDefinition[])
2097
- * - Tipagem forte de campos com funções reais (nunca strings) para regras condicionais e validadores customizados.
2098
- * - Todas as propriedades de validação e comportamento consolidadas no mesmo objeto do campo.
2099
- *
2100
- * Segurança e observações
2101
- * - Este serviço aceita funções em formato string dentro do x-ui (ex.: uniqueValidator, conditionalValidation),
2102
- * e as converte via new Function. Isso exige backend confiável e controlado.
2103
- * Em ambientes não confiáveis, evite funções como string ou implemente um sandbox/whitelist.
2104
- * - Valores booleanos/numéricos são normalizados para tipos nativos.
2105
- * - Arrays de opções são convertidos para pares { key, value } previsíveis.
1960
+ * Enum que define os tipos de controle (`CONTROL_TYPE`) disponíveis para a apresentação dos campos de formulário.
2106
1961
  *
2107
- * Exemplo mínimo de entrada
2108
- * const schema = {
2109
- * properties: {
2110
- * email: {
2111
- * type: 'string',
2112
- * title: 'E-mail',
2113
- * 'x-ui': { controlType: 'input', type: 'string', required: true, email: true }
2114
- * }
2115
- * }
2116
- * };
2117
- * const fields = normalizer.normalizeSchema(schema);
2118
- * // fields: [{ name: 'email', label: 'E-mail', type: 'string', controlType: 'input', required: true, email: true }]
1962
+ * O `CONTROL_TYPE` especifica o tipo de elemento de UI (User Interface) que será usado para capturar ou exibir dados do campo.
1963
+ * Essa configuração permite que a camada de apresentação saiba como renderizar o campo e oferecer a interação adequada ao usuário.
1964
+ * Em casos onde o `CONTROL_TYPE` não é especificado, a camada de apresentação pode usar o valor de `TYPE` (definido em `FieldDataType`)
1965
+ * para decidir o controle mais adequado de forma automática.
2119
1966
  */
2120
- declare class SchemaNormalizerService {
2121
- /** Convert value to boolean. Accepts boolean, string or number. */
2122
- private parseBoolean;
2123
- /** Ensure an array of strings from various inputs. */
2124
- private parseStringArray;
2125
- /** Parse option arrays into `{ key, value }` objects. */
2126
- private parseOptions;
2127
- private parseOptionSource;
2128
- private parseValuePresentation;
2129
- /**
2130
- * Converte string/Function em função real.
2131
- * Atenção: usa `new Function` para avaliar strings – requer backend confiável.
2132
- */
2133
- private parseFunction;
2134
- /** Parse a predicate function: () => boolean */
2135
- private parsePredicateFunction;
2136
- /** Parse a transform function: (val: any) => any */
2137
- private parseTransformFunction;
2138
- /**
2139
- * Parse de validador condicional: (value: any, model?: any) => boolean | string | Promise<boolean | string>
2140
- */
2141
- private parseConditionalValidator;
2142
- /**
2143
- * Extrai e normaliza propriedades de validação a partir do objeto x-ui.
2144
- * Suporta: required, min/max, minLength/maxLength, pattern/regex, email, url,
2145
- * matchField, uniqueValidator (+message), conditionalValidation, requiredChecked,
2146
- * arquivos (allowedFileTypes, fileTypeMessage, maxFileSize), custom/async validators,
2147
- * minWords e comportamento (validationTrigger(s), validationDebounce, showInlineErrors, errorPosition).
2148
- */
2149
- private parseValidators;
2150
- /** Parse array of button definitions. */
2151
- private parseButtons;
2152
- private resolveNonEmptyStringToken;
2153
- private isNumericSchemaType;
2154
- private resolveNumericFormatToken;
2155
- /**
2156
- * Converte o schema bruto do backend (OpenAPI + x-ui) em FieldDefinition[] tipado.
2157
- * Regras:
2158
- * - Ignora propriedades sem x-ui.
2159
- * - Garante ordenação por 'order' quando presente.
2160
- * - Funções condicionais/transformações sempre viram funções reais.
2161
- *
2162
- * @param schema Objeto OpenAPI/JSON Schema com properties e x-ui por propriedade.
2163
- * @returns FieldDefinition[] prontos para mapeamento/uso no restante do sistema.
2164
- */
2165
- normalizeSchema(schema: any): FieldDefinition[];
2166
- private resolveFieldType;
2167
- static ɵfac: i0.ɵɵFactoryDeclaration<SchemaNormalizerService, never>;
2168
- static ɵprov: i0.ɵɵInjectableDeclaration<SchemaNormalizerService>;
2169
- }
2170
-
2171
- type TableConfig = TableConfigV2;
1967
+ declare const FieldControlType: {
1968
+ readonly AI_PROMPT: "aiPrompt";
1969
+ readonly APP_BAR: "appBar";
1970
+ readonly ARC_GAUGE: "arcGauge";
1971
+ readonly ARRAY_INPUT: "array";
1972
+ readonly ASYNC_SELECT: "async-select";
1973
+ readonly AUTO_COMPLETE: "autoComplete";
1974
+ readonly AVATAR: "avatar";
1975
+ readonly BARCODE_GENERATOR: "barcodeGenerator";
1976
+ readonly BOTTOM_NAVIGATION: "bottomNavigation";
1977
+ readonly BREADCRUMB: "breadcrumb";
1978
+ readonly BUTTON: "button";
1979
+ readonly BUTTON_TOGGLE: "buttonToggle";
1980
+ readonly CALENDAR: "calendar";
1981
+ readonly CARD: "card";
1982
+ readonly CHECKBOX: "checkbox";
1983
+ readonly CHIP_INPUT: "chipInput";
1984
+ readonly CHIP_LIST: "chipList";
1985
+ readonly CIRCULAR_GAUGE: "circularGauge";
1986
+ readonly COLOR_GRADIENT: "colorGradient";
1987
+ readonly CPF_CNPJ_INPUT: "cpfCnpjInput";
1988
+ readonly COLOR_PALETTE: "colorPalette";
1989
+ readonly COLOR_PICKER: "colorPicker";
1990
+ readonly COLOR_INPUT: "color";
1991
+ readonly CRON_BUILDER: "cronBuilder";
1992
+ readonly CONTEXT_MENU: "contextMenu";
1993
+ readonly CONVERSATIONAL_UI: "conversationalUI";
1994
+ readonly CURRENCY_INPUT: "currency";
1995
+ readonly DATE_INPUT: "dateInput";
1996
+ readonly DATE_PICKER: "date";
1997
+ readonly DATE_RANGE: "dateRange";
1998
+ readonly DATE_TIME_PICKER: "dateTime";
1999
+ readonly DATE_TIME_RANGE: "dateTimeRange";
2000
+ readonly DATETIME_LOCAL_INPUT: "dateTimeLocal";
2001
+ readonly DIALOG: "dialog";
2002
+ readonly DRAWER: "drawer";
2003
+ readonly DROP_DOWN_TREE: "dropDownTree";
2004
+ readonly EMAIL_INPUT: "email";
2005
+ readonly EXPANSION_PANEL: "expansionPanel";
2006
+ readonly FILE_SAVER: "fileSaver";
2007
+ readonly FILE_SELECT: "fileSelect";
2008
+ readonly FILE_UPLOAD: "upload";
2009
+ readonly FILTER: "filter";
2010
+ readonly FLOATING_LABEL: "floatingLabel";
2011
+ readonly FLOATING_ACTION_BUTTON: "floatingActionButton";
2012
+ readonly GRID: "grid";
2013
+ readonly GRID_LAYOUT: "gridLayout";
2014
+ readonly INPUT: "input";
2015
+ readonly INLINE_SELECT: "inlineSelect";
2016
+ readonly INLINE_SEARCHABLE_SELECT: "inlineSearchableSelect";
2017
+ readonly INLINE_ASYNC_SELECT: "inlineAsyncSelect";
2018
+ readonly INLINE_ENTITY_LOOKUP: "inlineEntityLookup";
2019
+ readonly INLINE_AUTOCOMPLETE: "inlineAutocomplete";
2020
+ readonly INLINE_INPUT: "inlineInput";
2021
+ readonly INLINE_NUMBER: "inlineNumber";
2022
+ readonly INLINE_CURRENCY: "inlineCurrency";
2023
+ readonly INLINE_CURRENCY_RANGE: "inlineCurrencyRange";
2024
+ readonly INLINE_MULTISELECT: "inlineMultiSelect";
2025
+ readonly INLINE_TOGGLE: "inlineToggle";
2026
+ readonly INLINE_RANGE: "inlineRange";
2027
+ readonly INLINE_PERIOD_RANGE: "inlinePeriodRange";
2028
+ readonly INLINE_YEAR_RANGE: "inlineYearRange";
2029
+ readonly INLINE_MONTH_RANGE: "inlineMonthRange";
2030
+ readonly INLINE_DATE: "inlineDate";
2031
+ readonly INLINE_DATE_RANGE: "inlineDateRange";
2032
+ readonly INLINE_TIME: "inlineTime";
2033
+ readonly INLINE_TIME_RANGE: "inlineTimeRange";
2034
+ readonly INLINE_TREE_SELECT: "inlineTreeSelect";
2035
+ readonly INLINE_RATING: "inlineRating";
2036
+ readonly INLINE_DISTANCE_RADIUS: "inlineDistanceRadius";
2037
+ readonly INLINE_PIPELINE_STATUS: "inlinePipelineStatus";
2038
+ readonly INLINE_SCORE_PRIORITY: "inlineScorePriority";
2039
+ readonly INLINE_RELATIVE_PERIOD: "inlineRelativePeriod";
2040
+ readonly INLINE_SENTIMENT: "inlineSentiment";
2041
+ readonly INLINE_COLOR_LABEL: "inlineColorLabel";
2042
+ readonly LINEAR_GAUGE: "linearGauge";
2043
+ readonly LIST_VIEW: "listView";
2044
+ readonly MAP: "map";
2045
+ readonly MASKED_TEXT_BOX: "maskedTextBox";
2046
+ readonly MONTH_INPUT: "month";
2047
+ readonly MULTI_COLUMN_COMBO_BOX: "multiColumnComboBox";
2048
+ readonly MULTI_SELECT: "multiSelect";
2049
+ readonly MULTI_SELECT_TREE: "multiSelectTree";
2050
+ readonly TRANSFER_LIST: "transferList";
2051
+ readonly NOTIFICATION: "notification";
2052
+ readonly NUMERIC_TEXT_BOX: "numericTextBox";
2053
+ readonly PAGER: "pager";
2054
+ readonly PAGINATOR: "paginator";
2055
+ readonly PASSWORD: "password";
2056
+ readonly PDF_VIEWER: "pdfViewer";
2057
+ readonly PHONE: "phone";
2058
+ readonly PIVOT_GRID: "pivotGrid";
2059
+ readonly POPUP: "popup";
2060
+ readonly PROGRESS_BAR: "progressBar";
2061
+ readonly PROGRESS_SPINNER: "progressSpinner";
2062
+ readonly QR_CODE: "qrCode";
2063
+ readonly RADIO: "radio";
2064
+ readonly RADIAL_GAUGE: "radialGauge";
2065
+ readonly RANGE_SLIDER: "rangeSlider";
2066
+ readonly PRICE_RANGE: "priceRange";
2067
+ readonly RATING: "rating";
2068
+ readonly RICH_TEXT_EDITOR: "richTextEditor";
2069
+ readonly RIPPLE: "ripple";
2070
+ readonly SCROLL_VIEW: "scrollView";
2071
+ readonly SEARCH_INPUT: "search";
2072
+ readonly SEARCHABLE_SELECT: "searchable-select";
2073
+ readonly SELECTION_LIST: "selectionList";
2074
+ readonly SELECT: "select";
2075
+ readonly SIGNATURE: "signature";
2076
+ readonly SLIDER: "slider";
2077
+ readonly SORTABLE: "sortable";
2078
+ readonly SORTABLE_TABLE: "sortableTable";
2079
+ readonly SPLITTER: "splitter";
2080
+ readonly SPREADSHEET: "spreadsheet";
2081
+ readonly STACK_LAYOUT: "stackLayout";
2082
+ readonly STEP_BAR: "stepBar";
2083
+ readonly STEPPER: "stepper";
2084
+ readonly SVG_ICON: "svgIcon";
2085
+ readonly TABS: "tabs";
2086
+ readonly TEXTAREA: "textarea";
2087
+ readonly TIME_INPUT: "time";
2088
+ readonly TIME_PICKER: "timePicker";
2089
+ readonly TIME_RANGE: "timeRange";
2090
+ readonly TIMELINE: "timeline";
2091
+ readonly TOGGLE: "toggle";
2092
+ readonly TOOLBAR: "toolbar";
2093
+ readonly TOOLTIP: "tooltip";
2094
+ readonly TREE_VIEW: "treeView";
2095
+ readonly TREE_SELECT: "treeSelect";
2096
+ readonly TYPOGRAPHY: "typography";
2097
+ readonly URL_INPUT: "url";
2098
+ readonly WEEK_INPUT: "week";
2099
+ readonly WINDOW: "window";
2100
+ readonly YEAR_INPUT: "year";
2101
+ };
2102
+ type FieldControlType = (typeof FieldControlType)[keyof typeof FieldControlType];
2172
2103
 
2173
2104
  /**
2174
- * Cria uma configuração padrão para TableConfig
2175
- */
2176
- declare function createDefaultTableConfig(): TableConfig;
2177
- /**
2178
- * Valida se uma configuração TableConfig é válida
2179
- */
2180
- declare function isValidTableConfig(config: any): config is TableConfig;
2181
- /**
2182
- * Clona profundamente uma configuração TableConfig
2183
- */
2184
- declare function cloneTableConfig(config: TableConfig): TableConfig;
2185
- /**
2186
- * Merge duas configurações TableConfig, priorizando a segunda
2187
- */
2188
- declare function mergeTableConfigs(base: TableConfig, override: Partial<TableConfig>): TableConfig;
2189
- /**
2190
- * Extrai apenas as configurações essenciais para compatibilidade
2191
- */
2192
- declare function getEssentialConfig(config: TableConfig): Partial<TableConfig>;
2193
- /**
2194
- * @deprecated Use TableConfig instead
2105
+ * @fileoverview Base metadata interfaces for dynamic Angular Material components
2106
+ *
2107
+ * This file implements a hierarchical system of metadata interfaces designed for
2108
+ * maximum flexibility, type safety, and Angular Material integration.
2109
+ *
2110
+ * Architecture:
2111
+ * - ComponentMetadata (universal base)
2112
+ * - FieldMetadata (form fields)
2113
+ * - Specialized interfaces (MaterialInput, MaterialSelect, etc.)
2114
+ *
2115
+ * Design Principles:
2116
+ * - Configuration over Code
2117
+ * - JSON serializable
2118
+ * - Type-safe with strict TypeScript
2119
+ * - Backward compatible
2120
+ * - Angular Material 3 native support
2195
2121
  */
2196
- type LegacyTableConfig = TableConfig;
2122
+
2197
2123
  /**
2198
- * @deprecated Use createDefaultTableConfig instead
2124
+ * Universal base interface for all dynamic components.
2125
+ *
2126
+ * Provides maximum extensibility through index signature while maintaining
2127
+ * essential metadata properties for component lifecycle management.
2128
+ *
2129
+ * @example
2130
+ * ```typescript
2131
+ * const buttonMetadata: ComponentMetadata = {
2132
+ * id: 'submit-btn',
2133
+ * version: '1.0.0',
2134
+ * context: 'form',
2135
+ * customProperty: 'any value'
2136
+ * };
2137
+ * ```
2199
2138
  */
2200
- declare const DEFAULT_TABLE_CONFIG: TableConfigV2;
2201
-
2202
- type GlobalDialogAriaRole = 'dialog' | 'alertdialog';
2203
- interface GlobalDialogPosition {
2204
- top?: string;
2205
- bottom?: string;
2206
- left?: string;
2207
- right?: string;
2208
- }
2209
- interface GlobalDialogAction {
2139
+ interface ComponentMetadata {
2140
+ /** Unique identifier for the component instance */
2210
2141
  id?: string;
2211
- text: string;
2212
- role?: 'primary' | 'secondary' | 'danger' | 'close' | 'custom';
2213
- close?: boolean;
2214
- icon?: string | null;
2215
- svgIcon?: string | null;
2216
- fillMode?: 'solid' | 'flat' | 'outline';
2217
- themeColor?: 'primary' | 'accent' | 'warn' | 'neutral';
2218
- cssClass?: string | string[] | Record<string, boolean>;
2219
- }
2220
- interface GlobalDialogAnimation {
2221
- type?: 'translate' | 'slide' | 'fade' | 'expand' | 'zoom';
2222
- direction?: 'up' | 'down' | 'left' | 'right';
2223
- duration?: number;
2224
- easing?: string;
2142
+ /** Metadata schema version for migration support */
2143
+ version?: string;
2144
+ /** Application context where component is used */
2145
+ context?: 'form' | 'filter' | 'table' | 'dialog' | 'standalone';
2146
+ /** Timestamp when metadata was created */
2147
+ createdAt?: string;
2148
+ /** Timestamp when metadata was last updated */
2149
+ updatedAt?: string;
2150
+ /** Tags for categorization and filtering */
2151
+ tags?: string[];
2152
+ /** Custom CSS classes to apply to the component */
2153
+ cssClass?: string;
2154
+ /** Inline styles as CSS properties object */
2155
+ style?: Record<string, string>;
2156
+ /** Data attributes for testing or analytics */
2157
+ dataAttributes?: Record<string, string>;
2158
+ /** Extensibility: allow any additional properties */
2159
+ [key: string]: any;
2225
2160
  }
2226
- interface GlobalDialogStyles {
2227
- actionsAlignment?: 'start' | 'center' | 'end' | 'stretched';
2228
- actionsPadding?: string;
2229
- containerElevationShadow?: string;
2230
- containerMaxWidth?: string;
2231
- containerMinWidth?: string;
2232
- containerShape?: string;
2233
- containerBorderColor?: string;
2234
- containerSmallMaxWidth?: string;
2235
- contentPadding?: string;
2236
- headlinePadding?: string;
2237
- withActionsContentPadding?: string;
2238
- backdropColor?: string;
2239
- actionButtonRadius?: string;
2240
- actionButtonMinHeight?: string;
2241
- actionButtonPadding?: string;
2242
- containerColor?: string;
2243
- subheadColor?: string;
2244
- supportingTextColor?: string;
2245
- subheadFont?: string;
2246
- subheadLineHeight?: string;
2247
- subheadSize?: string;
2248
- subheadTracking?: string;
2249
- subheadWeight?: string | number;
2250
- supportingTextFont?: string;
2251
- supportingTextLineHeight?: string;
2252
- supportingTextSize?: string;
2253
- supportingTextTracking?: string;
2254
- supportingTextWeight?: string | number;
2161
+ /**
2162
+ * Enhanced validation configuration for comprehensive field validation.
2163
+ *
2164
+ * Supports both built-in Angular validators and custom validation logic
2165
+ * with internationalization support for error messages.
2166
+ */
2167
+ interface ValidatorOptions {
2168
+ /** Field is required */
2169
+ required?: boolean;
2170
+ /** Custom message for required validation */
2171
+ requiredMessage?: string;
2172
+ /** Minimum text length */
2173
+ minLength?: number;
2174
+ /** Custom message for minLength validation */
2175
+ minLengthMessage?: string;
2176
+ /** Maximum text length */
2177
+ maxLength?: number;
2178
+ /** Custom message for maxLength validation */
2179
+ maxLengthMessage?: string;
2180
+ /** Minimum numeric value */
2181
+ min?: number;
2182
+ /** Custom message for min validation */
2183
+ minMessage?: string;
2184
+ /** Maximum numeric value */
2185
+ max?: number;
2186
+ /** Custom message for max validation */
2187
+ maxMessage?: string;
2188
+ /** RegExp pattern for validation */
2189
+ pattern?: string | RegExp;
2190
+ /** Custom message for pattern validation */
2191
+ patternMessage?: string;
2192
+ /** Custom message for legacy CPF validation */
2193
+ cpfMessage?: string;
2194
+ /** Custom message for legacy CNPJ validation */
2195
+ cnpjMessage?: string;
2196
+ /** Custom message for alphanumeric CNPJ validation */
2197
+ cnpjAlphaMessage?: string;
2198
+ /** Built-in legacy CPF validation */
2199
+ cpf?: boolean;
2200
+ /** Built-in legacy CNPJ validation */
2201
+ cnpj?: boolean;
2202
+ /** Built-in auto-detect CPF/CNPJ validation */
2203
+ cpfCnpj?: boolean;
2204
+ /** Built-in alphanumeric CNPJ validation */
2205
+ cnpjAlpha?: boolean;
2206
+ /** Built-in email validation */
2207
+ email?: boolean;
2208
+ /** Custom message for email validation */
2209
+ emailMessage?: string;
2210
+ /** Built-in URL validation */
2211
+ url?: boolean;
2212
+ /** Custom message for URL validation */
2213
+ urlMessage?: string;
2214
+ /** Minimum number of words for text content */
2215
+ minWords?: number;
2216
+ /** Require checkbox to be checked (for checkbox fields) */
2217
+ requiredChecked?: boolean;
2218
+ /** Custom synchronous validator function */
2219
+ customValidator?: (value: any, context?: any) => boolean | string | null;
2220
+ /** Custom asynchronous validator function */
2221
+ asyncValidator?: (value: any, context?: any) => Promise<boolean | string | null>;
2222
+ /** Cross-field validation - must match another field */
2223
+ matchField?: string;
2224
+ /** Custom message for field matching validation */
2225
+ matchFieldMessage?: string;
2226
+ /** Unique value validation via API call */
2227
+ uniqueValidator?: (value: any) => Promise<boolean>;
2228
+ /** Custom message for unique validation */
2229
+ uniqueMessage?: string;
2230
+ /** Conditional validation rules driven by canonical Json Logic. */
2231
+ conditionalValidation?: ConditionalValidationRule[];
2232
+ /** When to trigger validation */
2233
+ validationTrigger?: 'change' | 'blur' | 'submit' | 'immediate';
2234
+ /** Debounce time for validation in milliseconds */
2235
+ validationDebounce?: number;
2236
+ /** Show validation errors inline */
2237
+ showInlineErrors?: boolean;
2238
+ /** Custom error display position */
2239
+ errorPosition?: 'bottom' | 'top' | 'tooltip';
2255
2240
  }
2256
- interface GlobalDialogConfigEntry {
2257
- title?: string;
2258
- themeColor?: 'primary' | 'light' | 'dark';
2259
- ariaRole?: GlobalDialogAriaRole;
2260
- message?: string;
2261
- icon?: string | null;
2262
- width?: string | number | null;
2263
- height?: string | number | null;
2264
- minWidth?: string | number | null;
2265
- maxWidth?: string | number | null;
2266
- minHeight?: string | number | null;
2267
- maxHeight?: string | number | null;
2268
- disableClose?: boolean;
2269
- hasBackdrop?: boolean;
2270
- closeOnBackdropClick?: boolean;
2271
- panelClass?: string | string[] | Record<string, boolean>;
2272
- backdropClass?: string | string[] | Record<string, boolean>;
2273
- position?: GlobalDialogPosition;
2274
- animation?: boolean | GlobalDialogAnimation;
2275
- styles?: GlobalDialogStyles;
2276
- actions?: GlobalDialogAction[];
2241
+ interface ConditionalValidationRule {
2242
+ /** Canonical Json Logic guard evaluated against the `form` root. */
2243
+ condition: JsonLogicExpression | null;
2244
+ /** Validators applied when the guard resolves to true. */
2245
+ validators: Omit<ValidatorOptions, 'conditionalValidation'>;
2277
2246
  }
2278
- interface GlobalDialogConfig {
2279
- defaults?: {
2280
- confirm?: GlobalDialogConfigEntry;
2281
- alert?: GlobalDialogConfigEntry;
2282
- prompt?: GlobalDialogConfigEntry;
2283
- };
2284
- variants?: Record<string, GlobalDialogConfigEntry>;
2247
+ /**
2248
+ * Configuration for field options in selection components.
2249
+ *
2250
+ * Supports both static arrays and dynamic loading from APIs
2251
+ * with flexible data transformation capabilities.
2252
+ */
2253
+ interface FieldOption {
2254
+ /** The actual value to be stored */
2255
+ value: any;
2256
+ /** Display text shown to user */
2257
+ text: string;
2258
+ /** Optional grouping for organized display */
2259
+ group?: string;
2260
+ /** Whether this option is disabled */
2261
+ disabled?: boolean;
2262
+ /** Additional data associated with option */
2263
+ data?: any;
2264
+ /** CSS class for styling */
2265
+ cssClass?: string;
2266
+ /** Alternative CSS class property name */
2267
+ class?: string;
2268
+ /** Icon to display with option */
2269
+ icon?: string;
2270
+ /** Tooltip text for option */
2271
+ tooltip?: string;
2272
+ /** Detailed description for the option */
2273
+ description?: string;
2285
2274
  }
2286
-
2287
- type FormOpenMode = 'route' | 'modal' | 'drawer';
2288
- interface GlobalCrudActionDefaults {
2289
- openMode?: FormOpenMode;
2290
- route?: string;
2291
- formId?: string;
2275
+ /**
2276
+ * Angular Material specific styling and behavior options.
2277
+ *
2278
+ * Covers appearance, theming, density, and interaction patterns
2279
+ * specific to Material Design 3 components.
2280
+ */
2281
+ interface MaterialDesignConfig {
2282
+ /** Material appearance variant */
2283
+ appearance?: 'fill' | 'outline';
2284
+ /** Material color theme */
2285
+ color?: 'primary' | 'accent' | 'warn';
2286
+ /** Label floating behavior */
2287
+ floatLabel?: 'auto' | 'always';
2288
+ /** Subscript sizing strategy */
2289
+ subscriptSizing?: 'fixed' | 'dynamic';
2290
+ /** Hide required marker asterisk */
2291
+ hideRequiredMarker?: boolean;
2292
+ /** Component density */
2293
+ density?: 'comfortable' | 'compact' | 'dense';
2294
+ /** Disable ripple effects */
2295
+ disableRipple?: boolean;
2296
+ /** Custom theme palette override */
2297
+ customPalette?: {
2298
+ primary?: string;
2299
+ accent?: string;
2300
+ warn?: string;
2301
+ };
2302
+ /** Animation configuration */
2303
+ animations?: {
2304
+ disabled?: boolean;
2305
+ duration?: number;
2306
+ easing?: string;
2307
+ };
2292
2308
  }
2293
- interface GlobalCrudDefaults {
2294
- openMode?: FormOpenMode;
2295
- modal?: Record<string, any>;
2296
- back?: Record<string, any>;
2297
- header?: Record<string, any>;
2298
- /**
2299
- * Quando usado via <praxis-crud>, habilita automaticamente a coluna de ações por linha
2300
- * com base nas ações declaradas (ex.: view/edit). Desligue para controlar manualmente.
2301
- * Default: true
2302
- */
2303
- autoRowActions?: boolean;
2304
- /**
2305
- * Formato padrão para exibição das ações de linha geradas automaticamente.
2306
- * Default: 'icons'
2307
- */
2308
- rowActionsDisplay?: 'icons' | 'buttons' | 'menu';
2309
+ /**
2310
+ * Comprehensive metadata interface for form fields.
2311
+ *
2312
+ * This is the main interface that extends ComponentMetadata with field-specific
2313
+ * properties covering behavior, validation, data binding, and UI configuration.
2314
+ *
2315
+ * @example
2316
+ * ```typescript
2317
+ * const emailField: FieldMetadata = {
2318
+ * name: 'email',
2319
+ * label: 'Email Address',
2320
+ * controlType: 'input',
2321
+ * required: true,
2322
+ * validators: {
2323
+ * required: true,
2324
+ * email: true,
2325
+ * requiredMessage: 'Email is required',
2326
+ * emailMessage: 'Please enter a valid email'
2327
+ * },
2328
+ * materialDesign: {
2329
+ * appearance: 'outline',
2330
+ * color: 'primary'
2331
+ * }
2332
+ * };
2333
+ * ```
2334
+ */
2335
+ interface FieldMetadata extends ComponentMetadata {
2336
+ /** Unique field identifier (required) */
2337
+ name: string;
2338
+ /** Display label for the field */
2339
+ label: string;
2309
2340
  /**
2310
- * Inclui ação de delete na coluna de ações quando houver ação 'delete' declarada.
2311
- * Por padrão permanece desabilitado para evitar comportamentos não intencionais.
2341
+ * Indicates that `label` was generated automatically by infrastructure code
2342
+ * such as schema mappers, instead of being authored explicitly by metadata.
2343
+ *
2344
+ * This flag is optional and defaults to `false` when omitted, preserving
2345
+ * backward compatibility for existing serialized metadata and host contracts.
2346
+ *
2347
+ * Intended use:
2348
+ * - allow authoring/runtime layers to distinguish domain text from fallback UI
2349
+ * - support governance checks that require explicit labels in enterprise flows
2350
+ * - avoid relying on implicit casts such as `(fieldMetadata as any)`
2312
2351
  */
2313
- includeDeleteInRow?: boolean;
2314
- }
2315
- interface GlobalCrudConfig {
2316
- defaults?: GlobalCrudDefaults;
2317
- actionDefaults?: Record<string, GlobalCrudActionDefaults>;
2318
- }
2319
- interface GlobalDynamicFieldsAsyncSelectConfig {
2320
- loadOn?: 'open' | 'init' | 'none';
2321
- pageSize?: number;
2322
- useCursor?: boolean;
2323
- }
2324
- interface GlobalDynamicFieldsCascadeConfig {
2325
- enable?: boolean;
2326
- loadOnChange?: 'respectLoadOn' | 'immediate' | 'manual';
2327
- debounceMs?: number;
2328
- }
2329
- interface GlobalDynamicFieldsConfig {
2330
- asyncSelect?: GlobalDynamicFieldsAsyncSelectConfig;
2331
- cascade?: GlobalDynamicFieldsCascadeConfig;
2332
- }
2333
- type GlobalTableConfig = (Partial<Pick<TableConfig, 'behavior' | 'appearance' | 'toolbar' | 'actions' | 'messages' | 'localization' | 'performance'>> & {
2334
- /** UI defaults specific to the PraxisFilter (above the table) */
2335
- filteringUi?: {
2336
- overlayVariant?: 'card' | 'frosted';
2337
- overlayBackdrop?: boolean;
2338
- advancedOpenMode?: 'overlay' | 'modal' | 'drawer';
2339
- };
2340
- });
2341
- type GlobalAiProvider = 'gemini' | 'openai' | 'xai' | 'mock';
2342
- interface GlobalAiEmbeddingConfig {
2343
- useSameAsLlm?: boolean;
2344
- provider?: GlobalAiProvider;
2345
- apiKey?: string;
2346
- apiKeyLast4?: string;
2347
- hasApiKey?: boolean;
2348
- model?: string;
2349
- dimensions?: number;
2350
- }
2351
- interface GlobalAiConfig {
2352
- provider?: GlobalAiProvider;
2353
- /** Policy for UI confirmation on risky AI patches. */
2354
- riskPolicy?: 'strict' | 'standard';
2355
- apiKey?: string;
2356
- apiKeyLast4?: string;
2357
- hasApiKey?: boolean;
2358
- model?: string;
2359
- temperature?: number;
2360
- maxTokens?: number;
2361
- embedding?: GlobalAiEmbeddingConfig;
2362
- }
2363
- interface GlobalCacheConfig {
2352
+ labelAutoGenerated?: boolean;
2353
+ /** Field control type for component resolution */
2354
+ controlType: FieldControlType;
2355
+ /** Data type for processing and validation */
2356
+ dataType?: FieldDataType;
2357
+ /** Display order in form */
2358
+ order?: number;
2359
+ /** Logical grouping of related fields */
2360
+ group?: string;
2361
+ /** Detailed description for tooltips */
2362
+ description?: string;
2363
+ /** Field is required */
2364
+ required?: boolean;
2365
+ /** Field is disabled */
2366
+ disabled?: boolean;
2367
+ /** Field is read-only */
2368
+ readOnly?: boolean;
2369
+ /** Field is hidden from display */
2370
+ hidden?: boolean;
2371
+ /** Canonical conditional visibility guard for metadata-driven forms. */
2372
+ hiddenCondition?: JsonLogicExpression | null;
2373
+ /** Default value when form initializes */
2374
+ defaultValue?: any;
2375
+ /** Placeholder text for empty fields */
2376
+ placeholder?: string;
2377
+ /** Help text displayed below field */
2378
+ hint?: string;
2379
+ /** Tooltip text on hover */
2380
+ tooltip?: string;
2381
+ /** Semantic selection mode for boolean/single/multiple choice controls */
2382
+ selectionMode?: 'boolean' | 'single' | 'multiple';
2383
+ /** Visual variant used by controls with more than one supported presentation */
2384
+ variant?: string;
2385
+ /** Comprehensive validation rules */
2386
+ validators?: ValidatorOptions;
2387
+ /** When to validate field changes */
2388
+ validationMode?: 'immediate' | 'blur' | 'submit';
2389
+ /** Debounce time for validation (ms) */
2390
+ debounceTime?: number;
2391
+ /** Validate uniqueness via API */
2392
+ unique?: boolean;
2393
+ /** Static options for selection fields */
2394
+ options?: FieldOption[];
2395
+ /** API endpoint for dynamic data loading */
2396
+ endpoint?: string;
2397
+ /** Canonical backend resource path for metadata-driven requests */
2398
+ resourcePath?: string;
2399
+ /** Canonical metadata-driven source for derived options */
2400
+ optionSource?: OptionSourceMetadata;
2401
+ /** Field name for option values */
2402
+ valueField?: string;
2403
+ /** Field name for option display text */
2404
+ displayField?: string;
2405
+ /** Field name for option filtering */
2406
+ filterField?: string;
2407
+ /** Additional query parameters for API calls */
2408
+ queryParams?: Record<string, any>;
2409
+ /** Cache duration for remote data (ms) */
2410
+ cacheDuration?: number;
2411
+ /** Field width specification */
2412
+ width?: string | number;
2413
+ /** Use flexbox sizing */
2414
+ isFlex?: boolean;
2415
+ /** Icons configuration */
2416
+ prefixIcon?: string;
2417
+ suffixIcon?: string;
2418
+ iconPosition?: 'start' | 'end';
2419
+ iconSize?: 'small' | 'medium' | 'large';
2420
+ /** Tooltip for suffix icon (used for help actions) */
2421
+ suffixIconTooltip?: string;
2422
+ /** ARIA label for suffix icon when used as help */
2423
+ suffixIconAriaLabel?: string;
2424
+ /** Input masking pattern */
2425
+ mask?: string;
2426
+ /** Format for display values */
2427
+ format?: string;
2364
2428
  /**
2365
- * Se verdadeiro, desabilita o cache persistente (LocalStorage) para schemas de metadados.
2366
- * Isso força o download do schema a cada recarga da aplicação, útil quando se deseja
2367
- * priorizar a configuração vinda do servidor ou durante desenvolvimento intenso de API.
2368
- * Default: false
2429
+ * Canonical value-presentation semantics used by read-only/display surfaces.
2430
+ *
2431
+ * When provided, this metadata should be preferred over legacy formatting
2432
+ * hints such as `format`, `currency`, `locale`, or control-specific
2433
+ * heuristics.
2369
2434
  */
2370
- disableSchemaCache?: boolean;
2435
+ valuePresentation?: ValuePresentationConfig;
2436
+ /** Material Design specific configuration */
2437
+ materialDesign?: MaterialDesignConfig;
2438
+ /** Fields this field depends on */
2439
+ dependencyFields?: string[];
2440
+ /** Canonical conditional required guard for metadata-driven forms. */
2441
+ conditionalRequired?: JsonLogicExpression | null;
2442
+ /** Canonical conditional visibility guard for metadata-driven forms. */
2443
+ conditionalDisplay?: JsonLogicExpression | null;
2444
+ /** Reset value when dependency changes */
2445
+ resetOnDependentChange?: boolean;
2446
+ /** Enable native field-to-field dependency cascade inside the same form */
2447
+ enableDependencyCascade?: boolean;
2448
+ /**
2449
+ * Map dependent field name -> backend filter key or { key, valuePath }
2450
+ * Supports dot-path in 'key' to build nested filter objects
2451
+ */
2452
+ dependencyFilterMap?: Record<string, string | {
2453
+ key: string;
2454
+ valuePath?: string;
2455
+ }>;
2456
+ /** Value path for extracting the dependent value (string or per-field map) */
2457
+ dependencyValuePath?: string | Record<string, string>;
2458
+ /** Debounce (ms) applied to combined dependencies */
2459
+ dependencyDebounceMs?: number;
2460
+ /** How to merge calculated fragment: 'replace' | 'merge' */
2461
+ dependencyMergeStrategy?: 'replace' | 'merge';
2462
+ /** When to reload on dependency change */
2463
+ dependencyLoadOnChange?: 'respectLoadOn' | 'immediate' | 'manual';
2464
+ /** Optional: suppress inline errors briefly when cascade resets value */
2465
+ suppressInlineErrorsOnCascade?: boolean;
2466
+ /** Allow inline editing in tables */
2467
+ inlineEditing?: boolean;
2468
+ /** Transform value before display */
2469
+ transformDisplayValue?: (value: any) => any;
2470
+ /** Transform value before saving */
2471
+ transformSaveValue?: (value: any) => any;
2472
+ /** Where to apply optional text transformation (editor setting) */
2473
+ textTransformApply?: 'displayOnly' | 'saveOnly' | 'both';
2474
+ /** Contexts where field should be visible */
2475
+ visibleIn?: Array<'form' | 'filter' | 'table' | 'dialog'>;
2476
+ /** Hide in specific form contexts */
2477
+ formHidden?: boolean;
2478
+ /** Hide in table contexts */
2479
+ tableHidden?: boolean;
2480
+ /** Hide in filter contexts */
2481
+ filterHidden?: boolean;
2482
+ /** ARIA label for screen readers */
2483
+ ariaLabel?: string;
2484
+ /** ARIA described by element IDs */
2485
+ ariaDescribedBy?: string;
2486
+ /** Tab index for keyboard navigation */
2487
+ tabIndex?: number;
2488
+ /** Keyboard shortcuts */
2489
+ accessKey?: string;
2371
2490
  }
2372
- interface GlobalI18nConfig {
2373
- locale?: string;
2374
- fallbackLocale?: string;
2375
- dictionaries?: Record<string, Record<string, string>>;
2376
- namespaces?: Record<string, Record<string, Record<string, string>>>;
2491
+ /**
2492
+ * Date range value object for daterange control type.
2493
+ *
2494
+ * Represents a date range selection with start and end dates,
2495
+ * commonly used in corporate reporting and analytics scenarios.
2496
+ *
2497
+ * @example
2498
+ * ```typescript
2499
+ * const quarterRange: DateRangeValue = {
2500
+ * startDate: new Date('2024-01-01'),
2501
+ * endDate: new Date('2024-03-31'),
2502
+ * preset: 'thisQuarter',
2503
+ * timezone: 'America/New_York'
2504
+ * };
2505
+ * ```
2506
+ */
2507
+ interface DateRangeValue {
2508
+ /** Start date of the range */
2509
+ startDate: Date | null;
2510
+ /** End date of the range */
2511
+ endDate: Date | null;
2512
+ /** Applied preset name if range was selected via preset */
2513
+ preset?: string;
2514
+ /** Timezone context for the range */
2515
+ timezone?: string;
2516
+ /** User-friendly label for the range */
2517
+ label?: string;
2518
+ /** Whether this is a comparison range */
2519
+ isComparison?: boolean;
2377
2520
  }
2378
- interface GlobalConfig {
2379
- crud?: GlobalCrudConfig;
2380
- dynamicFields?: GlobalDynamicFieldsConfig;
2381
- table?: GlobalTableConfig;
2382
- dialog?: GlobalDialogConfig;
2383
- i18n?: GlobalI18nConfig;
2384
- /** Dynamic routes registered at runtime (host-resolved). */
2385
- routes?: {
2386
- dynamic?: Array<{
2387
- path: string;
2388
- componentId?: string;
2389
- loadChildren?: any;
2390
- data?: Record<string, any>;
2391
- resolve?: Record<string, any>;
2392
- guards?: string[];
2393
- canMatch?: string[];
2394
- canActivateChild?: string[];
2395
- replace?: boolean;
2396
- position?: 'append' | 'prepend' | 'before-wildcard';
2397
- }>;
2398
- };
2399
- ai?: GlobalAiConfig;
2400
- cache?: GlobalCacheConfig;
2521
+ /**
2522
+ * Numeric range value object for price range fields.
2523
+ *
2524
+ * Represents a monetary range with minimum and maximum values.
2525
+ */
2526
+ interface PriceRangeValue {
2527
+ /** Lower bound of the range */
2528
+ minPrice: number | null;
2529
+ /** Upper bound of the range */
2530
+ maxPrice: number | null;
2401
2531
  }
2402
-
2403
- declare class GlobalConfigService {
2404
- private readonly storage;
2405
- private readonly bootstrapReady;
2406
- private readonly tenantResolver;
2407
- private readonly bootstrapOptions;
2408
- private tenant;
2409
- private configCache;
2410
- private configCacheKey;
2411
- private configLoadPromise;
2412
- private configLoadKey;
2413
- private storageSnapshot;
2414
- private storageSnapshotKey;
2415
- private readonly providerPartials;
2416
- private readonly changes$;
2417
- /** Emits when the global configuration changes (e.g., saved to storage). */
2418
- readonly configChanges$: rxjs.Observable<GlobalConfig | null>;
2419
- constructor();
2420
- /** Returns merged global configuration using precedence: defaults < providers < storage */
2421
- private buildConfig;
2422
- /** Blocks until the current global configuration (for the active tenant) is loaded. */
2423
- ready(): Promise<GlobalConfig | null>;
2424
- /** Ensure config cache is populated (fire-and-forget); resolves with last merged config. */
2425
- ensureConfigLoaded(opts?: {
2426
- silent?: boolean;
2427
- }): Promise<GlobalConfig | null>;
2428
- /** Persist and broadcast a new global configuration, merged on top of providers. */
2429
- saveGlobalConfig(partial: Partial<GlobalConfig>): Promise<void>;
2430
- /**
2431
- * Retrieve value at a dot-path (e.g., 'crud.defaults.openMode').
2432
- * When no path is provided, returns the entire merged configuration.
2433
- */
2434
- get<T = any>(path?: string): T | undefined;
2435
- getCrud(): GlobalConfig['crud'];
2436
- getDynamicFields(): GlobalConfig['dynamicFields'];
2437
- getTable(): GlobalConfig['table'];
2438
- getDialog(): GlobalConfig['dialog'];
2439
- getI18n(): GlobalConfig['i18n'];
2440
- /** Set current tenant (affects storage key). Pass undefined to clear. */
2441
- setTenant(tenantId?: string): void;
2442
- /** Get current tenant id (if any). */
2443
- getTenant(): string | undefined;
2444
- clearGlobalConfig(): Promise<void>;
2445
- hasStoredConfig(): boolean;
2446
- /** Compute the storage key considering current tenant */
2447
- private storageKey;
2448
- private shouldFail;
2449
- private waitForBootstrap;
2450
- private updateStorageSnapshot;
2451
- /**
2452
- * Read global schema verification preferences.
2453
- * Returns undefined when not set to allow callers to fallback to library defaults.
2454
- */
2455
- getSchemaPrefsGlobal(): {
2456
- notifyIfOutdated?: 'none' | 'inline' | 'snackbar' | 'both';
2457
- snoozeMs?: number;
2458
- autoOpenSettingsOnOutdated?: boolean;
2459
- } | undefined;
2460
- static ɵfac: i0.ɵɵFactoryDeclaration<GlobalConfigService, never>;
2461
- static ɵprov: i0.ɵɵInjectableDeclaration<GlobalConfigService>;
2462
- }
2463
-
2464
2532
  /**
2465
- * Interface para configuração de endpoints personalizados.
2466
- *
2467
- * Esta interface permite definir URLs específicas para cada operação CRUD,
2468
- * substituindo os caminhos padrão gerados pelo serviço.
2469
- *
2470
- * Os caminhos podem ser:
2471
- * - Absolutos (começando com 'http'): usados diretamente, sem modificação
2472
- * - Relativos: anexados ao URL base da API (API_URL)
2473
- *
2474
- * Exemplo:
2475
- * ```typescript
2476
- * const endpoints: EndpointConfig = {
2477
- * getAll: 'produtos/disponiveis', // Relativo: [API_URL]/produtos/disponiveis
2478
- * filter: 'https://api.externa/buscar', // Absoluto: usa URL completa
2479
- * create: 'https://api.externa/criar-produto' // Absoluto: usa URL completa
2480
- * };
2533
+ * The value for a generic numeric range slider.
2481
2534
  */
2482
- interface EndpointConfig {
2483
- getAll?: string;
2484
- getById?: string;
2485
- create?: string;
2486
- update?: string;
2487
- delete?: string;
2488
- filter?: string;
2489
- schema?: string;
2535
+ interface RangeSliderValue {
2536
+ /** Start value of the range */
2537
+ start: number | null;
2538
+ /** End value of the range */
2539
+ end: number | null;
2490
2540
  }
2491
2541
  /**
2492
- * Opções para operações CRUD que permitem personalizar comportamentos específicos.
2542
+ * Corporate preset configuration for date ranges.
2493
2543
  *
2494
- * @interface CrudOperationOptions
2544
+ * Defines common business date ranges used in enterprise applications
2545
+ * for reporting, analytics, and compliance purposes.
2495
2546
  */
2496
- interface CrudOperationOptions {
2497
- /**
2498
- * Caminho do recurso pai para recursos aninhados. Exemplo: 'clientes/123'.
2499
- * Quando fornecido, este caminho é incorporado na URL final, permitindo
2500
- * operações em recursos que pertencem a outro recurso.
2501
- *
2502
- * Exemplos de uso:
2503
- * - Obter endereços de um cliente: `getAll({ parentPath: 'clientes/123' })`
2504
- * - Criar item em uma categoria: `create(novoItem, { parentPath: 'categorias/5' })`
2505
- *
2506
- * Este parâmetro é ignorado se um endpoint personalizado estiver configurado
2507
- * para a operação específica sendo executada.
2508
- */
2509
- parentPath?: string;
2510
- /** Chave do endpoint configurado via ApiUrlConfig */
2511
- endpointKey?: ApiEndpoint;
2512
- httpContext?: HttpContext;
2513
- }
2514
- interface CrudConfigureOptions {
2515
- endpointKey?: ApiEndpoint;
2516
- apiUrlEntry?: ApiUrlEntry | null;
2517
- }
2518
- interface OptionSourceRequestOptions<ID = string | number> extends CrudOperationOptions {
2519
- includeIds?: ID[];
2520
- observeVersionHeader?: boolean;
2521
- search?: string;
2522
- }
2523
- interface BatchDeleteProgress<ID = string | number> {
2524
- id: ID;
2525
- success: boolean;
2526
- error?: unknown;
2527
- index: number;
2528
- total: number;
2529
- }
2530
- interface BatchDeleteResult<ID = string | number> {
2531
- successIds: ID[];
2532
- errors: BatchDeleteProgress<ID>[];
2533
- }
2534
- interface BatchDeleteOptions<ID = string | number> extends CrudOperationOptions {
2535
- progress?: (event: BatchDeleteProgress<ID>) => void;
2536
- cancel$?: Observable<unknown>;
2547
+ interface DateRangePreset {
2548
+ /** Unique identifier for the preset */
2549
+ id: string;
2550
+ /** Display label for the preset */
2551
+ label: string;
2552
+ /** Icon to display with the preset */
2553
+ icon?: string;
2554
+ /** Category for grouping presets */
2555
+ category?: 'standard' | 'fiscal' | 'custom' | 'comparison';
2556
+ /** Function to calculate the date range */
2557
+ calculateRange: (referenceDate?: Date) => DateRangeValue;
2558
+ /** Whether this preset is commonly used */
2559
+ isPopular?: boolean;
2560
+ /** Tooltip description */
2561
+ description?: string;
2562
+ /** Display order in preset list */
2563
+ order?: number;
2537
2564
  }
2565
+ /** Helper type for partial field metadata updates */
2566
+ type PartialFieldMetadata = Partial<FieldMetadata> & {
2567
+ name: string;
2568
+ };
2569
+ /** Helper type for required core field properties */
2570
+ type CoreFieldMetadata = Pick<FieldMetadata, 'name' | 'label' | 'controlType'>;
2571
+ /** Helper type for field metadata without computed properties */
2572
+ type SerializableFieldMetadata = Omit<FieldMetadata, 'transformDisplayValue' | 'transformSaveValue'>;
2573
+
2538
2574
  /**
2539
- * Serviço genérico para operações CRUD em APIs REST padronizadas.
2540
- *
2541
- * Permite também:
2542
- * - Trabalhar com recursos aninhados via parentPath (ex: /clientes/123/enderecos)
2543
- * - Definir endpoints customizados para cada operação
2544
- * - Obter schemas dinâmicos de entidades para geração automática de grids e formulários
2545
- *
2546
- * Utilize configure() sempre antes das operações, informando o recurso que será manipulado.
2547
- *
2548
- * Exemplo de uso:
2549
- *
2550
- * ```typescript
2551
- * crudService.configure('usuarios');
2552
- * crudService.getAll().subscribe(usuarios => { ... });
2553
- * ```
2554
- *
2555
- * @template T Tipo da entidade manipulada pelo serviço.
2575
+ * Contrato de saída do normalizador de esquema (SchemaNormalizerService):
2576
+ * - Converte metadados `x-ui` em FieldDefinition tipado.
2577
+ * - Condições booleanas declarativas serializáveis usam Json Logic canônico:
2578
+ * - conditionalDisplay: JsonLogicExpression | null
2579
+ * - conditionalRequired: JsonLogicExpression | null
2580
+ * - transformValueFunction: (val: any) => any
2581
+ * - Suporte completo a ValidatorOptions (sincronos e assíncronos),
2582
+ * incluindo mensagens e comportamento de validação (gatilhos, debounce, exibição de erros).
2556
2583
  */
2557
- declare class GenericCrudService<T, ID extends string | number = string | number> {
2558
- private http;
2559
- private schemaNormalizer;
2560
- private globalConfig;
2561
- private static readonly ERROR_MESSAGES;
2562
- private static readonly unavailableFilteredSchemaUrls;
2563
- private baseApiUrl;
2564
- private apiUrl;
2565
- private endpoints;
2566
- private apiUrlConfig;
2567
- private currentEndpointKey;
2568
- private resourcePath;
2569
- private _schemaUrl;
2570
- private configured;
2571
- private _filterSchemaCache;
2572
- private _rangeFilterFieldHints;
2573
- private _filterSchemaLoaded;
2574
- private _schemaCache?;
2575
- private schemaCacheReady?;
2576
- private _lastResourceMeta;
2577
- private _lastSchemaInfo;
2578
- /**
2579
- * Cria a instância do serviço genérico.
2580
- *
2581
- * @param http Angular HttpClient.
2582
- * @param schemaNormalizer Serviço para normalização do schema.
2583
- * @param apiUrlInjected URL base da API (via token de injeção).
2584
- */
2585
- constructor(http: HttpClient, schemaNormalizer: SchemaNormalizerService, globalConfig: GlobalConfigService, apiUrlInjected: ApiUrlConfig);
2586
- private ensureSchemaCacheReady;
2587
- private get errorMessages();
2588
- configure(resourcePath: string, endpointKeyOrOptions?: ApiEndpoint | CrudConfigureOptions): void;
2589
- /**
2590
- * Configura endpoints personalizados para cada operação CRUD, substituindo as URLs padrão.
2591
- *
2592
- * Este método permite definir caminhos específicos para cada tipo de operação (getAll, getById, etc.)
2593
- * Os endpoints podem ser:
2594
- * - Caminhos relativos: serão anexados ao baseApiUrl (ex: 'usuarios/ativos')
2595
- * - URLs absolutas: usadas diretamente (ex: 'https://api.externa.com/usuarios')
2596
- *
2597
- * Exemplo de uso:
2598
- * ```typescript
2599
- * crudService.configureEndpoints({
2600
- * getAll: 'usuarios/ativos', // GET [baseApiUrl]/usuarios/ativos
2601
- * create: 'https://api.ext/dados', // POST https://api.ext/dados
2602
- * filter: 'usuarios/busca-avancada' // POST [baseApiUrl]/usuarios/busca-avancada
2603
- * });
2604
- * ```
2605
- *
2606
- * @param customEndpoints Objeto com endpoints customizados.
2607
- */
2608
- configureEndpoints(customEndpoints: EndpointConfig): void;
2609
- /**
2610
- * Fluxo de schemas (grid e filtro)
2611
- *
2612
- * - Grid/Lista (colunas e metadados do DTO principal):
2613
- * 1) getSchema() chama GET {resource}/schemas (ex.: /api/human-resources/funcionarios/schemas)
2614
- * 2) O backend responde 302 para /schemas/filtered com query params:
2615
- * - path: {basePath}/all (ex.: /api/human-resources/funcionarios/all)
2616
- * - operation: get
2617
- * - schemaType: response
2618
- * 3) O serviço normaliza o schema retornado (x-ui) para montagem de grids e formulários.
2619
- *
2620
- * - Filtro Avançado (metadados do DTO de filtro específico do recurso):
2621
- * 1) getFilterSchema() deriva o path preservando prefixos (via schemaUrl) e garante sufixo "/filter"
2622
- * 2) Em seguida, chama getFilteredSchema({ path, operation: 'post', schemaType: 'request' })
2623
- * 3) O endpoint /schemas/filtered do backend resolve automaticamente o documento/grupo (via OpenApiGroupResolver ou inferência)
2624
- * e retorna o schema do FilterDTO concreto com as propriedades x-ui declaradas por @UISchema/@Filterable.
2625
- *
2626
- * Observações:
2627
- * - schemaUrl() preserva contextPath e prefixos como "/api", evitando erros quando há múltiplos grupos OpenAPI.
2628
- * - O parâmetro "document" em getFilteredSchema é opcional; quando omitido, o backend o resolve a partir do path.
2629
- */
2630
- /**
2631
- * Obtém o schema (metadados) do recurso, útil para construção dinâmica de grids e formulários.
2632
- *
2633
- * Fluxo:
2634
- * - Faz GET {resource}/schemas; o backend redireciona (302) para /schemas/filtered
2635
- * com path={basePath}/all, operation=get, schemaType=response.
2636
- * - O resultado é normalizado e usado para montar colunas de grid e formulários (x-ui).
2637
- *
2638
- * Exemplo:
2639
- * ```typescript
2640
- * crudService.configure('produtos');
2641
- * crudService.getSchema().subscribe(schema => { // usar metadados });
2642
- * ```
2643
- */
2644
- getSchema(options?: CrudOperationOptions): Observable<FieldDefinition[]>;
2645
- private fetchDirectSchema;
2646
- /** Retorna o campo identificador do recurso (ex.: 'id', 'codigo'), quando derivado do schema. */
2647
- getResourceIdField(): string | undefined;
2648
- /** Retorna o último schemaId e hash conhecidos após getSchema()/getFilteredSchema(). */
2649
- getLastSchemaInfo(): {
2650
- schemaId?: string;
2651
- schemaHash?: string;
2652
- };
2584
+ interface FieldDefinition {
2585
+ name: string;
2586
+ label?: string;
2587
+ description?: string;
2588
+ type?: string;
2589
+ controlType?: string;
2590
+ mode?: string;
2591
+ placeholder?: string;
2592
+ defaultValue?: any;
2593
+ group?: string;
2594
+ order?: number;
2595
+ width?: number | string;
2596
+ isFlex?: boolean;
2597
+ displayOrientation?: string;
2598
+ selectionMode?: 'boolean' | 'single' | 'multiple';
2599
+ variant?: string;
2600
+ density?: 'compact' | 'comfortable' | 'spacious';
2601
+ layout?: 'horizontal' | 'vertical';
2602
+ disabled?: boolean;
2603
+ readOnly?: boolean;
2604
+ multiple?: boolean;
2605
+ editable?: boolean;
2606
+ validationMode?: string;
2607
+ unique?: boolean;
2608
+ mask?: string;
2609
+ sortable?: boolean;
2610
+ /** Json Logic canônico que define obrigatoriedade condicional. */
2611
+ conditionalRequired?: JsonLogicExpression | null;
2612
+ viewOnlyStyle?: string;
2613
+ /** Lista de gatilhos de validação, ex.: ["blur", "change"]. */
2614
+ validationTriggers?: string[];
2615
+ hidden?: boolean;
2616
+ tableHidden?: boolean;
2617
+ formHidden?: boolean;
2618
+ filterable?: boolean;
2619
+ /** Json Logic canônico que controla se o campo é exibido. */
2620
+ conditionalDisplay?: JsonLogicExpression | null;
2621
+ dependentField?: string;
2622
+ resetOnDependentChange?: boolean;
2623
+ inlineEditing?: boolean;
2624
+ /** Função de transformação de valor antes de salvar/exibir. */
2625
+ transformValueFunction?: (val: any) => any;
2626
+ debounceTime?: number;
2627
+ helpText?: string;
2628
+ hint?: string;
2629
+ hiddenCondition?: JsonLogicExpression | null;
2630
+ tooltipOnHover?: boolean;
2631
+ icon?: string;
2632
+ iconPosition?: string;
2633
+ iconSize?: string | number;
2634
+ iconColor?: string;
2635
+ iconClass?: string;
2636
+ iconStyle?: string;
2637
+ iconFontSize?: string | number;
2638
+ valueField?: string;
2639
+ displayField?: string;
2640
+ filterField?: string;
2641
+ endpoint?: string;
2642
+ resourcePath?: string;
2643
+ optionSource?: OptionSourceMetadata;
2644
+ emptyOptionText?: string;
2645
+ options?: {
2646
+ key: string;
2647
+ value: string;
2648
+ }[];
2649
+ filter?: any;
2650
+ filterCriteria?: any;
2651
+ searchable?: boolean;
2652
+ selectAll?: boolean;
2653
+ maxSelections?: number;
2654
+ optionLabelKey?: string;
2655
+ optionValueKey?: string;
2656
+ filterOptions?: any[];
2657
+ numericFormat?: string;
2658
+ valuePresentation?: ValuePresentationConfig;
2659
+ numericStep?: number;
2660
+ numericMin?: number;
2661
+ numericMax?: number;
2662
+ numericMaxLength?: number;
2663
+ optionGroups?: {
2664
+ key: string;
2665
+ value: string;
2666
+ }[];
2667
+ disabledOptions?: string[];
2668
+ buttons?: any[];
2669
+ /** Obrigatório. */
2670
+ required?: boolean;
2671
+ requiredMessage?: string;
2672
+ /** Tamanho mínimo/máximo (strings). */
2673
+ minLength?: number;
2674
+ minLengthMessage?: string;
2675
+ maxLength?: number;
2676
+ maxLengthMessage?: string;
2677
+ /** Limites numéricos. */
2678
+ min?: number;
2679
+ max?: number;
2680
+ /** Mensagens dedicadas para min/max numéricos. */
2681
+ minMessage?: string;
2682
+ maxMessage?: string;
2683
+ /** Mensagem quando ambos limites (range) são aplicados. */
2684
+ rangeMessage?: string;
2685
+ /** Padrão (regex). Aceita pattern/regex. */
2686
+ pattern?: string;
2687
+ patternMessage?: string;
2688
+ /** Validação de e-mail. */
2689
+ email?: boolean;
2690
+ emailMessage?: string;
2691
+ /** Validação de URL. */
2692
+ url?: boolean;
2693
+ urlMessage?: string;
2694
+ /** Requer que valor combine com outro campo. */
2695
+ matchField?: string;
2696
+ matchFieldMessage?: string;
2697
+ /** Requer que o checkbox esteja marcado. */
2698
+ requiredChecked?: boolean;
2699
+ /** Tipos de arquivo permitidos e tamanho máximo. */
2700
+ allowedFileTypes?: string[];
2701
+ fileTypeMessage?: string;
2702
+ maxFileSize?: number;
2703
+ /** Validador customizado síncrono. */
2704
+ customValidator?: (value: any, model?: any) => any;
2705
+ /** Validador customizado assíncrono. */
2706
+ asyncValidator?: (value: any, model?: any) => Promise<any>;
2707
+ /** Validador de unicidade (ex.: consulta ao backend). */
2708
+ uniqueValidator?: (value: any, model?: any) => boolean | Promise<boolean>;
2709
+ uniqueMessage?: string;
2710
+ /** Regras declarativas de validação condicional baseadas no root `form`. */
2711
+ conditionalValidation?: ConditionalValidationRule[];
2712
+ /** Mínimo de palavras (para textos longos). */
2713
+ minWords?: number;
2714
+ /** Gatilho(s) de validação (alias de validationTriggers). */
2715
+ /** Tempo de debounce (ms) para executar validação. */
2716
+ validationDebounce?: number;
2717
+ /** Exibir erros inline no campo. */
2718
+ showInlineErrors?: boolean;
2719
+ /** Posição preferida da mensagem de erro (ex.: below, right). */
2720
+ errorPosition?: string;
2721
+ [key: string]: any;
2722
+ }
2723
+
2724
+ declare enum ApiEndpoint {
2725
+ Default = "default",
2726
+ HumanResources = "humanResources",
2727
+ UiWrappersTest = "uiWrappersTest"
2728
+ }
2729
+
2730
+ interface ApiUrlEntry {
2731
+ baseUrl?: string;
2732
+ path?: string;
2733
+ fullUrl?: string;
2734
+ version?: string;
2735
+ headers?: HttpHeaders | Record<string, string | string[]>;
2736
+ }
2737
+ interface ApiUrlConfig {
2738
+ [key: string]: ApiUrlEntry;
2739
+ }
2740
+ declare const API_URL: InjectionToken<ApiUrlConfig>;
2741
+ declare function buildApiUrl(entry: ApiUrlEntry): string;
2742
+ declare function buildHeaders(entry: ApiUrlEntry): HttpHeaders | undefined;
2743
+
2744
+ /**
2745
+ * SchemaNormalizerService
2746
+ * -----------------------
2747
+ * Serviço responsável por converter um esquema bruto (OpenAPI + x-ui) em uma
2748
+ * lista tipada de FieldDefinition consumida pelo restante do sistema
2749
+ * (mapeadores de metadata, criador de FormGroup, carregador de campos dinâmicos, etc.).
2750
+ *
2751
+ * Entrada esperada
2752
+ * - Objeto JSON no formato OpenAPI/JSON Schema contendo:
2753
+ * - properties: { [name: string]: { type, title, description, ... , 'x-ui': { ... } } }
2754
+ * - Em cada propriedade, o objeto 'x-ui' define aspectos de UI/validação.
2755
+ *
2756
+ * Saída (FieldDefinition[])
2757
+ * - Tipagem forte de campos com funções reais (nunca strings) para regras condicionais e validadores customizados.
2758
+ * - Todas as propriedades de validação e comportamento consolidadas no mesmo objeto do campo.
2759
+ *
2760
+ * Segurança e observações
2761
+ * - Este serviço aceita funções em formato string dentro do x-ui (ex.: uniqueValidator, conditionalValidation),
2762
+ * e as converte via new Function. Isso exige backend confiável e controlado.
2763
+ * Em ambientes não confiáveis, evite funções como string ou implemente um sandbox/whitelist.
2764
+ * - Valores booleanos/numéricos são normalizados para tipos nativos.
2765
+ * - Arrays de opções são convertidos para pares { key, value } previsíveis.
2766
+ *
2767
+ * Exemplo mínimo de entrada
2768
+ * const schema = {
2769
+ * properties: {
2770
+ * email: {
2771
+ * type: 'string',
2772
+ * title: 'E-mail',
2773
+ * 'x-ui': { controlType: 'input', type: 'string', required: true, email: true }
2774
+ * }
2775
+ * }
2776
+ * };
2777
+ * const fields = normalizer.normalizeSchema(schema);
2778
+ * // fields: [{ name: 'email', label: 'E-mail', type: 'string', controlType: 'input', required: true, email: true }]
2779
+ */
2780
+ declare class SchemaNormalizerService {
2781
+ /** Convert value to boolean. Accepts boolean, string or number. */
2782
+ private parseBoolean;
2783
+ /** Ensure an array of strings from various inputs. */
2784
+ private parseStringArray;
2785
+ /** Parse option arrays into `{ key, value }` objects. */
2786
+ private parseOptions;
2787
+ private parseOptionSource;
2788
+ private parseValuePresentation;
2653
2789
  /**
2654
- * Retorna a URL do último schema solicitado, preservando apenas o pathname.
2655
- *
2656
- * Detalhes:
2657
- * - Se getSchema() já foi chamado, reutiliza a URL armazenada.
2658
- * - Caso contrário, reconstrói a URL de schema e extrai apenas o caminho (ex.: "/api/usuarios/schemas").
2659
- * - Esse caminho é usado para derivar o path do /schemas/filtered (grid/filtro) mantendo prefixos/contextPath.
2790
+ * Converte string/Function em função real.
2791
+ * Atenção: usa `new Function` para avaliar strings – requer backend confiável.
2660
2792
  */
2661
- schemaUrl(): string;
2793
+ private parseFunction;
2794
+ /** Parse a transform function: (val: any) => any */
2795
+ private parseTransformFunction;
2796
+ private parseConditionalValidationRules;
2662
2797
  /**
2663
- * Obtém um schema filtrado diretamente do endpoint `/schemas/filtered`.
2664
- *
2665
- * Como monta a chamada:
2666
- * - path: por padrão, usa schemaUrl().replace(/\/schemas$/, '') (ex.: "/api/usuarios")
2667
- * - operation, schemaType: informados pelo chamador (ex.: get/response para grid, post/request para filtro)
2668
- * - document: opcional; o backend resolve automaticamente quando omitido
2669
- * - includeInternalSchemas: quando true, o backend expande $ref internos (custo maior)
2798
+ * Extrai e normaliza propriedades de validação a partir do objeto x-ui.
2799
+ * Suporta: required, min/max, minLength/maxLength, pattern/regex, email, url,
2800
+ * matchField, uniqueValidator (+message), conditionalValidation, requiredChecked,
2801
+ * arquivos (allowedFileTypes, fileTypeMessage, maxFileSize), custom/async validators,
2802
+ * minWords e comportamento (validationTrigger(s), validationDebounce, showInlineErrors, errorPosition).
2670
2803
  */
2671
- getFilteredSchema(params: {
2672
- path?: string;
2673
- document?: string;
2674
- operation?: string;
2675
- includeInternalSchemas?: boolean;
2676
- schemaType?: string;
2677
- endpointKey?: ApiEndpoint;
2678
- httpContext?: HttpContext;
2679
- }): Observable<FieldDefinition[]>;
2804
+ private parseValidators;
2805
+ /** Parse array of button definitions. */
2806
+ private parseButtons;
2807
+ private parseJsonLogicExpression;
2808
+ private resolveNonEmptyStringToken;
2809
+ private isNumericSchemaType;
2810
+ private resolveNumericFormatToken;
2680
2811
  /**
2681
- * Retorna todos os registros do recurso.
2812
+ * Converte o schema bruto do backend (OpenAPI + x-ui) em FieldDefinition[] tipado.
2813
+ * Regras:
2814
+ * - Ignora propriedades sem x-ui.
2815
+ * - Garante ordenação por 'order' quando presente.
2816
+ * - Funções condicionais/transformações sempre viram funções reais.
2682
2817
  *
2683
- * Exemplo:
2684
- * ```typescript
2685
- * crudService.configure('clientes');
2686
- * crudService.getAll().subscribe(clientes => { ... });
2687
- * ```
2688
- *
2689
- * Para recurso aninhado:
2690
- * ```typescript
2691
- * crudService.configure('enderecos');
2692
- * crudService.getAll({ parentPath: 'clientes/123' }).subscribe(enderecos => { ... });
2693
- * ```
2694
- *
2695
- * @param options Parâmetros opcionais, incluindo parentPath.
2696
- * @returns Observable com array de entidades.
2697
- */
2698
- getAll(options?: CrudOperationOptions): Observable<T[]>;
2699
- getAllResponse(options?: CrudOperationOptions): Observable<RestApiResponse<T[]>>;
2700
- /**
2701
- * Retorna um registro pelo seu ID.
2702
- *
2703
- * Exemplo:
2704
- * ```typescript
2705
- * crudService.configure('usuarios');
2706
- * crudService.getById(10).subscribe(usuario => { ... });
2707
- * ```
2708
- *
2709
- * Para recurso aninhado:
2710
- * ```typescript
2711
- * crudService.configure('enderecos');
2712
- * crudService.getById(5, { parentPath: 'clientes/123' }).subscribe(endereco => { ... });
2713
- * ```
2714
- *
2715
- * @param id Identificador único do registro.
2716
- * @param options Parâmetros opcionais, incluindo parentPath.
2717
- * @returns Observable com a entidade encontrada.
2718
- */
2719
- getById(id: ID, options?: CrudOperationOptions): Observable<T>;
2720
- getByIdResponse(id: ID, options?: CrudOperationOptions): Observable<RestApiResponse<T>>;
2721
- /**
2722
- * Cria um novo registro.
2723
- *
2724
- * Exemplo:
2725
- * ```typescript
2726
- * crudService.configure('produtos');
2727
- * crudService.create({ nome: 'Mouse', preco: 50 }).subscribe(produto => { ... });
2728
- * ```
2729
- *
2730
- * Para recurso aninhado:
2731
- * ```typescript
2732
- * crudService.configure('enderecos');
2733
- * crudService.create({ rua: 'Rua Nova' }, { parentPath: 'clientes/123' }).subscribe(endereco => { ... });
2734
- * ```
2735
- *
2736
- * @param entity Entidade a ser criada.
2737
- * @param options Parâmetros opcionais, incluindo parentPath.
2738
- * @returns Observable com a entidade criada.
2739
- */
2740
- create(entity: T, options?: CrudOperationOptions): Observable<T>;
2741
- createResponse(entity: T, options?: CrudOperationOptions): Observable<RestApiResponse<T>>;
2742
- /**
2743
- * Atualiza um registro existente.
2744
- *
2745
- * Exemplo:
2746
- * ```typescript
2747
- * crudService.configure('usuarios');
2748
- * crudService.update(10, { nome: 'Novo Nome' }).subscribe(usuario => { ... });
2749
- * ```
2750
- *
2751
- * Para recurso aninhado:
2752
- * ```typescript
2753
- * crudService.configure('enderecos');
2754
- * crudService.update(2, { rua: 'Rua Alterada' }, { parentPath: 'clientes/123' }).subscribe(endereco => { ... });
2755
- * ```
2756
- *
2757
- * @param id Identificador único do registro.
2758
- * @param entity Entidade atualizada.
2759
- * @param options Parâmetros opcionais, incluindo parentPath.
2760
- * @returns Observable com a entidade atualizada.
2818
+ * @param schema Objeto OpenAPI/JSON Schema com properties e x-ui por propriedade.
2819
+ * @returns FieldDefinition[] prontos para mapeamento/uso no restante do sistema.
2761
2820
  */
2762
- update(id: ID, entity: T, options?: CrudOperationOptions): Observable<T>;
2763
- updateResponse(id: ID, entity: T, options?: CrudOperationOptions): Observable<RestApiResponse<T>>;
2821
+ normalizeSchema(schema: any): FieldDefinition[];
2822
+ private resolveFieldType;
2823
+ static ɵfac: i0.ɵɵFactoryDeclaration<SchemaNormalizerService, never>;
2824
+ static ɵprov: i0.ɵɵInjectableDeclaration<SchemaNormalizerService>;
2825
+ }
2826
+
2827
+ type TableConfig = TableConfigV2;
2828
+
2829
+ /**
2830
+ * Cria uma configuração padrão para TableConfig
2831
+ */
2832
+ declare function createDefaultTableConfig(): TableConfig;
2833
+ /**
2834
+ * Valida se uma configuração TableConfig é válida
2835
+ */
2836
+ declare function isValidTableConfig(config: any): config is TableConfig;
2837
+ /**
2838
+ * Clona profundamente uma configuração TableConfig
2839
+ */
2840
+ declare function cloneTableConfig(config: TableConfig): TableConfig;
2841
+ /**
2842
+ * Merge duas configurações TableConfig, priorizando a segunda
2843
+ */
2844
+ declare function mergeTableConfigs(base: TableConfig, override: Partial<TableConfig>): TableConfig;
2845
+ /**
2846
+ * Extrai apenas as configurações essenciais para compatibilidade
2847
+ */
2848
+ declare function getEssentialConfig(config: TableConfig): Partial<TableConfig>;
2849
+ /**
2850
+ * @deprecated Use TableConfig instead
2851
+ */
2852
+ type LegacyTableConfig = TableConfig;
2853
+ /**
2854
+ * @deprecated Use createDefaultTableConfig instead
2855
+ */
2856
+ declare const DEFAULT_TABLE_CONFIG: TableConfigV2;
2857
+
2858
+ type GlobalDialogAriaRole = 'dialog' | 'alertdialog';
2859
+ interface GlobalDialogPosition {
2860
+ top?: string;
2861
+ bottom?: string;
2862
+ left?: string;
2863
+ right?: string;
2864
+ }
2865
+ interface GlobalDialogAction {
2866
+ id?: string;
2867
+ text: string;
2868
+ role?: 'primary' | 'secondary' | 'danger' | 'close' | 'custom';
2869
+ close?: boolean;
2870
+ icon?: string | null;
2871
+ svgIcon?: string | null;
2872
+ fillMode?: 'solid' | 'flat' | 'outline';
2873
+ themeColor?: 'primary' | 'accent' | 'warn' | 'neutral';
2874
+ cssClass?: string | string[] | Record<string, boolean>;
2875
+ }
2876
+ interface GlobalDialogAnimation {
2877
+ type?: 'translate' | 'slide' | 'fade' | 'expand' | 'zoom';
2878
+ direction?: 'up' | 'down' | 'left' | 'right';
2879
+ duration?: number;
2880
+ easing?: string;
2881
+ }
2882
+ interface GlobalDialogStyles {
2883
+ actionsAlignment?: 'start' | 'center' | 'end' | 'stretched';
2884
+ actionsPadding?: string;
2885
+ containerElevationShadow?: string;
2886
+ containerMaxWidth?: string;
2887
+ containerMinWidth?: string;
2888
+ containerShape?: string;
2889
+ containerBorderColor?: string;
2890
+ containerSmallMaxWidth?: string;
2891
+ contentPadding?: string;
2892
+ headlinePadding?: string;
2893
+ withActionsContentPadding?: string;
2894
+ backdropColor?: string;
2895
+ actionButtonRadius?: string;
2896
+ actionButtonMinHeight?: string;
2897
+ actionButtonPadding?: string;
2898
+ containerColor?: string;
2899
+ subheadColor?: string;
2900
+ supportingTextColor?: string;
2901
+ subheadFont?: string;
2902
+ subheadLineHeight?: string;
2903
+ subheadSize?: string;
2904
+ subheadTracking?: string;
2905
+ subheadWeight?: string | number;
2906
+ supportingTextFont?: string;
2907
+ supportingTextLineHeight?: string;
2908
+ supportingTextSize?: string;
2909
+ supportingTextTracking?: string;
2910
+ supportingTextWeight?: string | number;
2911
+ }
2912
+ interface GlobalDialogConfigEntry {
2913
+ title?: string;
2914
+ themeColor?: 'primary' | 'light' | 'dark';
2915
+ ariaRole?: GlobalDialogAriaRole;
2916
+ message?: string;
2917
+ icon?: string | null;
2918
+ width?: string | number | null;
2919
+ height?: string | number | null;
2920
+ minWidth?: string | number | null;
2921
+ maxWidth?: string | number | null;
2922
+ minHeight?: string | number | null;
2923
+ maxHeight?: string | number | null;
2924
+ disableClose?: boolean;
2925
+ hasBackdrop?: boolean;
2926
+ closeOnBackdropClick?: boolean;
2927
+ panelClass?: string | string[] | Record<string, boolean>;
2928
+ backdropClass?: string | string[] | Record<string, boolean>;
2929
+ position?: GlobalDialogPosition;
2930
+ animation?: boolean | GlobalDialogAnimation;
2931
+ styles?: GlobalDialogStyles;
2932
+ actions?: GlobalDialogAction[];
2933
+ }
2934
+ interface GlobalDialogConfig {
2935
+ defaults?: {
2936
+ confirm?: GlobalDialogConfigEntry;
2937
+ alert?: GlobalDialogConfigEntry;
2938
+ prompt?: GlobalDialogConfigEntry;
2939
+ };
2940
+ variants?: Record<string, GlobalDialogConfigEntry>;
2941
+ }
2942
+
2943
+ type FormOpenMode = 'route' | 'modal' | 'drawer';
2944
+ interface GlobalCrudActionDefaults {
2945
+ openMode?: FormOpenMode;
2946
+ route?: string;
2947
+ formId?: string;
2948
+ }
2949
+ interface GlobalCrudDefaults {
2950
+ openMode?: FormOpenMode;
2951
+ modal?: Record<string, any>;
2952
+ back?: Record<string, any>;
2953
+ header?: Record<string, any>;
2764
2954
  /**
2765
- * Remove um registro pelo ID.
2766
- *
2767
- * Exemplo:
2768
- * ```typescript
2769
- * crudService.configure('usuarios');
2770
- * crudService.delete(5).subscribe(() => { ... });
2771
- * ```
2772
- *
2773
- * Para recurso aninhado:
2774
- * ```typescript
2775
- * crudService.configure('enderecos');
2776
- * crudService.delete(2, { parentPath: 'clientes/123' }).subscribe(() => { ... });
2777
- * ```
2778
- *
2779
- * @param id Identificador único do registro.
2780
- * @param options Parâmetros opcionais, incluindo parentPath.
2781
- * @returns Observable vazio quando a remoção for bem-sucedida.
2955
+ * Quando usado via <praxis-crud>, habilita automaticamente a coluna de ações por linha
2956
+ * com base nas ações declaradas (ex.: view/edit). Desligue para controlar manualmente.
2957
+ * Default: true
2782
2958
  */
2783
- delete(id: ID, options?: CrudOperationOptions): Observable<void>;
2784
- deleteResponse(id: ID, options?: CrudOperationOptions): Observable<RestApiResponse<void>>;
2959
+ autoRowActions?: boolean;
2785
2960
  /**
2786
- * Realiza exclusão de múltiplos registros sequencialmente.
2787
- * Emite progresso opcionalmente e permite cancelamento via Observable.
2961
+ * Formato padrão para exibição das ações de linha geradas automaticamente.
2962
+ * Default: 'icons'
2788
2963
  */
2789
- deleteMany(ids: Array<ID>, options?: BatchDeleteOptions<ID>): Observable<BatchDeleteResult<ID>>;
2964
+ rowActionsDisplay?: 'icons' | 'buttons' | 'menu';
2790
2965
  /**
2791
- * Realiza busca paginada e filtrada conforme critérios informados.
2792
- *
2793
- * Exemplo:
2794
- * ```typescript
2795
- * crudService.configure('produtos');
2796
- * crudService.filter({ categoria: 'Eletrônicos' }, { pageNumber: 0, pageSize: 10 })
2797
- * .subscribe(page => { ... });
2798
- * ```
2799
- *
2800
- * @param filterCriteria Critérios para filtragem.
2801
- * @param pageable Opções de paginação.
2802
- * @param options Parâmetros opcionais, incluindo parentPath.
2803
- * @returns Observable com página de entidades.
2966
+ * Inclui ação de delete na coluna de ações quando houver ação 'delete' declarada.
2967
+ * Por padrão permanece desabilitado para evitar comportamentos não intencionais.
2804
2968
  */
2805
- filter(filterCriteria: any, pageable: PageableRequest): Observable<Page<T>>;
2806
- filter(filterCriteria: any, pageable: PageableRequest, opts: FilterOptions): Observable<Page<T> & {
2807
- dataVersion?: string;
2808
- }>;
2809
- filter(filterCriteria: any, pageable: PageableRequest, opts: FilterOptions & CrudOperationOptions): Observable<Page<T> & {
2810
- dataVersion?: string;
2811
- }>;
2812
- filterResponse(filterCriteria: any, pageable: PageableRequest): Observable<RestApiResponse<Page<T>>>;
2813
- filterResponse(filterCriteria: any, pageable: PageableRequest, opts: FilterOptions): Observable<RestApiResponse<Page<T>> & {
2814
- dataVersion?: string;
2815
- }>;
2816
- filterResponse(filterCriteria: any, pageable: PageableRequest, opts: FilterOptions & CrudOperationOptions): Observable<RestApiResponse<Page<T>> & {
2817
- dataVersion?: string;
2818
- }>;
2819
- /** GET /by-ids */
2820
- getByIds(ids: ID[], options?: CrudOperationOptions): Observable<T[]>;
2821
- /** OPTIONS: POST /options/filter */
2822
- filterOptions(criteria: any, pageable: PageableRequest, opts: FilterOptions<ID> & CrudOperationOptions): Observable<Page<OptionDTO<ID>> & {
2823
- dataVersion?: string;
2824
- }>;
2825
- /** OPTION SOURCES: POST /option-sources/{sourceKey}/options/filter */
2826
- filterOptionSourceOptions(sourceKey: string, criteria: any, pageable: PageableRequest, opts?: OptionSourceRequestOptions<ID>): Observable<Page<OptionDTO<any>> & {
2827
- dataVersion?: string;
2828
- }>;
2829
- /** OPTIONS: GET /options/by-ids */
2830
- getOptionsByIds(ids: ID[], options?: CrudOperationOptions): Observable<OptionDTO<ID>[]>;
2831
- /** OPTION SOURCES: GET /option-sources/{sourceKey}/options/by-ids */
2832
- getOptionSourceOptionsByIds(sourceKey: string, ids: Array<string | number>, options?: CrudOperationOptions): Observable<OptionDTO<any>[]>;
2833
- /** CURSOR: POST /filter/cursor */
2834
- filterByCursor(criteria: any, cursorReq?: CursorRequest, options?: CrudOperationOptions): Observable<CursorPage<T>>;
2835
- /** LOCATE: POST /locate */
2836
- locate(criteria: any, id: ID, locateReq: LocateRequest, options?: CrudOperationOptions): Observable<{
2837
- position: number;
2838
- page: number;
2839
- }>;
2840
- /**
2841
- * Realiza uma requisição HTTP genérica.
2842
- *
2843
- * Exemplo:
2844
- * ```typescript
2845
- * crudService.genericEndpoint<{ resultado: string }>(
2846
- * 'https://api.meusite.com/teste', 'POST', { parametro: 123 }
2847
- * ).subscribe(resposta => { ... });
2848
- * ```
2849
- *
2850
- * @template R Tipo do dado esperado na resposta.
2851
- * @param url URL completa da requisição.
2852
- * @param method Método HTTP (GET, POST, PUT, DELETE, PATCH).
2853
- * @param body Corpo da requisição (opcional).
2854
- * @param params HttpParams opcionais.
2855
- * @returns Observable de resposta do tipo informado.
2856
- */
2857
- genericEndpoint<R>(url: string, method?: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH', body?: any, params?: HttpParams): Observable<R>;
2858
- /**
2859
- * Obtém o schema do DTO de filtro do endpoint POST /{resource}/filter.
2860
- *
2861
- * Fluxo:
2862
- * - Deriva o path a partir de schemaUrl() e garante o sufixo "/filter"
2863
- * - Chama getFilteredSchema com operation='post' e schemaType='request'
2864
- * - Usa cache por chave (endpointKey|path|post|request|includeInternal) para compartilhamento entre assinantes
2865
- */
2866
- getFilterSchema(options?: {
2867
- path?: string;
2868
- includeInternalSchemas?: boolean;
2869
- endpointKey?: ApiEndpoint;
2870
- cache?: boolean;
2871
- }): rxjs.Observable<FieldDefinition[]>;
2872
- private ensureConfigured;
2873
- private resolveEndpointEntry;
2874
- /**
2875
- * Constrói a URL completa para uma determinada operação CRUD, considerando endpoints personalizados e caminhos pai.
2876
- *
2877
- * Este método usa a seguinte ordem de prioridade:
2878
- * 1. Endpoint personalizado definido pelo usuário (via configureEndpoints)
2879
- * 2. Construção padrão de URL baseada no recurso configurado
2880
- *
2881
- * Para recursos aninhados, o parentPath é incorporado na URL final (ex: /clientes/123/enderecos).
2882
- *
2883
- * @param operation - A operação CRUD a ser executada (getAll, getById, create, update, delete, filter, schema)
2884
- * @param id - Identificador opcional para operações que exigem ID (getById, update, delete)
2885
- * @param parentPath - Caminho do recurso pai opcional para recursos aninhados (ex: 'clientes/123')
2886
- * @param endpointKey - Chave de endpoint (quando houver múltiplas bases configuradas)
2887
- * @returns A URL completa para a requisição à API
2888
- * @throws Error quando o ID é obrigatório mas não fornecido, ou quando o serviço não está configurado
2889
- */
2890
- private getEndpointUrl;
2891
- private getResourceBaseUrl;
2892
- /**
2893
- * Resolve `/schemas/filtered` base URL honoring ApiUrlConfig (supports APIs on another origin).
2894
- */
2895
- getSchemasFilteredBaseUrl(endpointKey?: ApiEndpoint): string;
2896
- private normalizeRangeCriteria;
2897
- private normalizeRangeNode;
2898
- private tryCollapseRangeObject;
2899
- private coerceBoundsArray;
2900
- private buildCanonicalBounds;
2901
- private shouldSwapBounds;
2902
- private tryParseNumeric;
2903
- private tryParseDateMillis;
2904
- private isRangeOnlyObject;
2905
- private resolveRangeAliases;
2906
- private findExistingKey;
2907
- private normalizeRangeBound;
2908
- private isRangeValue;
2909
- private isPlainObject;
2910
- private updateRangeFieldHints;
2911
- private hasRangeFieldMetadata;
2912
- private normalizeControlTypeToken;
2913
- private isRangeControlType;
2914
- private looksLikeRangeFieldName;
2915
- private lowerDateAliases;
2916
- private upperDateAliases;
2917
- private lowerMoneyAliases;
2918
- private upperMoneyAliases;
2919
- private lowerGenericAliases;
2920
- private upperGenericAliases;
2921
- /**
2922
- * Manipula erros de requisição HTTP.
2923
- */
2924
- private handleError;
2969
+ includeDeleteInRow?: boolean;
2970
+ }
2971
+ interface GlobalCrudConfig {
2972
+ defaults?: GlobalCrudDefaults;
2973
+ actionDefaults?: Record<string, GlobalCrudActionDefaults>;
2974
+ }
2975
+ interface GlobalDynamicFieldsAsyncSelectConfig {
2976
+ loadOn?: 'open' | 'init' | 'none';
2977
+ pageSize?: number;
2978
+ useCursor?: boolean;
2979
+ }
2980
+ interface GlobalDynamicFieldsCascadeConfig {
2981
+ enable?: boolean;
2982
+ loadOnChange?: 'respectLoadOn' | 'immediate' | 'manual';
2983
+ debounceMs?: number;
2984
+ }
2985
+ interface GlobalDynamicFieldsConfig {
2986
+ asyncSelect?: GlobalDynamicFieldsAsyncSelectConfig;
2987
+ cascade?: GlobalDynamicFieldsCascadeConfig;
2988
+ }
2989
+ type GlobalTableConfig = (Partial<Pick<TableConfig, 'behavior' | 'appearance' | 'toolbar' | 'actions' | 'messages' | 'localization' | 'performance'>> & {
2990
+ /** UI defaults specific to the PraxisFilter (above the table) */
2991
+ filteringUi?: {
2992
+ overlayVariant?: 'card' | 'frosted';
2993
+ overlayBackdrop?: boolean;
2994
+ advancedOpenMode?: 'overlay' | 'modal' | 'drawer';
2995
+ };
2996
+ });
2997
+ type GlobalAiProvider = 'gemini' | 'openai' | 'xai' | 'mock';
2998
+ interface GlobalAiEmbeddingConfig {
2999
+ useSameAsLlm?: boolean;
3000
+ provider?: GlobalAiProvider;
3001
+ apiKey?: string;
3002
+ apiKeyLast4?: string;
3003
+ hasApiKey?: boolean;
3004
+ model?: string;
3005
+ dimensions?: number;
3006
+ }
3007
+ interface GlobalAiConfig {
3008
+ provider?: GlobalAiProvider;
3009
+ /** Policy for UI confirmation on risky AI patches. */
3010
+ riskPolicy?: 'strict' | 'standard';
3011
+ apiKey?: string;
3012
+ apiKeyLast4?: string;
3013
+ hasApiKey?: boolean;
3014
+ model?: string;
3015
+ temperature?: number;
3016
+ maxTokens?: number;
3017
+ embedding?: GlobalAiEmbeddingConfig;
3018
+ }
3019
+ interface GlobalCacheConfig {
2925
3020
  /**
2926
- * Desembrulha respostas no formato RestApiResponse<Page<T>> para Page<T>.
2927
- * Mantém compatibilidade quando a API retorna Page<T> diretamente.
3021
+ * Se verdadeiro, desabilita o cache persistente (LocalStorage) para schemas de metadados.
3022
+ * Isso força o download do schema a cada recarga da aplicação, útil quando se deseja
3023
+ * priorizar a configuração vinda do servidor ou durante desenvolvimento intenso de API.
3024
+ * Default: false
2928
3025
  */
2929
- private unwrapPageResponse;
2930
- private normalizeRestApiResponse;
2931
- static ɵfac: i0.ɵɵFactoryDeclaration<GenericCrudService<any, any>, never>;
2932
- static ɵprov: i0.ɵɵInjectableDeclaration<GenericCrudService<any, any>>;
3026
+ disableSchemaCache?: boolean;
2933
3027
  }
2934
-
2935
- interface TableConfigState {
2936
- config: TableConfig;
2937
- isLoading: boolean;
2938
- error?: string;
3028
+ interface GlobalI18nConfig {
3029
+ locale?: string;
3030
+ fallbackLocale?: string;
3031
+ dictionaries?: Record<string, Record<string, string>>;
3032
+ namespaces?: Record<string, Record<string, Record<string, string>>>;
2939
3033
  }
2940
- declare class TableConfigService {
2941
- private readonly _state$;
2942
- readonly state$: Observable<TableConfigState>;
3034
+ interface GlobalConfig {
3035
+ crud?: GlobalCrudConfig;
3036
+ dynamicFields?: GlobalDynamicFieldsConfig;
3037
+ table?: GlobalTableConfig;
3038
+ dialog?: GlobalDialogConfig;
3039
+ i18n?: GlobalI18nConfig;
3040
+ /** Dynamic routes registered at runtime (host-resolved). */
3041
+ routes?: {
3042
+ dynamic?: Array<{
3043
+ path: string;
3044
+ componentId?: string;
3045
+ loadChildren?: any;
3046
+ data?: Record<string, any>;
3047
+ resolve?: Record<string, any>;
3048
+ guards?: string[];
3049
+ canMatch?: string[];
3050
+ canActivateChild?: string[];
3051
+ replace?: boolean;
3052
+ position?: 'append' | 'prepend' | 'before-wildcard';
3053
+ }>;
3054
+ };
3055
+ ai?: GlobalAiConfig;
3056
+ cache?: GlobalCacheConfig;
3057
+ }
3058
+
3059
+ declare class GlobalConfigService {
3060
+ private readonly storage;
3061
+ private readonly bootstrapReady;
3062
+ private readonly tenantResolver;
3063
+ private readonly bootstrapOptions;
3064
+ private tenant;
3065
+ private configCache;
3066
+ private configCacheKey;
3067
+ private configLoadPromise;
3068
+ private configLoadKey;
3069
+ private storageSnapshot;
3070
+ private storageSnapshotKey;
3071
+ private readonly providerPartials;
3072
+ private readonly changes$;
3073
+ /** Emits when the global configuration changes (e.g., saved to storage). */
3074
+ readonly configChanges$: rxjs.Observable<GlobalConfig | null>;
2943
3075
  constructor();
3076
+ /** Returns merged global configuration using precedence: defaults < providers < storage */
3077
+ private buildConfig;
3078
+ /** Blocks until the current global configuration (for the active tenant) is loaded. */
3079
+ ready(): Promise<GlobalConfig | null>;
3080
+ /** Ensure config cache is populated (fire-and-forget); resolves with last merged config. */
3081
+ ensureConfigLoaded(opts?: {
3082
+ silent?: boolean;
3083
+ }): Promise<GlobalConfig | null>;
3084
+ /** Persist and broadcast a new global configuration, merged on top of providers. */
3085
+ saveGlobalConfig(partial: Partial<GlobalConfig>): Promise<void>;
2944
3086
  /**
2945
- * Obtém o estado atual da configuração
2946
- */
2947
- get currentState(): TableConfigState;
2948
- /**
2949
- * Obtém a configuração atual
3087
+ * Retrieve value at a dot-path (e.g., 'crud.defaults.openMode').
3088
+ * When no path is provided, returns the entire merged configuration.
2950
3089
  */
2951
- get currentConfig(): TableConfig;
2952
- /**
2953
- * Observable da configuração atual
2954
- */
2955
- get config$(): Observable<TableConfig>;
2956
- /**
2957
- * Carrega uma nova configuração
2958
- */
2959
- loadConfig(config: TableConfig): void;
2960
- /**
2961
- * Atualiza a configuração atual
2962
- */
2963
- updateConfig(configUpdate: Partial<TableConfig>): void;
3090
+ get<T = any>(path?: string): T | undefined;
3091
+ getCrud(): GlobalConfig['crud'];
3092
+ getDynamicFields(): GlobalConfig['dynamicFields'];
3093
+ getTable(): GlobalConfig['table'];
3094
+ getDialog(): GlobalConfig['dialog'];
3095
+ getI18n(): GlobalConfig['i18n'];
3096
+ /** Set current tenant (affects storage key). Pass undefined to clear. */
3097
+ setTenant(tenantId?: string): void;
3098
+ /** Get current tenant id (if any). */
3099
+ getTenant(): string | undefined;
3100
+ clearGlobalConfig(): Promise<void>;
3101
+ hasStoredConfig(): boolean;
3102
+ /** Compute the storage key considering current tenant */
3103
+ private storageKey;
3104
+ private shouldFail;
3105
+ private waitForBootstrap;
3106
+ private updateStorageSnapshot;
2964
3107
  /**
2965
- * Atualiza configuração de coluna específica
3108
+ * Read global schema verification preferences.
3109
+ * Returns undefined when not set to allow callers to fallback to library defaults.
2966
3110
  */
2967
- updateColumn(columnIndex: number, columnUpdate: Partial<ColumnDefinition>): void;
3111
+ getSchemaPrefsGlobal(): {
3112
+ notifyIfOutdated?: 'none' | 'inline' | 'snackbar' | 'both';
3113
+ snoozeMs?: number;
3114
+ autoOpenSettingsOnOutdated?: boolean;
3115
+ } | undefined;
3116
+ static ɵfac: i0.ɵɵFactoryDeclaration<GlobalConfigService, never>;
3117
+ static ɵprov: i0.ɵɵInjectableDeclaration<GlobalConfigService>;
3118
+ }
3119
+
3120
+ /**
3121
+ * Interface para configuração de endpoints personalizados.
3122
+ *
3123
+ * Esta interface permite definir URLs específicas para cada operação CRUD,
3124
+ * substituindo os caminhos padrão gerados pelo serviço.
3125
+ *
3126
+ * Os caminhos podem ser:
3127
+ * - Absolutos (começando com 'http'): usados diretamente, sem modificação
3128
+ * - Relativos: anexados ao URL base da API (API_URL)
3129
+ *
3130
+ * Exemplo:
3131
+ * ```typescript
3132
+ * const endpoints: EndpointConfig = {
3133
+ * getAll: 'produtos/disponiveis', // Relativo: [API_URL]/produtos/disponiveis
3134
+ * filter: 'https://api.externa/buscar', // Absoluto: usa URL completa
3135
+ * create: 'https://api.externa/criar-produto' // Absoluto: usa URL completa
3136
+ * };
3137
+ */
3138
+ interface EndpointConfig {
3139
+ getAll?: string;
3140
+ getById?: string;
3141
+ create?: string;
3142
+ update?: string;
3143
+ delete?: string;
3144
+ filter?: string;
3145
+ schema?: string;
3146
+ }
3147
+ /**
3148
+ * Opções para operações CRUD que permitem personalizar comportamentos específicos.
3149
+ *
3150
+ * @interface CrudOperationOptions
3151
+ */
3152
+ interface CrudOperationOptions {
2968
3153
  /**
2969
- * Adiciona nova coluna
3154
+ * Caminho do recurso pai para recursos aninhados. Exemplo: 'clientes/123'.
3155
+ * Quando fornecido, este caminho é incorporado na URL final, permitindo
3156
+ * operações em recursos que pertencem a outro recurso.
3157
+ *
3158
+ * Exemplos de uso:
3159
+ * - Obter endereços de um cliente: `getAll({ parentPath: 'clientes/123' })`
3160
+ * - Criar item em uma categoria: `create(novoItem, { parentPath: 'categorias/5' })`
3161
+ *
3162
+ * Este parâmetro é ignorado se um endpoint personalizado estiver configurado
3163
+ * para a operação específica sendo executada.
2970
3164
  */
2971
- addColumn(column: ColumnDefinition): void;
3165
+ parentPath?: string;
3166
+ /** Chave do endpoint configurado via ApiUrlConfig */
3167
+ endpointKey?: ApiEndpoint;
3168
+ httpContext?: HttpContext;
3169
+ }
3170
+ interface CrudConfigureOptions {
3171
+ endpointKey?: ApiEndpoint;
3172
+ apiUrlEntry?: ApiUrlEntry | null;
3173
+ }
3174
+ interface OptionSourceRequestOptions<ID = string | number> extends CrudOperationOptions {
3175
+ includeIds?: ID[];
3176
+ observeVersionHeader?: boolean;
3177
+ search?: string;
3178
+ }
3179
+ interface BatchDeleteProgress<ID = string | number> {
3180
+ id: ID;
3181
+ success: boolean;
3182
+ error?: unknown;
3183
+ index: number;
3184
+ total: number;
3185
+ }
3186
+ interface BatchDeleteResult<ID = string | number> {
3187
+ successIds: ID[];
3188
+ errors: BatchDeleteProgress<ID>[];
3189
+ }
3190
+ interface BatchDeleteOptions<ID = string | number> extends CrudOperationOptions {
3191
+ progress?: (event: BatchDeleteProgress<ID>) => void;
3192
+ cancel$?: Observable<unknown>;
3193
+ }
3194
+ /**
3195
+ * Serviço genérico para operações CRUD em APIs REST padronizadas.
3196
+ *
3197
+ * Permite também:
3198
+ * - Trabalhar com recursos aninhados via parentPath (ex: /clientes/123/enderecos)
3199
+ * - Definir endpoints customizados para cada operação
3200
+ * - Obter schemas dinâmicos de entidades para geração automática de grids e formulários
3201
+ *
3202
+ * Utilize configure() sempre antes das operações, informando o recurso que será manipulado.
3203
+ *
3204
+ * Exemplo de uso:
3205
+ *
3206
+ * ```typescript
3207
+ * crudService.configure('usuarios');
3208
+ * crudService.getAll().subscribe(usuarios => { ... });
3209
+ * ```
3210
+ *
3211
+ * @template T Tipo da entidade manipulada pelo serviço.
3212
+ */
3213
+ declare class GenericCrudService<T, ID extends string | number = string | number> {
3214
+ private http;
3215
+ private schemaNormalizer;
3216
+ private globalConfig;
3217
+ private static readonly ERROR_MESSAGES;
3218
+ private static readonly unavailableFilteredSchemaUrls;
3219
+ private baseApiUrl;
3220
+ private apiUrl;
3221
+ private endpoints;
3222
+ private apiUrlConfig;
3223
+ private currentEndpointKey;
3224
+ private resourcePath;
3225
+ private _schemaUrl;
3226
+ private configured;
3227
+ private _filterSchemaCache;
3228
+ private _rangeFilterFieldHints;
3229
+ private _filterSchemaLoaded;
3230
+ private _schemaCache?;
3231
+ private schemaCacheReady?;
3232
+ private _lastResourceMeta;
3233
+ private _lastSchemaInfo;
2972
3234
  /**
2973
- * Remove coluna por índice
3235
+ * Cria a instância do serviço genérico.
3236
+ *
3237
+ * @param http Angular HttpClient.
3238
+ * @param schemaNormalizer Serviço para normalização do schema.
3239
+ * @param apiUrlInjected URL base da API (via token de injeção).
2974
3240
  */
2975
- removeColumn(columnIndex: number): void;
3241
+ constructor(http: HttpClient, schemaNormalizer: SchemaNormalizerService, globalConfig: GlobalConfigService, apiUrlInjected: ApiUrlConfig);
3242
+ private ensureSchemaCacheReady;
3243
+ private get errorMessages();
3244
+ configure(resourcePath: string, endpointKeyOrOptions?: ApiEndpoint | CrudConfigureOptions): void;
2976
3245
  /**
2977
- * Reordena colunas
3246
+ * Configura endpoints personalizados para cada operação CRUD, substituindo as URLs padrão.
3247
+ *
3248
+ * Este método permite definir caminhos específicos para cada tipo de operação (getAll, getById, etc.)
3249
+ * Os endpoints podem ser:
3250
+ * - Caminhos relativos: serão anexados ao baseApiUrl (ex: 'usuarios/ativos')
3251
+ * - URLs absolutas: usadas diretamente (ex: 'https://api.externa.com/usuarios')
3252
+ *
3253
+ * Exemplo de uso:
3254
+ * ```typescript
3255
+ * crudService.configureEndpoints({
3256
+ * getAll: 'usuarios/ativos', // GET [baseApiUrl]/usuarios/ativos
3257
+ * create: 'https://api.ext/dados', // POST https://api.ext/dados
3258
+ * filter: 'usuarios/busca-avancada' // POST [baseApiUrl]/usuarios/busca-avancada
3259
+ * });
3260
+ * ```
3261
+ *
3262
+ * @param customEndpoints Objeto com endpoints customizados.
2978
3263
  */
2979
- reorderColumns(fromIndex: number, toIndex: number): void;
3264
+ configureEndpoints(customEndpoints: EndpointConfig): void;
2980
3265
  /**
2981
- * Obtém coluna por índice
3266
+ * Fluxo de schemas (grid e filtro)
3267
+ *
3268
+ * - Grid/Lista (colunas e metadados do DTO principal):
3269
+ * 1) getSchema() chama GET {resource}/schemas (ex.: /api/human-resources/funcionarios/schemas)
3270
+ * 2) O backend responde 302 para /schemas/filtered com query params:
3271
+ * - path: {basePath}/all (ex.: /api/human-resources/funcionarios/all)
3272
+ * - operation: get
3273
+ * - schemaType: response
3274
+ * 3) O serviço normaliza o schema retornado (x-ui) para montagem de grids e formulários.
3275
+ *
3276
+ * - Filtro Avançado (metadados do DTO de filtro específico do recurso):
3277
+ * 1) getFilterSchema() deriva o path preservando prefixos (via schemaUrl) e garante sufixo "/filter"
3278
+ * 2) Em seguida, chama getFilteredSchema({ path, operation: 'post', schemaType: 'request' })
3279
+ * 3) O endpoint /schemas/filtered do backend resolve automaticamente o documento/grupo (via OpenApiGroupResolver ou inferência)
3280
+ * e retorna o schema do FilterDTO concreto com as propriedades x-ui declaradas por @UISchema/@Filterable.
3281
+ *
3282
+ * Observações:
3283
+ * - schemaUrl() preserva contextPath e prefixos como "/api", evitando erros quando há múltiplos grupos OpenAPI.
3284
+ * - O parâmetro "document" em getFilteredSchema é opcional; quando omitido, o backend o resolve a partir do path.
2982
3285
  */
2983
- getColumn(columnIndex: number): ColumnDefinition | undefined;
2984
3286
  /**
2985
- * Obtém coluna por field
3287
+ * Obtém o schema (metadados) do recurso, útil para construção dinâmica de grids e formulários.
3288
+ *
3289
+ * Fluxo:
3290
+ * - Faz GET {resource}/schemas; o backend redireciona (302) para /schemas/filtered
3291
+ * com path={basePath}/all, operation=get, schemaType=response.
3292
+ * - O resultado é normalizado e usado para montar colunas de grid e formulários (x-ui).
3293
+ *
3294
+ * Exemplo:
3295
+ * ```typescript
3296
+ * crudService.configure('produtos');
3297
+ * crudService.getSchema().subscribe(schema => { // usar metadados });
3298
+ * ```
2986
3299
  */
2987
- getColumnByField(field: string): ColumnDefinition | undefined;
3300
+ getSchema(options?: CrudOperationOptions): Observable<FieldDefinition[]>;
3301
+ private fetchDirectSchema;
3302
+ /** Retorna o campo identificador do recurso (ex.: 'id', 'codigo'), quando derivado do schema. */
3303
+ getResourceIdField(): string | undefined;
3304
+ /** Retorna o último schemaId e hash conhecidos após getSchema()/getFilteredSchema(). */
3305
+ getLastSchemaInfo(): {
3306
+ schemaId?: string;
3307
+ schemaHash?: string;
3308
+ };
2988
3309
  /**
2989
- * Verifica se um recurso está habilitado
3310
+ * Retorna a URL do último schema solicitado, preservando apenas o pathname.
3311
+ *
3312
+ * Detalhes:
3313
+ * - Se getSchema() já foi chamado, reutiliza a URL armazenada.
3314
+ * - Caso contrário, reconstrói a URL de schema e extrai apenas o caminho (ex.: "/api/usuarios/schemas").
3315
+ * - Esse caminho é usado para derivar o path do /schemas/filtered (grid/filtro) mantendo prefixos/contextPath.
2990
3316
  */
2991
- isFeatureEnabled(feature: keyof TableConfig): boolean;
3317
+ schemaUrl(): string;
2992
3318
  /**
2993
- * Obtém configuração de paginação
3319
+ * Obtém um schema filtrado diretamente do endpoint `/schemas/filtered`.
3320
+ *
3321
+ * Como monta a chamada:
3322
+ * - path: por padrão, usa schemaUrl().replace(/\/schemas$/, '') (ex.: "/api/usuarios")
3323
+ * - operation, schemaType: informados pelo chamador (ex.: get/response para grid, post/request para filtro)
3324
+ * - document: opcional; o backend resolve automaticamente quando omitido
3325
+ * - includeInternalSchemas: quando true, o backend expande $ref internos (custo maior)
2994
3326
  */
2995
- getPaginationConfig(): PaginationConfig | undefined;
3327
+ getFilteredSchema(params: {
3328
+ path?: string;
3329
+ document?: string;
3330
+ operation?: string;
3331
+ includeInternalSchemas?: boolean;
3332
+ schemaType?: string;
3333
+ endpointKey?: ApiEndpoint;
3334
+ httpContext?: HttpContext;
3335
+ }): Observable<FieldDefinition[]>;
2996
3336
  /**
2997
- * Obtém configuração de ordenação
3337
+ * Retorna todos os registros do recurso.
3338
+ *
3339
+ * Exemplo:
3340
+ * ```typescript
3341
+ * crudService.configure('clientes');
3342
+ * crudService.getAll().subscribe(clientes => { ... });
3343
+ * ```
3344
+ *
3345
+ * Para recurso aninhado:
3346
+ * ```typescript
3347
+ * crudService.configure('enderecos');
3348
+ * crudService.getAll({ parentPath: 'clientes/123' }).subscribe(enderecos => { ... });
3349
+ * ```
3350
+ *
3351
+ * @param options Parâmetros opcionais, incluindo parentPath.
3352
+ * @returns Observable com array de entidades.
2998
3353
  */
2999
- getSortingConfig(): SortingConfig | undefined;
3354
+ getAll(options?: CrudOperationOptions): Observable<T[]>;
3355
+ getAllResponse(options?: CrudOperationOptions): Observable<RestApiResponse<T[]>>;
3000
3356
  /**
3001
- * Obtém configuração de filtragem
3357
+ * Retorna um registro pelo seu ID.
3358
+ *
3359
+ * Exemplo:
3360
+ * ```typescript
3361
+ * crudService.configure('usuarios');
3362
+ * crudService.getById(10).subscribe(usuario => { ... });
3363
+ * ```
3364
+ *
3365
+ * Para recurso aninhado:
3366
+ * ```typescript
3367
+ * crudService.configure('enderecos');
3368
+ * crudService.getById(5, { parentPath: 'clientes/123' }).subscribe(endereco => { ... });
3369
+ * ```
3370
+ *
3371
+ * @param id Identificador único do registro.
3372
+ * @param options Parâmetros opcionais, incluindo parentPath.
3373
+ * @returns Observable com a entidade encontrada.
3002
3374
  */
3003
- getFilteringConfig(): FilteringConfig | undefined;
3375
+ getById(id: ID, options?: CrudOperationOptions): Observable<T>;
3376
+ getByIdResponse(id: ID, options?: CrudOperationOptions): Observable<RestApiResponse<T>>;
3004
3377
  /**
3005
- * Obtém configuração de seleção
3378
+ * Cria um novo registro.
3379
+ *
3380
+ * Exemplo:
3381
+ * ```typescript
3382
+ * crudService.configure('produtos');
3383
+ * crudService.create({ nome: 'Mouse', preco: 50 }).subscribe(produto => { ... });
3384
+ * ```
3385
+ *
3386
+ * Para recurso aninhado:
3387
+ * ```typescript
3388
+ * crudService.configure('enderecos');
3389
+ * crudService.create({ rua: 'Rua Nova' }, { parentPath: 'clientes/123' }).subscribe(endereco => { ... });
3390
+ * ```
3391
+ *
3392
+ * @param entity Entidade a ser criada.
3393
+ * @param options Parâmetros opcionais, incluindo parentPath.
3394
+ * @returns Observable com a entidade criada.
3006
3395
  */
3007
- getSelectionConfig(): SelectionConfig | undefined;
3396
+ create(entity: T, options?: CrudOperationOptions): Observable<T>;
3397
+ createResponse(entity: T, options?: CrudOperationOptions): Observable<RestApiResponse<T>>;
3008
3398
  /**
3009
- * Obtém configuração da toolbar
3399
+ * Atualiza um registro existente.
3400
+ *
3401
+ * Exemplo:
3402
+ * ```typescript
3403
+ * crudService.configure('usuarios');
3404
+ * crudService.update(10, { nome: 'Novo Nome' }).subscribe(usuario => { ... });
3405
+ * ```
3406
+ *
3407
+ * Para recurso aninhado:
3408
+ * ```typescript
3409
+ * crudService.configure('enderecos');
3410
+ * crudService.update(2, { rua: 'Rua Alterada' }, { parentPath: 'clientes/123' }).subscribe(endereco => { ... });
3411
+ * ```
3412
+ *
3413
+ * @param id Identificador único do registro.
3414
+ * @param entity Entidade atualizada.
3415
+ * @param options Parâmetros opcionais, incluindo parentPath.
3416
+ * @returns Observable com a entidade atualizada.
3010
3417
  */
3011
- getToolbarConfig(): ToolbarConfig | undefined;
3418
+ update(id: ID, entity: T, options?: CrudOperationOptions): Observable<T>;
3419
+ updateResponse(id: ID, entity: T, options?: CrudOperationOptions): Observable<RestApiResponse<T>>;
3012
3420
  /**
3013
- * Obtém configuração de ações
3421
+ * Remove um registro pelo ID.
3422
+ *
3423
+ * Exemplo:
3424
+ * ```typescript
3425
+ * crudService.configure('usuarios');
3426
+ * crudService.delete(5).subscribe(() => { ... });
3427
+ * ```
3428
+ *
3429
+ * Para recurso aninhado:
3430
+ * ```typescript
3431
+ * crudService.configure('enderecos');
3432
+ * crudService.delete(2, { parentPath: 'clientes/123' }).subscribe(() => { ... });
3433
+ * ```
3434
+ *
3435
+ * @param id Identificador único do registro.
3436
+ * @param options Parâmetros opcionais, incluindo parentPath.
3437
+ * @returns Observable vazio quando a remoção for bem-sucedida.
3014
3438
  */
3015
- getActionsConfig(): TableActionsConfig | undefined;
3439
+ delete(id: ID, options?: CrudOperationOptions): Observable<void>;
3440
+ deleteResponse(id: ID, options?: CrudOperationOptions): Observable<RestApiResponse<void>>;
3016
3441
  /**
3017
- * Obtém configuração de aparência
3442
+ * Realiza exclusão de múltiplos registros sequencialmente.
3443
+ * Emite progresso opcionalmente e permite cancelamento via Observable.
3018
3444
  */
3019
- getAppearanceConfig(): TableAppearanceConfig | undefined;
3445
+ deleteMany(ids: Array<ID>, options?: BatchDeleteOptions<ID>): Observable<BatchDeleteResult<ID>>;
3020
3446
  /**
3021
- * Obtém configuração de mensagens
3447
+ * Realiza busca paginada e filtrada conforme critérios informados.
3448
+ *
3449
+ * Exemplo:
3450
+ * ```typescript
3451
+ * crudService.configure('produtos');
3452
+ * crudService.filter({ categoria: 'Eletrônicos' }, { pageNumber: 0, pageSize: 10 })
3453
+ * .subscribe(page => { ... });
3454
+ * ```
3455
+ *
3456
+ * @param filterCriteria Critérios para filtragem.
3457
+ * @param pageable Opções de paginação.
3458
+ * @param options Parâmetros opcionais, incluindo parentPath.
3459
+ * @returns Observable com página de entidades.
3022
3460
  */
3023
- getMessagesConfig(): MessagesConfig | undefined;
3461
+ filter(filterCriteria: any, pageable: PageableRequest): Observable<Page<T>>;
3462
+ filter(filterCriteria: any, pageable: PageableRequest, opts: FilterOptions): Observable<Page<T> & {
3463
+ dataVersion?: string;
3464
+ }>;
3465
+ filter(filterCriteria: any, pageable: PageableRequest, opts: FilterOptions & CrudOperationOptions): Observable<Page<T> & {
3466
+ dataVersion?: string;
3467
+ }>;
3468
+ filterResponse(filterCriteria: any, pageable: PageableRequest): Observable<RestApiResponse<Page<T>>>;
3469
+ filterResponse(filterCriteria: any, pageable: PageableRequest, opts: FilterOptions): Observable<RestApiResponse<Page<T>> & {
3470
+ dataVersion?: string;
3471
+ }>;
3472
+ filterResponse(filterCriteria: any, pageable: PageableRequest, opts: FilterOptions & CrudOperationOptions): Observable<RestApiResponse<Page<T>> & {
3473
+ dataVersion?: string;
3474
+ }>;
3475
+ /** GET /by-ids */
3476
+ getByIds(ids: ID[], options?: CrudOperationOptions): Observable<T[]>;
3477
+ /** OPTIONS: POST /options/filter */
3478
+ filterOptions(criteria: any, pageable: PageableRequest, opts: FilterOptions<ID> & CrudOperationOptions): Observable<Page<OptionDTO<ID>> & {
3479
+ dataVersion?: string;
3480
+ }>;
3481
+ /** OPTION SOURCES: POST /option-sources/{sourceKey}/options/filter */
3482
+ filterOptionSourceOptions(sourceKey: string, criteria: any, pageable: PageableRequest, opts?: OptionSourceRequestOptions<ID>): Observable<Page<OptionDTO<any>> & {
3483
+ dataVersion?: string;
3484
+ }>;
3485
+ /** OPTIONS: GET /options/by-ids */
3486
+ getOptionsByIds(ids: ID[], options?: CrudOperationOptions): Observable<OptionDTO<ID>[]>;
3487
+ /** OPTION SOURCES: GET /option-sources/{sourceKey}/options/by-ids */
3488
+ getOptionSourceOptionsByIds(sourceKey: string, ids: Array<string | number>, options?: CrudOperationOptions): Observable<OptionDTO<any>[]>;
3489
+ /** CURSOR: POST /filter/cursor */
3490
+ filterByCursor(criteria: any, cursorReq?: CursorRequest, options?: CrudOperationOptions): Observable<CursorPage<T>>;
3491
+ /** LOCATE: POST /locate */
3492
+ locate(criteria: any, id: ID, locateReq: LocateRequest, options?: CrudOperationOptions): Observable<{
3493
+ position: number;
3494
+ page: number;
3495
+ }>;
3024
3496
  /**
3025
- * Obtém configuração de localização
3497
+ * Realiza uma requisição HTTP genérica.
3498
+ *
3499
+ * Exemplo:
3500
+ * ```typescript
3501
+ * crudService.genericEndpoint<{ resultado: string }>(
3502
+ * 'https://api.meusite.com/teste', 'POST', { parametro: 123 }
3503
+ * ).subscribe(resposta => { ... });
3504
+ * ```
3505
+ *
3506
+ * @template R Tipo do dado esperado na resposta.
3507
+ * @param url URL completa da requisição.
3508
+ * @param method Método HTTP (GET, POST, PUT, DELETE, PATCH).
3509
+ * @param body Corpo da requisição (opcional).
3510
+ * @param params HttpParams opcionais.
3511
+ * @returns Observable de resposta do tipo informado.
3026
3512
  */
3027
- getLocalizationConfig(): LocalizationConfig | undefined;
3513
+ genericEndpoint<R>(url: string, method?: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH', body?: any, params?: HttpParams): Observable<R>;
3028
3514
  /**
3029
- * Reset para configuração padrão
3515
+ * Obtém o schema do DTO de filtro do endpoint POST /{resource}/filter.
3516
+ *
3517
+ * Fluxo:
3518
+ * - Deriva o path a partir de schemaUrl() e garante o sufixo "/filter"
3519
+ * - Chama getFilteredSchema com operation='post' e schemaType='request'
3520
+ * - Usa cache por chave (endpointKey|path|post|request|includeInternal) para compartilhamento entre assinantes
3030
3521
  */
3031
- resetToDefault(): void;
3522
+ getFilterSchema(options?: {
3523
+ path?: string;
3524
+ includeInternalSchemas?: boolean;
3525
+ endpointKey?: ApiEndpoint;
3526
+ cache?: boolean;
3527
+ }): rxjs.Observable<FieldDefinition[]>;
3528
+ private ensureConfigured;
3529
+ private resolveEndpointEntry;
3032
3530
  /**
3033
- * Valida a configuração atual
3531
+ * Constrói a URL completa para uma determinada operação CRUD, considerando endpoints personalizados e caminhos pai.
3532
+ *
3533
+ * Este método usa a seguinte ordem de prioridade:
3534
+ * 1. Endpoint personalizado definido pelo usuário (via configureEndpoints)
3535
+ * 2. Construção padrão de URL baseada no recurso configurado
3536
+ *
3537
+ * Para recursos aninhados, o parentPath é incorporado na URL final (ex: /clientes/123/enderecos).
3538
+ *
3539
+ * @param operation - A operação CRUD a ser executada (getAll, getById, create, update, delete, filter, schema)
3540
+ * @param id - Identificador opcional para operações que exigem ID (getById, update, delete)
3541
+ * @param parentPath - Caminho do recurso pai opcional para recursos aninhados (ex: 'clientes/123')
3542
+ * @param endpointKey - Chave de endpoint (quando houver múltiplas bases configuradas)
3543
+ * @returns A URL completa para a requisição à API
3544
+ * @throws Error quando o ID é obrigatório mas não fornecido, ou quando o serviço não está configurado
3034
3545
  */
3035
- validateCurrentConfig(): {
3036
- isValid: boolean;
3037
- errors: string[];
3038
- };
3546
+ private getEndpointUrl;
3547
+ private getResourceBaseUrl;
3039
3548
  /**
3040
- * Exporta configuração como JSON
3549
+ * Resolve `/schemas/filtered` base URL honoring ApiUrlConfig (supports APIs on another origin).
3041
3550
  */
3042
- exportConfig(): string;
3551
+ getSchemasFilteredBaseUrl(endpointKey?: ApiEndpoint): string;
3552
+ private normalizeRangeCriteria;
3553
+ private normalizeRangeNode;
3554
+ private tryCollapseRangeObject;
3555
+ private coerceBoundsArray;
3556
+ private buildCanonicalBounds;
3557
+ private shouldSwapBounds;
3558
+ private tryParseNumeric;
3559
+ private tryParseDateMillis;
3560
+ private isRangeOnlyObject;
3561
+ private resolveRangeAliases;
3562
+ private findExistingKey;
3563
+ private normalizeRangeBound;
3564
+ private isRangeValue;
3565
+ private isPlainObject;
3566
+ private updateRangeFieldHints;
3567
+ private hasRangeFieldMetadata;
3568
+ private normalizeControlTypeToken;
3569
+ private isRangeControlType;
3570
+ private looksLikeRangeFieldName;
3571
+ private lowerDateAliases;
3572
+ private upperDateAliases;
3573
+ private lowerMoneyAliases;
3574
+ private upperMoneyAliases;
3575
+ private lowerGenericAliases;
3576
+ private upperGenericAliases;
3043
3577
  /**
3044
- * Importa configuração de JSON
3578
+ * Manipula erros de requisição HTTP.
3045
3579
  */
3046
- importConfig(jsonConfig: string): {
3047
- success: boolean;
3048
- error?: string;
3049
- };
3580
+ private handleError;
3050
3581
  /**
3051
- * Clona a configuração atual
3582
+ * Desembrulha respostas no formato RestApiResponse<Page<T>> para Page<T>.
3583
+ * Mantém compatibilidade quando a API já retorna Page<T> diretamente.
3052
3584
  */
3053
- cloneCurrentConfig(): TableConfig;
3054
- /**
3055
- * Atualiza o estado interno
3056
- */
3057
- private updateState;
3058
- /**
3059
- * Obtém estatísticas da configuração atual
3060
- */
3061
- getConfigurationStats(): {
3062
- totalColumns: number;
3063
- visibleColumns: number;
3064
- sortableColumns: number;
3065
- filterableColumns: number;
3066
- stickyColumns: number;
3067
- hasToolbar: boolean;
3068
- hasRowActions: boolean;
3069
- hasBulkActions: boolean;
3070
- hasPagination: boolean;
3071
- hasSorting: boolean;
3072
- hasFiltering: boolean;
3073
- hasSelection: boolean;
3074
- hasExport: boolean;
3075
- hasVirtualScroll: boolean;
3076
- hasLazyLoading: boolean;
3077
- };
3078
- static ɵfac: i0.ɵɵFactoryDeclaration<TableConfigService, never>;
3079
- static ɵprov: i0.ɵɵInjectableDeclaration<TableConfigService>;
3585
+ private unwrapPageResponse;
3586
+ private normalizeRestApiResponse;
3587
+ static ɵfac: i0.ɵɵFactoryDeclaration<GenericCrudService<any, any>, never>;
3588
+ static ɵprov: i0.ɵɵInjectableDeclaration<GenericCrudService<any, any>>;
3080
3589
  }
3081
3590
 
3082
- declare function buildBaseColumnFromDef(def: FieldDefinition): ColumnDefinition;
3083
- declare function applyLocalCustomizations$1(baseCol: ColumnDefinition, localCol: ColumnDefinition): ColumnDefinition;
3084
- declare function reconcileTableConfig(layout: TableConfigV2, serverDefs: FieldDefinition[]): TableConfigV2;
3085
-
3086
- interface ConfigStorage {
3087
- loadConfig<T>(key: string): T | null;
3088
- saveConfig<T>(key: string, config: T): void;
3089
- clearConfig(key: string): void;
3591
+ interface TableConfigState {
3592
+ config: TableConfig;
3593
+ isLoading: boolean;
3594
+ error?: string;
3090
3595
  }
3091
- /**
3092
- * Async contract for config storage (HTTP-friendly).
3093
- */
3094
- interface AsyncConfigStorage {
3596
+ declare class TableConfigService {
3597
+ private readonly _state$;
3598
+ readonly state$: Observable<TableConfigState>;
3599
+ constructor();
3095
3600
  /**
3096
- * Reads config for a key.
3097
- *
3098
- * Success contract:
3099
- * - emit one `next` value (can be `null`) and complete.
3100
- * Failure contract:
3101
- * - emit `error`.
3601
+ * Obtém o estado atual da configuração
3102
3602
  */
3103
- loadConfig<T>(key: string): Observable<T | null>;
3603
+ get currentState(): TableConfigState;
3104
3604
  /**
3105
- * Persists config for a key.
3106
- *
3107
- * Success contract (strong ack):
3108
- * - emit at least one `next` (typically `void 0`) and then complete.
3109
- * Not-acknowledged contract (soft-fail path):
3110
- * - complete without any `next`.
3111
- * Hard-failure contract:
3112
- * - emit `error`.
3113
- *
3114
- * Important:
3115
- * - table runtime treats complete without `next` as
3116
- * "persistence not acknowledged".
3605
+ * Obtém a configuração atual
3117
3606
  */
3118
- saveConfig<T>(key: string, config: T): Observable<void>;
3607
+ get currentConfig(): TableConfig;
3119
3608
  /**
3120
- * Clears config for a key.
3121
- *
3122
- * Success contract (strong ack):
3123
- * - emit at least one `next` (typically `void 0`) and then complete.
3124
- * Not-acknowledged contract (soft-fail path):
3125
- * - complete without any `next`.
3126
- * Hard-failure contract:
3127
- * - emit `error`.
3128
- *
3129
- * Important:
3130
- * - table runtime treats complete without `next` as
3131
- * "clear not acknowledged".
3132
- */
3133
- clearConfig(key: string): Observable<void>;
3134
- }
3135
- declare class LocalStorageConfigService implements ConfigStorage {
3136
- loadConfig<T>(key: string): T | null;
3137
- saveConfig<T>(key: string, config: T): void;
3138
- clearConfig(key: string): void;
3139
- trySaveConfig<T>(key: string, config: T): boolean;
3140
- tryClearConfig(key: string): boolean;
3141
- static ɵfac: i0.ɵɵFactoryDeclaration<LocalStorageConfigService, never>;
3142
- static ɵprov: i0.ɵɵInjectableDeclaration<LocalStorageConfigService>;
3143
- }
3144
- /**
3145
- * Async adapter over the sync LocalStorage service.
3146
- */
3147
- declare class LocalStorageAsyncAdapter implements AsyncConfigStorage {
3148
- private readonly delegate;
3149
- constructor(delegate: LocalStorageConfigService);
3150
- loadConfig<T>(key: string): Observable<T | null>;
3151
- saveConfig<T>(key: string, config: T): Observable<void>;
3152
- clearConfig(key: string): Observable<void>;
3153
- static ɵfac: i0.ɵɵFactoryDeclaration<LocalStorageAsyncAdapter, never>;
3154
- static ɵprov: i0.ɵɵInjectableDeclaration<LocalStorageAsyncAdapter>;
3155
- }
3156
- /**
3157
- * Defers async storage operations until a gate resolves.
3158
- * Useful to ensure auth/tenant context is ready before HTTP requests.
3159
- */
3160
- declare class DeferredAsyncConfigStorage implements AsyncConfigStorage {
3161
- private readonly delegate;
3162
- private readonly gate?;
3163
- constructor(delegate: AsyncConfigStorage, gate?: (() => Promise<void>) | undefined);
3164
- loadConfig<T>(key: string): Observable<T | null>;
3165
- saveConfig<T>(key: string, config: T): Observable<void>;
3166
- clearConfig(key: string): Observable<void>;
3167
- }
3168
- declare const ASYNC_CONFIG_STORAGE: InjectionToken<AsyncConfigStorage>;
3169
- declare class RemoteConfigStorage implements ConfigStorage {
3170
- private readonly asyncStorage;
3171
- private readonly localStorage;
3172
- private readonly cache;
3173
- private readonly inflight;
3174
- loadConfig<T>(key: string): T | null;
3175
- saveConfig<T>(key: string, config: T): void;
3176
- clearConfig(key: string): void;
3177
- private refreshRemote;
3178
- static ɵfac: i0.ɵɵFactoryDeclaration<RemoteConfigStorage, never>;
3179
- static ɵprov: i0.ɵɵInjectableDeclaration<RemoteConfigStorage>;
3180
- }
3181
- declare const CONFIG_STORAGE: InjectionToken<ConfigStorage>;
3182
- /**
3183
- * Options for ApiConfigStorage.
3184
- */
3185
- interface ApiConfigStorageOptions {
3186
- baseUrl?: string;
3187
- /** Factory to supply headers (tenant/user/env/updatedBy) per request. */
3188
- headersFactory?: () => Record<string, string | undefined>;
3189
- /** Default headers applied when the headersFactory omits them. */
3190
- defaultHeaders?: Record<string, string>;
3191
- /** Resolve componentType from the storage key (use the component selector, e.g. praxis-table). */
3192
- componentTypeResolver?: (key: string) => string;
3193
- /** Controls whether load errors for global config should propagate. */
3194
- errorPolicy?: 'fail' | 'ignore';
3195
- }
3196
- declare const API_CONFIG_STORAGE_OPTIONS: InjectionToken<ApiConfigStorageOptions>;
3197
- /**
3198
- * HTTP-based storage that talks to praxis-config-starter user-config API.
3199
- */
3200
- declare class ApiConfigStorage implements AsyncConfigStorage {
3201
- private static readonly unavailableLoadBaseUrls;
3202
- private static readonly loadAvailabilityProbes;
3203
- private readonly http;
3204
- private readonly opts;
3205
- private readonly baseUrl;
3206
- private readonly headersFactory;
3207
- private readonly defaultHeaders;
3208
- private readonly componentTypeResolver;
3209
- private readonly cache;
3210
- constructor();
3211
- private shouldLogLoadError;
3212
- private shouldLogSaveError;
3213
- private shouldLogClearError;
3214
- loadConfig<T>(key: string): Observable<T | null>;
3215
- private executeLoadConfigRequest;
3216
- saveConfig<T>(key: string, config: T): Observable<void>;
3217
- private shouldPropagateSaveError;
3218
- private shouldPropagateClearError;
3219
- private shouldPropagateLoadError;
3220
- private isCriticalPersistenceKey;
3221
- clearConfig(key: string): Observable<void>;
3222
- private buildHeaders;
3223
- private buildParams;
3224
- private resolveKey;
3225
- private inferComponentType;
3226
- private looksLikePageKey;
3227
- private stripQuotes;
3228
- private formatEtag;
3229
- static ɵfac: i0.ɵɵFactoryDeclaration<ApiConfigStorage, never>;
3230
- static ɵprov: i0.ɵɵInjectableDeclaration<ApiConfigStorage>;
3231
- }
3232
-
3233
- type GlobalActionResult = {
3234
- success: boolean;
3235
- data?: any;
3236
- error?: string;
3237
- };
3238
- type GlobalActionContext = {
3239
- sourceId?: string;
3240
- widgetKey?: string;
3241
- output?: string;
3242
- payload?: any;
3243
- pageContext?: Record<string, any> | null;
3244
- meta?: Record<string, any>;
3245
- runtime?: {
3246
- row?: any;
3247
- item?: any;
3248
- selection?: any;
3249
- formData?: any;
3250
- value?: any;
3251
- state?: any;
3252
- };
3253
- };
3254
- type GlobalActionHandler = (payload?: any, context?: GlobalActionContext) => Promise<GlobalActionResult> | GlobalActionResult;
3255
- interface GlobalActionHandlerEntry {
3256
- id: string;
3257
- handler: GlobalActionHandler;
3258
- }
3259
- interface GlobalDialogService {
3260
- alert: (payload: {
3261
- title?: string;
3262
- message?: string;
3263
- variant?: string;
3264
- }) => Promise<any> | any;
3265
- confirm: (payload: {
3266
- title?: string;
3267
- message?: string;
3268
- confirmLabel?: string;
3269
- cancelLabel?: string;
3270
- type?: 'danger' | 'warning' | 'info';
3271
- }) => Promise<boolean> | boolean;
3272
- prompt: (payload: {
3273
- title?: string;
3274
- message?: string;
3275
- placeholder?: string;
3276
- defaultValue?: string;
3277
- }) => Promise<any> | any;
3278
- open: (payload: {
3279
- componentId?: string;
3280
- inputs?: any;
3281
- size?: any;
3282
- data?: any;
3283
- }) => Promise<any> | any;
3284
- }
3285
- interface GlobalToastService {
3286
- success: (message: string, opts?: any) => void;
3287
- error: (message: string, opts?: any) => void;
3288
- }
3289
- interface GlobalAnalyticsService {
3290
- track: (eventName: string, payload?: any) => void;
3291
- }
3292
- interface GlobalApiClient {
3293
- get: (url: string, params?: Record<string, any>) => Promise<any> | any;
3294
- post: (url: string, body?: any) => Promise<any> | any;
3295
- patch: (url: string, body?: any) => Promise<any> | any;
3296
- }
3297
- interface GlobalRouteGuardResolver {
3298
- resolve: (guardId: string) => any;
3299
- }
3300
-
3301
- declare class GlobalActionService {
3302
- private readonly handlers;
3303
- private readonly router;
3304
- private readonly location;
3305
- private readonly registry;
3306
- private readonly globalConfig;
3307
- private readonly dialog;
3308
- private readonly surface;
3309
- private readonly toast;
3310
- private readonly analytics;
3311
- private readonly api;
3312
- private readonly guardResolver;
3313
- private readonly surfaceBindingRuntime;
3314
- constructor();
3315
- register(id: string, handler: GlobalActionHandler): void;
3316
- has(id: string): boolean;
3317
- execute(id: string, payload?: any, context?: GlobalActionContext): Promise<GlobalActionResult>;
3318
- private registerBuiltins;
3319
- private handleApi;
3320
- private handleRouteRegister;
3321
- static ɵfac: i0.ɵɵFactoryDeclaration<GlobalActionService, never>;
3322
- static ɵprov: i0.ɵɵInjectableDeclaration<GlobalActionService>;
3323
- }
3324
-
3325
- type ActionDefinition = {
3326
- /** Global action id to execute (e.g., 'navigation.back', 'dialog.alert'). */
3327
- type?: string;
3328
- /** Optional payload template for the action. */
3329
- params?: Record<string, any>;
3330
- };
3331
- interface WidgetDefinition {
3332
- /** Component id registered in ComponentMetadataRegistry */
3333
- id: string;
3334
- /** Optional author-defined identity for nested widget instances inside composite containers. */
3335
- childWidgetKey?: string;
3336
- /** Inputs to bind into the component instance */
3337
- inputs?: Record<string, any>;
3338
- /** Map of component output name to action (global action or 'emit'). */
3339
- outputs?: Record<string, ActionDefinition | 'emit'>;
3340
- /**
3341
- * Optional explicit order for applying inputs. Keys listed here are applied first
3342
- * (in order) with change detection flush between each, then remaining inputs are applied.
3343
- */
3344
- bindingOrder?: string[];
3345
- }
3346
-
3347
- type SurfacePresentation = 'modal' | 'drawer';
3348
- type SurfaceBindingMode = 'path' | 'template' | 'constant';
3349
- interface SurfaceBinding {
3350
- from?: string;
3351
- to: string;
3352
- mode?: SurfaceBindingMode;
3353
- value?: any;
3354
- }
3355
- interface SurfaceSizeConfig {
3356
- width?: string;
3357
- height?: string;
3358
- minWidth?: string;
3359
- maxWidth?: string;
3360
- minHeight?: string;
3361
- maxHeight?: string;
3362
- }
3363
- interface SurfaceOpenPayload {
3364
- presentation: SurfacePresentation;
3365
- title?: string;
3366
- subtitle?: string;
3367
- icon?: string;
3368
- size?: SurfaceSizeConfig;
3369
- widget: WidgetDefinition;
3370
- bindings?: SurfaceBinding[];
3371
- context?: Record<string, any>;
3372
- }
3373
-
3374
- declare class SurfaceBindingRuntimeService {
3375
- resolveWidget(widget: WidgetDefinition, bindings: SurfaceBinding[] | undefined, actionPayload?: any, actionContext?: GlobalActionContext, explicitContext?: Record<string, any>): WidgetDefinition;
3376
- extractByPath(obj: any, path?: string): any;
3377
- resolveTemplate(node: any, context: any): any;
3378
- setValueAtPath<T extends object>(obj: T, rawPath: string, value: any): T;
3379
- private buildContext;
3380
- private resolveBindingValue;
3381
- private normalizeTargetPath;
3382
- private tokenizePath;
3383
- private clone;
3384
- static ɵfac: i0.ɵɵFactoryDeclaration<SurfaceBindingRuntimeService, never>;
3385
- static ɵprov: i0.ɵɵInjectableDeclaration<SurfaceBindingRuntimeService>;
3386
- }
3387
-
3388
- interface ConnectionConfigV1 {
3389
- resourcePath: string;
3390
- version: 1;
3391
- updatedAt: string;
3392
- origin?: 'quick-connect' | 'editor' | 'input';
3393
- }
3394
- interface ConnectionStorage {
3395
- loadConnection(key: string): Observable<ConnectionConfigV1 | null>;
3396
- saveConnection(key: string, cfg: ConnectionConfigV1): Observable<void>;
3397
- clearConnection(key: string): Observable<void>;
3398
- }
3399
- declare class LocalConnectionStorage implements ConnectionStorage {
3400
- private storage;
3401
- constructor(storage: AsyncConfigStorage);
3402
- loadConnection(key: string): Observable<ConnectionConfigV1 | null>;
3403
- saveConnection(key: string, cfg: ConnectionConfigV1): Observable<void>;
3404
- clearConnection(key: string): Observable<void>;
3405
- static ɵfac: i0.ɵɵFactoryDeclaration<LocalConnectionStorage, never>;
3406
- static ɵprov: i0.ɵɵInjectableDeclaration<LocalConnectionStorage>;
3407
- }
3408
- declare const CONNECTION_STORAGE: InjectionToken<ConnectionStorage>;
3409
-
3410
- type DeviceKind = 'mobile' | 'tablet' | 'desktop';
3411
- type OverlayPattern = 'modal' | 'drawer' | 'page' | 'bottom-sheet' | 'full-screen-dialog';
3412
- interface OverlayDecisionContext {
3413
- device: DeviceKind;
3414
- fieldCount: number;
3415
- dependencyCount: number;
3416
- }
3417
- interface OverlayDecision {
3418
- pattern: OverlayPattern;
3419
- config?: Record<string, unknown>;
3420
- reason?: string;
3421
- }
3422
- interface OverlayRange {
3423
- min?: number;
3424
- max?: number;
3425
- }
3426
- interface OverlayRuleMatch {
3427
- device?: DeviceKind[];
3428
- fieldCount?: OverlayRange;
3429
- dependencyCount?: OverlayRange;
3430
- any?: OverlayRuleMatch[];
3431
- }
3432
- interface OverlayRule {
3433
- match: OverlayRuleMatch;
3434
- use: OverlayDecision;
3435
- }
3436
- interface OverlayThresholds {
3437
- fieldCount: {
3438
- small_max: number;
3439
- medium_max: number;
3440
- };
3441
- dependencyCount: {
3442
- low_max: number;
3443
- medium_max: number;
3444
- };
3445
- }
3446
- interface OverlayDecisionMatrix {
3447
- version: string;
3448
- description?: string;
3449
- thresholds: OverlayThresholds;
3450
- rules_ordered: OverlayRule[];
3451
- fallback: OverlayDecision;
3452
- ui_hints?: Record<string, unknown>;
3453
- }
3454
- interface OverlayDecider {
3455
- decide(ctx: OverlayDecisionContext): OverlayDecision;
3456
- explain?(ctx: OverlayDecisionContext): string;
3457
- }
3458
-
3459
- declare const OVERLAY_DECIDER_DEBUG: InjectionToken<boolean>;
3460
- declare class OverlayDeciderService {
3461
- private readonly matrix;
3462
- private readonly debug;
3463
- decide(ctx: OverlayDecisionContext): OverlayDecision;
3464
- explain(ctx: OverlayDecisionContext): string;
3465
- private evaluate;
3466
- private matches;
3467
- private log;
3468
- static ɵfac: i0.ɵɵFactoryDeclaration<OverlayDeciderService, never>;
3469
- static ɵprov: i0.ɵɵInjectableDeclaration<OverlayDeciderService>;
3470
- }
3471
-
3472
- /**
3473
- * Enum que define os tipos de dados (`TYPE`) disponíveis para configuração dos campos de formulário.
3474
- */
3475
- declare const FieldDataType: {
3476
- readonly TEXT: "text";
3477
- readonly NUMBER: "number";
3478
- readonly EMAIL: "email";
3479
- readonly DATE: "date";
3480
- readonly PASSWORD: "password";
3481
- readonly FILE: "file";
3482
- readonly URL: "url";
3483
- readonly BOOLEAN: "boolean";
3484
- readonly JSON: "json";
3485
- };
3486
- type FieldDataType = typeof FieldDataType[keyof typeof FieldDataType];
3487
-
3488
- /**
3489
- * Enum que define os tipos de controle (`CONTROL_TYPE`) disponíveis para a apresentação dos campos de formulário.
3490
- *
3491
- * O `CONTROL_TYPE` especifica o tipo de elemento de UI (User Interface) que será usado para capturar ou exibir dados do campo.
3492
- * Essa configuração permite que a camada de apresentação saiba como renderizar o campo e oferecer a interação adequada ao usuário.
3493
- * Em casos onde o `CONTROL_TYPE` não é especificado, a camada de apresentação pode usar o valor de `TYPE` (definido em `FieldDataType`)
3494
- * para decidir o controle mais adequado de forma automática.
3495
- */
3496
- declare const FieldControlType: {
3497
- readonly AI_PROMPT: "aiPrompt";
3498
- readonly APP_BAR: "appBar";
3499
- readonly ARC_GAUGE: "arcGauge";
3500
- readonly ARRAY_INPUT: "array";
3501
- readonly ASYNC_SELECT: "async-select";
3502
- readonly AUTO_COMPLETE: "autoComplete";
3503
- readonly AVATAR: "avatar";
3504
- readonly BARCODE_GENERATOR: "barcodeGenerator";
3505
- readonly BOTTOM_NAVIGATION: "bottomNavigation";
3506
- readonly BREADCRUMB: "breadcrumb";
3507
- readonly BUTTON: "button";
3508
- readonly BUTTON_TOGGLE: "buttonToggle";
3509
- readonly CALENDAR: "calendar";
3510
- readonly CARD: "card";
3511
- readonly CHECKBOX: "checkbox";
3512
- readonly CHIP_INPUT: "chipInput";
3513
- readonly CHIP_LIST: "chipList";
3514
- readonly CIRCULAR_GAUGE: "circularGauge";
3515
- readonly COLOR_GRADIENT: "colorGradient";
3516
- readonly CPF_CNPJ_INPUT: "cpfCnpjInput";
3517
- readonly COLOR_PALETTE: "colorPalette";
3518
- readonly COLOR_PICKER: "colorPicker";
3519
- readonly COLOR_INPUT: "color";
3520
- readonly CRON_BUILDER: "cronBuilder";
3521
- readonly CONTEXT_MENU: "contextMenu";
3522
- readonly CONVERSATIONAL_UI: "conversationalUI";
3523
- readonly CURRENCY_INPUT: "currency";
3524
- readonly DATE_INPUT: "dateInput";
3525
- readonly DATE_PICKER: "date";
3526
- readonly DATE_RANGE: "dateRange";
3527
- readonly DATE_TIME_PICKER: "dateTime";
3528
- readonly DATE_TIME_RANGE: "dateTimeRange";
3529
- readonly DATETIME_LOCAL_INPUT: "dateTimeLocal";
3530
- readonly DIALOG: "dialog";
3531
- readonly DRAWER: "drawer";
3532
- readonly DROP_DOWN_TREE: "dropDownTree";
3533
- readonly EMAIL_INPUT: "email";
3534
- readonly EXPANSION_PANEL: "expansionPanel";
3535
- readonly FILE_SAVER: "fileSaver";
3536
- readonly FILE_SELECT: "fileSelect";
3537
- readonly FILE_UPLOAD: "upload";
3538
- readonly FILTER: "filter";
3539
- readonly FLOATING_LABEL: "floatingLabel";
3540
- readonly FLOATING_ACTION_BUTTON: "floatingActionButton";
3541
- readonly GRID: "grid";
3542
- readonly GRID_LAYOUT: "gridLayout";
3543
- readonly INPUT: "input";
3544
- readonly INLINE_SELECT: "inlineSelect";
3545
- readonly INLINE_SEARCHABLE_SELECT: "inlineSearchableSelect";
3546
- readonly INLINE_ASYNC_SELECT: "inlineAsyncSelect";
3547
- readonly INLINE_ENTITY_LOOKUP: "inlineEntityLookup";
3548
- readonly INLINE_AUTOCOMPLETE: "inlineAutocomplete";
3549
- readonly INLINE_INPUT: "inlineInput";
3550
- readonly INLINE_NUMBER: "inlineNumber";
3551
- readonly INLINE_CURRENCY: "inlineCurrency";
3552
- readonly INLINE_CURRENCY_RANGE: "inlineCurrencyRange";
3553
- readonly INLINE_MULTISELECT: "inlineMultiSelect";
3554
- readonly INLINE_TOGGLE: "inlineToggle";
3555
- readonly INLINE_RANGE: "inlineRange";
3556
- readonly INLINE_PERIOD_RANGE: "inlinePeriodRange";
3557
- readonly INLINE_YEAR_RANGE: "inlineYearRange";
3558
- readonly INLINE_MONTH_RANGE: "inlineMonthRange";
3559
- readonly INLINE_DATE: "inlineDate";
3560
- readonly INLINE_DATE_RANGE: "inlineDateRange";
3561
- readonly INLINE_TIME: "inlineTime";
3562
- readonly INLINE_TIME_RANGE: "inlineTimeRange";
3563
- readonly INLINE_TREE_SELECT: "inlineTreeSelect";
3564
- readonly INLINE_RATING: "inlineRating";
3565
- readonly INLINE_DISTANCE_RADIUS: "inlineDistanceRadius";
3566
- readonly INLINE_PIPELINE_STATUS: "inlinePipelineStatus";
3567
- readonly INLINE_SCORE_PRIORITY: "inlineScorePriority";
3568
- readonly INLINE_RELATIVE_PERIOD: "inlineRelativePeriod";
3569
- readonly INLINE_SENTIMENT: "inlineSentiment";
3570
- readonly INLINE_COLOR_LABEL: "inlineColorLabel";
3571
- readonly LINEAR_GAUGE: "linearGauge";
3572
- readonly LIST_VIEW: "listView";
3573
- readonly MAP: "map";
3574
- readonly MASKED_TEXT_BOX: "maskedTextBox";
3575
- readonly MONTH_INPUT: "month";
3576
- readonly MULTI_COLUMN_COMBO_BOX: "multiColumnComboBox";
3577
- readonly MULTI_SELECT: "multiSelect";
3578
- readonly MULTI_SELECT_TREE: "multiSelectTree";
3579
- readonly TRANSFER_LIST: "transferList";
3580
- readonly NOTIFICATION: "notification";
3581
- readonly NUMERIC_TEXT_BOX: "numericTextBox";
3582
- readonly PAGER: "pager";
3583
- readonly PAGINATOR: "paginator";
3584
- readonly PASSWORD: "password";
3585
- readonly PDF_VIEWER: "pdfViewer";
3586
- readonly PHONE: "phone";
3587
- readonly PIVOT_GRID: "pivotGrid";
3588
- readonly POPUP: "popup";
3589
- readonly PROGRESS_BAR: "progressBar";
3590
- readonly PROGRESS_SPINNER: "progressSpinner";
3591
- readonly QR_CODE: "qrCode";
3592
- readonly RADIO: "radio";
3593
- readonly RADIAL_GAUGE: "radialGauge";
3594
- readonly RANGE_SLIDER: "rangeSlider";
3595
- readonly PRICE_RANGE: "priceRange";
3596
- readonly RATING: "rating";
3597
- readonly RICH_TEXT_EDITOR: "richTextEditor";
3598
- readonly RIPPLE: "ripple";
3599
- readonly SCROLL_VIEW: "scrollView";
3600
- readonly SEARCH_INPUT: "search";
3601
- readonly SEARCHABLE_SELECT: "searchable-select";
3602
- readonly SELECTION_LIST: "selectionList";
3603
- readonly SELECT: "select";
3604
- readonly SIGNATURE: "signature";
3605
- readonly SLIDER: "slider";
3606
- readonly SORTABLE: "sortable";
3607
- readonly SORTABLE_TABLE: "sortableTable";
3608
- readonly SPLITTER: "splitter";
3609
- readonly SPREADSHEET: "spreadsheet";
3610
- readonly STACK_LAYOUT: "stackLayout";
3611
- readonly STEP_BAR: "stepBar";
3612
- readonly STEPPER: "stepper";
3613
- readonly SVG_ICON: "svgIcon";
3614
- readonly TABS: "tabs";
3615
- readonly TEXTAREA: "textarea";
3616
- readonly TIME_INPUT: "time";
3617
- readonly TIME_PICKER: "timePicker";
3618
- readonly TIME_RANGE: "timeRange";
3619
- readonly TIMELINE: "timeline";
3620
- readonly TOGGLE: "toggle";
3621
- readonly TOOLBAR: "toolbar";
3622
- readonly TOOLTIP: "tooltip";
3623
- readonly TREE_VIEW: "treeView";
3624
- readonly TREE_SELECT: "treeSelect";
3625
- readonly TYPOGRAPHY: "typography";
3626
- readonly URL_INPUT: "url";
3627
- readonly WEEK_INPUT: "week";
3628
- readonly WINDOW: "window";
3629
- readonly YEAR_INPUT: "year";
3630
- };
3631
- type FieldControlType = (typeof FieldControlType)[keyof typeof FieldControlType];
3632
-
3633
- /**
3634
- * @fileoverview Base metadata interfaces for dynamic Angular Material components
3635
- *
3636
- * This file implements a hierarchical system of metadata interfaces designed for
3637
- * maximum flexibility, type safety, and Angular Material integration.
3638
- *
3639
- * Architecture:
3640
- * - ComponentMetadata (universal base)
3641
- * - FieldMetadata (form fields)
3642
- * - Specialized interfaces (MaterialInput, MaterialSelect, etc.)
3643
- *
3644
- * Design Principles:
3645
- * - Configuration over Code
3646
- * - JSON serializable
3647
- * - Type-safe with strict TypeScript
3648
- * - Backward compatible
3649
- * - Angular Material 3 native support
3650
- */
3651
-
3652
- /**
3653
- * Universal base interface for all dynamic components.
3654
- *
3655
- * Provides maximum extensibility through index signature while maintaining
3656
- * essential metadata properties for component lifecycle management.
3657
- *
3658
- * @example
3659
- * ```typescript
3660
- * const buttonMetadata: ComponentMetadata = {
3661
- * id: 'submit-btn',
3662
- * version: '1.0.0',
3663
- * context: 'form',
3664
- * customProperty: 'any value'
3665
- * };
3666
- * ```
3667
- */
3668
- interface ComponentMetadata {
3669
- /** Unique identifier for the component instance */
3670
- id?: string;
3671
- /** Metadata schema version for migration support */
3672
- version?: string;
3673
- /** Application context where component is used */
3674
- context?: 'form' | 'filter' | 'table' | 'dialog' | 'standalone';
3675
- /** Timestamp when metadata was created */
3676
- createdAt?: string;
3677
- /** Timestamp when metadata was last updated */
3678
- updatedAt?: string;
3679
- /** Tags for categorization and filtering */
3680
- tags?: string[];
3681
- /** Custom CSS classes to apply to the component */
3682
- cssClass?: string;
3683
- /** Inline styles as CSS properties object */
3684
- style?: Record<string, string>;
3685
- /** Data attributes for testing or analytics */
3686
- dataAttributes?: Record<string, string>;
3687
- /** Extensibility: allow any additional properties */
3688
- [key: string]: any;
3689
- }
3690
- /**
3691
- * Enhanced validation configuration for comprehensive field validation.
3692
- *
3693
- * Supports both built-in Angular validators and custom validation logic
3694
- * with internationalization support for error messages.
3695
- */
3696
- interface ValidatorOptions {
3697
- /** Field is required */
3698
- required?: boolean;
3699
- /** Custom message for required validation */
3700
- requiredMessage?: string;
3701
- /** Minimum text length */
3702
- minLength?: number;
3703
- /** Custom message for minLength validation */
3704
- minLengthMessage?: string;
3705
- /** Maximum text length */
3706
- maxLength?: number;
3707
- /** Custom message for maxLength validation */
3708
- maxLengthMessage?: string;
3709
- /** Minimum numeric value */
3710
- min?: number;
3711
- /** Custom message for min validation */
3712
- minMessage?: string;
3713
- /** Maximum numeric value */
3714
- max?: number;
3715
- /** Custom message for max validation */
3716
- maxMessage?: string;
3717
- /** RegExp pattern for validation */
3718
- pattern?: string | RegExp;
3719
- /** Custom message for pattern validation */
3720
- patternMessage?: string;
3721
- /** Custom message for legacy CPF validation */
3722
- cpfMessage?: string;
3723
- /** Custom message for legacy CNPJ validation */
3724
- cnpjMessage?: string;
3725
- /** Custom message for alphanumeric CNPJ validation */
3726
- cnpjAlphaMessage?: string;
3727
- /** Built-in legacy CPF validation */
3728
- cpf?: boolean;
3729
- /** Built-in legacy CNPJ validation */
3730
- cnpj?: boolean;
3731
- /** Built-in auto-detect CPF/CNPJ validation */
3732
- cpfCnpj?: boolean;
3733
- /** Built-in alphanumeric CNPJ validation */
3734
- cnpjAlpha?: boolean;
3735
- /** Built-in email validation */
3736
- email?: boolean;
3737
- /** Custom message for email validation */
3738
- emailMessage?: string;
3739
- /** Built-in URL validation */
3740
- url?: boolean;
3741
- /** Custom message for URL validation */
3742
- urlMessage?: string;
3743
- /** Minimum number of words for text content */
3744
- minWords?: number;
3745
- /** Require checkbox to be checked (for checkbox fields) */
3746
- requiredChecked?: boolean;
3747
- /** Custom synchronous validator function */
3748
- customValidator?: (value: any, context?: any) => boolean | string | null;
3749
- /** Custom asynchronous validator function */
3750
- asyncValidator?: (value: any, context?: any) => Promise<boolean | string | null>;
3751
- /** Cross-field validation - must match another field */
3752
- matchField?: string;
3753
- /** Custom message for field matching validation */
3754
- matchFieldMessage?: string;
3755
- /** Unique value validation via API call */
3756
- uniqueValidator?: (value: any) => Promise<boolean>;
3757
- /** Custom message for unique validation */
3758
- uniqueMessage?: string;
3759
- /** Conditional validation rules */
3760
- conditionalValidation?: {
3761
- condition: (formValue: any) => boolean;
3762
- validators: Omit<ValidatorOptions, 'conditionalValidation'>;
3763
- }[];
3764
- /** When to trigger validation */
3765
- validationTrigger?: 'change' | 'blur' | 'submit' | 'immediate';
3766
- /** Debounce time for validation in milliseconds */
3767
- validationDebounce?: number;
3768
- /** Show validation errors inline */
3769
- showInlineErrors?: boolean;
3770
- /** Custom error display position */
3771
- errorPosition?: 'bottom' | 'top' | 'tooltip';
3772
- }
3773
- /**
3774
- * Configuration for field options in selection components.
3775
- *
3776
- * Supports both static arrays and dynamic loading from APIs
3777
- * with flexible data transformation capabilities.
3778
- */
3779
- interface FieldOption {
3780
- /** The actual value to be stored */
3781
- value: any;
3782
- /** Display text shown to user */
3783
- text: string;
3784
- /** Optional grouping for organized display */
3785
- group?: string;
3786
- /** Whether this option is disabled */
3787
- disabled?: boolean;
3788
- /** Additional data associated with option */
3789
- data?: any;
3790
- /** CSS class for styling */
3791
- cssClass?: string;
3792
- /** Alternative CSS class property name */
3793
- class?: string;
3794
- /** Icon to display with option */
3795
- icon?: string;
3796
- /** Tooltip text for option */
3797
- tooltip?: string;
3798
- /** Detailed description for the option */
3799
- description?: string;
3800
- }
3801
- /**
3802
- * Angular Material specific styling and behavior options.
3803
- *
3804
- * Covers appearance, theming, density, and interaction patterns
3805
- * specific to Material Design 3 components.
3806
- */
3807
- interface MaterialDesignConfig {
3808
- /** Material appearance variant */
3809
- appearance?: 'fill' | 'outline';
3810
- /** Material color theme */
3811
- color?: 'primary' | 'accent' | 'warn';
3812
- /** Label floating behavior */
3813
- floatLabel?: 'auto' | 'always';
3814
- /** Subscript sizing strategy */
3815
- subscriptSizing?: 'fixed' | 'dynamic';
3816
- /** Hide required marker asterisk */
3817
- hideRequiredMarker?: boolean;
3818
- /** Component density */
3819
- density?: 'comfortable' | 'compact' | 'dense';
3820
- /** Disable ripple effects */
3821
- disableRipple?: boolean;
3822
- /** Custom theme palette override */
3823
- customPalette?: {
3824
- primary?: string;
3825
- accent?: string;
3826
- warn?: string;
3609
+ * Observable da configuração atual
3610
+ */
3611
+ get config$(): Observable<TableConfig>;
3612
+ /**
3613
+ * Carrega uma nova configuração
3614
+ */
3615
+ loadConfig(config: TableConfig): void;
3616
+ /**
3617
+ * Atualiza a configuração atual
3618
+ */
3619
+ updateConfig(configUpdate: Partial<TableConfig>): void;
3620
+ /**
3621
+ * Atualiza configuração de coluna específica
3622
+ */
3623
+ updateColumn(columnIndex: number, columnUpdate: Partial<ColumnDefinition>): void;
3624
+ /**
3625
+ * Adiciona nova coluna
3626
+ */
3627
+ addColumn(column: ColumnDefinition): void;
3628
+ /**
3629
+ * Remove coluna por índice
3630
+ */
3631
+ removeColumn(columnIndex: number): void;
3632
+ /**
3633
+ * Reordena colunas
3634
+ */
3635
+ reorderColumns(fromIndex: number, toIndex: number): void;
3636
+ /**
3637
+ * Obtém coluna por índice
3638
+ */
3639
+ getColumn(columnIndex: number): ColumnDefinition | undefined;
3640
+ /**
3641
+ * Obtém coluna por field
3642
+ */
3643
+ getColumnByField(field: string): ColumnDefinition | undefined;
3644
+ /**
3645
+ * Verifica se um recurso está habilitado
3646
+ */
3647
+ isFeatureEnabled(feature: keyof TableConfig): boolean;
3648
+ /**
3649
+ * Obtém configuração de paginação
3650
+ */
3651
+ getPaginationConfig(): PaginationConfig | undefined;
3652
+ /**
3653
+ * Obtém configuração de ordenação
3654
+ */
3655
+ getSortingConfig(): SortingConfig | undefined;
3656
+ /**
3657
+ * Obtém configuração de filtragem
3658
+ */
3659
+ getFilteringConfig(): FilteringConfig | undefined;
3660
+ /**
3661
+ * Obtém configuração de seleção
3662
+ */
3663
+ getSelectionConfig(): SelectionConfig | undefined;
3664
+ /**
3665
+ * Obtém configuração da toolbar
3666
+ */
3667
+ getToolbarConfig(): ToolbarConfig | undefined;
3668
+ /**
3669
+ * Obtém configuração de ações
3670
+ */
3671
+ getActionsConfig(): TableActionsConfig | undefined;
3672
+ /**
3673
+ * Obtém configuração de aparência
3674
+ */
3675
+ getAppearanceConfig(): TableAppearanceConfig | undefined;
3676
+ /**
3677
+ * Obtém configuração de mensagens
3678
+ */
3679
+ getMessagesConfig(): MessagesConfig | undefined;
3680
+ /**
3681
+ * Obtém configuração de localização
3682
+ */
3683
+ getLocalizationConfig(): LocalizationConfig | undefined;
3684
+ /**
3685
+ * Reset para configuração padrão
3686
+ */
3687
+ resetToDefault(): void;
3688
+ /**
3689
+ * Valida a configuração atual
3690
+ */
3691
+ validateCurrentConfig(): {
3692
+ isValid: boolean;
3693
+ errors: string[];
3827
3694
  };
3828
- /** Animation configuration */
3829
- animations?: {
3830
- disabled?: boolean;
3831
- duration?: number;
3832
- easing?: string;
3695
+ /**
3696
+ * Exporta configuração como JSON
3697
+ */
3698
+ exportConfig(): string;
3699
+ /**
3700
+ * Importa configuração de JSON
3701
+ */
3702
+ importConfig(jsonConfig: string): {
3703
+ success: boolean;
3704
+ error?: string;
3705
+ };
3706
+ /**
3707
+ * Clona a configuração atual
3708
+ */
3709
+ cloneCurrentConfig(): TableConfig;
3710
+ /**
3711
+ * Atualiza o estado interno
3712
+ */
3713
+ private updateState;
3714
+ /**
3715
+ * Obtém estatísticas da configuração atual
3716
+ */
3717
+ getConfigurationStats(): {
3718
+ totalColumns: number;
3719
+ visibleColumns: number;
3720
+ sortableColumns: number;
3721
+ filterableColumns: number;
3722
+ stickyColumns: number;
3723
+ hasToolbar: boolean;
3724
+ hasRowActions: boolean;
3725
+ hasBulkActions: boolean;
3726
+ hasPagination: boolean;
3727
+ hasSorting: boolean;
3728
+ hasFiltering: boolean;
3729
+ hasSelection: boolean;
3730
+ hasExport: boolean;
3731
+ hasVirtualScroll: boolean;
3732
+ hasLazyLoading: boolean;
3833
3733
  };
3734
+ static ɵfac: i0.ɵɵFactoryDeclaration<TableConfigService, never>;
3735
+ static ɵprov: i0.ɵɵInjectableDeclaration<TableConfigService>;
3736
+ }
3737
+
3738
+ declare function buildBaseColumnFromDef(def: FieldDefinition): ColumnDefinition;
3739
+ declare function applyLocalCustomizations$1(baseCol: ColumnDefinition, localCol: ColumnDefinition): ColumnDefinition;
3740
+ declare function reconcileTableConfig(layout: TableConfigV2, serverDefs: FieldDefinition[]): TableConfigV2;
3741
+
3742
+ interface ConfigStorage {
3743
+ loadConfig<T>(key: string): T | null;
3744
+ saveConfig<T>(key: string, config: T): void;
3745
+ clearConfig(key: string): void;
3834
3746
  }
3835
3747
  /**
3836
- * Comprehensive metadata interface for form fields.
3837
- *
3838
- * This is the main interface that extends ComponentMetadata with field-specific
3839
- * properties covering behavior, validation, data binding, and UI configuration.
3840
- *
3841
- * @example
3842
- * ```typescript
3843
- * const emailField: FieldMetadata = {
3844
- * name: 'email',
3845
- * label: 'Email Address',
3846
- * controlType: 'input',
3847
- * required: true,
3848
- * validators: {
3849
- * required: true,
3850
- * email: true,
3851
- * requiredMessage: 'Email is required',
3852
- * emailMessage: 'Please enter a valid email'
3853
- * },
3854
- * materialDesign: {
3855
- * appearance: 'outline',
3856
- * color: 'primary'
3857
- * }
3858
- * };
3859
- * ```
3748
+ * Async contract for config storage (HTTP-friendly).
3860
3749
  */
3861
- interface FieldMetadata extends ComponentMetadata {
3862
- /** Unique field identifier (required) */
3863
- name: string;
3864
- /** Display label for the field */
3865
- label: string;
3750
+ interface AsyncConfigStorage {
3866
3751
  /**
3867
- * Indicates that `label` was generated automatically by infrastructure code
3868
- * such as schema mappers, instead of being authored explicitly by metadata.
3869
- *
3870
- * This flag is optional and defaults to `false` when omitted, preserving
3871
- * backward compatibility for existing serialized metadata and host contracts.
3752
+ * Reads config for a key.
3872
3753
  *
3873
- * Intended use:
3874
- * - allow authoring/runtime layers to distinguish domain text from fallback UI
3875
- * - support governance checks that require explicit labels in enterprise flows
3876
- * - avoid relying on implicit casts such as `(fieldMetadata as any)`
3877
- */
3878
- labelAutoGenerated?: boolean;
3879
- /** Field control type for component resolution */
3880
- controlType: FieldControlType;
3881
- /** Data type for processing and validation */
3882
- dataType?: FieldDataType;
3883
- /** Display order in form */
3884
- order?: number;
3885
- /** Logical grouping of related fields */
3886
- group?: string;
3887
- /** Detailed description for tooltips */
3888
- description?: string;
3889
- /** Field is required */
3890
- required?: boolean;
3891
- /** Field is disabled */
3892
- disabled?: boolean;
3893
- /** Field is read-only */
3894
- readOnly?: boolean;
3895
- /** Field is hidden from display */
3896
- hidden?: boolean;
3897
- /** Default value when form initializes */
3898
- defaultValue?: any;
3899
- /** Placeholder text for empty fields */
3900
- placeholder?: string;
3901
- /** Help text displayed below field */
3902
- hint?: string;
3903
- /** Tooltip text on hover */
3904
- tooltip?: string;
3905
- /** Semantic selection mode for boolean/single/multiple choice controls */
3906
- selectionMode?: 'boolean' | 'single' | 'multiple';
3907
- /** Visual variant used by controls with more than one supported presentation */
3908
- variant?: string;
3909
- /** Comprehensive validation rules */
3910
- validators?: ValidatorOptions;
3911
- /** When to validate field changes */
3912
- validationMode?: 'immediate' | 'blur' | 'submit';
3913
- /** Debounce time for validation (ms) */
3914
- debounceTime?: number;
3915
- /** Validate uniqueness via API */
3916
- unique?: boolean;
3917
- /** Static options for selection fields */
3918
- options?: FieldOption[];
3919
- /** API endpoint for dynamic data loading */
3920
- endpoint?: string;
3921
- /** Canonical backend resource path for metadata-driven requests */
3922
- resourcePath?: string;
3923
- /** Canonical metadata-driven source for derived options */
3924
- optionSource?: OptionSourceMetadata;
3925
- /** Field name for option values */
3926
- valueField?: string;
3927
- /** Field name for option display text */
3928
- displayField?: string;
3929
- /** Field name for option filtering */
3930
- filterField?: string;
3931
- /** Additional query parameters for API calls */
3932
- queryParams?: Record<string, any>;
3933
- /** Cache duration for remote data (ms) */
3934
- cacheDuration?: number;
3935
- /** Field width specification */
3936
- width?: string | number;
3937
- /** Use flexbox sizing */
3938
- isFlex?: boolean;
3939
- /** Icons configuration */
3940
- prefixIcon?: string;
3941
- suffixIcon?: string;
3942
- iconPosition?: 'start' | 'end';
3943
- iconSize?: 'small' | 'medium' | 'large';
3944
- /** Tooltip for suffix icon (used for help actions) */
3945
- suffixIconTooltip?: string;
3946
- /** ARIA label for suffix icon when used as help */
3947
- suffixIconAriaLabel?: string;
3948
- /** Input masking pattern */
3949
- mask?: string;
3950
- /** Format for display values */
3951
- format?: string;
3754
+ * Success contract:
3755
+ * - emit one `next` value (can be `null`) and complete.
3756
+ * Failure contract:
3757
+ * - emit `error`.
3758
+ */
3759
+ loadConfig<T>(key: string): Observable<T | null>;
3952
3760
  /**
3953
- * Canonical value-presentation semantics used by read-only/display surfaces.
3761
+ * Persists config for a key.
3954
3762
  *
3955
- * When provided, this metadata should be preferred over legacy formatting
3956
- * hints such as `format`, `currency`, `locale`, or control-specific
3957
- * heuristics.
3763
+ * Success contract (strong ack):
3764
+ * - emit at least one `next` (typically `void 0`) and then complete.
3765
+ * Not-acknowledged contract (soft-fail path):
3766
+ * - complete without any `next`.
3767
+ * Hard-failure contract:
3768
+ * - emit `error`.
3769
+ *
3770
+ * Important:
3771
+ * - table runtime treats complete without `next` as
3772
+ * "persistence not acknowledged".
3958
3773
  */
3959
- valuePresentation?: ValuePresentationConfig;
3960
- /** Material Design specific configuration */
3961
- materialDesign?: MaterialDesignConfig;
3962
- /** Fields this field depends on */
3963
- dependencyFields?: string[];
3964
- /** Conditional required based on other fields */
3965
- conditionalRequired?: string | ((formValue: any) => boolean);
3966
- /** Conditional visibility rules */
3967
- conditionalDisplay?: string | ((formValue: any) => boolean);
3968
- /** Reset value when dependency changes */
3969
- resetOnDependentChange?: boolean;
3970
- /** Enable native field-to-field dependency cascade inside the same form */
3971
- enableDependencyCascade?: boolean;
3774
+ saveConfig<T>(key: string, config: T): Observable<void>;
3972
3775
  /**
3973
- * Map dependent field name -> backend filter key or { key, valuePath }
3974
- * Supports dot-path in 'key' to build nested filter objects
3776
+ * Clears config for a key.
3777
+ *
3778
+ * Success contract (strong ack):
3779
+ * - emit at least one `next` (typically `void 0`) and then complete.
3780
+ * Not-acknowledged contract (soft-fail path):
3781
+ * - complete without any `next`.
3782
+ * Hard-failure contract:
3783
+ * - emit `error`.
3784
+ *
3785
+ * Important:
3786
+ * - table runtime treats complete without `next` as
3787
+ * "clear not acknowledged".
3975
3788
  */
3976
- dependencyFilterMap?: Record<string, string | {
3977
- key: string;
3978
- valuePath?: string;
3979
- }>;
3980
- /** Value path for extracting the dependent value (string or per-field map) */
3981
- dependencyValuePath?: string | Record<string, string>;
3982
- /** Debounce (ms) applied to combined dependencies */
3983
- dependencyDebounceMs?: number;
3984
- /** How to merge calculated fragment: 'replace' | 'merge' */
3985
- dependencyMergeStrategy?: 'replace' | 'merge';
3986
- /** When to reload on dependency change */
3987
- dependencyLoadOnChange?: 'respectLoadOn' | 'immediate' | 'manual';
3988
- /** Optional: suppress inline errors briefly when cascade resets value */
3989
- suppressInlineErrorsOnCascade?: boolean;
3990
- /** Allow inline editing in tables */
3991
- inlineEditing?: boolean;
3992
- /** Transform value before display */
3993
- transformDisplayValue?: (value: any) => any;
3994
- /** Transform value before saving */
3995
- transformSaveValue?: (value: any) => any;
3996
- /** Where to apply optional text transformation (editor setting) */
3997
- textTransformApply?: 'displayOnly' | 'saveOnly' | 'both';
3998
- /** Contexts where field should be visible */
3999
- visibleIn?: Array<'form' | 'filter' | 'table' | 'dialog'>;
4000
- /** Hide in specific form contexts */
4001
- formHidden?: boolean;
4002
- /** Hide in table contexts */
4003
- tableHidden?: boolean;
4004
- /** Hide in filter contexts */
4005
- filterHidden?: boolean;
4006
- /** ARIA label for screen readers */
4007
- ariaLabel?: string;
4008
- /** ARIA described by element IDs */
4009
- ariaDescribedBy?: string;
4010
- /** Tab index for keyboard navigation */
4011
- tabIndex?: number;
4012
- /** Keyboard shortcuts */
4013
- accessKey?: string;
3789
+ clearConfig(key: string): Observable<void>;
3790
+ }
3791
+ declare class LocalStorageConfigService implements ConfigStorage {
3792
+ loadConfig<T>(key: string): T | null;
3793
+ saveConfig<T>(key: string, config: T): void;
3794
+ clearConfig(key: string): void;
3795
+ trySaveConfig<T>(key: string, config: T): boolean;
3796
+ tryClearConfig(key: string): boolean;
3797
+ static ɵfac: i0.ɵɵFactoryDeclaration<LocalStorageConfigService, never>;
3798
+ static ɵprov: i0.ɵɵInjectableDeclaration<LocalStorageConfigService>;
4014
3799
  }
4015
3800
  /**
4016
- * Date range value object for daterange control type.
4017
- *
4018
- * Represents a date range selection with start and end dates,
4019
- * commonly used in corporate reporting and analytics scenarios.
4020
- *
4021
- * @example
4022
- * ```typescript
4023
- * const quarterRange: DateRangeValue = {
4024
- * startDate: new Date('2024-01-01'),
4025
- * endDate: new Date('2024-03-31'),
4026
- * preset: 'thisQuarter',
4027
- * timezone: 'America/New_York'
4028
- * };
4029
- * ```
3801
+ * Async adapter over the sync LocalStorage service.
4030
3802
  */
4031
- interface DateRangeValue {
4032
- /** Start date of the range */
4033
- startDate: Date | null;
4034
- /** End date of the range */
4035
- endDate: Date | null;
4036
- /** Applied preset name if range was selected via preset */
4037
- preset?: string;
4038
- /** Timezone context for the range */
4039
- timezone?: string;
4040
- /** User-friendly label for the range */
4041
- label?: string;
4042
- /** Whether this is a comparison range */
4043
- isComparison?: boolean;
3803
+ declare class LocalStorageAsyncAdapter implements AsyncConfigStorage {
3804
+ private readonly delegate;
3805
+ constructor(delegate: LocalStorageConfigService);
3806
+ loadConfig<T>(key: string): Observable<T | null>;
3807
+ saveConfig<T>(key: string, config: T): Observable<void>;
3808
+ clearConfig(key: string): Observable<void>;
3809
+ static ɵfac: i0.ɵɵFactoryDeclaration<LocalStorageAsyncAdapter, never>;
3810
+ static ɵprov: i0.ɵɵInjectableDeclaration<LocalStorageAsyncAdapter>;
3811
+ }
3812
+ /**
3813
+ * Defers async storage operations until a gate resolves.
3814
+ * Useful to ensure auth/tenant context is ready before HTTP requests.
3815
+ */
3816
+ declare class DeferredAsyncConfigStorage implements AsyncConfigStorage {
3817
+ private readonly delegate;
3818
+ private readonly gate?;
3819
+ constructor(delegate: AsyncConfigStorage, gate?: (() => Promise<void>) | undefined);
3820
+ loadConfig<T>(key: string): Observable<T | null>;
3821
+ saveConfig<T>(key: string, config: T): Observable<void>;
3822
+ clearConfig(key: string): Observable<void>;
3823
+ }
3824
+ declare const ASYNC_CONFIG_STORAGE: InjectionToken<AsyncConfigStorage>;
3825
+ declare class RemoteConfigStorage implements ConfigStorage {
3826
+ private readonly asyncStorage;
3827
+ private readonly localStorage;
3828
+ private readonly cache;
3829
+ private readonly inflight;
3830
+ loadConfig<T>(key: string): T | null;
3831
+ saveConfig<T>(key: string, config: T): void;
3832
+ clearConfig(key: string): void;
3833
+ private refreshRemote;
3834
+ static ɵfac: i0.ɵɵFactoryDeclaration<RemoteConfigStorage, never>;
3835
+ static ɵprov: i0.ɵɵInjectableDeclaration<RemoteConfigStorage>;
3836
+ }
3837
+ declare const CONFIG_STORAGE: InjectionToken<ConfigStorage>;
3838
+ /**
3839
+ * Options for ApiConfigStorage.
3840
+ */
3841
+ interface ApiConfigStorageOptions {
3842
+ baseUrl?: string;
3843
+ /** Factory to supply headers (tenant/user/env/updatedBy) per request. */
3844
+ headersFactory?: () => Record<string, string | undefined>;
3845
+ /** Default headers applied when the headersFactory omits them. */
3846
+ defaultHeaders?: Record<string, string>;
3847
+ /** Resolve componentType from the storage key (use the component selector, e.g. praxis-table). */
3848
+ componentTypeResolver?: (key: string) => string;
3849
+ /** Controls whether load errors for global config should propagate. */
3850
+ errorPolicy?: 'fail' | 'ignore';
3851
+ }
3852
+ declare const API_CONFIG_STORAGE_OPTIONS: InjectionToken<ApiConfigStorageOptions>;
3853
+ /**
3854
+ * HTTP-based storage that talks to praxis-config-starter user-config API.
3855
+ */
3856
+ declare class ApiConfigStorage implements AsyncConfigStorage {
3857
+ private static readonly loadAvailabilityProbes;
3858
+ private readonly http;
3859
+ private readonly opts;
3860
+ private readonly baseUrl;
3861
+ private readonly headersFactory;
3862
+ private readonly defaultHeaders;
3863
+ private readonly componentTypeResolver;
3864
+ private readonly cache;
3865
+ constructor();
3866
+ private shouldLogLoadError;
3867
+ private shouldLogSaveError;
3868
+ private shouldLogClearError;
3869
+ loadConfig<T>(key: string): Observable<T | null>;
3870
+ private executeLoadConfigRequest;
3871
+ saveConfig<T>(key: string, config: T): Observable<void>;
3872
+ private shouldPropagateSaveError;
3873
+ private shouldPropagateClearError;
3874
+ private shouldPropagateLoadError;
3875
+ private isCriticalPersistenceKey;
3876
+ clearConfig(key: string): Observable<void>;
3877
+ private buildHeaders;
3878
+ private buildParams;
3879
+ private resolveKey;
3880
+ private inferComponentType;
3881
+ private looksLikePageKey;
3882
+ private stripQuotes;
3883
+ private formatEtag;
3884
+ static ɵfac: i0.ɵɵFactoryDeclaration<ApiConfigStorage, never>;
3885
+ static ɵprov: i0.ɵɵInjectableDeclaration<ApiConfigStorage>;
3886
+ }
3887
+
3888
+ type GlobalActionResult = {
3889
+ success: boolean;
3890
+ data?: any;
3891
+ error?: string;
3892
+ };
3893
+ type GlobalActionContext = {
3894
+ sourceId?: string;
3895
+ widgetKey?: string;
3896
+ output?: string;
3897
+ payload?: any;
3898
+ pageContext?: Record<string, any> | null;
3899
+ meta?: Record<string, any>;
3900
+ runtime?: {
3901
+ row?: any;
3902
+ item?: any;
3903
+ selection?: any;
3904
+ formData?: any;
3905
+ value?: any;
3906
+ state?: any;
3907
+ };
3908
+ };
3909
+ type GlobalActionHandler = (payload?: any, context?: GlobalActionContext) => Promise<GlobalActionResult> | GlobalActionResult;
3910
+ interface GlobalActionHandlerEntry {
3911
+ id: string;
3912
+ handler: GlobalActionHandler;
3913
+ }
3914
+ interface GlobalDialogService {
3915
+ alert: (payload: {
3916
+ title?: string;
3917
+ message?: string;
3918
+ variant?: string;
3919
+ }) => Promise<any> | any;
3920
+ confirm: (payload: {
3921
+ title?: string;
3922
+ message?: string;
3923
+ confirmLabel?: string;
3924
+ cancelLabel?: string;
3925
+ type?: 'danger' | 'warning' | 'info';
3926
+ }) => Promise<boolean> | boolean;
3927
+ prompt: (payload: {
3928
+ title?: string;
3929
+ message?: string;
3930
+ placeholder?: string;
3931
+ defaultValue?: string;
3932
+ }) => Promise<any> | any;
3933
+ open: (payload: {
3934
+ componentId?: string;
3935
+ inputs?: any;
3936
+ size?: any;
3937
+ data?: any;
3938
+ }) => Promise<any> | any;
4044
3939
  }
4045
- /**
4046
- * Numeric range value object for price range fields.
4047
- *
4048
- * Represents a monetary range with minimum and maximum values.
4049
- */
4050
- interface PriceRangeValue {
4051
- /** Lower bound of the range */
4052
- minPrice: number | null;
4053
- /** Upper bound of the range */
4054
- maxPrice: number | null;
3940
+ interface GlobalToastService {
3941
+ success: (message: string, opts?: any) => void;
3942
+ error: (message: string, opts?: any) => void;
4055
3943
  }
4056
- /**
4057
- * The value for a generic numeric range slider.
4058
- */
4059
- interface RangeSliderValue {
4060
- /** Start value of the range */
4061
- start: number | null;
4062
- /** End value of the range */
4063
- end: number | null;
3944
+ interface GlobalAnalyticsService {
3945
+ track: (eventName: string, payload?: any) => void;
4064
3946
  }
4065
- /**
4066
- * Corporate preset configuration for date ranges.
4067
- *
4068
- * Defines common business date ranges used in enterprise applications
4069
- * for reporting, analytics, and compliance purposes.
4070
- */
4071
- interface DateRangePreset {
4072
- /** Unique identifier for the preset */
3947
+ interface GlobalApiClient {
3948
+ get: (url: string, params?: Record<string, any>) => Promise<any> | any;
3949
+ post: (url: string, body?: any) => Promise<any> | any;
3950
+ patch: (url: string, body?: any) => Promise<any> | any;
3951
+ }
3952
+ interface GlobalRouteGuardResolver {
3953
+ resolve: (guardId: string) => any;
3954
+ }
3955
+
3956
+ declare class GlobalActionService {
3957
+ private readonly handlers;
3958
+ private readonly router;
3959
+ private readonly location;
3960
+ private readonly registry;
3961
+ private readonly globalConfig;
3962
+ private readonly dialog;
3963
+ private readonly surface;
3964
+ private readonly toast;
3965
+ private readonly analytics;
3966
+ private readonly api;
3967
+ private readonly guardResolver;
3968
+ private readonly surfaceBindingRuntime;
3969
+ constructor();
3970
+ register(id: string, handler: GlobalActionHandler): void;
3971
+ has(id: string): boolean;
3972
+ execute(id: string, payload?: any, context?: GlobalActionContext): Promise<GlobalActionResult>;
3973
+ private registerBuiltins;
3974
+ private handleApi;
3975
+ private handleRouteRegister;
3976
+ static ɵfac: i0.ɵɵFactoryDeclaration<GlobalActionService, never>;
3977
+ static ɵprov: i0.ɵɵInjectableDeclaration<GlobalActionService>;
3978
+ }
3979
+
3980
+ type ActionDefinition = {
3981
+ /** Global action id to execute (e.g., 'navigation.back', 'dialog.alert'). */
3982
+ type?: string;
3983
+ /** Optional payload template for the action. */
3984
+ params?: Record<string, any>;
3985
+ };
3986
+ interface WidgetDefinition {
3987
+ /** Component id registered in ComponentMetadataRegistry */
4073
3988
  id: string;
4074
- /** Display label for the preset */
4075
- label: string;
4076
- /** Icon to display with the preset */
3989
+ /** Optional author-defined identity for nested widget instances inside composite containers. */
3990
+ childWidgetKey?: string;
3991
+ /** Inputs to bind into the component instance */
3992
+ inputs?: Record<string, any>;
3993
+ /** Map of component output name to action (global action or 'emit'). */
3994
+ outputs?: Record<string, ActionDefinition | 'emit'>;
3995
+ /**
3996
+ * Optional explicit order for applying inputs. Keys listed here are applied first
3997
+ * (in order) with change detection flush between each, then remaining inputs are applied.
3998
+ */
3999
+ bindingOrder?: string[];
4000
+ }
4001
+
4002
+ type SurfacePresentation = 'modal' | 'drawer';
4003
+ type SurfaceBindingMode = 'path' | 'template' | 'constant';
4004
+ interface SurfaceBinding {
4005
+ from?: string;
4006
+ to: string;
4007
+ mode?: SurfaceBindingMode;
4008
+ value?: any;
4009
+ }
4010
+ interface SurfaceSizeConfig {
4011
+ width?: string;
4012
+ height?: string;
4013
+ minWidth?: string;
4014
+ maxWidth?: string;
4015
+ minHeight?: string;
4016
+ maxHeight?: string;
4017
+ }
4018
+ interface SurfaceOpenPayload {
4019
+ presentation: SurfacePresentation;
4020
+ title?: string;
4021
+ subtitle?: string;
4077
4022
  icon?: string;
4078
- /** Category for grouping presets */
4079
- category?: 'standard' | 'fiscal' | 'custom' | 'comparison';
4080
- /** Function to calculate the date range */
4081
- calculateRange: (referenceDate?: Date) => DateRangeValue;
4082
- /** Whether this preset is commonly used */
4083
- isPopular?: boolean;
4084
- /** Tooltip description */
4023
+ size?: SurfaceSizeConfig;
4024
+ widget: WidgetDefinition;
4025
+ bindings?: SurfaceBinding[];
4026
+ context?: Record<string, any>;
4027
+ }
4028
+
4029
+ declare class SurfaceBindingRuntimeService {
4030
+ resolveWidget(widget: WidgetDefinition, bindings: SurfaceBinding[] | undefined, actionPayload?: any, actionContext?: GlobalActionContext, explicitContext?: Record<string, any>): WidgetDefinition;
4031
+ extractByPath(obj: any, path?: string): any;
4032
+ resolveTemplate(node: any, context: any): any;
4033
+ setValueAtPath<T extends object>(obj: T, rawPath: string, value: any): T;
4034
+ private buildContext;
4035
+ private resolveBindingValue;
4036
+ private normalizeTargetPath;
4037
+ private tokenizePath;
4038
+ private clone;
4039
+ static ɵfac: i0.ɵɵFactoryDeclaration<SurfaceBindingRuntimeService, never>;
4040
+ static ɵprov: i0.ɵɵInjectableDeclaration<SurfaceBindingRuntimeService>;
4041
+ }
4042
+
4043
+ interface ConnectionConfigV1 {
4044
+ resourcePath: string;
4045
+ version: 1;
4046
+ updatedAt: string;
4047
+ origin?: 'quick-connect' | 'editor' | 'input';
4048
+ }
4049
+ interface ConnectionStorage {
4050
+ loadConnection(key: string): Observable<ConnectionConfigV1 | null>;
4051
+ saveConnection(key: string, cfg: ConnectionConfigV1): Observable<void>;
4052
+ clearConnection(key: string): Observable<void>;
4053
+ }
4054
+ declare class LocalConnectionStorage implements ConnectionStorage {
4055
+ private storage;
4056
+ constructor(storage: AsyncConfigStorage);
4057
+ loadConnection(key: string): Observable<ConnectionConfigV1 | null>;
4058
+ saveConnection(key: string, cfg: ConnectionConfigV1): Observable<void>;
4059
+ clearConnection(key: string): Observable<void>;
4060
+ static ɵfac: i0.ɵɵFactoryDeclaration<LocalConnectionStorage, never>;
4061
+ static ɵprov: i0.ɵɵInjectableDeclaration<LocalConnectionStorage>;
4062
+ }
4063
+ declare const CONNECTION_STORAGE: InjectionToken<ConnectionStorage>;
4064
+
4065
+ type DeviceKind = 'mobile' | 'tablet' | 'desktop';
4066
+ type OverlayPattern = 'modal' | 'drawer' | 'page' | 'bottom-sheet' | 'full-screen-dialog';
4067
+ interface OverlayDecisionContext {
4068
+ device: DeviceKind;
4069
+ fieldCount: number;
4070
+ dependencyCount: number;
4071
+ }
4072
+ interface OverlayDecision {
4073
+ pattern: OverlayPattern;
4074
+ config?: Record<string, unknown>;
4075
+ reason?: string;
4076
+ }
4077
+ interface OverlayRange {
4078
+ min?: number;
4079
+ max?: number;
4080
+ }
4081
+ interface OverlayRuleMatch {
4082
+ device?: DeviceKind[];
4083
+ fieldCount?: OverlayRange;
4084
+ dependencyCount?: OverlayRange;
4085
+ any?: OverlayRuleMatch[];
4086
+ }
4087
+ interface OverlayRule {
4088
+ match: OverlayRuleMatch;
4089
+ use: OverlayDecision;
4090
+ }
4091
+ interface OverlayThresholds {
4092
+ fieldCount: {
4093
+ small_max: number;
4094
+ medium_max: number;
4095
+ };
4096
+ dependencyCount: {
4097
+ low_max: number;
4098
+ medium_max: number;
4099
+ };
4100
+ }
4101
+ interface OverlayDecisionMatrix {
4102
+ version: string;
4085
4103
  description?: string;
4086
- /** Display order in preset list */
4087
- order?: number;
4104
+ thresholds: OverlayThresholds;
4105
+ rules_ordered: OverlayRule[];
4106
+ fallback: OverlayDecision;
4107
+ ui_hints?: Record<string, unknown>;
4108
+ }
4109
+ interface OverlayDecider {
4110
+ decide(ctx: OverlayDecisionContext): OverlayDecision;
4111
+ explain?(ctx: OverlayDecisionContext): string;
4112
+ }
4113
+
4114
+ declare const OVERLAY_DECIDER_DEBUG: InjectionToken<boolean>;
4115
+ declare class OverlayDeciderService {
4116
+ private readonly matrix;
4117
+ private readonly debug;
4118
+ decide(ctx: OverlayDecisionContext): OverlayDecision;
4119
+ explain(ctx: OverlayDecisionContext): string;
4120
+ private evaluate;
4121
+ private matches;
4122
+ private log;
4123
+ static ɵfac: i0.ɵɵFactoryDeclaration<OverlayDeciderService, never>;
4124
+ static ɵprov: i0.ɵɵInjectableDeclaration<OverlayDeciderService>;
4088
4125
  }
4089
- /** Helper type for partial field metadata updates */
4090
- type PartialFieldMetadata = Partial<FieldMetadata> & {
4091
- name: string;
4092
- };
4093
- /** Helper type for required core field properties */
4094
- type CoreFieldMetadata = Pick<FieldMetadata, 'name' | 'label' | 'controlType'>;
4095
- /** Helper type for field metadata without computed properties */
4096
- type SerializableFieldMetadata = Omit<FieldMetadata, 'conditionalRequired' | 'conditionalDisplay' | 'transformDisplayValue' | 'transformSaveValue'>;
4097
4126
 
4098
4127
  /**
4099
4128
  * Enhanced validation context with type safety
@@ -5966,6 +5995,104 @@ interface MaterialTreeSelectMetadata extends FieldMetadata {
5966
5995
  returnObject?: boolean;
5967
5996
  }
5968
5997
 
5998
+ type PraxisJsonLogicIssueCode = 'RULE_SHAPE_INVALID' | 'RULE_OPERATOR_UNKNOWN' | 'RULE_ARITY_INVALID' | 'RULE_PATH_INVALID' | 'RULE_CONTEXT_AMBIGUOUS' | 'RULE_ROOT_UNKNOWN' | 'RULE_ARGUMENT_TYPE_INVALID';
5999
+ type PraxisJsonLogicRuntimeValue = unknown;
6000
+ interface PraxisJsonLogicEvaluationContext {
6001
+ data: JsonLogicRecord;
6002
+ availableRoots?: RuleContextRoot[];
6003
+ defaultRoot?: RuleContextRoot | null;
6004
+ allowImplicitRoot?: boolean;
6005
+ nowUtc?: string;
6006
+ userTimeZone?: string;
6007
+ }
6008
+ interface PraxisJsonLogicEvaluationOptions {
6009
+ availableRoots?: RuleContextRoot[];
6010
+ defaultRoot?: RuleContextRoot | null;
6011
+ allowImplicitRoot?: boolean;
6012
+ nowUtc?: string;
6013
+ userTimeZone?: string;
6014
+ }
6015
+ interface PraxisJsonLogicValidationOptions extends PraxisJsonLogicEvaluationOptions {
6016
+ requireExpressionObject?: boolean;
6017
+ }
6018
+ interface PraxisJsonLogicValidationIssue {
6019
+ code: PraxisJsonLogicIssueCode;
6020
+ message: string;
6021
+ path: string;
6022
+ operator?: string;
6023
+ }
6024
+ interface PraxisJsonLogicValidationResult {
6025
+ valid: boolean;
6026
+ issues: PraxisJsonLogicValidationIssue[];
6027
+ }
6028
+ interface PraxisJsonLogicOperatorHelpers {
6029
+ evaluate(expression: JsonLogicValue): PraxisJsonLogicRuntimeValue;
6030
+ truthy(value: PraxisJsonLogicRuntimeValue): boolean;
6031
+ resolvePath(path: string): PraxisJsonLogicRuntimeValue;
6032
+ requireArgs(operator: string, rawArgs: PraxisJsonLogicRuntimeValue[], min: number, max?: number): PraxisJsonLogicRuntimeValue[];
6033
+ }
6034
+ interface PraxisJsonLogicOperatorDefinition {
6035
+ operator: PraxisCustomRuleOperator;
6036
+ minArgs?: number;
6037
+ maxArgs?: number;
6038
+ evaluate(args: PraxisJsonLogicRuntimeValue[], context: PraxisJsonLogicEvaluationContext, helpers: PraxisJsonLogicOperatorHelpers): PraxisJsonLogicRuntimeValue;
6039
+ }
6040
+ interface PraxisJsonLogicEvaluationResult {
6041
+ value: PraxisJsonLogicRuntimeValue;
6042
+ truthy: boolean;
6043
+ }
6044
+ interface PraxisConditionalRuleMatchInput {
6045
+ condition: JsonLogicExpression | null;
6046
+ data: JsonLogicRecord;
6047
+ options?: PraxisJsonLogicEvaluationOptions;
6048
+ }
6049
+
6050
+ declare class PraxisJsonLogicError extends Error {
6051
+ readonly code: PraxisJsonLogicIssueCode;
6052
+ constructor(code: PraxisJsonLogicIssueCode, message: string);
6053
+ }
6054
+ declare class PraxisJsonLogicService {
6055
+ private readonly customOperators;
6056
+ constructor(operatorDefinitions: PraxisJsonLogicOperatorDefinition[] | null);
6057
+ evaluate(expression: JsonLogicExpression, data: JsonLogicRecord, options?: PraxisJsonLogicEvaluationOptions): PraxisJsonLogicRuntimeValue;
6058
+ evaluateResult(expression: JsonLogicExpression, data: JsonLogicRecord, options?: PraxisJsonLogicEvaluationOptions): PraxisJsonLogicEvaluationResult;
6059
+ validate(expression: JsonLogicExpression, options?: PraxisJsonLogicValidationOptions): void;
6060
+ validateResult(expression: JsonLogicExpression, options?: PraxisJsonLogicValidationOptions): PraxisJsonLogicValidationResult;
6061
+ matches(input: PraxisConditionalRuleMatchInput): boolean;
6062
+ truthy(value: PraxisJsonLogicRuntimeValue): boolean;
6063
+ private createContext;
6064
+ private evaluateValue;
6065
+ private evaluateRecord;
6066
+ private getOperatorEntry;
6067
+ private evaluateVar;
6068
+ private evaluateAnd;
6069
+ private evaluateOr;
6070
+ private evaluateIf;
6071
+ private evaluateComparison;
6072
+ private evaluateIn;
6073
+ private evaluateArithmetic;
6074
+ private evaluateCat;
6075
+ private evaluateSubstr;
6076
+ private evaluateArgs;
6077
+ private requireArgs;
6078
+ private resolveVarPath;
6079
+ private assertComparable;
6080
+ private toFiniteNumber;
6081
+ private toArgumentArray;
6082
+ private isExpressionObject;
6083
+ private isTruthy;
6084
+ private validateValue;
6085
+ private validateVar;
6086
+ private validateVarPath;
6087
+ private validateArity;
6088
+ private getOperatorArity;
6089
+ private isSupportedOperator;
6090
+ private isTopLevelExpressionObject;
6091
+ static ɵfac: i0.ɵɵFactoryDeclaration<PraxisJsonLogicService, [{ optional: true; }]>;
6092
+ static ɵprov: i0.ɵɵInjectableDeclaration<PraxisJsonLogicService>;
6093
+ }
6094
+ declare const DEFAULT_JSON_LOGIC_OPERATORS: PraxisJsonLogicOperatorDefinition[];
6095
+
5969
6096
  interface BuiltValidators {
5970
6097
  validators: ValidatorFn[];
5971
6098
  asyncValidators: AsyncValidatorFn[];
@@ -5993,7 +6120,7 @@ declare function cnpjAlphaValidator(message?: string): ValidatorFn;
5993
6120
  */
5994
6121
  declare function createCpfCnpjValidator(metadata: MaterialCpfCnpjMetadata): ValidatorFn;
5995
6122
  declare function buildAngularValidators(field: FieldDefinition): BuiltValidators;
5996
- declare function buildValidatorsFromValidatorOptions(opts?: ValidatorOptions): BuiltValidators;
6123
+ declare function buildValidatorsFromValidatorOptions(opts?: ValidatorOptions, jsonLogic?: PraxisJsonLogicService): BuiltValidators;
5997
6124
 
5998
6125
  /**
5999
6126
  * DynamicFormService
@@ -7495,6 +7622,9 @@ declare const DYNAMIC_PAGE_CONFIG_EDITOR: InjectionToken<Type<any>>;
7495
7622
 
7496
7623
  declare const PRAXIS_LOADING_CTX: HttpContextToken<LoadingContext | null>;
7497
7624
 
7625
+ declare const PRAXIS_JSON_LOGIC_OPERATORS: InjectionToken<PraxisJsonLogicOperatorDefinition[]>;
7626
+ declare function providePraxisJsonLogicOperator(definition: PraxisJsonLogicOperatorDefinition): Provider;
7627
+
7498
7628
  declare function interpolatePraxisTranslation(template: string, params?: PraxisTranslationParams): string;
7499
7629
  declare function mergePraxisI18nConfigs(...configs: Array<Partial<PraxisI18nConfig> | null | undefined>): PraxisI18nConfig;
7500
7630
 
@@ -7536,20 +7666,13 @@ interface TransformOutputHint {
7536
7666
  stableShape?: boolean;
7537
7667
  description?: string;
7538
7668
  }
7539
- interface TransformStepCondition {
7540
- source?: Exclude<TransformBindingSource, 'constant'>;
7541
- path?: string;
7542
- truthy?: boolean;
7543
- equals?: unknown;
7544
- notEquals?: unknown;
7545
- notEmpty?: boolean;
7546
- }
7547
7669
  interface TransformStep {
7548
7670
  id?: string;
7549
7671
  kind: TransformKind;
7550
7672
  phase: TransformPhase;
7551
7673
  label?: string;
7552
- when?: TransformStepCondition;
7674
+ /** Canonical Json Logic guard evaluated against event/payload/state/context/source. */
7675
+ when?: JsonLogicExpression | null;
7553
7676
  input?: TransformBinding;
7554
7677
  inputs?: TransformBinding[];
7555
7678
  config?: Record<string, unknown>;
@@ -7601,15 +7724,6 @@ interface StateEndpointRef {
7601
7724
  }
7602
7725
  type EndpointRef = ComponentPortEndpointRef | StateEndpointRef;
7603
7726
  type LinkIntent = 'event-propagation' | 'state-write' | 'state-read' | 'command-dispatch' | 'selection-sync' | 'data-projection' | 'status-propagation';
7604
- type LinkConditionKind = 'always' | 'expression' | 'equals' | 'present' | 'changed' | 'matches-port-kind';
7605
- interface LinkCondition {
7606
- kind: LinkConditionKind;
7607
- expression?: string;
7608
- path?: string;
7609
- value?: unknown;
7610
- negate?: boolean;
7611
- description?: string;
7612
- }
7613
7727
  interface LinkPolicy {
7614
7728
  debounceMs?: number;
7615
7729
  distinct?: boolean;
@@ -7632,7 +7746,7 @@ interface CompositionLink {
7632
7746
  to: EndpointRef;
7633
7747
  intent: LinkIntent;
7634
7748
  transform?: TransformPipeline;
7635
- conditions?: LinkCondition[];
7749
+ condition?: JsonLogicExpression | null;
7636
7750
  policy?: LinkPolicy;
7637
7751
  metadata?: LinkMetadata;
7638
7752
  }
@@ -7831,10 +7945,6 @@ interface FormHooksLayout {
7831
7945
  onError?: FormHookDeclarationLite[];
7832
7946
  }
7833
7947
 
7834
- interface Specification<T extends object = any> {
7835
- isSatisfiedBy(obj: T): boolean;
7836
- }
7837
-
7838
7948
  interface FormActionButton {
7839
7949
  id?: string;
7840
7950
  visible: boolean;
@@ -7977,8 +8087,8 @@ interface FormRowLayout {
7977
8087
  styles?: {
7978
8088
  [key: string]: any;
7979
8089
  };
7980
- hiddenCondition?: string | Specification<any> | null;
7981
- visibilityCondition?: string | Specification<any> | null;
8090
+ hiddenCondition?: JsonLogicExpression | null;
8091
+ visibilityCondition?: JsonLogicExpression | null;
7982
8092
  }
7983
8093
  interface NestedFieldsetLayout extends FormRowLayout {
7984
8094
  fieldsets?: FieldsetLayout[];
@@ -7991,7 +8101,7 @@ interface FieldsetLayout {
7991
8101
  titleEdit?: string;
7992
8102
  orientation: 'horizontal' | 'vertical';
7993
8103
  rows: FormRowLayout[];
7994
- hiddenCondition?: string | Specification<any> | null;
8104
+ hiddenCondition?: JsonLogicExpression | null;
7995
8105
  }
7996
8106
  type FormRuleTargetType = 'field' | 'section' | 'action' | 'row' | 'column';
7997
8107
  interface FormLayoutRule {
@@ -8017,7 +8127,7 @@ interface FormLayoutRule {
8017
8127
  */
8018
8128
  context?: 'visibility' | 'readOnly' | 'style' | 'validation' | 'notification';
8019
8129
  effect: {
8020
- condition: string | Specification<any> | null;
8130
+ condition: JsonLogicExpression | null;
8021
8131
  properties?: Record<string, any>;
8022
8132
  propertiesWhenFalse?: Record<string, any>;
8023
8133
  };
@@ -9213,8 +9323,8 @@ interface WidgetDerivedStateNode {
9213
9323
  dependsOn: string[];
9214
9324
  /** Placeholder descriptor for future derived-state runtime phases. */
9215
9325
  compute: {
9216
- kind: 'expr';
9217
- expression: string;
9326
+ kind: 'json-logic';
9327
+ expression: JsonLogicDerivedValueExpression;
9218
9328
  } | {
9219
9329
  kind: 'template';
9220
9330
  value: any;
@@ -10395,7 +10505,11 @@ interface WidgetPageStateRuntimeSnapshot {
10395
10505
  diagnostics: string[];
10396
10506
  }
10397
10507
  declare class WidgetPageStateRuntimeService {
10508
+ private readonly jsonLogic;
10398
10509
  private readonly connections;
10510
+ private readonly selectCaseRuleOptions;
10511
+ private readonly derivedValueRuleOptions;
10512
+ constructor(jsonLogic?: PraxisJsonLogicService);
10399
10513
  normalizeState(state: WidgetPageStateInput | undefined): WidgetPageStateDefinition;
10400
10514
  buildRuntimeSnapshot(state: WidgetPageStateInput | undefined, context?: Record<string, any> | null): WidgetPageStateRuntimeSnapshot;
10401
10515
  collectChangedPaths(previous: Record<string, any> | undefined, next: Record<string, any> | undefined, paths: string[]): string[];
@@ -10408,7 +10522,7 @@ declare class WidgetPageStateRuntimeService {
10408
10522
  private buildFieldList;
10409
10523
  private groupTop;
10410
10524
  private selectCase;
10411
- private matchesCase;
10525
+ private evaluateDerivedJsonLogic;
10412
10526
  private resolveCaseValue;
10413
10527
  private resolveTemplate;
10414
10528
  private normalizeDependencyPath;
@@ -10531,16 +10645,13 @@ interface LinkExecutionResult {
10531
10645
  declare class LinkExecutorService {
10532
10646
  private readonly transforms;
10533
10647
  private readonly pathAccessor;
10534
- constructor(transforms?: LinkExecutorTransformRunner, pathAccessor?: LinkExecutorPathAccessor);
10648
+ private readonly jsonLogic;
10649
+ constructor(transforms?: LinkExecutorTransformRunner, pathAccessor?: LinkExecutorPathAccessor, jsonLogic?: PraxisJsonLogicService);
10535
10650
  executeLink(link: CompositionLink, context: LinkExecutionContext): LinkExecutionResult;
10536
10651
  private resolveSourceValue;
10537
10652
  private extractComponentSourceBinding;
10538
- private matchesConditions;
10539
- private evaluateCondition;
10540
- private evaluateExpression;
10541
- private resolveExpressionOperand;
10542
- private readConditionValue;
10543
- private matchesPortKind;
10653
+ private matchesCondition;
10654
+ private buildConditionData;
10544
10655
  private buildTransformContext;
10545
10656
  private resolveMissingValuePolicy;
10546
10657
  private resolvePolicySkip;
@@ -10646,6 +10757,30 @@ declare class CompositionRuntimeFacade {
10646
10757
  destroy(): void;
10647
10758
  }
10648
10759
 
10760
+ interface LegacyLinkCondition {
10761
+ kind: 'always' | 'expression' | 'equals' | 'present' | 'changed' | 'matches-port-kind';
10762
+ expression?: string;
10763
+ path?: string;
10764
+ value?: unknown;
10765
+ negate?: boolean;
10766
+ description?: string;
10767
+ }
10768
+ interface LegacyLinkMetaPolicy {
10769
+ filterExpr?: string;
10770
+ debounceMs?: number;
10771
+ distinct?: boolean;
10772
+ distinctBy?: string;
10773
+ }
10774
+ type LegacyCompositionLinkInput = Omit<CompositionLink, 'condition' | 'policy' | 'metadata'> & {
10775
+ condition?: JsonLogicExpression | string | null;
10776
+ conditions?: LegacyLinkCondition[];
10777
+ policy?: LinkPolicy;
10778
+ metadata?: LinkMetadata;
10779
+ meta?: LegacyLinkMetaPolicy;
10780
+ };
10781
+ declare function migrateLegacyCompositionLinks(links: LegacyCompositionLinkInput[] | undefined | null): CompositionLink[];
10782
+ declare function migrateLegacyCompositionLink(link: LegacyCompositionLinkInput): CompositionLink;
10783
+
10649
10784
  interface RenderedWidgetInstance extends WidgetInstance {
10650
10785
  renderClassName?: string;
10651
10786
  renderSpan?: number;
@@ -11254,5 +11389,5 @@ declare function provideFormHookPresets(presets: Array<FormHookPreset>): Provide
11254
11389
  /** Register a whitelist of allowed hook ids/patterns. */
11255
11390
  declare function provideHookWhitelist(allowed: Array<string | RegExp>): Provider[];
11256
11391
 
11257
- export { API_CONFIG_STORAGE_OPTIONS, API_URL, ASYNC_CONFIG_STORAGE, AllowedFileTypes, AnalyticsPresentationResolver, AnalyticsSchemaContractService, AnalyticsStatsRequestBuilderService, ApiConfigStorage, ApiEndpoint, BUILTIN_PAGE_LAYOUT_PRESETS, BUILTIN_PAGE_THEME_PRESETS, BUILTIN_SHELL_PRESETS, CONFIG_STORAGE, CONNECTION_STORAGE, ComponentKeyService, ComponentMetadataRegistry, CompositionRuntimeFacade, ConsoleLoggerSink, DEFAULT_FIELD_SELECTOR_CONTROL_TYPE_MAP, DEFAULT_TABLE_CONFIG, DYNAMIC_PAGE_AI_CAPABILITIES, DYNAMIC_PAGE_COMPONENT_CONTEXT_PACK, DYNAMIC_PAGE_CONFIG_EDITOR, DYNAMIC_PAGE_SHELL_EDITOR, DefaultLoadingRenderer, DeferredAsyncConfigStorage, DynamicFormService, DynamicWidgetLoaderDirective, DynamicWidgetPageComponent, EDITORIAL_ALLOWED_CONTENT_FORMATS, EDITORIAL_COMPLIANCE_PRESETS, EDITORIAL_EXTERNAL_LINK_REL, EDITORIAL_FORM_TEMPLATE_CATALOG, EDITORIAL_HTML_ENABLED, EDITORIAL_MARKDOWN_IMAGES_ENABLED, EDITORIAL_SOLUTION_CATALOG, EDITORIAL_SOLUTION_PRESETS, EDITORIAL_THEME_PRESETS, EDITORIAL_WIDGET_CONVENTION_INPUTS, EDITORIAL_WIDGET_TAG, EMPLOYEE_ONBOARDING_EDITORIAL_SOLUTION, EMPLOYEE_ONBOARDING_EDITORIAL_TEMPLATE, EMPLOYEE_ONBOARDING_GUIDED_EDITORIAL_SOLUTION, EMPLOYEE_ONBOARDING_GUIDED_EDITORIAL_TEMPLATE, EVENT_REGISTRATION_EDITORIAL_SOLUTION, EVENT_REGISTRATION_EDITORIAL_TEMPLATE, EmptyStateCardComponent, ErrorMessageService, FIELD_METADATA_CAPABILITIES, FIELD_SELECTOR_REGISTRY_BASE, FIELD_SELECTOR_REGISTRY_DISABLE_DEFAULTS, FIELD_SELECTOR_REGISTRY_OVERRIDES, FORM_HOOKS, FORM_HOOKS_PRESETS, FORM_HOOKS_WHITELIST, FORM_HOOK_RESOLVERS, FieldControlType, FieldDataType, FieldSelectorRegistry, FormHooksRegistry, GLOBAL_ACTION_CATALOG$1 as GLOBAL_ACTION_CATALOG, GLOBAL_ACTION_HANDLERS, GLOBAL_ACTION_CATALOG as GLOBAL_ACTION_SPEC_CATALOG, GLOBAL_ACTION_UI_SCHEMAS, GLOBAL_ANALYTICS_SERVICE, GLOBAL_API_CLIENT, GLOBAL_CONFIG, GLOBAL_DIALOG_SERVICE, GLOBAL_ROUTE_GUARD_RESOLVER, GLOBAL_SURFACE_SERVICE, GLOBAL_TOAST_SERVICE, GenericCrudService, GlobalActionService, GlobalConfigService, INLINE_FILTER_ALIAS_TOKENS, INLINE_FILTER_CONTROL_TYPES, INLINE_FILTER_CONTROL_TYPE_SET, INLINE_FILTER_CONTROL_TYPE_VALUES, INLINE_FILTER_TOKEN_TO_BASE_CONTROL_TYPE, INLINE_FILTER_TOKEN_TO_CONTROL_TYPE, IconPickerService, IconPosition, IconSize, LOGGER_LEVEL_BY_ENV, LOGGER_LEVEL_PRIORITY, LoadingOrchestrator, LocalConnectionStorage, LocalStorageAsyncAdapter, LocalStorageCacheAdapter, LocalStorageConfigService, LoggerService, LoggerThrottleTracker, LoggerWarnOnceTracker, MemoryCacheAdapter, NumericFormat, OVERLAY_DECIDER_DEBUG, OVERLAY_DECISION_MATRIX, ObservabilityDashboardService, OverlayDeciderService, PRAXIS_CORPORATE_SENSITIVE_KEYS, PRAXIS_DEFAULT_OBSERVABILITY_ALERT_RULES, PRAXIS_DYNAMIC_PAGE_COMPONENT_METADATA, PRAXIS_FOOTER_LINKS_METADATA, PRAXIS_GLOBAL_ACTION_CATALOG, PRAXIS_GLOBAL_CONFIG_BOOTSTRAP_OPTIONS, PRAXIS_GLOBAL_CONFIG_BOOTSTRAP_READY, PRAXIS_GLOBAL_CONFIG_TENANT_RESOLVER, PRAXIS_HERO_BANNER_METADATA, PRAXIS_I18N_CONFIG, PRAXIS_I18N_TRANSLATOR, PRAXIS_LAYER_SCALE_DEFAULTS, PRAXIS_LAYER_SCALE_VARS, PRAXIS_LEGAL_NOTICE_METADATA, PRAXIS_LOADING_CTX, PRAXIS_LOADING_RENDERER, PRAXIS_LOGGER_CONFIG, PRAXIS_LOGGER_SINKS, PRAXIS_OBSERVABILITY_DASHBOARD_OPTIONS, PRAXIS_RICH_TEXT_BLOCK_METADATA, PRAXIS_TELEMETRY_TRANSPORT, PRAXIS_USER_CONTEXT_SUMMARY_METADATA, PRIVACY_CONSENT_EDITORIAL_SOLUTION, PRIVACY_CONSENT_EDITORIAL_TEMPLATE, PraxisCore, PraxisFooterLinksComponent, PraxisGlobalErrorHandler, PraxisHeroBannerComponent, PraxisI18nService, PraxisIconDirective, PraxisIconPickerComponent, PraxisLayerScaleStyleService, PraxisLegalNoticeComponent, PraxisLoadingInterceptor, PraxisRichTextBlockComponent, PraxisSurfaceHostComponent, PraxisUserContextSummaryComponent, RESOURCE_DISCOVERY_I18N_CONFIG, RESOURCE_DISCOVERY_I18N_NAMESPACE, RULE_PROPERTY_SCHEMA, RemoteConfigStorage, ResourceActionOpenAdapterService, ResourceDiscoveryService, ResourceQuickConnectComponent, ResourceSurfaceOpenAdapterService, SCHEMA_VIEWER_CONTEXT, SETTINGS_PANEL_BRIDGE, SETTINGS_PANEL_DATA, STEPPER_CONFIG_EDITOR, SURFACE_DRAWER_BRIDGE, SURFACE_OPEN_I18N_CONFIG, SURFACE_OPEN_I18N_NAMESPACE, SURFACE_OPEN_PRESETS, SchemaMetadataClient, SchemaNormalizerService, SchemaViewerComponent, SurfaceBindingRuntimeService, SurfaceOpenActionEditorComponent, TABLE_CONFIG_EDITOR, TableConfigService, TelemetryLoggerSink, TelemetryService, ValidationPattern, WidgetPageStateRuntimeService, WidgetShellComponent, applyLocalCustomizations$1 as applyLocalCustomizations, applyLocalCustomizations as applyLocalFormCustomizations, buildAngularValidators, buildApiUrl, buildBaseColumnFromDef, buildBaseFormField, buildFormConfigFromEditorialTemplate, buildHeaders, buildPageKey, buildPraxisLayerScaleCss, buildSchemaId, buildValidatorsFromValidatorOptions, cancelIfCpfInvalidHook, clampRange, cloneTableConfig, cnpjAlphaValidator, collapseWhitespace, composeHeadersWithVersion, conditionalAsyncValidator, convertFormLayoutToConfig, createCorporateLoggerConfig, createCorporateObservabilityOptions, createCpfCnpjValidator, createDefaultFormConfig, createDefaultTableConfig, createEmptyFormConfig, createPersistedPage, customAsyncValidatorFn, customValidatorFn, debounceAsyncValidator, deepMerge, ensureIds, ensureNoConflictsHookFactory, ensurePageIds, extractNormalizedError, fetchWithETag, fileTypeValidator, fillUndefined, generateId, getDefaultFormHints, getEditorialCompliancePresetById, getEditorialFormTemplateById, getEditorialFormTemplateCatalog, getEditorialSolutionById, getEditorialSolutionCatalog, getEditorialSolutionPresetById, getEditorialThemePresetById, getEssentialConfig, getFieldMetadataCapabilities, getGlobalActionCatalog, getGlobalActionUiSchema, getReferencedFieldMetadata, getTextTransformer, interpolatePraxisTranslation, isAllowedEditorialContentFormat, isAllowedEditorialHref, isCssTextTransform, isEditorialComponentMeta, isInlineFilterControlType, isRangeValidForFilter, isTableConfigV2, isValidFormConfig, isValidTableConfig, legacyCnpjValidator, legacyCpfValidator, logOnErrorHook, mapFieldDefinitionToMetadata, mapFieldDefinitionsToMetadata, matchFieldValidator, maxFileSizeValidator, mergeFieldMetadata, mergePraxisI18nConfigs, mergeTableConfigs, migrateFormLayoutRule, minWordsValidator, normalizeControlTypeKey, normalizeControlTypeToken, normalizeEditorialLink, normalizeEnd, normalizeFieldConstraints, normalizeFormConfig, normalizeFormMetadata, normalizePath, normalizePraxisDataQueryContext, normalizeResourceAvailabilityReasonCode, normalizeStart, normalizeUnknownError, notifySuccessHook, parseJsonResponseOrEmpty, praxisLoadingInterceptorFn, prefillFromContextHook, provideDefaultFormHooks, provideFieldSelectorRegistryBase, provideFieldSelectorRegistryOverride, provideFieldSelectorRegistryRuntime, provideFormHookPresets, provideFormHooks, provideGlobalActionCatalog, provideGlobalActionHandler, provideGlobalConfig, provideGlobalConfigReady, provideGlobalConfigSeed, provideGlobalConfigTenant, provideHookResolvers, provideHookWhitelist, provideOverlayDecisionMatrix, providePraxisAnalyticsGlobalActions, providePraxisDynamicPageMetadata, providePraxisFooterLinksMetadata, providePraxisGlobalActionCatalog, providePraxisGlobalActions, providePraxisGlobalConfigBootstrap, providePraxisHeroBannerMetadata, providePraxisHttpLoading, providePraxisI18n, providePraxisI18nConfig, providePraxisI18nTranslator, providePraxisLegalNoticeMetadata, providePraxisLoadingDefaults, providePraxisLogging, providePraxisRichTextBlockMetadata, providePraxisToastGlobalActions, providePraxisUserContextSummaryMetadata, provideRemoteGlobalConfig, reconcileFilterConfig, reconcileFormConfig, reconcileTableConfig, removeDiacritics, reportTelemetryHookFactory, requiredCheckedValidator, resolveBuiltinPresets, resolveControlTypeAlias, resolveDefaultValuePresentationFormat, resolveHidden, resolveInlineFilterControlType, resolveInlineFilterControlTypeToBaseControlType, resolveLoggerConfig, resolveObservabilityOptions, resolveOffset, resolveOrder, resolvePraxisFilterCriteria, resolveResourceAvailabilityReasonKey, resolveSpan, resolveValuePresentation, resolveValuePresentationLocale, slugify, stripMasksHook, supportsImplicitValuePresentation, syncWithServerMetadata, toCamel, toCapitalize, toKebab, toPascal, toSentenceCase, toSnake, toTitleCase, translateResourceAvailabilityReason, translateResourceDiscoveryText, translateUnavailableWorkflowMessage, trim, uniqueAsyncValidator, urlValidator, withMessage, withPraxisHttpLoading };
11258
- export type { AccessibilityConfig, ActionDefinition, ActionMessagesConfig, AiCapability, AiCapabilityCatalog, AiCapabilityCategory, AiCapabilityCategoryMap, AiConcept, AiConceptPack, AiValueKind, AnalyticsIntent, AnalyticsPresentationDecision, AnalyticsPresentationFamily, AnalyticsPresentationResolverOptions, AnalyticsSchemaContractRequest, AnalyticsSourceKind, AnalyticsStatsGranularity, AnalyticsStatsMetricOperation, AnalyticsStatsOperation, AnalyticsStatsOrderBy, AnimationConfig, AnnouncementConfig, ApiConfigStorageOptions, ApiUrlConfig, ApiUrlEntry, AsyncConfigStorage, BackConfig, BaseMaterialInputMetadata, BatchDeleteOptions, BatchDeleteProgress, BatchDeleteResult, BorderConfig, Breakpoint, BuiltValidators, BulkAction, BulkActionsConfig, CacheAdapter, CacheConfig, CacheEntry, Capability$1 as Capability, CapabilityCatalog$1 as CapabilityCatalog, CapabilityCategory$1 as CapabilityCategory, ColorConfig, ColumnAlign, ColumnDefinition, ColumnHidden, ColumnOffset, ColumnOrder, ColumnSpan, ComponentActionParam, ComponentContextAction, ComponentContextOption, ComponentContextOptionMode, ComponentContextOptionsByPathEntry, ComponentContextPack, ComponentDocMeta, ComponentEditorialResolveOptions, ComponentKeyParams, ComponentMergePatch, ComponentMetadata, ComponentMetadataEditorialBindingDescriptor, ComponentMetadataEditorialDescriptor, ComponentPortEndpointRef, CompositionLink, CompositionRuntimeFacadeOptions, ConfigMetadata, ConfigStorage, ConfirmationConfig, ConnectionConfigV1, ConnectionStorage, ContextAction, ContextActionsConfig, BackConfig as CoreBackConfig, CoreFieldMetadata, CrudConfigureOptions, CrudOperationOptions, CsvExportConfig, CurrencyLocaleConfig, CursorPage, CursorRequest, CustomizationLog, DataConfig, DataTransformation, DataValidationConfig, DateRangePreset, DateRangeValue, DateTimeLocaleConfig, DebounceConfig, DeviceKind, DiagnosticPhase, DiagnosticRecord, DiagnosticSeverity, DiagnosticSource, DiagnosticSubjectKind, DiagnosticSubjectRef, DraggingConfig, Capability as DynamicPageCapability, CapabilityCatalog as DynamicPageCapabilityCatalog, CapabilityCategory as DynamicPageCapabilityCategory, ValueKind as DynamicPageValueKind, EditorialBlock, EditorialBlockBase, EditorialBlockKind, EditorialBlockOverride, EditorialBlockSurface, EditorialBlockTone, EditorialBlockVisibilityRule, EditorialCompliancePreset, EditorialComponentDocMeta, EditorialConnectorStyle, EditorialContentFormat, EditorialContextFieldContract, EditorialContextSummaryBlock, EditorialCustomWidgetBlock, EditorialDataCollectionBlock, EditorialDensity, EditorialFaqAccordionBlock, EditorialFaqItem, EditorialFormCompliancePreset, EditorialFormShellPreset, EditorialFormTemplate, EditorialFormTemplateBuildOptions, EditorialFormTemplateContextField, EditorialFormTemplateDefaults, EditorialFormTemplateLayoutPreset, EditorialFormTemplateMetadata, EditorialFormTemplateReference, EditorialHeroBlock, EditorialIconSpec, EditorialInfoCardItem, EditorialInfoCardsBlock, EditorialIntroHeroBlock, EditorialIntroHeroHighlightItem, EditorialJourney, EditorialJourneyOverride, EditorialJourneyStep, EditorialLayoutConfig, EditorialLayoutSpacing, EditorialLinkDefinition, EditorialLinkItem, EditorialMetaItem, EditorialMotionConfig, EditorialOrientation, EditorialPolicyItem, EditorialPolicyListBlock, EditorialPresentationShellVariant, EditorialPresentationalAction, EditorialPresentationalVisibilityRule, EditorialProblemType, EditorialResponsiveLayoutConfig, EditorialReviewField, EditorialReviewSection, EditorialReviewSectionField, EditorialReviewSectionsBlock, EditorialReviewSummaryBlock, EditorialRichTextBlock, EditorialSelectionCardItem, EditorialSelectionCardsBlock, EditorialShellVariant, EditorialSolutionDefinition, EditorialSolutionPreset, EditorialStepKind, EditorialStepVisualConfig, EditorialStepVisualVariant, EditorialStepperConfig, EditorialStepperVariant, EditorialSuccessPanelBlock, EditorialSurfaceVariant, EditorialTemplateInstance, EditorialTemplateInstanceOverrides, EditorialTemplateRef, EditorialTemplateSource, EditorialThemeBorderWidthTokens, EditorialThemeColorTokens, EditorialThemePreset, EditorialThemeRadiusTokens, EditorialThemeShadowTokens, EditorialThemeTokens, EditorialThemeTypographyTokens, EditorialTimelineStep, EditorialTimelineStepsBlock, EditorialWidgetAppearance, EditorialWidgetDefinition, EditorialWidgetInputs, EditorialWizardPresentation, ElevationConfig, EmptyAction, EmptyStateConfig, EndpointConfig, EndpointRef, EnhancedValidationConfig, ExcelExportConfig, ExcelStylingConfig, ExportConfig, ExportFormat, ExportMessagesConfig, ExportTemplate, FetchWithEtagParams, FetchWithEtagResult, FieldConflict, FieldDefinition, FieldMetadata, FieldModification, FieldOption, FieldSelectorRegistryMap, FieldsetLayout, FilterOptions, FilteringConfig, FooterLinksAppearance, FooterLinksLayout, FormActionButton, FormActionConfirmationEvent, FormActionsLayout, FormApiLayout, FormBehaviorLayout, FormColumn, FormConfig, FormConfigMetadata, FormConfigState, FormCustomActionEvent, FormEntityEvent, FormHook, FormHookContext, FormHookDeclaration, FormHookDeclarationLite, FormHookOutcome, FormHookPreset, FormHookPresetMatch, FormHookStage, FormHookStatus, FormHooksLayout, FormInitializationError, FormLayout, FormLayoutRule, FormMessagesLayout, FormMetadataLayout, FormModeHints, FormOpenMode, FormReadyEvent, FormRow, FormRowLayout, FormRuleTargetType, FormSection, FormSectionHeaderAction, FormSectionHeaderConfig, FormSectionHeaderEmptyState, FormSectionHeaderMode, FormSectionHeaderSize, FormSubmitEvent, FormValidationEvent, FormValueChangeEvent, FormattingLocaleConfig, GeneralExportConfig, GetSchemaParams, GlobalActionCatalogEntry, GlobalActionContext, GlobalActionField, GlobalActionFieldOption, GlobalActionFieldType, GlobalActionHandler, GlobalActionHandlerEntry, GlobalActionId, GlobalActionParam, GlobalActionResult, GlobalActionSpec, GlobalActionUiSchema, GlobalAiConfig, GlobalAiEmbeddingConfig, GlobalAiProvider, GlobalAnalyticsService, GlobalApiClient, GlobalCacheConfig, GlobalConfig, GlobalCrudActionDefaults, GlobalCrudConfig, GlobalCrudDefaults, GlobalDialogAction, GlobalDialogAnimation, GlobalDialogAriaRole, GlobalDialogConfig, GlobalDialogConfigEntry, GlobalDialogPosition, GlobalDialogService, GlobalDialogStyles, GlobalDynamicFieldsAsyncSelectConfig, GlobalDynamicFieldsCascadeConfig, GlobalDynamicFieldsConfig, GlobalI18nConfig, GlobalRouteGuardResolver, GlobalSurfaceService, GlobalTableConfig, GlobalToastService, HateoasLink, HeroBadge, HeroBadgeTone, HeroBannerAppearance, HeroBannerVariant, HeroMetaItem, HookResolver, InlineFilterControlType, InlineMonthRangeMetadata, InlinePeriodRangeFiscalCalendar, InlinePeriodRangeGranularity, InlinePeriodRangeMetadata, InlinePeriodRangePreset, InlineRangeDistributionBin, InlineRangeDistributionConfig, InlineYearRangeMetadata, InteractionConfig, JsonExportConfig, KeyboardAccessibilityConfig, LazyLoadingConfig, LegacyTableConfig, LegalNoticeAppearance, LegalNoticeSeverity, LinkCondition, LinkConditionKind, LinkIntent, LinkMetadata, LinkPolicy, LoadingConfig, LoadingContext, LoadingPhase$1 as LoadingPhase, LoadingScope, LoadingState, LoadingPhase as LoadingStatePhase, LocalizationConfig, LocateRequest, LoggerConfig, LoggerContext, LoggerEvent, LoggerLevel, LoggerLogOptions, LoggerNormalizedError, LoggerPIIConfig, LoggerSink, LoggerTelemetryPayload, LoggerThrottleConfig, MarginConfig, MaterialAutocompleteMetadata, MaterialButtonMetadata, MaterialButtonToggleMetadata, MaterialCheckboxMetadata, MaterialChipsMetadata, MaterialColorInputMetadata, MaterialColorPickerMetadata, MaterialCpfCnpjMetadata, MaterialCurrencyMetadata, MaterialDateInputMetadata, MaterialDateRangeMetadata, MaterialDatepickerMetadata, MaterialDatetimeLocalInputMetadata, MaterialDesignConfig, MaterialEmailInputMetadata, MaterialEmailMetadata, MaterialInputMetadata, MaterialMonthInputMetadata, MaterialMultiSelectTreeMetadata, MaterialNumericMetadata, MaterialPasswordMetadata, MaterialPhoneMetadata, MaterialPriceRangeMetadata, MaterialRadioMetadata, MaterialRangeSliderMetadata, MaterialRatingMetadata, MaterialSearchInputMetadata, MaterialSelectMetadata, MaterialSelectionListMetadata, MaterialSliderMetadata, MaterialTextareaMetadata, MaterialTimeInputMetadata, MaterialTimeRangeMetadata, MaterialTimeTrackShift, MaterialTimepickerMetadata, MaterialToggleMetadata, MaterialTransferListMetadata, MaterialTreeNode, MaterialTreeSelectMetadata, MaterialUrlInputMetadata, MaterialWeekInputMetadata, MaterialYearInputMetadata, MemoryConfig, MessageTemplate, MessagesConfig, NestedFieldsetLayout, NormalizedError, NumberLocaleConfig, ObservabilityAlert, ObservabilityAlertGroupBy, ObservabilityAlertRule, ObservabilityAlertSeverity, ObservabilityCountBucket, ObservabilityDashboardOptions, ObservabilityIngestInput, ObservabilityMetricsSnapshot, OptionDTO, OptionSourceMetadata, OptionSourceRequestOptions, OverlayDecider, OverlayDecision, OverlayDecisionContext, OverlayDecisionMatrix, OverlayPattern, OverlayRange, OverlayRule, OverlayRuleMatch, OverlayThresholds, Page, PageIdentity, PageableRequest, PaginationConfig, PartialFieldMetadata, PdfExportConfig, PerformanceConfig, PersistedPageConfig, PersistedPageDefinitionWithIds, PersistedWidgetInstance, PlainObject, PluginConfig, PollingConfig, PortCardinality, PortCompatibilityRuleSet, PortContract, PortDirection, PortExposure, PortSchemaKind, PortSchemaMode, PortSchemaRef, PortSemanticKind, PraxisAnalyticsBindings, PraxisAnalyticsDefaults, PraxisAnalyticsDimensionBinding, PraxisAnalyticsDistributionStatsRequest, PraxisAnalyticsExecutionMetric, PraxisAnalyticsGroupByStatsRequest, PraxisAnalyticsInteractions, PraxisAnalyticsMetricBinding, PraxisAnalyticsOptions, PraxisAnalyticsPresentationHints, PraxisAnalyticsProjection, PraxisAnalyticsSortRule, PraxisAnalyticsSource, PraxisAnalyticsStatsExecutionPlan, PraxisAnalyticsStatsMetricRequest, PraxisAnalyticsStatsRequest, PraxisAnalyticsTimeSeriesStatsRequest, PraxisAuthContext, PraxisDataQueryContext, PraxisGlobalActionsOptions, PraxisGlobalConfigBootstrapOptions, PraxisHttpLoadingOptions, PraxisI18nConfig, PraxisI18nDictionary, PraxisI18nMessageDescriptor, PraxisI18nNamespaceConfig, PraxisI18nNamespaceDictionary, PraxisI18nTranslator, PraxisLayerScale, PraxisLoadingRenderer, PraxisLocale, PraxisLoggingEnvironment, PraxisLoggingOptions, PraxisTextValue, PraxisToastOptions, PraxisTranslationParams, PraxisXUiAnalytics, PriceRangeValue, RangeSliderInlineTexts, RangeSliderQuickPreset, RangeSliderQuickPresetLabels, RangeSliderValue, RenderingConfig, ResizingConfig, ResolvePresetOptions, ResolvedComponentMetadataEditorialBinding, ResolvedComponentMetadataEditorialMeta, ResolvedValuePresentation, ResourceActionCatalogItem, ResourceActionCatalogResponse, ResourceActionOpenAdapterOptions, ResourceActionScope, ResourceAvailabilityDecision, ResourceCapabilitySnapshot, ResourceDiscoveryRel, ResourceDiscoveryRequestOptions, ResourceLinkSource, ResourceSurfaceCatalogItem, ResourceSurfaceCatalogResponse, ResourceSurfaceKind, ResourceSurfaceOpenAdapterOptions, ResourceSurfaceScope, ResponsiveConfig, RestApiLinks, RestApiResponse, RichTextAppearance, RichTextVariant, RowAction, RowActionsConfig, RulePropertyDefinition, RulePropertySchema, RulePropertyType, RunHooksResult, RuntimeLinkSnapshot, RuntimeLinkStatus, RuntimePayloadSummary, RuntimeSnapshot, RuntimeSnapshotStatus, RuntimeStateSnapshot, RuntimeTraceEntry, RuntimeTracePhase, SchemaIdParams, SchemaMetaInfo, SchemaViewerContext, SelectionConfig, SerializableFieldMetadata, SettingsPanelBridge, SettingsPanelOpenContent, SettingsPanelOpenOptions, SettingsPanelRef, SettingsValueProvider, SortingConfig, SpacingConfig, StateEndpointRef, StateMessagesConfig, SurfaceBinding, SurfaceBindingMode, SurfaceDrawerBridge, SurfaceDrawerOpenContent, SurfaceDrawerOpenOptions, SurfaceDrawerRef, SurfaceDrawerResult, SurfaceDrawerWidthPreset, SurfaceOpenPayload, SurfaceOpenPreset, SurfacePresentation, SurfaceSizeConfig, SyncConfig, SyncResult, TableActionsConfig, TableAppearanceConfig, TableBehaviorConfig, TableConfig, TableConfigV2 as TableConfigModern, TableConfigState, TableConfigV2, TableExpansionConfig, TableLocalDataModeConfig, TelemetryEvent, TelemetryLoggerSinkOptions, TelemetryTransport, TextTransformApply, TextTransformName, ThemeConfig, ToolbarAction, ToolbarConfig, ToolbarFilterConfig, ToolbarLayoutConfig, ToolbarSettingsConfig, TransformBinding, TransformBindingSource, TransformCatalogCategory, TransformCatalogEntry, TransformKind, TransformLegacyReplacement, TransformOutputHint, TransformPhase, TransformPipeline, TransformSemanticKind, TransformStep, TransformStepCondition, TypographyConfig, UserContextSource, UserContextSummaryAppearance, UserContextSummaryField, ValidationContext, ValidationError, ValidationMessagesConfig, ValidationResult, ValidationRule, ValidatorFunction, ValidatorOptions, ValueKind$1 as ValueKind, ValuePresentationConfig, ValuePresentationResolutionContext, ValuePresentationStyle, ValuePresentationType, VirtualizationConfig, WidgetDefinition, WidgetDerivedStateNode, WidgetEventEnvelope, WidgetEventPathSegment, WidgetInstance, WidgetPageCanvasCollisionPolicy, WidgetPageCanvasConstraints, WidgetPageCanvasItem, WidgetPageCanvasItemOverride, WidgetPageCanvasLayout, WidgetPageCanvasLayoutVariant, WidgetPageCompositionDefinition, WidgetPageDefinition, WidgetPageDeviceKind, WidgetPageDeviceLayouts, WidgetPageDevicePolicy, WidgetPageGroupingDefinition, WidgetPageGroupingOverride, WidgetPageGroupingTabDefinition, WidgetPageLayout, WidgetPageLayoutPresetDefinition, WidgetPageLayoutVariant, WidgetPageOrientation, WidgetPageSlotAssignments, WidgetPageSlotDefinition, WidgetPageStateDefinition, WidgetPageStateInput, WidgetPageStateRuntimeSnapshot, WidgetPageThemePresetDefinition, WidgetPageWidgetLayoutOverride, WidgetPageWidgetSuggestion, WidgetResolutionDiagnostic, WidgetResolutionPhase, WidgetShellAction, WidgetShellActionEvent, WidgetShellActionPlacement, WidgetShellConfig, WidgetShellWindowActions, WidgetStateNode };
11392
+ export { API_CONFIG_STORAGE_OPTIONS, API_URL, ASYNC_CONFIG_STORAGE, AllowedFileTypes, AnalyticsPresentationResolver, AnalyticsSchemaContractService, AnalyticsStatsRequestBuilderService, ApiConfigStorage, ApiEndpoint, BUILTIN_PAGE_LAYOUT_PRESETS, BUILTIN_PAGE_THEME_PRESETS, BUILTIN_SHELL_PRESETS, CONFIG_STORAGE, CONNECTION_STORAGE, ComponentKeyService, ComponentMetadataRegistry, CompositionRuntimeFacade, ConsoleLoggerSink, DEFAULT_FIELD_SELECTOR_CONTROL_TYPE_MAP, DEFAULT_JSON_LOGIC_OPERATORS, DEFAULT_TABLE_CONFIG, DYNAMIC_PAGE_AI_CAPABILITIES, DYNAMIC_PAGE_COMPONENT_CONTEXT_PACK, DYNAMIC_PAGE_CONFIG_EDITOR, DYNAMIC_PAGE_SHELL_EDITOR, DefaultLoadingRenderer, DeferredAsyncConfigStorage, DynamicFormService, DynamicWidgetLoaderDirective, DynamicWidgetPageComponent, EDITORIAL_ALLOWED_CONTENT_FORMATS, EDITORIAL_COMPLIANCE_PRESETS, EDITORIAL_EXTERNAL_LINK_REL, EDITORIAL_FORM_TEMPLATE_CATALOG, EDITORIAL_HTML_ENABLED, EDITORIAL_MARKDOWN_IMAGES_ENABLED, EDITORIAL_SOLUTION_CATALOG, EDITORIAL_SOLUTION_PRESETS, EDITORIAL_THEME_PRESETS, EDITORIAL_WIDGET_CONVENTION_INPUTS, EDITORIAL_WIDGET_TAG, EMPLOYEE_ONBOARDING_EDITORIAL_SOLUTION, EMPLOYEE_ONBOARDING_EDITORIAL_TEMPLATE, EMPLOYEE_ONBOARDING_GUIDED_EDITORIAL_SOLUTION, EMPLOYEE_ONBOARDING_GUIDED_EDITORIAL_TEMPLATE, EVENT_REGISTRATION_EDITORIAL_SOLUTION, EVENT_REGISTRATION_EDITORIAL_TEMPLATE, EmptyStateCardComponent, ErrorMessageService, FIELD_METADATA_CAPABILITIES, FIELD_SELECTOR_REGISTRY_BASE, FIELD_SELECTOR_REGISTRY_DISABLE_DEFAULTS, FIELD_SELECTOR_REGISTRY_OVERRIDES, FORM_HOOKS, FORM_HOOKS_PRESETS, FORM_HOOKS_WHITELIST, FORM_HOOK_RESOLVERS, FieldControlType, FieldDataType, FieldSelectorRegistry, FormHooksRegistry, GLOBAL_ACTION_CATALOG$1 as GLOBAL_ACTION_CATALOG, GLOBAL_ACTION_HANDLERS, GLOBAL_ACTION_CATALOG as GLOBAL_ACTION_SPEC_CATALOG, GLOBAL_ACTION_UI_SCHEMAS, GLOBAL_ANALYTICS_SERVICE, GLOBAL_API_CLIENT, GLOBAL_CONFIG, GLOBAL_DIALOG_SERVICE, GLOBAL_ROUTE_GUARD_RESOLVER, GLOBAL_SURFACE_SERVICE, GLOBAL_TOAST_SERVICE, GenericCrudService, GlobalActionService, GlobalConfigService, INLINE_FILTER_ALIAS_TOKENS, INLINE_FILTER_CONTROL_TYPES, INLINE_FILTER_CONTROL_TYPE_SET, INLINE_FILTER_CONTROL_TYPE_VALUES, INLINE_FILTER_TOKEN_TO_BASE_CONTROL_TYPE, INLINE_FILTER_TOKEN_TO_CONTROL_TYPE, IconPickerService, IconPosition, IconSize, LOGGER_LEVEL_BY_ENV, LOGGER_LEVEL_PRIORITY, LoadingOrchestrator, LocalConnectionStorage, LocalStorageAsyncAdapter, LocalStorageCacheAdapter, LocalStorageConfigService, LoggerService, LoggerThrottleTracker, LoggerWarnOnceTracker, MemoryCacheAdapter, NumericFormat, OVERLAY_DECIDER_DEBUG, OVERLAY_DECISION_MATRIX, ObservabilityDashboardService, OverlayDeciderService, PRAXIS_CORPORATE_SENSITIVE_KEYS, PRAXIS_DEFAULT_OBSERVABILITY_ALERT_RULES, PRAXIS_DYNAMIC_PAGE_COMPONENT_METADATA, PRAXIS_FOOTER_LINKS_METADATA, PRAXIS_GLOBAL_ACTION_CATALOG, PRAXIS_GLOBAL_CONFIG_BOOTSTRAP_OPTIONS, PRAXIS_GLOBAL_CONFIG_BOOTSTRAP_READY, PRAXIS_GLOBAL_CONFIG_TENANT_RESOLVER, PRAXIS_HERO_BANNER_METADATA, PRAXIS_I18N_CONFIG, PRAXIS_I18N_TRANSLATOR, PRAXIS_JSON_LOGIC_OPERATORS, PRAXIS_LAYER_SCALE_DEFAULTS, PRAXIS_LAYER_SCALE_VARS, PRAXIS_LEGAL_NOTICE_METADATA, PRAXIS_LOADING_CTX, PRAXIS_LOADING_RENDERER, PRAXIS_LOGGER_CONFIG, PRAXIS_LOGGER_SINKS, PRAXIS_OBSERVABILITY_DASHBOARD_OPTIONS, PRAXIS_RICH_TEXT_BLOCK_METADATA, PRAXIS_TELEMETRY_TRANSPORT, PRAXIS_USER_CONTEXT_SUMMARY_METADATA, PRIVACY_CONSENT_EDITORIAL_SOLUTION, PRIVACY_CONSENT_EDITORIAL_TEMPLATE, PraxisCore, PraxisFooterLinksComponent, PraxisGlobalErrorHandler, PraxisHeroBannerComponent, PraxisI18nService, PraxisIconDirective, PraxisIconPickerComponent, PraxisJsonLogicError, PraxisJsonLogicService, PraxisLayerScaleStyleService, PraxisLegalNoticeComponent, PraxisLoadingInterceptor, PraxisRichTextBlockComponent, PraxisSurfaceHostComponent, PraxisUserContextSummaryComponent, RESOURCE_DISCOVERY_I18N_CONFIG, RESOURCE_DISCOVERY_I18N_NAMESPACE, RULE_PROPERTY_SCHEMA, RemoteConfigStorage, ResourceActionOpenAdapterService, ResourceDiscoveryService, ResourceQuickConnectComponent, ResourceSurfaceOpenAdapterService, SCHEMA_VIEWER_CONTEXT, SETTINGS_PANEL_BRIDGE, SETTINGS_PANEL_DATA, STEPPER_CONFIG_EDITOR, SURFACE_DRAWER_BRIDGE, SURFACE_OPEN_I18N_CONFIG, SURFACE_OPEN_I18N_NAMESPACE, SURFACE_OPEN_PRESETS, SchemaMetadataClient, SchemaNormalizerService, SchemaViewerComponent, SurfaceBindingRuntimeService, SurfaceOpenActionEditorComponent, TABLE_CONFIG_EDITOR, TableConfigService, TelemetryLoggerSink, TelemetryService, ValidationPattern, WidgetPageStateRuntimeService, WidgetShellComponent, applyLocalCustomizations$1 as applyLocalCustomizations, applyLocalCustomizations as applyLocalFormCustomizations, buildAngularValidators, buildApiUrl, buildBaseColumnFromDef, buildBaseFormField, buildFormConfigFromEditorialTemplate, buildHeaders, buildPageKey, buildPraxisLayerScaleCss, buildSchemaId, buildValidatorsFromValidatorOptions, cancelIfCpfInvalidHook, clampRange, cloneTableConfig, cnpjAlphaValidator, collapseWhitespace, composeHeadersWithVersion, conditionalAsyncValidator, convertFormLayoutToConfig, createCorporateLoggerConfig, createCorporateObservabilityOptions, createCpfCnpjValidator, createDefaultFormConfig, createDefaultTableConfig, createEmptyFormConfig, createPersistedPage, customAsyncValidatorFn, customValidatorFn, debounceAsyncValidator, deepMerge, ensureIds, ensureNoConflictsHookFactory, ensurePageIds, extractNormalizedError, fetchWithETag, fileTypeValidator, fillUndefined, generateId, getDefaultFormHints, getEditorialCompliancePresetById, getEditorialFormTemplateById, getEditorialFormTemplateCatalog, getEditorialSolutionById, getEditorialSolutionCatalog, getEditorialSolutionPresetById, getEditorialThemePresetById, getEssentialConfig, getFieldMetadataCapabilities, getGlobalActionCatalog, getGlobalActionUiSchema, getReferencedFieldMetadata, getTextTransformer, interpolatePraxisTranslation, isAllowedEditorialContentFormat, isAllowedEditorialHref, isCssTextTransform, isEditorialComponentMeta, isInlineFilterControlType, isRangeValidForFilter, isTableConfigV2, isValidFormConfig, isValidTableConfig, legacyCnpjValidator, legacyCpfValidator, logOnErrorHook, mapFieldDefinitionToMetadata, mapFieldDefinitionsToMetadata, matchFieldValidator, maxFileSizeValidator, mergeFieldMetadata, mergePraxisI18nConfigs, mergeTableConfigs, migrateFormLayoutRule, migrateLegacyCompositionLink, migrateLegacyCompositionLinks, minWordsValidator, normalizeControlTypeKey, normalizeControlTypeToken, normalizeEditorialLink, normalizeEnd, normalizeFieldConstraints, normalizeFormConfig, normalizeFormMetadata, normalizePath, normalizePraxisDataQueryContext, normalizeResourceAvailabilityReasonCode, normalizeStart, normalizeUnknownError, notifySuccessHook, parseJsonResponseOrEmpty, praxisLoadingInterceptorFn, prefillFromContextHook, provideDefaultFormHooks, provideFieldSelectorRegistryBase, provideFieldSelectorRegistryOverride, provideFieldSelectorRegistryRuntime, provideFormHookPresets, provideFormHooks, provideGlobalActionCatalog, provideGlobalActionHandler, provideGlobalConfig, provideGlobalConfigReady, provideGlobalConfigSeed, provideGlobalConfigTenant, provideHookResolvers, provideHookWhitelist, provideOverlayDecisionMatrix, providePraxisAnalyticsGlobalActions, providePraxisDynamicPageMetadata, providePraxisFooterLinksMetadata, providePraxisGlobalActionCatalog, providePraxisGlobalActions, providePraxisGlobalConfigBootstrap, providePraxisHeroBannerMetadata, providePraxisHttpLoading, providePraxisI18n, providePraxisI18nConfig, providePraxisI18nTranslator, providePraxisJsonLogicOperator, providePraxisLegalNoticeMetadata, providePraxisLoadingDefaults, providePraxisLogging, providePraxisRichTextBlockMetadata, providePraxisToastGlobalActions, providePraxisUserContextSummaryMetadata, provideRemoteGlobalConfig, reconcileFilterConfig, reconcileFormConfig, reconcileTableConfig, removeDiacritics, reportTelemetryHookFactory, requiredCheckedValidator, resolveBuiltinPresets, resolveControlTypeAlias, resolveDefaultValuePresentationFormat, resolveHidden, resolveInlineFilterControlType, resolveInlineFilterControlTypeToBaseControlType, resolveLoggerConfig, resolveObservabilityOptions, resolveOffset, resolveOrder, resolvePraxisFilterCriteria, resolveResourceAvailabilityReasonKey, resolveSpan, resolveValuePresentation, resolveValuePresentationLocale, slugify, stripMasksHook, supportsImplicitValuePresentation, syncWithServerMetadata, toCamel, toCapitalize, toKebab, toPascal, toSentenceCase, toSnake, toTitleCase, translateResourceAvailabilityReason, translateResourceDiscoveryText, translateUnavailableWorkflowMessage, trim, uniqueAsyncValidator, urlValidator, withMessage, withPraxisHttpLoading };
11393
+ export type { AccessibilityConfig, ActionDefinition, ActionMessagesConfig, AiCapability, AiCapabilityCatalog, AiCapabilityCategory, AiCapabilityCategoryMap, AiConcept, AiConceptPack, AiValueKind, AnalyticsIntent, AnalyticsPresentationDecision, AnalyticsPresentationFamily, AnalyticsPresentationResolverOptions, AnalyticsSchemaContractRequest, AnalyticsSourceKind, AnalyticsStatsGranularity, AnalyticsStatsMetricOperation, AnalyticsStatsOperation, AnalyticsStatsOrderBy, AnimationConfig, AnnouncementConfig, ApiConfigStorageOptions, ApiUrlConfig, ApiUrlEntry, AsyncConfigStorage, BackConfig, BaseMaterialInputMetadata, BatchDeleteOptions, BatchDeleteProgress, BatchDeleteResult, BorderConfig, Breakpoint, BuiltValidators, BulkAction, BulkActionsConfig, CacheAdapter, CacheConfig, CacheEntry, Capability$1 as Capability, CapabilityCatalog$1 as CapabilityCatalog, CapabilityCategory$1 as CapabilityCategory, ColorConfig, ColumnAlign, ColumnDefinition, ColumnHidden, ColumnOffset, ColumnOrder, ColumnSpan, ComponentActionParam, ComponentContextAction, ComponentContextOption, ComponentContextOptionMode, ComponentContextOptionsByPathEntry, ComponentContextPack, ComponentDocMeta, ComponentEditorialResolveOptions, ComponentKeyParams, ComponentMergePatch, ComponentMetadata, ComponentMetadataEditorialBindingDescriptor, ComponentMetadataEditorialDescriptor, ComponentPortEndpointRef, CompositionLink, CompositionRuntimeFacadeOptions, ConditionalValidationRule, ConfigMetadata, ConfigStorage, ConfirmationConfig, ConnectionConfigV1, ConnectionStorage, ContextAction, ContextActionsConfig, BackConfig as CoreBackConfig, CoreFieldMetadata, CrudConfigureOptions, CrudOperationOptions, CsvExportConfig, CurrencyLocaleConfig, CursorPage, CursorRequest, CustomizationLog, DataConfig, DataTransformation, DataValidationConfig, DateRangePreset, DateRangeValue, DateTimeLocaleConfig, DebounceConfig, DeviceKind, DiagnosticPhase, DiagnosticRecord, DiagnosticSeverity, DiagnosticSource, DiagnosticSubjectKind, DiagnosticSubjectRef, DraggingConfig, Capability as DynamicPageCapability, CapabilityCatalog as DynamicPageCapabilityCatalog, CapabilityCategory as DynamicPageCapabilityCategory, ValueKind as DynamicPageValueKind, EditorialBlock, EditorialBlockBase, EditorialBlockKind, EditorialBlockOverride, EditorialBlockSurface, EditorialBlockTone, EditorialBlockVisibilityRule, EditorialCompliancePreset, EditorialComponentDocMeta, EditorialConnectorStyle, EditorialContentFormat, EditorialContextFieldContract, EditorialContextSummaryBlock, EditorialCustomWidgetBlock, EditorialDataCollectionBlock, EditorialDensity, EditorialFaqAccordionBlock, EditorialFaqItem, EditorialFormCompliancePreset, EditorialFormShellPreset, EditorialFormTemplate, EditorialFormTemplateBuildOptions, EditorialFormTemplateContextField, EditorialFormTemplateDefaults, EditorialFormTemplateLayoutPreset, EditorialFormTemplateMetadata, EditorialFormTemplateReference, EditorialHeroBlock, EditorialIconSpec, EditorialInfoCardItem, EditorialInfoCardsBlock, EditorialIntroHeroBlock, EditorialIntroHeroHighlightItem, EditorialJourney, EditorialJourneyOverride, EditorialJourneyStep, EditorialLayoutConfig, EditorialLayoutSpacing, EditorialLinkDefinition, EditorialLinkItem, EditorialMetaItem, EditorialMotionConfig, EditorialOrientation, EditorialPolicyItem, EditorialPolicyListBlock, EditorialPresentationShellVariant, EditorialPresentationalAction, EditorialPresentationalVisibilityRule, EditorialProblemType, EditorialResponsiveLayoutConfig, EditorialReviewField, EditorialReviewSection, EditorialReviewSectionField, EditorialReviewSectionsBlock, EditorialReviewSummaryBlock, EditorialRichTextBlock, EditorialSelectionCardItem, EditorialSelectionCardsBlock, EditorialShellVariant, EditorialSolutionDefinition, EditorialSolutionPreset, EditorialStepKind, EditorialStepVisualConfig, EditorialStepVisualVariant, EditorialStepperConfig, EditorialStepperVariant, EditorialSuccessPanelBlock, EditorialSurfaceVariant, EditorialTemplateInstance, EditorialTemplateInstanceOverrides, EditorialTemplateRef, EditorialTemplateSource, EditorialThemeBorderWidthTokens, EditorialThemeColorTokens, EditorialThemePreset, EditorialThemeRadiusTokens, EditorialThemeShadowTokens, EditorialThemeTokens, EditorialThemeTypographyTokens, EditorialTimelineStep, EditorialTimelineStepsBlock, EditorialWidgetAppearance, EditorialWidgetDefinition, EditorialWidgetInputs, EditorialWizardPresentation, ElevationConfig, EmptyAction, EmptyStateConfig, EndpointConfig, EndpointRef, EnhancedValidationConfig, ExcelExportConfig, ExcelStylingConfig, ExportConfig, ExportFormat, ExportMessagesConfig, ExportTemplate, FetchWithEtagParams, FetchWithEtagResult, FieldConflict, FieldDefinition, FieldMetadata, FieldModification, FieldOption, FieldSelectorRegistryMap, FieldsetLayout, FilterOptions, FilteringConfig, FooterLinksAppearance, FooterLinksLayout, FormActionButton, FormActionConfirmationEvent, FormActionsLayout, FormApiLayout, FormBehaviorLayout, FormColumn, FormConfig, FormConfigMetadata, FormConfigState, FormCustomActionEvent, FormEntityEvent, FormHook, FormHookContext, FormHookDeclaration, FormHookDeclarationLite, FormHookOutcome, FormHookPreset, FormHookPresetMatch, FormHookStage, FormHookStatus, FormHooksLayout, FormInitializationError, FormLayout, FormLayoutRule, FormMessagesLayout, FormMetadataLayout, FormModeHints, FormOpenMode, FormReadyEvent, FormRow, FormRowLayout, FormRuleTargetType, FormSection, FormSectionHeaderAction, FormSectionHeaderConfig, FormSectionHeaderEmptyState, FormSectionHeaderMode, FormSectionHeaderSize, FormSubmitEvent, FormValidationEvent, FormValueChangeEvent, FormattingLocaleConfig, GeneralExportConfig, GetSchemaParams, GlobalActionCatalogEntry, GlobalActionContext, GlobalActionField, GlobalActionFieldOption, GlobalActionFieldType, GlobalActionHandler, GlobalActionHandlerEntry, GlobalActionId, GlobalActionParam, GlobalActionResult, GlobalActionSpec, GlobalActionUiSchema, GlobalAiConfig, GlobalAiEmbeddingConfig, GlobalAiProvider, GlobalAnalyticsService, GlobalApiClient, GlobalCacheConfig, GlobalConfig, GlobalCrudActionDefaults, GlobalCrudConfig, GlobalCrudDefaults, GlobalDialogAction, GlobalDialogAnimation, GlobalDialogAriaRole, GlobalDialogConfig, GlobalDialogConfigEntry, GlobalDialogPosition, GlobalDialogService, GlobalDialogStyles, GlobalDynamicFieldsAsyncSelectConfig, GlobalDynamicFieldsCascadeConfig, GlobalDynamicFieldsConfig, GlobalI18nConfig, GlobalRouteGuardResolver, GlobalSurfaceService, GlobalTableConfig, GlobalToastService, HateoasLink, HeroBadge, HeroBadgeTone, HeroBannerAppearance, HeroBannerVariant, HeroMetaItem, HookResolver, InlineFilterControlType, InlineMonthRangeMetadata, InlinePeriodRangeFiscalCalendar, InlinePeriodRangeGranularity, InlinePeriodRangeMetadata, InlinePeriodRangePreset, InlineRangeDistributionBin, InlineRangeDistributionConfig, InlineYearRangeMetadata, InteractionConfig, JsonExportConfig, JsonLogicArguments, JsonLogicArray, JsonLogicDerivedValueExpression, JsonLogicExpression, JsonLogicOperationExpression, JsonLogicPrimitive, JsonLogicRecord, JsonLogicValue, JsonLogicVarExpression, JsonLogicVarReference, KeyboardAccessibilityConfig, LazyLoadingConfig, LegacyCompositionLinkInput, LegacyLinkCondition, LegacyLinkMetaPolicy, LegacyTableConfig, LegalNoticeAppearance, LegalNoticeSeverity, LinkIntent, LinkMetadata, LinkPolicy, LoadingConfig, LoadingContext, LoadingPhase$1 as LoadingPhase, LoadingScope, LoadingState, LoadingPhase as LoadingStatePhase, LocalizationConfig, LocateRequest, LoggerConfig, LoggerContext, LoggerEvent, LoggerLevel, LoggerLogOptions, LoggerNormalizedError, LoggerPIIConfig, LoggerSink, LoggerTelemetryPayload, LoggerThrottleConfig, MarginConfig, MaterialAutocompleteMetadata, MaterialButtonMetadata, MaterialButtonToggleMetadata, MaterialCheckboxMetadata, MaterialChipsMetadata, MaterialColorInputMetadata, MaterialColorPickerMetadata, MaterialCpfCnpjMetadata, MaterialCurrencyMetadata, MaterialDateInputMetadata, MaterialDateRangeMetadata, MaterialDatepickerMetadata, MaterialDatetimeLocalInputMetadata, MaterialDesignConfig, MaterialEmailInputMetadata, MaterialEmailMetadata, MaterialInputMetadata, MaterialMonthInputMetadata, MaterialMultiSelectTreeMetadata, MaterialNumericMetadata, MaterialPasswordMetadata, MaterialPhoneMetadata, MaterialPriceRangeMetadata, MaterialRadioMetadata, MaterialRangeSliderMetadata, MaterialRatingMetadata, MaterialSearchInputMetadata, MaterialSelectMetadata, MaterialSelectionListMetadata, MaterialSliderMetadata, MaterialTextareaMetadata, MaterialTimeInputMetadata, MaterialTimeRangeMetadata, MaterialTimeTrackShift, MaterialTimepickerMetadata, MaterialToggleMetadata, MaterialTransferListMetadata, MaterialTreeNode, MaterialTreeSelectMetadata, MaterialUrlInputMetadata, MaterialWeekInputMetadata, MaterialYearInputMetadata, MemoryConfig, MessageTemplate, MessagesConfig, NestedFieldsetLayout, NormalizedError, NumberLocaleConfig, ObservabilityAlert, ObservabilityAlertGroupBy, ObservabilityAlertRule, ObservabilityAlertSeverity, ObservabilityCountBucket, ObservabilityDashboardOptions, ObservabilityIngestInput, ObservabilityMetricsSnapshot, OptionDTO, OptionSourceMetadata, OptionSourceRequestOptions, OverlayDecider, OverlayDecision, OverlayDecisionContext, OverlayDecisionMatrix, OverlayPattern, OverlayRange, OverlayRule, OverlayRuleMatch, OverlayThresholds, Page, PageIdentity, PageableRequest, PaginationConfig, PartialFieldMetadata, PdfExportConfig, PerformanceConfig, PersistedPageConfig, PersistedPageDefinitionWithIds, PersistedWidgetInstance, PlainObject, PluginConfig, PollingConfig, PortCardinality, PortCompatibilityRuleSet, PortContract, PortDirection, PortExposure, PortSchemaKind, PortSchemaMode, PortSchemaRef, PortSemanticKind, PraxisAnalyticsBindings, PraxisAnalyticsDefaults, PraxisAnalyticsDimensionBinding, PraxisAnalyticsDistributionStatsRequest, PraxisAnalyticsExecutionMetric, PraxisAnalyticsGroupByStatsRequest, PraxisAnalyticsInteractions, PraxisAnalyticsMetricBinding, PraxisAnalyticsOptions, PraxisAnalyticsPresentationHints, PraxisAnalyticsProjection, PraxisAnalyticsSortRule, PraxisAnalyticsSource, PraxisAnalyticsStatsExecutionPlan, PraxisAnalyticsStatsMetricRequest, PraxisAnalyticsStatsRequest, PraxisAnalyticsTimeSeriesStatsRequest, PraxisAuthContext, PraxisConditionalRule, PraxisConditionalRuleMatchInput, PraxisCustomRuleOperator, PraxisDataQueryContext, PraxisGlobalActionsOptions, PraxisGlobalConfigBootstrapOptions, PraxisHttpLoadingOptions, PraxisI18nConfig, PraxisI18nDictionary, PraxisI18nMessageDescriptor, PraxisI18nNamespaceConfig, PraxisI18nNamespaceDictionary, PraxisI18nTranslator, PraxisJsonLogicEvaluationContext, PraxisJsonLogicEvaluationOptions, PraxisJsonLogicEvaluationResult, PraxisJsonLogicIssueCode, PraxisJsonLogicOperatorDefinition, PraxisJsonLogicOperatorHelpers, PraxisJsonLogicRuntimeValue, PraxisJsonLogicValidationIssue, PraxisJsonLogicValidationOptions, PraxisJsonLogicValidationResult, PraxisLayerScale, PraxisLoadingRenderer, PraxisLocale, PraxisLoggingEnvironment, PraxisLoggingOptions, PraxisNativeJsonLogicOperator, PraxisRuleContextDescriptor, PraxisRuleOperator, PraxisTextValue, PraxisToastOptions, PraxisTranslationParams, PraxisXUiAnalytics, PriceRangeValue, RangeSliderInlineTexts, RangeSliderQuickPreset, RangeSliderQuickPresetLabels, RangeSliderValue, RenderingConfig, ResizingConfig, ResolvePresetOptions, ResolvedComponentMetadataEditorialBinding, ResolvedComponentMetadataEditorialMeta, ResolvedValuePresentation, ResourceActionCatalogItem, ResourceActionCatalogResponse, ResourceActionOpenAdapterOptions, ResourceActionScope, ResourceAvailabilityDecision, ResourceCapabilitySnapshot, ResourceDiscoveryRel, ResourceDiscoveryRequestOptions, ResourceLinkSource, ResourceSurfaceCatalogItem, ResourceSurfaceCatalogResponse, ResourceSurfaceKind, ResourceSurfaceOpenAdapterOptions, ResourceSurfaceScope, ResponsiveConfig, RestApiLinks, RestApiResponse, RichTextAppearance, RichTextVariant, RowAction, RowActionsConfig, RuleContextRoot, RulePropertyDefinition, RulePropertySchema, RulePropertyType, RunHooksResult, RuntimeLinkSnapshot, RuntimeLinkStatus, RuntimePayloadSummary, RuntimeSnapshot, RuntimeSnapshotStatus, RuntimeStateSnapshot, RuntimeTraceEntry, RuntimeTracePhase, SchemaIdParams, SchemaMetaInfo, SchemaViewerContext, SelectionConfig, SerializableFieldMetadata, SettingsPanelBridge, SettingsPanelOpenContent, SettingsPanelOpenOptions, SettingsPanelRef, SettingsValueProvider, SortingConfig, SpacingConfig, StateEndpointRef, StateMessagesConfig, SurfaceBinding, SurfaceBindingMode, SurfaceDrawerBridge, SurfaceDrawerOpenContent, SurfaceDrawerOpenOptions, SurfaceDrawerRef, SurfaceDrawerResult, SurfaceDrawerWidthPreset, SurfaceOpenPayload, SurfaceOpenPreset, SurfacePresentation, SurfaceSizeConfig, SyncConfig, SyncResult, TableActionsConfig, TableAppearanceConfig, TableBehaviorConfig, TableConfig, TableConfigV2 as TableConfigModern, TableConfigState, TableConfigV2, TableExpansionConfig, TableLocalDataModeConfig, TelemetryEvent, TelemetryLoggerSinkOptions, TelemetryTransport, TextTransformApply, TextTransformName, ThemeConfig, ToolbarAction, ToolbarConfig, ToolbarFilterConfig, ToolbarLayoutConfig, ToolbarSettingsConfig, TransformBinding, TransformBindingSource, TransformCatalogCategory, TransformCatalogEntry, TransformKind, TransformLegacyReplacement, TransformOutputHint, TransformPhase, TransformPipeline, TransformSemanticKind, TransformStep, TypographyConfig, UserContextSource, UserContextSummaryAppearance, UserContextSummaryField, ValidationContext, ValidationError, ValidationMessagesConfig, ValidationResult, ValidationRule, ValidatorFunction, ValidatorOptions, ValueKind$1 as ValueKind, ValuePresentationConfig, ValuePresentationResolutionContext, ValuePresentationStyle, ValuePresentationType, VirtualizationConfig, WidgetDefinition, WidgetDerivedStateNode, WidgetEventEnvelope, WidgetEventPathSegment, WidgetInstance, WidgetPageCanvasCollisionPolicy, WidgetPageCanvasConstraints, WidgetPageCanvasItem, WidgetPageCanvasItemOverride, WidgetPageCanvasLayout, WidgetPageCanvasLayoutVariant, WidgetPageCompositionDefinition, WidgetPageDefinition, WidgetPageDeviceKind, WidgetPageDeviceLayouts, WidgetPageDevicePolicy, WidgetPageGroupingDefinition, WidgetPageGroupingOverride, WidgetPageGroupingTabDefinition, WidgetPageLayout, WidgetPageLayoutPresetDefinition, WidgetPageLayoutVariant, WidgetPageOrientation, WidgetPageSlotAssignments, WidgetPageSlotDefinition, WidgetPageStateDefinition, WidgetPageStateInput, WidgetPageStateRuntimeSnapshot, WidgetPageThemePresetDefinition, WidgetPageWidgetLayoutOverride, WidgetPageWidgetSuggestion, WidgetResolutionDiagnostic, WidgetResolutionPhase, WidgetShellAction, WidgetShellActionEvent, WidgetShellActionPlacement, WidgetShellConfig, WidgetShellWindowActions, WidgetStateNode };