1import{a as j}from"./chunk-HQWMDN3H.js";import"./chunk-R6YEXEWF.js";import"./chunk-75RKWSSN.js";import{a as A}from"./chunk-BVPASIAH.js";import{a as O}from"./chunk-DB4B64HI.js";import"./chunk-MJDHV3VI.js";import"./chunk-C5SPQASG.js";import{a as N}from"./chunk-N2XFC24T.js";import"./chunk-3DIYSQ3X.js";import"./chunk-LZY7MQ53.js";import"./chunk-RCLHC3IV.js";import"./chunk-Z5QBYIRP.js";import"./chunk-VTUX7Q46.js";import{b as U}from"./chunk-FXJ6F4FQ.js";import"./chunk-7L5RTW4N.js";import"./chunk-EACT3K5O.js";import"./chunk-7NJSFMXH.js";import"./chunk-LTOPK7O2.js";import"./chunk-BURJXNHZ.js";import"./chunk-6PX6BKM7.js";import"./chunk-IYGOSMGE.js";import{b as L}from"./chunk-6MOMYMQR.js";import{b as W}from"./chunk-SWV4IMCC.js";import"./chunk-M7W3MJMP.js";import"./chunk-MB4S4OCA.js";import"./chunk-Q4F3ZMVF.js";import"./chunk-M42BRZQV.js";import"./chunk-SO442UK2.js";import"./chunk-A6CZIMF5.js";import"./chunk-GGKSGYYC.js";import"./chunk-GYSMF3RG.js";import{a as E}from"./chunk-OX7ZUFOG.js";import{b as I}from"./chunk-JHAOIYIR.js";import"./chunk-HF2TUFEK.js";import"./chunk-GWT6AGLF.js";import"./chunk-VG52ZVIM.js";import"./chunk-PO3S3ZKZ.js";import"./chunk-JLBRSQDT.js";import{a as P}from"./chunk-QGUXFBSO.js";import"./chunk-EJPBLU37.js";import{a as F,b as R}from"./chunk-54F7LOSW.js";import"./chunk-TEGTBDYR.js";import{A as S,y as k}from"./chunk-DVBL7LOF.js";import"./chunk-EFWGSAMH.js";import"./chunk-DK2POT23.js";import"./chunk-J5UYJNLN.js";import"./chunk-YXSUFNEK.js";import"./chunk-L6KQYH4C.js";import"./chunk-7EY276MM.js";import"./chunk-663P75VG.js";import"./chunk-7SHEFHC3.js";import"./chunk-6UNDDKAT.js";import"./chunk-OC3XQ2QV.js";import"./chunk-HLBGSM4T.js";import"./chunk-4PGWZ6VV.js";import"./chunk-3AG2DZV3.js";import"./chunk-73OJ5PPB.js";import"./chunk-DUGOF5HY.js";import"./chunk-TVYQAABY.js";import{a as f}from"./chunk-3YSGJZ2W.js";import"./chunk-KL4PECIW.js";import{$b as p,Cb as v,Fa as b,Lc as _,Mc as w,Nc as x,Yc as c,Zc as u,ac as r,bc as h,cc as D,ha as C,mb as l,na as o,rc as g}from"./chunk-D4VRKA6Y.js";import{a as y,b as T,g as d}from"./chunk-LG6SK6BE.js";var a=class{constructor(){this.fieldProvider=o(A)}newColumn(i){let e=E(I());switch(i){case"number":return{uid:e,type:"number",config:this.fieldProvider.getDefaultFieldConfig("number")};case"text":return{uid:e,type:"text",config:this.fieldProvider.getDefaultFieldConfig("text")};case"boolean":return{uid:e,type:"boolean",config:this.fieldProvider.getDefaultFieldConfig("boolean")};case"choice":return{uid:e,type:"choice",config:this.fieldProvider.getDefaultFieldConfig("choice")};case"dataTableRef":return{uid:e,type:"dataTableRef",config:this.fieldProvider.getDefaultFieldConfig("dataTableRef")};case"icon":return{uid:e,type:"icon",config:this.fieldProvider.getDefaultFieldConfig("icon")};case"translatableText":return{uid:e,type:"translatableText",config:this.fieldProvider.getDefaultFieldConfig("translatableText")};case"dataTableLookup":return{uid:e,type:"dataTableLookup",config:this.fieldProvider.getDefaultFieldConfig("dataTableLookup")};default:throw P(i),new Error(`Unknown data-table column type: ${i}`)}}};a.\u0275fac=function(e){return new(e||a)},a.\u0275prov=C({token:a,factory:a.\u0275fac,providedIn:"root"}),a=d([f({checkProperties:!0})],a);var n=class{constructor(){this.dialogRef=o(F);this.data=o(R);this.i18n=o(k);this.toastProvider=o(U);this.dataTableProvider=o(a);this.label=b({});this.type=b("number");this.typeOptions=[{value:"number",label:this.i18n.instant("core.field.number.name")},{value:"text",label:this.i18n.instant("core.field.text.name")},{value:"boolean",label:this.i18n.instant("core.field.boolean.name")},{value:"choice",label:this.i18n.instant("core.field.choice.name")},{value:"dataTableRef",label:this.i18n.instant("core.field.dataTableRef.name")},{value:"dataTableLookup",label:this.i18n.instant("core.field.dataTableLookup.name")},{value:"icon",label:this.i18n.instant("core.field.icon.name")},{value:"translatableText",label:this.i18n.instant("core.field.translatableText.name")}]}async submit(){let i=this.label();if(!Object.values(i).some(t=>t&&t.trim())){this.toastProvider.showError(this.i18n.instant("core.data-table.name_required"));return}try{this.toastProvider.showWaiting("save");let t=this.dataTableProvider.newColumn(this.type()),s=T(y({},t),{label:i});await this.data.dataTableWrite.addColumn(s),this.toastProvider.showSuccess("save"),this.dialogRef.close(s)}catch(t){this.toastProvider.showError(t)}}};n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=v({type:n,selectors:[["h-data-table-column-create-dialog"]],decls:10,vars:12,consts:[["action","create",3,"submitClick"],[3,"label"],[1,"flex","col","gap-small"],[3,"heading"],["autofocus","","size","small",3,"valueChange","value"],["size","small",3,"valueChange","value","o
1ptions"]],template:function(e,t){e&1&&(r(0,"h-dialog-container",0),g("submitClick",function(){return t.submit()}),D(1,"h-dialog-heading",1),c(2,"translate"),r(3,"div",2)(4,"h-companion",3),c(5,"translate"),r(6,"h-input-translatable-text",4),x("valueChange",function(m){return w(t.label,m)||(t.label=m),m}),h()(),r(7,"h-companion",3),c(8,"translate"),r(9,"h-select-sig",5),g("valueChange",function(m){return t.type.set(m??"number")}),h()()()()),e&2&&(l(),p("label",u(2,6,"core.data-table.new_column")),l(3),p("heading",u(5,8,"_.name")),l(2),_("value",t.label),l(),p("heading",u(8,10,"core.data-table.column_type")),l(2),p("value",t.type())("options",t.typeOptions))},dependencies:[O,L,W,N,j,S],encapsulation:2,changeDetection:0}),n=d([f({checkProperties:!0})],n);export{n as DataTableColumnCreateDialogComponent};
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.