@praxisui/crud 9.0.0-beta.25 → 9.0.0-beta.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": "1.0.0",
|
|
3
|
-
"generatedAt": "2026-
|
|
3
|
+
"generatedAt": "2026-07-01T19:52:01.852Z",
|
|
4
4
|
"packageName": "@praxisui/crud",
|
|
5
|
-
"packageVersion": "9.0.0-beta.
|
|
5
|
+
"packageVersion": "9.0.0-beta.27",
|
|
6
6
|
"sourceRegistry": "praxis-component-registry-ingestion",
|
|
7
7
|
"sourceRegistryVersion": "1.0.0",
|
|
8
8
|
"componentCount": 2,
|
|
@@ -2706,9 +2706,9 @@
|
|
|
2706
2706
|
{
|
|
2707
2707
|
"chunkIndex": 5,
|
|
2708
2708
|
"chunkKind": "recipe",
|
|
2709
|
-
"content": "{\n \"_comment\": \"Variant focused on CRUD form configuration.\",\n \"templateMeta\": {\n \"variantId\": \"form\",\n \"variantOf\": \"praxis-crud\",\n \"registryKey\": \"praxis-crud\",\n \"tags\": [\n \"form\",\n \"crud\"\n ],\n \"useWhen\": \"user asks to change form layout or fields in CRUD\",\n \"examplePrompts\": [\n \"add a new field to the crud form\",\n \"update validation rules in the form\"\n ]\n },\n \"resource\": {\n \"path\": \"/api/employees\",\n \"idField\": \"id\",\n \"endpointKey\": \"employees\"\n },\n \"form\": {\n \"metadata\": {\n \"version\": \"2.0\",\n \"source\": \"local\",\n \"schemaId\": \"path:/api/employees#request\",\n \"schemaContext\": {\n \"path\": \"/api/employees\",\n \"operation\": \"POST\",\n \"schemaType\": \"request\",\n \"internal\": false,\n \"tenant\": \"default\",\n \"locale\": \"pt-BR\"\n }\n },\n \"api\": {\n \"saveEndpoint\": \"/api/employees\",\n \"loadEndpoint\": \"/api/employees/${id}\",\n \"saveMethod\": \"POST\",\n \"timeout\": 15000,\n \"headers\": {\n \"X-Module\": \"HR\"\n },\n \"idField\": \"id\",\n \"beforeSave\": \"sanitizeEmployee\",\n \"afterLoad\": \"mapEmployee\"\n },\n \"behavior\": {\n \"confirmOnUnsavedChanges\": true,\n \"trackHistory\": true,\n \"focusFirstError\": true,\n \"scrollToErrors\": true,\n \"clearAfterSave\": false,\n \"reactiveValidation\": true,\n \"reactiveValidationDebounceMs\": 200\n },\n \"messages\": {\n \"createRegistrySuccess\": \"Colaborador criado com sucesso.\",\n \"updateRegistrySuccess\": \"Colaborador atualizado com sucesso.\",\n \"createRegistryError\": \"Falha ao criar colaborador.\",\n \"updateRegistryError\": \"Falha ao atualizar colaborador.\",\n \"confirmations\": {\n \"submit\": \"Deseja salvar as alteracoes?\",\n \"cancel\": \"Descartar alteracoes?\",\n \"reset\": \"Limpar o formulario?\"\n },\n \"customActions\": {\n \"archive\": {\n \"confirmation\": \"Arquivar este colaborador?\"\n }\n },\n \"loading\": {\n \"submit\": \"Salvando...\",\n \"cancel\": \"Cancelando...\"\n }\n },\n \"hints\": {\n \"dataModes\": {\n \"create\": \"Preencha os dados para criar um novo colaborador.\",\n \"edit\": \"Atualize os dados e salve as alteracoes.\",\n \"view\": \"Visualize os dados do colaborador.\"\n },\n \"uiModes\": {\n \"presentation\": \"Modo apresentacao mostra somente leitura.\",\n \"readonly\": \"Modo leitura bloqueia edicao.\",\n \"disabled\": \"Campos desabilitados nao permitem interacao.\",\n \"visible\": \"Controle de visibilidade sem destruir controles.\"\n }\n },\n \"hooks\": {\n \"beforeSubmit\": [\n {\n \"id\": \"sanitize-employee\",\n \"priority\": 100,\n \"args\": {\n \"trimStrings\": true\n }\n }\n ],\n \"afterSubmit\": [\n {\n \"id\": \"notify-success\",\n \"args\": {\n \"messageKey\": \"employeeSaved\"\n }\n }\n ],\n \"onError\": [\n {\n \"id\": \"notify-error\",\n \"args\": {\n \"messageKey\": \"employeeSaveError\"\n }\n }\n ]\n },\n \"fieldMetadata\": [\n {\n \"name\": \"id\",\n \"label\": \"ID\",\n \"controlType\": \"numericTextBox\",\n \"dataType\": \"number\",\n \"hidden\": true,\n \"readOnly\": true,\n \"description\": \"Campo ID oculto, gerenciado pelo backend.\"\n },\n {\n \"name\": \"name\",\n \"label\": \"Nome completo\",\n \"controlType\": \"input\",\n \"dataType\": \"text\",\n \"placeholder\": \"Ex.: Ana Souza\",\n \"prefixIcon\": \"person\",\n \"validators\": {\n \"required\": true,\n \"minLength\": 3\n }\n },\n {\n \"name\": \"email\",\n \"label\": \"Email\",\n \"controlType\": \"email\",\n \"dataType\": \"email\",\n \"placeholder\": \"nome@empresa.com\",\n \"validators\": {\n \"required\": true,\n \"email\": true\n }\n },\n {\n \"name\": \"phone\",\n \"label\": \"Telefone\",\n \"controlType\": \"phone\",\n \"placeholder\": \"(11) 99999-0000\",\n \"mask\": \"(99) 99999-9999\"\n },\n {\n \"name\": \"status\",\n \"label\": \"Status\",\n \"controlType\": \"select\",\n \"options\": [\n {\n \"text\": \"Ativo\",\n \"value\": \"ACTIVE\"\n },\n {\n \"text\": \"Inativo\",\n \"value\": \"INACTIVE\"\n },\n {\n \"text\": \"Afastado\",\n \"value\": \"ON_LEAVE\"\n }\n ],\n \"defaultValue\": \"ACTIVE\",\n \"materialDesign\": {\n \"appearance\": \"outline\"\n }\n },\n {\n \"name\": \"hireDate\",\n \"label\": \"Data de admissao\",\n \"controlType\": \"date\",\n \"dataType\": \"date\"\n },\n {\n \"name\": \"terminationDate\",\n \"label\": \"Data de desligamento\",\n \"controlType\": \"date\",\n \"conditionalDisplay\": \"status == 'INACTIVE'\",\n \"conditionalRequired\": \"status == 'INACTIVE'\"\n },\n {\n \"name\": \"department\",\n \"label\": \"Departamento\",\n \"controlType\": \"select\",\n \"endpoint\": \"/api/departments\",\n \"valueField\": \"id\",\n \"displayField\": \"name\"\n },\n {\n \"name\": \"role\",\n \"label\": \"Cargo\",\n \"controlType\": \"select\",\n \"options\": [\n {\n \"text\": \"Analista\",\n \"value\": \"ANALYST\"\n },\n {\n \"text\": \"Coordenador\",\n \"value\": \"COORD\"\n },\n {\n \"text\": \"Gerente\",\n \"value\": \"MANAGER\"\n }\n ]\n },\n {\n \"name\": \"managerId\",\n \"label\": \"Gestor\",\n \"controlType\": \"autoComplete\",\n \"endpoint\": \"/api/employees?role=manager\",\n \"valueField\": \"id\",\n \"displayField\": \"name\",\n \"filterField\": \"name\"\n },\n {\n \"name\": \"salary\",\n \"label\": \"Salario\",\n \"controlType\": \"currency\",\n \"dataType\": \"number\",\n \"format\": \"BRL|symbol|2\",\n \"validators\": {\n \"min\": 0\n }\n },\n {\n \"name\": \"workMode\",\n \"label\": \"Regime\",\n \"controlType\": \"radio\",\n \"options\": [\n {\n \"text\": \"CLT\",\n \"value\": \"CLT\"\n },\n {\n \"text\": \"PJ\",\n \"value\": \"PJ\"\n },\n {\n \"text\": \"Estagio\",\n \"value\": \"INTERN\"\n }\n ],\n \"defaultValue\": \"CLT\"\n },\n {\n \"name\": \"notes\",\n \"label\": \"Observacoes\",\n \"controlType\": \"textarea\",\n \"validators\": {\n \"maxLength\": 500\n },\n \"hint\": \"Informacoes adicionais relevantes ao cadastro.\"\n },\n {\n \"name\": \"isActive\",\n \"label\": \"Ativo\",\n \"controlType\": \"toggle\",\n \"defaultValue\": true\n },\n {\n \"name\": \"avatar\",\n \"label\": \"Foto\",\n \"controlType\": \"upload\",\n \"accept\": \".png,.jpg,.jpeg\",\n \"multiple\": false,\n \"materialDesign\": {\n \"appearance\": \"outline\"\n }\n }\n ],\n \"sections\": [\n {\n \"id\": \"basic\",\n \"title\": \"Dados basicos\",\n \"description\": \"Informacoes pessoais e status.\",\n \"icon\": \"person\",\n \"collapsible\": true,\n \"collapsed\": false,\n \"titleStyle\": \"titleMedium\",\n \"descriptionStyle\": \"bodyMedium\",\n \"rows\": [\n {\n \"id\": \"row-basic-1\",\n \"columns\": [\n {\n \"id\": \"col-basic-1\",\n \"fields\": [\n \"name\",\n \"email\"\n ],\n \"span\": {\n \"md\": 6,\n \"lg\": 6\n },\n \"padding\": 8\n },\n {\n \"id\": \"col-basic-2\",\n \"fields\": [\n \"status\",\n \"hireDate\"\n ],\n \"span\": {\n \"md\": 6,\n \"lg\": 6\n }\n }\n ]\n },\n {\n \"id\": \"row-basic-2\",\n \"columns\": [\n {\n \"id\": \"col-basic-3\",\n \"fields\": [\n \"phone\",\n \"managerId\"\n ],\n \"span\": {\n \"md\": 6,\n \"lg\": 6\n }\n },\n {\n \"id\": \"col-basic-4\",\n \"fields\": [\n \"department\",\n \"role\"\n ],\n \"span\": {\n \"md\": 6,\n \"lg\": 6\n }\n }\n ]\n }\n ]\n },\n {\n \"id\": \"employment\",\n \"title\": \"Contrato\",\n \"icon\": \"badge\",\n \"rows\": [\n {\n \"id\": \"row-employment-1\",\n \"columns\": [\n {\n \"id\": \"col-employment-1\",\n \"fields\": [\n \"salary\",\n \"workMode\"\n ],\n \"span\": {\n \"md\": 6,\n \"lg\": 6\n }\n },\n {\n \"id\": \"col-employment-2\",\n \"fields\": [\n \"terminationDate\",\n \"notes\"\n ],\n \"span\": {\n \"md\": 6,\n \"lg\": 6\n }\n }\n ]\n }\n ]\n },\n {\n \"id\": \"attachments\",\n \"title\": \"Arquivos\",\n \"collapsible\": true,\n \"collapsed\": true,\n \"rows\": [\n {\n \"id\": \"row-attachments-1\",\n \"columns\": [\n {\n \"id\": \"col-attachments-1\",\n \"fields\": [\n \"avatar\"\n ],\n \"span\": {\n \"md\": 12,\n \"lg\": 12\n },\n \"align\": \"center\"\n }\n ]\n }\n ]\n }\n ],\n \"actions\": {\n \"submit\": {\n \"visible\": true,\n \"label\": \"Salvar\",\n \"color\": \"primary\",\n \"variant\": \"raised\",\n \"type\": \"submit\",\n \"shortcut\": \"Ctrl+S\"\n },\n \"cancel\": {\n \"visible\": true,\n \"label\": \"Cancelar\",\n \"type\": \"button\"\n },\n \"reset\": {\n \"visible\": true,\n \"label\": \"Limpar\",\n \"type\": \"reset\"\n },\n \"custom\": [\n {\n \"id\": \"archive\",\n \"visible\": true,\n \"label\": \"Arquivar\",\n \"icon\": \"archive\",\n \"color\": \"warn\",\n \"variant\": \"stroked\",\n \"action\": \"archive\"\n }\n ],\n \"position\": \"right\",\n \"orientation\": \"horizontal\",\n \"spacing\": \"normal\",\n \"sticky\": true,\n \"divider\": true,\n \"placement\": \"afterSections\",\n \"mobile\": {\n \"position\": \"center\",\n \"orientation\": \"vertical\",\n \"collapseToMenu\": true\n }\n },\n \"formRules\": [\n {\n \"id\": \"hide-salary-inactive\",\n \"name\": \"Ocultar salario para inativos\",\n \"targetType\": \"field\",\n \"targets\": [\n \"salary\"\n ],\n \"effect\": {\n \"condition\": \"status == 'INACTIVE'\",\n \"properties\": {\n \"visible\": false\n }\n }\n },\n {\n \"id\": \"require-termination-date\",\n \"name\": \"Exigir data de desligamento\",\n \"targetType\": \"field\",\n \"targets\": [\n \"terminationDate\"\n ],\n \"effect\": {\n \"condition\": \"status == 'INACTIVE'\",\n \"properties\": {\n \"required\": true,\n \"visible\": true\n }\n }\n }\n ]\n }\n}\n",
|
|
2709
|
+
"content": "{\n \"_comment\": \"Variant focused on CRUD form configuration.\",\n \"templateMeta\": {\n \"variantId\": \"form\",\n \"variantOf\": \"praxis-crud\",\n \"registryKey\": \"praxis-crud\",\n \"tags\": [\n \"form\",\n \"crud\"\n ],\n \"useWhen\": \"user asks to change form layout or fields in CRUD\",\n \"examplePrompts\": [\n \"add a new field to the crud form\",\n \"update validation rules in the form\"\n ]\n },\n \"resource\": {\n \"path\": \"/api/employees\",\n \"idField\": \"id\",\n \"endpointKey\": \"employees\"\n },\n \"form\": {\n \"metadata\": {\n \"version\": \"2.0\",\n \"source\": \"local\",\n \"schemaId\": \"path:/api/employees#request\",\n \"schemaContext\": {\n \"path\": \"/api/employees\",\n \"operation\": \"POST\",\n \"schemaType\": \"request\",\n \"internal\": false,\n \"tenant\": \"default\",\n \"locale\": \"pt-BR\"\n }\n },\n \"api\": {\n \"saveEndpoint\": \"/api/employees\",\n \"loadEndpoint\": \"/api/employees/${id}\",\n \"saveMethod\": \"POST\",\n \"timeout\": 15000,\n \"headers\": {\n \"X-Module\": \"HR\"\n },\n \"idField\": \"id\",\n \"beforeSave\": \"sanitizeEmployee\",\n \"afterLoad\": \"mapEmployee\"\n },\n \"behavior\": {\n \"confirmOnUnsavedChanges\": true,\n \"trackHistory\": true,\n \"focusFirstError\": true,\n \"scrollToErrors\": true,\n \"clearAfterSave\": false,\n \"reactiveValidation\": true,\n \"reactiveValidationDebounceMs\": 200\n },\n \"messages\": {\n \"createRegistrySuccess\": \"Colaborador criado com sucesso.\",\n \"updateRegistrySuccess\": \"Colaborador atualizado com sucesso.\",\n \"createRegistryError\": \"Falha ao criar colaborador.\",\n \"updateRegistryError\": \"Falha ao atualizar colaborador.\",\n \"confirmations\": {\n \"submit\": \"Deseja salvar as alteracoes?\",\n \"cancel\": \"Descartar alteracoes?\",\n \"reset\": \"Limpar o formulario?\"\n },\n \"customActions\": {\n \"archive\": {\n \"confirmation\": \"Arquivar este colaborador?\"\n }\n },\n \"loading\": {\n \"submit\": \"Salvando...\",\n \"cancel\": \"Cancelando...\"\n }\n },\n \"hints\": {\n \"dataModes\": {\n \"create\": \"Preencha os dados para criar um novo colaborador.\",\n \"edit\": \"Atualize os dados e salve as alteracoes.\",\n \"view\": \"Visualize os dados do colaborador.\"\n },\n \"uiModes\": {\n \"presentation\": \"Modo apresentacao mostra somente leitura.\",\n \"readonly\": \"Modo leitura bloqueia edicao.\",\n \"disabled\": \"Campos desabilitados nao permitem interacao.\",\n \"visible\": \"Controle de visibilidade sem destruir controles.\"\n }\n },\n \"hooks\": {\n \"beforeSubmit\": [\n {\n \"id\": \"sanitize-employee\",\n \"priority\": 100,\n \"args\": {\n \"trimStrings\": true\n }\n }\n ],\n \"afterSubmit\": [\n {\n \"id\": \"notify-success\",\n \"args\": {\n \"messageKey\": \"employeeSaved\"\n }\n }\n ],\n \"onError\": [\n {\n \"id\": \"notify-error\",\n \"args\": {\n \"messageKey\": \"employeeSaveError\"\n }\n }\n ]\n },\n \"fieldMetadata\": [\n {\n \"name\": \"id\",\n \"label\": \"ID\",\n \"controlType\": \"numericTextBox\",\n \"dataType\": \"number\",\n \"hidden\": true,\n \"readOnly\": true,\n \"description\": \"Campo ID oculto, gerenciado pelo backend.\"\n },\n {\n \"name\": \"name\",\n \"label\": \"Nome completo\",\n \"controlType\": \"input\",\n \"dataType\": \"text\",\n \"placeholder\": \"Ex.: Ana Souza\",\n \"prefixIcon\": \"person\",\n \"validators\": {\n \"required\": true,\n \"minLength\": 3\n }\n },\n {\n \"name\": \"email\",\n \"label\": \"Email\",\n \"controlType\": \"email\",\n \"dataType\": \"email\",\n \"placeholder\": \"nome@empresa.com\",\n \"validators\": {\n \"required\": true,\n \"email\": true\n }\n },\n {\n \"name\": \"phone\",\n \"label\": \"Telefone\",\n \"controlType\": \"phone\",\n \"placeholder\": \"(11) 99999-0000\",\n \"mask\": \"(99) 99999-9999\"\n },\n {\n \"name\": \"status\",\n \"label\": \"Status\",\n \"controlType\": \"select\",\n \"options\": [\n {\n \"text\": \"Ativo\",\n \"value\": \"ACTIVE\"\n },\n {\n \"text\": \"Inativo\",\n \"value\": \"INACTIVE\"\n },\n {\n \"text\": \"Afastado\",\n \"value\": \"ON_LEAVE\"\n }\n ],\n \"defaultValue\": \"ACTIVE\",\n \"materialDesign\": {\n \"appearance\": \"outline\"\n }\n },\n {\n \"name\": \"hireDate\",\n \"label\": \"Data de admissao\",\n \"controlType\": \"date\",\n \"dataType\": \"date\"\n },\n {\n \"name\": \"terminationDate\",\n \"label\": \"Data de desligamento\",\n \"controlType\": \"date\",\n \"conditionalDisplay\": {\n \"==\": [\n {\n \"var\": \"status\"\n },\n \"INACTIVE\"\n ]\n },\n \"conditionalRequired\": {\n \"==\": [\n {\n \"var\": \"status\"\n },\n \"INACTIVE\"\n ]\n }\n },\n {\n \"name\": \"department\",\n \"label\": \"Departamento\",\n \"controlType\": \"select\",\n \"endpoint\": \"/api/departments\",\n \"valueField\": \"id\",\n \"displayField\": \"name\"\n },\n {\n \"name\": \"role\",\n \"label\": \"Cargo\",\n \"controlType\": \"select\",\n \"options\": [\n {\n \"text\": \"Analista\",\n \"value\": \"ANALYST\"\n },\n {\n \"text\": \"Coordenador\",\n \"value\": \"COORD\"\n },\n {\n \"text\": \"Gerente\",\n \"value\": \"MANAGER\"\n }\n ]\n },\n {\n \"name\": \"managerId\",\n \"label\": \"Gestor\",\n \"controlType\": \"autoComplete\",\n \"endpoint\": \"/api/employees?role=manager\",\n \"valueField\": \"id\",\n \"displayField\": \"name\",\n \"filterField\": \"name\"\n },\n {\n \"name\": \"salary\",\n \"label\": \"Salario\",\n \"controlType\": \"currency\",\n \"dataType\": \"number\",\n \"format\": \"BRL|symbol|2\",\n \"validators\": {\n \"min\": 0\n }\n },\n {\n \"name\": \"workMode\",\n \"label\": \"Regime\",\n \"controlType\": \"radio\",\n \"options\": [\n {\n \"text\": \"CLT\",\n \"value\": \"CLT\"\n },\n {\n \"text\": \"PJ\",\n \"value\": \"PJ\"\n },\n {\n \"text\": \"Estagio\",\n \"value\": \"INTERN\"\n }\n ],\n \"defaultValue\": \"CLT\"\n },\n {\n \"name\": \"notes\",\n \"label\": \"Observacoes\",\n \"controlType\": \"textarea\",\n \"validators\": {\n \"maxLength\": 500\n },\n \"hint\": \"Informacoes adicionais relevantes ao cadastro.\"\n },\n {\n \"name\": \"isActive\",\n \"label\": \"Ativo\",\n \"controlType\": \"toggle\",\n \"defaultValue\": true\n },\n {\n \"name\": \"avatar\",\n \"label\": \"Foto\",\n \"controlType\": \"upload\",\n \"accept\": \".png,.jpg,.jpeg\",\n \"multiple\": false,\n \"materialDesign\": {\n \"appearance\": \"outline\"\n }\n }\n ],\n \"sections\": [\n {\n \"id\": \"basic\",\n \"title\": \"Dados basicos\",\n \"description\": \"Informacoes pessoais e status.\",\n \"icon\": \"person\",\n \"collapsible\": true,\n \"collapsed\": false,\n \"titleStyle\": \"titleMedium\",\n \"descriptionStyle\": \"bodyMedium\",\n \"rows\": [\n {\n \"id\": \"row-basic-1\",\n \"columns\": [\n {\n \"id\": \"col-basic-1\",\n \"fields\": [\n \"name\",\n \"email\"\n ],\n \"span\": {\n \"md\": 6,\n \"lg\": 6\n },\n \"padding\": 8\n },\n {\n \"id\": \"col-basic-2\",\n \"fields\": [\n \"status\",\n \"hireDate\"\n ],\n \"span\": {\n \"md\": 6,\n \"lg\": 6\n }\n }\n ]\n },\n {\n \"id\": \"row-basic-2\",\n \"columns\": [\n {\n \"id\": \"col-basic-3\",\n \"fields\": [\n \"phone\",\n \"managerId\"\n ],\n \"span\": {\n \"md\": 6,\n \"lg\": 6\n }\n },\n {\n \"id\": \"col-basic-4\",\n \"fields\": [\n \"department\",\n \"role\"\n ],\n \"span\": {\n \"md\": 6,\n \"lg\": 6\n }\n }\n ]\n }\n ]\n },\n {\n \"id\": \"employment\",\n \"title\": \"Contrato\",\n \"icon\": \"badge\",\n \"rows\": [\n {\n \"id\": \"row-employment-1\",\n \"columns\": [\n {\n \"id\": \"col-employment-1\",\n \"fields\": [\n \"salary\",\n \"workMode\"\n ],\n \"span\": {\n \"md\": 6,\n \"lg\": 6\n }\n },\n {\n \"id\": \"col-employment-2\",\n \"fields\": [\n \"terminationDate\",\n \"notes\"\n ],\n \"span\": {\n \"md\": 6,\n \"lg\": 6\n }\n }\n ]\n }\n ]\n },\n {\n \"id\": \"attachments\",\n \"title\": \"Arquivos\",\n \"collapsible\": true,\n \"collapsed\": true,\n \"rows\": [\n {\n \"id\": \"row-attachments-1\",\n \"columns\": [\n {\n \"id\": \"col-attachments-1\",\n \"fields\": [\n \"avatar\"\n ],\n \"span\": {\n \"md\": 12,\n \"lg\": 12\n },\n \"align\": \"center\"\n }\n ]\n }\n ]\n }\n ],\n \"actions\": {\n \"submit\": {\n \"visible\": true,\n \"label\": \"Salvar\",\n \"color\": \"primary\",\n \"variant\": \"raised\",\n \"type\": \"submit\",\n \"shortcut\": \"Ctrl+S\"\n },\n \"cancel\": {\n \"visible\": true,\n \"label\": \"Cancelar\",\n \"type\": \"button\"\n },\n \"reset\": {\n \"visible\": true,\n \"label\": \"Limpar\",\n \"type\": \"reset\"\n },\n \"custom\": [\n {\n \"id\": \"archive\",\n \"visible\": true,\n \"label\": \"Arquivar\",\n \"icon\": \"archive\",\n \"color\": \"warn\",\n \"variant\": \"stroked\",\n \"action\": \"archive\"\n }\n ],\n \"position\": \"right\",\n \"orientation\": \"horizontal\",\n \"spacing\": \"normal\",\n \"sticky\": true,\n \"divider\": true,\n \"placement\": \"afterSections\",\n \"mobile\": {\n \"position\": \"center\",\n \"orientation\": \"vertical\",\n \"collapseToMenu\": true\n }\n },\n \"formRules\": [\n {\n \"id\": \"hide-salary-inactive\",\n \"name\": \"Ocultar salario para inativos\",\n \"targetType\": \"field\",\n \"targets\": [\n \"salary\"\n ],\n \"effect\": {\n \"condition\": {\n \"==\": [\n {\n \"var\": \"status\"\n },\n \"INACTIVE\"\n ]\n },\n \"properties\": {\n \"visible\": false\n }\n }\n },\n {\n \"id\": \"require-termination-date\",\n \"name\": \"Exigir data de desligamento\",\n \"targetType\": \"field\",\n \"targets\": [\n \"terminationDate\"\n ],\n \"effect\": {\n \"condition\": {\n \"==\": [\n {\n \"var\": \"status\"\n },\n \"INACTIVE\"\n ]\n },\n \"properties\": {\n \"required\": true,\n \"visible\": true\n }\n }\n }\n ]\n }\n}\n",
|
|
2710
2710
|
"sourcePointer": "praxis-ui-angular/examples/ai-recipes/praxis-crud.form.json",
|
|
2711
|
-
"contentHash": "
|
|
2711
|
+
"contentHash": "8227063c2eabebd47184ba13c83450b8cfbf880aaa61540075c2cf1a5c7d8227",
|
|
2712
2712
|
"sourceKind": "component_definition",
|
|
2713
2713
|
"sourceId": "praxis-crud",
|
|
2714
2714
|
"corpusVersion": "1.0.0"
|
|
@@ -2716,9 +2716,9 @@
|
|
|
2716
2716
|
{
|
|
2717
2717
|
"chunkIndex": 6,
|
|
2718
2718
|
"chunkKind": "recipe",
|
|
2719
|
-
"content": "{\n \"_comment\": \"Receita de CRUD alinhada ao PraxisCrud, usando acoes canonicas inferidas como baseline.\",\n \"templateMeta\": {\n \"registryKey\": \"praxis-crud\",\n \"defaultVariantId\": \"table\",\n \"variants\": [\n {\n \"id\": \"table\",\n \"registryKey\": \"praxis-crud\",\n \"variantId\": \"table\",\n \"aiDescription\": \"CRUD table configuration only.\",\n \"tags\": [\n \"table\",\n \"crud\"\n ],\n \"useWhen\": \"user asks to change table columns or behavior inside CRUD\",\n \"examplePrompts\": [\n \"adjust the columns shown in the crud table\",\n \"enable selection in the crud table\"\n ]\n },\n {\n \"id\": \"form\",\n \"registryKey\": \"praxis-crud\",\n \"variantId\": \"form\",\n \"aiDescription\": \"CRUD form configuration only.\",\n \"tags\": [\n \"form\",\n \"crud\"\n ],\n \"useWhen\": \"user asks to change form layout or fields in CRUD\",\n \"examplePrompts\": [\n \"add a new field to the crud form\",\n \"update validation rules in the form\"\n ]\n },\n {\n \"id\": \"actions\",\n \"registryKey\": \"praxis-crud\",\n \"variantId\": \"actions\",\n \"aiDescription\": \"CRUD actions and modal behavior.\",\n \"tags\": [\n \"actions\",\n \"crud\"\n ],\n \"useWhen\": \"user asks to change CRUD actions or routes\",\n \"examplePrompts\": [\n \"add a custom action to archive records\",\n \"change the edit action to open a route\"\n ]\n }\n ]\n },\n \"component\": \"praxis-crud\",\n \"resource\": {\n \"path\": \"/api/employees\",\n \"idField\": \"id\",\n \"endpointKey\": \"employees\"\n },\n \"defaults\": {\n \"openMode\": \"modal\",\n \"modal\": {\n \"width\": \"860px\",\n \"maxWidth\": \"95vw\",\n \"panelClass\": \"crud-dialog\",\n \"backdropStyle\": \"blur\",\n \"autoFocus\": true,\n \"restoreFocus\": true\n },\n \"back\": {\n \"strategy\": \"auto\",\n \"returnTo\": \"/employees\",\n \"confirmOnDirty\": true\n },\n \"header\": {\n \"showBack\": true,\n \"backLabel\": \"Voltar\",\n \"variant\": \"outlined\",\n \"sticky\": true,\n \"breadcrumbs\": true,\n \"divider\": true\n }\n },\n \"actions\": [\n {\n \"id\": \"create\",\n \"label\": \"Novo colaborador\",\n \"icon\": \"add\",\n \"action\": \"create\",\n \"openMode\": \"modal\"\n },\n {\n \"id\": \"view\",\n \"label\": \"Visualizar\",\n \"icon\": \"visibility\",\n \"action\": \"view\",\n \"openMode\": \"modal\"\n },\n {\n \"id\": \"edit\",\n \"label\": \"Editar\",\n \"icon\": \"edit\",\n \"action\": \"edit\",\n \"openMode\": \"modal\"\n },\n {\n \"id\": \"delete\",\n \"label\": \"Excluir\",\n \"icon\": \"delete\",\n \"action\": \"delete\"\n },\n {\n \"id\": \"edit-route\",\n \"label\": \"Editar na rota\",\n \"icon\": \"open_in_new\",\n \"action\": \"edit-route\",\n \"openMode\": \"route\",\n \"route\": \"/employees/:id/edit\",\n \"params\": [\n {\n \"from\": \"id\",\n \"to\": \"routeParam\",\n \"name\": \"id\"\n },\n {\n \"from\": \"name\",\n \"to\": \"query\",\n \"name\": \"name\"\n }\n ],\n \"back\": {\n \"strategy\": \"navigate\",\n \"returnTo\": \"/employees\"\n }\n }\n ],\n \"table\": {\n \"meta\": {\n \"version\": \"2.0.0\",\n \"id\": \"employees-table\",\n \"name\": \"Colaboradores\",\n \"description\": \"Listagem de colaboradores ativos e inativos\",\n \"idField\": \"id\"\n },\n \"columns\": [\n {\n \"field\": \"id\",\n \"header\": \"ID\",\n \"type\": \"string\",\n \"width\": \"80px\",\n \"visible\": false\n },\n {\n \"field\": \"name\",\n \"header\": \"Nome\",\n \"type\": \"string\",\n \"sortable\": true,\n \"filterable\": true,\n \"resizable\": true,\n \"sticky\": \"start\"\n },\n {\n \"field\": \"email\",\n \"header\": \"Email\",\n \"type\": \"string\",\n \"sortable\": true,\n \"filterable\": true\n },\n {\n \"field\": \"status\",\n \"header\": \"Status\",\n \"type\": \"string\",\n \"sortable\": true,\n \"filterable\": true,\n \"valueMapping\": {\n \"ACTIVE\": \"Ativo\",\n \"INACTIVE\": \"Inativo\",\n \"ON_LEAVE\": \"Afastado\"\n },\n \"renderer\": {\n \"type\": \"badge\",\n \"badge\": {\n \"textField\": \"statusLabel\",\n \"color\": \"success\",\n \"variant\": \"filled\"\n }\n },\n \"conditionalRenderers\": [\n {\n \"condition\": \"status == 'INACTIVE'\",\n \"renderer\": {\n \"type\": \"badge\",\n \"badge\": {\n \"text\": \"Inativo\",\n \"color\": \"warn\",\n \"variant\": \"filled\"\n }\n },\n \"description\": \"Status inativo\",\n \"enabled\": true\n },\n {\n \"condition\": \"status == 'ON_LEAVE'\",\n \"renderer\": {\n \"type\": \"chip\",\n \"chip\": {\n \"text\": \"Afastado\",\n \"color\": \"accent\",\n \"variant\": \"outlined\"\n }\n },\n \"description\": \"Status afastado\",\n \"enabled\": true\n }\n ]\n },\n {\n \"field\": \"hireDate\",\n \"header\": \"Admissao\",\n \"type\": \"date\",\n \"format\": \"dd/MM/yyyy\",\n \"sortable\": true,\n \"filterable\": true\n },\n {\n \"field\": \"salary\",\n \"header\": \"Salario\",\n \"type\": \"currency\",\n \"format\": \"BRL|symbol|2\",\n \"align\": \"right\",\n \"sortable\": true,\n \"filterable\": true\n }\n ],\n \"toolbar\": {\n \"visible\": true,\n \"position\": \"top\",\n \"title\": \"Colaboradores\",\n \"subtitle\": \"Gerencie cadastro, status e remuneracao\",\n \"layout\": {\n \"alignment\": \"space-between\",\n \"showSeparator\": true\n },\n \"actions\": [\n {\n \"id\": \"create\",\n \"label\": \"Novo\",\n \"icon\": \"add\",\n \"type\": \"button\",\n \"color\": \"primary\",\n \"position\": \"end\",\n \"action\": \"create\"\n },\n {\n \"id\": \"export\",\n \"label\": \"Exportar\",\n \"icon\": \"download\",\n \"type\": \"menu\",\n \"position\": \"end\",\n \"action\": \"export\",\n \"children\": [\n {\n \"id\": \"export-csv\",\n \"label\": \"CSV\",\n \"icon\": \"table_view\",\n \"type\": \"button\",\n \"position\": \"end\",\n \"action\": \"exportCsv\"\n },\n {\n \"id\": \"export-excel\",\n \"label\": \"Excel\",\n \"icon\": \"grid_on\",\n \"type\": \"button\",\n \"position\": \"end\",\n \"action\": \"exportExcel\"\n }\n ]\n }\n ],\n \"filters\": {\n \"enabled\": true,\n \"showAdvancedButton\": true\n },\n \"settingsMenu\": {\n \"enabled\": true,\n \"options\": [\n {\n \"id\": \"density\",\n \"label\": \"Densidade\",\n \"type\": \"select\",\n \"options\": [\n \"compact\",\n \"comfortable\",\n \"spacious\"\n ]\n }\n ]\n }\n },\n \"behavior\": {\n \"pagination\": {\n \"enabled\": true,\n \"pageSize\": 20,\n \"pageSizeOptions\": [\n 10,\n 20,\n 50\n ],\n \"showFirstLastButtons\": true,\n \"showPageNumbers\": true,\n \"showPageInfo\": true,\n \"position\": \"bottom\",\n \"style\": \"default\",\n \"strategy\": \"server\"\n },\n \"sorting\": {\n \"enabled\": true,\n \"defaultSort\": {\n \"column\": \"name\",\n \"direction\": \"asc\"\n },\n \"multiSort\": false,\n \"strategy\": \"server\",\n \"showSortIndicators\": true,\n \"indicatorPosition\": \"end\",\n \"allowClearSort\": true\n },\n \"filtering\": {\n \"enabled\": true,\n \"columnFilters\": {\n \"enabled\": true,\n \"defaultType\": \"text\",\n \"position\": \"header\"\n },\n \"advancedFilters\": {\n \"enabled\": true,\n \"queryBuilder\": true,\n \"savePresets\": true\n },\n \"strategy\": \"server\",\n \"debounceTime\": 300\n },\n \"selection\": {\n \"enabled\": true,\n \"type\": \"multiple\",\n \"mode\": \"checkbox\",\n \"allowSelectAll\": true,\n \"checkboxPosition\": \"start\",\n \"persistSelection\": false,\n \"persistOnDataUpdate\": false\n },\n \"interaction\": {\n \"rowClick\": {\n \"enabled\": true,\n \"action\": \"view\"\n },\n \"rowDoubleClick\": {\n \"enabled\": true,\n \"action\": \"edit\"\n },\n \"hover\": {\n \"enabled\": true,\n \"highlightRow\": true,\n \"showActionsOnHover\": true\n },\n \"keyboard\": {\n \"enabled\": true\n }\n }\n },\n \"actions\": {\n \"row\": {\n \"enabled\": true,\n \"position\": \"end\",\n \"display\": \"icons\",\n \"trigger\": \"hover\",\n \"width\": \"140px\",\n \"actions\": [\n {\n \"id\": \"view\",\n \"label\": \"Ver\",\n \"icon\": \"visibility\",\n \"action\": \"view\"\n },\n {\n \"id\": \"edit\",\n \"label\": \"Editar\",\n \"icon\": \"edit\",\n \"action\": \"edit\"\n },\n {\n \"id\": \"delete\",\n \"label\": \"Excluir\",\n \"icon\": \"delete\",\n \"action\": \"delete\",\n \"requiresConfirmation\": true\n }\n ],\n \"header\": {\n \"label\": \"Acoes\",\n \"align\": \"center\"\n }\n },\n \"bulk\": {\n \"enabled\": true,\n \"position\": \"toolbar\",\n \"actions\": [\n {\n \"id\": \"bulk-delete\",\n \"label\": \"Excluir selecionados\",\n \"icon\": \"delete\",\n \"action\": \"deleteSelected\",\n \"requiresConfirmation\": true,\n \"minSelections\": 1\n }\n ],\n \"floating\": {\n \"position\": \"bottom-right\",\n \"hideWhenEmpty\": true\n }\n },\n \"confirmations\": {\n \"default\": {\n \"title\": \"Confirmar acao\",\n \"message\": \"Deseja continuar?\",\n \"confirmText\": \"Confirmar\",\n \"cancelText\": \"Cancelar\"\n },\n \"specific\": {\n \"delete\": {\n \"title\": \"Excluir colaborador\",\n \"message\": \"Esta acao nao pode ser desfeita.\",\n \"confirmText\": \"Excluir\",\n \"cancelText\": \"Cancelar\"\n }\n }\n }\n },\n \"export\": {\n \"enabled\": true,\n \"formats\": [\n \"csv\",\n \"excel\"\n ],\n \"general\": {\n \"includeHeaders\": true,\n \"respectFilters\": true,\n \"applyFormatting\": true,\n \"defaultFileName\": \"colaboradores\",\n \"includeColumns\": [\n \"id\",\n \"name\",\n \"email\",\n \"status\",\n \"hireDate\",\n \"salary\"\n ]\n },\n \"excel\": {\n \"sheetName\": \"Colaboradores\",\n \"includeFormulas\": false,\n \"freezeHeaders\": true,\n \"autoFitColumns\": true\n },\n \"csv\": {\n \"delimiter\": \";\",\n \"escapeChar\": \"\\\"\",\n \"encoding\": \"utf-8\",\n \"includeBOM\": true\n }\n },\n \"messages\": {\n \"states\": {\n \"loading\": \"Carregando colaboradores...\",\n \"empty\": \"Nenhum colaborador encontrado.\",\n \"error\": \"Erro ao carregar dados.\",\n \"noResults\": \"Sem resultados para o filtro atual.\",\n \"loadingMore\": \"Carregando mais registros...\"\n },\n \"actions\": {\n \"confirmations\": {\n \"delete\": \"Excluir este colaborador?\",\n \"deleteMultiple\": \"Excluir os colaboradores selecionados?\",\n \"save\": \"Salvar alteracoes?\",\n \"cancel\": \"Cancelar edicao?\",\n \"export\": \"Exportar dados agora?\"\n },\n \"success\": {\n \"save\": \"Colaborador salvo com sucesso.\",\n \"delete\": \"Colaborador excluido.\",\n \"export\": \"Exportacao concluida.\"\n },\n \"errors\": {\n \"save\": \"Falha ao salvar.\",\n \"delete\": \"Falha ao excluir.\",\n \"export\": \"Falha ao exportar.\"\n }\n }\n },\n \"localization\": {\n \"locale\": \"pt-BR\",\n \"direction\": \"ltr\",\n \"dateTime\": {\n \"dateFormat\": \"dd/MM/yyyy\",\n \"timeFormat\": \"HH:mm\",\n \"dateTimeFormat\": \"dd/MM/yyyy HH:mm\",\n \"firstDayOfWeek\": 1\n }\n },\n \"appearance\": {\n \"density\": \"comfortable\",\n \"borders\": {\n \"showRowBorders\": true,\n \"showColumnBorders\": false,\n \"showOuterBorder\": true,\n \"style\": \"solid\",\n \"width\": 1,\n \"color\": \"#e0e0e0\"\n }\n }\n },\n \"form\": {\n \"metadata\": {\n \"version\": \"2.0\",\n \"source\": \"local\",\n \"schemaId\": \"path:/api/employees#request\",\n \"schemaContext\": {\n \"path\": \"/api/employees\",\n \"operation\": \"POST\",\n \"schemaType\": \"request\",\n \"internal\": false,\n \"tenant\": \"default\",\n \"locale\": \"pt-BR\"\n }\n },\n \"api\": {\n \"saveEndpoint\": \"/api/employees\",\n \"loadEndpoint\": \"/api/employees/${id}\",\n \"saveMethod\": \"POST\",\n \"timeout\": 15000,\n \"headers\": {\n \"X-Module\": \"HR\"\n },\n \"idField\": \"id\",\n \"beforeSave\": \"sanitizeEmployee\",\n \"afterLoad\": \"mapEmployee\"\n },\n \"behavior\": {\n \"confirmOnUnsavedChanges\": true,\n \"trackHistory\": true,\n \"focusFirstError\": true,\n \"scrollToErrors\": true,\n \"clearAfterSave\": false,\n \"reactiveValidation\": true,\n \"reactiveValidationDebounceMs\": 200\n },\n \"messages\": {\n \"createRegistrySuccess\": \"Colaborador criado com sucesso.\",\n \"updateRegistrySuccess\": \"Colaborador atualizado com sucesso.\",\n \"createRegistryError\": \"Falha ao criar colaborador.\",\n \"updateRegistryError\": \"Falha ao atualizar colaborador.\",\n \"confirmations\": {\n \"submit\": \"Deseja salvar as alteracoes?\",\n \"cancel\": \"Descartar alteracoes?\",\n \"reset\": \"Limpar o formulario?\"\n },\n \"customActions\": {\n \"archive\": {\n \"confirmation\": \"Arquivar este colaborador?\"\n }\n },\n \"loading\": {\n \"submit\": \"Salvando...\",\n \"cancel\": \"Cancelando...\"\n }\n },\n \"hints\": {\n \"dataModes\": {\n \"create\": \"Preencha os dados para criar um novo colaborador.\",\n \"edit\": \"Atualize os dados e salve as alteracoes.\",\n \"view\": \"Visualize os dados do colaborador.\"\n },\n \"uiModes\": {\n \"presentation\": \"Modo apresentacao mostra somente leitura.\",\n \"readonly\": \"Modo leitura bloqueia edicao.\",\n \"disabled\": \"Campos desabilitados nao permitem interacao.\",\n \"visible\": \"Controle de visibilidade sem destruir controles.\"\n }\n },\n \"hooks\": {\n \"beforeSubmit\": [\n {\n \"id\": \"sanitize-employee\",\n \"priority\": 100,\n \"args\": {\n \"trimStrings\": true\n }\n }\n ],\n \"afterSubmit\": [\n {\n \"id\": \"notify-success\",\n \"args\": {\n \"messageKey\": \"employeeSaved\"\n }\n }\n ],\n \"onError\": [\n {\n \"id\": \"notify-error\",\n \"args\": {\n \"messageKey\": \"employeeSaveError\"\n }\n }\n ]\n },\n \"fieldMetadata\": [\n {\n \"name\": \"id\",\n \"label\": \"ID\",\n \"controlType\": \"numericTextBox\",\n \"dataType\": \"number\",\n \"hidden\": true,\n \"readOnly\": true,\n \"description\": \"Campo ID oculto, gerenciado pelo backend.\"\n },\n {\n \"name\": \"name\",\n \"label\": \"Nome completo\",\n \"controlType\": \"input\",\n \"dataType\": \"text\",\n \"placeholder\": \"Ex.: Ana Souza\",\n \"prefixIcon\": \"person\",\n \"validators\": {\n \"required\": true,\n \"minLength\": 3\n }\n },\n {\n \"name\": \"email\",\n \"label\": \"Email\",\n \"controlType\": \"email\",\n \"dataType\": \"email\",\n \"placeholder\": \"nome@empresa.com\",\n \"validators\": {\n \"required\": true,\n \"email\": true\n }\n },\n {\n \"name\": \"phone\",\n \"label\": \"Telefone\",\n \"controlType\": \"phone\",\n \"placeholder\": \"(11) 99999-0000\",\n \"mask\": \"(99) 99999-9999\"\n },\n {\n \"name\": \"status\",\n \"label\": \"Status\",\n \"controlType\": \"select\",\n \"options\": [\n {\n \"text\": \"Ativo\",\n \"value\": \"ACTIVE\"\n },\n {\n \"text\": \"Inativo\",\n \"value\": \"INACTIVE\"\n },\n {\n \"text\": \"Afastado\",\n \"value\": \"ON_LEAVE\"\n }\n ],\n \"defaultValue\": \"ACTIVE\",\n \"materialDesign\": {\n \"appearance\": \"outline\"\n }\n },\n {\n \"name\": \"hireDate\",\n \"label\": \"Data de admissao\",\n \"controlType\": \"date\",\n \"dataType\": \"date\"\n },\n {\n \"name\": \"terminationDate\",\n \"label\": \"Data de desligamento\",\n \"controlType\": \"date\",\n \"conditionalDisplay\": \"status == 'INACTIVE'\",\n \"conditionalRequired\": \"status == 'INACTIVE'\"\n },\n {\n \"name\": \"department\",\n \"label\": \"Departamento\",\n \"controlType\": \"select\",\n \"endpoint\": \"/api/departments\",\n \"valueField\": \"id\",\n \"displayField\": \"name\"\n },\n {\n \"name\": \"role\",\n \"label\": \"Cargo\",\n \"controlType\": \"select\",\n \"options\": [\n {\n \"text\": \"Analista\",\n \"value\": \"ANALYST\"\n },\n {\n \"text\": \"Coordenador\",\n \"value\": \"COORD\"\n },\n {\n \"text\": \"Gerente\",\n \"value\": \"MANAGER\"\n }\n ]\n },\n {\n \"name\": \"managerId\",\n \"label\": \"Gestor\",\n \"controlType\": \"autoComplete\",\n \"endpoint\": \"/api/employees?role=manager\",\n \"valueField\": \"id\",\n \"displayField\": \"name\",\n \"filterField\": \"name\"\n },\n {\n \"name\": \"salary\",\n \"label\": \"Salario\",\n \"controlType\": \"currency\",\n \"dataType\": \"number\",\n \"format\": \"BRL|symbol|2\",\n \"validators\": {\n \"min\": 0\n }\n },\n {\n \"name\": \"workMode\",\n \"label\": \"Regime\",\n \"controlType\": \"radio\",\n \"options\": [\n {\n \"text\": \"CLT\",\n \"value\": \"CLT\"\n },\n {\n \"text\": \"PJ\",\n \"value\": \"PJ\"\n },\n {\n \"text\": \"Estagio\",\n \"value\": \"INTERN\"\n }\n ],\n \"defaultValue\": \"CLT\"\n },\n {\n \"name\": \"notes\",\n \"label\": \"Observacoes\",\n \"controlType\": \"textarea\",\n \"validators\": {\n \"maxLength\": 500\n },\n \"hint\": \"Informacoes adicionais relevantes ao cadastro.\"\n },\n {\n \"name\": \"isActive\",\n \"label\": \"Ativo\",\n \"controlType\": \"toggle\",\n \"defaultValue\": true\n },\n {\n \"name\": \"avatar\",\n \"label\": \"Foto\",\n \"controlType\": \"upload\",\n \"accept\": \".png,.jpg,.jpeg\",\n \"multiple\": false,\n \"materialDesign\": {\n \"appearance\": \"outline\"\n }\n }\n ],\n \"sections\": [\n {\n \"id\": \"basic\",\n \"title\": \"Dados basicos\",\n \"description\": \"Informacoes pessoais e status.\",\n \"icon\": \"person\",\n \"collapsible\": true,\n \"collapsed\": false,\n \"titleStyle\": \"titleMedium\",\n \"descriptionStyle\": \"bodyMedium\",\n \"rows\": [\n {\n \"id\": \"row-basic-1\",\n \"columns\": [\n {\n \"id\": \"col-basic-1\",\n \"fields\": [\n \"name\",\n \"email\"\n ],\n \"span\": {\n \"md\": 6,\n \"lg\": 6\n },\n \"padding\": 8\n },\n {\n \"id\": \"col-basic-2\",\n \"fields\": [\n \"status\",\n \"hireDate\"\n ],\n \"span\": {\n \"md\": 6,\n \"lg\": 6\n }\n }\n ]\n },\n {\n \"id\": \"row-basic-2\",\n \"columns\": [\n {\n \"id\": \"col-basic-3\",\n \"fields\": [\n \"phone\",\n \"managerId\"\n ],\n \"span\": {\n \"md\": 6,\n \"lg\": 6\n }\n },\n {\n \"id\": \"col-basic-4\",\n \"fields\": [\n \"department\",\n \"role\"\n ],\n \"span\": {\n \"md\": 6,\n \"lg\": 6\n }\n }\n ]\n }\n ]\n },\n {\n \"id\": \"employment\",\n \"title\": \"Contrato\",\n \"icon\": \"badge\",\n \"rows\": [\n {\n \"id\": \"row-employment-1\",\n \"columns\": [\n {\n \"id\": \"col-employment-1\",\n \"fields\": [\n \"salary\",\n \"workMode\"\n ],\n \"span\": {\n \"md\": 6,\n \"lg\": 6\n }\n },\n {\n \"id\": \"col-employment-2\",\n \"fields\": [\n \"terminationDate\",\n \"notes\"\n ],\n \"span\": {\n \"md\": 6,\n \"lg\": 6\n }\n }\n ]\n }\n ]\n },\n {\n \"id\": \"attachments\",\n \"title\": \"Arquivos\",\n \"collapsible\": true,\n \"collapsed\": true,\n \"rows\": [\n {\n \"id\": \"row-attachments-1\",\n \"columns\": [\n {\n \"id\": \"col-attachments-1\",\n \"fields\": [\n \"avatar\"\n ],\n \"span\": {\n \"md\": 12,\n \"lg\": 12\n },\n \"align\": \"center\"\n }\n ]\n }\n ]\n }\n ],\n \"actions\": {\n \"submit\": {\n \"visible\": true,\n \"label\": \"Salvar\",\n \"color\": \"primary\",\n \"variant\": \"raised\",\n \"type\": \"submit\",\n \"shortcut\": \"Ctrl+S\"\n },\n \"cancel\": {\n \"visible\": true,\n \"label\": \"Cancelar\",\n \"type\": \"button\"\n },\n \"reset\": {\n \"visible\": true,\n \"label\": \"Limpar\",\n \"type\": \"reset\"\n },\n \"custom\": [\n {\n \"id\": \"archive\",\n \"visible\": true,\n \"label\": \"Arquivar\",\n \"icon\": \"archive\",\n \"color\": \"warn\",\n \"variant\": \"stroked\",\n \"action\": \"archive\"\n }\n ],\n \"position\": \"right\",\n \"orientation\": \"horizontal\",\n \"spacing\": \"normal\",\n \"sticky\": true,\n \"divider\": true,\n \"placement\": \"afterSections\",\n \"mobile\": {\n \"position\": \"center\",\n \"orientation\": \"vertical\",\n \"collapseToMenu\": true\n }\n },\n \"formRules\": [\n {\n \"id\": \"hide-salary-inactive\",\n \"name\": \"Ocultar salario para inativos\",\n \"targetType\": \"field\",\n \"targets\": [\n \"salary\"\n ],\n \"effect\": {\n \"condition\": \"status == 'INACTIVE'\",\n \"properties\": {\n \"visible\": false\n }\n }\n },\n {\n \"id\": \"require-termination-date\",\n \"name\": \"Exigir data de desligamento\",\n \"targetType\": \"field\",\n \"targets\": [\n \"terminationDate\"\n ],\n \"effect\": {\n \"condition\": \"status == 'INACTIVE'\",\n \"properties\": {\n \"required\": true,\n \"visible\": true\n }\n }\n }\n ]\n },\n \"i18n\": {\n \"crudDialog\": {\n \"createTitle\": \"Novo colaborador\",\n \"editTitle\": \"Editar colaborador\",\n \"viewTitle\": \"Detalhes do colaborador\",\n \"deleteTitle\": \"Confirmar exclusao\",\n \"deleteConfirm\": \"Tem certeza que deseja excluir este colaborador?\"\n }\n }\n}\n",
|
|
2719
|
+
"content": "{\n \"_comment\": \"Receita de CRUD alinhada ao PraxisCrud, usando acoes canonicas inferidas como baseline.\",\n \"templateMeta\": {\n \"registryKey\": \"praxis-crud\",\n \"defaultVariantId\": \"table\",\n \"variants\": [\n {\n \"id\": \"table\",\n \"registryKey\": \"praxis-crud\",\n \"variantId\": \"table\",\n \"aiDescription\": \"CRUD table configuration only.\",\n \"tags\": [\n \"table\",\n \"crud\"\n ],\n \"useWhen\": \"user asks to change table columns or behavior inside CRUD\",\n \"examplePrompts\": [\n \"adjust the columns shown in the crud table\",\n \"enable selection in the crud table\"\n ]\n },\n {\n \"id\": \"form\",\n \"registryKey\": \"praxis-crud\",\n \"variantId\": \"form\",\n \"aiDescription\": \"CRUD form configuration only.\",\n \"tags\": [\n \"form\",\n \"crud\"\n ],\n \"useWhen\": \"user asks to change form layout or fields in CRUD\",\n \"examplePrompts\": [\n \"add a new field to the crud form\",\n \"update validation rules in the form\"\n ]\n },\n {\n \"id\": \"actions\",\n \"registryKey\": \"praxis-crud\",\n \"variantId\": \"actions\",\n \"aiDescription\": \"CRUD actions and modal behavior.\",\n \"tags\": [\n \"actions\",\n \"crud\"\n ],\n \"useWhen\": \"user asks to change CRUD actions or routes\",\n \"examplePrompts\": [\n \"add a custom action to archive records\",\n \"change the edit action to open a route\"\n ]\n }\n ]\n },\n \"component\": \"praxis-crud\",\n \"resource\": {\n \"path\": \"/api/employees\",\n \"idField\": \"id\",\n \"endpointKey\": \"employees\"\n },\n \"defaults\": {\n \"openMode\": \"modal\",\n \"modal\": {\n \"width\": \"860px\",\n \"maxWidth\": \"95vw\",\n \"panelClass\": \"crud-dialog\",\n \"backdropStyle\": \"blur\",\n \"autoFocus\": true,\n \"restoreFocus\": true\n },\n \"back\": {\n \"strategy\": \"auto\",\n \"returnTo\": \"/employees\",\n \"confirmOnDirty\": true\n },\n \"header\": {\n \"showBack\": true,\n \"backLabel\": \"Voltar\",\n \"variant\": \"outlined\",\n \"sticky\": true,\n \"breadcrumbs\": true,\n \"divider\": true\n }\n },\n \"actions\": [\n {\n \"id\": \"create\",\n \"label\": \"Novo colaborador\",\n \"icon\": \"add\",\n \"action\": \"create\",\n \"openMode\": \"modal\"\n },\n {\n \"id\": \"view\",\n \"label\": \"Visualizar\",\n \"icon\": \"visibility\",\n \"action\": \"view\",\n \"openMode\": \"modal\"\n },\n {\n \"id\": \"edit\",\n \"label\": \"Editar\",\n \"icon\": \"edit\",\n \"action\": \"edit\",\n \"openMode\": \"modal\"\n },\n {\n \"id\": \"delete\",\n \"label\": \"Excluir\",\n \"icon\": \"delete\",\n \"action\": \"delete\"\n },\n {\n \"id\": \"edit-route\",\n \"label\": \"Editar na rota\",\n \"icon\": \"open_in_new\",\n \"action\": \"edit-route\",\n \"openMode\": \"route\",\n \"route\": \"/employees/:id/edit\",\n \"params\": [\n {\n \"from\": \"id\",\n \"to\": \"routeParam\",\n \"name\": \"id\"\n },\n {\n \"from\": \"name\",\n \"to\": \"query\",\n \"name\": \"name\"\n }\n ],\n \"back\": {\n \"strategy\": \"navigate\",\n \"returnTo\": \"/employees\"\n }\n }\n ],\n \"table\": {\n \"meta\": {\n \"version\": \"2.0.0\",\n \"id\": \"employees-table\",\n \"name\": \"Colaboradores\",\n \"description\": \"Listagem de colaboradores ativos e inativos\",\n \"idField\": \"id\"\n },\n \"columns\": [\n {\n \"field\": \"id\",\n \"header\": \"ID\",\n \"type\": \"string\",\n \"width\": \"80px\",\n \"visible\": false\n },\n {\n \"field\": \"name\",\n \"header\": \"Nome\",\n \"type\": \"string\",\n \"sortable\": true,\n \"filterable\": true,\n \"resizable\": true,\n \"sticky\": \"start\"\n },\n {\n \"field\": \"email\",\n \"header\": \"Email\",\n \"type\": \"string\",\n \"sortable\": true,\n \"filterable\": true\n },\n {\n \"field\": \"status\",\n \"header\": \"Status\",\n \"type\": \"string\",\n \"sortable\": true,\n \"filterable\": true,\n \"valueMapping\": {\n \"ACTIVE\": \"Ativo\",\n \"INACTIVE\": \"Inativo\",\n \"ON_LEAVE\": \"Afastado\"\n },\n \"renderer\": {\n \"type\": \"badge\",\n \"badge\": {\n \"textField\": \"statusLabel\",\n \"color\": \"success\",\n \"variant\": \"filled\"\n }\n },\n \"conditionalRenderers\": [\n {\n \"condition\": {\n \"==\": [\n {\n \"var\": \"status\"\n },\n \"INACTIVE\"\n ]\n },\n \"renderer\": {\n \"type\": \"badge\",\n \"badge\": {\n \"text\": \"Inativo\",\n \"color\": \"warn\",\n \"variant\": \"filled\"\n }\n },\n \"description\": \"Status inativo\",\n \"enabled\": true\n },\n {\n \"condition\": {\n \"==\": [\n {\n \"var\": \"status\"\n },\n \"ON_LEAVE\"\n ]\n },\n \"renderer\": {\n \"type\": \"chip\",\n \"chip\": {\n \"text\": \"Afastado\",\n \"color\": \"accent\",\n \"variant\": \"outlined\"\n }\n },\n \"description\": \"Status afastado\",\n \"enabled\": true\n }\n ]\n },\n {\n \"field\": \"hireDate\",\n \"header\": \"Admissao\",\n \"type\": \"date\",\n \"format\": \"dd/MM/yyyy\",\n \"sortable\": true,\n \"filterable\": true\n },\n {\n \"field\": \"salary\",\n \"header\": \"Salario\",\n \"type\": \"currency\",\n \"format\": \"BRL|symbol|2\",\n \"align\": \"right\",\n \"sortable\": true,\n \"filterable\": true\n }\n ],\n \"toolbar\": {\n \"visible\": true,\n \"position\": \"top\",\n \"title\": \"Colaboradores\",\n \"subtitle\": \"Gerencie cadastro, status e remuneracao\",\n \"layout\": {\n \"alignment\": \"space-between\",\n \"showSeparator\": true\n },\n \"actions\": [\n {\n \"id\": \"create\",\n \"label\": \"Novo\",\n \"icon\": \"add\",\n \"type\": \"button\",\n \"color\": \"primary\",\n \"position\": \"end\",\n \"action\": \"create\"\n },\n {\n \"id\": \"export\",\n \"label\": \"Exportar\",\n \"icon\": \"download\",\n \"type\": \"menu\",\n \"position\": \"end\",\n \"action\": \"export\",\n \"children\": [\n {\n \"id\": \"export-csv\",\n \"label\": \"CSV\",\n \"icon\": \"table_view\",\n \"type\": \"button\",\n \"position\": \"end\",\n \"action\": \"exportCsv\"\n },\n {\n \"id\": \"export-excel\",\n \"label\": \"Excel\",\n \"icon\": \"grid_on\",\n \"type\": \"button\",\n \"position\": \"end\",\n \"action\": \"exportExcel\"\n }\n ]\n }\n ],\n \"filters\": {\n \"enabled\": true,\n \"showAdvancedButton\": true\n },\n \"settingsMenu\": {\n \"enabled\": true,\n \"options\": [\n {\n \"id\": \"density\",\n \"label\": \"Densidade\",\n \"type\": \"select\",\n \"options\": [\n \"compact\",\n \"comfortable\",\n \"spacious\"\n ]\n }\n ]\n }\n },\n \"behavior\": {\n \"pagination\": {\n \"enabled\": true,\n \"pageSize\": 20,\n \"pageSizeOptions\": [\n 10,\n 20,\n 50\n ],\n \"showFirstLastButtons\": true,\n \"showPageNumbers\": true,\n \"showPageInfo\": true,\n \"position\": \"bottom\",\n \"style\": \"default\",\n \"strategy\": \"server\"\n },\n \"sorting\": {\n \"enabled\": true,\n \"defaultSort\": {\n \"column\": \"name\",\n \"direction\": \"asc\"\n },\n \"multiSort\": false,\n \"strategy\": \"server\",\n \"showSortIndicators\": true,\n \"indicatorPosition\": \"end\",\n \"allowClearSort\": true\n },\n \"filtering\": {\n \"enabled\": true,\n \"columnFilters\": {\n \"enabled\": true,\n \"defaultType\": \"text\",\n \"position\": \"header\"\n },\n \"advancedFilters\": {\n \"enabled\": true,\n \"queryBuilder\": true,\n \"savePresets\": true\n },\n \"strategy\": \"server\",\n \"debounceTime\": 300\n },\n \"selection\": {\n \"enabled\": true,\n \"type\": \"multiple\",\n \"mode\": \"checkbox\",\n \"allowSelectAll\": true,\n \"checkboxPosition\": \"start\",\n \"persistSelection\": false,\n \"persistOnDataUpdate\": false\n },\n \"interaction\": {\n \"rowClick\": {\n \"enabled\": true,\n \"action\": \"view\"\n },\n \"rowDoubleClick\": {\n \"enabled\": true,\n \"action\": \"edit\"\n },\n \"hover\": {\n \"enabled\": true,\n \"highlightRow\": true,\n \"showActionsOnHover\": true\n },\n \"keyboard\": {\n \"enabled\": true\n }\n }\n },\n \"actions\": {\n \"row\": {\n \"enabled\": true,\n \"position\": \"end\",\n \"display\": \"icons\",\n \"trigger\": \"hover\",\n \"width\": \"140px\",\n \"actions\": [\n {\n \"id\": \"view\",\n \"label\": \"Ver\",\n \"icon\": \"visibility\",\n \"action\": \"view\"\n },\n {\n \"id\": \"edit\",\n \"label\": \"Editar\",\n \"icon\": \"edit\",\n \"action\": \"edit\"\n },\n {\n \"id\": \"delete\",\n \"label\": \"Excluir\",\n \"icon\": \"delete\",\n \"action\": \"delete\",\n \"requiresConfirmation\": true\n }\n ],\n \"header\": {\n \"label\": \"Acoes\",\n \"align\": \"center\"\n }\n },\n \"bulk\": {\n \"enabled\": true,\n \"position\": \"toolbar\",\n \"actions\": [\n {\n \"id\": \"bulk-delete\",\n \"label\": \"Excluir selecionados\",\n \"icon\": \"delete\",\n \"action\": \"deleteSelected\",\n \"requiresConfirmation\": true,\n \"minSelections\": 1\n }\n ],\n \"floating\": {\n \"position\": \"bottom-right\",\n \"hideWhenEmpty\": true\n }\n },\n \"confirmations\": {\n \"default\": {\n \"title\": \"Confirmar acao\",\n \"message\": \"Deseja continuar?\",\n \"confirmText\": \"Confirmar\",\n \"cancelText\": \"Cancelar\"\n },\n \"specific\": {\n \"delete\": {\n \"title\": \"Excluir colaborador\",\n \"message\": \"Esta acao nao pode ser desfeita.\",\n \"confirmText\": \"Excluir\",\n \"cancelText\": \"Cancelar\"\n }\n }\n }\n },\n \"export\": {\n \"enabled\": true,\n \"formats\": [\n \"csv\",\n \"excel\"\n ],\n \"general\": {\n \"includeHeaders\": true,\n \"respectFilters\": true,\n \"applyFormatting\": true,\n \"defaultFileName\": \"colaboradores\",\n \"includeColumns\": [\n \"id\",\n \"name\",\n \"email\",\n \"status\",\n \"hireDate\",\n \"salary\"\n ]\n },\n \"excel\": {\n \"sheetName\": \"Colaboradores\",\n \"includeFormulas\": false,\n \"freezeHeaders\": true,\n \"autoFitColumns\": true\n },\n \"csv\": {\n \"delimiter\": \";\",\n \"escapeChar\": \"\\\"\",\n \"encoding\": \"utf-8\",\n \"includeBOM\": true\n }\n },\n \"messages\": {\n \"states\": {\n \"loading\": \"Carregando colaboradores...\",\n \"empty\": \"Nenhum colaborador encontrado.\",\n \"error\": \"Erro ao carregar dados.\",\n \"noResults\": \"Sem resultados para o filtro atual.\",\n \"loadingMore\": \"Carregando mais registros...\"\n },\n \"actions\": {\n \"confirmations\": {\n \"delete\": \"Excluir este colaborador?\",\n \"deleteMultiple\": \"Excluir os colaboradores selecionados?\",\n \"save\": \"Salvar alteracoes?\",\n \"cancel\": \"Cancelar edicao?\",\n \"export\": \"Exportar dados agora?\"\n },\n \"success\": {\n \"save\": \"Colaborador salvo com sucesso.\",\n \"delete\": \"Colaborador excluido.\",\n \"export\": \"Exportacao concluida.\"\n },\n \"errors\": {\n \"save\": \"Falha ao salvar.\",\n \"delete\": \"Falha ao excluir.\",\n \"export\": \"Falha ao exportar.\"\n }\n }\n },\n \"localization\": {\n \"locale\": \"pt-BR\",\n \"direction\": \"ltr\",\n \"dateTime\": {\n \"dateFormat\": \"dd/MM/yyyy\",\n \"timeFormat\": \"HH:mm\",\n \"dateTimeFormat\": \"dd/MM/yyyy HH:mm\",\n \"firstDayOfWeek\": 1\n }\n },\n \"appearance\": {\n \"density\": \"comfortable\",\n \"borders\": {\n \"showRowBorders\": true,\n \"showColumnBorders\": false,\n \"showOuterBorder\": true,\n \"style\": \"solid\",\n \"width\": 1,\n \"color\": \"#e0e0e0\"\n }\n }\n },\n \"form\": {\n \"metadata\": {\n \"version\": \"2.0\",\n \"source\": \"local\",\n \"schemaId\": \"path:/api/employees#request\",\n \"schemaContext\": {\n \"path\": \"/api/employees\",\n \"operation\": \"POST\",\n \"schemaType\": \"request\",\n \"internal\": false,\n \"tenant\": \"default\",\n \"locale\": \"pt-BR\"\n }\n },\n \"api\": {\n \"saveEndpoint\": \"/api/employees\",\n \"loadEndpoint\": \"/api/employees/${id}\",\n \"saveMethod\": \"POST\",\n \"timeout\": 15000,\n \"headers\": {\n \"X-Module\": \"HR\"\n },\n \"idField\": \"id\",\n \"beforeSave\": \"sanitizeEmployee\",\n \"afterLoad\": \"mapEmployee\"\n },\n \"behavior\": {\n \"confirmOnUnsavedChanges\": true,\n \"trackHistory\": true,\n \"focusFirstError\": true,\n \"scrollToErrors\": true,\n \"clearAfterSave\": false,\n \"reactiveValidation\": true,\n \"reactiveValidationDebounceMs\": 200\n },\n \"messages\": {\n \"createRegistrySuccess\": \"Colaborador criado com sucesso.\",\n \"updateRegistrySuccess\": \"Colaborador atualizado com sucesso.\",\n \"createRegistryError\": \"Falha ao criar colaborador.\",\n \"updateRegistryError\": \"Falha ao atualizar colaborador.\",\n \"confirmations\": {\n \"submit\": \"Deseja salvar as alteracoes?\",\n \"cancel\": \"Descartar alteracoes?\",\n \"reset\": \"Limpar o formulario?\"\n },\n \"customActions\": {\n \"archive\": {\n \"confirmation\": \"Arquivar este colaborador?\"\n }\n },\n \"loading\": {\n \"submit\": \"Salvando...\",\n \"cancel\": \"Cancelando...\"\n }\n },\n \"hints\": {\n \"dataModes\": {\n \"create\": \"Preencha os dados para criar um novo colaborador.\",\n \"edit\": \"Atualize os dados e salve as alteracoes.\",\n \"view\": \"Visualize os dados do colaborador.\"\n },\n \"uiModes\": {\n \"presentation\": \"Modo apresentacao mostra somente leitura.\",\n \"readonly\": \"Modo leitura bloqueia edicao.\",\n \"disabled\": \"Campos desabilitados nao permitem interacao.\",\n \"visible\": \"Controle de visibilidade sem destruir controles.\"\n }\n },\n \"hooks\": {\n \"beforeSubmit\": [\n {\n \"id\": \"sanitize-employee\",\n \"priority\": 100,\n \"args\": {\n \"trimStrings\": true\n }\n }\n ],\n \"afterSubmit\": [\n {\n \"id\": \"notify-success\",\n \"args\": {\n \"messageKey\": \"employeeSaved\"\n }\n }\n ],\n \"onError\": [\n {\n \"id\": \"notify-error\",\n \"args\": {\n \"messageKey\": \"employeeSaveError\"\n }\n }\n ]\n },\n \"fieldMetadata\": [\n {\n \"name\": \"id\",\n \"label\": \"ID\",\n \"controlType\": \"numericTextBox\",\n \"dataType\": \"number\",\n \"hidden\": true,\n \"readOnly\": true,\n \"description\": \"Campo ID oculto, gerenciado pelo backend.\"\n },\n {\n \"name\": \"name\",\n \"label\": \"Nome completo\",\n \"controlType\": \"input\",\n \"dataType\": \"text\",\n \"placeholder\": \"Ex.: Ana Souza\",\n \"prefixIcon\": \"person\",\n \"validators\": {\n \"required\": true,\n \"minLength\": 3\n }\n },\n {\n \"name\": \"email\",\n \"label\": \"Email\",\n \"controlType\": \"email\",\n \"dataType\": \"email\",\n \"placeholder\": \"nome@empresa.com\",\n \"validators\": {\n \"required\": true,\n \"email\": true\n }\n },\n {\n \"name\": \"phone\",\n \"label\": \"Telefone\",\n \"controlType\": \"phone\",\n \"placeholder\": \"(11) 99999-0000\",\n \"mask\": \"(99) 99999-9999\"\n },\n {\n \"name\": \"status\",\n \"label\": \"Status\",\n \"controlType\": \"select\",\n \"options\": [\n {\n \"text\": \"Ativo\",\n \"value\": \"ACTIVE\"\n },\n {\n \"text\": \"Inativo\",\n \"value\": \"INACTIVE\"\n },\n {\n \"text\": \"Afastado\",\n \"value\": \"ON_LEAVE\"\n }\n ],\n \"defaultValue\": \"ACTIVE\",\n \"materialDesign\": {\n \"appearance\": \"outline\"\n }\n },\n {\n \"name\": \"hireDate\",\n \"label\": \"Data de admissao\",\n \"controlType\": \"date\",\n \"dataType\": \"date\"\n },\n {\n \"name\": \"terminationDate\",\n \"label\": \"Data de desligamento\",\n \"controlType\": \"date\",\n \"conditionalDisplay\": {\n \"==\": [\n {\n \"var\": \"status\"\n },\n \"INACTIVE\"\n ]\n },\n \"conditionalRequired\": {\n \"==\": [\n {\n \"var\": \"status\"\n },\n \"INACTIVE\"\n ]\n }\n },\n {\n \"name\": \"department\",\n \"label\": \"Departamento\",\n \"controlType\": \"select\",\n \"endpoint\": \"/api/departments\",\n \"valueField\": \"id\",\n \"displayField\": \"name\"\n },\n {\n \"name\": \"role\",\n \"label\": \"Cargo\",\n \"controlType\": \"select\",\n \"options\": [\n {\n \"text\": \"Analista\",\n \"value\": \"ANALYST\"\n },\n {\n \"text\": \"Coordenador\",\n \"value\": \"COORD\"\n },\n {\n \"text\": \"Gerente\",\n \"value\": \"MANAGER\"\n }\n ]\n },\n {\n \"name\": \"managerId\",\n \"label\": \"Gestor\",\n \"controlType\": \"autoComplete\",\n \"endpoint\": \"/api/employees?role=manager\",\n \"valueField\": \"id\",\n \"displayField\": \"name\",\n \"filterField\": \"name\"\n },\n {\n \"name\": \"salary\",\n \"label\": \"Salario\",\n \"controlType\": \"currency\",\n \"dataType\": \"number\",\n \"format\": \"BRL|symbol|2\",\n \"validators\": {\n \"min\": 0\n }\n },\n {\n \"name\": \"workMode\",\n \"label\": \"Regime\",\n \"controlType\": \"radio\",\n \"options\": [\n {\n \"text\": \"CLT\",\n \"value\": \"CLT\"\n },\n {\n \"text\": \"PJ\",\n \"value\": \"PJ\"\n },\n {\n \"text\": \"Estagio\",\n \"value\": \"INTERN\"\n }\n ],\n \"defaultValue\": \"CLT\"\n },\n {\n \"name\": \"notes\",\n \"label\": \"Observacoes\",\n \"controlType\": \"textarea\",\n \"validators\": {\n \"maxLength\": 500\n },\n \"hint\": \"Informacoes adicionais relevantes ao cadastro.\"\n },\n {\n \"name\": \"isActive\",\n \"label\": \"Ativo\",\n \"controlType\": \"toggle\",\n \"defaultValue\": true\n },\n {\n \"name\": \"avatar\",\n \"label\": \"Foto\",\n \"controlType\": \"upload\",\n \"accept\": \".png,.jpg,.jpeg\",\n \"multiple\": false,\n \"materialDesign\": {\n \"appearance\": \"outline\"\n }\n }\n ],\n \"sections\": [\n {\n \"id\": \"basic\",\n \"title\": \"Dados basicos\",\n \"description\": \"Informacoes pessoais e status.\",\n \"icon\": \"person\",\n \"collapsible\": true,\n \"collapsed\": false,\n \"titleStyle\": \"titleMedium\",\n \"descriptionStyle\": \"bodyMedium\",\n \"rows\": [\n {\n \"id\": \"row-basic-1\",\n \"columns\": [\n {\n \"id\": \"col-basic-1\",\n \"fields\": [\n \"name\",\n \"email\"\n ],\n \"span\": {\n \"md\": 6,\n \"lg\": 6\n },\n \"padding\": 8\n },\n {\n \"id\": \"col-basic-2\",\n \"fields\": [\n \"status\",\n \"hireDate\"\n ],\n \"span\": {\n \"md\": 6,\n \"lg\": 6\n }\n }\n ]\n },\n {\n \"id\": \"row-basic-2\",\n \"columns\": [\n {\n \"id\": \"col-basic-3\",\n \"fields\": [\n \"phone\",\n \"managerId\"\n ],\n \"span\": {\n \"md\": 6,\n \"lg\": 6\n }\n },\n {\n \"id\": \"col-basic-4\",\n \"fields\": [\n \"department\",\n \"role\"\n ],\n \"span\": {\n \"md\": 6,\n \"lg\": 6\n }\n }\n ]\n }\n ]\n },\n {\n \"id\": \"employment\",\n \"title\": \"Contrato\",\n \"icon\": \"badge\",\n \"rows\": [\n {\n \"id\": \"row-employment-1\",\n \"columns\": [\n {\n \"id\": \"col-employment-1\",\n \"fields\": [\n \"salary\",\n \"workMode\"\n ],\n \"span\": {\n \"md\": 6,\n \"lg\": 6\n }\n },\n {\n \"id\": \"col-employment-2\",\n \"fields\": [\n \"terminationDate\",\n \"notes\"\n ],\n \"span\": {\n \"md\": 6,\n \"lg\": 6\n }\n }\n ]\n }\n ]\n },\n {\n \"id\": \"attachments\",\n \"title\": \"Arquivos\",\n \"collapsible\": true,\n \"collapsed\": true,\n \"rows\": [\n {\n \"id\": \"row-attachments-1\",\n \"columns\": [\n {\n \"id\": \"col-attachments-1\",\n \"fields\": [\n \"avatar\"\n ],\n \"span\": {\n \"md\": 12,\n \"lg\": 12\n },\n \"align\": \"center\"\n }\n ]\n }\n ]\n }\n ],\n \"actions\": {\n \"submit\": {\n \"visible\": true,\n \"label\": \"Salvar\",\n \"color\": \"primary\",\n \"variant\": \"raised\",\n \"type\": \"submit\",\n \"shortcut\": \"Ctrl+S\"\n },\n \"cancel\": {\n \"visible\": true,\n \"label\": \"Cancelar\",\n \"type\": \"button\"\n },\n \"reset\": {\n \"visible\": true,\n \"label\": \"Limpar\",\n \"type\": \"reset\"\n },\n \"custom\": [\n {\n \"id\": \"archive\",\n \"visible\": true,\n \"label\": \"Arquivar\",\n \"icon\": \"archive\",\n \"color\": \"warn\",\n \"variant\": \"stroked\",\n \"action\": \"archive\"\n }\n ],\n \"position\": \"right\",\n \"orientation\": \"horizontal\",\n \"spacing\": \"normal\",\n \"sticky\": true,\n \"divider\": true,\n \"placement\": \"afterSections\",\n \"mobile\": {\n \"position\": \"center\",\n \"orientation\": \"vertical\",\n \"collapseToMenu\": true\n }\n },\n \"formRules\": [\n {\n \"id\": \"hide-salary-inactive\",\n \"name\": \"Ocultar salario para inativos\",\n \"targetType\": \"field\",\n \"targets\": [\n \"salary\"\n ],\n \"effect\": {\n \"condition\": {\n \"==\": [\n {\n \"var\": \"status\"\n },\n \"INACTIVE\"\n ]\n },\n \"properties\": {\n \"visible\": false\n }\n }\n },\n {\n \"id\": \"require-termination-date\",\n \"name\": \"Exigir data de desligamento\",\n \"targetType\": \"field\",\n \"targets\": [\n \"terminationDate\"\n ],\n \"effect\": {\n \"condition\": {\n \"==\": [\n {\n \"var\": \"status\"\n },\n \"INACTIVE\"\n ]\n },\n \"properties\": {\n \"required\": true,\n \"visible\": true\n }\n }\n }\n ]\n },\n \"i18n\": {\n \"crudDialog\": {\n \"createTitle\": \"Novo colaborador\",\n \"editTitle\": \"Editar colaborador\",\n \"viewTitle\": \"Detalhes do colaborador\",\n \"deleteTitle\": \"Confirmar exclusao\",\n \"deleteConfirm\": \"Tem certeza que deseja excluir este colaborador?\"\n }\n }\n}\n",
|
|
2720
2720
|
"sourcePointer": "praxis-ui-angular/examples/ai-recipes/praxis-crud.json",
|
|
2721
|
-
"contentHash": "
|
|
2721
|
+
"contentHash": "06e59c307b678f36ea3defd5575431711bde03ab88ec6d964b30fed6b9010424",
|
|
2722
2722
|
"sourceKind": "component_definition",
|
|
2723
2723
|
"sourceId": "praxis-crud",
|
|
2724
2724
|
"corpusVersion": "1.0.0"
|
|
@@ -2726,9 +2726,9 @@
|
|
|
2726
2726
|
{
|
|
2727
2727
|
"chunkIndex": 7,
|
|
2728
2728
|
"chunkKind": "recipe",
|
|
2729
|
-
"content": "{\n \"_comment\": \"Variant focused on CRUD table configuration.\",\n \"templateMeta\": {\n \"variantId\": \"table\",\n \"variantOf\": \"praxis-crud\",\n \"registryKey\": \"praxis-crud\",\n \"tags\": [\n \"table\",\n \"crud\"\n ],\n \"useWhen\": \"user asks to change table columns or behavior inside CRUD\",\n \"examplePrompts\": [\n \"adjust the columns shown in the crud table\",\n \"enable selection in the crud table\"\n ]\n },\n \"resource\": {\n \"path\": \"/api/employees\",\n \"idField\": \"id\",\n \"endpointKey\": \"employees\"\n },\n \"table\": {\n \"meta\": {\n \"version\": \"2.0.0\",\n \"id\": \"employees-table\",\n \"name\": \"Colaboradores\",\n \"description\": \"Listagem de colaboradores ativos e inativos\",\n \"idField\": \"id\"\n },\n \"columns\": [\n {\n \"field\": \"id\",\n \"header\": \"ID\",\n \"type\": \"string\",\n \"width\": \"80px\",\n \"visible\": false\n },\n {\n \"field\": \"name\",\n \"header\": \"Nome\",\n \"type\": \"string\",\n \"sortable\": true,\n \"filterable\": true,\n \"resizable\": true,\n \"sticky\": \"start\"\n },\n {\n \"field\": \"email\",\n \"header\": \"Email\",\n \"type\": \"string\",\n \"sortable\": true,\n \"filterable\": true\n },\n {\n \"field\": \"status\",\n \"header\": \"Status\",\n \"type\": \"string\",\n \"sortable\": true,\n \"filterable\": true,\n \"valueMapping\": {\n \"ACTIVE\": \"Ativo\",\n \"INACTIVE\": \"Inativo\",\n \"ON_LEAVE\": \"Afastado\"\n },\n \"renderer\": {\n \"type\": \"badge\",\n \"badge\": {\n \"textField\": \"statusLabel\",\n \"color\": \"success\",\n \"variant\": \"filled\"\n }\n },\n \"conditionalRenderers\": [\n {\n \"condition\": \"status == 'INACTIVE'\",\n \"renderer\": {\n \"type\": \"badge\",\n \"badge\": {\n \"text\": \"Inativo\",\n \"color\": \"warn\",\n \"variant\": \"filled\"\n }\n },\n \"description\": \"Status inativo\",\n \"enabled\": true\n },\n {\n \"condition\": \"status == 'ON_LEAVE'\",\n \"renderer\": {\n \"type\": \"chip\",\n \"chip\": {\n \"text\": \"Afastado\",\n \"color\": \"accent\",\n \"variant\": \"outlined\"\n }\n },\n \"description\": \"Status afastado\",\n \"enabled\": true\n }\n ]\n },\n {\n \"field\": \"hireDate\",\n \"header\": \"Admissao\",\n \"type\": \"date\",\n \"format\": \"dd/MM/yyyy\",\n \"sortable\": true,\n \"filterable\": true\n },\n {\n \"field\": \"salary\",\n \"header\": \"Salario\",\n \"type\": \"currency\",\n \"format\": \"BRL|symbol|2\",\n \"align\": \"right\",\n \"sortable\": true,\n \"filterable\": true\n }\n ],\n \"toolbar\": {\n \"visible\": true,\n \"position\": \"top\",\n \"title\": \"Colaboradores\",\n \"subtitle\": \"Gerencie cadastro, status e remuneracao\",\n \"layout\": {\n \"alignment\": \"space-between\",\n \"showSeparator\": true\n },\n \"actions\": [\n {\n \"id\": \"create\",\n \"label\": \"Novo\",\n \"icon\": \"add\",\n \"type\": \"button\",\n \"color\": \"primary\",\n \"position\": \"end\",\n \"action\": \"create\"\n },\n {\n \"id\": \"export\",\n \"label\": \"Exportar\",\n \"icon\": \"download\",\n \"type\": \"menu\",\n \"position\": \"end\",\n \"action\": \"export\",\n \"children\": [\n {\n \"id\": \"export-csv\",\n \"label\": \"CSV\",\n \"icon\": \"table_view\",\n \"type\": \"button\",\n \"position\": \"end\",\n \"action\": \"exportCsv\"\n },\n {\n \"id\": \"export-excel\",\n \"label\": \"Excel\",\n \"icon\": \"grid_on\",\n \"type\": \"button\",\n \"position\": \"end\",\n \"action\": \"exportExcel\"\n }\n ]\n }\n ],\n \"filters\": {\n \"enabled\": true,\n \"showAdvancedButton\": true\n },\n \"settingsMenu\": {\n \"enabled\": true,\n \"options\": [\n {\n \"id\": \"density\",\n \"label\": \"Densidade\",\n \"type\": \"select\",\n \"options\": [\n \"compact\",\n \"comfortable\",\n \"spacious\"\n ]\n }\n ]\n }\n },\n \"behavior\": {\n \"pagination\": {\n \"enabled\": true,\n \"pageSize\": 20,\n \"pageSizeOptions\": [\n 10,\n 20,\n 50\n ],\n \"showFirstLastButtons\": true,\n \"showPageNumbers\": true,\n \"showPageInfo\": true,\n \"position\": \"bottom\",\n \"style\": \"default\",\n \"strategy\": \"server\"\n },\n \"sorting\": {\n \"enabled\": true,\n \"defaultSort\": {\n \"column\": \"name\",\n \"direction\": \"asc\"\n },\n \"multiSort\": false,\n \"strategy\": \"server\",\n \"showSortIndicators\": true,\n \"indicatorPosition\": \"end\",\n \"allowClearSort\": true\n },\n \"filtering\": {\n \"enabled\": true,\n \"columnFilters\": {\n \"enabled\": true,\n \"defaultType\": \"text\",\n \"position\": \"header\"\n },\n \"advancedFilters\": {\n \"enabled\": true,\n \"queryBuilder\": true,\n \"savePresets\": true\n },\n \"strategy\": \"server\",\n \"debounceTime\": 300\n },\n \"selection\": {\n \"enabled\": true,\n \"type\": \"multiple\",\n \"mode\": \"checkbox\",\n \"allowSelectAll\": true,\n \"checkboxPosition\": \"start\",\n \"persistSelection\": false,\n \"persistOnDataUpdate\": false\n },\n \"interaction\": {\n \"rowClick\": {\n \"enabled\": true,\n \"action\": \"view\"\n },\n \"rowDoubleClick\": {\n \"enabled\": true,\n \"action\": \"edit\"\n },\n \"hover\": {\n \"enabled\": true,\n \"highlightRow\": true,\n \"showActionsOnHover\": true\n },\n \"keyboard\": {\n \"enabled\": true\n }\n }\n },\n \"actions\": {\n \"row\": {\n \"enabled\": true,\n \"position\": \"end\",\n \"display\": \"icons\",\n \"trigger\": \"hover\",\n \"width\": \"140px\",\n \"actions\": [\n {\n \"id\": \"view\",\n \"label\": \"Ver\",\n \"icon\": \"visibility\",\n \"action\": \"view\"\n },\n {\n \"id\": \"edit\",\n \"label\": \"Editar\",\n \"icon\": \"edit\",\n \"action\": \"edit\"\n },\n {\n \"id\": \"delete\",\n \"label\": \"Excluir\",\n \"icon\": \"delete\",\n \"action\": \"delete\",\n \"requiresConfirmation\": true\n }\n ],\n \"header\": {\n \"label\": \"Acoes\",\n \"align\": \"center\"\n }\n },\n \"bulk\": {\n \"enabled\": true,\n \"position\": \"toolbar\",\n \"actions\": [\n {\n \"id\": \"bulk-delete\",\n \"label\": \"Excluir selecionados\",\n \"icon\": \"delete\",\n \"action\": \"deleteSelected\",\n \"requiresConfirmation\": true,\n \"minSelections\": 1\n }\n ],\n \"floating\": {\n \"position\": \"bottom-right\",\n \"hideWhenEmpty\": true\n }\n },\n \"confirmations\": {\n \"default\": {\n \"title\": \"Confirmar acao\",\n \"message\": \"Deseja continuar?\",\n \"confirmText\": \"Confirmar\",\n \"cancelText\": \"Cancelar\"\n },\n \"specific\": {\n \"delete\": {\n \"title\": \"Excluir colaborador\",\n \"message\": \"Esta acao nao pode ser desfeita.\",\n \"confirmText\": \"Excluir\",\n \"cancelText\": \"Cancelar\"\n }\n }\n }\n },\n \"export\": {\n \"enabled\": true,\n \"formats\": [\n \"csv\",\n \"excel\"\n ],\n \"general\": {\n \"includeHeaders\": true,\n \"respectFilters\": true,\n \"applyFormatting\": true,\n \"defaultFileName\": \"colaboradores\",\n \"includeColumns\": [\n \"id\",\n \"name\",\n \"email\",\n \"status\",\n \"hireDate\",\n \"salary\"\n ]\n },\n \"excel\": {\n \"sheetName\": \"Colaboradores\",\n \"includeFormulas\": false,\n \"freezeHeaders\": true,\n \"autoFitColumns\": true\n },\n \"csv\": {\n \"delimiter\": \";\",\n \"escapeChar\": \"\\\"\",\n \"encoding\": \"utf-8\",\n \"includeBOM\": true\n }\n },\n \"messages\": {\n \"states\": {\n \"loading\": \"Carregando colaboradores...\",\n \"empty\": \"Nenhum colaborador encontrado.\",\n \"error\": \"Erro ao carregar dados.\",\n \"noResults\": \"Sem resultados para o filtro atual.\",\n \"loadingMore\": \"Carregando mais registros...\"\n },\n \"actions\": {\n \"confirmations\": {\n \"delete\": \"Excluir este colaborador?\",\n \"deleteMultiple\": \"Excluir os colaboradores selecionados?\",\n \"save\": \"Salvar alteracoes?\",\n \"cancel\": \"Cancelar edicao?\",\n \"export\": \"Exportar dados agora?\"\n },\n \"success\": {\n \"save\": \"Colaborador salvo com sucesso.\",\n \"delete\": \"Colaborador excluido.\",\n \"export\": \"Exportacao concluida.\"\n },\n \"errors\": {\n \"save\": \"Falha ao salvar.\",\n \"delete\": \"Falha ao excluir.\",\n \"export\": \"Falha ao exportar.\"\n }\n }\n },\n \"localization\": {\n \"locale\": \"pt-BR\",\n \"direction\": \"ltr\",\n \"dateTime\": {\n \"dateFormat\": \"dd/MM/yyyy\",\n \"timeFormat\": \"HH:mm\",\n \"dateTimeFormat\": \"dd/MM/yyyy HH:mm\",\n \"firstDayOfWeek\": 1\n }\n },\n \"appearance\": {\n \"density\": \"comfortable\",\n \"borders\": {\n \"showRowBorders\": true,\n \"showColumnBorders\": false,\n \"showOuterBorder\": true,\n \"style\": \"solid\",\n \"width\": 1,\n \"color\": \"#e0e0e0\"\n }\n }\n }\n}\n",
|
|
2729
|
+
"content": "{\n \"_comment\": \"Variant focused on CRUD table configuration.\",\n \"templateMeta\": {\n \"variantId\": \"table\",\n \"variantOf\": \"praxis-crud\",\n \"registryKey\": \"praxis-crud\",\n \"tags\": [\n \"table\",\n \"crud\"\n ],\n \"useWhen\": \"user asks to change table columns or behavior inside CRUD\",\n \"examplePrompts\": [\n \"adjust the columns shown in the crud table\",\n \"enable selection in the crud table\"\n ]\n },\n \"resource\": {\n \"path\": \"/api/employees\",\n \"idField\": \"id\",\n \"endpointKey\": \"employees\"\n },\n \"table\": {\n \"meta\": {\n \"version\": \"2.0.0\",\n \"id\": \"employees-table\",\n \"name\": \"Colaboradores\",\n \"description\": \"Listagem de colaboradores ativos e inativos\",\n \"idField\": \"id\"\n },\n \"columns\": [\n {\n \"field\": \"id\",\n \"header\": \"ID\",\n \"type\": \"string\",\n \"width\": \"80px\",\n \"visible\": false\n },\n {\n \"field\": \"name\",\n \"header\": \"Nome\",\n \"type\": \"string\",\n \"sortable\": true,\n \"filterable\": true,\n \"resizable\": true,\n \"sticky\": \"start\"\n },\n {\n \"field\": \"email\",\n \"header\": \"Email\",\n \"type\": \"string\",\n \"sortable\": true,\n \"filterable\": true\n },\n {\n \"field\": \"status\",\n \"header\": \"Status\",\n \"type\": \"string\",\n \"sortable\": true,\n \"filterable\": true,\n \"valueMapping\": {\n \"ACTIVE\": \"Ativo\",\n \"INACTIVE\": \"Inativo\",\n \"ON_LEAVE\": \"Afastado\"\n },\n \"renderer\": {\n \"type\": \"badge\",\n \"badge\": {\n \"textField\": \"statusLabel\",\n \"color\": \"success\",\n \"variant\": \"filled\"\n }\n },\n \"conditionalRenderers\": [\n {\n \"condition\": {\n \"==\": [\n {\n \"var\": \"status\"\n },\n \"INACTIVE\"\n ]\n },\n \"renderer\": {\n \"type\": \"badge\",\n \"badge\": {\n \"text\": \"Inativo\",\n \"color\": \"warn\",\n \"variant\": \"filled\"\n }\n },\n \"description\": \"Status inativo\",\n \"enabled\": true\n },\n {\n \"condition\": {\n \"==\": [\n {\n \"var\": \"status\"\n },\n \"ON_LEAVE\"\n ]\n },\n \"renderer\": {\n \"type\": \"chip\",\n \"chip\": {\n \"text\": \"Afastado\",\n \"color\": \"accent\",\n \"variant\": \"outlined\"\n }\n },\n \"description\": \"Status afastado\",\n \"enabled\": true\n }\n ]\n },\n {\n \"field\": \"hireDate\",\n \"header\": \"Admissao\",\n \"type\": \"date\",\n \"format\": \"dd/MM/yyyy\",\n \"sortable\": true,\n \"filterable\": true\n },\n {\n \"field\": \"salary\",\n \"header\": \"Salario\",\n \"type\": \"currency\",\n \"format\": \"BRL|symbol|2\",\n \"align\": \"right\",\n \"sortable\": true,\n \"filterable\": true\n }\n ],\n \"toolbar\": {\n \"visible\": true,\n \"position\": \"top\",\n \"title\": \"Colaboradores\",\n \"subtitle\": \"Gerencie cadastro, status e remuneracao\",\n \"layout\": {\n \"alignment\": \"space-between\",\n \"showSeparator\": true\n },\n \"actions\": [\n {\n \"id\": \"create\",\n \"label\": \"Novo\",\n \"icon\": \"add\",\n \"type\": \"button\",\n \"color\": \"primary\",\n \"position\": \"end\",\n \"action\": \"create\"\n },\n {\n \"id\": \"export\",\n \"label\": \"Exportar\",\n \"icon\": \"download\",\n \"type\": \"menu\",\n \"position\": \"end\",\n \"action\": \"export\",\n \"children\": [\n {\n \"id\": \"export-csv\",\n \"label\": \"CSV\",\n \"icon\": \"table_view\",\n \"type\": \"button\",\n \"position\": \"end\",\n \"action\": \"exportCsv\"\n },\n {\n \"id\": \"export-excel\",\n \"label\": \"Excel\",\n \"icon\": \"grid_on\",\n \"type\": \"button\",\n \"position\": \"end\",\n \"action\": \"exportExcel\"\n }\n ]\n }\n ],\n \"filters\": {\n \"enabled\": true,\n \"showAdvancedButton\": true\n },\n \"settingsMenu\": {\n \"enabled\": true,\n \"options\": [\n {\n \"id\": \"density\",\n \"label\": \"Densidade\",\n \"type\": \"select\",\n \"options\": [\n \"compact\",\n \"comfortable\",\n \"spacious\"\n ]\n }\n ]\n }\n },\n \"behavior\": {\n \"pagination\": {\n \"enabled\": true,\n \"pageSize\": 20,\n \"pageSizeOptions\": [\n 10,\n 20,\n 50\n ],\n \"showFirstLastButtons\": true,\n \"showPageNumbers\": true,\n \"showPageInfo\": true,\n \"position\": \"bottom\",\n \"style\": \"default\",\n \"strategy\": \"server\"\n },\n \"sorting\": {\n \"enabled\": true,\n \"defaultSort\": {\n \"column\": \"name\",\n \"direction\": \"asc\"\n },\n \"multiSort\": false,\n \"strategy\": \"server\",\n \"showSortIndicators\": true,\n \"indicatorPosition\": \"end\",\n \"allowClearSort\": true\n },\n \"filtering\": {\n \"enabled\": true,\n \"columnFilters\": {\n \"enabled\": true,\n \"defaultType\": \"text\",\n \"position\": \"header\"\n },\n \"advancedFilters\": {\n \"enabled\": true,\n \"queryBuilder\": true,\n \"savePresets\": true\n },\n \"strategy\": \"server\",\n \"debounceTime\": 300\n },\n \"selection\": {\n \"enabled\": true,\n \"type\": \"multiple\",\n \"mode\": \"checkbox\",\n \"allowSelectAll\": true,\n \"checkboxPosition\": \"start\",\n \"persistSelection\": false,\n \"persistOnDataUpdate\": false\n },\n \"interaction\": {\n \"rowClick\": {\n \"enabled\": true,\n \"action\": \"view\"\n },\n \"rowDoubleClick\": {\n \"enabled\": true,\n \"action\": \"edit\"\n },\n \"hover\": {\n \"enabled\": true,\n \"highlightRow\": true,\n \"showActionsOnHover\": true\n },\n \"keyboard\": {\n \"enabled\": true\n }\n }\n },\n \"actions\": {\n \"row\": {\n \"enabled\": true,\n \"position\": \"end\",\n \"display\": \"icons\",\n \"trigger\": \"hover\",\n \"width\": \"140px\",\n \"actions\": [\n {\n \"id\": \"view\",\n \"label\": \"Ver\",\n \"icon\": \"visibility\",\n \"action\": \"view\"\n },\n {\n \"id\": \"edit\",\n \"label\": \"Editar\",\n \"icon\": \"edit\",\n \"action\": \"edit\"\n },\n {\n \"id\": \"delete\",\n \"label\": \"Excluir\",\n \"icon\": \"delete\",\n \"action\": \"delete\",\n \"requiresConfirmation\": true\n }\n ],\n \"header\": {\n \"label\": \"Acoes\",\n \"align\": \"center\"\n }\n },\n \"bulk\": {\n \"enabled\": true,\n \"position\": \"toolbar\",\n \"actions\": [\n {\n \"id\": \"bulk-delete\",\n \"label\": \"Excluir selecionados\",\n \"icon\": \"delete\",\n \"action\": \"deleteSelected\",\n \"requiresConfirmation\": true,\n \"minSelections\": 1\n }\n ],\n \"floating\": {\n \"position\": \"bottom-right\",\n \"hideWhenEmpty\": true\n }\n },\n \"confirmations\": {\n \"default\": {\n \"title\": \"Confirmar acao\",\n \"message\": \"Deseja continuar?\",\n \"confirmText\": \"Confirmar\",\n \"cancelText\": \"Cancelar\"\n },\n \"specific\": {\n \"delete\": {\n \"title\": \"Excluir colaborador\",\n \"message\": \"Esta acao nao pode ser desfeita.\",\n \"confirmText\": \"Excluir\",\n \"cancelText\": \"Cancelar\"\n }\n }\n }\n },\n \"export\": {\n \"enabled\": true,\n \"formats\": [\n \"csv\",\n \"excel\"\n ],\n \"general\": {\n \"includeHeaders\": true,\n \"respectFilters\": true,\n \"applyFormatting\": true,\n \"defaultFileName\": \"colaboradores\",\n \"includeColumns\": [\n \"id\",\n \"name\",\n \"email\",\n \"status\",\n \"hireDate\",\n \"salary\"\n ]\n },\n \"excel\": {\n \"sheetName\": \"Colaboradores\",\n \"includeFormulas\": false,\n \"freezeHeaders\": true,\n \"autoFitColumns\": true\n },\n \"csv\": {\n \"delimiter\": \";\",\n \"escapeChar\": \"\\\"\",\n \"encoding\": \"utf-8\",\n \"includeBOM\": true\n }\n },\n \"messages\": {\n \"states\": {\n \"loading\": \"Carregando colaboradores...\",\n \"empty\": \"Nenhum colaborador encontrado.\",\n \"error\": \"Erro ao carregar dados.\",\n \"noResults\": \"Sem resultados para o filtro atual.\",\n \"loadingMore\": \"Carregando mais registros...\"\n },\n \"actions\": {\n \"confirmations\": {\n \"delete\": \"Excluir este colaborador?\",\n \"deleteMultiple\": \"Excluir os colaboradores selecionados?\",\n \"save\": \"Salvar alteracoes?\",\n \"cancel\": \"Cancelar edicao?\",\n \"export\": \"Exportar dados agora?\"\n },\n \"success\": {\n \"save\": \"Colaborador salvo com sucesso.\",\n \"delete\": \"Colaborador excluido.\",\n \"export\": \"Exportacao concluida.\"\n },\n \"errors\": {\n \"save\": \"Falha ao salvar.\",\n \"delete\": \"Falha ao excluir.\",\n \"export\": \"Falha ao exportar.\"\n }\n }\n },\n \"localization\": {\n \"locale\": \"pt-BR\",\n \"direction\": \"ltr\",\n \"dateTime\": {\n \"dateFormat\": \"dd/MM/yyyy\",\n \"timeFormat\": \"HH:mm\",\n \"dateTimeFormat\": \"dd/MM/yyyy HH:mm\",\n \"firstDayOfWeek\": 1\n }\n },\n \"appearance\": {\n \"density\": \"comfortable\",\n \"borders\": {\n \"showRowBorders\": true,\n \"showColumnBorders\": false,\n \"showOuterBorder\": true,\n \"style\": \"solid\",\n \"width\": 1,\n \"color\": \"#e0e0e0\"\n }\n }\n }\n}\n",
|
|
2730
2730
|
"sourcePointer": "praxis-ui-angular/examples/ai-recipes/praxis-crud.table.json",
|
|
2731
|
-
"contentHash": "
|
|
2731
|
+
"contentHash": "cf2d27ab74a88936603ef2278f9666e25212438a5a625b27945d198eae6bccbd",
|
|
2732
2732
|
"sourceKind": "component_definition",
|
|
2733
2733
|
"sourceId": "praxis-crud",
|
|
2734
2734
|
"corpusVersion": "1.0.0"
|
|
@@ -5100,7 +5100,7 @@ class DynamicFormDialogHostComponent {
|
|
|
5100
5100
|
(formCancel)="onCancel()"
|
|
5101
5101
|
></praxis-dynamic-form>
|
|
5102
5102
|
</mat-dialog-content>
|
|
5103
|
-
`, isInline: true, styles: [":host{--dlg-header-h: 56px;--dlg-footer-h: 56px;--dlg-pad: 16px;display:flex;flex-direction:column;height:100%;overflow:hidden}:host([data-density=\"compact\"]){--dlg-header-h: 44px;--dlg-footer-h: 44px;--dlg-pad: 12px}.dialog-header{position:sticky;top:0;z-index:1;display:flex;align-items:center;gap:var(--dlg-pad);padding:0 var(--dlg-pad);height:var(--dlg-header-h);margin:0;background:var(--md-sys-color-surface-container-high);border-bottom:1px solid var(--md-sys-color-outline-variant);color:var(--md-sys-color-on-surface)}.dialog-title{margin:0;font:inherit;font-weight:600;color:var(--md-sys-color-on-surface)}.spacer{flex:1}.dialog-content{overflow:auto;padding:var(--dlg-pad);max-height:calc(100svh - var(--dlg-header-h) - 32px)}.dialog-header button.mat-icon-button{color:var(--md-sys-color-on-surface-variant)}.dialog-header button.mat-icon-button:hover{color:var(--md-sys-color-primary);background:var(--md-sys-color-primary-container)}.dialog-footer{position:sticky;bottom:0;z-index:1;padding:var(--dlg-pad)}\n"], dependencies: [{ kind: "ngmodule", type: MatDialogModule }, { kind: "directive", type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i6.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: PraxisIconDirective, selector: "mat-icon[praxisIcon]", inputs: ["praxisIcon"] }, { kind: "component", type: PraxisDynamicForm, selector: "praxis-dynamic-form", inputs: ["resourcePath", "resourceId", "initialValue", "editorialContext", "mode", "config", "actions", "schemaSource", "schemaUrl", "readUrl", "submitUrl", "submitMethod", "responseSchemaUrl", "apiEndpointKey", "apiUrlEntry", "enableCustomization", "showAiAssistant", "formId", "componentInstanceId", "configPersistenceStrategy", "layout", "generatedLayoutPreset", "layoutPolicy", "backConfig", "hooks", "removeEmptyContainersOnSave", "reactiveValidation", "reactiveValidationDebounceMs", "notifyIfOutdated", "snoozeMs", "autoOpenSettingsOnOutdated", "readonlyModeGlobal", "disabledModeGlobal", "presentationModeGlobal", "visibleGlobal", "domainRules", "customEndpoints"], outputs: ["formSubmit", "formCancel", "formReset", "configChange", "configPatchChange", "formReady", "valueChange", "syncCompleted", "initializationError", "loadingStateChange", "enableCustomizationChange", "customAction", "actionConfirmation", "schemaStatusChange", "fieldRenderError", "ruleDiagnosticsChange"] }] });
|
|
5103
|
+
`, isInline: true, styles: [":host{--dlg-header-h: 56px;--dlg-footer-h: 56px;--dlg-pad: 16px;display:flex;flex-direction:column;height:100%;overflow:hidden}:host([data-density=\"compact\"]){--dlg-header-h: 44px;--dlg-footer-h: 44px;--dlg-pad: 12px}.dialog-header{position:sticky;top:0;z-index:1;display:flex;align-items:center;gap:var(--dlg-pad);padding:0 var(--dlg-pad);height:var(--dlg-header-h);margin:0;background:var(--md-sys-color-surface-container-high);border-bottom:1px solid var(--md-sys-color-outline-variant);color:var(--md-sys-color-on-surface)}.dialog-title{margin:0;font:inherit;font-weight:600;color:var(--md-sys-color-on-surface)}.spacer{flex:1}.dialog-content{overflow:auto;padding:var(--dlg-pad);max-height:calc(100svh - var(--dlg-header-h) - 32px)}.dialog-header button.mat-icon-button{color:var(--md-sys-color-on-surface-variant)}.dialog-header button.mat-icon-button:hover{color:var(--md-sys-color-primary);background:var(--md-sys-color-primary-container)}.dialog-footer{position:sticky;bottom:0;z-index:1;padding:var(--dlg-pad)}\n"], dependencies: [{ kind: "ngmodule", type: MatDialogModule }, { kind: "directive", type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i6.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: PraxisIconDirective, selector: "mat-icon[praxisIcon]", inputs: ["praxisIcon"] }, { kind: "component", type: PraxisDynamicForm, selector: "praxis-dynamic-form", inputs: ["resourcePath", "resourceId", "initialValue", "editorialContext", "mode", "config", "actions", "schemaSource", "schemaUrl", "readUrl", "submitUrl", "submitMethod", "responseSchemaUrl", "apiEndpointKey", "apiUrlEntry", "enableCustomization", "showAiAssistant", "formId", "componentInstanceId", "configPersistenceStrategy", "layout", "generatedLayoutPreset", "layoutPolicy", "backConfig", "hooks", "removeEmptyContainersOnSave", "reactiveValidation", "reactiveValidationDebounceMs", "notifyIfOutdated", "snoozeMs", "autoOpenSettingsOnOutdated", "readonlyModeGlobal", "disabledModeGlobal", "presentationModeGlobal", "visibleGlobal", "fieldIconPolicy", "domainRules", "customEndpoints"], outputs: ["formSubmit", "formCancel", "formReset", "configChange", "configPatchChange", "formReady", "valueChange", "syncCompleted", "initializationError", "loadingStateChange", "enableCustomizationChange", "customAction", "actionConfirmation", "schemaStatusChange", "fieldRenderError", "ruleDiagnosticsChange"] }] });
|
|
5104
5104
|
}
|
|
5105
5105
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: DynamicFormDialogHostComponent, decorators: [{
|
|
5106
5106
|
type: Component,
|
package/package.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@praxisui/crud",
|
|
3
|
-
"version": "9.0.0-beta.
|
|
3
|
+
"version": "9.0.0-beta.27",
|
|
4
4
|
"description": "CRUD building blocks for Praxis UI: integrates dynamic forms and tables with unified configuration and services.",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@angular/common": "^21.0.0",
|
|
7
7
|
"@angular/core": "^21.0.0",
|
|
8
|
-
"@praxisui/dynamic-form": "^9.0.0-beta.
|
|
9
|
-
"@praxisui/table": "^9.0.0-beta.
|
|
10
|
-
"@praxisui/core": "^9.0.0-beta.
|
|
11
|
-
"@praxisui/dynamic-fields": "^9.0.0-beta.
|
|
12
|
-
"@praxisui/settings-panel": "^9.0.0-beta.
|
|
8
|
+
"@praxisui/dynamic-form": "^9.0.0-beta.27",
|
|
9
|
+
"@praxisui/table": "^9.0.0-beta.27",
|
|
10
|
+
"@praxisui/core": "^9.0.0-beta.27",
|
|
11
|
+
"@praxisui/dynamic-fields": "^9.0.0-beta.27",
|
|
12
|
+
"@praxisui/settings-panel": "^9.0.0-beta.27",
|
|
13
13
|
"@angular/cdk": "^21.0.0",
|
|
14
14
|
"@angular/forms": "^21.0.0",
|
|
15
15
|
"@angular/material": "^21.0.0",
|
|
16
16
|
"@angular/router": "^21.0.0",
|
|
17
|
-
"@praxisui/ai": "^9.0.0-beta.
|
|
17
|
+
"@praxisui/ai": "^9.0.0-beta.27",
|
|
18
18
|
"rxjs": "~7.8.0"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|