@daracl/form 0.0.7 → 0.0.8

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,5 +1,5 @@
1
1
  /*!
2
- * @daracl/form v0.0.7
2
+ * @daracl/form v0.0.8
3
3
  * Copyright 2023-2024 darainfo and other contributors;
4
4
  * Licensed MIT
5
5
  */.daracl-form{--border-color:#dfe1e5;--color-danger:#d9534f;--background-danger:#d9534f;--font-color:#686868;--font-hover-color:#3a3d41;--invalid-font-color:#ff4136;--invalid-border-color:#ffb6b4;--invalid-background-color:#fdd;--button-bg:#f6f6f6;--button-bg-hover:#ebebeb;--tab-bg:#f6f6f6;--tab-bg-hover:#ebebeb;--tooltip-background:#3e3e3e;--tooltip-color:#fff;--field-margin-top:10px;--input-bg:#fff;--input-color:#212529;--input-disabled-bg:#ebebeb;--bg-grid-header:#f1f1f1}.daracl-form.dark,body.dark .daracl-form{--border-color:#41444c;--color-danger:#d9534f;--background-danger:#d9534f;--font-color:#b9bdc1;--font-hover-color:#f5f3f3;--invalid-font-color:#ff4136;--invalid-border-color:#ffb6b4;--invalid-background-color:#fdd;--button-bg:#435ebe;--button-bg-hover:#3950a2;--tab-bg:#23418f;--tab-bg-hover:#516db1;--tooltip-background:#3e3e3e;--tooltip-color:#fff;--field-margin-top:10px;--input-bg:transparent;--input-color:#c6cddb;--input-disabled-bg:#878787;--bg-grid-header:#878787}.daracl-form{color:var(--font-color);margin-top:10px;padding:0}.daracl-form *,.daracl-form :after,.daracl-form :before{box-sizing:border-box}.daracl-form .txt-left{text-align:left}.daracl-form .txt-center{text-align:center}.daracl-form .txt-right{text-align:right}.daracl-form[data-df-mode=view] .form-field{border-color:transparent;border-width:0;outline:initial}.daracl-form[data-df-mode=view] .form-field:focus,.daracl-form[data-df-mode=view] .form-field:focus-visible{border-width:0}.daracl-form .df-hidden{display:none!important;margin:0!important;max-height:0!important;padding:0!important;visibility:collapse;width:0}.daracl-form input,.daracl-form select,.daracl-form textarea{background-color:transparent;color:var(--font-color)}.daracl-form input[disabled],.daracl-form select[disabled],.daracl-form textarea[disabled]{background-color:var(--input-disabled-bg);opacity:.8}.daracl-form .df-label{font-weight:700;overflow:initial;padding:5px 15px 0 0;position:relative;text-overflow:ellipsis;vertical-align:top;white-space:nowrap;word-break:break-all}.daracl-form .df-label .required{color:var(--color-danger)}.daracl-form .df-label .required:after{content:"*";vertical-align:middle}.daracl-form .df-label .df-tooltip{background:var(--tooltip-background);border-radius:8px;color:var(--tooltip-color);cursor:help;display:inline-block;font-size:12px;height:16px;line-height:16px;margin:0 5px;position:relative;text-align:center;visibility:visible;width:16px}.daracl-form .df-label .df-tooltip .tooltip{background:var(--tooltip-background);border-radius:5px;color:var(--tooltip-color);cursor:default;display:none;left:-10px;min-width:max-content;padding:10px 5px;position:absolute;text-align:initial;text-shadow:none;z-index:2}.daracl-form .df-label .df-tooltip:hover .tooltip{display:block}.daracl-form .form-field{background-clip:padding-box;background-color:var(--input-bg);border:1px solid var(--border-color);border-radius:4px;color:var(--input-color);display:block;font-weight:400;line-height:1.5;padding:.375rem .75rem;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out;width:100%}.daracl-form .form-field[type=checkbox],.daracl-form .form-field[type=radio]{display:inline;margin:0;min-height:0;padding:0;vertical-align:middle;width:14px}.daracl-form .form-field.dropdown{appearance:none;-webkit-appearance:none;-moz-appearance:none}.daracl-form .form-field.textarea{padding-right:0}.daracl-form .form-field[type=number]{padding-right:3px}.daracl-form .form-field.file{display:none}.daracl-form .form-field.range{padding:0}.daracl-form .df-row{display:-ms-flexbox;display:-webkit-box;display:flex;-ms-flex:0 1 auto;-webkit-box-flex:0;flex:0 1 auto;-ms-flex-direction:row;-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap}.daracl-form .df-row.vertical{display:block}.daracl-form .df-row.horizontal{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;max-width:none;width:auto}.daracl-form .df-row.horizontal>.form-group>.empty{display:none!important}.daracl-form .df-row.top{flex-direction:column}.daracl-form .df-row.top>div{max-width:100%!important}.daracl-form .df-row.right{-ms-flex-direction:row-reverse!important;-webkit-box-orient:horizontal!important;-webkit-box-direction:reverse!important;flex-direction:row-reverse!important}.daracl-form .df-row.bottom{flex-direction:column-reverse!important}.daracl-form .df-row.bottom>div{max-width:100%!important}.daracl-form .col-xs-1{flex-basis:8.33333333%;-webkit-box-flex:0;-ms-flex:0 0 8.33333333%;flex:0 0 8.33333333%;max-width:8.33333333%}.daracl-form .col-xs-2{flex-basis:16.66666667%;-webkit-box-flex:0;-ms-flex:0 0 16.66666667%;flex:0 0 16.66666667%;max-width:16.66666667%}.daracl-form .col-xs-3{flex-basis:25%;-webkit-box-flex:0;-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.daracl-form .col-xs-4{flex-basis:33.33333333%;-webkit-box-flex:0;-ms-flex:0 0 33.33333333%;flex:0 0 33.33333333%;max-width:33.33333333%}.daracl-form .col-xs-5{flex-basis:41.66666667%;-webkit-box-flex:0;-ms-flex:0 0 41.66666667%;flex:0 0 41.66666667%;max-width:41.66666667%}.daracl-form .col-xs-6{flex-basis:50%;-webkit-box-flex:0;-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.daracl-form .col-xs-7{flex-basis:58.33333333%;-webkit-box-flex:0;-ms-flex:0 0 58.33333333%;flex:0 0 58.33333333%;max-width:58.33333333%}.daracl-form .col-xs-8{flex-basis:66.66666667%;-webkit-box-flex:0;-ms-flex:0 0 66.66666667%;flex:0 0 66.66666667%;max-width:66.66666667%}.daracl-form .col-xs-9{flex-basis:75%;-webkit-box-flex:0;-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.daracl-form .col-xs-10{flex-basis:83.33333333%;-webkit-box-flex:0;-ms-flex:0 0 83.33333333%;flex:0 0 83.33333333%;max-width:83.33333333%}.daracl-form .col-xs-11{flex-basis:91.66666667%;-webkit-box-flex:0;-ms-flex:0 0 91.66666667%;flex:0 0 91.66666667%;max-width:91.66666667%}.daracl-form .col-xs-12{flex-basis:100%;-webkit-box-flex:0;-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.daracl-form .align-items-center{-webkit-box-align:center!important;-ms-flex-align:center!important;align-items:center!important}.daracl-form .col-xs{-webkit-flex-grow:1;-ms-flex-positive:1;-webkit-box-flex:1;flex-grow:1;-ms-flex-preferred-size:0;flex-basis:0;max-width:100%}.daracl-form .col-auto{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;max-width:none;width:auto}.daracl-form .col-fix{flex:none}.daracl-form .col-full{flex:1;overflow:auto}.daracl-form .df-field-container{overflow:initial;position:relative}.daracl-form .df-field-container>.df-row{margin-top:-10px}.daracl-form .df-field-container>div+.df-row{margin-top:0}.daracl-form .df-field-container .df-field{margin-right:10px;position:relative}.daracl-form .df-field-container .df-field .range-num{clear:both;display:block;text-align:left;width:100%}.daracl-form .df-field-container .df-field .file-wrapper{background-clip:padding-box;border:1px solid var(--border-color);border-radius:4px;display:block;font-weight:400;line-height:1.5;padding:.375rem .75rem;text-align:center;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out;width:100%}.daracl-form .daracl-file-list .file-icon{cursor:pointer;display:inline-block;height:20px;vertical-align:middle;width:20px}.daracl-form .daracl-file-list .file-icon:hover{background-color:var(--button-bg-hover)}.daracl-form .daracl-file-list .file-icon.download{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBmaWxsPSJub25lIiBkPSJNMCAwaDI0djI0SDB6Ii8+PHBhdGggZD0iTTE4IDE1djNINnYtM0g0djNjMCAxLjEuOSAyIDIgMmgxMmMxLjEgMCAyLS45IDItMnYtM3ptLTEtNC0xLjQxLTEuNDFMMTMgMTIuMTdWNGgtMnY4LjE3TDguNDEgOS41OSA3IDExbDUgNXoiLz48L3N2Zz4=)}.daracl-form .daracl-file-list .file-icon.remove{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBmaWxsPSJub25lIiBkPSJNMCAwaDI0djI0SDB6Ii8+PHBhdGggZD0iTTE2IDl2MTBIOFY5em0tMS41LTZoLTVsLTEgMUg1djJoMTRWNGgtMy41ek0xOCA3SDZ2MTJjMCAxLjEuOSAyIDIgMmg4YzEuMSAwIDItLjkgMi0yeiIvPjwvc3ZnPg==)}.daracl-form .daracl-file-list .file-name{text-overflow:ellipsis;white-space:nowrap;word-wrap:normal;display:inline-block;overflow:hidden;vertical-align:middle;width:calc(100% - 55px)}.daracl-form .field-group .field.vertical>*{display:block}.daracl-form .tab-header{border-bottom:1px solid var(--border-color);display:flex;line-height:1.3;list-style:none;margin:0;padding:0;width:100%}.daracl-form .tab-header.tab-al-left{justify-content:left}.daracl-form .tab-header.tab-al-right{justify-content:right}.daracl-form .tab-header.tab-al-center{justify-content:center}.daracl-form .tab-header>.tab-item{float:left;list-style:none;margin:1px .4em 0 0;padding:0;position:relative;top:0;white-space:nowrap}.daracl-form .tab-header>.tab-item.active a{background-color:var(--tab-bg);color:var(--font-hover-color)}.daracl-form .tab-header>.tab-item a{border:solid transparent;border-top-left-radius:calc(.45rem - 1px);border-top-right-radius:calc(.45rem - 1px);border-width:1px 1px 0;color:var(--font-color);float:left;height:30px;line-height:15px;padding:.5em 1em;text-decoration:none}.daracl-form .tab-header>.tab-item a:hover{background-color:var(--tab-bg-hover);border:solid var(--border-color);border-width:1px 1px 0}.daracl-form .df-tab-body .tab-panel{display:none}.daracl-form .df-tab-body .tab-panel.active{display:block}.daracl-form .df-btn{background-color:var(--button-bg);border:1px solid var(--border-color);border-radius:calc(.45rem - 1px);cursor:pointer;padding:5px 10px;transition:background-color .3s}.daracl-form .df-btn:hover{background-color:var(--button-bg-hover);color:var(--font-hover-color)}.daracl-form .df-icon{display:inline-block;height:21px;vertical-align:middle;width:21px}.daracl-form .df-add-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='%235f6368' viewBox='0 -960 960 960'%3E%3Cpath d='M431-431H220.78v-98H431v-210.22h98V-529h210.22v98H529v210.22h-98z'/%3E%3C/svg%3E")}.daracl-form .df-remove-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='%235f6368' viewBox='0 -960 960 960'%3E%3Cpath d='M291-221.91 221.91-291l189-189-189-189L291-738.09l189 189 189-189L738.09-669l-189 189 189 189L669-221.91l-189-189z'/%3E%3C/svg%3E")}.daracl-form .form-group{display:-ms-flexbox;display:-webkit-box;display:flex;-ms-flex-direction:row;-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-bottom:0;margin-left:0!important;margin-right:0!important;margin-top:var(--field-margin-top)}.daracl-form .form-group:last-child{margin-bottom:0}.daracl-form .form-group.top{flex-direction:column}.daracl-form .form-group.top>div{max-width:100%!important}.daracl-form .form-group.right{-ms-flex-direction:row-reverse!important;-webkit-box-orient:horizontal!important;-webkit-box-direction:reverse!important;flex-direction:row-reverse!important}.daracl-form .form-group.bottom{flex-direction:column-reverse!important}.daracl-form .form-group.bottom>div{max-width:100%!important}.daracl-form .form-group .help-message{display:none}.daracl-form .form-group .help-icon{background-position-y:center;background-repeat:no-repeat}.daracl-form .form-group .help-icon.form-field{background-position-x:calc(100% - 15px)}.daracl-form .form-group .help-icon.daracl-icon{display:none;height:100%;margin-right:15px;position:absolute;right:0;top:0;width:20px;z-index:1}.daracl-form .form-group.invalid .form-field{border-color:var(--invalid-border-color);outline-color:var(--invalid-border-color)}.daracl-form .form-group.invalid>.df-field-container.required>.df-field .help-icon{background-image:url("data:image/svg+xml; base64, PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgLTk2MCA5NjAgOTYwIiB3aWR0aD0iMjAiPjxwYXRoIGQ9Im0yNDktMjA3LTQyLTQyIDIzMS0yMzEtMjMxLTIzMSA0Mi00MiAyMzEgMjMxIDIzMS0yMzEgNDIgNDItMjMxIDIzMSAyMzEgMjMxLTQyIDQyLTIzMS0yMzEtMjMxIDIzMVoiIHN0eWxlPSImIzEwOyAgICBmaWxsOiAjZmY3MzczOyYjMTA7Ii8+PC9zdmc+");display:block}.daracl-form .form-group.invalid .help-message{color:var(--invalid-font-color);display:block}.daracl-form .form-group.valid>.df-field-container.required>.df-field .help-icon{background-image:url("data:image/svg+xml; base64, PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgLTk2MCA5NjAgOTYwIiB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHN0eWxlPSImIzEwOyAgICBmaWxsOiAjMTlhOTc0OyYjMTA7Ij48cGF0aCBkPSJNMzc4LTI0NiAxNTQtNDcwbDQzLTQzIDE4MSAxODEgMzg0LTM4NCA0MyA0My00MjcgNDI3WiIvPjwvc3ZnPg==");display:block}.daracl-form .form-group .file-label{background-clip:padding-box;border:1px solid var(--border-color);border-radius:4px;display:inline;line-height:1;padding:3px 15px;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out;width:100%}.daracl-form .form-group .file-label:hover{background-color:var(--button-bg-hover)}.daracl-form .df-grid-field{margin-right:10px}.daracl-form .df-grid-field .df-grid-btn-area{border:1px solid var(--border-color);padding:3px}.daracl-form .df-grid-field .df-grid-container{border:1px solid var(--border-color);height:auto;overflow-y:auto;width:100%}.daracl-form .df-grid-field .df-grid-container .df-btn{padding:3px 5px}.daracl-form .df-grid-field .df-grid-container .df-grid{border-collapse:collapse;border-top-width:0;width:100%}.daracl-form .df-grid-field .df-grid-container .df-grid>thead th{background-color:var(--bg-grid-header);border-bottom:1px solid var(--border-color);position:sticky;text-align:center;top:0;z-index:10}.daracl-form .df-grid-field .df-grid-container .df-grid .help-message{display:none}.daracl-form .df-grid-field .df-grid-container .df-grid td,.daracl-form .df-grid-field .df-grid-container .df-grid th{padding:3px 5px}.daracl-form .df-grid-field .df-grid-container .df-grid .help-icon{background-position-y:center;background-repeat:no-repeat}.daracl-form .df-grid-field .df-grid-container .df-grid .help-icon.form-field{background-position-x:calc(100% - 15px)}.daracl-form .df-grid-field .df-grid-container .df-grid .help-icon.daracl-icon{display:none;height:100%;margin-right:15px;position:absolute;right:0;top:0;width:20px;z-index:1}.daracl-form .df-grid-field .df-grid-container .df-grid .grid-column{position:relative}.daracl-form .df-grid-field .df-grid-container .df-grid .invalid .form-field{border-color:var(--invalid-border-color);outline-color:var(--invalid-border-color)}.daracl-form .df-grid-field .df-grid-container .df-grid .invalid>.grid-column.required .df-field .help-icon{background-image:url("data:image/svg+xml; base64, PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgLTk2MCA5NjAgOTYwIiB3aWR0aD0iMjAiPjxwYXRoIGQ9Im0yNDktMjA3LTQyLTQyIDIzMS0yMzEtMjMxLTIzMSA0Mi00MiAyMzEgMjMxIDIzMS0yMzEgNDIgNDItMjMxIDIzMSAyMzEgMjMxLTQyIDQyLTIzMS0yMzEtMjMxIDIzMVoiIHN0eWxlPSImIzEwOyAgICBmaWxsOiAjZmY3MzczOyYjMTA7Ii8+PC9zdmc+");display:block}.daracl-form .df-grid-field .df-grid-container .df-grid .invalid .help-message{background-color:var(--invalid-background-color);border:1px solid var(--invalid-border-color);border-color:var(--invalid-border-color) transparent transparent transparent;border-radius:.4rem;color:var(--invalid-font-color);display:block;left:50%;min-width:270px;padding:5px;position:absolute;top:calc(100% + 6px);transform:translateX(-50%);z-index:2}.daracl-form .df-grid-field .df-grid-container .df-grid .invalid .help-message:after{border:7px solid transparent;border-bottom:7px solid var(--invalid-border-color);border-left:0;border-top:0;content:"";height:0;left:50%;margin-left:-3.5px;margin-top:-7px;position:absolute;top:0;width:0}.daracl-form .df-grid-field .df-grid-container .df-grid .valid>.grid-column.required .df-field .help-icon{background-image:url("data:image/svg+xml; base64, PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgLTk2MCA5NjAgOTYwIiB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHN0eWxlPSImIzEwOyAgICBmaWxsOiAjMTlhOTc0OyYjMTA7Ij48cGF0aCBkPSJNMzc4LTI0NiAxNTQtNDcwbDQzLTQzIDE4MSAxODEgMzg0LTM4NCA0MyA0My00MjcgNDI3WiIvPjwvc3ZnPg==");display:block}.daracl-datetime-hidden{height:0;visibility:visible;width:0;z-index:1000}.daracl-datetime-wrapper{--color:#34495e;--light:#fff;--success:#0abf30;--error:#e24d4c;--warning:#e9bd0c;--info:#3498db;--background-color:#fff;--sunday:#f00d0d;--border-color:#d3d2d2;--select-background-color:#0abf30;--button-hover-color:#d4d4d48a;--disabled-background-color:#f1f1f18a;--today-bg:#a9d5ff}.daracl-datetime-wrapper.dark,body.dark .daracl-datetime-wrapper{--color:#d0d6e1;--light:#fff;--success:#0abf30;--error:#e24d4c;--warning:#e9bd0c;--info:#3498db;--background-color:#070d19;--sunday:#f00d0d;--border-color:#6e7380;--today-bg:#5660d9;--today-color:#5660d9;--select-background-color:#fff;--button-hover-color:#31316c;--disabled-background-color:#818181}.daracl-datetime-wrapper{display:none;z-index:1000}.daracl-datetime-wrapper *,.daracl-datetime-wrapper :after,.daracl-datetime-wrapper :before{box-sizing:content-box;color:var(--color)}.daracl-datetime-wrapper.layer{position:absolute}.daracl-datetime-wrapper input{background-color:transparent}.daracl-datetime-wrapper.show{animation:fadeIn .5s;animation-fill-mode:forwards;display:block}.daracl-datetime-wrapper.hide{animation:fadeOut .5s;animation-fill-mode:forwards}.daracl-datetime-wrapper.embed{display:block}.daracl-datetime-wrapper .sun>span{color:var(--sunday)}.daracl-datetime-wrapper .ddtp-datetime{background-color:var(--background-color);border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);color:var(--color);padding:10px;width:235px}.daracl-datetime-wrapper .ddtp-datetime.rtl{direction:rtl}.daracl-datetime-wrapper .ddtp-datetime.rtl .ddtp-header .ddtp-header-month,.daracl-datetime-wrapper .ddtp-datetime.rtl .ddtp-header .ddtp-header-year{float:right}.daracl-datetime-wrapper .ddtp-datetime.rtl .ddtp-header .ddtp-date-move{float:left}.daracl-datetime-wrapper .ddtp-datetime.rtl .ddtp-body .ddtp-times .time-container{display:block}.daracl-datetime-wrapper .ddtp-datetime.rtl .ddtp-body .ddtp-times>.time-btn{left:0;right:auto}.daracl-datetime-wrapper .ddtp-datetime[view-mode=date] .ddtp-body>.ddtp-days,.daracl-datetime-wrapper .ddtp-datetime[view-mode=datetime] .ddtp-body>.ddtp-days,.daracl-datetime-wrapper .ddtp-datetime[view-mode=datetime] .ddtp-body>.ddtp-times,.daracl-datetime-wrapper .ddtp-datetime[view-mode=time] .ddtp-body>.ddtp-times{display:block}.daracl-datetime-wrapper .ddtp-datetime[view-mode=time] .ddtp-header{display:none}.daracl-datetime-wrapper .ddtp-datetime[view-mode=year] .ddtp-body>.ddtp-years{display:flex}.daracl-datetime-wrapper .ddtp-datetime[view-mode=year] .ddtp-header-month{display:none}.daracl-datetime-wrapper .ddtp-datetime[view-mode=month] .ddtp-body>.ddtp-months{display:flex}.daracl-datetime-wrapper .ddtp-datetime[view-mode=month] .ddtp-header-month{display:none}.daracl-datetime-wrapper .ddtp-header{height:25px;line-height:25px;padding:2px 5px 10px;vertical-align:middle}.daracl-datetime-wrapper .ddtp-header .ddtp-header-year{cursor:pointer;font-weight:700;margin:0 10px 0 0}.daracl-datetime-wrapper .ddtp-header .ddtp-header-month{cursor:pointer;font-weight:700;margin:0 10px 0 0;vertical-align:top}.daracl-datetime-wrapper .ddtp-header .ddtp-date-move{direction:ltr;float:right;margin-left:auto;vertical-align:top}.daracl-datetime-wrapper .ddtp-header .ddtp-date-move .ddtp-move-btn{display:inline-block;font-weight:700;height:24px;text-decoration:none}.daracl-datetime-wrapper .ddtp-header .ddtp-date-move .ddtp-move-btn>svg{fill:var(--color)}.daracl-datetime-wrapper .ddtp-header .ddtp-date-move .ddtp-move-btn:hover{background-color:var(--button-hover-color)}.daracl-datetime-wrapper .ddtp-header .ddtp-date-move:after{clear:both;content:""}.daracl-datetime-wrapper .ddtp-body{font-size:13px;margin:-2px -10px}.daracl-datetime-wrapper .ddtp-body>*{display:none}.daracl-datetime-wrapper .ddtp-body button{background-color:var(--background-color);border-color:var(--border-color);border-radius:4px;border-style:solid;border-width:1px;display:block;margin-bottom:7px;padding:3px 0;width:100%}.daracl-datetime-wrapper .ddtp-body .time-today:hover,.daracl-datetime-wrapper .ddtp-body button:hover{background-color:var(--button-hover-color)}.daracl-datetime-wrapper .ddtp-body .ddtp-days{border-collapse:separate;border-spacing:0;letter-spacing:0;margin:2px 10px;width:inherit}.daracl-datetime-wrapper .ddtp-body .ddtp-days .ddtp-day-label{font-weight:700;line-height:normal;padding:2px 5px;text-align:center;width:35px}.daracl-datetime-wrapper .ddtp-body .ddtp-days .ddtp-day{cursor:pointer;line-height:normal;padding:7px;position:relative;text-align:center}.daracl-datetime-wrapper .ddtp-body .ddtp-days .ddtp-day.event:after{color:#f78536;content:"•";font-size:1.4em;left:2px;position:absolute;top:-7px;z-index:10}.daracl-datetime-wrapper .ddtp-body .ddtp-days .ddtp-day:before{background-color:var(--select-background-color);border-radius:50%;content:"";display:block;height:30px;left:50%;opacity:0;position:absolute;top:50%;transform:translate(-50%,-50%);transition:opacity .2s ease-in;width:30px;z-index:0}.daracl-datetime-wrapper .ddtp-body .ddtp-days .ddtp-day:active:before,.daracl-datetime-wrapper .ddtp-body .ddtp-days .ddtp-day:hover:before{opacity:.7;transition:opacity .2s ease-out}.daracl-datetime-wrapper .ddtp-body .ddtp-days .ddtp-day.today>span{position:relative;z-index:2}.daracl-datetime-wrapper .ddtp-body .ddtp-days .ddtp-day.today:before{background-color:var(--today-bg);opacity:1;transition:opacity .2s ease-out;z-index:1}.daracl-datetime-wrapper .ddtp-body .ddtp-days .ddtp-day.select:before{background-color:var(--select-background-color);opacity:.5;transition:opacity .2s ease-out}.daracl-datetime-wrapper .ddtp-body .ddtp-days .ddtp-day.new,.daracl-datetime-wrapper .ddtp-body .ddtp-days .ddtp-day.old{opacity:.5}.daracl-datetime-wrapper .ddtp-body .ddtp-days .ddtp-day.disabled{background-color:var(--disabled-background-color);cursor:auto;opacity:.5}.daracl-datetime-wrapper .ddtp-body .ddtp-days .ddtp-day.disabled:before{background-color:transparent}.daracl-datetime-wrapper .ddtp-body .ddtp-times{margin:2px 15px;position:relative}.daracl-datetime-wrapper .ddtp-body .ddtp-times>.time-container{display:inline-block;height:60px;width:calc(100% - 60px)}.daracl-datetime-wrapper .ddtp-body .ddtp-times input[type=number]{-moz-appearance:textfield;appearance:textfield}.daracl-datetime-wrapper .ddtp-body .ddtp-times input[type=number]::-webkit-inner-spin-button,.daracl-datetime-wrapper .ddtp-body .ddtp-times input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none}.daracl-datetime-wrapper .ddtp-body .ddtp-times>.time-btn{position:absolute;right:0;top:9px;width:55px}.daracl-datetime-wrapper .ddtp-body .ddtp-times>.time-btn>.time-select{height:40px}.daracl-datetime-wrapper .ddtp-body .ddtp-times .ddtp-time{display:table-row;width:160px}.daracl-datetime-wrapper .ddtp-body .ddtp-times .ddtp-time>*{display:table-cell;line-height:20px;margin-top:5px;vertical-align:middle}.daracl-datetime-wrapper .ddtp-body .ddtp-times .ddtp-time>span{width:20px}.daracl-datetime-wrapper .ddtp-body .ddtp-times .ddtp-time>input[type=number]{border-color:var(--border-color);border-radius:4px;border-width:1px;margin-right:5px;padding-left:0;text-align:center;width:45px}.daracl-datetime-wrapper .ddtp-body .ddtp-times .ddtp-time>input[type=range]{width:calc(100% - 60px)}.daracl-datetime-wrapper .ddtp-body .ddtp-months{flex-direction:row;flex-wrap:wrap;justify-content:space-between}.daracl-datetime-wrapper .ddtp-body .ddtp-months>.ddtp-month{cursor:pointer;flex:1 0 30%;line-height:50px;margin-bottom:8px;position:relative;text-align:center}.daracl-datetime-wrapper .ddtp-body .ddtp-months>.ddtp-month:before{background-color:var(--select-background-color);border-radius:50%;content:"";display:block;height:50px;left:50%;opacity:0;position:absolute;top:50%;transform:translate(-50%,-50%);transition:opacity .2s ease-in;width:50px;z-index:0}.daracl-datetime-wrapper .ddtp-body .ddtp-months>.ddtp-month:active:before,.daracl-datetime-wrapper .ddtp-body .ddtp-months>.ddtp-month:hover:before{opacity:.5;transition:opacity .2s ease-out}.daracl-datetime-wrapper .ddtp-body .ddtp-months>.ddtp-month.disabled{background-color:var(--disabled-background-color);cursor:auto;opacity:.5}.daracl-datetime-wrapper .ddtp-body .ddtp-months>.ddtp-month.disabled:before{background-color:transparent}.daracl-datetime-wrapper .ddtp-years{flex-direction:row;flex-wrap:wrap;justify-content:space-between}.daracl-datetime-wrapper .ddtp-years>.ddtp-year{cursor:pointer;flex:1 0 25%;line-height:50px;margin-bottom:8px;position:relative;text-align:center}.daracl-datetime-wrapper .ddtp-years>.ddtp-year:before{background-color:var(--select-background-color);border-radius:50%;content:"";display:block;height:50px;left:50%;opacity:0;position:absolute;top:50%;transform:translate(-50%,-50%);transition:opacity .2s ease-in;width:50px;z-index:0}.daracl-datetime-wrapper .ddtp-years>.ddtp-year:active:before,.daracl-datetime-wrapper .ddtp-years>.ddtp-year:hover:before{opacity:.5;transition:opacity .2s ease-out}.daracl-datetime-wrapper .ddtp-years>.ddtp-year.disabled{background-color:var(--disabled-background-color);cursor:auto;opacity:.5}.daracl-datetime-wrapper .ddtp-years>.ddtp-year.disabled:before{background-color:transparent}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeOut{0%{opacity:1}to{opacity:0}}
@@ -1,7 +1,7 @@
1
1
  /*!
2
- * @daracl/form v0.0.7
2
+ * @daracl/form v0.0.8
3
3
  * Copyright 2023-2024 darainfo and other contributors;
4
4
  * Licensed MIT
5
5
  */
6
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Daracl=t():(e.Daracl=e.Daracl||{},e.Daracl.form=t())}(self,(()=>(()=>{"use strict";var e,t={9:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});const l=i(635),s=l.__importStar(i(47)),n=l.__importDefault(i(700)),a=i(673),o=i(181),r=i(913),d=l.__importDefault(i(347)),u=l.__importDefault(i(805)),h={style:{width:"100%",labelWidth:3,valueWidth:9,position:"left-right"},mode:"new",useTypeValue:!0,autoCreate:!0,notValidMessage:"This form is not valid.",fields:[]},c={},f="data-form-uid";let m=0;class v{constructor(e,t,i){var l;if(this.formValue={},this.changeMode=e=>{this.options.mode=e,this.formElement.setAttribute("data-df-mode",e)},this.resetForm=()=>{const e=this.fieldInfoMap.getAllFieldInfo();for(const t in e){const i=e[t].$instance;i&&"function"==typeof i.reset&&i.reset()}this.formValue={},this.conditionCheck()},this.resetField=e=>{this.fieldInfoMap.getFieldName(e).$instance.reset(),this.formValue[e]="",this.conditionCheck()},this.getFieldValue=e=>{const t=this.fieldInfoMap.getFieldName(e);return t?t.$instance.getValue():null},this.getValue=e=>this.fieldInfoMap.getAllFieldValue(this.formValue,e),this.getFormDataValue=e=>this.fieldInfoMap.getFormDataValue(this.formValue,e),this.setValue=(e,t)=>{!1!==t&&this.resetForm(),Object.keys(e).forEach((t=>{this._setFieldValue(t,e[t])})),this.conditionCheck()},this.setFieldValue=(e,t)=>{this._setFieldValue(e,t),this.conditionCheck()},this.setFieldItems=(e,t)=>{const i=this.fieldInfoMap.getFieldName(e);if(i)return i.$instance.setValueItems(t)},this.addField=e=>{this.options.fields.push(e),this.formTemplate.addRow(e),this.conditionCheck()},this.removeField=e=>{var t;const i=this.getFieldElement(e);null!=i&&(null===(t=i.closest(".df-row"))||void 0===t||t.remove()),this.fieldInfoMap.removeFieldInfo(e)},this.isValidForm=()=>this.validForm().length<1,this.validForm=()=>{let e=[],t=!1!==this.options.autoFocus,i=!0;const l=this.fieldInfoMap.getAllFieldInfo();for(const n in l){const a=l[n];let o=this.fieldInfoMap.getFieldValidation(a,t);!0!==o&&(t=!1,s.isGridType(a)?e=e.concat(o):(i&&(this.validTabCheck(a),i=!1),e.push(o)))}return e},this.isValidField=e=>{const t=this.fieldInfoMap.getFieldName(e);if(s.isUndefined(t))throw new Error(`Field name [${e}] not found`);const i=t.$instance;return!i||!0===i.valid()},this.getOptions=()=>this.options,this.destroy=()=>{this.formElement.className=this.orginFormStyleClass,this.formElement.replaceChildren();for(const e in this)s.hasOwnProp(this,e)&&(delete this[e],delete c[this.selector])},this.getFields=()=>this.options.fields,this.setFields=e=>{this.options.fields=e,this.createForm(e)},this.options=s.merge({},h,t),n.default.set(i),!e)throw new Error(`${e} form selector not found`);this.orginFormStyleClass=e.className,e.classList.add("daracl-form"),this.selector="df_"+ ++m,e.setAttribute("name",this.selector),e.setAttribute(f,this.selector),this.options.style.width&&e.setAttribute("style",`width:${this.options.style.width};`),this.formElement=e,this.changeMode(null!==(l=this.options.mode)&&void 0!==l?l:"new"),this.createForm(this.options.fields),!1!==this.options.autoCreate&&(c[this.selector]=this)}static create(e,t,i){return new v(e,t,i)}static setMessage(e){n.default.set(e)}createForm(e){this.fieldInfoMap=new d.default(this.selector,this),this.formTemplate=new u.default(this,this.formElement,this.fieldInfoMap),!1!==this.options.autoCreate&&(e.forEach((e=>{this.formTemplate.addRow(e)})),this.conditionCheck(),this.options.onMounted&&this.options.onMounted.call(this))}getFieldElement(e){const t=this.fieldInfoMap.getFieldName(e);return(null==t?void 0:t.$instance)?t.$instance.getElement():null}getField(e){return this.fieldInfoMap.getFieldName(e)}_setFieldValue(e,t){this.formValue[e]=t;const i=this.fieldInfoMap.getFieldName(e);i&&i.$instance.setValue(t)}validTabCheck(e){e.$parent&&("tab"==e.$parent.renderType&&e.$parent.$instance.setActive(e.$key),this.validTabCheck(e.$parent))}conditionCheck(){this.fieldInfoMap.conditionCheck()}setFieldDisabled(e,t){this.fieldInfoMap.getFieldName(e).$instance.setDisabled(t)}setFieldDescription(e,t){this.fieldInfoMap.getFieldName(e).$instance.setDescription(t)}static instance(e){let t;t=s.isString(e)?document.querySelector(e):e;let i=t.getAttribute(f);if(s.isUndefined(i)||s.isBlank(i)){const e=Object.keys(c);if(e.length>1)throw new Error(`selector empty : [${i}]`);return i=e[0],c[i]}}getFieldInfoMap(){return this.fieldInfoMap}}v.VERSION="0.0.7",v.validator={string:(e,t)=>(0,a.stringValidator)(e,t),number:(e,t)=>(0,o.numberValidator)(e,t),regexp:(e,t)=>{let i={name:t.name,constraint:[]};return(0,r.regexpValidator)(e,t,i)}},t.default=v},347:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});const l=i(635),s=i(224),n=i(436),a=l.__importDefault(i(700)),o=l.__importStar(i(47));function r(e,t,i){if(o.ignoreValueField(t))return e;const l=t.$instance.getValue();if("file"===t.renderType){const i=l.uploadFile;e[t.$validName]=i,e[t.$validName+"RemoveIds"]=l.removeIds}else if(!0!==i)if(o.isTabType(t))for(let[t,i]of Object.entries(l))e[t]=i;else o.isEmpty(t.name)||(e[t.name]=l);else e[t.$validName]=l;return e}function d(e,t,i){if(o.ignoreValueField(t))return e;const l=t.$instance.getValue();if("file"===t.renderType){const i=l.uploadFile;e.delete(t.$validName);for(let l of i)e.append(t.$validName,l);e.set(t.$validName+"RemoveIds",l.removeIds)}else if(!0!==i)if(o.isTabType(t))for(let[t,i]of Object.entries(l))e.set(t,i);else o.isEmpty(t.name)||e.set(t.$validName,l);else e.set(t.$validName,l);return e}t.default=class{constructor(e,t){this.fieldIdx=0,this.allFieldInfo={},this.keyNameMap={},this.conditionFields=[],this.fieldPrefix=`${s.FIELD_PREFIX}_${o.getHashCode(e)}`,this.form=t}addField(e){var t;o.replaceXssField(e),this.fieldIdx+=1,e.$key=`${this.fieldPrefix}_${this.fieldIdx}`,e.$validName=null!==(t=e.name)&&void 0!==t?t:e.label,this.keyNameMap[e.$validName]=e.$key,this.allFieldInfo[e.$key]=e,e.$renderType=(0,n.getRenderer)(e),e.conditional&&this.conditionFields.push(e.$key)}getFieldName(e){return this.allFieldInfo[this.keyNameMap[e]]}get(e){return this.allFieldInfo[e]}hasFieldName(e){return!(!this.keyNameMap[e]||!this.allFieldInfo[this.keyNameMap[e]])}getAllFieldInfo(){return this.allFieldInfo}removeFieldInfo(e){delete this.allFieldInfo[this.keyNameMap[e]]}getAllFieldValue(e,t){const i=this.form.getOptions().useTypeValue;if(!0!==t){for(let[t,l]of Object.entries(this.allFieldInfo))e=r(e,l,i);return e}return new Promise(((t,l)=>{for(let[t,s]of Object.entries(this.allFieldInfo)){if(!s.$instance.isEnableView())continue;let t=this.getFieldValidation(s,!0);if(!0!==t)return void l(new Error(t.message,{cause:t}));e=r(e,s,i)}t(e)}))}getFormDataValue(e,t){if(!0!==t){let t=new FormData;for(let[i,l]of Object.entries(e))t.set(i,l);for(let[e,i]of Object.entries(this.allFieldInfo))d(t,i,i.$instance.getValue());return t}return new Promise(((t,i)=>{let l=new FormData;for(let[t,i]of Object.entries(e))l.set(t,i);for(let[e,t]of Object.entries(this.allFieldInfo)){if(!t.$instance.isEnableView())continue;let e=this.getFieldValidation(t,!0);if(!0!==e)return void i(new Error(e.message,{cause:e}));d(l,t,t.$instance.getValue())}t(l)}))}isConditionFieldCheck(e){let t=e;for(;void 0!==t;){if(!this.isConditionField(t))return!1;t=t.$parent}return!0}isConditionField(e){if(!this.conditionFields.includes(e.$key))return!0;let t=!1;if(e.conditional.custom)t=e.conditional.custom.call(null,e);else if(e.conditional.field){const i=this.getFieldName(e.conditional.field);i&&e.conditional.eq==i.$instance.getValue()&&(t=!0)}return t}conditionCheck(){this.conditionFields.forEach((e=>{const t=this.allFieldInfo[e];this.isConditionField(t)?t.$instance.show():t.$instance.hide()}))}getFieldValidation(e,t){if(!this.isConditionFieldCheck(e))return!0;const i=e.$instance;let l=i.valid();return!0===l||(t&&i.focus(),o.isUndefined(l.message)&&(l.message=a.default.validMessage(e,l)[0]),l)}}},805:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});const l=i(635),s=l.__importStar(i(47)),n=l.__importDefault(i(386));t.default=class{constructor(e,t,i){this.addRowFields=[],this.daraform=e,this.options=e.getOptions(),this.formElement=t,this.fieldInfoMap=i}addRow(e){this.checkHiddenField(e)||(this.addRowFields=[],this.addRowTemplate(e))}addRowTemplate(e){var t;let i=this.isLabelHide(e),l=n.default.fieldStyle(this.options,e,null,i);this.addRowFieldInfo(e);const a=s.templateToElement(`\n <div class="df-row form-group ${l.fieldClass}" id="${e.$key}">\n ${i?"":`<div class="df-label ${l.labelClass} ${l.labelAlignClass}" title="${null!==(t=e.label)&&void 0!==t?t:""}" style="${l.labelStyle}">${this.getLabelTemplate(e)}</div>`}\n\n <div class="df-field-container ${l.valueClass} ${e.required?"required":""}" style="${l.valueStyle}"></div>\n </div>\n `);a&&(this.createField(e,a),this.formElement.append(a),e.children&&this.childTemplate(e,l))}createField(e,t){e.$instance=new e.$renderType(e,t,this.daraform)}childTemplate(e,t){var i,l;let a=null,o=!0,r=!1;if(!e.$renderType.isChildrenCreate())return;const d=document.createElement("div");d.classList.add("df-row",null!==(i=t.rowStyleClass)&&void 0!==i?i:"");let u=0;for(const i of e.children){if(s.isEmpty(i))throw new Error(`parent field :[${e.$validName}], children index ${u}, empty [${i}]`);if(i.$parent=e,++u,this.checkHiddenField(i))continue;this.addRowFieldInfo(i),o&&(a=i);let h,c=this.isLabelHide(i),f="";c?(h=n.default.fieldStyle(this.options,i,a,!r),f=r?`<span class="df-label empty ${h.labelClass}" style="${h.labelStyle}"></span>`:""):(h=n.default.fieldStyle(this.options,i,a,!1),f=`<span class="df-label ${h.labelClass} ${h.labelAlignClass}" title="${null!==(l=i.label)&&void 0!==l?l:""}" style="${h.labelStyle}">${this.getLabelTemplate(i)}</span>`);const m=s.templateToElement(`<div class="form-group ${h.fieldClass}" style="${h.fieldStyle}" id="${i.$key}">\n ${f}\n <span class="df-field-container ${h.valueClass} ${i.required?"required":""}" style="${h.valueStyle}"></span>\n </div>`);m&&(this.createField(i,m),d.append(m),i.children&&this.childTemplate(i,i.children?h:t)),c||(r=!0),o=!1}e.$instance.addChildField(d)}getLabelTemplate(e){var t;const i=e.required?'<span class="required"></span>':"",l=s.isBlank(e.tooltip)?"":`<span class="df-tooltip">?<span class="tooltip">${e.tooltip}</span></span>`;return`${null!==(t=e.label)&&void 0!==t?t:""} ${l} ${i}`}isLabelHide(e){var t;return(null===(t=e.style)||void 0===t?void 0:t.labelHide)||s.isUndefined(e.label)}checkHiddenField(e){return!!s.isHiddenField(e)&&(this.fieldInfoMap.addField(e),e.$instance=new e.$renderType(e,null,this.daraform),!0)}addRowFieldInfo(e){if(!s.isBlank(e.name)&&this.fieldInfoMap.hasFieldName(e.name))throw new Error(`Duplicate field name "${e.name}"`);this.fieldInfoMap.addField(e),this.addRowFields.push(e.$key)}}},224:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FIELD_POSITION_STYLE=t.ALIGN=t.RENDER_TEMPLATE=t.FIELD_PREFIX=t.RULES=void 0;const l=i(635),s=l.__importDefault(i(260)),n=l.__importDefault(i(891)),a=l.__importDefault(i(680)),o=l.__importDefault(i(734)),r=l.__importDefault(i(948)),d=l.__importDefault(i(442)),u=l.__importDefault(i(188)),h=l.__importDefault(i(559)),c=l.__importDefault(i(826)),f=l.__importDefault(i(890)),m=l.__importDefault(i(241)),v=l.__importDefault(i(753)),p=l.__importDefault(i(728)),g=l.__importDefault(i(905)),E=l.__importDefault(i(22)),b=l.__importDefault(i(757));t.RULES={NAN:"nan",MIN:"minimum",EXCLUSIVE_MIN:"exclusiveMinimum",MAX:"maximum",EXCLUSIVE_MAX:"exclusiveMaximum",MIN_LENGTH:"minLength",MAX_LENGTH:"maxLength",BETWEEN:"between",BETWEEN_EXCLUSIVE_MIN:"betweenExclusiveMin",BETWEEN_EXCLUSIVE_MAX:"betweenExclusiveMax",BETWEEN_EXCLUSIVE_MINMAX:"betweenExclusiveMinMax",REGEXP:"regexp",REQUIRED:"required",VALIDATOR:"validator"},t.FIELD_PREFIX="dff",t.RENDER_TEMPLATE={number:s.default,textarea:n.default,dropdown:a.default,checkbox:r.default,radio:d.default,text:o.default,password:u.default,file:h.default,custom:c.default,group:f.default,hidden:m.default,button:v.default,range:p.default,datehour:g.default,datemonth:g.default,date:g.default,datetime:g.default,tab:E.default,grid:b.default},t.ALIGN={left:"left",center:"center",right:"right"},t.FIELD_POSITION_STYLE={"top-left":["top","txt-left"],"top-center":["top","txt-center"],"top-right":["top","txt-right"],"left-left":["","txt-left"],"left-center":["","txt-center"],"left-right":["","txt-right"],"right-right":["right","txt-right"],"right-center":["right","txt-center"],"right-left":["right","txt-left"],"bottom-left":["bottom","txt-left"],"bottom-center":["bottom","txt-center"],"bottom-right":["bottom","txt-right"]},t.FIELD_POSITION_STYLE.top=t.FIELD_POSITION_STYLE["top-left"],t.FIELD_POSITION_STYLE.right=t.FIELD_POSITION_STYLE["right-right"],t.FIELD_POSITION_STYLE.left=t.FIELD_POSITION_STYLE["left-left"],t.FIELD_POSITION_STYLE.bottom=t.FIELD_POSITION_STYLE["bottom-left"]},41:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.customChangeEventCall=t.dropdownChangeEvent=t.numberInputEvent=t.inputEvent=void 0;const l=i(635).__importStar(i(47));t.inputEvent=(e,i,l)=>{i.addEventListener("input",(i=>{(0,t.customChangeEventCall)(e,i,l,l.getValue()),l.valid()}))};t.numberInputEvent=(e,i,s)=>{i.addEventListener("keyup",(n=>{const a=n.target.value;l.isNumber(a)||(i.value=a.replace(/[^0-9\.\-\+]/g,""),n.preventDefault()),(0,t.customChangeEventCall)(e,n,s,s.getValue()),s.valid()}))};t.dropdownChangeEvent=(e,i,l)=>{i.addEventListener("change",(i=>{(0,t.customChangeEventCall)(e,i,l,l.getValue()),l.valid()}))};t.customChangeEventCall=(e,t,i,l)=>{i.changeEventCall(e,t,i,l)}},129:(e,t,i)=>{const l=i(635).__importDefault(i(9));i(60),i(752),e.exports=l.default},753:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});const l=i(635).__importDefault(i(309));class s extends l.default{constructor(e,t,i){super(i,e,t),this.mounted(),this.setDefaultOption()}mounted(){var e;null===(e=this.rowElement.querySelector(`#${this.field.$key}`))||void 0===e||e.addEventListener("click",(e=>{this.field.onClick&&this.field.onClick.call(null,this.field)}))}static isDataRender(){return!1}createField(){const e=this.field;this.rowElement.querySelector(".df-field-container").innerHTML=`\n <button type="button" id="${e.$key}" class="df-btn">${e.label}</button> ${l.default.getDescriptionTemplate(e)}\n `}getValue(){return""}setValue(e){}reset(){this.setDisabled(!1)}getElement(){return null}valid(){return!0}}t.default=s},948:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});const l=i(635),s=l.__importDefault(i(309)),n=l.__importStar(i(47)),a=i(224),o=i(675),r=i(41);class d extends s.default{constructor(e,t,i){var l,s;super(i,e,t),this.defaultCheckValue=[],this.defaultCheckValue=[];let a=[];n.isUndefined(e.defaultValue)||(a=n.isArray(e.defaultValue)?e.defaultValue:[e.defaultValue]);const o=d.valuesValueKey(e);n.isUndefined(this.field.listItem)&&this.setValueItems([{label:"",value:"Y"}]);let r=!1;null===(s=null===(l=this.field.listItem)||void 0===l?void 0:l.list)||void 0===s||s.forEach((e=>{let t=e[o];e.selected&&this.defaultCheckValue.push(t||!0),a.includes(t)&&(r=!0)})),this.defaultCheckValue=r?a:this.defaultCheckValue,this.mounted(),this.setDefaultOption(),this.setValue(this.defaultCheckValue,!1)}mounted(){this.initEvent()}initEvent(){this.rowElement.querySelectorAll(this.getSelector()).forEach((e=>{e.addEventListener("change",(e=>{(0,r.customChangeEventCall)(this.field,e,this,this.getValue()),this.valid()}))}))}getSelector(){return`input[type="checkbox"][name="${this.field.$xssName}"]`}createField(){var e,t;const i=this.field,l=this.rowElement.querySelector(".df-field-container"),a=[],o=i.$xssName,r=s.default.valuesLabelKey(i),d=s.default.valuesValueKey(i);a.push(' <div class="df-field"><div class="field-group">'),null===(t=null===(e=i.listItem)||void 0===e?void 0:e.list)||void 0===t||t.forEach((e=>{const t=e[d];a.push(`\n <span class="field ${"vertical"==i.listItem.orientation?"vertical":"horizontal"}">\n <label>\n <input type="checkbox" name="${o}" value="${t?n.replaceXss(t):""}" class="form-field checkbox" ${e.selected?"checked":""} ${e.disabled?"disabled":""} />\n ${s.default.valuesLabelValue(r,e)}\n </label>\n </span>\n `)})),a.push(`<i class="daracl-icon help-icon"></i></div></div> ${s.default.getDescriptionTemplate(i)}<div class="help-message"></div>`),l.innerHTML=a.join("")}setValueItems(e){if(this.rowElement.querySelector(".df-field-container")&&(this.field.listItem?this.field.listItem.list=e:this.field.listItem={list:e},this.createField(),!n.isBlank(this.field.$value))){const e=this.field.$value;this.field.$value="",this.setValue(e)}}getValue(){const e=this.rowElement.querySelectorAll(this.getSelector());if(e.length>1){const t=[];return e.forEach((e=>{const i=e;i.checked&&t.push(i.value)})),t}{const e=this.rowElement.querySelector(`[name="${this.field.$xssName}"]`);return(null==e?void 0:e.checked)?!e.value||e.value:!!e.value&&""}}setValue(e,t){if(!1!==t&&!1===this.changeEventCall(this.field,null,this,e)&&(e=this.field.$value),this.field.$value=e,!0===e)return void(this.rowElement.querySelector(`[name="${this.field.$xssName}"]`).checked=!0);if(!1===e)return void(this.rowElement.querySelector(`[name="${this.field.$xssName}"]`).checked=!1);let i=[];Array.isArray(e)?i=e:i.push(e);this.rowElement.querySelectorAll(this.getSelector()).forEach((e=>{e.checked=!1})),i.forEach((e=>{const t=this.rowElement.querySelector(`[name="${this.field.$xssName}"][value="${e}"]`);t&&(t.checked=!0)}))}reset(){var e,t;1==(null===(t=null===(e=this.field.listItem)||void 0===e?void 0:e.list)||void 0===t?void 0:t.length)&&1==this.defaultCheckValue.length?this.setValue(!0,!1):this.setValue(this.defaultCheckValue,!1),this.setDisabled(!1),(0,o.resetRowElementStyleClass)(this.rowElement)}getElement(){return this.rowElement.querySelectorAll(`[name="${this.field.$xssName}"]`)}focus(){const e=this.getElement();e&&e.length>0&&this.getElement()[0].focus()}valid(){const e=this.getValue();let t=!0;return this.field.required&&n.isArray(e)&&e.length<1&&(t={name:this.field.name,constraint:[]},t.constraint.push(a.RULES.REQUIRED)),(0,o.invalidMessage)(this.field,this.rowElement,t),t}}t.default=d},826:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});const l=i(635),s=l.__importDefault(i(309)),n=i(675),a=l.__importStar(i(47)),o=i(673);class r extends s.default{constructor(e,t,i){super(i,e,t),e.renderer?(this.customFunction=e.renderer,this.mounted(),this.setDefaultOption(),this.setDefaultInfo()):this.customFunction={}}mounted(){this.customFunction.mounted&&this.customFunction.mounted.call(this,this.field,this.rowElement)}static isDataRender(){return!1}createField(){const e=this.field,t=a.isEmpty(e.template)?"":a.isString(e.template)?e.template:e.template();this.rowElement.querySelector(".df-field-container").innerHTML=` <div class="df-field">\n ${t}\n </div>\n ${s.default.getDescriptionTemplate(e)}\n <div class="help-message"></div>`}getValue(){return this.customFunction.getValue?this.customFunction.getValue.call(this,this.field,this.rowElement):""}setValue(e,t){this.customFunction.setValue&&(!1!==t&&!1===this.changeEventCall(this.field,null,this,e)&&(e=this.field.$value),this.customFunction.setValue.call(this,e,this.field,this.rowElement)),this.field.$value=e}reset(){this.setDefaultInfo(),(0,n.resetRowElementStyleClass)(this.rowElement)}getElement(){return this.customFunction.getElement?this.customFunction.getElement.call(this,this.field,this.rowElement):null}valid(){if(this.customFunction.valid){const e=this.customFunction.valid.call(this,this.field,this.rowElement);return void(0,n.invalidMessage)(this.field,this.rowElement,e)}const e=(0,o.stringValidator)(this.getValue(),this.field);return(0,n.invalidMessage)(this.field,this.rowElement,e),e}focus(){this.customFunction.focus&&this.customFunction.focus.call(this,this.field,this.rowElement)}}t.default=r},905:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});const l=i(635),s=l.__importDefault(i(309)),n=i(673),a=i(675),o=l.__importDefault(i(193)),r=l.__importStar(i(47));class d extends s.default{constructor(e,t,i){super(i,e,t),this.mounted(),this.setDefaultOption(),this.setDefaultInfo()}mounted(){let e;this.field.customOptions=Object.assign({},this.field.customOptions),void 0!==this.field.customOptions.onSelect&&(e=typeof this.field.customOptions.onSelect),r.isUndefined(this.field.customOptions.mode)&&("datemonth"==this.field.renderType||"datehour"==this.field.renderType?this.field.customOptions.mode=this.field.renderType.replace("date",""):this.field.customOptions.mode=this.field.renderType),this.field.customOptions.onSelect=(t,i)=>{e&&e(t,i),this.setValue(t),this.valid()},this.dateObj=new o.default(this.element,this.field.customOptions,{})}createField(){const e=this.field,t=this.rowElement.querySelector(".df-field-container");t.innerHTML=`\n <div class="df-field">\n <input type="text" name="${e.$xssName}" class="form-field text help-icon" autocomplete="off" readonly/>\n </div>\n ${s.default.getDescriptionTemplate(e)}\n <div class="help-message"></div>\n `,this.element=t.querySelector(`[name="${e.$xssName}"]`)}getValue(){return this.element.value}setValue(e,t){!1===t||!1!==this.changeEventCall(this.field,null,this,e)?(this.field.$value=e,this.element.value=e):this.element.value=this.field.$value}reset(){this.setDefaultInfo(),this.setDisabled(!1),(0,a.resetRowElementStyleClass)(this.rowElement)}getElement(){return this.element}valid(){const e=(0,n.stringValidator)(this.getValue(),this.field);return(0,a.invalidMessage)(this.field,this.rowElement,e),e}}t.default=d},680:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});const l=i(635),s=l.__importDefault(i(309)),n=i(224),a=i(675),o=i(41),r=l.__importStar(i(47)),d=l.__importDefault(i(700));class u extends s.default{constructor(e,t,i){var l,s,n,a,o;super(i,e,t);let d="";r.isUndefined(e.defaultValue)||(d=e.defaultValue);const h=u.valuesValueKey(e);let c=!1;null===(s=null===(l=this.field.listItem)||void 0===l?void 0:l.list)||void 0===s||s.forEach((e=>{let t=e[h];e.selected&&(this.defaultSelected=t),t==d&&(c=!0)})),c?this.defaultSelected=d:this.defaultSelected||!0===(null===(n=e.customOptions)||void 0===n?void 0:n.disableDefaultOption)&&(this.defaultSelected=(null===(o=null===(a=this.field.listItem)||void 0===a?void 0:a.list)||void 0===o?void 0:o.length)>0&&this.field.listItem.list[0][h]||""),r.isUndefined(this.defaultSelected)&&(this.defaultSelected=""),this.mounted(),this.setDefaultOption(),this.setValue(this.defaultSelected,!1)}mounted(){(0,o.dropdownChangeEvent)(this.field,this.element,this)}createField(){const e=this.field,t=this.rowElement.querySelector(".df-field-container");let i=` <div class="df-field"><select name="${e.$xssName}" class="form-field dropdown">\n ${this.dropdownValuesTemplate(e)}\n </select> <i class="help-icon"></i></div>\n ${s.default.getDescriptionTemplate(e)}\n <div class="help-message"></div>\n `;t.innerHTML=i,this.element=t.querySelector(`[name="${e.$xssName}"]`)}setValueItems(e){if(this.field.listItem?this.field.listItem.list=e:this.field.listItem={list:e},this.element.innerHTML=this.dropdownValuesTemplate(this.field),!r.isBlank(this.field.$value)){const e=this.field.$value;this.field.$value="",this.setValue(e)}}getValue(){return this.element.value}setValue(e,t){!1===t||!1!==this.changeEventCall(this.field,null,this,e)?(this.field.$value=e,this.element.value=e):this.element.value=this.field.$value}reset(){this.setValue(this.defaultSelected,!1),this.setDisabled(!1),(0,a.resetRowElementStyleClass)(this.rowElement)}getElement(){return this.element}valid(){const e=this.getValue();let t=!0;return this.field.required&&e.length<1&&(t={name:this.field.name,constraint:[]},t.constraint.push(n.RULES.REQUIRED)),(0,a.invalidMessage)(this.field,this.rowElement,t),t}dropdownValuesTemplate(e){var t,i,l;const n=s.default.valuesLabelKey(e),a=s.default.valuesValueKey(e);let o="";return!0!==(null===(t=e.customOptions)||void 0===t?void 0:t.disableDefaultOption)&&(o+=`<option value="">${d.default.getMessage("selection")}</option>`),null===(l=null===(i=e.listItem)||void 0===i?void 0:i.list)||void 0===l||l.forEach((e=>{const t=`${e.selected?"selected":""} ${e.disabled?"disabled":""}`;r.isUndefined(e[a])&&e.label?o+=`<option value="${e.value||""}" ${t}>${e.label}</option>`:o+=`<option value="${e[a]}" ${t}>${s.default.valuesLabelValue(n,e)}</option>`})),o}}t.default=u},559:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});const l=i(635),s=l.__importDefault(i(309)),n=i(675),a=i(556),o=l.__importDefault(i(700)),r=i(41),d=l.__importStar(i(47));class u extends s.default{constructor(e,t,i){var l;super(i,e,t),this.removeIds=[],this.uploadFiles={},this.fileList=[],this.fileSeq=0,this.element=t.querySelector(`[name="${e.$xssName}"]`),this.fileList=(null===(l=e.listItem)||void 0===l?void 0:l.list)||[],this.mounted(),this.setDefaultOption()}mounted(){this.element.addEventListener("change",(e=>{var t;const i=null===(t=e.target)||void 0===t?void 0:t.files;if(i){let e=[];for(let t of i)e.push(t);this.addFiles(e)}(0,r.customChangeEventCall)(this.field,e,this,this.fileList),this.valid()})),this.fileList.forEach((e=>{e.$seq=this.fileSeq+=1})),this.setFileList(this.fileList)}createField(){const e=this.field,t=this.rowElement.querySelector(".df-field-container");t.innerHTML=`\n <div class="df-field">\n <span class="file-wrapper">\n <label class="file-label">\n <input type="file" name="${e.$xssName}" class="form-field file" multiple />\n ${o.default.getMessage("fileButton")}\n </label>\n <i class="daracl-icon help-icon"></i>\n </span>\n </div>\n ${s.default.getDescriptionTemplate(e)}\n <div class="daracl-file-list"></div>\n <div class="help-message"></div>\n `,this.element=t.querySelector(`[name="${e.$xssName}"]`)}addFiles(e){let t=!1;const i=[];for(let l of e){if(this.fileList.filter((e=>e.fileName==l.name&&e.fileSize==l.size&&e.lastModified==l.lastModified)).length>0)continue;this.fileSeq+=1,this.uploadFiles[this.fileSeq]=l;let e={fileName:l.name,$seq:this.fileSeq,fileSize:l.size,lastModified:l.lastModified};i.push(e),t=!0}t&&(this.setFileList(i),this.fileList.push(...i))}setFileList(e,t){const i=this.rowElement.querySelector(".daracl-file-list");if(i){!0===t&&(i.innerHTML="");const l=[];e.forEach((e=>{l.push(`\n <div class="file-item" data-seq="${e.$seq}">\n ${e.fileId?'<span class="file-icon download"></span>':'<span class="file-icon"></span>'} <span class="file-icon remove"></span>\n <span class="file-name">${e.fileName}</span > \n </div>`)})),i.insertAdjacentHTML("beforeend",l.join("")),e.forEach((e=>{this.removeFileEvent(e,i),this.downloadFileEvent(e,i)}))}}downloadFileEvent(e,t){const i=t.querySelector(`[data-seq="${e.$seq}"] .download`);i&&i.addEventListener("click",(e=>{const t=e.target.closest(".file-item");if(t){const e=t.getAttribute("data-seq");if(e){const t=parseInt(e,10),i=this.fileList.findIndex((e=>e.$seq===t)),l=this.fileList[i];if(l.url)return void(location.href=l.url);if(this.field.fileDownload)return void this.field.fileDownload.call(null,{file:l,field:this.field})}}}))}removeFileEvent(e,t){const i=t.querySelector(`[data-seq="${e.$seq}"] .remove`);i&&i.addEventListener("click",(e=>{const t=e.target.closest(".file-item");if(t){const e=t.getAttribute("data-seq");if(e){const i=parseInt(e,10),l=this.fileList.findIndex((e=>e.$seq===i)),s=this.fileList[l];this.fileList.splice(l,1),delete this.uploadFiles[i],t.remove(),s.fileId&&this.removeIds.push(s.fileId)}}this.valid()}))}getValue(){return{uploadFile:Object.values(this.uploadFiles),removeIds:this.removeIds}}setValueItems(e){this.fileList=[],this.uploadFiles=[],this.removeIds=[];for(let t of e)t.$seq=this.fileSeq+=1,this.fileList.push(t);this.setFileList(this.fileList,!0)}setValue(e){d.isArray(e)&&this.setValueItems(e),this.element.value=""}reset(){this.setValue(""),this.setValueItems([]),(0,n.resetRowElementStyleClass)(this.rowElement)}getElement(){return this.element}valid(){const e=(0,a.fileValidator)(this.element,this.field,this.fileList);return(0,n.invalidMessage)(this.field,this.rowElement,e),e}}t.default=u},757:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});const l=i(635),s=l.__importDefault(i(309)),n=i(675),a=l.__importDefault(i(9)),o=l.__importStar(i(47)),r=l.__importDefault(i(386));let d=0;class u extends s.default{constructor(e,t,i){super(i,e,t),this.allAddRowInfo={},e.renderer?this.customFunction=e.renderer:this.customFunction={};this.gridForm=new a.default(document.createElement("div"),{style:{width:"100%",labelWidth:3,valueWidth:9,position:"left-right"},autoCreate:!1,notValidMessage:"This form is not valid.",fields:[]}),this.mounted(),this.setDefaultOption(),this.setDefaultInfo()}mounted(){var e;this.addRow(),this.customFunction.mounted&&this.customFunction.mounted.call(this,this.field,this.rowElement),null===(e=this.rowElement.querySelector(".df-grid-add-row-btn"))||void 0===e||e.addEventListener("click",(e=>{this.addRow()}))}static isDataRender(){return!1}static isChildrenCreate(){return!1}createField(){var e,t,i,l,s,n,a;const o=this.field,r=this.rowElement.querySelector(".df-field-container");let d=[],u=[],h=[];if(h.push(""),o.children){u.push("<colgroup>"),d.push("<tr>"),u.push('<col style="width:38px">'),d.push("<th>"),!0!==(null===(e=o.gridOptions)||void 0===e?void 0:e.disableAddButton)&&d.push('<button type="button" class="df-btn df-grid-add-row-btn" title="Add"><i class="df-icon df-add-icon"></i></button>'),d.push("</th>");for(const e of o.children)u.push(`<col style="width:${null!==(i=null===(t=e.style)||void 0===t?void 0:t.width)&&void 0!==i?i:"*"}">`),d.push(`<th class="df-grid-header">${e.label}</th>`);u.push("</colgroup>"),d.push("</tr>")}r.innerHTML=`\n <div class="df-grid-field">\n ${h.join("")}\n <div class="df-grid-container ${null!==(s=null===(l=o.style)||void 0===l?void 0:l.position)&&void 0!==s?s:""}" style="height:${null!==(a=null===(n=o.gridOptions)||void 0===n?void 0:n.height)&&void 0!==a?a:"auto"};">\n <table class="df-grid">${u.join("")}<thead>${d.join("")}</thead><tbody></tbody></table>\n </div>\n </div>\n `}addRow(e){var t,i,l;let s=[];const n=this.daraForm.getOptions(),a=this.gridForm.formTemplate,u=this.field.$xssName;++d;let h=[];s.push('<tr class="grid-row">'),s.push("<td>"),!0!==(null===(t=this.field.gridOptions)||void 0===t?void 0:t.disableRemoveButton)&&s.push(`<button type="button" data-row-idx="${d}" class="df-btn df-grid-row-remove"><i class="df-icon df-remove-icon"></i></button>`),s.push("</td>");for(const e of this.field.children){let t=r.default.fieldStyle(n,e,null,!0),i=o.merge({},e);h.push(i),i.$orgin=e,i.name=i.name+"_"+d,i.$xssName=u+"_"+o.getXssFieldName(i),a.addRowFieldInfo(i),s.push(`<td id="${i.$xssName}"><div class="df-field-container ${i.required?"required":""} " style="${t.valueStyle}"></div></td>`)}s.push("</tr>"),this.allAddRowInfo[d]=h;const c=o.templateToElement(s.join(""));c&&(null===(i=this.rowElement.querySelector("tbody"))||void 0===i||i.append(c),null===(l=c.querySelector(".df-grid-row-remove"))||void 0===l||l.addEventListener("click",(e=>{this.removeRow(e)}))),e=null!=e?e:{};for(let t of h)t.$instance=new t.$renderType(t,null==c?void 0:c.querySelector(`#${t.$xssName}`),this.gridForm),e[t.$orgin.name]&&t.$instance.setValue(e[t.$orgin.name])}removeRow(e){var t,i;const l=e.target.closest("tr");if(l){if(1==(null===(t=l.parentElement)||void 0===t?void 0:t.childElementCount))return;let s=(null===(i=e.currentTarget)||void 0===i?void 0:i.getAttribute("data-row-idx"))||"-1";this.removeFieldInfo(s),l.remove()}}removeFieldInfo(e){let t=[];if(o.isEmpty(e)){for(let e in this.allAddRowInfo)t=t.concat(this.allAddRowInfo[e]);this.allAddRowInfo={}}else if(e){const i=parseInt(e,10);t=t.concat(this.allAddRowInfo[i]),delete this.allAddRowInfo[i]}for(let e of t)this.gridForm.getFieldInfoMap().removeFieldInfo(e.name)}allRemoveRow(){var e;null===(e=this.rowElement.querySelector("tbody"))||void 0===e||e.replaceChildren(),this.removeFieldInfo()}getValue(){if(this.customFunction.getValue)return this.customFunction.getValue.call(this,this.field,this.rowElement);let e=[];const t=this.field.children,i=t.length;for(let l in this.allAddRowInfo){const s=this.allAddRowInfo[l];let n={};for(let e=0;e<i;e++){n[t[e].name]=this.gridForm.getFieldValue(s[e].name)}e.push(n)}return e}setValue(e){this.field.$value=e;let t=[];Array.isArray(e)?t=e:o.isPlainObject(e)&&t.push(e),this.allRemoveRow();for(let e of t)this.addRow(e)}reset(){this.setDefaultInfo(),(0,n.resetRowElementStyleClass)(this.rowElement)}getElement(){return this.customFunction.getElement?this.customFunction.getElement.call(this,this.field,this.rowElement):null}valid(){if(this.customFunction.valid){const e=this.customFunction.valid.call(this,this.field,this.rowElement);return void(0,n.invalidMessage)(this.field,this.rowElement,e)}const e=this.gridForm.validForm();if(e.length>0){const t=e[0];if(t.message)return t.message="["+this.field.label+"] "+t.message,t}return!0}focus(){}}t.default=u},890:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});const l=i(635).__importDefault(i(309));class s extends l.default{constructor(e,t,i){super(i,e,t)}mounted(){}static isDataRender(){return!1}createField(){return""}getValue(){return null}setValue(e){}reset(){}getElement(){return this.rowElement}valid(){return!0}addChildField(e){let t=this.rowElement.querySelector(".df-field-container");t?t.append(e):this.rowElement.append(e)}focus(){}}t.default=s},241:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});const l=i(635).__importDefault(i(309));class s extends l.default{constructor(e,t,i){super(i,e,t),this.field.$value=e.defaultValue}mounted(){}createField(){return""}getValue(){return this.field.$value}setValue(e){this.field.$value=e}reset(){this.setValue(this.field.defaultValue)}getElement(){}valid(){return!0}}t.default=s},260:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});const l=i(635).__importDefault(i(309)),s=i(181),n=i(675),a=i(41);class o extends l.default{constructor(e,t,i){super(i,e,t),this.mounted(),this.setDefaultOption(),this.setDefaultInfo()}mounted(){(0,a.numberInputEvent)(this.field,this.element,this)}createField(){const e=this.field,t=this.rowElement.querySelector(".df-field-container");t.innerHTML=`\n <div class="df-field">\n <input type="text" name="${e.$xssName}" class="form-field number help-icon" />\n </div> \n ${l.default.getDescriptionTemplate(e)}\n <div class="help-message"></div>\n `,this.element=t.querySelector(`[name="${e.$xssName}"]`)}getValue(){return this.element.value}setValue(e,t){!1===t||!1!==this.changeEventCall(this.field,null,this,e)?(this.field.$value=e,this.element.value=e):this.element.value=this.field.$value}reset(){this.setDefaultInfo(),this.setDisabled(!1),(0,n.resetRowElementStyleClass)(this.rowElement)}getElement(){return this.element}valid(){const e=(0,s.numberValidator)(this.getValue(),this.field);return(0,n.invalidMessage)(this.field,this.rowElement,e),e}}t.default=o},188:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});const l=i(635).__importDefault(i(309)),s=i(673),n=i(675),a=i(41);class o extends l.default{constructor(e,t,i){super(i,e,t),this.mounted(),this.setDefaultOption(),this.setDefaultInfo()}mounted(){(0,a.inputEvent)(this.field,this.element,this)}createField(){const e=this.field,t=this.rowElement.querySelector(".df-field-container");t.innerHTML=`\n <div class="df-field">\n <input type="password" name="${e.$xssName}" class="form-field password help-icon" autocomplete="off" />\n </div>\n ${l.default.getDescriptionTemplate(e)}\n <div class="help-message"></div>\n `,this.element=t.querySelector(`[name="${e.$xssName}"]`)}getValue(){return this.element.value}setValue(e,t){!1===t||!1!==this.changeEventCall(this.field,null,this,e)?(this.field.$value=e,this.element.value=e):this.element.value=this.field.$value}reset(){this.setDefaultInfo(),this.setDisabled(!1),(0,n.resetRowElementStyleClass)(this.rowElement)}getElement(){return this.element}valid(){const e=(0,s.stringValidator)(this.getValue(),this.field);return(0,n.invalidMessage)(this.field,this.rowElement,e),e}}t.default=o},442:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});const l=i(635),s=l.__importDefault(i(309)),n=i(224),a=i(675),o=i(41),r=l.__importStar(i(47));class d extends s.default{constructor(e,t,i){var l,s,n,a,o;super(i,e,t),this.defaultCheckValue="";let u=[];r.isUndefined(e.defaultValue)||(u=e.defaultValue);const h=d.valuesValueKey(e);let c=!1;null===(s=null===(l=this.field.listItem)||void 0===l?void 0:l.list)||void 0===s||s.forEach((e=>{let t=e[h];e.selected&&(this.defaultCheckValue=t),u==t&&(c=!0)})),c?this.defaultCheckValue=u:this.defaultCheckValue||(this.defaultCheckValue=(null===(a=null===(n=this.field.listItem)||void 0===n?void 0:n.list)||void 0===a?void 0:a.length)>0?null===(o=this.field.listItem)||void 0===o?void 0:o.list[0][h]:""),this.mounted(),this.setDefaultOption(),this.setValue(this.defaultCheckValue,!1)}mounted(){this.initEvent()}initEvent(){this.rowElement.querySelectorAll(this.getSelector()).forEach((e=>{e.addEventListener("change",(e=>{(0,o.customChangeEventCall)(this.field,e,this,this.getValue()),this.valid()}))}))}getSelector(){return`input[type="radio"][name="${this.field.$xssName}"]`}createField(){var e,t;const i=this.field,l=this.rowElement.querySelector(".df-field-container"),n=[],a=i.$xssName,o=s.default.valuesLabelKey(i),r=s.default.valuesValueKey(i);n.push('<div class="df-field"><div class="field-group">'),null===(t=null===(e=i.listItem)||void 0===e?void 0:e.list)||void 0===t||t.forEach((e=>{const t=e[r];n.push(`<span class="field ${"vertical"==i.orientation?"vertical":"horizontal"}">\n <label>\n <input type="radio" name="${a}" value="${t}" class="form-field radio" ${e.selected?"checked":""} ${e.disabled?"disabled":""}/>\n ${s.default.valuesLabelValue(o,e)}\n </label>\n </span>\n `)})),n.push(`<i class="daracl-icon help-icon"></i></div></div>\n ${s.default.getDescriptionTemplate(i)}\n <div class="help-message"></div>\n `),l.innerHTML=n.join(""),this.initEvent()}setValueItems(e){if(this.rowElement.querySelector(".df-field-container")&&(this.field.listItem?this.field.listItem.list=e:this.field.listItem={list:e},this.createField(),!r.isBlank(this.field.$value))){const e=this.field.$value;this.field.$value="",this.setValue(e)}}getValue(){var e;return null===(e=this.rowElement.querySelector(`[name="${this.field.$xssName}"]:checked`))||void 0===e?void 0:e.value}setValue(e,t){if(!1!==t&&!1===this.changeEventCall(this.field,null,this,e)&&(e=this.field.$value),this.field.$value=e,!0===e)return void(this.rowElement.querySelector(`[name="${this.field.$xssName}"]`).checked=!0);if(!1===e)return void(this.rowElement.querySelector(`[name="${this.field.$xssName}"]`).checked=!1);this.rowElement.querySelectorAll(this.getSelector()).forEach((t=>{let i=t;i.value==e?i.checked=!0:i.checked=!1}))}reset(){this.setValue(this.defaultCheckValue,!1),this.setDisabled(!1),(0,a.resetRowElementStyleClass)(this.rowElement)}getElement(){return this.rowElement.querySelectorAll(this.getSelector())}focus(){const e=this.getElement();e&&e.length>0&&this.getElement()[0].focus()}valid(){const e=this.getValue();let t=!0;return this.field.required&&r.isBlank(e)&&(t={name:this.field.name,constraint:[]},t.constraint.push(n.RULES.REQUIRED)),(0,a.invalidMessage)(this.field,this.rowElement,t),t}}t.default=d},728:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});const l=i(635).__importDefault(i(309)),s=i(181),n=i(675),a=i(41);class o extends l.default{constructor(e,t,i){super(i,e,t),this.rangeNumElement=t.querySelector(".range-num"),this.mounted(),this.setDefaultOption(),this.setDefaultInfo()}mounted(){this.element.addEventListener("input",(e=>{this.rangeNumElement.innerHTML=e.target.value,this.element.setAttribute("title",e.target.value),(0,a.customChangeEventCall)(this.field,e,this,this.getValue()),this.valid()}))}createField(){const e=this.field,t=this.rowElement.querySelector(".df-field-container");t.innerHTML=`\n <div class="df-field">\n <span class="range-num">${e.defaultValue?e.defaultValue:0}</span>\n <input type="range" name="${e.$xssName}" class="form-field range help-icon" min="${e.rule.minimum}" max="${e.rule.maximum}"/>\n </div> \n ${l.default.getDescriptionTemplate(e)}\n <div class="help-message"></div>\n `,this.element=t.querySelector(`[name="${e.$xssName}"]`)}getValue(){return this.element.value}setValue(e,t){!1===t||!1!==this.changeEventCall(this.field,null,this,e)?(this.field.$value=e,this.element.value=e):this.element.value=this.field.$value}reset(){this.setDefaultInfo(),this.setDisabled(!1),(0,n.resetRowElementStyleClass)(this.rowElement)}getElement(){return this.element}valid(){const e=(0,s.numberValidator)(this.getValue(),this.field);return(0,n.invalidMessage)(this.field,this.rowElement,e),e}}t.default=o},309:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});const l=i(635).__importStar(i(47));class s{constructor(e,t,i){var l;this.enableView=!0,this.daraForm=e,this.field=t,this.rowElement=i,this.createField(),t.tooltip&&(null===(l=i.querySelector(".df-tooltip"))||void 0===l||l.setAttribute("tooltip",t.tooltip))}setDefaultInfo(){if(l.isUndefined(this.field.defaultValue)?this.setValue("",!1):this.setValue(this.field.defaultValue,!1),!l.isUndefined(this.field.placeholder)){const e=this.getElement();e instanceof Element&&e.setAttribute("placeholder",this.field.placeholder)}}setDefaultOption(){var e;this.setDisabled(null!==(e=this.field.disabled)&&void 0!==e&&e)}addChildField(e){var t;null===(t=this.rowElement.querySelector(".df-field-container"))||void 0===t||t.append(e)}static isDataRender(){return!0}static isChildrenCreate(){return!0}getForm(){return this.daraForm}setValueItems(e){}static getDescriptionTemplate(e){return e.description?`<div class="df-description">${e.description}</div>`:""}changeEventCall(e,t,i,n){var a;if(e.onChange){let o={field:e,evt:t,oldValue:e.$value,value:n};if(null===(a=e.listItem)||void 0===a?void 0:a.list){let t=[];const i=s.valuesValueKey(e);for(let s of e.listItem.list){let e=s[i];if(l.isString(n)){if(e==n){t.push(s);break}}else l.isArray(n)&&n.includes(e)&&t.push(s)}o.valueItems=t}if(o.oldValue!=o.value&&!1===e.onChange.call(null,o))return i.setValue(e.$value,!1),!1;e.$value=o.value}this.daraForm.conditionCheck()}focus(){this.getElement().focus()}isEnableView(){return this.enableView}show(){this.enableView=!0,this.rowElement.classList.remove("df-hidden")}hide(){this.enableView=!1,this.rowElement.classList.contains("df-hidden")||this.rowElement.classList.add("df-hidden")}setDescription(e){var t;const i=this.rowElement.querySelector(".df-description");if(i)i.innerHTML=e;else{const i=this.rowElement.querySelector(".df-field");if(i){const l=new DOMParser;this.field.description=e;const n=l.parseFromString(s.getDescriptionTemplate(this.field),"text/html").querySelector(".df-description");n&&(null===(t=i.parentNode)||void 0===t||t.insertBefore(n,i.nextSibling))}}}setActive(e){}setDisabled(e){this.getElement()instanceof HTMLElement&&(!1===e?this.getElement().removeAttribute("disabled"):this.getElement().setAttribute("disabled",!0))}commonValidator(){}static valuesValueKey(e){var t;return(null===(t=e.listItem)||void 0===t?void 0:t.valueField)?e.listItem.valueField:"value"}static valuesLabelKey(e){var t;return(null===(t=e.listItem)||void 0===t?void 0:t.labelField)?e.listItem.labelField:"label"}static valuesLabelValue(e,t){let i=!1;const l=e.replace(/\{\{([A-Za-z0-9_.]*)\}\}/g,((e,l)=>(i=!0,t[l]||"")));return i?l:t[e]||""}}t.default=s},22:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});const l=i(635),s=l.__importDefault(i(309)),n=i(675),a=l.__importDefault(i(9)),o=l.__importDefault(i(386)),r=l.__importStar(i(47));class d extends s.default{constructor(e,t,i){super(i,e,t),e.renderer?this.customFunction=e.renderer:this.customFunction={},this.mounted()}mounted(){this.customFunction.mounted&&this.customFunction.mounted.call(this,this.field,this.rowElement),this.tabContainerElement.querySelectorAll(".tab-item").forEach((e=>{e.addEventListener("click",(t=>{this.clickEventHandler(e,t)}))}))}clickEventHandler(e,t){var i;this.setActive(null!==(i=e.getAttribute("data-tab-id"))&&void 0!==i?i:"")}setActive(e){var t,i,l,s;const n=this.tabContainerElement.querySelector(`[data-tab-id="${e}"]`);if(!n)return;if(!n.classList.contains("active")){for(let e of null!==(i=null===(t=null==n?void 0:n.parentElement)||void 0===t?void 0:t.children)&&void 0!==i?i:[])e.classList.remove("active");n.classList.add("active")}const a=this.rowElement.querySelector(`[tab-panel-id="${e}"]`);if(!(null==a?void 0:a.classList.contains("active"))){for(let e of null!==(s=null===(l=null==a?void 0:a.parentElement)||void 0===l?void 0:l.children)&&void 0!==s?s:[])e.classList.remove("active");null==a||a.classList.add("active")}}static isDataRender(){return!1}static isChildrenCreate(){return!1}createField(){var e,t,i,l,n,d;const u=this.field,h=this.daraForm.formTemplate,c=this.daraForm.getOptions(),f=this.rowElement.querySelector(".df-field-container");let m=o.default.fieldStyle(c,u);if(f.innerHTML=`\n <div class="df-field ">\n <div class="tab-header ${m.tabAlignClass}"></div>\n </div>\n <div class="df-tab-body"></div>\n `,u.children){let c=!0;const m=this.getForm().getOptions();let v=o.default.fieldStyle(m,u,null,h.isLabelHide(u));for(const o of u.children){o.$parent=u,h.addRowFieldInfo(o);let p=o.$key,g=`<span class="tab-item ${c?"active":""}" data-tab-id="${p}"><a href="javascript:;">${o.label}</a></span>`,E=`<div class="tab-panel ${c?"active":""}" tab-panel-id="${p}">${s.default.getDescriptionTemplate(o)}\n <div class="tab-group"></div>\n </div>`;const b=r.templateToElement(g),y=r.templateToElement(E);if(c=!1,b&&(null===(e=f.querySelector(".tab-header"))||void 0===e||e.appendChild(b)),y&&(null===(t=f.querySelector(".df-tab-body"))||void 0===t||t.appendChild(y),o.children)){let e={style:{width:null!==(i=m.style.width)&&void 0!==i?i:"100%",labelWidth:null!==(l=m.style.labelWidth)&&void 0!==l?l:3,valueWidth:null!==(n=m.style.valueWidth)&&void 0!==n?n:9,position:null!==(d=m.style.position)&&void 0!==d?d:"left-right"},useTypeValue:m.useTypeValue,autoCreate:!1,notValidMessage:"This form is not valid.",fields:[]};o.$tabForm=new a.default(document.createElement("div"),e),o.$instance=new o.$renderType(o,null==y?void 0:y.querySelector(".tab-group"),o.$tabForm),o.$tabForm.formTemplate.childTemplate(o,v)}}this.tabContainerElement=f}}getValue(){var e;if(this.customFunction.getValue)return this.customFunction.getValue.call(this,this.field,this.rowElement);let t={},i=this.getForm().getOptions().useTypeValue;for(const l of this.field.children){const s=null===(e=l.$tabForm)||void 0===e?void 0:e.getValue(!1);if(i)t[l.$validName]=s;else for(let[e,i]of Object.entries(s))t[e]=i}return t}setValue(e){var t;for(const i of this.field.children){let l=e[i.$validName];l&&(null===(t=i.$tabForm)||void 0===t||t.setValue(l))}}reset(){}getElement(){return this.rowElement}valid(){var e;if(this.customFunction.valid){const e=this.customFunction.valid.call(this,this.field,this.rowElement);return void(0,n.invalidMessage)(this.field,this.rowElement,e)}const t=this.field;for(const i of t.children){const t=null===(e=i.$tabForm)||void 0===e?void 0:e.validForm();if(t&&t.length>0){const e=t[0];if(e.message)return e.message="["+this.field.label+"] "+e.message,e}}return!0}focus(){}}t.default=d},891:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});const l=i(635).__importDefault(i(309)),s=i(673),n=i(675),a=i(41);class o extends l.default{constructor(e,t,i){super(i,e,t),this.mounted(),this.setDefaultOption(),this.setDefaultInfo()}mounted(){(0,a.inputEvent)(this.field,this.element,this)}createField(){var e;const t=this.field,i=this.rowElement.querySelector(".df-field-container");let s=null===(e=t.customOptions)||void 0===e?void 0:e.rows;s=+s>0?s:3,i.innerHTML=`\n <div class="df-field">\n <textarea name="${t.$xssName}" rows="${s}" class="form-field textarea help-icon"></textarea>\n </div> \n ${l.default.getDescriptionTemplate(t)}\n <div class="help-message"></div>\n `,this.element=i.querySelector(`[name="${t.$xssName}"]`)}getValue(){return this.element.value}setValue(e,t){!1===t||!1!==this.changeEventCall(this.field,null,this,e)?(this.field.$value=e,this.element.value=e):this.element.value=this.field.$value}reset(){this.setDefaultInfo(),this.setDisabled(!1),(0,n.resetRowElementStyleClass)(this.rowElement)}getElement(){return this.element}valid(){const e=(0,s.stringValidator)(this.getValue(),this.field);return(0,n.invalidMessage)(this.field,this.rowElement,e),e}}t.default=o},734:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});const l=i(635).__importDefault(i(309)),s=i(673),n=i(675),a=i(41);class o extends l.default{constructor(e,t,i){super(i,e,t),this.mounted(),this.setDefaultOption(),this.setDefaultInfo()}mounted(){(0,a.inputEvent)(this.field,this.element,this)}createField(){const e=this.field,t=this.rowElement.querySelector(".df-field-container");t.innerHTML=`\n <div class="df-field">\n <input type="text" name="${e.$xssName}" class="form-field text help-icon" />\n </div>\n ${l.default.getDescriptionTemplate(e)}\n <div class="help-message"></div>\n `,this.element=t.querySelector(`[name="${e.$xssName}"]`)}getValue(){return this.element.value}setValue(e,t){!1===t||!1!==this.changeEventCall(this.field,null,this,e)?(this.field.$value=e,this.element.value=e):this.element.value=this.field.$value}reset(){this.setDefaultInfo(),this.setDisabled(!1),(0,n.resetRowElementStyleClass)(this.rowElement)}getElement(){return this.element}valid(){const e=(0,s.stringValidator)(this.getValue(),this.field);return(0,n.invalidMessage)(this.field,this.rowElement,e),e}}t.default=o},556:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.fileValidator=void 0;const l=i(224);t.fileValidator=(e,t,i)=>{const s={name:t.name,constraint:[]};return t.required&&i.length<1?(s.constraint.push(l.RULES.REQUIRED),s):!(s.constraint.length>0)||s}},181:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.numberValidator=void 0;const l=i(635),s=i(224),n=i(74),a=l.__importStar(i(47));t.numberValidator=(e,t)=>{if(!t.$instance.isEnableView())return!0;const i={name:t.name,constraint:[]},l=Number(e);if(t.required&&a.isBlank(e))return i.constraint.push(s.RULES.REQUIRED),i;if(!a.isNumber(e))return i.constraint.push(s.RULES.NAN),i;if(!0!==(0,n.validator)(e,t,i))return i;const o=t.rule;if(o){const e=a.isNumber(o.minimum),t=a.isNumber(o.maximum);let n=!1,r=!1,d=!1,u=!1;e&&(o.exclusiveMinimum&&l<=o.minimum?r=!0:l<o.minimum&&(n=!0)),t&&(o.exclusiveMaximum&&l>=o.maximum?u=!0:l>o.maximum&&(d=!0)),e&&t&&(n||r||d||u)?o.exclusiveMinimum&&o.exclusiveMaximum&&(r||u)?i.constraint.push(s.RULES.BETWEEN_EXCLUSIVE_MINMAX):r?i.constraint.push(s.RULES.BETWEEN_EXCLUSIVE_MIN):u?i.constraint.push(s.RULES.BETWEEN_EXCLUSIVE_MAX):i.constraint.push(s.RULES.BETWEEN):(r&&i.constraint.push(s.RULES.EXCLUSIVE_MIN),u&&i.constraint.push(s.RULES.EXCLUSIVE_MAX),n&&i.constraint.push(s.RULES.MIN),d&&i.constraint.push(s.RULES.MAX))}return!(i.constraint.length>0)||i}},913:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.regexpValidator=void 0;const i={mobile:/^\d{3}-\d{3,4}-\d{4}$/,email:/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/,url:/^(?:(?:https?|HTTPS?|ftp|FTP):\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-zA-Z\u00a1-\uffff0-9]-*)*[a-zA-Z\u00a1-\uffff0-9]+)(?:\.(?:[a-zA-Z\u00a1-\uffff0-9]-*)*[a-zA-Z\u00a1-\uffff0-9]+)*(?:\.(?:[a-zA-Z\u00a1-\uffff]{2,}))\.?)(?::\d{2,5})?(?:[/?#]\S*)?$/,number:/\d$/,alpha:/^[a-zA-Z]+$/,"alpha-num":/^[a-zA-Z0-9]+$/,variable:/^[a-zA-Z0-9_$][a-zA-Z0-9_$]*$/,"number-char":/^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d]/,"upper-char":/^(?=.*?[A-Z])(?=.*?[a-z])/,"upper-char-special":/^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[#?!@$%^&*-])/,"upper-char-special-number":/^(?=.*[A-Za-z])(?=.*\d)(?=.*[@$!%*#?&])[A-Za-z\d@$!%*#?&]/};t.regexpValidator=(e,t,l)=>{if(!t.$instance.isEnableView())return{name:t.name,constraint:[]};void 0===l&&(l={name:t.name,constraint:[]});const s=t.regexpType;return s&&!i[s].test(e)?(l.regexp=s,l):l}},673:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.stringValidator=void 0;const l=i(635),s=i(224),n=l.__importStar(i(47)),a=i(74);t.stringValidator=(e,t)=>{if(!t.$instance.isEnableView())return!0;let i={name:t.name,constraint:[]};if(t.required&&n.isBlank(e))return i.constraint.push(s.RULES.REQUIRED),i;const l=(0,a.validator)(e,t,i);if(!0!==l)return l;const o=t.rule;if(o){const t=e.length,l=n.isNumber(o.minLength),a=n.isNumber(o.maxLength);let r=!1,d=!1;if(l&&t<o.minLength&&(r=!0),a&&t>o.maxLength&&(d=!0),l&&a&&(r||d)?i.constraint.push(s.RULES.BETWEEN):(r&&i.constraint.push(s.RULES.MIN_LENGTH),d&&i.constraint.push(s.RULES.MAX_LENGTH)),i.constraint.length>0)return i}return!0}},74:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.validator=void 0;const l=i(635),s=i(913),n=l.__importStar(i(47));t.validator=(e,t,i)=>{if(t.validator&&(i.validator=t.validator(t,e),"object"==typeof i.validator))return i;if((i=(0,s.regexpValidator)(e,t,i)).regexp)return i;if(t.different){const e=t.different.field,l=t.$instance.getForm().getField(e);if(!n.isEmpty(l)&&t.$instance.getValue()==l.$instance.getValue())return i.message=t.different.message,i}if(t.identical){const e=t.identical.field,l=t.$instance.getForm().getField(e);if(!n.isEmpty(l)&&t.$instance.getValue()!=l.$instance.getValue())return i.message=t.identical.message,i}return!0}},700:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});const l=i(224);let s={required:"{label} 필수 입력사항입니다.",fileButton:"파일찾기",selection:"선택",string:{minLength:"{minLength} 글자 이상으로 입력하세요.",maxLength:"{maxLength} 글자 이하로 입력하세요.",between:"{minLength} ~ {maxLength} 사이의 글자를 입력하세요."},number:{nan:"숫자만 입력 가능 합니다.",minimum:"{minimum} 값과 같거나 커야 합니다",exclusiveMinimum:"{minimum} 보다 커야 합니다",maximum:"{maximum} 값과 같거나 작아야 합니다",exclusiveMaximum:"{maximum} 보다 작아야 합니다.",between:"{minimum}~{maximum} 사이의 값을 입력하세요.",betweenExclusiveMin:"{minimum} 보다 크고 {maximum} 보다 같거나 작아야 합니다",betweenExclusiveMax:"{minimum} 보다 같거나 크고 {maximum} 보다 작아야 합니다",betweenExclusiveMinMax:"{minimum} 보다 크고 {maximum} 보다 작아야 합니다"},regexp:{mobile:"핸드폰 번호가 유효하지 않습니다.",email:"이메일이 유효하지 않습니다.",url:"URL이 유효하지 않습니다.",alpha:"영문만 입력 가능 합니다.","alpha-num":"영문과 숫자만 입력 가능 합니다.",number:"숫자만 입력 가능 합니다.",variable:"값이 유효하지 않습니다.","number-char":"숫자, 문자 각각 하나 이상 포함 되어야 합니다.","upper-char":"대문자가 하나 이상 포함 되어야 합니다.","upper-char-special":"대문자,소문자,특수문자 각각 하나 이상 포함 되어야 합니다.","upper-char-special-number":"대문자,소문자,특수문자,숫자 각각 하나 이상 포함 되어야합니다."}};function n(e,t){return e.replace(/\{{1,1}([A-Za-z0-9_.]*)\}{1,1}/g,((e,i)=>void 0!==t[i]?t[i]:e))}t.default=new class{constructor(){this.lang=s}set(e){this.lang=Object.assign({},s,e)}getMessage(e){return this.lang[e]}validMessage(e,t){var i;let s="",a=[];t.regexp&&(s=this.lang.regexp[t.regexp],a.push(s)),(null!==(i=t.constraint)&&void 0!==i?i:[]).forEach((t=>{t===l.RULES.REQUIRED&&(s=n(this.lang.required,e),a.push(s)),"number"==e.renderType||"range"==e.renderType?(s=this.lang.number[t],a.push(s)):(s=this.lang.string[t],a.push(s))}));const o=[],r=Object.assign({},{name:e.name,label:e.label},e.rule);return a.forEach((e=>{e&&o.push(n(e,r))})),t.validator&&o.push(t.validator.message),o}}},436:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getRenderer=void 0;const l=i(635),s=i(224),n=l.__importStar(i(47));t.getRenderer=e=>{let t;return e.renderType&&(t=s.RENDER_TEMPLATE[e.renderType]),!t||!1!==t.isDataRender()&&n.isUndefined(e.name)?n.isUndefined(e.name)?e.children?s.RENDER_TEMPLATE.group:s.RENDER_TEMPLATE.hidden:s.RENDER_TEMPLATE.text:t}},386:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});const l=i(635).__importStar(i(47)),s=i(224);function n(e){return e.replace(/\s+/g," ").trim()}t.default={fieldStyle(e,t,i,a){var o,r,d,u,h,c,f,m,v,p,g,E,b,y,$,_;const F={rowStyleClass:"horizontal"===t.orientation?"horizontal":"vertical",fieldClass:"",fieldStyle:"",labelClass:"",labelStyle:"",labelAlignClass:"",valueClass:"",valueStyle:"",tabAlignClass:""},w=null!==(d=null!==(r=null===(o=null==i?void 0:i.style)||void 0===o?void 0:o.labelWidth)&&void 0!==r?r:e.style.labelWidth)&&void 0!==d?d:"3";let S=null!==(c=null!==(h=null===(u=null==i?void 0:i.style)||void 0===u?void 0:u.valueWidth)&&void 0!==h?h:e.style.valueWidth)&&void 0!==c?c:"9";const V=null!==(m=null===(f=null==i?void 0:i.style)||void 0===f?void 0:f.position)&&void 0!==m?m:e.style.position,I=null===(v=t.style)||void 0===v?void 0:v.width,L=null!==(E=null!==(g=s.FIELD_POSITION_STYLE[null===(p=t.style)||void 0===p?void 0:p.position])&&void 0!==g?g:s.FIELD_POSITION_STYLE[V])&&void 0!==E?E:s.FIELD_POSITION_STYLE.top;F.fieldClass=`${L[0]} ${(null===(b=t.style)||void 0===b?void 0:b.customClass)||""}`,I&&(l.isNumber(I)?F.fieldClass+=l.isNumber(I)?` col-xs-${I}`:"":F.fieldStyle=l.isNumber(I)?"":`width:${I};`),F.tabAlignClass="tab-al-"+(["right","center"].includes(null===(y=t.style)||void 0===y?void 0:y.tabAlign)?t.style.tabAlign:"left");const T=(null===($=t.style)||void 0===$?void 0:$.labelWidth)||w;if(F.labelAlignClass=L[1],!a&&T&&!["top","bottom"].includes(L[0]))if(l.isNumber(T)){const e=+T;S=12-e,F.labelClass=`col-xs-${e}`,F.valueClass=F.labelStyle?"col-full":`col-xs-${S}`}else F.labelStyle=`width:${T};`;const D=(null===(_=t.style)||void 0===_?void 0:_.valueWidth)||S;return a&&!["left","right"].includes(L[0])?F.valueClass="col-full":D&&!["top","bottom"].includes(L[0])?l.isNumber(D)?F.valueClass=F.labelStyle?"col-full":`col-xs-${D}`:F.valueStyle=`width:${D};`:F.valueClass=F.labelStyle?"col-full":"",F.fieldClass=n(F.fieldClass),F.labelClass=n(F.labelClass),F.valueClass=n(F.valueClass),F}}},47:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.merge=t.templateToElement=t.isHiddenField=t.getHashCode=t.getXssFieldName=t.ignoreValueField=t.replaceXssField=t.isGridType=t.isTabType=t.isEmpty=t.isArray=t.isNumber=t.isString=t.isFunction=t.isUndefined=t.isBlank=t.unFieldName=t.unReplace=t.hasOwnProp=t.replaceXss=void 0,t.isPlainObject=l;const i={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};t.replaceXss=e=>{let t=e;return t&&Object.keys(i).forEach((e=>{t=t.replaceAll(e,i[e])})),t};t.hasOwnProp=(e,t)=>e.hasOwnProperty(t);t.unReplace=e=>{let t=e;return t&&Object.keys(i).forEach((e=>{t=t.replaceAll(i[e],e)})),t};t.unFieldName=e=>e?(0,t.unReplace)(e).replaceAll('"','\\"'):"";t.isBlank=e=>null===e||(""===e||(void 0===e||"string"==typeof e&&(""===e||""===e.replace(/\s/g,""))));t.isUndefined=e=>void 0===e;t.isFunction=e=>"function"==typeof e;t.isString=e=>"string"==typeof e;t.isNumber=e=>!(0,t.isBlank)(e)&&(e=+e,!isNaN(e));t.isArray=e=>Array.isArray(e);t.isEmpty=e=>(0,t.isUndefined)(e)||null==e;t.isTabType=e=>e&&"tab"===e.renderType;t.isGridType=e=>e&&"grid"===e.renderType;t.replaceXssField=e=>(e.$xssName=(0,t.getXssFieldName)(e),e.label=(0,t.replaceXss)(e.label),e);t.ignoreValueField=e=>(0,t.isGridType)(e.$parent)||(0,t.isTabType)(e.$parent);t.getXssFieldName=e=>{if((0,t.isUndefined)(e.$xssName)){let t=e.name;return t&&Object.keys(i).forEach((e=>{t=t.replaceAll(e,"_")})),"df_"+t}return e.$xssName};t.getHashCode=e=>{let t=0;if(0==e.length)return t;for(let i=0;i<e.length;i++){t=(t<<5)-t+e.charCodeAt(i),t|=0}return String(t).replaceAll(/-/g,"_")};t.isHiddenField=e=>"hidden"===e.renderType;function l(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function s(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}t.templateToElement=e=>{const t=document.createElement("template");return t.innerHTML=e,t.content.firstElementChild};function n(e,i){return s(i)?function(e,i){if((0,t.isFunction)(i))return i;for(const l of Object.keys(i)){const a=i[l];(0,t.isUndefined)(a)||(null===a||(0,t.isFunction)(a)?e[l]=a:(0,t.isEmpty)(e[l])?e[l]=n((0,t.isArray)(a)?[]:{},a):s(a)?n(e[l],a):e[l]=a)}return e}(e,i):(0,t.isArray)(i)?function(e,i){const s=l(e);for(let l=0;l<i.length;l+=1){const a=i[l];let o;o=null==a?a:n((0,t.isArray)(a)?[]:{},a),s?e[l]=o:e.push(o)}return e}(e,i):(a=i)instanceof Date&&!isNaN(a.valueOf())?new i.constructor(i):i;var a}t.merge=(...e)=>{let i=e[0];if(!l(i)||(0,t.isEmpty)(i))return i;let s=1;Object.keys(i).length>0&&(s=0,i=(0,t.isArray)(i)?[]:{});const a=e.length;for(;s<a;s+=1)n(i,e[s]);return i}},675:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.resetRowElementStyleClass=t.invalidMessage=void 0;const l=i(635).__importDefault(i(700));t.invalidMessage=(e,t,i)=>{if(!0!==i){if(t.classList.remove("valid"),t.classList.contains("invalid")||t.classList.add("invalid"),!1!==i){const s=l.default.validMessage(e,i);i.message&&s.push(i.message);const n=t.querySelector(".help-message");if(n&&s.length>0){const e=[];s.forEach((t=>{e.push(`<div>${t}</div>`)})),n.innerHTML=e.join("")}}}else{t.classList.remove("invalid"),t.classList.contains("valid")||t.classList.add("valid");const e=t.querySelector(".help-message");e&&(e.innerHTML="")}};t.resetRowElementStyleClass=e=>{e.classList.remove("invalid"),e.classList.remove("valid")}},60:(e,t,i)=>{i.r(t)}},i={};function l(e){var s=i[e];if(void 0!==s)return s.exports;var n=i[e]={exports:{}};return t[e](n,n.exports,l),n.exports}l.m=t,e=[],l.O=(t,i,s,n)=>{if(!i){var a=1/0;for(u=0;u<e.length;u++){for(var[i,s,n]=e[u],o=!0,r=0;r<i.length;r++)(!1&n||a>=n)&&Object.keys(l.O).every((e=>l.O[e](i[r])))?i.splice(r--,1):(o=!1,n<a&&(a=n));if(o){e.splice(u--,1);var d=s();void 0!==d&&(t=d)}}return t}n=n||0;for(var u=e.length;u>0&&e[u-1][2]>n;u--)e[u]=e[u-1];e[u]=[i,s,n]},l.d=(e,t)=>{for(var i in t)l.o(t,i)&&!l.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},l.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),l.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={792:0};l.O.j=t=>0===e[t];var t=(t,i)=>{var s,n,[a,o,r]=i,d=0;if(a.some((t=>0!==e[t]))){for(s in o)l.o(o,s)&&(l.m[s]=o[s]);if(r)var u=r(l)}for(t&&t(i);d<a.length;d++)n=a[d],l.o(e,n)&&e[n]&&e[n][0](),e[n]=0;return l.O(u)},i=self.webpackChunkDaracl_form=self.webpackChunkDaracl_form||[];i.forEach(t.bind(null,0)),i.push=t.bind(null,i.push.bind(i))})();var s=l.O(void 0,[202],(()=>l(129)));return s=l.O(s)})()));
6
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Daracl=t():(e.Daracl=e.Daracl||{},e.Daracl.form=t())}(self,(()=>(()=>{"use strict";var e,t={9:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});const l=i(635),s=l.__importStar(i(47)),n=l.__importDefault(i(700)),a=i(673),o=i(181),r=i(913),d=l.__importDefault(i(347)),u=l.__importDefault(i(805)),h={style:{width:"100%",labelWidth:3,valueWidth:9,position:"left-right"},mode:"new",useTypeValue:!0,autoCreate:!0,notValidMessage:"This form is not valid.",fields:[]},c={},f="data-form-uid";let m=0;class v{constructor(e,t,i){var l;if(this.formValue={},this.changeMode=e=>{this.options.mode=e,this.formElement.setAttribute("data-df-mode",e)},this.resetForm=()=>{const e=this.fieldInfoMap.getAllFieldInfo();for(const t in e){const i=e[t].$instance;i&&"function"==typeof i.reset&&i.reset()}this.formValue={},this.conditionCheck()},this.resetField=e=>{this.fieldInfoMap.getFieldName(e).$instance.reset(),this.formValue[e]="",this.conditionCheck()},this.getFieldValue=e=>{const t=this.fieldInfoMap.getFieldName(e);return t?t.$instance.getValue():null},this.getValue=e=>this.fieldInfoMap.getAllFieldValue(this.formValue,e),this.getFormDataValue=e=>this.fieldInfoMap.getFormDataValue(this.formValue,e),this.setValue=(e,t)=>{!1!==t&&this.resetForm(),Object.keys(e).forEach((t=>{this._setFieldValue(t,e[t])})),this.conditionCheck()},this.setFieldValue=(e,t)=>{this._setFieldValue(e,t),this.conditionCheck()},this.setFieldItems=(e,t)=>{const i=this.fieldInfoMap.getFieldName(e);if(i)return i.$instance.setValueItems(t)},this.addField=e=>{this.options.fields.push(e),this.formTemplate.addRow(e),this.conditionCheck()},this.removeField=e=>{var t;const i=this.getFieldElement(e);null!=i&&(null===(t=i.closest(".df-row"))||void 0===t||t.remove()),this.fieldInfoMap.removeFieldInfo(e)},this.isValidForm=()=>this.validForm().length<1,this.validForm=()=>{let e=[],t=!1!==this.options.autoFocus,i=!0;const l=this.fieldInfoMap.getAllFieldInfo();for(const n in l){const a=l[n];let o=this.fieldInfoMap.getFieldValidation(a,t);!0!==o&&(t=!1,s.isGridType(a)?e=e.concat(o):(i&&(this.validTabCheck(a),i=!1),e.push(o)))}return e},this.isValidField=e=>{const t=this.fieldInfoMap.getFieldName(e);if(s.isUndefined(t))throw new Error(`Field name [${e}] not found`);const i=t.$instance;return!i||!0===i.valid()},this.getOptions=()=>this.options,this.destroy=()=>{this.formElement.className=this.orginFormStyleClass,this.formElement.replaceChildren();for(const e in this)s.hasOwnProp(this,e)&&(delete this[e],delete c[this.selector])},this.getFields=()=>this.options.fields,this.setFields=e=>{this.options.fields=e,this.createForm(e)},this.options=s.merge({},h,t),n.default.set(i),!e)throw new Error(`${e} form selector not found`);this.orginFormStyleClass=e.className,e.classList.add("daracl-form"),this.selector="df_"+ ++m,e.setAttribute("name",this.selector),e.setAttribute(f,this.selector),this.options.style.width&&e.setAttribute("style",`width:${this.options.style.width};`),this.formElement=e,this.changeMode(null!==(l=this.options.mode)&&void 0!==l?l:"new"),this.createForm(this.options.fields),!1!==this.options.autoCreate&&(c[this.selector]=this)}static create(e,t,i){return new v(e,t,i)}static setMessage(e){n.default.set(e)}createForm(e){this.fieldInfoMap=new d.default(this.selector,this),this.formTemplate=new u.default(this,this.formElement,this.fieldInfoMap),!1!==this.options.autoCreate&&(e.forEach((e=>{this.formTemplate.addRow(e)})),this.conditionCheck(),this.options.onMounted&&this.options.onMounted.call(this))}getFieldElement(e){const t=this.fieldInfoMap.getFieldName(e);return(null==t?void 0:t.$instance)?t.$instance.getElement():null}getField(e){return this.fieldInfoMap.getFieldName(e)}_setFieldValue(e,t){this.formValue[e]=t;const i=this.fieldInfoMap.getFieldName(e);i&&i.$instance.setValue(t)}validTabCheck(e){e.$parent&&("tab"==e.$parent.renderType&&e.$parent.$instance.setActive(e.$key),this.validTabCheck(e.$parent))}conditionCheck(){this.fieldInfoMap.conditionCheck()}setFieldDisabled(e,t){this.fieldInfoMap.getFieldName(e).$instance.setDisabled(t)}setFieldDescription(e,t){this.fieldInfoMap.getFieldName(e).$instance.setDescription(t)}static instance(e){let t;t=s.isString(e)?document.querySelector(e):e;let i=t.getAttribute(f);if(s.isUndefined(i)||s.isBlank(i)){const e=Object.keys(c);if(e.length>1)throw new Error(`selector empty : [${i}]`);return i=e[0],c[i]}}getFieldInfoMap(){return this.fieldInfoMap}}v.VERSION="0.0.8",v.validator={string:(e,t)=>(0,a.stringValidator)(e,t),number:(e,t)=>(0,o.numberValidator)(e,t),regexp:(e,t)=>{let i={name:t.name,constraint:[]};return(0,r.regexpValidator)(e,t,i)}},t.default=v},347:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});const l=i(635),s=i(224),n=i(436),a=l.__importDefault(i(700)),o=l.__importStar(i(47));function r(e,t,i){if(o.ignoreValueField(t))return e;const l=t.$instance.getValue();if("file"===t.renderType){const i=l.uploadFile;e[t.$validName]=i,e[t.$validName+"RemoveIds"]=l.removeIds}else if(!0!==i)if(o.isTabType(t))for(let[t,i]of Object.entries(l))e[t]=i;else o.isEmpty(t.name)||(e[t.name]=l);else e[t.$validName]=l;return e}function d(e,t,i){if(o.ignoreValueField(t))return e;const l=t.$instance.getValue();if("file"===t.renderType){const i=l.uploadFile;e.delete(t.$validName);for(let l of i)e.append(t.$validName,l);e.set(t.$validName+"RemoveIds",l.removeIds)}else if(!0!==i)if(o.isTabType(t))for(let[t,i]of Object.entries(l))e.set(t,i);else o.isEmpty(t.name)||e.set(t.$validName,l);else e.set(t.$validName,l);return e}t.default=class{constructor(e,t){this.fieldIdx=0,this.allFieldInfo={},this.keyNameMap={},this.conditionFields=[],this.fieldPrefix=`${s.FIELD_PREFIX}_${o.getHashCode(e)}`,this.form=t}addField(e){var t;o.replaceXssField(e),this.fieldIdx+=1,e.$key=`${this.fieldPrefix}_${this.fieldIdx}`,e.$validName=null!==(t=e.name)&&void 0!==t?t:e.label,this.keyNameMap[e.$validName]=e.$key,this.allFieldInfo[e.$key]=e,e.$renderType=(0,n.getRenderer)(e),e.conditional&&this.conditionFields.push(e.$key)}getFieldName(e){return this.allFieldInfo[this.keyNameMap[e]]}get(e){return this.allFieldInfo[e]}hasFieldName(e){return!(!this.keyNameMap[e]||!this.allFieldInfo[this.keyNameMap[e]])}getAllFieldInfo(){return this.allFieldInfo}removeFieldInfo(e){delete this.allFieldInfo[this.keyNameMap[e]]}getAllFieldValue(e,t){const i=this.form.getOptions().useTypeValue;if(!0!==t){for(let[t,l]of Object.entries(this.allFieldInfo))e=r(e,l,i);return e}return new Promise(((t,l)=>{for(let[t,s]of Object.entries(this.allFieldInfo)){if(!s.$instance.isEnableView())continue;let t=this.getFieldValidation(s,!0);if(!0!==t)return void l(new Error(t.message,{cause:t}));e=r(e,s,i)}t(e)}))}getFormDataValue(e,t){if(!0!==t){let t=new FormData;for(let[i,l]of Object.entries(e))t.set(i,l);for(let[e,i]of Object.entries(this.allFieldInfo))d(t,i,i.$instance.getValue());return t}return new Promise(((t,i)=>{let l=new FormData;for(let[t,i]of Object.entries(e))l.set(t,i);for(let[e,t]of Object.entries(this.allFieldInfo)){if(!t.$instance.isEnableView())continue;let e=this.getFieldValidation(t,!0);if(!0!==e)return void i(new Error(e.message,{cause:e}));d(l,t,t.$instance.getValue())}t(l)}))}isConditionFieldCheck(e){let t=e;for(;void 0!==t;){if(!this.isConditionField(t))return!1;t=t.$parent}return!0}isConditionField(e){if(!this.conditionFields.includes(e.$key))return!0;let t=!1;if(e.conditional.custom)t=e.conditional.custom.call(null,e);else if(e.conditional.field){const i=this.getFieldName(e.conditional.field);i&&e.conditional.eq==i.$instance.getValue()&&(t=!0)}return t}conditionCheck(){this.conditionFields.forEach((e=>{const t=this.allFieldInfo[e];this.isConditionField(t)?t.$instance.show():t.$instance.hide()}))}getFieldValidation(e,t){if(!this.isConditionFieldCheck(e))return!0;const i=e.$instance;let l=i.valid();return!0===l||(t&&i.focus(),o.isUndefined(l.message)&&(l.message=a.default.validMessage(e,l)[0]),l)}}},805:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});const l=i(635),s=l.__importStar(i(47)),n=l.__importDefault(i(386));t.default=class{constructor(e,t,i){this.addRowFields=[],this.daraform=e,this.options=e.getOptions(),this.formElement=t,this.fieldInfoMap=i}addRow(e){this.checkHiddenField(e)||(this.addRowFields=[],this.addRowTemplate(e))}addRowTemplate(e){var t;let i=this.isLabelHide(e),l=n.default.fieldStyle(this.options,e,null,i);this.addRowFieldInfo(e);const a=s.templateToElement(`\n <div class="df-row form-group ${l.fieldClass}" id="${e.$key}">\n ${i?"":`<div class="df-label ${l.labelClass} ${l.labelAlignClass}" title="${null!==(t=e.label)&&void 0!==t?t:""}" style="${l.labelStyle}">${this.getLabelTemplate(e)}</div>`}\n\n <div class="df-field-container ${l.valueClass} ${e.required?"required":""}" style="${l.valueStyle}"></div>\n </div>\n `);a&&(this.createField(e,a),this.formElement.append(a),e.children&&this.childTemplate(e,l))}createField(e,t){e.$instance=new e.$renderType(e,t,this.daraform)}childTemplate(e,t){var i,l;let a=null,o=!0,r=!1;if(!e.$renderType.isChildrenCreate())return;const d=document.createElement("div");d.classList.add("df-row",null!==(i=t.rowStyleClass)&&void 0!==i?i:"");let u=0;for(const i of e.children){if(s.isEmpty(i))throw new Error(`parent field :[${e.$validName}], children index ${u}, empty [${i}]`);if(i.$parent=e,++u,this.checkHiddenField(i))continue;this.addRowFieldInfo(i),o&&(a=i);let h,c=this.isLabelHide(i),f="";c?(h=n.default.fieldStyle(this.options,i,a,!r),f=r?`<span class="df-label empty ${h.labelClass}" style="${h.labelStyle}"></span>`:""):(h=n.default.fieldStyle(this.options,i,a,!1),f=`<span class="df-label ${h.labelClass} ${h.labelAlignClass}" title="${null!==(l=i.label)&&void 0!==l?l:""}" style="${h.labelStyle}">${this.getLabelTemplate(i)}</span>`);const m=s.templateToElement(`<div class="form-group ${h.fieldClass}" style="${h.fieldStyle}" id="${i.$key}">\n ${f}\n <span class="df-field-container ${h.valueClass} ${i.required?"required":""}" style="${h.valueStyle}"></span>\n </div>`);m&&(this.createField(i,m),d.append(m),i.children&&this.childTemplate(i,i.children?h:t)),c||(r=!0),o=!1}e.$instance.addChildField(d)}getLabelTemplate(e){var t;const i=e.required?'<span class="required"></span>':"",l=s.isBlank(e.tooltip)?"":`<span class="df-tooltip">?<span class="tooltip">${e.tooltip}</span></span>`;return`${null!==(t=e.label)&&void 0!==t?t:""} ${l} ${i}`}isLabelHide(e){var t;return(null===(t=e.style)||void 0===t?void 0:t.labelHide)||s.isUndefined(e.label)}checkHiddenField(e){return!!s.isHiddenField(e)&&(this.fieldInfoMap.addField(e),e.$instance=new e.$renderType(e,null,this.daraform),!0)}addRowFieldInfo(e){if(!s.isBlank(e.name)&&this.fieldInfoMap.hasFieldName(e.name))throw new Error(`Duplicate field name "${e.name}"`);this.fieldInfoMap.addField(e),this.addRowFields.push(e.$key)}}},224:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FIELD_POSITION_STYLE=t.ALIGN=t.RENDER_TEMPLATE=t.FIELD_PREFIX=t.RULES=void 0;const l=i(635),s=l.__importDefault(i(260)),n=l.__importDefault(i(891)),a=l.__importDefault(i(680)),o=l.__importDefault(i(734)),r=l.__importDefault(i(948)),d=l.__importDefault(i(442)),u=l.__importDefault(i(188)),h=l.__importDefault(i(559)),c=l.__importDefault(i(826)),f=l.__importDefault(i(890)),m=l.__importDefault(i(241)),v=l.__importDefault(i(753)),p=l.__importDefault(i(728)),g=l.__importDefault(i(905)),E=l.__importDefault(i(22)),b=l.__importDefault(i(757));t.RULES={NAN:"nan",MIN:"minimum",EXCLUSIVE_MIN:"exclusiveMinimum",MAX:"maximum",EXCLUSIVE_MAX:"exclusiveMaximum",MIN_LENGTH:"minLength",MAX_LENGTH:"maxLength",BETWEEN:"between",BETWEEN_EXCLUSIVE_MIN:"betweenExclusiveMin",BETWEEN_EXCLUSIVE_MAX:"betweenExclusiveMax",BETWEEN_EXCLUSIVE_MINMAX:"betweenExclusiveMinMax",REGEXP:"regexp",REQUIRED:"required",VALIDATOR:"validator"},t.FIELD_PREFIX="dff",t.RENDER_TEMPLATE={number:s.default,textarea:n.default,dropdown:a.default,checkbox:r.default,radio:d.default,text:o.default,password:u.default,file:h.default,custom:c.default,group:f.default,hidden:m.default,button:v.default,range:p.default,datehour:g.default,datemonth:g.default,date:g.default,datetime:g.default,tab:E.default,grid:b.default},t.ALIGN={left:"left",center:"center",right:"right"},t.FIELD_POSITION_STYLE={"top-left":["top","txt-left"],"top-center":["top","txt-center"],"top-right":["top","txt-right"],"left-left":["","txt-left"],"left-center":["","txt-center"],"left-right":["","txt-right"],"right-right":["right","txt-right"],"right-center":["right","txt-center"],"right-left":["right","txt-left"],"bottom-left":["bottom","txt-left"],"bottom-center":["bottom","txt-center"],"bottom-right":["bottom","txt-right"]},t.FIELD_POSITION_STYLE.top=t.FIELD_POSITION_STYLE["top-left"],t.FIELD_POSITION_STYLE.right=t.FIELD_POSITION_STYLE["right-right"],t.FIELD_POSITION_STYLE.left=t.FIELD_POSITION_STYLE["left-left"],t.FIELD_POSITION_STYLE.bottom=t.FIELD_POSITION_STYLE["bottom-left"]},41:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.customChangeEventCall=t.dropdownChangeEvent=t.numberInputEvent=t.inputEvent=void 0;const l=i(635).__importStar(i(47));t.inputEvent=(e,i,l)=>{i.addEventListener("input",(i=>{(0,t.customChangeEventCall)(e,i,l,l.getValue()),l.valid()}))};t.numberInputEvent=(e,i,s)=>{i.addEventListener("keyup",(n=>{const a=n.target.value;l.isNumber(a)||(i.value=a.replace(/[^0-9\.\-\+]/g,""),n.preventDefault()),(0,t.customChangeEventCall)(e,n,s,s.getValue()),s.valid()}))};t.dropdownChangeEvent=(e,i,l)=>{i.addEventListener("change",(i=>{(0,t.customChangeEventCall)(e,i,l,l.getValue()),l.valid()}))};t.customChangeEventCall=(e,t,i,l)=>{i.changeEventCall(e,t,i,l)}},129:(e,t,i)=>{const l=i(635).__importDefault(i(9));i(60),i(752),e.exports=l.default},753:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});const l=i(635).__importDefault(i(309));class s extends l.default{constructor(e,t,i){super(i,e,t),this.mounted(),this.setDefaultOption()}mounted(){var e;null===(e=this.rowElement.querySelector(`#${this.field.$key}`))||void 0===e||e.addEventListener("click",(e=>{this.field.onClick&&this.field.onClick.call(null,this.field)}))}static isDataRender(){return!1}createField(){const e=this.field;this.rowElement.querySelector(".df-field-container").innerHTML=`\n <button type="button" id="${e.$key}" class="df-btn">${e.label}</button> ${l.default.getDescriptionTemplate(e)}\n `}getValue(){return""}setValue(e){}reset(){this.setDisabled(!1)}getElement(){return null}valid(){return!0}}t.default=s},948:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});const l=i(635),s=l.__importDefault(i(309)),n=l.__importStar(i(47)),a=i(224),o=i(675),r=i(41);class d extends s.default{constructor(e,t,i){var l,s;super(i,e,t),this.defaultCheckValue=[],this.defaultCheckValue=[];let a=[];n.isUndefined(e.defaultValue)||(a=n.isArray(e.defaultValue)?e.defaultValue:[e.defaultValue]);const o=d.valuesValueKey(e);n.isUndefined(this.field.listItem)&&this.setValueItems([{label:"",value:"Y"}]);let r=!1;null===(s=null===(l=this.field.listItem)||void 0===l?void 0:l.list)||void 0===s||s.forEach((e=>{let t=e[o];e.selected&&this.defaultCheckValue.push(t||!0),a.includes(t)&&(r=!0)})),this.defaultCheckValue=r?a:this.defaultCheckValue,this.mounted(),this.setDefaultOption(),this.setValue(this.defaultCheckValue,!1)}mounted(){this.initEvent()}initEvent(){this.rowElement.querySelectorAll(this.getSelector()).forEach((e=>{e.addEventListener("change",(e=>{(0,r.customChangeEventCall)(this.field,e,this,this.getValue()),this.valid()}))}))}getSelector(){return`input[type="checkbox"][name="${this.field.$xssName}"]`}createField(){var e,t;const i=this.field,l=this.rowElement.querySelector(".df-field-container"),a=[],o=i.$xssName,r=s.default.valuesLabelKey(i),d=s.default.valuesValueKey(i);a.push(' <div class="df-field"><div class="field-group">'),null===(t=null===(e=i.listItem)||void 0===e?void 0:e.list)||void 0===t||t.forEach((e=>{const t=e[d];a.push(`\n <span class="field ${"vertical"==i.listItem.orientation?"vertical":"horizontal"}">\n <label>\n <input type="checkbox" name="${o}" value="${t?n.replaceXss(t):""}" class="form-field checkbox" ${e.selected?"checked":""} ${e.disabled?"disabled":""} />\n ${s.default.valuesLabelValue(r,e)}\n </label>\n </span>\n `)})),a.push(`<i class="daracl-icon help-icon"></i></div></div> ${s.default.getDescriptionTemplate(i)}<div class="help-message"></div>`),l.innerHTML=a.join("")}setValueItems(e){if(this.rowElement.querySelector(".df-field-container")&&(this.field.listItem?this.field.listItem.list=e:this.field.listItem={list:e},this.createField(),!n.isBlank(this.field.$value))){const e=this.field.$value;this.field.$value="",this.setValue(e)}}getValue(){const e=this.rowElement.querySelectorAll(this.getSelector());if(e.length>1){const t=[];return e.forEach((e=>{const i=e;i.checked&&t.push(i.value)})),t}{const e=this.rowElement.querySelector(`[name="${this.field.$xssName}"]`);return(null==e?void 0:e.checked)?!e.value||e.value:!!e.value&&""}}setValue(e,t){if(!1!==t&&!1===this.changeEventCall(this.field,null,this,e)&&(e=this.field.$value),this.field.$value=e,!0===e)return void(this.rowElement.querySelector(`[name="${this.field.$xssName}"]`).checked=!0);if(!1===e)return void(this.rowElement.querySelector(`[name="${this.field.$xssName}"]`).checked=!1);let i=[];Array.isArray(e)?i=e:i.push(e);this.rowElement.querySelectorAll(this.getSelector()).forEach((e=>{e.checked=!1})),i.forEach((e=>{const t=this.rowElement.querySelector(`[name="${this.field.$xssName}"][value="${e}"]`);t&&(t.checked=!0)}))}reset(){var e,t;1==(null===(t=null===(e=this.field.listItem)||void 0===e?void 0:e.list)||void 0===t?void 0:t.length)&&1==this.defaultCheckValue.length?this.setValue(!0,!1):this.setValue(this.defaultCheckValue,!1),this.setDisabled(!1),(0,o.resetRowElementStyleClass)(this.rowElement)}getElement(){return this.rowElement.querySelectorAll(`[name="${this.field.$xssName}"]`)}focus(){const e=this.getElement();e&&e.length>0&&this.getElement()[0].focus()}valid(){const e=this.getValue();let t=!0;return this.field.required&&n.isArray(e)&&e.length<1&&(t={name:this.field.name,constraint:[]},t.constraint.push(a.RULES.REQUIRED)),(0,o.invalidMessage)(this.field,this.rowElement,t),t}}t.default=d},826:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});const l=i(635),s=l.__importDefault(i(309)),n=i(675),a=l.__importStar(i(47)),o=i(673);class r extends s.default{constructor(e,t,i){super(i,e,t),e.renderer?(this.customFunction=e.renderer,this.mounted(),this.setDefaultOption(),this.setDefaultInfo()):this.customFunction={}}mounted(){this.customFunction.mounted&&this.customFunction.mounted.call(this,this.field,this.rowElement)}static isDataRender(){return!1}createField(){const e=this.field,t=a.isEmpty(e.template)?"":a.isString(e.template)?e.template:e.template();this.rowElement.querySelector(".df-field-container").innerHTML=` <div class="df-field">\n ${t}\n </div>\n ${s.default.getDescriptionTemplate(e)}\n <div class="help-message"></div>`}getValue(){return this.customFunction.getValue?this.customFunction.getValue.call(this,this.field,this.rowElement):""}setValue(e,t){this.customFunction.setValue&&(!1!==t&&!1===this.changeEventCall(this.field,null,this,e)&&(e=this.field.$value),this.customFunction.setValue.call(this,e,this.field,this.rowElement)),this.field.$value=e}reset(){this.setDefaultInfo(),(0,n.resetRowElementStyleClass)(this.rowElement)}getElement(){return this.customFunction.getElement?this.customFunction.getElement.call(this,this.field,this.rowElement):null}valid(){if(this.customFunction.valid){const e=this.customFunction.valid.call(this,this.field,this.rowElement);return void(0,n.invalidMessage)(this.field,this.rowElement,e)}const e=(0,o.stringValidator)(this.getValue(),this.field);return(0,n.invalidMessage)(this.field,this.rowElement,e),e}focus(){this.customFunction.focus&&this.customFunction.focus.call(this,this.field,this.rowElement)}}t.default=r},905:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});const l=i(635),s=l.__importDefault(i(309)),n=i(673),a=i(675),o=l.__importStar(i(47));class r extends s.default{constructor(e,t,i){super(i,e,t),this.mounted(),this.setDefaultOption(),this.setDefaultInfo()}mounted(){let e;this.field.customOptions=Object.assign({},this.field.customOptions),void 0!==this.field.customOptions.onSelect&&(e=typeof this.field.customOptions.onSelect),o.isUndefined(this.field.customOptions.mode)&&("datemonth"==this.field.renderType||"datehour"==this.field.renderType?this.field.customOptions.mode=this.field.renderType.replace("date",""):this.field.customOptions.mode=this.field.renderType),this.field.customOptions.onSelect=(t,i)=>{e&&e(t,i),this.setValue(t),this.valid()},this.loadDate()}loadDate(){return l.__awaiter(this,void 0,void 0,(function*(){const e=yield Promise.resolve().then((()=>l.__importStar(i(193))));this.dateObj=new e.default(this.element,this.field.customOptions,{})}))}createField(){const e=this.field,t=this.rowElement.querySelector(".df-field-container");t.innerHTML=`\n <div class="df-field">\n <input type="text" name="${e.$xssName}" class="form-field text help-icon" autocomplete="off" readonly/>\n </div>\n ${s.default.getDescriptionTemplate(e)}\n <div class="help-message"></div>\n `,this.element=t.querySelector(`[name="${e.$xssName}"]`)}getValue(){return this.element.value}setValue(e,t){!1===t||!1!==this.changeEventCall(this.field,null,this,e)?(this.field.$value=e,this.element.value=e):this.element.value=this.field.$value}reset(){this.setDefaultInfo(),this.setDisabled(!1),(0,a.resetRowElementStyleClass)(this.rowElement)}getElement(){return this.element}valid(){const e=(0,n.stringValidator)(this.getValue(),this.field);return(0,a.invalidMessage)(this.field,this.rowElement,e),e}}t.default=r},680:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});const l=i(635),s=l.__importDefault(i(309)),n=i(224),a=i(675),o=i(41),r=l.__importStar(i(47)),d=l.__importDefault(i(700));class u extends s.default{constructor(e,t,i){var l,s,n,a,o;super(i,e,t);let d="";r.isUndefined(e.defaultValue)||(d=e.defaultValue);const h=u.valuesValueKey(e);let c=!1;null===(s=null===(l=this.field.listItem)||void 0===l?void 0:l.list)||void 0===s||s.forEach((e=>{let t=e[h];e.selected&&(this.defaultSelected=t),t==d&&(c=!0)})),c?this.defaultSelected=d:this.defaultSelected||!0===(null===(n=e.customOptions)||void 0===n?void 0:n.disableDefaultOption)&&(this.defaultSelected=(null===(o=null===(a=this.field.listItem)||void 0===a?void 0:a.list)||void 0===o?void 0:o.length)>0&&this.field.listItem.list[0][h]||""),r.isUndefined(this.defaultSelected)&&(this.defaultSelected=""),this.mounted(),this.setDefaultOption(),this.setValue(this.defaultSelected,!1)}mounted(){(0,o.dropdownChangeEvent)(this.field,this.element,this)}createField(){const e=this.field,t=this.rowElement.querySelector(".df-field-container");let i=` <div class="df-field"><select name="${e.$xssName}" class="form-field dropdown">\n ${this.dropdownValuesTemplate(e)}\n </select> <i class="help-icon"></i></div>\n ${s.default.getDescriptionTemplate(e)}\n <div class="help-message"></div>\n `;t.innerHTML=i,this.element=t.querySelector(`[name="${e.$xssName}"]`)}setValueItems(e){if(this.field.listItem?this.field.listItem.list=e:this.field.listItem={list:e},this.element.innerHTML=this.dropdownValuesTemplate(this.field),!r.isBlank(this.field.$value)){const e=this.field.$value;this.field.$value="",this.setValue(e)}}getValue(){return this.element.value}setValue(e,t){!1===t||!1!==this.changeEventCall(this.field,null,this,e)?(this.field.$value=e,this.element.value=e):this.element.value=this.field.$value}reset(){this.setValue(this.defaultSelected,!1),this.setDisabled(!1),(0,a.resetRowElementStyleClass)(this.rowElement)}getElement(){return this.element}valid(){const e=this.getValue();let t=!0;return this.field.required&&e.length<1&&(t={name:this.field.name,constraint:[]},t.constraint.push(n.RULES.REQUIRED)),(0,a.invalidMessage)(this.field,this.rowElement,t),t}dropdownValuesTemplate(e){var t,i,l;const n=s.default.valuesLabelKey(e),a=s.default.valuesValueKey(e);let o="";return!0!==(null===(t=e.customOptions)||void 0===t?void 0:t.disableDefaultOption)&&(o+=`<option value="">${d.default.getMessage("selection")}</option>`),null===(l=null===(i=e.listItem)||void 0===i?void 0:i.list)||void 0===l||l.forEach((e=>{const t=`${e.selected?"selected":""} ${e.disabled?"disabled":""}`;r.isUndefined(e[a])&&e.label?o+=`<option value="${e.value||""}" ${t}>${e.label}</option>`:o+=`<option value="${e[a]}" ${t}>${s.default.valuesLabelValue(n,e)}</option>`})),o}}t.default=u},559:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});const l=i(635),s=l.__importDefault(i(309)),n=i(675),a=i(556),o=l.__importDefault(i(700)),r=i(41),d=l.__importStar(i(47));class u extends s.default{constructor(e,t,i){var l;super(i,e,t),this.removeIds=[],this.uploadFiles={},this.fileList=[],this.fileSeq=0,this.element=t.querySelector(`[name="${e.$xssName}"]`),this.fileList=(null===(l=e.listItem)||void 0===l?void 0:l.list)||[],this.mounted(),this.setDefaultOption()}mounted(){this.element.addEventListener("change",(e=>{var t;const i=null===(t=e.target)||void 0===t?void 0:t.files;if(i){let e=[];for(let t of i)e.push(t);this.addFiles(e)}(0,r.customChangeEventCall)(this.field,e,this,this.fileList),this.valid()})),this.fileList.forEach((e=>{e.$seq=this.fileSeq+=1})),this.setFileList(this.fileList)}createField(){const e=this.field,t=this.rowElement.querySelector(".df-field-container");t.innerHTML=`\n <div class="df-field">\n <span class="file-wrapper">\n <label class="file-label">\n <input type="file" name="${e.$xssName}" class="form-field file" multiple />\n ${o.default.getMessage("fileButton")}\n </label>\n <i class="daracl-icon help-icon"></i>\n </span>\n </div>\n ${s.default.getDescriptionTemplate(e)}\n <div class="daracl-file-list"></div>\n <div class="help-message"></div>\n `,this.element=t.querySelector(`[name="${e.$xssName}"]`)}addFiles(e){let t=!1;const i=[];for(let l of e){if(this.fileList.filter((e=>e.fileName==l.name&&e.fileSize==l.size&&e.lastModified==l.lastModified)).length>0)continue;this.fileSeq+=1,this.uploadFiles[this.fileSeq]=l;let e={fileName:l.name,$seq:this.fileSeq,fileSize:l.size,lastModified:l.lastModified};i.push(e),t=!0}t&&(this.setFileList(i),this.fileList.push(...i))}setFileList(e,t){const i=this.rowElement.querySelector(".daracl-file-list");if(i){!0===t&&(i.innerHTML="");const l=[];e.forEach((e=>{l.push(`\n <div class="file-item" data-seq="${e.$seq}">\n ${e.fileId?'<span class="file-icon download"></span>':'<span class="file-icon"></span>'} <span class="file-icon remove"></span>\n <span class="file-name">${e.fileName}</span > \n </div>`)})),i.insertAdjacentHTML("beforeend",l.join("")),e.forEach((e=>{this.removeFileEvent(e,i),this.downloadFileEvent(e,i)}))}}downloadFileEvent(e,t){const i=t.querySelector(`[data-seq="${e.$seq}"] .download`);i&&i.addEventListener("click",(e=>{const t=e.target.closest(".file-item");if(t){const e=t.getAttribute("data-seq");if(e){const t=parseInt(e,10),i=this.fileList.findIndex((e=>e.$seq===t)),l=this.fileList[i];if(l.url)return void(location.href=l.url);if(this.field.fileDownload)return void this.field.fileDownload.call(null,{file:l,field:this.field})}}}))}removeFileEvent(e,t){const i=t.querySelector(`[data-seq="${e.$seq}"] .remove`);i&&i.addEventListener("click",(e=>{const t=e.target.closest(".file-item");if(t){const e=t.getAttribute("data-seq");if(e){const i=parseInt(e,10),l=this.fileList.findIndex((e=>e.$seq===i)),s=this.fileList[l];this.fileList.splice(l,1),delete this.uploadFiles[i],t.remove(),s.fileId&&this.removeIds.push(s.fileId)}}this.valid()}))}getValue(){return{uploadFile:Object.values(this.uploadFiles),removeIds:this.removeIds}}setValueItems(e){this.fileList=[],this.uploadFiles=[],this.removeIds=[];for(let t of e)t.$seq=this.fileSeq+=1,this.fileList.push(t);this.setFileList(this.fileList,!0)}setValue(e){d.isArray(e)&&this.setValueItems(e),this.element.value=""}reset(){this.setValue(""),this.setValueItems([]),(0,n.resetRowElementStyleClass)(this.rowElement)}getElement(){return this.element}valid(){const e=(0,a.fileValidator)(this.element,this.field,this.fileList);return(0,n.invalidMessage)(this.field,this.rowElement,e),e}}t.default=u},757:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});const l=i(635),s=l.__importDefault(i(309)),n=i(675),a=l.__importDefault(i(9)),o=l.__importStar(i(47)),r=l.__importDefault(i(386));let d=0;class u extends s.default{constructor(e,t,i){super(i,e,t),this.allAddRowInfo={},e.renderer?this.customFunction=e.renderer:this.customFunction={};this.gridForm=new a.default(document.createElement("div"),{style:{width:"100%",labelWidth:3,valueWidth:9,position:"left-right"},autoCreate:!1,notValidMessage:"This form is not valid.",fields:[]}),this.mounted(),this.setDefaultOption(),this.setDefaultInfo()}mounted(){var e;this.addRow(),this.customFunction.mounted&&this.customFunction.mounted.call(this,this.field,this.rowElement),null===(e=this.rowElement.querySelector(".df-grid-add-row-btn"))||void 0===e||e.addEventListener("click",(e=>{this.addRow()}))}static isDataRender(){return!1}static isChildrenCreate(){return!1}createField(){var e,t,i,l,s,n,a;const o=this.field,r=this.rowElement.querySelector(".df-field-container");let d=[],u=[],h=[];if(h.push(""),o.children){u.push("<colgroup>"),d.push("<tr>"),u.push('<col style="width:38px">'),d.push("<th>"),!0!==(null===(e=o.gridOptions)||void 0===e?void 0:e.disableAddButton)&&d.push('<button type="button" class="df-btn df-grid-add-row-btn" title="Add"><i class="df-icon df-add-icon"></i></button>'),d.push("</th>");for(const e of o.children)u.push(`<col style="width:${null!==(i=null===(t=e.style)||void 0===t?void 0:t.width)&&void 0!==i?i:"*"}">`),d.push(`<th class="df-grid-header">${e.label}</th>`);u.push("</colgroup>"),d.push("</tr>")}r.innerHTML=`\n <div class="df-grid-field">\n ${h.join("")}\n <div class="df-grid-container ${null!==(s=null===(l=o.style)||void 0===l?void 0:l.position)&&void 0!==s?s:""}" style="height:${null!==(a=null===(n=o.gridOptions)||void 0===n?void 0:n.height)&&void 0!==a?a:"auto"};">\n <table class="df-grid">${u.join("")}<thead>${d.join("")}</thead><tbody></tbody></table>\n </div>\n </div>\n `}addRow(e){var t,i,l;let s=[];const n=this.daraForm.getOptions(),a=this.gridForm.formTemplate,u=this.field.$xssName;++d;let h=[];s.push('<tr class="grid-row">'),s.push("<td>"),!0!==(null===(t=this.field.gridOptions)||void 0===t?void 0:t.disableRemoveButton)&&s.push(`<button type="button" data-row-idx="${d}" class="df-btn df-grid-row-remove"><i class="df-icon df-remove-icon"></i></button>`),s.push("</td>");for(const e of this.field.children){let t=r.default.fieldStyle(n,e,null,!0),i=o.merge({},e);h.push(i),i.$orgin=e,i.name=i.name+"_"+d,i.$xssName=u+"_"+o.getXssFieldName(i),a.addRowFieldInfo(i),s.push(`<td id="${i.$xssName}"><div class="df-field-container ${i.required?"required":""} " style="${t.valueStyle}"></div></td>`)}s.push("</tr>"),this.allAddRowInfo[d]=h;const c=o.templateToElement(s.join(""));c&&(null===(i=this.rowElement.querySelector("tbody"))||void 0===i||i.append(c),null===(l=c.querySelector(".df-grid-row-remove"))||void 0===l||l.addEventListener("click",(e=>{this.removeRow(e)}))),e=null!=e?e:{};for(let t of h)t.$instance=new t.$renderType(t,null==c?void 0:c.querySelector(`#${t.$xssName}`),this.gridForm),e[t.$orgin.name]&&t.$instance.setValue(e[t.$orgin.name])}removeRow(e){var t,i;const l=e.target.closest("tr");if(l){if(1==(null===(t=l.parentElement)||void 0===t?void 0:t.childElementCount))return;let s=(null===(i=e.currentTarget)||void 0===i?void 0:i.getAttribute("data-row-idx"))||"-1";this.removeFieldInfo(s),l.remove()}}removeFieldInfo(e){let t=[];if(o.isEmpty(e)){for(let e in this.allAddRowInfo)t=t.concat(this.allAddRowInfo[e]);this.allAddRowInfo={}}else if(e){const i=parseInt(e,10);t=t.concat(this.allAddRowInfo[i]),delete this.allAddRowInfo[i]}for(let e of t)this.gridForm.getFieldInfoMap().removeFieldInfo(e.name)}allRemoveRow(){var e;null===(e=this.rowElement.querySelector("tbody"))||void 0===e||e.replaceChildren(),this.removeFieldInfo()}getValue(){if(this.customFunction.getValue)return this.customFunction.getValue.call(this,this.field,this.rowElement);let e=[];const t=this.field.children,i=t.length;for(let l in this.allAddRowInfo){const s=this.allAddRowInfo[l];let n={};for(let e=0;e<i;e++){n[t[e].name]=this.gridForm.getFieldValue(s[e].name)}e.push(n)}return e}setValue(e){this.field.$value=e;let t=[];Array.isArray(e)?t=e:o.isPlainObject(e)&&t.push(e),this.allRemoveRow();for(let e of t)this.addRow(e)}reset(){this.setDefaultInfo(),(0,n.resetRowElementStyleClass)(this.rowElement)}getElement(){return this.customFunction.getElement?this.customFunction.getElement.call(this,this.field,this.rowElement):null}valid(){if(this.customFunction.valid){const e=this.customFunction.valid.call(this,this.field,this.rowElement);return void(0,n.invalidMessage)(this.field,this.rowElement,e)}const e=this.gridForm.validForm();if(e.length>0){const t=e[0];if(t.message)return t.message="["+this.field.label+"] "+t.message,t}return!0}focus(){}}t.default=u},890:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});const l=i(635).__importDefault(i(309));class s extends l.default{constructor(e,t,i){super(i,e,t)}mounted(){}static isDataRender(){return!1}createField(){return""}getValue(){return null}setValue(e){}reset(){}getElement(){return this.rowElement}valid(){return!0}addChildField(e){let t=this.rowElement.querySelector(".df-field-container");t?t.append(e):this.rowElement.append(e)}focus(){}}t.default=s},241:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});const l=i(635).__importDefault(i(309));class s extends l.default{constructor(e,t,i){super(i,e,t),this.field.$value=e.defaultValue}mounted(){}createField(){return""}getValue(){return this.field.$value}setValue(e){this.field.$value=e}reset(){this.setValue(this.field.defaultValue)}getElement(){}valid(){return!0}}t.default=s},260:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});const l=i(635).__importDefault(i(309)),s=i(181),n=i(675),a=i(41);class o extends l.default{constructor(e,t,i){super(i,e,t),this.mounted(),this.setDefaultOption(),this.setDefaultInfo()}mounted(){(0,a.numberInputEvent)(this.field,this.element,this)}createField(){const e=this.field,t=this.rowElement.querySelector(".df-field-container");t.innerHTML=`\n <div class="df-field">\n <input type="text" name="${e.$xssName}" class="form-field number help-icon" />\n </div> \n ${l.default.getDescriptionTemplate(e)}\n <div class="help-message"></div>\n `,this.element=t.querySelector(`[name="${e.$xssName}"]`)}getValue(){return this.element.value}setValue(e,t){!1===t||!1!==this.changeEventCall(this.field,null,this,e)?(this.field.$value=e,this.element.value=e):this.element.value=this.field.$value}reset(){this.setDefaultInfo(),this.setDisabled(!1),(0,n.resetRowElementStyleClass)(this.rowElement)}getElement(){return this.element}valid(){const e=(0,s.numberValidator)(this.getValue(),this.field);return(0,n.invalidMessage)(this.field,this.rowElement,e),e}}t.default=o},188:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});const l=i(635).__importDefault(i(309)),s=i(673),n=i(675),a=i(41);class o extends l.default{constructor(e,t,i){super(i,e,t),this.mounted(),this.setDefaultOption(),this.setDefaultInfo()}mounted(){(0,a.inputEvent)(this.field,this.element,this)}createField(){const e=this.field,t=this.rowElement.querySelector(".df-field-container");t.innerHTML=`\n <div class="df-field">\n <input type="password" name="${e.$xssName}" class="form-field password help-icon" autocomplete="off" />\n </div>\n ${l.default.getDescriptionTemplate(e)}\n <div class="help-message"></div>\n `,this.element=t.querySelector(`[name="${e.$xssName}"]`)}getValue(){return this.element.value}setValue(e,t){!1===t||!1!==this.changeEventCall(this.field,null,this,e)?(this.field.$value=e,this.element.value=e):this.element.value=this.field.$value}reset(){this.setDefaultInfo(),this.setDisabled(!1),(0,n.resetRowElementStyleClass)(this.rowElement)}getElement(){return this.element}valid(){const e=(0,s.stringValidator)(this.getValue(),this.field);return(0,n.invalidMessage)(this.field,this.rowElement,e),e}}t.default=o},442:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});const l=i(635),s=l.__importDefault(i(309)),n=i(224),a=i(675),o=i(41),r=l.__importStar(i(47));class d extends s.default{constructor(e,t,i){var l,s,n,a,o;super(i,e,t),this.defaultCheckValue="";let u=[];r.isUndefined(e.defaultValue)||(u=e.defaultValue);const h=d.valuesValueKey(e);let c=!1;null===(s=null===(l=this.field.listItem)||void 0===l?void 0:l.list)||void 0===s||s.forEach((e=>{let t=e[h];e.selected&&(this.defaultCheckValue=t),u==t&&(c=!0)})),c?this.defaultCheckValue=u:this.defaultCheckValue||(this.defaultCheckValue=(null===(a=null===(n=this.field.listItem)||void 0===n?void 0:n.list)||void 0===a?void 0:a.length)>0?null===(o=this.field.listItem)||void 0===o?void 0:o.list[0][h]:""),this.mounted(),this.setDefaultOption(),this.setValue(this.defaultCheckValue,!1)}mounted(){this.initEvent()}initEvent(){this.rowElement.querySelectorAll(this.getSelector()).forEach((e=>{e.addEventListener("change",(e=>{(0,o.customChangeEventCall)(this.field,e,this,this.getValue()),this.valid()}))}))}getSelector(){return`input[type="radio"][name="${this.field.$xssName}"]`}createField(){var e,t;const i=this.field,l=this.rowElement.querySelector(".df-field-container"),n=[],a=i.$xssName,o=s.default.valuesLabelKey(i),r=s.default.valuesValueKey(i);n.push('<div class="df-field"><div class="field-group">'),null===(t=null===(e=i.listItem)||void 0===e?void 0:e.list)||void 0===t||t.forEach((e=>{const t=e[r];n.push(`<span class="field ${"vertical"==i.orientation?"vertical":"horizontal"}">\n <label>\n <input type="radio" name="${a}" value="${t}" class="form-field radio" ${e.selected?"checked":""} ${e.disabled?"disabled":""}/>\n ${s.default.valuesLabelValue(o,e)}\n </label>\n </span>\n `)})),n.push(`<i class="daracl-icon help-icon"></i></div></div>\n ${s.default.getDescriptionTemplate(i)}\n <div class="help-message"></div>\n `),l.innerHTML=n.join(""),this.initEvent()}setValueItems(e){if(this.rowElement.querySelector(".df-field-container")&&(this.field.listItem?this.field.listItem.list=e:this.field.listItem={list:e},this.createField(),!r.isBlank(this.field.$value))){const e=this.field.$value;this.field.$value="",this.setValue(e)}}getValue(){var e;return null===(e=this.rowElement.querySelector(`[name="${this.field.$xssName}"]:checked`))||void 0===e?void 0:e.value}setValue(e,t){if(!1!==t&&!1===this.changeEventCall(this.field,null,this,e)&&(e=this.field.$value),this.field.$value=e,!0===e)return void(this.rowElement.querySelector(`[name="${this.field.$xssName}"]`).checked=!0);if(!1===e)return void(this.rowElement.querySelector(`[name="${this.field.$xssName}"]`).checked=!1);this.rowElement.querySelectorAll(this.getSelector()).forEach((t=>{let i=t;i.value==e?i.checked=!0:i.checked=!1}))}reset(){this.setValue(this.defaultCheckValue,!1),this.setDisabled(!1),(0,a.resetRowElementStyleClass)(this.rowElement)}getElement(){return this.rowElement.querySelectorAll(this.getSelector())}focus(){const e=this.getElement();e&&e.length>0&&this.getElement()[0].focus()}valid(){const e=this.getValue();let t=!0;return this.field.required&&r.isBlank(e)&&(t={name:this.field.name,constraint:[]},t.constraint.push(n.RULES.REQUIRED)),(0,a.invalidMessage)(this.field,this.rowElement,t),t}}t.default=d},728:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});const l=i(635).__importDefault(i(309)),s=i(181),n=i(675),a=i(41);class o extends l.default{constructor(e,t,i){super(i,e,t),this.rangeNumElement=t.querySelector(".range-num"),this.mounted(),this.setDefaultOption(),this.setDefaultInfo()}mounted(){this.element.addEventListener("input",(e=>{this.rangeNumElement.innerHTML=e.target.value,this.element.setAttribute("title",e.target.value),(0,a.customChangeEventCall)(this.field,e,this,this.getValue()),this.valid()}))}createField(){const e=this.field,t=this.rowElement.querySelector(".df-field-container");t.innerHTML=`\n <div class="df-field">\n <span class="range-num">${e.defaultValue?e.defaultValue:0}</span>\n <input type="range" name="${e.$xssName}" class="form-field range help-icon" min="${e.rule.minimum}" max="${e.rule.maximum}"/>\n </div> \n ${l.default.getDescriptionTemplate(e)}\n <div class="help-message"></div>\n `,this.element=t.querySelector(`[name="${e.$xssName}"]`)}getValue(){return this.element.value}setValue(e,t){!1===t||!1!==this.changeEventCall(this.field,null,this,e)?(this.field.$value=e,this.element.value=e):this.element.value=this.field.$value}reset(){this.setDefaultInfo(),this.setDisabled(!1),(0,n.resetRowElementStyleClass)(this.rowElement)}getElement(){return this.element}valid(){const e=(0,s.numberValidator)(this.getValue(),this.field);return(0,n.invalidMessage)(this.field,this.rowElement,e),e}}t.default=o},309:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});const l=i(635).__importStar(i(47));class s{constructor(e,t,i){var l;this.enableView=!0,this.daraForm=e,this.field=t,this.rowElement=i,this.createField(),t.tooltip&&(null===(l=i.querySelector(".df-tooltip"))||void 0===l||l.setAttribute("tooltip",t.tooltip))}setDefaultInfo(){if(l.isUndefined(this.field.defaultValue)?this.setValue("",!1):this.setValue(this.field.defaultValue,!1),!l.isUndefined(this.field.placeholder)){const e=this.getElement();e instanceof Element&&e.setAttribute("placeholder",this.field.placeholder)}}setDefaultOption(){var e;this.setDisabled(null!==(e=this.field.disabled)&&void 0!==e&&e)}addChildField(e){var t;null===(t=this.rowElement.querySelector(".df-field-container"))||void 0===t||t.append(e)}static isDataRender(){return!0}static isChildrenCreate(){return!0}getForm(){return this.daraForm}setValueItems(e){}static getDescriptionTemplate(e){return e.description?`<div class="df-description">${e.description}</div>`:""}changeEventCall(e,t,i,n){var a;if(e.onChange){let o={field:e,evt:t,oldValue:e.$value,value:n};if(null===(a=e.listItem)||void 0===a?void 0:a.list){let t=[];const i=s.valuesValueKey(e);for(let s of e.listItem.list){let e=s[i];if(l.isString(n)){if(e==n){t.push(s);break}}else l.isArray(n)&&n.includes(e)&&t.push(s)}o.valueItems=t}if(o.oldValue!=o.value&&!1===e.onChange.call(null,o))return i.setValue(e.$value,!1),!1;e.$value=o.value}this.daraForm.conditionCheck()}focus(){this.getElement().focus()}isEnableView(){return this.enableView}show(){this.enableView=!0,this.rowElement.classList.remove("df-hidden")}hide(){this.enableView=!1,this.rowElement.classList.contains("df-hidden")||this.rowElement.classList.add("df-hidden")}setDescription(e){var t;const i=this.rowElement.querySelector(".df-description");if(i)i.innerHTML=e;else{const i=this.rowElement.querySelector(".df-field");if(i){const l=new DOMParser;this.field.description=e;const n=l.parseFromString(s.getDescriptionTemplate(this.field),"text/html").querySelector(".df-description");n&&(null===(t=i.parentNode)||void 0===t||t.insertBefore(n,i.nextSibling))}}}setActive(e){}setDisabled(e){this.getElement()instanceof HTMLElement&&(!1===e?this.getElement().removeAttribute("disabled"):this.getElement().setAttribute("disabled",!0))}commonValidator(){}static valuesValueKey(e){var t;return(null===(t=e.listItem)||void 0===t?void 0:t.valueField)?e.listItem.valueField:"value"}static valuesLabelKey(e){var t;return(null===(t=e.listItem)||void 0===t?void 0:t.labelField)?e.listItem.labelField:"label"}static valuesLabelValue(e,t){let i=!1;const l=e.replace(/\{\{([A-Za-z0-9_.]*)\}\}/g,((e,l)=>(i=!0,t[l]||"")));return i?l:t[e]||""}}t.default=s},22:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});const l=i(635),s=l.__importDefault(i(309)),n=i(675),a=l.__importDefault(i(9)),o=l.__importDefault(i(386)),r=l.__importStar(i(47));class d extends s.default{constructor(e,t,i){super(i,e,t),e.renderer?this.customFunction=e.renderer:this.customFunction={},this.mounted()}mounted(){this.customFunction.mounted&&this.customFunction.mounted.call(this,this.field,this.rowElement),this.tabContainerElement.querySelectorAll(".tab-item").forEach((e=>{e.addEventListener("click",(t=>{this.clickEventHandler(e,t)}))}))}clickEventHandler(e,t){var i;this.setActive(null!==(i=e.getAttribute("data-tab-id"))&&void 0!==i?i:"")}setActive(e){var t,i,l,s;const n=this.tabContainerElement.querySelector(`[data-tab-id="${e}"]`);if(!n)return;if(!n.classList.contains("active")){for(let e of null!==(i=null===(t=null==n?void 0:n.parentElement)||void 0===t?void 0:t.children)&&void 0!==i?i:[])e.classList.remove("active");n.classList.add("active")}const a=this.rowElement.querySelector(`[tab-panel-id="${e}"]`);if(!(null==a?void 0:a.classList.contains("active"))){for(let e of null!==(s=null===(l=null==a?void 0:a.parentElement)||void 0===l?void 0:l.children)&&void 0!==s?s:[])e.classList.remove("active");null==a||a.classList.add("active")}}static isDataRender(){return!1}static isChildrenCreate(){return!1}createField(){var e,t,i,l,n,d;const u=this.field,h=this.daraForm.formTemplate,c=this.daraForm.getOptions(),f=this.rowElement.querySelector(".df-field-container");let m=o.default.fieldStyle(c,u);if(f.innerHTML=`\n <div class="df-field ">\n <div class="tab-header ${m.tabAlignClass}"></div>\n </div>\n <div class="df-tab-body"></div>\n `,u.children){let c=!0;const m=this.getForm().getOptions();let v=o.default.fieldStyle(m,u,null,h.isLabelHide(u));for(const o of u.children){o.$parent=u,h.addRowFieldInfo(o);let p=o.$key,g=`<span class="tab-item ${c?"active":""}" data-tab-id="${p}"><a href="javascript:;">${o.label}</a></span>`,E=`<div class="tab-panel ${c?"active":""}" tab-panel-id="${p}">${s.default.getDescriptionTemplate(o)}\n <div class="tab-group"></div>\n </div>`;const b=r.templateToElement(g),y=r.templateToElement(E);if(c=!1,b&&(null===(e=f.querySelector(".tab-header"))||void 0===e||e.appendChild(b)),y&&(null===(t=f.querySelector(".df-tab-body"))||void 0===t||t.appendChild(y),o.children)){let e={style:{width:null!==(i=m.style.width)&&void 0!==i?i:"100%",labelWidth:null!==(l=m.style.labelWidth)&&void 0!==l?l:3,valueWidth:null!==(n=m.style.valueWidth)&&void 0!==n?n:9,position:null!==(d=m.style.position)&&void 0!==d?d:"left-right"},useTypeValue:m.useTypeValue,autoCreate:!1,notValidMessage:"This form is not valid.",fields:[]};o.$tabForm=new a.default(document.createElement("div"),e),o.$instance=new o.$renderType(o,null==y?void 0:y.querySelector(".tab-group"),o.$tabForm),o.$tabForm.formTemplate.childTemplate(o,v)}}this.tabContainerElement=f}}getValue(){var e;if(this.customFunction.getValue)return this.customFunction.getValue.call(this,this.field,this.rowElement);let t={},i=this.getForm().getOptions().useTypeValue;for(const l of this.field.children){const s=null===(e=l.$tabForm)||void 0===e?void 0:e.getValue(!1);if(i)t[l.$validName]=s;else for(let[e,i]of Object.entries(s))t[e]=i}return t}setValue(e){var t;for(const i of this.field.children){let l=e[i.$validName];l&&(null===(t=i.$tabForm)||void 0===t||t.setValue(l))}}reset(){}getElement(){return this.rowElement}valid(){var e;if(this.customFunction.valid){const e=this.customFunction.valid.call(this,this.field,this.rowElement);return void(0,n.invalidMessage)(this.field,this.rowElement,e)}const t=this.field;for(const i of t.children){const t=null===(e=i.$tabForm)||void 0===e?void 0:e.validForm();if(t&&t.length>0){const e=t[0];if(e.message)return e.message="["+this.field.label+"] "+e.message,e}}return!0}focus(){}}t.default=d},891:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});const l=i(635).__importDefault(i(309)),s=i(673),n=i(675),a=i(41);class o extends l.default{constructor(e,t,i){super(i,e,t),this.mounted(),this.setDefaultOption(),this.setDefaultInfo()}mounted(){(0,a.inputEvent)(this.field,this.element,this)}createField(){var e;const t=this.field,i=this.rowElement.querySelector(".df-field-container");let s=null===(e=t.customOptions)||void 0===e?void 0:e.rows;s=+s>0?s:3,i.innerHTML=`\n <div class="df-field">\n <textarea name="${t.$xssName}" rows="${s}" class="form-field textarea help-icon"></textarea>\n </div> \n ${l.default.getDescriptionTemplate(t)}\n <div class="help-message"></div>\n `,this.element=i.querySelector(`[name="${t.$xssName}"]`)}getValue(){return this.element.value}setValue(e,t){!1===t||!1!==this.changeEventCall(this.field,null,this,e)?(this.field.$value=e,this.element.value=e):this.element.value=this.field.$value}reset(){this.setDefaultInfo(),this.setDisabled(!1),(0,n.resetRowElementStyleClass)(this.rowElement)}getElement(){return this.element}valid(){const e=(0,s.stringValidator)(this.getValue(),this.field);return(0,n.invalidMessage)(this.field,this.rowElement,e),e}}t.default=o},734:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});const l=i(635).__importDefault(i(309)),s=i(673),n=i(675),a=i(41);class o extends l.default{constructor(e,t,i){super(i,e,t),this.mounted(),this.setDefaultOption(),this.setDefaultInfo()}mounted(){(0,a.inputEvent)(this.field,this.element,this)}createField(){const e=this.field,t=this.rowElement.querySelector(".df-field-container");t.innerHTML=`\n <div class="df-field">\n <input type="text" name="${e.$xssName}" class="form-field text help-icon" />\n </div>\n ${l.default.getDescriptionTemplate(e)}\n <div class="help-message"></div>\n `,this.element=t.querySelector(`[name="${e.$xssName}"]`)}getValue(){return this.element.value}setValue(e,t){!1===t||!1!==this.changeEventCall(this.field,null,this,e)?(this.field.$value=e,this.element.value=e):this.element.value=this.field.$value}reset(){this.setDefaultInfo(),this.setDisabled(!1),(0,n.resetRowElementStyleClass)(this.rowElement)}getElement(){return this.element}valid(){const e=(0,s.stringValidator)(this.getValue(),this.field);return(0,n.invalidMessage)(this.field,this.rowElement,e),e}}t.default=o},556:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.fileValidator=void 0;const l=i(224);t.fileValidator=(e,t,i)=>{const s={name:t.name,constraint:[]};return t.required&&i.length<1?(s.constraint.push(l.RULES.REQUIRED),s):!(s.constraint.length>0)||s}},181:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.numberValidator=void 0;const l=i(635),s=i(224),n=i(74),a=l.__importStar(i(47));t.numberValidator=(e,t)=>{if(!t.$instance.isEnableView())return!0;const i={name:t.name,constraint:[]},l=Number(e);if(t.required&&a.isBlank(e))return i.constraint.push(s.RULES.REQUIRED),i;if(!a.isNumber(e))return i.constraint.push(s.RULES.NAN),i;if(!0!==(0,n.validator)(e,t,i))return i;const o=t.rule;if(o){const e=a.isNumber(o.minimum),t=a.isNumber(o.maximum);let n=!1,r=!1,d=!1,u=!1;e&&(o.exclusiveMinimum&&l<=o.minimum?r=!0:l<o.minimum&&(n=!0)),t&&(o.exclusiveMaximum&&l>=o.maximum?u=!0:l>o.maximum&&(d=!0)),e&&t&&(n||r||d||u)?o.exclusiveMinimum&&o.exclusiveMaximum&&(r||u)?i.constraint.push(s.RULES.BETWEEN_EXCLUSIVE_MINMAX):r?i.constraint.push(s.RULES.BETWEEN_EXCLUSIVE_MIN):u?i.constraint.push(s.RULES.BETWEEN_EXCLUSIVE_MAX):i.constraint.push(s.RULES.BETWEEN):(r&&i.constraint.push(s.RULES.EXCLUSIVE_MIN),u&&i.constraint.push(s.RULES.EXCLUSIVE_MAX),n&&i.constraint.push(s.RULES.MIN),d&&i.constraint.push(s.RULES.MAX))}return!(i.constraint.length>0)||i}},913:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.regexpValidator=void 0;const i={mobile:/^\d{3}-\d{3,4}-\d{4}$/,email:/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/,url:/^(?:(?:https?|HTTPS?|ftp|FTP):\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-zA-Z\u00a1-\uffff0-9]-*)*[a-zA-Z\u00a1-\uffff0-9]+)(?:\.(?:[a-zA-Z\u00a1-\uffff0-9]-*)*[a-zA-Z\u00a1-\uffff0-9]+)*(?:\.(?:[a-zA-Z\u00a1-\uffff]{2,}))\.?)(?::\d{2,5})?(?:[/?#]\S*)?$/,number:/\d$/,alpha:/^[a-zA-Z]+$/,"alpha-num":/^[a-zA-Z0-9]+$/,variable:/^[a-zA-Z0-9_$][a-zA-Z0-9_$]*$/,"number-char":/^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d]/,"upper-char":/^(?=.*?[A-Z])(?=.*?[a-z])/,"upper-char-special":/^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[#?!@$%^&*-])/,"upper-char-special-number":/^(?=.*[A-Za-z])(?=.*\d)(?=.*[@$!%*#?&])[A-Za-z\d@$!%*#?&]/};t.regexpValidator=(e,t,l)=>{if(!t.$instance.isEnableView())return{name:t.name,constraint:[]};void 0===l&&(l={name:t.name,constraint:[]});const s=t.regexpType;return s&&!i[s].test(e)?(l.regexp=s,l):l}},673:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.stringValidator=void 0;const l=i(635),s=i(224),n=l.__importStar(i(47)),a=i(74);t.stringValidator=(e,t)=>{if(!t.$instance.isEnableView())return!0;let i={name:t.name,constraint:[]};if(t.required&&n.isBlank(e))return i.constraint.push(s.RULES.REQUIRED),i;const l=(0,a.validator)(e,t,i);if(!0!==l)return l;const o=t.rule;if(o){const t=e.length,l=n.isNumber(o.minLength),a=n.isNumber(o.maxLength);let r=!1,d=!1;if(l&&t<o.minLength&&(r=!0),a&&t>o.maxLength&&(d=!0),l&&a&&(r||d)?i.constraint.push(s.RULES.BETWEEN):(r&&i.constraint.push(s.RULES.MIN_LENGTH),d&&i.constraint.push(s.RULES.MAX_LENGTH)),i.constraint.length>0)return i}return!0}},74:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.validator=void 0;const l=i(635),s=i(913),n=l.__importStar(i(47));t.validator=(e,t,i)=>{if(t.validator&&(i.validator=t.validator(t,e),"object"==typeof i.validator))return i;if((i=(0,s.regexpValidator)(e,t,i)).regexp)return i;if(t.different){const e=t.different.field,l=t.$instance.getForm().getField(e);if(!n.isEmpty(l)&&t.$instance.getValue()==l.$instance.getValue())return i.message=t.different.message,i}if(t.identical){const e=t.identical.field,l=t.$instance.getForm().getField(e);if(!n.isEmpty(l)&&t.$instance.getValue()!=l.$instance.getValue())return i.message=t.identical.message,i}return!0}},700:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});const l=i(224);let s={required:"{label} 필수 입력사항입니다.",fileButton:"파일찾기",selection:"선택",string:{minLength:"{minLength} 글자 이상으로 입력하세요.",maxLength:"{maxLength} 글자 이하로 입력하세요.",between:"{minLength} ~ {maxLength} 사이의 글자를 입력하세요."},number:{nan:"숫자만 입력 가능 합니다.",minimum:"{minimum} 값과 같거나 커야 합니다",exclusiveMinimum:"{minimum} 보다 커야 합니다",maximum:"{maximum} 값과 같거나 작아야 합니다",exclusiveMaximum:"{maximum} 보다 작아야 합니다.",between:"{minimum}~{maximum} 사이의 값을 입력하세요.",betweenExclusiveMin:"{minimum} 보다 크고 {maximum} 보다 같거나 작아야 합니다",betweenExclusiveMax:"{minimum} 보다 같거나 크고 {maximum} 보다 작아야 합니다",betweenExclusiveMinMax:"{minimum} 보다 크고 {maximum} 보다 작아야 합니다"},regexp:{mobile:"핸드폰 번호가 유효하지 않습니다.",email:"이메일이 유효하지 않습니다.",url:"URL이 유효하지 않습니다.",alpha:"영문만 입력 가능 합니다.","alpha-num":"영문과 숫자만 입력 가능 합니다.",number:"숫자만 입력 가능 합니다.",variable:"값이 유효하지 않습니다.","number-char":"숫자, 문자 각각 하나 이상 포함 되어야 합니다.","upper-char":"대문자가 하나 이상 포함 되어야 합니다.","upper-char-special":"대문자,소문자,특수문자 각각 하나 이상 포함 되어야 합니다.","upper-char-special-number":"대문자,소문자,특수문자,숫자 각각 하나 이상 포함 되어야합니다."}};function n(e,t){return e.replace(/\{{1,1}([A-Za-z0-9_.]*)\}{1,1}/g,((e,i)=>void 0!==t[i]?t[i]:e))}t.default=new class{constructor(){this.lang=s}set(e){this.lang=Object.assign({},s,e)}getMessage(e){return this.lang[e]}validMessage(e,t){var i;let s="",a=[];t.regexp&&(s=this.lang.regexp[t.regexp],a.push(s)),(null!==(i=t.constraint)&&void 0!==i?i:[]).forEach((t=>{t===l.RULES.REQUIRED&&(s=n(this.lang.required,e),a.push(s)),"number"==e.renderType||"range"==e.renderType?(s=this.lang.number[t],a.push(s)):(s=this.lang.string[t],a.push(s))}));const o=[],r=Object.assign({},{name:e.name,label:e.label},e.rule);return a.forEach((e=>{e&&o.push(n(e,r))})),t.validator&&o.push(t.validator.message),o}}},436:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getRenderer=void 0;const l=i(635),s=i(224),n=l.__importStar(i(47));t.getRenderer=e=>{let t;return e.renderType&&(t=s.RENDER_TEMPLATE[e.renderType]),!t||!1!==t.isDataRender()&&n.isUndefined(e.name)?n.isUndefined(e.name)?e.children?s.RENDER_TEMPLATE.group:s.RENDER_TEMPLATE.hidden:s.RENDER_TEMPLATE.text:t}},386:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});const l=i(635).__importStar(i(47)),s=i(224);function n(e){return e.replace(/\s+/g," ").trim()}t.default={fieldStyle(e,t,i,a){var o,r,d,u,h,c,f,m,v,p,g,E,b,y,$,_;const F={rowStyleClass:"horizontal"===t.orientation?"horizontal":"vertical",fieldClass:"",fieldStyle:"",labelClass:"",labelStyle:"",labelAlignClass:"",valueClass:"",valueStyle:"",tabAlignClass:""},w=null!==(d=null!==(r=null===(o=null==i?void 0:i.style)||void 0===o?void 0:o.labelWidth)&&void 0!==r?r:e.style.labelWidth)&&void 0!==d?d:"3";let S=null!==(c=null!==(h=null===(u=null==i?void 0:i.style)||void 0===u?void 0:u.valueWidth)&&void 0!==h?h:e.style.valueWidth)&&void 0!==c?c:"9";const V=null!==(m=null===(f=null==i?void 0:i.style)||void 0===f?void 0:f.position)&&void 0!==m?m:e.style.position,I=null===(v=t.style)||void 0===v?void 0:v.width,L=null!==(E=null!==(g=s.FIELD_POSITION_STYLE[null===(p=t.style)||void 0===p?void 0:p.position])&&void 0!==g?g:s.FIELD_POSITION_STYLE[V])&&void 0!==E?E:s.FIELD_POSITION_STYLE.top;F.fieldClass=`${L[0]} ${(null===(b=t.style)||void 0===b?void 0:b.customClass)||""}`,I&&(l.isNumber(I)?F.fieldClass+=l.isNumber(I)?` col-xs-${I}`:"":F.fieldStyle=l.isNumber(I)?"":`width:${I};`),F.tabAlignClass="tab-al-"+(["right","center"].includes(null===(y=t.style)||void 0===y?void 0:y.tabAlign)?t.style.tabAlign:"left");const D=(null===($=t.style)||void 0===$?void 0:$.labelWidth)||w;if(F.labelAlignClass=L[1],!a&&D&&!["top","bottom"].includes(L[0]))if(l.isNumber(D)){const e=+D;S=12-e,F.labelClass=`col-xs-${e}`,F.valueClass=F.labelStyle?"col-full":`col-xs-${S}`}else F.labelStyle=`width:${D};`;const T=(null===(_=t.style)||void 0===_?void 0:_.valueWidth)||S;return a&&!["left","right"].includes(L[0])?F.valueClass="col-full":T&&!["top","bottom"].includes(L[0])?l.isNumber(T)?F.valueClass=F.labelStyle?"col-full":`col-xs-${T}`:F.valueStyle=`width:${T};`:F.valueClass=F.labelStyle?"col-full":"",F.fieldClass=n(F.fieldClass),F.labelClass=n(F.labelClass),F.valueClass=n(F.valueClass),F}}},47:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.merge=t.templateToElement=t.isHiddenField=t.getHashCode=t.getXssFieldName=t.ignoreValueField=t.replaceXssField=t.isGridType=t.isTabType=t.isEmpty=t.isArray=t.isNumber=t.isString=t.isFunction=t.isUndefined=t.isBlank=t.unFieldName=t.unReplace=t.hasOwnProp=t.replaceXss=void 0,t.isPlainObject=l;const i={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};t.replaceXss=e=>{let t=e;return t&&Object.keys(i).forEach((e=>{t=t.replaceAll(e,i[e])})),t};t.hasOwnProp=(e,t)=>e.hasOwnProperty(t);t.unReplace=e=>{let t=e;return t&&Object.keys(i).forEach((e=>{t=t.replaceAll(i[e],e)})),t};t.unFieldName=e=>e?(0,t.unReplace)(e).replaceAll('"','\\"'):"";t.isBlank=e=>null===e||(""===e||(void 0===e||"string"==typeof e&&(""===e||""===e.replace(/\s/g,""))));t.isUndefined=e=>void 0===e;t.isFunction=e=>"function"==typeof e;t.isString=e=>"string"==typeof e;t.isNumber=e=>!(0,t.isBlank)(e)&&(e=+e,!isNaN(e));t.isArray=e=>Array.isArray(e);t.isEmpty=e=>(0,t.isUndefined)(e)||null==e;t.isTabType=e=>e&&"tab"===e.renderType;t.isGridType=e=>e&&"grid"===e.renderType;t.replaceXssField=e=>(e.$xssName=(0,t.getXssFieldName)(e),e.label=(0,t.replaceXss)(e.label),e);t.ignoreValueField=e=>(0,t.isGridType)(e.$parent)||(0,t.isTabType)(e.$parent);t.getXssFieldName=e=>{if((0,t.isUndefined)(e.$xssName)){let t=e.name;return t&&Object.keys(i).forEach((e=>{t=t.replaceAll(e,"_")})),"df_"+t}return e.$xssName};t.getHashCode=e=>{let t=0;if(0==e.length)return t;for(let i=0;i<e.length;i++){t=(t<<5)-t+e.charCodeAt(i),t|=0}return String(t).replaceAll(/-/g,"_")};t.isHiddenField=e=>"hidden"===e.renderType;function l(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function s(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}t.templateToElement=e=>{const t=document.createElement("template");return t.innerHTML=e,t.content.firstElementChild};function n(e,i){return s(i)?function(e,i){if((0,t.isFunction)(i))return i;for(const l of Object.keys(i)){const a=i[l];(0,t.isUndefined)(a)||(null===a||(0,t.isFunction)(a)?e[l]=a:(0,t.isEmpty)(e[l])?e[l]=n((0,t.isArray)(a)?[]:{},a):s(a)?n(e[l],a):e[l]=a)}return e}(e,i):(0,t.isArray)(i)?function(e,i){const s=l(e);for(let l=0;l<i.length;l+=1){const a=i[l];let o;o=null==a?a:n((0,t.isArray)(a)?[]:{},a),s?e[l]=o:e.push(o)}return e}(e,i):(a=i)instanceof Date&&!isNaN(a.valueOf())?new i.constructor(i):i;var a}t.merge=(...e)=>{let i=e[0];if(!l(i)||(0,t.isEmpty)(i))return i;let s=1;Object.keys(i).length>0&&(s=0,i=(0,t.isArray)(i)?[]:{});const a=e.length;for(;s<a;s+=1)n(i,e[s]);return i}},675:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.resetRowElementStyleClass=t.invalidMessage=void 0;const l=i(635).__importDefault(i(700));t.invalidMessage=(e,t,i)=>{if(!0!==i){if(t.classList.remove("valid"),t.classList.contains("invalid")||t.classList.add("invalid"),!1!==i){const s=l.default.validMessage(e,i);i.message&&s.push(i.message);const n=t.querySelector(".help-message");if(n&&s.length>0){const e=[];s.forEach((t=>{e.push(`<div>${t}</div>`)})),n.innerHTML=e.join("")}}}else{t.classList.remove("invalid"),t.classList.contains("valid")||t.classList.add("valid");const e=t.querySelector(".help-message");e&&(e.innerHTML="")}};t.resetRowElementStyleClass=e=>{e.classList.remove("invalid"),e.classList.remove("valid")}},60:(e,t,i)=>{i.r(t)}},i={};function l(e){var s=i[e];if(void 0!==s)return s.exports;var n=i[e]={exports:{}};return t[e](n,n.exports,l),n.exports}l.m=t,e=[],l.O=(t,i,s,n)=>{if(!i){var a=1/0;for(u=0;u<e.length;u++){for(var[i,s,n]=e[u],o=!0,r=0;r<i.length;r++)(!1&n||a>=n)&&Object.keys(l.O).every((e=>l.O[e](i[r])))?i.splice(r--,1):(o=!1,n<a&&(a=n));if(o){e.splice(u--,1);var d=s();void 0!==d&&(t=d)}}return t}n=n||0;for(var u=e.length;u>0&&e[u-1][2]>n;u--)e[u]=e[u-1];e[u]=[i,s,n]},l.d=(e,t)=>{for(var i in t)l.o(t,i)&&!l.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},l.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),l.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={792:0};l.O.j=t=>0===e[t];var t=(t,i)=>{var s,n,[a,o,r]=i,d=0;if(a.some((t=>0!==e[t]))){for(s in o)l.o(o,s)&&(l.m[s]=o[s]);if(r)var u=r(l)}for(t&&t(i);d<a.length;d++)n=a[d],l.o(e,n)&&e[n]&&e[n][0](),e[n]=0;return l.O(u)},i=self.webpackChunkDaracl_form=self.webpackChunkDaracl_form||[];i.forEach(t.bind(null,0)),i.push=t.bind(null,i.push.bind(i))})();var s=l.O(void 0,[202],(()=>l(129)));return s=l.O(s)})()));
7
7
  //# sourceMappingURL=daracl.form.min.js.map
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @daracl/form v0.0.7
2
+ * @daracl/form v0.0.8
3
3
  * Copyright 2023-2024 darainfo and other contributors;
4
4
  * Licensed MIT
5
5
  */