diff --git a/src/main/java/cokr/xit/fims/crdn/web/AbstractCrdnController.java b/src/main/java/cokr/xit/fims/crdn/web/AbstractCrdnController.java index 76c5db0e..562347d3 100644 --- a/src/main/java/cokr/xit/fims/crdn/web/AbstractCrdnController.java +++ b/src/main/java/cokr/xit/fims/crdn/web/AbstractCrdnController.java @@ -4,11 +4,12 @@ import javax.annotation.Resource; import org.springframework.web.servlet.ModelAndView; +import cokr.xit.base.web.ApplicationController; import cokr.xit.fims.crdn.service.CrdnQuery; import cokr.xit.fims.crdn.service.CrdnService; import cokr.xit.foundation.web.AbstractController; -public class AbstractCrdnController extends AbstractController { +public class AbstractCrdnController extends ApplicationController { @Resource(name="crdnService") private CrdnService crdnService; diff --git a/src/main/java/cokr/xit/fims/crdn/web/CrdnController.java b/src/main/java/cokr/xit/fims/crdn/web/CrdnController.java index a6f25798..98babbf5 100644 --- a/src/main/java/cokr/xit/fims/crdn/web/CrdnController.java +++ b/src/main/java/cokr/xit/fims/crdn/web/CrdnController.java @@ -35,24 +35,13 @@ public class CrdnController extends AbstractCrdnController { ModelAndView mav = new ModelAndView(); mav.setViewName("fims/crdn/initData-main"); mav.addObject("pageSuffix","initData-main"); - setCommonCodes(mav); + + Map> commonCodes = getCodesOf("FIM001", "FIM002", "FIM026"); + mav.addObject("FIM001", commonCodes.get("FIM001")); + addCodes(commonCodes, mav, "FIM002", "FIM026"); return mav; } - private void setCommonCodes(ModelAndView mav) { - Map> byGroups = codeService.getCodesOf( - "FIM001" - , "FIM002" - ); - if ("jsonView".equals(mav.getViewName())) { - mav.addAllObjects(byGroups); - } else { - byGroups.forEach((k, v) -> { - mav.addObject(k, toJson(v)); - }); - } - } - @RequestMapping(name="주정차과태료업무 단속자료 목록", value="/PVS/list.do") public ModelAndView getPvsCrdnList(CrdnQuery req) { return getCrdnList(req); diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/initData-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/initData-main.jsp index 1d0ef079..97858cb9 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/crdn/initData-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/initData-main.jsp @@ -125,10 +125,28 @@ -
-
- -
    +
    +
    @@ -154,18 +172,15 @@ $(function(){ /************************************************************************** * Global Variable **************************************************************************/ -/** - * tui-grid array - * @type {*[]} - */ -var GRID = {}; + var FIM002 = new CommonCodes(${FIM002}); + var FIM026 = new CommonCodes(${FIM026}); + +//////////////////////////////////////////////// /** * PageNavigation * @type {*[]} */ var pageNav = {}; - - /** * 팝업 객체 * @type {null} @@ -175,180 +190,171 @@ popup = null; * */ var popupDiv; - /** * 팝업창에서 호출하는 콜백함수 */ var callbackSearch = () => searchCrdnList(); - +////////////////////////////////////////////////// var crdnControl = new DatasetControl({ prefix:"crdn", prefixName:"초기자료", infoSize:"xl", urls : { - load : "" + load : "", + getInfo : "" }, + formats: { + CRDN_YMD_TM : datetimeFormat, + REG_DT : datetimeFormat, + MDFCN_DT : datetimeFormat, + CVLCPT_PRCS_PRNMNT_DT : dateFormat, + CVLCPT_RCPT_YMD : dateFormat, + + RCVMT_AMT : numberFormat, + + CRDN_SE_CD: FIM002, + CRDN_REG_SE_CD: FIM026 + }, keymapper:info => info ? info.CRDN_ID : "", dataGetter:obj => obj.crdnList, appendData:true }); -crdnControl.scrollFuncName = scrollCrdns; + crdnControl.onDatasetChange = obj => { var prefix = obj.infoPrefix; renderCrdnList(obj); - $("#crdnPaging--${pageSuffix}").setPagingInfo({ - list: crdnControl.dataset, - prefix: "crdn", - start: obj[prefix+"Start"], - totalSize: obj[prefix+"Total"], - fetchSize: obj[prefix+"Fetch"], - func: "crdnControl.load({index})" - }); + $("#crdnPaging--${pageSuffix}").setPagingInfo({ + list: crdnControl.dataset, + prefix: "crdn", + start: obj[prefix+"Start"], + totalSize: obj[prefix+"Total"], + fetchSize: obj[prefix+"Fetch"], + func: "crdnControl.load({index})" + }); }; function fnResetAndChangeBiz(sysSeCd){ - GRID.clear(); + $("#crdnTbody--${pageSuffix}").html(""); crdnControl.urls.load = wctx.url("/crdn/"+ sysSeCd +"/list.do"); + crdnControl.urls.getInfo = wctx.url("/crdn/"+ sysSeCd +"/info.do"); } function searchCrdnList(){ crdnControl.query = fnBiz.getParams(); - GRID.clear(); + $("#crdnTbody--${pageSuffix}").html(""); crdnControl.load(1); } function scrollCrdns(){ - crdnControl.load(crdnControl.query.pageNum + 1); } function renderCrdnList(data) { if(!crdnControl.appendData){ - GRID.clear(); + $("#crdnTbody--${pageSuffix}").html(""); } + + var crdnList = crdnControl.dataset; + + var empty = crdnList.empty; + + var trs = empty ? [ tbodyTemplate.notFound ] : crdnList.inStrings(tbodyTemplate.found); + + $("#crdnTbody--${pageSuffix}").html(trs.join()); - GRID.appendRows(data.crdnList); } /******************************* * Biz function *******************************/ var fnBiz = { - getParams: () => { - var form = $("#frmSearch--${pageSuffix}"); - - return { - sysSeCd: form.find("[name='sysSeCd']:checked").val() - ,[form.find("[name='schOpt']").val()]: form.find("[name='schWord']").val() - ,schDateOpt: form.find("[name='schDateOpt']").val() - ,schDateFrom: form.find("[name='schDateFrom']").val() - ,schDateTo: form.find("[name='schDateTo']").val() - ,crdnSeCd: form.find("[name='crdnSeCd']:checked").val() - ,crdnSttsCd: form.find("[name='crdnSttsCd']").val() - ,ctznAnsYn: form.find("[name='ctznAnsYn']:checked").val() - ,fetchSize: 20 - } - } - ,pagePopup: function(flag, params){ - var url; - var popTitle; - var popOption; - switch (flag) { - case "total": - url = fimsApiUrl.POPUP_CRACKDOWN_TOTAL; - popOption = {width: 1200, height:900}; - popTitle = "개별총정보"; - break; - case "edit": - url = fimsApiUrl.POPUP_CRACKDOWN_EDIT; - popOption = {width: 1200, height:900}; - popTitle = "정보 변경"; - break; - case "file": - url = fimsApiUrl.POPUP_EXTR_CRACKDOWN_FILE_SEL; - popOption = {width: 900, height:750}; - popTitle = "외부연계 데이타 선택"; - break; - case "impose": - url = fimsApiUrl.POPUP_IMPOSE; - popOption = {width: 500, height: 400}; - popTitle = "과태료 시스템 등록"; - break; - case "answerPreview": - url = fimsApiUrl.POPUP_CTZN_ANS_PREVIEW; - popOption = {width: 600, height: 620}; - popTitle = "답변 내용 미리 보기"; - break; - default: - break; - } - popup = CmmPopup.openModal(url, params, popOption, popTitle); - } - ,onClickGrid: function(props){ - var selColumn = props.columnInfo.name; - switch (selColumn){ - case 'cvlcptRcptNo': - popupDiv = 'edit'; - var rowDatas = GRID.store.data.rawData.map(d => { - return {crdnSeCd: d.crdnSeCd, crdnId: d.crdnId, crdnSttsCd: d.crdnSttsCd} - }) - pageNav = new PageNavigation(GRID, rowDatas, props.rowKey); - - fnBiz.pagePopup(popupDiv, pageNav.gridInfo.curRowData); - - $(".tooltip").remove(); - - break; - - default: - break; - } - } - ,resetBtn: function() { - - } - ,onDblClickGrid: function (props) { - popupDiv = 'total'; - var rowDatas = GRID.store.data.rawData.map(d => { - return {crdnSeCd: d.crdnSeCd, crdnId: d.crdnId, crdnSttsCd: d.crdnSttsCd} - }); - - pageNav = new PageNavigation(GRID, rowDatas, props.rowKey); - fnBiz.pagePopup(popupDiv, pageNav.gridInfo.curRowData); - } - ,getAnswerSeCode: (stsCode) => { - /* - ,{value: '10', text: '부과대상'} - ,{value: '11', text: '서손'} - ,{value: '12', text: '계도'} - ,{value: '20', text: '부과'} - */ - var answerSeCode; - switch(stsCode){ - // 부과 - case '10': - case '20': - answerSeCode = '${ansSeCodeImpose}'; - break; - // 서손 - case '11': - answerSeCode = '${ansSeCodeDisallow}'; - break; - // 계도 - case '12': - answerSeCode = '${ansSeCodeEnlight}'; - break; - } - return answerSeCode; - } - }; + getParams: () => { + var form = $("#frmSearch--${pageSuffix}"); + + return { + sysSeCd: form.find("[name='sysSeCd']:checked").val() + ,[form.find("[name='schOpt']").val()]: form.find("[name='schWord']").val() + ,schDateOpt: form.find("[name='schDateOpt']").val() + ,schDateFrom: form.find("[name='schDateFrom']").val() + ,schDateTo: form.find("[name='schDateTo']").val() + ,crdnSeCd: form.find("[name='crdnSeCd']:checked").val() + ,crdnSttsCd: form.find("[name='crdnSttsCd']").val() + ,ctznAnsYn: form.find("[name='ctznAnsYn']:checked").val() + ,fetchSize: 30 + } + } + ,resetBtn: function() { } + + ,pagePopup: function(flag, params){ + var url; + var popTitle; + var popOption; + switch (flag) { + case "total": + url = fimsApiUrl.POPUP_CRACKDOWN_TOTAL; + popOption = {width: 1200, height:900}; + popTitle = "개별총정보"; + break; + case "edit": + url = fimsApiUrl.POPUP_CRACKDOWN_EDIT; + popOption = {width: 1200, height:900}; + popTitle = "정보 변경"; + break; + case "file": + url = fimsApiUrl.POPUP_EXTR_CRACKDOWN_FILE_SEL; + popOption = {width: 900, height:750}; + popTitle = "외부연계 데이타 선택"; + break; + case "impose": + url = fimsApiUrl.POPUP_IMPOSE; + popOption = {width: 500, height: 400}; + popTitle = "과태료 시스템 등록"; + break; + case "answerPreview": + url = fimsApiUrl.POPUP_CTZN_ANS_PREVIEW; + popOption = {width: 600, height: 620}; + popTitle = "답변 내용 미리 보기"; + break; + default: + break; + } + popup = CmmPopup.openModal(url, params, popOption, popTitle); + } + + + ,getAnswerSeCode: (stsCode) => { + /* + ,{value: '10', text: '부과대상'} + ,{value: '11', text: '서손'} + ,{value: '12', text: '계도'} + ,{value: '20', text: '부과'} + */ + var answerSeCode; + switch(stsCode){ + // 부과 + case '10': + case '20': + answerSeCode = '${ansSeCodeImpose}'; + break; + // 서손 + case '11': + answerSeCode = '${ansSeCodeDisallow}'; + break; + // 계도 + case '12': + answerSeCode = '${ansSeCodeEnlight}'; + break; + } + return answerSeCode; + } +}; /************************************************************************** * event @@ -375,234 +381,50 @@ $(() => { * Grid ******************************* */ var gridColumns = [ - { - header: '등록구분', - name: 'CRDN_REG_SE_CD', - minWidth: 50, - sortable: false, - align: 'center', - formatter({value}) { - return (new CommonCodes(ComboCodeData.crdnRegSeCd)).value(value); - } - }, - { - header: '접수번호', - name: 'CVLCPT_RCPT_NO', - minWidth: 130, - sortable: false, - align: 'center', - renderer: { - type: CustomButtonRenderer, - options: { - formatter: (props)=>{ - var rowData = props.grid.getRow(props.rowKey); - return { - formatter: rowData.crdnSeCd === '09' ? rowData.cvlcptRcptNo : rowData.fileLinkId - ,element: "text" - ,dataAttrs : { - bsToggle: "tooltip", - bsOffset: "0,4", - bsPlacement: "top", - bsHtml: "true" - } - ,attrs : { - title : " 단속현황 정보" - } - } - } - ,eventFunction: fnBiz.onClickGrid - ,eventType: "click" - - } - } - }, - { - header: '차량번호', - name: 'VHRNO', - minWidth: 80, - sortable: false, - align: 'center' - }, - { - header: '단속구분(신고방법)', - name: 'CRDN_SE_CD', - minWidth: 100, - sortable: false, - align: 'center', - formatter({value}) { - return (new CommonCodes(ComboCodeData.crdnSeCd)).value(value); - } - }, - { - header: '위반일시', - name: 'CRDN_YMD_TM', - minWidth: 120, - sortable: false, - align: 'center', - formatter({value}) { - return datetimeFormat.format(value); // - } - }, - { - header: '사진건수', - name: 'ATCH_FILE_CNT', - minWidth: 40, - sortable: false, - align: 'center' - }, - { - header: '수납금액', - name: 'RCVMT_AMT', - minWidth: 100, - sortable: false, - align: 'right', - formatter({value}) { - return numberFormat.format(value); // - } - }, - { - header: '위반횟수', - name: 'VLTN_NMTM', - minWidth: 80, - sortable: false, - align: 'right' - }, - { - header: '위반장소', - name: 'CRDN_PLC', - minWidth: 200, - sortable: false - }, - { - header: '주민번호(전체)', - name: 'RTPYR_NO', - minWidth: 110, - sortable: false, - align: 'center', - className: "privacy" - }, - { - header: '주민번호(마스킹)', - name: 'RTPYR_NO_MASK', - minWidth: 110, - sortable: false, - align: 'center', - className: "privacy-mask" - }, - { - header: '특기사항', - name: 'ETC_CN', - width: 80, - sortable: false, - align: 'center' - }, - { - header: '서손사유', - name: 'ETC_CN', //levyExclRsnCd - width: 80, - sortable: false, - align: 'center' - }, - { - header: '처리상태명', - name: 'CRDN_STTS_NM', - hidden: true - }, - { - header: '접수일자', - name: 'CVLCPT_RCPT_YMD', - minWidth: 80, - sortable: false, - align: 'center', - formatter({value}) { - return dateFormat.format(value); // - } - }, - { - header: '처리기한', - name: 'CVLCPT_PRCS_PRNMNT_DT', - minWidth: 80, - sortable: false, - align: 'center', - formatter({value}) { - return dateFormat.format(value); // - } - }, - { - header: '신고자', - name: 'CVLCPT_APLCNT_NM', - minWidth: 80, - sortable: false, - align: 'center' - }, - { - header: '등록일시', - name: 'REG_DT', - minWidth: 150, - sortable: false, - align: 'center', - formatter({value}) { - return datetimeFormat.format(value); // - } - }, - { - header: '최종처리일시', - name: 'MDFCN_DT', - minWidth: 150, - sortable: false, - align: 'center', - formatter({value}) { - return datetimeFormat.format(value); - } - }, - { - header: '상태', - name: 'CRDN_STTS_CD', - hidden: true - }, - { - header: '서손ID', - name: 'LEVY_EXCL_ID', - hidden: true - }, - { - header: '소유자ID', - name: 'RTPYR_ID', - hidden: true - }, - { - header: '서손사유코드', - name: 'LEVY_EXCL_RSN_CD', - hidden: true - }, - { - header: 'interfaceSeqN', - name: 'INTERFACE_SEQN', - hidden: true - } + { header: '차량번호', name: 'VHRNO', width: 80, align: 'center' }, + { header: '단속구분(신고방법)', name: 'CRDN_SE_CD', width: 100, align: 'center' }, + { header: '위반일시', name: 'CRDN_YMD_TM', width: 120, align: 'center' }, + { header: '사진건수', name: 'ATCH_FILE_CNT', width: 40, align: 'center' }, + { header: '수납금액', name: 'RCVMT_AMT', width: 100, align: 'right' }, + { header: '위반횟수', name: 'VLTN_NMTM', width: 80, align: 'right' }, + { header: '위반장소', name: 'CRDN_PLC', width: 150 }, + { header: '주민번호(전체)', name: 'RTPYR_NO', width: 110, align: 'center', className: "privacy" }, + { header: '주민번호(마스킹)', name: 'RTPYR_NO_MASK', width: 110, align: 'center', className: "privacy-mask" }, + { header: '특기사항', name: 'ETC_CN', width: 80, align: 'center' }, + { header: '서손사유', name: 'ETC_CN', width: 80, align: 'center' }, + { header: '처리상태명', name: 'CRDN_STTS_NM', width: 80}, + { header: '민원접수번호', name: 'CVLCPT_RCPT_NO', width: 150, align: 'center' }, + { header: '민원접수일자', name: 'CVLCPT_RCPT_YMD', width: 80, align: 'center' }, + { header: '처리기한', name: 'CVLCPT_PRCS_PRNMNT_DT', width: 80, align: 'center' }, + { header: '신고자', name: 'CVLCPT_APLCNT_NM', width: 80, align: 'center' }, + { header: '등록구분', name: 'CRDN_REG_SE_CD', width: 50, align: 'center' }, + { header: '등록일시', name: 'REG_DT', width: 150, align: 'center' }, + { header: '최종처리일시', name: 'MDFCN_DT', width: 150, align: 'center' }, + { header: '상태', name: 'CRDN_STTS_CD', hidden: true }, + { header: '서손ID', name: 'LEVY_EXCL_ID', hidden: true }, + { header: '소유자ID', name: 'RTPYR_ID', hidden: true }, + { header: '서손사유코드', name: 'LEVY_EXCL_RSN_CD', hidden: true }, + { header: 'interfaceSeqN', name: 'INTERFACE_SEQN', hidden: true } ]; var gridOptions = { - el: 'grid', - rowHeaders: ['rowNum'], - columns: gridColumns, - columnOptions: { - frozenCount: 3 - }, - scrollFuncName : crdnControl.scrollFuncName + theadTr: 'crdnTheadTr--${pageSuffix}', + rowHeader: 'No.', + trDataKey: 'CRDN_ID', + infoPrefix: "crdn", + prefixName : "단속", + clickEvent : "crdnControl.setCurrent('{CRDN_ID}')", + dblClickEvent : "crdnControl.getInfo({})", + columns: gridColumns }; +var tbodyTemplate = {}; -var initGrid = () => { - GRID = TuiGrid.of(gridOptions); - GRID.on('dblclick', function (props) { fnBiz.onDblClickGrid(props); }); -}; $(document).ready(function(){ - //페이지로딩 후 초기화 fnBiz.resetBtn(); - initGrid(); + tbodyTemplate = initGrid(gridOptions); $("#schDateFrom--${pageSuffix}").datepicker({ changeMonth: true, @@ -624,6 +446,14 @@ $(document).ready(function(){ var defaultBizValue = $("#layout-navbar input[name='sysSeCd']:checked").val(); $("#frmSearch--${pageSuffix} input[name='sysSeCd'][value='" + defaultBizValue + "']").prop("checked",true); fnResetAndChangeBiz(defaultBizValue); + + //스크롤 이벤트 추가 + $("#table-responsive--${pageSuffix}").scroll(function(){ + var el = $(this); + if((el[0].scrollHeight - el.scrollTop() + 15) == el.outerHeight()){ + scrollCrdns(); + } + }); }); - \ No newline at end of file + diff --git a/src/main/webapp/WEB-INF/jsp/include/head.jsp b/src/main/webapp/WEB-INF/jsp/include/head.jsp index 548741ab..b4fe1e55 100644 --- a/src/main/webapp/WEB-INF/jsp/include/head.jsp +++ b/src/main/webapp/WEB-INF/jsp/include/head.jsp @@ -38,11 +38,6 @@ "/> " /> " /> - " /> - " /> - " /> - - diff --git a/src/main/webapp/WEB-INF/jsp/include/tail.jsp b/src/main/webapp/WEB-INF/jsp/include/tail.jsp index 91fbb202..1521b416 100644 --- a/src/main/webapp/WEB-INF/jsp/include/tail.jsp +++ b/src/main/webapp/WEB-INF/jsp/include/tail.jsp @@ -41,17 +41,15 @@ + - - - - - + + diff --git a/src/main/webapp/resources/3rd-party/tui/grid/4.21.5/tui-date-picker/tui-date-picker.css b/src/main/webapp/resources/3rd-party/tui/grid/4.21.5/tui-date-picker/tui-date-picker.css deleted file mode 100644 index 766ac49b..00000000 --- a/src/main/webapp/resources/3rd-party/tui/grid/4.21.5/tui-date-picker/tui-date-picker.css +++ /dev/null @@ -1,562 +0,0 @@ -/*! - * TOAST UI Date Picker - * @version 4.3.1 - * @author NHN. FE Development Lab - * @license MIT - */ -@charset "utf-8"; -.tui-calendar { - position: relative; - background-color: #fff; - border: 1px solid #aaa; - width: 274px; -} - -.tui-calendar * { - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} - -.tui-calendar div { - text-align: center -} - -.tui-calendar caption { - padding: 0 -} - -.tui-calendar caption span { - overflow: hidden; - position: absolute; - clip: rect(0 0 0 0); - width: 1px; - height: 1px; - margin: -1px; - padding: 0 -} - -.tui-calendar button, .tui-datepicker-dropdown button, .tui-datepicker-selector button { - -webkit-appearance: none; - -moz-appearance: none; - appearance: none -} - -.tui-ico-date, .tui-ico-time, .tui-datepicker-dropdown .tui-ico-check, .tui-ico-caret { - overflow: hidden; - display: in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Z9yKtQopW0yzBniMmNanBxrkVhhntCliTWVOWBCahKxwNobm52fKjZvXt35j5RQFX5IpPUu4tZWcFM0qnKtYhnESsQAQZd0/8Q1uVQlca14hcoE8lA0KAP2pGfqKrUjGb2KXaVfTZlokZu+jW7lKPHRFVuz+MJNpn4dpOTBWuwBbynnOUsnjl5emWeTypDt8NOhPhaJkd/PNX+s0bu9STLllsRfXZuI/T3EhvbaEJyo+CMz+ETF/13TXst+QDnSh9ml7VNfbgsiIrmYtYJlpkZ/dGU0tQ/RvwbUv+oIgn+tolksVywZZ9gEomSpvdB6l0Y6aYoL/CckU1bsAM8gLAocScpPQH7GR9+foG4A3FCpNP/BBgAdZ3B2yZg0vUAAAAASUVORK5CYII=) no-repeat -} - -.tui-ico-date { - width: 12px; - height: 12px; - background-position: -17px 0 -} - -.tui-ico-time { - width: 12px; - height: 12px; - background-position: 0 -30px -} - -.tui-ico-caret { - width: 7px; - height: 4px; - background-position: 0 -58px -} - -.tui-calendar-month, .tui-calendar-year { - width: 202px; -} - -.tui-calendar-month .tui-calendar-body, .tui-calendar-year .tui-calendar-body { - width: 202px; - margin: 0 auto; -} - -.tui-calendar .tui-calendar-header { - position: relative; - border-bottom: 1px solid #efefef -} - -.tui-calendar .tui-calendar-header-inner { - padding: 17px 50px 15px; - height: 50px -} - -.tui-calendar .tui-calendar-title-today { - height: 30px; - margin: 0; - font-size: 12px; - line-height: 34px; - color: #777; - background-color: #f4f4f4 -} - -.tui-calendar .tui-calendar-title-today:hover { - color: #333; - background-color: #edf4fc; - cursor: pointer; -} - -.tui-calendar .tui-calendar-title { - display: inline-block; - font-size: 18px; - font-weight: normal; - font-style: normal; - line-height: 1; - color: #333; - cursor: default; - vertical-align: top -} - -.tui-calendar-btn { - overflow: hidden; - position: absolute; - top: 0; - width: 32px; - height: 50px; - line-height: 400px; - z-index: 10; - cursor: pointer; - border: none; - background-color: #fff; -} - -.tui-calendar .tui-calendar-btn-prev-month { - left: 0 -} - -.tui-calendar .tui-calendar-btn-next-month { - right: 0 -} - -.tui-calendar .tui-calendar-btn-prev-year { - left: 0 -} - -.tui-calendar .tui-calendar-btn-next-year { - right: 0 -} - -.tui-calendar .tui-calendar-btn-prev-month:after, .tui-calendar .tui-calendar-btn-next-month:after, .tui-calendar .tui-calendar-btn-prev-year:after, .tui-calendar .tui-calendar-btn-next-year:after { - overflow: hidden; - position: absolute; - top: 50%; - margin-top: -5px; - line-height: 400px; - background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC8AAAA+CAYAAAC7rUKSAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2ZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDpERjdGMzkzODVEQkRFNjExQkVCMjlDOUFDNzZDM0E5NCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDo1ODVCRT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yBM2LS+Az1TIEfRKUIOiayqiONzU4hn0uCXknR1WKGp5NXZ+u9iovvxcBSj7RRkSEV80zfztIy4PaYh+1r1QAVUkRpUmgzFSUNdb51Rce+4+NpJ+AhYxQ21Bb6gO6BSuSEchSldohmjVPU44y6zx9fcBVHnDDk3jwpnhOp6cIkiXQNZVRHbWhtgVTlZD6v8LNTPYmPvWYldkazWZ9yKtQopW0yzBniMmNanBxrkVhhntCliTWVOWBCahKxwNobm52fKjZvXt35j5RQFX5IpPUu4tZWcFM0qnKtYhnESsQAQZd0/8Q1uVQlca14hcoE8lA0KAP2pGfqKrUjGb2KXaVfTZlokZu+jW7lKPHRFVuz+MJNpn4dpOTBWuwBbynnOUsnjl5emWeTypDt8NOhPhaJkd/PNX+s0bu9STLllsRfXZuI/T3EhvbaEJyo+CMz+ETF/13TXst+QDnSh9ml7VNfbgsiIrmYtYJlpkZ/dGU0tQ/RvwbUv+oIgn+tolksVywZZ9gEomSpvdB6l0Y6aYoL/CckU1bsAM8gLAocScpPQH7GR9+foG4A3FCpNP/BBgAdZ3B2yZg0vUAAAAASUVORK5CYII=) no-repeat; - content: '' -} - -.tui-calendar .tui-calendar-btn-prev-month:after, .tui-calendar.tui-calendar-month .tui-calendar-btn-prev-year:after { - width: 6px; - height: 11px; - left: 50%; - margin-left: -3px; - background-position: 0 0 -} - -.tui-calendar .tui-calendar-btn-next-month:after, .tui-calendar.tui-calendar-month .tui-calendar-btn-next-year:after { - width: 6px; - height: 11px; - right: 50%; - margin-right: -3px; - background-position: -8px 0 -} - -.tui-calendar .tui-calendar-btn-prev-year:after { - width: 11px; - height: 10px; - left: 50%; - margin-left: -6px; - background-position: -16px -36px -} - -.tui-calendar .tui-calendar-btn-next-year:after { - width: 11px; - height: 10px; - right: 50%; - margin-right: -6px; - background-position: -16px -49px -} - -.tui-calendar.tui-calendar-month .tui-calendar-btn-prev-year, .tui-calendar.tui-calendar-month .tui-calendar-btn-next-year { - width: 50px -} - -.tui-calendar .tui-calendar-has-btns .tui-calendar-btn-prev-year { - left: 10px -} - -.tui-calendar .tui-calendar-has-btns .tui-calendar-btn-next-year { - right: 10px -} - -.tui-calendar .tui-calendar-has-btns .tui-calendar-btn-prev-month { - left: 44px -} - -.tui-calendar .tui-calendar-has-btns .tui-calendar-btn-next-month { - right: 44px -} - -.tui-calendar .tui-calendar-body-header th { - color: #777 -} - -.tui-calendar .tui-calendar-body-inner { - width: 100%; - margin: 0 auto; - table-layout: fixed; - border-collapse: collapse; - text-align: center; - font-size: 12px -} - -.tui-calendar th { - font-weight: normal; - cursor: default -} - -.tui-calendar th, .tui-calendar td { - height: 39px; - text-align: center; - color: #999 -} - -.tui-calendar .tui-is-blocked:hover { - cursor: default -} - -.tui-calendar .tui-calendar-month { - width: 25%; - height: 50px -} - -.tui-calendar .tui-calendar-today { - color: #4b96e6 -} - -.tui-calendar .tui-calendar-prev-month, .tui-calendar .tui-calendar-next-month { - color: #ccc -} - -.tui-calendar .tui-calendar-prev-month.tui-calendar-date, .tui-calendar .tui-calendar-next-month.tui-calendar-date { - visibility: hidden -} - -.tui-calendar .tui-calendar-btn-choice { - background-color: #4b96e6 -} - -.tui-calendar .tui-calendar-btn-close { - background-color: #777 -} - -.tui-calendar .tui-calendar-year { - width: 25%; - height: 50px -} - -.tui-calendar.tui-calendar-year .tui-calendar-btn-prev-year:after { - width: 6px; - height: 11px; - left: 50%; - margin-left: -3px; - background-position: 0 0 -} - -.tui-calendar.tui-calendar-year .tui-calendar-btn-next-year:after { - width: 6px; - height: 11px; - right: 50%; - margin-right: -3px; - background-position: -8px 0 -} - -.tui-calendar.tui-calendar-year .tui-calendar-btn-prev-year, .tui-calendar.tui-calendar-year .tui-calendar-btn-next-year { - width: 50px -} - -.tui-datepicker { - border: 1px solid #aaa; - background-color: white; - position: absolute; -} - -.tui-datepicker * { - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} - -.tui-datepicker-type-date { - width: 274px; -} - -.tui-datepicker-body .tui-calendar-month, .tui-datepicker-body .tui-calendar-year { - width: auto; -} - -.tui-datepicker .tui-calendar { - border: 0; -} - -.tui-datepicker .tui-calendar-title { - cursor: pointer; -} - -.tui-datepicker .tui-calendar-title.tui-calendar-title-year-to-year { - cursor: auto; -} - -.tui-datepicker-body .tui-timepicker, .tui-datepicker-footer .tui-timepicker { - width: 274px; - position: static; - padding: 20px 46px 20px 47px; - border: 0 -} - -.tui-datepicker-footer .tui-timepicker { - border-top: 1px solid #eee -} - -.tui-datepicker-selector { - padding: 10px; - font-size: 0; - text-align: center; - border-bottom: 1px solid #eee -} - -.tui-datepicker-selector-button { - width: 50%; - height: 26px; - font-size: 12px; - line-height: 23px; - border: 1px solid #ddd; - background-color: #fff; - color: #777; - outline: none; - cursor: pointer -} - -.tui-datepicker-selector-button.tui-is-checked { - background-color: #eee; - color: #333 -} - -.tui-datepicker-selector-button+.tui-datepicker-selector-button { - margin-left: -1px -} - -.tui-datepicker-selector-button [class^=tui-ico-] { - margin: 5px 9px 0 0; - vertical-align: top; -} - -.tui-datepicker-selector-button.tui-is-checked .tui-ico-date, .tui-datepicker-input.tui-has-focus .tui-ico-date { - background-position: -17px -14px -} - -.tui-datepicker-selector-button.tui-is-checked .tui-ico-time { - background-position: 0 -44px -} - -.tui-datepicker-area { - position: relative -} - -.tui-datepicker-input { - position: relative; - display: inline-block; - width: 120px; - height: 28px; - vertical-align: top; - border: 1px solid #ddd -} - -.tui-datepicker-input * { - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} - -.tui-datepicker-input > input { - width: 100%; - height: 100%; - padding: 6px 27px 6px 10px; - font-size: 12px; - line-height: 14px; - vertical-align: top; - border: 0; - color: #333 -} - -.tui-datepicker-input > .tui-ico-date { - position: absolute; - top: 50%; - right: 8px; - margin: -6px 0 0 0 -} - -.tui-datepicker-input.tui-has-focus { - border-color: #aaa -} - -.tui-datetime-input { - width: 170px -} - -.tui-datepicker .tui-is-blocked { - cursor: default; - color: #ddd -} - -.tui-datepicker .tui-is-valid { - color: #999 -} - -.tui-datepicker .tui-is-selectable:hover { - background-color: #edf4fc; - cursor: pointer; -} - -.tui-datepicker .tui-is-selectable.tui-is-selected, .tui-datepicker.tui-rangepicker .tui-is-selectable.tui-is-selected { - background-color: #4b96e6; - color: #fff -} - -.tui-datepicker.tui-rangepicker .tui-is-selected-range { - background-color: #edf4fc; -} - -.tui-datepicker-dropdown { - display: inline-block; - width: 120px -} - -.tui-datepicker-dropdown .tui-dropdown-button { - width: 100%; - height: 28px; - padding: 0 10px; - font-size: 12px; - line-height: 20px; - border: 1px solid #ddd; - padding: 0 30px 0 10px; - text-align: left; - background: #fff; - cursor: pointer -} - -.tui-datepicker-dropdown { - position: relative -} - -.tui-datepicker-dropdown .tui-ico-caret { - position: absolute; - top: 12px; - right: 10px -} - -.tui-datepicker-dropdown .tui-dropdown-menu { - display: none; - position: absolute; - top: 27px; - left: 0; - right: 0; - width: 100%; - padding: 5px 0; - margin: 0; - overflow-y: auto; - min-width: 0; - max-height: 198px; - font-size: 12px; - border: 1px solid #ddd; - border-top-color: #fff; - z-index: 10; - box-sizing: border-box; - box-shadow: none; - border-radius: 0 -} - -.tui-datepicker-dropdown.tui-is-open .tui-dropdown-button { - display: block -} - -.tui-datepicker-dropdown.tui-is-open .tui-dropdown-menu, .tui-datepicker-dropdown.tui-is-open .tui-dropdown-button { - display: block; - border-color: #aaa -} - -.tui-datepicker-dropdown.tui-is-open .tui-ico-caret { - background-position: -21px -28px -} - -.tui-datepicker-dropdown .tui-menu-item { - position: relative; - overflow: hidden; - position: relative; - height: 28px; - line-height: 28px; - background-color: #fff; - z-index: 10 -} - -.tui-datepicker-dropdown .tui-menu-item-btn { - position: relative; - width: 100%; - font-size: 12px; - font-weight: normal; - line-height: 28px; - padding: 0 10px 0 30px; - text-align: left; - color: #333; - background-color: #fff; - border: 0; - cursor: pointer; - z-index: 9 -} - -.tui-datepicker-dropdown .tui-menu-item-btn:hover, .tui-menu-item-btn:focus, .tui-menu-item-btn:active { - color: #333; - background-color: #f4f4f4 -} - -.tui-datepicker-dropdown .tui-menu-item .tui-ico-check { - display: none; - overflow: hidden; - position: absolute; - width: 10px; - height: 8px; - top: 10px; - left: 10px; - background-position: -31px -54px; - z-index: 10; - content: 'aaa' -} - -.tui-datepicker-dropdown .tui-menu-item.tui-is-selected .tui-ico-check { - display: block -} - -.tui-datepicker-dropdown .tui-menu-item.tui-is-selected .tui-menu-item-btn { - font-weight: bold -} - -.tui-dropdown-area { - font-size: 0 -} - -.tui-dropdown-area .tui-datepicker-dropdown+.tui-datepicker-dropdown { - margin-left: 5px -} - -.tui-hidden { - display: none; -} - diff --git a/src/main/webapp/resources/3rd-party/tui/grid/4.21.5/tui-date-picker/tui-date-picker.js b/src/main/webapp/resources/3rd-party/tui/grid/4.21.5/tui-date-picker/tui-date-picker.js deleted file mode 100644 index 894b320d..00000000 --- a/src/main/webapp/resources/3rd-party/tui/grid/4.21.5/tui-date-picker/tui-date-picker.js +++ /dev/null @@ -1,7574 +0,0 @@ -/*! - * TOAST UI Date Picker - * @version 4.3.1 - * @author NHN. FE Development Lab - * @license MIT - */ -(function webpackUniversalModuleDefinition(root, factory) { - if(typeof exports === 'object' && typeof module === 'object') - module.exports = factory(require("tui-time-picker")); - else if(typeof define === 'function' && define.amd) - define(["tui-time-picker"], factory); - else if(typeof exports === 'object') - exports["DatePicker"] = factory(require("tui-time-picker")); - else - root["tui"] = root["tui"] || {}, root["tui"]["DatePicker"] = factory(root["tui"]["TimePicker"]); -})(window, function(__WEBPACK_EXTERNAL_MODULE__43__) { -return /******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) { -/******/ return installedModules[moduleId].exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ i: moduleId, -/******/ l: false, -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Flag the module as loaded -/******/ module.l = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; -/******/ -/******/ // define getter function for harmony exports -/******/ __webpack_require__.d = function(exports, name, getter) { -/******/ if(!__webpack_require__.o(exports, name)) { -/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); -/******/ } -/******/ }; -/******/ -/******/ // define __esModule on exports -/******/ __webpack_require__.r = function(exports) { -/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { -/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); -/******/ } -/******/ Object.defineProperty(exports, '__esModule', { value: true }); -/******/ }; -/******/ -/******/ // create a fake namespace object -/******/ // mode & 1: value is a module id, require it -/******/ // mode & 2: merge all properties of value into the ns -/******/ // mode & 4: return value when already ns object -/******/ // mode & 8|1: behave like require -/******/ __webpack_require__.t = function(value, mode) { -/******/ if(mode & 1) value = __webpack_require__(value); -/******/ if(mode & 8) return value; -/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; -/******/ var ns = Object.create(null); -/******/ __webpack_require__.r(ns); -/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); -/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); -/******/ return ns; -/******/ }; -/******/ -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __webpack_require__.n = function(module) { -/******/ var getter = module && module.__esModule ? -/******/ function getDefault() { return module['default']; } : -/******/ function getModuleExports() { return module; }; -/******/ __webpack_require__.d(getter, 'a', getter); -/******/ return getter; -/******/ }; -/******/ -/******/ // Object.prototype.hasOwnProperty.call -/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; -/******/ -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = "dist"; -/******/ -/******/ -/******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 34); -/******/ }) -/************************************************************************/ -/******/ ([ -/* 0 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * @fileoverview - * This module provides a function to make a constructor - * that can inherit from the other constructors like the CLASS easily. - * @author NHN FE Development Lab - */ - - - -var inherit = __webpack_require__(35); -var extend = __webpack_require__(7); - -/** - * @module defineClass - */ - -/** - * Help a constructor to be defined and to inherit from the other constructors - * @param {*} [parent] Parent constructor - * @param {Object} props Members of constructor - * @param {Function} props.init Initialization method - * @param {Object} [props.static] Static members of constructor - * @returns {*} Constructor - * @memberof module:defineClass - * @example - * var defineClass = require('tui-code-snippet/defineClass/defineClass'); // node, commonjs - * - * //-- #2. Use property --// - * var Parent = defineClass({ - * init: function() { // constuructor - * this.name = 'made by def'; - * }, - * method: function() { - * // ... - * }, - * static: { - * staticMethod: function() { - * // ... - * } - * } - * }); - * - * var Child = defineClass(Parent, { - * childMethod: function() {} - * }); - * - * Parent.staticMethod(); - * - * var parentInstance = new Parent(); - * console.log(parentInstance.name); //made by def - * parentInstance.staticMethod(); // Error - * - * var childInstance = new Child(); - * childInstance.method(); - * childInstance.childMethod(); - */ -function defineClass(parent, props) { - var obj; - - if (!props) { - props = parent; - parent = null; - } - - obj = props.init || function() {}; - - if (parent) { - inherit(obj, parent); - } - - if (props.hasOwnProperty('static')) { - extend(obj, props['static']); - delete props['static']; - } - - extend(obj.prototype, props); - - return obj; -} - -module.exports = defineClass; - - -/***/ }), -/* 1 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * @fileoverview Constants of date-picker - * @author NHN. FE Development Lab - */ - - - -module.exports = { - TYPE_DATE: 'date', - TYPE_MONTH: 'month', - TYPE_YEAR: 'year', - TYPE_HOUR: 'hour', - TYPE_MINUTE: 'minute', - TYPE_MERIDIEM: 'meridiem', - MIN_DATE: new Date(1900, 0, 1), - MAX_DATE: new Date(2999, 11, 31), - - DEFAULT_LANGUAGE_TYPE: 'en', - - CLASS_NAME_SELECTED: 'tui-is-selected', - - CLASS_NAME_PREV_MONTH_BTN: 'tui-calendar-btn-prev-month', - CLASS_NAME_PREV_YEAR_BTN: 'tui-calendar-btn-prev-year', - CLASS_NAME_NEXT_YEAR_BTN: 'tui-calendar-btn-next-year', - CLASS_NAME_NEXT_MONTH_BTN: 'tui-calendar-btn-next-month', - CLASS_NAME_TITLE_TODAY: 'tui-calendar-title-today', - - DEFAULT_WEEK_START_DAY: 'Sun', - WEEK_START_DAY_MAP: { - sun: 0, - mon: 1, - tue: 2, - wed: 3, - thu: 4, - fri: 5, - sat: 6 - } -}; - - -/***/ }), -/* 2 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * @fileoverview Execute the provided callback once for each element present in the array(or Array-like object) in ascending order. - * @author NHN FE Development Lab - */ - - - -/** - * Execute the provided callback once for each element present - * in the array(or Array-like object) in ascending order. - * If the callback function returns false, the loop will be stopped. - * Callback function(iteratee) is invoked with three arguments: - * 1) The value of the element - * 2) The index of the element - * 3) The array(or Array-like object) being traversed - * @param {Array|Arguments|NodeList} arr The array(or Array-like object) that will be traversed - * @param {function} iteratee Callback function - * @param {Object} [context] Context(this) of callback function - * @memberof module:collection - * @example - * var forEachArray = require('tui-code-snippet/collection/forEachArray'); // node, commonjs - * - * var sum = 0; - * - * forEachArray([1,2,3], function(value){ - * sum += value; - * }); - * alert(sum); // 6 - */ -function forEachArray(arr, iteratee, context) { - var index = 0; - var len = arr.length; - - context = context || null; - - for (; index < len; index += 1) { - if (iteratee.call(context, arr[index], index, arr) === false) { - break; - } - } -} - -module.exports = forEachArray; - - -/***/ }), -/* 3 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/* eslint-disable complexity */ -/** - * @fileoverview Returns the first index at which a given element can be found in the array. - * @author NHN FE Development Lab - */ - - - -var isArray = __webpack_require__(6); - -/** - * @module array - */ - -/** - * Returns the first index at which a given element can be found in the array - * from start index(default 0), or -1 if it is not present. - * It compares searchElement to elements of the Array using strict equality - * (the same method used by the ===, or triple-equals, operator). - * @param {*} searchElement Element to locate in the array - * @param {Array} array Array that will be traversed. - * @param {number} startIndex Start index in array for searching (default 0) - * @returns {number} the First index at which a given element, or -1 if it is not present - * @memberof module:array - * @example - * var inArray = require('tui-code-snippet/array/inArray'); // node, commonjs - * - * var arr = ['one', 'two', 'three', 'four']; - * var idx1 = inArray('one', arr, 3); // -1 - * var idx2 = inArray('one', arr); // 0 - */ -function inArray(searchElement, array, startIndex) { - var i; - var length; - startIndex = startIndex || 0; - - if (!isArray(array)) { - return -1; - } - - if (Array.prototype.indexOf) { - return Array.prototype.indexOf.call(array, searchElement, startIndex); - } - - length = array.length; - for (i = startIndex; startIndex >= 0 && i < length; i += 1) { - if (array[i] === searchElement) { - return i; - } - } - - return -1; -} - -module.exports = inArray; - - -/***/ }), -/* 4 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * @fileoverview Utils for Datepicker component - * @author NHN. FE Development Lab - */ - - - -var forEachArray = __webpack_require__(2); -var isHTMLNode = __webpack_require__(46); -var sendHostname = __webpack_require__(47); - -var currentId = 0; - -var utils = { - /** - * Get a target element - * @param {Event} ev Event object - * @returns {HTMLElement} An event target element - */ - getTarget: function(ev) { - return ev.target || ev.srcElement; - }, - - /** - * Return the same element with an element or a matched element searched by a selector. - * @param {HTMLElement|string} param HTMLElement or selector - * @returns {HTMLElement} A matched element - */ - getElement: function(param) { - return isHTMLNode(param) ? param : document.querySelector(param); - }, - - /** - * Get a selector of the element. - * @param {HTMLElement} elem An element - * @returns {string} - */ - getSelector: function(elem) { - var selector = ''; - if (elem.id) { - selector = '#' + elem.id; - } else if (elem.className) { - selector = '.' + elem.className.split(' ')[0]; - } - - return selector; - }, - - /** - * Create an unique id. - * @returns {number} - */ - generateId: function() { - currentId += 1; - - return currentId; - }, - - /** - * Create a new array with all elements that pass the test implemented by the provided function. - * @param {Array} arr - Array that will be traversed - * @param {function} iteratee - iteratee callback function - * @returns {Array} - */ - filter: function(arr, iteratee) { - var result = []; - - forEachArray(arr, function(item) { - if (iteratee(item)) { - result.push(item); - } - }); - - return result; - }, - - /** - * Send hostname for GA - * @ignore - */ - sendHostName: function() { - sendHostname('date-picker', 'UA-129987462-1'); - } -}; - -module.exports = utils; - - -/***/ }), -/* 5 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * @fileoverview Utils for DatePicker component - * @author NHN. FE dev Lab. - */ - - - -var isDate = __webpack_require__(28); -var isNumber = __webpack_require__(15); - -var constants = __webpack_require__(1); - -var TYPE_DATE = constants.TYPE_DATE; -var TYPE_MONTH = constants.TYPE_MONTH; -var TYPE_YEAR = constants.TYPE_YEAR; - -/** - * Utils of calendar - * @namespace dateUtil - * @ignore - */ -var utils = { - /** - * Get weeks count by paramenter - * @param {number} year A year - * @param {number} month A month - * @returns {number} Weeks count (4~6) - **/ - getWeeksCount: function(year, month) { - var firstDay = utils.getFirstDay(year, month), - lastDate = utils.getLastDayInMonth(year, month); - - return Math.ceil((firstDay + lastDate) / 7); - }, - - /** - * @param {Date} date - Date instance - * @returns {boolean} - */ - isValidDate: function(date) { - return isDate(date) && !isNaN(date.getTime()); - }, - - /** - * Get which day is first by parameters that include year and month information. - * @param {number} year A year - * @param {number} month A month - * @returns {number} (0~6) - */ - getFirstDay: function(year, month) { - return new Date(year, month - 1, 1).getDay(); - }, - - /** - * Get timestamp of the first day. - * @param {number} year A year - * @param {number} month A month - * @returns {number} timestamp - */ - getFirstDayTimestamp: function(year, month) { - return new Date(year, month, 1).getTime(); - }, - - /** - * Get last date by parameters that include year and month information. - * @param {number} year A year - * @param {number} month A month - * @returns {number} (1~31) - */ - getLastDayInMonth: function(year, month) { - return new Date(year, month, 0).getDate(); - }, - - /** - * Chagne number 0~9 to '00~09' - * @param {number} number number - * @returns {string} - * @example - * dateUtil.prependLeadingZero(0); // '00' - * dateUtil.prependLeadingZero(9); // '09' - * dateUtil.prependLeadingZero(12); // '12' - */ - prependLeadingZero: function(number) { - var prefix = ''; - - if (number < 10) { - prefix = '0'; - } - - return prefix + number; - }, - - /** - * Get meridiem hour - * @param {number} hour - Original hour - * @returns {number} Converted meridiem hour - */ - getMeridiemHour: function(hour) { - hour %= 12; - - if (hour === 0) { - hour = 12; - } - - return hour; - }, - - /** - * Returns number or default - * @param {*} any - Any value - * @param {number} defaultNumber - Default number - * @throws Will throw an error if the defaultNumber is invalid. - * @returns {number} - */ - getSafeNumber: function(any, defaultNumber) { - if (isNaN(defaultNumber) || !isNumber(defaultNumber)) { - throw Error('The defaultNumber must be a valid number.'); - } - if (isNaN(any)) { - return defaultNumber; - } - - return Number(any); - }, - - /** - * Return date of the week - * @param {number} year - Year - * @param {number} month - Month - * @param {number} weekNumber - Week number (0~5) - * @param {number} dayNumber - Day number (0: sunday, 1: monday, ....) - * @returns {number} - */ - getDateOfWeek: function(year, month, weekNumber, dayNumber) { - var firstDayOfMonth = new Date(year, month - 1).getDay(); - var dateOffset = firstDayOfMonth - dayNumber - 1; - - return new Date(year, month - 1, weekNumber * 7 - dateOffset); - }, - - /** - * Returns range arr - * @param {number} start - Start value - * @param {number} end - End value - * @returns {Array} - */ - getRangeArr: function(start, end) { - var arr = []; - var i; - - if (start > end) { - for (i = end; i >= start; i -= 1) { - arr.push(i); - } - } else { - for (i = start; i <= end; i += 1) { - arr.push(i); - } - } - - return arr; - }, - - /** - * Returns cloned date with the start of a unit of time - * @param {Date|number} date - Original date - * @param {string} [type = TYPE_DATE] - Unit type - * @throws {Error} - * @returns {Date} - */ - cloneWithStartOf: function(date, type) { - type = type || TYPE_DATE; - date = new Date(date); - - // Does not consider time-level yet. - date.setHours(0, 0, 0, 0); - - switch (type) { - case TYPE_DATE: - break; - case TYPE_MONTH: - date.setDate(1); - break; - case TYPE_YEAR: - date.setMonth(0, 1); - break; - default: - throw Error('Unsupported type: ' + type); - } - - return date; - }, - - /** - * Returns cloned date with the end of a unit of time - * @param {Date|number} date - Original date - * @param {string} [type = TYPE_DATE] - Unit type - * @throws {Error} - * @returns {Date} - */ - cloneWithEndOf: function(date, type) { - type = type || TYPE_DATE; - date = new Date(date); - - // Does not consider time-level yet. - date.setHours(23, 59, 59, 999); - - switch (type) { - case TYPE_DATE: - break; - case TYPE_MONTH: - date.setMonth(date.getMonth() + 1, 0); - break; - case TYPE_YEAR: - date.setMonth(11, 31); - break; - default: - throw Error('Unsupported type: ' + type); - } - - return date; - }, - - /** - * Compare two dates - * @param {Date|number} dateA - Date - * @param {Date|number} dateB - Date - * @param {string} [cmpLevel] - Comparing level - * @returns {number} - */ - compare: function(dateA, dateB, cmpLevel) { - var aTimestamp, bTimestamp; - - if (!(utils.isValidDate(dateA) && utils.isValidDate(dateB))) { - return NaN; - } - - if (!cmpLevel) { - aTimestamp = dateA.getTime(); - bTimestamp = dateB.getTime(); - } else { - aTimestamp = utils.cloneWithStartOf(dateA, cmpLevel).getTime(); - bTimestamp = utils.cloneWithStartOf(dateB, cmpLevel).getTime(); - } - - if (aTimestamp > bTimestamp) { - return 1; - } - - return aTimestamp === bTimestamp ? 0 : -1; - }, - - /** - * Returns whether two dates are same - * @param {Date|number} dateA - Date - * @param {Date|number} dateB - Date - * @param {string} [cmpLevel] - Comparing level - * @returns {boolean} - */ - isSame: function(dateA, dateB, cmpLevel) { - return utils.compare(dateA, dateB, cmpLevel) === 0; - }, - - /** - * Returns whether the target is in range - * @param {Date|number} start - Range start - * @param {Date|number} end - Range end - * @param {Date|number} target - Target - * @param {string} [cmpLevel = TYPE_DATE] - Comparing level - * @returns {boolean} - */ - inRange: function(start, end, target, cmpLevel) { - return utils.compare(start, target, cmpLevel) < 1 && utils.compare(end, target, cmpLevel) > -1; - } -}; - -module.exports = utils; - - -/***/ }), -/* 6 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * @fileoverview Check whether the given variable is an instance of Array or not. - * @author NHN FE Development Lab - */ - - - -/** - * Check whether the given variable is an instance of Array or not. - * If the given variable is an instance of Array, return true. - * @param {*} obj - Target for checking - * @returns {boolean} Is array instance? - * @memberof module:type - */ -function isArray(obj) { - return obj instanceof Array; -} - -module.exports = isArray; - - -/***/ }), -/* 7 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * @fileoverview Extend the target object from other objects. - * @author NHN FE Development Lab - */ - - - -/** - * @module object - */ - -/** - * Extend the target object from other objects. - * @param {object} target - Object that will be extended - * @param {...object} objects - Objects as sources - * @returns {object} Extended object - * @memberof module:object - */ -function extend(target, objects) { // eslint-disable-line no-unused-vars - var hasOwnProp = Object.prototype.hasOwnProperty; - var source, prop, i, len; - - for (i = 1, len = arguments.length; i < len; i += 1) { - source = arguments[i]; - for (prop in source) { - if (hasOwnProp.call(source, prop)) { - target[prop] = source[prop]; - } - } - } - - return target; -} - -module.exports = extend; - - -/***/ }), -/* 8 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * @fileoverview This module provides some functions for custom events. And it is implemented in the observer design pattern. - * @author NHN FE Development Lab - */ - - - -var extend = __webpack_require__(7); -var isExisty = __webpack_require__(37); -var isString = __webpack_require__(13); -var isObject = __webpack_require__(22); -var isArray = __webpack_require__(6); -var isFunction = __webpack_require__(39); -var forEach = __webpack_require__(9); - -var R_EVENTNAME_SPLIT = /\s+/g; - -/** - * @class - * @example - * // node, commonjs - * var CustomEvents = require('tui-code-snippet/customEvents/customEvents'); - */ -function CustomEvents() { - /** - * @type {HandlerItem[]} - */ - this.events = null; - - /** - * only for checking specific context event was binded - * @type {object[]} - */ - this.contexts = null; -} - -/** - * Mixin custom events feature to specific constructor - * @param {function} func - constructor - * @example - * var CustomEvents = require('tui-code-snippet/customEvents/customEvents'); // node, commonjs - * - * var model; - * function Model() { - * this.name = ''; - * } - * CustomEvents.mixin(Model); - * - * model = new Model(); - * model.on('change', function() { this.name = 'model'; }, this); - * model.fire('change'); - * alert(model.name); // 'model'; - */ -CustomEvents.mixin = function(func) { - extend(func.prototype, CustomEvents.prototype); -}; - -/** - * Get HandlerItem object - * @param {function} handler - handler function - * @param {object} [context] - context for handler - * @returns {HandlerItem} HandlerItem object - * @private - */ -CustomEvents.prototype._getHandlerItem = function(handler, context) { - var item = {handler: handler}; - - if (context) { - item.context = context; - } - - return item; -}; - -/** - * Get event object safely - * @param {string} [eventName] - create sub event map if not exist. - * @returns {(object|array)} event object. if you supplied `eventName` - * parameter then make new array and return it - * @private - */ -CustomEvents.prototype._safeEvent = function(eventName) { - var events = this.events; - var byName; - - if (!events) { - events = this.events = {}; - } - - if (eventName) { - byName = events[eventName]; - - if (!byName) { - byName = []; - events[eventName] = byName; - } - - events = byName; - } - - return events; -}; - -/** - * Get context array safely - * @returns {array} context array - * @private - */ -CustomEvents.prototype._safeContext = function() { - var context = this.contexts; - - if (!context) { - context = this.contexts = []; - } - - return context; -}; - -/** - * Get index of context - * @param {object} ctx - context that used for bind custom event - * @returns {number} index of context - * @private - */ -CustomEvents.prototype._indexOfContext = function(ctx) { - var context = this._safeContext(); - var index = 0; - - while (context[index]) { - if (ctx === context[index][0]) { - return index; - } - - index += 1; - } - - return -1; -}; - -/** - * Memorize supplied context for recognize supplied object is context or - * name: handler pair object when off() - * @param {object} ctx - context object to memorize - * @private - */ -CustomEvents.prototype._memorizeContext = function(ctx) { - var context, index; - - if (!isExisty(ctx)) { - return; - } - - context = this._safeContext(); - index = this._indexOfContext(ctx); - - if (index > -1) { - context[index][1] += 1; - } else { - context.push([ctx, 1]); - } -}; - -/** - * Forget supplied context object - * @param {object} ctx - context object to forget - * @private - */ -CustomEvents.prototype._forgetContext = function(ctx) { - var context, contextIndex; - - if (!isExisty(ctx)) { - return; - } - - context = this._safeContext(); - contextIndex = this._indexOfContext(ctx); - - if (contextIndex > -1) { - context[contextIndex][1] -= 1; - - if (context[contextIndex][1] <= 0) { - context.splice(contextIndex, 1); - } - } -}; - -/** - * Bind event handler - * @param {(string|{name:string, handler:function})} eventName - custom - * event name or an object {eventName: handler} - * @param {(function|object)} [handler] - handler function or context - * @param {object} [context] - context for binding - * @private - */ -CustomEvents.prototype._bindEvent = function(eventName, handler, context) { - var events = this._safeEvent(eventName); - this._memorizeContext(context); - events.push(this._getHandlerItem(handler, context)); -}; - -/** - * Bind event handlers - * @param {(string|{name:string, handler:function})} eventName - custom - * event name or an object {eventName: handler} - * @param {(function|object)} [handler] - handler function or context - * @param {object} [context] - context for binding - * //-- #1. Get Module --// - * var CustomEvents = require('tui-code-snippet/customEvents/customEvents'); // node, commonjs - * - * //-- #2. Use method --// - * // # 2.1 Basic Usage - * CustomEvents.on('onload', handler); - * - * // # 2.2 With context - * CustomEvents.on('onload', handler, myObj); - * - * // # 2.3 Bind by object that name, handler pairs - * CustomEvents.on({ - * 'play': handler, - * 'pause': handler2 - * }); - * - * // # 2.4 Bind by object that name, handler pairs with context object - * CustomEvents.on({ - * 'play': handler - * }, myObj); - */ -CustomEvents.prototype.on = function(eventName, handler, context) { - var self = this; - - if (isString(eventName)) { - // [syntax 1, 2] - eventName = eventName.split(R_EVENTNAME_SPLIT); - forEach(eventName, function(name) { - self._bindEvent(name, handler, context); - }); - } else if (isObject(eventName)) { - // [syntax 3, 4] - context = handler; - forEach(eventName, function(func, name) { - self.on(name, func, context); - }); - } -}; - -/** - * Bind one-shot event handlers - * @param {(string|{name:string,handler:function})} eventName - custom - * event name or an object {eventName: handler} - * @param {function|object} [handler] - handler function or context - * @param {object} [context] - context for binding - */ -CustomEvents.prototype.once = function(eventName, handler, context) { - var self = this; - - if (isObject(eventName)) { - context = handler; - forEach(eventName, function(func, name) { - self.once(name, func, context); - }); - - return; - } - - function onceHandler() { // eslint-disable-line require-jsdoc - handler.apply(context, arguments); - self.off(eventName, onceHandler, context); - } - - this.on(eventName, onceHandler, context); -}; - -/** - * Splice supplied array by callback result - * @param {array} arr - array to splice - * @param {function} predicate - function return boolean - * @private - */ -CustomEvents.prototype._spliceMatches = function(arr, predicate) { - var i = 0; - var len; - - if (!isArray(arr)) { - return; - } - - for (len = arr.length; i < len; i += 1) { - if (predicate(arr[i]) === true) { - arr.splice(i, 1); - len -= 1; - i -= 1; - } - } -}; - -/** - * Get matcher for unbind specific handler events - * @param {function} handler - handler function - * @returns {function} handler matcher - * @private - */ -CustomEvents.prototype._matchHandler = function(handler) { - var self = this; - - return function(item) { - var needRemove = handler === item.handler; - - if (needRemove) { - self._forgetContext(item.context); - } - - return needRemove; - }; -}; - -/** - * Get matcher for unbind specific context events - * @param {object} context - context - * @returns {function} object matcher - * @private - */ -CustomEvents.prototype._matchContext = function(context) { - var self = this; - - return function(item) { - var needRemove = context === item.context; - - if (needRemove) { - self._forgetContext(item.context); - } - - return needRemove; - }; -}; - -/** - * Get matcher for unbind specific hander, context pair events - * @param {function} handler - handler function - * @param {object} context - context - * @returns {function} handler, context matcher - * @private - */ -CustomEvents.prototype._matchHandlerAndContext = function(handler, context) { - var self = this; - - return function(item) { - var matchHandler = (handler === item.handler); - var matchContext = (context === item.context); - var needRemove = (matchHandler && matchContext); - - if (needRemove) { - self._forgetContext(item.context); - } - - return needRemove; - }; -}; - -/** - * Unbind event by event name - * @param {string} eventName - custom event name to unbind - * @param {function} [handler] - handler function - * @private - */ -CustomEvents.prototype._offByEventName = function(eventName, handler) { - var self = this; - var andByHandler = isFunction(handler); - var matchHandler = self._matchHandler(handler); - - eventName = eventName.split(R_EVENTNAME_SPLIT); - - forEach(eventName, function(name) { - var handlerItems = self._safeEvent(name); - - if (andByHandler) { - self._spliceMatches(handlerItems, matchHandler); - } else { - forEach(handlerItems, function(item) { - self._forgetContext(item.context); - }); - - self.events[name] = []; - } - }); -}; - -/** - * Unbind event by handler function - * @param {function} handler - handler function - * @private - */ -CustomEvents.prototype._offByHandler = function(handler) { - var self = this; - var matchHandler = this._matchHandler(handler); - - forEach(this._safeEvent(), function(handlerItems) { - self._spliceMatches(handlerItems, matchHandler); - }); -}; - -/** - * Unbind event by object(name: handler pair object or context object) - * @param {object} obj - context or {name: handler} pair object - * @param {function} handler - handler function - * @private - */ -CustomEvents.prototype._offByObject = function(obj, handler) { - var self = this; - var matchFunc; - - if (this._indexOfContext(obj) < 0) { - forEach(obj, function(func, name) { - self.off(name, func); - }); - } else if (isString(handler)) { - matchFunc = this._matchContext(obj); - - self._spliceMatches(this._safeEvent(handler), matchFunc); - } else if (isFunction(handler)) { - matchFunc = this._matchHandlerAndContext(handler, obj); - - forEach(this._safeEvent(), function(handlerItems) { - self._spliceMatches(handlerItems, matchFunc); - }); - } else { - matchFunc = this._matchContext(obj); - - forEach(this._safeEvent(), function(handlerItems) { - self._spliceMatches(handlerItems, matchFunc); - }); - } -}; - -/** - * Unbind custom events - * @param {(string|object|function)} eventName - event name or context or - * {name: handler} pair object or handler function - * @param {(function)} handler - handler function - * @example - * //-- #1. Get Module --// - * var CustomEvents = require('tui-code-snippet/customEvents/customEvents'); // node, commonjs - * - * //-- #2. Use method --// - * // # 2.1 off by event name - * CustomEvents.off('onload'); - * - * // # 2.2 off by event name and handler - * CustomEvents.off('play', handler); - * - * // # 2.3 off by handler - * CustomEvents.off(handler); - * - * // # 2.4 off by context - * CustomEvents.off(myObj); - * - * // # 2.5 off by context and handler - * CustomEvents.off(myObj, handler); - * - * // # 2.6 off by context and event name - * CustomEvents.off(myObj, 'onload'); - * - * // # 2.7 off by an Object. that is {eventName: handler} - * CustomEvents.off({ - * 'play': handler, - * 'pause': handler2 - * }); - * - * // # 2.8 off the all events - * CustomEvents.off(); - */ -CustomEvents.prototype.off = function(eventName, handler) { - if (isString(eventName)) { - // [syntax 1, 2] - this._offByEventName(eventName, handler); - } else if (!arguments.length) { - // [syntax 8] - this.events = {}; - this.contexts = []; - } else if (isFunction(eventName)) { - // [syntax 3] - this._offByHandler(eventName); - } else if (isObject(eventName)) { - // [syntax 4, 5, 6] - this._offByObject(eventName, handler); - } -}; - -/** - * Fire custom event - * @param {string} eventName - name of custom event - */ -CustomEvents.prototype.fire = function(eventName) { // eslint-disable-line - this.invoke.apply(this, arguments); -}; - -/** - * Fire a event and returns the result of operation 'boolean AND' with all - * listener's results. - * - * So, It is different from {@link CustomEvents#fire}. - * - * In service code, use this as a before event in component level usually - * for notifying that the event is cancelable. - * @param {string} eventName - Custom event name - * @param {...*} data - Data for event - * @returns {boolean} The result of operation 'boolean AND' - * @example - * var map = new Map(); - * map.on({ - * 'beforeZoom': function() { - * // It should cancel the 'zoom' event by some conditions. - * if (that.disabled && this.getState()) { - * return false; - * } - * return true; - * } - * }); - * - * if (this.invoke('beforeZoom')) { // check the result of 'beforeZoom' - * // if true, - * // doSomething - * } - */ -CustomEvents.prototype.invoke = function(eventName) { - var events, args, index, item; - - if (!this.hasListener(eventName)) { - return true; - } - - events = this._safeEvent(eventName); - args = Array.prototype.slice.call(arguments, 1); - index = 0; - - while (events[index]) { - item = events[index]; - - if (item.handler.apply(item.context, args) === false) { - return false; - } - - index += 1; - } - - return true; -}; - -/** - * Return whether at least one of the handlers is registered in the given - * event name. - * @param {string} eventName - Custom event name - * @returns {boolean} Is there at least one handler in event name? - */ -CustomEvents.prototype.hasListener = function(eventName) { - return this.getListenerLength(eventName) > 0; -}; - -/** - * Return a count of events registered. - * @param {string} eventName - Custom event name - * @returns {number} number of event - */ -CustomEvents.prototype.getListenerLength = function(eventName) { - var events = this._safeEvent(eventName); - - return events.length; -}; - -module.exports = CustomEvents; - - -/***/ }), -/* 9 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * @fileoverview Execute the provided callback once for each property of object(or element of array) which actually exist. - * @author NHN FE Development Lab - */ - - - -var isArray = __webpack_require__(6); -var forEachArray = __webpack_require__(2); -var forEachOwnProperties = __webpack_require__(23); - -/** - * @module collection - */ - -/** - * Execute the provided callback once for each property of object(or element of array) which actually exist. - * If the object is Array-like object(ex-arguments object), It needs to transform to Array.(see 'ex2' of example). - * If the callback function returns false, the loop will be stopped. - * Callback function(iteratee) is invoked with three arguments: - * 1) The value of the property(or The value of the element) - * 2) The name of the property(or The index of the element) - * 3) The object being traversed - * @param {Object} obj The object that will be traversed - * @param {function} iteratee Callback function - * @param {Object} [context] Context(this) of callback function - * @memberof module:collection - * @example - * var forEach = require('tui-code-snippet/collection/forEach'); // node, commonjs - * - * var sum = 0; - * - * forEach([1,2,3], function(value){ - * sum += value; - * }); - * alert(sum); // 6 - * - * // In case of Array-like object - * var array = Array.prototype.slice.call(arrayLike); // change to array - * forEach(array, function(value){ - * sum += value; - * }); - */ -function forEach(obj, iteratee, context) { - if (isArray(obj)) { - forEachArray(obj, iteratee, context); - } else { - forEachOwnProperties(obj, iteratee, context); - } -} - -module.exports = forEach; - - -/***/ }), -/* 10 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * @fileoverview Default locale texts - * @author NHN. FE Development Lab - */ - - - -module.exports = { - en: { - titles: { - DD: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'], - D: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], - MMM: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], - MMMM: [ - 'January', - 'February', - 'March', - 'April', - 'May', - 'June', - 'July', - 'August', - 'September', - 'October', - 'November', - 'December' - ] - }, - titleFormat: 'MMMM yyyy', - todayFormat: 'To\\d\\ay: DD, MMMM d, yyyy', - time: 'Time', - date: 'Date' - }, - ko: { - titles: { - DD: ['일요일', '월요일', '화요일', '수요일', '목요일', '금요일', '토요일'], - D: ['일', '월', '화', '수', '목', '금', '토'], - MMM: ['1월', '2월', '3월', '4월', '5월', '6월', '7월', '8월', '9월', '10월', '11월', '12월'], - MMMM: ['1월', '2월', '3월', '4월', '5월', '6월', '7월', '8월', '9월', '10월', '11월', '12월'] - }, - titleFormat: 'yyyy.MM', - todayFormat: '오늘: yyyy.MM.dd (D)', - date: '날짜', - time: '시간' - } -}; - - -/***/ }), -/* 11 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * @fileoverview Convert text by binding expressions with context. - * @author NHN FE Development Lab - */ - - - -var inArray = __webpack_require__(3); -var forEach = __webpack_require__(9); -var isArray = __webpack_require__(6); -var isString = __webpack_require__(13); -var extend = __webpack_require__(7); - -// IE8 does not support capture groups. -var EXPRESSION_REGEXP = /{{\s?|\s?}}/g; -var BRACKET_NOTATION_REGEXP = /^[a-zA-Z0-9_@]+\[[a-zA-Z0-9_@"']+\]$/; -var BRACKET_REGEXP = /\[\s?|\s?\]/; -var DOT_NOTATION_REGEXP = /^[a-zA-Z_]+\.[a-zA-Z_]+$/; -var DOT_REGEXP = /\./; -var STRING_NOTATION_REGEXP = /^["']\w+["']$/; -var STRING_REGEXP = /"|'/g; -var NUMBER_REGEXP = /^-?\d+\.?\d*$/; - -var EXPRESSION_INTERVAL = 2; - -var BLOCK_HELPERS = { - 'if': handleIf, - 'each': handleEach, - 'with': handleWith -}; - -var isValidSplit = 'a'.split(/a/).length === 3; - -/** - * Split by RegExp. (Polyfill for IE8) - * @param {string} text - text to be splitted\ - * @param {RegExp} regexp - regular expression - * @returns {Array.} - */ -var splitByRegExp = (function() { - if (isValidSplit) { - return function(text, regexp) { - return text.split(regexp); - }; - } - - return function(text, regexp) { - var result = []; - var prevIndex = 0; - var match, index; - - if (!regexp.global) { - regexp = new RegExp(regexp, 'g'); - } - - match = regexp.exec(text); - while (match !== null) { - index = match.index; - result.push(text.slice(prevIndex, index)); - - prevIndex = index + match[0].length; - match = regexp.exec(text); - } - result.push(text.slice(prevIndex)); - - return result; - }; -})(); - -/** - * Find value in the context by an expression. - * @param {string} exp - an expression - * @param {object} context - context - * @returns {*} - * @private - */ -// eslint-disable-next-line complexity -function getValueFromContext(exp, context) { - var splitedExps; - var value = context[exp]; - - if (exp === 'true') { - value = true; - } else if (exp === 'false') { - value = false; - } else if (STRING_NOTATION_REGEXP.test(exp)) { - value = exp.replace(STRING_REGEXP, ''); - } else if (BRACKET_NOTATION_REGEXP.test(exp)) { - splitedExps = exp.split(BRACKET_REGEXP); - value = getValueFromContext(splitedExps[0], context)[getValueFromContext(splitedExps[1], context)]; - } else if (DOT_NOTATION_REGEXP.test(exp)) { - splitedExps = exp.split(DOT_REGEXP); - value = getValueFromContext(splitedExps[0], context)[splitedExps[1]]; - } else if (NUMBER_REGEXP.test(exp)) { - value = parseFloat(exp); - } - - return value; -} - -/** - * Extract elseif and else expressions. - * @param {Array.} ifExps - args of if expression - * @param {Array.} sourcesInsideBlock - sources inside if block - * @returns {object} - exps: expressions of if, elseif, and else / sourcesInsideIf: sources inside if, elseif, and else block. - * @private - */ -function extractElseif(ifExps, sourcesInsideBlock) { - var exps = [ifExps]; - var sourcesInsideIf = []; - var otherIfCount = 0; - var start = 0; - - // eslint-disable-next-line complexity - forEach(sourcesInsideBlock, function(source, index) { - if (source.indexOf('if') === 0) { - otherIfCount += 1; - } else if (source === '/if') { - otherIfCount -= 1; - } else if (!otherIfCount && (source.indexOf('elseif') === 0 || source === 'else')) { - exps.push(source === 'else' ? ['true'] : source.split(' ').slice(1)); - sourcesInsideIf.push(sourcesInsideBlock.slice(start, index)); - start = index + 1; - } - }); - - sourcesInsideIf.push(sourcesInsideBlock.slice(start)); - - return { - exps: exps, - sourcesInsideIf: sourcesInsideIf - }; -} - -/** - * Helper function for "if". - * @param {Array.} exps - array of expressions split by spaces - * @param {Array.} sourcesInsideBlock - array of sources inside the if block - * @param {object} context - context - * @returns {string} - * @private - */ -function handleIf(exps, sourcesInsideBlock, context) { - var analyzed = extractElseif(exps, sourcesInsideBlock); - var result = false; - var compiledSource = ''; - - forEach(analyzed.exps, function(exp, index) { - result = handleExpression(exp, context); - if (result) { - compiledSource = compile(analyzed.sourcesInsideIf[index], context); - } - - return !result; - }); - - return compiledSource; -} - -/** - * Helper function for "each". - * @param {Array.} exps - array of expressions split by spaces - * @param {Array.} sourcesInsideBlock - array of sources inside the each block - * @param {object} context - context - * @returns {string} - * @private - */ -function handleEach(exps, sourcesInsideBlock, context) { - var collection = handleExpression(exps, context); - var additionalKey = isArray(collection) ? '@index' : '@key'; - var additionalContext = {}; - var result = ''; - - forEach(collection, function(item, key) { - additionalContext[additionalKey] = key; - additionalContext['@this'] = item; - extend(context, additionalContext); - - result += compile(sourcesInsideBlock.slice(), context); - }); - - return result; -} - -/** - * Helper function for "with ... as" - * @param {Array.} exps - array of expressions split by spaces - * @param {Array.} sourcesInsideBlock - array of sources inside the with block - * @param {object} context - context - * @returns {string} - * @private - */ -function handleWith(exps, sourcesInsideBlock, context) { - var asIndex = inArray('as', exps); - var alias = exps[asIndex + 1]; - var result = handleExpression(exps.slice(0, asIndex), context); - - var additionalContext = {}; - additionalContext[alias] = result; - - return compile(sourcesInsideBlock, extend(context, additionalContext)) || ''; -} - -/** - * Extract sources inside block in place. - * @param {Array.} sources - array of sources - * @param {number} start - index of start block - * @param {number} end - index of end block - * @returns {Array.} - * @private - */ -function extractSourcesInsideBlock(sources, start, end) { - var sourcesInsideBlock = sources.splice(start + 1, end - start); - sourcesInsideBlock.pop(); - - return sourcesInsideBlock; -} - -/** - * Handle block helper function - * @param {string} helperKeyword - helper keyword (ex. if, each, with) - * @param {Array.} sourcesToEnd - array of sources after the starting block - * @param {object} context - context - * @returns {Array.} - * @private - */ -function handleBlockHelper(helperKeyword, sourcesToEnd, context) { - var executeBlockHelper = BLOCK_HELPERS[helperKeyword]; - var helperCount = 1; - var startBlockIndex = 0; - var endBlockIndex; - var index = startBlockIndex + EXPRESSION_INTERVAL; - var expression = sourcesToEnd[index]; - - while (helperCount && isString(expression)) { - if (expression.indexOf(helperKeyword) === 0) { - helperCount += 1; - } else if (expression.indexOf('/' + helperKeyword) === 0) { - helperCount -= 1; - endBlockIndex = index; - } - - index += EXPRESSION_INTERVAL; - expression = sourcesToEnd[index]; - } - - if (helperCount) { - throw Error(helperKeyword + ' needs {{/' + helperKeyword + '}} expression.'); - } - - sourcesToEnd[startBlockIndex] = executeBlockHelper( - sourcesToEnd[startBlockIndex].split(' ').slice(1), - extractSourcesInsideBlock(sourcesToEnd, startBlockIndex, endBlockIndex), - context - ); - - return sourcesToEnd; -} - -/** - * Helper function for "custom helper". - * If helper is not a function, return helper itself. - * @param {Array.} exps - array of expressions split by spaces (first element: helper) - * @param {object} context - context - * @returns {string} - * @private - */ -function handleExpression(exps, context) { - var result = getValueFromContext(exps[0], context); - - if (result instanceof Function) { - return executeFunction(result, exps.slice(1), context); - } - - return result; -} - -/** - * Execute a helper function. - * @param {Function} helper - helper function - * @param {Array.} argExps - expressions of arguments - * @param {object} context - context - * @returns {string} - result of executing the function with arguments - * @private - */ -function executeFunction(helper, argExps, context) { - var args = []; - forEach(argExps, function(exp) { - args.push(getValueFromContext(exp, context)); - }); - - return helper.apply(null, args); -} - -/** - * Get a result of compiling an expression with the context. - * @param {Array.} sources - array of sources split by regexp of expression. - * @param {object} context - context - * @returns {Array.} - array of sources that bind with its context - * @private - */ -function compile(sources, context) { - var index = 1; - var expression = sources[index]; - var exps, firstExp, result; - - while (isString(expression)) { - exps = expression.split(' '); - firstExp = exps[0]; - - if (BLOCK_HELPERS[firstExp]) { - result = handleBlockHelper(firstExp, sources.splice(index, sources.length - index), context); - sources = sources.concat(result); - } else { - sources[index] = handleExpression(exps, context); - } - - index += EXPRESSION_INTERVAL; - expression = sources[index]; - } - - return sources.join(''); -} - -/** - * Convert text by binding expressions with context. - *
    - * If expression exists in the context, it will be replaced. - * ex) '{{title}}' with context {title: 'Hello!'} is converted to 'Hello!'. - * An array or object can be accessed using bracket and dot notation. - * ex) '{{odds\[2\]}}' with context {odds: \[1, 3, 5\]} is converted to '5'. - * ex) '{{evens\[first\]}}' with context {evens: \[2, 4\], first: 0} is converted to '2'. - * ex) '{{project\["name"\]}}' and '{{project.name}}' with context {project: {name: 'CodeSnippet'}} is converted to 'CodeSnippet'. - *
    - * If replaced expression is a function, next expressions will be arguments of the function. - * ex) '{{add 1 2}}' with context {add: function(a, b) {return a + b;}} is converted to '3'. - *
    - * It has 3 predefined block helpers '{{helper ...}} ... {{/helper}}': 'if', 'each', 'with ... as ...'. - * 1) 'if' evaluates conditional statements. It can use with 'elseif' and 'else'. - * 2) 'each' iterates an array or object. It provides '@index'(array), '@key'(object), and '@this'(current element). - * 3) 'with ... as ...' provides an alias. - * @param {string} text - text with expressions - * @param {object} context - context - * @returns {string} - text that bind with its context - * @memberof module:domUtil - * @example - * var template = require('tui-code-snippet/domUtil/template'); - * - * var source = - * '

    ' - * + '{{if isValidNumber title}}' - * + '{{title}}th' - * + '{{elseif isValidDate title}}' - * + 'Date: {{title}}' - * + '{{/if}}' - * + '

    ' - * + '{{each list}}' - * + '{{with addOne @index as idx}}' - * + '

    {{idx}}: {{@this}}

    ' - * + '{{/with}}' - * + '{{/each}}'; - * - * var context = { - * isValidDate: function(text) { - * return /^\d{4}-(0|1)\d-(0|1|2|3)\d$/.test(text); - * }, - * isValidNumber: function(text) { - * return /^\d+$/.test(text); - * } - * title: '2019-11-25', - * list: ['Clean the room', 'Wash the dishes'], - * addOne: function(num) { - * return num + 1; - * } - * }; - * - * var result = template(source, context); - * console.log(result); //

    Date: 2019-11-25

    1: Clean the room

    2: Wash the dishes

    - */ -function template(text, context) { - return compile(splitByRegExp(text, EXPRESSION_REGEXP), context); -} - -module.exports = template; - - -/***/ }), -/* 12 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * @fileoverview Check whether the given variable is undefined or not. - * @author NHN FE Development Lab - */ - - - -/** - * Check whether the given variable is undefined or not. - * If the given variable is undefined, returns true. - * @param {*} obj - Target for checking - * @returns {boolean} Is undefined? - * @memberof module:type - */ -function isUndefined(obj) { - return obj === undefined; // eslint-disable-line no-undefined -} - -module.exports = isUndefined; - - -/***/ }), -/* 13 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * @fileoverview Check whether the given variable is a string or not. - * @author NHN FE Development Lab - */ - - - -/** - * Check whether the given variable is a string or not. - * If the given variable is a string, return true. - * @param {*} obj - Target for checking - * @returns {boolean} Is string? - * @memberof module:type - */ -function isString(obj) { - return typeof obj === 'string' || obj instanceof String; -} - -module.exports = isString; - - -/***/ }), -/* 14 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * @fileoverview Remove element from parent node. - * @author NHN FE Development Lab - */ - - - -/** - * Remove element from parent node. - * @param {HTMLElement} element - element to remove. - * @memberof module:domUtil - */ -function removeElement(element) { - if (element && element.parentNode) { - element.parentNode.removeChild(element); - } -} - -module.exports = removeElement; - - -/***/ }), -/* 15 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * @fileoverview Check whether the given variable is a number or not. - * @author NHN FE Development Lab - */ - - - -/** - * Check whether the given variable is a number or not. - * If the given variable is a number, return true. - * @param {*} obj - Target for checking - * @returns {boolean} Is number? - * @memberof module:type - */ -function isNumber(obj) { - return typeof obj === 'number' || obj instanceof Number; -} - -module.exports = isNumber; - - -/***/ }), -/* 16 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * @fileoverview Add css class to element - * @author NHN FE Development Lab - */ - - - -var forEach = __webpack_require__(9); -var inArray = __webpack_require__(3); -var getClass = __webpack_require__(17); -var setClassName = __webpack_require__(24); - -/** - * domUtil module - * @module domUtil - */ - -/** - * Add css class to element - * @param {(HTMLElement|SVGElement)} element - target element - * @param {...string} cssClass - css classes to add - * @memberof module:domUtil - */ -function addClass(element) { - var cssClass = Array.prototype.slice.call(arguments, 1); - var classList = element.classList; - var newClass = []; - var origin; - - if (classList) { - forEach(cssClass, function(name) { - element.classList.add(name); - }); - - return; - } - - origin = getClass(element); - - if (origin) { - cssClass = [].concat(origin.split(/\s+/), cssClass); - } - - forEach(cssClass, function(cls) { - if (inArray(cls, newClass) < 0) { - newClass.push(cls); - } - }); - - setClassName(element, newClass); -} - -module.exports = addClass; - - -/***/ }), -/* 17 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * @fileoverview Get HTML element's design classes. - * @author NHN FE Development Lab - */ - - - -var isUndefined = __webpack_require__(12); - -/** - * Get HTML element's design classes. - * @param {(HTMLElement|SVGElement)} element target element - * @returns {string} element css class name - * @memberof module:domUtil - */ -function getClass(element) { - if (!element || !element.className) { - return ''; - } - - if (isUndefined(element.className.baseVal)) { - return element.className; - } - - return element.className.baseVal; -} - -module.exports = getClass; - - -/***/ }), -/* 18 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * @fileoverview Remove css class from element - * @author NHN FE Development Lab - */ - - - -var forEachArray = __webpack_require__(2); -var inArray = __webpack_require__(3); -var getClass = __webpack_require__(17); -var setClassName = __webpack_require__(24); - -/** - * Remove css class from element - * @param {(HTMLElement|SVGElement)} element - target element - * @param {...string} cssClass - css classes to remove - * @memberof module:domUtil - */ -function removeClass(element) { - var cssClass = Array.prototype.slice.call(arguments, 1); - var classList = element.classList; - var origin, newClass; - - if (classList) { - forEachArray(cssClass, function(name) { - classList.remove(name); - }); - - return; - } - - origin = getClass(element).split(/\s+/); - newClass = []; - forEachArray(origin, function(name) { - if (inArray(name, cssClass) < 0) { - newClass.push(name); - } - }); - - setClassName(element, newClass); -} - -module.exports = removeClass; - - -/***/ }), -/* 19 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * @fileoverview Set mouse-touch event - * @author NHN. FE Development Lab - */ - - - -var on = __webpack_require__(31); -var off = __webpack_require__(33); - -var mouseTouchEvent = { - /** - * Detect mobile browser - * @type {boolean} Whether using Mobile browser - * @private - */ - _isMobile: (function() { - return /Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile|WPDesktop/i.test( - navigator.userAgent - ); - })(), - - /** - * Return a matched event type by a mouse event type - * @param {string} type A mouse event type - mousedown, click - * @returns {string} - * @private - */ - _getEventType: function(type) { - if (this._isMobile) { - if (type === 'mousedown') { - type = 'touchstart'; - } else if (type === 'click') { - type = 'touchend'; - } - } - - return type; - }, - - /** - * Bind touch or mouse events - * @param {HTMLElement} element An element to bind - * @param {string} type A mouse event type - mousedown, click - * @param {Function} handler A handler function - * @param {object} [context] A context for handler. - */ - on: function(element, type, handler, context) { - on(element, this._getEventType(type), handler, context); - }, - - /** - * Unbind touch or mouse events - * @param {HTMLElement} element - Target element - * @param {string} type A mouse event type - mousedown, click - * @param {Function} handler - Handler - */ - off: function(element, type, handler) { - off(element, this._getEventType(type), handler); - } -}; - -module.exports = mouseTouchEvent; - - -/***/ }), -/* 20 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * @fileoverview Layer base - * @author NHN. FE Development Lab - */ - - - -var defineClass = __webpack_require__(0); -var removeElement = __webpack_require__(14); - -var localeText = __webpack_require__(10); -var DEFAULT_LANGUAGE_TYPE = __webpack_require__(1).DEFAULT_LANGUAGE_TYPE; - -/** - * @abstract - * @class - * @ignore - * @param {string} language - Initial language - * Layer base - */ -var LayerBase = defineClass( - /** @lends LayerBase.prototype */ { - init: function(language) { - language = language || DEFAULT_LANGUAGE_TYPE; - - /** - * Layer element - * @type {HTMLElement} - * @private - */ - this._element = null; - - /** - * Language type - * @type {string} - * @private - */ - this._localeText = localeText[language]; - - /** - * Layer type - * @type {string} - * @private - */ - this._type = 'base'; - }, - - /** - * Make context - * @abstract - * @throws {Error} - * @returns {object} - * @private - */ - _makeContext: function() { - throwOverrideError(this.getType(), '_makeContext'); - }, - - /** - * Render the layer element - * @abstract - * @throws {Error} - */ - render: function() { - throwOverrideError(this.getType(), 'render'); - }, - - /** - * Returns date elements - * @abstract - * @throws {Error} - * @returns {HTMLElement[]} - */ - getDateElements: function() { - throwOverrideError(this.getType(), 'getDateElements'); - }, - - /** - * Returns layer type - * @returns {string} - */ - getType: function() { - return this._type; - }, - - /** - * Set language - * @param {string} language - Language name - */ - changeLanguage: function(language) { - this._localeText = localeText[language]; - }, - - /** - * Remove elements - */ - remove: function() { - if (this._element) { - removeElement(this._element); - } - this._element = null; - } - } -); - -/** - * Throw - method override error - * @ignore - * @param {string} layerType - Layer type - * @param {string} methodName - Method name - * @throws {Error} - */ -function throwOverrideError(layerType, methodName) { - throw new Error(layerType + ' layer does not have the "' + methodName + '" method.'); -} - -module.exports = LayerBase; - - -/***/ }), -/* 21 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * @fileoverview DatePicker component - * @author NHN. FE dev Lab - */ - - - -var inArray = __webpack_require__(3); -var forEachArray = __webpack_require__(2); -var defineClass = __webpack_require__(0); -var CustomEvents = __webpack_require__(8); -var addClass = __webpack_require__(16); -var closest = __webpack_require__(25); -var getData = __webpack_require__(26); -var hasClass = __webpack_require__(27); -var removeClass = __webpack_require__(18); -var removeElement = __webpack_require__(14); -var extend = __webpack_require__(7); -var isArray = __webpack_require__(6); -var isDate = __webpack_require__(28); -var isNumber = __webpack_require__(15); -var isObject = __webpack_require__(22); - -var TimePicker = __webpack_require__(43); - -var Calendar = __webpack_require__(29); -var RangeModel = __webpack_require__(56); -var constants = __webpack_require__(1); -var localeTexts = __webpack_require__(10); -var dateUtil = __webpack_require__(5); -var util = __webpack_require__(4); -var mouseTouchEvent = __webpack_require__(19); -var tmpl = __webpack_require__(58); -var DatePickerInput = __webpack_require__(59); - -var DEFAULT_WEEK_START_DAY = constants.DEFAULT_WEEK_START_DAY; -var DEFAULT_LANGUAGE_TYPE = constants.DEFAULT_LANGUAGE_TYPE; -var TYPE_DATE = constants.TYPE_DATE; -var TYPE_MONTH = constants.TYPE_MONTH; -var TYPE_YEAR = constants.TYPE_YEAR; -var CLASS_NAME_NEXT_YEAR_BTN = constants.CLASS_NAME_NEXT_YEAR_BTN; -var CLASS_NAME_NEXT_MONTH_BTN = constants.CLASS_NAME_NEXT_MONTH_BTN; -var CLASS_NAME_PREV_YEAR_BTN = constants.CLASS_NAME_PREV_YEAR_BTN; -var CLASS_NAME_PREV_MONTH_BTN = constants.CLASS_NAME_PREV_MONTH_BTN; -var CLASS_NAME_SELECTED = constants.CLASS_NAME_SELECTED; -var CLASS_NAME_TITLE_TODAY = constants.CLASS_NAME_TITLE_TODAY; - -var CLASS_NAME_SELECTABLE = 'tui-is-selectable'; -var CLASS_NAME_BLOCKED = 'tui-is-blocked'; -var CLASS_NAME_CHECKED = 'tui-is-checked'; -var CLASS_NAME_SELECTOR_BUTTON = 'tui-datepicker-selector-button'; -var CLASS_NAME_TODAY = 'tui-calendar-today'; -var CLASS_NAME_HIDDEN = 'tui-hidden'; - -var SELECTOR_BODY = '.tui-datepicker-body'; -var SELECTOR_DATE_ICO = '.tui-ico-date'; -var SELECTOR_CALENDAR_TITLE = '.tui-calendar-title'; -var SELECTOR_CALENDAR_CONTAINER = '.tui-calendar-container'; -var SELECTOR_TIMEPICKER_CONTAINER = '.tui-timepicker-container'; - -/** - * Merge default option - * @ignore - * @param {object} option - DatePicker option - * @returns {object} - */ -var mergeDefaultOption = function(option) { - option = extend( - { - language: DEFAULT_LANGUAGE_TYPE, - calendar: {}, - input: { - element: null, - format: null - }, - timePicker: null, - date: null, - showAlways: false, - type: TYPE_DATE, - selectableRanges: null, - openers: [], - autoClose: true, - usageStatistics: true, - weekStartDay: DEFAULT_WEEK_START_DAY - }, - option - ); - - option.selectableRanges = option.selectableRanges || [[constants.MIN_DATE, constants.MAX_DATE]]; - - if (!isObject(option.calendar)) { - throw new Error('Calendar option must be an object'); - } - if (!isObject(option.input)) { - throw new Error('Input option must be an object'); - } - if (!isArray(option.selectableRanges)) { - throw new Error('Selectable-ranges must be a 2d-array'); - } - - option.localeText = localeTexts[option.language]; - - // override calendar option - option.calendar.language = option.language; - option.calendar.type = option.type; - - // @TODO: after v5.0.0, remove option.timepicker - option.timePicker = option.timePicker || option.timepicker; - - return option; -}; - -/** - * @class - * @description - * Create a date picker. - * @see {@link /tutorial-example01-basic DatePicker example} - * @param {HTMLElement|string} container - Container element or selector of DatePicker - * @param {Object} [options] - Options - * @param {Date|number} [options.date = null] - Initial date. Set by a Date instance or a number(timestamp). (default: no initial date) - * @param {('date'|'month'|'year')} [options.type = 'date'] - DatePicker type. Determine whether to choose a date, month, or year. - * @param {string} [options.language='en'] - Language code. English('en') and Korean('ko') are provided as default. To set to the other languages, use {@link DatePicker#localeTexts DatePicker.localeTexts}. - * @param {object|boolean} [options.timePicker] - [TimePicker](https://nhn.github.io/tui.time-picker/latest) options. Refer to the [TimePicker instance's options](https://nhn.github.io/tui.time-picker/latest/TimePicker). To create the TimePicker without customization, set to true. - * @param {object} [options.calendar] - {@link Calendar} options. Refer to the {@link Calendar Calendar instance's options}. - * @param {object} [options.input] - Input option - * @param {HTMLElement|string} [options.input.element] - Input element or selector - * @param {string} [options.input.format = 'yyyy-mm-dd'] - Format of the Date string - * @param {Array.>} [options.selectableRanges = 1900/1/1 ~ 2999/12/31] - * - Ranges of selectable date. Set by Date instances or numbers(timestamp). - * @param {Array} [options.openers = []] - List of the openers to open the DatePicker (example - icon, button, etc.) - * @param {boolean} [options.showAlways = false] - Show the DatePicker always - * @param {boolean} [options.autoClose = true] - Close the DatePicker after clicking the date - * @param {boolean} [options.usageStatistics = true] - Send a hostname to Google Analytics (default: true) - * @param {string} [options.weekStartDay = 'Sun'] - Start of the week. 'Sun', 'Mon', ..., 'Sat'(default: 'Sun'(start on Sunday)) - * @example - * // ES6 - * import DatePicker from 'tui-date-picker' - * - * // CommonJS - * const DatePicker = require('tui-date-picker'); - * - * // Browser - * const DatePicker = tui.DatePicker; - * - * const range1 = [new Date(2015, 2, 1), new Date(2015, 3, 1)]; - * const range2 = [1465570800000, 1481266182155]; // timestamps - * - * const picker1 = new DatePicker('#datepicker-container1', { - * showAlways: true - * }); - * - * const picker2 = new DatePicker('#datepicker-container2', { - * showAlways: true, - * timePicker: true - * }); - * - * const picker3 = new DatePicker('#datepicker-container3', { - * language: 'ko', - * calendar: { - * showToday: true - * }, - * timePicker: { - * showMeridiem: true, - * defaultHour: 13, - * defaultMinute: 24 - * }, - * input: { - * element: '#datepicker-input', - * format: 'yyyy년 MM월 dd일 hh:mm A' - * } - * type: 'date', - * date: new Date(2015, 0, 1) - * selectableRanges: [range1, range2], - * openers: ['#opener'], - * weekStartDay: 'Mon', - * }); - */ -var DatePicker = defineClass( - /** @lends DatePicker.prototype */ { - static: { - /** - * Locale text data. English('en') and Korean('ko') are provided as default. - * @type {object} - * @memberof DatePicker - * @static - * @example - * DatePicker.localeTexts['customKey'] = { - * titles: { - * // days - * DD: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'], - * // daysShort - * D: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], - * // months - * MMMM: [ - * 'January', 'February', 'March', 'April', 'May', 'June', - * 'July', 'August', 'September', 'October', 'November', 'December' - * ], - * // monthsShort - * MMM: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'] - * }, - * titleFormat: 'MMM yyyy', - * todayFormat: 'D, MMMM dd, yyyy', - * date: 'Date', - * time: 'Time' - * }; - * - * const datepicker = new DatePicker('#datepicker-container', { - * language: 'customKey' - * }); - */ - localeTexts: localeTexts - }, - init: function(container, options) { - options = mergeDefaultOption(options); - - /** - * Language type - * @type {string} - * @private - */ - this._language = options.language; - - /** - * DatePicker container - * @type {HTMLElement} - * @private - */ - this._container = util.getElement(container); - this._container.innerHTML = tmpl( - extend(options, { - isTab: options.timePicker && options.timePicker.layoutType === 'tab' - }) - ); - - /** - * DatePicker element - * @type {HTMLElement} - * @private - */ - this._element = this._container.firstChild; - - /** - * Calendar instance - * @type {Calendar} - * @private - */ - this._calendar = new Calendar( - this._element.querySelector(SELECTOR_CALENDAR_CONTAINER), - extend(options.calendar, { - usageStatistics: options.usageStatistics, - weekStartDay: options.weekStartDay - }) - ); - - /** - * TimePicker instance - * @type {TimePicker} - * @private - */ - this._timePicker = null; - - /** - * DatePicker input - * @type {DatePickerInput} - * @private - */ - this._datepickerInput = null; - - /** - * Object having date values - * @type {Date} - * @private - */ - this._date = null; - - /** - * Selectable date-ranges model - * @type {RangeModel} - * @private - */ - this._rangeModel = null; - - /** - * openers - opener list - * @type {Array} - * @private - */ - this._openers = []; - - /** - * State of picker enable - * @type {boolean} - * @private - */ - this._isEnabled = true; - - /** - * ID of instance - * @type {number} - * @private - */ - this._id = 'tui-datepicker-' + util.generateId(); - - /** - * DatePicker type - * @type {TYPE_DATE|TYPE_MONTH|TYPE_YEAR} - * @private - */ - this._type = options.type; - - /** - * Show always or not - * @type {boolean} - */ - this.showAlways = options.showAlways; - - /** - * Close after select a date - * @type {boolean} - */ - this.autoClose = options.autoClose; - - this._initializeDatePicker(options); - }, - - /** - * Initialize method - * @param {Object} option - user option - * @private - */ - _initializeDatePicker: function(option) { - this.setRanges(option.selectableRanges); - this._setEvents(); - this._initTimePicker(option.timePicker, option.usageStatistics); - this.setInput(option.input.element); - this.setDateFormat(option.input.format); - this.setDate(option.date); - - forEachArray(option.openers, this.addOpener, this); - if (!this.showAlways) { - this._hide(); - } - - if (this.getType() === TYPE_DATE) { - addClass(this._element.querySelector(SELECTOR_BODY), 'tui-datepicker-type-date'); - } - }, - - /** - * Set events on the date picker's element - * @param {object} option - Constructor option - * @private - */ - _setEvents: function() { - mouseTouchEvent.on(this._element, 'click', this._onClickHandler, this); - this._calendar.on('draw', this._onDrawCalendar, this); - }, - - /** - * Remove events on the date picker's element - * @private - */ - _removeEvents: function() { - mouseTouchEvent.off(this._element, 'click', this._onClickHandler, this); - this._calendar.off(); - }, - - /** - * Set events on the document - * @private - */ - _setDocumentEvents: function() { - mouseTouchEvent.on(document, 'mousedown', this._onMousedownDocument, this); - }, - - /** - * Remove events on the document - * @private - */ - _removeDocumentEvents: function() { - mouseTouchEvent.off(document, 'mousedown', this._onMousedownDocument); - }, - - /** - * Set events on the opener - * @param {HTMLElement} opener An opener to bind the events - * @private - */ - _setOpenerEvents: function(opener) { - mouseTouchEvent.on(opener, 'click', this.toggle, this); - }, - - /** - * Remove events on the opener - * @param {HTMLElement} opener An opener to unbind the events - * @private - */ - _removeOpenerEvents: function(opener) { - mouseTouchEvent.off(opener, 'click', this.toggle); - }, - - /** - * Set TimePicker instance - * @param {object|boolean} opTimePicker - TimePicker instance options - * @param {boolean} usageStatistics - GA tracking options - * @private - */ - _initTimePicker: function(opTimePicker, usageStatistics) { - var layoutType; - if (!opTimePicker) { - return; - } - - layoutType = opTimePicker.layoutType || ''; - - if (isObject(opTimePicker)) { - opTimePicker.usageStatistics = usageStatistics; - } else { - opTimePicker = { - usageStatistics: usageStatistics - }; - } - - this._timePicker = new TimePicker( - this._element.querySelector(SELECTOR_TIMEPICKER_CONTAINER), - opTimePicker - ); - - if (layoutType.toLowerCase() === 'tab') { - this._timePicker.hide(); - } - - this._timePicker.on( - 'change', - function(ev) { - var prevDate; - if (this._date) { - prevDate = new Date(this._date); - this.setDate(prevDate.setHours(ev.hour, ev.minute)); - } - }, - this - ); - }, - - /** - * Change picker's type by a selector button. - * @param {HTMLElement} target A target element - * @private - */ - _changePicker: function(target) { - var btnSelector = '.' + CLASS_NAME_SELECTOR_BUTTON; - var selectedBtn = closest(target, btnSelector); - var isDateElement = !!selectedBtn.querySelector(SELECTOR_DATE_ICO); - - if (isDateElement) { - this._calendar.show(); - this._timePicker.hide(); - } else { - this._calendar.hide(); - this._timePicker.show(); - } - removeClass(this._element.querySelector('.' + CLASS_NAME_CHECKED), CLASS_NAME_CHECKED); - addClass(selectedBtn, CLASS_NAME_CHECKED); - }, - - /** - * Returns whether the element is opener - * @param {string|HTMLElement} element - Element or selector - * @returns {boolean} - * @private - */ - _isOpener: function(element) { - var el = util.getElement(element); - - return inArray(el, this._openers) > -1; - }, - - /** - * add/remove today-class-name to date element - * @param {HTMLElement} el - date element - * @private - */ - _setTodayClassName: function(el) { - var timestamp, isToday; - - if (this.getCalendarType() !== TYPE_DATE) { - return; - } - - timestamp = Number(getData(el, 'timestamp')); - isToday = timestamp === new Date().setHours(0, 0, 0, 0); - - if (isToday) { - addClass(el, CLASS_NAME_TODAY); - } else { - removeClass(el, CLASS_NAME_TODAY); - } - }, - - /** - * add/remove selectable-class-name to date element - * @param {HTMLElement} el - date element - * @private - */ - _setSelectableClassName: function(el) { - var elDate = new Date(Number(getData(el, 'timestamp'))); - - if (this._isSelectableOnCalendar(elDate)) { - addClass(el, CLASS_NAME_SELECTABLE); - removeClass(el, CLASS_NAME_BLOCKED); - } else { - removeClass(el, CLASS_NAME_SELECTABLE); - addClass(el, CLASS_NAME_BLOCKED); - } - }, - - /** - * add/remove selected-class-name to date element - * @param {HTMLElement} el - date element - * @private - */ - _setSelectedClassName: function(el) { - var elDate = new Date(Number(getData(el, 'timestamp'))); - - if (this._isSelectedOnCalendar(elDate)) { - addClass(el, CLASS_NAME_SELECTED); - } else { - removeClass(el, CLASS_NAME_SELECTED); - } - }, - - /** - * Returns whether the date is selectable on calendar - * @param {Date} date - Date instance - * @returns {boolean} - * @private - */ - _isSelectableOnCalendar: function(date) { - var type = this.getCalendarType(); - var start = dateUtil.cloneWithStartOf(date, type).getTime(); - var end = dateUtil.cloneWithEndOf(date, type).getTime(); - - return this._rangeModel.hasOverlap(start, end); - }, - - /** - * Returns whether the date is selected on calendar - * @param {Date} date - Date instance - * @returns {boolean} - * @private - */ - _isSelectedOnCalendar: function(date) { - var curDate = this.getDate(); - var calendarType = this.getCalendarType(); - - return curDate && dateUtil.isSame(curDate, date, calendarType); - }, - - /** - * Show the date picker element - * @private - */ - _show: function() { - removeClass(this._element, CLASS_NAME_HIDDEN); - }, - - /** - * Hide the date picker element - * @private - */ - _hide: function() { - addClass(this._element, CLASS_NAME_HIDDEN); - }, - - /** - * Set value a date-string of current this instance to input element - * @private - */ - _syncToInput: function() { - if (!this._date) { - return; - } - - this._datepickerInput.setDate(this._date); - }, - - /** - * Set date from input value - * @param {boolean} [shouldRollback = false] - Should rollback from unselectable or error - * @private - */ - _syncFromInput: function(shouldRollback) { - var isFailed = false; - var date; - - try { - date = this._datepickerInput.getDate(); - - if (this.isSelectable(date)) { - if (this._timePicker) { - this._timePicker.setTime(date.getHours(), date.getMinutes()); - } - this.setDate(date); - } else { - isFailed = true; - } - } catch (err) { - this.fire('error', { - type: 'ParsingError', - message: err.message - }); - isFailed = true; - } finally { - if (isFailed) { - if (shouldRollback) { - this._syncToInput(); - } else { - this.setNull(); - } - } - } - }, - - /** - * Event handler for mousedown of document
    - * - When click the out of layer, close the layer - * @param {Event} ev - Event object - * @private - */ - _onMousedownDocument: function(ev) { - var target = util.getTarget(ev); - var selector = util.getSelector(target); - var isContain = selector ? this._element.querySelector(selector) : false; - var isInput = this._datepickerInput.is(target); - var isInOpener = inArray(target, this._openers) > -1; - var shouldClose = !(this.showAlways || isInput || isContain || isInOpener); - - if (shouldClose) { - this.close(); - } - }, - - /** - * Event handler for click of calendar - * @param {Event} ev An event object - * @private - */ - _onClickHandler: function(ev) { - var target = util.getTarget(ev); - - if (closest(target, '.' + CLASS_NAME_SELECTABLE)) { - ev.preventDefault(); - this._updateDate(target); - } else if (closest(target, '.' + CLASS_NAME_TITLE_TODAY)) { - ev.preventDefault(); - this._updateDateToToday(); - } else if (closest(target, SELECTOR_CALENDAR_TITLE)) { - this.drawUpperCalendar(this._date); - } else if (closest(target, '.' + CLASS_NAME_SELECTOR_BUTTON)) { - this._changePicker(target); - } - }, - - /** - * Update date to today - * @private - */ - _updateDateToToday: function() { - this.setDate(Date.now()); - this.close(); - }, - - /** - * Update date from event-target - * @param {HTMLElement} target An event target element - * @private - */ - _updateDate: function(target) { - var timestamp = Number(getData(target, 'timestamp')); - var newDate = new Date(timestamp); - var timePicker = this._timePicker; - var prevDate = this._date; - var calendarType = this.getCalendarType(); - var pickerType = this.getType(); - - if (calendarType !== pickerType) { - this.drawLowerCalendar(newDate); - } else { - if (timePicker) { - newDate.setHours(timePicker.getHour(), timePicker.getMinute()); - } else if (prevDate) { - newDate.setHours(prevDate.getHours(), prevDate.getMinutes()); - } - this.setDate(newDate); - - if (!this.showAlways && this.autoClose) { - this.close(); - } - } - }, - - /** - * Event handler for 'draw'-custom event of calendar - * @param {Object} eventData - custom event data - * @see {@link Calendar#draw} - * @private - */ - _onDrawCalendar: function(eventData) { - forEachArray( - eventData.dateElements, - function(el) { - this._setTodayClassName(el); - this._setSelectableClassName(el); - this._setSelectedClassName(el); - }, - this - ); - this._setDisplayHeadButtons(); - - /** - * Occur after the calendar is drawn. - * @event DatePicker#draw - * @see {@link https://nhn.github.io/tui.code-snippet/latest/CustomEvents#on datepicker.on()} to bind event handlers. - * @see {@link https://nhn.github.io/tui.code-snippet/latest/CustomEvents#off datepicker.off()} to unbind event handlers. - * @see Refer to {@link https://nhn.github.io/tui.code-snippet/latest/CustomEvents CustomEvents from tui-code-snippet} for more methods. DatePicker mixes in the methods from CustomEvents. - * @property {Date} date - Calendar date - * @property {('date'|'month'|'year')} type - Calendar type - * @property {HTMLElement[]} dateElements - elements for dates - * @example - * // bind the 'draw' event - * datepicker.on('draw', (event) => { - * console.log(`Draw the ${event.type} calendar and its date is ${event.date}.`); - * }); - * - * // unbind the 'draw' event - * datepicker.off('draw'); - */ - this.fire('draw', eventData); - }, - - /** - * Hide useless buttons (next, next-year, prev, prev-year) - * @see Don't save buttons reference. The buttons are rerendered every "calendar.draw". - * @private - */ - _setDisplayHeadButtons: function() { - var nextYearDate = this._calendar.getNextYearDate(); - var prevYearDate = this._calendar.getPrevYearDate(); - var maxTimestamp = this._rangeModel.getMaximumValue(); - var minTimestamp = this._rangeModel.getMinimumValue(); - var nextYearBtn = this._element.querySelector('.' + CLASS_NAME_NEXT_YEAR_BTN); - var prevYearBtn = this._element.querySelector('.' + CLASS_NAME_PREV_YEAR_BTN); - var nextMonthDate, prevMonthDate, nextMonBtn, prevMonBtn; - - if (this.getCalendarType() === TYPE_DATE) { - nextMonthDate = dateUtil.cloneWithStartOf(this._calendar.getNextDate(), TYPE_MONTH); - prevMonthDate = dateUtil.cloneWithEndOf(this._calendar.getPrevDate(), TYPE_MONTH); - - nextMonBtn = this._element.querySelector('.' + CLASS_NAME_NEXT_MONTH_BTN); - prevMonBtn = this._element.querySelector('.' + CLASS_NAME_PREV_MONTH_BTN); - - this._setDisplay(nextMonBtn, nextMonthDate.getTime() <= maxTimestamp); - this._setDisplay(prevMonBtn, prevMonthDate.getTime() >= minTimestamp); - - prevYearDate.setDate(1); - nextYearDate.setDate(1); - } else { - prevYearDate.setMonth(12, 0); - nextYearDate.setMonth(0, 1); - } - - this._setDisplay(nextYearBtn, nextYearDate.getTime() <= maxTimestamp); - this._setDisplay(prevYearBtn, prevYearDate.getTime() >= minTimestamp); - }, - - /** - * Set display show/hide by condition - * @param {HTMLElement} el - An Element - * @param {boolean} shouldShow - Condition - * @private - */ - _setDisplay: function(el, shouldShow) { - if (el) { - if (shouldShow) { - removeClass(el, CLASS_NAME_HIDDEN); - } else { - addClass(el, CLASS_NAME_HIDDEN); - } - } - }, - - /** - * Input change handler - * @private - * @throws {Error} - */ - _onChangeInput: function() { - this._syncFromInput(true); - }, - - /** - * Returns whether the date is changed - * @param {Date} date - Date - * @returns {boolean} - * @private - */ - _isChanged: function(date) { - var prevDate = this.getDate(); - - return !prevDate || date.getTime() !== prevDate.getTime(); - }, - - /** - * Refresh datepicker - * @private - */ - _refreshFromRanges: function() { - if (!this.isSelectable(this._date)) { - this.setNull(); - } else { - this._calendar.draw(); // view update - } - }, - - /** - * Return the current calendar's type. - * @returns {('date'|'month'|'year')} - */ - getCalendarType: function() { - return this._calendar.getType(); - }, - - /** - * Return the date picker's type. - * @returns {('date'|'month'|'year')} - */ - getType: function() { - return this._type; - }, - - /** - * Return whether the date is selectable. - * @param {Date} date - Date to check - * @returns {boolean} - */ - isSelectable: function(date) { - var type = this.getType(); - var start, end; - - if (!dateUtil.isValidDate(date)) { - return false; - } - start = dateUtil.cloneWithStartOf(date, type).getTime(); - end = dateUtil.cloneWithEndOf(date, type).getTime(); - - return this._rangeModel.hasOverlap(start, end); - }, - - /** - * Return whether the date is selected. - * @param {Date} date - Date to check - * @returns {boolean} - */ - isSelected: function(date) { - return dateUtil.isValidDate(date) && dateUtil.isSame(this._date, date, this.getType()); - }, - - /** - * Set selectable ranges. Previous ranges will be removed. - * @param {Array.>} ranges - Selectable ranges. Use Date instances or numbers(timestamp). - * @example - * datepicker.setRanges([ - * [new Date(2017, 0, 1), new Date(2018, 0, 2)], - * [new Date(2015, 2, 3), new Date(2016, 4, 2)] - * ]); - */ - setRanges: function(ranges) { - var result = []; - forEachArray(ranges, function(range) { - var start = new Date(range[0]).getTime(); - var end = new Date(range[1]).getTime(); - - result.push([start, end]); - }); - - this._rangeModel = new RangeModel(result); - this._refreshFromRanges(); - }, - - /** - * Set the calendar's type. - * @param {('date'|'month'|'year')} type - Calendar type - * @example - * datepicker.setType('month'); - */ - setType: function(type) { - this._type = type; - }, - - /** - * Add a selectable range. Use Date instances or numbers(timestamp). - * @param {Date|number} start - the start date - * @param {Date|number} end - the end date - * @example - * const start = new Date(2015, 1, 3); - * const end = new Date(2015, 2, 6); - * - * datepicker.addRange(start, end); - */ - addRange: function(start, end) { - start = new Date(start).getTime(); - end = new Date(end).getTime(); - - this._rangeModel.add(start, end); - this._refreshFromRanges(); - }, - - /** - * Remove a range. Use Date instances or numbers(timestamp). - * @param {Date|number} start - the start date - * @param {Date|number} end - the end date - * @param {null|'date'|'month'|'year'} type - Range type. If falsy, start and end values are considered as timestamp - * @example - * const start = new Date(2015, 1, 3); - * const end = new Date(2015, 2, 6); - * - * datepicker.removeRange(start, end); - */ - removeRange: function(start, end, type) { - start = new Date(start); - end = new Date(end); - - if (type) { - // @todo Consider time-range on timePicker - start = dateUtil.cloneWithStartOf(start, type); - end = dateUtil.cloneWithEndOf(end, type); - } - - this._rangeModel.exclude(start.getTime(), end.getTime()); - this._refreshFromRanges(); - }, - - /** - * Add an opener. - * @param {HTMLElement|string} opener - element or selector of opener - */ - addOpener: function(opener) { - opener = util.getElement(opener); - - if (!this._isOpener(opener)) { - this._openers.push(opener); - this._setOpenerEvents(opener); - } - }, - - /** - * Remove an opener. - * @param {HTMLElement|string} opener - element or selector of opener - */ - removeOpener: function(opener) { - var index; - - opener = util.getElement(opener); - index = inArray(opener, this._openers); - - if (index > -1) { - this._removeOpenerEvents(opener); - this._openers.splice(index, 1); - } - }, - - /** - * Remove all openers. - */ - removeAllOpeners: function() { - forEachArray( - this._openers, - function(opener) { - this._removeOpenerEvents(opener); - }, - this - ); - this._openers = []; - }, - - /** - * Open the date picker. - * @example - * datepicker.open(); - */ - open: function() { - if (this.isOpened() || !this._isEnabled) { - return; - } - - this._calendar.draw({ - date: this._date, - type: this._type - }); - this._show(); - - if (!this.showAlways) { - this._setDocumentEvents(); - } - - /** - * Occur after the date picker opens. - * @event DatePicker#open - * @see {@link https://nhn.github.io/tui.code-snippet/latest/CustomEvents#on datepicker.on()} to bind event handlers. - * @see {@link https://nhn.github.io/tui.code-snippet/latest/CustomEvents#off datepicker.off()} to unbind event handlers. - * @see Refer to {@link https://nhn.github.io/tui.code-snippet/latest/CustomEvents CustomEvents from tui-code-snippet} for more methods. DatePicker mixes in the methods from CustomEvents. - * @example - * // bind the 'open' event - * datepicker.on('open', () => { - * alert('open'); - * }); - * - * // unbind the 'open' event - * datepicker.off('open'); - */ - this.fire('open'); - }, - - /** - * Raise the calendar type. (date -> month -> year) - * @param {Date} [date] - Date to set - */ - drawUpperCalendar: function(date) { - var calendarType = this.getCalendarType(); - - if (calendarType === TYPE_DATE) { - this._calendar.draw({ - date: date, - type: TYPE_MONTH - }); - } else if (calendarType === TYPE_MONTH) { - this._calendar.draw({ - date: date, - type: TYPE_YEAR - }); - } - }, - - /** - * Lower the calendar type. (year -> month -> date) - * @param {Date} [date] - Date to set - */ - drawLowerCalendar: function(date) { - var calendarType = this.getCalendarType(); - var pickerType = this.getType(); - var isLast = calendarType === pickerType; - - if (isLast) { - return; - } - - if (calendarType === TYPE_MONTH) { - this._calendar.draw({ - date: date, - type: TYPE_DATE - }); - } else if (calendarType === TYPE_YEAR) { - this._calendar.draw({ - date: date, - type: TYPE_MONTH - }); - } - }, - - /** - * Close the date picker. - * @exmaple - * datepicker.close(); - */ - close: function() { - if (!this.isOpened()) { - return; - } - this._removeDocumentEvents(); - this._hide(); - - /** - * Occur after the date picker closes. - * @event DatePicker#close - * @see {@link https://nhn.github.io/tui.code-snippet/latest/CustomEvents#on datepicker.on()} to bind event handlers. - * @see {@link https://nhn.github.io/tui.code-snippet/latest/CustomEvents#off datepicker.off()} to unbind event handlers. - * @see Refer to {@link https://nhn.github.io/tui.code-snippet/latest/CustomEvents CustomEvents from tui-code-snippet} for more methods. DatePicker mixes in the methods from CustomEvents. - * @example - * // bind the 'close' event - * datepicker.on('close', () => { - * alert('close'); - * }); - * - * // unbind the 'close' event - * datepicker.off('close'); - */ - this.fire('close'); - }, - - /** - * Toggle the date picker. - * @example - * datepicker.toggle(); - */ - toggle: function() { - if (this.isOpened()) { - this.close(); - } else { - this.open(); - } - }, - - /** - * Return the selected date. - * @returns {?Date} - selected date - * @example - * // 2015-04-13 - * datepicker.getDate(); // new Date(2015, 3, 13) - */ - getDate: function() { - if (!this._date) { - return null; - } - - return new Date(this._date); - }, - - /** - * Select the date. - * @param {Date|number} date - Date instance or timestamp to set - * @example - * datepicker.setDate(new Date()); // Set today - */ - // eslint-disable-next-line complexity - setDate: function(date) { - var isValidInput, newDate, shouldUpdate; - - if (date === null) { - this.setNull(); - - return; - } - - isValidInput = isNumber(date) || isDate(date); - newDate = new Date(date); - shouldUpdate = isValidInput && this._isChanged(newDate) && this.isSelectable(newDate); - - if (shouldUpdate) { - newDate = new Date(date); - this._date = newDate; - this._calendar.draw({ date: newDate }); - if (this._timePicker) { - this._timePicker.setTime(newDate.getHours(), newDate.getMinutes()); - } - this._syncToInput(); - - /** - * Occur after the selected date is changed. - * @event DatePicker#change - * @see {@link https://nhn.github.io/tui.code-snippet/latest/CustomEvents#on datepicker.on()} to bind event handlers. - * @see {@link https://nhn.github.io/tui.code-snippet/latest/CustomEvents#off datepicker.off()} to unbind event handlers. - * @see Refer to {@link https://nhn.github.io/tui.code-snippet/latest/CustomEvents CustomEvents from tui-code-snippet} for more methods. DatePicker mixes in the methods from CustomEvents. - * @example - * // bind the 'change' event - * datepicker.on('change', () => { - * console.log(`Selected date: ${datepicker.getDate()}`); - * }); - * - * // unbind the 'change' event - * datepicker.off('change'); - */ - this.fire('change'); - } - }, - - /** - * Set no date to be selected. (Selected date: null) - */ - setNull: function() { - var calendarDate = this._calendar.getDate(); - var isChagned = this._date !== null; - - this._date = null; - - if (this._datepickerInput) { - this._datepickerInput.clearText(); - } - if (this._timePicker) { - this._timePicker.setTime(0, 0); - } - - // View update - if (!this.isSelectable(calendarDate)) { - this._calendar.draw({ - date: new Date(this._rangeModel.getMinimumValue()) - }); - } else { - this._calendar.draw(); - } - - if (isChagned) { - this.fire('change'); - } - }, - - /** - * Select the date by the date string format. - * @param {String} [format] - Date string format - * @example - * datepicker.setDateFormat('yyyy-MM-dd'); - * datepicker.setDateFormat('MM-dd, yyyy'); - * datepicker.setDateFormat('yy/M/d'); - * datepicker.setDateFormat('yy/MM/dd'); - */ - setDateFormat: function(format) { - this._datepickerInput.setFormat(format); - this._syncToInput(); - }, - - /** - * Return whether the datepicker opens or not - * @returns {boolean} - * @example - * datepicker.close(); - * datepicker.isOpened(); // false - * - * datepicker.open(); - * datepicker.isOpened(); // true - */ - isOpened: function() { - return !hasClass(this._element, CLASS_NAME_HIDDEN); - }, - - /** - * Return the time picker instance - * @returns {?TimePicker} - TimePicker instance - * @see {@link https://nhn.github.io/tui.time-picker/latest tui-time-picker} - * @example - * const timePicker = this.getTimePicker(); - */ - getTimePicker: function() { - return this._timePicker; - }, - - /** - * Return the calendar instance. - * @see {@link calendar Calendar} - * @returns {Calendar} - */ - getCalendar: function() { - return this._calendar; - }, - - /** - * Return the locale text object. - * @see {@link DatePicker#localeTexts DatePicker.localeTexts} - * @returns {object} - */ - getLocaleText: function() { - return localeTexts[this._language] || localeTexts[DEFAULT_LANGUAGE_TYPE]; - }, - - /** - * Set the input element - * @param {string|HTMLElement} element - Input element or selector - * @param {object} [options] - Input option - * @param {string} [options.format = prevInput.format] - Format of the Date string in the input - * @param {boolean} [options.syncFromInput = false] - Whether set the date from the input - */ - setInput: function(element, options) { - var prev = this._datepickerInput; - var localeText = this.getLocaleText(); - var prevFormat; - options = options || {}; - - if (prev) { - prevFormat = prev.getFormat(); - prev.destroy(); - } - - this._datepickerInput = new DatePickerInput(element, { - format: options.format || prevFormat, - id: this._id, - localeText: localeText - }); - - this._datepickerInput.on( - { - change: this._onChangeInput, - click: this.open - }, - this - ); - - if (options.syncFromInput) { - this._syncFromInput(); - } else { - this._syncToInput(); - } - }, - - /** - * Enable the date picker. - */ - enable: function() { - if (this._isEnabled) { - return; - } - this._isEnabled = true; - this._datepickerInput.enable(); - - forEachArray( - this._openers, - function(opener) { - opener.removeAttribute('disabled'); - this._setOpenerEvents(opener); - }, - this - ); - }, - - /** - * Disable the date picker. - */ - disable: function() { - if (!this._isEnabled) { - return; - } - - this._isEnabled = false; - this.close(); - this._datepickerInput.disable(); - - forEachArray( - this._openers, - function(opener) { - opener.setAttribute('disabled', true); - this._removeOpenerEvents(opener); - }, - this - ); - }, - - /** - * Return whether the date picker is disabled - * @returns {boolean} - */ - isDisabled: function() { - // @todo this._isEnabled --> this._isDisabled - return !this._isEnabled; - }, - - /** - * Apply a CSS class to the date picker. - * @param {string} className - Class name - */ - addCssClass: function(className) { - addClass(this._element, className); - }, - - /** - * Remove a CSS class from the date picker. - * @param {string} className - Class name - */ - removeCssClass: function(className) { - removeClass(this._element, className); - }, - - /** - * Return the date elements on the calendar. - * @returns {HTMLElement[]} - */ - getDateElements: function() { - return this._calendar.getDateElements(); - }, - - /** - * Return the first overlapped range from the point or range. - * @param {Date|number} startDate - Start date to find overlapped range - * @param {Date|number} endDate - End date to find overlapped range - * @returns {Array.} - \[startDate, endDate] - */ - findOverlappedRange: function(startDate, endDate) { - var startTimestamp = new Date(startDate).getTime(); - var endTimestamp = new Date(endDate).getTime(); - var overlappedRange = this._rangeModel.findOverlappedRange(startTimestamp, endTimestamp); - - return [new Date(overlappedRange[0]), new Date(overlappedRange[1])]; - }, - - /** - * Change language. - * @param {string} language - Language code. English('en') and Korean('ko') are provided as default. - * @see To set to the other languages, use {@link DatePicker#localeTexts DatePicker.localeTexts}. - */ - changeLanguage: function(language) { - this._language = language; - this._calendar.changeLanguage(this._language); - this._datepickerInput.changeLocaleTitles(this.getLocaleText().titles); - this.setDateFormat(this._datepickerInput.getFormat()); - - if (this._timePicker) { - this._timePicker.changeLanguage(this._language); - } - }, - - /** - * Destroy the date picker. - */ - destroy: function() { - this._removeDocumentEvents(); - this._calendar.destroy(); - if (this._timePicker) { - this._timePicker.destroy(); - } - if (this._datepickerInput) { - this._datepickerInput.destroy(); - } - this._removeEvents(); - removeElement(this._element); - this.removeAllOpeners(); - - this._calendar = this._timePicker = this._datepickerInput = this._container = this._element = this._date = this._rangeModel = this._openers = this._isEnabled = this._id = null; - } - } -); - -CustomEvents.mixin(DatePicker); -module.exports = DatePicker; - - -/***/ }), -/* 22 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * @fileoverview Check whether the given variable is an object or not. - * @author NHN FE Development Lab - */ - - - -/** - * Check whether the given variable is an object or not. - * If the given variable is an object, return true. - * @param {*} obj - Target for checking - * @returns {boolean} Is object? - * @memberof module:type - */ -function isObject(obj) { - return obj === Object(obj); -} - -module.exports = isObject; - - -/***/ }), -/* 23 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * @fileoverview Execute the provided callback once for each property of object which actually exist. - * @author NHN FE Development Lab - */ - - - -/** - * Execute the provided callback once for each property of object which actually exist. - * If the callback function returns false, the loop will be stopped. - * Callback function(iteratee) is invoked with three arguments: - * 1) The value of the property - * 2) The name of the property - * 3) The object being traversed - * @param {Object} obj The object that will be traversed - * @param {function} iteratee Callback function - * @param {Object} [context] Context(this) of callback function - * @memberof module:collection - * @example - * var forEachOwnProperties = require('tui-code-snippet/collection/forEachOwnProperties'); // node, commonjs - * - * var sum = 0; - * - * forEachOwnProperties({a:1,b:2,c:3}, function(value){ - * sum += value; - * }); - * alert(sum); // 6 - */ -function forEachOwnProperties(obj, iteratee, context) { - var key; - - context = context || null; - - for (key in obj) { - if (obj.hasOwnProperty(key)) { - if (iteratee.call(context, obj[key], key, obj) === false) { - break; - } - } - } -} - -module.exports = forEachOwnProperties; - - -/***/ }), -/* 24 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * @fileoverview Set className value - * @author NHN FE Development Lab - */ - - - -var isArray = __webpack_require__(6); -var isUndefined = __webpack_require__(12); - -/** - * Set className value - * @param {(HTMLElement|SVGElement)} element - target element - * @param {(string|string[])} cssClass - class names - * @private - */ -function setClassName(element, cssClass) { - cssClass = isArray(cssClass) ? cssClass.join(' ') : cssClass; - - cssClass = cssClass.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ''); - - if (isUndefined(element.className.baseVal)) { - element.className = cssClass; - - return; - } - - element.className.baseVal = cssClass; -} - -module.exports = setClassName; - - -/***/ }), -/* 25 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * @fileoverview Find parent element recursively - * @author NHN FE Development Lab - */ - - - -var matches = __webpack_require__(40); - -/** - * Find parent element recursively - * @param {HTMLElement} element - base element to start find - * @param {string} selector - selector string for find - * @returns {HTMLElement} - element finded or null - * @memberof module:domUtil - */ -function closest(element, selector) { - var parent = element.parentNode; - - if (matches(element, selector)) { - return element; - } - - while (parent && parent !== document) { - if (matches(parent, selector)) { - return parent; - } - - parent = parent.parentNode; - } - - return null; -} - -module.exports = closest; - - -/***/ }), -/* 26 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * @fileoverview Get data value from data-attribute - * @author NHN FE Development Lab - */ - - - -var convertToKebabCase = __webpack_require__(42); - -/** - * Get data value from data-attribute - * @param {HTMLElement} element - target element - * @param {string} key - key - * @returns {string} value - * @memberof module:domUtil - */ -function getData(element, key) { - if (element.dataset) { - return element.dataset[key]; - } - - return element.getAttribute('data-' + convertToKebabCase(key)); -} - -module.exports = getData; - - -/***/ }), -/* 27 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * @fileoverview Check element has specific css class - * @author NHN FE Development Lab - */ - - - -var inArray = __webpack_require__(3); -var getClass = __webpack_require__(17); - -/** - * Check element has specific css class - * @param {(HTMLElement|SVGElement)} element - target element - * @param {string} cssClass - css class - * @returns {boolean} - * @memberof module:domUtil - */ -function hasClass(element, cssClass) { - var origin; - - if (element.classList) { - return element.classList.contains(cssClass); - } - - origin = getClass(element).split(/\s+/); - - return inArray(cssClass, origin) > -1; -} - -module.exports = hasClass; - - -/***/ }), -/* 28 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * @fileoverview Check whether the given variable is an instance of Date or not. - * @author NHN FE Development Lab - */ - - - -/** - * Check whether the given variable is an instance of Date or not. - * If the given variables is an instance of Date, return true. - * @param {*} obj - Target for checking - * @returns {boolean} Is an instance of Date? - * @memberof module:type - */ -function isDate(obj) { - return obj instanceof Date; -} - -module.exports = isDate; - - -/***/ }), -/* 29 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * @fileoverview Calendar component - * @author NHN. FE dev Lab - */ - - - -var defineClass = __webpack_require__(0); -var CustomEvents = __webpack_require__(8); -var addClass = __webpack_require__(16); -var hasClass = __webpack_require__(27); -var removeClass = __webpack_require__(18); -var removeElement = __webpack_require__(14); -var extend = __webpack_require__(7); - -var Header = __webpack_require__(44); -var Body = __webpack_require__(49); -var localeTexts = __webpack_require__(10); -var constants = __webpack_require__(1); -var dateUtil = __webpack_require__(5); -var util = __webpack_require__(4); - -var DEFAULT_WEEK_START_DAY = constants.DEFAULT_WEEK_START_DAY; -var DEFAULT_LANGUAGE_TYPE = constants.DEFAULT_LANGUAGE_TYPE; - -var TYPE_DATE = constants.TYPE_DATE; -var TYPE_MONTH = constants.TYPE_MONTH; -var TYPE_YEAR = constants.TYPE_YEAR; - -var CLASS_NAME_PREV_MONTH_BTN = constants.CLASS_NAME_PREV_MONTH_BTN; -var CLASS_NAME_PREV_YEAR_BTN = constants.CLASS_NAME_PREV_YEAR_BTN; -var CLASS_NAME_NEXT_YEAR_BTN = constants.CLASS_NAME_NEXT_YEAR_BTN; -var CLASS_NAME_NEXT_MONTH_BTN = constants.CLASS_NAME_NEXT_MONTH_BTN; - -var CLASS_NAME_CALENDAR_MONTH = 'tui-calendar-month'; -var CLASS_NAME_CALENDAR_YEAR = 'tui-calendar-year'; -var CLASS_NAME_HIDDEN = 'tui-hidden'; - -var HEADER_SELECTOR = '.tui-calendar-header'; -var BODY_SELECTOR = '.tui-calendar-body'; - -/** - * @class - * @description - * Create a calendar by {@link DatePicker#createCalendar DatePicker.createCalendar()}. - * @see {@link /tutorial-example07-calendar Calendar example} - * @param {HTMLElement|string} container - Container or selector of the Calendar - * @param {Object} [options] - Calendar options - * @param {Date} [options.date = new Date()] - Initial date (default: today) - * @param {('date'|'month'|'year')} [options.type = 'date'] - Calendar type. Determine whether to show a date, month, or year. - * @param {string} [options.language = 'en'] - Language code. English('en') and Korean('ko') are provided as default. To use the other languages, use {@link DatePicker#localeTexts DatePicker.localeTexts}. - * @param {boolean} [options.showToday = true] - Show today. - * @param {boolean} [options.showJumpButtons = false] - Show the yearly jump buttons (move to the previous and next year in 'date' Calendar) - * @param {boolean} [options.usageStatistics = true] - Send a hostname to Google Analytics (default: true) - * @param {string} [options.weekStartDay = 'Sun'] - Start of the week. 'Sun', 'Mon', ..., 'Sat'(default: 'Sun'(start on Sunday)) - * @example - * //ES6 - * import DatePicker from 'tui-date-picker' - * - * // CommonJS - * const DatePicker = require('tui-date-picker'); - * - * // Browser - * const DatePicker = tui.DatePicker; - * - * const calendar = DatePicker.createCalendar('#calendar-wrapper', { - * language: 'en', - * showToday: true, - * showJumpButtons: false, - * date: new Date(), - * type: 'date', - * weekStartDay: 'Mon', - * }); - * - * calendar.on('draw', (event) => { - * console.log(event.date); - * console.log(event.type); - * for (let i = 0, len = event.dateElements.length; i < len; i += 1) { - * const el = event.dateElements[i]; - * const date = new Date(getData(el, 'timestamp')); - * console.log(date); - * } - * }); - */ -var Calendar = defineClass( - /** @lends Calendar.prototype */ { - static: { - localeTexts: localeTexts - }, - init: function(container, options) { - options = extend( - { - language: DEFAULT_LANGUAGE_TYPE, - showToday: true, - showJumpButtons: false, - date: new Date(), - type: TYPE_DATE, - usageStatistics: true, - weekStartDay: DEFAULT_WEEK_START_DAY - }, - options - ); - - /** - * Container element - * @type {HTMLElement} - * @private - */ - this._container = util.getElement(container); - this._container.innerHTML = - '
    ' + - '
    ' + - '
    ' + - '
    '; - - /** - * Wrapper element - * @type {HTMLElement} - * @private - */ - this._element = this._container.firstChild; - - /** - * Date - * @type {Date} - * @private - */ - this._date = null; - - /** - * Layer type - * @type {string} - * @private - */ - this._type = null; - - /** - * Header box - * @type {Header} - * @private - */ - this._header = null; - - /** - * Body box - * @type {Body} - * @private - */ - this._body = null; - - this._initHeader(options); - this._initBody(options); - this.draw({ - date: options.date, - type: options.type - }); - - if (options.usageStatistics) { - util.sendHostName(); - } - }, - - /** - * Initialize header - * @param {object} options - Header options - * @private - */ - _initHeader: function(options) { - var headerContainer = this._element.querySelector(HEADER_SELECTOR); - - this._header = new Header(headerContainer, options); - this._header.on( - 'click', - function(ev) { - var target = util.getTarget(ev); - if (hasClass(target, CLASS_NAME_PREV_MONTH_BTN)) { - this.drawPrev(); - } else if (hasClass(target, CLASS_NAME_PREV_YEAR_BTN)) { - this._onClickPrevYear(); - } else if (hasClass(target, CLASS_NAME_NEXT_MONTH_BTN)) { - this.drawNext(); - } else if (hasClass(target, CLASS_NAME_NEXT_YEAR_BTN)) { - this._onClickNextYear(); - } - }, - this - ); - }, - - /** - * Initialize body - * @param {object} options - Body options - * @private - */ - _initBody: function(options) { - var bodyContainer = this._element.querySelector(BODY_SELECTOR); - - this._body = new Body(bodyContainer, options); - }, - - /** - * clickHandler - prev year button - * @private - */ - _onClickPrevYear: function() { - if (this.getType() === TYPE_DATE) { - this.draw({ - date: this._getRelativeDate(-12) - }); - } else { - this.drawPrev(); - } - }, - - /** - * clickHandler - next year button - * @private - */ - _onClickNextYear: function() { - if (this.getType() === TYPE_DATE) { - this.draw({ - date: this._getRelativeDate(12) - }); - } else { - this.drawNext(); - } - }, - - /** - * Returns whether the layer type is valid - * @param {string} type - Layer type to check - * @returns {boolean} - * @private - */ - _isValidType: function(type) { - return type === TYPE_DATE || type === TYPE_MONTH || type === TYPE_YEAR; - }, - - /** - * @param {Date} date - Date to draw - * @param {string} type - Layer type to draw - * @returns {boolean} - * @private - */ - _shouldUpdate: function(date, type) { - var prevDate = this._date; - - if (!dateUtil.isValidDate(date)) { - throw new Error('Invalid date'); - } - - if (!this._isValidType(type)) { - throw new Error('Invalid layer type'); - } - - return ( - !prevDate || - prevDate.getFullYear() !== date.getFullYear() || - prevDate.getMonth() !== date.getMonth() || - this.getType() !== type - ); - }, - - /** - * Render header & body elements - * @private - */ - _render: function() { - var date = this._date; - var type = this.getType(); - - this._header.render(date, type); - this._body.render(date, type); - removeClass(this._element, CLASS_NAME_CALENDAR_MONTH, CLASS_NAME_CALENDAR_YEAR); - - switch (type) { - case TYPE_MONTH: - addClass(this._element, CLASS_NAME_CALENDAR_MONTH); - break; - case TYPE_YEAR: - addClass(this._element, CLASS_NAME_CALENDAR_YEAR); - break; - default: - break; - } - }, - - /** - * Returns relative date - * @param {number} step - Month step - * @returns {Date} - * @private - */ - _getRelativeDate: function(step) { - var prev = this._date; - - return new Date(prev.getFullYear(), prev.getMonth() + step); - }, - - /** - * Draw the calendar. - * @param {Object} [options] - Draw options - * @param {Date} [options.date] - Date to set - * @param {('date'|'month'|'year')} [options.type = 'date'] - Calendar type. Determine whether to show a date, month, or year. - * @example - * calendar.draw(); - * calendar.draw({ - * date: new Date() - * }); - * calendar.draw({ - * type: 'month' - * }); - * calendar.draw({ - * type: 'month', - * date: new Date() - * }); - */ - draw: function(options) { - var date, type; - - options = options || {}; - date = options.date || this._date; - type = (options.type || this.getType()).toLowerCase(); - - if (this._shouldUpdate(date, type)) { - this._date = date; - this._type = type; - this._render(); - } - - /** - * Occur after the calendar draws. - * @event Calendar#draw - * @see {@link https://nhn.github.io/tui.code-snippet/latest/CustomEvents#on calendar.on()} to bind event handlers. - * @see {@link https://nhn.github.io/tui.code-snippet/latest/CustomEvents#off calendar.off()} to unbind event handlers. - * @see Refer to {@link https://nhn.github.io/tui.code-snippet/latest/CustomEvents CustomEvents from tui-code-snippet} for more methods. Calendar mixes in the methods from CustomEvents. - * @property {Date} date - Calendar date - * @property {('date'|'month'|'year')} type - Calendar type - * @property {HTMLElement[]} dateElements - elements for dates - * @example - * // bind the 'draw' event - * calendar.on('draw', ({type, date}) => { - * console.log(`Draw the ${type} calendar and its date is ${date}.`); - * }); - * - * // unbind the 'draw' event - * calendar.off('draw'); - */ - this.fire('draw', { - date: this._date, - type: type, - dateElements: this._body.getDateElements() - }); - }, - - /** - * Show the calendar. - */ - show: function() { - removeClass(this._element, CLASS_NAME_HIDDEN); - }, - - /** - * Hide the calendar. - */ - hide: function() { - addClass(this._element, CLASS_NAME_HIDDEN); - }, - - /** - * Draw the next page. - */ - drawNext: function() { - this.draw({ - date: this.getNextDate() - }); - }, - - /** - * Draw the previous page. - */ - drawPrev: function() { - this.draw({ - date: this.getPrevDate() - }); - }, - - /** - * Return the next date. - * @returns {Date} - */ - getNextDate: function() { - if (this.getType() === TYPE_DATE) { - return this._getRelativeDate(1); - } - - return this.getNextYearDate(); - }, - - /** - * Return the previous date. - * @returns {Date} - */ - getPrevDate: function() { - if (this.getType() === TYPE_DATE) { - return this._getRelativeDate(-1); - } - - return this.getPrevYearDate(); - }, - - /** - * Return the date a year later. - * @returns {Date} - */ - getNextYearDate: function() { - switch (this.getType()) { - case TYPE_DATE: - case TYPE_MONTH: - return this._getRelativeDate(12); // 12 months = 1 year - case TYPE_YEAR: - return this._getRelativeDate(108); // 108 months = 9 years = 12 * 9 - default: - throw new Error('Unknown layer type'); - } - }, - - /** - * Return the date a year previously. - * @returns {Date} - */ - getPrevYearDate: function() { - switch (this.getType()) { - case TYPE_DATE: - case TYPE_MONTH: - return this._getRelativeDate(-12); // 12 months = 1 year - case TYPE_YEAR: - return this._getRelativeDate(-108); // 108 months = 9 years = 12 * 9 - default: - throw new Error('Unknown layer type'); - } - }, - - /** - * Change language. - * @param {string} language - Language code. English('en') and Korean('ko') are provided as default. - * @see To set to the other languages, use {@link DatePicker#localeTexts DatePicker.localeTexts}. - */ - changeLanguage: function(language) { - this._header.changeLanguage(language); - this._body.changeLanguage(language); - this._render(); - }, - - /** - * Return the rendered date. - * @returns {Date} - */ - getDate: function() { - return new Date(this._date); - }, - - /** - * Return the calendar's type. - * @returns {('date'|'month'|'year')} - */ - getType: function() { - return this._type; - }, - - /** - * Returns HTML elements for dates. - * @returns {HTMLElement[]} - */ - getDateElements: function() { - return this._body.getDateElements(); - }, - - /** - * Apply a CSS class to the calendar. - * @param {string} className - Class name - */ - addCssClass: function(className) { - addClass(this._element, className); - }, - - /** - * Remove a CSS class from the calendar. - * @param {string} className - Class name - */ - removeCssClass: function(className) { - removeClass(this._element, className); - }, - - /** - * Destroy the calendar. - */ - destroy: function() { - this._header.destroy(); - this._body.destroy(); - removeElement(this._element); - - this._type = this._date = this._container = this._element = this._header = this._body = null; - } - } -); - -CustomEvents.mixin(Calendar); -module.exports = Calendar; - - -/***/ }), -/* 30 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * @fileoverview Date <-> Text formatting module - * @author NHN. FE Development Lab - */ - - - -var inArray = __webpack_require__(3); -var forEachArray = __webpack_require__(2); -var defineClass = __webpack_require__(0); - -var util = __webpack_require__(4); -var dateUtil = __webpack_require__(5); -var constants = __webpack_require__(1); -var localeTexts = __webpack_require__(10); - -var rFormableKeys = /\\?(yyyy|yy|mmmm|mmm|mm|m|dd|d|hh|h|a)/gi; -var mapForConverting = { - yyyy: { - expression: '(\\d{4}|\\d{2})', - type: constants.TYPE_YEAR - }, - yy: { - expression: '(\\d{4}|\\d{2})', - type: constants.TYPE_YEAR - }, - y: { - expression: '(\\d{4}|\\d{2})', - type: constants.TYPE_YEAR - }, - M: { - expression: '(1[012]|0[1-9]|[1-9])', - type: constants.TYPE_MONTH - }, - MM: { - expression: '(1[012]|0[1-9]|[1-9])', - type: constants.TYPE_MONTH - }, - MMM: { - expression: '(1[012]|0[1-9]|[1-9])', - type: constants.TYPE_MONTH - }, - MMMM: { - expression: '(1[012]|0[1-9]|[1-9])', - type: constants.TYPE_MONTH - }, - mmm: { - expression: '(1[012]|0[1-9]|[1-9])', - type: constants.TYPE_MONTH - }, - mmmm: { - expression: '(1[012]|0[1-9]|[1-9])', - type: constants.TYPE_MONTH - }, - dd: { - expression: '([12]\\d{1}|3[01]|0[1-9]|[1-9])', - type: constants.TYPE_DATE - }, - d: { - expression: '([12]\\d{1}|3[01]|0[1-9]|[1-9])', - type: constants.TYPE_DATE - }, - D: { - expression: '([12]\\d{1}|3[01]|0[1-9]|[1-9])', - type: constants.TYPE_DATE - }, - DD: { - expression: '([12]\\d{1}|3[01]|0[1-9]|[1-9])', - type: constants.TYPE_DATE - }, - h: { - expression: '(d{1}|0\\d{1}|1\\d{1}|2[0123])', - type: constants.TYPE_HOUR - }, - hh: { - expression: '(d{1}|[01]\\d{1}|2[0123])', - type: constants.TYPE_HOUR - }, - H: { - expression: '(d{1}|0\\d{1}|1\\d{1}|2[0123])', - type: constants.TYPE_HOUR - }, - HH: { - expression: '(d{1}|[01]\\d{1}|2[0123])', - type: constants.TYPE_HOUR - }, - m: { - expression: '(d{1}|[012345]\\d{1})', - type: constants.TYPE_MINUTE - }, - mm: { - expression: '(d{1}|[012345]\\d{1})', - type: constants.TYPE_MINUTE - }, - a: { - expression: '([ap]m)', - type: constants.TYPE_MERIDIEM - }, - A: { - expression: '([ap]m)', - type: constants.TYPE_MERIDIEM - } -}; - -/** - * @class - * @ignore - */ -var DateTimeFormatter = defineClass( - /** @lends DateTimeFormatter.prototype */ { - init: function(rawStr, titles) { - /** - * @type {string} - * @private - */ - this._rawStr = rawStr; - - /** - * @type {Array} - * @private - * @example - * rawStr = "yyyy-MM-dd" --> keyOrder = ['year', 'month', 'date'] - * rawStr = "MM/dd, yyyy" --> keyOrder = ['month', 'date', 'year'] - */ - this._keyOrder = null; - - /** - * @type {RegExp} - * @private - */ - this._regExp = null; - - /** - * Titles - * @type {object} - * @private - */ - this._titles = titles || localeTexts.en.titles; - - this._parseFormat(); - }, - - /** - * Parse initial format and make the keyOrder, regExp - * @private - */ - _parseFormat: function() { - var regExpStr = '^'; - var matchedKeys = this._rawStr.match(rFormableKeys); - var keyOrder = []; - - matchedKeys = util.filter(matchedKeys, function(key) { - return key[0] !== '\\'; - }); - - forEachArray(matchedKeys, function(key, index) { - if (!/m/i.test(key)) { - key = key.toLowerCase(); - } - - regExpStr += mapForConverting[key].expression + '[\\D\\s]*'; - keyOrder[index] = mapForConverting[key].type; - }); - - // This formatter does not allow additional numbers at the end of string. - regExpStr += '$'; - - this._keyOrder = keyOrder; - - this._regExp = new RegExp(regExpStr, 'gi'); - }, - - /** - * Parse string to dateHash - * @param {string} str - Date string - * @returns {Date} - */ - parse: function(str) { - var dateHash = { - year: 0, - month: 1, - date: 1, - hour: 0, - minute: 0 - }; - var hasMeridiem = false; - var isPM = false; - var matched; - - this._regExp.lastIndex = 0; - matched = this._regExp.exec(str); - - if (!matched) { - throw Error('DateTimeFormatter: Not matched - "' + str + '"'); - } - - // eslint-disable-next-line complexity - forEachArray(this._keyOrder, function(name, index) { - var value = matched[index + 1]; - - if (name === constants.TYPE_MERIDIEM && /[ap]m/i.test(value)) { - hasMeridiem = true; - isPM = /pm/i.test(value); - } else { - value = Number(value); - - if (value !== 0 && !value) { - throw Error('DateTimeFormatter: Unknown value - ' + matched[index + 1]); - } - - if (name === constants.TYPE_YEAR && value < 100) { - value += 2000; - } - - dateHash[name] = value; - } - }); - - if (hasMeridiem) { - isPM = isPM || dateHash.hour > 12; - dateHash.hour %= 12; - if (isPM) { - dateHash.hour += 12; - } - } - - return new Date( - dateHash.year, - dateHash.month - 1, - dateHash.date, - dateHash.hour, - dateHash.minute - ); - }, - - /** - * Returns raw string of format - * @returns {string} - */ - getRawString: function() { - return this._rawStr; - }, - - /** - * Format date to string - * @param {Date} dateObj - Date object - * @returns {string} - */ - format: function(dateObj) { - var year = dateObj.getFullYear(); - var month = dateObj.getMonth() + 1; - var dayInMonth = dateObj.getDate(); - var day = dateObj.getDay(); - var hour = dateObj.getHours(); - var minute = dateObj.getMinutes(); - var meridiem = 'a'; // Default value for unusing meridiem format - var replaceMap; - - if (inArray(constants.TYPE_MERIDIEM, this._keyOrder) > -1) { - meridiem = hour >= 12 ? 'pm' : 'am'; - hour = dateUtil.getMeridiemHour(hour); - } - - replaceMap = { - yyyy: year, - yy: String(year).substr(2, 2), - M: month, - MM: dateUtil.prependLeadingZero(month), - MMM: this._titles.MMM[month - 1], - MMMM: this._titles.MMMM[month - 1], - d: dayInMonth, - dd: dateUtil.prependLeadingZero(dayInMonth), - D: this._titles.D[day], - DD: this._titles.DD[day], - hh: dateUtil.prependLeadingZero(hour), - h: hour, - mm: dateUtil.prependLeadingZero(minute), - m: minute, - A: meridiem.toUpperCase(), - a: meridiem - }; - - return this._rawStr.replace(rFormableKeys, function(key) { - if (key[0] === '\\') { - return key.substr(1); - } - - return replaceMap[key] || replaceMap[key.toLowerCase()] || ''; - }); - } - } -); - -module.exports = DateTimeFormatter; - - -/***/ }), -/* 31 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * @fileoverview Bind DOM events - * @author NHN FE Development Lab - */ - - - -var isString = __webpack_require__(13); -var forEach = __webpack_require__(9); - -var safeEvent = __webpack_require__(32); - -/** - * Bind DOM events. - * @param {HTMLElement} element - element to bind events - * @param {(string|object)} types - Space splitted events names or eventName:handler object - * @param {(function|object)} handler - handler function or context for handler method - * @param {object} [context] context - context for handler method. - * @memberof module:domEvent - * @example - * var div = document.querySelector('div'); - * - * // Bind one event to an element. - * on(div, 'click', toggle); - * - * // Bind multiple events with a same handler to multiple elements at once. - * // Use event names splitted by a space. - * on(div, 'mouseenter mouseleave', changeColor); - * - * // Bind multiple events with different handlers to an element at once. - * // Use an object which of key is an event name and value is a handler function. - * on(div, { - * keydown: highlight, - * keyup: dehighlight - * }); - * - * // Set a context for handler method. - * var name = 'global'; - * var repository = {name: 'CodeSnippet'}; - * on(div, 'drag', function() { - * console.log(this.name); - * }, repository); - * // Result when you drag a div: "CodeSnippet" - */ -function on(element, types, handler, context) { - if (isString(types)) { - forEach(types.split(/\s+/g), function(type) { - bindEvent(element, type, handler, context); - }); - - return; - } - - forEach(types, function(func, type) { - bindEvent(element, type, func, handler); - }); -} - -/** - * Bind DOM events - * @param {HTMLElement} element - element to bind events - * @param {string} type - events name - * @param {function} handler - handler function or context for handler method - * @param {object} [context] context - context for handler method. - * @private - */ -function bindEvent(element, type, handler, context) { - /** - * Event handler - * @param {Event} e - event object - */ - function eventHandler(e) { - handler.call(context || element, e || window.event); - } - - if ('addEventListener' in element) { - element.addEventListener(type, eventHandler); - } else if ('attachEvent' in element) { - element.attachEvent('on' + type, eventHandler); - } - memorizeHandler(element, type, handler, eventHandler); -} - -/** - * Memorize DOM event handler for unbinding. - * @param {HTMLElement} element - element to bind events - * @param {string} type - events name - * @param {function} handler - handler function that user passed at on() use - * @param {function} wrappedHandler - handler function that wrapped by domevent for implementing some features - * @private - */ -function memorizeHandler(element, type, handler, wrappedHandler) { - var events = safeEvent(element, type); - var existInEvents = false; - - forEach(events, function(obj) { - if (obj.handler === handler) { - existInEvents = true; - - return false; - } - - return true; - }); - - if (!existInEvents) { - events.push({ - handler: handler, - wrappedHandler: wrappedHandler - }); - } -} - -module.exports = on; - - -/***/ }), -/* 32 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * @fileoverview Get event collection for specific HTML element - * @author NHN FE Development Lab - */ - - - -var EVENT_KEY = '_feEventKey'; - -/** - * Get event collection for specific HTML element - * @param {HTMLElement} element - HTML element - * @param {string} type - event type - * @returns {array} - * @private - */ -function safeEvent(element, type) { - var events = element[EVENT_KEY]; - var handlers; - - if (!events) { - events = element[EVENT_KEY] = {}; - } - - handlers = events[type]; - if (!handlers) { - handlers = events[type] = []; - } - - return handlers; -} - -module.exports = safeEvent; - - -/***/ }), -/* 33 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * @fileoverview Unbind DOM events - * @author NHN FE Development Lab - */ - - - -var isString = __webpack_require__(13); -var forEach = __webpack_require__(9); - -var safeEvent = __webpack_require__(32); - -/** - * Unbind DOM events - * If a handler function is not passed, remove all events of that type. - * @param {HTMLElement} element - element to unbind events - * @param {(string|object)} types - Space splitted events names or eventName:handler object - * @param {function} [handler] - handler function - * @memberof module:domEvent - * @example - * // Following the example of domEvent#on - * - * // Unbind one event from an element. - * off(div, 'click', toggle); - * - * // Unbind multiple events with a same handler from multiple elements at once. - * // Use event names splitted by a space. - * off(element, 'mouseenter mouseleave', changeColor); - * - * // Unbind multiple events with different handlers from an element at once. - * // Use an object which of key is an event name and value is a handler function. - * off(div, { - * keydown: highlight, - * keyup: dehighlight - * }); - * - * // Unbind events without handlers. - * off(div, 'drag'); - */ -function off(element, types, handler) { - if (isString(types)) { - forEach(types.split(/\s+/g), function(type) { - unbindEvent(element, type, handler); - }); - - return; - } - - forEach(types, function(func, type) { - unbindEvent(element, type, func); - }); -} - -/** - * Unbind DOM events - * If a handler function is not passed, remove all events of that type. - * @param {HTMLElement} element - element to unbind events - * @param {string} type - events name - * @param {function} [handler] - handler function - * @private - */ -function unbindEvent(element, type, handler) { - var events = safeEvent(element, type); - var index; - - if (!handler) { - forEach(events, function(item) { - removeHandler(element, type, item.wrappedHandler); - }); - events.splice(0, events.length); - } else { - forEach(events, function(item, idx) { - if (handler === item.handler) { - removeHandler(element, type, item.wrappedHandler); - index = idx; - - return false; - } - - return true; - }); - events.splice(index, 1); - } -} - -/** - * Remove an event handler - * @param {HTMLElement} element - An element to remove an event - * @param {string} type - event type - * @param {function} handler - event handler - * @private - */ -function removeHandler(element, type, handler) { - if ('removeEventListener' in element) { - element.removeEventListener(type, handler); - } else if ('detachEvent' in element) { - element.detachEvent('on' + type, handler); - } -} - -module.exports = off; - - -/***/ }), -/* 34 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * @fileoverview The entry file of DatePicker components - * @author NHN. FE Development Team - */ - - - -var DatePicker = __webpack_require__(21); -var DateRangePicker = __webpack_require__(60); -var Calendar = __webpack_require__(29); - -__webpack_require__(61); - -/** - * Create a calendar. - * @see {@link Calendar} - * @see {@link /tutorial-example07-calendar Calendar example} - * @static - * @param {HTMLElement|string} wrapperElement - Container element or selector of the Calendar - * @param {Object} [options] - {@link Calendar} options. Refer to the {@link Calendar Calendar instance's options}. - * @returns {Calendar} - * @example - * const calendar = DatePicker.createCalendar('#calendar-wrapper', { - * language: 'en', - * showToday: true, - * showJumpButtons: false, - * date: new Date(), - * type: 'date' - * }); - */ -DatePicker.createCalendar = function(wrapperElement, options) { - return new Calendar(wrapperElement, options); -}; - -/** - * Create a date-range picker. - * @see {@link DateRangePicker} - * @see {@link /tutorial-example08-daterangepicker DateRangePicker example} - * @static - * @param {object} options - {@link DateRangePicker} options. Refer to the {@link DateRangePicker DateRangePicker instance's options}. - * @returns {DateRangePicker} - * @example - * const rangepicker = DatePicker.createRangePicker({ - * startpicker: { - * input: '#start-input', - * container: '#start-container' - * }, - * endpicker: { - * input: '#end-input', - * container: '#end-container' - * }, - * type: 'date', - * format: 'yyyy-MM-dd' - * selectableRanges: [ - * [new Date(2017, 3, 1), new Date(2017, 5, 1)], - * [new Date(2017, 6, 3), new Date(2017, 10, 5)] - * ] - * }); - */ -DatePicker.createRangePicker = function(options) { - return new DateRangePicker(options); -}; - -module.exports = DatePicker; - - -/***/ }), -/* 35 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * @fileoverview Provide a simple inheritance in prototype-oriented. - * @author NHN FE Development Lab - */ - - - -var createObject = __webpack_require__(36); - -/** - * Provide a simple inheritance in prototype-oriented. - * Caution : - * Don't overwrite the prototype of child constructor. - * - * @param {function} subType Child constructor - * @param {function} superType Parent constructor - * @memberof module:inheritance - * @example - * var inherit = require('tui-code-snippet/inheritance/inherit'); // node, commonjs - * - * // Parent constructor - * function Animal(leg) { - * this.leg = leg; - * } - * Animal.prototype.growl = function() { - * // ... - * }; - * - * // Child constructor - * function Person(name) { - * this.name = name; - * } - * - * // Inheritance - * inherit(Person, Animal); - * - * // After this inheritance, please use only the extending of property. - * // Do not overwrite prototype. - * Person.prototype.walk = function(direction) { - * // ... - * }; - */ -function inherit(subType, superType) { - var prototype = createObject(superType.prototype); - prototype.constructor = subType; - subType.prototype = prototype; -} - -module.exports = inherit; - - -/***/ }), -/* 36 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * @fileoverview Create a new object with the specified prototype object and properties. - * @author NHN FE Development Lab - */ - - - -/** - * @module inheritance - */ - -/** - * Create a new object with the specified prototype object and properties. - * @param {Object} obj This object will be a prototype of the newly-created object. - * @returns {Object} - * @memberof module:inheritance - */ -function createObject(obj) { - function F() {} // eslint-disable-line require-jsdoc - F.prototype = obj; - - return new F(); -} - -module.exports = createObject; - - -/***/ }), -/* 37 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * @fileoverview Check whether the given variable is existing or not. - * @author NHN FE Development Lab - */ - - - -var isUndefined = __webpack_require__(12); -var isNull = __webpack_require__(38); - -/** - * Check whether the given variable is existing or not. - * If the given variable is not null and not undefined, returns true. - * @param {*} param - Target for checking - * @returns {boolean} Is existy? - * @memberof module:type - * @example - * var isExisty = require('tui-code-snippet/type/isExisty'); // node, commonjs - * - * isExisty(''); //true - * isExisty(0); //true - * isExisty([]); //true - * isExisty({}); //true - * isExisty(null); //false - * isExisty(undefined); //false -*/ -function isExisty(param) { - return !isUndefined(param) && !isNull(param); -} - -module.exports = isExisty; - - -/***/ }), -/* 38 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * @fileoverview Check whether the given variable is null or not. - * @author NHN FE Development Lab - */ - - - -/** - * Check whether the given variable is null or not. - * If the given variable(arguments[0]) is null, returns true. - * @param {*} obj - Target for checking - * @returns {boolean} Is null? - * @memberof module:type - */ -function isNull(obj) { - return obj === null; -} - -module.exports = isNull; - - -/***/ }), -/* 39 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * @fileoverview Check whether the given variable is a function or not. - * @author NHN FE Development Lab - */ - - - -/** - * Check whether the given variable is a function or not. - * If the given variable is a function, return true. - * @param {*} obj - Target for checking - * @returns {boolean} Is function? - * @memberof module:type - */ -function isFunction(obj) { - return obj instanceof Function; -} - -module.exports = isFunction; - - -/***/ }), -/* 40 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * @fileoverview Check element match selector - * @author NHN FE Development Lab - */ - - - -var inArray = __webpack_require__(3); -var toArray = __webpack_require__(41); - -var elProto = Element.prototype; -var matchSelector = elProto.matches || - elProto.webkitMatchesSelector || - elProto.mozMatchesSelector || - elProto.msMatchesSelector || - function(selector) { - var doc = this.document || this.ownerDocument; - - return inArray(this, toArray(doc.querySelectorAll(selector))) > -1; - }; - -/** - * Check element match selector - * @param {HTMLElement} element - element to check - * @param {string} selector - selector to check - * @returns {boolean} is selector matched to element? - * @memberof module:domUtil - */ -function matches(element, selector) { - return matchSelector.call(element, selector); -} - -module.exports = matches; - - -/***/ }), -/* 41 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * @fileoverview Transform the Array-like object to Array. - * @author NHN FE Development Lab - */ - - - -var forEachArray = __webpack_require__(2); - -/** - * Transform the Array-like object to Array. - * In low IE (below 8), Array.prototype.slice.call is not perfect. So, try-catch statement is used. - * @param {*} arrayLike Array-like object - * @returns {Array} Array - * @memberof module:collection - * @example - * var toArray = require('tui-code-snippet/collection/toArray'); // node, commonjs - * - * var arrayLike = { - * 0: 'one', - * 1: 'two', - * 2: 'three', - * 3: 'four', - * length: 4 - * }; - * var result = toArray(arrayLike); - * - * alert(result instanceof Array); // true - * alert(result); // one,two,three,four - */ -function toArray(arrayLike) { - var arr; - try { - arr = Array.prototype.slice.call(arrayLike); - } catch (e) { - arr = []; - forEachArray(arrayLike, function(value) { - arr.push(value); - }); - } - - return arr; -} - -module.exports = toArray; - - -/***/ }), -/* 42 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * @fileoverview Convert kebab-case - * @author NHN FE Development Lab - */ - - - -/** - * Convert kebab-case - * @param {string} key - string to be converted to Kebab-case - * @private - */ -function convertToKebabCase(key) { - return key.replace(/([A-Z])/g, function(match) { - return '-' + match.toLowerCase(); - }); -} - -module.exports = convertToKebabCase; - - -/***/ }), -/* 43 */ -/***/ (function(module, exports) { - -module.exports = __WEBPACK_EXTERNAL_MODULE__43__; - -/***/ }), -/* 44 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * @fileoverview Calendar Header - * @author NHN. FE dev Lab - */ - - - -var defineClass = __webpack_require__(0); -var CustomEvents = __webpack_require__(8); -var closest = __webpack_require__(25); -var removeElement = __webpack_require__(14); - -var localeTexts = __webpack_require__(10); -var headerTmpl = __webpack_require__(45); -var DateTimeFormatter = __webpack_require__(30); -var constants = __webpack_require__(1); -var util = __webpack_require__(4); -var mouseTouchEvent = __webpack_require__(19); - -var TYPE_DATE = constants.TYPE_DATE; -var TYPE_MONTH = constants.TYPE_MONTH; -var TYPE_YEAR = constants.TYPE_YEAR; - -var CLASS_NAME_TITLE_MONTH = 'tui-calendar-title-month'; -var CLASS_NAME_TITLE_YEAR = 'tui-calendar-title-year'; -var CLASS_NAME_TITLE_YEAR_TO_YEAR = 'tui-calendar-title-year-to-year'; - -var SELECTOR_INNER_ELEM = '.tui-calendar-header-inner'; -var SELECTOR_INFO_ELEM = '.tui-calendar-header-info'; -var SELECTOR_BTN = '.tui-calendar-btn'; - -var YEAR_TITLE_FORMAT = 'yyyy'; - -/** - * @ignore - * @class - * @param {string|HTMLElement} container - Header container or selector - * @param {object} option - Header option - * @param {string} option.language - Header language - * @param {boolean} option.showToday - Has today box or not. - * @param {boolean} option.showJumpButtons - Has jump buttons or not. - */ -var Header = defineClass( - /** @lends Header.prototype */ { - init: function(container, option) { - /** - * Container element - * @type {HTMLElement} - * @private - */ - this._container = util.getElement(container); - - /** - * Header inner element - * @type {HTMLElement} - * @private - */ - this._innerElement = null; - - /** - * Header info element - * @type {HTMLElement} - * @private - */ - this._infoElement = null; - - /** - * Render today box or not - * @type {boolean} - * @private - */ - this._showToday = option.showToday; - - /** - * Render jump buttons or not (next,prev year on date calendar) - * @type {boolean} - * @private - */ - this._showJumpButtons = option.showJumpButtons; - - /** - * Year_Month title formatter - * @type {DateTimeFormatter} - * @private - */ - this._yearMonthTitleFormatter = null; - - /** - * Year title formatter - * @type {DateTimeFormatter} - * @private - */ - this._yearTitleFormatter = null; - - /** - * Today formatter - * @type {DateTimeFormatter} - * @private - */ - this._todayFormatter = null; - - this._setFormatters(localeTexts[option.language]); - this._setEvents(option); - }, - - /** - * @param {object} localeText - Locale text - * @private - */ - _setFormatters: function(localeText) { - this._yearMonthTitleFormatter = new DateTimeFormatter( - localeText.titleFormat, - localeText.titles - ); - this._yearTitleFormatter = new DateTimeFormatter(YEAR_TITLE_FORMAT, localeText.titles); - this._todayFormatter = new DateTimeFormatter(localeText.todayFormat, localeText.titles); - }, - - /** - * @param {object} option - Constructor option - * @private - */ - _setEvents: function() { - mouseTouchEvent.on(this._container, 'click', this._onClickHandler, this); - }, - - /** - * @private - */ - _removeEvents: function() { - this.off(); - mouseTouchEvent.off(this._container, 'click', this._onClickHandler); - }, - - /** - * Fire customEvents - * @param {Event} ev An event object - * @private - */ - _onClickHandler: function(ev) { - var target = util.getTarget(ev); - - if (closest(target, SELECTOR_BTN)) { - this.fire('click', ev); - } - }, - - /** - * @param {string} type - Calendar type - * @returns {string} - * @private - */ - _getTitleClass: function(type) { - switch (type) { - case TYPE_DATE: - return CLASS_NAME_TITLE_MONTH; - case TYPE_MONTH: - return CLASS_NAME_TITLE_YEAR; - case TYPE_YEAR: - return CLASS_NAME_TITLE_YEAR_TO_YEAR; - default: - return ''; - } - }, - - /** - * @param {Date} date - date - * @param {string} type - Calendar type - * @returns {string} - * @private - */ - _getTitleText: function(date, type) { - var currentYear, start, end; - - switch (type) { - case TYPE_DATE: - return this._yearMonthTitleFormatter.format(date); - case TYPE_MONTH: - return this._yearTitleFormatter.format(date); - case TYPE_YEAR: - currentYear = date.getFullYear(); - start = new Date(currentYear - 4, 0, 1); - end = new Date(currentYear + 4, 0, 1); - - return ( - this._yearTitleFormatter.format(start) + ' - ' + this._yearTitleFormatter.format(end) - ); - default: - return ''; - } - }, - - /** - * Change langauge - * @param {string} language - Language - */ - changeLanguage: function(language) { - this._setFormatters(localeTexts[language]); - }, - - /** - * Render header - * @param {Date} date - date - * @param {string} type - Calendar type - */ - render: function(date, type) { - var context = { - showToday: this._showToday, - showJumpButtons: this._showJumpButtons, - todayText: this._todayFormatter.format(new Date()), - isDateCalendar: type === TYPE_DATE, - titleClass: this._getTitleClass(type), - title: this._getTitleText(date, type) - }; - - this._container.innerHTML = headerTmpl(context).replace(/^\s+|\s+$/g, ''); - this._innerElement = this._container.querySelector(SELECTOR_INNER_ELEM); - if (context.showToday) { - this._infoElement = this._container.querySelector(SELECTOR_INFO_ELEM); - } - }, - - /** - * Destroy header - */ - destroy: function() { - this._removeEvents(); - removeElement(this._innerElement); - removeElement(this._infoElement); - this._container = this._showToday = this._showJumpButtons = this._yearMonthTitleFormatter = this._yearTitleFormatter = this._todayFormatter = this._innerElement = this._infoElement = null; - } - } -); - -CustomEvents.mixin(Header); -module.exports = Header; - - -/***/ }), -/* 45 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var template = __webpack_require__(11); - -module.exports = function(context) { - var source = - '{{if isDateCalendar}}' + - ' {{if showJumpButtons}}' + - '
    ' + - ' ' + - ' ' + - ' {{title}}' + - ' ' + - ' ' + - '
    ' + - ' {{else}}' + - '
    ' + - ' ' + - ' {{title}}' + - ' ' + - '
    ' + - ' {{/if}}' + - '{{else}}' + - '
    ' + - ' ' + - ' {{title}}' + - ' ' + - '
    ' + - '{{/if}}' + - '{{if showToday}}' + - '
    ' + - '

    {{todayText}}

    ' + - '
    ' + - '{{/if}}'; - - return template(source, context); -}; - - -/***/ }), -/* 46 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * @fileoverview Check whether the given variable is a instance of HTMLNode or not. - * @author NHN FE Development Lab - */ - - - -/** - * Check whether the given variable is a instance of HTMLNode or not. - * If the given variables is a instance of HTMLNode, return true. - * @param {*} html - Target for checking - * @returns {boolean} Is HTMLNode ? - * @memberof module:type - */ -function isHTMLNode(html) { - if (typeof HTMLElement === 'object') { - return (html && (html instanceof HTMLElement || !!html.nodeType)); - } - - return !!(html && html.nodeType); -} - -module.exports = isHTMLNode; - - -/***/ }), -/* 47 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * @fileoverview Send hostname on DOMContentLoaded. - * @author NHN FE Development Lab - */ - - - -var isUndefined = __webpack_require__(12); -var imagePing = __webpack_require__(48); - -var ms7days = 7 * 24 * 60 * 60 * 1000; - -/** - * Check if the date has passed 7 days - * @param {number} date - milliseconds - * @returns {boolean} - * @private - */ -function isExpired(date) { - var now = new Date().getTime(); - - return now - date > ms7days; -} - -/** - * Send hostname on DOMContentLoaded. - * To prevent hostname set tui.usageStatistics to false. - * @param {string} appName - application name - * @param {string} trackingId - GA tracking ID - * @ignore - */ -function sendHostname(appName, trackingId) { - var url = 'https://www.google-analytics.com/collect'; - var hostname = location.hostname; - var hitType = 'event'; - var eventCategory = 'use'; - var applicationKeyForStorage = 'TOAST UI ' + appName + ' for ' + hostname + ': Statistics'; - var date = window.localStorage.getItem(applicationKeyForStorage); - - // skip if the flag is defined and is set to false explicitly - if (!isUndefined(window.tui) && window.tui.usageStatistics === false) { - return; - } - - // skip if not pass seven days old - if (date && !isExpired(date)) { - return; - } - - window.localStorage.setItem(applicationKeyForStorage, new Date().getTime()); - - setTimeout(function() { - if (document.readyState === 'interactive' || document.readyState === 'complete') { - imagePing(url, { - v: 1, - t: hitType, - tid: trackingId, - cid: hostname, - dp: hostname, - dh: appName, - el: appName, - ec: eventCategory - }); - } - }, 1000); -} - -module.exports = sendHostname; - - -/***/ }), -/* 48 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * @fileoverview Request image ping. - * @author NHN FE Development Lab - */ - - - -var forEachOwnProperties = __webpack_require__(23); - -/** - * @module request - */ - -/** - * Request image ping. - * @param {String} url url for ping request - * @param {Object} trackingInfo infos for make query string - * @returns {HTMLElement} - * @memberof module:request - * @example - * var imagePing = require('tui-code-snippet/request/imagePing'); // node, commonjs - * - * imagePing('https://www.google-analytics.com/collect', { - * v: 1, - * t: 'event', - * tid: 'trackingid', - * cid: 'cid', - * dp: 'dp', - * dh: 'dh' - * }); - */ -function imagePing(url, trackingInfo) { - var trackingElement = document.createElement('img'); - var queryString = ''; - forEachOwnProperties(trackingInfo, function(value, key) { - queryString += '&' + key + '=' + value; - }); - queryString = queryString.substring(1); - - trackingElement.src = url + '?' + queryString; - - trackingElement.style.display = 'none'; - document.body.appendChild(trackingElement); - document.body.removeChild(trackingElement); - - return trackingElement; -} - -module.exports = imagePing; - - -/***/ }), -/* 49 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * @fileoverview Calendar body - * @author NHN. FE Development Lab - */ - - - -var forEachArray = __webpack_require__(2); -var defineClass = __webpack_require__(0); - -var DateLayer = __webpack_require__(50); -var MonthLayer = __webpack_require__(52); -var YearLayer = __webpack_require__(54); -var constants = __webpack_require__(1); - -var TYPE_DATE = constants.TYPE_DATE; -var TYPE_MONTH = constants.TYPE_MONTH; -var TYPE_YEAR = constants.TYPE_YEAR; - -/** - * @ignore - * @class - */ -var Body = defineClass( - /** @lends Body.prototype */ { - init: function(bodyContainer, options) { - var language = options.language; - var weekStartDay = options.weekStartDay; - - /** - * Body container element - * @type {HTMLElement} - * @private - */ - this._container = bodyContainer; - - /** - * DateLayer - * @type {DateLayer} - * @private - */ - this._dateLayer = new DateLayer(language, weekStartDay); - - /** - * MonthLayer - * @type {MonthLayer} - * @private - */ - this._monthLayer = new MonthLayer(language); - - /** - * YearLayer - * @type {YearLayer} - * @private - */ - this._yearLayer = new YearLayer(language); - - /** - * Current Layer - * @type {DateLayer|MonthLayer|YearLayer} - * @private - */ - this._currentLayer = this._dateLayer; - }, - - /** - * Returns matched layer - * @param {string} type - Layer type - * @returns {Base} - Layer - * @private - */ - _getLayer: function(type) { - switch (type) { - case TYPE_DATE: - return this._dateLayer; - case TYPE_MONTH: - return this._monthLayer; - case TYPE_YEAR: - return this._yearLayer; - default: - return this._currentLayer; - } - }, - - /** - * Iterate each layer - * @param {Function} fn - function - * @private - */ - _eachLayer: function(fn) { - forEachArray([this._dateLayer, this._monthLayer, this._yearLayer], fn); - }, - - /** - * Change language - * @param {string} language - Language - */ - changeLanguage: function(language) { - this._eachLayer(function(layer) { - layer.changeLanguage(language); - }); - }, - - /** - * Render body - * @param {Date} date - date - * @param {string} type - Layer type - */ - render: function(date, type) { - var nextLayer = this._getLayer(type); - var prevLayer = this._currentLayer; - - prevLayer.remove(); - nextLayer.render(date, this._container); - - this._currentLayer = nextLayer; - }, - - /** - * Returns date elements - * @returns {HTMLElement[]} - */ - getDateElements: function() { - return this._currentLayer.getDateElements(); - }, - - /** - * Destory - */ - destroy: function() { - this._eachLayer(function(layer) { - layer.remove(); - }); - - this._container = this._currentLayer = this._dateLayer = this._monthLayer = this._yearLayer = null; - } - } -); - -module.exports = Body; - - -/***/ }), -/* 50 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * @fileoverview Date layer - * @author NHN. FE Development Lab - */ - - - -var defineClass = __webpack_require__(0); - -var dateUtil = __webpack_require__(5); -var bodyTmpl = __webpack_require__(51); -var LayerBase = __webpack_require__(20); -var TYPE_DATE = __webpack_require__(1).TYPE_DATE; -var WEEK_START_DAY_MAP = __webpack_require__(1).WEEK_START_DAY_MAP; - -var DATE_SELECTOR = '.tui-calendar-date'; -var DAYS_OF_WEEK = 7; - -/** - * @ignore - * @class - * @extends LayerBase - * @param {string} language - Initial language - */ -var DateLayer = defineClass( - LayerBase, - /** @lends DateLayer.prototype */ { - init: function(language, weekStartDay) { - LayerBase.call(this, language); - - this.weekStartDay = WEEK_START_DAY_MAP[String(weekStartDay).toLowerCase()] || 0; - }, - - /** - * Layer type - * @type {string} - * @private - */ - _type: TYPE_DATE, - - /** - * @override - * @private - * @returns {object} Template context - */ - _makeContext: function(date) { - var daysShort = this._localeText.titles.D; - var year, month, days, i; - - date = date || new Date(); - year = date.getFullYear(); - month = date.getMonth() + 1; - - if (this.weekStartDay) { - days = daysShort.slice(); - for (i = 0; i < this.weekStartDay; i += 1) { - days.push(days.shift()); - } - daysShort = days; - } - - return { - Sun: daysShort[0], - Mon: daysShort[1], - Tue: daysShort[2], - Wed: daysShort[3], - Thu: daysShort[4], - Fri: daysShort[5], - Sat: daysShort[6], - year: year, - month: month, - weeks: this._getWeeks(year, month) - }; - }, - - /** - * weeks (templating) for date-calendar - * @param {number} year - Year - * @param {number} month - Month - * @returns {Array.>} - * @private - */ - _getWeeks: function(year, month) { - var weekNumber = 0; - var weeksCount = 6; // Fix for no changing height - var weeks = []; - var week, dates, i; - - while (weekNumber < weeksCount) { - dates = []; - - for (i = this.weekStartDay; i < DAYS_OF_WEEK + this.weekStartDay; i += 1) { - dates.push(dateUtil.getDateOfWeek(year, month, weekNumber, i)); - } - - week = this._getWeek(year, month, dates); - - if (this.weekStartDay && !_isFirstWeek(weekNumber, week[0].dayInMonth)) { - weeks.push(this._getFirstWeek(year, month)); - weeksCount -= 1; // Fix for no changing height - } - - weeks.push(week); - weekNumber += 1; - } - - return weeks; - }, - - /** - * week (templating) for date-calendar - * @param {number} currentYear - * @param {number} currentMonth - * @param {Array.} dates - * @private - */ - _getWeek: function(currentYear, currentMonth, dates) { - var firstDateOfCurrentMonth = new Date(currentYear, currentMonth - 1, 1); - var lastDateOfCurrentMonth = new Date(currentYear, currentMonth, 0); - var contexts = []; - var i = 0; - var length = dates.length; - var date, className; - - for (; i < length; i += 1) { - className = 'tui-calendar-date'; - date = dates[i]; - - if (date < firstDateOfCurrentMonth) { - className += ' tui-calendar-prev-month'; - } - - if (date > lastDateOfCurrentMonth) { - className += ' tui-calendar-next-month'; - } - - if (date.getDay() === 0) { - className += ' tui-calendar-sun'; - } else if (date.getDay() === 6) { - className += ' tui-calendar-sat'; - } - - contexts.push({ - dayInMonth: date.getDate(), - className: className, - timestamp: date.getTime() - }); - } - - return contexts; - }, - - /** - * Render date-layer - * @override - * @param {Date} date Date to render - * @param {HTMLElement} container A container element for the rendered element - */ - render: function(date, container) { - var context = this._makeContext(date); - - container.innerHTML = bodyTmpl(context); - this._element = container.firstChild; - }, - - /** - * Return date elements - * @override - * @returns {HTMLElement[]} - */ - getDateElements: function() { - return this._element.querySelectorAll(DATE_SELECTOR); - }, - - _getFirstWeek: function(year, month) { - var firstWeekDates = []; - var i; - - for (i = this.weekStartDay; i < DAYS_OF_WEEK + this.weekStartDay; i += 1) { - firstWeekDates.push(dateUtil.getDateOfWeek(year, month, -1, i)); - } - - return this._getWeek(year, month, firstWeekDates); - } - } -); - -function _isFirstWeek(weekIndex, dayInMonth) { - return weekIndex || dayInMonth === 1 || dayInMonth > DAYS_OF_WEEK; -} - -module.exports = DateLayer; - - -/***/ }), -/* 51 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var template = __webpack_require__(11); - -module.exports = function(context) { - var source = - '' + - ' ' + - ' ' + - ' ' + - ' ' + - ' ' + - ' ' + - ' ' + - ' ' + - ' ' + - ' ' + - ' ' + - ' ' + - ' ' + - ' {{each weeks}}' + - ' ' + - ' {{each @this}}' + - ' ' + - ' {{/each}}' + - ' ' + - ' {{/each}}' + - ' ' + - '
    Dates
    {{Sun}}{{Mon}}{{Tue}}{{Wed}}{{Thu}}{{Fri}}{{Sat}}
    {{@this["dayInMonth"]}}
    '; - - return template(source, context); -}; - - -/***/ }), -/* 52 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * @fileoverview Month layer - * @author NHN. FE Development Lab - */ - - - -var defineClass = __webpack_require__(0); - -var bodyTmpl = __webpack_require__(53); -var LayerBase = __webpack_require__(20); -var TYPE_MONTH = __webpack_require__(1).TYPE_MONTH; -var dateUtil = __webpack_require__(5); - -var DATE_SELECTOR = '.tui-calendar-month'; - -/** - * @class - * @extends LayerBase - * @param {string} language - Initial language - * @ignore - */ -var MonthLayer = defineClass( - LayerBase, - /** @lends MonthLayer.prototype */ { - init: function(language) { - LayerBase.call(this, language); - }, - - /** - * Layer type - * @type {string} - * @private - */ - _type: TYPE_MONTH, - - /** - * @override - * @returns {object} Template context - * @private - */ - _makeContext: function(date) { - var monthsShort = this._localeText.titles.MMM; - - return { - year: date.getFullYear(), - Jan: monthsShort[0], - Feb: monthsShort[1], - Mar: monthsShort[2], - Apr: monthsShort[3], - May: monthsShort[4], - Jun: monthsShort[5], - Jul: monthsShort[6], - Aug: monthsShort[7], - Sep: monthsShort[8], - Oct: monthsShort[9], - Nov: monthsShort[10], - Dec: monthsShort[11], - getFirstDayTimestamp: dateUtil.getFirstDayTimestamp - }; - }, - - /** - * Render month-layer element - * @override - * @param {Date} date Date to render - * @param {HTMLElement} container A container element for the rendered element - */ - render: function(date, container) { - var context = this._makeContext(date); - - container.innerHTML = bodyTmpl(context); - this._element = container.firstChild; - }, - - /** - * Returns month elements - * @override - * @returns {HTMLElement[]} - */ - getDateElements: function() { - return this._element.querySelectorAll(DATE_SELECTOR); - } - } -); - -module.exports = MonthLayer; - - -/***/ }), -/* 53 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var template = __webpack_require__(11); - -module.exports = function(context) { - var source = - '' + - ' ' + - ' ' + - ' ' + - ' ' + - ' ' + - ' ' + - ' ' + - ' ' + - ' ' + - ' ' + - ' ' + - ' ' + - ' ' + - ' ' + - ' ' + - ' ' + - ' ' + - ' ' + - ' ' + - ' ' + - ' ' + - '
    Months
    {{Jan}}{{Feb}}{{Mar}}{{Apr}}
    {{May}}{{Jun}}{{Jul}}{{Aug}}
    {{Sep}}{{Oct}}{{Nov}}{{Dec}}
    '; - - return template(source, context); -}; - - -/***/ }), -/* 54 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * @fileoverview Year layer - * @author NHN. FE Development Lab - */ - - - -var defineClass = __webpack_require__(0); - -var bodyTmpl = __webpack_require__(55); -var LayerBase = __webpack_require__(20); -var TYPE_YEAR = __webpack_require__(1).TYPE_YEAR; -var dateUtil = __webpack_require__(5); - -var DATE_SELECTOR = '.tui-calendar-year'; - -/** - * @class - * @extends LayerBase - * @param {string} language - Initial language - * @ignore - */ -var YearLayer = defineClass( - LayerBase, - /** @lends YearLayer.prototype */ { - init: function(language) { - LayerBase.call(this, language); - }, - - /** - * Layer type - * @type {string} - * @private - */ - _type: TYPE_YEAR, - - /** - * @override - * @returns {object} Template context - * @private - */ - _makeContext: function(date) { - var year = date.getFullYear(); - - return { - yearGroups: [ - dateUtil.getRangeArr(year - 4, year - 2), - dateUtil.getRangeArr(year - 1, year + 1), - dateUtil.getRangeArr(year + 2, year + 4) - ], - getFirstDayTimestamp: dateUtil.getFirstDayTimestamp - }; - }, - - /** - * Render year-layer element - * @override - * @param {Date} date Date to render - * @param {HTMLElement} container A container element for the rendered element - */ - render: function(date, container) { - var context = this._makeContext(date); - - container.innerHTML = bodyTmpl(context); - this._element = container.firstChild; - }, - - /** - * Returns year elements - * @override - * @returns {HTMLElement[]} - */ - getDateElements: function() { - return this._element.querySelectorAll(DATE_SELECTOR); - } - } -); - -module.exports = YearLayer; - - -/***/ }), -/* 55 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var template = __webpack_require__(11); - -module.exports = function(context) { - var source = - '' + - ' ' + - ' ' + - ' {{each yearGroups}}' + - ' ' + - ' {{each @this}}' + - ' ' + - ' {{/each}}' + - ' ' + - ' {{/each}}' + - ' ' + - '
    Years
    ' + - ' {{@this}}' + - '
    '; - - return template(source, context); -}; - - -/***/ }), -/* 56 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * @fileoverview RangeModel - * @author NHN. FE Development Lab - */ - - - -var forEachArray = __webpack_require__(2); -var defineClass = __webpack_require__(0); -var isNumber = __webpack_require__(15); - -var Range = __webpack_require__(57); -var util = __webpack_require__(4); - -/** - * @class - * @ignore - * @param {Array.>} ranges - Ranges - */ -var RangeModel = defineClass( - /** @lends RangeModel.prototype */ { - init: function(ranges) { - ranges = ranges || []; - - /** - * @type {Array.} - * @private - */ - this._ranges = []; - - forEachArray( - ranges, - function(range) { - this.add(range[0], range[1]); - }, - this - ); - }, - - /** - * Whether the ranges contain a time or time-range - * @param {number} start - Start - * @param {number} [end] - End - * @returns {boolean} - */ - contains: function(start, end) { - var i = 0; - var length = this._ranges.length; - var range; - - for (; i < length; i += 1) { - range = this._ranges[i]; - if (range.contains(start, end)) { - return true; - } - } - - return false; - }, - - /** - * Whether overlaps with a point or range - * @param {number} start - Start - * @param {number} [end] - End - * @returns {boolean} - */ - hasOverlap: function(start, end) { - var i = 0; - var length = this._ranges.length; - var range; - - for (; i < length; i += 1) { - range = this._ranges[i]; - if (range.isOverlapped(start, end)) { - return true; - } - } - - return false; - }, - - /** - * Add range - * @param {number} start - Start - * @param {number} [end] - End - */ - add: function(start, end) { - var overlapped = false; - var i = 0; - var len = this._ranges.length; - var range; - - for (; i < len; i += 1) { - range = this._ranges[i]; - overlapped = range.isOverlapped(start, end); - - if (overlapped) { - range.merge(start, end); - break; - } - - if (start < range.start) { - break; - } - } - - if (!overlapped) { - this._ranges.splice(i, 0, new Range(start, end)); - } - }, - - /** - * Returns minimum value in ranges - * @returns {number} - */ - getMinimumValue: function() { - return this._ranges[0].start; - }, - - /** - * Returns maximum value in ranges - * @returns {number} - */ - getMaximumValue: function() { - var length = this._ranges.length; - - return this._ranges[length - 1].end; - }, - - /** - * @param {number} start - Start - * @param {number} [end] - End - */ - exclude: function(start, end) { - if (!isNumber(end)) { - end = start; - } - - forEachArray( - this._ranges, - function(range) { - var rangeEnd; - - if (range.isOverlapped(start, end)) { - rangeEnd = range.end; // Save before excluding - range.exclude(start, end); - - if (end + 1 <= rangeEnd) { - this.add(end + 1, rangeEnd); // Add split range - } - } - }, - this - ); - - // Reduce empty ranges - this._ranges = util.filter(this._ranges, function(range) { - return !range.isEmpty(); - }); - }, - - /** - * Returns the first overlapped range from the point or range - * @param {number} start - Start - * @param {number} end - End - * @returns {Array.} - [start, end] - */ - findOverlappedRange: function(start, end) { - var i = 0; - var len = this._ranges.length; - var range; - - for (; i < len; i += 1) { - range = this._ranges[i]; - if (range.isOverlapped(start, end)) { - return [range.start, range.end]; - } - } - - return null; - } - } -); - -module.exports = RangeModel; - - -/***/ }), -/* 57 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * @fileoverview Range (in RangeModel) - * @author NHN. FE Development Lab - */ - - - -var defineClass = __webpack_require__(0); -var isNumber = __webpack_require__(15); - -/** - * @class - * @ignore - * @param {number} start - Start of range - * @param {number} [end] - End of range - */ -var Range = defineClass( - /** @lends Range.prototype */ { - init: function(start, end) { - this.setRange(start, end); - }, - - /** - * Set range - * @param {number} start - Start number - * @param {number} [end] - End number - */ - setRange: function(start, end) { - if (!isNumber(end)) { - end = start; - } - - this.start = Math.min(start, end); - this.end = Math.max(start, end); - }, - - /** - * Merge range - * @param {number} start - Start - * @param {number} [end] - End - */ - merge: function(start, end) { - if (!isNumber(start) || !isNumber(end) || !this.isOverlapped(start, end)) { - return; - } - - this.start = Math.min(start, this.start); - this.end = Math.max(end, this.end); - }, - - /** - * Whether being empty. - * @returns {boolean} - */ - isEmpty: function() { - return !isNumber(this.start) || !isNumber(this.end); - }, - - /** - * Set empty - */ - setEmpty: function() { - this.start = this.end = null; - }, - - /** - * Whether containing a range. - * @param {number} start - Start - * @param {number} [end] - End - * @returns {boolean} - */ - contains: function(start, end) { - if (!isNumber(end)) { - end = start; - } - - return this.start <= start && end <= this.end; - }, - - /** - * Whether overlaps with a range - * @param {number} start - Start - * @param {number} [end] - End - * @returns {boolean} - */ - isOverlapped: function(start, end) { - if (!isNumber(end)) { - end = start; - } - - return this.start <= end && this.end >= start; - }, - - /** - * Exclude a range - * @param {number} start - Start - * @param {number} end - End - */ - exclude: function(start, end) { - if (start <= this.start && end >= this.end) { - // Excluding range contains this - this.setEmpty(); - } else if (this.contains(start)) { - this.setRange(this.start, start - 1); - } else if (this.contains(end)) { - this.setRange(end + 1, this.end); - } - } - } -); - -module.exports = Range; - - -/***/ }), -/* 58 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var template = __webpack_require__(11); - -module.exports = function(context) { - var source = - '
    ' + - ' {{if timePicker}}' + - ' {{if isTab}}' + - '
    ' + - ' ' + - ' ' + - '
    ' + - '
    ' + - '
    ' + - '
    ' + - '
    ' + - ' {{else}}' + - '
    ' + - '
    ' + - '
    ' + - ' ' + - ' {{/if}}' + - ' {{else}}' + - '
    ' + - '
    ' + - '
    ' + - ' {{/if}}' + - '
    '; - - return template(source, context); -}; - - -/***/ }), -/* 59 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * @fileoverview DatePicker input(element) component - * @author NHN. FE Development Lab - */ - - - -var defineClass = __webpack_require__(0); -var CustomEvents = __webpack_require__(8); -var on = __webpack_require__(31); -var off = __webpack_require__(33); - -var DateTimeFormatter = __webpack_require__(30); -var mouseTouchEvent = __webpack_require__(19); -var util = __webpack_require__(4); - -var DEFAULT_FORMAT = 'yyyy-MM-dd'; - -/** - * DatePicker Input - * @ignore - * @class - * @param {string|HTMLElement} inputElement - Input element or selector - * @param {object} option - Option - * @param {string} option.id - Id - * @param {string} option.format - Text format - */ -var DatePickerInput = defineClass( - /** @lends DatePickerInput.prototype */ { - init: function(inputElement, option) { - option.format = option.format || DEFAULT_FORMAT; - - /** - * Input element - * @type {HTMLElement} - * @private - */ - this._input = util.getElement(inputElement); - - /** - * Id - * @type {string} - * @private - */ - this._id = option.id; - - /** - * LocaleText titles - * @type {Object} - * @private - */ - this._titles = option.localeText.titles; - - /** - * Text<->DateTime Formatter - * @type {DateTimeFormatter} - * @private - */ - this._formatter = new DateTimeFormatter(option.format, this._titles); - - this._setEvents(); - }, - - /** - * Change locale titles - * @param {object} titles - locale text in format - */ - changeLocaleTitles: function(titles) { - this._titles = titles; - }, - - /** - * Set input 'click', 'change' event - * @private - */ - _setEvents: function() { - if (this._input) { - on(this._input, 'change', this._onChangeHandler, this); - mouseTouchEvent.on(this._input, 'click', this._onClickHandler, this); - } - }, - - /** - * Remove events - * @private - */ - _removeEvents: function() { - this.off(); - - if (this._input) { - off(this._input, 'change', this._onChangeHandler); - mouseTouchEvent.off(this._input, 'click', this._onClickHandler); - } - }, - - /** - * Onchange handler - */ - _onChangeHandler: function() { - this.fire('change'); - }, - - /** - * Onclick handler - */ - _onClickHandler: function() { - this.fire('click'); - }, - - /** - * Check element is same as the input element. - * @param {HTMLElement} el - To check matched set of elements - * @returns {boolean} - */ - is: function(el) { - return this._input === el; - }, - - /** - * Enable input - */ - enable: function() { - if (this._input) { - this._input.removeAttribute('disabled'); - } - }, - - /** - * Disable input - */ - disable: function() { - if (this._input) { - this._input.setAttribute('disabled', true); - } - }, - - /** - * Return format - * @returns {string} - */ - getFormat: function() { - return this._formatter.getRawString(); - }, - - /** - * Set format - * @param {string} format - Format - */ - setFormat: function(format) { - if (!format) { - return; - } - - this._formatter = new DateTimeFormatter(format, this._titles); - }, - - /** - * Clear text - */ - clearText: function() { - if (this._input) { - this._input.value = ''; - } - }, - - /** - * Set value from date - * @param {Date} date - Date - */ - setDate: function(date) { - if (this._input) { - this._input.value = this._formatter.format(date); - } - }, - - /** - * Returns date from input-text - * @returns {Date} - * @throws {Error} - */ - getDate: function() { - var value = ''; - - if (this._input) { - value = this._input.value; - } - - return this._formatter.parse(value); - }, - - /** - * Destroy - */ - destroy: function() { - this._removeEvents(); - - this._input = this._id = this._formatter = null; - } - } -); - -CustomEvents.mixin(DatePickerInput); -module.exports = DatePickerInput; - - -/***/ }), -/* 60 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * @fileoverview Date-Range picker - * @author NHN. FE Development Lab - */ - - - -var forEachArray = __webpack_require__(2); -var defineClass = __webpack_require__(0); -var CustomEvents = __webpack_require__(8); -var addClass = __webpack_require__(16); -var getData = __webpack_require__(26); -var removeClass = __webpack_require__(18); -var extend = __webpack_require__(7); - -var DatePicker = __webpack_require__(21); -var dateUtil = __webpack_require__(5); -var constants = __webpack_require__(1); -var util = __webpack_require__(4); - -var CLASS_NAME_RANGE_PICKER = 'tui-rangepicker'; -var CLASS_NAME_SELECTED = constants.CLASS_NAME_SELECTED; -var CLASS_NAME_SELECTED_RANGE = 'tui-is-selected-range'; - -/** - * @class - * @description - * Create a date-range picker by {@link DatePicker#createRangePicker DatePicker.createRangePicker()}. - * @see {@link /tutorial-example08-daterangepicker DateRangePicker example} - * @param {object} options - DateRangePicker options - * @param {object} options.startpicker - Startpicker options - * @param {HTMLElement|string} options.startpicker.input - Startpicker input element or selector - * @param {HTMLElement|string} options.startpicker.container - Startpicker container element or selector - * @param {Date|number} [options.startpicker.date] - Initial date of the start picker. Set by a Date instance or a number(timestamp). (default: no initial date) - * @param {string} [options.startpicker.weekStartDay = 'Sun'] - Start of the week. 'Sun', 'Mon', ..., 'Sat'(default: 'Sun'(start on Sunday)) - * @param {object} options.endpicker - Endpicker options - * @param {HTMLElement|string} options.endpicker.input - Endpicker input element or selector - * @param {HTMLElement|string} options.endpicker.container - Endpicker container element or selector - * @param {Date|number} [options.endpicker.date] - Initial date of the end picker. Set by a Date instance or a number(timestamp). (default: no initial date) - * @param {string} [options.endpicker.weekStartDay = 'Sun'] - Start of the week. 'Sun', 'Mon', ..., 'Sat'(default: 'Sun'(start on Sunday)) - * @param {('date'|'month'|'year')} [options.type = 'date'] - DatePicker type. Determine whether to choose a date, month, or year. - * @param {string} [options.language='en'] - Language code. English('en') and Korean('ko') are provided as default. To use the other languages, use {@link DatePicker#localeTexts DatePicker.localeTexts}. - * @param {object|boolean} [options.timePicker] - [TimePicker](https://nhn.github.io/tui.time-picker/latest) options. Refer to the [TimePicker instance's options](https://nhn.github.io/tui.time-picker/latest/TimePicker). To create the TimePicker without customization, set to true. - * @param {object} [options.calendar] - {@link Calendar} options. Refer to the {@link Calendar Calendar instance's options}. - * @param {string} [options.format = 'yyyy-mm-dd'] - Format of the Date string - * @param {Array.>} [options.selectableRanges] - Ranges of selectable date. Set by Date instances or numbers(timestamp). - * @param {boolean} [options.showAlways = false] - Show the DateRangePicker always - * @param {boolean} [options.autoClose = true] - Close the DateRangePicker after clicking the date - * @param {boolean} [options.usageStatistics = true] - Send a hostname to Google Analytics (default: true) - * @example - * // ES6 - * import DatePicker from 'tui-date-picker' - * - * // CommonJS - * const DatePicker = require('tui-date-picker'); - * - * // Browser - * const DatePicker = tui.DatePicker; - * - * const rangePicker = DatePicker.createRangePicker({ - * startpicker: { - * input: '#start-input', - * container: '#start-container' - * date: new Date(2019, 3, 1), - * weekStartDay: 'Mon', - * }, - * endpicker: { - * input: '#end-input', - * container: '#end-container', - * weekStartDay: 'Mon', - * }, - * type: 'date', - * format: 'yyyy-MM-dd' - * selectableRanges: [ - * [new Date(2017, 3, 1), new Date(2017, 5, 1)], - * [new Date(2017, 6, 3), new Date(2017, 10, 5)] - * ] - * }); - */ -var DateRangePicker = defineClass( - /** @lends DateRangePicker.prototype */ { - init: function(options) { - var startpickerOpt, endpickerOpt; - - options = options || {}; - startpickerOpt = options.startpicker; - endpickerOpt = options.endpicker; - - if (!startpickerOpt) { - throw new Error('The "startpicker" option is required.'); - } - if (!endpickerOpt) { - throw new Error('The "endpicker" option is required.'); - } - - /** - * Start picker - * @type {DatePicker} - * @private - */ - this._startpicker = null; - - /** - * End picker - * @type {DatePicker} - * @private - */ - this._endpicker = null; - - this._isRangeSet = false; - - this._preEndPickerDate = new Date().getDate(); - - this._initializePickers(options); - this._syncRangesToEndpicker(); - }, - - /** - * Create picker - * @param {Object} options - DatePicker options - * @private - */ - _initializePickers: function(options) { - var startpickerContainer = util.getElement(options.startpicker.container); - var endpickerContainer = util.getElement(options.endpicker.container); - var startInput = util.getElement(options.startpicker.input); - var endInput = util.getElement(options.endpicker.input); - - var startpickerOpt = extend({}, options, { - input: { - element: startInput, - format: options.format - }, - date: options.startpicker.date, - weekStartDay: options.startpicker.weekStartDay - }); - var endpickerOpt = extend({}, options, { - input: { - element: endInput, - format: options.format - }, - date: options.endpicker.date, - weekStartDay: options.endpicker.weekStartDay - }); - - this._startpicker = new DatePicker(startpickerContainer, startpickerOpt); - this._startpicker.addCssClass(CLASS_NAME_RANGE_PICKER); - this._startpicker.on('change', this._onChangeStartpicker, this); - this._startpicker.on('draw', this._onDrawPicker, this); - - this._endpicker = new DatePicker(endpickerContainer, endpickerOpt); - this._endpicker.addCssClass(CLASS_NAME_RANGE_PICKER); - this._endpicker.on('change', this._onChangeEndpicker, this); - this._endpicker.on('draw', this._onDrawPicker, this); - }, - - /** - * Set selection-class to elements after calendar drawing - * @param {Object} eventData - Event data {@link DatePicker#event:draw} - * @private - */ - _onDrawPicker: function(eventData) { - var calendarType = eventData.type; - var startDate = this._startpicker.getDate(); - var endDate = this._endpicker.getDate(); - - if (!startDate) { - return; - } - - if (!endDate) { - // Convert null to invaild date. - endDate = new Date(NaN); - } - - forEachArray( - eventData.dateElements, - function(el) { - var elDate = new Date(Number(getData(el, 'timestamp'))); - var isInRange = dateUtil.inRange(startDate, endDate, elDate, calendarType); - var isSelected = - dateUtil.isSame(startDate, elDate, calendarType) || - dateUtil.isSame(endDate, elDate, calendarType); - - this._setRangeClass(el, isInRange); - this._setSelectedClass(el, isSelected); - }, - this - ); - }, - - /** - * Set range class to element - * @param {HTMLElement} el - Element - * @param {boolean} isInRange - In range - * @private - */ - _setRangeClass: function(el, isInRange) { - if (isInRange) { - addClass(el, CLASS_NAME_SELECTED_RANGE); - } else { - removeClass(el, CLASS_NAME_SELECTED_RANGE); - } - }, - - /** - * Set selected class to element - * @param {HTMLElement} el - Element - * @param {boolean} isSelected - Is selected - * @private - */ - _setSelectedClass: function(el, isSelected) { - if (isSelected) { - addClass(el, CLASS_NAME_SELECTED); - } else { - removeClass(el, CLASS_NAME_SELECTED); - } - }, - - /** - * Sync ranges to endpicker - * @private - */ - _syncRangesToEndpicker: function() { - var startDate = this._startpicker.getDate(); - var overlappedRange; - - if (startDate) { - overlappedRange = this._startpicker.findOverlappedRange( - dateUtil.cloneWithStartOf(startDate).getTime(), - dateUtil.cloneWithEndOf(startDate).getTime() - ); - - this._endpicker.enable(); - this._endpicker.setRanges([[startDate.getTime(), overlappedRange[1].getTime()]]); - - this._setTimeRangeOnEndPicker(); - } else { - this._endpicker.setNull(); - this._endpicker.disable(); - } - }, - - /** - * After change on start-picker - * @private - */ - _onChangeStartpicker: function() { - this._syncRangesToEndpicker(); - /** - * Occur after the start date is changed. - * @event DateRangePicker#change:start - * @see {@link https://nhn.github.io/tui.code-snippet/latest/CustomEvents#on rangePicker.on()} to bind event handlers. - * @see {@link https://nhn.github.io/tui.code-snippet/latest/CustomEvents#off rangePicker.off()} to unbind event handlers. - * @see Refer to {@link https://nhn.github.io/tui.code-snippet/latest/CustomEvents CustomEvents} for more methods. DateRangePicker mixes in the methods from CustomEvents. - * @example - * // bind the 'change:start' event - * rangePicker.on('change:start', () => { - * console.log(`Start date: ${rangePicker.getStartDate()}`); - * }); - * - * // unbind the 'change:start' event - * rangePicker.off('change:start'); - */ - this.fire('change:start'); - }, - - /** - * After change on end-picker - * @private - */ - _onChangeEndpicker: function() { - /** - * Occur after the end date is changed. - * @event DateRangePicker#change:end - * @see {@link https://nhn.github.io/tui.code-snippet/latest/CustomEvents#on rangePicker.on()} to bind event handlers. - * @see {@link https://nhn.github.io/tui.code-snippet/latest/CustomEvents#off rangePicker.off()} to unbind event handlers. - * @see Refer to {@link https://nhn.github.io/tui.code-snippet/latest/CustomEvents CustomEvents} for more methods. DateRangePicker mixes in the methods from CustomEvents. - * @example - * // bind the 'change:end' event - * rangePicker.on('change:end', () => { - * console.log(`End date: ${rangePicker.getEndDate()}`); - * }); - * - * // unbind the 'change:end' event - * rangePicker.off('change:end'); - */ - - var date; - var endPickerDate = this._endpicker.getDate(); - - if (endPickerDate) { - date = endPickerDate.getDate(); - if (this._preEndPickerDate !== date) { - this._setTimeRangeOnEndPicker(); - } - - this._preEndPickerDate = date; - } else { - this._preEndPickerDate = null; - } - - this.fire('change:end'); - }, - - /** - * Set time range on end picker - * @private - */ - _setTimeRangeOnEndPicker: function() { - var pickerDate, timeRange; - var endTimePicker = this._endpicker._timePicker; - - if (!endTimePicker) { - return; - } - - pickerDate = this._endpicker.getDate() || this._startpicker.getDate(); - timeRange = this._getTimeRangeFromStartPicker(); - - if (pickerDate && timeRange[pickerDate.getDate()]) { - endTimePicker.setRange(timeRange[pickerDate.getDate()]); - this._isRangeSet = true; - } else if (this._isRangeSet) { - endTimePicker.setRange({ hour: 0, minute: 0 }); - endTimePicker.resetMinuteRange(); - this._isRangeSet = false; - } - }, - - /** - * Return object of time range from start picker. - * @returns {object} - * @private - */ - _getTimeRangeFromStartPicker: function() { - var startDate = this._startpicker.getDate(); - var timeRange = {}; - - timeRange[startDate.getDate()] = { - hour: startDate.getHours(), - minute: startDate.getMinutes() - }; - - return timeRange; - }, - - /** - * Return a start-datepicker. - * @returns {DatePicker} - */ - getStartpicker: function() { - return this._startpicker; - }, - - /** - * Return a end-datepicker. - * @returns {DatePicker} - */ - getEndpicker: function() { - return this._endpicker; - }, - - /** - * Set the start date. - * @param {Date} date - Start date - */ - setStartDate: function(date) { - this._startpicker.setDate(date); - }, - - /** - * Return the start date. - * @returns {?Date} - */ - getStartDate: function() { - return this._startpicker.getDate(); - }, - - /** - * Return the end date. - * @returns {?Date} - */ - getEndDate: function() { - return this._endpicker.getDate(); - }, - - /** - * Set the end date. - * @param {Date} date - End date - */ - setEndDate: function(date) { - this._endpicker.setDate(date); - }, - - /** - * Set selectable ranges. - * @param {Array.>} ranges - Selectable ranges. Use Date instances or numbers(timestamp). - */ - setRanges: function(ranges) { - this._startpicker.setRanges(ranges); - this._syncRangesToEndpicker(); - }, - - /** - * Add a selectable range. Use Date instances or numbers(timestamp). - * @param {Date|number} start - the start date - * @param {Date|number} end - the end date - */ - addRange: function(start, end) { - this._startpicker.addRange(start, end); - this._syncRangesToEndpicker(); - }, - - /** - * Remove a range. Use Date instances or numbers(timestamp). - * @param {Date|number} start - the start date - * @param {Date|number} end - the end date - * @param {null|'date'|'month'|'year'} type - Range type. If falsy, start and end values are considered as timestamp - */ - removeRange: function(start, end, type) { - this._startpicker.removeRange(start, end, type); - this._syncRangesToEndpicker(); - }, - - /** - * Change language. - * @param {string} language - Language code. English('en') and Korean('ko') are provided as default. - * @see To set to the other languages, use {@link DatePicker#localeTexts DatePicker.localeTexts}. - */ - changeLanguage: function(language) { - this._startpicker.changeLanguage(language); - this._endpicker.changeLanguage(language); - }, - - /** - * Destroy the date-range picker. - */ - destroy: function() { - this.off(); - this._startpicker.destroy(); - this._endpicker.destroy(); - this._startpicker = this._endpicker = null; - } - } -); - -CustomEvents.mixin(DateRangePicker); -module.exports = DateRangePicker; - - -/***/ }), -/* 61 */ -/***/ (function(module, exports, __webpack_require__) { - -// extracted by mini-css-extract-plugin - -/***/ }) -/******/ ]); -}); \ No newline at end of file diff --git a/src/main/webapp/resources/3rd-party/tui/grid/4.21.5/tui-date-picker/tui-date-picker.min.css b/src/main/webapp/resources/3rd-party/tui/grid/4.21.5/tui-date-picker/tui-date-picker.min.css deleted file mode 100644 index ee60019a..00000000 --- a/src/main/webapp/resources/3rd-party/tui/grid/4.21.5/tui-date-picker/tui-date-picker.min.css +++ /dev/null @@ -1,6 +0,0 @@ -/*! - * TOAST UI Date Picker - * @version 4.3.1 - * @author NHN. FE Development Lab - * @license MIT - */.tui-calendar{position:relative;background-color:#fff;border:1px solid #aaa;width:274px}.tui-calendar *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.tui-calendar div{text-align:center}.tui-calendar caption{padding:0}.tui-calendar caption span{overflow:hidden;position:absolute;clip:rect(0 0 0 0);width:1px;height:1px;margin:-1px;padding:0}.tui-calendar button,.tui-datepicker-dropdown button,.tui-datepicker-selector button{-webkit-appearance:none;-moz-appearance:none;appearance:none}.tui-datepicker-dropdown .tui-ico-check,.tui-ico-caret,.tui-ico-date,.tui-ico-time{overflow:hidden;display:inline-block;width:1px;height:1px;line-height:300px;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC8AAAA+CAYAAAC7rUKSAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2ZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDpERjdGMzkzODVEQkRFNjExQkVCMjlDOUFDNzZDM0E5NCIgeG1wTU06RG9jdW1lbnRJRD0ieG1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Aog/khLxxHOYCbDvuyBM2LS+Az1TIEfRKUIOiayqiONzU4hn0uCXknR1WKGp5NXZ+u9iovvxcBSj7RRkSEV80zfztIy4PaYh+1r1QAVUkRpUmgzFSUNdb51Rce+4+NpJ+AhYxQ21Bb6gO6BSuSEchSldohmjVPU44y6zx9fcBVHnDDk3jwpnhOp6cIkiXQNZVRHbWhtgVTlZD6v8LNTPYmPvWYldkazWZ9yKtQopW0yzBniMmNanBxrkVhhntCliTWVOWBCahKxwNobm52fKjZvXt35j5RQFX5IpPUu4tZWcFM0qnKtYhnESsQAQZd0/8Q1uVQlca14hcoE8lA0KAP2pGfqKrUjGb2KXaVfTZlokZu+jW7lKPHRFVuz+MJNpn4dpOTBWuwBbynnOUsnjl5emWeTypDt8NOhPhaJkd/PNX+s0bu9STLllsRfXZuI/T3EhvbaEJyo+CMz+ETF/13TXst+QDnSh9ml7VNfbgsiIrmYtYJlpkZ/dGU0tQ/RvwbUv+oIgn+tolksVywZZ9gEomSpvdB6l0Y6aYoL/CckU1bsAM8gLAocScpPQH7GR9+foG4A3FCpNP/BBgAdZ3B2yZg0vUAAAAASUVORK5CYII=) no-repeat}.tui-ico-date{width:12px;height:12px;background-position:-17px 0}.tui-ico-time{width:12px;height:12px;background-position:0 -30px}.tui-ico-caret{width:7px;height:4px;background-position:0 -58px}.tui-calendar-month,.tui-calendar-year{width:202px}.tui-calendar-month .tui-calendar-body,.tui-calendar-year .tui-calendar-body{width:202px;margin:0 auto}.tui-calendar .tui-calendar-header{position:relative;border-bottom:1px solid #efefef}.tui-calendar .tui-calendar-header-inner{padding:17px 50px 15px;height:50px}.tui-calendar .tui-calendar-title-today{height:30px;margin:0;font-size:12px;line-height:34px;color:#777;background-color:#f4f4f4}.tui-calendar .tui-calendar-title-today:hover{color:#333;background-color:#edf4fc;cursor:pointer}.tui-calendar .tui-calendar-title{display:inline-block;font-size:18px;font-weight:400;font-style:normal;line-height:1;color:#333;cursor:default;vertical-align:top}.tui-calendar-btn{overflow:hidden;position:absolute;top:0;width:32px;height:50px;line-height:400px;z-index:10;cursor:pointer;border:none;background-color:#fff}.tui-calendar .tui-calendar-btn-prev-month{left:0}.tui-calendar .tui-calendar-btn-next-month{right:0}.tui-calendar .tui-calendar-btn-prev-year{left:0}.tui-calendar .tui-calendar-btn-next-year{right:0}.tui-calendar .tui-calendar-btn-next-month:after,.tui-calendar .tui-calendar-btn-next-year:after,.tui-calendar .tui-calendar-btn-prev-month:after,.tui-calendar .tui-calendar-btn-prev-year:after{overflow:hidden;position:absolute;top:50%;margin-top:-5px;line-height:400px;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC8AAAA+CAYAAAC7rUKSAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2ZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDpERjdGMzkzODVEQkR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4gM05ytKEOs6Pb9rLa/1QLGfvj1RGdZp19CbUvpIDVXmGVWUuCUBkbxAog/khLxxHOYCbDvuyBM2LS+Az1TIEfRKUIOiayqiONzU4hn0uCXknR1WKGp5NXZ+u9iovvxcBSj7RRkSEV80zfztIy4PaYh+1r1QAVUkRpUmgzFSUNdb51Rce+4+NpJ+AhYxQ21Bb6gO6BSuSEchSldohmjVPU44y6zx9fcBVHnDDk3jwpnhOp6cIkiXQNZVRHbWhtgVTlZD6v8LNTPYmPvWYldkazWZ9yKtQopW0yzBniMmNanBxrkVhhntCliTWVOWBCahKxwNobm52fKjZvXt35j5RQFX5IpPUu4tZWcFM0qnKtYhnESsQAQZd0/8Q1uVQlca14hcoE8lA0KAP2pGfqKrUjGb2KXaVfTZlokZu+jW7lKPHRFVuz+MJNpn4dpOTBWuwBbynnOUsnjl5emWeTypDt8NOhPhaJkd/PNX+s0bu9STLllsRfXZuI/T3EhvbaEJyo+CMz+ETF/13TXst+QDnSh9ml7VNfbgsiIrmYtYJlpkZ/dGU0tQ/RvwbUv+oIgn+tolksVywZZ9gEomSpvdB6l0Y6aYoL/CckU1bsAM8gLAocScpPQH7GR9+foG4A3FCpNP/BBgAdZ3B2yZg0vUAAAAASUVORK5CYII=) no-repeat;content:""}.tui-calendar .tui-calendar-btn-prev-month:after,.tui-calendar.tui-calendar-month .tui-calendar-btn-prev-year:after{width:6px;height:11px;left:50%;margin-left:-3px;background-position:0 0}.tui-calendar .tui-calendar-btn-next-month:after,.tui-calendar.tui-calendar-month .tui-calendar-btn-next-year:after{width:6px;height:11px;right:50%;margin-right:-3px;background-position:-8px 0}.tui-calendar .tui-calendar-btn-prev-year:after{width:11px;height:10px;left:50%;margin-left:-6px;background-position:-16px -36px}.tui-calendar .tui-calendar-btn-next-year:after{width:11px;height:10px;right:50%;margin-right:-6px;background-position:-16px -49px}.tui-calendar.tui-calendar-month .tui-calendar-btn-next-year,.tui-calendar.tui-calendar-month .tui-calendar-btn-prev-year{width:50px}.tui-calendar .tui-calendar-has-btns .tui-calendar-btn-prev-year{left:10px}.tui-calendar .tui-calendar-has-btns .tui-calendar-btn-next-year{right:10px}.tui-calendar .tui-calendar-has-btns .tui-calendar-btn-prev-month{left:44px}.tui-calendar .tui-calendar-has-btns .tui-calendar-btn-next-month{right:44px}.tui-calendar .tui-calendar-body-header th{color:#777}.tui-calendar .tui-calendar-body-inner{width:100%;margin:0 auto;table-layout:fixed;border-collapse:collapse;text-align:center;font-size:12px}.tui-calendar th{font-weight:400;cursor:default}.tui-calendar td,.tui-calendar th{height:39px;text-align:center;color:#999}.tui-calendar .tui-is-blocked:hover{cursor:default}.tui-calendar .tui-calendar-month{width:25%;height:50px}.tui-calendar .tui-calendar-today{color:#4b96e6}.tui-calendar .tui-calendar-next-month,.tui-calendar .tui-calendar-prev-month{color:#ccc}.tui-calendar .tui-calendar-next-month.tui-calendar-date,.tui-calendar .tui-calendar-prev-month.tui-calendar-date{visibility:hidden}.tui-calendar .tui-calendar-btn-choice{background-color:#4b96e6}.tui-calendar .tui-calendar-btn-close{background-color:#777}.tui-calendar .tui-calendar-year{width:25%;height:50px}.tui-calendar.tui-calendar-year .tui-calendar-btn-prev-year:after{width:6px;height:11px;left:50%;margin-left:-3px;background-position:0 0}.tui-calendar.tui-calendar-year .tui-calendar-btn-next-year:after{width:6px;height:11px;right:50%;margin-right:-3px;background-position:-8px 0}.tui-calendar.tui-calendar-year .tui-calendar-btn-next-year,.tui-calendar.tui-calendar-year .tui-calendar-btn-prev-year{width:50px}.tui-datepicker{border:1px solid #aaa;background-color:#fff;position:absolute}.tui-datepicker *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.tui-datepicker-type-date{width:274px}.tui-datepicker-body .tui-calendar-month,.tui-datepicker-body .tui-calendar-year{width:auto}.tui-datepicker .tui-calendar{border:0}.tui-datepicker .tui-calendar-title{cursor:pointer}.tui-datepicker .tui-calendar-title.tui-calendar-title-year-to-year{cursor:auto}.tui-datepicker-body .tui-timepicker,.tui-datepicker-footer .tui-timepicker{width:274px;position:static;padding:20px 46px 20px 47px;border:0}.tui-datepicker-footer .tui-timepicker{border-top:1px solid #eee}.tui-datepicker-selector{padding:10px;font-size:0;text-align:center;border-bottom:1px solid #eee}.tui-datepicker-selector-button{width:50%;height:26px;font-size:12px;line-height:23px;border:1px solid #ddd;background-color:#fff;color:#777;outline:none;cursor:pointer}.tui-datepicker-selector-button.tui-is-checked{background-color:#eee;color:#333}.tui-datepicker-selector-button+.tui-datepicker-selector-button{margin-left:-1px}.tui-datepicker-selector-button [class^=tui-ico-]{margin:5px 9px 0 0;vertical-align:top}.tui-datepicker-input.tui-has-focus .tui-ico-date,.tui-datepicker-selector-button.tui-is-checked .tui-ico-date{background-position:-17px -14px}.tui-datepicker-selector-button.tui-is-checked .tui-ico-time{background-position:0 -44px}.tui-datepicker-area{position:relative}.tui-datepicker-input{position:relative;display:inline-block;width:120px;height:28px;vertical-align:top;border:1px solid #ddd}.tui-datepicker-input *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.tui-datepicker-input>input{width:100%;height:100%;padding:6px 27px 6px 10px;font-size:12px;line-height:14px;vertical-align:top;border:0;color:#333}.tui-datepicker-input>.tui-ico-date{position:absolute;top:50%;right:8px;margin:-6px 0 0}.tui-datepicker-input.tui-has-focus{border-color:#aaa}.tui-datetime-input{width:170px}.tui-datepicker .tui-is-blocked{cursor:default;color:#ddd}.tui-datepicker .tui-is-valid{color:#999}.tui-datepicker .tui-is-selectable:hover{background-color:#edf4fc;cursor:pointer}.tui-datepicker .tui-is-selectable.tui-is-selected,.tui-datepicker.tui-rangepicker .tui-is-selectable.tui-is-selected{background-color:#4b96e6;color:#fff}.tui-datepicker.tui-rangepicker .tui-is-selected-range{background-color:#edf4fc}.tui-datepicker-dropdown{display:inline-block;width:120px}.tui-datepicker-dropdown .tui-dropdown-button{width:100%;height:28px;font-size:12px;line-height:20px;border:1px solid #ddd;padding:0 30px 0 10px;text-align:left;background:#fff;cursor:pointer}.tui-datepicker-dropdown{position:relative}.tui-datepicker-dropdown .tui-ico-caret{position:absolute;top:12px;right:10px}.tui-datepicker-dropdown .tui-dropdown-menu{display:none;position:absolute;top:27px;left:0;right:0;width:100%;padding:5px 0;margin:0;overflow-y:auto;min-width:0;max-height:198px;font-size:12px;border:1px solid #ddd;border-top-color:#fff;z-index:10;box-sizing:border-box;box-shadow:none;border-radius:0}.tui-datepicker-dropdown.tui-is-open .tui-dropdown-button{display:block}.tui-datepicker-dropdown.tui-is-open .tui-dropdown-button,.tui-datepicker-dropdown.tui-is-open .tui-dropdown-menu{display:block;border-color:#aaa}.tui-datepicker-dropdown.tui-is-open .tui-ico-caret{background-position:-21px -28px}.tui-datepicker-dropdown .tui-menu-item{overflow:hidden;position:relative;height:28px;line-height:28px;background-color:#fff;z-index:10}.tui-datepicker-dropdown .tui-menu-item-btn{position:relative;width:100%;font-size:12px;font-weight:400;line-height:28px;padding:0 10px 0 30px;text-align:left;color:#333;background-color:#fff;border:0;cursor:pointer;z-index:9}.tui-datepicker-dropdown .tui-menu-item-btn:hover,.tui-menu-item-btn:active,.tui-menu-item-btn:focus{color:#333;background-color:#f4f4f4}.tui-datepicker-dropdown .tui-menu-item .tui-ico-check{display:none;overflow:hidden;position:absolute;width:10px;height:8px;top:10px;left:10px;background-position:-31px -54px;z-index:10;content:"aaa"}.tui-datepicker-dropdown .tui-menu-item.tui-is-selected .tui-ico-check{display:block}.tui-datepicker-dropdown .tui-menu-item.tui-is-selected .tui-menu-item-btn{font-weight:700}.tui-dropdown-area{font-size:0}.tui-dropdown-area .tui-datepicker-dropdown+.tui-datepicker-dropdown{margin-left:5px}.tui-hidden{display:none} \ No newline at end of file diff --git a/src/main/webapp/resources/3rd-party/tui/grid/4.21.5/tui-date-picker/tui-date-picker.min.js b/src/main/webapp/resources/3rd-party/tui/grid/4.21.5/tui-date-picker/tui-date-picker.min.js deleted file mode 100644 index 8fb1d506..00000000 --- a/src/main/webapp/resources/3rd-party/tui/grid/4.21.5/tui-date-picker/tui-date-picker.min.js +++ /dev/null @@ -1,7 +0,0 @@ -/*! - * TOAST UI Date Picker - * @version 4.3.1 - * @author NHN. FE Development Lab - * @license MIT - */ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("tui-time-picker")):"function"==typeof define&&define.amd?define(["tui-time-picker"],e):"object"==typeof exports?exports.DatePicker=e(require("tui-time-picker")):(t.tui=t.tui||{},t.tui.DatePicker=e(t.tui.TimePicker))}(window,(function(t){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="dist",n(n.s=34)}([function(t,e,n){"use strict";var i=n(35),r=n(7);t.exports=function(t,e){var n;return e||(e=t,t=null),n=e.init||function(){},t&&i(n,t),e.hasOwnProperty("static")&&(r(n,e.static),delete e.static),r(n.prototype,e),n}},function(t,e,n){"use strict";t.exports={TYPE_DATE:"date",TYPE_MONTH:"month",TYPE_YEAR:"year",TYPE_HOUR:"hour",TYPE_MINUTE:"minute",TYPE_MERIDIEM:"meridiem",MIN_DATE:new Date(1900,0,1),MAX_DATE:new Date(2999,11,31),DEFAULT_LANGUAGE_TYPE:"en",CLASS_NAME_SELECTED:"tui-is-selected",CLASS_NAME_PREV_MONTH_BTN:"tui-calendar-btn-prev-month",CLASS_NAME_PREV_YEAR_BTN:"tui-calendar-btn-prev-year",CLASS_NAME_NEXT_YEAR_BTN:"tui-calendar-btn-next-year",CLASS_NAME_NEXT_MONTH_BTN:"tui-calendar-btn-next-month",CLASS_NAME_TITLE_TODAY:"tui-calendar-title-today",DEFAULT_WEEK_START_DAY:"Sun",WEEK_START_DAY_MAP:{sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6}}},function(t,e,n){"use strict";t.exports=function(t,e,n){var i=0,r=t.length;for(n=n||null;i=0&&re)for(n=e;n>=t;n-=1)i.push(n);else for(n=t;n<=e;n+=1)i.push(n);return i},cloneWithStartOf:function(t,e){switch(e=e||a,(t=new Date(t)).setHours(0,0,0,0),e){case a:break;case o:t.setDate(1);break;case c:t.setMonth(0,1);break;default:throw Error("Unsupported type: "+e)}return t},cloneWithEndOf:function(t,e){switch(e=e||a,(t=new Date(t)).setHours(23,59,59,999),e){case a:break;case o:t.setMonth(t.getMonth()+1,0);break;case c:t.setMonth(11,31);break;default:throw Error("Unsupported type: "+e)}return t},compare:function(t,e,n){var i,r;return u.isValidDate(t)&&u.isValidDate(e)?(n?(i=u.cloneWithStartOf(t,n).getTime(),r=u.cloneWithStartOf(e,n).getTime()):(i=t.getTime(),r=e.getTime()),i>r?1:i===r?0:-1):NaN},isSame:function(t,e,n){return 0===u.compare(t,e,n)},inRange:function(t,e,n,i){return u.compare(t,n,i)<1&&u.compare(e,n,i)>-1}};t.exports=u},function(t,e,n){"use strict";t.exports=function(t){return t instanceof Array}},function(t,e,n){"use strict";t.exports=function(t,e){var n,i,r,s,a=Object.prototype.hasOwnProperty;for(r=1,s=arguments.length;r-1?e[n][1]+=1:e.push([t,1]))},l.prototype._forgetContext=function(t){var e,n;r(t)&&(e=this._safeContext(),(n=this._indexOfContext(t))>-1&&(e[n][1]-=1,e[n][1]<=0&&e.splice(n,1)))},l.prototype._bindEvent=function(t,e,n){var i=this._safeEvent(t);this._memorizeContext(n),i.push(this._getHandlerItem(e,n))},l.prototype.on=function(t,e,n){var i=this;s(t)?(t=t.split(h),u(t,(function(t){i._bindEvent(t,e,n)}))):a(t)&&(n=e,u(t,(function(t,e){i.on(e,t,n)})))},l.prototype.once=function(t,e,n){var i=this;if(a(t))return n=e,void u(t,(function(t,e){i.once(e,t,n)}));this.on(t,(function r(){e.apply(n,arguments),i.off(t,r,n)}),n)},l.prototype._spliceMatches=function(t,e){var n,i=0;if(o(t))for(n=t.length;i0},l.prototype.getListenerLength=function(t){return this._safeEvent(t).length},t.exports=l},function(t,e,n){"use strict";var i=n(6),r=n(2),s=n(23);t.exports=function(t,e,n){i(t)?r(t,e,n):s(t,e,n)}},function(t,e,n){"use strict";t.exports={en:{titles:{DD:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],D:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],MMM:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],MMMM:["January","February","March","April","May","June","July","August","September","October","November","December"]},titleFormat:"MMMM yyyy",todayFormat:"To\\d\\ay: DD, MMMM d, yyyy",time:"Time",date:"Date"},ko:{titles:{DD:["일요일","월요일","화요일","수요일","목요일","금요일","토요일"],D:["일","월","화","수","목","금","토"],MMM:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],MMMM:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"]},titleFormat:"yyyy.MM",todayFormat:"오늘: yyyy.MM.dd (D)",date:"날짜",time:"시간"}}},function(t,e,n){"use strict";var i=n(3),r=n(9),s=n(6),a=n(13),o=n(7),c=/{{\s?|\s?}}/g,u=/^[a-zA-Z0-9_@]+\[[a-zA-Z0-9_@"']+\]$/,h=/\[\s?|\s?\]/,l=/^[a-zA-Z_]+\.[a-zA-Z_]+$/,d=/\./,p=/^["']\w+["']$/,_=/"|'/g,f=/^-?\d+\.?\d*$/,m=2,g={if:function(t,e,n){var i=function(t,e){var n=[t],i=[],s=0,a=0;return r(e,(function(t,r){0===t.indexOf("if")?s+=1:"/if"===t?s-=1:s||0!==t.indexOf("elseif")&&"else"!==t||(n.push("else"===t?["true"]:t.split(" ").slice(1)),i.push(e.slice(a,r)),a=r+1)})),i.push(e.slice(a)),{exps:n,sourcesInsideIf:i}}(t,e),s=!1,a="";return r(i.exps,(function(t,e){return(s=E(t,n))&&(a=D(i.sourcesInsideIf[e],n)),!s})),a},each:function(t,e,n){var i=E(t,n),a=s(i)?"@index":"@key",c={},u="";return r(i,(function(t,i){c[a]=i,c["@this"]=t,o(n,c),u+=D(e.slice(),n)})),u},with:function(t,e,n){var r=i("as",t),s=t[r+1],a=E(t.slice(0,r),n),c={};return c[s]=a,D(e,o(n,c))||""}},y=3==="a".split(/a/).length?function(t,e){return t.split(e)}:function(t,e){var n,i,r=[],s=0;for(e.global||(e=new RegExp(e,"g")),n=e.exec(t);null!==n;)i=n.index,r.push(t.slice(s,i)),s=i+n[0].length,n=e.exec(t);return r.push(t.slice(s)),r};function v(t,e){var n,i=e[t];return"true"===t?i=!0:"false"===t?i=!1:p.test(t)?i=t.replace(_,""):u.test(t)?i=v((n=t.split(h))[0],e)[v(n[1],e)]:l.test(t)?i=v((n=t.split(d))[0],e)[n[1]]:f.test(t)&&(i=parseFloat(t)),i}function T(t,e,n){for(var i,r,s,o,c=g[t],u=1,h=0+m,l=e[h];u&&a(l);)0===l.indexOf(t)?u+=1:0===l.indexOf("/"+t)&&(u-=1,i=h),l=e[h+=m];if(u)throw Error(t+" needs {{/"+t+"}} expression.");return e[0]=c(e[0].split(" ").slice(1),(r=0,s=i,(o=e.splice(r+1,s-r)).pop(),o),n),e}function E(t,e){var n=v(t[0],e);return n instanceof Function?function(t,e,n){var i=[];return r(e,(function(t){i.push(v(t,n))})),t.apply(null,i)}(n,t.slice(1),e):n}function D(t,e){for(var n,i,r,s=1,o=t[s];a(o);)i=(n=o.split(" "))[0],g[i]?(r=T(i,t.splice(s,t.length-s),e),t=t.concat(r)):t[s]=E(n,e),o=t[s+=m];return t.join("")}t.exports=function(t,e){return D(y(t,c),e)}},function(t,e,n){"use strict";t.exports=function(t){return void 0===t}},function(t,e,n){"use strict";t.exports=function(t){return"string"==typeof t||t instanceof String}},function(t,e,n){"use strict";t.exports=function(t){t&&t.parentNode&&t.parentNode.removeChild(t)}},function(t,e,n){"use strict";t.exports=function(t){return"number"==typeof t||t instanceof Number}},function(t,e,n){"use strict";var i=n(9),r=n(3),s=n(17),a=n(24);t.exports=function(t){var e,n=Array.prototype.slice.call(arguments,1),o=t.classList,c=[];o?i(n,(function(e){t.classList.add(e)})):((e=s(t))&&(n=[].concat(e.split(/\s+/),n)),i(n,(function(t){r(t,c)<0&&c.push(t)})),a(t,c))}},function(t,e,n){"use strict";var i=n(12);t.exports=function(t){return t&&t.className?i(t.className.baseVal)?t.className:t.className.baseVal:""}},function(t,e,n){"use strict";var i=n(2),r=n(3),s=n(17),a=n(24);t.exports=function(t){var e,n,o=Array.prototype.slice.call(arguments,1),c=t.classList;c?i(o,(function(t){c.remove(t)})):(e=s(t).split(/\s+/),n=[],i(e,(function(t){r(t,o)<0&&n.push(t)})),a(t,n))}},function(t,e,n){"use strict";var i=n(31),r=n(33),s={_isMobile:/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile|WPDesktop/i.test(navigator.userAgent),_getEventType:function(t){return this._isMobile&&("mousedown"===t?t="touchstart":"click"===t&&(t="touchend")),t},on:function(t,e,n,r){i(t,this._getEventType(e),n,r)},off:function(t,e,n){r(t,this._getEventType(e),n)}};t.exports=s},function(t,e,n){"use strict";var i=n(0),r=n(14),s=n(10),a=n(1).DEFAULT_LANGUAGE_TYPE,o=i({init:function(t){t=t||a,this._element=null,this._localeText=s[t],this._type="base"},_makeContext:function(){c(this.getType(),"_makeContext")},render:function(){c(this.getType(),"render")},getDateElements:function(){c(this.getType(),"getDateElements")},getType:function(){return this._type},changeLanguage:function(t){this._localeText=s[t]},remove:function(){this._element&&r(this._element),this._element=null}});function c(t,e){throw new Error(t+' layer does not have the "'+e+'" method.')}t.exports=o},function(t,e,n){"use strict";var i=n(3),r=n(2),s=n(0),a=n(8),o=n(16),c=n(25),u=n(26),h=n(27),l=n(18),d=n(14),p=n(7),_=n(6),f=n(28),m=n(15),g=n(22),y=n(43),v=n(29),T=n(56),E=n(1),D=n(10),k=n(5),w=n(4),x=n(19),M=n(58),b=n(59),S=E.DEFAULT_WEEK_START_DAY,A=E.DEFAULT_LANGUAGE_TYPE,C=E.TYPE_DATE,P=E.TYPE_MONTH,N=E.TYPE_YEAR,O=E.CLASS_NAME_NEXT_YEAR_BTN,L=E.CLASS_NAME_NEXT_MONTH_BTN,R=E.CLASS_NAME_PREV_YEAR_BTN,F=E.CLASS_NAME_PREV_MONTH_BTN,Y=E.CLASS_NAME_SELECTED,H=E.CLASS_NAME_TITLE_TODAY,I=s({static:{localeTexts:D},init:function(t,e){e=function(t){if((t=p({language:A,calendar:{},input:{element:null,format:null},timePicker:null,date:null,showAlways:!1,type:C,selectableRanges:null,openers:[],autoClose:!0,usageStatistics:!0,weekStartDay:S},t)).selectableRanges=t.selectableRanges||[[E.MIN_DATE,E.MAX_DATE]],!g(t.calendar))throw new Error("Calendar option must be an object");if(!g(t.input))throw new Error("Input option must be an object");if(!_(t.selectableRanges))throw new Error("Selectable-ranges must be a 2d-array");return t.localeText=D[t.language],t.calendar.language=t.language,t.calendar.type=t.type,t.timePicker=t.timePicker||t.timepicker,t}(e),this._language=e.language,this._container=w.getElement(t),this._container.innerHTML=M(p(e,{isTab:e.timePicker&&"tab"===e.timePicker.layoutType})),this._element=this._container.firstChild,this._calendar=new v(this._element.querySelector(".tui-calendar-container"),p(e.calendar,{usageStatistics:e.usageStatistics,weekStartDay:e.weekStartDay})),this._timePicker=null,this._datepickerInput=null,this._date=null,this._rangeModel=null,this._openers=[],this._isEnabled=!0,this._id="tui-datepicker-"+w.generateId(),this._type=e.type,this.showAlways=e.showAlways,this.autoClose=e.autoClose,this._initializeDatePicker(e)},_initializeDatePicker:function(t){this.setRanges(t.selectableRanges),this._setEvents(),this._initTimePicker(t.timePicker,t.usageStatistics),this.setInput(t.input.element),this.setDateFormat(t.input.format),this.setDate(t.date),r(t.openers,this.addOpener,this),this.showAlways||this._hide(),this.getType()===C&&o(this._element.querySelector(".tui-datepicker-body"),"tui-datepicker-type-date")},_setEvents:function(){x.on(this._element,"click",this._onClickHandler,this),this._calendar.on("draw",this._onDrawCalendar,this)},_removeEvents:function(){x.off(this._element,"click",this._onClickHandler,this),this._calendar.off()},_setDocumentEvents:function(){x.on(document,"mousedown",this._onMousedownDocument,this)},_removeDocumentEvents:function(){x.off(document,"mousedown",this._onMousedownDocument)},_setOpenerEvents:function(t){x.on(t,"click",this.toggle,this)},_removeOpenerEvents:function(t){x.off(t,"click",this.toggle)},_initTimePicker:function(t,e){var n;t&&(n=t.layoutType||"",g(t)?t.usageStatistics=e:t={usageStatistics:e},this._timePicker=new y(this._element.querySelector(".tui-timepicker-container"),t),"tab"===n.toLowerCase()&&this._timePicker.hide(),this._timePicker.on("change",(function(t){var e;this._date&&(e=new Date(this._date),this.setDate(e.setHours(t.hour,t.minute)))}),this))},_changePicker:function(t){var e=c(t,".tui-datepicker-selector-button");!!e.querySelector(".tui-ico-date")?(this._calendar.show(),this._timePicker.hide()):(this._calendar.hide(),this._timePicker.show()),l(this._element.querySelector(".tui-is-checked"),"tui-is-checked"),o(e,"tui-is-checked")},_isOpener:function(t){var e=w.getElement(t);return i(e,this._openers)>-1},_setTodayClassName:function(t){this.getCalendarType()===C&&(Number(u(t,"timestamp"))===(new Date).setHours(0,0,0,0)?o(t,"tui-calendar-today"):l(t,"tui-calendar-today"))},_setSelectableClassName:function(t){var e=new Date(Number(u(t,"timestamp")));this._isSelectableOnCalendar(e)?(o(t,"tui-is-selectable"),l(t,"tui-is-blocked")):(l(t,"tui-is-selectable"),o(t,"tui-is-blocked"))},_setSelectedClassName:function(t){var e=new Date(Number(u(t,"timestamp")));this._isSelectedOnCalendar(e)?o(t,Y):l(t,Y)},_isSelectableOnCalendar:function(t){var e=this.getCalendarType(),n=k.cloneWithStartOf(t,e).getTime(),i=k.cloneWithEndOf(t,e).getTime();return this._rangeModel.hasOverlap(n,i)},_isSelectedOnCalendar:function(t){var e=this.getDate(),n=this.getCalendarType();return e&&k.isSame(e,t,n)},_show:function(){l(this._element,"tui-hidden")},_hide:function(){o(this._element,"tui-hidden")},_syncToInput:function(){this._date&&this._datepickerInput.setDate(this._date)},_syncFromInput:function(t){var e,n=!1;try{e=this._datepickerInput.getDate(),this.isSelectable(e)?(this._timePicker&&this._timePicker.setTime(e.getHours(),e.getMinutes()),this.setDate(e)):n=!0}catch(t){this.fire("error",{type:"ParsingError",message:t.message}),n=!0}finally{n&&(t?this._syncToInput():this.setNull())}},_onMousedownDocument:function(t){var e=w.getTarget(t),n=w.getSelector(e),r=!!n&&this._element.querySelector(n),s=this._datepickerInput.is(e),a=i(e,this._openers)>-1;!(this.showAlways||s||r||a)&&this.close()},_onClickHandler:function(t){var e=w.getTarget(t);c(e,".tui-is-selectable")?(t.preventDefault(),this._updateDate(e)):c(e,"."+H)?(t.preventDefault(),this._updateDateToToday()):c(e,".tui-calendar-title")?this.drawUpperCalendar(this._date):c(e,".tui-datepicker-selector-button")&&this._changePicker(e)},_updateDateToToday:function(){this.setDate(Date.now()),this.close()},_updateDate:function(t){var e=Number(u(t,"timestamp")),n=new Date(e),i=this._timePicker,r=this._date;this.getCalendarType()!==this.getType()?this.drawLowerCalendar(n):(i?n.setHours(i.getHour(),i.getMinute()):r&&n.setHours(r.getHours(),r.getMinutes()),this.setDate(n),!this.showAlways&&this.autoClose&&this.close())},_onDrawCalendar:function(t){r(t.dateElements,(function(t){this._setTodayClassName(t),this._setSelectableClassName(t),this._setSelectedClassName(t)}),this),this._setDisplayHeadButtons(),this.fire("draw",t)},_setDisplayHeadButtons:function(){var t,e,n,i,r=this._calendar.getNextYearDate(),s=this._calendar.getPrevYearDate(),a=this._rangeModel.getMaximumValue(),o=this._rangeModel.getMinimumValue(),c=this._element.querySelector("."+O),u=this._element.querySelector("."+R);this.getCalendarType()===C?(t=k.cloneWithStartOf(this._calendar.getNextDate(),P),e=k.cloneWithEndOf(this._calendar.getPrevDate(),P),n=this._element.querySelector("."+L),i=this._element.querySelector("."+F),this._setDisplay(n,t.getTime()<=a),this._setDisplay(i,e.getTime()>=o),s.setDate(1),r.setDate(1)):(s.setMonth(12,0),r.setMonth(0,1)),this._setDisplay(c,r.getTime()<=a),this._setDisplay(u,s.getTime()>=o)},_setDisplay:function(t,e){t&&(e?l(t,"tui-hidden"):o(t,"tui-hidden"))},_onChangeInput:function(){this._syncFromInput(!0)},_isChanged:function(t){var e=this.getDate();return!e||t.getTime()!==e.getTime()},_refreshFromRanges:function(){this.isSelectable(this._date)?this._calendar.draw():this.setNull()},getCalendarType:function(){return this._calendar.getType()},getType:function(){return this._type},isSelectable:function(t){var e,n,i=this.getType();return!!k.isValidDate(t)&&(e=k.cloneWithStartOf(t,i).getTime(),n=k.cloneWithEndOf(t,i).getTime(),this._rangeModel.hasOverlap(e,n))},isSelected:function(t){return k.isValidDate(t)&&k.isSame(this._date,t,this.getType())},setRanges:function(t){var e=[];r(t,(function(t){var n=new Date(t[0]).getTime(),i=new Date(t[1]).getTime();e.push([n,i])})),this._rangeModel=new T(e),this._refreshFromRanges()},setType:function(t){this._type=t},addRange:function(t,e){t=new Date(t).getTime(),e=new Date(e).getTime(),this._rangeModel.add(t,e),this._refreshFromRanges()},removeRange:function(t,e,n){t=new Date(t),e=new Date(e),n&&(t=k.cloneWithStartOf(t,n),e=k.cloneWithEndOf(e,n)),this._rangeModel.exclude(t.getTime(),e.getTime()),this._refreshFromRanges()},addOpener:function(t){t=w.getElement(t),this._isOpener(t)||(this._openers.push(t),this._setOpenerEvents(t))},removeOpener:function(t){var e;t=w.getElement(t),(e=i(t,this._openers))>-1&&(this._removeOpenerEvents(t),this._openers.splice(e,1))},removeAllOpeners:function(){r(this._openers,(function(t){this._removeOpenerEvents(t)}),this),this._openers=[]},open:function(){!this.isOpened()&&this._isEnabled&&(this._calendar.draw({date:this._date,type:this._type}),this._show(),this.showAlways||this._setDocumentEvents(),this.fire("open"))},drawUpperCalendar:function(t){var e=this.getCalendarType();e===C?this._calendar.draw({date:t,type:P}):e===P&&this._calendar.draw({date:t,type:N})},drawLowerCalendar:function(t){var e=this.getCalendarType();e===this.getType()||(e===P?this._calendar.draw({date:t,type:C}):e===N&&this._calendar.draw({date:t,type:P}))},close:function(){this.isOpened()&&(this._removeDocumentEvents(),this._hide(),this.fire("close"))},toggle:function(){this.isOpened()?this.close():this.open()},getDate:function(){return this._date?new Date(this._date):null},setDate:function(t){var e,n;null!==t?(e=m(t)||f(t),n=new Date(t),e&&this._isChanged(n)&&this.isSelectable(n)&&(n=new Date(t),this._date=n,this._calendar.draw({date:n}),this._timePicker&&this._timePicker.setTime(n.getHours(),n.getMinutes()),this._syncToInput(),this.fire("change"))):this.setNull()},setNull:function(){var t=this._calendar.getDate(),e=null!==this._date;this._date=null,this._datepickerInput&&this._datepickerInput.clearText(),this._timePicker&&this._timePicker.setTime(0,0),this.isSelectable(t)?this._calendar.draw():this._calendar.draw({date:new Date(this._rangeModel.getMinimumValue())}),e&&this.fire("change")},setDateFormat:function(t){this._datepickerInput.setFormat(t),this._syncToInput()},isOpened:function(){return!h(this._element,"tui-hidden")},getTimePicker:function(){return this._timePicker},getCalendar:function(){return this._calendar},getLocaleText:function(){return D[this._language]||D[A]},setInput:function(t,e){var n,i=this._datepickerInput,r=this.getLocaleText();e=e||{},i&&(n=i.getFormat(),i.destroy()),this._datepickerInput=new b(t,{format:e.format||n,id:this._id,localeText:r}),this._datepickerInput.on({change:this._onChangeInput,click:this.open},this),e.syncFromInput?this._syncFromInput():this._syncToInput()},enable:function(){this._isEnabled||(this._isEnabled=!0,this._datepickerInput.enable(),r(this._openers,(function(t){t.removeAttribute("disabled"),this._setOpenerEvents(t)}),this))},disable:function(){this._isEnabled&&(this._isEnabled=!1,this.close(),this._datepickerInput.disable(),r(this._openers,(function(t){t.setAttribute("disabled",!0),this._removeOpenerEvents(t)}),this))},isDisabled:function(){return!this._isEnabled},addCssClass:function(t){o(this._element,t)},removeCssClass:function(t){l(this._element,t)},getDateElements:function(){return this._calendar.getDateElements()},findOverlappedRange:function(t,e){var n=new Date(t).getTime(),i=new Date(e).getTime(),r=this._rangeModel.findOverlappedRange(n,i);return[new Date(r[0]),new Date(r[1])]},changeLanguage:function(t){this._language=t,this._calendar.changeLanguage(this._language),this._datepickerInput.changeLocaleTitles(this.getLocaleText().titles),this.setDateFormat(this._datepickerInput.getFormat()),this._timePicker&&this._timePicker.changeLanguage(this._language)},destroy:function(){this._removeDocumentEvents(),this._calendar.destroy(),this._timePicker&&this._timePicker.destroy(),this._datepickerInput&&this._datepickerInput.destroy(),this._removeEvents(),d(this._element),this.removeAllOpeners(),this._calendar=this._timePicker=this._datepickerInput=this._container=this._element=this._date=this._rangeModel=this._openers=this._isEnabled=this._id=null}});a.mixin(I),t.exports=I},function(t,e,n){"use strict";t.exports=function(t){return t===Object(t)}},function(t,e,n){"use strict";t.exports=function(t,e,n){var i;for(i in n=n||null,t)if(t.hasOwnProperty(i)&&!1===e.call(n,t[i],i,t))break}},function(t,e,n){"use strict";var i=n(6),r=n(12);t.exports=function(t,e){e=(e=i(e)?e.join(" "):e).replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),r(t.className.baseVal)?t.className=e:t.className.baseVal=e}},function(t,e,n){"use strict";var i=n(40);t.exports=function(t,e){var n=t.parentNode;if(i(t,e))return t;for(;n&&n!==document;){if(i(n,e))return n;n=n.parentNode}return null}},function(t,e,n){"use strict";var i=n(42);t.exports=function(t,e){return t.dataset?t.dataset[e]:t.getAttribute("data-"+i(e))}},function(t,e,n){"use strict";var i=n(3),r=n(17);t.exports=function(t,e){var n;return t.classList?t.classList.contains(e):(n=r(t).split(/\s+/),i(e,n)>-1)}},function(t,e,n){"use strict";t.exports=function(t){return t instanceof Date}},function(t,e,n){"use strict";var i=n(0),r=n(8),s=n(16),a=n(27),o=n(18),c=n(14),u=n(7),h=n(44),l=n(49),d=n(10),p=n(1),_=n(5),f=n(4),m=p.DEFAULT_WEEK_START_DAY,g=p.DEFAULT_LANGUAGE_TYPE,y=p.TYPE_DATE,v=p.TYPE_MONTH,T=p.TYPE_YEAR,E=p.CLASS_NAME_PREV_MONTH_BTN,D=p.CLASS_NAME_PREV_YEAR_BTN,k=p.CLASS_NAME_NEXT_YEAR_BTN,w=p.CLASS_NAME_NEXT_MONTH_BTN,x=i({static:{localeTexts:d},init:function(t,e){e=u({language:g,showToday:!0,showJumpButtons:!1,date:new Date,type:y,usageStatistics:!0,weekStartDay:m},e),this._container=f.getElement(t),this._container.innerHTML='
    ',this._element=this._container.firstChild,this._date=null,this._type=null,this._header=null,this._body=null,this._initHeader(e),this._initBody(e),this.draw({date:e.date,type:e.type}),e.usageStatistics&&f.sendHostName()},_initHeader:function(t){var e=this._element.querySelector(".tui-calendar-header");this._header=new h(e,t),this._header.on("click",(function(t){var e=f.getTarget(t);a(e,E)?this.drawPrev():a(e,D)?this._onClickPrevYear():a(e,w)?this.drawNext():a(e,k)&&this._onClickNextYear()}),this)},_initBody:function(t){var e=this._element.querySelector(".tui-calendar-body");this._body=new l(e,t)},_onClickPrevYear:function(){this.getType()===y?this.draw({date:this._getRelativeDate(-12)}):this.drawPrev()},_onClickNextYear:function(){this.getType()===y?this.draw({date:this._getRelativeDate(12)}):this.drawNext()},_isValidType:function(t){return t===y||t===v||t===T},_shouldUpdate:function(t,e){var n=this._date;if(!_.isValidDate(t))throw new Error("Invalid date");if(!this._isValidType(e))throw new Error("Invalid layer type");return!n||n.getFullYear()!==t.getFullYear()||n.getMonth()!==t.getMonth()||this.getType()!==e},_render:function(){var t=this._date,e=this.getType();switch(this._header.render(t,e),this._body.render(t,e),o(this._element,"tui-calendar-month","tui-calendar-year"),e){case v:s(this._element,"tui-calendar-month");break;case T:s(this._element,"tui-calendar-year")}},_getRelativeDate:function(t){var e=this._date;return new Date(e.getFullYear(),e.getMonth()+t)},draw:function(t){var e,n;e=(t=t||{}).date||this._date,n=(t.type||this.getType()).toLowerCase(),this._shouldUpdate(e,n)&&(this._date=e,this._type=n,this._render()),this.fire("draw",{date:this._date,type:n,dateElements:this._body.getDateElements()})},show:function(){o(this._element,"tui-hidden")},hide:function(){s(this._element,"tui-hidden")},drawNext:function(){this.draw({date:this.getNextDate()})},drawPrev:function(){this.draw({date:this.getPrevDate()})},getNextDate:function(){return this.getType()===y?this._getRelativeDate(1):this.getNextYearDate()},getPrevDate:function(){return this.getType()===y?this._getRelativeDate(-1):this.getPrevYearDate()},getNextYearDate:function(){switch(this.getType()){case y:case v:return this._getRelativeDate(12);case T:return this._getRelativeDate(108);default:throw new Error("Unknown layer type")}},getPrevYearDate:function(){switch(this.getType()){case y:case v:return this._getRelativeDate(-12);case T:return this._getRelativeDate(-108);default:throw new Error("Unknown layer type")}},changeLanguage:function(t){this._header.changeLanguage(t),this._body.changeLanguage(t),this._render()},getDate:function(){return new Date(this._date)},getType:function(){return this._type},getDateElements:function(){return this._body.getDateElements()},addCssClass:function(t){s(this._element,t)},removeCssClass:function(t){o(this._element,t)},destroy:function(){this._header.destroy(),this._body.destroy(),c(this._element),this._type=this._date=this._container=this._element=this._header=this._body=null}});r.mixin(x),t.exports=x},function(t,e,n){"use strict";var i=n(3),r=n(2),s=n(0),a=n(4),o=n(5),c=n(1),u=n(10),h=/\\?(yyyy|yy|mmmm|mmm|mm|m|dd|d|hh|h|a)/gi,l={yyyy:{expression:"(\\d{4}|\\d{2})",type:c.TYPE_YEAR},yy:{expression:"(\\d{4}|\\d{2})",type:c.TYPE_YEAR},y:{expression:"(\\d{4}|\\d{2})",type:c.TYPE_YEAR},M:{expression:"(1[012]|0[1-9]|[1-9])",type:c.TYPE_MONTH},MM:{expression:"(1[012]|0[1-9]|[1-9])",type:c.TYPE_MONTH},MMM:{expression:"(1[012]|0[1-9]|[1-9])",type:c.TYPE_MONTH},MMMM:{expression:"(1[012]|0[1-9]|[1-9])",type:c.TYPE_MONTH},mmm:{expression:"(1[012]|0[1-9]|[1-9])",type:c.TYPE_MONTH},mmmm:{expression:"(1[012]|0[1-9]|[1-9])",type:c.TYPE_MONTH},dd:{expression:"([12]\\d{1}|3[01]|0[1-9]|[1-9])",type:c.TYPE_DATE},d:{expression:"([12]\\d{1}|3[01]|0[1-9]|[1-9])",type:c.TYPE_DATE},D:{expression:"([12]\\d{1}|3[01]|0[1-9]|[1-9])",type:c.TYPE_DATE},DD:{expression:"([12]\\d{1}|3[01]|0[1-9]|[1-9])",type:c.TYPE_DATE},h:{expression:"(d{1}|0\\d{1}|1\\d{1}|2[0123])",type:c.TYPE_HOUR},hh:{expression:"(d{1}|[01]\\d{1}|2[0123])",type:c.TYPE_HOUR},H:{expression:"(d{1}|0\\d{1}|1\\d{1}|2[0123])",type:c.TYPE_HOUR},HH:{expression:"(d{1}|[01]\\d{1}|2[0123])",type:c.TYPE_HOUR},m:{expression:"(d{1}|[012345]\\d{1})",type:c.TYPE_MINUTE},mm:{expression:"(d{1}|[012345]\\d{1})",type:c.TYPE_MINUTE},a:{expression:"([ap]m)",type:c.TYPE_MERIDIEM},A:{expression:"([ap]m)",type:c.TYPE_MERIDIEM}},d=s({init:function(t,e){this._rawStr=t,this._keyOrder=null,this._regExp=null,this._titles=e||u.en.titles,this._parseFormat()},_parseFormat:function(){var t="^",e=this._rawStr.match(h),n=[];e=a.filter(e,(function(t){return"\\"!==t[0]})),r(e,(function(e,i){/m/i.test(e)||(e=e.toLowerCase()),t+=l[e].expression+"[\\D\\s]*",n[i]=l[e].type})),t+="$",this._keyOrder=n,this._regExp=new RegExp(t,"gi")},parse:function(t){var e,n={year:0,month:1,date:1,hour:0,minute:0},i=!1,s=!1;if(this._regExp.lastIndex=0,!(e=this._regExp.exec(t)))throw Error('DateTimeFormatter: Not matched - "'+t+'"');return r(this._keyOrder,(function(t,r){var a=e[r+1];if(t===c.TYPE_MERIDIEM&&/[ap]m/i.test(a))i=!0,s=/pm/i.test(a);else{if(0!==(a=Number(a))&&!a)throw Error("DateTimeFormatter: Unknown value - "+e[r+1]);t===c.TYPE_YEAR&&a<100&&(a+=2e3),n[t]=a}})),i&&(s=s||n.hour>12,n.hour%=12,s&&(n.hour+=12)),new Date(n.year,n.month-1,n.date,n.hour,n.minute)},getRawString:function(){return this._rawStr},format:function(t){var e,n=t.getFullYear(),r=t.getMonth()+1,s=t.getDate(),a=t.getDay(),u=t.getHours(),l=t.getMinutes(),d="a";return i(c.TYPE_MERIDIEM,this._keyOrder)>-1&&(d=u>=12?"pm":"am",u=o.getMeridiemHour(u)),e={yyyy:n,yy:String(n).substr(2,2),M:r,MM:o.prependLeadingZero(r),MMM:this._titles.MMM[r-1],MMMM:this._titles.MMMM[r-1],d:s,dd:o.prependLeadingZero(s),D:this._titles.D[a],DD:this._titles.DD[a],hh:o.prependLeadingZero(u),h:u,mm:o.prependLeadingZero(l),m:l,A:d.toUpperCase(),a:d},this._rawStr.replace(h,(function(t){return"\\"===t[0]?t.substr(1):e[t]||e[t.toLowerCase()]||""}))}});t.exports=d},function(t,e,n){"use strict";var i=n(13),r=n(9),s=n(32);function a(t,e,n,i){function a(e){n.call(i||t,e||window.event)}"addEventListener"in t?t.addEventListener(e,a):"attachEvent"in t&&t.attachEvent("on"+e,a),function(t,e,n,i){var a=s(t,e),o=!1;r(a,(function(t){return t.handler!==n||(o=!0,!1)})),o||a.push({handler:n,wrappedHandler:i})}(t,e,n,a)}t.exports=function(t,e,n,s){i(e)?r(e.split(/\s+/g),(function(e){a(t,e,n,s)})):r(e,(function(e,i){a(t,i,e,n)}))}},function(t,e,n){"use strict";var i="_feEventKey";t.exports=function(t,e){var n,r=t[i];return r||(r=t[i]={}),(n=r[e])||(n=r[e]=[]),n}},function(t,e,n){"use strict";var i=n(13),r=n(9),s=n(32);function a(t,e,n){var i,a=s(t,e);n?(r(a,(function(r,s){return n!==r.handler||(o(t,e,r.wrappedHandler),i=s,!1)})),a.splice(i,1)):(r(a,(function(n){o(t,e,n.wrappedHandler)})),a.splice(0,a.length))}function o(t,e,n){"removeEventListener"in t?t.removeEventListener(e,n):"detachEvent"in t&&t.detachEvent("on"+e,n)}t.exports=function(t,e,n){i(e)?r(e.split(/\s+/g),(function(e){a(t,e,n)})):r(e,(function(e,n){a(t,n,e)}))}},function(t,e,n){"use strict";var i=n(21),r=n(60),s=n(29);n(61),i.createCalendar=function(t,e){return new s(t,e)},i.createRangePicker=function(t){return new r(t)},t.exports=i},function(t,e,n){"use strict";var i=n(36);t.exports=function(t,e){var n=i(e.prototype);n.constructor=t,t.prototype=n}},function(t,e,n){"use strict";t.exports=function(t){function e(){}return e.prototype=t,new e}},function(t,e,n){"use strict";var i=n(12),r=n(38);t.exports=function(t){return!i(t)&&!r(t)}},function(t,e,n){"use strict";t.exports=function(t){return null===t}},function(t,e,n){"use strict";t.exports=function(t){return t instanceof Function}},function(t,e,n){"use strict";var i=n(3),r=n(41),s=Element.prototype,a=s.matches||s.webkitMatchesSelector||s.mozMatchesSelector||s.msMatchesSelector||function(t){var e=this.document||this.ownerDocument;return i(this,r(e.querySelectorAll(t)))>-1};t.exports=function(t,e){return a.call(t,e)}},function(t,e,n){"use strict";var i=n(2);t.exports=function(t){var e;try{e=Array.prototype.slice.call(t)}catch(n){e=[],i(t,(function(t){e.push(t)}))}return e}},function(t,e,n){"use strict";t.exports=function(t){return t.replace(/([A-Z])/g,(function(t){return"-"+t.toLowerCase()}))}},function(e,n){e.exports=t},function(t,e,n){"use strict";var i=n(0),r=n(8),s=n(25),a=n(14),o=n(10),c=n(45),u=n(30),h=n(1),l=n(4),d=n(19),p=h.TYPE_DATE,_=h.TYPE_MONTH,f=h.TYPE_YEAR,m=i({init:function(t,e){this._container=l.getElement(t),this._innerElement=null,this._infoElement=null,this._showToday=e.showToday,this._showJumpButtons=e.showJumpButtons,this._yearMonthTitleFormatter=null,this._yearTitleFormatter=null,this._todayFormatter=null,this._setFormatters(o[e.language]),this._setEvents(e)},_setFormatters:function(t){this._yearMonthTitleFormatter=new u(t.titleFormat,t.titles),this._yearTitleFormatter=new u("yyyy",t.titles),this._todayFormatter=new u(t.todayFormat,t.titles)},_setEvents:function(){d.on(this._container,"click",this._onClickHandler,this)},_removeEvents:function(){this.off(),d.off(this._container,"click",this._onClickHandler)},_onClickHandler:function(t){var e=l.getTarget(t);s(e,".tui-calendar-btn")&&this.fire("click",t)},_getTitleClass:function(t){switch(t){case p:return"tui-calendar-title-month";case _:return"tui-calendar-title-year";case f:return"tui-calendar-title-year-to-year";default:return""}},_getTitleText:function(t,e){var n,i,r;switch(e){case p:return this._yearMonthTitleFormatter.format(t);case _:return this._yearTitleFormatter.format(t);case f:return n=t.getFullYear(),i=new Date(n-4,0,1),r=new Date(n+4,0,1),this._yearTitleFormatter.format(i)+" - "+this._yearTitleFormatter.format(r);default:return""}},changeLanguage:function(t){this._setFormatters(o[t])},render:function(t,e){var n={showToday:this._showToday,showJumpButtons:this._showJumpButtons,todayText:this._todayFormatter.format(new Date),isDateCalendar:e===p,titleClass:this._getTitleClass(e),title:this._getTitleText(t,e)};this._container.innerHTML=c(n).replace(/^\s+|\s+$/g,""),this._innerElement=this._container.querySelector(".tui-calendar-header-inner"),n.showToday&&(this._infoElement=this._container.querySelector(".tui-calendar-header-info"))},destroy:function(){this._removeEvents(),a(this._innerElement),a(this._infoElement),this._container=this._showToday=this._showJumpButtons=this._yearMonthTitleFormatter=this._yearTitleFormatter=this._todayFormatter=this._innerElement=this._infoElement=null}});r.mixin(m),t.exports=m},function(t,e,n){"use strict";var i=n(11);t.exports=function(t){return i('{{if isDateCalendar}} {{if showJumpButtons}}
    {{title}}
    {{else}}
    {{title}}
    {{/if}}{{else}}
    {{title}}
    {{/if}}{{if showToday}}

    {{todayText}}

    {{/if}}',t)}},function(t,e,n){"use strict";t.exports=function(t){return"object"==typeof HTMLElement?t&&(t instanceof HTMLElement||!!t.nodeType):!(!t||!t.nodeType)}},function(t,e,n){"use strict";var i=n(12),r=n(48),s=6048e5;t.exports=function(t,e){var n=location.hostname,a="TOAST UI "+t+" for "+n+": Statistics",o=window.localStorage.getItem(a);(i(window.tui)||!1!==window.tui.usageStatistics)&&(o&&!function(t){return(new Date).getTime()-t>s}(o)||(window.localStorage.setItem(a,(new Date).getTime()),setTimeout((function(){"interactive"!==document.readyState&&"complete"!==document.readyState||r("https://www.google-analytics.com/collect",{v:1,t:"event",tid:e,cid:n,dp:n,dh:t,el:t,ec:"use"})}),1e3)))}},function(t,e,n){"use strict";var i=n(23);t.exports=function(t,e){var n=document.createElement("img"),r="";return i(e,(function(t,e){r+="&"+e+"="+t})),r=r.substring(1),n.src=t+"?"+r,n.style.display="none",document.body.appendChild(n),document.body.removeChild(n),n}},function(t,e,n){"use strict";var i=n(2),r=n(0),s=n(50),a=n(52),o=n(54),c=n(1),u=c.TYPE_DATE,h=c.TYPE_MONTH,l=c.TYPE_YEAR,d=r({init:function(t,e){var n=e.language,i=e.weekStartDay;this._container=t,this._dateLayer=new s(n,i),this._monthLayer=new a(n),this._yearLayer=new o(n),this._currentLayer=this._dateLayer},_getLayer:function(t){switch(t){case u:return this._dateLayer;case h:return this._monthLayer;case l:return this._yearLayer;default:return this._currentLayer}},_eachLayer:function(t){i([this._dateLayer,this._monthLayer,this._yearLayer],t)},changeLanguage:function(t){this._eachLayer((function(e){e.changeLanguage(t)}))},render:function(t,e){var n=this._getLayer(e);this._currentLayer.remove(),n.render(t,this._container),this._currentLayer=n},getDateElements:function(){return this._currentLayer.getDateElements()},destroy:function(){this._eachLayer((function(t){t.remove()})),this._container=this._currentLayer=this._dateLayer=this._monthLayer=this._yearLayer=null}});t.exports=d},function(t,e,n){"use strict";var i=n(0),r=n(5),s=n(51),a=n(20),o=n(1).TYPE_DATE,c=n(1).WEEK_START_DAY_MAP,u=7,h=i(a,{init:function(t,e){a.call(this,t),this.weekStartDay=c[String(e).toLowerCase()]||0},_type:o,_makeContext:function(t){var e,n,i,r,s=this._localeText.titles.D;if(e=(t=t||new Date).getFullYear(),n=t.getMonth()+1,this.weekStartDay){for(i=s.slice(),r=0;ru)||(l.push(this._getFirstWeek(t,e)),h-=1),l.push(n),c+=1}return l},_getWeek:function(t,e,n){for(var i,r,s=new Date(t,e-1,1),a=new Date(t,e,0),o=[],c=0,u=n.length;ca&&(r+=" tui-calendar-next-month"),0===i.getDay()?r+=" tui-calendar-sun":6===i.getDay()&&(r+=" tui-calendar-sat"),o.push({dayInMonth:i.getDate(),className:r,timestamp:i.getTime()});return o},render:function(t,e){var n=this._makeContext(t);e.innerHTML=s(n),this._element=e.firstChild},getDateElements:function(){return this._element.querySelectorAll(".tui-calendar-date")},_getFirstWeek:function(t,e){var n,i=[];for(n=this.weekStartDay;n Dates {{Sun}} {{Mon}} {{Tue}} {{Wed}} {{Thu}} {{Fri}} {{Sat}} {{each weeks}} {{each @this}} {{@this["dayInMonth"]}} {{/each}} {{/each}} ',t)}},function(t,e,n){"use strict";var i=n(0),r=n(53),s=n(20),a=n(1).TYPE_MONTH,o=n(5),c=i(s,{init:function(t){s.call(this,t)},_type:a,_makeContext:function(t){var e=this._localeText.titles.MMM;return{year:t.getFullYear(),Jan:e[0],Feb:e[1],Mar:e[2],Apr:e[3],May:e[4],Jun:e[5],Jul:e[6],Aug:e[7],Sep:e[8],Oct:e[9],Nov:e[10],Dec:e[11],getFirstDayTimestamp:o.getFirstDayTimestamp}},render:function(t,e){var n=this._makeContext(t);e.innerHTML=r(n),this._element=e.firstChild},getDateElements:function(){return this._element.querySelectorAll(".tui-calendar-month")}});t.exports=c},function(t,e,n){"use strict";var i=n(11);t.exports=function(t){return i('
    Months
    {{Jan}} {{Feb}} {{Mar}} {{Apr}}
    {{May}} {{Jun}} {{Jul}} {{Aug}}
    {{Sep}} {{Oct}} {{Nov}} {{Dec}}
    ',t)}},function(t,e,n){"use strict";var i=n(0),r=n(55),s=n(20),a=n(1).TYPE_YEAR,o=n(5),c=i(s,{init:function(t){s.call(this,t)},_type:a,_makeContext:function(t){var e=t.getFullYear();return{yearGroups:[o.getRangeArr(e-4,e-2),o.getRangeArr(e-1,e+1),o.getRangeArr(e+2,e+4)],getFirstDayTimestamp:o.getFirstDayTimestamp}},render:function(t,e){var n=this._makeContext(t);e.innerHTML=r(n),this._element=e.firstChild},getDateElements:function(){return this._element.querySelectorAll(".tui-calendar-year")}});t.exports=c},function(t,e,n){"use strict";var i=n(11);t.exports=function(t){return i(' {{each yearGroups}} {{each @this}} {{/each}} {{/each}}
    Years
    {{@this}}
    ',t)}},function(t,e,n){"use strict";var i=n(2),r=n(0),s=n(15),a=n(57),o=n(4),c=r({init:function(t){t=t||[],this._ranges=[],i(t,(function(t){this.add(t[0],t[1])}),this)},contains:function(t,e){for(var n=0,i=this._ranges.length;n=t},exclude:function(t,e){t<=this.start&&e>=this.end?this.setEmpty():this.contains(t)?this.setRange(this.start,t-1):this.contains(e)&&this.setRange(e+1,this.end)}});t.exports=s},function(t,e,n){"use strict";var i=n(11);t.exports=function(t){return i('
    {{if timePicker}} {{if isTab}}
    {{else}}
    {{/if}} {{else}}
    {{/if}}
    ',t)}},function(t,e,n){"use strict";var i=n(0),r=n(8),s=n(31),a=n(33),o=n(30),c=n(19),u=n(4),h=i({init:function(t,e){e.format=e.format||"yyyy-MM-dd",this._input=u.getElement(t),this._id=e.id,this._titles=e.localeText.titles,this._formatter=new o(e.format,this._titles),this._setEvents()},changeLocaleTitles:function(t){this._titles=t},_setEvents:function(){this._input&&(s(this._input,"change",this._onChangeHandler,this),c.on(this._input,"click",this._onClickHandler,this))},_removeEvents:function(){this.off(),this._input&&(a(this._input,"change",this._onChangeHandler),c.off(this._input,"click",this._onClickHandler))},_onChangeHandler:function(){this.fire("change")},_onClickHandler:function(){this.fire("click")},is:function(t){return this._input===t},enable:function(){this._input&&this._input.removeAttribute("disabled")},disable:function(){this._input&&this._input.setAttribute("disabled",!0)},getFormat:function(){return this._formatter.getRawString()},setFormat:function(t){t&&(this._formatter=new o(t,this._titles))},clearText:function(){this._input&&(this._input.value="")},setDate:function(t){this._input&&(this._input.value=this._formatter.format(t))},getDate:function(){var t="";return this._input&&(t=this._input.value),this._formatter.parse(t)},destroy:function(){this._removeEvents(),this._input=this._id=this._formatter=null}});r.mixin(h),t.exports=h},function(t,e,n){"use strict";var i=n(2),r=n(0),s=n(8),a=n(16),o=n(26),c=n(18),u=n(7),h=n(21),l=n(5),d=n(1),p=n(4),_=d.CLASS_NAME_SELECTED,f=r({init:function(t){var e,n;if(e=(t=t||{}).startpicker,n=t.endpicker,!e)throw new Error('The "startpicker" option is required.');if(!n)throw new Error('The "endpicker" option is required.');this._startpicker=null,this._endpicker=null,this._isRangeSet=!1,this._preEndPickerDate=(new Date).getDate(),this._initializePickers(t),this._syncRangesToEndpicker()},_initializePickers:function(t){var e=p.getElement(t.startpicker.container),n=p.getElement(t.endpicker.container),i=p.getElement(t.startpicker.input),r=p.getElement(t.endpicker.input),s=u({},t,{input:{element:i,format:t.format},date:t.startpicker.date,weekStartDay:t.startpicker.weekStartDay}),a=u({},t,{input:{element:r,format:t.format},date:t.endpicker.date,weekStartDay:t.endpicker.weekStartDay});this._startpicker=new h(e,s),this._startpicker.addCssClass("tui-rangepicker"),this._startpicker.on("change",this._onChangeStartpicker,this),this._startpicker.on("draw",this._onDrawPicker,this),this._endpicker=new h(n,a),this._endpicker.addCssClass("tui-rangepicker"),this._endpicker.on("change",this._onChangeEndpicker,this),this._endpicker.on("draw",this._onDrawPicker,this)},_onDrawPicker:function(t){var e=t.type,n=this._startpicker.getDate(),r=this._endpicker.getDate();n&&(r||(r=new Date(NaN)),i(t.dateElements,(function(t){var i=new Date(Number(o(t,"timestamp"))),s=l.inRange(n,r,i,e),a=l.isSame(n,i,e)||l.isSame(r,i,e);this._setRangeClass(t,s),this._setSelectedClass(t,a)}),this))},_setRangeClass:function(t,e){e?a(t,"tui-is-selected-range"):c(t,"tui-is-selected-range")},_setSelectedClass:function(t,e){e?a(t,_):c(t,_)},_syncRangesToEndpicker:function(){var t,e=this._startpicker.getDate();e?(t=this._startpicker.findOverlappedRange(l.cloneWithStartOf(e).getTime(),l.cloneWithEndOf(e).getTime()),this._endpicker.enable(),this._endpicker.setRanges([[e.getTime(),t[1].getTime()]]),this._setTimeRangeOnEndPicker()):(this._endpicker.setNull(),this._endpicker.disable())},_onChangeStartpicker:function(){this._syncRangesToEndpicker(),this.fire("change:start")},_onChangeEndpicker:function(){var t,e=this._endpicker.getDate();e?(t=e.getDate(),this._preEndPickerDate!==t&&this._setTimeRangeOnEndPicker(),this._preEndPickerDate=t):this._preEndPickerDate=null,this.fire("change:end")},_setTimeRangeOnEndPicker:function(){var t,e,n=this._endpicker._timePicker;n&&(t=this._endpicker.getDate()||this._startpicker.getDate(),e=this._getTimeRangeFromStartPicker(),t&&e[t.getDate()]?(n.setRange(e[t.getDate()]),this._isRangeSet=!0):this._isRangeSet&&(n.setRange({hour:0,minute:0}),n.resetMinuteRange(),this._isRangeSet=!1))},_getTimeRangeFromStartPicker:function(){var t=this._startpicker.getDate(),e={};return e[t.getDate()]={hour:t.getHours(),minute:t.getMinutes()},e},getStartpicker:function(){return this._startpicker},getEndpicker:function(){return this._endpicker},setStartDate:function(t){this._startpicker.setDate(t)},getStartDate:function(){return this._startpicker.getDate()},getEndDate:function(){return this._endpicker.getDate()},setEndDate:function(t){this._endpicker.setDate(t)},setRanges:function(t){this._startpicker.setRanges(t),this._syncRangesToEndpicker()},addRange:function(t,e){this._startpicker.addRange(t,e),this._syncRangesToEndpicker()},removeRange:function(t,e,n){this._startpicker.removeRange(t,e,n),this._syncRangesToEndpicker()},changeLanguage:function(t){this._startpicker.changeLanguage(t),this._endpicker.changeLanguage(t)},destroy:function(){this.off(),this._startpicker.destroy(),this._endpicker.destroy(),this._startpicker=this._endpicker=null}});s.mixin(f),t.exports=f},function(t,e,n){}])})); \ No newline at end of file diff --git a/src/main/webapp/resources/3rd-party/tui/grid/4.21.5/tui-grid/tui-grid.css b/src/main/webapp/resources/3rd-party/tui/grid/4.21.5/tui-grid/tui-grid.css deleted file mode 100644 index 1302c743..00000000 --- a/src/main/webapp/resources/3rd-party/tui/grid/4.21.5/tui-grid/tui-grid.css +++ /dev/null @@ -1,1210 +0,0 @@ -/*! - * TOAST UI Grid - * @version 4.21.5 | Fri Sep 23 2022 - * @author NHN Cloud. FE Development Lab - * @license MIT - */ -/*! - * TOAST UI Select Box - * @version 1.0.0 | Thu Oct 24 2019 - * @author NHN FE Development Lab - * @license MIT - */ -.tui-select-box { - position: relative; -} - -.tui-select-box-input, -.tui-select-box-dropdown, -.tui-select-box-item-group-label, -.tui-select-box-item { - box-sizing: border-box; -} - -.tui-select-box-input { - border: 1px solid #ddd; -} - -.tui-select-box-input.tui-select-box-open, -.tui-select-box-dropdown { - border: 1px solid #aaa; -} - -.tui-select-box-input, -.tui-select-box-dropdown { - background: #fff; -} - -.tui-select-box-input, -.tui-select-box-item-group-label, -.tui-select-box-item { - padding: 0 8px; - height: 29px; - font-size: 13px; - color: #333; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - cursor: pointer; -} - -.tui-select-box-placeholder, -.tui-select-box-item-group-label, -.tui-select-box-item { - line-height: 29px; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; -} - -.tui-select-box-placeholder, -.tui-select-box-icon { - height: 100% -} - -.tui-select-box-placeholder { - display: inline-block; - margin: 0; - width: 80%; - width: calc(100% - 12px); - vertical-align: sub; -} - -.tui-select-box-icon { - display: block; - float: right; - background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAECAYAAACHtL/sAAAAAXNSR0IArs4c6QAABBFpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IlhNUCBDb3JlIDUuNC4wIj4KICAgPHJkZjpS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3AgQ1M2IChXaW5kb3dzKTwveG1wOkNyZWF0b3JUb29sPgogICAgICAgICA8dGlmZjpPcmllbnRhdGlvbj4xPC90aWZmOk9yaWVudGF0aW9uPgogICAgICA8L3JkZjpEZXNjcmlwdGlvbj4KICAgPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4K/ZqkVgAAAERJREFUGBljNDY2/s+AA5w9e5YRXQqqXgAo9xEkB1aAzRA8mmFmgg1hgvIEYKIgmgjNIGUfQATciUBX8IMEidQM0gsGAPabHJ7Zbgx5AAAAAElFTkSuQmCC) left center no-repeat; - width: 7px; - overflow: hidden; - text-indent: 100%; -} - -.tui-select-box-open > .tui-select-box-icon { - background-position: right center; -} - -.tui-select-box-dropdown, -.tui-select-box-item-group { - margin: 0; - padding: 0; - list-style-type: none; -} - -.tui-select-box-dropdown { - position: absolute; - border-top: none; - /* max-height: 145px; */ - overflow: auto; - z-index: 1; - width: 100%; - overflow-x: hidden; -} - -.tui-select-box-item-group-label { - display: block; - font-weight: bold; - cursor: default; -} - -.tui-select-box-item-group > .tui-select-box-item { - padding-left: 20px; -} - -.tui-select-box-selected { - background: #f4f4f4; -} - -.tui-select-box-highlight { - background: #e5f6ff; - outline: none; -} - -.tui-select-box-disabled { - background: #f9f9f9; - color: #c8c8c8; - cursor: default; -} - -.tui-select-box-hidden { - display: none; /* for test */ -} -.tui-grid-container { - width: 100%; - position: relative; - border-width: 0; - clear: both; - font-size: 13px; - font-family: Arial, '\B3CB\C6C0', Dotum, sans-serif; -} -.tui-grid-container ::-webkit-scrollbar { - -webkit-appearance: none; - width: 17px; - height: 17px; -} -.tui-grid-container ::-webkit-scrollbar-thumb { - border: 4px solid transparent; - background-clip: content-box; -} -.tui-grid-container * { - box-sizing: content-box; -} -.tui-grid-container p, -.tui-grid-container input, -.tui-grid-container textarea { - margin: 0; - padding: 0; - font-size: 13px; - font-family: Arial, '\B3CB\C6C0', Dotum, sans-serif; -} -.tui-grid-container fieldset { - margin: 0; - padding: 0; - border: 0; - display: inline; - white-space: nowrap; -} -.tui-grid-container input[type='text'], -.tui-grid-container input[type='password'] { - outline: none; - box-sizing: border-box; - line-height: normal; -} -.tui-grid-container ul, -.tui-grid-container li { - list-style: none; - padding: 0; - margin: 0; -} -.tui-grid-container strong, -.tui-grid-container em { - font-style: normal; -} -.tui-grid-container .tui-grid-pagination { - margin-top: 20px; -} -.tui-grid-clipboard { - position: fixed; - top: 0px; - left: -9999px; - width: 100px; - height: 100px; -} -.tui-grid-btn-text { - display: inline-block; - text-decoration: none; -} -.tui-grid-btn-text span { - display: inline-block; - position: relative; - font-size: 11px; - color: #333; - padding-left: 17px; - letter-spacing: -1px; - line-height: 23px; - white-space: nowrap; - cursor: pointer; - margin-left: 8px; - padding-right: 7px; -} -.tui-grid-btn-text em { - position: absolute; - left: 0; - top: 5px; - width: 17px; - height: 12px; - background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACMCAYAAACeTFAfAAAAAXNSR0IArs4c6QAAC/tJREFUeAHtnX9oVtcZx899kzhrNaTSaDeIdrpCayy1xoBdZJh2CPljbmiT4EQNG/jHwG2MMgcDkxTi5hilVrY/xA2rbpJk+of7IyjrXMEaWI2zjNjBqtRGRtXRlMRm3aJ5931u7jE3N/fe9/58k/f6vXBzznnOc55zzuc+Oefc8977vkrxIAESIAESIAESIAESIAESIAESIAESIAESIIG5T8CY+00sbgvzDQ2L7g0Pv5LP5zcDzlek9rxSHxiGcab8scd+abzzzmhxW1SatdGxbNdtvLb2xfzExG9VPr/cJp6KGsYNI5f7TsXg4J+nhIy5EaBjWVTEqdT9+3/C6OTLBJl5VVb29TjOtW3btsfv3bt3rLy8fOfJkyf/7XZhwsrSsHnp0qXHMVIfw+i9c926daHamQvbgSzqy/QnI5XTqSref1/JaT9Ex9RFGbs8aLy5ufkRONUZ6DdJKOmgZb300rA5NDT0iEz/cKomCSXtVb+bnI4FKrKm8pz+3KhhqjTLuOX5yDo6OoT3CZwvWGoSnrDklihckIZNOFPu9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01FcpodPbsWXPKk6lPDpn+ZKQqNaeaQ9ckE02J5VgyGokD2ddTpexU9jWXPZ6JK13kTsSaCqWt2rnEoUrRqexTnle8yNckE9XFGrE0Ae1cki6lNZVuP8PkCSTiWNKsUnUo+5TnFU8ee/YtJuZYpYhK3wGWYtvnepsjO1bYz/7Cgkjbvn10Cts26pMACZAACZAACZAACZAACZAACZAACZAACZAACWSDwP8B9X0BfshR6QsAAAAASUVORK5CYII=) - no-repeat; -} -.tui-grid-btn-sorting { - display: inline-block; - overflow: hidden; - margin-left: 6px; - height: 16px; - width: 11px; - background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACMCAYAAACeTFAfAAAAAXNSR0IArs4c6QAAC/tJREFUeAHtnX9oVtcZx899kzhrNaTSaDeIdrpCayy1xoBdZJh2CPljbmiT4EQNG/jHwG2MMgcDkxTi5hilVrY/xA2rbpJk+of7IyjrXMEaWI2zjNjBqtRGRtXRlMRm3aJ5931u7jE3N/fe9/58k/f6vXBzznnOc55zzuc+Oefc8977vkrxIAESIAESIAESIAESIAESIAESIAESIAESIIG5T8CY+00sbgvzDQ2L7g0Pv5LP5zcDzlek9rxSHxiGcab8scd+abzzzmhxW1SatdGxbNdtvLb2xfzExG9VPr/cJp6KGsYNI5f7TsXg4J+nhIy5EaBjWVTEqdT9+3/C6OTLBJl5VVb29TjOtW3btsfv3bt3rLy8fOfJkyf/7XZhwsrSsHnp0qXHMVIfw+i9c926daHamQvbgSzqy/QnI5XTqSref1/JaT9Ex9RFGbs8aLy5ufkRONUZ6DdJKOmgZb300rA5NDT0iEz/cKomCSXtVb+bnI4FKrKm8pz+3KhhqjTLuOX5yDo6OoT3CZwvWGoSnrDklihckIZNOFPu9u3bJxCa7ZTQSgf2l8CK4bpbWtoYgb4ZtsWAvTlsmcHBwddQZouj3BZL7hAHS6Zh8/Lly6+hf9PaKWmRB2tVgfWEl5Genh7MCNGPlpYW33WMtrx3795Y9Rw4cCBQPePPPDMKcAt1vTrU0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ZYpYhK3wGWYtvnepsjO1bYz/7Cgkjbvn10Cts26pMACZAACZAACZAACZAACZAACZAACZAACZAACWSDwP8B9X0BfshR6QsAAAAASUVORK5CYII=) -91px -10px - no-repeat; - vertical-align: middle; - cursor: pointer; -} -.tui-grid-btn-sorting-down { - background-position: -133px -8px; -} -.tui-grid-btn-sorting-up { - background-position: -112px -8px; -} -.tui-grid-btn-close { - display: inline-block; - overflow: hidden; - height: 24px; - width: 24px; - background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACMCAYAAACeTFAfAAAAAXNSR0IArs4c6QAAC/1JREFUeAHtnV9sFMcdx2fPNiEEqGPFkFYFUkilhiMKwfghNarspC9+KK0gtkUQYLUSD6loqyoqlSoRE8m0VFUUgsoDUisCtMh24YE++KWJE4lgqcGUqDKpVEAhRlXAVZxi4ib1n+v3d7eD1+vdvf179p6/I61n9je/+c3MZ3+emZ3bvVOKgQRIgARIgARIgARIgARIgARIgARIgARIgATmPwFj/jextC3MNTQsmxgZeSmXy20FnMel9pxS1wzDOF/58MO/Md59d7S0LUpnbXQsy3Ubz2afzU1N/V7lcmss4umkYdw0MpnvVw0OvjUtZMqJAB3LpCJOpSYn/4LRyZMJMnOqouLbUZxrx44dj0xMTJysrKzcfebMmX87XZigsiRsXrp06RGM1Ccxeu/evHlzoHZmgnagHPVl+pORyu5UVR98oOSwBtHJ66KMVe433dLS8iCc6jz0myWWc79l3fSSsDk0NPSgTP9wqmaJ5dytfic5HQtUZE3lOv05UcNUmS/jlOch6+joEN6ncTxjqkl82pSbomBREjbhTJk7d+6cRpxvp8TmuW9/8a0YrLvp0sYI9N2gLQbsrUHLDA4Ovooy22zltplym9jfaRI2L1++/Cr6N6Odci5yf60qsp5wM9Ld3Y0ZIXxobW31XMdoy/v3749Uz+HDh33VM/7EE6MAt1TXq2M9DSJfi+7HmB7uIT/UdHjfSBknfIEv4/7nu0bHiv8KV4YxWW4jFobFa+Cw0c7CaaTSOmYZfcrYRoAjFoCM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unhARIgARIgARIgARIgARIgARIgARIgARIgARIYCEQ+D9RZOqPG2fqIQAAAABJRU5ErkJggg==) -81px -84px - no-repeat; - vertical-align: middle; - cursor: pointer; - float: right; -} -.tui-grid-btn-filter { - display: inline-block; - overflow: hidden; - height: 24px; - width: 24px; - background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACMCAYAAACeTFAfAAAAAXNSR0IArs4c6QAAC/1JREFUeAHtnV9sFMcdx2fPNiEEqGPFkFYFUkilhiMKwfghNarspC9+KK0gtkUQYLUSD6loqyoqlSoRE8m0VFUUgsoDUisCtMh24YE++KWJE4lgqcGUqDKpVEAhRlXAVZxi4ib1n+v3d7eD1+vdvf179p6/I61n9je/+c3MZ3+emZ3bvVOKgQRIgARIgARIgARIgARIgARIgARIgARIgATmPwFj/jextC3MNTQsmxgZeSmXy20FnMel9pxS1wzDOF/58MO/Md59d7S0LUpnbXQsy3Ubz2afzU1N/V7lcmss4umkYdw0MpnvVw0OvjUtZMqJAB3LpCJOpSYn/4LRyZMJMnOqouLbUZxrx44dj0xMTJysrKzcfebMmX87XZigsiRsXrp06RGM1Ccxeu/evHlzoHZmgnagHPVl+pORyu5UVR98oOSwBtHJ66KMVe433dLS8iCc6jz0myWWc79l3fSSsDk0NPSgTP9wqmaJ5dytfic5HQtUZE3lOv05UcNUmS/jlOch6+joEN6ncTxjqkl82pSbomBREjbhTJk7d+6cRpxvp8TmuW9/8a0YrLvp0sYI9N2gLQbsrUHLDA4Ovooy22zltplym9jfaRI2L1++/Cr6N6Odci5yf60qsp5wM9Ld3Y0ZIXxobW31XMdoy/v3749Uz+HDh33VM/7EE6MAt1TXq2M9DSJfi+7HmB7uIT/UdHjfSBknfIEv4/7nu0bHiv8KV4YxWW4jFobFa+Cw0c7CaaTSOmYZfcrYRoAjFoCMr19/EOusAzY29+8InRwM+1mvVF29+rK9DM8LBDhigYPsqI9/8ske33eG2CiVMkGdCNsCr6HMjx3KHenp6fmJg7yoaGBg4DWsD2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or: pointer; -} -.tui-grid-btn-filter-active { - background-position: -47px -84px; -} - -.tui-grid-filter-icon { - cursor: default; -} - -.tui-grid-layer-state { - position: absolute; - background: #fff; - text-align: center; - z-index: 15; -} -.tui-grid-layer-state p { - position: absolute; - top: 50%; - left: 0; - right: 0; - margin-top: -7px; - font-size: 14px; - color: #ccc; -} -.tui-grid-layer-state-content { - padding-top: 50px; -} -.tui-grid-layer-state-loading { - display: block; - margin: 10px auto 0; - background: url(data:image/gif;base64,R0lGODlhlgANAKIHAMzi5FnYeeXw8czh5Nnp67/a3f///////yH/C05FVFNDQVBFMi4wAwEAAAAh+QQFFAAHACwAAAAAlgANAAADXnh60v4wykmrvTjrHdfiYCiOZNkpZqquLIg6RizPdG3feK7vfO//swcDBiwaj8ik0iBZOp/QaC8irVqvSSp2y+3Smt6wGCp8jM9ooHDYarvfpg98Tq9LPC+7fq/yJAAAIfkEBQAABwAsAAAAAJYADQAAA2V4etT+MMpJq7046x3X4mAojmTZKWaqriyIOl4sz3Rt33iu77z9MLCecEgsGo9AyCLAbDqfT6R0Sh2eDtBstsrtej9KhXbc/JrPRgl6zT7/fu24PB1s2e94FTjP7/uve3+CgykeCQAh+QQFAAAHACwAAAAAlgANAAADa3h6MP4wykmrvTjrzSFYSyeOZGmeUoiubOt2CgTOdG3feK7vfO/jMtlvSCwaj8jDBBloOp9QaHJKpaaO0Wy2yu3+rkat2Oktm23Ls3rNVjmUj7Z8bo3DX/i8HuXe+/+AETQNEoSBh4gcHwsJACH5BAUAAAcALAAAAACWAA0AAANseHrV/jDKSau9OOsd1+JgKI5k2Slmqq4siDpGLM90bd94ru987/+zBwMGLBqPyKTSIFEGntCodEqtRpfYbC3itHq/Vq04y02Cz+jAeJ1sst/wuE74kNvvb+Gwxe/7TR9/goOEEh4vhYmKKh4JACH5BAUAAAcALBoABQA8AAMAAAMUaLrcHTDKSauVLufLO9fg4o1kkAAAIfkEBQAABwAsLgAFADwAAwAAAxRoutwdMMpJq5Uu58s71+DijWSQ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BAUAAAcALDMABQA8AAMAAAMUGLrc/pCZSau1Met8e99gGHgklQAAIfkEBQAABwAsHwAFADwAAwAAAxQYutz+kJlJq7Ux63x732AYeCSVAAAh+QQFAAAHACwAAAAAlgANAAADdHh6MP4wykmrvTjrzSFYSyeOZGmeUoiubOt2CmTMdG3feK7vfO//wGANcpAJj8ikcsk0THKBqHRKrVqv06Z2q5RAseAwlksu97w4sXodMLvftCd8Tq/HH8WHfc/fEvMvgYKDKCqEh4iJKSAMEw2KkJEdHwsJACH5BAUAAAcALAAAAACWAA0AAANqeHrU/jDKSau9OOsd1+JgKI5k2Slmqq4siDpGLM90bd94ru987/+zBwMGLBqPyKTSIJEFntCodBpdWq/YXsRJ7Xqz4DB4G/Oap+K0+thcu99v4QNOr1+Fw5Z+zzd9+oCBghIeL4OHiCoeCQAh+QQFFAAHACwAAAAAlgANAAADXnh60v4wykmrvTjrHdfiYCiOZNkpZqquLIg6RizPdG3feK7vfO//swcDBiwaj8ik0iBZOp/QaC8irVqvSSp2y+3Smt6wGCp8jM9ooHDYarvfpg98Tq9LPC+7fq/yJAAAOw==); - border: 0; - width: 150px; - height: 13px; -} -.tui-grid-layer-editing { - position: absolute; - background: #fff; - z-index: 15; - padding: 0 4px; - border-style: solid; - border-width: 1px; - white-space: nowrap; - box-sizing: border-box; -} -.tui-grid-layer-editing textarea { - position: absolute; - left: 0; - top: 0; - width: 100%; - height: 100%; - padding: 3px 10px; - box-sizing: border-box; - white-space: normal; - word-break: break-all; - overflow: hidden; -} -.tui-grid-layer-focus-border { - position: absolute; - overflow: hidden; - z-index: 15; -} -.tui-grid-layer-selection { - position: absolute; - top: 0; - width: 0; - height: 0; - border-style: solid; - border-width: 1px; - opacity: 0.1; - filter: alpha(opacity=10); -} - -.tui-grid-table { - margin: 0; - width: 1px; - box-sizing: border-box; - table-layout: fixed; - border-collapse: collapse; - border: 1px hidden transparent; - border-bottom: none; -} -.tui-grid-lside-area .tui-grid-table { - width: 100%; -} -.tui-grid-cell { - border-width: 1px; - border-style: solid; - white-space: nowrap; - padding: 0; - overflow: hidden; -} -.tui-grid-cell .tui-grid-cell-content { - padding: 12px 12px 11px; - overflow: hidden; - box-sizing: border-box; - word-break: break-all; -} -.tui-grid-cell img { - vertical-align: middle; -} -.tui-grid-cell-header { - padding: 4px 5px; - text-align: center; - /* @TODO: box-sizing standardize required */ - box-sizing: border-box; -} -.tui-grid-cell-summary { - padding: 0 12px; -} -.tui-grid-cell-disabled input[type='text'], -.tui-grid-cell-disabled input[type='password'] { - opacity: 0.3; - filter: alpha(opacity=30); -} -.tui-grid-cell-ellipsis .tui-grid-cell-content { - text-overflow: ellipsis; -} -.tui-grid-cell-has-input .tui-grid-cell-content { - padding: 4px 5px; -} -.tui-grid-cell-has-tree { - height: inherit; - box-sizing: border-box; -} -.tui-grid-cell-has-tree .tui-grid-cell-content { - padding-left: 14px; -} -.tui-grid-cell-content .tui-grid-content-before { - float: left; - margin-right: 2px; - line-height: 1.5; -} -.tui-grid-cell-content .tui-grid-content-after { - float: right; - margin-left: 2px; - line-height: 1.5; -} -.tui-grid-cell-content .tui-grid-content-input { - display: block; - overflow: hidden; - line-height: 1.5; - *margin-left: -2px; - *padding-left: 2px; -} -.tui-grid-cell-content input[type='text'], -.tui-grid-cell-content input[type='password'] { - width: 100%; - padding: 6px 7px; - border: solid 1px #ddd; -} -.tui-grid-cell-content label + input { - margin-left: 10px; -} -.tui-grid-cell-content select:not(.tui-time-picker-select) { - box-sizing: border-box; -} -.tui-grid-column-resize-container { - display: none; - position: relative; - width: 0; -} -.tui-grid-column-resize-handle { - float: left; - position: absolute; - bottom: 1px; - left: -99px; - width: 7px; - background: #000; - opacity: 0; - filter: alpha(opacity=0); - cursor: col-resize; -} -.tui-grid-column-resize-handle-last { - width: 3px; -} -.tui-grid-border-line { - position: absolute; - z-index: 15; -} -.tui-grid-border-line-top { - top: 0; - left: 0; - right: 0; - height: 1px; -} -.tui-grid-border-line-left { - top: 0; - bottom: 17px; - left: 0; - width: 1px; -} -.tui-grid-border-line-right { - top: 0; - bottom: 0; - right: 0; - width: 1px; -} -.tui-grid-border-line-bottom { - bottom: 0; - left: 0; - right: 17px; - height: 1px; - z-index: 10; -} -.tui-grid-no-scroll-x .tui-grid-border-line-left { - bottom: 0; - right: 0; -} -.tui-grid-no-scroll-y .tui-grid-border-line-bottom { - right: 0; -} -.tui-grid-content-area { - position: relative; - border-style: solid; - border-width: 0 0 1px; -} -.tui-grid-content-area.tui-grid-no-scroll-x { - border-bottom-width: 0; -} -.tui-grid-header-area { - border-style: solid; - border-width: 0 0 1px; - position: relative; - overflow: hidden; -} -.tui-grid-header-area .tui-grid-table { - border-top-style: solid; -} -.tui-grid-body-area { - border-style: solid; - border-width: 0; - position: relative; - overflow: scroll; -} -.tui-grid-has-summary-top .tui-grid-body-area { - margin-top: -17px; - border-top-width: 1px; -} -.tui-grid-no-scroll-x.tui-grid-has-summary-top .tui-grid-body-area { - margin-top: 0; -} -.tui-grid-summary-area { - position: relative; - margin-top: -18px; - border-top: 1px solid; - overflow-y: hidden; - overflow-x: scroll; -} -.tui-grid-no-scroll-x .tui-grid-summary-area { - margin-top: -1px; - margin-bottom: 1px; - overflow-x: hidden; -} -.tui-grid-no-scroll-x .tui-grid-summary-area-right { - bottom: 0; -} -.tui-grid-no-scroll-x.tui-grid-has-summary-top { - margin-top: 0; -} -.tui-grid-has-summary-top .tui-grid-summary-area { - margin-top: 0; - border-top-style: hidden; - margin-bottom: 0; -} -.tui-grid-lside-area { - display: none; - position: absolute; - top: 0; - left: 0; - overflow: hidden; - z-index: 5; -} -.tui-grid-lside-area .tui-grid-body-area { - margin-right: -17px; -} -.tui-grid-lside-area .tui-grid-body-area .tui-grid-selection-layer { - left: 1px; -} -.tui-grid-rside-area { - display: none; - overflow: hidden; -} -.tui-grid-rside-area .tui-grid-header-area, -.tui-grid-rside-area .tui-grid-summary-area { - margin-right: 17px; -} -.tui-grid-rside-area .tui-grid-frozen-border-top { - position: absolute; - top: 0; -} -.tui-grid-rside-area .tui-grid-frozen-border-top .tui-grid-column-resize-handle { - top: 0; -} -.tui-grid-rside-area .tui-grid-frozen-border-bottom { - position: absolute; - bottom: 0; - height: 17px; -} -.tui-grid-no-scroll-y .tui-grid-rside-area .tui-grid-header-area, -.tui-grid-no-scroll-y .tui-grid-rside-area .tui-grid-summary-area { - margin-right: 0; -} -.tui-grid-body-container { - position: relative; - margin-top: -1px; -} -.tui-grid-table-container { - position: absolute; -} -.tui-grid-scrollbar-right-top { - display: block; - position: absolute; - top: 0; - right: 0; - width: 16px; - border-style: solid; - border-width: 0 1px 1px 1px; - z-index: 10; -} -.tui-grid-scrollbar-left-bottom { - position: absolute; - left: 0; - right: 0; - bottom: 0; - height: 17px; - border-style: solid; - border-width: 0 1px; - z-index: 10; -} -.tui-grid-scrollbar-right-bottom { - position: absolute; - bottom: 0; - right: 0; - width: 16px; - border-style: solid; - border-width: 1px 1px 0 1px; - z-index: 10; -} -.tui-grid-no-scroll-x .tui-grid-scrollbar-right-bottom { - height: 0; -} -.tui-grid-no-scroll-x.tui-grid-has-summary-bottom .tui-grid-scrollbar-right-bottom { - border-bottom-width: 1px; -} -.tui-grid-no-scroll-y .tui-grid-scrollbar-right-bottom { - width: 0; - height: 16px; - border-left: 0; -} -.tui-grid-scrollbar-y-inner-border { - display: block; - position: absolute; - right: 17px; - width: 1px; - z-index: 10; -} -.tui-grid-scrollbar-y-outer-border { - display: block; - position: absolute; - top: 0; - bottom: 0; - right: 0; - width: 1px; - z-index: 10; -} -.tui-grid-scrollbar-frozen-border { - position: absolute; - bottom: 0; - width: 0; - height: 17px; - border-style: solid; - border-width: 0 1px 0 0; - z-index: 10; -} -.tui-grid-frozen-border { - position: absolute; - top: 0; - bottom: 0; - z-index: 5; -} -.tui-grid-height-resize-handle { - overflow: hidden; - background-color: #fff; - cursor: row-resize; - height: 17px; - border-style: solid; - border-width: 0 1px 1px; - border-color: #fff; - font-size: 0; - text-align: center; -} -.tui-grid-height-resize-handle button { - display: block; - width: 100%; - cursor: row-resize; - padding: 0; - margin: 0; - outline: 0; - border: 0; - background: transparent; -} -.tui-grid-height-resize-handle button span { - background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACMCAYAAACeTFAfAAAAAXNSR0IArs4c6QAAC/tJREFUeAHtnX9oVtcZx899kzhrNaTSaDeIdrpCayy1xoBdZJh2CPljbmiT4EQNG/jHwG2MMgcDkxTi5hilVrY/xA2rbpJk+of7IyjrXMEaWI2zjNjBqtRGRtXRlMRm3aJ5931u7jE3N/fe9/58k/f6vXBzznnOc55zzuc+Oefc8977vkrxIAESIAESIAESIAESIAESIAESIAESIAESIIG5T8CY+00sbgvzDQ2L7g0Pv5LP5zcDzlek9rxSHxiGcab8scd+abzzzmhxW1SatdGxbNdtvLb2xfzExG9VPr/cJp6KGsYNI5f7TsXg4J+nhIy5EaBjWVTEqdT9+3/C6OTLBJl5VVb29TjOtW3btsfv3bt3rLy8fOfJkyf/7XZhwsrSsHnp0qXHMVIfw+i9c926daHamQvbgSzqy/QnI5XTqSref1/JaT9Ex9RFGbs8aLy5ufkRONUZ6DdJKOmgZb300rA5NDT0iEz/cKomCSXtVb+bnI4FKrKm8pz+3KhhqjTLuOX5yDo6OoT3CZwvWGoSnrDklihckIZNOFPu9u3bJxCa7ZTQSgf2l8CK4bpbWtoYgb4ZtsWAvTlsmcHBwddQZouj3BZL7hAHS6Zh8/Lly6+hf9PaKWmRB2tVgfWEl5Genh7MCNGPlpYW33WMtrx3795Y9Rw4cCBQPePPPDMKcAt1vTrU0yDytehBiOnhLvIjTYcPjGQ4Egh8hvtvdo2OlfwVLo9iMmsjFobFD8BhjZOF20ildawyOsnQQYAjFoCMr1rViXXWPgebB3eEbg6G/axXK65ebXeWYXqSAEcscJAd9fFPPtkV+M4QG6VSJqwTYVvgdZT5gUu5g729vT90kRcUDQwMvI714QybWAMerKuri2QziXZyxLIuXTE2SGVrAHdxvajSfsd1ura2thl5EwW9yEUBTpXD3Vqv3LXpbDjV6b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ix41G8A/ky2iI/dXleO5cVyhvWtZIvIxfimTmMtHoi/4UA1m63XzSnslfane9Aclo7kC6KU+lm2J0IskF818TL+BqmPyAuzobftFeNWBrcQZiZIzXHEkJ255oVp9KXabpzFdWpdBMcziU/4zsfZyadSvqcqmNJBQCalzD1xbpU4nfoxXyRFutuTdm6devTGKn+hjxxqs8xcj1/6tSpf7jplros8TVWqQNJq/0yYlnTn+lUqGe+pK2RLK1qZ80uHasI6B3ToKyxnke1Mg1OW9AXoSlFq4KOlTJquStEFebdH0JzTWVNf41W2nSurN0VFsOx3sZvHgvE2T0M9Ta+HK7o7Th+/PhnuHGRO8BpC3XrLtB0Lsl32zydXWCsvSQIeI1I1ohWEn1gI0mABEiABEiABEiABEiABEiABEiABEiABEiABEiABEiABEiABEiABEiABEiABEiABEiABEiABIpPwIhSJV44Nd+8CVsWr4MFqi9t+2HbTf3wBCL/dC9eEAhVGx7FDaWftv26urpQ/xwDAwOB/ilCdTLDysV45j3D+Ng1LwKpOdbIyIg6d+6cV72UZ5xA5KnQj4s4VWdnpxoaGjLVNm3a5Kc+a3lBp7ew0+asdWgOVRx7xJJRSRxJH3anqqmpUevXr9dZDB8iArEcS5zqyJEj5ugkDuV0qvb2dlVZWVkyOGVk0qOTPV4yHZhDDY01FcpodPbsWXPKk6lPDpn+ZKQqNaeaQ9ckE02J5VgyGokD2ddTpexU9jWXPZ6JK13kTsSaCqWt2rnEoUrRqexTnle8yNckE9XFGrE0Ae1cki6lNZVuP8PkCSTiWNKsUnUo+5TnFU8ee/YtJuZYpYhK3wGWYtvnepsjO1bYz/7Cgkjbvn10Cts26pMACZAACZAACZAACZAACZAACZAACZAACZAACWSDwP8B9X0BfshR6QsAAAAASUVORK5CYII=) - no-repeat -39px -10px; - display: inline-block; - width: 16px; - height: 17px; -} -.tui-grid-btn-tree { - position: absolute; - padding: 0; - padding-left: 4px; - margin-top: -8px; - top: 50%; - width: 15px; - height: 15px; - background: transparent; - border: none; - outline: none; - font-size: 0; - vertical-align: middle; - cursor: pointer; -} -.tui-grid-tree-icon { - position: absolute; - margin-top: -7px; - top: 50%; - width: 22px; - height: 14px; - font-size: 0; - vertical-align: middle; -} -.tui-grid-tree-icon i { - display: inline-block; - margin-left: 5px; - width: 14px; - height: 14px; - background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACMCAYAAACeTFAfAAAAAXNSR0IArs4c6QAAC/tJREFUeAHtnX9oVtcZx899kzhrNaTSaDeIdrpCayy1xoBdZJh2CPljbmiT4EQNG/jHwG2MMgcDkxTi5hilVrY/xA2rbpJk+of7IyjrXMEaWI2zjNjBqtRGRtXRlMRm3aJ5931u7jE3N/fe9/58k/f6vXBzznnOc55zzuc+Oefc8977vkrxIAESIAESIAESIAESIAESIAESIAESIAESIIG5T8CY+00sbgvzDQ2L7g0Pv5LP5zcDzlek9rxSHxiGcab8scd+abzzzmhxW1SatdGxbNdtvLb2xfzExG9VPr/cJp6KGsYNI5f7TsXg4J+nhIy5EaBjWVTEqdT9+3/C6OTLBJl5VVb29TjOtW3btsfv3bt3rLy8fOfJkyf/7XZhwsrSsHnp0qXHMVIfw+i9c926daHamQvbgSzqy/QnI5XTqSref1/JaT9Ex9RFGbs8aLy5ufkRONUZ6DdJKOmgZb300rA5NDT0iEz/cKomCSXtVb+bnI4FKrKm8pz+3KhhqjTLuOX5yDo6OoT3CZwvWGoSnrDklihckIZNOFPu9u3bJxCa7ZTQSgf2l8CK4bpbWtoYgb4ZtsWAvTlsmcHBwddQZouj3BZL7hAHS6Zh8/Lly6+hf9PaKWmRB2tVgfWEl5Genh7MCNGPlpYW33WMtrx3795Y9Rw4cCBQPePPPDMKcAt1vTrU0yDytehBiOnhLvIjTYcPjGQ4Egh8hvtvdo2OlfwVLo9iMmsjFobFD8BhjZOF20ildawyOsnQQYAjFoCMr1rViXXWPgebB3eEbg6G/axXK65ebXeWYXqSAEcscJAd9fFPPtkV+M4QG6VSJqwTYVvgdZT5gUu5g729vT90kRcUDQwMvI714Qyb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CVOWvgtfnza8CwD9dtV1T0vIVAZJvl2chnrhj4WXMDj/HkTzRSR1eqyF1+DlOJ35kKfV27Nix41G8A/ky2iI/dXleO5cVyhvWtZIvIxfimTmMtHoi/4UA1m63XzSnslfane9Aclo7kC6KU+lm2J0IskF818TL+BqmPyAuzobftFeNWBrcQZiZIzXHEkJ255oVp9KXabpzFdWpdBMcziU/4zsfZyadSvqcqmNJBQCalzD1xbpU4nfoxXyRFutuTdm6devTGKn+hjxxqs8xcj1/6tSpf7jplros8TVWqQNJq/0yYlnTn+lUqGe+pK2RLK1qZ80uHasI6B3ToKyxnke1Mg1OW9AXoSlFq4KOlTJquStEFebdH0JzTWVNf41W2nSurN0VFsOx3sZvHgvE2T0M9Ta+HK7o7Th+/PhnuHGRO8BpC3XrLtB0Lsl32zydXWCsvSQIeI1I1ohWEn1gI0mABEiABEiABEiABEiABEiABEiABEiABEiABEiABEiABEiABEiABEiABEiABEiABEiABEiABIpPwIhSJV44Nd+8CVsWr4MFqi9t+2HbTf3wBCL/dC9eEAhVGx7FDaWftv26urpQ/xwDAwOB/ilCdTLDysV45j3D+Ng1LwKpOdbIyIg6d+6cV72UZ5xA5KnQj4s4VWdnpxoaGjLVNm3a5Kc+a3lBp7ew0+asdWgOVRx7xJJRSRxJH3anqqmpUevXr9dZDB8iArEcS5zqyJEj5ugkDuV0qvb2dlVZWVkyOGVk0qOTPV4yHZhDDY01FcpodPbsWXPKk6lPDpn+ZKQqNaeaQ9ckE02J5VgyGokD2ddTpexU9jWXPZ6JK13kTsSaCqWt2rnEoUrRqexTnle8yNckE9XFGrE0Ae1cki6lNZVuP8PkCSTiWNKsUnUo+5TnFU8ee/YtJuZYpYhK3wGWYtvnepsjO1bYz/7Cgkjbvn10Cts26pMACZAACZAACZAACZAACZAACZAACZAACZAACWSDwP8B9X0BfshR6QsAAAAASUVORK5CYII=) - no-repeat -14px -35px; -} -.tui-grid-tree-button-collapse .tui-grid-btn-tree i { - background-position: -43px -61px; - width: 8px; - height: 11px; -} -.tui-grid-tree-button-collapse .tui-grid-tree-icon i { - margin-left: 4px; - background-position: -39px -35px; - width: 14px; - height: 14px; -} -.tui-grid-tree-button-expand .tui-grid-btn-tree i { - margin-top: 2px; - background-position: -15px -63px; - width: 11px; - height: 8px; -} -.tui-grid-tree-button-expand .tui-grid-tree-icon i { - margin-left: 4px; - background-position: -65px -35px; - height: 14px; - width: 14px; -} -.tui-grid-tree-wrapper-relative { - position: relative; - margin: -1px 0; -} -.tui-grid-tree-wrapper-valign-center { - vertical-align: middle; -} -.tui-grid-tree-extra-content { - position: absolute; - margin-left: 4px; - top: 0; - left: 0; - bottom: 0; -} -.tui-grid-tree-depth { - display: inline-block; - position: absolute; - width: 22px; - top: 0; - bottom: 0; -} -.tui-grid-tree-depth i { - display: inline-block; - background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACMCAYAAACeTFAfAAAAAXNSR0IArs4c6QAAC/tJREFUeAHtnX9oVtcZx899kzhrNaTSaDeIdrpCayy1xoBdZJh2CPljbmiT4EQNG/jHwG2MMgcDkxTi5hilVrY/xA2rbpJk+of7IyjrXMEaWI2zjNjBqtRGRtXRlMRm3aJ5931u7jE3N/fe9/58k/f6vXBzznnOc55zzuc+Oefc8977vkrxIAESIAESIAESIAESIAESIAESIAESIAESIIG5T8CY+00sbgvzDQ2L7g0Pv5LP5zcDzlek9rxSHxiGcab8scd+abzzzmhxW1SatdGxbNdtvLb2xfzExG9VPr/cJp6KGsYNI5f7TsXg4J+nhIy5EaBjWVTEqdT9+3/C6OTLBJl5VVb29TjOtW3btsfv3bt3rLy8fOfJkyf/7XZhwsrSsHnp0qXHMVIfw+i9c926daHamQvbgSzqy/QnI5XTqSref1/JaT9Ex9RFGbs8aLy5ufkRONUZ6DdJKOmgZb300rA5NDT0iEz/cKomCSXtVb+bnI4FKrKm8pz+3KhhqjTLuOX5yDo6OoT3CZwvWGoSnrDklihckIZNOFPu9u3bJxCa7ZTQSgf2l8CK4bpbWtoYg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Q9ckE02J5VgyGokD2ddTpexU9jWXPZ6JK13kTsSaCqWt2rnEoUrRqexTnle8yNckE9XFGrE0Ae1cki6lNZVuP8PkCSTiWNKsUnUo+5TnFU8ee/YtJuZYpYhK3wGWYtvnepsjO1bYz/7Cgkjbvn10Cts26pMACZAACZAACZAACZAACZAACZAACZAACZAACWSDwP8B9X0BfshR6QsAAAAASUVORK5CYII=) - no-repeat; -} - -.tui-grid-row-hidden .tui-grid-cell { - display: none; -} - -.tui-grid-row-header-checkbox { - padding: 4px 5px; -} - -.tui-grid-filter-container { - width: 220px; - padding: 8px; - border: 1px solid #ccc; - box-sizing: border-box; - background-color: #fff; - position: absolute; - top: 0; - z-index: 100; - left: 68px; - box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.08); -} - -.tui-grid-filter-container .tui-grid-btn-filter, -.tui-grid-btn-close { - margin-bottom: 6px; -} - -.tui-grid-filter-dropdown { - box-sizing: border-box; - margin: 2px 7px; - height: 29px; - width: 190px; - border: 1px solid #ddd; -} - -.tui-grid-filter-dropdown select { - height: 100%; - width: 100%; - font-size: 13px; - color: #333; - border: none; - background-color: #fff; - cursor: pointer; -} - -.tui-grid-filter-dropdown select:focus { - outline: none; -} - -.tui-grid-filter-container .tui-grid-filter-input { - margin: 2px 7px; - padding: 8px 7px; - font-size: 13px; - color: #333; - border: 1px solid #ddd; - width: 190px; - height: 29px; -} - -.tui-grid-filter-input::placeholder { - color: rgba(51, 51, 51, 0.3); -} - -.tui-grid-filter-comparator-container { - margin: 2px 0; - padding: 8px; -} - -.tui-grid-filter-comparator { - display: inline-block; - margin-right: 8px; -} - -.tui-grid-filter-comparator label { - cursor: pointer; -} - -.tui-grid-filter-comparator span { - font-size: 12px; - color: #333; - vertical-align: middle; -} - -.tui-grid-filter-comparator label::before { - content: ' '; - margin-right: 4px; - display: inline-block; - width: 14px; - height: 14px; - background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACMCAYAAACeTFAfAAAAAXNSR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I+J+pYUgGA5iROfLEulXgFvZgv0WLdqSnbt2//BkaqvyFPnOpzjFxPnz179h9OummXxb7GSjuQpNovI5Y5/eWdCvUslnNzJEuq2jmzS8cqAXrbNChrrKdRrUyDMxb0JWhKyaqgYyWMWu4KUUX+7g9xfk1lTn9N5nneucrtrrAUjvUOfvNYIM5tMNQ7+HK4krfj1KlTn+HGRe4AZyzUzbvAvHNJvtPm6dwCY+2pIOA2IpkjWir6wEaSAAmQAAmQAAmQAAmQAAmQAAmQAAmQAAmQAAmQAAmQAAmQAAmQAAmQAAmQAAmQAAmQAAmQAAmUnoARpkq8cJp/8yZoWbwO5qu+pO0HbTf1gxMI/dO9eEEgUG14FDeQftL26+rqAv1zDAwM+PqnCNTJMlYuxTPvZYyPXXMjkJhjDX+h1LHrbtVSXu4EQk+FXmDEqZrexmsp/ylovbjOS3vu8vxOb0Gnzbnr0fypOfKIJaOSOJIOVqfKfgmv2H9V5zBeSAQiOZY41Q8HCqOTOJTdqfoalap9ID04ZWTSo5M1nZ4ezJ+WRpoKZTQ6dq0w5cnUJ0GmPxmp0uZUhdbzb1wEIjmWjEbiQNb1VJqdyrrmsqbjgr2Q7ESaCgWUONdbjYVRKo1OZZ3y3NILySHi6mukEUs3YoXpXLKDmKY1lW4/4/gJxOJY0ixxrjQG65Tnlk5jv+a6zbE51lx3JEz9+g4wTFmW8SYQ2rGCfvbn3YzZuUnbt45Os2unhARIgARIgARIgARIgARIgARIgARIgARIgARIYCEQ+D9RZOqPG2fqIQAAAABJRU5ErkJggg==) - no-repeat -113px -35px; - vertical-align: middle; -} - -.tui-grid-filter-comparator-checked label::before { - background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACMCAYAAACeTFAfAAAAAXNSR0IArs4c6QAAC/1JREFUeAHtnV9sFMcdx2fPNiEEqGPFkFYFUkilhiMKwfghNarspC9+KK0gtkUQYLUSD6loqyoqlSoRE8m0VFUUgsoDUisCtMh24YE++KWJE4lgqcGUqDKpVEAhR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yWMWu4KUUX+7g9xfk1lTn9N5nneucrtrrAUjvUOfvNYIM5tMNQ7+HK4krfj1KlTn+HGRe4AZyzUzbvAvHNJvtPm6dwCY+2pIOA2IpkjWir6wEaSAAmQAAmQAAmQAAmQAAmQAAmQAAmQAAmQAAmQAAmQAAmQAAmQAAmQAAmQAAmQAAmQAAmQAAmUnoARpkq8cJp/8yZoWbwO5qu+pO0HbTf1gxMI/dO9eEEgUG14FDeQftL26+rqAv1zDAwM+PqnCNTJMlYuxTPvZYyPXXMjkJhjDX+h1LHrbtVSXu4EQk+FXmDEqZrexmsp/ylovbjOS3vu8vxOb0Gnzbnr0fypOfKIJaOSOJIOVqfKfgmv2H9V5zBeSAQiOZY41Q8HCqOTOJTdqfoalap9ID04ZWTSo5M1nZ4ezJ+WRpoKZTQ6dq0w5cnUJ0GmPxmp0uZUhdbzb1wEIjmWjEbiQNb1VJqdyrrmsqbjgr2Q7ESaCgWUONdbjYVRKo1OZZ3y3NILySHi6mukEUs3YoXpXLKDmKY1lW4/4/gJxOJY0ixxrjQG65Tnlk5jv+a6zbE51lx3JEz9+g4wTFmW8SYQ2rGCfvbn3YzZuUnbt45Os2unhARIgARIgARIgARIgARIgARIgARIgARIgARIYCEQ+D9RZOqPG2fqIQAAAABJRU5ErkJggg==) - no-repeat -89px -35px; -} - -.tui-grid-filter-comparator input[type='radio'] { - display: none; -} - -.tui-grid-filter-list-container .tui-grid-filter-list { - margin: 4px 0; - border-top: 1px solid #eee; - border-bottom: 1px solid #eee; - max-height: 272px; - overflow-y: scroll; -} - -.tui-grid-filter-list-container .tui-grid-filter-list-item { - color: #333; -} - -.tui-grid-filter-list-item input[type='checkbox'] { - display: none; -} - -.tui-grid-filter-list-item label { - cursor: pointer; - display: block; - padding: 9px 8px; -} - -.tui-grid-filter-list-item label::before { - content: ' '; - margin-right: 6px; - display: inline-block; - width: 14px; - height: 14px; - background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACMCAYAAACeTFAfA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wX4yhLp5I+J+pYUgGA5iROfLEulXgFvZgv0WLdqSnbt2//BkaqvyFPnOpzjFxPnz179h9OummXxb7GSjuQpNovI5Y5/eWdCvUslnNzJEuq2jmzS8cqAXrbNChrrKdRrUyDMxb0JWhKyaqgYyWMWu4KUUX+7g9xfk1lTn9N5nneucrtrrAUjvUOfvNYIM5tMNQ7+HK4krfj1KlTn+HGRe4AZyzUzbvAvHNJvtPm6dwCY+2pIOA2IpkjWir6wEaSAAmQAAmQAAmQAAmQAAmQAAmQAAmQAAmQAAmQAAmQAAmQAAmQAAmQAAmQAAmQAAmQAAmQAAmUnoARpkq8cJp/8yZoWbwO5qu+pO0HbTf1gxMI/dO9eEEgUG14FDeQftL26+rqAv1zDAwM+PqnCNTJMlYuxTPvZYyPXXMjkJhjDX+h1LHrbtVSXu4EQk+FXmDEqZrexmsp/ylovbjOS3vu8vxOb0Gnzbnr0fypOfKIJaOSOJIOVqfKfgmv2H9V5zBeSAQiOZY41Q8HCqOTOJTdqfoalap9ID04ZWTSo5M1nZ4ezJ+WRpoKZTQ6dq0w5cnUJ0GmPxmp0uZUhdbzb1wEIjmWjEbiQNb1VJqdyrrmsqbjgr2Q7ESaCgWUONdbjYVRKo1OZZ3y3NILySHi6mukEUs3YoXpXLKDmKY1lW4/4/gJxOJY0ixxrjQG65Tnlk5jv+a6zbE51lx3JEz9+g4wTFmW8SYQ2rGCfvbn3YzZuUnbt45Os2unhARIgARIgARIgARIgARIgARIgARIgARIgARIYCEQ+D9RZOqPG2fqIQAAAABJRU5ErkJggg==) - no-repeat -37px -118px; - vertical-align: middle; -} - -.tui-grid-filter-list-item-checked label::before { - background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACMCAYAAACeTFAfAAAAAXNSR0IArs4c6QAAC/1JREFUeAHtnV9sFMcdx2fPNiEEqGPFkFYFUkilhiMKwfghNarspC9+KK0gtkUQYLUSD6loqyoqlSoRE8m0VFUUgsoDUisCtMh24YE++KWJE4lgqcGUq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WhKyaqgYyWMWu4KUUX+7g9xfk1lTn9N5nneucrtrrAUjvUOfvNYIM5tMNQ7+HK4krfj1KlTn+HGRe4AZyzUzbvAvHNJvtPm6dwCY+2pIOA2IpkjWir6wEaSAAmQAAmQAAmQAAmQAAmQAAmQAAmQAAmQAAmQAAmQAAmQAAmQAAmQAAmQAAmQAAmQAAmQAAmUnoARpkq8cJp/8yZoWbwO5qu+pO0HbTf1gxMI/dO9eEEgUG14FDeQftL26+rqAv1zDAwM+PqnCNTJMlYuxTPvZYyPXXMjkJhjDX+h1LHrbtVSXu4EQk+FXmDEqZrexmsp/ylovbjOS3vu8vxOb0Gnzbnr0fypOfKIJaOSOJIOVqfKfgmv2H9V5zBeSAQiOZY41Q8HCqOTOJTdqfoalap9ID04ZWTSo5M1nZ4ezJ+WRpoKZTQ6dq0w5cnUJ0GmPxmp0uZUhdbzb1wEIjmWjEbiQNb1VJqdyrrmsqbjgr2Q7ESaCgWUONdbjYVRKo1OZZ3y3NILySHi6mukEUs3YoXpXLKDmKY1lW4/4/gJxOJY0ixxrjQG65Tnlk5jv+a6zbE51lx3JEz9+g4wTFmW8SYQ2rGCfvbn3YzZuUnbt45Os2unhARIgARIgARIgARIgARIgARIgARIgARIgARIYCEQ+D9RZOqPG2fqIQAAAABJRU5ErkJggg==) - no-repeat -13px -118px; -} - -.tui-grid-filter-list-item label span { - font-size: 13px; - max-width: 152px; - word-break: break-all; - word-wrap: break-word; - vertical-align: middle; -} - -.tui-grid-filter-list .tui-grid-filter-list-item-checked { - background-color: #e5f6ff; -} - -.tui-grid-filter-btn-container { - margin: 4px 5px; - text-align: right; -} - -.tui-grid-filter-btn { - box-sizing: border-box; - color: #fff; - font-size: 13px; - height: 29px; - width: 50px; - border-radius: 2px; - margin-left: 4px; - cursor: pointer; -} - -.tui-grid-filter-btn-apply { - background-color: #00a9ff; - border: 1px solid #00a9ff; -} - -.tui-grid-filter-btn-apply:hover { - background-color: #0088d9; - border: 1px solid #0088d9; -} - -.tui-grid-filter-btn-clear { - background-color: #777777; - border: 1px solid #777777; -} - -.tui-grid-filter-btn-clear:hover { - background-color: #5a6268; - border-color: #545b62; -} - -/* input datepicker icon */ -.tui-grid-datepicker-input-container { - position: relative; -} - -.tui-grid-datepicker-input-container input.tui-grid-datepicker-input { - padding: 6px 27px 6px 7px; -} - -.tui-grid-date-icon { - position: absolute; - width: 14px; - height: 14px; - background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACMCAYAAACeTFAfAAAAAXNSR0IArs4c6QAAC/tJREFUeAHtnX9oVtcZx899kzhrNaTSaDeIdrpCayy1xoBdZJh2CPljbmiT4EQNG/jHwG2MMgcDkxTi5hilVrY/xA2rbpJk+of7IyjrXMEaWI2zjNjBqtRGRtXRlMRm3aJ5931u7jE3N/fe9/58k/f6vXBzznnOc55zzuc+Oefc8977vkrxIAESIAESIAESIAESIAESIAESIAESIAESIIG5T8CY+00sbgvzDQ2L7g0Pv5LP5zcDzlek9rxSHxiGcab8scd+abzzzmhxW1SatdGxbNdtvLb2xfzExG9VPr/cJp6KGsYNI5f7TsXg4J+nhIy5EaBjWVTEqdT9+3/C6OTLBJl5VVb29TjOtW3btsfv3bt3rLy8fOfJkyf/7XZhwsrSsHnp0qXHMVIfw+i9c926daHamQvbgSzqy/QnI5XTqSref1/JaT9Ex9RFGbs8aLy5ufkRONUZ6DdJKOmgZb300rA5NDT0iEz/cKomCSXtVb+bnI4FKrKm8pz+3KhhqjTLuOX5yDo6OoT3CZwvWGoSnrDklihckIZNOFPu9u3bJxCa7ZTQSgf2l8CK4bpbWtoYgb4ZtsWAvTlsmcHBwddQZouj3BZL7hAHS6Zh8/Lly6+hf9PaKWmRB2tVgfWEl5Genh7MCNGPlpYW33WMtrx3795Y9Rw4cCBQPePPPDMKcAt1vTrU0yDytehBiOnhLvIjTYcPjGQ4Egh8hvtvdo2OlfwVLo9iMmsjFobFD8BhjZOF20ildawyOsnQQYAjFoCMr1rViXXWPgebB3eEbg6G/axXK65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no-repeat -61px -118px; - top: 45%; - right: 10px; - margin: -6px 0 0 0; - cursor: pointer; -} - -/* editor ui */ -.tui-grid-layer-editing-inner { - box-sizing: border-box; -} - -.tui-grid-editor-select-box-layer { - position: absolute; - z-index: 100; -} - -.tui-grid-editor-select-box-layer * { - box-sizing: border-box; -} - -.tui-grid-editor-select-box-layer li { - padding: 0 8px; -} - -.tui-select-box-input { - outline: none; -} - -.tui-grid-container .tui-select-box-dropdown { - max-height: 180px; -} - -.tui-grid-editor-checkbox-list-layer { - position: absolute; - background-color: #fff; - border: 1px solid #aaa; - z-index: 100; - max-height: 180px; - overflow: hidden auto; -} - -.tui-grid-editor-checkbox-list-layer * { - box-sizing: border-box; -} - -.tui-grid-editor-checkbox-list-layer .tui-grid-editor-checkbox { - line-height: 32px; - height: 32px; -} - -.tui-grid-editor-checkbox-list-layer .tui-grid-editor-checkbox:last-child { - margin-bottom: 1px; -} - -.tui-grid-editor-checkbox-hovered { - background-color: #e5f6ff; -} - -.tui-grid-editor-checkbox input[type='checkbox'], -.tui-grid-editor-checkbox input[type='radio'] { - position: absolute; - opacity: 0; - cursor: pointer; -} - -.tui-grid-editor-checkbox label { - display: inline-block; - cursor: pointer; - width: 100%; - height: 100%; - margin: 0 7px; -} - -.tui-grid-editor-checkbox label:before { - content: ' '; - margin-right: 6px; - display: inline-block; - width: 14px; - height: 14px; - vertical-align: middle; -} - -.tui-grid-editor-checkbox label span { - display: inline-block; - font-size: 12px; - color: #333; - vertical-align: middle; -} - -.tui-grid-editor-label-icon-checkbox::before { - background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACMCAYAAACeTFAfAAAAAXNSR0IArs4c6QAAC/1JREFUeAHtnV9sFMcdx2fPNiEEqGPFkFYFUkilhiMKwfghNarspC9+KK0gtkUQYLUSD6loqyoqlSoRE8m0VFUUgsoDUisCtMh24YE++KWJE4lgqcGUqDKpVEAhRlXAVZxi4ib1n+v3d7eD1+vdvf179p6/I61n9je/+c3MZ3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M5tMNQ7+HK4krfj1KlTn+HGRe4AZyzUzbvAvHNJvtPm6dwCY+2pIOA2IpkjWir6wEaSAAmQAAmQAAmQAAmQAAmQAAmQAAmQAAmQAAmQAAmQAAmQAAmQAAmQAAmQAAmQAAmQAAmQAAmUnoARpkq8cJp/8yZoWbwO5qu+pO0HbTf1gxMI/dO9eEEgUG14FDeQftL26+rqAv1zDAwM+PqnCNTJMlYuxTPvZYyPXXMjkJhjDX+h1LHrbtVSXu4EQk+FXmDEqZrexmsp/ylovbjOS3vu8vxOb0Gnzbnr0fypOfKIJaOSOJIOVqfKfgmv2H9V5zBeSAQiOZY41Q8HCqOTOJTdqfoalap9ID04ZWTSo5M1nZ4ezJ+WRpoKZTQ6dq0w5cnUJ0GmPxmp0uZUhdbzb1wEIjmWjEbiQNb1VJqdyrrmsqbjgr2Q7ESaCgWUONdbjYVRKo1OZZ3y3NILySHi6mukEUs3YoXpXLKDmKY1lW4/4/gJxOJY0ixxrjQG65Tnlk5jv+a6zbE51lx3JEz9+g4wTFmW8SYQ2rGCfvbn3YzZuUnbt45Os2unhARIgARIgARIgARIgARIgARIgARIgARIgARIYCEQ+D9RZOqPG2fqIQAAAABJRU5ErkJggg==) - no-repeat -37px -118px; -} - -.tui-grid-editor-label-icon-checkbox-checked::before { - background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACMCAYAAACeTFAfAAAAAXNSR0IArs4c6QAAC/1JREFUeAHtnV9sFMcdx2fPNiEEqGPFkFYFUkilhiMKwfghNarspC9+KK0gtkUQYLUSD6loqyoqlSoRE8m0VFUUgsoDUisCtMh24YE++KWJE4lgqcGUqDKpVEAhRlXAVZxi4ib1n+v3d7eD1+vdvf179p6/I61n9je/+c3MZ3+emZ3bvVOKgQRIgARIgARIgARIgARIgARIgARIgARIgATmPwFj/jextC3MNTQsmxgZeSmXy20FnMel9pxS1wzDOF/58MO/Md59d7S0LUpnbXQsy3Ubz2afzU1N/V7lcmss4umkYdw0MpnvVw0Ov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AmQAAmUnoARpkq8cJp/8yZoWbwO5qu+pO0HbTf1gxMI/dO9eEEgUG14FDeQftL26+rqAv1zDAwM+PqnCNTJMlYuxTPvZYyPXXMjkJhjDX+h1LHrbtVSXu4EQk+FXmDEqZrexmsp/ylovbjOS3vu8vxOb0Gnzbnr0fypOfKIJaOSOJIOVqfKfgmv2H9V5zBeSAQiOZY41Q8HCqOTOJTdqfoalap9ID04ZWTSo5M1nZ4ezJ+WRpoKZTQ6dq0w5cnUJ0GmPxmp0uZUhdbzb1wEIjmWjEbiQNb1VJqdyrrmsqbjgr2Q7ESaCgWUONdbjYVRKo1OZZ3y3NILySHi6mukEUs3YoXpXLKDmKY1lW4/4/gJxOJY0ixxrjQG65Tnlk5jv+a6zbE51lx3JEz9+g4wTFmW8SYQ2rGCfvbn3YzZuUnbt45Os2unhARIgARIgARIgARIgARIgARIgARIgARIgARIYCEQ+D9RZOqPG2fqIQAAAABJRU5ErkJggg==) - no-repeat -13px -118px; -} - -.tui-grid-editor-label-icon-radio::before { - background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACMCAYAAACeTFAfAAAAAXNSR0IArs4c6QAAC/1JREFUeAHtnV9sFMcdx2fPNiEEqGPFkFYFUkilhiMKwfghNarspC9+KK0gtkUQYLUSD6loqyoqlSoRE8m0VFUUgsoDUisCtMh24YE++KWJE4lgqcGUqDKpVEAhRlXAVZxi4ib1n+v3d7eD1+vdvf179p6/I61n9je/+c3MZ3+emZ3bvVOKgQRIgARIgARIgARIgARIgARIgARIgARIgATmPwFj/jextC3MNTQsmxgZeSmXy20FnMel9pxS1wzDOF/58MO/Md59d7S0LUpnbXQsy3Ubz2afzU1N/V7lcmss4umkYdw0MpnvVw0OvjUtZMqJAB3LpCJOpSYn/4LRyZMJMnOqouLbUZxrx44dj0xMTJysrKzcfebMmX87XZigsiRsXrp06RGM1Ccxeu/evHlzoHZmgnagHPVl+pORyu5UVR98oOSwBtHJ66KMVe433dLS8iCc6jz0myWWc79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OS3vu8vxOb0Gnzbnr0fypOfKIJaOSOJIOVqfKfgmv2H9V5zBeSAQiOZY41Q8HCqOTOJTdqfoalap9ID04ZWTSo5M1nZ4ezJ+WRpoKZTQ6dq0w5cnUJ0GmPxmp0uZUhdbzb1wEIjmWjEbiQNb1VJqdyrrmsqbjgr2Q7ESaCgWUONdbjYVRKo1OZZ3y3NILySHi6mukEUs3YoXpXLKDmKY1lW4/4/gJxOJY0ixxrjQG65Tnlk5jv+a6zbE51lx3JEz9+g4wTFmW8SYQ2rGCfvbn3YzZuUnbt45Os2unhARIgARIgARIgARIgARIgARIgARIgARIgARIYCEQ+D9RZOqPG2fqIQAAAABJRU5ErkJggg==) - no-repeat -113px -35px; -} - -.tui-grid-editor-label-icon-radio-checked::before { - background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACMCAYAAACeTFAfAAAAAXNSR0IArs4c6QAAC/1JREFUeAHtnV9sFMcdx2fPNiEEqGPFkFYFUkilhiMKwfghNarspC9+KK0gtkUQYLUSD6loqyoqlSoRE8m0VFUUgsoDUisCtMh24YE++KWJE4lgqcGUqDKpVEAhRlXAVZxi4ib1n+v3d7eD1+vdvf179p6/I61n9je/+c3MZ3+emZ3bvVOKgQRIgARIgARIgARIgARIgARIgARIgARIgATmPwFj/jextC3MNTQsmxgZeSmXy20FnMel9pxS1wzDOF/58MO/Md59d7S0LUpnbXQsy3Ubz2afzU1N/V7lcmss4umkYdw0MpnvVw0OvjUtZMqJAB3LpCJOpSYn/4LRyZMJMnOqouLbUZxrx44dj0xMTJysrKzcfebMmX87XZigsiRsXrp06RGM1Ccxeu/evHlzoHZmgnagHPVl+pORyu5UVR98oOSwBtHJ66KMVe433dLS8iCc6jz0myWWc79l3fSSsDk0NPSgTP9wqmaJ5dytfic5HQtUZE3lOv05UcNUmS/jlOch6+joEN6ncTxjqkl82pSbomBREjbhTJk7d+6cRpxvp8TmuW9/8a0YrLvp0sYI9N2gLQbsrUHLDA4Ovooy22zltplym9j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wEIjmWjEbiQNb1VJqdyrrmsqbjgr2Q7ESaCgWUONdbjYVRKo1OZZ3y3NILySHi6mukEUs3YoXpXLKDmKY1lW4/4/gJxOJY0ixxrjQG65Tnlk5jv+a6zbE51lx3JEz9+g4wTFmW8SYQ2rGCfvbn3YzZuUnbt45Os2unhARIgARIgARIgARIgARIgARIgARIgARIgARIYCEQ+D9RZOqPG2fqIQAAAABJRU5ErkJggg==) - no-repeat -89px -35px; -} - -.tui-grid-editor-datepicker-layer { - margin-top: -4px; - position: absolute; - z-index: 100; -} - -.tui-grid-editor-datepicker-layer * { - box-sizing: border-box; -} - -.tui-grid-container .tui-calendar-month .tui-calendar-body, -.tui-grid-container .tui-calendar-year .tui-calendar-body { - width: 220px; -} - -.tui-grid-header-draggable { - cursor: move; /* fallback if grab cursor is unsupported */ - cursor: grab; -} - -.tui-grid-row-header-draggable { - text-align: center; - cursor: move; /* fallback if grab cursor is unsupported */ - cursor: grab; -} - -.tui-grid-row-header-draggable span { - display: inline-block; - width: 1px; - height: 1px; - margin: 1px; - line-height: 0; - background: #5a6268; -} - -.tui-grid-floating-row { - z-index: 15; - background: #fff; - border: 1px solid #ddd; - color: #5a6268; - min-width: 200px; - position: absolute; - box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.08); - border-radius: 3px; - overflow: hidden; - white-space: nowrap; - cursor: grabbing; -} - -.tui-grid-floating-column { - z-index: 15; - background: #fff; - border: 1px solid #ddd; - color: #5a6268; - position: absolute; - box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.08); - border-radius: 3px; - overflow: hidden; - top: 0; - font-weight: bold; - cursor: grabbing; -} - -.tui-grid-floating-cell { - display: inline-block; - overflow: hidden; - line-height: normal; - vertical-align: middle; - text-align: center; -} - -.tui-grid-floating-cell .tui-grid-cell-content { - padding: 0 5px; - word-break: break-all; - text-align: start; -} - -.tui-grid-floating-tree-cell { - padding: 0 10px; -} - -.tui-grid-floating-tree-cell-content { - margin-left: 10px; -} - -.tui-grid-floating-tree-cell .tui-grid-tree-icon { - position: relative; - margin-top: -14px; - display: inline-block; -} - -.tui-grid-floating-line { - position: absolute; - height: 1px; - background: #00a9ff; - display: none; - z-index: 15; -} - -.tui-grid-cell.dragging { - opacity: 0.5; - cursor: grabbing; -} - -.tui-grid-cell.parent-cell { - background-color: rgba(0, 169, 255, 0.15); -} - -.tui-grid-container .tui-grid-context-menu { - position: absolute; - z-index: 15; - width: auto; - min-width: 197px; - color: #333; - box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.08); - border: 1px solid #ccc; - padding: 5px 0; - background-color: #fff; -} - -.tui-grid-context-menu .menu-item { - position: relative; - height: 32px; - line-height: 32px; - padding: 0 14px; - cursor: pointer; -} - -.tui-grid-context-menu .menu-item:hover { - background-color: #d4e9f2; -} - -.tui-grid-context-menu .menu-item.disabled { - color: #ccc; -} - -.tui-grid-context-menu .has-submenu::after { - position: absolute; - right: 10px; - content: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAICAQAAACb+P2wAAAANklEQVQI12MoWlkUWsQAggxFzkUfi2IhTIYim6L3RRkQJkORcdHroioEswSmIBOmLQ6iDW4YAA8qHUEC0QE+AAAAAElFTkSuQmCC); -} - -.tui-grid-context-menu .menu-item.separator { - height: 1px; - background: #ccc; - margin: 5px 0; -} - -.tui-grid-context-menu span { - display: inline-block; -} - diff --git a/src/main/webapp/resources/3rd-party/tui/grid/4.21.5/tui-grid/tui-grid.js b/src/main/webapp/resources/3rd-party/tui/grid/4.21.5/tui-grid/tui-grid.js deleted file mode 100644 index 4fa24d8c..00000000 --- a/src/main/webapp/resources/3rd-party/tui/grid/4.21.5/tui-grid/tui-grid.js +++ /dev/null @@ -1,25396 +0,0 @@ -/*! - * TOAST UI Grid - * @version 4.21.5 | Fri Sep 23 2022 - * @author NHN Cloud. FE Development Lab - * @license MIT - */ -(function webpackUniversalModuleDefinition(root, factory) { - if(typeof exports === 'object' && typeof module === 'object') - module.exports = factory(require("tui-date-picker"), require("tui-pagination"), require("xlsx")); - else if(typeof define === 'function' && define.amd) - define(["tui-date-picker", "tui-pagination", "xlsx"], factory); - else if(typeof exports === 'object') - exports["Grid"] = factory(require("tui-date-picker"), require("tui-pagination"), require("xlsx")); - else - root["tui"] = root["tui"] || {}, root["tui"]["Grid"] = factory(root["tui"]["DatePicker"], root["tui"]["Pagination"], root["XLSX"]); -})(window, function(__WEBPACK_EXTERNAL_MODULE__44__, __WEBPACK_EXTERNAL_MODULE__121__, __WEBPACK_EXTERNAL_MODULE__128__) { -return /******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) { -/******/ return installedModules[moduleId].exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ i: moduleId, -/******/ l: false, -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Flag the module as loaded -/******/ module.l = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; -/******/ -/******/ // define getter function for harmony exports -/******/ __webpack_require__.d = function(exports, name, getter) { -/******/ if(!__webpack_require__.o(exports, name)) { -/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); -/******/ } -/******/ }; -/******/ -/******/ // define __esModule on exports -/******/ __webpack_require__.r = function(exports) { -/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { -/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); -/******/ } -/******/ Object.defineProperty(exports, '__esModule', { value: true }); -/******/ }; -/******/ -/******/ // create a fake namespace object -/******/ // mode & 1: value is a module id, require it -/******/ // mode & 2: merge all properties of value into the ns -/******/ // mode & 4: return value when already ns object -/******/ // mode & 8|1: behave like require -/******/ __webpack_require__.t = function(value, mode) { -/******/ if(mode & 1) value = __webpack_require__(value); -/******/ if(mode & 8) return value; -/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; -/******/ var ns = Object.create(null); -/******/ __webpack_require__.r(ns); -/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); -/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); -/******/ return ns; -/******/ }; -/******/ -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __webpack_require__.n = function(module) { -/******/ var getter = module && module.__esModule ? -/******/ function getDefault() { return module['default']; } : -/******/ function getModuleExports() { return module; }; -/******/ __webpack_require__.d(getter, 'a', getter); -/******/ return getter; -/******/ }; -/******/ -/******/ // Object.prototype.hasOwnProperty.call -/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; -/******/ -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = "/dist"; -/******/ -/******/ -/******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 63); -/******/ }) -/************************************************************************/ -/******/ ([ -/* 0 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.getLongestText = exports.pixelToNumber = exports.isBetween = exports.silentSplice = exports.convertDataToText = exports.convertTextToData = exports.endsWith = exports.startsWith = exports.uniqByProp = exports.uniq = exports.pick = exports.omit = exports.pruneObject = exports.debounce = exports.convertToNumber = exports.fromArray = exports.isEmpty = exports.isNil = exports.isString = exports.isNumber = exports.isBoolean = exports.isNull = exports.isUndefined = exports.isBlank = exports.last = exports.range = exports.clamp = exports.setDefaultProp = exports.encodeHTMLEntity = exports.hasOwnProp = exports.forEachObject = exports.isObject = exports.isFunction = exports.createMapFromArray = exports.removeArrayItem = exports.assign = exports.deepCopy = exports.deepCopyArray = exports.deepMergedCopy = exports.mapProp = exports.findOffsetIndex = exports.findPrevIndex = exports.findIndexes = exports.findPropIndex = exports.findIndex = exports.someProp = exports.some = exports.findProp = exports.find = exports.includes = exports.pipe = exports.sum = exports.arrayEqual = exports.shallowEqual = void 0; -var tslib_1 = __webpack_require__(1); -var CUSTOM_LF_SUBCHAR = '___tui_grid_lf___'; -var CUSTOM_CR_SUBCHAR = '___tui_grid_cr___'; -var LF = '\n'; -var CR = '\r'; -var CUSTOM_LF_REGEXP = new RegExp(CUSTOM_LF_SUBCHAR, 'g'); -var CUSTOM_CR_REGEXP = new RegExp(CUSTOM_CR_SUBCHAR, 'g'); -function shallowEqual(o1, o2) { - for (var key in o1) { - if (o1[key] !== o2[key]) { - return false; - } - } - for (var key in o2) { - if (!(key in o1)) { - return false; - } - } - return true; -} -exports.shallowEqual = shallowEqual; -function arrayEqual(a1, a2) { - if (a1.length !== a2.length) { - return false; - } - for (var i = 0, len = a1.length; i < len; i += 1) { - if (a1[i] !== a2[i]) { - return false; - } - } - return true; -} -exports.arrayEqual = arrayEqual; -function sum(nums) { - return nums.reduce(function (acc, num) { return acc + num; }, 0); -} -exports.sum = sum; -function pipe(initVal) { - var args = []; - for (var _i = 1; _i < arguments.length; _i++) { - args[_i - 1] = arguments[_i]; - } - return args.reduce(function (acc, fn) { return fn(acc); }, initVal); -} -exports.pipe = pipe; -function includes(arr, searchItem, searchIndex) { - if (typeof searchIndex === 'number' && arr[searchIndex] !== searchItem) { - return false; - } - for (var _i = 0, arr_1 = arr; _i < arr_1.length; _i++) { - var item = arr_1[_i]; - if (item === searchItem) { - return true; - } - } - return false; -} -exports.includes = includes; -// eslint-disable-next-line consistent-return -function find(predicate, arr) { - for (var _i = 0, arr_2 = arr; _i < arr_2.length; _i++) { - var item = arr_2[_i]; - if (predicate(item)) { - return item; - } - } -} -exports.find = find; -function findProp(propName, value, arr) { - return find(function (item) { return item[propName] === value; }, arr); -} -exports.findProp = findProp; -function some(predicate, arr) { - return !!find(predicate, arr); -} -exports.some = some; -function someProp(propName, value, arr) { - return !!findProp(propName, value, arr); -} -exports.someProp = someProp; -function findIndex(predicate, arr) { - for (var i = 0, len = arr.length; i < len; i += 1) { - if (predicate(arr[i])) { - return i; - } - } - return -1; -} -exports.findIndex = findIndex; -function findPropIndex(propName, value, arr) { - return findIndex(function (item) { return item[propName] === value; }, arr); -} -exports.findPropIndex = findPropIndex; -function findIndexes(predicate, arr) { - return arr.reduce(function (acc, v, idx) { return (predicate(v) ? tslib_1.__spreadArrays(acc, [idx]) : acc); }, []); -} -exports.findIndexes = findIndexes; -function findPrevIndex(arr, predicate) { - var index = findIndex(predicate, arr); - var positiveIndex = index <= 0 ? 0 : index - 1; - return index >= 0 ? positiveIndex : arr.length - 1; -} -exports.findPrevIndex = findPrevIndex; -function findOffsetIndex(offsets, targetOffset) { - return findPrevIndex(offsets, function (offset) { return offset > targetOffset; }); -} -exports.findOffsetIndex = findOffsetIndex; -function mapProp(propName, arr) { - return arr.map(function (item) { return item[propName]; }); -} -exports.mapProp = mapProp; -function deepMergedCopy(targetObj, obj) { - var resultObj = tslib_1.__assign({}, targetObj); - Object.keys(obj).forEach(function (prop) { - if (isObject(resultObj[prop])) { - if (Array.isArray(obj[prop])) { - resultObj[prop] = deepCopyArray(obj[prop]); - } - else if (resultObj.hasOwnProperty(prop)) { - resultObj[prop] = deepMergedCopy(resultObj[prop], obj[prop]); - } - else { - resultObj[prop] = deepCopy(obj[prop]); - } - } - else { - resultObj[prop] = obj[prop]; - } - }); - return resultObj; -} -exports.deepMergedCopy = deepMergedCopy; -function deepCopyArray(items) { - return items.map(function (item) { - if (isObject(item)) { - return Array.isArray(item) ? deepCopyArray(item) : deepCopy(item); - } - return item; - }); -} -exports.deepCopyArray = deepCopyArray; -function deepCopy(obj) { - var resultObj = {}; - var keys = Object.keys(obj); - if (!keys.length) { - return obj; - } - keys.forEach(function (prop) { - if (isObject(obj[prop])) { - resultObj[prop] = Array.isArray(obj[prop]) ? deepCopyArray(obj[prop]) : deepCopy(obj[prop]); - } - else { - resultObj[prop] = obj[prop]; - } - }); - return resultObj; -} -exports.deepCopy = deepCopy; -function assign(targetObj, obj) { - Object.keys(obj).forEach(function (prop) { - if (targetObj.hasOwnProperty(prop) && typeof targetObj[prop] === 'object') { - if (Array.isArray(obj[prop])) { - targetObj[prop] = obj[prop]; - } - else { - assign(targetObj[prop], obj[prop]); - } - } - else { - targetObj[prop] = obj[prop]; - } - }); -} -exports.assign = assign; -function removeArrayItem(targetItem, arr) { - var targetIdx = findIndex(function (item) { return item === targetItem; }, arr); - if (targetIdx !== -1) { - arr.splice(targetIdx, 1); - } - return arr; -} -exports.removeArrayItem = removeArrayItem; -function createMapFromArray(arr, propName) { - var resultMap = {}; - arr.forEach(function (item) { - var key = String(item[propName]); - resultMap[key] = item; - }); - return resultMap; -} -exports.createMapFromArray = createMapFromArray; -function isFunction(obj) { - return typeof obj === 'function'; -} -exports.isFunction = isFunction; -function isObject(obj) { - return typeof obj === 'object' && obj !== null; -} -exports.isObject = isObject; -function forEachObject(fn, obj) { - for (var key in obj) { - if (obj.hasOwnProperty(key)) { - fn(obj[key], key, obj); - } - } -} -exports.forEachObject = forEachObject; -function hasOwnProp(obj, key) { - return obj.hasOwnProperty(key); -} -exports.hasOwnProp = hasOwnProp; -function encodeHTMLEntity(html) { - var entities = { - '"': 'quot', - '&': 'amp', - '<': 'lt', - '>': 'gt', - "'": '#39', - }; - return html.replace(/[<>&"']/g, function (match) { return "&" + entities[match] + ";"; }); -} -exports.encodeHTMLEntity = encodeHTMLEntity; -function setDefaultProp(obj, key, defValue) { - if (isUndefined(obj[key]) || isNull(obj[key])) { - obj[key] = defValue; - } -} -exports.setDefaultProp = setDefaultProp; -/** - * Returns a number whose value is limited to the given range. - * @param value - A number to force within given min-max range - * @param min - The lower boundary of the output range - * @param max - The upper boundary of the output range - * @returns A number in the range [min, max] - * @example - * // limit the output of this computation to between 0 and 255 - * value = clamp(value, 0, 255); - */ -function clamp(value, min, max) { - var _a; - if (min > max) { - _a = [min, max], max = _a[0], min = _a[1]; - } - return Math.max(min, Math.min(value, max)); -} -exports.clamp = clamp; -function range(end) { - var arr = []; - for (var i = 0; i < end; i += 1) { - arr.push(i); - } - return arr; -} -exports.range = range; -function last(arr) { - return arr[arr.length - 1]; -} -exports.last = last; -function isBlank(value) { - if (typeof value === 'string') { - return !value.length; - } - return typeof value === 'undefined' || value === null; -} -exports.isBlank = isBlank; -function isUndefined(value) { - return typeof value === 'undefined'; -} -exports.isUndefined = isUndefined; -function isNull(value) { - return value === null; -} -exports.isNull = isNull; -function isBoolean(value) { - return typeof value === 'boolean'; -} -exports.isBoolean = isBoolean; -function isNumber(value) { - return typeof value === 'number'; -} -exports.isNumber = isNumber; -function isString(value) { - return typeof value === 'string'; -} -exports.isString = isString; -function isNil(value) { - return isUndefined(value) || isNull(value); -} -exports.isNil = isNil; -/** - * check the emptiness(included null) of object or array. if obj parameter is null or undefind, return true - * @param obj - target object or array - * @returns the emptiness of obj - */ -function isEmpty(obj) { - return (isNull(obj) || - isUndefined(obj) || - (!isUndefined(obj.length) && obj.length === 0) || - Object.keys(obj).length === 0); -} -exports.isEmpty = isEmpty; -function fromArray(value) { - return Array.prototype.slice.call(value); -} -exports.fromArray = fromArray; -function convertToNumber(value) { - if (typeof value === 'number' || isNaN(value) || isBlank(value)) { - return value; - } - return Number(value); -} -exports.convertToNumber = convertToNumber; -function debounce(fn, wait, immediate) { - if (immediate === void 0) { immediate = false; } - var timeout = null; - return function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var later = function () { - timeout = -1; - if (!immediate) { - fn.apply(void 0, args); - } - }; - var callNow = immediate && !timeout; - if (timeout) { - clearTimeout(timeout); - } - timeout = window.setTimeout(later, wait); - if (callNow) { - fn.apply(void 0, args); - } - }; -} -exports.debounce = debounce; -function pruneObject(obj) { - var pruned = {}; - forEachObject(function (value, key) { - if (!isUndefined(value) && !isNull(value)) { - pruned[key] = value; - } - }, obj); - return pruned; -} -exports.pruneObject = pruneObject; -function omit(obj) { - var propNames = []; - for (var _i = 1; _i < arguments.length; _i++) { - propNames[_i - 1] = arguments[_i]; - } - var resultMap = {}; - Object.keys(obj).forEach(function (key) { - if (!includes(propNames, key)) { - resultMap[key] = obj[key]; - } - }); - return resultMap; -} -exports.omit = omit; -function pick(obj) { - var propNames = []; - for (var _i = 1; _i < arguments.length; _i++) { - propNames[_i - 1] = arguments[_i]; - } - var resultMap = {}; - Object.keys(obj).forEach(function (key) { - if (includes(propNames, key)) { - resultMap[key] = obj[key]; - } - }); - return resultMap; -} -exports.pick = pick; -function uniq(arr) { - return arr.filter(function (name, index) { return arr.indexOf(name) === index; }); -} -exports.uniq = uniq; -function uniqByProp(propName, arr) { - return arr.filter(function (obj, index) { return findPropIndex(propName, obj[propName], arr) === index; }); -} -exports.uniqByProp = uniqByProp; -function startsWith(str, targetStr) { - return targetStr.slice(0, str.length) === str; -} -exports.startsWith = startsWith; -function endsWith(str, targetStr) { - var index = targetStr.lastIndexOf(str); - return index !== -1 && index + str.length === targetStr.length; -} -exports.endsWith = endsWith; -function removeDoubleQuotes(text) { - if (text.match(CUSTOM_LF_REGEXP)) { - return text.substring(1, text.length - 1).replace(/""/g, '"'); - } - return text; -} -function replaceNewlineToSubchar(text) { - return text.replace(/"([^"]|"")*"/g, function (value) { - return value.replace(LF, CUSTOM_LF_SUBCHAR).replace(CR, CUSTOM_CR_SUBCHAR); - }); -} -function convertTextToData(text) { - // Each newline cell data is wrapping double quotes in the text and - // newline characters should be replaced with substitution characters temporarily - // before spliting the text by newline characters. - text = replaceNewlineToSubchar(text); - return text - .split(/\r?\n/) - .map(function (row) { - return row - .split('\t') - .map(function (column) { - return removeDoubleQuotes(column).replace(CUSTOM_LF_REGEXP, LF).replace(CUSTOM_CR_REGEXP, CR); - }); - }); -} -exports.convertTextToData = convertTextToData; -function convertDataToText(data, delimiter) { - return data.map(function (row) { return "\"" + row.join("\"" + delimiter + "\"") + "\""; }).join('\n'); -} -exports.convertDataToText = convertDataToText; -function silentSplice(arr, start, deleteCount) { - var _a; - var items = []; - for (var _i = 3; _i < arguments.length; _i++) { - items[_i - 3] = arguments[_i]; - } - return (_a = Array.prototype.splice).call.apply(_a, tslib_1.__spreadArrays([arr, start, deleteCount], items)); -} -exports.silentSplice = silentSplice; -function isBetween(value, start, end) { - return start <= value && value <= end; -} -exports.isBetween = isBetween; -function pixelToNumber(pixelString) { - var regExp = new RegExp(/[0-9]+px/); - return regExp.test(pixelString) ? parseInt(pixelString.replace('px', ''), 10) : 0; -} -exports.pixelToNumber = pixelToNumber; -function getLongestText(texts) { - return texts.reduce(function (acc, text) { return (text.length > acc.length ? text : acc); }, ''); -} -exports.getLongestText = getLongestText; - - -/***/ }), -/* 1 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__extends", function() { return __extends; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__assign", function() { return __assign; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__rest", function() { return __rest; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__decorate", function() { return __decorate; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__param", function() { return __param; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__metadata", function() { return __metadata; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__awaiter", function() { return __awaiter; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__generator", function() { return __generator; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__exportStar", function() { return __exportStar; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__values", function() { return __values; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__read", function() { return __read; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__spread", function() { return __spread; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__spreadArrays", function() { return __spreadArrays; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__await", function() { return __await; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__asyncGenerator", function() { return __asyncGenerator; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__asyncDelegator", function() { return __asyncDelegator; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__asyncValues", function() { return __asyncValues; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__makeTemplateObject", function() { return __makeTemplateObject; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__importStar", function() { return __importStar; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__importDefault", function() { return __importDefault; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__classPrivateFieldGet", function() { return __classPrivateFieldGet; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__classPrivateFieldSet", function() { return __classPrivateFieldSet; }); -/*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. -Licensed under the Apache License, Version 2.0 (the "License"); you may not use -this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - -THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - -See the Apache Version 2.0 License for specific language governing permissions -and limitations under the License. -***************************************************************************** */ -/* global Reflect, Promise */ - -var extendStatics = function(d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); -}; - -function __extends(d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -} - -var __assign = function() { - __assign = Object.assign || function __assign(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - return t; - } - return __assign.apply(this, arguments); -} - -function __rest(s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; -} - -function __decorate(decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -} - -function __param(paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -} - -function __metadata(metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); -} - -function __awaiter(thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -} - -function __generator(thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -} - -function __exportStar(m, exports) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; -} - -function __values(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -} - -function __read(o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; -} - -function __spread() { - for (var ar = [], i = 0; i < arguments.length; i++) - ar = ar.concat(__read(arguments[i])); - return ar; -} - -function __spreadArrays() { - for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; - for (var r = Array(s), k = 0, i = 0; i < il; i++) - for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) - r[k] = a[j]; - return r; -}; - -function __await(v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); -} - -function __asyncGenerator(thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; - function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } - function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } - function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } - function fulfill(value) { resume("next", value); } - function reject(value) { resume("throw", value); } - function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } -} - -function __asyncDelegator(o) { - var i, p; - return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; - function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } -} - -function __asyncValues(o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); - function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } - function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } -} - -function __makeTemplateObject(cooked, raw) { - if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } - return cooked; -}; - -function __importStar(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; - result.default = mod; - return result; -} - -function __importDefault(mod) { - return (mod && mod.__esModule) ? mod : { default: mod }; -} - -function __classPrivateFieldGet(receiver, privateMap) { - if (!privateMap.has(receiver)) { - throw new TypeError("attempted to get private field on non-instance"); - } - return privateMap.get(receiver); -} - -function __classPrivateFieldSet(receiver, privateMap, value) { - if (!privateMap.has(receiver)) { - throw new TypeError("attempted to set private field on non-instance"); - } - privateMap.set(receiver, value); - return value; -} - - -/***/ }), -/* 2 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.getComputedFontStyle = exports.getTextWidth = exports.setClipboardSelection = exports.isSupportWindowClipboardData = exports.convertTableToData = exports.getCoordinateWithOffset = exports.setCursorStyle = exports.appendStyleElement = exports.getCellAddress = exports.isParentExistWithClassNames = exports.findParentByClassName = exports.findParentByTagName = exports.hasClass = exports.isDatePickerElement = exports.cls = exports.dataAttr = void 0; -var common_1 = __webpack_require__(0); -var CLS_PREFIX = 'tui-grid-'; -exports.dataAttr = { - ROW_KEY: 'data-row-key', - COLUMN_NAME: 'data-column-name', - COLUMN_INDEX: 'data-column-index', - GRID_ID: 'data-grid-id', -}; -function cls() { - var names = []; - for (var _i = 0; _i < arguments.length; _i++) { - names[_i] = arguments[_i]; - } - var result = []; - for (var _a = 0, names_1 = names; _a < names_1.length; _a++) { - var name = names_1[_a]; - var className = void 0; - if (Array.isArray(name)) { - className = name[0] ? name[1] : null; - } - else { - className = name; - } - if (className) { - result.push("" + CLS_PREFIX + className); - } - } - return result.join(' '); -} -exports.cls = cls; -function isSvgElement(el) { - var _a; - return ((_a = el.namespaceURI) === null || _a === void 0 ? void 0 : _a.indexOf('svg')) !== -1; -} -function isDatePickerElement(el) { - var currentEl = el; - if (isSvgElement(el)) { - return false; - } - while (currentEl && currentEl.className.split(' ').indexOf('tui-datepicker') === -1) { - currentEl = currentEl.parentElement; - } - return !!currentEl; -} -exports.isDatePickerElement = isDatePickerElement; -function hasClass(el, className) { - return !isSvgElement(el) && el.className.split(' ').indexOf(cls(className)) !== -1; -} -exports.hasClass = hasClass; -function findParentByTagName(el, tagName) { - var currentEl = el; - while (currentEl && currentEl.tagName.toLowerCase() !== tagName) { - currentEl = currentEl.parentElement; - } - return currentEl; -} -exports.findParentByTagName = findParentByTagName; -function findParentByClassName(el, className) { - var currentEl = el; - while (currentEl && !hasClass(currentEl, className)) { - currentEl = currentEl.parentElement; - } - return currentEl; -} -exports.findParentByClassName = findParentByClassName; -function isParentExistWithClassNames(el, classNames) { - return classNames.some(function (className) { return !common_1.isNull(findParentByClassName(el, className)); }); -} -exports.isParentExistWithClassNames = isParentExistWithClassNames; -function getCellAddress(el) { - var cellElement = findParentByTagName(el, 'td'); - if (!cellElement) { - return null; - } - var rowKey = cellElement.getAttribute(exports.dataAttr.ROW_KEY); - var columnName = cellElement.getAttribute(exports.dataAttr.COLUMN_NAME); - if (common_1.isNull(rowKey)) { - return null; - } - return { - rowKey: Number(rowKey), - columnName: columnName, - }; -} -exports.getCellAddress = getCellAddress; -/** - * create style element and append it into the head element. - * @param {String} id - element id - * @param {String} cssString - css string - */ -function appendStyleElement(id, cssString) { - var style = document.createElement('style'); - style.type = 'text/css'; - style.id = id; - style.appendChild(document.createTextNode(cssString)); - document.getElementsByTagName('head')[0].appendChild(style); -} -exports.appendStyleElement = appendStyleElement; -function setCursorStyle(type) { - document.body.style.cursor = type; -} -exports.setCursorStyle = setCursorStyle; -function getCoordinateWithOffset(pageX, pageY) { - var pageXWithOffset = pageX - window.pageXOffset; - var pageYWithOffset = pageY - window.pageYOffset; - return [pageXWithOffset, pageYWithOffset]; -} -exports.getCoordinateWithOffset = getCoordinateWithOffset; -function setDataInSpanRange(value, data, colspanRange, rowspanRange) { - var startColspan = colspanRange[0], endColspan = colspanRange[1]; - var startRowspan = rowspanRange[0], endRowspan = rowspanRange[1]; - for (var rowIdx = startRowspan; rowIdx < endRowspan; rowIdx += 1) { - for (var columnIdx = startColspan; columnIdx < endColspan; columnIdx += 1) { - data[rowIdx][columnIdx] = startRowspan === rowIdx && startColspan === columnIdx ? value : ' '; - } - } -} -function convertTableToData(rows) { - var data = []; - var colspanRange, rowspanRange; - for (var index = 0; index < rows.length; index += 1) { - data[index] = []; - } - common_1.fromArray(rows).forEach(function (tr, rowIndex) { - var columnIndex = 0; - common_1.fromArray(tr.cells).forEach(function (td) { - var text = td.textContent || td.innerText; - while (data[rowIndex][columnIndex]) { - columnIndex += 1; - } - colspanRange = [columnIndex, columnIndex + (td.colSpan || 1)]; - rowspanRange = [rowIndex, rowIndex + (td.rowSpan || 1)]; - setDataInSpanRange(text, data, colspanRange, rowspanRange); - columnIndex = colspanRange[1]; - }); - }); - return data; -} -exports.convertTableToData = convertTableToData; -function isSupportWindowClipboardData() { - return !!window.clipboardData; -} -exports.isSupportWindowClipboardData = isSupportWindowClipboardData; -function setClipboardSelection(node) { - if (node) { - var range = document.createRange(); - var selection = window.getSelection(); - selection.removeAllRanges(); - range.selectNodeContents(node); - selection.addRange(range); - } -} -exports.setClipboardSelection = setClipboardSelection; -function getTextWidth(text, bodyArea) { - if (!bodyArea) { - return 0; - } - var tdForMeasure = document.createElement('td'); - tdForMeasure.className = cls('cell', 'cell-has-input'); - tdForMeasure.style.position = 'absolute'; - var cellForMeasure = document.createElement('div'); - cellForMeasure.textContent = text; - cellForMeasure.className = cls('cell-content'); - tdForMeasure.appendChild(cellForMeasure); - bodyArea.appendChild(tdForMeasure); - var width = cellForMeasure.clientWidth; - bodyArea.removeChild(tdForMeasure); - return Math.ceil(width); -} -exports.getTextWidth = getTextWidth; -function getComputedFontStyle(selector) { - var firstCellNode = document.querySelector("." + cls(selector)); - var walker = document.createTreeWalker(firstCellNode, 4); - var node = firstCellNode; - while (walker.nextNode()) { - node = walker.currentNode; - if (node.nodeType === 3) { - node = node.parentElement; - break; - } - } - var compStyle = getComputedStyle(node); - var fontSize = compStyle.getPropertyValue('font-size'); - var fontWeight = compStyle.getPropertyValue('font-weight'); - var fontFamily = compStyle.getPropertyValue('font-family'); - return fontWeight + " " + fontSize + " " + fontFamily; -} -exports.getComputedFontStyle = getComputedFontStyle; - - -/***/ }), -/* 3 */ -/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return h; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createElement", function() { return h; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cloneElement", function() { return cloneElement; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createRef", function() { return createRef; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Component", function() { return Component; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "render", function() { return render; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rerender", function() { return rerender; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "options", function() { return options; }); -var VNode = function VNode() {}; - -var options = {}; - -var stack = []; - -var EMPTY_CHILDREN = []; - -function h(nodeName, attributes) { - var children = EMPTY_CHILDREN, - lastSimple, - child, - simple, - i; - for (i = arguments.length; i-- > 2;) { - stack.push(arguments[i]); - } - if (attributes && attributes.children != null) { - if (!stack.length) stack.push(attributes.children); - delete attributes.children; - } - while (stack.length) { - if ((child = stack.pop()) && child.pop !== undefined) { - for (i = child.length; i--;) { - stack.push(child[i]); - } - } else { - if (typeof child === 'boolean') child = null; - - if (simple = typeof nodeName !== 'function') { - if (child == null) child = '';else if (typeof child === 'number') child = String(child);else if (typeof child !== 'string') simple = false; - } - - if (simple && lastSimple) { - children[children.length - 1] += child; - } else if (children === EMPTY_CHILDREN) { - children = [child]; - } else { - children.push(child); - } - - lastSimple = simple; - } - } - - var p = new VNode(); - p.nodeName = nodeName; - p.children = children; - p.attributes = attributes == null ? undefined : attributes; - p.key = attributes == null ? undefined : attributes.key; - - if (options.vnode !== undefined) options.vnode(p); - - return p; -} - -function extend(obj, props) { - for (var i in props) { - obj[i] = props[i]; - }return obj; -} - -function applyRef(ref, value) { - if (ref != null) { - if (typeof ref == 'function') ref(value);else ref.current = value; - } -} - -var defer = typeof Promise == 'function' ? Promise.resolve().then.bind(Promise.resolve()) : setTimeout; - -function cloneElement(vnode, props) { - return h(vnode.nodeName, extend(extend({}, vnode.attributes), props), arguments.length > 2 ? [].slice.call(arguments, 2) : vnode.children); -} - -var IS_NON_DIMENSIONAL = /acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i; - -var items = []; - -function enqueueRender(component) { - if (!component._dirty && (component._dirty = true) && items.push(component) == 1) { - (options.debounceRendering || defer)(rerender); - } -} - -function rerender() { - var p; - while (p = items.pop()) { - if (p._dirty) renderComponent(p); - } -} - -function isSameNodeType(node, vnode, hydrating) { - if (typeof vnode === 'string' || typeof vnode === 'number') { - return node.splitText !== undefined; - } - if (typeof vnode.nodeName === 'string') { - return !node._componentConstructor && isNamedNode(node, vnode.nodeName); - } - return hydrating || node._componentConstructor === vnode.nodeName; -} - -function isNamedNode(node, nodeName) { - return node.normalizedNodeName === nodeName || node.nodeName.toLowerCase() === nodeName.toLowerCase(); -} - -function getNodeProps(vnode) { - var props = extend({}, vnode.attributes); - props.children = vnode.children; - - var defaultProps = vnode.nodeName.defaultProps; - if (defaultProps !== undefined) { - for (var i in defaultProps) { - if (props[i] === undefined) { - props[i] = defaultProps[i]; - } - } - } - - return props; -} - -function createNode(nodeName, isSvg) { - var node = isSvg ? document.createElementNS('http://www.w3.org/2000/svg', nodeName) : document.createElement(nodeName); - node.normalizedNodeName = nodeName; - return node; -} - -function removeNode(node) { - var parentNode = node.parentNode; - if (parentNode) parentNode.removeChild(node); -} - -function setAccessor(node, name, old, value, isSvg) { - if (name === 'className') name = 'class'; - - if (name === 'key') {} else if (name === 'ref') { - applyRef(old, null); - applyRef(value, node); - } else if (name === 'class' && !isSvg) { - node.className = value || ''; - } else if (name === 'style') { - if (!value || typeof value === 'string' || typeof old === 'string') { - node.style.cssText = value || ''; - } - if (value && typeof value === 'object') { - if (typeof old !== 'string') { - for (var i in old) { - if (!(i in value)) node.style[i] = ''; - } - } - for (var i in value) { - node.style[i] = typeof value[i] === 'number' && IS_NON_DIMENSIONAL.test(i) === false ? value[i] + 'px' : value[i]; - } - } - } else if (name === 'dangerouslySetInnerHTML') { - if (value) node.innerHTML = value.__html || ''; - } else if (name[0] == 'o' && name[1] == 'n') { - var useCapture = name !== (name = name.replace(/Capture$/, '')); - name = name.toLowerCase().substring(2); - if (value) { - if (!old) node.addEventListener(name, eventProxy, useCapture); - } else { - node.removeEventListener(name, eventProxy, useCapture); - } - (node._listeners || (node._listeners = {}))[name] = value; - } else if (name !== 'list' && name !== 'type' && !isSvg && name in node) { - try { - node[name] = value == null ? '' : value; - } catch (e) {} - if ((value == null || value === false) && name != 'spellcheck') node.removeAttribute(name); - } else { - var ns = isSvg && name !== (name = name.replace(/^xlink:?/, '')); - - if (value == null || value === false) { - if (ns) node.removeAttributeNS('http://www.w3.org/1999/xlink', name.toLowerCase());else node.removeAttribute(name); - } else if (typeof value !== 'function') { - if (ns) node.setAttributeNS('http://www.w3.org/1999/xlink', name.toLowerCase(), value);else node.setAttribute(name, value); - } - } -} - -function eventProxy(e) { - return this._listeners[e.type](options.event && options.event(e) || e); -} - -var mounts = []; - -var diffLevel = 0; - -var isSvgMode = false; - -var hydrating = false; - -function flushMounts() { - var c; - while (c = mounts.shift()) { - if (options.afterMount) options.afterMount(c); - if (c.componentDidMount) c.componentDidMount(); - } -} - -function diff(dom, vnode, context, mountAll, parent, componentRoot) { - if (!diffLevel++) { - isSvgMode = parent != null && parent.ownerSVGElement !== undefined; - - hydrating = dom != null && !('__preactattr_' in dom); - } - - var ret = idiff(dom, vnode, context, mountAll, componentRoot); - - if (parent && ret.parentNode !== parent) parent.appendChild(ret); - - if (! --diffLevel) { - hydrating = false; - - if (!componentRoot) flushMounts(); - } - - return ret; -} - -function idiff(dom, vnode, context, mountAll, componentRoot) { - var out = dom, - prevSvgMode = isSvgMode; - - if (vnode == null || typeof vnode === 'boolean') vnode = ''; - - if (typeof vnode === 'string' || typeof vnode === 'number') { - if (dom && dom.splitText !== undefined && dom.parentNode && (!dom._component || componentRoot)) { - if (dom.nodeValue != vnode) { - dom.nodeValue = vnode; - } - } else { - out = document.createTextNode(vnode); - if (dom) { - if (dom.parentNode) dom.parentNode.replaceChild(out, dom); - recollectNodeTree(dom, true); - } - } - - out['__preactattr_'] = true; - - return out; - } - - var vnodeName = vnode.nodeName; - if (typeof vnodeName === 'function') { - return buildComponentFromVNode(dom, vnode, context, mountAll); - } - - isSvgMode = vnodeName === 'svg' ? true : vnodeName === 'foreignObject' ? false : isSvgMode; - - vnodeName = String(vnodeName); - if (!dom || !isNamedNode(dom, vnodeName)) { - out = createNode(vnodeName, isSvgMode); - - if (dom) { - while (dom.firstChild) { - out.appendChild(dom.firstChild); - } - if (dom.parentNode) dom.parentNode.replaceChild(out, dom); - - recollectNodeTree(dom, true); - } - } - - var fc = out.firstChild, - props = out['__preactattr_'], - vchildren = vnode.children; - - if (props == null) { - props = out['__preactattr_'] = {}; - for (var a = out.attributes, i = a.length; i--;) { - props[a[i].name] = a[i].value; - } - } - - if (!hydrating && vchildren && vchildren.length === 1 && typeof vchildren[0] === 'string' && fc != null && fc.splitText !== undefined && fc.nextSibling == null) { - if (fc.nodeValue != vchildren[0]) { - fc.nodeValue = vchildren[0]; - } - } else if (vchildren && vchildren.length || fc != null) { - innerDiffNode(out, vchildren, context, mountAll, hydrating || props.dangerouslySetInnerHTML != null); - } - - diffAttributes(out, vnode.attributes, props); - - isSvgMode = prevSvgMode; - - return out; -} - -function innerDiffNode(dom, vchildren, context, mountAll, isHydrating) { - var originalChildren = dom.childNodes, - children = [], - keyed = {}, - keyedLen = 0, - min = 0, - len = originalChildren.length, - childrenLen = 0, - vlen = vchildren ? vchildren.length : 0, - j, - c, - f, - vchild, - child; - - if (len !== 0) { - for (var i = 0; i < len; i++) { - var _child = originalChildren[i], - props = _child['__preactattr_'], - key = vlen && props ? _child._component ? _child._component.__key : props.key : null; - if (key != null) { - keyedLen++; - keyed[key] = _child; - } else if (props || (_child.splitText !== undefined ? isHydrating ? _child.nodeValue.trim() : true : isHydrating)) { - children[childrenLen++] = _child; - } - } - } - - if (vlen !== 0) { - for (var i = 0; i < vlen; i++) { - vchild = vchildren[i]; - child = null; - - var key = vchild.key; - if (key != null) { - if (keyedLen && keyed[key] !== undefined) { - child = keyed[key]; - keyed[key] = undefined; - keyedLen--; - } - } else if (min < childrenLen) { - for (j = min; j < childrenLen; j++) { - if (children[j] !== undefined && isSameNodeType(c = children[j], vchild, isHydrating)) { - child = c; - children[j] = undefined; - if (j === childrenLen - 1) childrenLen--; - if (j === min) min++; - break; - } - } - } - - child = idiff(child, vchild, context, mountAll); - - f = originalChildren[i]; - if (child && child !== dom && child !== f) { - if (f == null) { - dom.appendChild(child); - } else if (child === f.nextSibling) { - removeNode(f); - } else { - dom.insertBefore(child, f); - } - } - } - } - - if (keyedLen) { - for (var i in keyed) { - if (keyed[i] !== undefined) recollectNodeTree(keyed[i], false); - } - } - - while (min <= childrenLen) { - if ((child = children[childrenLen--]) !== undefined) recollectNodeTree(child, false); - } -} - -function recollectNodeTree(node, unmountOnly) { - var component = node._component; - if (component) { - unmountComponent(component); - } else { - if (node['__preactattr_'] != null) applyRef(node['__preactattr_'].ref, null); - - if (unmountOnly === false || node['__preactattr_'] == null) { - removeNode(node); - } - - removeChildren(node); - } -} - -function removeChildren(node) { - node = node.lastChild; - while (node) { - var next = node.previousSibling; - recollectNodeTree(node, true); - node = next; - } -} - -function diffAttributes(dom, attrs, old) { - var name; - - for (name in old) { - if (!(attrs && attrs[name] != null) && old[name] != null) { - setAccessor(dom, name, old[name], old[name] = undefined, isSvgMode); - } - } - - for (name in attrs) { - if (name !== 'children' && name !== 'innerHTML' && (!(name in old) || attrs[name] !== (name === 'value' || name === 'checked' ? dom[name] : old[name]))) { - setAccessor(dom, name, old[name], old[name] = attrs[name], isSvgMode); - } - } -} - -var recyclerComponents = []; - -function createComponent(Ctor, props, context) { - var inst, - i = recyclerComponents.length; - - if (Ctor.prototype && Ctor.prototype.render) { - inst = new Ctor(props, context); - Component.call(inst, props, context); - } else { - inst = new Component(props, context); - inst.constructor = Ctor; - inst.render = doRender; - } - - while (i--) { - if (recyclerComponents[i].constructor === Ctor) { - inst.nextBase = recyclerComponents[i].nextBase; - recyclerComponents.splice(i, 1); - return inst; - } - } - - return inst; -} - -function doRender(props, state, context) { - return this.constructor(props, context); -} - -function setComponentProps(component, props, renderMode, context, mountAll) { - if (component._disable) return; - component._disable = true; - - component.__ref = props.ref; - component.__key = props.key; - delete props.ref; - delete props.key; - - if (typeof component.constructor.getDerivedStateFromProps === 'undefined') { - if (!component.base || mountAll) { - if (component.componentWillMount) component.componentWillMount(); - } else if (component.componentWillReceiveProps) { - component.componentWillReceiveProps(props, context); - } - } - - if (context && context !== component.context) { - if (!component.prevContext) component.prevContext = component.context; - component.context = context; - } - - if (!component.prevProps) component.prevProps = component.props; - component.props = props; - - component._disable = false; - - if (renderMode !== 0) { - if (renderMode === 1 || options.syncComponentUpdates !== false || !component.base) { - renderComponent(component, 1, mountAll); - } else { - enqueueRender(component); - } - } - - applyRef(component.__ref, component); -} - -function renderComponent(component, renderMode, mountAll, isChild) { - if (component._disable) return; - - var props = component.props, - state = component.state, - context = component.context, - previousProps = component.prevProps || props, - previousState = component.prevState || state, - previousContext = component.prevContext || context, - isUpdate = component.base, - nextBase = component.nextBase, - initialBase = isUpdate || nextBase, - initialChildComponent = component._component, - skip = false, - snapshot = previousContext, - rendered, - inst, - cbase; - - if (component.constructor.getDerivedStateFromProps) { - state = extend(extend({}, state), component.constructor.getDerivedStateFromProps(props, state)); - component.state = state; - } - - if (isUpdate) { - component.props = previousProps; - component.state = previousState; - component.context = previousContext; - if (renderMode !== 2 && component.shouldComponentUpdate && component.shouldComponentUpdate(props, state, context) === false) { - skip = true; - } else if (component.componentWillUpdate) { - component.componentWillUpdate(props, state, context); - } - component.props = props; - component.state = state; - component.context = context; - } - - component.prevProps = component.prevState = component.prevContext = component.nextBase = null; - component._dirty = false; - - if (!skip) { - rendered = component.render(props, state, context); - - if (component.getChildContext) { - context = extend(extend({}, context), component.getChildContext()); - } - - if (isUpdate && component.getSnapshotBeforeUpdate) { - snapshot = component.getSnapshotBeforeUpdate(previousProps, previousState); - } - - var childComponent = rendered && rendered.nodeName, - toUnmount, - base; - - if (typeof childComponent === 'function') { - - var childProps = getNodeProps(rendered); - inst = initialChildComponent; - - if (inst && inst.constructor === childComponent && childProps.key == inst.__key) { - setComponentProps(inst, childProps, 1, context, false); - } else { - toUnmount = inst; - - component._component = inst = createComponent(childComponent, childProps, context); - inst.nextBase = inst.nextBase || nextBase; - inst._parentComponent = component; - setComponentProps(inst, childProps, 0, context, false); - renderComponent(inst, 1, mountAll, true); - } - - base = inst.base; - } else { - cbase = initialBase; - - toUnmount = initialChildComponent; - if (toUnmount) { - cbase = component._component = null; - } - - if (initialBase || renderMode === 1) { - if (cbase) cbase._component = null; - base = diff(cbase, rendered, context, mountAll || !isUpdate, initialBase && initialBase.parentNode, true); - } - } - - if (initialBase && base !== initialBase && inst !== initialChildComponent) { - var baseParent = initialBase.parentNode; - if (baseParent && base !== baseParent) { - baseParent.replaceChild(base, initialBase); - - if (!toUnmount) { - initialBase._component = null; - recollectNodeTree(initialBase, false); - } - } - } - - if (toUnmount) { - unmountComponent(toUnmount); - } - - component.base = base; - if (base && !isChild) { - var componentRef = component, - t = component; - while (t = t._parentComponent) { - (componentRef = t).base = base; - } - base._component = componentRef; - base._componentConstructor = componentRef.constructor; - } - } - - if (!isUpdate || mountAll) { - mounts.push(component); - } else if (!skip) { - - if (component.componentDidUpdate) { - component.componentDidUpdate(previousProps, previousState, snapshot); - } - if (options.afterUpdate) options.afterUpdate(component); - } - - while (component._renderCallbacks.length) { - component._renderCallbacks.pop().call(component); - }if (!diffLevel && !isChild) flushMounts(); -} - -function buildComponentFromVNode(dom, vnode, context, mountAll) { - var c = dom && dom._component, - originalComponent = c, - oldDom = dom, - isDirectOwner = c && dom._componentConstructor === vnode.nodeName, - isOwner = isDirectOwner, - props = getNodeProps(vnode); - while (c && !isOwner && (c = c._parentComponent)) { - isOwner = c.constructor === vnode.nodeName; - } - - if (c && isOwner && (!mountAll || c._component)) { - setComponentProps(c, props, 3, context, mountAll); - dom = c.base; - } else { - if (originalComponent && !isDirectOwner) { - unmountComponent(originalComponent); - dom = oldDom = null; - } - - c = createComponent(vnode.nodeName, props, context); - if (dom && !c.nextBase) { - c.nextBase = dom; - - oldDom = null; - } - setComponentProps(c, props, 1, context, mountAll); - dom = c.base; - - if (oldDom && dom !== oldDom) { - oldDom._component = null; - recollectNodeTree(oldDom, false); - } - } - - return dom; -} - -function unmountComponent(component) { - if (options.beforeUnmount) options.beforeUnmount(component); - - var base = component.base; - - component._disable = true; - - if (component.componentWillUnmount) component.componentWillUnmount(); - - component.base = null; - - var inner = component._component; - if (inner) { - unmountComponent(inner); - } else if (base) { - if (base['__preactattr_'] != null) applyRef(base['__preactattr_'].ref, null); - - component.nextBase = base; - - removeNode(base); - recyclerComponents.push(component); - - removeChildren(base); - } - - applyRef(component.__ref, null); -} - -function Component(props, context) { - this._dirty = true; - - this.context = context; - - this.props = props; - - this.state = this.state || {}; - - this._renderCallbacks = []; -} - -extend(Component.prototype, { - setState: function setState(state, callback) { - if (!this.prevState) this.prevState = this.state; - this.state = extend(extend({}, this.state), typeof state === 'function' ? state(this.state, this.props) : state); - if (callback) this._renderCallbacks.push(callback); - enqueueRender(this); - }, - forceUpdate: function forceUpdate(callback) { - if (callback) this._renderCallbacks.push(callback); - renderComponent(this, 2); - }, - render: function render() {} -}); - -function render(vnode, parent, merge) { - return diff(merge, vnode, {}, false, parent, false); -} - -function createRef() { - return {}; -} - -var preact = { - h: h, - createElement: h, - cloneElement: cloneElement, - createRef: createRef, - Component: Component, - render: render, - rerender: rerender, - options: options -}; - -/* harmony default export */ __webpack_exports__["default"] = (preact); - -//# sourceMappingURL=preact.mjs.map - - -/***/ }), -/* 4 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.connect = void 0; -var tslib_1 = __webpack_require__(1); -var preact_1 = __webpack_require__(3); -var observable_1 = __webpack_require__(5); -function connect(selector, forceUpdate) { - return function (WrappedComponent) { - var _a; - return _a = /** @class */ (function (_super) { - tslib_1.__extends(class_1, _super); - function class_1() { - return _super !== null && _super.apply(this, arguments) || this; - } - class_1.prototype.setStateUsingSelector = function (ownProps) { - if (selector) { - this.setState(selector(this.context.store, ownProps)); - if (forceUpdate) { - this.forceUpdate(); - } - } - }; - class_1.prototype.componentWillMount = function () { - var _this = this; - if (selector) { - this.unobserve = observable_1.observe(function () { - _this.setStateUsingSelector(_this.props); - }); - } - }; - class_1.prototype.componentWillReceiveProps = function (nextProps) { - this.setStateUsingSelector(nextProps); - }; - class_1.prototype.componentWillUnmount = function () { - if (this.unobserve) { - this.unobserve(); - } - }; - class_1.prototype.render = function () { - var _a = this, props = _a.props, state = _a.state; - var dispatch = this.context.dispatch; - return preact_1.h(WrappedComponent, tslib_1.__assign({}, props, state, { dispatch: dispatch })); - }; - return class_1; - }(preact_1.Component)), - _a.displayName = "Connect:" + WrappedComponent.name, - _a; - }; -} -exports.connect = connect; - - -/***/ }), -/* 5 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.asyncInvokeObserver = exports.batchObserver = exports.unobservedInvoke = exports.getOriginObject = exports.notify = exports.observable = exports.partialObservable = exports.observe = exports.isObservable = exports.getRunningObservers = exports.observerInfoMap = void 0; -var common_1 = __webpack_require__(0); -var array_1 = __webpack_require__(66); -var generateObserverId = (function () { - var lastId = 0; - return function () { - lastId += 1; - return "@observer" + lastId; - }; -})(); -// store all observer info -exports.observerInfoMap = {}; -// observerId stack for managing recursive observing calls -var observerIdStack = []; -var queue = []; -var observerIdMap = {}; -var pending = false; -var paused = false; -function batchUpdate(observerId) { - if (!observerIdMap[observerId]) { - observerIdMap[observerId] = true; - queue.push(observerId); - } - if (!pending) { - flush(); - } -} -function clearQueue() { - queue = []; - observerIdMap = {}; - pending = false; -} -function getRunningObservers() { - return queue.map(function (id) { return exports.observerInfoMap[id].name; }).filter(function (name) { return name; }); -} -exports.getRunningObservers = getRunningObservers; -function callObserver(observerId) { - observerIdStack.push(observerId); - exports.observerInfoMap[observerId].fn(exports.observerInfoMap[observerId].key); - observerIdStack.pop(); - delete exports.observerInfoMap[observerId].key; -} -function flush() { - pending = true; - for (var index = 0; index < queue.length; index += 1) { - var observerId = queue[index]; - observerIdMap[observerId] = false; - callObserver(observerId); - } - clearQueue(); -} -function run(observerId, key) { - var sync = exports.observerInfoMap[observerId].sync; - exports.observerInfoMap[observerId].key = key; - if (sync) { - callObserver(observerId); - } - else { - batchUpdate(observerId); - } -} -function setValue(storage, resultObj, observerIdSet, key, value) { - if (storage[key] !== value) { - if (Array.isArray(value)) { - array_1.patchArrayMethods(value, resultObj, key); - } - storage[key] = value; - Object.keys(observerIdSet).forEach(function (observerId) { - run(observerId, 'setValue'); - }); - } -} -function isObservable(resultObj) { - return common_1.isObject(resultObj) && common_1.hasOwnProp(resultObj, '__storage__'); -} -exports.isObservable = isObservable; -function observe(fn, sync, name) { - if (sync === void 0) { sync = false; } - if (name === void 0) { name = ''; } - var observerId = generateObserverId(); - exports.observerInfoMap[observerId] = { fn: fn, targetObserverIdSets: [], sync: sync, name: name }; - run(observerId, 'observe'); - // return unobserve function - return function () { - exports.observerInfoMap[observerId].targetObserverIdSets.forEach(function (idSet) { - delete idSet[observerId]; - }); - delete exports.observerInfoMap[observerId]; - }; -} -exports.observe = observe; -// eslint-disable-next-line max-params -function makeObservableData(obj, resultObj, key, storage, propObserverIdSetMap, sync) { - var getter = (Object.getOwnPropertyDescriptor(obj, key) || {}).get; - var observerIdSet = (propObserverIdSetMap[key] = {}); - Object.defineProperty(resultObj, key, { - configurable: true, - enumerable: true, - get: function () { - var observerId = common_1.last(observerIdStack); - if (!paused && observerId && !observerIdSet[observerId]) { - observerIdSet[observerId] = true; - exports.observerInfoMap[observerId].targetObserverIdSets.push(observerIdSet); - } - return storage[key]; - }, - }); - if (common_1.isFunction(getter)) { - observe(function () { - var value = getter.call(resultObj); - setValue(storage, resultObj, observerIdSet, key, value); - }, sync); - } - else { - // has to add 'as' type assertion and refer the below typescript issue - // In general, the constraint Record doesn't actually ensure that an argument has a string index signature, - // it merely ensures that the properties of the argument are assignable to type XXX. - // So, in the example above you could effectively pass any object and the function could write to any property without any checks. - // https://github.com/microsoft/TypeScript/issues/31661 - storage[key] = obj[key]; - if (Array.isArray(storage[key])) { - array_1.patchArrayMethods(storage[key], resultObj, key); - } - Object.defineProperty(resultObj, key, { - set: function (value) { - setValue(storage, resultObj, observerIdSet, key, value); - }, - }); - } -} -function partialObservable(obj, key) { - var storage = obj.__storage__; - var propObserverIdSetMap = obj.__propObserverIdSetMap__; - makeObservableData(obj, obj, key, storage, propObserverIdSetMap); -} -exports.partialObservable = partialObservable; -function observable(obj, sync) { - if (sync === void 0) { sync = false; } - if (Array.isArray(obj)) { - throw new Error('Array object cannot be Reactive'); - } - if (isObservable(obj)) { - return obj; - } - var storage = {}; - var propObserverIdSetMap = {}; - var resultObj = {}; - Object.defineProperties(resultObj, { - __storage__: { value: storage }, - __propObserverIdSetMap__: { value: propObserverIdSetMap }, - }); - Object.keys(obj).forEach(function (key) { - makeObservableData(obj, resultObj, key, storage, propObserverIdSetMap, sync); - }); - return resultObj; -} -exports.observable = observable; -function notifyUnit(obj, key) { - Object.keys(obj.__propObserverIdSetMap__[key]).forEach(function (observerId) { - run(observerId, key.toString()); - }); -} -function notify(obj) { - var keys = []; - for (var _i = 1; _i < arguments.length; _i++) { - keys[_i - 1] = arguments[_i]; - } - if (isObservable(obj)) { - keys.forEach(function (key) { return notifyUnit(obj, key); }); - } -} -exports.notify = notify; -function getOriginObject(obj) { - var result = {}; - common_1.forEachObject(function (value, key) { - result[key] = isObservable(value) ? getOriginObject(value) : value; - }, obj.__storage__); - return common_1.isEmpty(result) ? obj : result; -} -exports.getOriginObject = getOriginObject; -function unobservedInvoke(fn) { - paused = true; - fn(); - paused = false; -} -exports.unobservedInvoke = unobservedInvoke; -function batchObserver(fn) { - pending = true; - fn(); - pending = false; -} -exports.batchObserver = batchObserver; -var asyncTimer = null; -function asyncInvokeObserver(fn) { - if (common_1.isNull(asyncTimer)) { - asyncTimer = setTimeout(function () { - fn(); - asyncTimer = null; - }); - } -} -exports.asyncInvokeObserver = asyncInvokeObserver; - - -/***/ }), -/* 6 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.changeRawDataToOriginDataForTree = exports.getOmittedInternalProp = exports.createChangeInfo = exports.getFormattedValue = exports.getRowKeyByIndexWithPageRange = exports.getRowIndexPerPage = exports.isClientPagination = exports.isScrollPagination = exports.getMaxRowKey = exports.isFiltered = exports.isSorted = exports.getCreatedRowInfos = exports.getCreatedRowInfo = exports.getRemovedClassName = exports.getAddedClassName = exports.getLoadingState = exports.getRowHeight = exports.isInitialSortState = exports.isSortable = exports.getUniqColumnData = exports.findRowByRowKey = exports.findIndexByRowKey = exports.getConditionalRows = exports.getRemoveRowInfoList = exports.getCheckedRowInfoList = exports.isEditableCell = exports.getCellAddressByIndex = void 0; -var tslib_1 = __webpack_require__(1); -var common_1 = __webpack_require__(0); -var instance_1 = __webpack_require__(8); -var column_1 = __webpack_require__(12); -var data_1 = __webpack_require__(15); -var data_2 = __webpack_require__(23); -var data_3 = __webpack_require__(14); -var validation_1 = __webpack_require__(27); -var observable_1 = __webpack_require__(5); -function getCellAddressByIndex(_a, rowIndex, columnIndex) { - var data = _a.data, column = _a.column; - return { - rowKey: data.filteredViewData[rowIndex].rowKey, - columnName: column.visibleColumns[columnIndex].name, - }; -} -exports.getCellAddressByIndex = getCellAddressByIndex; -function isEditableCell(store, rowIndex, columnName) { - var data = store.data, column = store.column; - var filteredIndex = data.filteredIndex, filteredViewData = data.filteredViewData; - if (filteredIndex && common_1.isNil(filteredIndex[rowIndex])) { - return false; - } - // get index based on whole data(not filtered data) - var index = filteredIndex ? filteredIndex[rowIndex] : rowIndex; - data_3.makeObservable(store, index, true); - var _a = filteredViewData[rowIndex].valueMap[columnName], disabled = _a.disabled, editable = _a.editable; - return !column_1.isHiddenColumn(column, columnName) && editable && !disabled; -} -exports.isEditableCell = isEditableCell; -function getCheckedRowInfoList(_a) { - var data = _a.data; - var targetRows = { - rowIndices: [], - rows: [], - nextRows: [], - }; - data.rawData.reduce(function (acc, row, index) { - if (row._attributes.checked) { - acc.rowIndices.push(index); - acc.rows.push(row); - acc.nextRows.push(data.rawData[index + 1]); - } - return acc; - }, targetRows); - return targetRows; -} -exports.getCheckedRowInfoList = getCheckedRowInfoList; -function getRemoveRowInfoList(_a, rowKeys) { - var data = _a.data; - var targetRows = { - rowIndices: [], - rows: [], - nextRows: [], - }; - data.rawData.reduce(function (acc, row, index) { - var rowKeyIndex = rowKeys.indexOf(row.rowKey); - if (rowKeyIndex !== -1) { - acc.rowIndices.push(index); - acc.rows.push(row); - acc.nextRows.push(data.rawData[index + 1]); - rowKeys.splice(rowKeyIndex, 1); - } - return acc; - }, targetRows); - return targetRows; -} -exports.getRemoveRowInfoList = getRemoveRowInfoList; -function getConditionalRows(_a, conditions) { - var data = _a.data; - var rawData = data.rawData; - if (common_1.isFunction(conditions)) { - return rawData.filter(conditions); - } - var result = rawData; - Object.keys(conditions).forEach(function (key) { - result = result.filter(function (row) { return row[key] === conditions[key]; }); - }); - return result; -} -exports.getConditionalRows = getConditionalRows; -function findIndexByRowKey(data, column, id, rowKey, filtered) { - if (filtered === void 0) { filtered = true; } - if (common_1.isNil(rowKey)) { - return -1; - } - var filteredRawData = data.filteredRawData, rawData = data.rawData; - var targetData = filtered ? filteredRawData : rawData; - var dataManager = instance_1.getDataManager(id); - var modified = dataManager ? dataManager.isMixedOrder() : false; - if (isSorted(data) || column.keyColumnName || modified) { - return common_1.findPropIndex('rowKey', rowKey, targetData); - } - var start = 0; - var end = targetData.length - 1; - while (start <= end) { - var mid = Math.floor((start + end) / 2); - var comparedRowKey = targetData[mid].rowKey; - if (rowKey > comparedRowKey) { - start = mid + 1; - } - else if (rowKey < comparedRowKey) { - end = mid - 1; - } - else { - return mid; - } - } - return -1; -} -exports.findIndexByRowKey = findIndexByRowKey; -function findRowByRowKey(data, column, id, rowKey, filtered) { - if (filtered === void 0) { filtered = true; } - var targetData = filtered ? data.filteredRawData : data.rawData; - return targetData[findIndexByRowKey(data, column, id, rowKey, filtered)]; -} -exports.findRowByRowKey = findRowByRowKey; -function getUniqColumnData(targetData, column, columnName) { - var columnInfo = column.allColumnMap[columnName]; - var uniqColumnData = common_1.uniqByProp(columnName, targetData.map(function (data) { - var _a; - return (tslib_1.__assign(tslib_1.__assign({}, data), (_a = {}, _a[columnName] = common_1.isNil(data[columnName]) ? '' : data[columnName], _a))); - })); - return uniqColumnData.map(function (row) { - var value = row[columnName]; - var formatterProps = { - row: row, - value: value, - column: columnInfo, - }; - var relationListItems = row._relationListItemMap[columnName]; - return data_2.getFormattedValue(formatterProps, columnInfo.formatter, value, relationListItems); - }); -} -exports.getUniqColumnData = getUniqColumnData; -function isSortable(sortState, column, columnName) { - if (columnName === 'sortKey') { - return true; - } - var _a = column.allColumnMap[columnName], sortable = _a.sortable, hidden = _a.hidden; - return sortState.useClient && !hidden && sortable; -} -exports.isSortable = isSortable; -function isInitialSortState(_a) { - var columns = _a.columns; - return columns.length === 1 && columns[0].columnName === 'sortKey'; -} -exports.isInitialSortState = isInitialSortState; -function getRowHeight(row, defaultRowHeight) { - var _a = row._attributes, height = _a.height, tree = _a.tree; - var rowHeight = tree && tree.hidden ? 0 : height; - return common_1.isNumber(rowHeight) ? rowHeight : defaultRowHeight; -} -exports.getRowHeight = getRowHeight; -function getLoadingState(rawData) { - return rawData.length ? 'DONE' : 'EMPTY'; -} -exports.getLoadingState = getLoadingState; -function getAddedClassName(className, prevClassNames) { - var classNames = className.split(' '); - var columnClassNames = prevClassNames ? prevClassNames : []; - return common_1.uniq(tslib_1.__spreadArrays(classNames, columnClassNames)); -} -exports.getAddedClassName = getAddedClassName; -function getRemovedClassName(className, prevClassNames) { - var classNames = className.split(' '); - var removedClassNames = prevClassNames; - classNames.forEach(function (clsName) { - common_1.removeArrayItem(clsName, removedClassNames); - }); - return removedClassNames; -} -exports.getRemovedClassName = getRemovedClassName; -function getCreatedRowInfo(store, rowIndex, row, rowKey) { - data_1.generateDataCreationKey(); - var data = store.data, column = store.column, id = store.id; - var rawData = data.rawData; - var prevRow = rawData[rowIndex - 1]; - var options = { prevRow: prevRow, lazyObservable: true }; - if (!common_1.isUndefined(rowKey)) { - row.rowKey = rowKey; - } - var index = getMaxRowKey(data); - var rawRow = data_1.createRawRow(id, tslib_1.__assign(tslib_1.__assign({}, column.emptyRow), row), index, column, options); - var viewRow = { rowKey: row.rowKey, sortKey: row.sortKey, uniqueKey: row.uniqueKey }; - return { rawRow: rawRow, viewRow: viewRow, prevRow: prevRow }; -} -exports.getCreatedRowInfo = getCreatedRowInfo; -function getCreatedRowInfos(store, indexedRows) { - var data = store.data, column = store.column, id = store.id; - var rawData = data.rawData; - var index = getMaxRowKey(data); - return indexedRows.map(function (_a, i) { - var rowIndex = _a.rowIndex, row = _a.row, orgRow = _a.orgRow; - data_1.generateDataCreationKey(); - var prevRow = rawData[rowIndex - 1]; - var options = { prevRow: prevRow, lazyObservable: true }; - var rawRow = data_1.createRawRow(id, tslib_1.__assign(tslib_1.__assign({}, column.emptyRow), row), index + i, column, options); - var viewRow = { rowKey: row.rowKey, sortKey: row.sortKey, uniqueKey: row.uniqueKey }; - return { rowIndex: rowIndex, row: { rawRow: rawRow, viewRow: viewRow, prevRow: prevRow }, orgRow: orgRow }; - }); -} -exports.getCreatedRowInfos = getCreatedRowInfos; -function isSorted(data) { - return data.sortState.columns[0].columnName !== 'sortKey'; -} -exports.isSorted = isSorted; -function isFiltered(data) { - return !common_1.isNull(data.filters); -} -exports.isFiltered = isFiltered; -function getMaxRowKey(data) { - return Math.max.apply(Math, tslib_1.__spreadArrays([-1], common_1.mapProp('rowKey', data.rawData))) + 1; -} -exports.getMaxRowKey = getMaxRowKey; -function isScrollPagination(_a, useClient) { - var pageOptions = _a.pageOptions; - if (common_1.isUndefined(useClient)) { - return pageOptions.type === 'scroll'; - } - return useClient && pageOptions.type === 'scroll'; -} -exports.isScrollPagination = isScrollPagination; -function isClientPagination(_a) { - var pageOptions = _a.pageOptions; - return !common_1.isEmpty(pageOptions) && pageOptions.useClient && pageOptions.type === 'pagination'; -} -exports.isClientPagination = isClientPagination; -function getRowIndexPerPage(data, rowIndex) { - return isClientPagination(data) ? rowIndex % data.pageOptions.perPage : rowIndex; -} -exports.getRowIndexPerPage = getRowIndexPerPage; -function getRowKeyByIndexWithPageRange(data, rowIndex) { - if (isClientPagination(data)) { - rowIndex += data.pageRowRange[0]; - } - return data.filteredRawData[rowIndex].rowKey; -} -exports.getRowKeyByIndexWithPageRange = getRowKeyByIndexWithPageRange; -function getFormattedValue(store, rowKey, columnName) { - var data = store.data, column = store.column, id = store.id; - var rowIndex = findIndexByRowKey(data, column, id, rowKey, false); - var viewData = data.viewData; - if (rowIndex !== -1) { - data_3.makeObservable(store, rowIndex); - var viewCell = viewData[rowIndex].valueMap[columnName]; - return viewCell ? viewCell.formattedValue : null; - } - return null; -} -exports.getFormattedValue = getFormattedValue; -function createChangeInfo(store, row, columnName, pastingValue, index) { - var id = store.id, column = store.column; - var rowKey = row.rowKey; - var prevChange = { rowKey: rowKey, columnName: columnName, value: row[columnName], nextValue: pastingValue }; - var nextChange = { rowKey: rowKey, columnName: columnName, prevValue: row[columnName], value: pastingValue }; - var changeValue = function () { - var value = prevChange.value, nextValue = prevChange.nextValue; - validation_1.replaceColumnUniqueInfoMap(id, column, { - rowKey: rowKey, - columnName: columnName, - prevValue: value, - value: nextValue, - }); - nextChange.value = nextValue; - row[columnName] = nextValue; - return index; - }; - return { prevChange: prevChange, nextChange: nextChange, changeValue: changeValue }; -} -exports.createChangeInfo = createChangeInfo; -function getOmittedInternalProp(row) { - var additaional = []; - for (var _i = 1; _i < arguments.length; _i++) { - additaional[_i - 1] = arguments[_i]; - } - return common_1.omit.apply(void 0, tslib_1.__spreadArrays([observable_1.getOriginObject(row), 'sortKey', - 'uniqueKey', - 'rowSpanMap', - '_relationListItemMap', - '_disabledPriority'], additaional)); -} -exports.getOmittedInternalProp = getOmittedInternalProp; -function changeRowToOriginRowForTree(row) { - var originRow = getOmittedInternalProp(row, 'rowKey', '_attributes'); - if (originRow._children) { - originRow._children = originRow._children.map(function (childRow) { - return changeRowToOriginRowForTree(childRow); - }); - } - return originRow; -} -function changeRawDataToOriginDataForTree(rawData) { - return rawData - .filter(function (row) { var _a, _b; return common_1.isNil((_b = (_a = row._attributes) === null || _a === void 0 ? void 0 : _a.tree) === null || _b === void 0 ? void 0 : _b.parentRowKey); }) - .map(function (row) { return changeRowToOriginRowForTree(row); }); -} -exports.changeRawDataToOriginDataForTree = changeRawDataToOriginDataForTree; - - -/***/ }), -/* 7 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.getEventBus = exports.createEventBus = void 0; -var tslib_1 = __webpack_require__(1); -var common_1 = __webpack_require__(0); -var instance_1 = __webpack_require__(8); -var eventBusMap = {}; -function createEventBus(id) { - var listenersMap = {}; - eventBusMap[id] = { - on: function (eventName, func) { - var listeners = listenersMap[eventName]; - listenersMap[eventName] = listeners ? tslib_1.__spreadArrays(listeners, [func]) : [func]; - }, - off: function (eventName, func) { - var listeners = listenersMap[eventName]; - if (listeners) { - if (func) { - listenersMap[eventName] = common_1.removeArrayItem(func, listeners); - } - else { - delete listenersMap[eventName]; - } - } - }, - trigger: function (eventName, gridEvent) { - if (listenersMap[eventName]) { - var instance = instance_1.getInstance(id); - gridEvent.setInstance(instance); - listenersMap[eventName].forEach(function (func) { - func(gridEvent); - }); - } - }, - }; - return eventBusMap[id]; -} -exports.createEventBus = createEventBus; -function getEventBus(id) { - return eventBusMap[id]; -} -exports.getEventBus = getEventBus; - - -/***/ }), -/* 8 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.getPaginationManager = exports.getDataManager = exports.getDataProvider = exports.getInstance = exports.registerDataSources = exports.register = void 0; -var common_1 = __webpack_require__(0); -var currentId = 0; -var instanceMap = {}; -function generateId() { - currentId += 1; - return currentId; -} -function register(instance) { - var id = generateId(); - if (!common_1.isObject(instanceMap[id])) { - instanceMap[id] = {}; - } - instanceMap[id].grid = instance; - return id; -} -exports.register = register; -function registerDataSources(id, dataProvider, dataManager, paginationManager) { - instanceMap[id].dataProvider = dataProvider; - instanceMap[id].dataManager = dataManager; - instanceMap[id].paginationManager = paginationManager; -} -exports.registerDataSources = registerDataSources; -function getInstance(id) { - return instanceMap[id].grid; -} -exports.getInstance = getInstance; -function getDataProvider(id) { - return instanceMap[id].dataProvider; -} -exports.getDataProvider = getDataProvider; -function getDataManager(id) { - return instanceMap[id].dataManager; -} -exports.getDataManager = getDataManager; -function getPaginationManager(id) { - return instanceMap[id].paginationManager; -} -exports.getPaginationManager = getPaginationManager; - - -/***/ }), -/* 9 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -var tslib_1 = __webpack_require__(1); -var dom_1 = __webpack_require__(2); -var common_1 = __webpack_require__(0); -var column_1 = __webpack_require__(11); -function getTargetInfo(nativeEvent) { - var targetType = 'etc'; - var target = nativeEvent.target; - var cell = dom_1.findParentByTagName(target, 'td'); - var rowKey, columnName; - if (cell) { - var address = dom_1.getCellAddress(cell); - if (address) { - rowKey = address.rowKey; - columnName = address.columnName; - targetType = column_1.isRowHeader(address.columnName) ? 'rowHeader' : 'cell'; - } - else { - targetType = 'dummy'; - } - } - else { - cell = dom_1.findParentByTagName(target, 'th'); - if (cell) { - columnName = cell.getAttribute(dom_1.dataAttr.COLUMN_NAME); - targetType = 'columnHeader'; - } - } - return common_1.pruneObject({ - nativeEvent: nativeEvent, - targetType: targetType, - rowKey: rowKey, - columnName: columnName, - }); -} -/** - * Event class for public event of Grid - * @module event/gridEvent - * @param {Object} data - Event data for handler - */ -var GridEvent = /** @class */ (function () { - function GridEvent(_a) { - if (_a === void 0) { _a = {}; } - var event = _a.event, props = tslib_1.__rest(_a, ["event"]); - this.stopped = false; - if (event) { - this.assignData(getTargetInfo(event)); - } - if (props) { - this.assignData(props); - } - } - /** - * Stops propogation of this event. - * @memberof event/gridEvent - */ - GridEvent.prototype.stop = function () { - this.stopped = true; - }; - GridEvent.prototype.isStopped = function () { - return this.stopped; - }; - GridEvent.prototype.assignData = function (data) { - common_1.assign(this, data); - }; - GridEvent.prototype.setInstance = function (instance) { - common_1.assign(this, { instance: instance }); - }; - return GridEvent; -}()); -exports.default = GridEvent; - - -/***/ }), -/* 10 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.OCCUPIED_HEIGHT_BY_CELL_LAYOUY = exports.DEFAULT_SUB_CONTEXT_MENU_TOP = exports.HORIZONTAL_PADDING_OF_CELL = exports.DISABLED_PRIORITY_COLUMN = exports.DISABLED_PRIORITY_ROW = exports.DISABLED_PRIORITY_CELL = exports.DISABLED_PRIORITY_NONE = exports.DEFAULT_PER_PAGE = exports.RIGHT_MOUSE_BUTTON = exports.TREE_CELL_HORIZONTAL_PADDING = exports.TREE_INDENT_WIDTH = exports.FILTER_DEBOUNCE_TIME = void 0; -exports.FILTER_DEBOUNCE_TIME = 50; -exports.TREE_INDENT_WIDTH = 22; -exports.TREE_CELL_HORIZONTAL_PADDING = 19; -exports.RIGHT_MOUSE_BUTTON = 2; -exports.DEFAULT_PER_PAGE = 20; -exports.DISABLED_PRIORITY_NONE = 'NONE'; -exports.DISABLED_PRIORITY_CELL = 'CELL'; -exports.DISABLED_PRIORITY_ROW = 'ROW'; -exports.DISABLED_PRIORITY_COLUMN = 'COLUMN'; -exports.HORIZONTAL_PADDING_OF_CELL = 10; -exports.DEFAULT_SUB_CONTEXT_MENU_TOP = -6; -exports.OCCUPIED_HEIGHT_BY_CELL_LAYOUY = 9; - - -/***/ }), -/* 11 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.isDragColumn = exports.isCheckboxColumn = exports.isRowNumColumn = exports.isRowHeader = void 0; -var common_1 = __webpack_require__(0); -function isRowHeader(columnName) { - return common_1.includes(['_number', '_checked', '_draggable'], columnName); -} -exports.isRowHeader = isRowHeader; -function isRowNumColumn(columnName) { - return columnName === '_number'; -} -exports.isRowNumColumn = isRowNumColumn; -function isCheckboxColumn(columnName) { - return columnName === '_checked'; -} -exports.isCheckboxColumn = isCheckboxColumn; -function isDragColumn(columnName) { - return columnName === '_draggable'; -} -exports.isDragColumn = isDragColumn; - - -/***/ }), -/* 12 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.isDraggableColumn = exports.isDisabledColumn = exports.isAllColumnsVisible = exports.getColumnSide = exports.getChildHeaderCount = exports.getHierarchyMaxRowCount = exports.convertHierarchyToData = exports.getComplexColumnsHierarchy = exports.getRemovedHiddenChildColumns = exports.getColumnHierarchy = exports.isComplexHeader = exports.isHiddenColumn = exports.isParentColumnHeader = void 0; -var tslib_1 = __webpack_require__(1); -var common_1 = __webpack_require__(0); -var tree_1 = __webpack_require__(21); -function isParentColumnHeader(complexColumnHeaders, name) { - return !!complexColumnHeaders.length && common_1.some(function (item) { return item.name === name; }, complexColumnHeaders); -} -exports.isParentColumnHeader = isParentColumnHeader; -function isHiddenColumn(column, columnName) { - return column.allColumnMap[columnName].hidden; -} -exports.isHiddenColumn = isHiddenColumn; -function isComplexHeader(column, columnName) { - return common_1.some(function (_a) { - var name = _a.name, hideChildHeaders = _a.hideChildHeaders, childNames = _a.childNames; - return !!(name === columnName || (hideChildHeaders && common_1.includes(childNames, columnName))); - }, column.complexColumnHeaders); -} -exports.isComplexHeader = isComplexHeader; -function getColumnHierarchy(column, complexColumnHeaders, mergedComplexColumns) { - var complexColumns = mergedComplexColumns || []; - if (column) { - complexColumns.push(column); - if (complexColumnHeaders) { - complexColumnHeaders.forEach(function (complexColumnHeader) { - if (common_1.includes(complexColumnHeader.childNames, column.name)) { - getColumnHierarchy(complexColumnHeader, complexColumnHeaders, complexColumns); - } - }); - } - } - return complexColumns; -} -exports.getColumnHierarchy = getColumnHierarchy; -function getRemovedHiddenChildColumns(hierarchies) { - return hierarchies.map(function (columns) { - if (columns.length > 1) { - // The hideChildHeaders option always exists in the second column to last. - var hideChildHeaders = columns[columns.length - 2].hideChildHeaders; - if (hideChildHeaders) { - columns.pop(); - } - } - return columns; - }); -} -exports.getRemovedHiddenChildColumns = getRemovedHiddenChildColumns; -function getComplexColumnsHierarchy(columns, complexColumnHeaders) { - return getRemovedHiddenChildColumns(columns.map(function (column) { return getColumnHierarchy(column, complexColumnHeaders).reverse(); })); -} -exports.getComplexColumnsHierarchy = getComplexColumnsHierarchy; -function convertHierarchyToData(hierarchy) { - var maxRowCount = getHierarchyMaxRowCount(hierarchy); - var data = []; - hierarchy.forEach(function (colunms) { - for (var i = 0; i < maxRowCount; i += 1) { - if (!Array.isArray(data[i])) { - data.push([]); - } - var colInfo = colunms[i < colunms.length ? i : colunms.length - 1]; - data[i].push(colInfo.header); - } - }); - return data; -} -exports.convertHierarchyToData = convertHierarchyToData; -function getHierarchyMaxRowCount(hierarchies) { - return Math.max.apply(Math, tslib_1.__spreadArrays([0], common_1.mapProp('length', hierarchies))); -} -exports.getHierarchyMaxRowCount = getHierarchyMaxRowCount; -function getChildHeaderCount(columns, complexColumns, name) { - var count = 0; - var leafColumn = common_1.someProp('name', name, columns); - if (!leafColumn) { - var complexColumn = common_1.findProp('name', name, complexColumns); - if (complexColumn) { - complexColumn.childNames.forEach(function (childName) { - var leafChildColumn = common_1.someProp('name', childName, columns); - count += leafChildColumn ? 1 : getChildHeaderCount(columns, complexColumns, childName); - }); - } - } - return count; -} -exports.getChildHeaderCount = getChildHeaderCount; -function getColumnSide(column, columnName) { - return common_1.someProp('name', columnName, column.visibleColumnsBySideWithRowHeader.R) ? 'R' : 'L'; -} -exports.getColumnSide = getColumnSide; -function isAllColumnsVisible(column) { - var columnsWithoutRowHeader = column.columnsWithoutRowHeader, visibleColumns = column.visibleColumns; - return columnsWithoutRowHeader.length === visibleColumns.length; -} -exports.isAllColumnsVisible = isAllColumnsVisible; -function isDisabledColumn(column, columnName) { - var targetColumn = common_1.find(function (_a) { - var name = _a.name; - return name === columnName; - }, column.allColumns); - return !!(targetColumn === null || targetColumn === void 0 ? void 0 : targetColumn.disabled); -} -exports.isDisabledColumn = isDisabledColumn; -function isDraggableColumn(store, columnName) { - var column = store.column; - return (column.draggable && - isAllColumnsVisible(column) && - column.complexColumnHeaders.length === 0 && - !tree_1.isTreeColumnName(column, columnName) && - !isDisabledColumn(column, columnName)); -} -exports.isDraggableColumn = isDraggableColumn; - - -/***/ }), -/* 13 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.getRowSpanOfColumn = exports.isRowSpanEnabled = exports.getMaxRowSpanCount = exports.getRowSpanByRowKey = exports.getRowSpanBottomIndex = exports.getRowSpanTopIndex = exports.getRowSpan = exports.getVerticalPosWithRowSpan = exports.getRowRangeWithRowSpan = exports.getMaxRowSpanRange = void 0; -var common_1 = __webpack_require__(0); -var selection_1 = __webpack_require__(22); -function getMainRowSpan(columnName, rowSpan, data) { - var mainRow = rowSpan.mainRow, mainRowKey = rowSpan.mainRowKey; - if (mainRow) { - return rowSpan; - } - var mainRowIndex = common_1.findPropIndex('rowKey', mainRowKey, data); - return data[mainRowIndex].rowSpanMap[columnName]; -} -function getRowSpanRange(rowRange, colRange, visibleColumns, data) { - var startColumnIndex = colRange[0], endColumnIndex = colRange[1]; - var startRowIndex = rowRange[0], endRowIndex = rowRange[1]; - for (var index = startColumnIndex; index <= endColumnIndex; index += 1) { - var filteredRawData = data.filteredRawData; - var startRowSpanMap = filteredRawData[startRowIndex].rowSpanMap; - var endRowSpanMap = filteredRawData[endRowIndex].rowSpanMap; - var columnName = visibleColumns[index].name; - // get top row index of topmost rowSpan - if (startRowSpanMap[columnName]) { - var mainRowKey = startRowSpanMap[columnName].mainRowKey; - var topRowSpanIndex = common_1.findPropIndex('rowKey', mainRowKey, filteredRawData); - startRowIndex = startRowIndex > topRowSpanIndex ? topRowSpanIndex : startRowIndex; - } - // get bottom row index of bottommost rowSpan - if (endRowSpanMap[columnName]) { - var _a = endRowSpanMap[columnName], mainRowKey = _a.mainRowKey, spanCount = _a.spanCount; - var bottomRowSpanIndex = common_1.findPropIndex('rowKey', mainRowKey, filteredRawData) + spanCount - 1; - endRowIndex = endRowIndex < bottomRowSpanIndex ? bottomRowSpanIndex : endRowIndex; - } - } - return startRowIndex !== rowRange[0] || endRowIndex !== rowRange[1] - ? getRowSpanRange([startRowIndex, endRowIndex], colRange, visibleColumns, data) - : [startRowIndex, endRowIndex]; -} -function getMaxRowSpanRange(rowRange, colRange, visibleColumns, focusRowIndex, data) { - var sortedColRange = selection_1.getSortedRange(colRange); - var endRowIndex = rowRange[1]; - var startRowIndex = rowRange[0]; - // if start row index is different from focused index, - // change start row index to focused row index for getting proper row range - startRowIndex = - !common_1.isNull(focusRowIndex) && startRowIndex !== focusRowIndex ? focusRowIndex : startRowIndex; - var sortedRowRange = selection_1.getSortedRange([startRowIndex, endRowIndex]); - var _a = getRowSpanRange(sortedRowRange, sortedColRange, visibleColumns, data), startRowSpanIndex = _a[0], endRowSpanIndex = _a[1]; - return startRowIndex > endRowIndex - ? [endRowSpanIndex, startRowSpanIndex] - : [startRowSpanIndex, endRowSpanIndex]; -} -exports.getMaxRowSpanRange = getMaxRowSpanRange; -function getRowRangeWithRowSpan(rowRange, colRange, column, rowIndex, data) { - if (isRowSpanEnabled(data.sortState, column)) { - return getMaxRowSpanRange(rowRange, colRange, column.visibleColumnsWithRowHeader, rowIndex, data); - } - return rowRange; -} -exports.getRowRangeWithRowSpan = getRowRangeWithRowSpan; -function getVerticalPosWithRowSpan(columnName, rowSpan, rowCoords, data) { - var mainRowSpan = getMainRowSpan(columnName, rowSpan, data); - var mainRowIndex = common_1.findPropIndex('rowKey', mainRowSpan.mainRowKey, data); - var spanCount = mainRowSpan.spanCount; - var top = rowCoords.offsets[mainRowIndex]; - var bottom = top; - for (var count = 0; count < spanCount; count += 1) { - bottom += rowCoords.heights[mainRowIndex + count]; - } - return [top, bottom]; -} -exports.getVerticalPosWithRowSpan = getVerticalPosWithRowSpan; -function getRowSpan(rowIndex, columnName, data) { - var rowSpanMap = data[rowIndex].rowSpanMap; - return rowSpanMap[columnName]; -} -exports.getRowSpan = getRowSpan; -/* - * get top row index of specific rowSpan cell - */ -function getRowSpanTopIndex(rowIndex, columnName, data) { - var rowSpan = getRowSpan(rowIndex, columnName, data); - if (!rowSpan) { - return rowIndex; - } - return common_1.findPropIndex('rowKey', rowSpan.mainRowKey, data); -} -exports.getRowSpanTopIndex = getRowSpanTopIndex; -/* - * get bottom row index of specific rowSpan cell - */ -function getRowSpanBottomIndex(rowIndex, columnName, data) { - var rowSpan = getRowSpan(rowIndex, columnName, data); - if (!rowSpan) { - return rowIndex; - } - var mainRowIndex = common_1.findPropIndex('rowKey', rowSpan.mainRowKey, data); - return mainRowIndex + rowSpan.spanCount - 1; -} -exports.getRowSpanBottomIndex = getRowSpanBottomIndex; -function getRowSpanByRowKey(rowKey, columnName, data) { - var rowIndex = common_1.findPropIndex('rowKey', rowKey, data); - if (rowIndex === -1) { - return null; - } - return getRowSpan(rowIndex, columnName, data) || null; -} -exports.getRowSpanByRowKey = getRowSpanByRowKey; -/* - * get max rowSpan count in all columns that have rowSpan - */ -function getMaxRowSpanCount(rowIndex, data) { - var _a; - var rowSpanMap = (_a = data[rowIndex]) === null || _a === void 0 ? void 0 : _a.rowSpanMap; - if (common_1.isEmpty(rowSpanMap)) { - return 0; - } - return Object.keys(rowSpanMap).reduce(function (acc, columnName) { return Math.max(acc, rowSpanMap[columnName].spanCount); }, 0); -} -exports.getMaxRowSpanCount = getMaxRowSpanCount; -function isRowSpanEnabled(sortState, column) { - return (sortState.columns[0].columnName === 'sortKey' || !!(column === null || column === void 0 ? void 0 : column.visibleRowSpanEnabledColumns.length)); -} -exports.isRowSpanEnabled = isRowSpanEnabled; -function getRowSpanOfColumn(data, columnName, perPage) { - var rowSpanOfColumn = {}; - var rowSpan = {}; - var mainRowKey = null; - var mainRowValue = null; - data.forEach(function (_a, index) { - var rowKey = _a.rowKey, _b = columnName, value = _a[_b]; - var isRowInNextPage = perPage && index !== 0 && index % perPage === 0; - if (mainRowValue !== value || isRowInNextPage) { - if (!common_1.isNull(mainRowKey) && rowSpan[columnName] !== 1) { - rowSpanOfColumn[mainRowKey] = rowSpan; - } - rowSpan = {}; - rowSpan[columnName] = 1; - mainRowKey = rowKey; - mainRowValue = value; - } - else { - rowSpan[columnName] += 1; - } - }); - if (!common_1.isNull(mainRowKey) && rowSpan[columnName] !== 1) { - rowSpanOfColumn[mainRowKey] = rowSpan; - } - return rowSpanOfColumn; -} -exports.getRowSpanOfColumn = getRowSpanOfColumn; - - -/***/ }), -/* 14 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.removeRows = exports.appendRows = exports.scrollToNext = exports.moveRow = exports.setRows = exports.setRow = exports.updateRowNumber = exports.setCheckedAllRows = exports.setLoadingState = exports.removeColumnClassName = exports.addColumnClassName = exports.removeCellClassName = exports.addCellClassName = exports.removeRowClassName = exports.addRowClassName = exports.resetData = exports.clearData = exports.removeRow = exports.appendRow = exports.setRowCheckDisabled = exports.setCellDisabled = exports.setColumnDisabled = exports.setRowDisabled = exports.setDisabled = exports.setDisabledAllCheckbox = exports.uncheckAll = exports.checkAll = exports.setCheckboxBetween = exports.uncheck = exports.check = exports.setColumnValues = exports.setAllRowAttribute = exports.setRowsAttributeInRange = exports.setRowAttribute = exports.isUpdatableRowAttr = exports.setValue = exports.makeObservable = exports.updateHeights = void 0; -var tslib_1 = __webpack_require__(1); -var common_1 = __webpack_require__(0); -var data_1 = __webpack_require__(15); -var observable_1 = __webpack_require__(5); -var selection_1 = __webpack_require__(16); -var eventBus_1 = __webpack_require__(7); -var gridEvent_1 = tslib_1.__importDefault(__webpack_require__(9)); -var instance_1 = __webpack_require__(8); -var tree_1 = __webpack_require__(31); -var rowSpan_1 = __webpack_require__(13); -var focus_1 = __webpack_require__(18); -var tree_2 = __webpack_require__(20); -var sort_1 = __webpack_require__(29); -var data_2 = __webpack_require__(6); -var summary_1 = __webpack_require__(26); -var filter_1 = __webpack_require__(36); -var viewport_1 = __webpack_require__(25); -var column_1 = __webpack_require__(11); -var pagination_1 = __webpack_require__(37); -var rowSpan_2 = __webpack_require__(24); -var lazyObservable_1 = __webpack_require__(28); -var validation_1 = __webpack_require__(27); -var column_2 = __webpack_require__(32); -var renderState_1 = __webpack_require__(50); -var constant_1 = __webpack_require__(10); -function getIndexRangeOfCheckbox(_a, startRowKey, targetRowKey) { - var data = _a.data, column = _a.column, id = _a.id; - var filtered = data_2.isFiltered(data); - var from = data_2.findIndexByRowKey(data, column, id, startRowKey, filtered); - var to = data_2.findIndexByRowKey(data, column, id, targetRowKey, filtered); - return from < to ? [from, to + 1] : [to, from + 1]; -} -function updateHeightsWithFilteredData(store) { - var data = store.data, focus = store.focus; - var filteredRawData = data.filteredRawData; - var rowKey = focus.rowKey; - if (!filteredRawData.some(function (row) { return row.rowKey === rowKey; })) { - focus_1.initFocus(store); - } - updateHeights(store); -} -function updateHeights(store) { - var data = store.data, rowCoords = store.rowCoords, dimension = store.dimension; - var pageOptions = data.pageOptions, pageRowRange = data.pageRowRange, filteredRawData = data.filteredRawData; - var rowHeight = dimension.rowHeight; - rowCoords.heights = pageOptions.useClient - ? filteredRawData.slice.apply(filteredRawData, pageRowRange).map(function (row) { return data_2.getRowHeight(row, rowHeight); }) - : filteredRawData.map(function (row) { return data_2.getRowHeight(row, rowHeight); }); -} -exports.updateHeights = updateHeights; -function makeObservable(store, rowIndex, silent, lazyObservable) { - if (silent === void 0) { silent = false; } - if (lazyObservable === void 0) { lazyObservable = false; } - var data = store.data, column = store.column, id = store.id; - var rawData = data.rawData, viewData = data.viewData; - var treeColumnName = column.treeColumnName; - var rawRow = rawData[rowIndex]; - if (observable_1.isObservable(rawRow)) { - return; - } - if (treeColumnName) { - var parentRow = data_2.findRowByRowKey(data, column, id, rawRow._attributes.tree.parentRowKey); - rawData[rowIndex] = tree_2.createTreeRawRow(id, rawRow, parentRow || null, column, { lazyObservable: lazyObservable }); - } - else { - rawData[rowIndex] = data_1.createRawRow(id, rawRow, rowIndex, column, { lazyObservable: lazyObservable }); - } - viewData[rowIndex] = data_1.createViewRow(id, rawData[rowIndex], rawData, column); - if (!silent) { - observable_1.notify(data, 'rawData', 'filteredRawData', 'viewData', 'filteredViewData'); - } -} -exports.makeObservable = makeObservable; -function setValue(store, rowKey, columnName, value, checkCellState) { - if (checkCellState === void 0) { checkCellState = false; } - var gridEvent; - var column = store.column, data = store.data, id = store.id; - var eventBus = eventBus_1.getEventBus(id); - var rawData = data.rawData, viewData = data.viewData, sortState = data.sortState; - var allColumnMap = column.allColumnMap, columnsWithoutRowHeader = column.columnsWithoutRowHeader; - var rowIndex = data_2.findIndexByRowKey(data, column, id, rowKey, false); - var targetRow = rawData[rowIndex]; - if (!targetRow || targetRow[columnName] === value) { - return; - } - if (checkCellState) { - makeObservable(store, rowIndex); - var _a = viewData[rowIndex].valueMap[columnName], disabled = _a.disabled, editable = _a.editable; - if (disabled || !editable) { - return; - } - } - rowSpan_2.resetRowSpan(store); - var targetColumn = common_1.findProp('name', columnName, columnsWithoutRowHeader); - var orgValue = targetRow[columnName]; - // @TODO: 'onBeforeChange' event is deprecated. This event will be replaced with 'beforeChange' event - if (targetColumn && targetColumn.onBeforeChange) { - gridEvent = new gridEvent_1.default({ rowKey: rowKey, columnName: columnName, value: orgValue, nextValue: value }); - targetColumn.onBeforeChange(gridEvent); - if (gridEvent.isStopped()) { - rowSpan_2.updateRowSpan(store); - return; - } - } - var change = { rowKey: rowKey, columnName: columnName, value: orgValue, nextValue: value }; - gridEvent = new gridEvent_1.default({ origin: 'cell', changes: [change] }); - /** - * Occurs before one or more cells is changed - * @event Grid#beforeChange - * @property {string} origin - The type of change('paste', 'delete', 'cell') - * @property {Array.} changes - rowKey, column name, original values and next values before changing the values - * @property {Grid} instance - Current grid instance - */ - eventBus.trigger('beforeChange', gridEvent); - if (gridEvent.isStopped()) { - rowSpan_2.updateRowSpan(store); - return; - } - value = change.nextValue; - var rowSpanMap = targetRow.rowSpanMap; - var columns = sortState.columns; - var index = common_1.findPropIndex('columnName', columnName, columns); - validation_1.replaceColumnUniqueInfoMap(id, column, { rowKey: rowKey, columnName: columnName, prevValue: orgValue, value: value }); - targetRow[columnName] = value; - data_1.setRowRelationListItems(targetRow, allColumnMap); - if (index !== -1) { - sort_1.sort(store, columnName, columns[index].ascending, true, false); - } - setTimeout(function () { - updateHeightsWithFilteredData(store); - }); - summary_1.updateSummaryValueByCell(store, columnName, { orgValue: orgValue, value: value }); - instance_1.getDataManager(id).push('UPDATE', targetRow); - if (!common_1.isEmpty(rowSpanMap) && rowSpanMap[columnName] && rowSpan_1.isRowSpanEnabled(sortState, column)) { - var spanCount = rowSpanMap[columnName].spanCount; - // update sub rows value - for (var count = 1; count < spanCount; count += 1) { - rawData[rowIndex + count][columnName] = value; - summary_1.updateSummaryValueByCell(store, columnName, { orgValue: orgValue, value: value }); - instance_1.getDataManager(id).push('UPDATE', rawData[rowIndex + count]); - } - } - column_2.setAutoResizingColumnWidths(store); - // @TODO: 'onAfterChange' event is deprecated. This event will be replaced with 'afterChange' event - if (targetColumn && targetColumn.onAfterChange) { - gridEvent = new gridEvent_1.default({ rowKey: rowKey, columnName: columnName, value: value, prevValue: orgValue }); - targetColumn.onAfterChange(gridEvent); - } - gridEvent = new gridEvent_1.default({ - origin: 'cell', - changes: [{ rowKey: rowKey, columnName: columnName, value: value, prevValue: orgValue }], - }); - /** - * Occurs after one or more cells is changed - * @event Grid#afterChange - * @property {string} origin - The type of change('paste', 'delete', 'cell') - * @property {Array.} changes - rowKey, column name, previous values and changed values after changing the values - * @property {Grid} instance - Current grid instance - */ - eventBus.trigger('afterChange', gridEvent); - rowSpan_2.updateRowSpan(store); -} -exports.setValue = setValue; -function isUpdatableRowAttr(name, checkDisabled) { - return !(name === 'checked' && checkDisabled); -} -exports.isUpdatableRowAttr = isUpdatableRowAttr; -function setRowAttribute(_a, rowKey, attrName, value) { - var data = _a.data, column = _a.column, id = _a.id; - var targetRow = data_2.findRowByRowKey(data, column, id, rowKey, false); - // https://github.com/microsoft/TypeScript/issues/34293 - if (targetRow && isUpdatableRowAttr(attrName, targetRow._attributes.checkDisabled)) { - targetRow._attributes[attrName] = value; - } -} -exports.setRowAttribute = setRowAttribute; -function setRowsAttributeInRange(store, attrName, value, range) { - var _a; - (_a = store.data.filteredRawData).slice.apply(_a, range).forEach(function (row) { - if (isUpdatableRowAttr(attrName, row._attributes.checkDisabled)) { - row._attributes[attrName] = value; - } - }); -} -exports.setRowsAttributeInRange = setRowsAttributeInRange; -function setAllRowAttribute(_a, attrName, value, allPage) { - var data = _a.data; - if (allPage === void 0) { allPage = true; } - var filteredRawData = data.filteredRawData; - var range = allPage ? [0, filteredRawData.length] : data.pageRowRange; - filteredRawData.slice.apply(filteredRawData, range).forEach(function (row) { - if (isUpdatableRowAttr(attrName, row._attributes.checkDisabled)) { - // https://github.com/microsoft/TypeScript/issues/34293 - row._attributes[attrName] = value; - } - }); -} -exports.setAllRowAttribute = setAllRowAttribute; -function setColumnValues(store, columnName, value, checkCellState) { - if (checkCellState === void 0) { checkCellState = false; } - if (checkCellState) { - // @TODO: find more practical way to make observable - lazyObservable_1.createObservableData(store, true); - } - var id = store.id, data = store.data, column = store.column; - data.rawData.forEach(function (targetRow, index) { - var valid = true; - if (checkCellState) { - var _a = data.viewData[index].valueMap[columnName], disabled = _a.disabled, editable = _a.editable; - valid = !disabled && editable; - } - if (targetRow[columnName] !== value && valid) { - validation_1.replaceColumnUniqueInfoMap(id, column, { - rowKey: targetRow.rowKey, - columnName: columnName, - prevValue: targetRow[columnName], - value: value, - }); - targetRow[columnName] = value; - instance_1.getDataManager(id).push('UPDATE', targetRow); - } - }); - summary_1.updateSummaryValueByColumn(store, columnName, { value: value }); - validation_1.forceValidateUniquenessOfColumn(data.rawData, column, columnName); - column_2.setAutoResizingColumnWidths(store); - rowSpan_2.updateRowSpan(store); -} -exports.setColumnValues = setColumnValues; -function check(store, rowKey) { - var id = store.id, column = store.column, data = store.data; - var allColumnMap = column.allColumnMap, _a = column.treeColumnName, treeColumnName = _a === void 0 ? '' : _a; - var eventBus = eventBus_1.getEventBus(id); - var gridEvent = new gridEvent_1.default({ rowKey: rowKey }); - data.clickedCheckboxRowkey = rowKey; - setRowAttribute(store, rowKey, 'checked', true); - if (allColumnMap[treeColumnName]) { - tree_1.changeTreeRowsCheckedState(store, rowKey, true); - } - observable_1.asyncInvokeObserver(function () { - setCheckedAllRows(store); - }); - /** - * Occurs when a checkbox in row header is checked - * @event Grid#check - * @property {number | string} rowKey - rowKey of the checked row - * @property {Grid} instance - Current grid instance - */ - eventBus.trigger('check', gridEvent); -} -exports.check = check; -function uncheck(store, rowKey) { - var id = store.id, column = store.column, data = store.data; - var allColumnMap = column.allColumnMap, _a = column.treeColumnName, treeColumnName = _a === void 0 ? '' : _a; - var eventBus = eventBus_1.getEventBus(id); - var gridEvent = new gridEvent_1.default({ rowKey: rowKey }); - data.clickedCheckboxRowkey = rowKey; - setRowAttribute(store, rowKey, 'checked', false); - if (allColumnMap[treeColumnName]) { - tree_1.changeTreeRowsCheckedState(store, rowKey, false); - } - observable_1.asyncInvokeObserver(function () { - setCheckedAllRows(store); - }); - /** - * Occurs when a checkbox in row header is unchecked - * @event Grid#uncheck - * @property {number | string} rowKey - rowKey of the unchecked row - * @property {Grid} instance - Current grid instance - */ - eventBus.trigger('uncheck', gridEvent); -} -exports.uncheck = uncheck; -function setCheckboxBetween(store, value, startRowKey, endRowKey) { - var data = store.data; - var clickedCheckboxRowkey = data.clickedCheckboxRowkey; - var targetRowKey = endRowKey || clickedCheckboxRowkey; - data.clickedCheckboxRowkey = startRowKey; - if (common_1.isNil(targetRowKey)) { - if (value) { - check(store, startRowKey); - } - else { - uncheck(store, startRowKey); - } - return; - } - var range = getIndexRangeOfCheckbox(store, startRowKey, targetRowKey); - setRowsAttributeInRange(store, 'checked', value, range); - setCheckedAllRows(store); -} -exports.setCheckboxBetween = setCheckboxBetween; -function checkAll(store, allPage) { - var id = store.id; - setAllRowAttribute(store, 'checked', true, allPage); - setCheckedAllRows(store); - observable_1.notify(store.data, 'rawData', 'filteredRawData', 'viewData', 'filteredViewData'); - var eventBus = eventBus_1.getEventBus(id); - var gridEvent = new gridEvent_1.default(); - /** - * Occurs when a checkbox in header is checked(checked all checkbox in row header) - * @event Grid#checkAll - * @property {Grid} instance - Current grid instance - */ - eventBus.trigger('checkAll', gridEvent); -} -exports.checkAll = checkAll; -function uncheckAll(store, allPage) { - var id = store.id; - setAllRowAttribute(store, 'checked', false, allPage); - setCheckedAllRows(store); - observable_1.notify(store.data, 'rawData', 'filteredRawData', 'viewData', 'filteredViewData'); - var eventBus = eventBus_1.getEventBus(id); - var gridEvent = new gridEvent_1.default(); - /** - * Occurs when a checkbox in header is unchecked(unchecked all checkbox in row header) - * @event Grid#uncheckAll - * @property {Grid} instance - Current grid instance - */ - eventBus.trigger('uncheckAll', gridEvent); -} -exports.uncheckAll = uncheckAll; -function setDisabledAllCheckbox(_a) { - var data = _a.data; - var rawData = data.rawData; - data.disabledAllCheckbox = - !!rawData.length && rawData.every(function (row) { return row._attributes.checkDisabled; }); -} -exports.setDisabledAllCheckbox = setDisabledAllCheckbox; -function setRowOrColumnDisabled(target, disabled) { - if (target.disabled === disabled) { - observable_1.notify(target, 'disabled'); - } - else { - target.disabled = disabled; - } -} -// @TODO consider the client pagination with disabled -function setDisabled(store, disabled) { - var data = store.data, column = store.column; - data.rawData.forEach(function (row) { - row._disabledPriority = {}; - setAllRowAttribute(store, 'disabled', disabled); - setAllRowAttribute(store, 'checkDisabled', disabled); - }); - column.columnsWithoutRowHeader.forEach(function (columnInfo) { - columnInfo.disabled = disabled; - }); - data.disabledAllCheckbox = disabled; -} -exports.setDisabled = setDisabled; -function setRowDisabled(store, disabled, rowKey, withCheckbox) { - var data = store.data, column = store.column, id = store.id; - var row = data_2.findRowByRowKey(data, column, id, rowKey, false); - if (row) { - var _attributes = row._attributes, _disabledPriority_1 = row._disabledPriority; - column.allColumns.forEach(function (columnInfo) { - _disabledPriority_1[columnInfo.name] = constant_1.DISABLED_PRIORITY_ROW; - }); - if (withCheckbox) { - _attributes.checkDisabled = disabled; - setDisabledAllCheckbox(store); - } - setRowOrColumnDisabled(_attributes, disabled); - } -} -exports.setRowDisabled = setRowDisabled; -function setColumnDisabled(_a, disabled, columnName) { - var data = _a.data, column = _a.column; - if (column_1.isRowHeader(columnName)) { - return; - } - data.rawData.forEach(function (row) { - row._disabledPriority[columnName] = constant_1.DISABLED_PRIORITY_COLUMN; - }); - setRowOrColumnDisabled(column.allColumnMap[columnName], disabled); -} -exports.setColumnDisabled = setColumnDisabled; -function setCellDisabled(store, disabled, rowKey, columnName) { - var data = store.data, column = store.column, id = store.id; - if (column_1.isRowNumColumn(columnName) || column_1.isDragColumn(columnName)) { - return; - } - var row = data_2.findRowByRowKey(data, column, id, rowKey, false); - if (row) { - var _attributes = row._attributes, _disabledPriority = row._disabledPriority; - _disabledPriority[columnName] = disabled ? constant_1.DISABLED_PRIORITY_CELL : constant_1.DISABLED_PRIORITY_NONE; - if (column_1.isCheckboxColumn(columnName)) { - _attributes.checkDisabled = disabled; - setDisabledAllCheckbox(store); - } - observable_1.notify(row, '_disabledPriority'); - } -} -exports.setCellDisabled = setCellDisabled; -function setRowCheckDisabled(store, disabled, rowKey) { - var data = store.data, column = store.column, id = store.id; - var row = data_2.findRowByRowKey(data, column, id, rowKey, false); - if (row) { - row._attributes.checkDisabled = disabled; - setDisabledAllCheckbox(store); - } -} -exports.setRowCheckDisabled = setRowCheckDisabled; -function appendRow(store, row, options) { - var data = store.data, column = store.column, id = store.id; - var rawData = data.rawData, viewData = data.viewData, sortState = data.sortState, pageOptions = data.pageOptions; - var _a = options.at, at = _a === void 0 ? rawData.length : _a, extendPrevRowSpan = options.extendPrevRowSpan; - var _b = data_2.getCreatedRowInfo(store, at, row), rawRow = _b.rawRow, viewRow = _b.viewRow, prevRow = _b.prevRow; - var inserted = at !== rawData.length; - common_1.silentSplice(rawData, at, 0, rawRow); - common_1.silentSplice(viewData, at, 0, viewRow); - makeObservable(store, at); - pagination_1.updatePageOptions(store, { totalCount: pageOptions.totalCount + 1 }); - updateHeights(store); - if (inserted) { - sort_1.updateSortKey(data, at); - } - sort_1.sortByCurrentState(store); - if (rowSpan_1.isRowSpanEnabled(sortState, column)) { - if (prevRow) { - rowSpan_2.updateRowSpanWhenAppending(rawData, prevRow, extendPrevRowSpan || false); - } - rowSpan_2.updateRowSpan(store); - } - instance_1.getDataManager(id).push('CREATE', rawRow, inserted); - summary_1.updateSummaryValueByRow(store, rawRow, { type: 'APPEND' }); - postUpdateAfterManipulation(store, at, 'DONE', [rawRow]); -} -exports.appendRow = appendRow; -function removeRow(store, rowKey, options) { - var data = store.data, id = store.id, focus = store.focus, column = store.column; - var rawData = data.rawData, viewData = data.viewData, sortState = data.sortState; - var rowIndex = data_2.findIndexByRowKey(data, column, id, rowKey, false); - if (rowIndex === -1) { - return; - } - var removedRow = {}; - var nextRow = rawData[rowIndex + 1]; - pagination_1.updatePageWhenRemovingRow(store, 1); - validation_1.removeUniqueInfoMap(id, rawData[rowIndex], column); - observable_1.batchObserver(function () { - removedRow = rawData.splice(rowIndex, 1)[0]; - }); - viewData.splice(rowIndex, 1); - updateHeights(store); - if (!common_1.someProp('rowKey', focus.rowKey, rawData)) { - focus_1.initFocus(store); - } - selection_1.initSelection(store); - if (nextRow && rowSpan_1.isRowSpanEnabled(sortState, column)) { - rowSpan_2.updateRowSpanWhenRemoving(rawData, removedRow, nextRow, options.keepRowSpanData || false); - } - if (rowIndex !== rawData.length) { - sort_1.updateSortKey(data, removedRow.sortKey + 1, false); - } - instance_1.getDataManager(id).push('DELETE', removedRow); - summary_1.updateSummaryValueByRow(store, removedRow, { type: 'REMOVE' }); - postUpdateAfterManipulation(store, rowIndex, data_2.getLoadingState(rawData)); -} -exports.removeRow = removeRow; -function clearData(store) { - var data = store.data, id = store.id, rowCoords = store.rowCoords; - validation_1.createNewValidationMap(id); - viewport_1.initScrollPosition(store); - focus_1.initFocus(store); - selection_1.initSelection(store); - sort_1.initSortState(data); - filter_1.initFilter(store); - rowCoords.heights = []; - data.rawData = []; - data.viewData = []; - pagination_1.updatePageOptions(store, { totalCount: 0, page: 1 }, true); - summary_1.updateAllSummaryValues(store); - setLoadingState(store, 'EMPTY'); - setCheckedAllRows(store); - instance_1.getDataManager(id).clearAll(); -} -exports.clearData = clearData; -function resetData(store, inputData, options) { - var data = store.data, column = store.column, id = store.id; - var sortState = options.sortState, filterState = options.filterState, pageState = options.pageState; - validation_1.createNewValidationMap(id); - var _a = data_1.createData(id, inputData, column, { lazyObservable: true }), rawData = _a.rawData, viewData = _a.viewData; - var eventBus = eventBus_1.getEventBus(id); - var gridEvent = new gridEvent_1.default(); - viewport_1.initScrollPosition(store); - focus_1.initFocus(store); - selection_1.initSelection(store); - sort_1.resetSortState(store, sortState); - filter_1.resetFilterState(store, filterState); - pagination_1.resetPageState(store, rawData.length, pageState); - data.rawData = rawData; - data.viewData = viewData; - updateHeights(store); - summary_1.updateAllSummaryValues(store); - setLoadingState(store, data_2.getLoadingState(rawData)); - setCheckedAllRows(store); - instance_1.getDataManager(id).setOriginData(inputData); - instance_1.getDataManager(id).clearAll(); - column_2.setColumnWidthsByText(store); - rowSpan_2.updateRowSpan(store); - setTimeout(function () { - /** - * Occurs when the grid data is updated and the grid is rendered onto the DOM - * The event occurs only in the following API as below. - * 'resetData', 'restore', 'reloadData', 'readData', 'setPerPage' with 'dataSource', using 'dataSource' - * @event Grid#onGridUpdated - * @property {Grid} instance - Current grid instance - */ - eventBus.trigger('onGridUpdated', gridEvent); - }); -} -exports.resetData = resetData; -function addRowClassName(store, rowKey, className) { - var data = store.data, column = store.column, id = store.id; - var row = data_2.findRowByRowKey(data, column, id, rowKey, false); - if (row) { - var rowClassMap = row._attributes.className.row; - var isExist = common_1.includes(rowClassMap, className); - if (!isExist) { - rowClassMap.push(className); - observable_1.notify(row._attributes, 'className'); - } - } -} -exports.addRowClassName = addRowClassName; -function removeRowClassName(store, rowKey, className) { - var data = store.data, column = store.column, id = store.id; - var row = data_2.findRowByRowKey(data, column, id, rowKey, false); - if (row) { - common_1.removeArrayItem(className, row._attributes.className.row); - observable_1.notify(row._attributes, 'className'); - } -} -exports.removeRowClassName = removeRowClassName; -function addClassNameToAttribute(row, columnName, className) { - var columnClassNames = row._attributes.className.column[columnName]; - row._attributes.className.column[columnName] = data_2.getAddedClassName(className, columnClassNames); - observable_1.notify(row._attributes, 'className'); -} -function removeClassNameToAttribute(row, columnName, className) { - var columnClassNames = row._attributes.className.column[columnName]; - if (columnClassNames) { - row._attributes.className.column[columnName] = data_2.getRemovedClassName(className, columnClassNames); - } - observable_1.notify(row._attributes, 'className'); -} -function addCellClassName(store, rowKey, columnName, className) { - var data = store.data, column = store.column, id = store.id; - var row = data_2.findRowByRowKey(data, column, id, rowKey, false); - if (row) { - addClassNameToAttribute(row, columnName, className); - } -} -exports.addCellClassName = addCellClassName; -function removeCellClassName(store, rowKey, columnName, className) { - var data = store.data, column = store.column, id = store.id; - var row = data_2.findRowByRowKey(data, column, id, rowKey); - if (row) { - removeClassNameToAttribute(row, columnName, className); - } -} -exports.removeCellClassName = removeCellClassName; -function addColumnClassName(_a, columnName, className) { - var data = _a.data; - var rawData = data.rawData; - rawData.forEach(function (row) { - addClassNameToAttribute(row, columnName, className); - }); -} -exports.addColumnClassName = addColumnClassName; -function removeColumnClassName(_a, columnName, className) { - var data = _a.data; - var rawData = data.rawData; - rawData.forEach(function (row) { - removeClassNameToAttribute(row, columnName, className); - }); -} -exports.removeColumnClassName = removeColumnClassName; -function setLoadingState(_a, state) { - var data = _a.data; - data.loadingState = state; -} -exports.setLoadingState = setLoadingState; -function setCheckedAllRows(_a) { - var data = _a.data; - var filteredRawData = data.filteredRawData, pageRowRange = data.pageRowRange; - var result = false; - if (filteredRawData.length) { - var enableCheckRows = filteredRawData - .slice.apply(filteredRawData, pageRowRange).filter(function (row) { return !row._attributes.checkDisabled; }); - result = !!enableCheckRows.length && enableCheckRows.every(function (row) { return row._attributes.checked; }); - } - data.checkedAllRows = result; -} -exports.setCheckedAllRows = setCheckedAllRows; -function updateRowNumber(_a, startIndex) { - var data = _a.data; - var rawData = data.rawData; - for (var idx = startIndex; idx < rawData.length; idx += 1) { - rawData[idx]._attributes.rowNum = idx + 1; - } -} -exports.updateRowNumber = updateRowNumber; -function setRow(store, rowIndex, row) { - var data = store.data, id = store.id, column = store.column; - var rawData = data.rawData, viewData = data.viewData, sortState = data.sortState; - var orgRow = rawData[rowIndex]; - if (!orgRow) { - return; - } - validation_1.removeUniqueInfoMap(id, orgRow, column); - row.sortKey = orgRow.sortKey; - var _a = data_2.getCreatedRowInfo(store, rowIndex, row, orgRow.rowKey), rawRow = _a.rawRow, viewRow = _a.viewRow, prevRow = _a.prevRow; - common_1.silentSplice(rawData, rowIndex, 1, rawRow); - common_1.silentSplice(viewData, rowIndex, 1, viewRow); - makeObservable(store, rowIndex); - sort_1.sortByCurrentState(store); - if (prevRow && rowSpan_1.isRowSpanEnabled(sortState, column)) { - rowSpan_2.updateRowSpanWhenAppending(rawData, prevRow, false); - } - instance_1.getDataManager(id).push('UPDATE', rawRow); - setTimeout(function () { - updateHeightsWithFilteredData(store); - }); - summary_1.updateSummaryValueByRow(store, rawRow, { type: 'SET', orgRow: orgRow }); - postUpdateAfterManipulation(store, rowIndex, 'DONE'); - rowSpan_2.updateRowSpan(store); -} -exports.setRow = setRow; -function setRows(store, rows) { - var data = store.data, column = store.column, id = store.id; - var rawData = data.rawData, viewData = data.viewData, sortState = data.sortState; - var sortedIndexedRows = rows - .map(function (row) { - var rowIndex = data_2.findIndexByRowKey(data, column, id, row.rowKey); - var orgRow = rawData[rowIndex]; - validation_1.removeUniqueInfoMap(id, orgRow, column); - row.sortKey = orgRow.sortKey; - return { rowIndex: rowIndex, row: row, orgRow: orgRow }; - }) - .sort(function (prev, current) { return prev.rowIndex - current.rowIndex; }); - var createdRowInfos = data_2.getCreatedRowInfos(store, sortedIndexedRows); - var currentStartIndex = 0; - // https://github.com/nhn/tui.grid/pull/1786#issuecomment-1255760066 - createdRowInfos.slice(1).forEach(function (_a, index) { - var rowIndex = _a.rowIndex; - var isLast = index === createdRowInfos.length - 2; - var prevRowIndex = createdRowInfos[index].rowIndex; - if (rowIndex - prevRowIndex !== 1 || isLast) { - var rowInfoIndex = isLast ? index + 1 : index; - var startRowIndex = createdRowInfos[currentStartIndex].rowIndex; - var sizeOfContinuousRowInfo = createdRowInfos[rowInfoIndex].rowIndex - startRowIndex + 1; - common_1.silentSplice.apply(void 0, tslib_1.__spreadArrays([rawData, - startRowIndex, - sizeOfContinuousRowInfo], createdRowInfos.slice(currentStartIndex, rowInfoIndex + 1).map(function (_a) { - var row = _a.row; - return row.rawRow; - }))); - common_1.silentSplice.apply(void 0, tslib_1.__spreadArrays([viewData, - startRowIndex, - sizeOfContinuousRowInfo], createdRowInfos.slice(currentStartIndex, rowInfoIndex + 1).map(function (_a) { - var row = _a.row; - return row.viewRow; - }))); - currentStartIndex = rowInfoIndex + 1; - } - }); - createdRowInfos.forEach(function (_a, index) { - var rowIndex = _a.rowIndex; - makeObservable(store, rowIndex, index !== createdRowInfos.length - 1, true); - }); - createdRowInfos.forEach(function (_a) { - var row = _a.row, orgRow = _a.orgRow; - var rawRow = row.rawRow, prevRow = row.prevRow; - if (prevRow && rowSpan_1.isRowSpanEnabled(sortState, column)) { - rowSpan_2.updateRowSpanWhenAppending(rawData, prevRow, false); - } - instance_1.getDataManager(id).push('UPDATE', rawRow); - summary_1.updateSummaryValueByRow(store, rawRow, { type: 'SET', orgRow: orgRow }); - }); - sort_1.sortByCurrentState(store); - postUpdateAfterManipulation(store, createdRowInfos[0].rowIndex, 'DONE'); - setTimeout(function () { - updateHeightsWithFilteredData(store); - }); - rowSpan_2.updateRowSpan(store); -} -exports.setRows = setRows; -function moveRow(store, rowKey, targetIndex) { - var data = store.data, column = store.column, id = store.id; - var rawData = data.rawData, viewData = data.viewData; - if (!rawData[targetIndex] || data_2.isSorted(data) || data_2.isFiltered(data)) { - return; - } - var currentIndex = data_2.findIndexByRowKey(data, column, id, rowKey, false); - if (currentIndex === -1) { - return; - } - var minIndex = Math.min(currentIndex, targetIndex); - var rawRow = common_1.silentSplice(rawData, currentIndex, 1)[0]; - var viewRow = common_1.silentSplice(viewData, currentIndex, 1)[0]; - observable_1.batchObserver(function () { - rawData.splice(targetIndex, 0, rawRow); - }); - viewData.splice(targetIndex, 0, viewRow); - renderState_1.fitRowHeightWhenMovingRow(store, currentIndex, targetIndex); - sort_1.resetSortKey(data, minIndex); - updateRowNumber(store, minIndex); - instance_1.getDataManager(id).push('UPDATE', rawRow, true); -} -exports.moveRow = moveRow; -function scrollToNext(store) { - var data = store.data, id = store.id; - var _a = data.pageOptions, page = _a.page, totalCount = _a.totalCount, perPage = _a.perPage, useClient = _a.useClient; - if (data_2.isScrollPagination(data)) { - if (useClient) { - data.pageOptions.page += 1; - observable_1.notify(data, 'pageOptions'); - sort_1.sortByCurrentState(store); - updateHeights(store); - setCheckedAllRows(store); - } - else if (page * perPage < totalCount) { - data.pageOptions.page += 1; - instance_1.getDataProvider(id).readData(data.pageOptions.page); - } - } -} -exports.scrollToNext = scrollToNext; -function appendRows(store, inputData) { - var data = store.data, column = store.column, id = store.id; - var startIndex = data.rawData.length; - var _a = data_1.createData(id, inputData, column, { lazyObservable: true }), rawData = _a.rawData, viewData = _a.viewData; - if (!column.keyColumnName) { - var rowKey_1 = data_2.getMaxRowKey(data); - rawData.forEach(function (row, index) { - row.rowKey = rowKey_1 + index; - }); - viewData.forEach(function (row, index) { - row.rowKey = rowKey_1 + index; - }); - } - var newRawData = data.rawData.concat(rawData); - var newViewData = data.viewData.concat(viewData); - data.rawData = newRawData; - data.viewData = newViewData; - sort_1.resetSortKey(data, startIndex); - sort_1.sortByCurrentState(store); - updateHeights(store); - rawData.forEach(function (rawRow) { return instance_1.getDataManager(id).push('CREATE', rawRow); }); - postUpdateAfterManipulation(store, startIndex, 'DONE', rawData); - rowSpan_2.updateRowSpan(store); -} -exports.appendRows = appendRows; -function removeRows(store, targetRows) { - var data = store.data, id = store.id, focus = store.focus, column = store.column; - var sortState = data.sortState, viewData = data.viewData, rawData = data.rawData; - var rowIndexes = targetRows.rowIndices, rows = targetRows.rows, nextRows = targetRows.nextRows; - var deletedCount = rowIndexes.length; - pagination_1.updatePageWhenRemovingRow(store, deletedCount); - rowIndexes.forEach(function (rowIndex, i) { - var nextRow = nextRows[i]; - var removedRow = common_1.silentSplice(rawData, rowIndex - i, 1)[0]; - common_1.silentSplice(viewData, rowIndex - i, 1); - validation_1.removeUniqueInfoMap(id, removedRow, column); - if (nextRow) { - if (rowSpan_1.isRowSpanEnabled(sortState, column)) { - rowSpan_2.updateRowSpanWhenRemoving(rawData, removedRow, nextRow, false); - } - } - instance_1.getDataManager(id).push('DELETE', removedRow); - sort_1.updateSortKey(data, removedRow.sortKey + 1, false); - }); - observable_1.notify(data, 'rawData', 'filteredRawData', 'viewData', 'filteredViewData'); - updateHeights(store); - if (common_1.someProp('rowKey', focus.rowKey, rows)) { - focus_1.initFocus(store); - } - selection_1.initSelection(store); - summary_1.updateAllSummaryValues(store); - postUpdateAfterManipulation(store, rowIndexes[0], data_2.getLoadingState(rawData)); -} -exports.removeRows = removeRows; -function postUpdateAfterManipulation(store, rowIndex, state, rows) { - setLoadingState(store, state); - updateRowNumber(store, rowIndex); - setDisabledAllCheckbox(store); - setCheckedAllRows(store); - validation_1.forceValidateUniquenessOfColumns(store.data.rawData, store.column); - column_2.setAutoResizingColumnWidths(store, rows); -} - - -/***/ }), -/* 15 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.create = exports.createData = exports.createRawRow = exports.setRowRelationListItems = exports.createViewRow = exports.createRowSpan = exports.generateDataCreationKey = void 0; -var tslib_1 = __webpack_require__(1); -var observable_1 = __webpack_require__(5); -var column_1 = __webpack_require__(11); -var common_1 = __webpack_require__(0); -var tree_1 = __webpack_require__(20); -var validation_1 = __webpack_require__(27); -var data_1 = __webpack_require__(6); -var data_2 = __webpack_require__(23); -var constant_1 = __webpack_require__(10); -var dataCreationKey = ''; -function generateDataCreationKey() { - dataCreationKey = "@dataKey" + Date.now(); - return dataCreationKey; -} -exports.generateDataCreationKey = generateDataCreationKey; -function getRelationCbResult(fn, relationParams) { - var result = common_1.isFunction(fn) ? fn(relationParams) : null; - return common_1.isUndefined(result) ? null : result; -} -function getEditable(fn, relationParams) { - var result = getRelationCbResult(fn, relationParams); - return result === null ? true : result; -} -function getDisabled(fn, relationParams) { - var result = getRelationCbResult(fn, relationParams); - return result === null ? false : result; -} -function getListItems(fn, relationParams) { - return getRelationCbResult(fn, relationParams) || []; -} -function getRowHeaderValue(row, columnName) { - if (column_1.isRowNumColumn(columnName)) { - return row._attributes.rowNum; - } - if (column_1.isCheckboxColumn(columnName)) { - return row._attributes.checked; - } - return ''; -} -function createRowSpan(mainRow, rowKey, count, spanCount) { - return { mainRow: mainRow, mainRowKey: rowKey, count: count, spanCount: spanCount }; -} -exports.createRowSpan = createRowSpan; -function createViewCell(id, row, column, _a) { - var _b = _a.isDataModified, isDataModified = _b === void 0 ? false : _b, prevInvalidStates = _a.prevInvalidStates, _c = _a.relationInfo, relationInfo = _c === void 0 ? {} : _c; - var _d = relationInfo.relationMatched, relationMatched = _d === void 0 ? true : _d, relationListItems = relationInfo.relationListItems; - var name = column.name, formatter = column.formatter, editor = column.editor, validation = column.validation, defaultValue = column.defaultValue; - var value = column_1.isRowHeader(name) ? getRowHeaderValue(row, name) : row[name]; - if (common_1.isNil(value) && !common_1.isNil(defaultValue)) { - value = defaultValue; - } - if (!relationMatched) { - value = ''; - } - var formatterProps = { row: row, column: column, value: value }; - var _e = row._attributes, disabled = _e.disabled, checkDisabled = _e.checkDisabled, classNameAttr = _e.className; - var columnDisabled = !!column.disabled; - var rowDisabled = column_1.isCheckboxColumn(name) ? checkDisabled : disabled; - var columnClassName = common_1.isUndefined(classNameAttr.column[name]) ? [] : classNameAttr.column[name]; - var className = tslib_1.__spreadArrays(classNameAttr.row, columnClassName).join(' '); - var _disabledPriority = row._disabledPriority[name]; - var cellDisabled = rowDisabled || columnDisabled; - if (_disabledPriority === constant_1.DISABLED_PRIORITY_CELL) { - cellDisabled = true; - } - else if (_disabledPriority === constant_1.DISABLED_PRIORITY_NONE) { - cellDisabled = false; - } - else if (_disabledPriority === constant_1.DISABLED_PRIORITY_COLUMN) { - cellDisabled = columnDisabled; - } - else if (_disabledPriority === constant_1.DISABLED_PRIORITY_ROW) { - cellDisabled = rowDisabled; - } - var usePrevInvalidStates = !isDataModified && !common_1.isNil(prevInvalidStates); - var invalidStates = usePrevInvalidStates - ? prevInvalidStates - : validation_1.getValidationCode({ id: id, value: row[name], row: row, validation: validation, columnName: name }); - return { - editable: !!editor, - className: className, - disabled: cellDisabled, - invalidStates: invalidStates, - formattedValue: data_2.getFormattedValue(formatterProps, formatter, value, relationListItems), - value: value, - }; -} -function createRelationViewCell(id, name, row, _a) { - var columnMap = _a.columnMap, valueMap = _a.valueMap; - var _b = valueMap[name], editable = _b.editable, disabled = _b.disabled, value = _b.value; - var _c = columnMap[name].relationMap, relationMap = _c === void 0 ? {} : _c; - Object.keys(relationMap).forEach(function (targetName) { - var _a = relationMap[targetName], editableCallback = _a.editable, disabledCallback = _a.disabled, listItemsCallback = _a.listItems; - var relationCbParams = { value: value, editable: editable, disabled: disabled, row: row }; - var targetEditable = getEditable(editableCallback, relationCbParams); - var targetDisabled = getDisabled(disabledCallback, relationCbParams); - var targetListItems = getListItems(listItemsCallback, relationCbParams); - var targetValue = row[targetName]; - var targetEditor = columnMap[targetName].editor; - var targetEditorOptions = targetEditor === null || targetEditor === void 0 ? void 0 : targetEditor.options; - var relationMatched = common_1.isFunction(listItemsCallback) - ? common_1.someProp('value', targetValue, targetListItems) - : true; - var cellData = createViewCell(id, row, columnMap[targetName], { - relationInfo: { - relationMatched: relationMatched, - relationListItems: targetListItems, - }, - }); - if (!targetEditable) { - cellData.editable = false; - } - if (targetDisabled) { - cellData.disabled = true; - } - // should set the relation list to relationListItemMap for preventing to share relation list in other rows - if (targetEditorOptions) { - targetEditorOptions.relationListItemMap = targetEditorOptions.relationListItemMap || {}; - targetEditorOptions.relationListItemMap[row.rowKey] = targetListItems; - } - valueMap[targetName] = cellData; - }); -} -function createViewRow(id, row, rawData, column) { - var rowKey = row.rowKey, sortKey = row.sortKey, rowSpanMap = row.rowSpanMap, uniqueKey = row.uniqueKey; - var columnMap = column.columnMapWithRelation; - var treeColumnName = column.treeColumnName, _a = column.treeIcon, treeIcon = _a === void 0 ? true : _a, treeIndentWidth = column.treeIndentWidth; - var initValueMap = {}; - Object.keys(columnMap).forEach(function (name) { - initValueMap[name] = null; - }); - var cachedValueMap = {}; - var valueMap = observable_1.observable(initValueMap); - var __unobserveFns__ = []; - Object.keys(columnMap).forEach(function (name) { - var _a = columnMap[name], related = _a.related, relationMap = _a.relationMap, className = _a.className; - if (className) { - row._attributes.className.column[name] = className.split(' '); - } - // add condition expression to prevent to call watch function recursively - if (!related) { - __unobserveFns__.push(observable_1.observe(function (calledBy) { - var _a; - var isDataModified = calledBy !== 'className'; - cachedValueMap[name] = createViewCell(id, row, columnMap[name], { - isDataModified: isDataModified, - prevInvalidStates: (_a = cachedValueMap[name]) === null || _a === void 0 ? void 0 : _a.invalidStates, - }); - valueMap[name] = cachedValueMap[name]; - })); - } - if (relationMap && Object.keys(relationMap).length) { - __unobserveFns__.push(observable_1.observe(function () { - createRelationViewCell(id, name, row, { columnMap: columnMap, valueMap: valueMap }); - })); - } - }); - return tslib_1.__assign({ rowKey: rowKey, - sortKey: sortKey, - uniqueKey: uniqueKey, - rowSpanMap: rowSpanMap, - valueMap: valueMap, - __unobserveFns__: __unobserveFns__ }, (treeColumnName && { - treeInfo: tree_1.createTreeCellInfo(rawData, row, treeIndentWidth, treeIcon), - })); -} -exports.createViewRow = createViewRow; -function getAttributes(row, index, lazyObservable, disabled) { - var defaultAttr = { - rowNum: index + 1, - checked: false, - disabled: disabled, - checkDisabled: disabled, - className: { - row: [], - column: {}, - }, - }; - if (row._attributes) { - if (common_1.isBoolean(row._attributes.disabled) && common_1.isUndefined(row._attributes.checkDisabled)) { - row._attributes.checkDisabled = row._attributes.disabled; - } - if (!common_1.isUndefined(row._attributes.className)) { - row._attributes.className = tslib_1.__assign({ row: [], column: {} }, row._attributes.className); - } - } - var attributes = tslib_1.__assign(tslib_1.__assign({}, defaultAttr), row._attributes); - return lazyObservable ? attributes : observable_1.observable(attributes); -} -function createRelationListItems(name, row, columnMap) { - var _a = columnMap[name], _b = _a.relationMap, relationMap = _b === void 0 ? {} : _b, editor = _a.editor; - var _c = row._attributes, checkDisabled = _c.checkDisabled, rowDisabled = _c.disabled; - var editable = !!editor; - var disabled = column_1.isCheckboxColumn(name) ? checkDisabled : rowDisabled; - var value = row[name]; - var relationCbParams = { value: value, editable: editable, disabled: disabled, row: row }; - var relationListItemMap = {}; - Object.keys(relationMap).forEach(function (targetName) { - relationListItemMap[targetName] = getListItems(relationMap[targetName].listItems, relationCbParams); - }); - return relationListItemMap; -} -function setRowRelationListItems(row, columnMap) { - var relationListItemMap = tslib_1.__assign({}, row._relationListItemMap); - Object.keys(columnMap).forEach(function (name) { - common_1.assign(relationListItemMap, createRelationListItems(name, row, columnMap)); - }); - row._relationListItemMap = relationListItemMap; -} -exports.setRowRelationListItems = setRowRelationListItems; -function createMainRowSpanMap(rowSpan, rowKey) { - var mainRowSpanMap = {}; - if (!rowSpan) { - return mainRowSpanMap; - } - Object.keys(rowSpan).forEach(function (columnName) { - var spanCount = rowSpan[columnName]; - mainRowSpanMap[columnName] = createRowSpan(true, rowKey, spanCount, spanCount); - }); - return mainRowSpanMap; -} -function createSubRowSpan(prevRowSpanMap) { - var subRowSpanMap = {}; - Object.keys(prevRowSpanMap).forEach(function (columnName) { - var prevRowSpan = prevRowSpanMap[columnName]; - var mainRowKey = prevRowSpan.mainRowKey, count = prevRowSpan.count, spanCount = prevRowSpan.spanCount; - if (spanCount > 1 - count) { - var subRowCount = count >= 0 ? -1 : count - 1; - subRowSpanMap[columnName] = createRowSpan(false, mainRowKey, subRowCount, spanCount); - } - }); - return subRowSpanMap; -} -function createRowSpanMap(row, rowSpan, prevRow) { - var rowKey = row.rowKey; - var mainRowSpanMap = {}; - var subRowSpanMap = {}; - if (!common_1.isEmpty(rowSpan)) { - mainRowSpanMap = createMainRowSpanMap(rowSpan, rowKey); - } - if (prevRow) { - var prevRowSpanMap = prevRow.rowSpanMap; - if (!common_1.isEmpty(prevRowSpanMap)) { - subRowSpanMap = createSubRowSpan(prevRowSpanMap); - } - } - return tslib_1.__assign(tslib_1.__assign({}, mainRowSpanMap), subRowSpanMap); -} -function createRawRow(id, row, index, column, options) { - var _a, _b; - if (options === void 0) { options = {}; } - // this rowSpan variable is attribute option before creating rowSpanDataMap - var rowSpan = (_a = row._attributes) === null || _a === void 0 ? void 0 : _a.rowSpan; - var keyColumnName = options.keyColumnName, prevRow = options.prevRow, _c = options.lazyObservable, lazyObservable = _c === void 0 ? false : _c, _d = options.disabled, disabled = _d === void 0 ? false : _d; - if (keyColumnName) { - row.rowKey = row[keyColumnName]; - } - else if (common_1.isUndefined(row.rowKey)) { - row.rowKey = index; - } - row.sortKey = common_1.isNumber(row.sortKey) ? row.sortKey : index; - row.uniqueKey = dataCreationKey + "-" + row.rowKey; - row._attributes = getAttributes(row, index, lazyObservable, disabled); - row._attributes.rowSpan = rowSpan; - row._disabledPriority = row._disabledPriority || {}; - row.rowSpanMap = (_b = row.rowSpanMap) !== null && _b !== void 0 ? _b : createRowSpanMap(row, rowSpan, prevRow); - setRowRelationListItems(row, column.columnMapWithRelation); - if (column.autoResizingColumn.length) { - data_2.setMaxTextMap(column, row); - } - if (lazyObservable) { - validation_1.addUniqueInfoMap(id, row, column); - } - return (lazyObservable ? row : observable_1.observable(row)); -} -exports.createRawRow = createRawRow; -function createData(id, data, column, _a) { - var _b = _a.lazyObservable, lazyObservable = _b === void 0 ? false : _b, prevRows = _a.prevRows, _c = _a.disabled, disabled = _c === void 0 ? false : _c; - generateDataCreationKey(); - var keyColumnName = column.keyColumnName, _d = column.treeColumnName, treeColumnName = _d === void 0 ? '' : _d; - var rawData; - // Notify when using deprecated option "_attribute.rowSpan". - var isUseRowSpanOption = data.some(function (row) { var _a; return (_a = row._attributes) === null || _a === void 0 ? void 0 : _a.rowSpan; }); - if (isUseRowSpanOption) { - // eslint-disable-next-line no-console - console.warn('The option "_attribute.rowSpan" is deprecated. Please use rowSpan option of column.\nFollow example: http://nhn.github.io/tui.grid/latest/tutorial-example29-dynamic-row-span'); - } - if (treeColumnName) { - rawData = tree_1.createTreeRawData({ - id: id, - data: data, - column: column, - keyColumnName: keyColumnName, - lazyObservable: lazyObservable, - disabled: disabled, - }); - } - else { - rawData = data.map(function (row, index, rows) { - return createRawRow(id, row, index, column, { - keyColumnName: keyColumnName, - prevRow: prevRows ? prevRows[index] : rows[index - 1], - lazyObservable: lazyObservable, - disabled: disabled, - }); - }); - } - var viewData = rawData.map(function (row) { - return lazyObservable - ? { rowKey: row.rowKey, sortKey: row.sortKey, uniqueKey: row.uniqueKey } - : createViewRow(id, row, rawData, column); - }); - return { rawData: rawData, viewData: viewData }; -} -exports.createData = createData; -var cachedFilteredIndex = {}; -function applyFilterToRawData(rawData, filters, columnMap) { - var data = rawData; - cachedFilteredIndex = {}; - if (filters) { - data = filters.reduce(function (acc, filter) { - var conditionFn = filter.conditionFn, columnName = filter.columnName; - var formatter = columnMap[columnName].formatter; - return acc.filter(function (row, index) { - var value = row[columnName]; - var relationListItems = row._relationListItemMap[columnName]; - var formatterProps = { row: row, column: columnMap[columnName], value: value }; - var filtered = conditionFn(data_2.getFormattedValue(formatterProps, formatter, value, relationListItems)); - // cache the filtered index for performance - if (acc === rawData && filtered) { - cachedFilteredIndex[row.rowKey] = index; - } - else if (!filtered) { - cachedFilteredIndex[row.rowKey] = null; - } - return filtered; - }); - }, rawData); - } - return data; -} -function createPageOptions(userPageOptions, rawData) { - var pageOptions = (common_1.isEmpty(userPageOptions) - ? {} - : tslib_1.__assign(tslib_1.__assign({ useClient: false, page: 1, perPage: constant_1.DEFAULT_PER_PAGE, type: 'pagination' }, userPageOptions), { totalCount: userPageOptions.useClient ? rawData.length : userPageOptions.totalCount })); - if (pageOptions.type === 'pagination') { - pageOptions.position = pageOptions.position || 'bottom'; - pageOptions.visiblePages = pageOptions.visiblePages || 10; - } - return pageOptions; -} -function create(_a) { - var data = _a.data, column = _a.column, userPageOptions = _a.pageOptions, useClientSort = _a.useClientSort, disabled = _a.disabled, id = _a.id; - var _b = createData(id, data, column, { lazyObservable: true, disabled: disabled }), rawData = _b.rawData, viewData = _b.viewData; - var sortState = { - useClient: useClientSort, - columns: [ - { - columnName: 'sortKey', - ascending: true, - }, - ], - }; - var pageOptions = createPageOptions(userPageOptions, rawData); - return observable_1.observable({ - rawData: rawData, - viewData: viewData, - sortState: sortState, - pageOptions: pageOptions, - checkedAllRows: rawData.length ? !rawData.some(function (row) { return !row._attributes.checked; }) : false, - disabledAllCheckbox: disabled, - filters: null, - loadingState: rawData.length ? 'DONE' : 'EMPTY', - clickedCheckboxRowkey: null, - get filteredRawData() { - var _a; - if (this.filters) { - // should filter the sliced data which is displayed in viewport in case of client infinite scrolling - var targetData = data_1.isScrollPagination(this, true) - ? (_a = this.rawData).slice.apply(_a, this.pageRowRange) : this.rawData; - return applyFilterToRawData(targetData, this.filters, column.allColumnMap); - } - return this.rawData; - }, - get filteredIndex() { - var _a = this, filteredRawData = _a.filteredRawData, filters = _a.filters; - return filters - ? filteredRawData - .filter(function (row) { return !common_1.isNull(cachedFilteredIndex[row.rowKey]); }) - .map(function (row) { return cachedFilteredIndex[row.rowKey]; }) - : null; - }, - get filteredViewData() { - var _this = this; - return this.filters - ? this.filteredIndex.map(function (index) { return _this.viewData[index]; }) - : this.viewData; - }, - get pageRowRange() { - var _a = this.pageOptions, useClient = _a.useClient, type = _a.type, page = _a.page, perPage = _a.perPage; - var start = 0; - // should calculate the range through all rawData in case of client infinite scrolling - var end = data_1.isScrollPagination(this, true) ? this.rawData.length : this.filteredViewData.length; - if (useClient) { - var pageRowLastIndex = page * perPage; - if (type === 'pagination') { - start = (page - 1) * perPage; - } - end = pageRowLastIndex > 0 && pageRowLastIndex < end ? pageRowLastIndex : end; - } - return [start, end]; - }, - }); -} -exports.create = create; - - -/***/ }), -/* 16 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.initSelection = exports.setSelection = exports.changeSelectionRange = void 0; -var tslib_1 = __webpack_require__(1); -var common_1 = __webpack_require__(0); -var eventBus_1 = __webpack_require__(7); -var selection_1 = __webpack_require__(22); -var gridEvent_1 = tslib_1.__importDefault(__webpack_require__(9)); -var rowSpan_1 = __webpack_require__(13); -function changeSelectionRange(selection, inputRange, id) { - if (!selection_1.isSameInputRange(selection.inputRange, inputRange)) { - selection.inputRange = inputRange; - var eventBus = eventBus_1.getEventBus(id); - var gridEvent = new gridEvent_1.default({ range: selection.rangeWithRowHeader }); - /** - * Occurs when selecting cells - * @event Grid#selection - * @property {Object} range - Range of selection - * @property {Array} range.start - Info of start cell (ex: [rowKey, columnName]) - * @property {Array} range.end - Info of end cell (ex: [rowKey, columnName]) - * @property {Grid} instance - Current grid instance - */ - eventBus.trigger('selection', gridEvent); - } -} -exports.changeSelectionRange = changeSelectionRange; -function setSelection(store, range) { - var _a; - var selection = store.selection, data = store.data, column = store.column, id = store.id; - var visibleColumnsWithRowHeader = column.visibleColumnsWithRowHeader, rowHeaderCount = column.rowHeaderCount; - var viewData = data.viewData; - var rowLength = viewData.length; - var columnLength = visibleColumnsWithRowHeader.length; - var startRowIndex = common_1.clamp(range.start[0], 0, rowLength - 1); - var endRowIndex = common_1.clamp(range.end[0], 0, rowLength - 1); - var startColumnIndex = common_1.clamp(range.start[1] + rowHeaderCount, rowHeaderCount, columnLength - 1); - var endColumnIndex = common_1.clamp(range.end[1] + rowHeaderCount, rowHeaderCount, columnLength - 1); - _a = rowSpan_1.getRowRangeWithRowSpan([startRowIndex, endRowIndex], [startColumnIndex, endColumnIndex], column, null, data), startRowIndex = _a[0], endRowIndex = _a[1]; - var inputRange = { - row: [startRowIndex, endRowIndex], - column: [startColumnIndex, endColumnIndex], - }; - changeSelectionRange(selection, inputRange, id); -} -exports.setSelection = setSelection; -function initSelection(store) { - store.selection.inputRange = null; -} -exports.initSelection = initSelection; - - -/***/ }), -/* 17 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.isArrowKey = exports.isNonPrintableKey = exports.keyEventGenerate = exports.getKeyStrokeString = exports.keyStrokeCommandMap = exports.keyboardEventCommandMap = exports.keyboardEventTypeMap = exports.keyNameMap = void 0; -var common_1 = __webpack_require__(0); -exports.keyNameMap = { - 8: 'backspace', - 9: 'tab', - 13: 'enter', - 16: 'shift', - 17: 'ctrl', - 27: 'esc', - 37: 'left', - 38: 'up', - 39: 'right', - 40: 'down', - 65: 'a', - 67: 'c', - 86: 'v', - 32: 'space', - 33: 'pageUp', - 34: 'pageDown', - 36: 'home', - 35: 'end', - 46: 'del', -}; -exports.keyboardEventTypeMap = { - move: 'move', - edit: 'edit', - remove: 'remove', - select: 'select', - clipboard: 'clipboard', -}; -exports.keyboardEventCommandMap = { - up: 'up', - down: 'down', - left: 'left', - right: 'right', - pageUp: 'pageUp', - pageDown: 'pageDown', - firstColumn: 'firstColumn', - lastColumn: 'lastColumn', - currentCell: 'currentCell', - nextCell: 'nextCell', - prevCell: 'prevCell', - firstCell: 'firstCell', - lastCell: 'lastCell', - all: 'all', - copy: 'copy', - paste: 'paste', -}; -/** - * K-V object for matching keystroke and event command - * K: keystroke (order : ctrl -> shift -> keyName) - * V: [key event type, command] - * @type {Object} - * @ignore - */ -exports.keyStrokeCommandMap = { - up: ['move', 'up'], - down: ['move', 'down'], - left: ['move', 'left'], - right: ['move', 'right'], - pageUp: ['move', 'pageUp'], - pageDown: ['move', 'pageDown'], - home: ['move', 'firstColumn'], - end: ['move', 'lastColumn'], - enter: ['edit', 'currentCell'], - space: ['edit', 'currentCell'], - tab: ['edit', 'nextCell'], - backspace: ['remove'], - del: ['remove'], - 'shift-tab': ['edit', 'prevCell'], - 'shift-up': ['select', 'up'], - 'shift-down': ['select', 'down'], - 'shift-left': ['select', 'left'], - 'shift-right': ['select', 'right'], - 'shift-pageUp': ['select', 'pageUp'], - 'shift-pageDown': ['select', 'pageDown'], - 'shift-home': ['select', 'firstColumn'], - 'shift-end': ['select', 'lastColumn'], - 'ctrl-a': ['select', 'all'], - 'ctrl-c': ['clipboard', 'copy'], - 'ctrl-v': ['clipboard', 'paste'], - 'ctrl-home': ['move', 'firstCell'], - 'ctrl-end': ['move', 'lastCell'], - 'ctrl-shift-home': ['select', 'firstCell'], - 'ctrl-shift-end': ['select', 'lastCell'], -}; -/** - * Returns the keyStroke string - * @param {Event} ev - Keyboard event - * @returns {String} - * @ignore - */ -function getKeyStrokeString(ev) { - var keys = []; - var keyCode = ev.keyCode, ctrlKey = ev.ctrlKey, metaKey = ev.metaKey, shiftKey = ev.shiftKey; - if (ctrlKey || metaKey) { - keys.push('ctrl'); - } - if (shiftKey) { - keys.push('shift'); - } - if (keyCode in exports.keyNameMap) { - keys.push(exports.keyNameMap[keyCode]); - } - return keys.join('-'); -} -exports.getKeyStrokeString = getKeyStrokeString; -function keyEventGenerate(ev) { - var keyStroke = getKeyStrokeString(ev); - var commandInfo = exports.keyStrokeCommandMap[keyStroke]; - return commandInfo - ? { - type: commandInfo[0], - command: commandInfo[1], - } - : {}; -} -exports.keyEventGenerate = keyEventGenerate; -function isNonPrintableKey(keyCode) { - var keys = [ - 'shift', - 'ctrl', - 'esc', - 'left', - 'up', - 'right', - 'down', - 'pageUp', - 'pageDown', - 'end', - 'home', - ]; - var key = exports.keyNameMap[keyCode]; - return common_1.includes(keys, key); -} -exports.isNonPrintableKey = isNonPrintableKey; -function isArrowKey(keyName) { - return common_1.includes(['up', 'down', 'left', 'right'], keyName); -} -exports.isArrowKey = isArrowKey; - - -/***/ }), -/* 18 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.setFocusInfo = exports.saveAndFinishEditing = exports.initFocus = exports.changeFocus = exports.finishEditing = exports.startEditing = void 0; -var tslib_1 = __webpack_require__(1); -var gridEvent_1 = tslib_1.__importDefault(__webpack_require__(9)); -var eventBus_1 = __webpack_require__(7); -var data_1 = __webpack_require__(6); -var focus_1 = __webpack_require__(45); -var rowSpan_1 = __webpack_require__(13); -var data_2 = __webpack_require__(14); -var common_1 = __webpack_require__(0); -var column_1 = __webpack_require__(12); -function startEditing(store, rowKey, columnName) { - var data = store.data, focus = store.focus, column = store.column, id = store.id; - var filteredRawData = data.filteredRawData; - var foundIndex = data_1.findIndexByRowKey(data, column, id, rowKey); - if (foundIndex === -1) { - return; - } - // makes the data observable to judge editable, disable of the cell - data_2.makeObservable(store, data_1.findIndexByRowKey(data, column, id, rowKey, false)); - if (!data_1.isEditableCell(store, foundIndex, columnName)) { - return; - } - var eventBus = eventBus_1.getEventBus(id); - var gridEvent = new gridEvent_1.default({ - rowKey: rowKey, - columnName: columnName, - value: filteredRawData[foundIndex][columnName], - }); - /** - * Occurs when editing the cell is started - * @event Grid#editingStart - * @property {number} rowKey - rowKey of the target cell - * @property {number} columnName - columnName of the target cell - * @property {number | string | boolean | null | undefined} value - value of the editing cell - * @property {Grid} instance - Current grid instance - */ - eventBus.trigger('editingStart', gridEvent); - if (!gridEvent.isStopped()) { - focus.forcedDestroyEditing = false; - focus.navigating = false; - focus.editingAddress = { rowKey: rowKey, columnName: columnName }; - } -} -exports.startEditing = startEditing; -// @TODO: Events should be separated(ex.'editingFinish', 'editingCanceled') -function finishEditing(_a, rowKey, columnName, value, editingInfo) { - var focus = _a.focus, id = _a.id; - if (focus_1.isEditingCell(focus, rowKey, columnName)) { - focus.editingAddress = null; - focus.navigating = true; - } - var eventBus = eventBus_1.getEventBus(id); - var gridEvent = new gridEvent_1.default(tslib_1.__assign({ rowKey: rowKey, columnName: columnName, value: value }, editingInfo)); - /** - * Occurs when editing the cell is finished - * @event Grid#editingFinish - * @property {number} rowKey - rowKey of the target cell - * @property {number} columnName - columnName of the target cell - * @property {number | string | boolean | null | undefined} value - value of the editing cell - * @property {Grid} instance - Current grid instance - * @property {boolean} save - Whether to save the value - * @property {boolean} triggeredByKey - Whether to trigger the event by key - */ - eventBus.trigger('editingFinish', gridEvent); -} -exports.finishEditing = finishEditing; -function changeFocus(store, rowKey, columnName, id) { - var data = store.data, focus = store.focus, column = store.column; - if (focus_1.isFocusedCell(focus, rowKey, columnName) || - (columnName && column_1.isHiddenColumn(column, columnName))) { - return; - } - var rawData = data.rawData, sortState = data.sortState; - var eventBus = eventBus_1.getEventBus(id); - var gridEvent = new gridEvent_1.default({ - rowKey: rowKey, - columnName: columnName, - prevColumnName: focus.columnName, - prevRowKey: focus.rowKey, - }); - /** - * Occurs when focused cell is about to change - * @event Grid#focusChange - * @property {number} rowKey - rowKey of the target cell - * @property {number} columnName - columnName of the target cell - * @property {number} prevRowKey - rowKey of the currently focused cell - * @property {number} prevColumnName - columnName of the currently focused cell - * @property {Grid} instance - Current grid instance - */ - eventBus.trigger('focusChange', gridEvent); - if (!gridEvent.isStopped()) { - var focusRowKey = rowKey; - if (rowKey && columnName && rowSpan_1.isRowSpanEnabled(sortState, column)) { - var rowSpan = rowSpan_1.getRowSpanByRowKey(rowKey, columnName, rawData); - if (rowSpan) { - focusRowKey = rowSpan.mainRowKey; - } - } - focus.prevColumnName = focus.columnName; - focus.prevRowKey = focus.rowKey; - focus.columnName = columnName; - focus.rowKey = focusRowKey; - } -} -exports.changeFocus = changeFocus; -function initFocus(_a) { - var focus = _a.focus; - focus.editingAddress = null; - focus.navigating = false; - focus.rowKey = null; - focus.columnName = null; - focus.prevRowKey = null; - focus.prevColumnName = null; -} -exports.initFocus = initFocus; -function saveAndFinishEditing(store, value) { - // @TODO: remove 'value' paramter - // saveAndFinishEditing(store: Store) - var focus = store.focus, data = store.data, column = store.column, id = store.id; - var editingAddress = focus.editingAddress; - if (!editingAddress) { - return; - } - var rowKey = editingAddress.rowKey, columnName = editingAddress.columnName; - // makes the data observable to judge editable, disable of the cell. - data_2.makeObservable(store, data_1.findIndexByRowKey(data, column, id, rowKey, false)); - // if value is 'undefined', editing result is saved and finished. - if (common_1.isUndefined(value)) { - focus.forcedDestroyEditing = true; - focus.editingAddress = null; - focus.navigating = true; - return; - } - data_2.setValue(store, rowKey, columnName, value); - finishEditing(store, rowKey, columnName, value, { save: true }); -} -exports.saveAndFinishEditing = saveAndFinishEditing; -function setFocusInfo(store, rowKey, columnName, navigating) { - var focus = store.focus, id = store.id; - focus.navigating = navigating; - changeFocus(store, rowKey, columnName, id); -} -exports.setFocusInfo = setFocusInfo; - - -/***/ }), -/* 19 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -var tslib_1 = __webpack_require__(1); -var messages = { - en: { - display: { - noData: 'No data.', - loadingData: 'Loading data.', - resizeHandleGuide: 'You can change the width of the column by mouse drag, and initialize the width by double-clicking.', - }, - net: { - confirmCreate: 'Are you sure you want to create {{count}} data?', - confirmUpdate: 'Are you sure you want to update {{count}} data?', - confirmDelete: 'Are you sure you want to delete {{count}} data?', - confirmModify: 'Are you sure you want to modify {{count}} data?', - noDataToCreate: 'No data to create.', - noDataToUpdate: 'No data to update.', - noDataToDelete: 'No data to delete.', - noDataToModify: 'No data to modify.', - failResponse: 'An error occurred while requesting data.\nPlease try again.', - }, - filter: { - contains: 'Contains', - eq: 'Equals', - ne: 'Not equals', - start: 'Starts with', - end: 'Ends with', - after: 'After', - afterEq: 'After or Equal', - before: 'Before', - beforeEq: 'Before or Equal', - apply: 'Apply', - clear: 'Clear', - selectAll: 'Select All', - emptyValue: 'Empty Value', - }, - contextMenu: { - copy: 'Copy', - copyColumns: 'Copy Columns', - copyRows: 'Copy Rows', - export: 'Export', - csvExport: 'CSV Export', - excelExport: 'Excel Export', - }, - }, - pt: { - display: { - noData: 'Nenhuma informação.', - loadingData: 'Carregando informações.', - resizeHandleGuide: 'Você pode alterar a largura da coluna arrastando o mouse e inicializar a largura clicando duas vezes.', - }, - net: { - confirmCreate: 'Tem certeza que deseja criar {{count}} dados?', - confirmUpdate: 'Tem ceretza que deseja atualizar {{count}} dados?', - confirmDelete: 'Tem certeza que deseja apagar {{count}} dados?', - confirmModify: 'Tem certeza que deseja modificar {{count}} dados?', - noDataToCreate: 'Não há informação a criar.', - noDataToUpdate: 'Não há informação a atualizar.', - noDataToDelete: 'Não há informação a apagar.', - noDataToModify: 'Não há informação a modificar.', - failResponse: 'Um erro ocorreu euquanto processava sua solicitação.\nPor favor, tente novamente.', - }, - filter: { - contains: 'Contém', - eq: 'Igual', - ne: 'Diferente de', - start: 'Começa com', - end: 'Termina com', - after: 'Depois', - afterEq: 'Depois ou igual', - before: 'Antes', - beforeEq: 'Antes ou igual', - apply: 'Aplicar', - clear: 'Limpar', - selectAll: 'Selecionar tudo', - emptyValue: 'Está vazio', - }, - contextMenu: { - copy: 'Copiar', - copyColumns: 'Copiar colunas', - copyRows: 'Copiar linhas', - export: 'Exportar', - csvExport: 'Exportar CSV', - excelExport: 'Exportar Excel', - }, - }, - es: { - display: { - noData: 'No hay información.', - loadingData: 'Cargando información.', - resizeHandleGuide: 'Puedes cambiar el ancho de la columna arrastrando el ratón e inicializar el ancho haciendo doble clic.', - }, - net: { - confirmCreate: '¿Estás seguro que quieres crear {{count}} filas?', - confirmUpdate: '¿Estás seguro que quieres actualizar {{count}} filas?', - confirmDelete: '¿Estás seguro que quieres eliminar {{count}} filas?', - confirmModify: '¿Estás seguro que quieres modificar {{count}} filas?', - noDataToCreate: 'No hay información para crear.', - noDataToUpdate: 'No hay información para actualizar.', - noDataToDelete: 'No hay información para eliminar.', - noDataToModify: 'No hay información para modificar.', - failResponse: 'Se produjo un error al solicitar datos. \nVuelve a intentarlo.', - }, - filter: { - contains: 'Contiene', - eq: 'Igual', - ne: 'Distinto', - start: 'Empieza con', - end: 'Termina en', - after: 'Después', - afterEq: 'Después o Igual', - before: 'Antes', - beforeEq: 'Antes o Igual', - apply: 'Aplicar', - clear: 'Limpiar', - selectAll: 'Seleccionar Todo', - emptyValue: 'Vaciar Valor', - }, - contextMenu: { - copy: 'Copiar', - copyColumns: 'Copiar Columnas', - copyRows: 'Copiar Filas', - export: 'exportar', - csvExport: 'CSV exportar', - excelExport: 'Excel exportar', - }, - }, - ko: { - display: { - noData: '데이터가 존재하지 않습니다.', - loadingData: '데이터를 불러오는 중입니다.', - resizeHandleGuide: '마우스 드래그하여 컬럼 너비를 조정할 수 있고, 더블 클릭으로 컬럼 너비를 초기화할 수 있습니다.', - }, - net: { - confirmCreate: '{{count}}건의 데이터를 생성하겠습니까?', - confirmUpdate: '{{count}}건의 데이터를 수정하겠습니까?', - confirmDelete: '{{count}}건의 데이터를 삭제하겠습니까?', - confirmModify: '{{count}}건의 데이터를 처리하겠습니까?', - noDataToCreate: '생성할 데이터가 없습니다.', - noDataToUpdate: '수정할 데이터가 없습니다.', - noDataToDelete: '삭제할 데이터가 없습니다.', - noDataToModify: '처리할 데이터가 없습니다.', - failResponse: '데이터 요청 중에 에러가 발생하였습니다.\n다시 시도하여 주시기 바랍니다.', - }, - filter: { - contains: 'Contains', - eq: 'Equals', - ne: 'Not equals', - start: 'Starts with', - end: 'Ends with', - after: 'After', - afterEq: 'After or Equal', - before: 'Before', - beforeEq: 'Before or Equal', - apply: 'Apply', - clear: 'Clear', - selectAll: 'Select All', - emptyValue: 'Empty Value', - }, - contextMenu: { - copy: '복사', - copyColumns: '열 복사', - copyRows: '행 복사', - export: '내보내기', - csvExport: 'CSV로 내보내기', - excelExport: '엑셀로 내보내기', - }, - }, - nl: { - display: { - noData: 'Geen data.', - loadingData: 'Data aan het laden.', - resizeHandleGuide: 'Je kunt de kolombreedte verschuiven met de muis, of terugbrengen naar standaard door dubbel te klikken', - }, - net: { - confirmCreate: 'Weet je zeker dat je {{count}} nieuwe wilt maken?', - confirmUpdate: 'Weet je zeker dat je {{count}} stuk(s) wilt bijwerken?', - confirmDelete: 'Weet je zeker dat je {{count}} stuk(s) wilt verwijderen?', - confirmModify: 'Weet je zeker dat je {{count}} stuk(s) wilt aanpassen?', - noDataToCreate: 'Niets om aan te maken.', - noDataToUpdate: 'Niets om bij te werken.', - noDataToDelete: 'Niets om te verwijderen.', - noDataToModify: 'Niets om aan te passen.', - failResponse: 'Er ging iets mis tijdens het ophalen van de data.\nProbeer het nog eens.', - }, - filter: { - contains: 'Bevat', - eq: 'Is', - ne: 'Is niet', - start: 'Begint met', - end: 'Eindigt met', - after: 'Na', - afterEq: 'Na of gelijk aan', - before: 'Voor', - beforeEq: 'Voor of gelijk aan', - apply: 'Toepassen', - clear: 'Leeg maken', - selectAll: 'Selecteer alle', - emptyValue: 'Lege waarde', - }, - contextMenu: { - copy: 'Kopieer', - copyColumns: 'Kopieer kolommen', - copyRows: 'Kopieer rijen', - export: 'Exporteer', - csvExport: 'Maak CSV Export', - excelExport: 'Maak Excel Export', - }, - }, - it: { - display: { - noData: 'Nessun dato.', - loadingData: 'Caricamento dati.', - resizeHandleGuide: 'È possibile modificare la larghezza della colonna trascinando il mouse e inizializzare la larghezza facendo doppio clic.', - }, - net: { - confirmCreate: 'Sei sicuro di voler creare {{count}} dati?', - confirmUpdate: 'Sei sicuro di voler aggiornare {{count}} dati?', - confirmDelete: 'Sei sicuro di voler eliminare {{count}} dati?', - confirmModify: 'Sei sicuro di voler modificare {{count}} dati?', - noDataToCreate: 'Nessun dato da creare.', - noDataToUpdate: 'Nessun dato da aggiornare.', - noDataToDelete: 'Nessun dato da eliminare.', - noDataToModify: 'Nessun dato da modificare.', - failResponse: 'Si è verificato un errore durante la richiesta dei dati.\nPer favore riprova.', - }, - filter: { - contains: 'Contiene', - eq: 'Uguale', - ne: 'Non è uguale', - start: 'Inizia con', - end: 'Finisce con', - after: 'Dopo', - afterEq: 'Dopo o Uguale', - before: 'Prima', - beforeEq: 'Prima o Uguale', - apply: 'Applicare', - clear: 'Chiari', - selectAll: 'Seleziona tutto', - emptyValue: 'Valore vuoto', - }, - contextMenu: { - copy: 'Copia', - copyColumns: 'Copia colonne', - copyRows: 'Copia righe', - export: 'Esportare', - csvExport: 'Esportazione CSV', - excelExport: 'Esportazione Excel', - }, - }, -}; -var messageMap = {}; -/** - * Flatten message map - * @param {object} data - Messages - * @returns {object} Flatten message object (key format is 'key.subKey') - * @ignore - */ -function flattenMessageMap(data) { - if (data === void 0) { data = {}; } - var obj = {}; - var newKey; - Object.keys(data).forEach(function (key) { - var keyWithType = key; - var groupMessages = data[keyWithType]; - Object.keys(groupMessages).forEach(function (subKey) { - newKey = key + "." + subKey; - obj[newKey] = groupMessages[subKey]; - }); - }); - return obj; -} -/** - * Replace text - * @param {string} text - Text including handlebar expression - * @param {Object} values - Replaced values - * @returns {string} Replaced text - */ -function replaceText(text, values) { - return text - ? text.replace(/\{\{(\w*)\}\}/g, function (_, prop) { return (values.hasOwnProperty(prop) ? values[prop] : ''); }) - : ''; -} -exports.default = { - /** - * Set messages - * @param {string} localeCode - Code to set locale messages and - * this is the language or language-region combination. (ex: en-US) - * @param {object} [data] - Messages using in Grid - */ - setLanguage: function (localeCode, data) { - var localeMessages = messages[localeCode]; - if (!localeMessages && !data) { - throw new Error('You should set messages to map the locale code.'); - } - var newData = flattenMessageMap(data); - if (localeMessages) { - var originData = flattenMessageMap(localeMessages); - messageMap = tslib_1.__assign(tslib_1.__assign({}, originData), newData); - } - else { - messageMap = newData; - } - }, - /** - * Get message - * @param {string} key - Key to find message (ex: 'net.confirmCreate') - * @param {object} [replacements] - Values to replace string - * @returns {string} Message - */ - get: function (key, replacements) { - if (replacements === void 0) { replacements = {}; } - var message = messageMap[key]; - return replaceText(message, replacements); - }, -}; - - -/***/ }), -/* 20 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.getTreeIndentWidth = exports.createTreeCellInfo = exports.createTreeRawData = exports.flattenTreeData = exports.createTreeRawRow = exports.clearTreeRowKeyMap = void 0; -var tslib_1 = __webpack_require__(1); -var data_1 = __webpack_require__(15); -var tree_1 = __webpack_require__(21); -var observable_1 = __webpack_require__(5); -var common_1 = __webpack_require__(0); -var constant_1 = __webpack_require__(10); -var treeRowKeyMap = {}; -function clearTreeRowKeyMap(id) { - delete treeRowKeyMap[id]; -} -exports.clearTreeRowKeyMap = clearTreeRowKeyMap; -function generateTreeRowKey(id) { - var _a; - treeRowKeyMap[id] = (_a = treeRowKeyMap[id]) !== null && _a !== void 0 ? _a : -1; - treeRowKeyMap[id] += 1; - return treeRowKeyMap[id]; -} -function addChildRowKey(row, childRow) { - var tree = row._attributes.tree; - var rowKey = childRow.rowKey; - if (tree && !common_1.includes(tree.childRowKeys, rowKey)) { - tree.childRowKeys.push(rowKey); - } - if (!common_1.someProp('rowKey', rowKey, row._children)) { - row._children.push(childRow); - } - row._leaf = false; -} -function insertChildRowKey(row, childRow, offset) { - var tree = row._attributes.tree; - var rowKey = childRow.rowKey; - if (tree && !common_1.includes(tree.childRowKeys, rowKey)) { - tree.childRowKeys.splice(offset, 0, rowKey); - } - if (!common_1.someProp('rowKey', rowKey, row._children)) { - row._children.splice(offset, 0, childRow); - } - row._leaf = false; -} -function getTreeCellInfo(rawData, row, treeIndentWidth, useIcon) { - var depth = tree_1.getDepth(rawData, row); - var indentWidth = getTreeIndentWidth(depth, treeIndentWidth, useIcon); - return { - depth: depth, - indentWidth: indentWidth, - leaf: tree_1.isLeaf(row), - expanded: tree_1.isExpanded(row), - }; -} -function createTreeRawRow(id, row, parentRow, column, options) { - if (options === void 0) { options = {}; } - var childRowKeys = []; - if (row._attributes && row._attributes.tree) { - childRowKeys = row._attributes.tree.childRowKeys; - } - var keyColumnName = options.keyColumnName, offset = options.offset, _a = options.lazyObservable, lazyObservable = _a === void 0 ? false : _a, _b = options.disabled, disabled = _b === void 0 ? false : _b; - if (!row._children) { - row._children = []; - row._leaf = true; - } - // generate new tree rowKey when row doesn't have rowKey - var targetTreeRowKey = common_1.isUndefined(row.rowKey) ? generateTreeRowKey(id) : Number(row.rowKey); - var rawRow = data_1.createRawRow(id, row, targetTreeRowKey, column, { - keyColumnName: keyColumnName, - lazyObservable: lazyObservable, - disabled: disabled, - }); - var defaultAttributes = { - parentRowKey: parentRow ? parentRow.rowKey : null, - childRowKeys: childRowKeys, - hidden: parentRow ? !tree_1.isExpanded(parentRow) || tree_1.isHidden(parentRow) : false, - }; - if (parentRow) { - if (!common_1.isUndefined(offset)) { - insertChildRowKey(parentRow, rawRow, offset); - } - else { - addChildRowKey(parentRow, rawRow); - } - } - var tree = tslib_1.__assign(tslib_1.__assign({}, defaultAttributes), { expanded: row._attributes.expanded }); - rawRow._attributes.tree = lazyObservable ? tree : observable_1.observable(tree); - return rawRow; -} -exports.createTreeRawRow = createTreeRawRow; -function flattenTreeData(id, data, parentRow, column, options) { - var flattenedRows = []; - data.forEach(function (row) { - var rawRow = createTreeRawRow(id, row, parentRow, column, options); - flattenedRows.push(rawRow); - if (Array.isArray(row._children)) { - if (row._children.length) { - flattenedRows.push.apply(flattenedRows, flattenTreeData(id, row._children, rawRow, column, options)); - } - } - }); - return flattenedRows; -} -exports.flattenTreeData = flattenTreeData; -function createTreeRawData(_a) { - var id = _a.id, data = _a.data, column = _a.column, keyColumnName = _a.keyColumnName, _b = _a.lazyObservable, lazyObservable = _b === void 0 ? false : _b, _c = _a.disabled, disabled = _c === void 0 ? false : _c; - // only reset the rowKey on lazy observable data - if (lazyObservable) { - treeRowKeyMap[id] = -1; - } - return flattenTreeData(id, data, null, column, { - keyColumnName: keyColumnName, - lazyObservable: lazyObservable, - disabled: disabled, - }); -} -exports.createTreeRawData = createTreeRawData; -function createTreeCellInfo(rawData, row, treeIndentWidth, useIcon, lazyObservable) { - if (lazyObservable === void 0) { lazyObservable = false; } - var treeCellInfo = getTreeCellInfo(rawData, row, treeIndentWidth, useIcon); - var treeInfo = lazyObservable ? treeCellInfo : observable_1.observable(treeCellInfo); - if (!lazyObservable) { - observable_1.observe(function () { - treeInfo.expanded = tree_1.isExpanded(row); - treeInfo.leaf = tree_1.isLeaf(row); - }); - } - return treeInfo; -} -exports.createTreeCellInfo = createTreeCellInfo; -function getTreeIndentWidth(depth, treeIndentWidth, showIcon) { - var indentWidth = treeIndentWidth !== null && treeIndentWidth !== void 0 ? treeIndentWidth : constant_1.TREE_INDENT_WIDTH; - return constant_1.TREE_INDENT_WIDTH + (depth - 1) * indentWidth + (showIcon ? constant_1.TREE_INDENT_WIDTH : 0); -} -exports.getTreeIndentWidth = getTreeIndentWidth; - - -/***/ }), -/* 21 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.getRootParentRow = exports.traverseDescendantRows = exports.traverseAncestorRows = exports.getDepth = exports.isRootChildRow = exports.isExpanded = exports.isLeaf = exports.isHidden = exports.isTreeColumnName = exports.getChildRowKeys = exports.getParentRowKey = exports.getStartIndexToAppendRow = exports.getDescendantRows = exports.getAncestorRows = exports.getChildRows = exports.getParentRow = void 0; -var observable_1 = __webpack_require__(5); -var data_1 = __webpack_require__(6); -var common_1 = __webpack_require__(0); -function getParentRow(store, rowKey, plainObj) { - var data = store.data, column = store.column, id = store.id; - var row = data_1.findRowByRowKey(data, column, id, rowKey); - if (row) { - var parentRowKey = getParentRowKey(row); - var parentRow = data_1.findRowByRowKey(data, column, id, parentRowKey); - if (parentRow) { - return plainObj ? observable_1.getOriginObject(parentRow) : parentRow; - } - } - return null; -} -exports.getParentRow = getParentRow; -function getChildRows(store, rowKey, plainObj) { - var data = store.data, column = store.column, id = store.id; - var row = data_1.findRowByRowKey(data, column, id, rowKey); - if (row) { - var childRowKeys = getChildRowKeys(row); - return childRowKeys.map(function (childRowKey) { - var childRow = data_1.findRowByRowKey(data, column, id, childRowKey); - return plainObj ? observable_1.getOriginObject(childRow) : childRow; - }); - } - return []; -} -exports.getChildRows = getChildRows; -function getAncestorRows(store, rowKey) { - var data = store.data, column = store.column, id = store.id; - var rawData = data.rawData; - var row = data_1.findRowByRowKey(data, column, id, rowKey); - var ancestorRows = []; - if (row) { - traverseAncestorRows(rawData, row, function (parentRow) { - ancestorRows.unshift(observable_1.getOriginObject(parentRow)); - }); - } - return ancestorRows; -} -exports.getAncestorRows = getAncestorRows; -function getDescendantRows(store, rowKey) { - var data = store.data, column = store.column, id = store.id; - var rawData = data.rawData; - var row = data_1.findRowByRowKey(data, column, id, rowKey); - var childRows = []; - if (row) { - traverseDescendantRows(rawData, row, function (childRow) { - childRows.push(observable_1.getOriginObject(childRow)); - }); - } - return childRows; -} -exports.getDescendantRows = getDescendantRows; -function getStartIndexToAppendRow(store, parentRow, offset) { - var data = store.data, column = store.column, id = store.id; - var rawData = data.rawData; - var startIdx; - if (parentRow) { - if (offset) { - var childRowKeys = getChildRowKeys(parentRow); - var prevChildRowKey = childRowKeys[offset - 1]; - var prevChildRowIdx = data_1.findIndexByRowKey(data, column, id, prevChildRowKey); - var descendantRowsCount = getDescendantRows(store, prevChildRowKey).length; - startIdx = prevChildRowIdx + descendantRowsCount + 1; - } - else { - startIdx = data_1.findIndexByRowKey(data, column, id, parentRow.rowKey) + 1; - if (common_1.isUndefined(offset)) { - startIdx += getDescendantRows(store, parentRow.rowKey).length; - } - } - } - else { - startIdx = common_1.isUndefined(offset) ? rawData.length : offset; - } - return startIdx; -} -exports.getStartIndexToAppendRow = getStartIndexToAppendRow; -function getParentRowKey(row) { - var tree = row._attributes.tree; - return tree && tree.parentRowKey !== row.rowKey ? tree.parentRowKey : null; -} -exports.getParentRowKey = getParentRowKey; -function getChildRowKeys(row) { - var tree = row._attributes.tree; - return tree ? tree.childRowKeys.slice() : []; -} -exports.getChildRowKeys = getChildRowKeys; -function isTreeColumnName(column, columnName) { - return column.treeColumnName === columnName; -} -exports.isTreeColumnName = isTreeColumnName; -function isHidden(_a) { - var _attributes = _a._attributes; - var tree = _attributes.tree; - return !!(tree && tree.hidden); -} -exports.isHidden = isHidden; -function isLeaf(_a) { - var _attributes = _a._attributes, _leaf = _a._leaf; - var tree = _attributes.tree; - return !!tree && !tree.childRowKeys.length && !!_leaf; -} -exports.isLeaf = isLeaf; -function isExpanded(row) { - var tree = row._attributes.tree; - return !!(tree && tree.expanded); -} -exports.isExpanded = isExpanded; -function isRootChildRow(row) { - var tree = row._attributes.tree; - return !!tree && common_1.isNull(tree.parentRowKey); -} -exports.isRootChildRow = isRootChildRow; -function getDepth(rawData, row) { - var parentRow = row; - var depth = 0; - do { - depth += 1; - parentRow = common_1.findProp('rowKey', getParentRowKey(parentRow), rawData); - } while (parentRow); - return depth; -} -exports.getDepth = getDepth; -function traverseAncestorRows(rawData, row, iteratee) { - var parentRowKey = getParentRowKey(row); - var parentRow; - while (!common_1.isNull(parentRowKey)) { - parentRow = common_1.findProp('rowKey', parentRowKey, rawData); - iteratee(parentRow); - parentRowKey = parentRow ? getParentRowKey(parentRow) : null; - } -} -exports.traverseAncestorRows = traverseAncestorRows; -function traverseDescendantRows(rawData, row, iteratee) { - var childRowKeys = getChildRowKeys(row); - var rowKey, childRow; - while (childRowKeys.length) { - rowKey = childRowKeys.shift(); - childRow = common_1.findProp('rowKey', rowKey, rawData); - iteratee(childRow); - if (childRow) { - childRowKeys = childRowKeys.concat(getChildRowKeys(childRow)); - } - } -} -exports.traverseDescendantRows = traverseDescendantRows; -function getRootParentRow(rawData, row) { - var rootParentRow = row; - do { - var parentRow = common_1.findProp('rowKey', getParentRowKey(rootParentRow), rawData); - if (!parentRow) { - break; - } - rootParentRow = parentRow; - } while (rootParentRow); - return rootParentRow; -} -exports.getRootParentRow = getRootParentRow; - - -/***/ }), -/* 22 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.getSelectionRange = exports.isSameInputRange = exports.getSortedRange = exports.getChildColumnRange = exports.getLeafChildColumnNames = void 0; -var tslib_1 = __webpack_require__(1); -var common_1 = __webpack_require__(0); -var column_1 = __webpack_require__(12); -function sortByVisibleColumns(visibleColumnsWithRowHeader, childNames) { - var result = []; - visibleColumnsWithRowHeader.forEach(function (column) { - if (common_1.includes(childNames, column.name)) { - result.push(column.name); - } - }); - return result; -} -function getLeafChildColumnNames(complexColumnHeaders, name) { - var column = common_1.findProp('name', name, complexColumnHeaders); - if (!column) { - return [name]; - } - var result = []; - column.childNames.forEach(function (childName) { - if (column_1.isParentColumnHeader(complexColumnHeaders, childName)) { - result = tslib_1.__spreadArrays(result, getLeafChildColumnNames(complexColumnHeaders, childName)); - } - else { - result = tslib_1.__spreadArrays(result, [childName]); - } - }); - return result; -} -exports.getLeafChildColumnNames = getLeafChildColumnNames; -function getChildColumnRange(visibleColumnsWithRowHeader, complexColumnHeaders, name) { - var unsortedChildNames = getLeafChildColumnNames(complexColumnHeaders, name); - var childNames = sortByVisibleColumns(visibleColumnsWithRowHeader, unsortedChildNames); - var startIndex = common_1.findPropIndex('name', childNames[0], visibleColumnsWithRowHeader); - var endIndex = common_1.findPropIndex('name', childNames[childNames.length - 1], visibleColumnsWithRowHeader); - return [startIndex, endIndex]; -} -exports.getChildColumnRange = getChildColumnRange; -function getSortedRange(range) { - return range[0] > range[1] ? [range[1], range[0]] : range; -} -exports.getSortedRange = getSortedRange; -function isSameInputRange(inp1, inp2) { - if (common_1.isNull(inp1) || common_1.isNull(inp2)) { - return inp1 === inp2; - } - return (inp1.column[0] === inp2.column[0] && - inp1.column[1] === inp2.column[1] && - inp1.row[0] === inp2.row[0] && - inp1.row[1] === inp2.row[1]); -} -exports.isSameInputRange = isSameInputRange; -function getSelectionRange(range, pageOptions) { - if (!common_1.isEmpty(pageOptions)) { - var row = range.row, column = range.column; - var perPage = pageOptions.perPage, page = pageOptions.page; - var prevPageRowCount = (page - 1) * perPage; - return { - row: [row[0] - prevPageRowCount, row[1] - prevPageRowCount], - column: column, - }; - } - return range; -} -exports.getSelectionRange = getSelectionRange; - - -/***/ }), -/* 23 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.getFormattedValue = exports.createFormattedValue = exports.getMaxTextMap = exports.setMaxColumnTextMap = exports.setMaxTextMap = exports.initMaxTextMap = void 0; -var listItemText_1 = __webpack_require__(67); -var common_1 = __webpack_require__(0); -var maxTextMap = {}; -function initMaxTextMap() { - maxTextMap = {}; -} -exports.initMaxTextMap = initMaxTextMap; -function setMaxTextMap(column, row) { - column.autoResizingColumn.forEach(function (columnInfo) { - var name = columnInfo.name; - var formattedValue = createFormattedValue(row, columnInfo); - if (!maxTextMap[name] || maxTextMap[name].formattedValue.length < formattedValue.length) { - setMaxColumnTextMap(name, formattedValue, row); - } - }); -} -exports.setMaxTextMap = setMaxTextMap; -function setMaxColumnTextMap(columnName, formattedValue, row) { - maxTextMap[columnName] = { formattedValue: formattedValue, row: row }; -} -exports.setMaxColumnTextMap = setMaxColumnTextMap; -function getMaxTextMap() { - return maxTextMap; -} -exports.getMaxTextMap = getMaxTextMap; -function createFormattedValue(row, columnInfo) { - var name = columnInfo.name, formatter = columnInfo.formatter, defaultValue = columnInfo.defaultValue; - var formatterProps = { row: row, column: columnInfo, value: row[name] }; - return getFormattedValue(formatterProps, formatter, row[name] || defaultValue, row._relationListItemMap[name]); -} -exports.createFormattedValue = createFormattedValue; -function getFormattedValue(props, formatter, defaultValue, relationListItems) { - var value; - if (formatter === 'listItemText') { - value = listItemText_1.listItemText(props, relationListItems); - } - else if (common_1.isFunction(formatter)) { - value = formatter(props); - } - else if (common_1.isString(formatter)) { - value = formatter; - } - else { - value = defaultValue; - } - var strValue = getCellDisplayValue(value); - if (strValue && props.column.escapeHTML) { - return common_1.encodeHTMLEntity(strValue); - } - return strValue; -} -exports.getFormattedValue = getFormattedValue; -function getCellDisplayValue(value) { - if (common_1.isNil(value)) { - return ''; - } - return String(value); -} - - -/***/ }), -/* 24 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.resetRowSpan = exports.updateMainRowSpan = exports.updateRowSpan = exports.updateRowSpanWhenRemoving = exports.updateRowSpanWhenAppending = void 0; -var data_1 = __webpack_require__(15); -var common_1 = __webpack_require__(0); -var observable_1 = __webpack_require__(5); -var rowSpan_1 = __webpack_require__(13); -var constant_1 = __webpack_require__(10); -function updateRowSpanWhenAppending(data, prevRow, extendPrevRowSpan) { - var prevRowSpanMap = prevRow.rowSpanMap; - if (common_1.isEmpty(prevRowSpanMap)) { - return; - } - Object.keys(prevRowSpanMap).forEach(function (columnName) { - var prevRowSpan = prevRowSpanMap[columnName]; - if (prevRowSpan) { - var count = prevRowSpan.count, keyRow = prevRowSpan.mainRow, mainRowKey = prevRowSpan.mainRowKey; - var mainRow = keyRow ? prevRow : common_1.findProp('rowKey', mainRowKey, data); - var mainRowSpan = mainRow.rowSpanMap[columnName]; - var startOffset = keyRow || extendPrevRowSpan ? 1 : -count + 1; - // keep rowSpan state when appends row in the middle of rowSpan - if (mainRowSpan.spanCount > startOffset) { - mainRowSpan.count += 1; - mainRowSpan.spanCount += 1; - updateSubRowSpan(data, mainRow, columnName, 1, mainRowSpan.spanCount); - } - } - }); -} -exports.updateRowSpanWhenAppending = updateRowSpanWhenAppending; -function updateRowSpanWhenRemoving(data, removedRow, nextRow, keepRowSpanData) { - var removedRowSpanMap = removedRow.rowSpanMap; - if (common_1.isEmpty(removedRowSpanMap)) { - return; - } - Object.keys(removedRowSpanMap).forEach(function (columnName) { - var removedRowSpan = removedRowSpanMap[columnName]; - var count = removedRowSpan.count, keyRow = removedRowSpan.mainRow, mainRowKey = removedRowSpan.mainRowKey; - var mainRow, spanCount; - if (keyRow) { - mainRow = nextRow; - spanCount = count - 1; - if (spanCount > 1) { - var mainRowSpan = mainRow.rowSpanMap[columnName]; - mainRowSpan.mainRowKey = mainRow.rowKey; - mainRowSpan.mainRow = true; - } - if (keepRowSpanData) { - mainRow[columnName] = removedRow[columnName]; - } - } - else { - mainRow = common_1.findProp('rowKey', mainRowKey, data); - spanCount = mainRow.rowSpanMap[columnName].spanCount - 1; - } - if (spanCount > 1) { - var mainRowSpan = mainRow.rowSpanMap[columnName]; - mainRowSpan.count = spanCount; - mainRowSpan.spanCount = spanCount; - updateSubRowSpan(data, mainRow, columnName, 1, spanCount); - } - else { - delete mainRow.rowSpanMap[columnName]; - } - }); -} -exports.updateRowSpanWhenRemoving = updateRowSpanWhenRemoving; -function updateRowSpan(store) { - var data = store.data, column = store.column; - var filteredRawData = data.filteredRawData, pageOptions = data.pageOptions; - var perPageOption = pageOptions.perPage; - var rowSpans = {}; - var perPage = !common_1.isEmpty(pageOptions) && !perPageOption ? constant_1.DEFAULT_PER_PAGE : perPageOption; - if (column.visibleRowSpanEnabledColumns.length > 0) { - resetRowSpan(store, true); - column.visibleRowSpanEnabledColumns.forEach(function (_a) { - var name = _a.name; - var rowSpanOfColumn = rowSpan_1.getRowSpanOfColumn(filteredRawData, name, perPage); - Object.keys(rowSpanOfColumn).forEach(function (rowKey) { - if (rowSpans[rowKey]) { - rowSpans[rowKey][name] = rowSpanOfColumn[rowKey][name]; - } - else { - rowSpans[rowKey] = rowSpanOfColumn[rowKey]; - } - }); - }); - Object.keys(rowSpans).forEach(function (rowKey) { - var row = common_1.find(function (_a) { - var key = _a.rowKey; - return "" + key === rowKey; - }, filteredRawData); - updateMainRowSpan(filteredRawData, row, rowSpans[rowKey]); - }); - observable_1.notify(data, 'rawData', 'filteredRawData', 'viewData', 'filteredViewData'); - } -} -exports.updateRowSpan = updateRowSpan; -function updateMainRowSpan(data, mainRow, rowSpan) { - if (rowSpan) { - var rowKey_1 = mainRow.rowKey, rowSpanMap_1 = mainRow.rowSpanMap; - Object.keys(rowSpan).forEach(function (columnName) { - var spanCount = rowSpan[columnName]; - rowSpanMap_1[columnName] = data_1.createRowSpan(true, rowKey_1, spanCount, spanCount); - updateSubRowSpan(data, mainRow, columnName, 1, spanCount); - }); - } -} -exports.updateMainRowSpan = updateMainRowSpan; -function updateSubRowSpan(data, mainRow, columnName, startOffset, spanCount) { - var mainRowIndex = common_1.findPropIndex('rowKey', mainRow.rowKey, data); - for (var offset = startOffset; offset < spanCount; offset += 1) { - var row = data[mainRowIndex + offset]; - row.rowSpanMap[columnName] = data_1.createRowSpan(false, mainRow.rowKey, -offset, spanCount); - } -} -function resetRowSpan(_a, slient) { - var data = _a.data, column = _a.column; - if (slient === void 0) { slient = false; } - if (column.visibleRowSpanEnabledColumns.length <= 0) { - return; - } - data.rawData.forEach(function (_a) { - var rowSpanMap = _a.rowSpanMap; - Object.keys(rowSpanMap).forEach(function (columnName) { - delete rowSpanMap[columnName]; - }); - }); - if (!slient) { - observable_1.notify(data, 'rawData', 'filteredRawData', 'viewData', 'filteredViewData'); - } -} -exports.resetRowSpan = resetRowSpan; - - -/***/ }), -/* 25 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.initScrollPosition = exports.setScrollTop = exports.setScrollLeft = exports.setScrollToSelection = exports.setScrollToFocus = void 0; -var viewport_1 = __webpack_require__(79); -function setScrollPosition(viewport, changedScrollTop, changedScrollLeft) { - if (changedScrollLeft !== null) { - viewport.scrollLeft = changedScrollLeft; - } - if (changedScrollTop !== null) { - viewport.scrollTop = changedScrollTop; - } -} -function setScrollToFocus(store) { - var _a = store.focus, cellPosRect = _a.cellPosRect, side = _a.side, viewport = store.viewport; - if (cellPosRect === null || side === null) { - return; - } - var _b = viewport_1.getChangedScrollPosition(store, side), changedScrollLeft = _b[0], changedScrollTop = _b[1]; - setScrollPosition(viewport, changedScrollTop, changedScrollLeft); -} -exports.setScrollToFocus = setScrollToFocus; -function setScrollToSelection(store) { - var _a = store.columnCoords, widths = _a.widths, columnOffsets = _a.offsets, _b = store.rowCoords, heights = _b.heights, rowOffsets = _b.offsets, inputRange = store.selection.inputRange, viewport = store.viewport; - if (!inputRange) { - return; - } - var rowIndex = inputRange.row[1]; - var columnIndex = inputRange.column[1]; - var cellSide = columnIndex > widths.L.length - 1 ? 'R' : 'L'; - var rightSideColumnIndex = columnIndex < widths.L.length ? widths.L.length : columnIndex - widths.L.length; - var left = columnOffsets[cellSide][rightSideColumnIndex]; - var right = left + widths[cellSide][rightSideColumnIndex]; - var top = rowOffsets[rowIndex]; - var bottom = top + heights[rowIndex]; - var cellPosRect = { left: left, right: right, top: top, bottom: bottom }; - var _c = viewport_1.getChangedScrollPosition(store, cellSide, cellPosRect), changedScrollLeft = _c[0], changedScrollTop = _c[1]; - setScrollPosition(viewport, changedScrollTop, changedScrollLeft); -} -exports.setScrollToSelection = setScrollToSelection; -function setScrollLeft(_a, scrollLeft) { - var viewport = _a.viewport; - viewport.scrollLeft = scrollLeft; -} -exports.setScrollLeft = setScrollLeft; -function setScrollTop(_a, scrollTop) { - var viewport = _a.viewport; - viewport.scrollTop = scrollTop; -} -exports.setScrollTop = setScrollTop; -function initScrollPosition(_a) { - var viewport = _a.viewport; - viewport.scrollLeft = 0; - viewport.scrollTop = 0; -} -exports.initScrollPosition = initScrollPosition; - - -/***/ }), -/* 26 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.updateAllSummaryValues = exports.updateSummaryValueByRow = exports.updateSummaryValueByColumn = exports.updateSummaryValueByCell = exports.setSummaryColumnContent = void 0; -var tslib_1 = __webpack_require__(1); -var summary_1 = __webpack_require__(47); -var common_1 = __webpack_require__(0); -var summary_2 = __webpack_require__(48); -var observable_1 = __webpack_require__(5); -function setSummaryColumnContent(_a, columnName, columnContent) { - var summary = _a.summary, data = _a.data; - var castedColumnContent = summary_1.castToSummaryColumnContent(columnContent); - var content = summary_1.extractSummaryColumnContent(castedColumnContent, null); - summary.summaryColumnContents[columnName] = content; - summary.summaryValues[columnName] = summary_2.createSummaryValue(content, columnName, data); - observable_1.notify(summary, 'summaryValues'); -} -exports.setSummaryColumnContent = setSummaryColumnContent; -function updateSummaryValue(_a, columnName, type, options) { - var summary = _a.summary, data = _a.data; - var content = summary.summaryColumnContents[columnName]; - if (!content || !content.useAutoSummary) { - return; - } - var summaryValue = summary.summaryValues[columnName]; - var orgValue = Number(options.orgValue) || 0; - var value = Number(options.value) || 0; - var cntVariation = options.type === 'APPEND' ? 1 : -1; - var columnFilter = common_1.findProp('columnName', columnName, data.filters || []); - var hasColumnFilter = !!(columnFilter && common_1.isFunction(columnFilter.conditionFn)); - var included = hasColumnFilter && columnFilter.conditionFn(value); - var sum = summaryValue.sum, min = summaryValue.min, max = summaryValue.max, cnt = summaryValue.cnt; - var _b = summaryValue.filtered, filteredSum = _b.sum, filteredMin = _b.min, filteredMax = _b.max, filteredCnt = _b.cnt; - switch (type) { - case 'UPDATE_COLUMN': - sum = value * cnt; - min = value; - max = value; - if (hasColumnFilter) { - filteredCnt = included ? filteredCnt : 0; - filteredSum = included ? value * filteredCnt : 0; - filteredMin = included ? value : 0; - filteredMax = included ? value : 0; - } - break; - case 'UPDATE_CELL': - sum = sum - orgValue + value; - if (hasColumnFilter) { - var orgIncluded = columnFilter.conditionFn(orgValue); - if (!orgIncluded && included) { - filteredSum = filteredSum + value; - filteredCnt += 1; - } - else if (orgIncluded && !included) { - filteredSum = filteredSum - orgValue; - filteredCnt -= 1; - } - else if (orgIncluded && included) { - filteredSum = filteredSum - orgValue + value; - } - } - break; - case 'UPDATE_ROW': - cnt += cntVariation; - sum = sum + cntVariation * value; - if (hasColumnFilter && included) { - filteredSum = filteredSum + cntVariation * value; - filteredCnt += cntVariation; - } - break; - default: - // do nothing; - } - var avg = sum / cnt; - var filteredAvg = filteredSum / filteredCnt; - var columnData = data.rawData.map(function (row) { return Number(row[columnName]); }); - min = Math.min.apply(Math, tslib_1.__spreadArrays([value], columnData)); - max = Math.max.apply(Math, tslib_1.__spreadArrays([value], columnData)); - if (hasColumnFilter) { - var filteredColumnData = data.filteredRawData.map(function (row) { return Number(row[columnName]); }); - filteredMin = Math.min.apply(Math, tslib_1.__spreadArrays([value], filteredColumnData)); - filteredMax = Math.max.apply(Math, tslib_1.__spreadArrays([value], filteredColumnData)); - } - summary.summaryValues[columnName] = { - sum: sum, - min: min, - max: max, - avg: avg, - cnt: cnt, - filtered: hasColumnFilter - ? { - sum: filteredSum, - min: filteredMin, - max: filteredMax, - avg: filteredAvg, - cnt: filteredCnt, - } - : { sum: sum, min: min, max: max, avg: avg, cnt: cnt }, - }; - observable_1.notify(summary, 'summaryValues'); -} -function updateSummaryValueByCell(store, columnName, options) { - updateSummaryValue(store, columnName, 'UPDATE_CELL', options); -} -exports.updateSummaryValueByCell = updateSummaryValueByCell; -function updateSummaryValueByColumn(store, columnName, options) { - updateSummaryValue(store, columnName, 'UPDATE_COLUMN', options); -} -exports.updateSummaryValueByColumn = updateSummaryValueByColumn; -function updateSummaryValueByRow(store, row, options) { - var summary = store.summary, column = store.column; - var type = options.type, orgRow = options.orgRow; - var summaryColumns = column.allColumns.filter(function (_a) { - var name = _a.name; - return !!summary.summaryColumnContents[name]; - }); - summaryColumns.forEach(function (_a) { - var name = _a.name; - if (type === 'SET') { - updateSummaryValue(store, name, 'UPDATE_CELL', { orgValue: orgRow[name], value: row[name] }); - } - else { - updateSummaryValue(store, name, 'UPDATE_ROW', { type: type, value: row[name] }); - } - }); -} -exports.updateSummaryValueByRow = updateSummaryValueByRow; -function updateAllSummaryValues(_a) { - var summary = _a.summary, data = _a.data, column = _a.column; - var summaryColumns = column.allColumns.filter(function (_a) { - var name = _a.name; - return !!summary.summaryColumnContents[name]; - }); - summaryColumns.forEach(function (_a) { - var name = _a.name; - var content = summary.summaryColumnContents[name]; - summary.summaryValues[name] = summary_2.createSummaryValue(content, name, data); - }); - observable_1.notify(summary, 'summaryValues'); -} -exports.updateAllSummaryValues = updateAllSummaryValues; - - -/***/ }), -/* 27 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.getValidationCode = exports.forceValidateUniquenessOfColumn = exports.forceValidateUniquenessOfColumns = exports.replaceColumnUniqueInfoMap = exports.removeUniqueInfoMap = exports.addUniqueInfoMap = exports.invokeWithUniqueValidationColumn = exports.createNewValidationMap = void 0; -var tslib_1 = __webpack_require__(1); -var common_1 = __webpack_require__(0); -var observable_1 = __webpack_require__(5); -var instance_1 = __webpack_require__(8); -var data_1 = __webpack_require__(6); -var instanceValidationMap = {}; -var isValidatingUniquenessMap = {}; -function createNewValidationMap(id) { - instanceValidationMap[id] = {}; -} -exports.createNewValidationMap = createNewValidationMap; -function invokeWithUniqueValidationColumn(column, fn) { - column.validationColumns.forEach(function (_a) { - var name = _a.name, validation = _a.validation; - if (validation.unique) { - fn(name); - } - }); -} -exports.invokeWithUniqueValidationColumn = invokeWithUniqueValidationColumn; -function addUniqueInfoMap(id, row, column) { - invokeWithUniqueValidationColumn(column, function (name) { - return addColumnUniqueInfoMap(id, row.rowKey, name, row[name]); - }); -} -exports.addUniqueInfoMap = addUniqueInfoMap; -function removeUniqueInfoMap(id, row, column) { - invokeWithUniqueValidationColumn(column, function (name) { - return removeColumnUniqueInfoMap(id, row.rowKey, name, row[name]); - }); -} -exports.removeUniqueInfoMap = removeUniqueInfoMap; -function removeColumnUniqueInfoMap(id, rowKey, columnName, cellValue) { - var value = String(cellValue); - var uniqueInfoMap = instanceValidationMap[id]; - if (uniqueInfoMap && uniqueInfoMap[value] && uniqueInfoMap[value][columnName]) { - uniqueInfoMap[value][columnName] = uniqueInfoMap[value][columnName].filter(function (targetRowKey) { return targetRowKey !== rowKey; }); - } -} -function addColumnUniqueInfoMap(id, rowKey, columnName, cellValue) { - var value = String(cellValue); - var uniqueInfoMap = instanceValidationMap[id]; - uniqueInfoMap[value] = uniqueInfoMap[value] || {}; - uniqueInfoMap[value][columnName] = uniqueInfoMap[value][columnName] || []; - uniqueInfoMap[value][columnName].push(rowKey); -} -function replaceColumnUniqueInfoMap(id, column, _a) { - var rowKey = _a.rowKey, columnName = _a.columnName, prevValue = _a.prevValue, value = _a.value; - if (common_1.some(function (_a) { - var name = _a.name; - return name === columnName; - }, column.validationColumns)) { - removeColumnUniqueInfoMap(id, rowKey, columnName, prevValue); - addColumnUniqueInfoMap(id, rowKey, columnName, value); - } -} -exports.replaceColumnUniqueInfoMap = replaceColumnUniqueInfoMap; -function forceValidateUniquenessOfColumns(rawData, column) { - if (rawData.length) { - // trick for forcing to validate the uniqueness - invokeWithUniqueValidationColumn(column, function (name) { return observable_1.notify(rawData[0], name); }); - } -} -exports.forceValidateUniquenessOfColumns = forceValidateUniquenessOfColumns; -function forceValidateUniquenessOfColumn(rawData, column, columnName) { - if (common_1.some(function (_a) { - var name = _a.name; - return name === columnName; - }, column.validationColumns) && rawData.length) { - // trick for forcing to validate the uniqueness - observable_1.notify(rawData[0], columnName); - } -} -exports.forceValidateUniquenessOfColumn = forceValidateUniquenessOfColumn; -function hasDuplicateValue(id, columnName, cellValue) { - var _a; - var value = String(cellValue); - var uniqueInfoMap = instanceValidationMap[id]; - return !!(uniqueInfoMap && uniqueInfoMap[value] && ((_a = uniqueInfoMap[value][columnName]) === null || _a === void 0 ? void 0 : _a.length) > 1); -} -function validateDataUniqueness(id, value, columnName, invalidStates) { - if (hasDuplicateValue(id, columnName, value)) { - invalidStates.push({ code: 'UNIQUE' }); - } - // prevent recursive call of 'validateDataUniqueness' when scrolling or manipulating the data - if (!isValidatingUniquenessMap[columnName] && - !common_1.includes(observable_1.getRunningObservers(), 'lazyObservable')) { - var rawData_1 = []; - observable_1.unobservedInvoke(function () { - // @TODO: should get the latest rawData through function(not private field of the grid instance) - // @ts-ignore - rawData_1 = instance_1.getInstance(id).store.data.rawData; - }); - isValidatingUniquenessMap[columnName] = true; - rawData_1.forEach(function (row) { - if (observable_1.isObservable(row)) { - observable_1.notify(row, columnName); - } - }); - setTimeout(function () { - isValidatingUniquenessMap[columnName] = false; - }); - } -} -function validateCustomValidator(row, value, columnName, validatorFn, invalidStates) { - var originRow = data_1.getOmittedInternalProp(row); - observable_1.unobservedInvoke(function () { - var result = validatorFn(value, originRow, columnName); - var _a = (common_1.isBoolean(result) - ? { valid: result } - : result), valid = _a.valid, meta = _a.meta; - if (!valid) { - invalidStates.push(tslib_1.__assign({ code: 'VALIDATOR_FN' }, meta)); - } - }); -} -function getValidationCode(_a) { - var id = _a.id, value = _a.value, row = _a.row, columnName = _a.columnName, validation = _a.validation; - var invalidStates = []; - if (!validation) { - return invalidStates; - } - var required = validation.required, dataType = validation.dataType, min = validation.min, max = validation.max, regExp = validation.regExp, unique = validation.unique, validatorFn = validation.validatorFn; - if (required && common_1.isBlank(value)) { - invalidStates.push({ code: 'REQUIRED' }); - } - if (unique) { - validateDataUniqueness(id, value, columnName, invalidStates); - } - if (common_1.isFunction(validatorFn)) { - validateCustomValidator(row, value, columnName, validatorFn, invalidStates); - } - if (dataType === 'string' && !common_1.isString(value)) { - invalidStates.push({ code: 'TYPE_STRING' }); - } - if (regExp && common_1.isString(value) && !regExp.test(value)) { - invalidStates.push({ code: 'REGEXP', regExp: regExp }); - } - var numberValue = common_1.convertToNumber(value); - if (dataType === 'number' && !common_1.isNumber(numberValue)) { - invalidStates.push({ code: 'TYPE_NUMBER' }); - } - if (common_1.isNumber(min) && common_1.isNumber(numberValue) && numberValue < min) { - invalidStates.push({ code: 'MIN', min: min }); - } - if (common_1.isNumber(max) && common_1.isNumber(numberValue) && numberValue > max) { - invalidStates.push({ code: 'MAX', max: max }); - } - return invalidStates; -} -exports.getValidationCode = getValidationCode; - - -/***/ }), -/* 28 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.createObservableData = exports.fillMissingColumnData = void 0; -var tslib_1 = __webpack_require__(1); -var observable_1 = __webpack_require__(5); -var data_1 = __webpack_require__(15); -var data_2 = __webpack_require__(6); -var tree_1 = __webpack_require__(20); -var common_1 = __webpack_require__(0); -function getDataToBeObservable(acc, row, viewRow, index, treeColumnName) { - if (treeColumnName && row._attributes.tree.hidden) { - return acc; - } - if (!observable_1.isObservable(row) || - (viewRow && row.rowKey === viewRow.rowKey && !observable_1.isObservable(viewRow.valueMap))) { - acc.rows.push(row); - acc.targetIndexes.push(index); - } - return acc; -} -function createOriginData(data, rowRange, treeColumnName) { - var start = rowRange[0], end = rowRange[1]; - var viewData = data.viewData.slice(start, end); - return data.rawData - .slice(start, end) - .reduce(function (acc, row, index) { - return getDataToBeObservable(acc, row, viewData[index], index + start, treeColumnName); - }, { - rows: [], - targetIndexes: [], - }); -} -function createFilteredOriginData(data, rowRange, treeColumnName) { - var start = rowRange[0], end = rowRange[1]; - var rawData = data.rawData, viewData = data.viewData; - return data - .filteredIndex.slice(start, end) - .reduce(function (acc, rowIndex) { - return getDataToBeObservable(acc, rawData[rowIndex], viewData[rowIndex], rowIndex, treeColumnName); - }, { rows: [], targetIndexes: [] }); -} -function changeToObservableData(id, column, data, originData) { - var targetIndexes = originData.targetIndexes, rows = originData.rows; - var rawData = data.rawData; - fillMissingColumnData(column, rows); - // prevRows is needed to create rowSpan - var prevRows = targetIndexes.map(function (targetIndex) { return data.rawData[targetIndex - 1]; }); - for (var index = 0, end = rows.length; index < end; index += 1) { - var targetIndex = targetIndexes[index]; - var rawRow = data_1.createRawRow(id, rows[index], index, column, { - lazyObservable: false, - prevRow: prevRows[index], - keyColumnName: column.keyColumnName, - }); - var viewRow = data_1.createViewRow(id, rawRow, rawData, column); - common_1.silentSplice(data.rawData, targetIndex, 1, rawRow); - common_1.silentSplice(data.viewData, targetIndex, 1, viewRow); - } - observable_1.notify(data, 'rawData', 'filteredRawData', 'viewData', 'filteredViewData'); -} -function changeToObservableTreeData(id, column, data, originData) { - var rows = originData.rows; - var rawData = data.rawData, viewData = data.viewData; - fillMissingColumnData(column, rows); - // create new creation key for updating the observe function of hoc component - data_1.generateDataCreationKey(); - rows.forEach(function (row) { - var parentRow = data_2.findRowByRowKey(data, column, id, row._attributes.tree.parentRowKey); - var rawRow = tree_1.createTreeRawRow(id, row, parentRow || null, column); - var viewRow = data_1.createViewRow(id, rawRow, rawData, column); - var foundIndex = data_2.findIndexByRowKey(data, column, id, rawRow.rowKey); - common_1.silentSplice(rawData, foundIndex, 1, rawRow); - common_1.silentSplice(viewData, foundIndex, 1, viewRow); - }); - observable_1.notify(data, 'rawData', 'filteredRawData', 'viewData', 'filteredViewData'); -} -function fillMissingColumnData(column, rawData) { - for (var i = 0; i < rawData.length; i += 1) { - rawData[i] = tslib_1.__assign(tslib_1.__assign({}, column.emptyRow), rawData[i]); - } -} -exports.fillMissingColumnData = fillMissingColumnData; -function createObservableData(_a, allRowRange) { - var column = _a.column, data = _a.data, viewport = _a.viewport, id = _a.id; - if (allRowRange === void 0) { allRowRange = false; } - var rowRange = allRowRange ? [0, data.rawData.length] : viewport.rowRange; - var treeColumnName = column.treeColumnName; - var originData = data.filters && !allRowRange - ? createFilteredOriginData(data, rowRange, treeColumnName) - : createOriginData(data, rowRange, treeColumnName); - if (!originData.rows.length) { - return; - } - if (treeColumnName) { - changeToObservableTreeData(id, column, data, originData); - } - else { - changeToObservableData(id, column, data, originData); - } -} -exports.createObservableData = createObservableData; - - -/***/ }), -/* 29 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.resetSortState = exports.sortByCurrentState = exports.resetSortKey = exports.updateSortKey = exports.emitAfterSort = exports.emitBeforeSort = exports.initSortState = exports.unsort = exports.sort = exports.changeSortState = void 0; -var tslib_1 = __webpack_require__(1); -var common_1 = __webpack_require__(0); -var observable_1 = __webpack_require__(5); -var sort_1 = __webpack_require__(78); -var eventBus_1 = __webpack_require__(7); -var data_1 = __webpack_require__(14); -var data_2 = __webpack_require__(6); -var column_1 = __webpack_require__(12); -var sort_2 = __webpack_require__(46); -var rowSpan_1 = __webpack_require__(24); -function createSoretedViewData(rawData) { - return rawData.map(function (_a) { - var rowKey = _a.rowKey, sortKey = _a.sortKey, uniqueKey = _a.uniqueKey; - return ({ rowKey: rowKey, sortKey: sortKey, uniqueKey: uniqueKey }); - }); -} -function sortData(store) { - var data = store.data, column = store.column; - var sortState = data.sortState, rawData = data.rawData, viewData = data.viewData, pageRowRange = data.pageRowRange; - var columns = sortState.columns; - var sortedColumns = columns.map(function (sortedColumn) { - var _a; - return (tslib_1.__assign(tslib_1.__assign({}, sortedColumn), { comparator: (_a = column.allColumnMap[sortedColumn.columnName]) === null || _a === void 0 ? void 0 : _a.comparator })); - }); - if (data_2.isScrollPagination(data, true)) { - // should sort the sliced data which is displayed in viewport in case of client infinite scrolling - var targetRawData = rawData.slice.apply(rawData, pageRowRange); - targetRawData.sort(sort_1.sortRawData(sortedColumns)); - var targetViewData = createSoretedViewData(targetRawData); - data.rawData = targetRawData.concat(rawData.slice(pageRowRange[1])); - data.viewData = targetViewData.concat(viewData.slice(pageRowRange[1])); - } - else { - rawData.sort(sort_1.sortRawData(sortedColumns)); - data.viewData = createSoretedViewData(rawData); - } -} -function setInitialSortState(data) { - data.sortState.columns = [{ columnName: 'sortKey', ascending: true }]; -} -function setSortStateForEmptyState(data) { - if (!data.sortState.columns.length) { - setInitialSortState(data); - } -} -function toggleSortAscending(data, index, ascending, sortingType, cancelable) { - var defaultAscending = sortingType === 'asc'; - if (defaultAscending === ascending && cancelable) { - data.sortState.columns.splice(index, 1); - } - else { - data.sortState.columns[index].ascending = ascending; - } -} -function changeSingleSortState(data, columnName, ascending, sortingType, cancelable) { - var sortState = data.sortState; - var columns = sortState.columns; - var sortedColumn = { columnName: columnName, ascending: ascending }; - if (columns.length === 1 && columns[0].columnName === columnName) { - var columnIndex = common_1.findPropIndex('columnName', columnName, sortState.columns); - toggleSortAscending(data, columnIndex, ascending, sortingType, cancelable); - } - else { - data.sortState.columns = [sortedColumn]; - } -} -function changeMultiSortState(data, columnName, ascending, sortingType, cancelable) { - var sortedColumn = { columnName: columnName, ascending: ascending }; - var sortState = data.sortState; - var columns = sortState.columns; - var columnIndex = common_1.findPropIndex('columnName', columnName, columns); - if (columnIndex === -1) { - data.sortState.columns = data_2.isInitialSortState(sortState) - ? [sortedColumn] - : tslib_1.__spreadArrays(columns, [sortedColumn]); - } - else { - toggleSortAscending(data, columnIndex, ascending, sortingType, cancelable); - } -} -function changeSortState(_a, columnName, ascending, multiple, cancelable) { - var data = _a.data, column = _a.column; - if (cancelable === void 0) { cancelable = true; } - if (columnName === 'sortKey') { - setInitialSortState(data); - } - else { - var sortingType = column.allColumnMap[columnName].sortingType; - if (multiple) { - changeMultiSortState(data, columnName, ascending, sortingType, cancelable); - } - else { - changeSingleSortState(data, columnName, ascending, sortingType, cancelable); - } - setSortStateForEmptyState(data); - } - if (!data.sortState.useClient) { - observable_1.notify(data, 'sortState'); - } -} -exports.changeSortState = changeSortState; -function applySortedData(store) { - sortData(store); - observable_1.notify(store.data, 'sortState'); - data_1.updateRowNumber(store, 0); - data_1.setCheckedAllRows(store); -} -function sort(store, columnName, ascending, multiple, cancelable) { - if (multiple === void 0) { multiple = false; } - if (cancelable === void 0) { cancelable = true; } - var data = store.data, column = store.column; - var sortState = data.sortState; - if (column_1.isComplexHeader(column, columnName) || !data_2.isSortable(sortState, column, columnName)) { - return; - } - var cancelSort = sort_2.isCancelSort(store, columnName, ascending, cancelable); - var gridEvent = emitBeforeSort(store, cancelSort, { columnName: columnName, ascending: ascending, multiple: multiple }); - if (gridEvent.isStopped()) { - return; - } - changeSortState(store, columnName, ascending, multiple, cancelable); - applySortedData(store); - emitAfterSort(store, cancelSort, columnName); - rowSpan_1.updateRowSpan(store); -} -exports.sort = sort; -function unsort(store, columnName) { - if (columnName === void 0) { columnName = 'sortKey'; } - var data = store.data, column = store.column; - var sortState = data.sortState; - if (column_1.isComplexHeader(column, columnName) || !data_2.isSortable(sortState, column, columnName)) { - return; - } - emitBeforeSort(store, true, { columnName: columnName, multiple: true }); - if (columnName === 'sortKey') { - setInitialSortState(data); - } - else { - var index = common_1.findPropIndex('columnName', columnName, data.sortState.columns); - if (index !== -1) { - data.sortState.columns.splice(index, 1); - setSortStateForEmptyState(data); - } - } - applySortedData(store); - emitAfterSort(store, true, columnName); - rowSpan_1.updateRowSpan(store); -} -exports.unsort = unsort; -function initSortState(data) { - setInitialSortState(data); - observable_1.notify(data, 'sortState'); -} -exports.initSortState = initSortState; -function emitBeforeSort(store, cancelSort, eventParams) { - var id = store.id, data = store.data; - var eventBus = eventBus_1.getEventBus(id); - var eventType = cancelSort ? 'beforeUnsort' : 'beforeSort'; - var gridEvent = sort_2.createSortEvent(eventType, tslib_1.__assign(tslib_1.__assign({}, eventParams), { sortState: data.sortState })); - eventBus.trigger(eventType, gridEvent); - return gridEvent; -} -exports.emitBeforeSort = emitBeforeSort; -function emitAfterSort(store, cancelSort, columnName) { - var id = store.id, data = store.data; - var eventBus = eventBus_1.getEventBus(id); - // @TODO: `sort` event will be deprecated. This event is replaced with `afterSort` event - var eventTypes = (cancelSort ? ['afterUnsort'] : ['afterSort', 'sort']); - eventTypes.forEach(function (eventType) { - var gridEvent = sort_2.createSortEvent(eventType, { columnName: columnName, sortState: data.sortState }); - eventBus.trigger(eventType, gridEvent); - }); -} -exports.emitAfterSort = emitAfterSort; -function updateSortKey(data, sortKey, appended) { - if (appended === void 0) { appended = true; } - var incremental = appended ? 1 : -1; - var rawData = data.rawData, viewData = data.viewData; - for (var idx = 0; idx < rawData.length; idx += 1) { - if (rawData[idx].sortKey >= sortKey) { - rawData[idx].sortKey += incremental; - viewData[idx].sortKey += incremental; - } - } - if (appended) { - rawData[sortKey].sortKey = sortKey; - viewData[sortKey].sortKey = sortKey; - } -} -exports.updateSortKey = updateSortKey; -function resetSortKey(data, start) { - var rawData = data.rawData, viewData = data.viewData; - for (var idx = start; idx < rawData.length; idx += 1) { - rawData[idx].sortKey = idx; - viewData[idx].sortKey = idx; - } -} -exports.resetSortKey = resetSortKey; -function sortByCurrentState(store) { - var data = store.data; - if (data_2.isSorted(data)) { - var _a = data.sortState.columns[0], columnName = _a.columnName, ascending = _a.ascending; - sort(store, columnName, ascending, true, false); - } -} -exports.sortByCurrentState = sortByCurrentState; -function resetSortState(store, sortState) { - var data = store.data, column = store.column; - if (sortState) { - var columnName = sortState.columnName, ascending = sortState.ascending, multiple = sortState.multiple; - var _a = column.allColumnMap[columnName], sortingType = _a.sortingType, sortable = _a.sortable; - if (sortable) { - var cancelable = common_1.isUndefined(ascending); - var nextAscending = cancelable ? sortingType === 'asc' : ascending; - changeSortState(store, columnName, nextAscending, multiple, cancelable); - observable_1.notify(data, 'sortState'); - } - } - else { - initSortState(data); - } -} -exports.resetSortState = resetSortState; - - -/***/ }), -/* 30 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.composeConditionFn = exports.getFilterConditionFn = exports.getUnixTime = exports.createFilterSelectOption = void 0; -var tslib_1 = __webpack_require__(1); -var common_1 = __webpack_require__(0); -var i18n_1 = tslib_1.__importDefault(__webpack_require__(19)); -var filterSelectOption; -function createFilterSelectOption() { - if (!filterSelectOption) { - filterSelectOption = { - number: { - eq: '=', - lt: '<', - gt: '>', - lte: '<=', - gte: '>=', - ne: '!=', - }, - text: { - contain: i18n_1.default.get('filter.contains'), - eq: i18n_1.default.get('filter.eq'), - ne: i18n_1.default.get('filter.ne'), - start: i18n_1.default.get('filter.start'), - end: i18n_1.default.get('filter.end'), - }, - date: { - eq: i18n_1.default.get('filter.eq'), - ne: i18n_1.default.get('filter.ne'), - after: i18n_1.default.get('filter.after'), - afterEq: i18n_1.default.get('filter.afterEq'), - before: i18n_1.default.get('filter.before'), - beforeEq: i18n_1.default.get('filter.beforeEq'), - }, - }; - } - return filterSelectOption; -} -exports.createFilterSelectOption = createFilterSelectOption; -function getUnixTime(value) { - return parseInt((new Date(String(value)).getTime() / 1000).toFixed(0), 10); -} -exports.getUnixTime = getUnixTime; -function getPredicateWithType(code, type, inputValue) { - var convertFn = { - number: Number, - text: String, - select: String, - date: getUnixTime, - }[type]; - return code === 'eq' - ? function (cellValue) { return convertFn(cellValue) === convertFn(inputValue); } - : function (cellValue) { return convertFn(cellValue) !== convertFn(inputValue); }; -} -function getFilterConditionFn(code, inputValue, type) { - switch (code) { - case 'eq': - case 'ne': - return getPredicateWithType(code, type, inputValue); - case 'lt': - return function (cellValue) { return Number(cellValue) < Number(inputValue); }; - case 'gt': - return function (cellValue) { return Number(cellValue) > Number(inputValue); }; - case 'lte': - return function (cellValue) { return Number(cellValue) <= Number(inputValue); }; - case 'gte': - return function (cellValue) { return Number(cellValue) >= Number(inputValue); }; - case 'contain': - return function (cellValue) { - return common_1.isString(cellValue) && common_1.isString(inputValue) && cellValue.indexOf(inputValue) !== -1; - }; - case 'start': - return function (cellValue) { - return common_1.isString(cellValue) && common_1.isString(inputValue) && common_1.startsWith(inputValue, cellValue); - }; - case 'end': - return function (cellValue) { - return common_1.isString(cellValue) && common_1.isString(inputValue) && common_1.endsWith(inputValue, cellValue); - }; - case 'after': - return function (cellValue) { return getUnixTime(cellValue) > getUnixTime(inputValue); }; - case 'afterEq': - return function (cellValue) { return getUnixTime(cellValue) >= getUnixTime(inputValue); }; - case 'before': - return function (cellValue) { return getUnixTime(cellValue) < getUnixTime(inputValue); }; - case 'beforeEq': - return function (cellValue) { return getUnixTime(cellValue) <= getUnixTime(inputValue); }; - default: - throw new Error('code not available.'); - } -} -exports.getFilterConditionFn = getFilterConditionFn; -function composeConditionFn(fns, operator) { - return function (value) { - return fns.reduce(function (acc, fn) { - return operator === 'OR' ? acc || fn(value) : acc && fn(value); - }, operator !== 'OR'); - }; -} -exports.composeConditionFn = composeConditionFn; - - -/***/ }), -/* 31 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.moveTreeRow = exports.removeTreeRow = exports.appendTreeRow = exports.changeTreeRowsCheckedState = exports.collapseAll = exports.collapseByRowKey = exports.expandAll = exports.expandByRowKey = exports.removeExpandedAttr = void 0; -var tslib_1 = __webpack_require__(1); -var data_1 = __webpack_require__(15); -var data_2 = __webpack_require__(6); -var observable_1 = __webpack_require__(5); -var instance_1 = __webpack_require__(8); -var data_3 = __webpack_require__(14); -var tree_1 = __webpack_require__(21); -var eventBus_1 = __webpack_require__(7); -var gridEvent_1 = tslib_1.__importDefault(__webpack_require__(9)); -var tree_2 = __webpack_require__(20); -var common_1 = __webpack_require__(0); -var dom_1 = __webpack_require__(2); -var lazyObservable_1 = __webpack_require__(28); -var column_1 = __webpack_require__(12); -var data_4 = __webpack_require__(23); -var constant_1 = __webpack_require__(10); -var column_2 = __webpack_require__(32); -function changeExpandedAttr(row, expanded) { - var tree = row._attributes.tree; - if (tree) { - row._attributes.expanded = expanded; - tree.expanded = expanded; - } -} -function changeHiddenAttr(row, hidden) { - var tree = row._attributes.tree; - if (tree) { - tree.hidden = hidden; - } -} -function expand(store, row, recursive) { - var rowKey = row.rowKey; - var eventBus = eventBus_1.getEventBus(store.id); - var gridEvent = new gridEvent_1.default({ rowKey: rowKey }); - /** - * Occurs when the row having child rows is expanded - * @event Grid#expand - * @type {module:event/gridEvent} - * @property {number|string} rowKey - rowKey of the expanded row - * @property {Grid} instance - Current grid instance - */ - eventBus.trigger('expand', gridEvent); - if (gridEvent.isStopped()) { - return; - } - var data = store.data, rowCoords = store.rowCoords, dimension = store.dimension, column = store.column, id = store.id, viewport = store.viewport, columnCoords = store.columnCoords; - var heights = rowCoords.heights; - changeExpandedAttr(row, true); - var childRowKeys = tree_1.getChildRowKeys(row); - updateTreeColumnWidth(childRowKeys, column, columnCoords, dimension, data.rawData); - childRowKeys.forEach(function (childRowKey) { - var childRow = data_2.findRowByRowKey(data, column, id, childRowKey); - if (!childRow) { - return; - } - changeHiddenAttr(childRow, false); - if (!tree_1.isLeaf(childRow) && (tree_1.isExpanded(childRow) || recursive)) { - expand(store, childRow, recursive); - } - var index = data_2.findIndexByRowKey(data, column, id, childRowKey); - heights[index] = data_2.getRowHeight(childRow, dimension.rowHeight); - }); - if (childRowKeys.length) { - observable_1.notify(rowCoords, 'heights'); - observable_1.notify(viewport, 'rowRange'); - } -} -function updateTreeColumnWidth(childRowKeys, column, columnCoords, dimension, rawData) { - var visibleColumnsBySideWithRowHeader = column.visibleColumnsBySideWithRowHeader, treeIcon = column.treeIcon, allColumnMap = column.allColumnMap, treeIndentWidth = column.treeIndentWidth; - var treeColumnName = column.treeColumnName; - var treeColumnSide = column_1.getColumnSide(column, treeColumnName); - var treeColumnIndex = common_1.findPropIndex('name', treeColumnName, column.visibleColumnsBySide[treeColumnSide]); - var columnInfo = visibleColumnsBySideWithRowHeader[treeColumnSide][treeColumnIndex]; - // @TODO: auto resizing is operated with 'autoResizing' option - // 'resizable' condition should be deprecated in next version - if (columnInfo.resizable || columnInfo.autoResizing) { - var maxWidth = getChildTreeNodeMaxWidth(childRowKeys, rawData, columnInfo, treeIndentWidth, treeIcon); - var prevWidth = columnCoords.widths[treeColumnSide][treeColumnIndex] + dimension.cellBorderWidth; - allColumnMap[treeColumnName].baseWidth = Math.max(prevWidth, maxWidth); - allColumnMap[treeColumnName].fixedWidth = true; - } -} -function getChildTreeNodeMaxWidth(childRowKeys, rawData, column, treeIndentWidth, useIcon) { - var maxLength = 0; - var bodyArea = document.querySelector("." + dom_1.cls('rside-area') + " ." + dom_1.cls('body-container') + " ." + dom_1.cls('table')); - var getMaxWidth = childRowKeys.reduce(function (acc, rowKey) { - var row = common_1.findProp('rowKey', rowKey, rawData); - var formattedValue = data_4.createFormattedValue(row, column); - if (formattedValue.length > maxLength) { - maxLength = formattedValue.length; - acc = function () { - return dom_1.getTextWidth(formattedValue, bodyArea) + - tree_2.getTreeIndentWidth(tree_1.getDepth(rawData, row), treeIndentWidth, useIcon) + - constant_1.TREE_CELL_HORIZONTAL_PADDING; - }; - } - return acc; - }, function () { return 0; }); - return getMaxWidth(); -} -function collapse(store, row, recursive) { - var rowKey = row.rowKey; - var eventBus = eventBus_1.getEventBus(store.id); - var gridEvent = new gridEvent_1.default({ rowKey: rowKey }); - /** - * Occurs when the row having child rows is collapsed - * @event Grid#collapse - * @type {module:event/gridEvent} - * @property {number|string} rowKey - rowKey of the collapsed row - * @property {Grid} instance - Current grid instance - */ - eventBus.trigger('collapse', gridEvent); - if (gridEvent.isStopped()) { - return; - } - var data = store.data, rowCoords = store.rowCoords, column = store.column, id = store.id; - var heights = rowCoords.heights; - changeExpandedAttr(row, false); - var childRowKeys = tree_1.getChildRowKeys(row); - childRowKeys.forEach(function (childRowKey) { - var childRow = data_2.findRowByRowKey(data, column, id, childRowKey); - if (!childRow) { - return; - } - changeHiddenAttr(childRow, true); - if (!tree_1.isLeaf(childRow)) { - if (recursive) { - collapse(store, childRow, recursive); - } - else { - tree_1.getDescendantRows(store, childRowKey).forEach(function (_a) { - var descendantRowKey = _a.rowKey; - var index = data_2.findIndexByRowKey(data, column, id, descendantRowKey); - changeHiddenAttr(data.filteredRawData[index], true); - heights[index] = 0; - }); - } - } - var index = data_2.findIndexByRowKey(data, column, id, childRowKey); - heights[index] = 0; - }); - observable_1.notify(rowCoords, 'heights'); -} -function setCheckedState(row, state) { - if (row && data_3.isUpdatableRowAttr('checked', row._attributes.checkDisabled)) { - row._attributes.checked = state; - } -} -function changeAncestorRowsCheckedState(store, rowKey) { - var data = store.data, column = store.column, id = store.id; - var rawData = data.rawData; - var row = data_2.findRowByRowKey(data, column, id, rowKey); - if (row) { - tree_1.traverseAncestorRows(rawData, row, function (parentRow) { - var childRowKeys = tree_1.getChildRowKeys(parentRow); - var checkedChildRows = childRowKeys.filter(function (childRowKey) { - var childRow = data_2.findRowByRowKey(data, column, id, childRowKey); - return !!childRow && childRow._attributes.checked; - }); - var checked = childRowKeys.length === checkedChildRows.length; - setCheckedState(parentRow, checked); - }); - } -} -function changeDescendantRowsCheckedState(store, rowKey, state) { - var data = store.data, column = store.column, id = store.id; - var rawData = data.rawData; - var row = data_2.findRowByRowKey(data, column, id, rowKey); - if (row) { - tree_1.traverseDescendantRows(rawData, row, function (childRow) { - setCheckedState(childRow, state); - }); - } -} -function removeChildRowKey(row, rowKey) { - var tree = row._attributes.tree; - if (tree) { - common_1.removeArrayItem(rowKey, tree.childRowKeys); - if (row._children) { - var index = common_1.findPropIndex('rowKey', rowKey, row._children); - if (index !== -1) { - row._children.splice(index, 1); - } - } - if (!tree.childRowKeys.length) { - row._leaf = true; - } - observable_1.notify(tree, 'childRowKeys'); - } -} -function removeExpandedAttr(row) { - var tree = row._attributes.tree; - if (tree) { - tree.expanded = false; - } -} -exports.removeExpandedAttr = removeExpandedAttr; -function expandByRowKey(store, rowKey, recursive) { - var data = store.data, column = store.column, id = store.id; - var row = data_2.findRowByRowKey(data, column, id, rowKey); - if (row) { - expand(store, row, recursive); - } -} -exports.expandByRowKey = expandByRowKey; -function expandAll(store) { - store.data.rawData.forEach(function (row) { - if (tree_1.isRootChildRow(row) && !tree_1.isLeaf(row)) { - expand(store, row, true); - } - }); -} -exports.expandAll = expandAll; -function collapseByRowKey(store, rowKey, recursive) { - var data = store.data, column = store.column, id = store.id; - var row = data_2.findRowByRowKey(data, column, id, rowKey); - if (row) { - collapse(store, row, recursive); - } -} -exports.collapseByRowKey = collapseByRowKey; -function collapseAll(store) { - store.data.rawData.forEach(function (row) { - if (tree_1.isRootChildRow(row) && !tree_1.isLeaf(row)) { - collapse(store, row, true); - } - }); -} -exports.collapseAll = collapseAll; -function changeTreeRowsCheckedState(store, rowKey, state) { - var _a = store.column, treeColumnName = _a.treeColumnName, treeCascadingCheckbox = _a.treeCascadingCheckbox; - if (treeColumnName && treeCascadingCheckbox) { - changeDescendantRowsCheckedState(store, rowKey, state); - changeAncestorRowsCheckedState(store, rowKey); - } -} -exports.changeTreeRowsCheckedState = changeTreeRowsCheckedState; -// @TODO: consider tree disabled state with cascading -function appendTreeRow(store, row, options) { - var data = store.data, column = store.column, rowCoords = store.rowCoords, dimension = store.dimension, id = store.id; - var rawData = data.rawData, viewData = data.viewData; - var heights = rowCoords.heights; - var parentRowKey = options.parentRowKey, offset = options.offset, movingRow = options.movingRow; - var parentRow = data_2.findRowByRowKey(data, column, id, parentRowKey); - var startIdx = tree_1.getStartIndexToAppendRow(store, parentRow, offset); - var rawRows = tree_2.flattenTreeData(id, [row], parentRow, column, { - keyColumnName: column.keyColumnName, - offset: offset, - }); - var modificationType = movingRow ? 'UPDATE' : 'CREATE'; - lazyObservable_1.fillMissingColumnData(column, rawRows); - var viewRows = rawRows.map(function (rawRow) { return data_1.createViewRow(id, rawRow, rawData, column); }); - common_1.silentSplice.apply(void 0, tslib_1.__spreadArrays([rawData, startIdx, 0], rawRows)); - common_1.silentSplice.apply(void 0, tslib_1.__spreadArrays([viewData, startIdx, 0], viewRows)); - var rowHeights = rawRows.map(function (rawRow) { - changeTreeRowsCheckedState(store, rawRow.rowKey, rawRow._attributes.checked); - instance_1.getDataManager(id).push(modificationType, rawRow, true); - return data_2.getRowHeight(rawRow, dimension.rowHeight); - }); - observable_1.notify(data, 'rawData', 'filteredRawData', 'viewData', 'filteredViewData'); - heights.splice.apply(heights, tslib_1.__spreadArrays([startIdx, 0], rowHeights)); - postUpdateAfterManipulation(store, startIdx, rawRows); -} -exports.appendTreeRow = appendTreeRow; -// @TODO: consider tree disabled state with cascading -function removeTreeRow(store, rowKey, movingRow) { - var data = store.data, rowCoords = store.rowCoords, id = store.id, column = store.column; - var rawData = data.rawData, viewData = data.viewData; - var heights = rowCoords.heights; - var parentRow = tree_1.getParentRow(store, rowKey); - var modificationType = movingRow ? 'UPDATE' : 'DELETE'; - data_3.uncheck(store, rowKey); - if (parentRow) { - removeChildRowKey(parentRow, rowKey); - if (!tree_1.getChildRowKeys(parentRow).length) { - removeExpandedAttr(parentRow); - } - } - var startIdx = data_2.findIndexByRowKey(data, column, id, rowKey); - var deleteCount = tree_1.getDescendantRows(store, rowKey).length + 1; - var removedRows = []; - observable_1.batchObserver(function () { - removedRows = rawData.splice(startIdx, deleteCount); - }); - viewData.splice(startIdx, deleteCount); - heights.splice(startIdx, deleteCount); - for (var i = removedRows.length - 1; i >= 0; i -= 1) { - instance_1.getDataManager(id).push(modificationType, removedRows[i]); - } - postUpdateAfterManipulation(store, startIdx, rawData); -} -exports.removeTreeRow = removeTreeRow; -function postUpdateAfterManipulation(store, rowIndex, rows) { - data_3.setLoadingState(store, data_2.getLoadingState(store.data.rawData)); - data_3.updateRowNumber(store, rowIndex); - data_3.setCheckedAllRows(store); - column_2.setAutoResizingColumnWidths(store, rows); -} -function moveTreeRow(store, rowKey, targetIndex, options) { - var data = store.data, column = store.column, id = store.id; - var rawData = data.rawData; - var targetRow = rawData[targetIndex]; - if (!targetRow || data_2.isSorted(data) || data_2.isFiltered(data)) { - return; - } - var currentIndex = data_2.findIndexByRowKey(data, column, id, rowKey, false); - var row = rawData[currentIndex]; - if (currentIndex === -1 || - currentIndex === targetIndex || - row._attributes.disabled || - (targetRow._attributes.disabled && options.appended)) { - return; - } - var childRows = tree_1.getDescendantRows(store, rowKey); - var minIndex = Math.min(currentIndex, targetIndex); - var moveToChild = common_1.some(function (childRow) { return childRow.rowKey === targetRow.rowKey; }, childRows); - if (!moveToChild) { - removeTreeRow(store, rowKey, true); - var originRow = observable_1.getOriginObject(row); - instance_1.getDataManager(id).push('UPDATE', targetRow, true); - instance_1.getDataManager(id).push('UPDATE', row, true); - if (options.appended) { - appendTreeRow(store, originRow, { parentRowKey: targetRow.rowKey, movingRow: true }); - } - else { - var parentRowKey = targetRow._attributes.tree.parentRowKey; - var parentIndex = data_2.findIndexByRowKey(data, column, id, parentRowKey); - var offset = targetIndex > currentIndex ? targetIndex - (childRows.length + 1) : targetIndex; - // calculate the offset based on parent row - if (parentIndex !== -1) { - var parentRow = rawData[parentIndex]; - offset = parentRow._attributes.tree.childRowKeys.indexOf(targetRow.rowKey); - } - // to resolve the index for moving last index - if (options.moveToLast) { - parentRowKey = null; - offset = rawData.length; - } - appendTreeRow(store, originRow, { parentRowKey: parentRowKey, offset: offset, movingRow: true }); - } - postUpdateAfterManipulation(store, minIndex); - } -} -exports.moveTreeRow = moveTreeRow; - - -/***/ }), -/* 32 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.moveColumn = exports.setColumnWidthsByText = exports.setAutoResizingColumnWidths = exports.changeColumnHeadersByName = exports.setComplexColumnHeaders = exports.showColumn = exports.hideColumn = exports.resetColumnWidths = exports.setColumns = exports.setColumnWidth = exports.setFrozenColumnCount = void 0; -var tslib_1 = __webpack_require__(1); -var column_1 = __webpack_require__(33); -var data_1 = __webpack_require__(15); -var gridEvent_1 = tslib_1.__importDefault(__webpack_require__(9)); -var eventBus_1 = __webpack_require__(7); -var focus_1 = __webpack_require__(18); -var observable_1 = __webpack_require__(5); -var sort_1 = __webpack_require__(29); -var filter_1 = __webpack_require__(36); -var selection_1 = __webpack_require__(16); -var common_1 = __webpack_require__(0); -var viewport_1 = __webpack_require__(25); -var dom_1 = __webpack_require__(2); -var data_2 = __webpack_require__(23); -var tree_1 = __webpack_require__(20); -var tree_2 = __webpack_require__(21); -var constant_1 = __webpack_require__(10); -var rowSpan_1 = __webpack_require__(24); -var column_2 = __webpack_require__(11); -var column_3 = __webpack_require__(12); -function setFrozenColumnCount(_a, count) { - var column = _a.column; - column.frozenCount = count; -} -exports.setFrozenColumnCount = setFrozenColumnCount; -function getCellWidthToBeResized(columns, range, resizeAmount, startWidths) { - var widths = []; - var startIdx = range[0], endIdx = range[1]; - var rangeLength = endIdx - startIdx + 1; - var delta = resizeAmount / rangeLength; - for (var idx = 0; idx < rangeLength; idx += 1) { - var columnIdx = startIdx + idx; - var minWidth = columns[columnIdx].minWidth; - var width = Math.max(startWidths[idx] + delta, minWidth); - widths.push(width); - } - return widths; -} -function setColumnWidth(_a, side, range, resizeAmount, startWidths) { - var column = _a.column, id = _a.id; - var eventBus = eventBus_1.getEventBus(id); - var columns = column.visibleColumnsBySideWithRowHeader[side]; - var startIdx = range[0], endIdx = range[1]; - var resizedColumns = []; - var widths = getCellWidthToBeResized(columns, range, resizeAmount, startWidths); - for (var idx = startIdx; idx <= endIdx; idx += 1) { - resizedColumns.push({ - columnName: columns[idx].name, - width: widths[idx - startIdx], - }); - } - var gridEvent = new gridEvent_1.default({ resizedColumns: resizedColumns }); - /** - * Occurs when column is resized - * @event Grid#columnResize - * @property {Array} resizedColumns - state about resized columns - * @property {number} resizedColumns.columnName - columnName of the target cell - * @property {number} resizedColumns.width - width of the resized column - * @property {Grid} instance - Current grid instance - */ - eventBus.trigger('columnResize', gridEvent); - if (!gridEvent.isStopped()) { - widths.forEach(function (width, idx) { - var columnIdx = startIdx + idx; - var item = columns[columnIdx]; - item.baseWidth = width; - item.fixedWidth = true; - }); - } -} -exports.setColumnWidth = setColumnWidth; -function setColumns(store, optColumns) { - var column = store.column, data = store.data, id = store.id; - var _a = column.dataForColumnCreation, columnOptions = _a.columnOptions, copyOptions = _a.copyOptions, treeColumnOptions = _a.treeColumnOptions, rowHeaders = _a.rowHeaders; - var relationColumns = optColumns.reduce(function (acc, _a) { - var _b = _a.relations, relations = _b === void 0 ? [] : _b; - return acc.concat(column_1.createRelationColumns(relations)).filter(function (columnName, index) { - var foundIndex = acc.indexOf(columnName); - return foundIndex === -1 || foundIndex === index; - }); - }, []); - var columnInfos = optColumns.map(function (optColumn) { - return column_1.createColumn(optColumn, columnOptions, relationColumns, copyOptions, treeColumnOptions, column.columnHeaderInfo, !!optColumn.disabled); - }); - var dataCreationKey = data_1.generateDataCreationKey(); - viewport_1.initScrollPosition(store); - focus_1.initFocus(store); - selection_1.initSelection(store); - column.allColumns = tslib_1.__spreadArrays(rowHeaders, columnInfos); - data.viewData.forEach(function (viewRow) { - if (Array.isArray(viewRow.__unobserveFns__)) { - viewRow.__unobserveFns__.forEach(function (fn) { return fn(); }); - } - }); - data.rawData = data.rawData.map(function (row) { - var newRow = tslib_1.__assign(tslib_1.__assign({}, column.emptyRow), row); - newRow.uniqueKey = dataCreationKey + "-" + row.rowKey; - return newRow; - }); - data.viewData = data.rawData.map(function (row) { - return observable_1.isObservable(row) - ? data_1.createViewRow(id, row, data.rawData, column) - : { rowKey: row.rowKey, sortKey: row.sortKey, uniqueKey: row.uniqueKey }; - }); - filter_1.initFilter(store); - sort_1.unsort(store); - setColumnWidthsByText(store); -} -exports.setColumns = setColumns; -function resetColumnWidths(_a, widths) { - var column = _a.column; - column.visibleColumns.forEach(function (columnInfo, idx) { - columnInfo.baseWidth = widths[idx]; - columnInfo.autoResizing = false; - }); -} -exports.resetColumnWidths = resetColumnWidths; -function setColumnsHiddenValue(column, columnName, hidden) { - var allColumnMap = column.allColumnMap, complexColumnHeaders = column.complexColumnHeaders; - if (complexColumnHeaders.length) { - var complexColumn = common_1.findProp('name', columnName, complexColumnHeaders); - if (complexColumn) { - complexColumn.childNames.forEach(function (childName) { - allColumnMap[childName].hidden = hidden; - }); - return; - } - } - allColumnMap[columnName].hidden = hidden; -} -function hideColumn(store, columnName) { - var column = store.column, focus = store.focus; - if (focus.columnName === columnName) { - focus_1.initFocus(store); - } - selection_1.initSelection(store); - filter_1.unfilter(store, columnName); - sort_1.unsort(store, columnName); - setColumnsHiddenValue(column, columnName, true); -} -exports.hideColumn = hideColumn; -function showColumn(store, columnName) { - setColumnsHiddenValue(store.column, columnName, false); - rowSpan_1.updateRowSpan(store); -} -exports.showColumn = showColumn; -function setComplexColumnHeaders(store, complexColumnHeaders) { - store.column.complexColumnHeaders = complexColumnHeaders; -} -exports.setComplexColumnHeaders = setComplexColumnHeaders; -function changeColumnHeadersByName(_a, columnsMap) { - var column = _a.column; - var complexColumnHeaders = column.complexColumnHeaders, allColumnMap = column.allColumnMap; - Object.keys(columnsMap).forEach(function (columnName) { - var col = allColumnMap[columnName]; - if (col) { - col.header = columnsMap[columnName]; - } - if (complexColumnHeaders.length) { - var complexCol = common_1.findProp('name', columnName, complexColumnHeaders); - if (complexCol) { - complexCol.header = columnsMap[columnName]; - } - } - }); - observable_1.notify(column, 'allColumns'); -} -exports.changeColumnHeadersByName = changeColumnHeadersByName; -function setAutoResizingColumnWidths(store, targetData) { - var autoResizingColumn = store.column.autoResizingColumn; - var rawData = targetData || store.data.rawData; - if (!rawData.length || !autoResizingColumn.length) { - return; - } - data_2.initMaxTextMap(); - var maxTextMap = data_2.getMaxTextMap(); - rawData.forEach(function (row) { - autoResizingColumn.forEach(function (columnInfo) { - var name = columnInfo.name; - var formattedValue = data_2.createFormattedValue(row, columnInfo); - if (!maxTextMap[name] || maxTextMap[name].formattedValue.length < formattedValue.length) { - data_2.setMaxColumnTextMap(name, formattedValue, row); - } - }); - }); - setColumnWidthsByText(store); -} -exports.setAutoResizingColumnWidths = setAutoResizingColumnWidths; -function setColumnWidthsByText(store) { - var autoResizingColumn = store.column.autoResizingColumn; - var bodyArea = document.querySelector("." + dom_1.cls('rside-area') + " ." + dom_1.cls('body-container') + " ." + dom_1.cls('table')); - if (store.data.rawData.length && autoResizingColumn.length) { - autoResizingColumn.forEach(function (_a) { - var name = _a.name; - setColumnWidthByText(store, name, bodyArea); - }); - } -} -exports.setColumnWidthsByText = setColumnWidthsByText; -function setColumnWidthByText(_a, columnName, bodyArea) { - var data = _a.data, column = _a.column; - var allColumnMap = column.allColumnMap, treeColumnName = column.treeColumnName, treeIcon = column.treeIcon, treeIndentWidth = column.treeIndentWidth; - var maxTextMap = data_2.getMaxTextMap(); - var _b = maxTextMap[columnName], formattedValue = _b.formattedValue, row = _b.row; - var width = dom_1.getTextWidth(formattedValue, bodyArea); - if (treeColumnName) { - width += - tree_1.getTreeIndentWidth(tree_2.getDepth(data.rawData, row), treeIndentWidth, treeIcon) + - constant_1.TREE_CELL_HORIZONTAL_PADDING; - } - allColumnMap[columnName].baseWidth = Math.max(allColumnMap[columnName].minWidth, width); - allColumnMap[columnName].fixedWidth = true; -} -function moveColumn(store, columnName, targetIndex) { - var column = store.column; - var allColumns = column.allColumns; - if (!column_3.isAllColumnsVisible(column) || column.complexColumnHeaders.length > 0) { - return; - } - var originIndex = common_1.findIndex(function (_a) { - var name = _a.name; - return name === columnName; - }, allColumns); - var columnToMove = allColumns[originIndex]; - var targetColumnName = allColumns[targetIndex].name; - if (columnName === targetColumnName || - column_2.isRowHeader(targetColumnName) || - tree_2.isTreeColumnName(column, targetColumnName)) { - return; - } - focus_1.setFocusInfo(store, null, null, false); - selection_1.initSelection(store); - allColumns.splice(originIndex, 1); - allColumns.splice(targetIndex, 0, columnToMove); -} -exports.moveColumn = moveColumn; - - -/***/ }), -/* 33 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.create = exports.createColumn = exports.createRelationColumns = exports.createColumnFilterOption = exports.validateRelationColumn = void 0; -var tslib_1 = __webpack_require__(1); -var observable_1 = __webpack_require__(5); -var column_1 = __webpack_require__(11); -var common_1 = __webpack_require__(0); -var default_1 = __webpack_require__(68); -var manager_1 = __webpack_require__(69); -var rowHeaderInput_1 = __webpack_require__(76); -var rowHeaderDraggable_1 = __webpack_require__(77); -var constant_1 = __webpack_require__(10); -var DEF_ROW_HEADER_INPUT = ''; -var ROW_HEADER = 40; -var COLUMN = 50; -var rowHeadersMap = { - rowNum: '_number', - checkbox: '_checked', - draggable: '_draggable', -}; -function validateRelationColumn(columnInfos) { - var checked = {}; - function checkCircularRelation(column, relations) { - var name = column.name, relationMap = column.relationMap; - relations.push(name); - checked[name] = true; - if (common_1.uniq(relations).length !== relations.length) { - throw new Error('Cannot create circular reference between relation columns'); - } - if (!common_1.isUndefined(relationMap)) { - Object.keys(relationMap).forEach(function (targetName) { - var targetColumn = common_1.findProp('name', targetName, columnInfos); - // copy the 'relation' array to prevent to push all relation column into same array - checkCircularRelation(targetColumn, tslib_1.__spreadArrays(relations)); - }); - } - } - columnInfos.forEach(function (column) { - if (!checked[column.name]) { - checkCircularRelation(column, []); - } - }); -} -exports.validateRelationColumn = validateRelationColumn; -function createBuiltInEditorOptions(editorType, options) { - var editInfo = manager_1.editorMap[editorType]; - return { - type: editInfo[0], - options: tslib_1.__assign(tslib_1.__assign({}, editInfo[1]), options), - }; -} -function createEditorOptions(editor) { - if (common_1.isFunction(editor)) { - return { type: editor }; - } - if (common_1.isString(editor)) { - return createBuiltInEditorOptions(editor); - } - if (common_1.isObject(editor)) { - return common_1.isString(editor.type) - ? createBuiltInEditorOptions(editor.type, editor.options) - : editor; - } - return null; -} -function createRendererOptions(renderer) { - if (common_1.isFunction(renderer)) { - return { type: renderer }; - } - if (common_1.isObject(renderer) && !common_1.isFunction(renderer) && common_1.isFunction(renderer.type)) { - return renderer; - } - var defaultRenderer = { type: default_1.DefaultRenderer }; - return common_1.isObject(renderer) - ? tslib_1.__assign(tslib_1.__assign({}, defaultRenderer), renderer) - : defaultRenderer; -} -function createTreeInfo(treeColumnOptions, name) { - if (treeColumnOptions && treeColumnOptions.name === name) { - var _a = treeColumnOptions.useIcon, useIcon = _a === void 0 ? true : _a; - return { tree: { useIcon: useIcon } }; - } - return null; -} -function createRelationMap(relations) { - var relationMap = {}; - relations.forEach(function (relation) { - var editable = relation.editable, disabled = relation.disabled, listItems = relation.listItems, _a = relation.targetNames, targetNames = _a === void 0 ? [] : _a; - targetNames.forEach(function (targetName) { - relationMap[targetName] = { - editable: editable, - disabled: disabled, - listItems: listItems, - }; - }); - }); - return relationMap; -} -function createColumnHeaderInfo(name, columnHeaderInfo) { - var columnHeaders = columnHeaderInfo.columnHeaders, defaultAlign = columnHeaderInfo.align, defaultVAlign = columnHeaderInfo.valign; - var columnOption = common_1.findProp('name', name, columnHeaders); - var headerAlign = columnOption && columnOption.align ? columnOption.align : defaultAlign; - var headerVAlign = columnOption && columnOption.valign ? columnOption.valign : defaultVAlign; - var headerRenderer = columnOption && columnOption.renderer ? columnOption.renderer : null; - return { - headerAlign: headerAlign, - headerVAlign: headerVAlign, - headerRenderer: headerRenderer, - }; -} -function createColumnFilterOption(filter) { - var defaultOption = { - type: common_1.isObject(filter) ? filter.type : filter, - showApplyBtn: false, - showClearBtn: false, - }; - if (common_1.isString(filter)) { - if (filter === 'select') { - return tslib_1.__assign(tslib_1.__assign({}, defaultOption), { operator: 'OR' }); - } - } - if (common_1.isObject(filter)) { - return tslib_1.__assign(tslib_1.__assign({}, defaultOption), (filter.type === 'select' - ? common_1.omit(filter, 'showApplyBtn', 'showClearBtn', 'operator', 'options') - : filter)); - } - return defaultOption; -} -exports.createColumnFilterOption = createColumnFilterOption; -function createRelationColumns(relations) { - var relationColumns = []; - relations.forEach(function (relation) { - var _a = relation.targetNames, targetNames = _a === void 0 ? [] : _a; - targetNames.forEach(function (targetName) { - relationColumns.push(targetName); - }); - }); - return relationColumns; -} -exports.createRelationColumns = createRelationColumns; -// eslint-disable-next-line max-params -function createColumn(column, columnOptions, relationColumns, gridCopyOptions, treeColumnOptions, columnHeaderInfo, disabled) { - var name = column.name, header = column.header, width = column.width, minWidth = column.minWidth, align = column.align, hidden = column.hidden, resizable = column.resizable, editor = column.editor, renderer = column.renderer, relations = column.relations, sortable = column.sortable, sortingType = column.sortingType, copyOptions = column.copyOptions, validation = column.validation, formatter = column.formatter, onBeforeChange = column.onBeforeChange, onAfterChange = column.onAfterChange, whiteSpace = column.whiteSpace, ellipsis = column.ellipsis, valign = column.valign, defaultValue = column.defaultValue, escapeHTML = column.escapeHTML, ignored = column.ignored, filter = column.filter, className = column.className, comparator = column.comparator; - var editorOptions = createEditorOptions(editor); - var rendererOptions = createRendererOptions(renderer); - var filterOptions = filter ? createColumnFilterOption(filter) : null; - var _a = createColumnHeaderInfo(name, columnHeaderInfo), headerAlign = _a.headerAlign, headerVAlign = _a.headerVAlign, headerRenderer = _a.headerRenderer; - var useRowSpanOption = column.rowSpan && !treeColumnOptions.name && !common_1.includes(relationColumns, column.name); - var rowSpan = useRowSpanOption ? column.rowSpan : false; - return observable_1.observable(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({ name: name, - escapeHTML: escapeHTML, header: header || name, hidden: Boolean(hidden), resizable: common_1.isUndefined(resizable) ? Boolean(columnOptions.resizable) : Boolean(resizable), align: align || 'left', fixedWidth: typeof width === 'number', copyOptions: tslib_1.__assign(tslib_1.__assign({}, gridCopyOptions), copyOptions), baseWidth: (width === 'auto' ? 0 : width) || 0, minWidth: minWidth || columnOptions.minWidth || COLUMN, relationMap: createRelationMap(relations || []), related: common_1.includes(relationColumns, name), sortable: sortable, sortingType: sortingType || 'asc', validation: validation ? tslib_1.__assign({}, validation) : {}, renderer: rendererOptions, formatter: formatter, - onBeforeChange: onBeforeChange, - onAfterChange: onAfterChange, - whiteSpace: whiteSpace, - ellipsis: ellipsis, valign: valign || 'middle', defaultValue: defaultValue, - ignored: ignored }, (!!editorOptions && { editor: editorOptions })), createTreeInfo(treeColumnOptions, name)), { headerAlign: headerAlign, - headerVAlign: headerVAlign, filter: filterOptions, headerRenderer: headerRenderer, - className: className, - disabled: disabled, - comparator: comparator, autoResizing: width === 'auto', rowSpan: rowSpan })); -} -exports.createColumn = createColumn; -function createRowHeader(data, columnHeaderInfo) { - var rowHeader = common_1.isString(data) - ? { name: rowHeadersMap[data] } - : tslib_1.__assign({ name: rowHeadersMap[data.type] }, common_1.omit(data, 'type')); - var name = rowHeader.name, header = rowHeader.header, align = rowHeader.align, valign = rowHeader.valign, renderer = rowHeader.renderer, width = rowHeader.width, minWidth = rowHeader.minWidth; - var baseMinWith = common_1.isNumber(minWidth) ? minWidth : ROW_HEADER; - var baseWidth = (width === 'auto' ? baseMinWith : width) || baseMinWith; - var rowNumColumn = column_1.isRowNumColumn(name); - var defaultHeader = rowNumColumn ? 'No. ' : DEF_ROW_HEADER_INPUT; - var rendererOptions = renderer || { - type: rowNumColumn ? default_1.DefaultRenderer : rowHeaderInput_1.RowHeaderInputRenderer, - }; - var _a = createColumnHeaderInfo(name, columnHeaderInfo), headerAlign = _a.headerAlign, headerVAlign = _a.headerVAlign, headerRenderer = _a.headerRenderer; - return observable_1.observable({ - name: name, - header: header || defaultHeader, - hidden: false, - resizable: false, - align: align || 'center', - valign: valign || 'middle', - renderer: createRendererOptions(rendererOptions), - fixedWidth: true, - baseWidth: baseWidth, - escapeHTML: false, - minWidth: baseMinWith, - headerAlign: headerAlign, - headerVAlign: headerVAlign, - headerRenderer: headerRenderer, - autoResizing: false, - }); -} -function createComplexColumnHeaders(column, columnHeaderInfo) { - var header = column.header, name = column.name, childNames = column.childNames, renderer = column.renderer, hideChildHeaders = column.hideChildHeaders, _a = column.resizable, resizable = _a === void 0 ? false : _a; - var headerAlign = column.headerAlign || columnHeaderInfo.align; - var headerVAlign = column.headerVAlign || columnHeaderInfo.valign; - return observable_1.observable({ - header: header, - name: name, - childNames: childNames, - headerAlign: headerAlign, - headerVAlign: headerVAlign, - headerRenderer: renderer || null, - hideChildHeaders: hideChildHeaders, - resizable: resizable, - }); -} -function createDraggableRowHeader(rowHeaderColumn) { - var renderer = common_1.isObject(rowHeaderColumn) - ? rowHeaderColumn.renderer - : { type: rowHeaderDraggable_1.RowHeaderDraggableRenderer }; - var draggableColumn = { - name: '_draggable', - header: '', - hidden: false, - resizable: false, - align: 'center', - valign: 'middle', - renderer: createRendererOptions(renderer), - baseWidth: ROW_HEADER, - minWidth: ROW_HEADER, - fixedWidth: true, - autoResizing: false, - escapeHTML: false, - headerAlign: 'center', - headerVAlign: 'middle', - }; - return draggableColumn; -} -function create(_a) { - var columns = _a.columns, columnOptions = _a.columnOptions, rowHeaders = _a.rowHeaders, copyOptions = _a.copyOptions, keyColumnName = _a.keyColumnName, treeColumnOptions = _a.treeColumnOptions, complexColumns = _a.complexColumns, align = _a.align, valign = _a.valign, columnHeaders = _a.columnHeaders, disabled = _a.disabled, draggable = _a.draggable; - var relationColumns = columns.reduce(function (acc, _a) { - var relations = _a.relations; - acc = acc.concat(createRelationColumns(relations || [])); - return acc.filter(function (columnName, idx) { return acc.indexOf(columnName) === idx; }); - }, []); - var columnHeaderInfo = { columnHeaders: columnHeaders, align: align, valign: valign }; - var rowHeaderInfos = []; - if (draggable) { - var rowHeaderColumn = null; - var index = common_1.findIndex(function (rowHeader) { - return (common_1.isString(rowHeader) && rowHeader === 'draggable') || - rowHeader.type === 'draggable'; - }, rowHeaders); - if (index !== -1) { - rowHeaderColumn = rowHeaders.splice(index, 1)[0]; - } - rowHeaderInfos.push(createDraggableRowHeader(rowHeaderColumn)); - } - rowHeaders.forEach(function (rowHeader) { - return rowHeaderInfos.push(createRowHeader(rowHeader, columnHeaderInfo)); - }); - var columnInfos = columns.map(function (column) { - return createColumn(column, columnOptions, relationColumns, copyOptions, treeColumnOptions, columnHeaderInfo, !!(disabled || column.disabled)); - }); - validateRelationColumn(columnInfos); - var allColumns = rowHeaderInfos.concat(columnInfos); - var treeColumnName = treeColumnOptions.name, _b = treeColumnOptions.useIcon, treeIcon = _b === void 0 ? true : _b, _c = treeColumnOptions.useCascadingCheckbox, treeCascadingCheckbox = _c === void 0 ? true : _c, _d = treeColumnOptions.indentWidth, treeIndentWidth = _d === void 0 ? constant_1.TREE_INDENT_WIDTH : _d; - var complexColumnHeaders = complexColumns.map(function (column) { - return createComplexColumnHeaders(column, columnHeaderInfo); - }); - return observable_1.observable(tslib_1.__assign({ keyColumnName: keyColumnName, - allColumns: allColumns, - complexColumnHeaders: complexColumnHeaders, - columnHeaderInfo: columnHeaderInfo, frozenCount: columnOptions.frozenCount || 0, draggable: draggable, dataForColumnCreation: { - copyOptions: copyOptions, - columnOptions: columnOptions, - treeColumnOptions: treeColumnOptions, - relationColumns: relationColumns, - rowHeaders: rowHeaderInfos, - }, get allColumnMap() { - return common_1.createMapFromArray(this.allColumns, 'name'); - }, get rowHeaderCount() { - return rowHeaderInfos.length; - }, get visibleColumns() { - return this.allColumns.slice(this.rowHeaderCount).filter(function (_a) { - var hidden = _a.hidden; - return !hidden; - }); - }, - get visibleColumnsWithRowHeader() { - return this.allColumns.filter(function (_a) { - var hidden = _a.hidden; - return !hidden; - }); - }, get visibleColumnsBySide() { - return { - L: this.visibleColumns.slice(0, this.frozenCount), - R: this.visibleColumns.slice(this.frozenCount), - }; - }, get visibleColumnsBySideWithRowHeader() { - var frozenLastIndex = this.rowHeaderCount + this.frozenCount; - return { - L: this.visibleColumnsWithRowHeader.slice(0, frozenLastIndex), - R: this.visibleColumnsWithRowHeader.slice(frozenLastIndex), - }; - }, - get visibleRowSpanEnabledColumns() { - return this.visibleColumns.filter(function (_a) { - var rowSpan = _a.rowSpan; - return rowSpan; - }); - }, - get defaultValues() { - return this.allColumns - .filter(function (_a) { - var defaultValue = _a.defaultValue; - return Boolean(defaultValue); - }) - .map(function (_a) { - var name = _a.name, defaultValue = _a.defaultValue; - return ({ name: name, value: defaultValue }); - }); - }, get visibleFrozenCount() { - return this.visibleColumnsBySideWithRowHeader.L.length; - }, get validationColumns() { - return this.allColumns.filter(function (_a) { - var validation = _a.validation; - return !common_1.isEmpty(validation); - }); - }, - get ignoredColumns() { - return this.allColumns.filter(function (_a) { - var ignored = _a.ignored; - return ignored; - }).map(function (_a) { - var name = _a.name; - return name; - }); - }, - get columnMapWithRelation() { - // copy the array to prevent to affect allColumns property - var copiedColumns = tslib_1.__spreadArrays(this.allColumns); - copiedColumns.sort(function (columnA, columnB) { - var _a, _b; - var hasRelationMapA = !common_1.isEmpty(columnA.relationMap); - var hasRelationMapB = !common_1.isEmpty(columnB.relationMap); - if (hasRelationMapA && hasRelationMapB) { - if ((_a = columnA.relationMap) === null || _a === void 0 ? void 0 : _a[columnB.name]) { - return -1; - } - return ((_b = columnB.relationMap) === null || _b === void 0 ? void 0 : _b[columnA.name]) ? 1 : 0; - } - if (hasRelationMapA) { - return -1; - } - return hasRelationMapB ? 1 : 0; - }); - return common_1.createMapFromArray(copiedColumns, 'name'); - }, get columnsWithoutRowHeader() { - return this.allColumns.slice(this.rowHeaderCount); - }, get emptyRow() { - return this.columnsWithoutRowHeader.reduce(function (acc, _a) { - var _b; - var name = _a.name; - return (tslib_1.__assign(tslib_1.__assign({}, acc), (_b = {}, _b[name] = null, _b))); - }, {}); - }, - get autoResizingColumn() { - return this.columnsWithoutRowHeader.filter(function (_a) { - var autoResizing = _a.autoResizing; - return autoResizing; - }); - } }, (treeColumnName && { treeColumnName: treeColumnName, treeIcon: treeIcon, treeCascadingCheckbox: treeCascadingCheckbox, treeIndentWidth: treeIndentWidth }))); -} -exports.create = create; - - -/***/ }), -/* 34 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.getListItems = void 0; -var common_1 = __webpack_require__(0); -function getListItems(props) { - var _a; - var _b = (_a = props.columnInfo.editor.options) !== null && _a !== void 0 ? _a : {}, listItems = _b.listItems, relationListItemMap = _b.relationListItemMap; - if (!common_1.isEmpty(relationListItemMap) && Array.isArray(relationListItemMap[props.rowKey])) { - return relationListItemMap[props.rowKey]; - } - return listItems; -} -exports.getListItems = getListItems; - - -/***/ }), -/* 35 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.setLayerPosition = exports.moveLayer = exports.getContainerElement = exports.setOpacity = void 0; -var common_1 = __webpack_require__(0); -var dom_1 = __webpack_require__(2); -var INDENT = 5; -var SCROLL_BAR_WIDTH = 17; -var SCROLL_BAR_HEIGHT = 17; -function exceedGridViewport(top, left, _a) { - var bodyHeight = _a.bodyHeight, bodyWidth = _a.bodyWidth, headerHeight = _a.headerHeight, leftSideWidth = _a.leftSideWidth; - return !(common_1.isBetween(top, headerHeight, bodyHeight + headerHeight) && - common_1.isBetween(left, leftSideWidth, bodyWidth)); -} -function setOpacity(el, opacity) { - el.style.opacity = String(opacity); -} -exports.setOpacity = setOpacity; -function getContainerElement(el) { - return dom_1.findParentByClassName(el, 'container'); -} -exports.getContainerElement = getContainerElement; -function moveLayer(layerEl, initLayerPos, gridRect) { - var top = initLayerPos.top, left = initLayerPos.left; - var initBodyScrollTop = gridRect.initBodyScrollTop, initBodyScrollLeft = gridRect.initBodyScrollLeft, bodyScrollTop = gridRect.bodyScrollTop, bodyScrollLeft = gridRect.bodyScrollLeft; - var newTop = top + initBodyScrollTop - bodyScrollTop; - var newLeft = left + initBodyScrollLeft - bodyScrollLeft; - if (exceedGridViewport(newTop, newLeft, gridRect)) { - layerEl.style.zIndex = '-100'; - layerEl.style.top = '0px'; - layerEl.style.left = '0px'; - } - else { - layerEl.style.zIndex = ''; - layerEl.style.top = newTop + "px"; - layerEl.style.left = newLeft + "px"; - } -} -exports.moveLayer = moveLayer; -function setLayerPosition(innerEl, layerEl, childEl, startBottom) { - if (startBottom === void 0) { startBottom = false; } - var containerRect = getContainerElement(innerEl).getBoundingClientRect(); - var innerHeight = window.innerHeight, innerWidth = window.innerWidth; - var _a = innerEl.getBoundingClientRect(), left = _a.left, top = _a.top, bottom = _a.bottom; - var _b = layerEl.getBoundingClientRect(), layerHeight = _b.height, layerWidth = _b.width; - var layerTop = startBottom ? bottom : top + INDENT; - var childElHeight = 0; - var childElWidth = 0; - if (childEl) { - var _c = childEl.getBoundingClientRect(), height = _c.height, width = _c.width; - childElHeight = height; - childElWidth = width; - } - var totalHeight = layerHeight + childElHeight; - var totalWidth = layerWidth || childElWidth; - layerEl.style.top = (layerTop + totalHeight > innerHeight - SCROLL_BAR_WIDTH - ? innerHeight - totalHeight - INDENT - SCROLL_BAR_WIDTH - : layerTop) - containerRect.top + "px"; - layerEl.style.left = (left + totalWidth > innerWidth - SCROLL_BAR_HEIGHT - ? innerWidth - totalWidth - INDENT - SCROLL_BAR_HEIGHT - : left) - containerRect.left + "px"; -} -exports.setLayerPosition = setLayerPosition; - - -/***/ }), -/* 36 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.resetFilterState = exports.emitAfterFilter = exports.initFilter = exports.setFilter = exports.unfilter = exports.clearFilter = exports.updateFilters = exports.filter = exports.setActiveFilterState = exports.clearActiveFilterState = exports.applyActiveFilterState = exports.setActiveColumnAddress = exports.setActiveSelectFilterState = exports.toggleSelectAllCheckbox = exports.setActiveFilterOperator = void 0; -var observable_1 = __webpack_require__(5); -var common_1 = __webpack_require__(0); -var filter_1 = __webpack_require__(30); -var data_1 = __webpack_require__(6); -var column_1 = __webpack_require__(33); -var viewport_1 = __webpack_require__(25); -var selection_1 = __webpack_require__(16); -var focus_1 = __webpack_require__(18); -var eventBus_1 = __webpack_require__(7); -var column_2 = __webpack_require__(12); -var data_2 = __webpack_require__(14); -var summary_1 = __webpack_require__(26); -var filter_2 = __webpack_require__(49); -var pagination_1 = __webpack_require__(37); -var rowSpan_1 = __webpack_require__(24); -function initLayerAndScrollAfterFiltering(store) { - var data = store.data; - viewport_1.initScrollPosition(store); - selection_1.initSelection(store); - focus_1.initFocus(store); - pagination_1.updatePageOptions(store, { totalCount: data.filteredRawData.length, page: 1 }); - data_2.updateHeights(store); - data_2.setCheckedAllRows(store); -} -function setActiveFilterOperator(store, operator) { - var column = store.column, filterLayerState = store.filterLayerState; - var activeFilterState = filterLayerState.activeFilterState; - var columnInfo = column.allColumnMap[activeFilterState.columnName]; - var columnFilterOption = columnInfo.filter; - activeFilterState.operator = operator; - if (!columnFilterOption.showApplyBtn) { - columnFilterOption.operator = operator; - applyActiveFilterState(store); - } -} -exports.setActiveFilterOperator = setActiveFilterOperator; -function toggleSelectAllCheckbox(store, checked) { - var column = store.column, filterLayerState = store.filterLayerState, data = store.data; - var activeFilterState = filterLayerState.activeFilterState; - var columnName = activeFilterState.columnName; - var columnInfo = column.allColumnMap[columnName]; - if (checked) { - var columnData = data_1.getUniqColumnData(data.rawData, column, columnName); - activeFilterState.state = columnData.map(function (value) { return ({ code: 'eq', value: value }); }); - } - else { - activeFilterState.state = []; - } - if (!columnInfo.filter.showApplyBtn) { - applyActiveFilterState(store); - } -} -exports.toggleSelectAllCheckbox = toggleSelectAllCheckbox; -function setActiveSelectFilterState(store, value, checked) { - var column = store.column, filterLayerState = store.filterLayerState; - var activeFilterState = filterLayerState.activeFilterState; - var columnName = filterLayerState.activeColumnAddress.name; - var columnInfo = column.allColumnMap[columnName]; - if (checked) { - activeFilterState.state.push({ value: value, code: 'eq' }); - } - else { - var index = common_1.findPropIndex('value', value, activeFilterState.state); - activeFilterState.state.splice(index, 1); - } - if (!columnInfo.filter.showApplyBtn) { - applyActiveFilterState(store); - } - else { - observable_1.notify(filterLayerState, 'activeFilterState'); - } -} -exports.setActiveSelectFilterState = setActiveSelectFilterState; -function setActiveColumnAddress(store, address) { - var data = store.data, column = store.column, filterLayerState = store.filterLayerState; - var filters = data.filters, filteredRawData = data.filteredRawData; - filterLayerState.activeColumnAddress = address; - if (!address) { - filterLayerState.activeFilterState = null; - return; - } - var columnName = address.name; - var _a = column.allColumnMap[columnName].filter, type = _a.type, operator = _a.operator; - var initialState = []; - if (filters) { - var prevFilter = common_1.findProp('columnName', columnName, filters); - if (prevFilter) { - initialState = prevFilter.state; - } - } - if (type === 'select' && !initialState.length) { - var columnData = data_1.getUniqColumnData(filteredRawData, column, columnName); - initialState = columnData.map(function (value) { return ({ code: 'eq', value: value }); }); - } - filterLayerState.activeFilterState = { - columnName: columnName, - type: type, - operator: operator, - state: initialState, - }; -} -exports.setActiveColumnAddress = setActiveColumnAddress; -function applyActiveFilterState(store) { - var filterLayerState = store.filterLayerState, data = store.data, column = store.column; - var columnName = filterLayerState.activeColumnAddress.name; - var _a = filterLayerState.activeFilterState, state = _a.state, type = _a.type, operator = _a.operator; - var validState = state.filter(function (item) { return String(item.value).length; }); - if (type !== 'select' && !validState.length) { - unfilter(store, columnName); - return; - } - filterLayerState.activeFilterState.state = state; - if (type === 'select') { - var columnData = data_1.getUniqColumnData(data.rawData, column, columnName); - if (columnData.length === state.length) { - unfilter(store, columnName); - return; - } - } - var fns = state.map(function (_a) { - var code = _a.code, value = _a.value; - return filter_1.getFilterConditionFn(code, value, type); - }); - filter(store, columnName, filter_1.composeConditionFn(fns, operator), state); -} -exports.applyActiveFilterState = applyActiveFilterState; -function clearActiveFilterState(store) { - var filterLayerState = store.filterLayerState; - var activeFilterState = filterLayerState.activeFilterState; - activeFilterState.state = []; - unfilter(store, activeFilterState.columnName); -} -exports.clearActiveFilterState = clearActiveFilterState; -function setActiveFilterState(store, state, filterIndex) { - var column = store.column, filterLayerState = store.filterLayerState; - var columnName = filterLayerState.activeColumnAddress.name; - var columnInfo = column.allColumnMap[columnName]; - filterLayerState.activeFilterState.state[filterIndex] = state; - if (!columnInfo.filter.showApplyBtn) { - applyActiveFilterState(store); - } - else { - observable_1.notify(filterLayerState, 'activeFilterState'); - } -} -exports.setActiveFilterState = setActiveFilterState; -function filter(store, columnName, conditionFn, state) { - var column = store.column; - var columnFilterInfo = column.allColumnMap[columnName].filter; - if (column_2.isComplexHeader(column, columnName) || - !columnFilterInfo || - column_2.isHiddenColumn(column, columnName)) { - return; - } - var type = columnFilterInfo.type, operator = columnFilterInfo.operator; - var nextColumnFilterState = { columnName: columnName, type: type, conditionFn: conditionFn, state: state, operator: operator }; - var gridEvent = emitBeforeFilter(store, 'beforeFilter', nextColumnFilterState); - if (gridEvent.isStopped()) { - return; - } - pagination_1.updatePageOptions(store, { page: 1 }); - updateFilters(store, columnName, nextColumnFilterState); - initLayerAndScrollAfterFiltering(store); - summary_1.updateAllSummaryValues(store); - emitAfterFilter(store, 'afterFilter', columnName); - rowSpan_1.updateRowSpan(store); -} -exports.filter = filter; -function updateFilters(_a, columnName, nextColumnFilterState) { - var data = _a.data; - var filters = data.filters || []; - var filterIndex = common_1.findPropIndex('columnName', columnName, filters); - if (filterIndex >= 0) { - filters.splice(filterIndex, 1, nextColumnFilterState); - } - else { - data.filters = filters.concat(nextColumnFilterState); - } -} -exports.updateFilters = updateFilters; -function clearFilter(_a, columnName) { - var data = _a.data; - var filters = data.filters || []; - var filterIndex = common_1.findPropIndex('columnName', columnName, filters); - if (filterIndex >= 0) { - if (filters.length === 1) { - data.filters = null; - } - else { - filters.splice(filterIndex, 1); - } - } -} -exports.clearFilter = clearFilter; -function clearAll(store) { - var gridEvent = emitBeforeFilter(store, 'beforeUnfilter', { columnName: null }); - if (gridEvent.isStopped()) { - return; - } - initFilter(store); - initLayerAndScrollAfterFiltering(store); - summary_1.updateAllSummaryValues(store); - emitAfterFilter(store, 'afterUnfilter', null); -} -function unfilter(store, columnName) { - var data = store.data, column = store.column; - var filters = data.filters; - if (!columnName) { - clearAll(store); - return; - } - if (column_2.isComplexHeader(column, columnName) || column_2.isHiddenColumn(column, columnName)) { - return; - } - if (filters) { - var gridEvent = emitBeforeFilter(store, 'beforeUnfilter', { columnName: columnName }); - if (gridEvent.isStopped()) { - return; - } - clearFilter(store, columnName); - initLayerAndScrollAfterFiltering(store); - summary_1.updateAllSummaryValues(store); - emitAfterFilter(store, 'afterUnfilter', columnName); - } - rowSpan_1.updateRowSpan(store); -} -exports.unfilter = unfilter; -function setFilter(store, columnName, filterOpt) { - var column = store.column; - var filterOptions = column_1.createColumnFilterOption(filterOpt); - var index = common_1.findPropIndex('name', columnName, column.allColumns); - if (index !== -1) { - if (column.allColumns[index].filter) { - unfilter(store, columnName); - } - column.allColumns[index].filter = filterOptions; - observable_1.notify(column, 'allColumns'); - } -} -exports.setFilter = setFilter; -function initFilter(store) { - var filterLayerState = store.filterLayerState, data = store.data; - filterLayerState.activeFilterState = null; - filterLayerState.activeColumnAddress = null; - data.filters = null; -} -exports.initFilter = initFilter; -function emitBeforeFilter(store, eventType, eventParams) { - var eventBus = eventBus_1.getEventBus(store.id); - var gridEvent = filter_2.createFilterEvent(store, eventType, eventParams); - eventBus.trigger(eventType, gridEvent); - return gridEvent; -} -function emitAfterFilter(store, eventType, columnName) { - var id = store.id; - var eventBus = eventBus_1.getEventBus(id); - // @TODO: `filter` event will be deprecated. This event is replaced with `afterFilter` event - var eventTypes = (eventType === 'afterFilter' - ? ['afterFilter', 'filter'] - : ['afterUnfilter']); - eventTypes.forEach(function (type) { - var gridEvent = filter_2.createFilterEvent(store, type, { columnName: columnName }); - eventBus.trigger(type, gridEvent); - }); -} -exports.emitAfterFilter = emitAfterFilter; -function resetFilterState(store, filterState) { - if (filterState) { - var columnFilterState = filterState.columnFilterState, columnName = filterState.columnName; - var columnFilterOption = store.column.allColumnMap[columnName].filter; - if (columnFilterOption) { - if (columnFilterState) { - var nextState = { - conditionFn: function () { return true; }, - type: columnFilterOption.type, - state: columnFilterState, - columnName: columnName, - operator: columnFilterOption.operator, - }; - updateFilters(store, columnName, nextState); - } - else { - clearFilter(store, columnName); - } - } - } - else { - initFilter(store); - } -} -exports.resetFilterState = resetFilterState; - - -/***/ }), -/* 37 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.resetPageState = exports.updatePageWhenRemovingRow = exports.movePage = exports.updatePageOptions = void 0; -var tslib_1 = __webpack_require__(1); -var common_1 = __webpack_require__(0); -var data_1 = __webpack_require__(6); -var viewport_1 = __webpack_require__(25); -var selection_1 = __webpack_require__(16); -var focus_1 = __webpack_require__(18); -var data_2 = __webpack_require__(14); -var summary_1 = __webpack_require__(26); -var observable_1 = __webpack_require__(5); -function updatePageOptions(_a, pageOptions, forceUpdatePage) { - var data = _a.data; - if (forceUpdatePage === void 0) { forceUpdatePage = false; } - var orgPageOptions = data.pageOptions; - if (!common_1.isEmpty(orgPageOptions)) { - // if infinite scrolling is applied, page number should be not reset to know the last loaded page - if (!forceUpdatePage && data_1.isScrollPagination(data)) { - delete pageOptions.page; - } - var newPageOptions = tslib_1.__assign(tslib_1.__assign({}, orgPageOptions), pageOptions); - if (!common_1.shallowEqual(newPageOptions, orgPageOptions)) { - data.pageOptions = newPageOptions; - } - } -} -exports.updatePageOptions = updatePageOptions; -function movePage(store, page) { - var data = store.data; - viewport_1.initScrollPosition(store); - data.pageOptions.page = page; - observable_1.notify(data, 'pageOptions'); - data_2.updateHeights(store); - selection_1.initSelection(store); - focus_1.initFocus(store); - data_2.setCheckedAllRows(store); - summary_1.updateAllSummaryValues(store); -} -exports.movePage = movePage; -function updatePageWhenRemovingRow(store, deletedCount) { - var pageOptions = store.data.pageOptions; - if (!common_1.isEmpty(pageOptions)) { - var perPage = pageOptions.perPage, totalCount = pageOptions.totalCount, page = pageOptions.page; - var modifiedLastPage = Math.floor((totalCount - deletedCount) / perPage); - if ((totalCount - deletedCount) % perPage) { - modifiedLastPage += 1; - } - updatePageOptions(store, { - totalCount: totalCount - deletedCount, - page: (modifiedLastPage < page ? modifiedLastPage : page) || 1, - }, true); - } -} -exports.updatePageWhenRemovingRow = updatePageWhenRemovingRow; -function resetPageState(store, totalCount, pageState) { - var pageOptions = pageState ? common_1.pruneObject(pageState) : { page: 1, totalCount: totalCount }; - updatePageOptions(store, pageOptions, true); -} -exports.resetPageState = resetPageState; - - -/***/ }), -/* 38 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.findRowIndexByPosition = exports.findColumnIndexByPosition = exports.getColumnNameRange = exports.getOverflowFromMousePosition = void 0; -var tslib_1 = __webpack_require__(1); -var common_1 = __webpack_require__(0); -function getTotalColumnOffsets(widths, cellBorderWidth) { - var totalWidths = tslib_1.__spreadArrays(widths.L, widths.R); - var offsets = [0]; - for (var i = 1, len = totalWidths.length; i < len; i += 1) { - offsets.push(offsets[i - 1] + totalWidths[i - 1] + cellBorderWidth); - } - return offsets; -} -function getScrolledPosition(_a, dimension, leftSideWidth) { - var pageX = _a.pageX, pageY = _a.pageY, scrollLeft = _a.scrollLeft, scrollTop = _a.scrollTop; - var _b = getPositionFromBodyArea(pageX, pageY, dimension), bodyPositionX = _b.x, bodyPositionY = _b.y; - var scrollX = bodyPositionX > leftSideWidth ? scrollLeft : 0; - var scrolledPositionX = bodyPositionX + scrollX; - var scrolledPositionY = bodyPositionY + scrollTop; - return { - x: scrolledPositionX, - y: scrolledPositionY, - }; -} -function judgeOverflow(_a, _b) { - var containerX = _a.x, containerY = _a.y; - var bodyHeight = _b.bodyHeight, bodyWidth = _b.bodyWidth; - var overflowY = 0; - var overflowX = 0; - if (containerY < 0) { - overflowY = -1; - } - else if (containerY > bodyHeight) { - overflowY = 1; - } - if (containerX < 0) { - overflowX = -1; - } - else if (containerX > bodyWidth) { - overflowX = 1; - } - return { - x: overflowX, - y: overflowY, - }; -} -function getPositionFromBodyArea(pageX, pageY, dimension) { - var offsetLeft = dimension.offsetLeft, offsetTop = dimension.offsetTop, tableBorderWidth = dimension.tableBorderWidth, cellBorderWidth = dimension.cellBorderWidth, headerHeight = dimension.headerHeight, summaryHeight = dimension.summaryHeight, summaryPosition = dimension.summaryPosition; - var adjustedSummaryHeight = summaryPosition === 'top' ? summaryHeight : 0; - return { - x: pageX - offsetLeft, - y: pageY - - (offsetTop + headerHeight + adjustedSummaryHeight + cellBorderWidth + tableBorderWidth), - }; -} -function getOverflowFromMousePosition(pageX, pageY, bodyWidth, dimension) { - var bodyHeight = dimension.bodyHeight; - var _a = getPositionFromBodyArea(pageX, pageY, dimension), x = _a.x, y = _a.y; - return judgeOverflow({ x: x, y: y }, { bodyWidth: bodyWidth, bodyHeight: bodyHeight }); -} -exports.getOverflowFromMousePosition = getOverflowFromMousePosition; -function getColumnNameRange(store, dragStartData, dragData, elementInfo) { - var allColumns = store.column.allColumns; - var scrollTop = elementInfo.scrollTop, scrollLeft = elementInfo.scrollLeft; - var startPageX = dragStartData.pageX, startPageY = dragStartData.pageY; - var endPageX = dragData.pageX, endPageY = dragData.pageY; - var startViewInfo = { pageX: startPageX, pageY: startPageY, scrollTop: scrollTop, scrollLeft: scrollLeft }; - var endViewInfo = { pageX: endPageX, pageY: endPageY, scrollTop: scrollTop, scrollLeft: scrollLeft }; - var startColumnIndex = findColumnIndexByPosition(store, startViewInfo); - var endColumnIndex = findColumnIndexByPosition(store, endViewInfo); - var startColumnName = allColumns[startColumnIndex].name; - var endColumnName = allColumns[endColumnIndex].name; - return [startColumnName, endColumnName]; -} -exports.getColumnNameRange = getColumnNameRange; -function findColumnIndexByPosition(store, viewInfo) { - var dimension = store.dimension, columnCoords = store.columnCoords; - var widths = columnCoords.widths, areaWidth = columnCoords.areaWidth; - var totalColumnOffsets = getTotalColumnOffsets(widths, dimension.cellBorderWidth); - var scrolledPosition = getScrolledPosition(viewInfo, dimension, areaWidth.L); - return common_1.findOffsetIndex(totalColumnOffsets, scrolledPosition.x); -} -exports.findColumnIndexByPosition = findColumnIndexByPosition; -function findRowIndexByPosition(store, viewInfo) { - var dimension = store.dimension, columnCoords = store.columnCoords, rowCoords = store.rowCoords; - var areaWidth = columnCoords.areaWidth; - var scrolledPosition = getScrolledPosition(viewInfo, dimension, areaWidth.L); - return common_1.findOffsetIndex(rowCoords.offsets, scrolledPosition.y); -} -exports.findRowIndexByPosition = findRowIndexByPosition; - - -/***/ }), -/* 39 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ColGroup = void 0; -var tslib_1 = __webpack_require__(1); -var preact_1 = __webpack_require__(3); -var hoc_1 = __webpack_require__(4); -var dom_1 = __webpack_require__(2); -var ColGroupComp = /** @class */ (function (_super) { - tslib_1.__extends(ColGroupComp, _super); - function ColGroupComp() { - return _super !== null && _super.apply(this, arguments) || this; - } - ColGroupComp.prototype.render = function (_a) { - var _b; - var columns = _a.columns, widths = _a.widths, borderWidth = _a.borderWidth; - var attrs = (_b = {}, _b[dom_1.dataAttr.COLUMN_NAME] = name, _b); - return (preact_1.h("colgroup", null, columns.map(function (_a, idx) { - var name = _a.name; - return (preact_1.h("col", tslib_1.__assign({ key: name }, attrs, { style: { width: widths[idx] + borderWidth } }))); - }))); - }; - return ColGroupComp; -}(preact_1.Component)); -exports.ColGroup = hoc_1.connect(function (_a, _b) { - var _c; - var columnCoords = _a.columnCoords, viewport = _a.viewport, dimension = _a.dimension, column = _a.column; - var side = _b.side, useViewport = _b.useViewport; - return ({ - widths: useViewport && side === 'R' - ? (_c = columnCoords.widths[side]).slice.apply(_c, viewport.colRange) : columnCoords.widths[side], - columns: useViewport && side === 'R' - ? viewport.columns - : column.visibleColumnsBySideWithRowHeader[side], - borderWidth: dimension.cellBorderWidth, - }); -})(ColGroupComp); - - -/***/ }), -/* 40 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.downloadBlob = exports.isSupportMsSaveOrOpenBlob = exports.isMobile = exports.isEdge = void 0; -function isEdge() { - var rEdge = /Edge\/(\d+)\./; - return rEdge.exec(window.navigator.userAgent); -} -exports.isEdge = isEdge; -function isMobile() { - return /Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile|WPDesktop/i.test(navigator.userAgent); -} -exports.isMobile = isMobile; -function isSupportMsSaveOrOpenBlob() { - return !!window.navigator.msSaveOrOpenBlob; -} -exports.isSupportMsSaveOrOpenBlob = isSupportMsSaveOrOpenBlob; -function downloadBlob(blob, fileName) { - if (isSupportMsSaveOrOpenBlob()) { - window.navigator.msSaveOrOpenBlob(blob, fileName + ".csv"); - } - else { - var targetLink = document.createElement('a'); - targetLink.download = fileName + ".csv"; - if (typeof targetLink.download === 'undefined') { - targetLink.setAttribute('target', '_blank'); - } - targetLink.href = window.URL.createObjectURL(blob); - targetLink.click(); - } -} -exports.downloadBlob = downloadBlob; - - -/***/ }), -/* 41 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.getText = exports.copyDataToRange = exports.getRangeToPaste = void 0; -var tslib_1 = __webpack_require__(1); -var common_1 = __webpack_require__(0); -var data_1 = __webpack_require__(14); -var observable_1 = __webpack_require__(5); -function getCustomValue(customValue, value, rowAttrs, column) { - return typeof customValue === 'function' ? customValue(value, rowAttrs, column) : customValue; -} -function getTextWithCopyOptionsApplied(valueMap, rawData, column) { - var text = valueMap.value; - var copyOptions = column.copyOptions, editor = column.editor; - var editorOptions = editor && editor.options; - // priority: customValue > useListItemText > useFormattedValue > original Data - if (copyOptions) { - if (copyOptions.customValue) { - text = getCustomValue(copyOptions.customValue, valueMap.value, rawData, column); - } - else if (copyOptions.useListItemText && (editorOptions === null || editorOptions === void 0 ? void 0 : editorOptions.listItems)) { - var listItems_1 = editorOptions.listItems; - var value = valueMap.value; - var valueList = [value]; - var result_1 = []; - if (typeof value === 'string') { - valueList = value.split(','); - } - valueList.forEach(function (val) { - var listItem = common_1.find(function (item) { return item.value === val; }, listItems_1); - result_1.push(listItem ? listItem.text : val); - }); - text = result_1.join(','); - } - else if (copyOptions.useFormattedValue) { - text = "" + valueMap.formattedValue; - } - } - if (typeof text === 'undefined' || text === null) { - return ''; - } - return String(text); -} -function getObservableList(store, filteredViewData, start, end) { - var rowList = []; - for (var i = start; i <= end; i += 1) { - if (!observable_1.isObservable(filteredViewData[i].valueMap)) { - data_1.makeObservable(store, i, true); - if (i === end) { - observable_1.notify(store.data, 'rawData', 'filteredRawData', 'viewData', 'filteredViewData'); - } - } - rowList.push(filteredViewData[i]); - } - return rowList; -} -function getValuesToString(store, ranges) { - var visibleColumnsWithRowHeader = store.column.visibleColumnsWithRowHeader, _a = store.data, filteredViewData = _a.filteredViewData, filteredRawData = _a.filteredRawData; - var rowRange = ranges.rowRange, columnRange = ranges.columnRange; - if (!rowRange || !columnRange) { - return ''; - } - var rowList = getObservableList.apply(void 0, tslib_1.__spreadArrays([store, filteredViewData], rowRange)); - var columnInRange = visibleColumnsWithRowHeader.slice(columnRange[0], columnRange[1] + 1); - return rowList - .map(function (_a) { - var valueMap = _a.valueMap; - return columnInRange - .map(function (targetColumn) { - return getTextWithCopyOptionsApplied(valueMap[targetColumn.name], filteredRawData, targetColumn); - }) - .join('\t'); - }) - .join('\n'); -} -function getRangeToPaste(store, pasteData) { - var originalRange = store.selection.originalRange, _a = store.focus, totalColumnIndex = _a.totalColumnIndex, originalRowIndex = _a.originalRowIndex, visibleColumnsWithRowHeader = store.column.visibleColumnsWithRowHeader; - var startRowIndex, startColumnIndex; - if (originalRange) { - startRowIndex = originalRange.row[0]; - startColumnIndex = originalRange.column[0]; - } - else { - startRowIndex = originalRowIndex; - startColumnIndex = totalColumnIndex; - } - var endRowIndex = pasteData.length + startRowIndex - 1; - var endColumnIndex = Math.min(pasteData[0].length + startColumnIndex, visibleColumnsWithRowHeader.length) - 1; - return { - row: [startRowIndex, endRowIndex], - column: [startColumnIndex, endColumnIndex], - }; -} -exports.getRangeToPaste = getRangeToPaste; -function copyDataToRange(range, pasteData) { - var rowLength = range.row[1] - range.row[0] + 1; - var colLength = range.column[1] - range.column[0] + 1; - var dataRowLength = pasteData.length; - var dataColLength = pasteData[0].length; - var rowDupCount = Math.floor(rowLength / dataRowLength) - 1; - var colDupCount = Math.floor(colLength / dataColLength) - 1; - var result = tslib_1.__spreadArrays(pasteData); - for (var i = 0; i < rowDupCount; i += 1) { - pasteData.forEach(function (row) { - result.push(row.slice(0)); - }); - } - result.forEach(function (row) { - var rowData = row.slice(0); - for (var i = 0; i < colDupCount; i += 1) { - row.push.apply(row, rowData); - } - }); - return result; -} -exports.copyDataToRange = copyDataToRange; -function getText(store, ranges) { - var _a, _b; - var originalRange = store.selection.originalRange, _c = store.focus, originalRowIndex = _c.originalRowIndex, totalColumnIndex = _c.totalColumnIndex; - var rowRange = (_a = ranges === null || ranges === void 0 ? void 0 : ranges.rowRange) !== null && _a !== void 0 ? _a : originalRange === null || originalRange === void 0 ? void 0 : originalRange.row; - var columnRange = (_b = ranges === null || ranges === void 0 ? void 0 : ranges.columnRange) !== null && _b !== void 0 ? _b : originalRange === null || originalRange === void 0 ? void 0 : originalRange.column; - // set focus index when there is no selection area - if (common_1.isNil(rowRange) && !common_1.isNull(originalRowIndex)) { - rowRange = [originalRowIndex, originalRowIndex]; - } - if (common_1.isNil(columnRange) && !common_1.isNull(totalColumnIndex)) { - columnRange = [totalColumnIndex, totalColumnIndex]; - } - return getValuesToString(store, { rowRange: rowRange, columnRange: columnRange }); -} -exports.getText = getText; - - -/***/ }), -/* 42 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.createAjaxConfig = void 0; -var tslib_1 = __webpack_require__(1); -var common_1 = __webpack_require__(0); -function createAjaxConfig(target) { - var configKeys = [ - 'contentType', - 'withCredentials', - 'mimeType', - 'headers', - 'serializer', - ]; - return common_1.pick.apply(void 0, tslib_1.__spreadArrays([target], configKeys)); -} -exports.createAjaxConfig = createAjaxConfig; - - -/***/ }), -/* 43 */ -/***/ (function(module, exports, __webpack_require__) { - -/*! @license DOMPurify 2.3.9 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.3.9/LICENSE */ - -(function (global, factory) { - true ? module.exports = factory() : - undefined; -})(this, (function () { 'use strict'; - - function _typeof(obj) { - "@babel/helpers - typeof"; - - return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { - return typeof obj; - } : function (obj) { - return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; - }, _typeof(obj); - } - - function _setPrototypeOf(o, p) { - _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { - o.__proto__ = p; - return o; - }; - - return _setPrototypeOf(o, p); - } - - function _isNativeReflectConstruct() { - if (typeof Reflect === "undefined" || !Reflect.construct) return false; - if (Reflect.construct.sham) return false; - if (typeof Proxy === "function") return true; - - try { - Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - return true; - } catch (e) { - return false; - } - } - - function _construct(Parent, args, Class) { - if (_isNativeReflectConstruct()) { - _construct = Reflect.construct; - } else { - _construct = function _construct(Parent, args, Class) { - var a = [null]; - a.push.apply(a, args); - var Constructor = Function.bind.apply(Parent, a); - var instance = new Constructor(); - if (Class) _setPrototypeOf(instance, Class.prototype); - return instance; - }; - } - - return _construct.apply(null, arguments); - } - - function _toConsumableArray(arr) { - return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); - } - - function _arrayWithoutHoles(arr) { - if (Array.isArray(arr)) return _arrayLikeToArray(arr); - } - - function _iterableToArray(iter) { - if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); - } - - function _unsupportedIterableToArray(o, minLen) { - if (!o) return; - if (typeof o === "string") return _arrayLikeToArray(o, minLen); - var n = Object.prototype.toString.call(o).slice(8, -1); - if (n === "Object" && o.constructor) n = o.constructor.name; - if (n === "Map" || n === "Set") return Array.from(o); - if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); - } - - function _arrayLikeToArray(arr, len) { - if (len == null || len > arr.length) len = arr.length; - - for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; - - return arr2; - } - - function _nonIterableSpread() { - throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); - } - - var hasOwnProperty = Object.hasOwnProperty, - setPrototypeOf = Object.setPrototypeOf, - isFrozen = Object.isFrozen, - getPrototypeOf = Object.getPrototypeOf, - getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; - var freeze = Object.freeze, - seal = Object.seal, - create = Object.create; // eslint-disable-line import/no-mutable-exports - - var _ref = typeof Reflect !== 'undefined' && Reflect, - apply = _ref.apply, - construct = _ref.construct; - - if (!apply) { - apply = function apply(fun, thisValue, args) { - return fun.apply(thisValue, args); - }; - } - - if (!freeze) { - freeze = function freeze(x) { - return x; - }; - } - - if (!seal) { - seal = function seal(x) { - return x; - }; - } - - if (!construct) { - construct = function construct(Func, args) { - return _construct(Func, _toConsumableArray(args)); - }; - } - - var arrayForEach = unapply(Array.prototype.forEach); - var arrayPop = unapply(Array.prototype.pop); - var arrayPush = unapply(Array.prototype.push); - var stringToLowerCase = unapply(String.prototype.toLowerCase); - var stringMatch = unapply(String.prototype.match); - var stringReplace = unapply(String.prototype.replace); - var stringIndexOf = unapply(String.prototype.indexOf); - var stringTrim = unapply(String.prototype.trim); - var regExpTest = unapply(RegExp.prototype.test); - var typeErrorCreate = unconstruct(TypeError); - function unapply(func) { - return function (thisArg) { - for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - args[_key - 1] = arguments[_key]; - } - - return apply(func, thisArg, args); - }; - } - function unconstruct(func) { - return function () { - for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { - args[_key2] = arguments[_key2]; - } - - return construct(func, args); - }; - } - /* Add properties to a lookup table */ - - function addToSet(set, array, transformCaseFunc) { - transformCaseFunc = transformCaseFunc ? transformCaseFunc : stringToLowerCase; - - if (setPrototypeOf) { - // Make 'in' and truthy checks like Boolean(set.constructor) - // independent of any properties defined on Object.prototype. - // Prevent prototype setters from intercepting set as a this value. - setPrototypeOf(set, null); - } - - var l = array.length; - - while (l--) { - var element = array[l]; - - if (typeof element === 'string') { - var lcElement = transformCaseFunc(element); - - if (lcElement !== element) { - // Config presets (e.g. tags.js, attrs.js) are immutable. - if (!isFrozen(array)) { - array[l] = lcElement; - } - - element = lcElement; - } - } - - set[element] = true; - } - - return set; - } - /* Shallow clone an object */ - - function clone(object) { - var newObject = create(null); - var property; - - for (property in object) { - if (apply(hasOwnProperty, object, [property])) { - newObject[property] = object[property]; - } - } - - return newObject; - } - /* IE10 doesn't support __lookupGetter__ so lets' - * simulate it. It also automatically checks - * if the prop is function or getter and behaves - * accordingly. */ - - function lookupGetter(object, prop) { - while (object !== null) { - var desc = getOwnPropertyDescriptor(object, prop); - - if (desc) { - if (desc.get) { - return unapply(desc.get); - } - - if (typeof desc.value === 'function') { - return unapply(desc.value); - } - } - - object = getPrototypeOf(object); - } - - function fallbackValue(element) { - console.warn('fallback value for', element); - return null; - } - - return fallbackValue; - } - - var html$1 = freeze(['a', 'abbr', 'acronym', 'address', 'area', 'article', 'aside', 'audio', 'b', 'bdi', 'bdo', 'big', 'blink', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'content', 'data', 'datalist', 'dd', 'decorator', 'del', 'details', 'dfn', 'dialog', 'dir', 'div', 'dl', 'dt', 'element', 'em', 'fieldset', 'figcaption', 'figure', 'font', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'img', 'input', 'ins', 'kbd', 'label', 'legend', 'li', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meter', 'nav', 'nobr', 'ol', 'optgroup', 'option', 'output', 'p', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'section', 'select', 'shadow', 'small', 'source', 'spacer', 'span', 'strike', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'video', 'wbr']); // SVG - - var svg$1 = freeze(['svg', 'a', 'altglyph', 'altglyphdef', 'altglyphitem', 'animatecolor', 'animatemotion', 'animatetransform', 'circle', 'clippath', 'defs', 'desc', 'ellipse', 'filter', 'font', 'g', 'glyph', 'glyphref', 'hkern', 'image', 'line', 'lineargradient', 'marker', 'mask', 'metadata', 'mpath', 'path', 'pattern', 'polygon', 'polyline', 'radialgradient', 'rect', 'stop', 'style', 'switch', 'symbol', 'text', 'textpath', 'title', 'tref', 'tspan', 'view', 'vkern']); - var svgFilters = freeze(['feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap', 'feDistantLight', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feImage', 'feMerge', 'feMergeNode', 'feMorphology', 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence']); // List of SVG elements that are disallowed by default. - // We still need to know them so that we can do namespace - // checks properly in case one wants to add them to - // allow-list. - - var svgDisallowed = freeze(['animate', 'color-profile', 'cursor', 'discard', 'fedropshadow', 'font-face', 'font-face-format', 'font-face-name', 'font-face-src', 'font-face-uri', 'foreignobject', 'hatch', 'hatchpath', 'mesh', 'meshgradient', 'meshpatch', 'meshrow', 'missing-glyph', 'script', 'set', 'solidcolor', 'unknown', 'use']); - var mathMl$1 = freeze(['math', 'menclose', 'merror', 'mfenced', 'mfrac', 'mglyph', 'mi', 'mlabeledtr', 'mmultiscripts', 'mn', 'mo', 'mover', 'mpadded', 'mphantom', 'mroot', 'mrow', 'ms', 'mspace', 'msqrt', 'mstyle', 'msub', 'msup', 'msubsup', 'mtable', 'mtd', 'mtext', 'mtr', 'munder', 'munderover']); // Similarly to SVG, we want to know all MathML elements, - // even those that we disallow by default. - - var mathMlDisallowed = freeze(['maction', 'maligngroup', 'malignmark', 'mlongdiv', 'mscarries', 'mscarry', 'msgroup', 'mstack', 'msline', 'msrow', 'semantics', 'annotation', 'annotation-xml', 'mprescripts', 'none']); - var text = freeze(['#text']); - - var html = freeze(['accept', 'action', 'align', 'alt', 'autocapitalize', 'autocomplete', 'autopictureinpicture', 'autoplay', 'background', 'bgcolor', 'border', 'capture', 'cellpadding', 'cellspacing', 'checked', 'cite', 'class', 'clear', 'color', 'cols', 'colspan', 'controls', 'controlslist', 'coords', 'crossorigin', 'datetime', 'decoding', 'default', 'dir', 'disabled', 'disablepictureinpicture', 'disableremoteplayback', 'download', 'draggable', 'enctype', 'enterkeyhint', 'face', 'for', 'headers', 'height', 'hidden', 'high', 'href', 'hreflang', 'id', 'inputmode', 'integrity', 'ismap', 'kind', 'label', 'lang', 'list', 'loading', 'loop', 'low', 'max', 'maxlength', 'media', 'method', 'min', 'minlength', 'multiple', 'muted', 'name', 'nonce', 'noshade', 'novalidate', 'nowrap', 'open', 'optimum', 'pattern', 'placeholder', 'playsinline', 'poster', 'preload', 'pubdate', 'radiogroup', 'readonly', 'rel', 'required', 'rev', 'reversed', 'role', 'rows', 'rowspan', 'spellcheck', 'scope', 'selected', 'shape', 'size', 'sizes', 'span', 'srclang', 'start', 'src', 'srcset', 'step', 'style', 'summary', 'tabindex', 'title', 'translate', 'type', 'usemap', 'valign', 'value', 'width', 'xmlns', 'slot']); - var svg = freeze(['accent-height', 'accumulate', 'additive', 'alignment-baseline', 'ascent', 'attributename', 'attributetype', 'azimuth', 'basefrequency', 'baseline-shift', 'begin', 'bias', 'by', 'class', 'clip', 'clippathunits', 'clip-path', 'clip-rule', 'color', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'cx', 'cy', 'd', 'dx', 'dy', 'diffuseconstant', 'direction', 'display', 'divisor', 'dur', 'edgemode', 'elevation', 'end', 'fill', 'fill-opacity', 'fill-rule', 'filter', 'filterunits', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'fx', 'fy', 'g1', 'g2', 'glyph-name', 'glyphref', 'gradientunits', 'gradienttransform', 'height', 'href', 'id', 'image-rendering', 'in', 'in2', 'k', 'k1', 'k2', 'k3', 'k4', 'kerning', 'keypoints', 'keysplines', 'keytimes', 'lang', 'lengthadjust', 'letter-spacing', 'kernelmatrix', 'kernelunitlength', 'lighting-color', 'local', 'marker-end', 'marker-mid', 'marker-start', 'markerheight', 'markerunits', 'markerwidth', 'maskcontentunits', 'maskunits', 'max', 'mask', 'media', 'method', 'mode', 'min', 'name', 'numoctaves', 'offset', 'operator', 'opacity', 'order', 'orient', 'orientation', 'origin', 'overflow', 'paint-order', 'path', 'pathlength', 'patterncontentunits', 'patterntransform', 'patternunits', 'points', 'preservealpha', 'preserveaspectratio', 'primitiveunits', 'r', 'rx', 'ry', 'radius', 'refx', 'refy', 'repeatcount', 'repeatdur', 'restart', 'result', 'rotate', 'scale', 'seed', 'shape-rendering', 'specularconstant', 'specularexponent', 'spreadmethod', 'startoffset', 'stddeviation', 'stitchtiles', 'stop-color', 'stop-opacity', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke', 'stroke-width', 'style', 'surfacescale', 'systemlanguage', 'tabindex', 'targetx', 'targety', 'transform', 'transform-origin', 'text-anchor', 'text-decoration', 'text-rendering', 'textlength', 'type', 'u1', 'u2', 'unicode', 'values', 'viewbox', 'visibility', 'version', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'width', 'word-spacing', 'wrap', 'writing-mode', 'xchannelselector', 'ychannelselector', 'x', 'x1', 'x2', 'xmlns', 'y', 'y1', 'y2', 'z', 'zoomandpan']); - var mathMl = freeze(['accent', 'accentunder', 'align', 'bevelled', 'close', 'columnsalign', 'columnlines', 'columnspan', 'denomalign', 'depth', 'dir', 'display', 'displaystyle', 'encoding', 'fence', 'frame', 'height', 'href', 'id', 'largeop', 'length', 'linethickness', 'lspace', 'lquote', 'mathbackground', 'mathcolor', 'mathsize', 'mathvariant', 'maxsize', 'minsize', 'movablelimits', 'notation', 'numalign', 'open', 'rowalign', 'rowlines', 'rowspacing', 'rowspan', 'rspace', 'rquote', 'scriptlevel', 'scriptminsize', 'scriptsizemultiplier', 'selection', 'separator', 'separators', 'stretchy', 'subscriptshift', 'supscriptshift', 'symmetric', 'voffset', 'width', 'xmlns']); - var xml = freeze(['xlink:href', 'xml:id', 'xlink:title', 'xml:space', 'xmlns:xlink']); - - var MUSTACHE_EXPR = seal(/\{\{[\w\W]*|[\w\W]*\}\}/gm); // Specify template detection regex for SAFE_FOR_TEMPLATES mode - - var ERB_EXPR = seal(/<%[\w\W]*|[\w\W]*%>/gm); - var DATA_ATTR = seal(/^data-[\-\w.\u00B7-\uFFFF]/); // eslint-disable-line no-useless-escape - - var ARIA_ATTR = seal(/^aria-[\-\w]+$/); // eslint-disable-line no-useless-escape - - var IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i // eslint-disable-line no-useless-escape - ); - var IS_SCRIPT_OR_DATA = seal(/^(?:\w+script|data):/i); - var ATTR_WHITESPACE = seal(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g // eslint-disable-line no-control-regex - ); - var DOCTYPE_NAME = seal(/^html$/i); - - var getGlobal = function getGlobal() { - return typeof window === 'undefined' ? null : window; - }; - /** - * Creates a no-op policy for internal use only. - * Don't export this function outside this module! - * @param {?TrustedTypePolicyFactory} trustedTypes The policy factory. - * @param {Document} document The document object (to determine policy name suffix) - * @return {?TrustedTypePolicy} The policy created (or null, if Trusted Types - * are not supported). - */ - - - var _createTrustedTypesPolicy = function _createTrustedTypesPolicy(trustedTypes, document) { - if (_typeof(trustedTypes) !== 'object' || typeof trustedTypes.createPolicy !== 'function') { - return null; - } // Allow the callers to control the unique policy name - // by adding a data-tt-policy-suffix to the script element with the DOMPurify. - // Policy creation with duplicate names throws in Trusted Types. - - - var suffix = null; - var ATTR_NAME = 'data-tt-policy-suffix'; - - if (document.currentScript && document.currentScript.hasAttribute(ATTR_NAME)) { - suffix = document.currentScript.getAttribute(ATTR_NAME); - } - - var policyName = 'dompurify' + (suffix ? '#' + suffix : ''); - - try { - return trustedTypes.createPolicy(policyName, { - createHTML: function createHTML(html) { - return html; - } - }); - } catch (_) { - // Policy creation failed (most likely another DOMPurify script has - // already run). Skip creating the policy, as this will only cause errors - // if TT are enforced. - console.warn('TrustedTypes policy ' + policyName + ' could not be created.'); - return null; - } - }; - - function createDOMPurify() { - var window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal(); - - var DOMPurify = function DOMPurify(root) { - return createDOMPurify(root); - }; - /** - * Version label, exposed for easier checks - * if DOMPurify is up to date or not - */ - - - DOMPurify.version = '2.3.9'; - /** - * Array of elements that DOMPurify removed during sanitation. - * Empty if nothing was removed. - */ - - DOMPurify.removed = []; - - if (!window || !window.document || window.document.nodeType !== 9) { - // Not running in a browser, provide a factory function - // so that you can pass your own Window - DOMPurify.isSupported = false; - return DOMPurify; - } - - var originalDocument = window.document; - var document = window.document; - var DocumentFragment = window.DocumentFragment, - HTMLTemplateElement = window.HTMLTemplateElement, - Node = window.Node, - Element = window.Element, - NodeFilter = window.NodeFilter, - _window$NamedNodeMap = window.NamedNodeMap, - NamedNodeMap = _window$NamedNodeMap === void 0 ? window.NamedNodeMap || window.MozNamedAttrMap : _window$NamedNodeMap, - HTMLFormElement = window.HTMLFormElement, - DOMParser = window.DOMParser, - trustedTypes = window.trustedTypes; - var ElementPrototype = Element.prototype; - var cloneNode = lookupGetter(ElementPrototype, 'cloneNode'); - var getNextSibling = lookupGetter(ElementPrototype, 'nextSibling'); - var getChildNodes = lookupGetter(ElementPrototype, 'childNodes'); - var getParentNode = lookupGetter(ElementPrototype, 'parentNode'); // As per issue #47, the web-components registry is inherited by a - // new document created via createHTMLDocument. As per the spec - // (http://w3c.github.io/webcomponents/spec/custom/#creating-and-passing-registries) - // a new empty registry is used when creating a template contents owner - // document, so we use that as our parent document to ensure nothing - // is inherited. - - if (typeof HTMLTemplateElement === 'function') { - var template = document.createElement('template'); - - if (template.content && template.content.ownerDocument) { - document = template.content.ownerDocument; - } - } - - var trustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, originalDocument); - - var emptyHTML = trustedTypesPolicy ? trustedTypesPolicy.createHTML('') : ''; - var _document = document, - implementation = _document.implementation, - createNodeIterator = _document.createNodeIterator, - createDocumentFragment = _document.createDocumentFragment, - getElementsByTagName = _document.getElementsByTagName; - var importNode = originalDocument.importNode; - var documentMode = {}; - - try { - documentMode = clone(document).documentMode ? document.documentMode : {}; - } catch (_) {} - - var hooks = {}; - /** - * Expose whether this browser supports running the full DOMPurify. - */ - - DOMPurify.isSupported = typeof getParentNode === 'function' && implementation && typeof implementation.createHTMLDocument !== 'undefined' && documentMode !== 9; - var MUSTACHE_EXPR$1 = MUSTACHE_EXPR, - ERB_EXPR$1 = ERB_EXPR, - DATA_ATTR$1 = DATA_ATTR, - ARIA_ATTR$1 = ARIA_ATTR, - IS_SCRIPT_OR_DATA$1 = IS_SCRIPT_OR_DATA, - ATTR_WHITESPACE$1 = ATTR_WHITESPACE; - var IS_ALLOWED_URI$1 = IS_ALLOWED_URI; - /** - * We consider the elements and attributes below to be safe. Ideally - * don't add any new ones but feel free to remove unwanted ones. - */ - - /* allowed element names */ - - var ALLOWED_TAGS = null; - var DEFAULT_ALLOWED_TAGS = addToSet({}, [].concat(_toConsumableArray(html$1), _toConsumableArray(svg$1), _toConsumableArray(svgFilters), _toConsumableArray(mathMl$1), _toConsumableArray(text))); - /* Allowed attribute names */ - - var ALLOWED_ATTR = null; - var DEFAULT_ALLOWED_ATTR = addToSet({}, [].concat(_toConsumableArray(html), _toConsumableArray(svg), _toConsumableArray(mathMl), _toConsumableArray(xml))); - /* - * Configure how DOMPUrify should handle custom elements and their attributes as well as customized built-in elements. - * @property {RegExp|Function|null} tagNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any custom elements) - * @property {RegExp|Function|null} attributeNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any attributes not on the allow list) - * @property {boolean} allowCustomizedBuiltInElements allow custom elements derived from built-ins if they pass CUSTOM_ELEMENT_HANDLING.tagNameCheck. Default: `false`. - */ - - var CUSTOM_ELEMENT_HANDLING = Object.seal(Object.create(null, { - tagNameCheck: { - writable: true, - configurable: false, - enumerable: true, - value: null - }, - attributeNameCheck: { - writable: true, - configurable: false, - enumerable: true, - value: null - }, - allowCustomizedBuiltInElements: { - writable: true, - configurable: false, - enumerable: true, - value: false - } - })); - /* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */ - - var FORBID_TAGS = null; - /* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */ - - var FORBID_ATTR = null; - /* Decide if ARIA attributes are okay */ - - var ALLOW_ARIA_ATTR = true; - /* Decide if custom data attributes are okay */ - - var ALLOW_DATA_ATTR = true; - /* Decide if unknown protocols are okay */ - - var ALLOW_UNKNOWN_PROTOCOLS = false; - /* Output should be safe for common template engines. - * This means, DOMPurify removes data attributes, mustaches and ERB - */ - - var SAFE_FOR_TEMPLATES = false; - /* Decide if document with ... should be returned */ - - var WHOLE_DOCUMENT = false; - /* Track whether config is already set on this instance of DOMPurify. */ - - var SET_CONFIG = false; - /* Decide if all elements (e.g. style, script) must be children of - * document.body. By default, browsers might move them to document.head */ - - var FORCE_BODY = false; - /* Decide if a DOM `HTMLBodyElement` should be returned, instead of a html - * string (or a TrustedHTML object if Trusted Types are supported). - * If `WHOLE_DOCUMENT` is enabled a `HTMLHtmlElement` will be returned instead - */ - - var RETURN_DOM = false; - /* Decide if a DOM `DocumentFragment` should be returned, instead of a html - * string (or a TrustedHTML object if Trusted Types are supported) */ - - var RETURN_DOM_FRAGMENT = false; - /* Try to return a Trusted Type object instead of a string, return a string in - * case Trusted Types are not supported */ - - var RETURN_TRUSTED_TYPE = false; - /* Output should be free from DOM clobbering attacks? */ - - var SANITIZE_DOM = true; - /* Keep element content when removing element? */ - - var KEEP_CONTENT = true; - /* If a `Node` is passed to sanitize(), then performs sanitization in-place instead - * of importing it into a new Document and returning a sanitized copy */ - - var IN_PLACE = false; - /* Allow usage of profiles like html, svg and mathMl */ - - var USE_PROFILES = {}; - /* Tags to ignore content of when KEEP_CONTENT is true */ - - var FORBID_CONTENTS = null; - var DEFAULT_FORBID_CONTENTS = addToSet({}, ['annotation-xml', 'audio', 'colgroup', 'desc', 'foreignobject', 'head', 'iframe', 'math', 'mi', 'mn', 'mo', 'ms', 'mtext', 'noembed', 'noframes', 'noscript', 'plaintext', 'script', 'style', 'svg', 'template', 'thead', 'title', 'video', 'xmp']); - /* Tags that are safe for data: URIs */ - - var DATA_URI_TAGS = null; - var DEFAULT_DATA_URI_TAGS = addToSet({}, ['audio', 'video', 'img', 'source', 'image', 'track']); - /* Attributes safe for values like "javascript:" */ - - var URI_SAFE_ATTRIBUTES = null; - var DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, ['alt', 'class', 'for', 'id', 'label', 'name', 'pattern', 'placeholder', 'role', 'summary', 'title', 'value', 'style', 'xmlns']); - var MATHML_NAMESPACE = 'http://www.w3.org/1998/Math/MathML'; - var SVG_NAMESPACE = 'http://www.w3.org/2000/svg'; - var HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml'; - /* Document namespace */ - - var NAMESPACE = HTML_NAMESPACE; - var IS_EMPTY_INPUT = false; - /* Parsing of strict XHTML documents */ - - var PARSER_MEDIA_TYPE; - var SUPPORTED_PARSER_MEDIA_TYPES = ['application/xhtml+xml', 'text/html']; - var DEFAULT_PARSER_MEDIA_TYPE = 'text/html'; - var transformCaseFunc; - /* Keep a reference to config to pass to hooks */ - - var CONFIG = null; - /* Ideally, do not touch anything below this line */ - - /* ______________________________________________ */ - - var formElement = document.createElement('form'); - - var isRegexOrFunction = function isRegexOrFunction(testValue) { - return testValue instanceof RegExp || testValue instanceof Function; - }; - /** - * _parseConfig - * - * @param {Object} cfg optional config literal - */ - // eslint-disable-next-line complexity - - - var _parseConfig = function _parseConfig(cfg) { - if (CONFIG && CONFIG === cfg) { - return; - } - /* Shield configuration object from tampering */ - - - if (!cfg || _typeof(cfg) !== 'object') { - cfg = {}; - } - /* Shield configuration object from prototype pollution */ - - - cfg = clone(cfg); - PARSER_MEDIA_TYPE = // eslint-disable-next-line unicorn/prefer-includes - SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1 ? PARSER_MEDIA_TYPE = DEFAULT_PARSER_MEDIA_TYPE : PARSER_MEDIA_TYPE = cfg.PARSER_MEDIA_TYPE; // HTML tags and attributes are not case-sensitive, converting to lowercase. Keeping XHTML as is. - - transformCaseFunc = PARSER_MEDIA_TYPE === 'application/xhtml+xml' ? function (x) { - return x; - } : stringToLowerCase; - /* Set configuration parameters */ - - ALLOWED_TAGS = 'ALLOWED_TAGS' in cfg ? addToSet({}, cfg.ALLOWED_TAGS, transformCaseFunc) : DEFAULT_ALLOWED_TAGS; - ALLOWED_ATTR = 'ALLOWED_ATTR' in cfg ? addToSet({}, cfg.ALLOWED_ATTR, transformCaseFunc) : DEFAULT_ALLOWED_ATTR; - URI_SAFE_ATTRIBUTES = 'ADD_URI_SAFE_ATTR' in cfg ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES), // eslint-disable-line indent - cfg.ADD_URI_SAFE_ATTR, // eslint-disable-line indent - transformCaseFunc // eslint-disable-line indent - ) // eslint-disable-line indent - : DEFAULT_URI_SAFE_ATTRIBUTES; - DATA_URI_TAGS = 'ADD_DATA_URI_TAGS' in cfg ? addToSet(clone(DEFAULT_DATA_URI_TAGS), // eslint-disable-line indent - cfg.ADD_DATA_URI_TAGS, // eslint-disable-line indent - transformCaseFunc // eslint-disable-line indent - ) // eslint-disable-line indent - : DEFAULT_DATA_URI_TAGS; - FORBID_CONTENTS = 'FORBID_CONTENTS' in cfg ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc) : DEFAULT_FORBID_CONTENTS; - FORBID_TAGS = 'FORBID_TAGS' in cfg ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : {}; - FORBID_ATTR = 'FORBID_ATTR' in cfg ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : {}; - USE_PROFILES = 'USE_PROFILES' in cfg ? cfg.USE_PROFILES : false; - ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; // Default true - - ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; // Default true - - ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false; // Default false - - SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false; // Default false - - WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false; // Default false - - RETURN_DOM = cfg.RETURN_DOM || false; // Default false - - RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false; // Default false - - RETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false; // Default false - - FORCE_BODY = cfg.FORCE_BODY || false; // Default false - - SANITIZE_DOM = cfg.SANITIZE_DOM !== false; // Default true - - KEEP_CONTENT = cfg.KEEP_CONTENT !== false; // Default true - - IN_PLACE = cfg.IN_PLACE || false; // Default false - - IS_ALLOWED_URI$1 = cfg.ALLOWED_URI_REGEXP || IS_ALLOWED_URI$1; - NAMESPACE = cfg.NAMESPACE || HTML_NAMESPACE; - - if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck)) { - CUSTOM_ELEMENT_HANDLING.tagNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck; - } - - if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)) { - CUSTOM_ELEMENT_HANDLING.attributeNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck; - } - - if (cfg.CUSTOM_ELEMENT_HANDLING && typeof cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements === 'boolean') { - CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements; - } - - if (SAFE_FOR_TEMPLATES) { - ALLOW_DATA_ATTR = false; - } - - if (RETURN_DOM_FRAGMENT) { - RETURN_DOM = true; - } - /* Parse profile info */ - - - if (USE_PROFILES) { - ALLOWED_TAGS = addToSet({}, _toConsumableArray(text)); - ALLOWED_ATTR = []; - - if (USE_PROFILES.html === true) { - addToSet(ALLOWED_TAGS, html$1); - addToSet(ALLOWED_ATTR, html); - } - - if (USE_PROFILES.svg === true) { - addToSet(ALLOWED_TAGS, svg$1); - addToSet(ALLOWED_ATTR, svg); - addToSet(ALLOWED_ATTR, xml); - } - - if (USE_PROFILES.svgFilters === true) { - addToSet(ALLOWED_TAGS, svgFilters); - addToSet(ALLOWED_ATTR, svg); - addToSet(ALLOWED_ATTR, xml); - } - - if (USE_PROFILES.mathMl === true) { - addToSet(ALLOWED_TAGS, mathMl$1); - addToSet(ALLOWED_ATTR, mathMl); - addToSet(ALLOWED_ATTR, xml); - } - } - /* Merge configuration parameters */ - - - if (cfg.ADD_TAGS) { - if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) { - ALLOWED_TAGS = clone(ALLOWED_TAGS); - } - - addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc); - } - - if (cfg.ADD_ATTR) { - if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) { - ALLOWED_ATTR = clone(ALLOWED_ATTR); - } - - addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc); - } - - if (cfg.ADD_URI_SAFE_ATTR) { - addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR, transformCaseFunc); - } - - if (cfg.FORBID_CONTENTS) { - if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) { - FORBID_CONTENTS = clone(FORBID_CONTENTS); - } - - addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS, transformCaseFunc); - } - /* Add #text in case KEEP_CONTENT is set to true */ - - - if (KEEP_CONTENT) { - ALLOWED_TAGS['#text'] = true; - } - /* Add html, head and body to ALLOWED_TAGS in case WHOLE_DOCUMENT is true */ - - - if (WHOLE_DOCUMENT) { - addToSet(ALLOWED_TAGS, ['html', 'head', 'body']); - } - /* Add tbody to ALLOWED_TAGS in case tables are permitted, see #286, #365 */ - - - if (ALLOWED_TAGS.table) { - addToSet(ALLOWED_TAGS, ['tbody']); - delete FORBID_TAGS.tbody; - } // Prevent further manipulation of configuration. - // Not available in IE8, Safari 5, etc. - - - if (freeze) { - freeze(cfg); - } - - CONFIG = cfg; - }; - - var MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, ['mi', 'mo', 'mn', 'ms', 'mtext']); - var HTML_INTEGRATION_POINTS = addToSet({}, ['foreignobject', 'desc', 'title', 'annotation-xml']); // Certain elements are allowed in both SVG and HTML - // namespace. We need to specify them explicitly - // so that they don't get erroneously deleted from - // HTML namespace. - - var COMMON_SVG_AND_HTML_ELEMENTS = addToSet({}, ['title', 'style', 'font', 'a', 'script']); - /* Keep track of all possible SVG and MathML tags - * so that we can perform the namespace checks - * correctly. */ - - var ALL_SVG_TAGS = addToSet({}, svg$1); - addToSet(ALL_SVG_TAGS, svgFilters); - addToSet(ALL_SVG_TAGS, svgDisallowed); - var ALL_MATHML_TAGS = addToSet({}, mathMl$1); - addToSet(ALL_MATHML_TAGS, mathMlDisallowed); - /** - * - * - * @param {Element} element a DOM element whose namespace is being checked - * @returns {boolean} Return false if the element has a - * namespace that a spec-compliant parser would never - * return. Return true otherwise. - */ - - var _checkValidNamespace = function _checkValidNamespace(element) { - var parent = getParentNode(element); // In JSDOM, if we're inside shadow DOM, then parentNode - // can be null. We just simulate parent in this case. - - if (!parent || !parent.tagName) { - parent = { - namespaceURI: HTML_NAMESPACE, - tagName: 'template' - }; - } - - var tagName = stringToLowerCase(element.tagName); - var parentTagName = stringToLowerCase(parent.tagName); - - if (element.namespaceURI === SVG_NAMESPACE) { - // The only way to switch from HTML namespace to SVG - // is via . If it happens via any other tag, then - // it should be killed. - if (parent.namespaceURI === HTML_NAMESPACE) { - return tagName === 'svg'; - } // The only way to switch from MathML to SVG is via - // svg if parent is either or MathML - // text integration points. - - - if (parent.namespaceURI === MATHML_NAMESPACE) { - return tagName === 'svg' && (parentTagName === 'annotation-xml' || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]); - } // We only allow elements that are defined in SVG - // spec. All others are disallowed in SVG namespace. - - - return Boolean(ALL_SVG_TAGS[tagName]); - } - - if (element.namespaceURI === MATHML_NAMESPACE) { - // The only way to switch from HTML namespace to MathML - // is via . If it happens via any other tag, then - // it should be killed. - if (parent.namespaceURI === HTML_NAMESPACE) { - return tagName === 'math'; - } // The only way to switch from SVG to MathML is via - // and HTML integration points - - - if (parent.namespaceURI === SVG_NAMESPACE) { - return tagName === 'math' && HTML_INTEGRATION_POINTS[parentTagName]; - } // We only allow elements that are defined in MathML - // spec. All others are disallowed in MathML namespace. - - - return Boolean(ALL_MATHML_TAGS[tagName]); - } - - if (element.namespaceURI === HTML_NAMESPACE) { - // The only way to switch from SVG to HTML is via - // HTML integration points, and from MathML to HTML - // is via MathML text integration points - if (parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) { - return false; - } - - if (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) { - return false; - } // We disallow tags that are specific for MathML - // or SVG and should never appear in HTML namespace - - - return !ALL_MATHML_TAGS[tagName] && (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName]); - } // The code should never reach this place (this means - // that the element somehow got namespace that is not - // HTML, SVG or MathML). Return false just in case. - - - return false; - }; - /** - * _forceRemove - * - * @param {Node} node a DOM node - */ - - - var _forceRemove = function _forceRemove(node) { - arrayPush(DOMPurify.removed, { - element: node - }); - - try { - // eslint-disable-next-line unicorn/prefer-dom-node-remove - node.parentNode.removeChild(node); - } catch (_) { - try { - node.outerHTML = emptyHTML; - } catch (_) { - node.remove(); - } - } - }; - /** - * _removeAttribute - * - * @param {String} name an Attribute name - * @param {Node} node a DOM node - */ - - - var _removeAttribute = function _removeAttribute(name, node) { - try { - arrayPush(DOMPurify.removed, { - attribute: node.getAttributeNode(name), - from: node - }); - } catch (_) { - arrayPush(DOMPurify.removed, { - attribute: null, - from: node - }); - } - - node.removeAttribute(name); // We void attribute values for unremovable "is"" attributes - - if (name === 'is' && !ALLOWED_ATTR[name]) { - if (RETURN_DOM || RETURN_DOM_FRAGMENT) { - try { - _forceRemove(node); - } catch (_) {} - } else { - try { - node.setAttribute(name, ''); - } catch (_) {} - } - } - }; - /** - * _initDocument - * - * @param {String} dirty a string of dirty markup - * @return {Document} a DOM, filled with the dirty markup - */ - - - var _initDocument = function _initDocument(dirty) { - /* Create a HTML document */ - var doc; - var leadingWhitespace; - - if (FORCE_BODY) { - dirty = '' + dirty; - } else { - /* If FORCE_BODY isn't used, leading whitespace needs to be preserved manually */ - var matches = stringMatch(dirty, /^[\r\n\t ]+/); - leadingWhitespace = matches && matches[0]; - } - - if (PARSER_MEDIA_TYPE === 'application/xhtml+xml') { - // Root of XHTML doc must contain xmlns declaration (see https://www.w3.org/TR/xhtml1/normative.html#strict) - dirty = '' + dirty + ''; - } - - var dirtyPayload = trustedTypesPolicy ? trustedTypesPolicy.createHTML(dirty) : dirty; - /* - * Use the DOMParser API by default, fallback later if needs be - * DOMParser not work for svg when has multiple root element. - */ - - if (NAMESPACE === HTML_NAMESPACE) { - try { - doc = new DOMParser().parseFromString(dirtyPayload, PARSER_MEDIA_TYPE); - } catch (_) {} - } - /* Use createHTMLDocument in case DOMParser is not available */ - - - if (!doc || !doc.documentElement) { - doc = implementation.createDocument(NAMESPACE, 'template', null); - - try { - doc.documentElement.innerHTML = IS_EMPTY_INPUT ? '' : dirtyPayload; - } catch (_) {// Syntax error if dirtyPayload is invalid xml - } - } - - var body = doc.body || doc.documentElement; - - if (dirty && leadingWhitespace) { - body.insertBefore(document.createTextNode(leadingWhitespace), body.childNodes[0] || null); - } - /* Work on whole document or just its body */ - - - if (NAMESPACE === HTML_NAMESPACE) { - return getElementsByTagName.call(doc, WHOLE_DOCUMENT ? 'html' : 'body')[0]; - } - - return WHOLE_DOCUMENT ? doc.documentElement : body; - }; - /** - * _createIterator - * - * @param {Document} root document/fragment to create iterator for - * @return {Iterator} iterator instance - */ - - - var _createIterator = function _createIterator(root) { - return createNodeIterator.call(root.ownerDocument || root, root, // eslint-disable-next-line no-bitwise - NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT, null, false); - }; - /** - * _isClobbered - * - * @param {Node} elm element to check for clobbering attacks - * @return {Boolean} true if clobbered, false if safe - */ - - - var _isClobbered = function _isClobbered(elm) { - return elm instanceof HTMLFormElement && (typeof elm.nodeName !== 'string' || typeof elm.textContent !== 'string' || typeof elm.removeChild !== 'function' || !(elm.attributes instanceof NamedNodeMap) || typeof elm.removeAttribute !== 'function' || typeof elm.setAttribute !== 'function' || typeof elm.namespaceURI !== 'string' || typeof elm.insertBefore !== 'function'); - }; - /** - * _isNode - * - * @param {Node} obj object to check whether it's a DOM node - * @return {Boolean} true is object is a DOM node - */ - - - var _isNode = function _isNode(object) { - return _typeof(Node) === 'object' ? object instanceof Node : object && _typeof(object) === 'object' && typeof object.nodeType === 'number' && typeof object.nodeName === 'string'; - }; - /** - * _executeHook - * Execute user configurable hooks - * - * @param {String} entryPoint Name of the hook's entry point - * @param {Node} currentNode node to work on with the hook - * @param {Object} data additional hook parameters - */ - - - var _executeHook = function _executeHook(entryPoint, currentNode, data) { - if (!hooks[entryPoint]) { - return; - } - - arrayForEach(hooks[entryPoint], function (hook) { - hook.call(DOMPurify, currentNode, data, CONFIG); - }); - }; - /** - * _sanitizeElements - * - * @protect nodeName - * @protect textContent - * @protect removeChild - * - * @param {Node} currentNode to check for permission to exist - * @return {Boolean} true if node was killed, false if left alive - */ - - - var _sanitizeElements = function _sanitizeElements(currentNode) { - var content; - /* Execute a hook if present */ - - _executeHook('beforeSanitizeElements', currentNode, null); - /* Check if element is clobbered or can clobber */ - - - if (_isClobbered(currentNode)) { - _forceRemove(currentNode); - - return true; - } - /* Check if tagname contains Unicode */ - - - if (regExpTest(/[\u0080-\uFFFF]/, currentNode.nodeName)) { - _forceRemove(currentNode); - - return true; - } - /* Now let's check the element's type and name */ - - - var tagName = transformCaseFunc(currentNode.nodeName); - /* Execute a hook if present */ - - _executeHook('uponSanitizeElement', currentNode, { - tagName: tagName, - allowedTags: ALLOWED_TAGS - }); - /* Detect mXSS attempts abusing namespace confusion */ - - - if (currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && (!_isNode(currentNode.content) || !_isNode(currentNode.content.firstElementChild)) && regExpTest(/<[/\w]/g, currentNode.innerHTML) && regExpTest(/<[/\w]/g, currentNode.textContent)) { - _forceRemove(currentNode); - - return true; - } - /* Mitigate a problem with templates inside select */ - - - if (tagName === 'select' && regExpTest(/