1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[785],{6610:function(e,n,i){"use strict";i.r(n),i.d(n,{default:function(){return I}});var r=i(266),t=i(809),l=i.n(t),s=i(58),a=i(63),c=i(4915),d=i(5284),o=i(9676),u=i(3105),h=i(3808),m=i(7294);function f(){return(f=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(e[r]=i[r])}return e}).apply(this,arguments)}var p=(0,a.G)(((e,n)=>{var i=(0,c.j)("Tag",e),r=(0,d.Lr)(e),t=f({display:"inline-flex",verticalAlign:"top",alignItems:"center",maxWidth:"100%"},i.container);return m.createElement(o.Fo,{value:i},m.createElement(u.m$.span,f({ref:n},r,{__css:t})))}));h.Ts&&(p.displayName="Tag");var x=(0,a.G)(((e,n)=>{var i=(0,o.yK)();return m.createElement(u.m$.span,f({ref:n,isTruncated:!0},e,{__css:i.label}))}));h.Ts&&(x.displayName="TagLabel");var j=(0,a.G)(((e,n)=>m.createElement(s.J,f({ref:n,verticalAlign:"top",marginEnd:"0.5rem"},e))));h.Ts&&(j.displayName="TagLeftIcon");var v=(0,a.G)(((e,n)=>m.createElement(s.J,f({ref:n,verticalAlign:"top",marginStart:"0.5rem"},e))));h.Ts&&(v.displayName="TagRightIcon");var g=e=>m.createElement(s.J,f({verticalAlign:"inherit",viewBox:"0 0 512 512"},e),m.createElement("path",{fill:"currentColor",d:"M289.94 256l95-95A24 24 0 00351 127l-95 95-95-95a24 24 0 00-34 34l95 95-95 95a24 24 0 1034 34l95-95 95 95a24 24 0 0034-34z"}));h.Ts&&(g.displayName="TagCloseIcon");h.Ts;var w=i(980),y=i(6034),T=i(8017),_=i(2572),q=i(336),b=i(1163),E=i(4753),K=i(8918),N=i(7257),L=i(1834),k=i(9428),C=i(9710),O=i(2465),z=i(1424),A=i(5893),I=function(){var e=(0,b.useRouter)(),n=(0,O.bp)(),i=n.app,t=(n.loading,n.error,(0,O.rO)().removeField),s=(0,w.useToast)(),a=(0,z.QT)().t,c=e.query.rid,d=e.query.id,o=null===i||void 0===i?void 0:i.schema[c];return(0,A.jsx)(C.R,{sidebar:(0,A.jsx)(k.Y,{}),breadcrumbs:[{title:a("home"),href:"/admin/apps/".concat(d)},{title:a("schemaManagement")},{title:(null===o||void 0===o?void 0:o.name)||""}],children:(0,A.jsx)(L.$,{title:(0,A.jsxs)(y.Kq,{children:[(0,A.jsxs)(y.Kq,{direction:"row",justifyContent:"space-between",children:[(0,A.jsx)(T.xu,{flex:1,children:(null===o||void 0===o?void 0:o.name)||"\u3000"}),(0,A.jsx)(_.z,{variant:"outline",colorScheme:"cyan",onClick:function(){return e.push("/admin/apps/".concat(d,"/schema/").concat(c,"/edit"))},children:a("edit")})]}),(null===o||void 0===o?void 0:o.description)&&(0,A.jsx)(T.xu,{fontSize:"md",fontWeight:"normal",children:o.description})]}),children:(0,A.jsx)(y.Kq,{spacing:2,children:(0,A.jsxs)(y.Kq,{spacing:4,children:[(0,A.jsxs)(y.Kq,{direction:"row",justifyContent:"space-between",children:[(0,A.jsx)(q.X,{size:"lg",children:a("field")}),(0,A.jsx)(_.z,{variant:"outline",colorScheme:"cyan",size:"sm",onClick:function(){return e.push("/admin/apps/".concat(d,"/schema/").concat(c,"/fields/new"))},children:a("add")})]}),o&&(o.fieldOrder.length?o.fieldOrder.map((function(e){var n;return(0,A.jsxs)(N.H,{title:o.fields[e].name,subtitle:"ID: ".concat(e),href:"/admin/apps/".concat(d,"/schema/").concat(c,"/fields/").concat(e),onRemove:(0,r.Z)(l().mark((function n(){return l().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,t(d,c,e);case 2:s({title:a("deleted"),status:"success",duration:2e3});case 3:case"end":return n.stop()}}),n)}))),children:[(0,A.jsxs)(y.Kq,{direction:"row",children:[(0,A.jsx)(T.xu,{w:40,children:a("type")}),(0,A.jsxs)(T.xu,{flex:1,children:["reference"===o.fields[e].type&&"\u300c".concat(null===i||void 0===i||null===(n=i.schema[o.fields[e].referTo])||void 0===n?void 0:n.name,"\u300d\u3078\u306e"),a(o.fields[e].type)]})]}),(0,A.jsxs)(y.Kq,{direction:"row",children:[(0,A.jsx)(T.xu,{w:40,children:a("validation")}),(0,A.jsxs)(y.Kq,{direction:"row",spacing:4,children:[o.fields[e].required&&(0,A.jsx)(p,{children:a("required")}),o.fields[e].pattern&&(0,A.jsxs)(p,{children:[a("pattern"),": /",(0,A.jsx)(T.xu,{display:"inline",color:"cyan.700",children:o.fields[e].pattern}),"/"]}),null!=o.fields[e].min&&(0,A.jsxs)(p,{children:[a("min"),": ",o.fields[e].min]}),null!=o.fields[e].max&&(0,A.jsxs)(p,{children:[a("max"),": ",o.fields[e].max]}),null!=o.fields[e].minLength&&(0,A.jsxs)(p,{children:[a("minLength"),": ",o.fields[e].minLength]}),null!=o.fields[e].maxLength&&(0,A.jsxs)(p,{children:[a("maxLength"),": ",o.fields[e].maxLength]})]})]}),o.fields[e].placeholder&&(0,A.jsxs)(y.Kq,{direction:"row",children:[(0,A.jsx)(T.xu,{w:40,children:a("placeholder")}),(0,A.jsx)(T.xu,{children:o.fields[e].placeholder})]}),o.fields[e].description&&(0,A.jsxs)(y.Kq,{direction:"row",children:[(0,A.jsx)(T.xu,{w:40,children:a("description")}),(0,A.jsx)(T.xu,{children:o.fields[e].description})]})]},e)})):(0,A.jsx)(E.S,{children:a("emptyField",{name:o.name,link:(0,A.jsx)(K.r,{href:"/admin/apps/".concat(d,"/schema/").concat(c,"/fields/new"),children:a("createField")})})}))]})})})})}},6918:function(e,n,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/apps/[id]/schema/[r
1id]",function(){return i(6610)}])}},function(e){e.O(0,[774,445,154,610,662,514,879,888,179],(function(){return n=6918,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.