-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchunk-55HT5FXP.js
224 lines (216 loc) · 47.2 KB
/
chunk-55HT5FXP.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
import{$ as g,$a as f,Ga as e,Ia as y,Oa as D,Od as w,Pa as c,T as p,U as h,Wb as A,Xd as u,Yb as T,Yd as E,Zb as C,_ as m,ha as l,je as P,ka as v,na as t,oa as i,pa as n,re as x,se as q,ua as b,y as S}from"./chunk-ODUOVNEW.js";var U=()=>({property:"id",label:"User ID"}),H=a=>[a],N=(()=>{class a{static \u0275fac=function(o){return new(o||a)};static \u0275cmp=m({type:a,selectors:[["sample-po-page-dynamic-edit-basic"]],standalone:!1,decls:1,vars:4,consts:[["p-title","Po Page Dynamic Edit","p-service-api","https://po-sample-api.onrender.com/v1/people",3,"p-fields"]],template:function(o,r){o&1&&n(0,"po-page-dynamic-edit",0),o&2&&l("p-fields",c(2,H,D(1,U)))},dependencies:[P],encapsulation:2})}return a})();var V=a=>({"docs-sample-code-tabs":a}),B=(()=>{class a{hideSampleCodeTabs=!0;sampleCodeButtonLabel="Talk is cheap, show me the code!";sampleCodeButtonIcon="an an-plus";toggleSampleCodeTabs(){this.hideSampleCodeTabs=!this.hideSampleCodeTabs,this.sampleCodeButtonLabel=this.hideSampleCodeTabs?"Talk is cheap, show me the code!":"Okay, hide the code",this.sampleCodeButtonIcon=this.hideSampleCodeTabs?"an an-plus":"an an-minus"}static \u0275fac=function(o){return new(o||a)};static \u0275cmp=m({type:a,selectors:[["sample-po-page-dynamic-edit-basic-view"]],standalone:!1,decls:24,vars:6,consts:[[1,"sample-blockquote"],[1,"sample-title","po-font-text-large-bold"],[1,"show-me-the-code",3,"click"],[3,"ngClass"],["p-size","2"],["p-label","HTML","p-active",""],[1,"doc-label-path"],["appCodeHighlight","",1,"html"],["p-label","TS"],["appCodeHighlight","",1,"typescript"],[1,"docs-sample-container"]],template:function(o,r){o&1&&(n(0,"br"),t(1,"blockquote",0)(2,"label",1),e(3,"PO Page Dynamic Edit Basic"),i(),t(4,"a",2),b("click",function(){return r.toggleSampleCodeTabs()}),n(5,"span"),e(6),i()(),t(7,"div",3)(8,"po-tabs",4)(9,"po-tab",5)(10,"div")(11,"label",6),e(12,"sample-po-page-dynamic-edit-basic/sample-po-page-dynamic-edit-basic.component.html"),i(),t(13,"pre",7),e(14,`<po-page-dynamic-edit
p-title="Po Page Dynamic Edit"
[p-fields]="[{ property: 'id', label: 'User ID' }]"
p-service-api="https://po-sample-api.onrender.com/v1/people"
>
</po-page-dynamic-edit>
`),i()()(),t(15,"po-tab",8)(16,"div")(17,"label",6),e(18,"sample-po-page-dynamic-edit-basic/sample-po-page-dynamic-edit-basic.component.ts"),i(),t(19,"pre",9),e(20,`import { Component } from '@angular/core';
@Component({
selector: 'sample-po-page-dynamic-edit-basic',
templateUrl: './sample-po-page-dynamic-edit-basic.component.html',
standalone: false
})
export class SamplePoPageDynamicEditBasicComponent {}
`),i()()()()(),t(21,"div",10),n(22,"sample-po-page-dynamic-edit-basic"),i(),n(23,"hr")),o&2&&(p(5),v("po-icon "+r.sampleCodeButtonIcon),p(),y(" ",r.sampleCodeButtonLabel,""),p(),l("ngClass",c(4,V,r.hideSampleCodeTabs)))},dependencies:[f,x,u,E,N],encapsulation:2})}return a})();var M=(()=>{class a{serviceApi="https://po-sample-api.onrender.com/v1/people";actions={save:"/documentation/po-page-dynamic-detail",saveNew:"/documentation/po-page-dynamic-edit"};literals={pageActionCancel:"Descartar",pageActionSave:"Gravar",pageActionSaveNew:"Gravar e novo"};breadcrumb={items:[{label:"Home",link:"/"},{label:"People",link:"/documentation/po-page-dynamic-table"},{label:"Edit"}]};fields=[{property:"status",divider:"Status",options:["active","inactive"]},{property:"id",label:"User ID",key:!0,required:!0},{property:"name",divider:"Personal data",required:!0},{property:"nickname"},{property:"email",label:"E-mail"},{property:"birthdate",label:"Birth date",type:"date"},{property:"genre",options:["female","male","others"],gridLgColumns:6},{property:"nationality"},{property:"birthPlace",label:"Place of birth"},{property:"graduation"},{property:"father",label:"Father`s name",divider:"Relationship",gridMdColumns:4,gridLgColumns:4},{property:"mother",label:"Mother`s name",offsetMdColumns:4,offsetLgColumns:4,gridMdColumns:4,gridLgColumns:4},{property:"street",divider:"Address",gridColumns:4},{property:"city",optionsService:"https://po-sample-api.onrender.com/v1/cities?transform=true",offsetColumns:4,gridColumns:4}];static \u0275fac=function(o){return new(o||a)};static \u0275cmp=m({type:a,selectors:[["sample-po-page-dynamic-edit-user"]],standalone:!1,decls:1,vars:6,consts:[["p-title","User edit",3,"p-auto-router","p-actions","p-breadcrumb","p-fields","p-literals","p-service-api"]],template:function(o,r){o&1&&n(0,"po-page-dynamic-edit",0),o&2&&l("p-auto-router",!0)("p-actions",r.actions)("p-breadcrumb",r.breadcrumb)("p-fields",r.fields)("p-literals",r.literals)("p-service-api",r.serviceApi)},dependencies:[P],encapsulation:2})}return a})();var K=a=>({"docs-sample-code-tabs":a}),L=(()=>{class a{hideSampleCodeTabs=!0;sampleCodeButtonLabel="Talk is cheap, show me the code!";sampleCodeButtonIcon="an an-plus";toggleSampleCodeTabs(){this.hideSampleCodeTabs=!this.hideSampleCodeTabs,this.sampleCodeButtonLabel=this.hideSampleCodeTabs?"Talk is cheap, show me the code!":"Okay, hide the code",this.sampleCodeButtonIcon=this.hideSampleCodeTabs?"an an-plus":"an an-minus"}static \u0275fac=function(o){return new(o||a)};static \u0275cmp=m({type:a,selectors:[["sample-po-page-dynamic-edit-user-view"]],standalone:!1,decls:24,vars:6,consts:[[1,"sample-blockquote"],[1,"sample-title","po-font-text-large-bold"],[1,"show-me-the-code",3,"click"],[3,"ngClass"],["p-size","2"],["p-label","HTML","p-active",""],[1,"doc-label-path"],["appCodeHighlight","",1,"html"],["p-label","TS"],["appCodeHighlight","",1,"typescript"],[1,"docs-sample-container"]],template:function(o,r){o&1&&(n(0,"br"),t(1,"blockquote",0)(2,"label",1),e(3,"PO Page Dynamic Edit - User"),i(),t(4,"a",2),b("click",function(){return r.toggleSampleCodeTabs()}),n(5,"span"),e(6),i()(),t(7,"div",3)(8,"po-tabs",4)(9,"po-tab",5)(10,"div")(11,"label",6),e(12,"sample-po-page-dynamic-edit-user/sample-po-page-dynamic-edit-user.component.html"),i(),t(13,"pre",7),e(14,`<po-page-dynamic-edit
[p-auto-router]="true"
p-title="User edit"
[p-actions]="actions"
[p-breadcrumb]="breadcrumb"
[p-fields]="fields"
[p-literals]="literals"
[p-service-api]="serviceApi"
>
</po-page-dynamic-edit>
`),i()()(),t(15,"po-tab",8)(16,"div")(17,"label",6),e(18,"sample-po-page-dynamic-edit-user/sample-po-page-dynamic-edit-user.component.ts"),i(),t(19,"pre",9),e(20,`import { Component } from '@angular/core';
import { PoBreadcrumb, PoDynamicFormField } from '@po-ui/ng-components';
import { PoPageDynamicEditActions, PoPageDynamicEditLiterals } from '@po-ui/ng-templates';
@Component({
selector: 'sample-po-page-dynamic-edit-user',
templateUrl: './sample-po-page-dynamic-edit-user.component.html',
standalone: false
})
export class SamplePoPageDynamicEditUserComponent {
public readonly serviceApi = 'https://po-sample-api.onrender.com/v1/people';
public readonly actions: PoPageDynamicEditActions = {
save: '/documentation/po-page-dynamic-detail',
saveNew: '/documentation/po-page-dynamic-edit'
};
public readonly literals: PoPageDynamicEditLiterals = {
pageActionCancel: 'Descartar',
pageActionSave: 'Gravar',
pageActionSaveNew: 'Gravar e novo'
};
public readonly breadcrumb: PoBreadcrumb = {
items: [
{ label: 'Home', link: '/' },
{ label: 'People', link: '/documentation/po-page-dynamic-table' },
{ label: 'Edit' }
]
};
public readonly fields: Array<PoDynamicFormField> = [
{ property: 'status', divider: 'Status', options: ['active', 'inactive'] },
{ property: 'id', label: 'User ID', key: true, required: true },
{ property: 'name', divider: 'Personal data', required: true },
{ property: 'nickname' },
{ property: 'email', label: 'E-mail' },
{ property: 'birthdate', label: 'Birth date', type: 'date' },
{ property: 'genre', options: ['female', 'male', 'others'], gridLgColumns: 6 },
{ property: 'nationality' },
{ property: 'birthPlace', label: 'Place of birth' },
{ property: 'graduation' },
{
property: 'father',
label: 'Father\`s name',
divider: 'Relationship',
gridMdColumns: 4,
gridLgColumns: 4
},
{
property: 'mother',
label: 'Mother\`s name',
offsetMdColumns: 4,
offsetLgColumns: 4,
gridMdColumns: 4,
gridLgColumns: 4
},
{
property: 'street',
divider: 'Address',
gridColumns: 4
},
{
property: 'city',
optionsService: 'https://po-sample-api.onrender.com/v1/cities?transform=true',
offsetColumns: 4,
gridColumns: 4
}
];
}
`),i()()()()(),t(21,"div",10),n(22,"sample-po-page-dynamic-edit-user"),i(),n(23,"hr")),o&2&&(p(5),v("po-icon "+r.sampleCodeButtonIcon),p(),y(" ",r.sampleCodeButtonLabel,""),p(),l("ngClass",c(4,K,r.hideSampleCodeTabs)))},dependencies:[f,x,u,E,M],encapsulation:2})}return a})();var I=(()=>{class a{static \u0275fac=function(o){return new(o||a)};static \u0275cmp=m({type:a,selectors:[["sample-po-page-dynamic-edit-doc"]],standalone:!1,decls:1319,vars:0,consts:[[1,"docs-api"],[1,"docs-api-module-import"],[1,"docs-api-class-description"],[1,"docs-api-h3"],[1,"docs-api-class-name"],[1,"doc-code"],["id","utiliza\xE7\xE3o-via-rota"],["href","/documentation/po-page-dynamic-edit#po-page-dynamic-edit-metadata"],[1,"docs-api-directive-selectors"],[1,"docs-api-class-selector-label"],["appCodeHighlight",""],[1,"docs-api-h5","docs-api-method-header"],[1,"docs-api-properties-table"],[1,"docs-api-properties-header-row"],[1,"docs-api-properties-th"],[1,"docs-api-properties-row"],[1,"docs-api-properties-name-cell"],[1,"docs-api-input-marker"],[1,"docs-api-input-alias"],[1,"docs-api-properties-type-cell"],["pan","",1,"docs-api-property-type","PoPageDynamicEditActions"],[1,"docs-api-property-default"],[1,"docs-api-property-description"],["pan","",1,"docs-api-property-type","boolean"],["pan","",1,"docs-api-property-type","PoBreadcrumb"],["pan","",1,"docs-api-property-type","Array<PoPageDynamicEditField>"],["pan","",1,"docs-api-property-type","PoPageDynamicEditLiterals"],["href","/documentation/po-i18n"],["pan","",1,"docs-api-property-type","string"],["pan","",1,"docs-api-property-type","(()","=>","PoPageDynamicEditOptions)"],["pan","",1,"docs-api-property-type","((model:","any)","=>","any)"],["pan","",1,"docs-api-property-type","((model:","any)","=>","Observable<any>)"],[1,"docs-api-h4","docs-api-class-name"],["pan","",1,"docs-api-property-type","(()","=>","PoPageDynamicEditBeforeCancel)"],["href","https://po-ui.io/guides/api#successMessages"],["pan","",1,"docs-api-property-type","((resource:","any,","id:","string)","=>","PoPageDynamicEditBeforeSave)"],["pan","",1,"docs-api-property-type","((resource:","any,","id:","string)","=>","PoPageDynamicEditBeforeSaveNew)"],["pan","",1,"docs-api-property-type","Function"],["pan","",1,"docs-api-property-type","((resource:","any,","id:","string)","=>","void)"],["pan","",1,"docs-api-property-type","((resource:","any,","id?:","string)","=>","void)"],["pan","",1,"docs-api-property-type","any"],["id","po-page-dynamic-edit-metadata"],["pan","",1,"docs-api-property-type","number"]],template:function(o,r){o&1&&(t(0,"div",0)(1,"p",1)(2,"code"),e(3,"import { PoPageDynamicEditModule } from '@po-ui/ng-templates';"),i()(),t(4,"div",2)(5,"p"),e(6,"M\xF3dulo do template do po-page-dynamic-detail."),i()(),t(7,"h3",3),e(8,"Componente"),i(),t(9,"h4",4)(10,"code",5),e(11,"PoPageDynamicEditComponent"),i()(),t(12,"div",2)(13,"p"),e(14,"O "),t(15,"code"),e(16,"po-page-dynamic-edit"),i(),e(17,` \xE9 uma p\xE1gina que pode servir para editar ou criar novos registros,
o mesmo tamb\xE9m suporta metadados conforme especificado na documenta\xE7\xE3o.`),i(),t(18,"h3",6),e(19,"Utiliza\xE7\xE3o via rota"),i(),t(20,"p"),e(21,"Ao utilizar as rotas para inicializar o template, o "),t(22,"code"),e(23,"page-dynamic-edit"),i(),e(24,` disponibiliza propriedades que devem ser fornecidas no arquivo de configura\xE7\xE3o de rotas da aplica\xE7\xE3o, para
poder especificar o endpoint dos dados e dos metadados que ser\xE3o carregados na inicializa\xE7\xE3o.`),i(),t(25,"p"),e(26,"Exemplo de utiliza\xE7\xE3o:"),i(),t(27,"p"),e(28,"Arquivo de configura\xE7\xE3o de rotas da aplica\xE7\xE3o: "),t(29,"code"),e(30,"app-routing.module.ts"),i()(),t(31,"pre")(32,"code"),e(33,`const routes: Routes = [
{
path: 'people',
component: PoPageDynamicEditComponent,
data: {
serviceApi: 'http://localhost:3000/v1/people', // endpoint dos dados
serviceMetadataApi: 'http://localhost:3000/v1/metadata', // endpoint dos metadados utilizando o m\xE9todo HTTP Get
serviceLoadApi: 'http://localhost:3000/load-metadata' // endpoint de customiza\xE7\xF5es dos metadados utilizando o m\xE9todo HTTP Post
}
},
{
path: 'home',
component: HomeExampleComponent
}
];`),i()(),t(34,"p"),e(35,`O componente primeiro ir\xE1 carregar o metadado da rota definida na propriedade serviceMetadataApi
e depois ir\xE1 buscar da rota definida na propriedade serviceLoadApi.`),i(),t(36,"p"),e(37,`A requisi\xE7\xE3o dos metadados \xE9 feita na inicializa\xE7\xE3o do template para buscar os metadados da p\xE1gina passando o
tipo do metadado esperado e a vers\xE3o cacheada pelo browser.`),i(),t(38,"blockquote")(39,"p"),e(40,`Caso o servidor retornar um erro ao recuperar os metadados, ser\xE3o repassados os metadados salvos em cache,
se o cache n\xE3o existir ser\xE1 disparada uma notifica\xE7\xE3o.`),i()(),t(41,"p"),e(42,"Para carregar com um recurso j\xE1 existente, deve-se ser inclu\xEDdo um par\xE2metro na rota chamado "),t(43,"code"),e(44,"id"),i(),e(45,":"),i(),t(46,"pre")(47,"code"),e(48,`{
path: 'people/:id',
component: PoPageDynamicEditComponent,
data: {
serviceApi: 'http://localhost:3000/v1/people', // endpoint dos dados
serviceMetadataApi: 'http://localhost:3000/v1/metadata', // endpoint dos metadados
serviceLoadApi: 'http://localhost:3000/load-metadata' // endpoint de customiza\xE7\xF5es dos metadados
}
}`),i()(),t(49,"p"),e(50,`A requisi\xE7\xE3o dos metadados \xE9 feita na inicializa\xE7\xE3o do template para buscar os metadados da p\xE1gina passando o
tipo do metadado esperado e a vers\xE3o cacheada pelo browser.`),i(),t(51,"p"),e(52,`O formato esperado na resposta da requisi\xE7\xE3o est\xE1 especificado na interface
`),t(53,"a",7),e(54,"PoPageDynamicEditMetadata"),i(),e(55,". Por exemplo:"),i(),t(56,"pre")(57,"code"),e(58,` {
version: 1,
title: 'Person edit',
fields: [
{ property: 'id', key: true, disabled: true },
{ property: 'status' },
{ property: 'name' },
{ property: 'nickname' },
{ property: 'birthdate', label: 'Birth date' },
{ property: 'genre' },
{ property: 'city' },
{ property: 'country' }
]
}`),i()(),t(59,"blockquote")(60,"p"),e(61,"Caso o endpoint dos metadados n\xE3o seja especificado, ser\xE1 feito uma requisi\xE7\xE3o utilizando o "),t(62,"code"),e(63,"serviceApi"),i(),e(64," da seguinte forma:"),i()(),t(65,"pre")(66,"code"),e(67,"GET {end-point}/metadata?type=edit&version={version}"),i()()(),t(68,"div",8)(69,"h4",9),e(70,"Seletor"),i(),t(71,"pre",10),e(72,`<po-page-dynamic-edit
p-actions="PoPageDynamicEditActions"
p-auto-router="boolean"
p-breadcrumb="PoBreadcrumb"
p-fields="Array<PoPageDynamicEditField>"
p-literals="PoPageDynamicEditLiterals"
p-notification-type="string"
p-load="string | (() => PoPageDynamicEditOptions)"
p-load-data="((model: any) => any) | ((model: any) => Observable<any>)"
p-service-api="string"
p-title="string" >
</po-page-dynamic-edit>
`),i()(),t(73,"h4",11),e(74,"Propriedades"),i(),t(75,"table",12)(76,"tr",13)(77,"th",14),e(78,"Nome"),i(),t(79,"th",14),e(80,"Tipo"),i(),t(81,"th",14),e(82,"Padr\xE3o"),i(),t(83,"th",14),e(84,"Descri\xE7\xE3o"),i()(),t(85,"tr",15)(86,"td",16)(87,"div",17)(88,"span",18),e(89," p-actions"),n(90,"br"),i()()(),t(91,"td",19)(92,"code",20),e(93,"PoPageDynamicEditActions"),i()(),t(94,"td",21),e(95,"-"),i(),t(96,"td",22)(97,"em")(98,"strong"),e(99,"(opcional)"),i()(),t(100,"p"),e(101,"A\xE7\xF5es da p\xE1gina."),i()()(),t(102,"tr",15)(103,"td",16)(104,"div",17)(105,"span",18),e(106," p-auto-router"),n(107,"br"),i()()(),t(108,"td",19)(109,"code",23),e(110,"boolean"),i()(),t(111,"td",21)(112,"p"),e(113,"false"),i()(),t(114,"td",22)(115,"em")(116,"strong"),e(117,"(opcional)"),i()(),t(118,"p"),e(119,`Cria automaticamente as rotas de edi\xE7\xE3o (novo/duplicate) e detalhes caso as a\xE7\xF5es
estejam definidas nas a\xE7\xF5es.`),i(),t(120,"blockquote")(121,"p"),e(122,"Para o correto funcionamento n\xE3o pode haver nenhum rota coringa ("),t(123,"code"),e(124,"**"),i(),e(125,") especificada."),i()()()(),t(126,"tr",15)(127,"td",16)(128,"div",17)(129,"span",18),e(130," p-breadcrumb"),n(131,"br"),i()()(),t(132,"td",19)(133,"code",24),e(134,"PoBreadcrumb"),i()(),t(135,"td",21),e(136,"-"),i(),t(137,"td",22)(138,"em")(139,"strong"),e(140,"(opcional)"),i()(),t(141,"p"),e(142,"Objeto com propriedades do breadcrumb."),i()()(),t(143,"tr",15)(144,"td",16)(145,"div",17)(146,"span",18),e(147," p-fields"),n(148,"br"),i()()(),t(149,"td",19)(150,"code",25),e(151,"Array<PoPageDynamicEditField>"),i()(),t(152,"td",21),e(153,"-"),i(),t(154,"td",22)(155,"p"),e(156,"Lista dos campos usados na tabela e busca avan\xE7ada."),i()()(),t(157,"tr",15)(158,"td",16)(159,"div",17)(160,"span",18),e(161," p-literals"),n(162,"br"),i()()(),t(163,"td",19)(164,"code",26),e(165,"PoPageDynamicEditLiterals"),i()(),t(166,"td",21),e(167,"-"),i(),t(168,"td",22)(169,"em")(170,"strong"),e(171,"(opcional)"),i()(),t(172,"p"),e(173,"Objeto com as literais usadas no "),t(174,"code"),e(175,"po-page-dynamic-edit"),i(),e(176,"."),i(),t(177,"p"),e(178,`\xC9 possivel customizar passando um objeto com todas as literais dispon\xEDveis
ou passando apenas as literais que deseja customizar`),i(),t(179,"pre")(180,"code"),e(181,`const customLiterals: PoPageDynamicEditLiterals = {
detailActionNew: 'Incluir',
pageActionCancel: 'Descartar',
pageActionSave: 'Gravar',
pageActionSaveNew: 'Gravar e incluir',
registerNotFound: 'Nenhum registro encontrado.',
saveNotificationError: 'Campo(s) obrigat\xF3rio(s) sem preenchimento.',
saveNotificationSuccessSave: 'Item salvo com sucesso.',
saveNotificationSuccessUpdate: 'Item atualizado com sucesso.',
saveNotificationWarning: 'Necess\xE1rio preencher o formul\xE1rio corretamente.'
};`),i()(),t(182,"p"),e(183,"E para carregar as literais customizadas, basta apenas passar o objeto para o componente."),i(),t(184,"pre")(185,"code"),e(186,`<po-page-dynamic-edit
[p-literals]="customLiterals">
</po-page-dynamic-edit>`),i()(),t(187,"blockquote")(188,"p"),e(189,"O valor padr\xE3o ser\xE1 traduzido de acordo com o idioma configurado no "),t(190,"a",27)(191,"code"),e(192,"PoI18nService"),i()(),e(193," ou "),t(194,"em"),e(195,"browser"),i(),e(196,"."),i()()()(),t(197,"tr",15)(198,"td",16)(199,"div",17)(200,"span",18),e(201," p-notification-type"),n(202,"br"),i()()(),t(203,"td",19)(204,"code",28),e(205,"string"),i()(),t(206,"td",21)(207,"p"),e(208,"warning"),i()(),t(209,"td",22)(210,"em")(211,"strong"),e(212,"(opcional)"),i()(),t(213,"p"),e(214,"Tipo da notifica\xE7\xE3o."),i(),t(215,"p"),e(216,"\xC9 possivel definir o tipo de notifica\xE7\xE3o que ser\xE1 exibido quando houver algum campo inv\xE1lido no formul\xE1rio."),i(),t(217,"pre")(218,"code"),e(219,`<po-page-dynamic-edit
p-notification-type="warning">
</po-page-dynamic-edit>`),i()(),t(220,"blockquote")(221,"p"),e(222,"Os valores aceitos s\xE3o 'warning' e 'error'."),i()()()(),t(223,"tr",15)(224,"td",16)(225,"div",17)(226,"span",18),e(227," p-load"),n(228,"br"),i()()(),t(229,"td",19)(230,"code",28),e(231,"string "),i(),t(232,"code",29),e(233," (() => PoPageDynamicEditOptions)"),i()(),t(234,"td",21),e(235,"-"),i(),t(236,"td",22)(237,"p"),e(238,"Fun\xE7\xE3o ou servi\xE7o que ser\xE1 executado na inicializa\xE7\xE3o do componente."),i(),t(239,"p"),e(240,"A propriedade aceita os seguintes tipos:"),i(),t(241,"ul")(242,"li")(243,"code"),e(244,"string"),i(),e(245,": "),t(246,"em"),e(247,"Endpoint"),i(),e(248," usado pelo componente para requisi\xE7\xE3o via "),t(249,"code"),e(250,"POST"),i(),e(251,"."),i(),t(252,"li")(253,"code"),e(254,"function"),i(),e(255,": M\xE9todo que ser\xE1 executado."),i()(),t(256,"p"),e(257,"O retorno desta fun\xE7\xE3o deve ser do tipo "),t(258,"code"),e(259,"PoPageDynamicEditOptions"),i(),e(260,`,
onde o usu\xE1rio poder\xE1 customizar novos campos, breadcrumb, title e actions`),i(),t(261,"p"),e(262,"Por exemplo:"),i(),t(263,"pre")(264,"code"),e(265,`getPageOptions(): PoPageDynamicEditOptions {
return {
actions:
{ cancel: false, save: 'save/:id', saveNew: 'saveNew' },
fields: [
{ property: 'idCard', gridColumns: 6 }
]
};
}`),i()(),t(266,"p"),e(267,"Para referenciar a sua fun\xE7\xE3o utilize a propriedade "),t(268,"code"),e(269,"bind"),i(),e(270,", por exemplo:"),i(),t(271,"pre")(272,"code"),e(273,'[p-load]="onLoadOptions.bind(this)"'),i()()()(),t(274,"tr",15)(275,"td",16)(276,"div",17)(277,"span",18),e(278," p-load-data"),n(279,"br"),i()()(),t(280,"td",19)(281,"code",30),e(282,"((model: any) => any) "),i(),t(283,"code",31),e(284," ((model: any) => Observable<any>)"),i()(),t(285,"td",21),e(286,"-"),i(),t(287,"td",22)(288,"em")(289,"strong"),e(290,"(opcional)"),i()(),t(291,"p"),e(292,"Fun\xE7\xE3o que ser\xE1 executada ap\xF3s ser realizada a busca dos dados."),i(),t(293,"p"),e(294,"A propriedade aceita os seguintes tipos:"),i(),t(295,"ul")(296,"li")(297,"code"),e(298,"function"),i(),e(299,": M\xE9todo que ser\xE1 executado."),i()(),t(300,"p"),e(301,`Esta fun\xE7\xE3o passa por par\xE2metro o model e deve receb\xEA-lo de volta com as altera\xE7\xF5es.
Tamb\xE9m aceita o retorno de um Observable com o novo model.`),i(),t(302,"p"),e(303,"Por exemplo:"),i(),t(304,"pre")(305,"code"),e(306,`onLoadCustom(model) {
return { ...model, customField: 'newValue' };
}`),i()(),t(307,"p"),e(308,"Para referenciar a sua fun\xE7\xE3o utilize a propriedade "),t(309,"code"),e(310,"bind"),i(),e(311,", por exemplo:"),i(),t(312,"pre")(313,"code"),e(314,'[p-load-data]="onLoadCustom.bind(this)"'),i()()()(),t(315,"tr",15)(316,"td",16)(317,"div",17)(318,"span",18),e(319," p-service-api"),n(320,"br"),i()()(),t(321,"td",19)(322,"code",28),e(323,"string"),i()(),t(324,"td",21),e(325,"-"),i(),t(326,"td",22)(327,"p"),e(328,"Endpoint usado pelo template para requisi\xE7\xE3o do recurso que ser\xE1 exibido para edi\xE7\xE3o."),i(),t(329,"p"),e(330,"Para as a\xE7\xF5es de "),t(331,"code"),e(332,"save"),i(),e(333," e "),t(334,"code"),e(335,"saveNew"),i(),e(336,`, ser\xE1 feito uma requisi\xE7\xE3o de cria\xE7\xE3o nesse mesmo endpoint passando os valores
preenchidos pelo usu\xE1rio via payload.`),i(),t(337,"blockquote")(338,"p")(339,"code"),e(340,"POST {end-point}"),i()()(),t(341,"pre")(342,"code"),e(343,`<po-page-dynamic-edit
[p-actions]="{ save: '/', saveNew: 'new' }"
[p-fields]="[ { property: 'name' }, { property: 'city' } ]"
p-service="/api/po-samples/v1/people"
...>
</po-page-dynamic-edit>`),i()(),t(344,"p"),e(345,"Resquisi\xE7\xE3o disparada, onde a propriedade "),t(346,"code"),e(347,"name"),i(),e(348," e "),t(349,"code"),e(350,"city"),i(),e(351," foram preenchidas:"),i(),t(352,"pre")(353,"code"),e(354,`POST /api/po-samples/v1/people HTTP/1.1
Host: localhost:4000
Connection: keep-alive
Accept: application/json, text/plain
...`),i()(),t(355,"p"),e(356,"Request payload:"),i(),t(357,"pre")(358,"code"),e(359,'{ "name": "Fulano", "city": "Smallville" }'),i()(),t(360,"p"),e(361,"Caso queira que o template carregue um recurso j\xE1 existente, deve-se ser inclu\xEDdo um parametro na rota chamado "),t(362,"code"),e(363,"id"),i(),e(364,"."),i(),t(365,"p"),e(366,"Exemplo de configura\xE7\xE3o de rota:"),i(),t(367,"pre")(368,"code"),e(369,`RouterModule.forRoot([
...
{ path: 'edit/:id', component: PersonEditComponent },
...
],`),i()(),t(370,"p"),e(371,"Baseado nisso, na inicializa\xE7\xE3o do template, ser\xE1 disparado uma requisi\xE7\xE3o para buscar o recurso que ser\xE1 editado."),i(),t(372,"blockquote")(373,"p")(374,"code"),e(375,"GET {end-point}/{id}"),i()()(),t(376,"p"),e(377,"Nos m\xE9todos de "),t(378,"code"),e(379,"save"),i(),e(380," e "),t(381,"code"),e(382,"saveNew"),i(),e(383,", ao inv\xE9s de um "),t(384,"code"),e(385,"POST"),i(),e(386,", ser\xE1 disparado um "),t(387,"code"),e(388,"PUT"),i(),e(389,"."),i(),t(390,"p"),e(391,"Resquisi\xE7\xE3o disparada, onde a propriedade "),t(392,"code"),e(393,"name"),i(),e(394," e "),t(395,"code"),e(396,"city"),i(),e(397," foram preenchidas / atualizadas, e o "),t(398,"code"),e(399,"id"),i(),e(400," da url \xE9 2:"),i(),t(401,"pre")(402,"code"),e(403,`PUT /api/po-samples/v1/people/2 HTTP/1.1
Host: localhost:4000
Connection: keep-alive
Accept: application/json, text/plain
...`),i()(),t(404,"p"),e(405,"Request payload:"),i(),t(406,"pre")(407,"code"),e(408,'{ "name": "Fulano", "city": "Metropolis" }'),i()()()(),t(409,"tr",15)(410,"td",16)(411,"div",17)(412,"span",18),e(413," p-title"),n(414,"br"),i()()(),t(415,"td",19)(416,"code",28),e(417,"string"),i()(),t(418,"td",21),e(419,"-"),i(),t(420,"td",22)(421,"p"),e(422,"T\xEDtulo da p\xE1gina."),i()()()(),t(423,"h3"),e(424,"Interfaces"),i(),t(425,"h4",32)(426,"code",5),e(427,"PoPageDynamicEditActions"),i()(),t(428,"div",2)(429,"p"),e(430,"Interface para as a\xE7\xF5es do componente po-page-dynamic-edit."),i()(),t(431,"h4",11),e(432,"Propriedades"),i(),t(433,"table",12)(434,"tr",13)(435,"th",14),e(436,"Nome"),i(),t(437,"th",14),e(438,"Tipo"),i(),t(439,"th",14),e(440,"Descri\xE7\xE3o"),i()(),t(441,"tr",15)(442,"td",16)(443,"div",17)(444,"span",18),e(445," beforeCancel"),n(446,"br"),i()()(),t(447,"td",19)(448,"code",28),e(449,"string "),i(),t(450,"code",33),e(451," (() => PoPageDynamicEditBeforeCancel)"),i()(),t(452,"td",22)(453,"em")(454,"strong"),e(455,"(opcional)"),i()(),t(456,"p"),e(457,"Rota ou m\xE9todo que ser\xE1 chamado antes de executar a a\xE7\xE3o de cancelamento (cancel)."),i(),t(458,"p"),e(459,"Tanto o m\xE9todo como a API receber\xE3o o recurso e devem retornar um objeto com a defini\xE7\xE3o de "),t(460,"code"),e(461,"PoPageDynamicEditBeforeCancel"),i(),e(462,"."),i(),t(463,"blockquote")(464,"p"),e(465,"A url ser\xE1 chamada via POST"),i()(),t(466,"p"),e(467,"Caso o desenvolvedor queira que apare\xE7a alguma mensagem nessa a\xE7\xE3o ele pode cri\xE1-la na fun\xE7\xE3o chamada pela "),t(468,"strong"),e(469,"beforeCancel"),i(),e(470,`
ou definir a mensagem no atributo `),t(471,"code"),e(472,"_messages"),i(),e(473,` na resposta da API conforme definido
em `),t(474,"a",34),e(475,"Guia de implementa\xE7\xE3o de APIs"),i()()()(),t(476,"tr",15)(477,"td",16)(478,"div",17)(479,"span",18),e(480," beforeSave"),n(481,"br"),i()()(),t(482,"td",19)(483,"code",28),e(484,"string "),i(),t(485,"code",35),e(486," ((resource: any, id: string) => PoPageDynamicEditBeforeSave)"),i()(),t(487,"td",22)(488,"em")(489,"strong"),e(490,"(opcional)"),i()(),t(491,"p"),e(492,"Rota ou m\xE9todo que ser\xE1 chamado antes de salvar um recurso (save)."),i(),t(493,"p"),e(494,"Tanto o m\xE9todo como a API receber\xE3o o recurso e devem retornar um objeto com a defini\xE7\xE3o de "),t(495,"code"),e(496,"PoPageDynamicEditBeforeSave"),i(),e(497,"."),i(),t(498,"blockquote")(499,"p"),e(500,`A url ser\xE1 chamada via POST. Caso seja a edi\xE7\xE3o de um recurso, a url ser\xE1 concatenada
com a key especificada no metadata, por exemplo: `),t(501,"code"),e(502,"POST {beforeSave}/{key}"),i(),e(503,"."),i()(),t(504,"p"),e(505,"Caso o desenvolvedor queira que apare\xE7a alguma mensagem nessa a\xE7\xE3o ele pode cri\xE1-la na fun\xE7\xE3o chamada pela "),t(506,"strong"),e(507,"beforeSave"),i(),e(508,`
ou definir a mensagem no atributo `),t(509,"code"),e(510,"_messages"),i(),e(511,` na resposta da API conforme definido
em `),t(512,"a",34),e(513,"Guia de implementa\xE7\xE3o de APIs"),i()()()(),t(514,"tr",15)(515,"td",16)(516,"div",17)(517,"span",18),e(518," beforeSaveNew"),n(519,"br"),i()()(),t(520,"td",19)(521,"code",28),e(522,"string "),i(),t(523,"code",36),e(524," ((resource: any, id: string) => PoPageDynamicEditBeforeSaveNew)"),i()(),t(525,"td",22)(526,"em")(527,"strong"),e(528,"(opcional)"),i()(),t(529,"p"),e(530,"Rota ou m\xE9todo que ser\xE1 chamado antes de executar o evento salvar e abrir novo registro (saveNew)."),i(),t(531,"p"),e(532,"Tanto o m\xE9todo como a API receber\xE3o o recurso e devem retornar um objeto com a defini\xE7\xE3o de "),t(533,"code"),e(534,"PoPageDynamicEditBeforeSaveNew"),i(),e(535,"."),i(),t(536,"blockquote")(537,"p"),e(538,`A URL ser\xE1 chamada via POST. Caso seja a edi\xE7\xE3o de um recurso, a URL ser\xE1 concatenada
com a key especificada no metadata, por exemplo: `),t(539,"code"),e(540,"POST {beforeSave}/{key}"),i(),e(541,"."),i()(),t(542,"p"),e(543,"Caso o desenvolvedor queira que apare\xE7a alguma mensagem nessa a\xE7\xE3o ele pode cri\xE1-la na fun\xE7\xE3o chamada pela "),t(544,"strong"),e(545,"beforeSaveNew"),i(),e(546,`
ou definir a mensagem no atributo `),t(547,"code"),e(548,"_messages"),i(),e(549,` na resposta da API conforme definido
em `),t(550,"a",34),e(551,"Guia de implementa\xE7\xE3o de APIs"),i()()()(),t(552,"tr",15)(553,"td",16)(554,"div",17)(555,"span",18),e(556," cancel"),n(557,"br"),i()()(),t(558,"td",19)(559,"code",28),e(560,"string "),i(),t(561,"code",23),e(562," boolean "),i(),t(563,"code",37),e(564," Function"),i()(),t(565,"td",22)(566,"em")(567,"strong"),e(568,"(opcional)"),i()(),t(569,"p"),e(570,"Rota de redirecionamento para a\xE7\xE3o de cancelar, caso n\xE3o seja especificada ser\xE1 usado o comando "),t(571,"code"),e(572,"navigator.back()"),i(),e(573,"."),i(),t(574,"blockquote")(575,"p"),e(576,"Se passada uma fun\xE7\xE3o, \xE9 responsabilidade do desenvolvedor implementar a navega\xE7\xE3o ou outro comportamento desejado."),i()(),t(577,"blockquote")(578,"p"),e(579,"Caso queira esconder a a\xE7\xE3o deve ser passado o valor "),t(580,"code"),e(581,"false"),i(),e(582,";"),i()(),t(583,"pre")(584,"code"),e(585,`actions = {
cancel: '/'
};`),i()()()(),t(586,"tr",15)(587,"td",16)(588,"div",17)(589,"span",18),e(590," save"),n(591,"br"),i()()(),t(592,"td",19)(593,"code",28),e(594,"string "),i(),t(595,"code",38),e(596," ((resource: any, id: string) => void)"),i()(),t(597,"td",22)(598,"em")(599,"strong"),e(600,"(opcional)"),i()(),t(601,"p"),e(602,"Rota de redirecionamento ou m\xE9todo para executar o envio dos dados ao servidor."),i(),t(603,"p"),e(604,"A rota de redirecionamento ser\xE1 executada ap\xF3s a confirma\xE7\xE3o de grava\xE7\xE3o do registro."),i(),t(605,"blockquote")(606,"p"),e(607,"A rota pode conter um par\xE2metro chamando id."),i()(),t(608,"pre")(609,"code"),e(610,`actions = {
save: 'detail/:id'
};`),i()(),t(611,"p"),e(612,"Se for passado um m\xE9todo:"),i(),t(613,"ul")(614,"li"),e(615,"receber\xE1 como par\xE2metro na chamada do m\xE9todo o recurso, por exemplo: "),t(616,"code"),e(617,"{ email: '[email protected]' }"),i(),e(618,"."),i(),t(619,"li"),e(620,`\xE9 responsabilidade do desenvolvedor implementar a navega\xE7\xE3o e/ou envio dos dados
para o servidor ou outro comportamento desejado.`),i()()()(),t(621,"tr",15)(622,"td",16)(623,"div",17)(624,"span",18),e(625," saveNew"),n(626,"br"),i()()(),t(627,"td",19)(628,"code",28),e(629,"string "),i(),t(630,"code",39),e(631," ((resource: any, id?: string) => void)"),i()(),t(632,"td",22)(633,"em")(634,"strong"),e(635,"(opcional)"),i()(),t(636,"p"),e(637,"Rota de redirecionamento ou m\xE9todo para executar o envio dos dados ao servidor."),i(),t(638,"p"),e(639,"A rota de redirecionamento ser\xE1 executada ap\xF3s a confirma\xE7\xE3o de grava\xE7\xE3o do registro."),i(),t(640,"blockquote")(641,"p"),e(642,`Caso tratar-se de um novo registro, ser\xE1 resetado o formul\xE1rio para um novo registro.
Se estiver editando um registro a rota de redirecionamento ser\xE1 utilizada.`),i()(),t(643,"pre")(644,"code"),e(645,`actions = {
saveNew: 'new'
};`),i()(),t(646,"p"),e(647,"A rota pode conter um par\xE2metro id."),i(),t(648,"pre")(649,"code"),e(650,`actions = {
saveNew: 'edit/:id'
};`),i()(),t(651,"p"),e(652,`Ao informar um m\xE9todo \xE9 responsabilidade do desenvolvedor implementar a navega\xE7\xE3o e/ou envio dos dados
para o servidor ou outro comportamento desejado.`),i()()()(),t(653,"h4",32)(654,"code",5),e(655,"PoPageDynamicEditBeforeCancel"),i()(),t(656,"div",2)(657,"p"),e(658,`Defini\xE7\xE3o da estrutura de retorno da url ou m\xE9todo executado atrav\xE9s da
propriedade `),t(659,"code"),e(660,"beforeCancel"),i(),e(661,"."),i()(),t(662,"h4",11),e(663,"Propriedades"),i(),t(664,"table",12)(665,"tr",13)(666,"th",14),e(667,"Nome"),i(),t(668,"th",14),e(669,"Tipo"),i(),t(670,"th",14),e(671,"Descri\xE7\xE3o"),i()(),t(672,"tr",15)(673,"td",16)(674,"div",17)(675,"span",18),e(676," allowAction"),n(677,"br"),i()()(),t(678,"td",19)(679,"code",23),e(680,"boolean"),i()(),t(681,"td",22)(682,"em")(683,"strong"),e(684,"(opcional)"),i()(),t(685,"p"),e(686,"Define se deve ou n\xE3o executar a a\xE7\xE3o de cancelamento de edi\xE7\xE3o da p\xE1gina (cancel)"),i()()(),t(687,"tr",15)(688,"td",16)(689,"div",17)(690,"span",18),e(691," newUrl"),n(692,"br"),i()()(),t(693,"td",19)(694,"code",28),e(695,"string"),i()(),t(696,"td",22)(697,"em")(698,"strong"),e(699,"(opcional)"),i()(),t(700,"p"),e(701,"Nova rota para navega\xE7\xE3o que substituir\xE1 a definida anteriormente em "),t(702,"code"),e(703,"cancel"),i(),e(704,"."),i()()()(),t(705,"h4",32)(706,"code",5),e(707,"PoPageDynamicEditBeforeSaveNew"),i()(),t(708,"div",2)(709,"p"),e(710,`Defini\xE7\xE3o da estrutura de retorno da url ou m\xE9todo executado atrav\xE9s da
propriedade `),t(711,"code"),e(712,"beforeSaveNew"),i(),e(713,"."),i()(),t(714,"h4",11),e(715,"Propriedades"),i(),t(716,"table",12)(717,"tr",13)(718,"th",14),e(719,"Nome"),i(),t(720,"th",14),e(721,"Tipo"),i(),t(722,"th",14),e(723,"Descri\xE7\xE3o"),i()(),t(724,"tr",15)(725,"td",16)(726,"div",17)(727,"span",18),e(728," allowAction"),n(729,"br"),i()()(),t(730,"td",19)(731,"code",23),e(732,"boolean"),i()(),t(733,"td",22)(734,"em")(735,"strong"),e(736,"(opcional)"),i()(),t(737,"p"),e(738,"Define se deve ou n\xE3o executar a a\xE7\xE3o salvar e novo (saveNew)."),i()()(),t(739,"tr",15)(740,"td",16)(741,"div",17)(742,"span",18),e(743," newUrl"),n(744,"br"),i()()(),t(745,"td",19)(746,"code",28),e(747,"string"),i()(),t(748,"td",22)(749,"em")(750,"strong"),e(751,"(opcional)"),i()(),t(752,"p"),e(753,"Nova rota de redirecionamento, que substituir\xE1 a rota definida anteriormente em "),t(754,"code"),e(755,"saveNew"),i(),e(756,"."),i()()(),t(757,"tr",15)(758,"td",16)(759,"div",17)(760,"span",18),e(761," resource"),n(762,"br"),i()()(),t(763,"td",19)(764,"code",40),e(765,"any"),i()(),t(766,"td",22)(767,"em")(768,"strong"),e(769,"(opcional)"),i()(),t(770,"p"),e(771,"Recurso atualizado."),i(),t(772,"p"),e(773,`Ser\xE1 feito uma mesclagem entre os valores existentes e esse novo objeto,
no entanto as propriedades que possu\xEDrem `),t(774,"code"),e(775,"key: true"),i(),e(776,` n\xE3o ser\xE3o alteradas.
Por exemplo:`),i(),t(777,"ul")(778,"li")(779,"p"),e(780,"recurso anterior com a propriedade id foi que definida como "),t(781,"em"),e(782,"key"),i(),e(783,":"),i(),t(784,"pre")(785,"code"),e(786,"{ id: 1, name: 'Ane' }"),i()()(),t(787,"li")(788,"p"),e(789,"recurso retornado no "),t(790,"code"),e(791,"beforeSaveNew"),i(),e(792,":"),i(),t(793,"pre")(794,"code"),e(795,"{ id: 50, age: 23 }"),i()()(),t(796,"li")(797,"p"),e(798,"Mesclagem do recurso:"),i(),t(799,"pre")(800,"code"),e(801,"{ id: 1, name: 'Ane', age: 23 }"),i()()()(),t(802,"blockquote")(803,"p"),e(804,"Caso "),t(805,"code"),e(806,"allowAction"),i(),e(807," seja "),t(808,"code"),e(809,"false"),i(),e(810,`, o recurso ser\xE1 atualizado apenas localmente, sem concluir
a a\xE7\xE3o de salvar (saveNew).`),i()()()()(),t(811,"h4",32)(812,"code",5),e(813,"PoPageDynamicEditBeforeSave"),i()(),t(814,"div",2)(815,"p"),e(816,`Defini\xE7\xE3o da estrutura de retorno da url ou m\xE9todo executado atrav\xE9s da
propriedade `),t(817,"code"),e(818,"beforeSave"),i(),e(819,"."),i()(),t(820,"h4",11),e(821,"Propriedades"),i(),t(822,"table",12)(823,"tr",13)(824,"th",14),e(825,"Nome"),i(),t(826,"th",14),e(827,"Tipo"),i(),t(828,"th",14),e(829,"Descri\xE7\xE3o"),i()(),t(830,"tr",15)(831,"td",16)(832,"div",17)(833,"span",18),e(834," allowAction"),n(835,"br"),i()()(),t(836,"td",19)(837,"code",23),e(838,"boolean"),i()(),t(839,"td",22)(840,"em")(841,"strong"),e(842,"(opcional)"),i()(),t(843,"p"),e(844,"Define se deve ou n\xE3o executar a a\xE7\xE3o salvar (save)."),i()()(),t(845,"tr",15)(846,"td",16)(847,"div",17)(848,"span",18),e(849," newUrl"),n(850,"br"),i()()(),t(851,"td",19)(852,"code",28),e(853,"string"),i()(),t(854,"td",22)(855,"em")(856,"strong"),e(857,"(opcional)"),i()(),t(858,"p"),e(859,"Nova rota para salvar o recurso, que substituir\xE1 a rota definida anteriormente em "),t(860,"code"),e(861,"save"),i(),e(862,"."),i()()(),t(863,"tr",15)(864,"td",16)(865,"div",17)(866,"span",18),e(867," resource"),n(868,"br"),i()()(),t(869,"td",19)(870,"code",40),e(871,"any"),i()(),t(872,"td",22)(873,"em")(874,"strong"),e(875,"(opcional)"),i()(),t(876,"p"),e(877,"Recurso atualizado."),i(),t(878,"p"),e(879,`Ser\xE1 feito uma mesclagem entre os valores existentes e esse novo objeto.
Por exemplo:`),i(),t(880,"ul")(881,"li")(882,"p"),e(883,"recurso anterior:"),i(),t(884,"pre")(885,"code"),e(886,"{ name: 'Ane' }"),i()()(),t(887,"li")(888,"p"),e(889,"recurso retornado no "),t(890,"code"),e(891,"beforeSave"),i(),e(892,":"),i(),t(893,"pre")(894,"code"),e(895,"{ age: 23 }"),i()()(),t(896,"li")(897,"p"),e(898,"Mesclagem do recurso:"),i(),t(899,"pre")(900,"code"),e(901,"{ name: 'Ane', age: 23 }"),i()()()(),t(902,"blockquote")(903,"p"),e(904,"Caso "),t(905,"code"),e(906,"allowAction"),i(),e(907," seja "),t(908,"code"),e(909,"false"),i(),e(910,`, o recurso ser\xE1 atualizado apenas localmente, sem concluir
a a\xE7\xE3o de salvar (save).`),i()()()()(),t(911,"h4",32)(912,"code",5),e(913,"PoPageDynamicEditField"),i()(),t(914,"div",2)(915,"p"),e(916,"Interface dos fields usados para compor o template "),t(917,"code"),e(918,"po-page-dynamic-edit"),i(),e(919,"."),i()(),t(920,"h4",11),e(921,"Propriedades"),i(),t(922,"table",12)(923,"tr",13)(924,"th",14),e(925,"Nome"),i(),t(926,"th",14),e(927,"Tipo"),i(),t(928,"th",14),e(929,"Descri\xE7\xE3o"),i()(),t(930,"tr",15)(931,"td",16)(932,"div",17)(933,"span",18),e(934," duplicate"),n(935,"br"),i()()(),t(936,"td",19)(937,"code",23),e(938,"boolean"),i()(),t(939,"td",22)(940,"em")(941,"strong"),e(942,"(opcional)"),i()(),t(943,"p"),e(944,"Indica se o campo ser\xE1 duplicado caso seja executada a a\xE7\xE3o de duplica\xE7\xE3o."),i()()()(),t(945,"h4",32)(946,"code",5),e(947,"PoPageDynamicEditLiterals"),i()(),t(948,"div",2)(949,"p"),e(950,"Interface para defini\xE7\xE3o das literais usadas no "),t(951,"code"),e(952,"po-page-dynamic-edit"),i(),e(953,"."),i()(),t(954,"h4",11),e(955,"Propriedades"),i(),t(956,"table",12)(957,"tr",13)(958,"th",14),e(959,"Nome"),i(),t(960,"th",14),e(961,"Tipo"),i(),t(962,"th",14),e(963,"Descri\xE7\xE3o"),i()(),t(964,"tr",15)(965,"td",16)(966,"div",17)(967,"span",18),e(968," cancelConfirmMessage"),n(969,"br"),i()()(),t(970,"td",19)(971,"code",28),e(972,"string"),i()(),t(973,"td",22)(974,"em")(975,"strong"),e(976,"(opcional)"),i()(),t(977,"p"),e(978,"Texto exibido na mensagem de cancelamento da inclus\xE3o/edi\xE7\xE3o."),i()()(),t(979,"tr",15)(980,"td",16)(981,"div",17)(982,"span",18),e(983," detailActionNew"),n(984,"br"),i()()(),t(985,"td",19)(986,"code",28),e(987,"string"),i()(),t(988,"td",22)(989,"em")(990,"strong"),e(991,"(opcional)"),i()(),t(992,"p"),e(993,"R\xF3tulo exibido no bot\xE3o "),t(994,"code"),e(995,"Novo"),i(),e(996,"."),i()()(),t(997,"tr",15)(998,"td",16)(999,"div",17)(1e3,"span",18),e(1001," pageActionCancel"),n(1002,"br"),i()()(),t(1003,"td",19)(1004,"code",28),e(1005,"string"),i()(),t(1006,"td",22)(1007,"em")(1008,"strong"),e(1009,"(opcional)"),i()(),t(1010,"p"),e(1011,"R\xF3tulo exibido no bot\xE3o "),t(1012,"code"),e(1013,"Cancelar"),i(),e(1014,"."),i()()(),t(1015,"tr",15)(1016,"td",16)(1017,"div",17)(1018,"span",18),e(1019," pageActionSave"),n(1020,"br"),i()()(),t(1021,"td",19)(1022,"code",28),e(1023,"string"),i()(),t(1024,"td",22)(1025,"em")(1026,"strong"),e(1027,"(opcional)"),i()(),t(1028,"p"),e(1029,"R\xF3tulo exibido no bot\xE3o "),t(1030,"code"),e(1031,"Salvar"),i(),e(1032,"."),i()()(),t(1033,"tr",15)(1034,"td",16)(1035,"div",17)(1036,"span",18),e(1037," pageActionSaveNew"),n(1038,"br"),i()()(),t(1039,"td",19)(1040,"code",28),e(1041,"string"),i()(),t(1042,"td",22)(1043,"em")(1044,"strong"),e(1045,"(opcional)"),i()(),t(1046,"p"),e(1047,"R\xF3tulo exibido no bot\xE3o "),t(1048,"code"),e(1049,"Salvar e novo"),i(),e(1050,"."),i()()(),t(1051,"tr",15)(1052,"td",16)(1053,"div",17)(1054,"span",18),e(1055," registerNotFound"),n(1056,"br"),i()()(),t(1057,"td",19)(1058,"code",28),e(1059,"string"),i()(),t(1060,"td",22)(1061,"em")(1062,"strong"),e(1063,"(opcional)"),i()(),t(1064,"p"),e(1065,"Texto exibido para resgistro n\xE3o encontrado."),i()()(),t(1066,"tr",15)(1067,"td",16)(1068,"div",17)(1069,"span",18),e(1070," saveNotificationError"),n(1071,"br"),i()()(),t(1072,"td",19)(1073,"code",28),e(1074,"string"),i()(),t(1075,"td",22)(1076,"em")(1077,"strong"),e(1078,"(opcional)"),i()(),t(1079,"p"),e(1080,"Texto exibido para ocorr\xEAncia de alguma inconsist\xEAncia ao salvar."),i()()(),t(1081,"tr",15)(1082,"td",16)(1083,"div",17)(1084,"span",18),e(1085," saveNotificationSuccessSave"),n(1086,"br"),i()()(),t(1087,"td",19)(1088,"code",28),e(1089,"string"),i()(),t(1090,"td",22)(1091,"em")(1092,"strong"),e(1093,"(opcional)"),i()(),t(1094,"p"),e(1095,"Texto exibido para recurso salvo com sucesso."),i()()(),t(1096,"tr",15)(1097,"td",16)(1098,"div",17)(1099,"span",18),e(1100," saveNotificationSuccessUpdate"),n(1101,"br"),i()()(),t(1102,"td",19)(1103,"code",28),e(1104,"string"),i()(),t(1105,"td",22)(1106,"em")(1107,"strong"),e(1108,"(opcional)"),i()(),t(1109,"p"),e(1110,"Texto exibido para recurso atualizado com sucesso."),i()()(),t(1111,"tr",15)(1112,"td",16)(1113,"div",17)(1114,"span",18),e(1115," saveNotificationWarning"),n(1116,"br"),i()()(),t(1117,"td",19)(1118,"code",28),e(1119,"string"),i()(),t(1120,"td",22)(1121,"em")(1122,"strong"),e(1123,"(opcional)"),i()(),t(1124,"p"),e(1125,"Texto exibido para adivert\xEAncia de formul\xE1rio preenchido de forma incorreta."),i()()()(),t(1126,"h4",32)(1127,"code",5),e(1128,"PoPageDynamicEditMetadata"),i()(),t(1129,"div",2)(1130,"p"),e(1131,"Interface para as propriedades de uma p\xE1gina din\xE2mica. "),n(1132,"a",41),i()(),t(1133,"h4",11),e(1134,"Propriedades"),i(),t(1135,"table",12)(1136,"tr",13)(1137,"th",14),e(1138,"Nome"),i(),t(1139,"th",14),e(1140,"Tipo"),i(),t(1141,"th",14),e(1142,"Descri\xE7\xE3o"),i()(),t(1143,"tr",15)(1144,"td",16)(1145,"div",17)(1146,"span",18),e(1147," actions"),n(1148,"br"),i()()(),t(1149,"td",19)(1150,"code",20),e(1151,"PoPageDynamicEditActions"),i()(),t(1152,"td",22)(1153,"em")(1154,"strong"),e(1155,"(opcional)"),i()(),t(1156,"p"),e(1157,"A\xE7\xF5es que o usu\xE1rio poder\xE1 executar na p\xE1gina atrav\xE9s de bot\xF5es."),i()()(),t(1158,"tr",15)(1159,"td",16)(1160,"div",17)(1161,"span",18),e(1162," autoRouter"),n(1163,"br"),i()()(),t(1164,"td",19)(1165,"code",23),e(1166,"boolean"),i()(),t(1167,"td",22)(1168,"em")(1169,"strong"),e(1170,"(opcional)"),i()(),t(1171,"p"),e(1172,"Cria automaticamente as rotas de edi\xE7\xE3o (novo/duplicate) e detalhes caso sejam definidas a\xE7\xF5es na propriedade "),t(1173,"code"),e(1174,"p-actions"),i()(),t(1175,"p"),e(1176,"As rotas criadas ser\xE3o baseadas na propriedade "),t(1177,"code"),e(1178,"p-actions"),i(),e(1179,"."),i(),t(1180,"blockquote")(1181,"p"),e(1182,"Para o correto funcionamento n\xE3o pode haver nenhuma rota coringa ("),t(1183,"code"),e(1184,"**"),i(),e(1185,") especificada."),i()()()(),t(1186,"tr",15)(1187,"td",16)(1188,"div",17)(1189,"span",18),e(1190," breadcrumb"),n(1191,"br"),i()()(),t(1192,"td",19)(1193,"code",24),e(1194,"PoBreadcrumb"),i()(),t(1195,"td",22)(1196,"em")(1197,"strong"),e(1198,"(opcional)"),i()(),t(1199,"p"),e(1200,"Objeto com propriedades do breadcrumb."),i()()(),t(1201,"tr",15)(1202,"td",16)(1203,"div",17)(1204,"span",18),e(1205," fields"),n(1206,"br"),i()()(),t(1207,"td",19)(1208,"code",25),e(1209,"Array<PoPageDynamicEditField>"),i()(),t(1210,"td",22)(1211,"em")(1212,"strong"),e(1213,"(opcional)"),i()(),t(1214,"p"),e(1215,"Lista dos campos usados."),i()()(),t(1216,"tr",15)(1217,"td",16)(1218,"div",17)(1219,"span",18),e(1220," title"),n(1221,"br"),i()()(),t(1222,"td",19)(1223,"code",28),e(1224,"string"),i()(),t(1225,"td",22)(1226,"em")(1227,"strong"),e(1228,"(opcional)"),i()(),t(1229,"p"),e(1230,"T\xEDtulo da p\xE1gina."),i()()(),t(1231,"tr",15)(1232,"td",16)(1233,"div",17)(1234,"span",18),e(1235," version"),n(1236,"br"),i()()(),t(1237,"td",19)(1238,"code",42),e(1239,"number"),i()(),t(1240,"td",22)(1241,"p"),e(1242,"Vers\xE3o do metadado devolvido pelo backend."),i()()()(),t(1243,"h4",32)(1244,"code",5),e(1245,"PoPageDynamicEditOptions"),i()(),t(1246,"div",2)(1247,"p"),e(1248,"Interface para as propriedades de uma p\xE1gina din\xE2mica."),i()(),t(1249,"h4",11),e(1250,"Propriedades"),i(),t(1251,"table",12)(1252,"tr",13)(1253,"th",14),e(1254,"Nome"),i(),t(1255,"th",14),e(1256,"Tipo"),i(),t(1257,"th",14),e(1258,"Descri\xE7\xE3o"),i()(),t(1259,"tr",15)(1260,"td",16)(1261,"div",17)(1262,"span",18),e(1263," actions"),n(1264,"br"),i()()(),t(1265,"td",19)(1266,"code",20),e(1267,"PoPageDynamicEditActions"),i()(),t(1268,"td",22)(1269,"em")(1270,"strong"),e(1271,"(opcional)"),i()(),t(1272,"p"),e(1273,"A\xE7\xF5es que o usu\xE1rio poder\xE1 executar na p\xE1gina atrav\xE9s de bot\xF5es."),i()()(),t(1274,"tr",15)(1275,"td",16)(1276,"div",17)(1277,"span",18),e(1278," breadcrumb"),n(1279,"br"),i()()(),t(1280,"td",19)(1281,"code",24),e(1282,"PoBreadcrumb"),i()(),t(1283,"td",22)(1284,"em")(1285,"strong"),e(1286,"(opcional)"),i()(),t(1287,"p"),e(1288,"Objeto com propriedades do breadcrumb."),i()()(),t(1289,"tr",15)(1290,"td",16)(1291,"div",17)(1292,"span",18),e(1293," fields"),n(1294,"br"),i()()(),t(1295,"td",19)(1296,"code",25),e(1297,"Array<PoPageDynamicEditField>"),i()(),t(1298,"td",22)(1299,"em")(1300,"strong"),e(1301,"(opcional)"),i()(),t(1302,"p"),e(1303,"Lista dos campos usados."),i()()(),t(1304,"tr",15)(1305,"td",16)(1306,"div",17)(1307,"span",18),e(1308," title"),n(1309,"br"),i()()(),t(1310,"td",19)(1311,"code",28),e(1312,"string"),i()(),t(1313,"td",22)(1314,"em")(1315,"strong"),e(1316,"(opcional)"),i()(),t(1317,"p"),e(1318,"T\xEDtulo da p\xE1gina."),i()()()()())},dependencies:[x],encapsulation:2})}return a})();var O=(()=>{class a{route;router;sub;hidePoWebSample=!0;samplesLength=2;activeTab="doc";actions=[{label:"Documenta\xE7\xE3o",action:this.goBack.bind(this),icon:"an an-file-text"},{label:"Colabore",action:this.improveDocs.bind(this)}];constructor(d,o){this.route=d,this.router=o}goBack(){this.router.navigate(["documentation"])}improveDocs(){this.router.navigate(["guides/development-flow"])}ngOnInit(){this.sub=this.route.queryParams.subscribe(d=>{let o=d.view;this.activeTab=o||"doc",this.hidePoWebSample=this.samplesLength===0})}ngOnDestroy(){this.sub.unsubscribe()}static \u0275fac=function(o){return new(o||a)(h(A),h(T))};static \u0275cmp=m({type:a,selectors:[["ng-component"]],standalone:!1,decls:7,vars:4,consts:[["p-title"," Page Dynamic Edit",3,"p-actions"],["p-size","1"],["p-label","Documenta\xE7\xE3o",3,"p-active"],["p-label","Exemplos",3,"p-hide","p-active"]],template:function(o,r){o&1&&(t(0,"po-page-default",0)(1,"po-tabs",1)(2,"po-tab",2),n(3,"sample-po-page-dynamic-edit-doc"),i(),t(4,"po-tab",3),n(5,"sample-po-page-dynamic-edit-basic-view")(6,"sample-po-page-dynamic-edit-user-view"),i()()()),o&2&&(l("p-actions",r.actions),p(2),l("p-active",r.activeTab.includes("doc")),p(2),l("p-hide",r.hidePoWebSample)("p-active",r.activeTab.includes("web")))},dependencies:[w,u,E,B,L,I],encapsulation:2})}return a})();var Y=[{path:"",component:O}],z=(()=>{class a{static \u0275fac=function(o){return new(o||a)};static \u0275mod=g({type:a});static \u0275inj=S({imports:[C.forChild(Y),C]})}return a})();var ge=(()=>{class a{static \u0275fac=function(o){return new(o||a)};static \u0275mod=g({type:a});static \u0275inj=S({imports:[q,z]})}return a})();export{ge as DocPoPageDynamicEditModule};