wijmo 5.20261.45-nightly.d20251218.t163151 → 5.20261.45-nightly.d20260105.t163143
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cultures/wijmo.culture.ar-AE.d.ts +1 -1
- package/cultures/wijmo.culture.ar-AE.js +1 -1
- package/cultures/wijmo.culture.ar-SA.d.ts +1 -1
- package/cultures/wijmo.culture.ar-SA.js +1 -1
- package/cultures/wijmo.culture.bg.d.ts +1 -1
- package/cultures/wijmo.culture.bg.js +1 -1
- package/cultures/wijmo.culture.ca.d.ts +1 -1
- package/cultures/wijmo.culture.ca.js +1 -1
- package/cultures/wijmo.culture.cs.d.ts +1 -1
- package/cultures/wijmo.culture.cs.js +1 -1
- package/cultures/wijmo.culture.da.d.ts +1 -1
- package/cultures/wijmo.culture.da.js +1 -1
- package/cultures/wijmo.culture.de-CH.d.ts +1 -1
- package/cultures/wijmo.culture.de-CH.js +1 -1
- package/cultures/wijmo.culture.de.d.ts +1 -1
- package/cultures/wijmo.culture.de.js +1 -1
- package/cultures/wijmo.culture.el.d.ts +1 -1
- package/cultures/wijmo.culture.el.js +1 -1
- package/cultures/wijmo.culture.en-CA.d.ts +1 -1
- package/cultures/wijmo.culture.en-CA.js +1 -1
- package/cultures/wijmo.culture.en-GB.d.ts +1 -1
- package/cultures/wijmo.culture.en-GB.js +1 -1
- package/cultures/wijmo.culture.en.d.ts +1 -1
- package/cultures/wijmo.culture.en.js +1 -1
- package/cultures/wijmo.culture.es-419.d.ts +1 -1
- package/cultures/wijmo.culture.es-419.js +1 -1
- package/cultures/wijmo.culture.es-MX.d.ts +1 -1
- package/cultures/wijmo.culture.es-MX.js +1 -1
- package/cultures/wijmo.culture.es.d.ts +1 -1
- package/cultures/wijmo.culture.es.js +1 -1
- package/cultures/wijmo.culture.et.d.ts +1 -1
- package/cultures/wijmo.culture.et.js +1 -1
- package/cultures/wijmo.culture.eu.d.ts +1 -1
- package/cultures/wijmo.culture.eu.js +1 -1
- package/cultures/wijmo.culture.fi.d.ts +1 -1
- package/cultures/wijmo.culture.fi.js +1 -1
- package/cultures/wijmo.culture.fr-CA.d.ts +1 -1
- package/cultures/wijmo.culture.fr-CA.js +1 -1
- package/cultures/wijmo.culture.fr.d.ts +1 -1
- package/cultures/wijmo.culture.fr.js +1 -1
- package/cultures/wijmo.culture.gl.d.ts +1 -1
- package/cultures/wijmo.culture.gl.js +1 -1
- package/cultures/wijmo.culture.he.d.ts +1 -1
- package/cultures/wijmo.culture.he.js +1 -1
- package/cultures/wijmo.culture.hi.d.ts +1 -1
- package/cultures/wijmo.culture.hi.js +1 -1
- package/cultures/wijmo.culture.hr.d.ts +1 -1
- package/cultures/wijmo.culture.hr.js +1 -1
- package/cultures/wijmo.culture.hu.d.ts +1 -1
- package/cultures/wijmo.culture.hu.js +1 -1
- package/cultures/wijmo.culture.id.d.ts +1 -1
- package/cultures/wijmo.culture.id.js +1 -1
- package/cultures/wijmo.culture.it.d.ts +1 -1
- package/cultures/wijmo.culture.it.js +1 -1
- package/cultures/wijmo.culture.ja.d.ts +1 -1
- package/cultures/wijmo.culture.ja.js +1 -1
- package/cultures/wijmo.culture.kk.d.ts +1 -1
- package/cultures/wijmo.culture.kk.js +1 -1
- package/cultures/wijmo.culture.ko.d.ts +1 -1
- package/cultures/wijmo.culture.ko.js +1 -1
- package/cultures/wijmo.culture.lt.d.ts +1 -1
- package/cultures/wijmo.culture.lt.js +1 -1
- package/cultures/wijmo.culture.lv.d.ts +1 -1
- package/cultures/wijmo.culture.lv.js +1 -1
- package/cultures/wijmo.culture.mn-MN.d.ts +1 -1
- package/cultures/wijmo.culture.mn-MN.js +1 -1
- package/cultures/wijmo.culture.nl.d.ts +1 -1
- package/cultures/wijmo.culture.nl.js +1 -1
- package/cultures/wijmo.culture.no.d.ts +1 -1
- package/cultures/wijmo.culture.no.js +1 -1
- package/cultures/wijmo.culture.pl.d.ts +1 -1
- package/cultures/wijmo.culture.pl.js +1 -1
- package/cultures/wijmo.culture.pt.d.ts +1 -1
- package/cultures/wijmo.culture.pt.js +1 -1
- package/cultures/wijmo.culture.ro.d.ts +1 -1
- package/cultures/wijmo.culture.ro.js +1 -1
- package/cultures/wijmo.culture.ru.d.ts +1 -1
- package/cultures/wijmo.culture.ru.js +1 -1
- package/cultures/wijmo.culture.sk.d.ts +1 -1
- package/cultures/wijmo.culture.sk.js +1 -1
- package/cultures/wijmo.culture.sl.d.ts +1 -1
- package/cultures/wijmo.culture.sl.js +1 -1
- package/cultures/wijmo.culture.sr.d.ts +1 -1
- package/cultures/wijmo.culture.sr.js +1 -1
- package/cultures/wijmo.culture.sv.d.ts +1 -1
- package/cultures/wijmo.culture.sv.js +1 -1
- package/cultures/wijmo.culture.th.d.ts +1 -1
- package/cultures/wijmo.culture.th.js +1 -1
- package/cultures/wijmo.culture.tr.d.ts +1 -1
- package/cultures/wijmo.culture.tr.js +1 -1
- package/cultures/wijmo.culture.uk.d.ts +1 -1
- package/cultures/wijmo.culture.uk.js +1 -1
- package/cultures/wijmo.culture.vi.d.ts +1 -1
- package/cultures/wijmo.culture.vi.js +1 -1
- package/cultures/wijmo.culture.zh-HK.d.ts +1 -1
- package/cultures/wijmo.culture.zh-HK.js +1 -1
- package/cultures/wijmo.culture.zh-TW.d.ts +1 -1
- package/cultures/wijmo.culture.zh-TW.js +1 -1
- package/cultures/wijmo.culture.zh.d.ts +1 -1
- package/cultures/wijmo.culture.zh.js +1 -1
- package/package.json +1 -1
- package/styles/misc/_constants.scss +1 -1
- package/styles/misc/_glyphs.scss +257 -255
- package/styles/misc/_mixins.scss +70 -74
- package/styles/misc/_variables.scss +13 -13
- package/styles/parts/_barcode.scss +26 -27
- package/styles/parts/_chart.scss +109 -107
- package/styles/parts/_chart_finance.scss +6 -6
- package/styles/parts/_chart_hierarchical.scss +4 -4
- package/styles/parts/_chart_interaction.scss +224 -219
- package/styles/parts/_chart_map.scss +7 -7
- package/styles/parts/_core.scss +115 -116
- package/styles/parts/_gauge.scss +40 -39
- package/styles/parts/_grid.scss +447 -410
- package/styles/parts/_grid_cellmaker.scss +92 -86
- package/styles/parts/_grid_filter.scss +157 -161
- package/styles/parts/_grid_grouppanel.scss +74 -74
- package/styles/parts/_grid_multirow.scss +65 -64
- package/styles/parts/_grid_search.scss +27 -26
- package/styles/parts/_grid_selector.scss +12 -12
- package/styles/parts/_grid_sheet.scss +176 -176
- package/styles/parts/_grid_transposed_multirow.scss +9 -10
- package/styles/parts/_input.scss +812 -810
- package/styles/parts/_labeled_input.scss +198 -194
- package/styles/parts/_nav.scss +263 -259
- package/styles/parts/_olap.scss +230 -224
- package/styles/parts/_viewer.scss +1005 -989
- package/styles/themes/material/wijmo.theme.material.amber-blue.css +1 -1
- package/styles/themes/material/wijmo.theme.material.amber-blue.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.amber-cyan.css +1 -1
- package/styles/themes/material/wijmo.theme.material.amber-cyan.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.amber-deep_orange.css +1 -1
- package/styles/themes/material/wijmo.theme.material.amber-deep_orange.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.amber-deep_purple.css +1 -1
- package/styles/themes/material/wijmo.theme.material.amber-deep_purple.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.amber-green.css +1 -1
- package/styles/themes/material/wijmo.theme.material.amber-green.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.amber-indigo.css +1 -1
- package/styles/themes/material/wijmo.theme.material.amber-indigo.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.amber-light_blue.css +1 -1
- package/styles/themes/material/wijmo.theme.material.amber-light_blue.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.amber-light_green.css +1 -1
- package/styles/themes/material/wijmo.theme.material.amber-light_green.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.amber-lime.css +1 -1
- package/styles/themes/material/wijmo.theme.material.amber-lime.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.amber-orange.css +1 -1
- package/styles/themes/material/wijmo.theme.material.amber-orange.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.amber-pink.css +1 -1
- package/styles/themes/material/wijmo.theme.material.amber-pink.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.amber-purple.css +1 -1
- package/styles/themes/material/wijmo.theme.material.amber-purple.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.amber-red.css +1 -1
- package/styles/themes/material/wijmo.theme.material.amber-red.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.amber-teal.css +1 -1
- package/styles/themes/material/wijmo.theme.material.amber-teal.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.amber-yellow.css +1 -1
- package/styles/themes/material/wijmo.theme.material.amber-yellow.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.blue-amber.css +1 -1
- package/styles/themes/material/wijmo.theme.material.blue-amber.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.blue-cyan.css +1 -1
- package/styles/themes/material/wijmo.theme.material.blue-cyan.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.blue-deep_orange.css +1 -1
- package/styles/themes/material/wijmo.theme.material.blue-deep_orange.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.blue-deep_purple.css +1 -1
- package/styles/themes/material/wijmo.theme.material.blue-deep_purple.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.blue-green.css +1 -1
- package/styles/themes/material/wijmo.theme.material.blue-green.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.blue-indigo.css +1 -1
- package/styles/themes/material/wijmo.theme.material.blue-indigo.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.blue-light_blue.css +1 -1
- package/styles/themes/material/wijmo.theme.material.blue-light_blue.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.blue-light_green.css +1 -1
- package/styles/themes/material/wijmo.theme.material.blue-light_green.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.blue-lime.css +1 -1
- package/styles/themes/material/wijmo.theme.material.blue-lime.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.blue-orange.css +1 -1
- package/styles/themes/material/wijmo.theme.material.blue-orange.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.blue-pink.css +1 -1
- package/styles/themes/material/wijmo.theme.material.blue-pink.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.blue-purple.css +1 -1
- package/styles/themes/material/wijmo.theme.material.blue-purple.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.blue-red.css +1 -1
- package/styles/themes/material/wijmo.theme.material.blue-red.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.blue-teal.css +1 -1
- package/styles/themes/material/wijmo.theme.material.blue-teal.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.blue-yellow.css +1 -1
- package/styles/themes/material/wijmo.theme.material.blue-yellow.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.blue_grey-amber.css +1 -1
- package/styles/themes/material/wijmo.theme.material.blue_grey-amber.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.blue_grey-blue.css +1 -1
- package/styles/themes/material/wijmo.theme.material.blue_grey-blue.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.blue_grey-cyan.css +1 -1
- package/styles/themes/material/wijmo.theme.material.blue_grey-cyan.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.blue_grey-deep_orange.css +1 -1
- package/styles/themes/material/wijmo.theme.material.blue_grey-deep_orange.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.blue_grey-deep_purple.css +1 -1
- package/styles/themes/material/wijmo.theme.material.blue_grey-deep_purple.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.blue_grey-green.css +1 -1
- package/styles/themes/material/wijmo.theme.material.blue_grey-green.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.blue_grey-indigo.css +1 -1
- package/styles/themes/material/wijmo.theme.material.blue_grey-indigo.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.blue_grey-light_blue.css +1 -1
- package/styles/themes/material/wijmo.theme.material.blue_grey-light_blue.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.blue_grey-light_green.css +1 -1
- package/styles/themes/material/wijmo.theme.material.blue_grey-light_green.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.blue_grey-lime.css +1 -1
- package/styles/themes/material/wijmo.theme.material.blue_grey-lime.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.blue_grey-orange.css +1 -1
- package/styles/themes/material/wijmo.theme.material.blue_grey-orange.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.blue_grey-pink.css +1 -1
- package/styles/themes/material/wijmo.theme.material.blue_grey-pink.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.blue_grey-purple.css +1 -1
- package/styles/themes/material/wijmo.theme.material.blue_grey-purple.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.blue_grey-red.css +1 -1
- package/styles/themes/material/wijmo.theme.material.blue_grey-red.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.blue_grey-teal.css +1 -1
- package/styles/themes/material/wijmo.theme.material.blue_grey-teal.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.blue_grey-yellow.css +1 -1
- package/styles/themes/material/wijmo.theme.material.blue_grey-yellow.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.brown-amber.css +1 -1
- package/styles/themes/material/wijmo.theme.material.brown-amber.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.brown-blue.css +1 -1
- package/styles/themes/material/wijmo.theme.material.brown-blue.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.brown-cyan.css +1 -1
- package/styles/themes/material/wijmo.theme.material.brown-cyan.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.brown-deep_orange.css +1 -1
- package/styles/themes/material/wijmo.theme.material.brown-deep_orange.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.brown-deep_purple.css +1 -1
- package/styles/themes/material/wijmo.theme.material.brown-deep_purple.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.brown-green.css +1 -1
- package/styles/themes/material/wijmo.theme.material.brown-green.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.brown-indigo.css +1 -1
- package/styles/themes/material/wijmo.theme.material.brown-indigo.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.brown-light_blue.css +1 -1
- package/styles/themes/material/wijmo.theme.material.brown-light_blue.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.brown-light_green.css +1 -1
- package/styles/themes/material/wijmo.theme.material.brown-light_green.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.brown-lime.css +1 -1
- package/styles/themes/material/wijmo.theme.material.brown-lime.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.brown-orange.css +1 -1
- package/styles/themes/material/wijmo.theme.material.brown-orange.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.brown-pink.css +1 -1
- package/styles/themes/material/wijmo.theme.material.brown-pink.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.brown-purple.css +1 -1
- package/styles/themes/material/wijmo.theme.material.brown-purple.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.brown-red.css +1 -1
- package/styles/themes/material/wijmo.theme.material.brown-red.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.brown-teal.css +1 -1
- package/styles/themes/material/wijmo.theme.material.brown-teal.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.brown-yellow.css +1 -1
- package/styles/themes/material/wijmo.theme.material.brown-yellow.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.cyan-amber.css +1 -1
- package/styles/themes/material/wijmo.theme.material.cyan-amber.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.cyan-blue.css +1 -1
- package/styles/themes/material/wijmo.theme.material.cyan-blue.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.cyan-deep_orange.css +1 -1
- package/styles/themes/material/wijmo.theme.material.cyan-deep_orange.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.cyan-deep_purple.css +1 -1
- package/styles/themes/material/wijmo.theme.material.cyan-deep_purple.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.cyan-green.css +1 -1
- package/styles/themes/material/wijmo.theme.material.cyan-green.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.cyan-indigo.css +1 -1
- package/styles/themes/material/wijmo.theme.material.cyan-indigo.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.cyan-light_blue.css +1 -1
- package/styles/themes/material/wijmo.theme.material.cyan-light_blue.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.cyan-light_green.css +1 -1
- package/styles/themes/material/wijmo.theme.material.cyan-light_green.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.cyan-lime.css +1 -1
- package/styles/themes/material/wijmo.theme.material.cyan-lime.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.cyan-orange.css +1 -1
- package/styles/themes/material/wijmo.theme.material.cyan-orange.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.cyan-pink.css +1 -1
- package/styles/themes/material/wijmo.theme.material.cyan-pink.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.cyan-purple.css +1 -1
- package/styles/themes/material/wijmo.theme.material.cyan-purple.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.cyan-red.css +1 -1
- package/styles/themes/material/wijmo.theme.material.cyan-red.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.cyan-teal.css +1 -1
- package/styles/themes/material/wijmo.theme.material.cyan-teal.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.cyan-yellow.css +1 -1
- package/styles/themes/material/wijmo.theme.material.cyan-yellow.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.deep_orange-amber.css +1 -1
- package/styles/themes/material/wijmo.theme.material.deep_orange-amber.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.deep_orange-blue.css +1 -1
- package/styles/themes/material/wijmo.theme.material.deep_orange-blue.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.deep_orange-cyan.css +1 -1
- package/styles/themes/material/wijmo.theme.material.deep_orange-cyan.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.deep_orange-deep_purple.css +1 -1
- package/styles/themes/material/wijmo.theme.material.deep_orange-deep_purple.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.deep_orange-green.css +1 -1
- package/styles/themes/material/wijmo.theme.material.deep_orange-green.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.deep_orange-indigo.css +1 -1
- package/styles/themes/material/wijmo.theme.material.deep_orange-indigo.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.deep_orange-light_blue.css +1 -1
- package/styles/themes/material/wijmo.theme.material.deep_orange-light_blue.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.deep_orange-light_green.css +1 -1
- package/styles/themes/material/wijmo.theme.material.deep_orange-light_green.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.deep_orange-lime.css +1 -1
- package/styles/themes/material/wijmo.theme.material.deep_orange-lime.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.deep_orange-orange.css +1 -1
- package/styles/themes/material/wijmo.theme.material.deep_orange-orange.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.deep_orange-pink.css +1 -1
- package/styles/themes/material/wijmo.theme.material.deep_orange-pink.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.deep_orange-purple.css +1 -1
- package/styles/themes/material/wijmo.theme.material.deep_orange-purple.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.deep_orange-red.css +1 -1
- package/styles/themes/material/wijmo.theme.material.deep_orange-red.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.deep_orange-teal.css +1 -1
- package/styles/themes/material/wijmo.theme.material.deep_orange-teal.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.deep_orange-yellow.css +1 -1
- package/styles/themes/material/wijmo.theme.material.deep_orange-yellow.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.deep_purple-amber.css +1 -1
- package/styles/themes/material/wijmo.theme.material.deep_purple-amber.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.deep_purple-blue.css +1 -1
- package/styles/themes/material/wijmo.theme.material.deep_purple-blue.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.deep_purple-cyan.css +1 -1
- package/styles/themes/material/wijmo.theme.material.deep_purple-cyan.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.deep_purple-deep_orange.css +1 -1
- package/styles/themes/material/wijmo.theme.material.deep_purple-deep_orange.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.deep_purple-green.css +1 -1
- package/styles/themes/material/wijmo.theme.material.deep_purple-green.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.deep_purple-indigo.css +1 -1
- package/styles/themes/material/wijmo.theme.material.deep_purple-indigo.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.deep_purple-light_blue.css +1 -1
- package/styles/themes/material/wijmo.theme.material.deep_purple-light_blue.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.deep_purple-light_green.css +1 -1
- package/styles/themes/material/wijmo.theme.material.deep_purple-light_green.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.deep_purple-lime.css +1 -1
- package/styles/themes/material/wijmo.theme.material.deep_purple-lime.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.deep_purple-orange.css +1 -1
- package/styles/themes/material/wijmo.theme.material.deep_purple-orange.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.deep_purple-pink.css +1 -1
- package/styles/themes/material/wijmo.theme.material.deep_purple-pink.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.deep_purple-purple.css +1 -1
- package/styles/themes/material/wijmo.theme.material.deep_purple-purple.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.deep_purple-red.css +1 -1
- package/styles/themes/material/wijmo.theme.material.deep_purple-red.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.deep_purple-teal.css +1 -1
- package/styles/themes/material/wijmo.theme.material.deep_purple-teal.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.deep_purple-yellow.css +1 -1
- package/styles/themes/material/wijmo.theme.material.deep_purple-yellow.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.green-amber.css +1 -1
- package/styles/themes/material/wijmo.theme.material.green-amber.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.green-blue.css +1 -1
- package/styles/themes/material/wijmo.theme.material.green-blue.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.green-cyan.css +1 -1
- package/styles/themes/material/wijmo.theme.material.green-cyan.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.green-deep_orange.css +1 -1
- package/styles/themes/material/wijmo.theme.material.green-deep_orange.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.green-deep_purple.css +1 -1
- package/styles/themes/material/wijmo.theme.material.green-deep_purple.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.green-indigo.css +1 -1
- package/styles/themes/material/wijmo.theme.material.green-indigo.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.green-light_blue.css +1 -1
- package/styles/themes/material/wijmo.theme.material.green-light_blue.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.green-light_green.css +1 -1
- package/styles/themes/material/wijmo.theme.material.green-light_green.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.green-lime.css +1 -1
- package/styles/themes/material/wijmo.theme.material.green-lime.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.green-orange.css +1 -1
- package/styles/themes/material/wijmo.theme.material.green-orange.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.green-pink.css +1 -1
- package/styles/themes/material/wijmo.theme.material.green-pink.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.green-purple.css +1 -1
- package/styles/themes/material/wijmo.theme.material.green-purple.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.green-red.css +1 -1
- package/styles/themes/material/wijmo.theme.material.green-red.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.green-teal.css +1 -1
- package/styles/themes/material/wijmo.theme.material.green-teal.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.green-yellow.css +1 -1
- package/styles/themes/material/wijmo.theme.material.green-yellow.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.grey-amber.css +1 -1
- package/styles/themes/material/wijmo.theme.material.grey-amber.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.grey-blue.css +1 -1
- package/styles/themes/material/wijmo.theme.material.grey-blue.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.grey-cyan.css +1 -1
- package/styles/themes/material/wijmo.theme.material.grey-cyan.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.grey-deep_orange.css +1 -1
- package/styles/themes/material/wijmo.theme.material.grey-deep_orange.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.grey-deep_purple.css +1 -1
- package/styles/themes/material/wijmo.theme.material.grey-deep_purple.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.grey-green.css +1 -1
- package/styles/themes/material/wijmo.theme.material.grey-green.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.grey-indigo.css +1 -1
- package/styles/themes/material/wijmo.theme.material.grey-indigo.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.grey-light_blue.css +1 -1
- package/styles/themes/material/wijmo.theme.material.grey-light_blue.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.grey-light_green.css +1 -1
- package/styles/themes/material/wijmo.theme.material.grey-light_green.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.grey-lime.css +1 -1
- package/styles/themes/material/wijmo.theme.material.grey-lime.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.grey-orange.css +1 -1
- package/styles/themes/material/wijmo.theme.material.grey-orange.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.grey-pink.css +1 -1
- package/styles/themes/material/wijmo.theme.material.grey-pink.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.grey-purple.css +1 -1
- package/styles/themes/material/wijmo.theme.material.grey-purple.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.grey-red.css +1 -1
- package/styles/themes/material/wijmo.theme.material.grey-red.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.grey-teal.css +1 -1
- package/styles/themes/material/wijmo.theme.material.grey-teal.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.grey-yellow.css +1 -1
- package/styles/themes/material/wijmo.theme.material.grey-yellow.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.indigo-amber.css +1 -1
- package/styles/themes/material/wijmo.theme.material.indigo-amber.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.indigo-blue.css +1 -1
- package/styles/themes/material/wijmo.theme.material.indigo-blue.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.indigo-cyan.css +1 -1
- package/styles/themes/material/wijmo.theme.material.indigo-cyan.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.indigo-deep_orange.css +1 -1
- package/styles/themes/material/wijmo.theme.material.indigo-deep_orange.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.indigo-deep_purple.css +1 -1
- package/styles/themes/material/wijmo.theme.material.indigo-deep_purple.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.indigo-green.css +1 -1
- package/styles/themes/material/wijmo.theme.material.indigo-green.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.indigo-light_blue.css +1 -1
- package/styles/themes/material/wijmo.theme.material.indigo-light_blue.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.indigo-light_green.css +1 -1
- package/styles/themes/material/wijmo.theme.material.indigo-light_green.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.indigo-lime.css +1 -1
- package/styles/themes/material/wijmo.theme.material.indigo-lime.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.indigo-orange.css +1 -1
- package/styles/themes/material/wijmo.theme.material.indigo-orange.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.indigo-pink.css +1 -1
- package/styles/themes/material/wijmo.theme.material.indigo-pink.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.indigo-purple.css +1 -1
- package/styles/themes/material/wijmo.theme.material.indigo-purple.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.indigo-red.css +1 -1
- package/styles/themes/material/wijmo.theme.material.indigo-red.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.indigo-teal.css +1 -1
- package/styles/themes/material/wijmo.theme.material.indigo-teal.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.indigo-yellow.css +1 -1
- package/styles/themes/material/wijmo.theme.material.indigo-yellow.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.light_blue-amber.css +1 -1
- package/styles/themes/material/wijmo.theme.material.light_blue-amber.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.light_blue-blue.css +1 -1
- package/styles/themes/material/wijmo.theme.material.light_blue-blue.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.light_blue-cyan.css +1 -1
- package/styles/themes/material/wijmo.theme.material.light_blue-cyan.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.light_blue-deep_orange.css +1 -1
- package/styles/themes/material/wijmo.theme.material.light_blue-deep_orange.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.light_blue-deep_purple.css +1 -1
- package/styles/themes/material/wijmo.theme.material.light_blue-deep_purple.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.light_blue-green.css +1 -1
- package/styles/themes/material/wijmo.theme.material.light_blue-green.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.light_blue-indigo.css +1 -1
- package/styles/themes/material/wijmo.theme.material.light_blue-indigo.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.light_blue-light_green.css +1 -1
- package/styles/themes/material/wijmo.theme.material.light_blue-light_green.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.light_blue-lime.css +1 -1
- package/styles/themes/material/wijmo.theme.material.light_blue-lime.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.light_blue-orange.css +1 -1
- package/styles/themes/material/wijmo.theme.material.light_blue-orange.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.light_blue-pink.css +1 -1
- package/styles/themes/material/wijmo.theme.material.light_blue-pink.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.light_blue-purple.css +1 -1
- package/styles/themes/material/wijmo.theme.material.light_blue-purple.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.light_blue-red.css +1 -1
- package/styles/themes/material/wijmo.theme.material.light_blue-red.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.light_blue-teal.css +1 -1
- package/styles/themes/material/wijmo.theme.material.light_blue-teal.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.light_blue-yellow.css +1 -1
- package/styles/themes/material/wijmo.theme.material.light_blue-yellow.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.light_green-amber.css +1 -1
- package/styles/themes/material/wijmo.theme.material.light_green-amber.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.light_green-blue.css +1 -1
- package/styles/themes/material/wijmo.theme.material.light_green-blue.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.light_green-cyan.css +1 -1
- package/styles/themes/material/wijmo.theme.material.light_green-cyan.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.light_green-deep_orange.css +1 -1
- package/styles/themes/material/wijmo.theme.material.light_green-deep_orange.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.light_green-deep_purple.css +1 -1
- package/styles/themes/material/wijmo.theme.material.light_green-deep_purple.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.light_green-green.css +1 -1
- package/styles/themes/material/wijmo.theme.material.light_green-green.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.light_green-indigo.css +1 -1
- package/styles/themes/material/wijmo.theme.material.light_green-indigo.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.light_green-light_blue.css +1 -1
- package/styles/themes/material/wijmo.theme.material.light_green-light_blue.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.light_green-lime.css +1 -1
- package/styles/themes/material/wijmo.theme.material.light_green-lime.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.light_green-orange.css +1 -1
- package/styles/themes/material/wijmo.theme.material.light_green-orange.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.light_green-pink.css +1 -1
- package/styles/themes/material/wijmo.theme.material.light_green-pink.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.light_green-purple.css +1 -1
- package/styles/themes/material/wijmo.theme.material.light_green-purple.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.light_green-red.css +1 -1
- package/styles/themes/material/wijmo.theme.material.light_green-red.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.light_green-teal.css +1 -1
- package/styles/themes/material/wijmo.theme.material.light_green-teal.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.light_green-yellow.css +1 -1
- package/styles/themes/material/wijmo.theme.material.light_green-yellow.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.lime-amber.css +1 -1
- package/styles/themes/material/wijmo.theme.material.lime-amber.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.lime-blue.css +1 -1
- package/styles/themes/material/wijmo.theme.material.lime-blue.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.lime-cyan.css +1 -1
- package/styles/themes/material/wijmo.theme.material.lime-cyan.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.lime-deep_orange.css +1 -1
- package/styles/themes/material/wijmo.theme.material.lime-deep_orange.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.lime-deep_purple.css +1 -1
- package/styles/themes/material/wijmo.theme.material.lime-deep_purple.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.lime-green.css +1 -1
- package/styles/themes/material/wijmo.theme.material.lime-green.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.lime-indigo.css +1 -1
- package/styles/themes/material/wijmo.theme.material.lime-indigo.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.lime-light_blue.css +1 -1
- package/styles/themes/material/wijmo.theme.material.lime-light_blue.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.lime-light_green.css +1 -1
- package/styles/themes/material/wijmo.theme.material.lime-light_green.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.lime-orange.css +1 -1
- package/styles/themes/material/wijmo.theme.material.lime-orange.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.lime-pink.css +1 -1
- package/styles/themes/material/wijmo.theme.material.lime-pink.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.lime-purple.css +1 -1
- package/styles/themes/material/wijmo.theme.material.lime-purple.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.lime-red.css +1 -1
- package/styles/themes/material/wijmo.theme.material.lime-red.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.lime-teal.css +1 -1
- package/styles/themes/material/wijmo.theme.material.lime-teal.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.lime-yellow.css +1 -1
- package/styles/themes/material/wijmo.theme.material.lime-yellow.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.orange-amber.css +1 -1
- package/styles/themes/material/wijmo.theme.material.orange-amber.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.orange-blue.css +1 -1
- package/styles/themes/material/wijmo.theme.material.orange-blue.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.orange-cyan.css +1 -1
- package/styles/themes/material/wijmo.theme.material.orange-cyan.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.orange-deep_orange.css +1 -1
- package/styles/themes/material/wijmo.theme.material.orange-deep_orange.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.orange-deep_purple.css +1 -1
- package/styles/themes/material/wijmo.theme.material.orange-deep_purple.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.orange-green.css +1 -1
- package/styles/themes/material/wijmo.theme.material.orange-green.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.orange-indigo.css +1 -1
- package/styles/themes/material/wijmo.theme.material.orange-indigo.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.orange-light_blue.css +1 -1
- package/styles/themes/material/wijmo.theme.material.orange-light_blue.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.orange-light_green.css +1 -1
- package/styles/themes/material/wijmo.theme.material.orange-light_green.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.orange-lime.css +1 -1
- package/styles/themes/material/wijmo.theme.material.orange-lime.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.orange-pink.css +1 -1
- package/styles/themes/material/wijmo.theme.material.orange-pink.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.orange-purple.css +1 -1
- package/styles/themes/material/wijmo.theme.material.orange-purple.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.orange-red.css +1 -1
- package/styles/themes/material/wijmo.theme.material.orange-red.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.orange-teal.css +1 -1
- package/styles/themes/material/wijmo.theme.material.orange-teal.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.orange-yellow.css +1 -1
- package/styles/themes/material/wijmo.theme.material.orange-yellow.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.pink-amber.css +1 -1
- package/styles/themes/material/wijmo.theme.material.pink-amber.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.pink-blue.css +1 -1
- package/styles/themes/material/wijmo.theme.material.pink-blue.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.pink-cyan.css +1 -1
- package/styles/themes/material/wijmo.theme.material.pink-cyan.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.pink-deep_orange.css +1 -1
- package/styles/themes/material/wijmo.theme.material.pink-deep_orange.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.pink-deep_purple.css +1 -1
- package/styles/themes/material/wijmo.theme.material.pink-deep_purple.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.pink-green.css +1 -1
- package/styles/themes/material/wijmo.theme.material.pink-green.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.pink-indigo.css +1 -1
- package/styles/themes/material/wijmo.theme.material.pink-indigo.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.pink-light_blue.css +1 -1
- package/styles/themes/material/wijmo.theme.material.pink-light_blue.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.pink-light_green.css +1 -1
- package/styles/themes/material/wijmo.theme.material.pink-light_green.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.pink-lime.css +1 -1
- package/styles/themes/material/wijmo.theme.material.pink-lime.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.pink-orange.css +1 -1
- package/styles/themes/material/wijmo.theme.material.pink-orange.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.pink-purple.css +1 -1
- package/styles/themes/material/wijmo.theme.material.pink-purple.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.pink-red.css +1 -1
- package/styles/themes/material/wijmo.theme.material.pink-red.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.pink-teal.css +1 -1
- package/styles/themes/material/wijmo.theme.material.pink-teal.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.pink-yellow.css +1 -1
- package/styles/themes/material/wijmo.theme.material.pink-yellow.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.purple-amber.css +1 -1
- package/styles/themes/material/wijmo.theme.material.purple-amber.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.purple-blue.css +1 -1
- package/styles/themes/material/wijmo.theme.material.purple-blue.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.purple-cyan.css +1 -1
- package/styles/themes/material/wijmo.theme.material.purple-cyan.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.purple-deep_orange.css +1 -1
- package/styles/themes/material/wijmo.theme.material.purple-deep_orange.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.purple-deep_purple.css +1 -1
- package/styles/themes/material/wijmo.theme.material.purple-deep_purple.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.purple-green.css +1 -1
- package/styles/themes/material/wijmo.theme.material.purple-green.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.purple-indigo.css +1 -1
- package/styles/themes/material/wijmo.theme.material.purple-indigo.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.purple-light_blue.css +1 -1
- package/styles/themes/material/wijmo.theme.material.purple-light_blue.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.purple-light_green.css +1 -1
- package/styles/themes/material/wijmo.theme.material.purple-light_green.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.purple-lime.css +1 -1
- package/styles/themes/material/wijmo.theme.material.purple-lime.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.purple-orange.css +1 -1
- package/styles/themes/material/wijmo.theme.material.purple-orange.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.purple-pink.css +1 -1
- package/styles/themes/material/wijmo.theme.material.purple-pink.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.purple-red.css +1 -1
- package/styles/themes/material/wijmo.theme.material.purple-red.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.purple-teal.css +1 -1
- package/styles/themes/material/wijmo.theme.material.purple-teal.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.purple-yellow.css +1 -1
- package/styles/themes/material/wijmo.theme.material.purple-yellow.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.red-amber.css +1 -1
- package/styles/themes/material/wijmo.theme.material.red-amber.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.red-blue.css +1 -1
- package/styles/themes/material/wijmo.theme.material.red-blue.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.red-cyan.css +1 -1
- package/styles/themes/material/wijmo.theme.material.red-cyan.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.red-deep_orange.css +1 -1
- package/styles/themes/material/wijmo.theme.material.red-deep_orange.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.red-deep_purple.css +1 -1
- package/styles/themes/material/wijmo.theme.material.red-deep_purple.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.red-green.css +1 -1
- package/styles/themes/material/wijmo.theme.material.red-green.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.red-indigo.css +1 -1
- package/styles/themes/material/wijmo.theme.material.red-indigo.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.red-light_blue.css +1 -1
- package/styles/themes/material/wijmo.theme.material.red-light_blue.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.red-light_green.css +1 -1
- package/styles/themes/material/wijmo.theme.material.red-light_green.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.red-lime.css +1 -1
- package/styles/themes/material/wijmo.theme.material.red-lime.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.red-orange.css +1 -1
- package/styles/themes/material/wijmo.theme.material.red-orange.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.red-pink.css +1 -1
- package/styles/themes/material/wijmo.theme.material.red-pink.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.red-purple.css +1 -1
- package/styles/themes/material/wijmo.theme.material.red-purple.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.red-teal.css +1 -1
- package/styles/themes/material/wijmo.theme.material.red-teal.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.red-yellow.css +1 -1
- package/styles/themes/material/wijmo.theme.material.red-yellow.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.teal-amber.css +1 -1
- package/styles/themes/material/wijmo.theme.material.teal-amber.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.teal-blue.css +1 -1
- package/styles/themes/material/wijmo.theme.material.teal-blue.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.teal-cyan.css +1 -1
- package/styles/themes/material/wijmo.theme.material.teal-cyan.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.teal-deep_orange.css +1 -1
- package/styles/themes/material/wijmo.theme.material.teal-deep_orange.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.teal-deep_purple.css +1 -1
- package/styles/themes/material/wijmo.theme.material.teal-deep_purple.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.teal-green.css +1 -1
- package/styles/themes/material/wijmo.theme.material.teal-green.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.teal-indigo.css +1 -1
- package/styles/themes/material/wijmo.theme.material.teal-indigo.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.teal-light_blue.css +1 -1
- package/styles/themes/material/wijmo.theme.material.teal-light_blue.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.teal-light_green.css +1 -1
- package/styles/themes/material/wijmo.theme.material.teal-light_green.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.teal-lime.css +1 -1
- package/styles/themes/material/wijmo.theme.material.teal-lime.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.teal-orange.css +1 -1
- package/styles/themes/material/wijmo.theme.material.teal-orange.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.teal-pink.css +1 -1
- package/styles/themes/material/wijmo.theme.material.teal-pink.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.teal-purple.css +1 -1
- package/styles/themes/material/wijmo.theme.material.teal-purple.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.teal-red.css +1 -1
- package/styles/themes/material/wijmo.theme.material.teal-red.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.teal-yellow.css +1 -1
- package/styles/themes/material/wijmo.theme.material.teal-yellow.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.yellow-amber.css +1 -1
- package/styles/themes/material/wijmo.theme.material.yellow-amber.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.yellow-blue.css +1 -1
- package/styles/themes/material/wijmo.theme.material.yellow-blue.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.yellow-cyan.css +1 -1
- package/styles/themes/material/wijmo.theme.material.yellow-cyan.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.yellow-deep_orange.css +1 -1
- package/styles/themes/material/wijmo.theme.material.yellow-deep_orange.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.yellow-deep_purple.css +1 -1
- package/styles/themes/material/wijmo.theme.material.yellow-deep_purple.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.yellow-green.css +1 -1
- package/styles/themes/material/wijmo.theme.material.yellow-green.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.yellow-indigo.css +1 -1
- package/styles/themes/material/wijmo.theme.material.yellow-indigo.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.yellow-light_blue.css +1 -1
- package/styles/themes/material/wijmo.theme.material.yellow-light_blue.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.yellow-light_green.css +1 -1
- package/styles/themes/material/wijmo.theme.material.yellow-light_green.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.yellow-lime.css +1 -1
- package/styles/themes/material/wijmo.theme.material.yellow-lime.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.yellow-orange.css +1 -1
- package/styles/themes/material/wijmo.theme.material.yellow-orange.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.yellow-pink.css +1 -1
- package/styles/themes/material/wijmo.theme.material.yellow-pink.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.yellow-purple.css +1 -1
- package/styles/themes/material/wijmo.theme.material.yellow-purple.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.yellow-red.css +1 -1
- package/styles/themes/material/wijmo.theme.material.yellow-red.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.yellow-teal.css +1 -1
- package/styles/themes/material/wijmo.theme.material.yellow-teal.scss +1 -2
- package/styles/themes/wijmo.theme.cerulean.css +1 -1
- package/styles/themes/wijmo.theme.cerulean.scss +1 -2
- package/styles/themes/wijmo.theme.cleandark.css +1 -1
- package/styles/themes/wijmo.theme.cleandark.scss +2 -3
- package/styles/themes/wijmo.theme.cleanlight.css +1 -1
- package/styles/themes/wijmo.theme.cleanlight.scss +3 -4
- package/styles/themes/wijmo.theme.cocoa.css +1 -1
- package/styles/themes/wijmo.theme.cocoa.scss +1 -2
- package/styles/themes/wijmo.theme.coral.css +1 -1
- package/styles/themes/wijmo.theme.coral.scss +1 -2
- package/styles/themes/wijmo.theme.cyborg.css +1 -1
- package/styles/themes/wijmo.theme.cyborg.scss +1 -2
- package/styles/themes/wijmo.theme.dark.css +1 -1
- package/styles/themes/wijmo.theme.dark.scss +1 -2
- package/styles/themes/wijmo.theme.darkly.css +1 -1
- package/styles/themes/wijmo.theme.darkly.scss +1 -1
- package/styles/themes/wijmo.theme.flatly.css +1 -1
- package/styles/themes/wijmo.theme.flatly.scss +2 -3
- package/styles/themes/wijmo.theme.grayscale.css +1 -1
- package/styles/themes/wijmo.theme.grayscale.scss +1 -1
- package/styles/themes/wijmo.theme.highcontrast.css +1 -1
- package/styles/themes/wijmo.theme.highcontrast.scss +9 -9
- package/styles/themes/wijmo.theme.light.css +1 -1
- package/styles/themes/wijmo.theme.light.scss +1 -1
- package/styles/themes/wijmo.theme.material.amber-indigo.css +1 -1
- package/styles/themes/wijmo.theme.material.amber-indigo.scss +1 -2
- package/styles/themes/wijmo.theme.material.css +1 -1
- package/styles/themes/wijmo.theme.material.indigo-orange.css +1 -1
- package/styles/themes/wijmo.theme.material.indigo-orange.scss +1 -1
- package/styles/themes/wijmo.theme.material.scss +33 -29
- package/styles/themes/wijmo.theme.material.vars.css +1 -1
- package/styles/themes/wijmo.theme.material.vars.scss +1 -1
- package/styles/themes/wijmo.theme.midnight.css +1 -1
- package/styles/themes/wijmo.theme.midnight.scss +1 -1
- package/styles/themes/wijmo.theme.minimal.css +1 -1
- package/styles/themes/wijmo.theme.minimal.scss +1 -1
- package/styles/themes/wijmo.theme.modern.css +1 -1
- package/styles/themes/wijmo.theme.modern.scss +1 -1
- package/styles/themes/wijmo.theme.office.css +1 -1
- package/styles/themes/wijmo.theme.office.scss +1 -1
- package/styles/themes/wijmo.theme.organic.css +1 -1
- package/styles/themes/wijmo.theme.organic.scss +2 -2
- package/styles/themes/wijmo.theme.paper.css +1 -1
- package/styles/themes/wijmo.theme.paper.scss +1 -1
- package/styles/themes/wijmo.theme.simplex.css +1 -1
- package/styles/themes/wijmo.theme.simplex.scss +1 -1
- package/styles/themes/wijmo.theme.slate.css +1 -1
- package/styles/themes/wijmo.theme.slate.scss +1 -1
- package/styles/themes/wijmo.theme.superhero.css +1 -1
- package/styles/themes/wijmo.theme.superhero.scss +1 -1
- package/styles/themes/wijmo.theme.trust.css +1 -1
- package/styles/themes/wijmo.theme.trust.scss +1 -1
- package/styles/themes/wijmo.theme.zen.css +1 -1
- package/styles/themes/wijmo.theme.zen.scss +1 -1
- package/styles/wijmo-core.css +1 -1
- package/styles/wijmo-core.scss +5 -5
- package/styles/wijmo.css +1 -1
- package/styles/wijmo.scss +1 -1
- package/wijmo.angular.base.d.ts +1 -1
- package/wijmo.angular.base.js +1 -1
- package/wijmo.angular.chart.analytics.d.ts +1 -1
- package/wijmo.angular.chart.analytics.js +1 -1
- package/wijmo.angular.chart.animation.d.ts +1 -1
- package/wijmo.angular.chart.animation.js +1 -1
- package/wijmo.angular.chart.annotation.d.ts +1 -1
- package/wijmo.angular.chart.annotation.js +1 -1
- package/wijmo.angular.chart.d.ts +1 -1
- package/wijmo.angular.chart.finance.analytics.d.ts +1 -1
- package/wijmo.angular.chart.finance.analytics.js +1 -1
- package/wijmo.angular.chart.finance.d.ts +1 -1
- package/wijmo.angular.chart.finance.js +1 -1
- package/wijmo.angular.chart.hierarchical.d.ts +1 -1
- package/wijmo.angular.chart.hierarchical.js +1 -1
- package/wijmo.angular.chart.interaction.d.ts +1 -1
- package/wijmo.angular.chart.interaction.js +1 -1
- package/wijmo.angular.chart.js +1 -1
- package/wijmo.angular.chart.radar.d.ts +1 -1
- package/wijmo.angular.chart.radar.js +1 -1
- package/wijmo.angular.core.d.ts +1 -1
- package/wijmo.angular.core.js +1 -1
- package/wijmo.angular.gauge.d.ts +1 -1
- package/wijmo.angular.gauge.js +1 -1
- package/wijmo.angular.grid.d.ts +1 -1
- package/wijmo.angular.grid.detail.d.ts +1 -1
- package/wijmo.angular.grid.detail.js +1 -1
- package/wijmo.angular.grid.filter.d.ts +1 -1
- package/wijmo.angular.grid.filter.js +1 -1
- package/wijmo.angular.grid.grouppanel.d.ts +1 -1
- package/wijmo.angular.grid.grouppanel.js +1 -1
- package/wijmo.angular.grid.js +1 -1
- package/wijmo.angular.grid.multirow.d.ts +1 -1
- package/wijmo.angular.grid.multirow.js +1 -1
- package/wijmo.angular.grid.sheet.d.ts +1 -1
- package/wijmo.angular.grid.sheet.js +1 -1
- package/wijmo.angular.input.d.ts +1 -1
- package/wijmo.angular.input.js +1 -1
- package/wijmo.angular.nav.d.ts +1 -1
- package/wijmo.angular.nav.js +1 -1
- package/wijmo.angular.olap.d.ts +1 -1
- package/wijmo.angular.olap.js +1 -1
- package/wijmo.angular.viewer.d.ts +1 -1
- package/wijmo.angular.viewer.js +1 -1
- package/wijmo.angular2.barcode.common.d.ts +30 -30
- package/wijmo.angular2.barcode.common.js +1 -1
- package/wijmo.angular2.barcode.composite.d.ts +28 -28
- package/wijmo.angular2.barcode.composite.js +1 -1
- package/wijmo.angular2.barcode.specialized.d.ts +24 -24
- package/wijmo.angular2.barcode.specialized.js +1 -1
- package/wijmo.angular2.chart.analytics.d.ts +26 -26
- package/wijmo.angular2.chart.analytics.js +1 -1
- package/wijmo.angular2.chart.animation.d.ts +26 -26
- package/wijmo.angular2.chart.animation.js +1 -1
- package/wijmo.angular2.chart.annotation.d.ts +45 -45
- package/wijmo.angular2.chart.annotation.js +1 -1
- package/wijmo.angular2.chart.d.ts +42 -42
- package/wijmo.angular2.chart.finance.analytics.d.ts +36 -36
- package/wijmo.angular2.chart.finance.analytics.js +1 -1
- package/wijmo.angular2.chart.finance.d.ts +26 -26
- package/wijmo.angular2.chart.finance.js +1 -1
- package/wijmo.angular2.chart.finance.metadata.json +1 -1
- package/wijmo.angular2.chart.hierarchical.d.ts +25 -25
- package/wijmo.angular2.chart.hierarchical.js +1 -1
- package/wijmo.angular2.chart.interaction.d.ts +28 -28
- package/wijmo.angular2.chart.interaction.js +1 -1
- package/wijmo.angular2.chart.js +1 -1
- package/wijmo.angular2.chart.map.d.ts +20 -20
- package/wijmo.angular2.chart.map.js +1 -1
- package/wijmo.angular2.chart.map.metadata.json +1 -1
- package/wijmo.angular2.chart.metadata.json +1 -1
- package/wijmo.angular2.chart.radar.d.ts +28 -28
- package/wijmo.angular2.chart.radar.js +1 -1
- package/wijmo.angular2.chart.radar.metadata.json +1 -1
- package/wijmo.angular2.core.d.ts +47 -47
- package/wijmo.angular2.core.js +2 -2
- package/wijmo.angular2.core.metadata.json +1 -1
- package/wijmo.angular2.directiveBase.d.ts +67 -68
- package/wijmo.angular2.directiveBase.js +2 -2
- package/wijmo.angular2.directiveBase.metadata.json +1 -1
- package/wijmo.angular2.gauge.d.ts +27 -27
- package/wijmo.angular2.gauge.js +1 -1
- package/wijmo.angular2.gauge.metadata.json +1 -1
- package/wijmo.angular2.grid.d.ts +45 -45
- package/wijmo.angular2.grid.detail.d.ts +39 -39
- package/wijmo.angular2.grid.detail.js +2 -2
- package/wijmo.angular2.grid.filter.d.ts +25 -25
- package/wijmo.angular2.grid.filter.js +1 -1
- package/wijmo.angular2.grid.grouppanel.d.ts +28 -28
- package/wijmo.angular2.grid.grouppanel.js +1 -1
- package/wijmo.angular2.grid.js +2 -2
- package/wijmo.angular2.grid.multirow.d.ts +24 -24
- package/wijmo.angular2.grid.multirow.js +1 -1
- package/wijmo.angular2.grid.multirow.metadata.json +1 -1
- package/wijmo.angular2.grid.search.d.ts +12 -12
- package/wijmo.angular2.grid.search.js +1 -1
- package/wijmo.angular2.grid.sheet.d.ts +22 -22
- package/wijmo.angular2.grid.sheet.js +1 -1
- package/wijmo.angular2.grid.sheet.metadata.json +1 -1
- package/wijmo.angular2.grid.transposed.d.ts +14 -14
- package/wijmo.angular2.grid.transposed.js +2 -2
- package/wijmo.angular2.grid.transposedmultirow.d.ts +12 -12
- package/wijmo.angular2.grid.transposedmultirow.js +1 -1
- package/wijmo.angular2.input.d.ts +97 -97
- package/wijmo.angular2.input.js +2 -2
- package/wijmo.angular2.input.metadata.json +1 -1
- package/wijmo.angular2.nav.d.ts +31 -31
- package/wijmo.angular2.nav.js +1 -1
- package/wijmo.angular2.nav.metadata.json +1 -1
- package/wijmo.angular2.olap.d.ts +27 -27
- package/wijmo.angular2.olap.js +1 -1
- package/wijmo.angular2.viewer.d.ts +25 -25
- package/wijmo.angular2.viewer.js +1 -1
- package/wijmo.angular2.viewer.metadata.json +1 -1
- package/wijmo.barcode.common.d.ts +36 -36
- package/wijmo.barcode.common.js +2 -2
- package/wijmo.barcode.composite.d.ts +18 -19
- package/wijmo.barcode.composite.js +2 -2
- package/wijmo.barcode.d.ts +19 -19
- package/wijmo.barcode.js +2 -2
- package/wijmo.barcode.specialized.d.ts +5 -6
- package/wijmo.barcode.specialized.js +2 -2
- package/wijmo.chart.analytics.d.ts +7 -8
- package/wijmo.chart.analytics.js +2 -2
- package/wijmo.chart.animation.d.ts +2 -2
- package/wijmo.chart.animation.js +2 -2
- package/wijmo.chart.annotation.d.ts +21 -21
- package/wijmo.chart.annotation.js +2 -2
- package/wijmo.chart.d.ts +442 -453
- package/wijmo.chart.finance.analytics.d.ts +10 -10
- package/wijmo.chart.finance.analytics.js +2 -2
- package/wijmo.chart.finance.d.ts +10 -10
- package/wijmo.chart.finance.js +2 -2
- package/wijmo.chart.hierarchical.d.ts +16 -19
- package/wijmo.chart.hierarchical.js +2 -2
- package/wijmo.chart.interaction.d.ts +37 -38
- package/wijmo.chart.interaction.js +2 -2
- package/wijmo.chart.js +2 -2
- package/wijmo.chart.map.d.ts +59 -60
- package/wijmo.chart.map.js +2 -2
- package/wijmo.chart.radar.d.ts +7 -8
- package/wijmo.chart.radar.js +2 -2
- package/wijmo.chart.render.d.ts +14 -14
- package/wijmo.chart.render.js +2 -2
- package/wijmo.chart.webgl.d.ts +3 -6
- package/wijmo.chart.webgl.js +2 -2
- package/wijmo.cloud.d.ts +1 -1
- package/wijmo.cloud.js +2 -2
- package/wijmo.d.ts +44 -44
- package/wijmo.gauge.d.ts +4 -4
- package/wijmo.gauge.js +2 -2
- package/wijmo.grid.cellmaker.d.ts +1 -1
- package/wijmo.grid.cellmaker.js +2 -2
- package/wijmo.grid.d.ts +104 -106
- package/wijmo.grid.detail.d.ts +5 -5
- package/wijmo.grid.detail.js +2 -2
- package/wijmo.grid.filter.d.ts +30 -30
- package/wijmo.grid.filter.js +2 -2
- package/wijmo.grid.grouppanel.d.ts +7 -7
- package/wijmo.grid.grouppanel.js +2 -2
- package/wijmo.grid.immutable.d.ts +2 -2
- package/wijmo.grid.immutable.js +2 -2
- package/wijmo.grid.js +2 -2
- package/wijmo.grid.multirow.d.ts +3 -3
- package/wijmo.grid.multirow.js +2 -2
- package/wijmo.grid.pdf.d.ts +243 -243
- package/wijmo.grid.pdf.js +2 -2
- package/wijmo.grid.search.d.ts +1 -1
- package/wijmo.grid.search.js +1 -1
- package/wijmo.grid.selector.d.ts +5 -6
- package/wijmo.grid.selector.js +2 -2
- package/wijmo.grid.sheet.d.ts +27 -28
- package/wijmo.grid.sheet.js +2 -2
- package/wijmo.grid.style.d.ts +19 -19
- package/wijmo.grid.style.js +1 -1
- package/wijmo.grid.transposed.d.ts +2 -2
- package/wijmo.grid.transposed.js +2 -2
- package/wijmo.grid.transposedmultirow.d.ts +2 -2
- package/wijmo.grid.transposedmultirow.js +1 -1
- package/wijmo.grid.xlsx.d.ts +1 -1
- package/wijmo.grid.xlsx.js +2 -2
- package/wijmo.input.d.ts +17 -17
- package/wijmo.input.js +2 -2
- package/wijmo.interop.grid.d.ts +5 -7
- package/wijmo.interop.grid.js +2 -2
- package/wijmo.js +2 -2
- package/wijmo.knockout.base.d.ts +1 -1
- package/wijmo.knockout.base.js +1 -1
- package/wijmo.knockout.chart.analytics.d.ts +1 -1
- package/wijmo.knockout.chart.analytics.js +1 -1
- package/wijmo.knockout.chart.animation.d.ts +1 -1
- package/wijmo.knockout.chart.animation.js +1 -1
- package/wijmo.knockout.chart.annotation.d.ts +1 -1
- package/wijmo.knockout.chart.annotation.js +1 -1
- package/wijmo.knockout.chart.d.ts +1 -1
- package/wijmo.knockout.chart.finance.analytics.d.ts +1 -1
- package/wijmo.knockout.chart.finance.analytics.js +1 -1
- package/wijmo.knockout.chart.finance.d.ts +1 -1
- package/wijmo.knockout.chart.finance.js +1 -1
- package/wijmo.knockout.chart.interaction.d.ts +1 -1
- package/wijmo.knockout.chart.interaction.js +1 -1
- package/wijmo.knockout.chart.js +1 -1
- package/wijmo.knockout.core.d.ts +1 -1
- package/wijmo.knockout.core.js +1 -1
- package/wijmo.knockout.gauge.d.ts +1 -1
- package/wijmo.knockout.gauge.js +1 -1
- package/wijmo.knockout.grid.d.ts +1 -1
- package/wijmo.knockout.grid.filter.d.ts +1 -1
- package/wijmo.knockout.grid.filter.js +1 -1
- package/wijmo.knockout.grid.grouppanel.d.ts +1 -1
- package/wijmo.knockout.grid.grouppanel.js +1 -1
- package/wijmo.knockout.grid.js +1 -1
- package/wijmo.knockout.grid.multirow.d.ts +1 -1
- package/wijmo.knockout.grid.multirow.js +1 -1
- package/wijmo.knockout.grid.sheet.d.ts +1 -1
- package/wijmo.knockout.grid.sheet.js +1 -1
- package/wijmo.knockout.input.d.ts +1 -1
- package/wijmo.knockout.input.js +1 -1
- package/wijmo.knockout.nav.d.ts +1 -1
- package/wijmo.knockout.nav.js +1 -1
- package/wijmo.knockout.olap.d.ts +1 -1
- package/wijmo.knockout.olap.js +1 -1
- package/wijmo.meta.d.ts +2 -2
- package/wijmo.meta.js +2 -2
- package/wijmo.nav.d.ts +8 -8
- package/wijmo.nav.js +2 -2
- package/wijmo.odata.d.ts +25 -27
- package/wijmo.odata.js +2 -2
- package/wijmo.olap.d.ts +10 -12
- package/wijmo.olap.js +2 -2
- package/wijmo.pdf.d.ts +1562 -1563
- package/wijmo.pdf.js +2 -2
- package/wijmo.pdf.security.d.ts +2 -2
- package/wijmo.pdf.security.js +2 -2
- package/wijmo.react.barcode.base.d.ts +1 -1
- package/wijmo.react.barcode.base.js +1 -1
- package/wijmo.react.barcode.common.d.ts +1 -1
- package/wijmo.react.barcode.common.js +1 -1
- package/wijmo.react.barcode.composite.d.ts +1 -1
- package/wijmo.react.barcode.composite.js +1 -1
- package/wijmo.react.barcode.specialized.d.ts +1 -1
- package/wijmo.react.barcode.specialized.js +1 -1
- package/wijmo.react.base.d.ts +50 -50
- package/wijmo.react.base.js +1 -1
- package/wijmo.react.chart.analytics.d.ts +1 -1
- package/wijmo.react.chart.analytics.js +1 -1
- package/wijmo.react.chart.animation.d.ts +1 -1
- package/wijmo.react.chart.animation.js +1 -1
- package/wijmo.react.chart.annotation.d.ts +18 -18
- package/wijmo.react.chart.annotation.js +1 -1
- package/wijmo.react.chart.d.ts +4 -4
- package/wijmo.react.chart.finance.analytics.d.ts +1 -1
- package/wijmo.react.chart.finance.analytics.js +1 -1
- package/wijmo.react.chart.finance.d.ts +1 -1
- package/wijmo.react.chart.finance.js +1 -1
- package/wijmo.react.chart.hierarchical.d.ts +1 -1
- package/wijmo.react.chart.hierarchical.js +1 -1
- package/wijmo.react.chart.interaction.d.ts +2 -2
- package/wijmo.react.chart.interaction.js +1 -1
- package/wijmo.react.chart.js +1 -1
- package/wijmo.react.chart.map.d.ts +1 -1
- package/wijmo.react.chart.map.js +1 -1
- package/wijmo.react.chart.radar.d.ts +1 -1
- package/wijmo.react.chart.radar.js +1 -1
- package/wijmo.react.gauge.d.ts +1 -1
- package/wijmo.react.gauge.js +1 -1
- package/wijmo.react.grid.d.ts +5 -5
- package/wijmo.react.grid.detail.d.ts +2 -3
- package/wijmo.react.grid.detail.js +2 -2
- package/wijmo.react.grid.filter.d.ts +1 -1
- package/wijmo.react.grid.filter.js +1 -1
- package/wijmo.react.grid.grouppanel.d.ts +1 -1
- package/wijmo.react.grid.grouppanel.js +1 -1
- package/wijmo.react.grid.immutable.d.ts +1 -1
- package/wijmo.react.grid.immutable.js +1 -1
- package/wijmo.react.grid.js +2 -2
- package/wijmo.react.grid.multirow.d.ts +1 -1
- package/wijmo.react.grid.multirow.js +1 -1
- package/wijmo.react.grid.search.d.ts +1 -1
- package/wijmo.react.grid.search.js +1 -1
- package/wijmo.react.grid.sheet.d.ts +1 -1
- package/wijmo.react.grid.sheet.js +1 -1
- package/wijmo.react.grid.transposed.d.ts +1 -1
- package/wijmo.react.grid.transposed.js +1 -1
- package/wijmo.react.grid.transposedmultirow.d.ts +1 -1
- package/wijmo.react.grid.transposedmultirow.js +1 -1
- package/wijmo.react.input.d.ts +2 -3
- package/wijmo.react.input.js +2 -2
- package/wijmo.react.nav.d.ts +3 -3
- package/wijmo.react.nav.js +1 -1
- package/wijmo.react.olap.d.ts +1 -1
- package/wijmo.react.olap.js +1 -1
- package/wijmo.react.viewer.d.ts +1 -1
- package/wijmo.react.viewer.js +1 -1
- package/wijmo.rest.d.ts +28 -28
- package/wijmo.rest.js +2 -2
- package/wijmo.touch.d.ts +1 -2
- package/wijmo.touch.js +2 -2
- package/wijmo.undo.d.ts +4 -4
- package/wijmo.undo.js +2 -2
- package/wijmo.viewer.d.ts +388 -407
- package/wijmo.viewer.js +2 -2
- package/wijmo.vue2.barcode.common.d.ts +1 -1
- package/wijmo.vue2.barcode.common.js +1 -1
- package/wijmo.vue2.barcode.composite.d.ts +1 -1
- package/wijmo.vue2.barcode.composite.js +1 -1
- package/wijmo.vue2.barcode.specialized.d.ts +1 -1
- package/wijmo.vue2.barcode.specialized.js +1 -1
- package/wijmo.vue2.base.d.ts +1 -2
- package/wijmo.vue2.base.js +2 -2
- package/wijmo.vue2.chart.analytics.d.ts +1 -1
- package/wijmo.vue2.chart.analytics.js +1 -1
- package/wijmo.vue2.chart.animation.d.ts +1 -1
- package/wijmo.vue2.chart.animation.js +1 -1
- package/wijmo.vue2.chart.annotation.d.ts +1 -1
- package/wijmo.vue2.chart.annotation.js +1 -1
- package/wijmo.vue2.chart.d.ts +1 -1
- package/wijmo.vue2.chart.finance.analytics.d.ts +1 -1
- package/wijmo.vue2.chart.finance.analytics.js +1 -1
- package/wijmo.vue2.chart.finance.d.ts +1 -1
- package/wijmo.vue2.chart.finance.js +1 -1
- package/wijmo.vue2.chart.hierarchical.d.ts +1 -1
- package/wijmo.vue2.chart.hierarchical.js +1 -1
- package/wijmo.vue2.chart.interaction.d.ts +1 -1
- package/wijmo.vue2.chart.interaction.js +1 -1
- package/wijmo.vue2.chart.js +1 -1
- package/wijmo.vue2.chart.map.d.ts +1 -1
- package/wijmo.vue2.chart.map.js +1 -1
- package/wijmo.vue2.chart.radar.d.ts +1 -1
- package/wijmo.vue2.chart.radar.js +1 -1
- package/wijmo.vue2.core.d.ts +33 -33
- package/wijmo.vue2.core.js +1 -1
- package/wijmo.vue2.gauge.d.ts +1 -1
- package/wijmo.vue2.gauge.js +1 -1
- package/wijmo.vue2.grid.d.ts +280 -280
- package/wijmo.vue2.grid.detail.d.ts +1 -1
- package/wijmo.vue2.grid.detail.js +1 -1
- package/wijmo.vue2.grid.filter.d.ts +1 -1
- package/wijmo.vue2.grid.filter.js +1 -1
- package/wijmo.vue2.grid.grouppanel.d.ts +1 -1
- package/wijmo.vue2.grid.grouppanel.js +1 -1
- package/wijmo.vue2.grid.js +2 -2
- package/wijmo.vue2.grid.multirow.d.ts +245 -245
- package/wijmo.vue2.grid.multirow.js +1 -1
- package/wijmo.vue2.grid.search.d.ts +1 -1
- package/wijmo.vue2.grid.search.js +1 -1
- package/wijmo.vue2.grid.sheet.d.ts +1 -1
- package/wijmo.vue2.grid.sheet.js +1 -1
- package/wijmo.vue2.grid.transposed.d.ts +1 -1
- package/wijmo.vue2.grid.transposed.js +1 -1
- package/wijmo.vue2.grid.transposedmultirow.d.ts +1 -1
- package/wijmo.vue2.grid.transposedmultirow.js +1 -1
- package/wijmo.vue2.input.d.ts +1 -1
- package/wijmo.vue2.input.js +1 -1
- package/wijmo.vue2.nav.d.ts +1 -1
- package/wijmo.vue2.nav.js +1 -1
- package/wijmo.vue2.olap.d.ts +1 -1
- package/wijmo.vue2.olap.js +1 -1
- package/wijmo.vue2.viewer.d.ts +1 -1
- package/wijmo.vue2.viewer.js +1 -1
- package/wijmo.webcomponents.barcode.common.d.ts +1 -1
- package/wijmo.webcomponents.barcode.common.js +1 -1
- package/wijmo.webcomponents.barcode.composite.d.ts +1 -1
- package/wijmo.webcomponents.barcode.composite.js +1 -1
- package/wijmo.webcomponents.barcode.specialized.d.ts +1 -1
- package/wijmo.webcomponents.barcode.specialized.js +1 -1
- package/wijmo.webcomponents.base.d.ts +1 -1
- package/wijmo.webcomponents.base.js +1 -1
- package/wijmo.webcomponents.chart.analytics.d.ts +1 -1
- package/wijmo.webcomponents.chart.analytics.js +1 -1
- package/wijmo.webcomponents.chart.animation.d.ts +1 -1
- package/wijmo.webcomponents.chart.animation.js +1 -1
- package/wijmo.webcomponents.chart.d.ts +1 -1
- package/wijmo.webcomponents.chart.finance.analytics.d.ts +1 -1
- package/wijmo.webcomponents.chart.finance.analytics.js +1 -1
- package/wijmo.webcomponents.chart.finance.d.ts +1 -1
- package/wijmo.webcomponents.chart.finance.js +1 -1
- package/wijmo.webcomponents.chart.hierarchical.d.ts +1 -1
- package/wijmo.webcomponents.chart.hierarchical.js +1 -1
- package/wijmo.webcomponents.chart.interaction.d.ts +1 -1
- package/wijmo.webcomponents.chart.interaction.js +1 -1
- package/wijmo.webcomponents.chart.js +1 -1
- package/wijmo.webcomponents.chart.map.d.ts +1 -1
- package/wijmo.webcomponents.chart.map.js +1 -1
- package/wijmo.webcomponents.chart.radar.d.ts +1 -1
- package/wijmo.webcomponents.chart.radar.js +1 -1
- package/wijmo.webcomponents.gauge.d.ts +1 -1
- package/wijmo.webcomponents.gauge.js +1 -1
- package/wijmo.webcomponents.grid.d.ts +1 -1
- package/wijmo.webcomponents.grid.filter.d.ts +1 -1
- package/wijmo.webcomponents.grid.filter.js +1 -1
- package/wijmo.webcomponents.grid.grouppanel.d.ts +1 -1
- package/wijmo.webcomponents.grid.grouppanel.js +1 -1
- package/wijmo.webcomponents.grid.js +1 -1
- package/wijmo.webcomponents.grid.multirow.d.ts +1 -1
- package/wijmo.webcomponents.grid.multirow.js +1 -1
- package/wijmo.webcomponents.grid.search.d.ts +1 -1
- package/wijmo.webcomponents.grid.search.js +1 -1
- package/wijmo.webcomponents.grid.sheet.d.ts +1 -1
- package/wijmo.webcomponents.grid.sheet.js +1 -1
- package/wijmo.webcomponents.grid.transposed.d.ts +1 -1
- package/wijmo.webcomponents.grid.transposed.js +1 -1
- package/wijmo.webcomponents.grid.transposedmultirow.d.ts +1 -1
- package/wijmo.webcomponents.grid.transposedmultirow.js +1 -1
- package/wijmo.webcomponents.input.d.ts +1 -1
- package/wijmo.webcomponents.input.js +1 -1
- package/wijmo.webcomponents.nav.d.ts +1 -1
- package/wijmo.webcomponents.nav.js +1 -1
- package/wijmo.webcomponents.olap.d.ts +1 -1
- package/wijmo.webcomponents.olap.js +1 -1
- package/wijmo.webcomponents.viewer.d.ts +1 -1
- package/wijmo.webcomponents.viewer.js +1 -1
- package/wijmo.xlsx.d.ts +4704 -4711
- package/wijmo.xlsx.js +2 -2
package/wijmo.olap.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
*
|
|
3
|
-
* Wijmo Library 5.20261.45-nightly.
|
|
3
|
+
* Wijmo Library 5.20261.45-nightly.d20260105.t163143
|
|
4
4
|
* https://developer.mescius.com/wijmo
|
|
5
5
|
*
|
|
6
6
|
* Copyright(c) MESCIUS inc. All rights reserved.
|
|
@@ -11,4 +11,4 @@
|
|
|
11
11
|
*
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
|
-
"use strict";var __extends=this&&this.__extends||function(){var extendStatics=function(e,t){return(extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(e,t)};return function(e,t){extendStatics(e,t);function __(){this.constructor=e}e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}}(),__importStar=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.hasOwnProperty.call(e,i)&&(t[i]=e[i]);t.default=e;return t};Object.defineProperty(exports,"__esModule",{value:!0});var wijmo_1=require("wijmo/wijmo"),wijmo_grid_filter_1=require("wijmo/wijmo.grid.filter"),wijmo_input_1=require("wijmo/wijmo.input"),wijmo_grid_1=require("wijmo/wijmo.grid"),wijmo_chart_1=require("wijmo/wijmo.chart"),selfModule=__importStar(require("wijmo/wijmo.olap")),_TextBuilder=function(){function _TextBuilder(){this._text=""}Object.defineProperty(_TextBuilder.prototype,"length",{get:function(){return this._text.length},enumerable:!0,configurable:!0});_TextBuilder.prototype.toString=function(){return this._text};_TextBuilder.prototype.append=function(){for(var e,t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];this._text=(e=this._text).concat.apply(e,t)};_TextBuilder.prototype.joinToList=function(e){for(var t,i=[],o=1;o<arguments.length;o++)i[o-1]=arguments[o];var n=i.join();this.length>0&&n.length>0?this._text=(t=this._text).concat.apply(t,[e].concat(i)):n.length>0&&(this._text=n)};_TextBuilder.prototype.joinItemToList=function(e){this.joinToList(",",e)};_TextBuilder.prototype.wrap=function(e,t){this.length>0&&(this._text=e.concat(this._text,t))};_TextBuilder.wrap=function(e,t,i){return t.length>0?e.concat(t,i):""};return _TextBuilder}();exports._TextBuilder=_TextBuilder;exports.DetailDialogClsNames={dialogBody:"wj-dialog-body",dialogFooter:"wj-dialog-footer",dialogHeader:"wj-dialog-header",hostElement:"wj-detaildialog",summary:"wj-summary"};exports.PivotChartClsNames={hierarchicalAxesLine:"wj-hierarchicalaxes-line",hostElement:"wj-pivotchart"};exports.PivotFieldEditorClsNames={hostElement:"wj-pivotfieldeditor"};exports.PivotFilterEditorClsNames={hostElement:"wj-pivotfiltereditor"};exports.PivotGridClsNames={colFieldHdr:"wj-col-field-hdr",hostElement:"wj-pivotgrid",pivotCollapse:"wj-pivot-collapse",rowFieldHdr:"wj-row-field-hdr"};exports.PivotPanelClsNames={aggregate:"wj-aggregate",header:"wj-header",hostElement:"wj-pivotpanel"};exports.SlicerClsNames={header:"wj-header",hostElement:"wj-slicer",noCheck:"wj-nocheck"};exports._GridContextMenuClsNames={hostElement:"wj-olap-context-menu"};var _Tally=function(){function _Tally(){this._cntAll=0;this._cnt=0;this._cntn=0;this._sum=0;this._sum2=0;this._min=null;this._max=null;this._first=null;this._last=null}_Tally.prototype.add=function(e,t){if(e instanceof _Tally){this._sum+=e._sum;this._sum2+=e._sum2;this._max=this._max&&e._max?Math.max(this._max,e._max):this._max||e._max;this._min=this._min&&e._min?Math.min(this._min,e._min):this._min||e._min;this._cnt+=e._cnt;this._cntn+=e._cntn;this._cntAll+=e._cntAll}else{this._cntAll++;if(null!=e){this._cnt++;wijmo_1.isBoolean(e)&&(e=e?1:0);(null==this._min||e<this._min)&&(this._min=e);(null==this._max||e>this._max)&&(this._max=e);null==this._first&&(this._first=e);this._last=e;if(wijmo_1.isNumber(e)&&!isNaN(e)){wijmo_1.isNumber(t)&&(e*=t);this._cntn++;this._sum+=e;this._sum2+=e*e}}}};_Tally.prototype.getAggregate=function(e){if(0==this._cnt)return null;var t=0==this._cntn?0:this._sum/this._cntn,i=wijmo_1.Aggregate;switch(e){case i.None:return null;case i.CntAll:return this._cntAll;case i.Avg:return t;case i.Cnt:return this._cnt;case i.Max:return this._max;case i.Min:return this._min;case i.Rng:return this._max-this._min;case i.Sum:return this._sum;case i.VarPop:return this._cntn<=1?0:this._sum2/this._cntn-t*t;case i.StdPop:return this._cntn<=1?0:Math.sqrt(this._sum2/this._cntn-t*t);case i.Var:return this._cntn<=1?0:(this._sum2/this._cntn-t*t)*this._cntn/(this._cntn-1);case i.Std:return this._cntn<=1?0:Math.sqrt((this._sum2/this._cntn-t*t)*this._cntn/(this._cntn-1));case i.First:return this._first;case i.Last:return this._last}throw"Invalid aggregate type."};return _Tally}();exports._Tally=_Tally;var _PivotKey=function(){function _PivotKey(e,t,i,o,n){this._fields=e;this._fieldCount=t;this._valueFields=i;this._valueFieldIndex=o;this._item=n}Object.defineProperty(_PivotKey.prototype,"fields",{get:function(){return this._fields},enumerable:!0,configurable:!0});Object.defineProperty(_PivotKey.prototype,"valueFields",{get:function(){return this._valueFields},enumerable:!0,configurable:!0});Object.defineProperty(_PivotKey.prototype,"valueField",{get:function(){return this._valueFields[this._valueFieldIndex]},enumerable:!0,configurable:!0});Object.defineProperty(_PivotKey.prototype,"values",{get:function(){if(null==this._vals){this._vals=new Array(this._fieldCount);for(var e=0;e<this._fieldCount;e++){var t=this._fields[e];this._vals[e]=t._getValue(this._item,!1)}}return this._vals},enumerable:!0,configurable:!0});Object.defineProperty(_PivotKey.prototype,"fieldNames",{get:function(){if(!this._names){this._names=[];for(var e=0;e<this.fields.length;e++){var t=this._fields[e];this._names.push(t._getName())}}return this._names},enumerable:!0,configurable:!0});Object.defineProperty(_PivotKey.prototype,"aggregate",{get:function(){var e=this._valueFields,t=this._valueFieldIndex;wijmo_1.assert(e&&t>-1&&t<e.length,"aggregate not available for this key");return e[t].aggregate},enumerable:!0,configurable:!0});_PivotKey.prototype.getValue=function(e,t){if(0==this.values.length)return wijmo_1.culture.olap.PivotEngine.grandTotal;if(e>this.values.length-1)return wijmo_1.culture.olap.PivotEngine.subTotal;var i=this.values[e];if(t&&!wijmo_1.isString(i)){var o=this.fields[e],n=o?o.format:"";i=wijmo_1.Globalize.format(this.values[e],n)}return i};Object.defineProperty(_PivotKey.prototype,"level",{get:function(){return this._fieldCount==this._fields.length?-1:this._fieldCount},enumerable:!0,configurable:!0});_PivotKey.prototype.compareTo=function(e){var t=0;if(null!=e&&e._fields==this._fields){for(var i=this.values,o=e.values,n=Math.min(i.length,o.length),r=0;r<n;r++){var s=null!=i[r]?wijmo_1.getType(i[r]):null,l=i[r],a=o[r],d=this._fields[r];if(d.sortComparer){t=d.sortComparer(l,a);if(wijmo_1.isNumber(t)){if(0!=t)return d.descending?-t:t;continue}}if(s==wijmo_1.DataType.Date){var h=d.format;if(h&&"d"!=h&&"D"!=h){var u=d._getValue(this._item,!0),_=d._getValue(e._item,!0),c=wijmo_1.Globalize.parseDate(u,h),p=wijmo_1.Globalize.parseDate(_,h);if(c&&p){l=c;a=p}else{l=u;a=_}}}if(!(l==a||wijmo_1.DateTime.equals(l,a))){if(null==l)return 1;if(null==a)return-1;t=l<a?-1:1;return d.descending?-t:t}}if(i.length==o.length&&0!=(t=this._valueFieldIndex-e._valueFieldIndex))return t;if(0!=(t=o.length-i.length))return t*(this.fields.engine.totalsBeforeData?-1:1)}return 0};_PivotKey.prototype.matchesItem=function(e){for(var t=0;t<this._vals.length;t++){if(this.getValue(t,!0)!=this._fields[t]._getValue(e,!0))return!1}return!0};_PivotKey.prototype.toString=function(e){if(!this._key||e){for(var t="",i=0;i<this._fieldCount;i++){var o=this._fields[i];t+=o._getName()+":"+o._getValue(this._item,!0)+";"}if(this._valueFields){t+=this._valueFields[this._valueFieldIndex]._getName()+":0;"}else t+="{total}";if(e)return t+e.toString();this._key=t}return this._key};_PivotKey._ROW_KEY_NAME="$rowKey";return _PivotKey}();exports._PivotKey=_PivotKey;var _NOT_EDITABLE="This collection is not editable.",PivotCollectionView=function(e){__extends(PivotCollectionView,e);function PivotCollectionView(t){var i=e.call(this)||this;i.canAddNew=i.canRemove=!1;i._ng=wijmo_1.asType(t,PivotEngine,!1);return i}Object.defineProperty(PivotCollectionView.prototype,"engine",{get:function(){return this._ng},enumerable:!0,configurable:!0});PivotCollectionView.prototype.implementsInterface=function(t){return"IEditableCollectionView"!=t&&e.prototype.implementsInterface.call(this,t)};PivotCollectionView.prototype.editItem=function(e){wijmo_1.assert(!1,_NOT_EDITABLE)};PivotCollectionView.prototype.addNew=function(){wijmo_1.assert(!1,_NOT_EDITABLE)};PivotCollectionView.prototype._performSort=function(e){var t=this._ng;if(t.sortableGroups&&t._getShowRowTotals()==ShowTotals.Subtotals){var i=0,o=e.length-1;0==this._getItemLevel(e[i])&&i++;0==this._getItemLevel(e[o])&&o--;this._sortGroups(e,1,i,o)}else this._sortData(e)};PivotCollectionView.prototype._performFilter=function(e){return this._ng&&0==this._ng.valueFields.length&&0==this._ng.rowFields.length?[]:this.canFilter&&this._filter?e.filter(this._filter,this):e};PivotCollectionView.prototype._getGroupRange=function(e,t){var i=this._ng,o=e.indexOf(t),n=o,r=this._getItemLevel(e[o]);if(i.totalsBeforeData)for(n=o;n<e.length-1;n++){if((s=this._getItemLevel(e[n+1]))>-1&&s<=r)break}else for(o=n;o;o--){var s;if((s=this._getItemLevel(e[o-1]))>-1&&s<=r)break}return[o,n]};PivotCollectionView.prototype._sortGroups=function(t,i,o,n){for(var r=[],s=o;s<=n;s++)this._getItemLevel(t[s])==i&&r.push(t[s]);if(r.length){e.prototype._performSort.call(this,r);var l=[];for(s=0;s<r.length;s++){for(var a=this._getGroupRange(t,r[s]),d=l.length,h=a[0];h<=a[1];h++)l.push(t[h]);var u=l.length-1;if(i<this._ng.rowFields.length-1)this._sortGroups(l,i+1,o+d,u);else{var _=this._ng.totalsBeforeData?1:0;this._sortSegment(l,d+_,u+_)}}for(s=0;s<l.length;s++)t[o+s]=l[s]}else this._sortData(t)};PivotCollectionView.prototype._sortSegment=function(t,i,o){var n=t.slice(i,o);e.prototype._performSort.call(this,n);for(var r=0;r<n.length;r++)t[i+r]=n[r]};PivotCollectionView.prototype._sortData=function(t){for(var i=0;i<t.length;i++)if(!(this._getItemLevel(t[i])>-1)){for(var o=i;o<t.length-1&&!(this._getItemLevel(t[o+1])>-1);o++);if(o>i){var n=t.slice(i,o+1);e.prototype._performSort.call(this,n);for(var r=0;r<n.length;r++)t[i+r]=n[r]}i=o}};PivotCollectionView.prototype._getItemLevel=function(e){return e[_PivotKey._ROW_KEY_NAME].level};return PivotCollectionView}(wijmo_1.CollectionView);exports.PivotCollectionView=PivotCollectionView;var PivotField=function(){function PivotField(e,t,i,o){this._isExplicitAggregate=!1;this.propertyChanged=new wijmo_1.Event;this._ng=e;this._binding=new PivotFieldBinding(this,t);this._header=i||wijmo_1.toHeaderCase(t);this._showAs=ShowAs.NoCalculation;this._isContentHtml=!1;this._visible=!0;this._format="";this._filter=new PivotFilter(this);wijmo_1.copy(this,o);null==this._dataType&&this._updateDataTypeByBinding();this._isExplicitAggregate||this._updateAggregateByDataType()}Object.defineProperty(PivotField.prototype,"binding",{get:function(){return this._binding?this._binding.path:null},set:function(e){if(e!=this.binding){var t=this.binding,i=wijmo_1.asString(e);this._binding=i?new PivotFieldBinding(this,i):null;if(null==this._dataType){this._updateDataTypeByBinding();this._isExplicitAggregate||this._updateAggregateByDataType()}var o=new wijmo_1.PropertyChangedEventArgs("binding",t,e);this.onPropertyChanged(o)}},enumerable:!0,configurable:!0});Object.defineProperty(PivotField.prototype,"getValue",{get:function(){return this._getValueFn},set:function(e){this._getValueFn=wijmo_1.asFunction(e,!0)},enumerable:!0,configurable:!0});Object.defineProperty(PivotField.prototype,"getAggregateValue",{get:function(){return this._getAggValueFn},set:function(e){this._getAggValueFn=wijmo_1.asFunction(e,!0)},enumerable:!0,configurable:!0});Object.defineProperty(PivotField.prototype,"header",{get:function(){return this._header},set:function(e){e=wijmo_1.asString(e,!1);var t=this._ng.fields.getField(e);!e||t&&t!=this?wijmo_1.assert(!1,"field headers must be unique and non-empty."):this._setProp("_header",wijmo_1.asString(e))},enumerable:!0,configurable:!0});Object.defineProperty(PivotField.prototype,"filter",{get:function(){return this._filter},enumerable:!0,configurable:!0});Object.defineProperty(PivotField.prototype,"aggregate",{get:function(){return this._aggregate},set:function(e){this._isExplicitAggregate=!0;this._setProp("_aggregate",wijmo_1.asEnum(e,wijmo_1.Aggregate))},enumerable:!0,configurable:!0});Object.defineProperty(PivotField.prototype,"showAs",{get:function(){return this._showAs},set:function(e){this._setProp("_showAs",wijmo_1.asEnum(e,ShowAs))},enumerable:!0,configurable:!0});Object.defineProperty(PivotField.prototype,"weightField",{get:function(){return this._weightField},set:function(e){this._setProp("_weightField",wijmo_1.asType(e,PivotField,!0))},enumerable:!0,configurable:!0});Object.defineProperty(PivotField.prototype,"dataType",{get:function(){return this._dataType},set:function(e){this._setProp("_dataType",wijmo_1.asEnum(e,wijmo_1.DataType))},enumerable:!0,configurable:!0});Object.defineProperty(PivotField.prototype,"isMeasure",{get:function(){return this._dataType==wijmo_1.DataType.Number},enumerable:!0,configurable:!0});Object.defineProperty(PivotField.prototype,"subFields",{get:function(){return this._subFields},enumerable:!0,configurable:!0});Object.defineProperty(PivotField.prototype,"format",{get:function(){return this._format},set:function(e){this._setProp("_format",wijmo_1.asString(e))},enumerable:!0,configurable:!0});Object.defineProperty(PivotField.prototype,"align",{get:function(){return this._align},set:function(e){this._setProp("_align",wijmo_1.asString(e))},enumerable:!0,configurable:!0});Object.defineProperty(PivotField.prototype,"width",{get:function(){return this._width},set:function(e){this._setProp("_width",wijmo_1.asNumber(e,!0,!0))},enumerable:!0,configurable:!0});Object.defineProperty(PivotField.prototype,"wordWrap",{get:function(){return this._wordWrap},set:function(e){this._setProp("_wordWrap",wijmo_1.asBoolean(e))},enumerable:!0,configurable:!0});Object.defineProperty(PivotField.prototype,"descending",{get:function(){return!!this._descending},set:function(e){this._setProp("_descending",wijmo_1.asBoolean(e))},enumerable:!0,configurable:!0});Object.defineProperty(PivotField.prototype,"isContentHtml",{get:function(){return this._isContentHtml},set:function(e){this._setProp("_isContentHtml",wijmo_1.asBoolean(e))},enumerable:!0,configurable:!0});Object.defineProperty(PivotField.prototype,"visible",{get:function(){return this._visible},set:function(e){this._setProp("_visible",wijmo_1.asBoolean(e))},enumerable:!0,configurable:!0});Object.defineProperty(PivotField.prototype,"sortComparer",{get:function(){return this._srtCmp},set:function(e){e!=this.sortComparer&&(this._srtCmp=wijmo_1.asFunction(e))},enumerable:!0,configurable:!0});Object.defineProperty(PivotField.prototype,"engine",{get:function(){return this._ng},enumerable:!0,configurable:!0});Object.defineProperty(PivotField.prototype,"collectionView",{get:function(){return this.engine?this.engine.collectionView:null},enumerable:!0,configurable:!0});Object.defineProperty(PivotField.prototype,"isActive",{get:function(){return this._getIsActive()},set:function(e){this._setIsActive(e)},enumerable:!0,configurable:!0});Object.defineProperty(PivotField.prototype,"parentField",{get:function(){return this._parent},enumerable:!0,configurable:!0});Object.defineProperty(PivotField.prototype,"key",{get:function(){return this.header},enumerable:!0,configurable:!0});PivotField.prototype.onPropertyChanged=function(e){this.propertyChanged.raise(this,e);this._ng._fieldPropertyChanged(this,e)};PivotField.prototype._updateDataTypeByBinding=function(){if(this._ng&&this._binding)for(var e=this._ng.collectionView,t=e?e.items.length:0,i=0;i<t;i++){var o=e.items[i];if(null!=o){this._dataType=wijmo_1.getType(this._binding.getValue(o));break}}};PivotField.prototype._updateAggregateByDataType=function(){this._aggregate=this.dataType==wijmo_1.DataType.Number?wijmo_1.Aggregate.Sum:wijmo_1.Aggregate.Cnt};PivotField.prototype._copy=function(e,t){var i=this;if("subFields"==e){this._subFields?this._subFields.splice(0,this._subFields.length):this._subFields=[];t&&t.length&&t.forEach((function(e){var t=i.engine._createField(e,i._autoGenerated);i._subFields.push(t)}));return!0}if("filter"==e){this._setFilterProxy(t);return!0}return!1};PivotField.prototype._getFilterProxy=function(){var e=this.filter;if(e.conditionFilter.isActive){var t=e.conditionFilter,i={condition1:{operator:t.condition1.operator,value:t.condition1.value},and:t.and,condition2:{operator:t.condition2.operator,value:t.condition2.value}};t.condition1.isActive||delete i.condition1;t.condition2.isActive||delete i.condition2;return i}if(e.valueFilter.isActive){var o=e.valueFilter;return{filterText:o.filterText,showValues:o.showValues}}wijmo_1.assert(!1,"inactive filters shouldn't be persisted.");return null};PivotField.prototype._setFilterProxy=function(e){var t=this.filter,i=t.conditionFilter,o=t.valueFilter;t.clear();e.conditionFilter?e=e.conditionFilter:e.valueFilter&&(e=e.valueFilter);if(e.condition1){var n=e.condition1,r=wijmo_1.changeType(n.value,this.dataType);i.condition1.value=r||n.value;i.condition1.operator=n.operator;var s=e.condition2;if(s){var l=wijmo_1.changeType(s.value,this.dataType);i.condition2.value=l||s.value;i.condition2.operator=s.operator}wijmo_1.isBoolean(e.and)&&(i.and=e.and)}if(e.showValues){o.filterText=e.filterText;o.showValues=e.showValues}};PivotField.prototype._getIsActive=function(){if(this._ng&&!this._hasSubFields())for(var e=this._ng._viewLists,t=0;t<e.length;t++)if(e[t].indexOf(this)>-1)return!0;return!1};PivotField.prototype._setIsActive=function(e){if(this._ng&&!this._hasSubFields()){var t=this.isActive;if((e=wijmo_1.asBoolean(e))!=t)if(e)this.isMeasure?this._ng.valueFields.push(this):this._ng.rowFields.push(this);else{for(var i=this._ng._viewLists,o=0;o<i.length;o++)for(var n=i[o],r=0;r<n.length;r++){if((l=n[r])==this||l.parentField==this){n.removeAt(r);r--}}var s=this._ng.fields;for(r=s.length-1;r>=0;r--){var l;if((l=s[r]).parentField==this){s.removeAt(r);r--}}}}};PivotField.prototype._hasSubFields=function(){return null!=this._subFields&&this._subFields.length>0};PivotField.prototype._clone=function(){var e=new PivotField(this._ng,this.binding);this._ng._copyProps(e,this,PivotField._props);e._autoGenerated=!0;e._parent=this;for(var t=this.header.replace(/\d+$/,""),i=2;;i++){var o=t+i.toString();if(null==this._ng.fields.getField(o)){e._header=o;break}}return e};PivotField.prototype._setProp=function(e,t,i){var o=this[e];if(t!=o){this[e]=t;var n=new wijmo_1.PropertyChangedEventArgs(e.substr(1),o,t);this.onPropertyChanged(n)}};PivotField.prototype._getName=function(){return this.header||this.binding};PivotField.prototype._getValue=function(e,t){var i=this._binding,o=null;e&&(o=wijmo_1.isFunction(this._getValueFn)?this._getValueFn.call(this,e):this._ng.isServer?e[this.key]:i._key?e[i._key]:i.getValue(e));return t&&"string"!=typeof o?wijmo_1.Globalize.format(o,this._format):o};PivotField.prototype._getWeight=function(e){var t=this._weightField?this._weightField._getValue(e,!1):null;return wijmo_1.isNumber(t)?t:null};PivotField._props=["dataType","format","width","wordWrap","aggregate","showAs","descending","isContentHtml","visible"];return PivotField}();exports.PivotField=PivotField;var DimensionType,CubePivotField=function(e){__extends(CubePivotField,e);function CubePivotField(t,i,o,n){var r=e.call(this,t,i,o,n)||this;wijmo_1.assert(null!=r.dimensionType,"CubePivotField objects must specify the field's dimensionType");return r}Object.defineProperty(CubePivotField.prototype,"header",{get:function(){return this._header},set:function(e){this._setProp("_header",wijmo_1.asString(e))},enumerable:!0,configurable:!0});Object.defineProperty(CubePivotField.prototype,"dimensionType",{get:function(){return this._dimensionType},set:function(e){this._setProp("_dimensionType",wijmo_1.asEnum(e,DimensionType,!1))},enumerable:!0,configurable:!0});Object.defineProperty(CubePivotField.prototype,"isMeasure",{get:function(){switch(this._dimensionType){case 1:case 2:case 8:return!0}return!1},enumerable:!0,configurable:!0});Object.defineProperty(CubePivotField.prototype,"key",{get:function(){return this.binding},enumerable:!0,configurable:!0});CubePivotField.prototype._clone=function(){throw"CubePivotField objects cannot be cloned"};return CubePivotField}(PivotField);exports.CubePivotField=CubePivotField;!function(e){e[e.Dimension=0]="Dimension";e[e.Measure=1]="Measure";e[e.Kpi=2]="Kpi";e[e.NameSet=3]="NameSet";e[e.Attribute=4]="Attribute";e[e.Folder=5]="Folder";e[e.Hierarchy=6]="Hierarchy";e[e.Date=7]="Date";e[e.Currency=8]="Currency"}(DimensionType=exports.DimensionType||(exports.DimensionType={}));var Slicer=function(e){__extends(Slicer,e);function Slicer(t,i){var o=e.call(this,t,null,wijmo_1.isIE()&&!wijmo_1.isEdge())||this;o._hdr=null;o._mSel=!1;o._updatingFilter=!1;o._propChanged=!1;o._fldPropChangeBnd=o._fldPropChange.bind(o);var n=o.getTemplate();o.applyTemplate(exports.SlicerClsNames.hostElement+" "+exports.SlicerClsNames.noCheck+" "+wijmo_1.ControlClsNames.hostElement+" "+wijmo_1.ControlClsNames.content,n,{_root:"root",_divHdr:"div-hdr",_divHdrText:"div-hdr-text",_btnMSel:"btn-msel",_btnClear:"btn-clear"});var r=wijmo_1.culture.olap.Slicer;o._tt=new wijmo_1.Tooltip;wijmo_1.setAttribute(o._btnMSel,"aria-label",r.multiSelect);wijmo_1.setAttribute(o._btnClear,"aria-label",r.clearFilter);o._tt.setTooltip(o._btnMSel,r.multiSelect);o._tt.setTooltip(o._btnClear,r.clearFilter);o.addEventListener(o._btnClear,"click",(function(e){o._clear()}));o.addEventListener(o._btnMSel,"click",(function(e){o.multiSelect=!o.multiSelect}));o.initialize(i);return o}Object.defineProperty(Slicer,"controlTemplate",{get:function(){Slicer._ctrlTemplate||(Slicer._ctrlTemplate='<div wj-part="root"><div wj-part="div-hdr" class="'+exports.SlicerClsNames.header+'"><div wj-part="div-hdr-text"></div><button wj-part="btn-msel" class="'+wijmo_1.InputFormElementsClsNames.btn+' btn-msel" tabindex="-1"><span class='+wijmo_1.GlyphClsNames.glyph+'>≡</span></button><button wj-part="btn-clear" class="'+wijmo_1.InputFormElementsClsNames.btn+' btn-clear" tabindex="-1"><span class='+wijmo_1.GlyphClsNames.glyph+">×</span></button></div></div>");return Slicer._ctrlTemplate},set:function(e){Slicer._ctrlTemplate=e},enumerable:!0,configurable:!0});Object.defineProperty(Slicer.prototype,"field",{get:function(){return this._fld},set:function(e){var t=this;if(e!=this._fld){if(this._divListBox){wijmo_1.removeChild(this._divListBox);this._divListBox=null;this._lbx.dispose();this._lbx=null}if(this._edt){this._clear();this._edt.dispose()}var i=this._fld;if(i){i.filter.filterType=this._originalFilterType;i.filter.valueFilter.uniqueValues=this._uniqueValues;i.propertyChanged.removeHandler(this._fldPropChangeBnd)}if(i=this._fld=wijmo_1.asType(e,PivotField,!0)){this._originalFilterType=i.filter.filterType;i.filter.filterType=wijmo_grid_filter_1.FilterType.Value;var o=i.engine;this._uniqueValues=i.filter.valueFilter.uniqueValues;if(o.isServer&&!this._uniqueValues){var n=o._getUniqueValues(i);i.filter.valueFilter.uniqueValues=n}i.propertyChanged.addHandler(this._fldPropChangeBnd);i.isActive||i.engine.filterFields.push(i);var r=document.createElement("div");this._edt=new wijmo_grid_filter_1.ValueFilterEditor(r,i.filter.valueFilter)}if(this._edt){this._divListBox=this._edt.hostElement.querySelector("."+wijmo_input_1.ListBoxClsNames.hostElement);this._root.appendChild(this._divListBox);this._lbx=wijmo_1.Control.getControl(this._divListBox);this._lbx.checkedItemsChanged.addHandler((function(e,o){if(!t._propChanged){var n=t._lbx.selectedItem;if(!t.multiSelect&&n){t._mSel=!0;t._lbx.checkedItems=[n];t._mSel=!1}}if(t._edt&&i){t._updateFilter();i.engine.invalidate()}}))}this._updateHeader();wijmo_1.isIE()&&!wijmo_1.isEdge()&&this.refresh()}},enumerable:!0,configurable:!0});Object.defineProperty(Slicer.prototype,"header",{get:function(){return this._hdr},set:function(e){if(e!=this._hdr){this._hdr=wijmo_1.asString(e);this._updateHeader()}},enumerable:!0,configurable:!0});Object.defineProperty(Slicer.prototype,"showHeader",{get:function(){return"none"!=this._divHdr.style.display},set:function(e){this._divHdr.style.display=wijmo_1.asBoolean(e)?"":"none"},enumerable:!0,configurable:!0});Object.defineProperty(Slicer.prototype,"showCheckboxes",{get:function(){return!wijmo_1.hasClass(this.hostElement,exports.SlicerClsNames.noCheck)},set:function(e){wijmo_1.toggleClass(this.hostElement,exports.SlicerClsNames.noCheck,!wijmo_1.asBoolean(e))},enumerable:!0,configurable:!0});Object.defineProperty(Slicer.prototype,"multiSelect",{get:function(){return this._mSel},set:function(e){this._mSel=wijmo_1.asBoolean(e);wijmo_1.toggleClass(this._btnMSel,wijmo_1.ControlStateClsNames.active,this._mSel)},enumerable:!0,configurable:!0});Slicer.prototype.refresh=function(t){var i=this;void 0===t&&(t=!0);wijmo_1.isIE()&&!wijmo_1.isEdge()&&this.hostElement&&(this._setCssTimer=setTimeout((function(){wijmo_1.setCss(i._lbx.hostElement,{height:i.hostElement.clientHeight-i._divHdr.offsetHeight})})));e.prototype.refresh.call(this,t)};Slicer.prototype._fldPropChange=function(e,t){this._propChanged=!0;switch(t.propertyName){case"header":this._updateHeader();break;case"format":case"binding":e.filter.clear();this._edt.updateEditor();break;case"filter":this._updatingFilter||this._edt.updateEditor()}this._propChanged=!1};Slicer.prototype._updateHeader=function(){var e=this._hdr;e||null==this._fld||(e=this._fld.header);this._divHdrText.textContent=e};Slicer.prototype._clear=function(){if(this._edt){this._edt.clearEditor(!1);this._updateFilter();this._fld.engine.invalidate()}};Slicer.prototype._updateFilter=function(){this._updatingFilter=!0;this._edt.updateFilter();this._updatingFilter=!1};Slicer.prototype.dispose=function(){if(this._tt){this._tt.dispose();this._tt=null}if(this._edt){this._edt.dispose();this._edt=null}if(this._lbx){this._lbx.dispose();this._lbx=null}if(this._setCssTimer){clearTimeout(this._setCssTimer);this._setCssTimer=null}this._fld&&this._fld.propertyChanged.removeHandler(this._fldPropChangeBnd);e.prototype.dispose.call(this)};Slicer._ctrlTemplate="";return Slicer}(wijmo_1.Control);exports.Slicer=Slicer;var _GridContextMenu=function(e){__extends(_GridContextMenu,e);function _GridContextMenu(){var t=e.call(this,document.createElement("div"),{header:"PivotGrid Context Menu",displayMemberPath:"text",commandParameterPath:"parm",command:{executeCommand:function(e){t._execute(e)},canExecuteCommand:function(e){return t._canExecute(e)}}})||this;t.itemsSource=t._getMenuItems();wijmo_1.addClass(t.dropDown,"context-menu "+exports._GridContextMenuClsNames.hostElement);return t}Object.defineProperty(_GridContextMenu,"controlTemplate",{get:function(){_GridContextMenu._ctrlTemplate||(_GridContextMenu._ctrlTemplate=wijmo_input_1.Menu.controlTemplate);return _GridContextMenu._ctrlTemplate},set:function(e){_GridContextMenu._ctrlTemplate=e},enumerable:!0,configurable:!0});_GridContextMenu.prototype.refresh=function(t){void 0===t&&(t=!0);this.itemsSource=this._getMenuItems();e.prototype.refresh.call(this,t)};_GridContextMenu.prototype.attach=function(e){var t=this;wijmo_1.assert(e instanceof PivotGrid,"Expecting a PivotGrid control...");var i=e.hostElement;this._gridOwner=i;this._contextMenuHandler=function(o){if(e.customContextMenu){o.preventDefault();t.owner=i;if(t._selectField(o)){var n=t.dropDown;t.selectedIndex=-1;if(t.onIsDroppedDownChanging(new wijmo_1.CancelEventArgs)){wijmo_1.showPopup(n,o);t.onIsDroppedDownChanged();n.focus()}}}};this._gridOwner.addEventListener("contextmenu",this._contextMenuHandler)};_GridContextMenu.prototype._selectField=function(e){this._targetField=null;this._htDown=null;var t=wijmo_1.Control.getControl(this.owner),i=t.engine,o=i.valueFields,n=i.columnFields,r=t.hitTest(e),s=wijmo_grid_1.CellType;switch(r.cellType){case s.Cell:t.select(r.range);this._targetField=o[r.col%o.length];this._htDown=r;break;case s.ColumnHeader:this._targetField=r.row<n.length?n[r.row]:o[r.col%o.length];break;case s.RowHeader:this._targetField=t._colRowFields.get(r.getColumn());break;case s.TopLeft:r.row==r.panel.rows.length-1&&(this._targetField=t._colRowFields.get(r.getColumn()))}return null!=this._targetField};_GridContextMenu.prototype._getMenuItems=function(){for(var e=[{text:'<div class="menu-icon menu-icon-remove">✖</div>Remove Field',parm:"remove"},{text:'<div class="menu-icon">⛭</div>Field Settings...',parm:"edit"},{text:'<div class="'+wijmo_1.UtilitesClsNames.separator+'"></div>'},{text:'<div class="menu-icon">⌕</div>Show Detail...',parm:"detail"}],t=0;t<e.length;t++){var i=e[t];if(i.parm){var o=wijmo_1.culture.olap._ListContextMenu[i.parm];wijmo_1.assert(o,"missing localized text for item "+i.parm);i.text=i.text.replace(/([^>]+$)/,o)}}return e};_GridContextMenu.prototype._execute=function(e){var t=this._targetField,i=wijmo_1.Control.getControl(this.owner),o=i?i.engine:null,n=this._htDown;switch(e){case"remove":o.removeField(t);break;case"edit":o.editField(t);break;case"detail":i.showDetail(n.row,n.col)}};_GridContextMenu.prototype._canExecute=function(e){var t=this._targetField,i=wijmo_1.Control.getControl(this.owner),o=i?i.engine:null,n=this._htDown;if(null==t||null==o)return!1;switch(e){case"remove":return!0;case"edit":return o.allowFieldEditing;case"detail":return null!=n&&!(t instanceof CubePivotField)&&o.valueFields.length>0}return!0};_GridContextMenu.prototype.dispose=function(){if(this._gridOwner){this._gridOwner.removeEventListener("contextmenu",this._contextMenuHandler);this._contextMenuHandler=null;this._gridOwner=null}this._targetField=null;this._htDown=null;this.command=null;this.itemsSource=null;e.prototype.dispose.call(this)};_GridContextMenu._ctrlTemplate="";return _GridContextMenu}(wijmo_input_1.Menu);exports._GridContextMenu=_GridContextMenu;var PivotFieldCollection=function(e){__extends(PivotFieldCollection,e);function PivotFieldCollection(t){var i=e.call(this)||this;i._ng=t;return i}Object.defineProperty(PivotFieldCollection.prototype,"maxItems",{get:function(){return this._maxItems},set:function(e){this._maxItems=wijmo_1.asInt(e,!0,!0)},enumerable:!0,configurable:!0});Object.defineProperty(PivotFieldCollection.prototype,"engine",{get:function(){return this._ng},enumerable:!0,configurable:!0});PivotFieldCollection.prototype.getField=function(e){return this._getField(this,e)};PivotFieldCollection.prototype._getField=function(e,t){for(var i=0;i<e.length;i++){var o=e[i];if(o.key==t)return o;if(o._hasSubFields()&&(o=this._getField(o.subFields,t)))return o}return null};PivotFieldCollection.prototype.push=function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];for(var o=this._ng,n=0;t&&n<t.length;n++){var r=t[n];wijmo_1.isString(r)&&(r=this==o.fields?new PivotField(o,r):o.fields.getField(r));wijmo_1.assert(r instanceof PivotField,"This collection must contain PivotField objects only.");if(r.key&&this.getField(r.key)){wijmo_1.assert(!1,"PivotField keys must be unique.");return-1}if(null!=this._maxItems&&this.length>=this._maxItems)break;e.prototype.push.call(this,r)}return this.length};return PivotFieldCollection}(wijmo_1.ObservableArray);exports.PivotFieldCollection=PivotFieldCollection;var _PivotNode=function(){function _PivotNode(e,t,i,o,n,r){this._key=new _PivotKey(e,t,i,o,n);this._nodes={};this._parent=r}_PivotNode.prototype.getNode=function(e,t,i,o,n){for(var r=this,s=0;s<t;s++){var l=e[s]._getValue(n,!0);if(!(a=r._nodes[l])){a=new _PivotNode(e,s+1,i,o,n,r);r._nodes[l]=a}r=a}if(i&&o>-1){var a;l=i[o].header;if(!(a=r._nodes[l])){a=new _PivotNode(e,t,i,o,n,r);r._nodes[l]=a}r=a}return r};Object.defineProperty(_PivotNode.prototype,"key",{get:function(){return this._key},enumerable:!0,configurable:!0});Object.defineProperty(_PivotNode.prototype,"parent",{get:function(){return this._parent},enumerable:!0,configurable:!0});Object.defineProperty(_PivotNode.prototype,"tree",{get:function(){this._tree||(this._tree=new _PivotNode(null,0,null,-1,null));return this._tree},enumerable:!0,configurable:!0});return _PivotNode}();exports._PivotNode=_PivotNode;var _ServerConnection=function(){function _ServerConnection(e,t){this._ng=wijmo_1.asType(e,PivotEngine);wijmo_1.assert(this._isValidUrl(t),"Invalid service Url: "+t+")")}_ServerConnection.prototype.getFields=function(){var e=this,t=null;wijmo_1.httpRequest(this._getUrl("Fields"),{async:!1,success:function(e){t=JSON.parse(e.responseText);wijmo_1.isArray(t)||console.error("Failed to get fields from server: "+e.responseText)},error:function(t){e._handleError("Getting Fields",t)}});return t};_ServerConnection.prototype.getUniqueValues=function(e){var t=this,i=null;wijmo_1.httpRequest(this._getUrl("UniqueValues",null,e.header),{method:"POST",async:!1,data:{view:this._ng.viewDefinition},success:function(e){i=JSON.parse(e.responseText);wijmo_1.isArray(i)||console.error("Failed to get unique field values from server: "+e.responseText)},error:function(e){t._handleError("Getting Unique Field Values",e)}});return i};_ServerConnection.prototype.getOutputView=function(e){var t=this;this.clearPendingRequests();this._sendHttpRequest("Analyses",{method:"POST",data:{view:this._ng.viewDefinition},success:function(i){var o=JSON.parse(i.responseText);t._token=o.token;t._start=Date.now();t._handleResult(o.status,e)},error:function(e){t._handleError("Analyses",e)}})};_ServerConnection.prototype.getDetail=function(e,t){for(var i,o=[],n=this._ng.rowFields.length,r=e?e.values.length:0,s=0;s<n;s++)s<r?o.push(_ServerConnection._getRequestedValue(e.values[s])):o.push(null);n=this._ng.columnFields.length;r=t?t.values.length:0;for(s=0;s<n;s++)s<r?o.push(_ServerConnection._getRequestedValue(t.values[s])):o.push(null);i=new wijmo_1.ObservableArray;this._loadArray("Detail",i,{method:"POST",view:this._ng.viewDefinition,keys:o,max:this._ng.serverMaxDetail});return i};_ServerConnection.prototype.getSortedKeys=function(e,t){var i=this,o=Object.keys(e);if(this._ng.sortOnServer){if(o.length>1){var n={},r=[],s=[];o.forEach((function(e){i._insertKey(n,e,t)}));this._reorderKeys(n,null,null,r,t);if(!t&&this._ng.valueFields.length>1){for(var l=r.length/this._ng.valueFields.length,a=r.length/l,d=0;d<l;d++)for(var h=0;h<a;h++)s.push(r[d+h*l]);return s}return r}}else o.sort((function(e,t){return i._ng._keys[e].compareTo(i._ng._keys[t])}));return o};_ServerConnection._getRequestedValue=function(e){if(wijmo_1.isDate(e)){var t=e;return new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()))}return e};_ServerConnection.prototype.clearPendingRequests=function(){this._clearRequest();this._clearTimeout();this._clearToken()};_ServerConnection.prototype.updateTallies=function(e){var t=this,i=this._ng,o=i.rowFields.length,n=i.columnFields.length,r=i.valueFields.length,s=new _PivotNode(i.rowFields,0,null,-1,null);e.forEach((function(e,l,a){var d=t._getAggregatedFieldCount(e,i.rowFields),h=s.getNode(i.rowFields,o-d,null,-1,e),u=h.key,_=u.toString(null),c=i._tallies[_];if(!c){i._keys[_]=u;i._tallies[_]=c={}}d=t._getAggregatedFieldCount(e,i.columnFields);for(var p=0;p<r;p++){var g=h.tree.getNode(i.columnFields,n-d,i.valueFields,p,e).key,f=g.toString(),v=i.valueFields[p],m=c[f];if(!m){i._keys[f]=g;(m=c[f]=new _ServerTally).add(t._getFieldValue(v,e,!1))}}}))};_ServerConnection.prototype._getFieldValue=function(e,t,i){var o=t[e.key];return i&&"string"!=typeof o?wijmo_1.Globalize.format(o,e.format):o};_ServerConnection.prototype._getKeyLength=function(e,t){return e.split(";").length-(t?1:2)};_ServerConnection.prototype._insertKey=function(e,t,i){var o=t.split(";");i||o.pop();if(1==o.length)e[o.pop()]={};else{var n=o.pop(),r=e[n];r||(e[n]=r={});for(;o.length>0;){var s=o.shift();r[s]||(r[s]={});r=r[s]}}};_ServerConnection.prototype._joinKeys=function(e,t,i){return t&&i?[t,e,i].join(";"):i?[e,i].join(";"):e};_ServerConnection.prototype._reorderKeys=function(e,t,i,o,n){var r=this;Object.keys(e).forEach((function(s){var l=r._joinKeys(s,t,i),a=n?r._ng.showRowTotals:r._ng.showColumnTotals,d=Object.keys(e[s]).length,h=!t&&!i&&a!==ShowTotals.None||!t&&!d||t||a===ShowTotals.Subtotals;n||(l+=";");r._ng.totalsBeforeData&&h&&o.push(l);i?t?r._reorderKeys(e[s],[t,s].join(";"),i,o,n):r._reorderKeys(e[s],s,i,o,n):r._reorderKeys(e[s],null,s,o,n);!r._ng.totalsBeforeData&&h&&o.push(l)}))};_ServerConnection.prototype._getParentKey=function(e,t){var i=e.split(";");t?i.splice(i.length-2,1):i.splice(0,i.length-2);return i.join(";")};_ServerConnection.prototype._getAggregatedFieldCount=function(e,t){for(var i=t.length,o=0,n=0;n<i;n++){var r=t[n];null==this._getFieldValue(r,e,!1)&&o++}return o};_ServerConnection.prototype._loadArray=function(e,t,i){var o=this;i||(i={});null==i.skip&&(i.skip=0);null==i.top&&(i.top=100);var n=wijmo_1.isNumber(i.max)?i.max:1e6;this._request=wijmo_1.httpRequest(this._getUrl(e),{data:i,method:i.method||"GET",success:function(r){var s=JSON.parse(r.responseText);t.deferUpdate((function(){s.value.forEach((function(e){t.push(e)}))}));if(s.value.length==i.top&&t.length<n){i.skip+=i.top;o._loadArray(e,t,i)}},error:function(t){o._handleError(e,t)}})};_ServerConnection.prototype._getUrl=function(e,t,i){void 0===t&&(t=this._token);var o=this._ng.itemsSource.toString(),n=o.lastIndexOf("/");o.substr(0,n);switch(e=e.toLowerCase()){case"rawdata":case"detail":return o;case"fields":case"analyses":return o+"/"+e;case"clear":return o+"/analyses/"+t+"/";case"result":case"status":return o+"/analyses/"+t+"/"+e;case"uniquevalues":return o+"/fields/"+i+"/"+e}wijmo_1.assert(!1,"Unrecognized command")};_ServerConnection.prototype._isValidUrl=function(e){var t=document.createElement("a");t.href=wijmo_1.asString(e);t.href=t.href;return t.protocol&&t.hostname&&t.pathname&&"/"!=e[e.length-1]};_ServerConnection.prototype._handleResult=function(e,t){var i=this;switch(e.executingStatus.toLowerCase()){case"executing":case"notset":if(Date.now()-this._start>this._ng.serverTimeout){this._handleError("Analyses",{status:500,statusText:"Analysis timed out"});return}this._progress=e.progress;this._ng.onUpdatingView(new ProgressEventArgs(this._progress));this._clearTimeout();this._toGetStatus=setTimeout((function(){i._waitUntilComplete(t)}),this._ng.serverPollInterval);break;case"completed":this._progress=100;this._ng.onUpdatingView(new ProgressEventArgs(this._progress));this._getResults(t);break;case"exception":this._getResults(t);break;default:this._handleError("Analyses",{status:500,statusText:"Unexpected result..."})}};_ServerConnection.prototype._waitUntilComplete=function(e){var t=this;this._sendHttpRequest("Status",{success:function(i){var o=JSON.parse(i.responseText);t._handleResult(o,e)},error:function(e){t._handleError("Status",e)}})};_ServerConnection.prototype._getResults=function(e){var t=this;this._sendHttpRequest("Result",{success:function(i){t._clearToken();var o=JSON.parse(i.responseText);wijmo_1.assert(wijmo_1.isArray(o),"Result array Expected.");var n=[];t._ng._viewLists.forEach((function(e){n=n.concat(e.filter((function(e){return e.dataType==wijmo_1.DataType.Date})))}));n.length>0&&o.forEach((function(e){n.forEach((function(t){var i=t._binding,o=i.getValue(e);wijmo_1.isString(o)&&i.setValue(e,new Date(o))}))}));wijmo_1.asFunction(e)(o)},error:function(e){t._handleError("Result",e)}})};_ServerConnection.prototype._handleError=function(e,t){this.clearPendingRequests();e='** HttpRequest error on command "'+e+'"';this._ng.onError(new wijmo_1.RequestErrorEventArgs(t,e))&&this._throwResponseError(e,t)};_ServerConnection.prototype._sendHttpRequest=function(e,t){var i=this._getUrl(e);this._request=wijmo_1.httpRequest(i,t)};_ServerConnection.prototype._throwResponseError=function(e,t){e=e+"\r\n"+t.status+"\r\n";var i=t.responseText||"";if(500==t.status&&t.responseText){i=JSON.parse(t.responseText).ExceptionMessage}throw e+=i||t.statusText};_ServerConnection.prototype._clearToken=function(){if(this._token){this._clearRequest();this._clearTimeout();this._sendHttpRequest("Clear",{method:"DELETE"});this._token=null}};_ServerConnection.prototype._clearRequest=function(){if(this._request&&4!=this._request.readyState){this._request.abort();this._request=null}};_ServerConnection.prototype._clearTimeout=function(){if(this._toGetStatus){clearTimeout(this._toGetStatus);this._toGetStatus=null}};_ServerConnection._TIMEOUT=6e4;_ServerConnection._POLL_INTERVAL=500;_ServerConnection._MAXDETAIL=1e3;return _ServerConnection}();exports._ServerConnection=_ServerConnection;var ShowTotals,ShowAs,_ServerTally=function(e){__extends(_ServerTally,e);function _ServerTally(){return null!==e&&e.apply(this,arguments)||this}_ServerTally.prototype.add=function(e,t){wijmo_1.assert(0==this._cnt,"Server tallies have a single value.");this._aggregatedValue=e};_ServerTally.prototype.getAggregate=function(e){return this._aggregatedValue};return _ServerTally}(_Tally);wijmo_1._addCultureInfo("olap",{PivotEngine:{grandTotal:"Grand Total",subTotal:"Subtotal"},PivotPanel:{fields:"Choose fields to add to report:",drag:"Drag fields between areas below:",filters:"Filters",cols:"Columns",rows:"Rows",vals:"Values",defer:"Defer Updates",update:"Update"},PivotFieldEditor:{dialogHeader:"Field settings:",header:"Header:",summary:"Summary:",showAs:"Show As:",weighBy:"Weigh by:",sort:"Sort:",filter:"Filter:",format:"Format:",sample:"Sample:",edit:"Edit...",clear:"Clear",ok:"OK",cancel:"Cancel",none:"(none)",sorts:{asc:"Ascending",desc:"Descending"},aggs:{sum:"Sum",cnt:"Count",avg:"Average",max:"Max",min:"Min",rng:"Range",std:"StdDev",var:"Var",stdp:"StdDevPop",varp:"VarPop",first:"First",last:"Last"},calcs:{noCalc:"No calculation",dRow:"Difference from previous row",dRowPct:"% Difference from previous row",dCol:"Difference from previous column",dColPct:"% Difference from previous column",dPctGrand:"% of grand total",dPctRow:"% of row total",dPrevRow:"% of value in the previous row",dPctCol:"% of column total",dPrevCol:"% of value in the previous column",dRunTot:"Running total",dRunTotPct:"% running total"},formats:{n0:"Integer (n0)",n2:"Float (n2)",c:"Currency (c)",p0:"Percentage (p0)",p2:"Percentage (p2)",n2c:"Thousands (n2,)",n2cc:"Millions (n2,,)",n2ccc:"Billions (n2,,,)",d:"Date (d)",MMMMddyyyy:"Month Day Year (MMMM dd, yyyy)",dMyy:"Day Month Year (d/M/yy)",ddMyy:"Day Month Year (dd/M/yy)",dMyyyy:"Day Month Year (dd/M/yyyy)",MMMyyyy:"Month Year (MMM yyyy)",MMMMyyyy:"Month Year (MMMM yyyy)",yyyy:"Year (yyyy)",yyyyQq:'Year Quarter (yyyy "Q"q)',FYEEEEQU:'Fiscal Year Quarter ("FY"EEEE "Q"U)'}},_ListContextMenu:{up:"Move Up",down:"Move Down",first:"Move to Beginning",last:"Move to End",filter:"Move to Report Filter",rows:"Move to Row Labels",cols:"Move to Column Labels",vals:"Move to Values",remove:"Remove Field",edit:"Field Settings...",detail:"Show Detail..."},DetailDialog:{header:"Detail View:",ok:"OK",items:"{cnt:n0} items",item:"{cnt} item",row:"Row",col:"Column"},PivotChart:{by:"by",and:"and"},Slicer:{multiSelect:"Multi-Select",clearFilter:"Clear Filter"}});!function(e){e[e.None=0]="None";e[e.GrandTotals=1]="GrandTotals";e[e.Subtotals=2]="Subtotals"}(ShowTotals=exports.ShowTotals||(exports.ShowTotals={}));!function(e){e[e.NoCalculation=0]="NoCalculation";e[e.DiffRow=1]="DiffRow";e[e.DiffRowPct=2]="DiffRowPct";e[e.DiffCol=3]="DiffCol";e[e.DiffColPct=4]="DiffColPct";e[e.PctGrand=5]="PctGrand";e[e.PctRow=6]="PctRow";e[e.PctCol=7]="PctCol";e[e.RunTot=8]="RunTot";e[e.RunTotPct=9]="RunTotPct";e[e.PctPrevRow=10]="PctPrevRow";e[e.PctPrevCol=11]="PctPrevCol"}(ShowAs=exports.ShowAs||(exports.ShowAs={}));var PivotEngine=function(){function PivotEngine(e){this._autoGenFields=!0;this._allowFieldEditing=!0;this._showRowTotals=ShowTotals.GrandTotals;this._showColTotals=ShowTotals.GrandTotals;this._totalsBefore=!1;this._sortableGroups=!0;this._showZeros=!1;this._updating=0;this._xValueSearch=!0;this._async=!0;this._sortOnServer=!1;this._cntTotal=0;this._cntFiltered=0;this._serverParms={timeout:_ServerConnection._TIMEOUT,pollInterval:_ServerConnection._POLL_INTERVAL,maxDetail:_ServerConnection._MAXDETAIL};this.itemsSourceChanged=new wijmo_1.Event;this.viewDefinitionChanged=new wijmo_1.Event;this.updatingView=new wijmo_1.Event;this.updatedView=new wijmo_1.Event;this.error=new wijmo_1.Event;this._isUpdatingChanged=new wijmo_1.Event;this._hasDeferredUpdatesChanged=new wijmo_1.Event;this._pivotView=new PivotCollectionView(this);this._fields=new PivotFieldCollection(this);this._rowFields=new PivotFieldCollection(this);this._columnFields=new PivotFieldCollection(this);this._valueFields=new PivotFieldCollection(this);this._filterFields=new PivotFieldCollection(this);this._viewLists=[this._rowFields,this._columnFields,this._valueFields,this._filterFields];var t=this._fieldListChanged.bind(this);this._fields.collectionChanged.addHandler(t);this._viewLists.forEach((function(e){e.collectionChanged.addHandler(t)}));this._defaultFilterType=null;wijmo_1.copy(this,e)}Object.defineProperty(PivotEngine.prototype,"itemsSource",{get:function(){return this._items},set:function(e){var t=this;if(this._items!=e){if(this._cv){this._cv.collectionChanged.removeHandler(this._cvCollectionChanged,this);this._cv=null}if(this._server){this._server.clearPendingRequests();this._server=null}this._items=e;wijmo_1.isString(e)?this._server=new _ServerConnection(this,e):wijmo_1.isObject(e)&&!wijmo_1.tryCast(e,"ICollectionView")?this._server=new _SqlServerConnection(this,e):this._cv=wijmo_1.asCollectionView(e);null!=this._cv&&this._cv.collectionChanged.addHandler(this._cvCollectionChanged,this);this.deferUpdate((function(){t.autoGenerateFields&&t._generateFields();t._updateFieldTypes()}));this.onItemsSourceChanged()}},enumerable:!0,configurable:!0});Object.defineProperty(PivotEngine.prototype,"isServer",{get:function(){return null!=this._server},enumerable:!0,configurable:!0});Object.defineProperty(PivotEngine.prototype,"collectionView",{get:function(){return this._cv},enumerable:!0,configurable:!0});Object.defineProperty(PivotEngine.prototype,"pivotView",{get:function(){return this._pivotView},enumerable:!0,configurable:!0});Object.defineProperty(PivotEngine.prototype,"showRowTotals",{get:function(){return this._showRowTotals},set:function(e){if((e=wijmo_1.asEnum(e,ShowTotals))!=this.showRowTotals){this._showRowTotals=e;this.onViewDefinitionChanged();this.invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(PivotEngine.prototype,"showColumnTotals",{get:function(){return this._showColTotals},set:function(e){if((e=wijmo_1.asEnum(e,ShowTotals))!=this.showColumnTotals){this._showColTotals=e;this.onViewDefinitionChanged();this.invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(PivotEngine.prototype,"totalsBeforeData",{get:function(){return this._totalsBefore},set:function(e){if(e!=this._totalsBefore){this._totalsBefore=wijmo_1.asBoolean(e);this.onViewDefinitionChanged();this._updatePivotView()}},enumerable:!0,configurable:!0});Object.defineProperty(PivotEngine.prototype,"sortableGroups",{get:function(){return this._sortableGroups},set:function(e){if(e!=this._sortableGroups){this._sortableGroups=wijmo_1.asBoolean(e);this.onViewDefinitionChanged()}},enumerable:!0,configurable:!0});Object.defineProperty(PivotEngine.prototype,"sortOnServer",{get:function(){return this._sortOnServer},set:function(e){this._sortOnServer=wijmo_1.asBoolean(e)},enumerable:!0,configurable:!0});Object.defineProperty(PivotEngine.prototype,"showZeros",{get:function(){return this._showZeros},set:function(e){if(e!=this._showZeros){this._showZeros=wijmo_1.asBoolean(e);this.onViewDefinitionChanged();this._updatePivotView()}},enumerable:!0,configurable:!0});Object.defineProperty(PivotEngine.prototype,"defaultFilterType",{get:function(){return null!=this._defaultFilterType?this._defaultFilterType:this._server?wijmo_grid_filter_1.FilterType.Condition:wijmo_grid_filter_1.FilterType.Both},set:function(e){this._defaultFilterType=wijmo_1.asEnum(e,wijmo_grid_filter_1.FilterType,!0)},enumerable:!0,configurable:!0});Object.defineProperty(PivotEngine.prototype,"exclusiveValueSearch",{get:function(){return this._xValueSearch},set:function(e){this._xValueSearch=wijmo_1.asBoolean(e)},enumerable:!0,configurable:!0});Object.defineProperty(PivotEngine.prototype,"autoGenerateFields",{get:function(){return this._autoGenFields},set:function(e){this._autoGenFields=wijmo_1.asBoolean(e)},enumerable:!0,configurable:!0});Object.defineProperty(PivotEngine.prototype,"allowFieldEditing",{get:function(){return this._allowFieldEditing},set:function(e){this._allowFieldEditing=wijmo_1.asBoolean(e)},enumerable:!0,configurable:!0});Object.defineProperty(PivotEngine.prototype,"fields",{get:function(){return this._fields},enumerable:!0,configurable:!0});Object.defineProperty(PivotEngine.prototype,"rowFields",{get:function(){return this._rowFields},enumerable:!0,configurable:!0});Object.defineProperty(PivotEngine.prototype,"columnFields",{get:function(){return this._columnFields},enumerable:!0,configurable:!0});Object.defineProperty(PivotEngine.prototype,"filterFields",{get:function(){return this._filterFields},enumerable:!0,configurable:!0});Object.defineProperty(PivotEngine.prototype,"valueFields",{get:function(){return this._valueFields},enumerable:!0,configurable:!0});Object.defineProperty(PivotEngine.prototype,"viewDefinition",{get:function(){var e=this,t={showZeros:this.showZeros,showColumnTotals:this.showColumnTotals,showRowTotals:this.showRowTotals,defaultFilterType:this.defaultFilterType,totalsBeforeData:this.totalsBeforeData,sortableGroups:this.sortableGroups,fields:[],rowFields:this._getFieldCollectionProxy(this.rowFields),columnFields:this._getFieldCollectionProxy(this.columnFields),filterFields:this._getFieldCollectionProxy(this.filterFields),valueFields:this._getFieldCollectionProxy(this.valueFields)};this.fields.forEach((function(i){var o=e._getFieldDefinition(i);t.fields.push(o)}));return JSON.stringify(t)},set:function(e){var t=this,i=JSON.parse(e);i&&this.deferUpdate((function(){t._copyProps(t,i,PivotEngine._props);t.fields.clear();i.fields.forEach((function(e){var i=t._getFieldFromDefinition(e);t.fields.push(i)}));i.fields.forEach((function(e,i){wijmo_1.isString(e.weightField)&&(t.fields[i].weightField=t.fields.getField(e.weightField))}));t._setFieldCollectionProxy(t.rowFields,i.rowFields);t._setFieldCollectionProxy(t.columnFields,i.columnFields);t._setFieldCollectionProxy(t.filterFields,i.filterFields);t._setFieldCollectionProxy(t.valueFields,i.valueFields)}))},enumerable:!0,configurable:!0});Object.defineProperty(PivotEngine.prototype,"isViewDefined",{get:function(){var e=this._valueFields.length,t=this._rowFields.length,i=this._columnFields.length;return this._server?e>0&&(t>0||i>0):e>0||t>0||i>0},enumerable:!0,configurable:!0});PivotEngine.prototype.beginUpdate=function(){this.cancelPendingUpdates();this._updating++;1===this._updating&&this._onIsUpdatingChanged()};PivotEngine.prototype.endUpdate=function(){this._updating--;if(this._updating<=0){if(this._viewDefinitionChanged){this._viewDefinitionChanged=!1;this.onViewDefinitionChanged();this._setHasDeferredUpdates(!1)}this._onIsUpdatingChanged();this.refresh()}};Object.defineProperty(PivotEngine.prototype,"isUpdating",{get:function(){return this._updating>0},enumerable:!0,configurable:!0});Object.defineProperty(PivotEngine.prototype,"hasDeferredUpdates",{get:function(){return this._hasDeferredUpdates},enumerable:!0,configurable:!0});PivotEngine.prototype._setHasDeferredUpdates=function(e){if(this._hasDeferredUpdates!==e){this._hasDeferredUpdates=e;this._onHasDeferredUpdatesChanged()}};PivotEngine.prototype.deferUpdate=function(e){try{this.beginUpdate();e()}finally{this.endUpdate()}};PivotEngine.prototype.refresh=function(e){void 0===e&&(e=!1);this._updateView(e)};PivotEngine.prototype.invalidate=function(){var e=this;this._toInv&&(this._toInv=clearTimeout(this._toInv));this.isUpdating||this.isDisposed||(this._toInv=setTimeout((function(){e.refresh()}),wijmo_1.Control._REFRESH_INTERVAL))};Object.defineProperty(PivotEngine.prototype,"async",{get:function(){return this._async},set:function(e){if(e!=this._async){this.cancelPendingUpdates();this._async=wijmo_1.asBoolean(e)}},enumerable:!0,configurable:!0});Object.defineProperty(PivotEngine.prototype,"serverTimeout",{get:function(){return this._serverParms.timeout},set:function(e){this._serverParms.timeout=wijmo_1.asNumber(e,!1,!0)},enumerable:!0,configurable:!0});Object.defineProperty(PivotEngine.prototype,"serverPollInterval",{get:function(){return this._serverParms.pollInterval},set:function(e){this._serverParms.pollInterval=wijmo_1.asNumber(e,!1,!0)},enumerable:!0,configurable:!0});Object.defineProperty(PivotEngine.prototype,"serverMaxDetail",{get:function(){return this._serverParms.maxDetail},set:function(e){this._serverParms.maxDetail=wijmo_1.asNumber(e,!1,!0)},enumerable:!0,configurable:!0});PivotEngine.prototype.cancelPendingUpdates=function(){if(this._toUpdateTallies){clearTimeout(this._toUpdateTallies);this._toUpdateTallies=null}};PivotEngine.prototype.getDetail=function(e,t){var i=this,o=e?e[_PivotKey._ROW_KEY_NAME]:null,n=this._getKey(t);if(this._server)return this._server.getDetail(o,n);var r=this.collectionView.items,s=[];r.forEach((function(e){!i._applyFilter(e)||null!=o&&!o.matchesItem(e)||null!=n&&!n.matchesItem(e)||s.push(e)}));return s};PivotEngine.prototype.getDetailView=function(e,t){var i=this.getDetail(e,t);return new wijmo_1.CollectionView(i)};PivotEngine.prototype.getKeys=function(e,t){var i=e?e[_PivotKey._ROW_KEY_NAME]:null,o=this._getKey(t);return{rowKey:{fields:i?i.fieldNames:[],values:i?i.values:[]},colKey:{fields:o?o.fieldNames:[],values:o?o.values:[]}}};PivotEngine.prototype.editField=function(e){if(this.allowFieldEditing){this.edt=new PivotFieldEditor(document.createElement("div"),{field:e});this._dlg=new wijmo_input_1.Popup(document.createElement("div"),{content:this.edt.hostElement});this._dlg.show(!0)}};PivotEngine.prototype.removeField=function(e){for(var t=0;t<this._viewLists.length;t++){var i=this._viewLists[t],o=i.indexOf(e);if(o>-1){i.removeAt(o);return}}};PivotEngine.prototype.onItemsSourceChanged=function(e){this.itemsSourceChanged.raise(this,e)};PivotEngine.prototype.onViewDefinitionChanged=function(e){if(this._updating<=0){this.viewDefinitionChanged.raise(this,e);this._viewDefinitionChanged=!1;this._setHasDeferredUpdates(!1)}else{this._viewDefinitionChanged=!0;this._setHasDeferredUpdates(!0)}};PivotEngine.prototype.onUpdatingView=function(e){this.updatingView.raise(this,e)};PivotEngine.prototype.onUpdatedView=function(e){this.updatedView.raise(this,e)};PivotEngine.prototype.onError=function(e){this.error.raise(this,e);return!e.cancel};PivotEngine.prototype._onIsUpdatingChanged=function(e){this._isUpdatingChanged.raise(this,e)};PivotEngine.prototype._onHasDeferredUpdatesChanged=function(e){this._hasDeferredUpdatesChanged.raise(this,e)};PivotEngine.prototype._copy=function(e,t){var i=this;switch(e){case"fields":this.fields.clear();this._viewLists.forEach((function(e){e.clear()}));wijmo_1.asArray(t).forEach((function(e){var t=i._createField(e,!1);i.fields.push(t)}));this._updateFieldTypes();return!0;case"rowFields":case"columnFields":case"valueFields":case"filterFields":this[e].clear();if(!wijmo_1.isArray(t)){this[e].maxItems=t.maxItems;t=t.items}wijmo_1.asArray(t).forEach((function(t){var o=i.fields.getField(t);i[e].push(o)}));return!0}return!1};PivotEngine.prototype._getKey=function(e){return this._keys[e]};PivotEngine.prototype._getRowKey=function(e){var t=e;if(wijmo_1.isNumber(e)){var i=this._pivotView;t=(i.items.length?i.items:i.sourceCollection)[e]}return t?t[_PivotKey._ROW_KEY_NAME]:null};PivotEngine.prototype._getRowLevel=function(e){var t=this._getRowKey(e);return t?t.level:-1};PivotEngine.prototype._getColKey=function(e){wijmo_1.isNumber(e)&&(e=this._colBindings[e]);if(wijmo_1.isString(e))return this._getKey(e);wijmo_1.assert(null==e||e instanceof _PivotKey,"invalid parameter in call to _getColLevel");return e};PivotEngine.prototype._getColLevel=function(e){return(e=this._getColKey(e))?e.level:-1};PivotEngine.prototype._getFieldByColKey=function(e){var t=this._getColKey(e);return t&&t.valueField};PivotEngine.prototype._applyFilter=function(e){for(var t=this._activeFilterFields,i=0;i<t.length;i++){if(!t[i].filter.apply(e))return!1}return!0};PivotEngine.prototype._updateView=function(e){var t=this;void 0===e&&(e=!1);if(!this.isUpdating||e){this.cancelPendingUpdates();this._cntTotal=this._cntFiltered=0;this._tallies={};this._keys={};this._activeFilterFields=[];if(this._server&&this.isViewDefined){this._server.getOutputView((function(i){if(t.isViewDefined){t._server.updateTallies(i);t._updatePivotView(e)}}));return}this._viewLists.forEach((function(e){e.forEach((function(e){e.filter.isActive&&t._activeFilterFields.push(e)}))}));if(this.isViewDefined&&wijmo_1.hasItems(this._cv)){this._batchStart=Date.now();this._updateTallies(this._cv.items,0,e)}else this._updatePivotView(e);this._setHasDeferredUpdates(!1)}};PivotEngine.prototype._updateTallies=function(e,t,i){var o=this;void 0===i&&(i=!1);var n=e.length,r=new _PivotNode(this._rowFields,0,null,-1,null),s=this.valueFields;0==s.length&&this.columnFields.length>0&&(s=new PivotFieldCollection(this)).push(new PivotField(this,"","",{aggregate:wijmo_1.Aggregate.Sum}));for(var l=ShowTotals,a=this._rowFields.length,d=this._getShowRowTotals(),h=d==l.None?a:0,u=d==l.GrandTotals?Math.max(1,a):1,_=this._columnFields.length,c=this._getShowColTotals(),p=c==l.None?_:0,g=c==l.GrandTotals?Math.max(1,_):1,f=s.length,_loop_1=function(n){if(v._async&&n-t>=PivotEngine._BATCH_SIZE&&Date.now()-v._batchStart>PivotEngine._BATCH_DELAY){v._toUpdateTallies=setTimeout((function(){o.onUpdatingView(new ProgressEventArgs(Math.round(n/e.length*100)));o._batchStart=Date.now();o._updateTallies(e,n,i)}),PivotEngine._BATCH_TIMEOUT);return{value:void 0}}v._cntTotal++;var l=e[n];if(!v._activeFilterFields.length||v._applyFilter(l)){v._cntFiltered++;for(var d=h;d<=a;d+=u){var c=r.getNode(v._rowFields,d,null,-1,l),m=c.key,w=m.toString(),y=v._tallies[w];if(!y){v._keys[w]=m;v._tallies[w]=y={}}for(var b=p;b<=_;b+=g)for(var C=0;C<f;C++){var P=c.tree.getNode(v._columnFields,b,s,C,l).key,F=P.toString(),j=y[F];if(!j){v._keys[F]=P;j=y[F]=new _Tally}var S=s[C],x=S._getValue(l,!1),T=S.weightField?S._getWeight(l):null;j.add(x,T)}}}},v=this,m=t;m<n;m++){var w=_loop_1(m);if("object"==typeof w)return w.value}this._toUpdateTallies=null;this._updatePivotView(i)};PivotEngine.prototype._updatePivotView=function(e){var t=this;void 0===e&&(e=!1);if(!this.isUpdating||e){var i=this._pivotView;i.deferUpdate((function(){t.onUpdatingView(new ProgressEventArgs(100));i.cancelEdit();i.cancelNew();var e=i.sourceCollection;e.length=0;var o={};for(var n in t._tallies)o[n]=!0;var r={};for(var n in t._tallies){var s=t._tallies[n];for(var l in s)r[l]=!0}var a=[],d=[];if(t._server)a=t._server.getSortedKeys(o,!0),d=t._server.getSortedKeys(r,!1);else{a=t._getSortedKeys(o);d=t._getSortedKeys(r)}for(var h=0;h<a.length;h++){var u=a[h],_=(s=t._tallies[u],{});_[_PivotKey._ROW_KEY_NAME]=t._getKey(u);for(var c=0;c<d.length;c++){var p=d[c],g=s[p],f=t._getKey(p),v=g?g.getAggregate(f.aggregate):null;null==v&&t._showZeros&&(v=0);_[p]=v}e.push(_)}t._colBindings=d;t._updateFieldValues(e);i.sortDescriptions.clear();i.refresh()}));this.onUpdatedView()}};PivotEngine.prototype._getSortedKeys=function(e){var t=this,i=Object.keys(e);i.sort((function(e,i){return t._keys[e].compareTo(t._keys[i])}));return i};PivotEngine.prototype._updateFieldValues=function(e){for(var t=this.valueFields.length,i=0;i<t;i++){var o=this.valueFields[i];if(wijmo_1.isFunction(o.getAggregateValue))for(var n=i;n<this._colBindings.length;n+=t)for(var r=0;r<e.length;r++){var s=e[r],l=this._colBindings[n],a=this._getAggregateObject(s,l);s[l]=o.getAggregateValue.call(this,a)}}var _loop_2=function(i){var o=d.valueFields[i];switch(o.showAs){case ShowAs.RunTot:case ShowAs.RunTotPct:for(var n=i;n<d._colBindings.length;n+=t){for(var r=0;r<e.length;r++){(h=e[r])[c=d._colBindings[n]]=d._getRunningTotal(e,r,n)}if(o.showAs==ShowAs.RunTotPct)for(r=0;r<e.length;r++){var s=(h=e[r])[c=d._colBindings[n]];if(wijmo_1.isNumber(s)){var l=d._getLastValueInRowGroup(e,r,n);0!=l&&(h[c]=s/l)}}}break;case ShowAs.PctGrand:case ShowAs.PctCol:var a=0;if(o.showAs==ShowAs.PctGrand)for(n=i;n<d._colBindings.length;n+=t)-1==d._getColLevel(n)&&(a+=d._getColTotal(e,n));var _loop_3=function(t){o.showAs==ShowAs.PctCol&&(a=d._getColTotal(e,t));var i=d._colBindings[t];e.forEach((function(e){var t=e[i];wijmo_1.isNumber(t)&&(e[i]=0!=a?t/a:null)}))};for(n=i;n<d._colBindings.length;n+=t)_loop_3(n);break;case ShowAs.PctRow:for(r=0;r<e.length;r++){var h=e[r],u=0;for(n=i;n<d._colBindings.length;n+=t)if(-1==d._getColLevel(n)){var _=h[c=d._colBindings[n]];wijmo_1.isNumber(_)&&(u+=_)}for(n=i;n<d._colBindings.length;n+=t){_=h[c=d._colBindings[n]];wijmo_1.isNumber(_)&&(h[c]=0!=u?_/u:null)}}break;case ShowAs.DiffRow:case ShowAs.DiffRowPct:case ShowAs.PctPrevRow:for(n=i;n<d._colBindings.length;n+=t)for(r=e.length-1;r>=0;r--){(h=e[r])[c=d._colBindings[n]]=d._getRowDifference(e,r,n,o.showAs)}break;case ShowAs.DiffCol:case ShowAs.DiffColPct:case ShowAs.PctPrevCol:for(r=0;r<e.length;r++)for(n=d._colBindings.length-t+i;n>=0;n-=t){var c;(h=e[r])[c=d._colBindings[n]]=d._getColDifference(e,r,n,o.showAs)}}},d=this;for(i=0;i<t;i++)_loop_2(i)};PivotEngine.prototype._getAggregateObject=function(e,t){var i={},o=/(.+:.+;)*((.+):.+;)/,n=t.match(o);for(var r in e){var s=r.match(o);s&&s[1]==n[1]&&(i[s[3]]=e[r])}return i};PivotEngine.prototype._getColTotal=function(e,t){var i=this,o=this._colBindings[t],n=0;e.forEach((function(e){if(-1==i._getRowLevel(e)){var t=e[o];wijmo_1.isNumber(t)&&(n+=t)}}));return n};PivotEngine.prototype._getRunningTotal=function(e,t,i){var o=this._getRowLevel(e[t]);if(0==o)return null;for(var n=this._colBindings[i],r=e[t][n],s=this._getShowRowTotals(),l=this.rowFields.length-2,a=t-1;a>=0;a--){var d=this._getRowLevel(e[a]);if(d==o){if(l>-1&&o<0&&s!=ShowTotals.Subtotals){var h=e[t].$rowKey,u=e[a].$rowKey;if(h.values[l]!=u.values[l])return null}r+=e[a][n];break}if(d>o)break}return r};PivotEngine.prototype._getLastValueInRowGroup=function(e,t,i){for(var o=this._colBindings[i],n=e[t][o],r=this._getRowLevel(e[t]),s=this.rowFields.length-2,l=this._getShowRowTotals(),a=t+1;a<e.length;a++){var d=this._getRowLevel(e[a]);if(d==r){if(s>-1&&r<0&&l!=ShowTotals.Subtotals){var h=e[t].$rowKey,u=e[a].$rowKey;if(h.values[s]!=u.values[s])return n}n=e[a][o]}if(d>r)break}return n};PivotEngine.prototype._getRowDifference=function(e,t,i,o){var n=this._getRowLevel(e[t]);if(0==n)return null;for(var r=this._colBindings[i],s=e[t][r],l=this.rowFields.length-2,a=this._getShowRowTotals(),d=t-1;d>=0;d--){var h=this._getRowLevel(e[d]);if(h==n){if(l>-1&&n<0&&a!=ShowTotals.Subtotals){var u=e[t].$rowKey,_=e[d].$rowKey;if(u.values[l]!=_.values[l])return null}var c=e[d][r];switch(o){case ShowAs.DiffRow:s-=c;break;case ShowAs.DiffRowPct:s=(s-c)/c;break;case ShowAs.PctPrevRow:s/=c}return s}if(h>n)break}return o==ShowAs.PctPrevRow?1:null};PivotEngine.prototype._getColDifference=function(e,t,i,o){var n=this._getColLevel(i);if(0==n)return null;for(var r=e[t],s=r[this._colBindings[i]],l=this.valueFields.length,a=this.columnFields.length-2,d=this._getShowColTotals(),h=i-l;h>=0;h-=l){var u=this._getColLevel(h);if(u==n){if(a>-1&&n<0&&d!=ShowTotals.Subtotals){var _=this._getKey(this._colBindings[i]),c=this._getKey(this._colBindings[h]);if(_.values[a]!=c.values[a])return null}var p=r[this._colBindings[h]];switch(o){case ShowAs.DiffCol:s-=p;break;case ShowAs.DiffColPct:s=(s-p)/p;break;case ShowAs.PctPrevCol:s/=p}return s}if(u>n)break}return o==ShowAs.PctPrevCol?1:null};PivotEngine.prototype._getShowRowTotals=function(){return this._valueFields.length?this._showRowTotals:ShowTotals.None};PivotEngine.prototype._getShowColTotals=function(){return this._valueFields.length?this._showColTotals:ShowTotals.None};PivotEngine.prototype._getUniqueValues=function(e){return this._server?this._server.getUniqueValues(e):null};PivotEngine.prototype._generateFields=function(){var e=this;this._viewLists.forEach((function(e){e.clear()}));for(var t=0;t<this.fields.length;t++){if(this.fields[t]._autoGenerated){this.fields.removeAt(t);t--}}if(this._server){this._server.getFields().forEach((function(t){var i=e._createField(t,!0);e.fields.getField(i.header)||e.fields.push(i)}))}else{var i=this.collectionView,o=i?i.items:null;o&&o.length&&this.autoGenerateFields&&wijmo_1.getTypes(o,0).forEach((function(t){var i=e._createField({binding:t.binding,header:wijmo_1.toHeaderCase(t.binding),dataType:t.dataType},!0);e.fields.getField(i.header)||e.fields.push(i)}))}};PivotEngine.prototype._updateFieldTypes=function(){var e=this,t=this.collectionView,i=t?t.sourceCollection:null;i&&i.length&&this.fields.forEach((function(t){e._updateFieldType(t,i)}))};PivotEngine.prototype._updateFieldType=function(e,t){var i=this;if(e._hasSubFields())e.subFields.forEach((function(e){i._updateFieldType(e,t)}));else{if(null==e.dataType&&e.binding)for(var o=0;o<t.length;o++){var n=e._binding.getValue(t[o]);if(null!=n){e.dataType=wijmo_1.isPrimitive(n)?wijmo_1.getType(n):null;break}}if(null!=e.dataType){e.format||(e.format=e.dataType==wijmo_1.DataType.Date?"d":"n0");e.aggregate==wijmo_1.Aggregate.Sum&&e.dataType!=wijmo_1.DataType.Number&&(e.aggregate=wijmo_1.Aggregate.Cnt)}}};PivotEngine.prototype._createField=function(e,t){var i;if(wijmo_1.isString(e))i=new PivotField(this,e);else if(e){e.key&&delete e.key;i=null!=e.dimensionType?new CubePivotField(this,e.binding,e.header,e):new PivotField(this,e.binding,e.header,e);null!=e.dataType&&(i.dataType=e.dataType)}i._autoGenerated=t;if(t||wijmo_1.isString(e)){i.format=i.dataType==wijmo_1.DataType.Date?"d":"n0";i.aggregate=i.dataType==wijmo_1.DataType.Number?wijmo_1.Aggregate.Sum:wijmo_1.Aggregate.Cnt}e&&!wijmo_1.isString(e)&&wijmo_1.copy(i,e);return i};PivotEngine.prototype._cvCollectionChanged=function(e,t){this.invalidate()};PivotEngine.prototype._fieldListChanged=function(e,t){if(t.action==wijmo_1.NotifyCollectionChangedAction.Add){for(var i=e,o=0;o<i.length-1;o++)if(i[o].key)for(var n=o+1;n<i.length;n++)if(i[o].key==i[n].key){i.removeAt(n);n--}if(i!=this._fields)if(this._fields.getField(t.item.key)){for(o=0;o<this._viewLists.length;o++)if(this._viewLists[o]!=i){var r=this._viewLists[o];(s=r.indexOf(t.item))>-1&&r.removeAt(s)}}else i.removeAt(t.index);if(wijmo_1.isNumber(i.maxItems)&&i.maxItems>-1)for(;i.length>i.maxItems;){var s;i[s=i.length-1]==t.item&&s>0&&s--;i.removeAt(s)}}this.onViewDefinitionChanged();this.invalidate()};PivotEngine.prototype._fieldPropertyChanged=function(e,t){this.onViewDefinitionChanged();if(e.isActive){var i=t.propertyName;"visible"!=i&&("width"!=i&&"wordWrap"!=i&&"isContentHtml"!=i?"format"==i&&this.valueFields.indexOf(e)>-1?this._pivotView.refresh():"showAs"!=i?"descending"!=i?"aggregate"!=i?this.invalidate():this.valueFields.indexOf(e)>-1&&!this.isUpdating&&(this._server?this._updateView():this._updatePivotView()):this._updatePivotView():this.valueFields.indexOf(e)>-1&&!this.isUpdating&&this._updatePivotView():this._pivotView.refresh())}};PivotEngine.prototype._copyProps=function(e,t,i){for(var o=0;o<i.length;o++){var n=i[o];null!=t[n]&&(e[n]=t[n])}};PivotEngine.prototype._getFieldFromDefinition=function(e){var t=e.filter;e.filter&&delete e.filter;var i=this._createField(e,!0);if(t){i._setFilterProxy(t);e.filter=t}return i};PivotEngine.prototype._getFieldDefinition=function(e){var t=this,i={binding:e.binding,header:e.header,dataType:e.dataType,aggregate:e.aggregate,showAs:e.showAs,descending:e.descending,format:e.format,align:e.align,wordWrap:e.wordWrap,width:e.width,isContentHtml:e.isContentHtml};e.weightField&&(i.weightField=e.weightField._getName());e.key&&(i.key=e.key);e.filter.isActive&&(i.filter=e._getFilterProxy());if(e._hasSubFields()){i.subFields=[];e.subFields.forEach((function(e){i.subFields.push(t._getFieldDefinition(e))}))}e instanceof CubePivotField&&(i.dimensionType=e.dimensionType);return i};PivotEngine.prototype._getFieldCollectionProxy=function(e){var t={items:[]};wijmo_1.isNumber(e.maxItems)&&e.maxItems>-1&&(t.maxItems=e.maxItems);for(var i=0;i<e.length;i++){var o=e[i];t.items.push(o.key)}return t};PivotEngine.prototype._setFieldCollectionProxy=function(e,t){e.clear();e.maxItems=wijmo_1.isNumber(t.maxItems)?t.maxItems:null;for(var i=0;i<t.items.length;i++)e.push(t.items[i])};PivotEngine.prototype.dispose=function(){var e=this;this.isDisposed=!0;if(this._cv){this._cv.collectionChanged.removeHandler(this._cvCollectionChanged,this);this._cv=null}if(this._server){this._server.clearPendingRequests();this._server=null}this._fields&&this._fields.collectionChanged&&this._fields.collectionChanged.removeHandler(this._fieldListChanged,this);this._viewLists.forEach((function(t){t.collectionChanged&&t.collectionChanged.removeHandler(e._fieldListChanged,e)}));this._tallies=null;this._keys=null;this._activeFilterFields=null;if(this._toInv){clearTimeout(this._toInv);this._toInv=null}if(this._toUpdateTallies){clearTimeout(this._toUpdateTallies);this._toUpdateTallies=null}if(this.edt){this.edt.dispose();this.edt=null}if(this._dlg){this._dlg.dispose();this._dlg=null}this._items=null;if(this._fields){this._fields.clear();this._fields=null}if(this._rowFields){this._rowFields.clear();this._rowFields=null}if(this._columnFields){this._columnFields.clear();this._columnFields=null}if(this._valueFields){this._valueFields.clear();this._valueFields=null}if(this._filterFields){this._filterFields.clear();this._filterFields=null}this._serverParms=null;this._colBindings=null;delete this.isDisposed};PivotEngine._BATCH_SIZE=1e4;PivotEngine._BATCH_TIMEOUT=0;PivotEngine._BATCH_DELAY=100;PivotEngine._props=["showZeros","showRowTotals","showColumnTotals","totalsBeforeData","sortableGroups","defaultFilterType"];return PivotEngine}();exports.PivotEngine=PivotEngine;var ProgressEventArgs=function(e){__extends(ProgressEventArgs,e);function ProgressEventArgs(t){var i=e.call(this)||this;i._progress=wijmo_1.asNumber(t);return i}Object.defineProperty(ProgressEventArgs.prototype,"progress",{get:function(){return this._progress},enumerable:!0,configurable:!0});return ProgressEventArgs}(wijmo_1.EventArgs);exports.ProgressEventArgs=ProgressEventArgs;var _ListContextMenu=function(e){__extends(_ListContextMenu,e);function _ListContextMenu(t){var i=e.call(this,document.createElement("div"),{header:"Field Context Menu",displayMemberPath:"text",commandParameterPath:"parm",command:{executeCommand:function(e){i._execute(e)},canExecuteCommand:function(e){return i._canExecute(e)}}})||this;i._full=t;i.itemsSource=i._getMenuItems(t);wijmo_1.addClass(i.dropDown,"context-menu "+exports._GridContextMenuClsNames.hostElement);return i}Object.defineProperty(_ListContextMenu,"controlTemplate",{get:function(){_ListContextMenu._ctrlTemplate||(_ListContextMenu._ctrlTemplate=wijmo_input_1.Menu.controlTemplate);return _ListContextMenu._ctrlTemplate},set:function(e){_ListContextMenu._ctrlTemplate=e},enumerable:!0,configurable:!0});_ListContextMenu.prototype.refresh=function(t){void 0===t&&(t=!0);this.itemsSource=this._getMenuItems(this._full);e.prototype.refresh.call(this,t)};_ListContextMenu.prototype.attach=function(e){var t=this;wijmo_1.assert(e instanceof wijmo_grid_1.FlexGrid,"Expecting a FlexGrid control...");var i=e.hostElement;this._contextMenuHandler=function(o){if(t._selectField(e,o)){o.preventDefault();t.owner=i;t.show(o)}};i.addEventListener("contextmenu",this._contextMenuHandler)};_ListContextMenu.prototype._selectField=function(e,t){var i=e.hitTest(t);if(i.panel!=e.cells||!i.range.isValid)return!1;var o=e.rows[i.row].dataItem;if(o instanceof CubePivotField&&o.subFields&&o.subFields.length)return!1;e.select(i.range,!0);return!0};_ListContextMenu.prototype._getMenuItems=function(e){var t;t=e?[{text:'<div class="menu-icon"></div>*',parm:"up"},{text:'<div class="menu-icon"></div>*',parm:"down"},{text:'<div class="menu-icon"></div>*',parm:"first"},{text:'<div class="menu-icon"></div>*',parm:"last"},{text:'<div class="'+wijmo_1.UtilitesClsNames.separator+'"></div>'},{text:'<div class="menu-icon"><span class='+wijmo_1.GlyphClsNames.filter+"></span></div>*",parm:"filter"},{text:'<div class="menu-icon">≡</div>*',parm:"rows"},{text:'<div class="menu-icon">⫴</div>*',parm:"cols"},{text:'<div class="menu-icon">Σ</div>*',parm:"vals"},{text:'<div class="'+wijmo_1.UtilitesClsNames.separator+'"></div>'},{text:'<div class="menu-icon menu-icon-remove">✖</div>*',parm:"remove"},{text:'<div class="'+wijmo_1.UtilitesClsNames.separator+'"></div>'},{text:'<div class="menu-icon">⛭</div>*',parm:"edit"}]:[{text:'<div class="menu-icon"><span class='+wijmo_1.GlyphClsNames.filter+"></span></div>*",parm:"filter"},{text:'<div class="menu-icon">≡</div>*',parm:"rows"},{text:'<div class="menu-icon">⫴</div>*',parm:"cols"},{text:'<div class="menu-icon">Σ</div>*',parm:"vals"},{text:'<div class="'+wijmo_1.UtilitesClsNames.separator+'"></div>'},{text:'<div class="menu-icon">⛭</div>*',parm:"edit"}];for(var i=0;i<t.length;i++){var o=t[i];if(o.parm){var n=wijmo_1.culture.olap._ListContextMenu[o.parm];wijmo_1.assert(n,"missing localized text for item "+o.parm);o.text=o.text.replace(/([^>]+$)/,n)}}return t};_ListContextMenu.prototype._execute=function(e){var t=wijmo_1.Control.getControl(this.owner),i=t.itemsSource,o=t.selection.row,n=t.rows[o].dataItem,r=n?n.engine:null,s=this._getTargetList(r,e);switch(e){case"up":case"first":case"down":case"last":if(r){var l=i.indexOf(n),a="up"==e?l-1:"first"==e?0:"down"==e?l+1:"last"==e?i.length:-1;r.deferUpdate((function(){i.removeAt(l);i.insert(a,n)}))}break;case"filter":case"rows":case"cols":case"vals":s&&n&&s.push(n);break;case"remove":n&&r.removeField(n);break;case"edit":n&&r.editField(n)}};_ListContextMenu.prototype._canExecute=function(e){var t=wijmo_1.Control.getControl(this.owner);if(!t)return!1;var i=t.selection.row,o=i>-1?t.rows[i].dataItem:null,n=o?o.engine:null,r=this._getTargetList(n,e),s=!!o&&o instanceof CubePivotField,l=!!o&&o.isMeasure;switch(e){case"up":case"first":return i>0;case"down":case"last":return i<t.rows.length-1;case"filter":case"rows":case"cols":return!l&&r&&r.indexOf(o)<0;case"vals":return(!s||l)&&r&&r.indexOf(o)<0;case"edit":return n&&n.allowFieldEditing;case"detail":return o&&!s}return!0};_ListContextMenu.prototype._getTargetList=function(e,t){if(e)switch(t){case"filter":return e.filterFields;case"rows":return e.rowFields;case"cols":return e.columnFields;case"vals":return e.valueFields}return null};_ListContextMenu.prototype.dispose=function(){if(this.owner instanceof HTMLElement){this.owner.removeEventListener("contextmenu",this._contextMenuHandler);this._contextMenuHandler=null;this._owner=null}this.itemsSource=null;e.prototype.dispose.call(this)};_ListContextMenu._ctrlTemplate="";return _ListContextMenu}(wijmo_input_1.Menu);exports._ListContextMenu=_ListContextMenu;var PivotPanel=function(e){__extends(PivotPanel,e);function PivotPanel(t,i){var o=e.call(this,t,null,!0)||this;o._showIcons=!0;o._restrictDrag=null;o.deferredUpdateChanged=new wijmo_1.Event;o.itemsSourceChanged=new wijmo_1.Event;o.viewDefinitionChanged=new wijmo_1.Event;o.updatingView=new wijmo_1.Event;o.updatedView=new wijmo_1.Event;o._isUpdatingChangedBnd=o._isUpdatingChanged.bind(o);var n=o.getTemplate();o.applyTemplate(wijmo_1.ControlClsNames.hostElement+" "+wijmo_1.ControlClsNames.content+" "+exports.PivotPanelClsNames.hostElement,n,{_dFields:"d-fields",_dFilters:"d-filters",_dRows:"d-rows",_dCols:"d-cols",_dVals:"d-vals",_dProgress:"d-prog",_btnUpdate:"btn-update",_chkDefer:"chk-defer",_gFlds:"g-flds",_gDrag:"g-drag",_gFlt:"g-flt",_gCols:"g-cols",_gRows:"g-rows",_gVals:"g-vals",_gDefer:"g-defer"});o._globalize();var r=o.hostElement;o.addEventListener(r,"dragstart",o._dragstart.bind(o));o.addEventListener(r,"dragover",o._dragover.bind(o));o.addEventListener(r,"dragleave",o._dragover.bind(o));o.addEventListener(r,"drop",o._drop.bind(o));o.addEventListener(r,"dragend",o._dragend.bind(o));o._lbFields=o._createFieldGrid(o._dFields);o._lbFilters=o._createFieldGrid(o._dFilters);o._lbRows=o._createFieldGrid(o._dRows);o._lbCols=o._createFieldGrid(o._dCols);o._lbVals=o._createFieldGrid(o._dVals);var s=o._ctxMenuShort=new _ListContextMenu(!1);s.attach(o._lbFields);(s=o._ctxMenuFull=new _ListContextMenu(!0)).attach(o._lbFilters);s.attach(o._lbRows);s.attach(o._lbCols);s.attach(o._lbVals);o._dMarker=wijmo_1.createElement('<div class="'+wijmo_grid_1.FlexGridClsNames.marker+'" style="display:none"> </div>');o.hostElement.appendChild(o._dMarker);o.addEventListener(o._btnUpdate,"click",(function(e){o._ng.refresh(!0);o.refresh();e.preventDefault()}));o.addEventListener(o._chkDefer,"click",(function(e){o.deferredUpdate=o._chkDefer.checked;o._updateDeferredUpdateElements()}));o.engine=new PivotEngine;o.initialize(i);return o}Object.defineProperty(PivotPanel,"controlTemplate",{get:function(){PivotPanel._ctrlTemplate||(PivotPanel._ctrlTemplate='<div><label wj-part="g-flds"></label><div wj-part="d-fields"></div><label wj-part="g-drag"></label><table><tr><td width="50%"><label><span class="'+wijmo_1.GlyphClsNames.glyph+" "+wijmo_1.GlyphClsNames.filter+'"></span> <span wj-part="g-flt"></span></label><div wj-part="d-filters"></div></td><td width= "50%" style="border-left-style:solid"><label><span class='+wijmo_1.GlyphClsNames.glyph+'>⫴</span> <span wj-part="g-cols"></span></label><div wj-part="d-cols"></div></td></tr><tr style="border-top-style:solid"><td width="50%"><label><span class='+wijmo_1.GlyphClsNames.glyph+'>≡</span> <span wj-part="g-rows"></span></label><div wj-part="d-rows"></div></td><td width= "50%" style="border-left-style:solid"><label><span class='+wijmo_1.GlyphClsNames.glyph+'>Σ</span> <span wj-part="g-vals"></span></label><div wj-part="d-vals"></div></td></tr></table><div wj-part="d-prog" class='+wijmo_1.ControlStateClsNames.selected+' style="width:0px;height:3px"></div><div style="display:table"><label style="display:table-cell;vertical-align:middle"><input wj-part="chk-defer" type="checkbox"/> <span wj-part="g-defer"></span></label><button wj-part="btn-update" class="'+wijmo_1.InputFormElementsClsNames.btn+" "+wijmo_1.ControlStateClsNames.disabled+'" style="float:right;margin:6px" disabled></button></div></div>');return PivotPanel._ctrlTemplate},set:function(e){PivotPanel._ctrlTemplate=e},enumerable:!0,configurable:!0});PivotPanel.prototype._getProductInfo=function(){return"D6F4,PivotPanel"};Object.defineProperty(PivotPanel.prototype,"engine",{get:function(){return this._ng},set:function(e){var t,i=this,o=this._ng;if(o){o.itemsSourceChanged.removeHandler(this._itemsSourceChanged);o.viewDefinitionChanged.removeHandler(this._viewDefinitionChanged);o.updatingView.removeHandler(this._updatingView);o.updatedView.removeHandler(this._updatedView);o.error.removeHandler(this._requestError);o._isUpdatingChanged.removeHandler(this._isUpdatingChangedBnd);t=this.deferredUpdate}e=wijmo_1.asType(e,PivotEngine,!1);(o=this._ng=e).itemsSourceChanged.addHandler(this._itemsSourceChanged,this);o.viewDefinitionChanged.addHandler(this._viewDefinitionChanged,this);o.updatingView.addHandler(this._updatingView,this);o.updatedView.addHandler(this._updatedView,this);o.error.addHandler(this._requestError,this);o._isUpdatingChanged.addHandler(this._isUpdatingChangedBnd);t!==this.deferredUpdate&&this.onDeferredUpdateChanged();this._lbFields.itemsSource=e.fields;this._lbFilters.itemsSource=e.filterFields;this._lbRows.itemsSource=e.rowFields;this._lbCols.itemsSource=e.columnFields;this._lbVals.itemsSource=e.valueFields;this._filterFieldVisibleWithRoot=function(e){return e.visible&&null==e.parentField};this._filterFieldVisibleOnly=function(e){return e.visible};this._lbFields.collectionView.filter=this._filterFieldVisibleWithRoot;"Filters,Rows,Cols,Vals".split(",").forEach((function(e){i["_lb"+e].collectionView.filter=i._filterFieldVisibleOnly}));this._updateDeferredUpdateElements()},enumerable:!0,configurable:!0});Object.defineProperty(PivotPanel.prototype,"itemsSource",{get:function(){return this._ng.itemsSource},set:function(e){e instanceof PivotEngine?this.engine=e:this._ng.itemsSource=e},enumerable:!0,configurable:!0});Object.defineProperty(PivotPanel.prototype,"collectionView",{get:function(){return this._ng.collectionView},enumerable:!0,configurable:!0});Object.defineProperty(PivotPanel.prototype,"pivotView",{get:function(){return this._ng.pivotView},enumerable:!0,configurable:!0});Object.defineProperty(PivotPanel.prototype,"autoGenerateFields",{get:function(){return this.engine.autoGenerateFields},set:function(e){this._ng.autoGenerateFields=e},enumerable:!0,configurable:!0});Object.defineProperty(PivotPanel.prototype,"fields",{get:function(){return this._ng.fields},enumerable:!0,configurable:!0});Object.defineProperty(PivotPanel.prototype,"rowFields",{get:function(){return this._ng.rowFields},enumerable:!0,configurable:!0});Object.defineProperty(PivotPanel.prototype,"columnFields",{get:function(){return this._ng.columnFields},enumerable:!0,configurable:!0});Object.defineProperty(PivotPanel.prototype,"valueFields",{get:function(){return this._ng.valueFields},enumerable:!0,configurable:!0});Object.defineProperty(PivotPanel.prototype,"filterFields",{get:function(){return this._ng.filterFields},enumerable:!0,configurable:!0});Object.defineProperty(PivotPanel.prototype,"viewDefinition",{get:function(){return this._ng.viewDefinition},set:function(e){this._ng.viewDefinition=e},enumerable:!0,configurable:!0});Object.defineProperty(PivotPanel.prototype,"isViewDefined",{get:function(){return this._ng.isViewDefined},enumerable:!0,configurable:!0});Object.defineProperty(PivotPanel.prototype,"showFieldIcons",{get:function(){return this._showIcons},set:function(e){if(e!=this._showIcons){this._showIcons=wijmo_1.asBoolean(e);this.invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(PivotPanel.prototype,"restrictDragging",{get:function(){return this._restrictDrag},set:function(e){this._restrictDrag=wijmo_1.asBoolean(e,!0)},enumerable:!0,configurable:!0});Object.defineProperty(PivotPanel.prototype,"deferredUpdate",{get:function(){return this.engine.isUpdating},set:function(e){this.deferredUpdate!=e&&(e?this._ng.beginUpdate():this._ng.endUpdate())},enumerable:!0,configurable:!0});PivotPanel.prototype.onDeferredUpdateChanged=function(e){this.deferredUpdateChanged.raise(this,e)};PivotPanel.prototype.onItemsSourceChanged=function(e){this.itemsSourceChanged.raise(this,e)};PivotPanel.prototype.onViewDefinitionChanged=function(e){this.viewDefinitionChanged.raise(this,e)};PivotPanel.prototype.onUpdatingView=function(e){this.updatingView.raise(this,e)};PivotPanel.prototype.onUpdatedView=function(e){this.updatedView.raise(this,e)};PivotPanel.prototype.refresh=function(t){var i=this;void 0===t&&(t=!0);if(this.hostElement){["Fields","Filters","Rows","Cols","Vals"].forEach((function(e){var t=i["_lb"+e],o=t?t.collectionView:null;if(t&&o){t.refresh();o.refresh()}}));if(t){this._globalize();this._ctxMenuShort.refresh();this._ctxMenuFull.refresh()}}e.prototype.refresh.call(this,t)};PivotPanel.prototype._copy=function(e,t){switch(e){case"engine":this.engine=t;return!0}return!1};PivotPanel.prototype._globalize=function(){var e=wijmo_1.culture.olap.PivotPanel;wijmo_1.setText(this._gFlds,e.fields);wijmo_1.setText(this._gDrag,e.drag);wijmo_1.setText(this._gFlt,e.filters);wijmo_1.setText(this._gCols,e.cols);wijmo_1.setText(this._gRows,e.rows);wijmo_1.setText(this._gVals,e.vals);wijmo_1.setText(this._gDefer,e.defer);wijmo_1.setText(this._btnUpdate,e.update)};PivotPanel.prototype._itemsSourceChanged=function(e,t){this.onItemsSourceChanged(t)};PivotPanel.prototype._viewDefinitionChanged=function(e,t){this.invalidate();this.onViewDefinitionChanged(t)};PivotPanel.prototype._updatingView=function(e,t){var i=wijmo_1.clamp(t.progress,5,100)%100;this._dProgress.style.width=i+"%";this.onUpdatingView(t)};PivotPanel.prototype._updatedView=function(e,t){this.onUpdatedView(t)};PivotPanel.prototype._requestError=function(e,t){this._dProgress.style.width="0"};PivotPanel.prototype._isUpdatingChanged=function(){this._updateDeferredUpdateElements();this.onDeferredUpdateChanged()};PivotPanel.prototype._updateDeferredUpdateElements=function(){var e=this.deferredUpdate;this._chkDefer.checked=e;wijmo_1.enable(this._btnUpdate,e)};PivotPanel.prototype._createFieldGrid=function(e){var t=this,i=new wijmo_grid_1.FlexGrid(e,{autoGenerateColumns:!1,childItemsPath:"subFields",columns:[{binding:"header",width:"*"}],headersVisibility:"None",selectionMode:"Cell",alternatingRowStep:0});i.cells.hostElement.parentElement.style.overflowX="hidden";i.formatItem.addHandler((function(e,i){var o=e.rows[i.row].dataItem;wijmo_1.assert(o instanceof PivotField,"PivotField expected...");var n=o._hasSubFields();wijmo_1.toggleClass(i.cell,exports.PivotPanelClsNames.header,n);i.cell.setAttribute("draggable",(!n).toString());var r=i.cell.innerHTML;o.filter.isActive&&(r+=" <span class="+wijmo_1.GlyphClsNames.filter+"></span>");e!=t._lbVals||wijmo_1.isFunction(o.getAggregateValue)||(r+=' <span class="'+exports.PivotPanelClsNames.aggregate+'">('+wijmo_1.Aggregate[o.aggregate]+")</span>");if(e==t._lbFields&&!n){if(t._showIcons){var s=o.isMeasure?"measure":"dimension";r='<span class="'+wijmo_1.GlyphClsNames.glyph+"-"+s+'"></span> '+r}r='<label><input type="checkbox"'+(o.isActive?" checked":"")+"> "+r+"</label>"}i.cell.innerHTML=r}));i.addEventListener(e,"click",(function(e){var o=e.target;if(o instanceof HTMLInputElement&&"checkbox"==o.type){var n=t._hitTestField(i,e);n instanceof PivotField&&(n.isActive=o.checked)}}));return i};PivotPanel.prototype._dragstart=function(e){var t=this._getFlexGridTarget(e);if(t){this._dragField=this._hitTestField(t,e);this._dragSource=this._dragField instanceof PivotField?t.hostElement:null;if(this._dragSource&&e.dataTransfer){wijmo_1._startDrag(e.dataTransfer,"copyMove");e.stopPropagation()}}};PivotPanel.prototype._dragover=function(e){var t=!1,i=this._getFlexGridTarget(e);if(i&&this._dragField){if(this._dragSource==this._dFields&&i!=this._lbFields){var o=i.itemsSource;if(null==o.maxItems||o.length<o.maxItems){var n=this._dragField;i.itemsSource.indexOf(n)<0?t=!0:i==this._lbVals&&(t=!(n instanceof CubePivotField))}}this._dragSource&&this._dragSource!=this._dFields&&(t=!0)}if(t&&this._getRestrictDrag()&&this._dragSource!=i.hostElement){var r=this._dragField.isMeasure;i==this._lbVals?t=r:i!=this._lbRows&&i!=this._lbCols||(t=!r)}if(t){this._updateDropMarker(i,e);e.dataTransfer.dropEffect=this._dragSource==this._dFields?"copy":"move";e.preventDefault();e.stopPropagation()}else this._updateDropMarker()};PivotPanel.prototype._drop=function(e){var t=this,i=this._getFlexGridTarget(e);if(i&&this._dragField){var o=wijmo_1.Control.getControl(this._dragSource),n=this._dragField;if(o==this._lbFields&&i==this._lbVals&&i.itemsSource.indexOf(n)>-1){n=n._clone();this.engine.fields.push(n)}i==this._lbFields?n.isActive=!1:this._ng.deferUpdate((function(){var e=i.itemsSource,o=e.indexOf(n);if(o!=t._dropIndex){if(o>-1){e.removeAt(o);o<t._dropIndex&&t._dropIndex--}e.insert(t._dropIndex,n)}}))}this._resetMouseState()};PivotPanel.prototype._dragend=function(e){this._resetMouseState()};PivotPanel.prototype._hitTestField=function(e,t){var i=e.hitTest(t.target);if(i.panel==e.cells&&i.range.isValid){e.select(i.range,!0);return e.rows[i.row].dataItem}return null};PivotPanel.prototype._getRestrictDrag=function(){var e=this._restrictDrag;null==e&&this.fields.length&&(e=this.fields[0]instanceof CubePivotField);return e};PivotPanel.prototype._resetMouseState=function(){this._dragSource=null;this._updateDropMarker()};PivotPanel.prototype._getFlexGridTarget=function(e){var t=wijmo_1.Control.getControl(wijmo_1.closest(e.target,"."+wijmo_grid_1.FlexGridClsNames.hostElement));return t instanceof wijmo_grid_1.FlexGrid?t:null};PivotPanel.prototype._updateDropMarker=function(e,t){if(t){var i,o=this.hostElement,n=o.getBoundingClientRect();if(e.rows.length){var r=e.hitTest(t).row;if(r>-1){i=e.getCellBoundingRect(r,0);if(t.clientY>o.scrollTop+i.top+i.height/2&&r<e.rows.length){i.top+=i.height;r++}this._dropIndex=r}else{r=e.viewRange.bottomRow;(i=e.getCellBoundingRect(r,0)).top+=i.height;this._dropIndex=r+1}}else{(i=wijmo_1.Rect.fromBoundingRect(e.hostElement.getBoundingClientRect())).top+=4;this._dropIndex=0}wijmo_1.setCss(this._dMarker,{left:Math.round(i.left-n.left)+o.scrollLeft,top:Math.round(i.top-n.top-2)+o.scrollTop,width:Math.round(i.width),height:4,display:""})}else this._dMarker.style.display="none"};PivotPanel.prototype.dispose=function(){var t=this;this._lbFields&&this._lbFields.collectionView&&(this._lbFields.collectionView.filter=null);["Filters","Rows","Cols","Vals"].forEach((function(e){var i=t["_lb"+e];i&&i.collectionView&&(i.collectionView.filter=null)}));if(this._ctxMenuShort){this._ctxMenuShort.dispose();this._ctxMenuShort=null}if(this._ctxMenuFull){this._ctxMenuFull.dispose();this._ctxMenuFull=null}if(this._lbFields){this._lbFields.dispose();this._lbFields=null}if(this._lbFilters){this._lbFilters.dispose();this._lbFilters=null}if(this._lbRows){this._lbRows.dispose();this._lbRows=null}if(this._lbCols){this._lbCols.dispose();this._lbCols=null}if(this._lbVals){this._lbVals.dispose();this._lbVals=null}if(this._ng){this._ng.itemsSourceChanged.removeHandler(this._itemsSourceChanged);this._ng.viewDefinitionChanged.removeHandler(this._viewDefinitionChanged);this._ng.updatingView.removeHandler(this._updatingView);this._ng.updatedView.removeHandler(this._updatedView);this._ng.error.removeHandler(this._requestError);this._ng._isUpdatingChanged.removeHandler(this._isUpdatingChangedBnd)}this.engine.dispose();e.prototype.dispose.call(this)};PivotPanel._ctrlTemplate="";return PivotPanel}(wijmo_1.Control);exports.PivotPanel=PivotPanel;var PivotGrid=function(e){__extends(PivotGrid,e);function PivotGrid(t,i){var o=e.call(this,t)||this;o._showDetailOnDoubleClick=!0;o._collapsibleSubtotals=!0;o._customCtxMenu=!0;o._ctxMenu=new _GridContextMenu;o._showRowFldSort=!1;o._showRowFldHdrs=!0;o._showColFldHdrs=!0;o._showValFldHdrs=!1;o._centerVert=!0;o._collapsedKeys={};o._resizingColumn=!1;o._outlineMode=!1;o._ignoreClick=!1;o._colRowFields=new Map;o._prevCulture=wijmo_1.culture.Globalize.name;o._hdrCols._setDefaultSize(o._cols.defaultSize);wijmo_1.addClass(o.hostElement,exports.PivotGridClsNames.hostElement);o.isReadOnly=!0;o.copyHeaders=wijmo_grid_1.HeadersVisibility.All;o.deferResizing=!0;o.alternatingRowStep=0;o.autoGenerateColumns=!1;o.allowDragging=wijmo_grid_1.AllowDragging.None;o.allowMerging=wijmo_grid_1.AllowMerging.All;o.mergeManager=new _PivotMergeManager;o.customContextMenu=!0;o.treeIndent=32;o.initialize(i);o.formatItem.addHandler(o._formatItem,o);var n=o.hostElement;o.addEventListener(n,"mousedown",o._mousedown.bind(o),!0);o.addEventListener(n,"mouseup",o._mouseup.bind(o),!0);o.addEventListener(n,"dblclick",o._dblclick.bind(o),!0);o.addEventListener(n,"click",o._click.bind(o),!0);o.addEventListener(n,"keydown",o._keydown.bind(o),!0);o._ctxMenu.attach(o);return o}Object.defineProperty(PivotGrid,"controlTemplate",{get:function(){PivotGrid._ctrlTemplate||(PivotGrid._ctrlTemplate=wijmo_grid_1.FlexGrid.controlTemplate);return PivotGrid._ctrlTemplate},set:function(e){PivotGrid._ctrlTemplate=e},enumerable:!0,configurable:!0});PivotGrid.prototype._getProductInfo=function(){return"D6F4,PivotGrid"};Object.defineProperty(PivotGrid.prototype,"engine",{get:function(){return this._ng},enumerable:!0,configurable:!0});Object.defineProperty(PivotGrid.prototype,"showDetailOnDoubleClick",{get:function(){return this._showDetailOnDoubleClick},set:function(e){this._showDetailOnDoubleClick=wijmo_1.asBoolean(e)},enumerable:!0,configurable:!0});Object.defineProperty(PivotGrid.prototype,"detailDialog",{get:function(){this._dlgDetail||(this._dlgDetail=new DetailDialog(document.createElement("div")));return this._dlgDetail},enumerable:!0,configurable:!0});Object.defineProperty(PivotGrid.prototype,"showRowFieldHeaders",{get:function(){return this._showRowFldHdrs},set:function(e){if(e!=this._showRowFldHdrs){this._showRowFldHdrs=wijmo_1.asBoolean(e);this._updateFixedContent()}},enumerable:!0,configurable:!0});Object.defineProperty(PivotGrid.prototype,"showColumnFieldHeaders",{get:function(){return this._showColFldHdrs},set:function(e){if(e!=this._showColFldHdrs){this._showColFldHdrs=wijmo_1.asBoolean(e);this._updateFixedContent()}},enumerable:!0,configurable:!0});Object.defineProperty(PivotGrid.prototype,"showValueFieldHeaders",{get:function(){return this._showValFldHdrs},set:function(e){if(e!=this._showValFldHdrs){this._showValFldHdrs=wijmo_1.asBoolean(e);this._updateFixedCounts();this._updateFixedContent()}},enumerable:!0,configurable:!0});Object.defineProperty(PivotGrid.prototype,"showRowFieldSort",{get:function(){return this._showRowFldSort},set:function(e){if(e!=this._showRowFldSort){this._showRowFldSort=wijmo_1.asBoolean(e);this._updateFixedContent()}},enumerable:!0,configurable:!0});Object.defineProperty(PivotGrid.prototype,"customContextMenu",{get:function(){return this._customCtxMenu},set:function(e){this._customCtxMenu=wijmo_1.asBoolean(e)},enumerable:!0,configurable:!0});Object.defineProperty(PivotGrid.prototype,"collapsibleSubtotals",{get:function(){return this._collapsibleSubtotals},set:function(e){if(e!=this._collapsibleSubtotals){this._collapsibleSubtotals=wijmo_1.asBoolean(e);this.invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(PivotGrid.prototype,"centerHeadersVertically",{get:function(){return this._centerVert},set:function(e){if(e!=this._centerVert){this._centerVert=wijmo_1.asBoolean(e);this.invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(PivotGrid.prototype,"outlineMode",{get:function(){return this._outlineMode},set:function(e){if(e!=this._outlineMode){this._outlineMode=wijmo_1.asBoolean(e);this._bindGrid(!0)}},enumerable:!0,configurable:!0});PivotGrid.prototype.getKeys=function(e,t){var i=this.rows[wijmo_1.asInt(e)],o=this.columns[wijmo_1.asInt(t)],n=i?i.dataItem:null,r=o?o.binding:null;return this._ng.getKeys(n,r)};PivotGrid.prototype.getDetail=function(e,t){var i=this.rows[wijmo_1.asInt(e)].dataItem,o=this.columns[wijmo_1.asInt(t)].binding;return this._ng.getDetail(i,o)};PivotGrid.prototype.getDetailView=function(e,t){var i=this.rows[wijmo_1.asInt(e)].dataItem,o=this.columns[wijmo_1.asInt(t)].binding;return this._ng.getDetailView(i,o)};PivotGrid.prototype.showDetail=function(e,t){if(this._ng.valueFields.length){var i=this.detailDialog;i.showDetail(this,new wijmo_grid_1.CellRange(e,t));i.show(!0)}};PivotGrid.prototype.collapseRowsToLevel=function(e){this._collapseRowsToLevel(e)};PivotGrid.prototype.collapseColumnsToLevel=function(e){this._collapseColsToLevel(e)};PivotGrid.prototype._getQuickAutoSize=function(){return wijmo_1.isBoolean(this.quickAutoSize)?this.quickAutoSize:this.formatItem.handlerCount<=1&&null==this.itemFormatter};PivotGrid.prototype._bindGrid=function(t){var i=this;this.deferUpdate((function(){var o=i.preserveOutlineState||i._resizingColumn,n=i._collapsedKeys,r=i.rows,s=i.columns;o||(n=i._collapsedKeys={});e.prototype._bindGrid.call(i,t);if(i._ng&&o&&!wijmo_1.isEmpty(n)){for(var l=i._ng.totalsBeforeData,a=l?r.length-1:0,d=l?-1:r.length,h=l?-1:1,u=a;u!=d;u+=h){var _=r[u].dataItem;(c=_?_[_PivotKey._ROW_KEY_NAME]:null)&&c.level>=0&&n[c.toString()]&&i._setRowCollapsed(new wijmo_grid_1.CellRange(u,c.level-1),!0)}a=l?s.length-1:0;d=l?-1:s.length;h=l?-1:1;for(u=a;u!=d;u+=h){var c,p=s[u].binding;(c=i._ng._getKey(p))&&c.level>0&&n[c.toString()]&&i._setColCollapsed(new wijmo_grid_1.CellRange(c.level-1,u),!0)}}}))};PivotGrid.prototype._getCollectionView=function(e){e instanceof PivotPanel?e=e.engine.pivotView:e instanceof PivotEngine&&(e=e.pivotView);return wijmo_1.asCollectionView(e)};PivotGrid.prototype.refresh=function(t){void 0===t&&(t=!0);this._ctxMenu.refresh();var i=wijmo_1.culture.Globalize.name;if(this._prevCulture!==i){this._prevCulture=i;this._updateFixedContent()}e.prototype.refresh.call(this,t)};PivotGrid.prototype.onItemsSourceChanged=function(t){if(this._ng){this._ng.updatingView.removeHandler(this._updatingView,this);this._ng.viewDefinitionChanged.removeHandler(this._viewDefinitionChanged,this);this._ng._hasDeferredUpdatesChanged.removeHandler(this._hasDeferredUpdatesChanged,this)}this._collapsedKeys={};var i=this.collectionView;this._ng=i instanceof PivotCollectionView?i.engine:null;if(this._ng){this._ng.updatingView.addHandler(this._updatingView,this);this._ng.viewDefinitionChanged.addHandler(this._viewDefinitionChanged,this);this._ng._hasDeferredUpdatesChanged.addHandler(this._hasDeferredUpdatesChanged,this)}this._updatingView();this._bindGrid(!0);e.prototype.onItemsSourceChanged.call(this,t)};PivotGrid.prototype.onResizedColumn=function(t){var i=this._ng;if(i){this._resizingColumn=!0;if(t.panel.columns==this.rowHeaders.columns){(n=this._colRowFields.get(t.getColumn()))instanceof PivotField&&(n.width=t.panel.columns[t.col].renderWidth)}if(t.panel.columns==this.columnHeaders.columns){var o=i.valueFields;if(o.length>0){var n;(n=o[t.col%o.length]).width=t.panel.columns[t.col].renderWidth}}this._resizingColumn=!1}e.prototype.onResizedColumn.call(this,t)};PivotGrid.prototype.onSortingColumn=function(t){var i=this._ng;return(!i||!i.isUpdating)&&e.prototype.onSortingColumn.call(this,t)};PivotGrid.prototype.onDraggingColumn=function(t){var i=this._ng;return(!i||!i.isUpdating)&&e.prototype.onDraggingColumn.call(this,t)};PivotGrid.prototype.onDraggedColumn=function(t){var i=this._ng;if(i&&t.panel.columns==this.topLeftCells.columns){var o=i.rowFields,n=o[t.data.col];i.deferUpdate((function(){o.removeAt(t.data.col);o.insert(t.col,n)}))}e.prototype.onDraggedColumn.call(this,t)};PivotGrid.prototype._updatingView=function(){this._updateFixedCounts();this.columns.clear();this.rows.clear()};PivotGrid.prototype._viewDefinitionChanged=function(){this._resizingColumn||(this._collapsedKeys={})};PivotGrid.prototype._hasDeferredUpdatesChanged=function(){for(var e,t=this.engine,i=t&&t.hasDeferredUpdates,o=this.hostElement.querySelectorAll("."+PivotGrid._WJC_COLLAPSE),n=0;n<o.length;n++)e=o[n],wijmo_1.toggleClass(e,PivotGrid._WJC_DISABLED,i)};PivotGrid.prototype.onLoadedRows=function(t){0==this.columns.length&&this._generateColumns();this._updateFixedCounts();this._updateFixedContent();e.prototype.onLoadedRows.call(this,t)};PivotGrid.prototype._generateColumns=function(){var e=this.collectionView,t=e?e.sourceCollection:null,i=t&&t.length,o=this.engine;if(o&&i)for(var n=Object.keys(t[0]).filter((function(e){return e!=_PivotKey._ROW_KEY_NAME})),r=[wijmo_1.Aggregate.Cnt,wijmo_1.Aggregate.CntAll],s=0;s<n.length;s++){var l=o._getFieldByColKey(n[s]);this.columns.push(new wijmo_grid_1.Column({binding:n[s],dataType:l&&-1===r.indexOf(l.aggregate)?l.dataType:wijmo_1.DataType.Number,allowMerging:!0}))}};PivotGrid.prototype._updateFixedCounts=function(){var e,t=this._ng,i=t&&t.isViewDefined;e=Math.max(1,i?t.rowFields.length:1);var o=this.topLeftCells.columns;o.clear();this._colRowFields.clear();for(var n=0;n<e;n++){var r=new wijmo_grid_1.Column({allowMerging:!0});o.push(r);i&&this._colRowFields.set(r,t.rowFields[n])}e=Math.max(1,i?t.columnFields.length:1);t&&t.columnFields.length&&(t.valueFields.length>1||this.showValueFieldHeaders)&&e++;var s=this.topLeftCells.rows;s.clear();for(n=0;n<e;n++)s.push(new wijmo_grid_1.Row)};PivotGrid.prototype._updateFixedContent=function(){var e=this._ng;if(e&&e.isViewDefined){for(var t=e.rowFields,i=e.columnFields,o=e.valueFields,n=this.outlineMode?t.map((function(e){return e.header})).join(" / "):"",r=this.topLeftCells,s=0;s<r.rows.length;s++)for(var l=0;l<r.columns.length;l++){var a="";this.showRowFieldHeaders&&l<t.length&&s==r.rows.length-1&&(a=this.outlineMode?n:t[l].header);this.showColumnFieldHeaders&&!a&&s<i.length&&0==l&&(a=i[s].header+":");r.setCellData(s,l,a,!1,!1)}r=this.rowHeaders;for(s=0;s<r.rows.length;s++){var d=r.rows[s].dataItem[_PivotKey._ROW_KEY_NAME];wijmo_1.assert(d instanceof _PivotKey,"missing PivotKey for row...");for(l=0;l<r.columns.length;l++){a=d.getValue(l,!0);r.setCellData(s,l,a,!1,!1)}}r=this.columnHeaders;for(l=0;l<r.columns.length;l++){d=e._getKey(r.columns[l].binding);wijmo_1.assert(d instanceof _PivotKey,"missing PivotKey for column...");for(s=0;s<r.rows.length;s++){a=d.getValue(s,!0);s==r.rows.length-1&&o.length&&(o.length>1||0==i.length||d.level>-1||this.showValueFieldHeaders)&&(a=o[l%o.length].header);r.setCellData(s,l,a,!1,!1)}}r=this.topLeftCells;for(l=0;l<r.columns.length;l++){var h=r.columns[l],u=l<t.length?t[l]:null;h.wordWrap=u?u.wordWrap:null;h.align=u?u.align:null;if(this.outlineMode&&l<r.columns.length-1){h.width=this.treeIndent;h.allowResizing=!1}else{h.allowResizing=!0;h.width=u&&wijmo_1.isNumber(u.width)?u.width:null}}r=this.cells;for(l=0;l<r.columns.length;l++){h=r.columns[l],u=o.length?o[l%o.length]:null;h.width=u&&wijmo_1.isNumber(u.width)?u.width:null;h.wordWrap=u?u.wordWrap:null;h.format=u?u.format:null;h.align=u?u.align:null}this.invalidate()}else this.topLeftCells.setCellData(0,0,null)};PivotGrid.prototype._updateDefaultSizes=function(){var t=e.prototype._updateDefaultSizes.call(this);this._hdrCols._setDefaultSize(4*t);return t};PivotGrid.prototype._formatItem=function(e,t){var i=this._ng,o=t.panel,n=t.cell;if(i){if(o==this.topLeftCells){var r=0==i.rowFields.length||t.row<o.rows.length-1||t.row==o.rows.length-1&&!this.showRowFieldHeaders;wijmo_1.toggleClass(n,exports.PivotGridClsNames.colFieldHdr,r);wijmo_1.toggleClass(n,exports.PivotGridClsNames.rowFieldHdr,!r)}var s,l=null;o==this.topLeftCells&&t.row==o.rows.length-1&&this.allowDragging&wijmo_grid_1.AllowDragging.Columns&&(l=!0);wijmo_1.setAttribute(n,"draggable",l);switch(o){case this.rowHeaders:s=i.rowFields[t.col%i.rowFields.length];break;case this.columnHeaders:s=i.columnFields[t.row];break;case this.cells:s=i.valueFields[t.col]}s&&s.isContentHtml&&(n.innerHTML=n.textContent);var a=o.columns[t.col].binding,d=o.rows==this.rows?i._getRowLevel(t.row):-1,h=o.columns==this.columns?i._getColLevel(a):-1;wijmo_1.toggleClass(n,exports.PivotPanelClsNames.aggregate,d>-1||h>-1);if(this._collapsibleSubtotals){if(o==this.rowHeaders&&i._getShowRowTotals()==ShowTotals.Subtotals)if(this.outlineMode){var u=this._getGroupedRows(t.range);if(t.col<i.rowFields.length-1){if(!u.containsRow(t.row)){var _=this._getRowCollapsed(t.range);n.innerHTML=this._getCollapsedGlyph(_)+n.innerHTML}}}else{u=this.getMergedRange(o,t.row,t.col,!1)||t.range;if(t.col<i.rowFields.length-1&&u.rowSpan>1){_=this._getRowCollapsed(u);n.innerHTML=this._getCollapsedGlyph(_)+n.innerHTML}}this.outlineMode&&o==this.rowHeaders&&t.range.rightCol<o.columns.length-1&&(n.innerHTML="");if(o==this.columnHeaders&&i._getShowColTotals()==ShowTotals.Subtotals){u=this.getMergedRange(o,t.row,t.col,!1)||t.range;if(t.row<i.columnFields.length-1&&u.columnSpan>1){var c=this._getColCollapsed(u);n.innerHTML=this._getCollapsedGlyph(c)+n.innerHTML}}}if(o==this.topLeftCells&&this.showRowFieldSort&&t.col<i.rowFields.length&&t.row==this._getSortRowIndex()){s=i.rowFields[t.col];wijmo_1.toggleClass(n,wijmo_grid_1.FlexGridClsNames.sortAsc,!s.descending);wijmo_1.toggleClass(n,wijmo_grid_1.FlexGridClsNames.sortDesc,s.descending);n.innerHTML+=' <span class="'+wijmo_1.GlyphClsNames.glyph+"-"+(s.descending?"down":"up")+'"></span>'}o!=this.cells&&wijmo_1.toggleClass(n,wijmo_1.UtilitesClsNames.alignVCenter,this._centerVert)}};PivotGrid.prototype._getCollapsedGlyph=function(e){var t=this.engine,i=t&&t.hasDeferredUpdates;return'<div class="'+(PivotGrid._WJC_COLLAPSE+(i?" "+PivotGrid._WJC_DISABLED:""))+'"><span class="'+wijmo_1.GlyphClsNames.glyph+"-"+(e?"plus":"minus")+'"></span></div>'};PivotGrid.prototype._mousedown=function(e){if(e.defaultPrevented||0!=e.button)this._htDown=null;else{var t=this._htDown=this.hitTest(e),i=t.panel;this._ignoreClick=!1;var o=this.engine,n=o&&o.hasDeferredUpdates,r=wijmo_1.closestClass(e.target,PivotGrid._WJC_COLLAPSE);if(!n&&null!=r&&null!=i){var s=t.range,l=void 0;switch(i.cellType){case wijmo_grid_1.CellType.RowHeader:var a=this.getMergedRange(i,s.row,s.col);a&&s.copy(a);l=this._getRowCollapsed(s);e.shiftKey||e.ctrlKey?this._collapseRowsToLevel(s.col+(l?2:1)):this._setRowCollapsed(s,!l);break;case wijmo_grid_1.CellType.ColumnHeader:l=this._getColCollapsed(s);e.shiftKey||e.ctrlKey?this._collapseColsToLevel(s.row+(l?2:1)):this._setColCollapsed(s,!l)}e.preventDefault();this._ignoreClick=!0;this._htDown=null;this.focus()}}};PivotGrid.prototype._mouseup=function(e){if(this._htDown&&!e.defaultPrevented&&!this._mouseHdl._szRowCol){var t=this.hitTest(e);if(this._htDown.panel==t.panel&&t.range.equals(this._htDown.range)){var i=this._ng,o=this.topLeftCells;if(t.panel==o&&t.row==o.rows.length-1&&t.col>-1){var n=t.getColumn();if(this.allowSorting&&n.allowSorting&&!t.edgeRight){var r=this._colRowFields.get(n);if(r&&!i.isUpdating){var s=new wijmo_grid_1.CellRangeEventArgs(t.panel,t.range);if(this.onSortingColumn(s)){i.pivotView.sortDescriptions.clear();r.descending=!r.descending;this.onSortedColumn(s)}}}e.preventDefault();this._ignoreClick=!0}}}};PivotGrid.prototype._click=function(e){this._ignoreClick&&e.preventDefault()};PivotGrid.prototype._dblclick=function(e){if(!e.defaultPrevented&&this._showDetailOnDoubleClick){var t=this._htDown;if(t&&t.panel==this.cells){var i=this._ng;i&&i.fields.length>0&&(i.fields[0]instanceof CubePivotField||this.showDetail(t.row,t.col))}}};PivotGrid.prototype._keydown=function(e){if(!e.defaultPrevented&&!e.ctrlKey&&e.altKey&&this.collapsibleSubtotals){var t=this.selection;if(t.isValid){var i=this._getRowLevel(t.topRow);i<0&&(i=this.rowHeaders.columns.length-1);var o=this._getKeyCode(e);switch(o){case wijmo_1.Key.Left:case wijmo_1.Key.Right:var n=new wijmo_grid_1.CellRange(t.row,i-1);this._setRowCollapsed(n,o==wijmo_1.Key.Left);e.preventDefault()}}}};PivotGrid.prototype._getRowLevel=function(e){return this._ng._getRowLevel(e)};PivotGrid.prototype._getGroupedRows=function(e){var t,i=this._getRowLevel.bind(this),o=e.col+1,n=this.rows.length,r=this._ng.totalsBeforeData,s=e.row;if(0==i(s)){s=r?1:0;t=r?n-1:n-2}else{if(r)for(;s<n&&!(i(s)<0);s++);else for(;s>=0&&!(i(s)<0);s--);for(;s>0;s--){if((l=i(s-1))>=0&&l<=o)break}for(t=s;t<n-1;t++){var l;if((l=i(t+1))>=0&&l<=o)break}}wijmo_1.assert(t>=s,"group end < start?");return t>=s?new wijmo_grid_1.CellRange(s,e.col,t,e.col2):e};PivotGrid.prototype._toggleRowCollapsed=function(e){this._setRowCollapsed(e,!this._getRowCollapsed(e))};PivotGrid.prototype._getRowCollapsed=function(e){e=this._getGroupedRows(e);var t=this._ng.totalsBeforeData?e.row-1:e.row2+1,i=this.rows[t]||this.rows[e.row],o=i?i.dataItem[_PivotKey._ROW_KEY_NAME]:null;return!!o&&this._collapsedKeys[o.toString()]};PivotGrid.prototype._setRowCollapsed=function(e,t){var i=this;e=this._getGroupedRows(e);var o=this._ng.totalsBeforeData?e.row-1:e.row2+1,n=this.rows[o]||this.rows[e.row],r=n?n.dataItem[_PivotKey._ROW_KEY_NAME]:null;r&&(this._collapsedKeys[r.toString()]=t);this.deferUpdate((function(){for(var r=e.row;r<=e.row2;r++)i.rows[r].visible=!t;n&&(n.visible=!0);if(!t){var s=i._getRowLevel(o),l=[];for(r=e.row;r<=e.row2;r++)if(i._getRowLevel(r)>-1){var a=i._getGroupedRows(new wijmo_grid_1.CellRange(r,s));wijmo_1.assert(a.row>=e.row&&a.row2<=e.row2,"child range overflow");l.push(a);r++}l.forEach((function(e){var t=i._getRowCollapsed(e);i._setRowCollapsed(e,t)}))}}))};PivotGrid.prototype._collapseRowsToLevel=function(e){var t=this;e>=this._ng.rowFields.length&&(e=-1);this.deferUpdate((function(){for(var i=0;i<t.rows.length;i++){var o=t._getRowLevel(i);if(o>0){var n=t.rows[i].dataItem[_PivotKey._ROW_KEY_NAME];t._collapsedKeys[n.toString()]=e>0&&o>=e}if(e<0)t.rows[i].visible=!0;else{var r=o>-1&&o<=e;r||(t._ng.totalsBeforeData?0==i&&(r=!0):i==t.rows.length-1&&(r=!0));t.rows[i].visible=r}}}))};PivotGrid.prototype._getColLevel=function(e){return this._ng._getColLevel(this.columns[e].binding)};PivotGrid.prototype._getGroupedCols=function(e){var t,i=this._getColLevel.bind(this),o=e.row+1,n=this.columns.length,r=this._ng.totalsBeforeData,s=e.col;if(0==i(s)){s=r?1:0;t=r?n-1:n-2}else{if(this._ng.totalsBeforeData)for(s=e.col;s<n&&!(i(s)<0);s++);else for(s=e.col;s>=0&&!(i(s)<0);s--);for(;s>0;s--){if((l=i(s-1))>=0&&l<=o)break}for(t=s;t<n-1;t++){var l;if((l=i(t+1))>=0&&l<=o)break}}wijmo_1.assert(t>=s,"group end < start?");return t>=s?new wijmo_grid_1.CellRange(e.row,s,e.row2,t):e};PivotGrid.prototype._toggleColCollapsed=function(e){this._setColCollapsed(e,!this._getColCollapsed(e))};PivotGrid.prototype._getColCollapsed=function(e){e=this._getGroupedCols(e);var t=this._ng,i=t.totalsBeforeData?e.col-t.valueFields.length:e.col2+1,o=this.columns[i],n=o?o.binding:null;return!!n&&this._collapsedKeys[n.toString()]};PivotGrid.prototype._setColCollapsed=function(e,t){var i=this;e=this._getGroupedCols(e);var o=this._ng,n=o.totalsBeforeData?e.col-o.valueFields.length:e.col2+1,r=this.columns[n],s=r?r.binding:null;s&&(this._collapsedKeys[s.toString()]=t);this.deferUpdate((function(){for(var r=1;r<=o.valueFields.length;r++)i.columns[o.totalsBeforeData?e.col-r:e.col2+r].visible=!0;for(var s=e.col;s<=e.col2;s++)i.columns[s].visible=!t;if(!t){var l=i._getColLevel(n),a=[];for(s=e.col;s<=e.col2;s++)if(i._getColLevel(s)>-1){var d=i._getGroupedCols(new wijmo_grid_1.CellRange(l,s));wijmo_1.assert(d.col>=e.col&&d.col2<=e.col2,"child range overflow");a.push(d);s+=o.valueFields.length-1}a.forEach((function(e){var t=i._getColCollapsed(e);i._setColCollapsed(e,t)}))}}))};PivotGrid.prototype._collapseColsToLevel=function(e){var t=this;e>=this._ng.columnFields.length&&(e=-1);this.deferUpdate((function(){for(var i=0;i<t.columns.length;i++){var o=t._getColLevel(i);if(o>0){var n=t._ng._getKey(t.columns[i].binding);t._collapsedKeys[n.toString()]=e>0&&o>=e}if(e<0)t.columns[i].visible=!0;else{var r=o>-1&&o<=e;t.columns[i].visible=r}}}))};PivotGrid.prototype.dispose=function(){if(this._ctxMenu){this._ctxMenu.dispose();this._ctxMenu=null}if(this._dlgDetail){this._dlgDetail.dispose();this._dlgDetail=null}if(this._ng){this._ng.updatingView.removeHandler(this._updatingView,this);this._ng.viewDefinitionChanged.removeHandler(this._viewDefinitionChanged,this);this._ng._hasDeferredUpdatesChanged.removeHandler(this._hasDeferredUpdatesChanged,this)}e.prototype.dispose.call(this)};PivotGrid._WJC_COLLAPSE=exports.PivotGridClsNames.pivotCollapse;PivotGrid._WJC_DISABLED=wijmo_1.ControlStateClsNames.disabled;PivotGrid._ctrlTemplate="";return PivotGrid}(wijmo_grid_1.FlexGrid);exports.PivotGrid=PivotGrid;var DetailDialog=function(e){__extends(DetailDialog,e);function DetailDialog(t,i){var o=e.call(this,t,null)||this,n=o.getTemplate();o.applyTemplate(wijmo_1.ControlClsNames.hostElement+" "+exports.DetailDialogClsNames.hostElement,n,{_sCnt:"sp-cnt",_dSummary:"div-summary",_dGrid:"div-grid",_btnOK:"btn-ok",_gHdr:"g-hdr"});o._g=new wijmo_grid_1.FlexGrid(o._dGrid,{isReadOnly:!0});o.initialize(i);return o}Object.defineProperty(DetailDialog,"controlTemplate",{get:function(){DetailDialog._ctrlTemplate||(DetailDialog._ctrlTemplate='<div><div class="'+exports.DetailDialogClsNames.dialogHeader+'"><span wj-part="g-hdr">Detail View:</span> <span wj-part="sp-cnt"></span></div><div class="'+exports.DetailDialogClsNames.dialogBody+'"><div wj-part="div-summary" class="'+exports.DetailDialogClsNames.summary+'"></div><div wj-part="div-grid"></div></div><div class="'+exports.DetailDialogClsNames.dialogFooter+'"><button wj-part="btn-ok"class="'+wijmo_1.UtilitesClsNames.hide+" "+wijmo_1.InputFormElementsClsNames.btn+'">OK</button> </div></div>');return DetailDialog._ctrlTemplate},set:function(e){DetailDialog._ctrlTemplate=e},enumerable:!0,configurable:!0});DetailDialog.prototype.showDetail=function(e,t){var i=this,o=e.getDetailView(t.row,t.col);this._g.itemsSource=o;var n=wijmo_1.tryCast(o,"IPagedCollectionView");this._updateDetailCount(n?n.totalItemCount:o.items.length);o.collectionChanged.addHandler((function(){i._updateDetailCount(o.items.length)}));var r=e.engine,s=wijmo_1.culture.olap.DetailDialog,l="";this._gHdr.textContent=s.header;this._btnOK.textContent=s.ok;var a=e.rows[t.row].dataItem[_PivotKey._ROW_KEY_NAME];this._rowHdr=wijmo_1.escapeHtml(this._getHeader(a));this._rowHdr&&(l+=s.row+": <b>"+this._rowHdr+"</b><br>");var d=r._getKey(e.columns[t.col].binding);this._colHdr=wijmo_1.escapeHtml(this._getHeader(d));this._colHdr&&(l+=s.col+": <b>"+this._colHdr+"</b><br>");var h=r.valueFields,u=h[t.col%h.length],_=e.getCellData(t.row,t.col,!0);this._cellHdr=wijmo_1.escapeHtml(u.header);this._cellValue=wijmo_1.escapeHtml(_);l+=this._cellHdr+": <b>"+this._cellValue+"</b>";this._dSummary.innerHTML=l};Object.defineProperty(DetailDialog.prototype,"rowHeader",{get:function(){return this._rowHdr},enumerable:!0,configurable:!0});Object.defineProperty(DetailDialog.prototype,"columnHeader",{get:function(){return this._colHdr},enumerable:!0,configurable:!0});Object.defineProperty(DetailDialog.prototype,"cellHeader",{get:function(){return this._cellHdr},enumerable:!0,configurable:!0});Object.defineProperty(DetailDialog.prototype,"cellValue",{get:function(){return this._cellValue},enumerable:!0,configurable:!0});Object.defineProperty(DetailDialog.prototype,"detailCount",{get:function(){return this._detailCount},enumerable:!0,configurable:!0});DetailDialog.prototype._updateDetailCount=function(e){var t=wijmo_1.culture.olap.DetailDialog;this._sCnt.textContent=wijmo_1.format(1==e?t.item:t.items,{cnt:e});this._detailCount=e};DetailDialog.prototype._getHeader=function(e){if(e&&e.values&&e.values.length){for(var t=[],i=0;i<e.values.length;i++)t.push(e.getValue(i,!0));return t.join(" - ")}return null};DetailDialog._ctrlTemplate="";return DetailDialog}(wijmo_input_1.Popup);exports.DetailDialog=DetailDialog;var PivotChartType,LegendVisibility,_PivotMergeManager=function(e){__extends(_PivotMergeManager,e);function _PivotMergeManager(){return null!==e&&e.apply(this,arguments)||this}_PivotMergeManager.prototype.getMergedRange=function(e,t,i,o){void 0===o&&(o=!0);return this._getMergedRange(e,t,i,o)};_PivotMergeManager.prototype._getMergedRange=function(t,i,o,n,r){void 0===n&&(n=!0);void 0===r&&(r=!0);var s=t.grid.collectionView;this._ng=s instanceof PivotCollectionView?s.engine:null;if(!this._ng)return e.prototype._getMergedRange.call(this,t,i,o,n,r);if(i<0||i>=t.rows.length||o<0||o>=t.columns.length)return null;var l=t.grid.allowMerging,a=wijmo_grid_1.AllowMerging;switch(t.cellType){case wijmo_grid_1.CellType.TopLeft:return 0!=(l&a.AllHeaders)?this._getMergedTopLeftRange(t,i,o):null;case wijmo_grid_1.CellType.RowHeader:return 0!=(l&a.RowHeaders)?this._getMergedRowHeaderRange(t,i,o,n?t.viewRange:null):null;case wijmo_grid_1.CellType.ColumnHeader:return 0!=(l&a.ColumnHeaders)?this._getMergedColumnHeaderRange(t,i,o,n?t.viewRange:null):null}return null};_PivotMergeManager.prototype._getMergedTopLeftRange=function(e,t,i){var o=new wijmo_grid_1.CellRange(t,i),n=e.grid;if(n.outlineMode&&n.showRowFieldHeaders&&o.row==e.rows.length-1){o.col=0;o.col2=e.columns.length-1;return o}for(;o.col>0&&!e.getCellData(t,o.col,!0);)o.col--;for(;o.col2<e.columns.length-1&&!e.getCellData(t,o.col2+1,!0);)o.col2++;return o.isSingleCell?null:o};_PivotMergeManager.prototype._getMergedRowHeaderRange=function(e,t,i,o){var n=e.grid,r=e.columns[i],s=e.columns,l=e.rows;if(!r.allowMerging)return null;if(n.outlineMode){if(this._isSubtotal(e,t,i)||this._isSubtotal(e,t,i+1)){var a=this._getOutlineRange(e,t,i);return a.isSingleCell?null:a}if(i<e.columns.length-1){var d=n._getGroupedRows(new wijmo_grid_1.CellRange(t,i));return d.isSingleCell?null:d}return null}var h=this._ng._getRowLevel(t);if(h>-1&&i>=h){var u=e.getCellData(t,i,!1),_=void 0,c=void 0,p=0,g=s.length-1;if(i>=s._frozenInternal&&n._vtCols<s.length&&o){p=o.col;g=o.col2}for(_=i;_>p&&e.getCellData(t,_-1,!1)==u;_--);for(c=i;c<g&&e.getCellData(t,c+1,!1)==u;c++);return _!=c?new wijmo_grid_1.CellRange(t,_,t,c):null}var f,v,m=0,w=l.length-1;if(i>=l._frozenInternal&&n._vtRows<l.length&&o){m=o.row;w=o.row2}for(f=t;f>m&&this._sameColumnValues(e,t,f-1,i);f--);for(v=t;v<w&&this._sameColumnValues(e,t,v+1,i);v++);return f!=v?new wijmo_grid_1.CellRange(f,i,v,i):null};_PivotMergeManager.prototype._sameColumnValues=function(e,t,i,o){for(;o>=0;o--){if(e.getCellData(t,o,!1)!=e.getCellData(i,o,!1))return!1}return!0};_PivotMergeManager.prototype._isSubtotal=function(e,t,i){var o=e.rows[t].dataItem,n=o?o[_PivotKey._ROW_KEY_NAME]:null;return o&&i>n.values.length-1&&i<e.columns.length};_PivotMergeManager.prototype._getOutlineRange=function(e,t,i){var o=new wijmo_grid_1.CellRange(t,i);o.col2=e.columns.length-1;for(;o.col&&this._isSubtotal(e,t,o.col);)o.col--;return o};_PivotMergeManager.prototype._getMergedColumnHeaderRange=function(e,t,i,o){var n=e.columns[i],r=this._ng._getKey(n.binding),s=e.getCellData(t,i,!1),l=e.grid,a=e.columns,d=e.rows,h=this._ng._getColLevel(r);if(h>-1&&t>=h){var u=void 0,_=void 0,c=0,p=d.length-1;if(i>=d._frozenInternal&&l._vtRows<d.length&&o){c=o.row;p=o.row2}for(u=t;u>c&&e.getCellData(u-1,i,!1)==s;u--);for(_=t;_<p&&e.getCellData(_+1,i,!1)==s;_++);if(u!=_)return new wijmo_grid_1.CellRange(u,i,_,i)}if(o){i<e.columns._frozenInternal&&(o.col=o.col2=0);t<e.rows._frozenInternal&&(o.row=o.row2=0)}var g,f,v=0,m=a.length-1;if(i>=a._frozenInternal&&l._vtCols<a.length&&o){v=o.col;m=o.col2}for(g=i;g>v&&this._sameRowValues(e,t,i,g-1);g--);for(f=i;f<m&&this._sameRowValues(e,t,i,f+1);f++);return g!=f?new wijmo_grid_1.CellRange(t,g,t,f):null};_PivotMergeManager.prototype._sameRowValues=function(e,t,i,o){for(;t>=0;t--){if(e.getCellData(t,i,!1)!=e.getCellData(t,o,!1))return!1}return!0};return _PivotMergeManager}(wijmo_grid_1.MergeManager);exports._PivotMergeManager=_PivotMergeManager;!function(e){e[e.Column=0]="Column";e[e.Bar=1]="Bar";e[e.Scatter=2]="Scatter";e[e.Line=3]="Line";e[e.Area=4]="Area";e[e.Pie=5]="Pie"}(PivotChartType=exports.PivotChartType||(exports.PivotChartType={}));!function(e){e[e.Always=0]="Always";e[e.Never=1]="Never";e[e.Auto=2]="Auto"}(LegendVisibility=exports.LegendVisibility||(exports.LegendVisibility={}));var PivotChart=function(e){__extends(PivotChart,e);function PivotChart(t,i){var o=e.call(this,t)||this;o._chartType=PivotChartType.Column;o._showHierarchicalAxes=!0;o._showTotals=!1;o._showTitle=!0;o._showLegend=LegendVisibility.Always;o._legendPosition=wijmo_chart_1.Position.Right;o._maxSeries=PivotChart.MAX_SERIES;o._maxPoints=PivotChart.MAX_POINTS;o._stacking=wijmo_chart_1.Stacking.None;o._colItms=[];o._dataItms=[];o._lblsSrc=[];o._grpLblsSrc=[];wijmo_1.addClass(o.hostElement,exports.PivotChartClsNames.hostElement);o._isPieChart()?o._createFlexPie():o._createFlexChart();e.prototype.initialize.call(o,i);return o}PivotChart.prototype._getProductInfo=function(){return"D6F4,PivotChart"};Object.defineProperty(PivotChart.prototype,"engine",{get:function(){return this._ng},enumerable:!0,configurable:!0});Object.defineProperty(PivotChart.prototype,"itemsSource",{get:function(){return this._itemsSource},set:function(e){if(e&&this._itemsSource!==e){var t=this._itemsSource;e instanceof PivotPanel?e=e.engine.pivotView:e instanceof PivotEngine&&(e=e.pivotView);this._itemsSource=wijmo_1.asCollectionView(e);this._onItemsSourceChanged(t)}},enumerable:!0,configurable:!0});Object.defineProperty(PivotChart.prototype,"chartType",{get:function(){return this._chartType},set:function(e){if((e=wijmo_1.asEnum(e,PivotChartType))!=this._chartType){var t=this._chartType;this._chartType=e;this._changeChartType();e!==PivotChartType.Bar&&t!==PivotChartType.Bar||this._updatePivotChart()}},enumerable:!0,configurable:!0});Object.defineProperty(PivotChart.prototype,"showHierarchicalAxes",{get:function(){return this._showHierarchicalAxes},set:function(e){if(e!=this._showHierarchicalAxes){this._showHierarchicalAxes=wijmo_1.asBoolean(e,!0);!this._isPieChart()&&this._flexChart&&this._updateFlexChart(this._dataItms,this._lblsSrc,this._grpLblsSrc)}},enumerable:!0,configurable:!0});Object.defineProperty(PivotChart.prototype,"showTotals",{get:function(){return this._showTotals},set:function(e){if(e!=this._showTotals){this._showTotals=wijmo_1.asBoolean(e,!0);this._updatePivotChart()}},enumerable:!0,configurable:!0});Object.defineProperty(PivotChart.prototype,"showTitle",{get:function(){return this._showTitle},set:function(e){if(e!=this._showTitle){this._showTitle=wijmo_1.asBoolean(e,!0);this._updatePivotChart()}},enumerable:!0,configurable:!0});Object.defineProperty(PivotChart.prototype,"showLegend",{get:function(){return this._showLegend},set:function(e){if((e=wijmo_1.asEnum(e,LegendVisibility))!=this.showLegend){this._showLegend=e;this._updatePivotChart()}},enumerable:!0,configurable:!0});Object.defineProperty(PivotChart.prototype,"legendPosition",{get:function(){return this._legendPosition},set:function(e){if((e=wijmo_1.asEnum(e,wijmo_chart_1.Position))!=this.legendPosition){this._legendPosition=e;this._updatePivotChart()}},enumerable:!0,configurable:!0});Object.defineProperty(PivotChart.prototype,"stacking",{get:function(){return this._stacking},set:function(e){if((e=wijmo_1.asEnum(e,wijmo_chart_1.Stacking))!=this._stacking){this._stacking=e;if(this._flexChart){this._flexChart.stacking=this._stacking;this._updatePivotChart()}}},enumerable:!0,configurable:!0});Object.defineProperty(PivotChart.prototype,"maxSeries",{get:function(){return this._maxSeries},set:function(e){if(e!=this._maxSeries){this._maxSeries=wijmo_1.asNumber(e);this._updatePivotChart()}},enumerable:!0,configurable:!0});Object.defineProperty(PivotChart.prototype,"maxPoints",{get:function(){return this._maxPoints},set:function(e){if(e!=this._maxPoints){this._maxPoints=wijmo_1.asNumber(e);this._updatePivotChart()}},enumerable:!0,configurable:!0});Object.defineProperty(PivotChart.prototype,"flexChart",{get:function(){return this._flexChart},enumerable:!0,configurable:!0});Object.defineProperty(PivotChart.prototype,"flexPie",{get:function(){return this._flexPie},enumerable:!0,configurable:!0});Object.defineProperty(PivotChart.prototype,"header",{get:function(){return this._header},set:function(e){if(e!=this._header){this._header=wijmo_1.asString(e,!0);this.invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(PivotChart.prototype,"footer",{get:function(){return this._footer},set:function(e){if(e!=this._footer){this._footer=wijmo_1.asString(e,!0);this.invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(PivotChart.prototype,"headerStyle",{get:function(){return this._headerStyle},set:function(e){if(e!=this._headerStyle){this._headerStyle=e;this.invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(PivotChart.prototype,"footerStyle",{get:function(){return this._footerStyle},set:function(e){if(e!=this._footerStyle){this._footerStyle=e;this.invalidate()}},enumerable:!0,configurable:!0});PivotChart.prototype.refresh=function(t){void 0===t&&(t=!0);e.prototype.refresh.call(this,t);this._isPieChart()?this._flexPie&&this._flexPie.refresh(t):this._flexChart&&this._flexChart.refresh(t);this._updatePivotChart()};PivotChart.prototype.saveImageToDataUrl=function(e,t){this._isPieChart()?this._flexPie&&this._flexPie.saveImageToDataUrl(e,t):this._flexChart&&this._flexChart.saveImageToDataUrl(e,t)};PivotChart.prototype.saveImageToFile=function(e){this._isPieChart()?this._flexPie&&this._flexPie.saveImageToFile(e):this._flexChart&&this._flexChart.saveImageToFile(e)};PivotChart.prototype._onItemsSourceChanged=function(e){this._ng&&this._ng.updatedView.removeHandler(this._updatePivotChart,this);e&&e.collectionChanged.removeHandler(this._updatePivotChart,this);var t=this._itemsSource;this._ng=t instanceof PivotCollectionView?t.engine:null;this._ng&&this._ng.updatedView.addHandler(this._updatePivotChart,this);this._itemsSource&&this._itemsSource.collectionChanged.addHandler(this._updatePivotChart,this);this._updatePivotChart()};PivotChart.prototype._createFlexChart=function(){var e=this,t=document.createElement("div");this.hostElement.appendChild(t);this._flexChart=new wijmo_chart_1.FlexChart(t);this._flexChart._bindingSeparator=null;this._flexChart.legend.position=wijmo_chart_1.Position.Right;this._flexChart.bindingX=_PivotKey._ROW_KEY_NAME;this._flexChart.stacking=this._stacking;this._flexChart.tooltip.content=function(t){var i=t.name?"<b>"+t.name+"</b> <br/>":"";return i+=e._getLabel(t.x)+" "+e._getValue(t)};this._flexChart.hostElement.style.visibility="hidden"};PivotChart.prototype._createFlexPie=function(){var e=this,t=document.createElement("div");this.hostElement.appendChild(t);this._colMenu=new wijmo_input_1.MultiSelect(t,{displayMemberPath:"text",placeholder:wijmo_1.culture.olap.PivotPanel.cols,selectedValuePath:"prop",showSelectAllCheckbox:!0,keyActionPrintCharacters:0,keyActionTab:0});this._colMenu.hostElement.style.visibility="hidden";this._colMenu.checkedItemsChanged.addHandler((function(t,i){return e._updateFlexPieBinding()}));var i=document.createElement("div");this.hostElement.appendChild(i);this._flexPie=new wijmo_chart_1.FlexPie(i);this._flexPie.bindingName=_PivotKey._ROW_KEY_NAME;this._flexPie.tooltip.content=function(t){return"<b>"+e._getLabel(e._dataItms[t.pointIndex][_PivotKey._ROW_KEY_NAME])+"</b> <br/>"+e._getValue(t)};this._flexPie.rendering.addHandler(this._updatePieInfo,this)};PivotChart.prototype._updatePivotChart=function(){if(this._ng&&this._ng.pivotView){for(var e,t=[],i=[],o=[],n=0,r=this._ng.pivotView,s=this._ng.rowFields,l=0;l<r.items.length;l++){var a=r.items[l],d=a.$rowKey;0==l&&this._getColumns(a);if(t.length>=this._maxPoints)break;if(!this._isTotalRow(a[_PivotKey._ROW_KEY_NAME])){t.push(a);i.push({value:t.length-1,text:this._getLabel(a[_PivotKey._ROW_KEY_NAME])});for(var h=0;h<s.length;h++){o.length<=h&&o.push([]);if(this._getMergeIndex(d,e)<h){n=o[h].length-1;var u=o[h][n];0===n&&h<s.length-1&&(u.value=(u.width-1)/2);if(n>0&&h<s.length-1){var _=this._getOffsetWidth(o[h]);u.value=_+(u.width-1)/2}o[h].push({value:t.length-1,text:d.getValue(h,!0),width:1})}else{n=o[h].length-1;o[h][n].width++}}e=d}}for(h=0;h<s.length;h++)if(h<o.length){n=o[h].length-1;o[h][n].value=this._getOffsetWidth(o[h])+(o[h][n].width-1)/2}this._dataItms=t;this._lblsSrc=i;this._grpLblsSrc=o;this._updateFlexChartOrPie()}};PivotChart.prototype._updateFlexChartOrPie=function(){var e=this._isPieChart();!e&&this._flexChart?this._updateFlexChart(this._dataItms,this._lblsSrc,this._grpLblsSrc):e&&this._flexPie&&this._updateFlexPie(this._dataItms,this._lblsSrc)};PivotChart.prototype._updateFlexChart=function(e,t,i){var o,n=this._flexChart,r=n?n.hostElement:null;if(this._ng&&n&&r){n.beginUpdate();n.itemsSource=e;this._createSeries();n.series&&n.series.length>0&&e.length>0?r.style.visibility="visible":r.style.visibility="hidden";n.header=this.header||this._getChartTitle();this.headerStyle&&(n.headerStyle=this.headerStyle);this.footer&&(n.footer=this.footer);this.footerStyle&&(n.footerStyle=this.footerStyle);if(this._isRotatedChart()){if(this._showHierarchicalAxes&&i.length>0){n.axisY.itemsSource=i[i.length-1];n.axisX.labelAngle=void 0;if(i.length>=2)for(var s=i.length-2;s>=0;s--)this._createGroupAxes(i[s])}else{n.axisY.labelAngle=void 0;n.axisY.itemsSource=t}n.axisX.itemsSource=void 0}else{if(this._showHierarchicalAxes&&i.length>0){n.axisX.itemsSource=i[i.length-1];if(i.length>=2)for(s=i.length-2;s>=0;s--)this._createGroupAxes(i[s])}else{n.axisX.labelAngle=void 0;n.axisX.itemsSource=t}n.axisY.itemsSource=void 0}n.axisX.labelPadding=6;n.axisY.labelPadding=6;if(this._isRotatedChart()){o=n.axisX;n.axisY.reversed=!0}else{o=n.axisY;n.axisY.reversed=!1}n.stacking!==wijmo_chart_1.Stacking.Stacked100pc&&this._ng.valueFields.length>0&&this._ng.valueFields[0].format?o.format=this._ng.valueFields[0].format:o.format="";n.legend.position=this._getLegendPosition();n.endUpdate()}};PivotChart.prototype._updateFlexPie=function(e,t){var i=this._flexPie,o=i?i.hostElement:null,n=this._colMenu;if(this._ng&&i&&o){this._colItms.length>0&&e.length>0?o.style.visibility="visible":o.style.visibility="hidden";i.beginUpdate();i.itemsSource=e;i.bindingName=_PivotKey._ROW_KEY_NAME;this._colItms&&this._colItms.length>0&&(i.binding=this._colItms[0].prop);i.header=this.header||this._getChartTitle();this.headerStyle&&(i.headerStyle=this.headerStyle);this.footer&&(i.footer=this.footer);this.footerStyle&&(i.footerStyle=this.footerStyle);i.legend.position=this._getLegendPosition();i.endUpdate();var r=this._getTitle(this._ng.columnFields);""!==r&&(r="<b>"+r+": </b>");if(this._colItms&&this._colItms.length>1&&e.length>0){n.hostElement.style.visibility="visible";n.itemsSource=this._colItms;n.checkedItems=[this._colItms[0]];n.invalidate()}else n.hostElement.style.visibility="hidden"}};PivotChart.prototype._getLegendPosition=function(){var e=this.legendPosition;if(this.showLegend==LegendVisibility.Never)e=wijmo_chart_1.Position.None;else if(this.showLegend==LegendVisibility.Auto&&this.flexChart&&this.flexChart.series){var t=0;this.flexChart.series.forEach((function(e){var i=e.visibility;e.name&&i!=wijmo_chart_1.SeriesVisibility.Hidden&&i!=wijmo_chart_1.SeriesVisibility.Plot&&t++}));t<2&&(e=wijmo_chart_1.Position.None)}return e};PivotChart.prototype._createSeries=function(){this._flexChart&&(this._flexChart.series.length=0);for(var e=1==this._ng.valueFields.length,t=0;t<this._colItms.length;t++){var i=new wijmo_chart_1.Series,o=this._colItms[t].prop,n=this._colItms[t].text;if(e){var r=n.lastIndexOf(";");r>-1&&(n=n.substr(0,r))}i.binding=o;i.name=n;this._flexChart.series.push(i)}};PivotChart.prototype._getColumns=function(e){var t,i=0;if(e){this._colItms=[];for(var o in e)if(e.hasOwnProperty(o)&&o!==_PivotKey._ROW_KEY_NAME&&i<this._maxSeries&&this._isValidColumn(o)){t=this._ng._getKey(o);this._getLabel(t);this._colItms.push({prop:o,text:this._getLabel(t)});i++}}};PivotChart.prototype._createGroupAxes=function(e){var t,i=this,o=this._flexChart,n=this._isRotatedChart()?o.axisY:o.axisX;if(e){(t=new wijmo_chart_1.Axis).labelAngle=0;t.labelPadding=6;t.position=this._isRotatedChart()?wijmo_chart_1.Position.Left:wijmo_chart_1.Position.Bottom;t.majorTickMarks=wijmo_chart_1.TickMark.None;t.itemsSource=e;t.reversed=n.reversed;t.axisLine=!1;t.itemFormatter=function(o,n){if(t._axrect){var r=.5*e.filter((function(e){return e.value==n.val}))[0].width;if(i._isRotatedChart()){var s=t.reversed?-1:1,l=t.convert(n.val+r)+5*s,a=t.convert(n.val-r)-5*s,d=t._axrect.left+t._axrect.width-5;o.drawLine(d,l,d,a,PivotChart.HRHAXISCSS);o.drawLine(d,l,d+5,l,PivotChart.HRHAXISCSS);o.drawLine(d,a,d+5,a,PivotChart.HRHAXISCSS);o.drawLine(d,n.pos.y,d-5,n.pos.y,PivotChart.HRHAXISCSS)}else{var h=t.convert(n.val-r)+5,u=t.convert(n.val+r)-5,_=t._axrect.top;o.drawLine(h,_,u,_,PivotChart.HRHAXISCSS);o.drawLine(h,_,h,_-5,PivotChart.HRHAXISCSS);o.drawLine(u,_,u,_-5,PivotChart.HRHAXISCSS);o.drawLine(n.pos.x,_,n.pos.x,_+5,PivotChart.HRHAXISCSS)}}return n};t.min=n.actualMin;t.max=n.actualMax;n.rangeChanged.addHandler((function(){isNaN(t.min)&&isNaN(n.actualMin)||t.min==n.actualMin||(t.min=n.actualMin);isNaN(t.max)&&isNaN(n.actualMax)||t.max==n.actualMax||(t.max=n.actualMax)}));var r=new wijmo_chart_1.Series;r.visibility=wijmo_chart_1.SeriesVisibility.Hidden;this._isRotatedChart()?r.axisY=t:r.axisX=t;o.series.push(r)}};PivotChart.prototype._updateFlexPieBinding=function(){var e="",t=[];this._colMenu.checkedItems.forEach((function(i){e.length>0&&(e+=",");e+=i.prop;t.push(i.text)}));this._flexPie.binding=e;this._flexPie.titles=t.length>1?t:null};PivotChart.prototype._updatePieInfo=function(){var e=this;this._flexPie&&(this._flexPie._labels=this._flexPie._labels.map((function(t,i){return e._lblsSrc[i].text})))};PivotChart.prototype._changeChartType=function(){var e=null;if(this.chartType===PivotChartType.Pie){this._flexPie||this._createFlexPie();this._updateFlexPie(this._dataItms,this._lblsSrc);this._swapChartAndPie(!1)}else{switch(this.chartType){case PivotChartType.Column:e=wijmo_chart_1.ChartType.Column;break;case PivotChartType.Bar:e=wijmo_chart_1.ChartType.Bar;break;case PivotChartType.Scatter:e=wijmo_chart_1.ChartType.Scatter;break;case PivotChartType.Line:e=wijmo_chart_1.ChartType.Line;break;case PivotChartType.Area:e=wijmo_chart_1.ChartType.Area}if(this._flexChart)"none"!==this._flexChart.hostElement.style.display&&e!==PivotChartType.Bar&&this._flexChart.chartType!==wijmo_chart_1.ChartType.Bar||this._updateFlexChart(this._dataItms,this._lblsSrc,this._grpLblsSrc);else{this._createFlexChart();this._updateFlexChart(this._dataItms,this._lblsSrc,this._grpLblsSrc)}this._flexChart.chartType=e;this._swapChartAndPie(!0)}};PivotChart.prototype._swapChartAndPie=function(e){var t=this;this._flexChart&&(this._flexChart.hostElement.style.display=e?"block":"none");this._flexPie&&(this._flexPie.hostElement.style.display=e?"none":"block");if(this._colMenu&&this._colMenu.hostElement){this._colMenu.hostElement.style.display=e?"none":"block";this._colMenu.hostElement.style.top="0";this._clearStyleTopTimer=setTimeout((function(){t._colMenu.hostElement.style.top=""}),0)}};PivotChart.prototype._getLabel=function(e){var t="";if(!e||!e.values)return t;var i=e.valueFields?e.valueField:null;switch(e.values.length){case 0:i&&(t+=i.header);break;case 1:t+=e.getValue(0,!0);i&&(t+="; "+i.header);break;default:for(var o=0;o<e.values.length;o++){o>0&&(t+="; ");t+=e.getValue(o,!0)}i&&(t+="; "+i.header)}return t};PivotChart.prototype._getValue=function(e){var t=this._ng.valueFields,i=e.series?e.series.chart.series.indexOf(e.series):0,o=i<t.length?t[i].format:t.length?t[0].format:"";return o?wijmo_1.Globalize.format(e.y,o):e._yfmt};PivotChart.prototype._getChartTitle=function(){if(!this.showTitle||!this._ng.valueFields.length)return null;var e=this._ng,t=this._getTitle(e.valueFields),i=this._getTitle(e.rowFields),o=this._getTitle(e.columnFields),n=t,r=wijmo_1.culture.olap.PivotChart;if(t&&this._dataItms.length>0){i&&(n+=wijmo_1.format(" {by} {rows}",{by:r.by,rows:i}));o&&(n+=wijmo_1.format(" {and} {cols}",{and:i?r.and:r.by,cols:o}))}return n};PivotChart.prototype._getTitle=function(e){for(var t="",i=0;i<e.length;i++){t.length>0&&(t+="; ");t+=e[i].header}return t};PivotChart.prototype._isValidColumn=function(e){var t=e.split(";"),i=this._showTotals;return 0===this._ng.columnFields.length||(t&&2===t.length?i:!(!t||t.length-2!==this._ng.columnFields.length)&&!i)};PivotChart.prototype._isTotalRow=function(e){return e.values.length<this._ng.rowFields.length};PivotChart.prototype._isPieChart=function(){return this._chartType==PivotChartType.Pie};PivotChart.prototype._isRotatedChart=function(){return!this._isPieChart()&&this._chartType==PivotChartType.Bar!==this._flexChart.rotated};PivotChart.prototype._getMergeIndex=function(e,t){var i=-1;if(null!=e&&null!=t&&e.values.length==t.values.length&&e.values.length==e.fields.length&&t.values.length==t.fields.length)for(var o=0;o<e.values.length;o++){if(e.getValue(o,!0)!=t.getValue(o,!0))return i;i=o}return i};PivotChart.prototype._getOffsetWidth=function(e){var t=0;if(e.length<=1)return t;for(var i=0;i<e.length-1;i++)t+=e[i].width;return t};PivotChart.prototype.dispose=function(){if(this._flexChart){this._flexChart.dispose();this._flexChart=null}if(this._flexPie){this._flexPie.dispose();this._flexPie=null}if(this._colMenu){this._colMenu.dispose();this._colMenu=null}if(this._clearStyleTopTimer){clearTimeout(this._clearStyleTopTimer);this._clearStyleTopTimer=null}this._ng&&this._ng.updatedView.removeHandler(this._updatePivotChart,this);this._itemsSource&&this._itemsSource.collectionChanged.removeHandler(this._updatePivotChart,this);e.prototype.dispose.call(this)};PivotChart.MAX_SERIES=100;PivotChart.MAX_POINTS=100;PivotChart.HRHAXISCSS=exports.PivotChartClsNames.hierarchicalAxesLine;return PivotChart}(wijmo_1.Control);exports.PivotChart=PivotChart;var _MdxQueryBuilder=function(){function _MdxQueryBuilder(e,t){this._ng=null;this._cubeName=null;this._ng=e;this._cubeName=t}_MdxQueryBuilder.prototype.buildQuery=function(){var e=new _TextBuilder,t=this.buildWhereSection(this._ng.valueFields);e.append("SELECT ",this.buildAxes()," FROM ",this.buildCubeName(),t);e.append(" CELL PROPERTIES VALUE, FORMAT_STRING");return e.toString()};_MdxQueryBuilder.prototype.buildWhereSection=function(e){var t=new _TextBuilder;if(1==e.length){t.append(this.buildSetForMeasuresShelf(e));t.wrap(" WHERE ","")}return t.toString()};_MdxQueryBuilder.prototype.buildCubeName=function(){var e=new _TextBuilder;e.append(this.buildSubcubeExpression());var t=e.length>0;t&&e.wrap("SELECT "," FROM ");e.append("[",this._cubeName,"]");t&&e.wrap("(",")");return e.toString()};_MdxQueryBuilder.prototype.buildSubcubeExpression=function(){var e=new _TextBuilder,t=this.getMeasureFilterExpressions(this._ng.valueFields),i=this.buildFilterAttributeSet(this._ng.filterFields),o=this.buildFilterAttributeSet(this._ng.rowFields,t),n=this.buildFilterAttributeSet(this._ng.columnFields,0==o.length?t:null);e.joinItemToList(i);e.joinItemToList(o);e.joinItemToList(n);if(e.length>0){e.wrap("(",")");e.append(" ON COLUMNS")}return e.toString()};_MdxQueryBuilder.prototype.buildFilterAttributeSet=function(e,t){for(var i=new _TextBuilder,o=0;o<e.length;o++){var n=e[o],r=this.buildFilterString(n,0==o?t:null);i.joinItemToList(r)}return i.toString()};_MdxQueryBuilder.prototype.buildFilterString=function(e,t){var i=new _TextBuilder;e.filter.isActive?e.filter.conditionFilter.isActive?i.append(this.getConditionFilterString(e,t)):e.filter.valueFilter.isActive&&i.append(this.getValueFilterString(e)):t&&i.append(this.getConditionFilterString(e,t));return i.toString()};_MdxQueryBuilder.prototype.getValueFilterString=function(e){var t=new _TextBuilder,i=e.filter.valueFilter,o=Object.keys(i.showValues).map((function(t){return e.key+".["+t+"]"}));t.append(o.join(","));t.length>0&&t.wrap("{","}");return t.toString()};_MdxQueryBuilder.prototype.getConditionFilterString=function(e,t){var i=new _TextBuilder,o=e.key+".LEVELS(1).ALLMEMBERS",n=e.filter.conditionFilter.condition1,r=e.filter.conditionFilter.condition2;if(n.isActive){i.append(this.getConditionFilterExpression(e,n));r.isActive&&i.append(e.filter.conditionFilter.and?" AND ":" OR ")}r.isActive&&i.append(this.getConditionFilterExpression(e,r));if(t&&t.length>0){i.length>0&&i.append(" AND ");i.append(t.join(" AND "))}i.length>0&&i.wrap("Filter("+o+",(","))");return i.toString()};_MdxQueryBuilder.prototype.getMeasureFilterExpressions=function(e){for(var t=[],i=0;i<e.length;i++){var o=new _TextBuilder,n=e[i],r=(n.dimensionType,DimensionType.Measure,n.filter.conditionFilter.condition1),s=n.filter.conditionFilter.condition2;if(r.isActive){o.append(this.getConditionFilterExpression(n,r));s.isActive&&o.append(n.filter.conditionFilter.and?" AND ":" OR ")}s.isActive&&o.append(this.getConditionFilterExpression(n,s));if(o.length>0){o.wrap("(",")");t.push(o.toString())}}return t};_MdxQueryBuilder.prototype.getConditionFilterExpression=function(e,t){if(!t.isActive)return"";var i=e.dimensionType==DimensionType.Measure,o=e.dataType==wijmo_1.DataType.Number,n=e.dataType==wijmo_1.DataType.Date,r=o||n?"member_value":"member_caption",s=i?e.key:e.key+".CurrentMember."+r,l=n?"CDate('"+wijmo_1.Globalize.formatDate(t.value,"d")+"')":t.value.toString(),a=new _TextBuilder;switch(t.operator){case wijmo_grid_filter_1.Operator.BW:a.append("(Left(",s,",",l.length.toString(),')="',l,'")');break;case wijmo_grid_filter_1.Operator.NBW:a.append("(Left(",s,",",l.length.toString(),')<>"',l,'")');break;case wijmo_grid_filter_1.Operator.EW:a.append("(Right(",s,",",l.length.toString(),')="',l,'")');break;case wijmo_grid_filter_1.Operator.NEW:a.append("(Right(",s,",",l.length.toString(),')<>"',l,'")');break;case wijmo_grid_filter_1.Operator.EQ:i||o||n?a.append("(",s,")=",l):a.append("(",s,')="',l,'"');break;case wijmo_grid_filter_1.Operator.NE:i||o||n?a.append("(",s,")<>",l):a.append("(",s,')<>"',l,'"');break;case wijmo_grid_filter_1.Operator.CT:a.append("(InStr(1,",s,',"',l,'")>0)');break;case wijmo_grid_filter_1.Operator.NC:a.append("(InStr(1,",s,',"',l,'")=0))');break;case wijmo_grid_filter_1.Operator.GT:a.append("(",s,")>",l);break;case wijmo_grid_filter_1.Operator.LT:a.append("(",s,")<",l);break;case wijmo_grid_filter_1.Operator.GE:a.append("(",s,")>=",l);break;case wijmo_grid_filter_1.Operator.LE:a.append("(",s,")<=",l)}return a.toString()};_MdxQueryBuilder.prototype.buildAxes=function(){var e=new _TextBuilder,t=this.buildSetForAttributesShelf(this._ng.rowFields);e.joinItemToList(t);this._ng.rowFields.length>0&&(this._ng.columnFields.length>0||this._ng.valueFields.length>1?e.append(" ON ROWS"):e.append(" ON COLUMNS"));t=this.buildSetForAttributesColumnShelf(this._ng.columnFields);e.joinItemToList(t);this._ng.columnFields.length>0&&e.append(" ON COLUMNS");if(this._ng.valueFields.length>1&&0==this._ng.columnFields.length){t=this.buildSetForMeasuresShelf(this._ng.valueFields);e.joinItemToList(t);e.append(" ON COLUMNS")}return e.toString()};_MdxQueryBuilder.prototype.buildSetForAttributesShelf=function(e){for(var t=new _TextBuilder,i=0;i<e.length;i++){var o=e[i];o.dimensionType!=DimensionType.Attribute&&o.dimensionType!=DimensionType.Hierarchy||t.joinItemToList(this.buildAttributeSetForAxis(o));i>0&&t.wrap("CrossJoin(",")")}t.wrap("NON EMPTY ","");return t.toString()};_MdxQueryBuilder.prototype.buildSetForAttributesColumnShelf=function(e){for(var t=new _TextBuilder,i=0;i<e.length;i++){var o=e[i];o.dimensionType!=DimensionType.Attribute&&o.dimensionType!=DimensionType.Hierarchy||t.joinItemToList(this.buildAttributeSetForAxis(o))}this._ng.valueFields.length>1&&e.length>0&&t.joinItemToList(this.buildSetForMeasuresShelf(this._ng.valueFields));(this._ng.valueFields.length>1&&e.length>0||e.length>1)&&t.wrap("CrossJoin(",")");t.wrap("NON EMPTY ","");return t.toString()};_MdxQueryBuilder.prototype.buildSetForMeasuresShelf=function(e){for(var t=new _TextBuilder,i=0;i<e.length;i++){var o=e[i];o.dimensionType!=DimensionType.Measure&&o.dimensionType!=DimensionType.Kpi||t.joinItemToList(this.buildMeasureSetForAxis(o))}t.wrap("{","}");return t.toString()};_MdxQueryBuilder.prototype.buildAttributeSetForAxis=function(e){var t=new _TextBuilder;if(e.dimensionType==DimensionType.Hierarchy){t.append(e.key);t.append(".ALLMEMBERS");t.wrap("{","}");t.wrap("HIERARCHIZE(",")")}return t.toString()};_MdxQueryBuilder.prototype.buildMeasureSetForAxis=function(e){var t=new _TextBuilder;e.dimensionType!=DimensionType.Measure&&e.dimensionType!=DimensionType.Kpi||t.append(e.key);return t.toString()};return _MdxQueryBuilder}();exports._MdxQueryBuilder=_MdxQueryBuilder;var _SqlServerConnection=function(e){__extends(_SqlServerConnection,e);function _SqlServerConnection(t,i){var o=e.call(this,t,i.url)||this;o._jsonResult=null;o._dataTypes=null;o._debug=!1;t.sortOnServer=!0;wijmo_1.assert(wijmo_1.isString(i.cube)&&!wijmo_1.isNullOrWhiteSpace(i.cube),"Cube name required.");o._cubeName=i.cube;o._catalogName=wijmo_1.isString(i.catalog)&&!wijmo_1.isNullOrWhiteSpace(i.catalog)?i.catalog:"";o._url=i.url;o._user=i.user;o._password=i.password;return o}_SqlServerConnection.prototype.getFields=function(){this._getSession();this._jsonResult=null;this._dataTypes=null;this._getProperties(this._token);this._getDimensions(this._token);this._endSession();return this._jsonResult};_SqlServerConnection.prototype.getOutputView=function(e){var t=this;this._ng.onUpdatingView(new ProgressEventArgs(0));var i=new _MdxQueryBuilder(this._ng,this._cubeName).buildQuery();this._jsonResult=[];this._getSession();this._execQuery(this._token,i,(function(i){wijmo_1.asFunction(e)(t._jsonResult);t._ng.onUpdatedView(new ProgressEventArgs(100))}))};_SqlServerConnection.prototype.getDetail=function(e,t){throw"getDetail method not supported"};_SqlServerConnection.prototype.getSortedKeys=function(e,t){var i=this,o=Object.keys(e);if(this._ng.sortOnServer){if(o.length>1){var n=t?this._ng.showRowTotals:this._ng.showColumnTotals,r=t?this._ng.rowFields.length:this._ng.columnFields.length,s=this._ng.valueFields.length;if(!this._ng.totalsBeforeData&&n!==ShowTotals.None){var l=-1,a=[],d=[];o.forEach((function(e){var o=i._getKeyLength(e,t);if(o===r)d.push(e);else if(o>=l)a.push(e);else{if(a.length>=s)for(var n=0;n<s;n++)d.push(a.pop());a.push(e)}l=o}));if(a.length>0){a.reverse();d=d.concat(a)}return d}}}else o.sort((function(e,t){return i._ng._keys[e].compareTo(i._ng._keys[t])}));return o};_SqlServerConnection.prototype._getSession=function(){var e=this,t=this._url;return wijmo_1.httpRequest(t,{async:!1,data:_ENV_SESSION,method:"POST",user:this._user,password:this._password,requestHeaders:{"Content-Type":"text/xml"},success:function(t){var i=t.responseXML.getElementsByTagName("Session");e._token=i[0].getAttribute("SessionId")},error:function(t){e._handleError("Begin Session",t)}})};_SqlServerConnection.prototype._endSession=function(){var e=this,t=this._url;return wijmo_1.httpRequest(t,{async:!1,data:_ENV_ENDSESSION(this._token),method:"POST",user:this._user,password:this._password,requestHeaders:{"Content-Type":"text/xml"},error:function(t){e._handleError("End Session",t)},complete:function(t){e._token=void 0}})};_SqlServerConnection.prototype._getProperties=function(e){var t=this,i=this._url;return wijmo_1.httpRequest(i,{async:!1,data:_ENV_PROPERTIES(e,this._catalogName,this._cubeName),method:"POST",user:this._user,password:this._password,requestHeaders:{"Content-Type":"text/xml"},success:function(e){for(var i={},o=e.responseXML.getElementsByTagName("row"),n=0;n<o.length;n++){var r=_getTagValue(o[n],"HIERARCHY_UNIQUE_NAME");switch(Number(_getTagValue(o[n],"DATA_TYPE"))){case 2:case 3:case 4:case 5:case 6:i[r]=wijmo_1.DataType.Number;break;case 7:i[r]=wijmo_1.DataType.Date}}t._dataTypes=i},error:function(e){t._handleError("Get Properties",e)}})};_SqlServerConnection.prototype._getDimensions=function(e){var t=this,i=this._url;return wijmo_1.httpRequest(i,{async:!1,data:_ENV_DIMENSIONS(e,this._catalogName,this._cubeName),method:"POST",user:this._user,password:this._password,requestHeaders:{"Content-Type":"text/xml"},success:function(i){for(var o=[],n=i.responseXML.getElementsByTagName("row"),r=0;r<n.length;r++){if("2"!==_getTagValue(n[r],"DIMENSION_TYPE")){var s=_getTagValue(n[r],"DIMENSION_UNIQUE_NAME"),l={header:_getTagValue(n[r],"DIMENSION_CAPTION"),dataType:wijmo_1.DataType.Object,dimensionType:DimensionType.Dimension,subFields:[]};t._getSubFolders(e,s,l);o.push(l)}else t._getMeasures(e,o)}var a={header:"KPIs",dataType:wijmo_1.DataType.Object,dimensionType:DimensionType.Kpi,subFields:[]};t._getKPIs(e,a);o.push(a);t._jsonResult=o},error:function(e){t._handleError("Get Dimensions",e)}})};_SqlServerConnection.prototype._getSubFolders=function(e,t,i){var o=this,n=this._url;wijmo_1.httpRequest(n,{async:!1,data:_ENV_HIERARCHIES(e,this._catalogName,this._cubeName,t),method:"POST",user:this._user,password:this._password,requestHeaders:{"Content-Type":"text/xml"},success:function(e){for(var t=e.responseXML.getElementsByTagName("row"),n=0;n<t.length;n++){var r={header:_getTagValue(t[n],"HIERARCHY_NAME"),binding:_getTagValue(t[n],"HIERARCHY_UNIQUE_NAME"),dataType:wijmo_1.DataType.String,dimensionType:DimensionType.Hierarchy};o._dataTypes[r.binding]&&(r.dataType=o._dataTypes[r.binding]);for(var s=_getTagValue(t[n],"HIERARCHY_DISPLAY_FOLDER").split("\\"),l=i,a=0;a<s.length;a++)if(""!=s[a]){var d={header:s[a],dataType:wijmo_1.DataType.Object,dimensionType:DimensionType.Folder,subFields:[]};if(_containsFolder(l,s[a]))l=_findSubFieldByName(l,s[a]);else{l.subFields.push(d);l=d}}l.subFields.push(r)}},error:function(e){o._handleError("Get Hierarchies",e)}})};_SqlServerConnection.prototype._getMeasures=function(e,t){var i=this,o=this._url;return wijmo_1.httpRequest(o,{async:!1,data:_ENV_MEASURES(e,this._catalogName,this._cubeName),method:"POST",user:this._user,password:this._password,requestHeaders:{"Content-Type":"text/xml"},success:function(e){for(var i=e.responseXML.getElementsByTagName("row"),o={},n=0;n<i.length;n++){var r=_getTagValue(i[n],"MEASUREGROUP_NAME"),s={header:_getTagValue(i[n],"MEASURE_CAPTION"),binding:_getTagValue(i[n],"MEASURE_UNIQUE_NAME"),dataType:wijmo_1.DataType.Number,dimensionType:DimensionType.Measure};if(Object.keys(o).indexOf(r)<0){var l={header:r,dataType:wijmo_1.DataType.Number,dimensionType:DimensionType.Measure,subFields:[]};l.subFields.push(s);t.push(l);o[r]=l}else o[r].subFields.push(s)}},error:function(e){i._handleError("Get Measures",e)}})};_SqlServerConnection.prototype._getKPIs=function(e,t){var i=this,o=this._url;return wijmo_1.httpRequest(o,{async:!1,data:_ENV_KPIS(e,this._catalogName,this._cubeName),method:"POST",user:this._user,password:this._password,requestHeaders:{"Content-Type":"text/xml"},success:function(e){for(var i=e.responseXML.getElementsByTagName("row"),o=0;o<i.length;o++){for(var n=_getTagValue(i[o],"KPI_DISPLAY_FOLDER").split("\\"),r=t,s=0;s<n.length;s++){var l={header:n[s],dataType:wijmo_1.DataType.Object,dimensionType:DimensionType.Folder,subFields:[]};if(_containsFolder(r,n[s]))r=_findSubFieldByName(r,n[s]);else{r.subFields.push(l);r=l}}var a={header:_getTagValue(i[o],"KPI_CAPTION"),binding:_getTagValue(i[o],"KPI_VALUE"),dataType:wijmo_1.DataType.Number,dimensionType:DimensionType.Kpi};r.subFields.push(a)}},error:function(e){i._handleError("Get KPIs",e)}})};_SqlServerConnection.prototype._execQuery=function(e,t,i){var o=this,n=this._url;return wijmo_1.httpRequest(n,{async:!0,data:_ENV_QUERY(e,this._catalogName,t),method:"POST",user:this._user,password:this._password,requestHeaders:{"Content-Type":"text/xml"},success:function(e){var n=e.responseXML,r=n.querySelector("Error");if(r){throw"SSAS Error\r\n"+r.getAttribute("Description")+"\r\n"+t}o._createPivotKeys(n);wijmo_1.asFunction(i)(e)},error:function(e){o._handleError("Execute Query",e)},complete:function(){o._endSession()}})};_SqlServerConnection.prototype._createPivotKeys=function(e){var t=null,i=null,o=e.querySelector("CellData");if(this._ng.columnFields.length>0||this._ng.valueFields.length>1){i=e.querySelector("Axis[name='Axis0']");this._ng.rowFields.length>0&&(t=e.querySelector("Axis[name='Axis1']"))}else this._ng.rowFields.length>0&&(t=e.querySelector("Axis[name='Axis0']"));var n=t&&this._ng.rowFields.length>0,r=i&&this._ng.columnFields.length>0;n&&r?this._createRowKeys(o,t,i):n?this._createRowOnlyKeys(o,t):r&&this._createColumnOnlyKeys(o,i)};_SqlServerConnection.prototype._createRowKeys=function(e,t,i){for(var o=t.getElementsByTagName("Tuple"),n=i.getElementsByTagName("Tuple"),r=this._ng.showRowTotals!==ShowTotals.None?0:1,s=this._ng.showColumnTotals!==ShowTotals.None?0:this._ng.valueFields.length,l=r;l<o.length;l++){var a=l*n.length,d=o[l],h=this._validateTuple(d,this._ng.showRowTotals);if(h)for(var u=s;u<n.length;u++){var _=n[u],c=this._validateTuple(_,this._ng.showColumnTotals);if(c){for(var p in h)c[p]=h[p];for(var g=0;g<this._ng.valueFields.length;g++){c[this._ng.valueFields[g].key]=_getCellValue(e,a+u+g)}this._jsonResult.push(c)}}}};_SqlServerConnection.prototype._createRowOnlyKeys=function(e,t){for(var i=t.getElementsByTagName("Tuple"),o=this._ng.valueFields.length,n=this._ng.showRowTotals!==ShowTotals.None?0:1,r=n*o,s=n;s<i.length;s++){var l=i[s],a=this._validateTuple(l,this._ng.showRowTotals);if(a){for(var d=0;d<this._ng.valueFields.length;d++){a[this._ng.valueFields[d].key]=_getCellValue(e,r++)}this._jsonResult.push(a)}else r++}};_SqlServerConnection.prototype._createColumnOnlyKeys=function(e,t){for(var i=t.getElementsByTagName("Tuple"),o=this._ng.valueFields.length,n=this._ng.showColumnTotals!==ShowTotals.None?0:1,r=n;r<i.length;r+=o){var s=i[r],l=this._validateTuple(s,this._ng.showColumnTotals);if(l){for(var a=0;a<this._ng.valueFields.length;a++){l[this._ng.valueFields[a].key]=_getCellValue(e,r-n+a)}this._jsonResult.push(l)}}};_SqlServerConnection.prototype._validateTuple=function(e,t){for(var i=e.getElementsByTagName("Member"),o=void 0,n={},r=0;r<i.length;r++){var s=i[r],l=_getLevelNumber(s),a=s.getAttribute("Hierarchy"),d=_getCaptionValue(s);if(0==r)o=l;else{if(l>o)return null;if(t!==ShowTotals.Subtotals&&l!==o&&"[Measures]"!==a)return null;o=l}a.indexOf(".")>=0?n[a]=d:null!==d&&(n[d]=null)}return n};return _SqlServerConnection}(_ServerConnection);exports._SqlServerConnection=_SqlServerConnection;function _getTagValue(e,t){var i=e.querySelector(t);return i?i.innerHTML||i.textContent:null}function _getLevelNumber(e){return Number(_getTagValue(e,"LNum"))}function _getCaptionValue(e){return _getLevelNumber(e)>0?_getTagValue(e,"Caption"):null}function _getCellValue(e,t){var i="Cell[CellOrdinal='"+t.toString()+"']",o=e.querySelector(i);if(o){var n=_getTagValue(o,"Value");if(n)return Number(n)}return null}function _findSubFieldByName(e,t){if(e.subFields)for(var i=0;i<e.subFields.length;i++){var o=e.subFields[i];if(o.header==t)return o}return e}function _containsFolder(e,t){if(e.subFields)for(var i=0;i<e.subFields.length;i++){if(e.subFields[i].header==t)return!0}return!1}var _ENV_SESSION='\n <Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">\n <Header>\n <BeginSession soap:mustUnderstand="1" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns="urn:schemas-microsoft-com:xml-analysis" />\n </Header>\n <Body>\n <Execute xmlns="urn:schemas-microsoft-com:xml-analysis">\n <Command>\n <Statement />\n </Command>\n <Properties>\n </Properties>\n </Execute>\n </Body>\n </Envelope>',_ENV_ENDSESSION=function(e){return'\n <Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">\n <Header>\n <XA:EndSession soap:mustUnderstand="1" SessionId="'+e+'" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:XA="urn:schemas-microsoft-com:xml-analysis" />\n </Header>\n <Body>\n <Execute xmlns="urn:schemas-microsoft-com:xml-analysis">\n <Command>\n <Statement />\n </Command>\n <Properties>\n </Properties>\n </Execute>\n </Body>\n </Envelope>'},_ENV_DIMENSIONS=function(e,t,i){return'\n <Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">\n <Header>\n <XA:Session soap:mustUnderstand="1" SessionId="'+e+'" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:XA="urn:schemas-microsoft-com:xml-analysis" />\n </Header>\n <Body>\n <Discover xmlns="urn:schemas-microsoft-com:xml-analysis">\n <RequestType>MDSCHEMA_DIMENSIONS</RequestType>\n <Restrictions>\n <RestrictionList>\n <CATALOG_NAME>'+t+"</CATALOG_NAME>\n <CUBE_NAME>"+i+"</CUBE_NAME>\n </RestrictionList>\n </Restrictions>\n <Properties>\n </Properties>\n </Discover>\n </Body>\n </Envelope>"},_ENV_HIERARCHIES=function(e,t,i,o){return'\n <Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">\n <Header>\n <XA:Session soap:mustUnderstand="1" SessionId="'+e+'" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:XA="urn:schemas-microsoft-com:xml-analysis" />\n </Header>\n <Body>\n <Discover xmlns="urn:schemas-microsoft-com:xml-analysis">\n <RequestType>MDSCHEMA_HIERARCHIES</RequestType>\n <Restrictions>\n <RestrictionList>\n <CATALOG_NAME>'+t+"</CATALOG_NAME>\n <CUBE_NAME>"+i+"</CUBE_NAME>\n <DIMENSION_UNIQUE_NAME>"+o+"</DIMENSION_UNIQUE_NAME>\n </RestrictionList>\n </Restrictions>\n <Properties>\n </Properties>\n </Discover>\n </Body>\n </Envelope>"},_ENV_MEASURES=function(e,t,i){return'\n <Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">\n <Header>\n <XA:Session soap:mustUnderstand="1" SessionId="'+e+'" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:XA="urn:schemas-microsoft-com:xml-analysis" />\n </Header>\n <Body>\n <Discover xmlns="urn:schemas-microsoft-com:xml-analysis">\n <RequestType>MDSCHEMA_MEASURES</RequestType>\n <Restrictions>\n <RestrictionList>\n <CATALOG_NAME>'+t+"</CATALOG_NAME>\n <CUBE_NAME>"+i+"</CUBE_NAME>\n </RestrictionList>\n </Restrictions>\n <Properties>\n </Properties>\n </Discover>\n </Body>\n </Envelope>"},_ENV_KPIS=function(e,t,i){return'\n <Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">\n <Header>\n <XA:Session soap:mustUnderstand="1" SessionId="'+e+'" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:XA="urn:schemas-microsoft-com:xml-analysis" />\n </Header>\n <Body>\n <Discover xmlns="urn:schemas-microsoft-com:xml-analysis">\n <RequestType>MDSCHEMA_KPIS</RequestType>\n <Restrictions>\n <RestrictionList>\n <CATALOG_NAME>'+t+"</CATALOG_NAME>\n <CUBE_NAME>"+i+"</CUBE_NAME>\n </RestrictionList>\n </Restrictions>\n <Properties>\n </Properties>\n </Discover>\n </Body>\n </Envelope>"},_ENV_LEVELS=function(e,t,i){return'\n <Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">\n <Header>\n <XA:Session soap:mustUnderstand="1" SessionId="'+e+'" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:XA="urn:schemas-microsoft-com:xml-analysis" />\n </Header>\n <Body>\n <Discover xmlns="urn:schemas-microsoft-com:xml-analysis">\n <RequestType>MDSCHEMA_LEVELS</RequestType>\n <Restrictions>\n <RestrictionList>\n <CATALOG_NAME>'+t+"</CATALOG_NAME>\n <CUBE_NAME>"+i+"</CUBE_NAME>\n </RestrictionList>\n </Restrictions>\n <Properties>\n </Properties>\n </Discover>\n </Body>\n </Envelope>"},_ENV_PROPERTIES=function(e,t,i){return'\n <Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">\n <Header>\n <XA:Session soap:mustUnderstand="1" SessionId="'+e+'" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:XA="urn:schemas-microsoft-com:xml-analysis" />\n </Header>\n <Body>\n <Discover xmlns="urn:schemas-microsoft-com:xml-analysis">\n <RequestType>MDSCHEMA_PROPERTIES</RequestType>\n <Restrictions>\n <RestrictionList>\n <CATALOG_NAME>'+t+"</CATALOG_NAME>\n <CUBE_NAME>"+i+"</CUBE_NAME>\n <PROPERTY_NAME>MEMBER_VALUE</PROPERTY_NAME>\n </RestrictionList>\n </Restrictions>\n <Properties>\n </Properties>\n </Discover>\n </Body>\n </Envelope>"},_ENV_QUERY=function(e,t,i){return'\n <Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">\n <Header>\n <XA:Session soap:mustUnderstand="1" SessionId="'+e+'" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:XA="urn:schemas-microsoft-com:xml-analysis" />\n </Header>\n <Body>\n <Execute xmlns="urn:schemas-microsoft-com:xml-analysis">\n <Command>\n <Statement>\n <![CDATA[\n '+i+"\n ]]>\n </Statement>\n </Command>\n <Properties>\n <PropertyList>\n <Catalog>"+t+"</Catalog>\n <Content>Data</Content>\n </PropertyList>\n </Properties>\n </Execute>\n </Body>\n </Envelope>"},PivotFilter=function(){function PivotFilter(e){this._fld=e;var t=e;this._valueFilter=new wijmo_grid_filter_1.ValueFilter(t);this._valueFilter.exclusiveValueSearch=this._fld.engine.exclusiveValueSearch;this._conditionFilter=new wijmo_grid_filter_1.ConditionFilter(t)}Object.defineProperty(PivotFilter.prototype,"filterType",{get:function(){return null!=this._filterType?this._filterType:this._fld.engine.defaultFilterType},set:function(e){if((e=wijmo_1.asEnum(e,wijmo_grid_filter_1.FilterType,!0))!=this._filterType){this._filterType=e;this.clear()}},enumerable:!0,configurable:!0});PivotFilter.prototype.apply=function(e){return this._conditionFilter.apply(e)&&this._valueFilter.apply(e)};Object.defineProperty(PivotFilter.prototype,"isActive",{get:function(){return this._conditionFilter.isActive||this._valueFilter.isActive},enumerable:!0,configurable:!0});PivotFilter.prototype.clear=function(){var e=!1;if(this._valueFilter.isActive){this._valueFilter.clear();e=!0}if(this._conditionFilter.isActive){this._valueFilter.clear();e=!0}e&&this._fld.onPropertyChanged(new wijmo_1.PropertyChangedEventArgs("filter",null,null))};Object.defineProperty(PivotFilter.prototype,"valueFilter",{get:function(){return this._valueFilter},enumerable:!0,configurable:!0});Object.defineProperty(PivotFilter.prototype,"conditionFilter",{get:function(){return this._conditionFilter},enumerable:!0,configurable:!0});return PivotFilter}();exports.PivotFilter=PivotFilter;var PivotFilterEditor=function(e){__extends(PivotFilterEditor,e);function PivotFilterEditor(t,i,o){var n=e.call(this,t)||this;n.finishEditing=new wijmo_1.Event;n.hostElement.tabIndex=-1;var r=n.getTemplate();n.applyTemplate(wijmo_1.ControlClsNames.hostElement+" "+wijmo_1.ControlClsNames.content+" "+exports.PivotFilterEditorClsNames.hostElement,r,{_divType:"div-type",_aVal:"a-val",_aCnd:"a-cnd",_divEdtVal:"div-edt-val",_divEdtCnd:"div-edt-cnd",_btnOk:"btn-ok"});wijmo_1.setText(n._aVal,wijmo_1.culture.FlexGridFilter.values);wijmo_1.setText(n._aCnd,wijmo_1.culture.FlexGridFilter.conditions);wijmo_1.setText(n._btnOk,wijmo_1.culture.olap.PivotFieldEditor.ok);var s=n._btnClicked.bind(n);n.addEventListener(n._btnOk,"click",s);n.addEventListener(n._aVal,"click",s);n.addEventListener(n._aCnd,"click",s);n.addEventListener(n.hostElement,"keydown",(function(e){switch(e.keyCode){case wijmo_1.Key.Enter:switch(e.target.tagName){case"A":case"BUTTON":n._btnClicked(e);break;default:n.onFinishEditing(new wijmo_1.CancelEventArgs)}e.preventDefault();break;case wijmo_1.Key.Escape:n.onFinishEditing(new wijmo_1.CancelEventArgs);e.preventDefault();break;case wijmo_1.Key.Tab:wijmo_1.moveFocus(n.hostElement,e.shiftKey?-1:1);e.preventDefault()}}));n._fld=i;n._uniqueValues=i.filter.valueFilter.uniqueValues;n.initialize(o);n.updateEditor();return n}Object.defineProperty(PivotFilterEditor,"controlTemplate",{get:function(){PivotFilterEditor._ctrlTemplate||(PivotFilterEditor._ctrlTemplate='<div><div wj-part="div-type" style="text-align:center;margin-bottom:12px;font-size:80%"><a wj-part="a-cnd" href="" tabindex="-1" draggable="false"></a> | <a wj-part="a-val" href="" tabindex="-1" draggable="false"></a></div><div wj-part="div-edt-val" tabindex="-1"></div><div wj-part="div-edt-cnd" tabindex="-1"></div><div style="text-align:right;margin-top:10px"><button wj-part="btn-ok" class="'+wijmo_1.InputFormElementsClsNames.btn+'"></button></div></div>');return PivotFilterEditor._ctrlTemplate},set:function(e){PivotFilterEditor._ctrlTemplate=e},enumerable:!0,configurable:!0});Object.defineProperty(PivotFilterEditor.prototype,"field",{get:function(){return this._fld},enumerable:!0,configurable:!0});Object.defineProperty(PivotFilterEditor.prototype,"filter",{get:function(){return this._fld?this._fld.filter:null},enumerable:!0,configurable:!0});Object.defineProperty(PivotFilterEditor.prototype,"isEditorClear",{get:function(){switch(this._getFilterType()){case wijmo_grid_filter_1.FilterType.Value:return!this._edtVal||this._edtVal.isEditorClear;case wijmo_grid_filter_1.FilterType.Condition:return!this._edtCnd||this._edtCnd.isEditorClear}wijmo_1.assert(!1,"unknown filter type?");return!1},enumerable:!0,configurable:!0});PivotFilterEditor.prototype.updateEditor=function(){var e=wijmo_grid_filter_1.FilterType,t=e.None;if(this.filter){t=this.filter.conditionFilter.isActive||0==(this.filter.filterType&e.Value)?e.Condition:e.Value;this._showFilter(t)}if(this._edtVal){var i=this._fld,o=i.engine;if(o.isServer&&!this._uniqueValues){var n=o._getUniqueValues(i);i.filter.valueFilter.uniqueValues=n}this._edtVal.updateEditor()}this._edtCnd&&this._edtCnd.updateEditor()};PivotFilterEditor.prototype.updateFilter=function(){switch(this._getFilterType()){case wijmo_grid_filter_1.FilterType.Value:this._edtVal.updateFilter();this.filter.conditionFilter.clear();break;case wijmo_grid_filter_1.FilterType.Condition:this._edtCnd.updateFilter();this.filter.valueFilter.clear()}this.field.onPropertyChanged(new wijmo_1.PropertyChangedEventArgs("filter",null,null))};PivotFilterEditor.prototype.clearEditor=function(){this._edtVal&&this._edtVal.clearEditor();this._edtCnd&&this._edtCnd.clearEditor()};PivotFilterEditor.prototype.onFinishEditing=function(e){this.finishEditing.raise(this,e);return!e.cancel};PivotFilterEditor.prototype._showFilter=function(e){e==wijmo_grid_filter_1.FilterType.Value&&null==this._edtVal&&(this._edtVal=new wijmo_grid_filter_1.ValueFilterEditor(this._divEdtVal,this.filter.valueFilter));e==wijmo_grid_filter_1.FilterType.Condition&&null==this._edtCnd&&(this._edtCnd=new wijmo_grid_filter_1.ConditionFilterEditor(this._divEdtCnd,this.filter.conditionFilter));if(0!=(e&this.filter.filterType))if(e==wijmo_grid_filter_1.FilterType.Value){this._divEdtVal.style.display="";this._divEdtCnd.style.display="none";this._enableLink(this._aVal,!1);this._enableLink(this._aCnd,!0)}else{this._divEdtVal.style.display="none";this._divEdtCnd.style.display="";this._enableLink(this._aVal,!0);this._enableLink(this._aCnd,!1)}switch(this.filter.filterType){case wijmo_grid_filter_1.FilterType.None:case wijmo_grid_filter_1.FilterType.Condition:case wijmo_grid_filter_1.FilterType.Value:this._divType.style.display="none";break;default:this._divType.style.display=""}};PivotFilterEditor.prototype._enableLink=function(e,t){e.style.textDecoration=t?"":"none";e.style.fontWeight=t?"":"bold";wijmo_1.setAttribute(e,"href",t?"":null)};PivotFilterEditor.prototype._getFilterType=function(){var e=wijmo_grid_filter_1.FilterType;return"none"!=this._divEdtVal.style.display?e.Value:e.Condition};PivotFilterEditor.prototype._btnClicked=function(e){e.preventDefault();e.stopPropagation();if(!wijmo_1.hasClass(e.target,wijmo_1.ControlStateClsNames.disabled))if(e.target!=this._aVal)if(e.target!=this._aCnd)this.onFinishEditing(new wijmo_1.CancelEventArgs);else{this._showFilter(wijmo_grid_filter_1.FilterType.Condition);wijmo_1.moveFocus(this._edtCnd.hostElement,0)}else{this._showFilter(wijmo_grid_filter_1.FilterType.Value);wijmo_1.moveFocus(this._edtVal.hostElement,0)}};PivotFilterEditor._ctrlTemplate="";return PivotFilterEditor}(wijmo_1.Control);exports.PivotFilterEditor=PivotFilterEditor;var PivotFieldEditor=function(e){__extends(PivotFieldEditor,e);function PivotFieldEditor(t,i){var o=e.call(this,t,null,!0)||this;o.hostElement.tabIndex=-1;var n=o.getTemplate();o.applyTemplate(wijmo_1.ControlClsNames.hostElement+" "+exports.PivotFieldEditorClsNames.hostElement,n,{_dBnd:"sp-bnd",_dHdr:"div-hdr",_dAgg:"div-agg",_dShw:"div-shw",_dWFl:"div-wfl",_dSrt:"div-srt",_btnFltEdt:"btn-flt-edt",_btnFltClr:"btn-flt-clr",_dFmt:"div-fmt",_dSmp:"div-smp",_btnApply:"btn-apply",_btnCancel:"btn-cancel",_gDlg:"g-dlg",_gHdr:"g-hdr",_gAgg:"g-agg",_gShw:"g-shw",_gWfl:"g-wfl",_gSrt:"g-srt",_gFlt:"g-flt",_gFmt:"g-fmt",_gSmp:"g-smp"});o._pvDate=new Date;var r=wijmo_1.culture.olap.PivotFieldEditor;wijmo_1.setText(o._gDlg,r.dialogHeader);wijmo_1.setText(o._gHdr,r.header);wijmo_1.setText(o._gAgg,r.summary);wijmo_1.setText(o._gShw,r.showAs);wijmo_1.setText(o._gWfl,r.weighBy);wijmo_1.setText(o._gSrt,r.sort);wijmo_1.setText(o._gFlt,r.filter);wijmo_1.setText(o._gFmt,r.format);wijmo_1.setText(o._gSmp,r.sample);wijmo_1.setText(o._btnFltEdt,r.edit);wijmo_1.setText(o._btnFltClr,r.clear);wijmo_1.setText(o._btnApply,r.ok);wijmo_1.setText(o._btnCancel,r.cancel);o._cmbHdr=new wijmo_input_1.ComboBox(o._dHdr,{keyActionPrintCharacters:0,keyActionTab:0});o._cmbAgg=new wijmo_input_1.ComboBox(o._dAgg,{keyActionPrintCharacters:0,keyActionTab:0});o._cmbShw=new wijmo_input_1.ComboBox(o._dShw,{keyActionPrintCharacters:0,keyActionTab:0});o._cmbWFl=new wijmo_input_1.ComboBox(o._dWFl,{keyActionPrintCharacters:0,keyActionTab:0});o._cmbSrt=new wijmo_input_1.ComboBox(o._dSrt,{keyActionPrintCharacters:0,keyActionTab:0});o._cmbFmt=new wijmo_input_1.ComboBox(o._dFmt,{keyActionPrintCharacters:0,keyActionTab:0});o._cmbSmp=new wijmo_input_1.ComboBox(o._dSmp,{keyActionPrintCharacters:0,keyActionTab:0});o._initAggregateOptions();o._initShowAsOptions();o._initFormatOptions();o._initSortOptions();o._updatePreview();o._cmbShw.textChanged.addHandler(o._updateFormat,o);o._cmbFmt.textChanged.addHandler(o._updatePreview,o);o.addEventListener(o._btnFltEdt,"click",(function(e){o._editFilter();e.preventDefault()}));o.addEventListener(o._btnFltClr,"click",(function(e){o._createFilterEditor();o._closeAndFocusTimer=setTimeout((function(){o._eFlt.clearEditor();o._btnFltEdt.focus();wijmo_1.enable(o._btnFltClr,!1)}));e.preventDefault()}));o.addEventListener(o._btnApply,"click",(function(e){o.updateField()}));o.initialize(i);return o}Object.defineProperty(PivotFieldEditor,"controlTemplate",{get:function(){PivotFieldEditor._ctrlTemplate||(PivotFieldEditor._ctrlTemplate='<div><div class="'+exports.DetailDialogClsNames.dialogHeader+'" tabindex="-1"><span wj-part="g-dlg"></span> <span wj-part="sp-bnd"></span></div><div class="'+exports.DetailDialogClsNames.dialogBody+'"><table style="table-layout:fixed"><tr><td wj-part="g-hdr"></td><td><div wj-part="div-hdr"></div></td></tr><tr class="'+wijmo_1.UtilitesClsNames.separator+'"><td wj-part="g-agg"></td><td><div wj-part="div-agg"></div></td></tr><tr class="'+wijmo_1.UtilitesClsNames.separator+'"><td wj-part="g-shw"></td><td><div wj-part="div-shw"></div></td></tr><tr><td wj-part="g-wfl"></td><td><div wj-part="div-wfl"></div></td></tr><tr><td wj-part="g-srt"></td><td><div wj-part="div-srt"></div></td></tr><tr class="'+wijmo_1.UtilitesClsNames.separator+'"><td wj-part="g-flt"></td><td><div><button wj-part="btn-flt-edt" class="'+wijmo_1.InputFormElementsClsNames.btn+'"></button> <button wj-part="btn-flt-clr" class="'+wijmo_1.InputFormElementsClsNames.btn+'"></button></div></td></tr><tr class="'+wijmo_1.UtilitesClsNames.separator+'"><td wj-part="g-fmt"></td><td><div wj-part="div-fmt"></div></td></tr><tr><td wj-part="g-smp"></td><td><div wj-part="div-smp" readonly tabindex="-1"></div></td></tr></table></div><div class="'+exports.DetailDialogClsNames.dialogFooter+'"><button wj-part="btn-apply" class="'+wijmo_1.InputFormElementsClsNames.btn+" "+wijmo_1.UtilitesClsNames.hide+'"></button> <button wj-part="btn-cancel" class="'+wijmo_1.InputFormElementsClsNames.btn+" "+wijmo_1.UtilitesClsNames.hide+'"></button></div></div>');return PivotFieldEditor._ctrlTemplate},set:function(e){PivotFieldEditor._ctrlTemplate=e},enumerable:!0,configurable:!0});Object.defineProperty(PivotFieldEditor.prototype,"field",{get:function(){return this._fld},set:function(e){if(e!=this._fld){this._fld=wijmo_1.asType(e,PivotField);this.updateEditor()}},enumerable:!0,configurable:!0});PivotFieldEditor.prototype.updateEditor=function(){var e=this._fld;if(e&&e.engine){this._dBnd.textContent=e.binding;this._cmbHdr.text=e.header;this._cmbAgg.collectionView.refresh();this._cmbAgg.selectedValue=e.aggregate;this._cmbSrt.selectedValue=e.descending;this._cmbShw.selectedValue=e.showAs;this._initWeighByOptions();var t=e.engine.defaultFilterType!=wijmo_grid_filter_1.FilterType.None&&(null!=e.binding||wijmo_1.isFunction(e.getValue));wijmo_1.enable(this._btnFltEdt,t);wijmo_1.enable(this._btnFltClr,t&&e.filter.isActive);this._cmbFmt.collectionView.refresh();this._cmbFmt.selectedValue=e.format;this._cmbFmt.selectedValue||(this._cmbFmt.text=e.format);var i=e instanceof CubePivotField;this._cmbAgg.isDisabled=i||!!e.getAggregateValue;this._cmbWFl.isDisabled=i}};PivotFieldEditor.prototype.updateField=function(){var e=this._fld;if(e){var t=this._cmbHdr.text.trim();e.header=t||wijmo_1.toHeaderCase(e.binding);e.aggregate=this._cmbAgg.selectedValue;e.showAs=this._cmbShw.selectedValue;e.weightField=this._cmbWFl.selectedValue;e.descending=this._cmbSrt.selectedValue;var i=e.format;e.format=this._cmbFmt.selectedValue||this._cmbFmt.text;var o=this._eFlt;if(o){o.updateFilter();var n=e.dataType==wijmo_1.DataType.Number,r=e.dataType==wijmo_1.DataType.Date;if(i!=e.format&&(n||r)){var s=e.filter.valueFilter;if(s&&s.isActive&&!s.dataMap){var l={};if(n)for(var a in s.showValues){var d=wijmo_1.Globalize.parseFloat(a);l[wijmo_1.Globalize.format(d,e.format)]=!0}else if(r)for(var a in s.showValues){d=wijmo_1.Globalize.parseDate(a,i);l[wijmo_1.Globalize.format(d,e.format)]=!0}s.showValues=l}}}}};PivotFieldEditor.prototype._initAggregateOptions=function(){var e=this,t=wijmo_1.culture.olap.PivotFieldEditor.aggs,i=wijmo_1.Aggregate,o=[{key:t.sum,val:i.Sum,all:!1},{key:t.cnt,val:i.Cnt,all:!0},{key:t.avg,val:i.Avg,all:!1},{key:t.max,val:i.Max,all:!0},{key:t.min,val:i.Min,all:!0},{key:t.rng,val:i.Rng,all:!1},{key:t.std,val:i.Std,all:!1},{key:t.var,val:i.Var,all:!1},{key:t.stdp,val:i.StdPop,all:!1},{key:t.varp,val:i.VarPop,all:!1},{key:t.first,val:i.First,all:!0},{key:t.last,val:i.Last,all:!0}];this._cmbAgg.itemsSource=o;this._cmbAgg.collectionView.filter=function(t){if(t&&t.all)return!0;if(e._fld){var i=e._fld.dataType;return i==wijmo_1.DataType.Number||i==wijmo_1.DataType.Boolean}return!1};this._cmbAgg.initialize({displayMemberPath:"key",selectedValuePath:"val"})};PivotFieldEditor.prototype._initShowAsOptions=function(){var e=wijmo_1.culture.olap.PivotFieldEditor.calcs,t=[{key:e.noCalc,val:ShowAs.NoCalculation},{key:e.dRow,val:ShowAs.DiffRow},{key:e.dRowPct,val:ShowAs.DiffRowPct},{key:e.dCol,val:ShowAs.DiffCol},{key:e.dColPct,val:ShowAs.DiffColPct},{key:e.dPctGrand,val:ShowAs.PctGrand},{key:e.dPctRow,val:ShowAs.PctRow},{key:e.dPrevRow,val:ShowAs.PctPrevRow},{key:e.dPctCol,val:ShowAs.PctCol},{key:e.dPrevCol,val:ShowAs.PctPrevCol},{key:e.dRunTot,val:ShowAs.RunTot},{key:e.dRunTotPct,val:ShowAs.RunTotPct}];this._cmbShw.itemsSource=t;this._cmbShw.initialize({displayMemberPath:"key",selectedValuePath:"val"})};PivotFieldEditor.prototype._initFormatOptions=function(){var e=this,t=wijmo_1.culture.olap.PivotFieldEditor.formats,i=[{key:t.n0,val:"n0",all:!0},{key:t.n2,val:"n2",all:!0},{key:t.c,val:"c",all:!0},{key:t.p0,val:"p0",all:!0},{key:t.p2,val:"p2",all:!0},{key:t.n2c,val:"n2,",all:!0},{key:t.n2cc,val:"n2,,",all:!0},{key:t.n2ccc,val:"n2,,,",all:!0},{key:t.d,val:"d",all:!1},{key:t.MMMMddyyyy,val:"MMMM dd, yyyy",all:!1},{key:t.dMyy,val:"d/M/yy",all:!1},{key:t.ddMyy,val:"dd/M/yy",all:!1},{key:t.dMyyyy,val:"dd/M/yyyy",all:!1},{key:t.MMMyyyy,val:"MMM yyyy",all:!1},{key:t.MMMMyyyy,val:"MMMM yyyy",all:!1},{key:t.yyyy,val:"yyyy",all:!1},{key:t.yyyyQq,val:'yyyy "Q"q',all:!1},{key:t.FYEEEEQU,val:'"FY"EEEE "Q"U',all:!1}];this._cmbFmt.itemsSource=i;this._cmbFmt.isEditable=!0;this._cmbFmt.isRequired=!1;this._cmbFmt.collectionView.filter=function(t){return!(!t||!t.all)||!!e._fld&&e._fld.dataType==wijmo_1.DataType.Date};this._cmbFmt.initialize({displayMemberPath:"key",selectedValuePath:"val"})};PivotFieldEditor.prototype._initWeighByOptions=function(){var e=this._fld;if(e){var t=[{key:wijmo_1.culture.olap.PivotFieldEditor.none,val:null}];e.engine.fields.forEach((function(i){i!=e&&i.dataType==wijmo_1.DataType.Number&&t.push({key:i.header,val:i})}));this._cmbWFl.initialize({displayMemberPath:"key",selectedValuePath:"val",itemsSource:t,selectedValue:e.weightField})}};PivotFieldEditor.prototype._initSortOptions=function(){var e=wijmo_1.culture.olap.PivotFieldEditor.sorts,t=[{key:e.asc,val:!1},{key:e.desc,val:!0}];this._cmbSrt.itemsSource=t;this._cmbSrt.initialize({displayMemberPath:"key",selectedValuePath:"val"})};PivotFieldEditor.prototype._updateFormat=function(){var e=ShowAs[this._cmbShw.selectedValue];this._cmbFmt.selectedValue=e.indexOf("Pct")>-1?"p0":"n0"};PivotFieldEditor.prototype._updatePreview=function(){var e=this._cmbFmt.selectedValue||this._cmbFmt.text,t=wijmo_1.Globalize.format,i="";if(e){var o=e[0].toLowerCase();i="nfgxc".indexOf(o)>-1?t(1234.5678,e):t("p"==o?.12345678:this._pvDate,e)}this._cmbSmp.text=i};PivotFieldEditor.prototype._editFilter=function(){this._createFilterEditor();wijmo_1.showPopup(this._dFlt,this._btnFltEdt,!1,!1,!1);wijmo_1.moveFocus(this._dFlt,0)};PivotFieldEditor.prototype._createFilterEditor=function(){var e=this;if(!this._dFlt){this._dFlt=document.createElement("div");this._eFlt=new PivotFilterEditor(this._dFlt,this._fld);wijmo_1.addClass(this._dFlt,wijmo_input_1.DropDownClsNames.dropDownPanel);this._lostFocusHandler=function(){e._closeFilterTimer=setTimeout((function(){var t=wijmo_1.Control.getControl(e._dFlt);t&&!t.containsFocus()&&e._closeFilter()}),10)};this._eFlt.lostFocus.addHandler(this._lostFocusHandler);this._eFlt.finishEditing.addHandler((function(){e._closeFilter();wijmo_1.enable(e._btnFltClr,!e._eFlt.isEditorClear)}))}};PivotFieldEditor.prototype._closeFilter=function(){if(this._dFlt){wijmo_1.hidePopup(this._dFlt,!0);this.focus()}};PivotFieldEditor.prototype.dispose=function(){if(this._closeFilterTimer){clearTimeout(this._closeFilterTimer);this._closeFilterTimer=null}this._cmbShw&&this._cmbShw.textChanged.removeHandler(this._updateFormat,this);this._cmbFmt&&this._cmbFmt.textChanged.removeHandler(this._updatePreview,this);if(this._eFlt){this._eFlt.dispose();this._eFlt=null}if(this._dFlt){this._dFlt.innerHTML="";this._dFlt=null}if(this._closeFilterTimer){clearTimeout(this._closeFilterTimer);this._closeFilterTimer=null}if(this._closeAndFocusTimer){clearTimeout(this._closeAndFocusTimer);this._closeAndFocusTimer=null}this.hostElement&&(this.hostElement[wijmo_1.Control._CTRL_KEY]=null);e.prototype.dispose.call(this)};PivotFieldEditor._ctrlTemplate="";return PivotFieldEditor}(wijmo_1.Control);exports.PivotFieldEditor=PivotFieldEditor;wijmo_1._registerModule("wijmo.olap",selfModule);var PivotFieldBinding=function(e){__extends(PivotFieldBinding,e);function PivotFieldBinding(t,i){var o=e.call(this,i)||this;o._fld=t;return o}PivotFieldBinding.prototype.getValue=function(t){var i=this._fld;return wijmo_1.isFunction(i.getValue)?i._getValue(t,!1):e.prototype.getValue.call(this,t)};return PivotFieldBinding}(wijmo_1.Binding);exports.PivotFieldBinding=PivotFieldBinding;
|
|
14
|
+
"use strict";var __extends=this&&this.__extends||function(){var extendStatics=function(e,t){return(extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(e,t)};return function(e,t){extendStatics(e,t);function __(){this.constructor=e}e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}}(),__importStar=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.hasOwnProperty.call(e,i)&&(t[i]=e[i]);t.default=e;return t};Object.defineProperty(exports,"__esModule",{value:!0});var wijmo_1=require("wijmo/wijmo"),wijmo_grid_filter_1=require("wijmo/wijmo.grid.filter"),wijmo_input_1=require("wijmo/wijmo.input"),wijmo_grid_1=require("wijmo/wijmo.grid"),wijmo_chart_1=require("wijmo/wijmo.chart"),selfModule=__importStar(require("wijmo/wijmo.olap")),_TextBuilder=function(){function _TextBuilder(){this._text=""}Object.defineProperty(_TextBuilder.prototype,"length",{get:function(){return this._text.length},enumerable:!0,configurable:!0});_TextBuilder.prototype.toString=function(){return this._text};_TextBuilder.prototype.append=function(){for(var e,t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];this._text=(e=this._text).concat.apply(e,t)};_TextBuilder.prototype.joinToList=function(e){for(var t,i=[],o=1;o<arguments.length;o++)i[o-1]=arguments[o];var n=i.join();this.length>0&&n.length>0?this._text=(t=this._text).concat.apply(t,[e].concat(i)):n.length>0&&(this._text=n)};_TextBuilder.prototype.joinItemToList=function(e){this.joinToList(",",e)};_TextBuilder.prototype.wrap=function(e,t){this.length>0&&(this._text=e.concat(this._text,t))};_TextBuilder.wrap=function(e,t,i){return t.length>0?e.concat(t,i):""};return _TextBuilder}();exports._TextBuilder=_TextBuilder;exports.DetailDialogClsNames={dialogBody:"wj-dialog-body",dialogFooter:"wj-dialog-footer",dialogHeader:"wj-dialog-header",hostElement:"wj-detaildialog",summary:"wj-summary"};exports.PivotChartClsNames={hierarchicalAxesLine:"wj-hierarchicalaxes-line",hostElement:"wj-pivotchart"};exports.PivotFieldEditorClsNames={hostElement:"wj-pivotfieldeditor"};exports.PivotFilterEditorClsNames={hostElement:"wj-pivotfiltereditor"};exports.PivotGridClsNames={colFieldHdr:"wj-col-field-hdr",hostElement:"wj-pivotgrid",pivotCollapse:"wj-pivot-collapse",rowFieldHdr:"wj-row-field-hdr"};exports.PivotPanelClsNames={aggregate:"wj-aggregate",header:"wj-header",hostElement:"wj-pivotpanel"};exports.SlicerClsNames={header:"wj-header",hostElement:"wj-slicer",noCheck:"wj-nocheck"};exports._GridContextMenuClsNames={hostElement:"wj-olap-context-menu"};var _Tally=function(){function _Tally(){this._cntAll=0;this._cnt=0;this._cntn=0;this._sum=0;this._sum2=0;this._min=null;this._max=null;this._first=null;this._last=null}_Tally.prototype.add=function(e,t){if(e instanceof _Tally){this._sum+=e._sum;this._sum2+=e._sum2;this._max=this._max&&e._max?Math.max(this._max,e._max):this._max||e._max;this._min=this._min&&e._min?Math.min(this._min,e._min):this._min||e._min;this._cnt+=e._cnt;this._cntn+=e._cntn;this._cntAll+=e._cntAll}else{this._cntAll++;if(null!=e){this._cnt++;wijmo_1.isBoolean(e)&&(e=e?1:0);(null==this._min||e<this._min)&&(this._min=e);(null==this._max||e>this._max)&&(this._max=e);null==this._first&&(this._first=e);this._last=e;if(wijmo_1.isNumber(e)&&!isNaN(e)){wijmo_1.isNumber(t)&&(e*=t);this._cntn++;this._sum+=e;this._sum2+=e*e}}}};_Tally.prototype.getAggregate=function(e){if(0==this._cnt)return null;var t=0==this._cntn?0:this._sum/this._cntn,i=wijmo_1.Aggregate;switch(e){case i.None:return null;case i.CntAll:return this._cntAll;case i.Avg:return t;case i.Cnt:return this._cnt;case i.Max:return this._max;case i.Min:return this._min;case i.Rng:return this._max-this._min;case i.Sum:return this._sum;case i.VarPop:return this._cntn<=1?0:this._sum2/this._cntn-t*t;case i.StdPop:return this._cntn<=1?0:Math.sqrt(this._sum2/this._cntn-t*t);case i.Var:return this._cntn<=1?0:(this._sum2/this._cntn-t*t)*this._cntn/(this._cntn-1);case i.Std:return this._cntn<=1?0:Math.sqrt((this._sum2/this._cntn-t*t)*this._cntn/(this._cntn-1));case i.First:return this._first;case i.Last:return this._last}throw"Invalid aggregate type."};return _Tally}();exports._Tally=_Tally;var _PivotKey=function(){function _PivotKey(e,t,i,o,n){this._fields=e;this._fieldCount=t;this._valueFields=i;this._valueFieldIndex=o;this._item=n}Object.defineProperty(_PivotKey.prototype,"fields",{get:function(){return this._fields},enumerable:!0,configurable:!0});Object.defineProperty(_PivotKey.prototype,"valueFields",{get:function(){return this._valueFields},enumerable:!0,configurable:!0});Object.defineProperty(_PivotKey.prototype,"valueField",{get:function(){return this._valueFields[this._valueFieldIndex]},enumerable:!0,configurable:!0});Object.defineProperty(_PivotKey.prototype,"values",{get:function(){if(null==this._vals){this._vals=new Array(this._fieldCount);for(var e=0;e<this._fieldCount;e++){var t=this._fields[e];this._vals[e]=t._getValue(this._item,!1)}}return this._vals},enumerable:!0,configurable:!0});Object.defineProperty(_PivotKey.prototype,"fieldNames",{get:function(){if(!this._names){this._names=[];for(var e=0;e<this.fields.length;e++){var t=this._fields[e];this._names.push(t._getName())}}return this._names},enumerable:!0,configurable:!0});Object.defineProperty(_PivotKey.prototype,"aggregate",{get:function(){var e=this._valueFields,t=this._valueFieldIndex;wijmo_1.assert(e&&t>-1&&t<e.length,"aggregate not available for this key");return e[t].aggregate},enumerable:!0,configurable:!0});_PivotKey.prototype.getValue=function(e,t){if(0==this.values.length)return wijmo_1.culture.olap.PivotEngine.grandTotal;if(e>this.values.length-1)return wijmo_1.culture.olap.PivotEngine.subTotal;var i=this.values[e];if(t&&!wijmo_1.isString(i)){var o=this.fields[e],n=o?o.format:"";i=wijmo_1.Globalize.format(this.values[e],n)}return i};Object.defineProperty(_PivotKey.prototype,"level",{get:function(){return this._fieldCount==this._fields.length?-1:this._fieldCount},enumerable:!0,configurable:!0});_PivotKey.prototype.compareTo=function(e){var t=0;if(null!=e&&e._fields==this._fields){for(var i=this.values,o=e.values,n=Math.min(i.length,o.length),r=0;r<n;r++){var s=null!=i[r]?wijmo_1.getType(i[r]):null,l=i[r],a=o[r],d=this._fields[r];if(d.sortComparer){t=d.sortComparer(l,a);if(wijmo_1.isNumber(t)){if(0!=t)return d.descending?-t:t;continue}}if(s==wijmo_1.DataType.Date){var h=d.format;if(h&&"d"!=h&&"D"!=h){var u=d._getValue(this._item,!0),_=d._getValue(e._item,!0),c=wijmo_1.Globalize.parseDate(u,h),p=wijmo_1.Globalize.parseDate(_,h);if(c&&p){l=c;a=p}else{l=u;a=_}}}if(!(l==a||wijmo_1.DateTime.equals(l,a))){if(null==l)return 1;if(null==a)return-1;t=l<a?-1:1;return d.descending?-t:t}}if(i.length==o.length&&0!=(t=this._valueFieldIndex-e._valueFieldIndex))return t;if(0!=(t=o.length-i.length))return t*(this.fields.engine.totalsBeforeData?-1:1)}return 0};_PivotKey.prototype.matchesItem=function(e){for(var t=0;t<this._vals.length;t++){if(this.getValue(t,!0)!=this._fields[t]._getValue(e,!0))return!1}return!0};_PivotKey.prototype.toString=function(e){if(!this._key||e){for(var t="",i=0;i<this._fieldCount;i++){var o=this._fields[i];t+=o._getName()+":"+o._getValue(this._item,!0)+";"}if(this._valueFields){t+=this._valueFields[this._valueFieldIndex]._getName()+":0;"}else t+="{total}";if(e)return t+e.toString();this._key=t}return this._key};_PivotKey._ROW_KEY_NAME="$rowKey";return _PivotKey}();exports._PivotKey=_PivotKey;var _NOT_EDITABLE="This collection is not editable.",PivotCollectionView=function(e){__extends(PivotCollectionView,e);function PivotCollectionView(t){var i=e.call(this)||this;i.canAddNew=i.canRemove=!1;i._ng=wijmo_1.asType(t,PivotEngine,!1);return i}Object.defineProperty(PivotCollectionView.prototype,"engine",{get:function(){return this._ng},enumerable:!0,configurable:!0});PivotCollectionView.prototype.implementsInterface=function(t){return"IEditableCollectionView"!=t&&e.prototype.implementsInterface.call(this,t)};PivotCollectionView.prototype.editItem=function(e){wijmo_1.assert(!1,_NOT_EDITABLE)};PivotCollectionView.prototype.addNew=function(){wijmo_1.assert(!1,_NOT_EDITABLE)};PivotCollectionView.prototype._performSort=function(e){var t=this._ng;if(t.sortableGroups&&t._getShowRowTotals()==ShowTotals.Subtotals){var i=0,o=e.length-1;0==this._getItemLevel(e[i])&&i++;0==this._getItemLevel(e[o])&&o--;this._sortGroups(e,1,i,o)}else this._sortData(e)};PivotCollectionView.prototype._performFilter=function(e){return this._ng&&0==this._ng.valueFields.length&&0==this._ng.rowFields.length?[]:this.canFilter&&this._filter?e.filter(this._filter,this):e};PivotCollectionView.prototype._getGroupRange=function(e,t){var i=this._ng,o=e.indexOf(t),n=o,r=this._getItemLevel(e[o]);if(i.totalsBeforeData)for(n=o;n<e.length-1;n++){if((s=this._getItemLevel(e[n+1]))>-1&&s<=r)break}else for(o=n;o;o--){var s;if((s=this._getItemLevel(e[o-1]))>-1&&s<=r)break}return[o,n]};PivotCollectionView.prototype._sortGroups=function(t,i,o,n){for(var r=[],s=o;s<=n;s++)this._getItemLevel(t[s])==i&&r.push(t[s]);if(r.length){e.prototype._performSort.call(this,r);var l=[];for(s=0;s<r.length;s++){for(var a=this._getGroupRange(t,r[s]),d=l.length,h=a[0];h<=a[1];h++)l.push(t[h]);var u=l.length-1;if(i<this._ng.rowFields.length-1)this._sortGroups(l,i+1,o+d,u);else{var _=this._ng.totalsBeforeData?1:0;this._sortSegment(l,d+_,u+_)}}for(s=0;s<l.length;s++)t[o+s]=l[s]}else this._sortData(t)};PivotCollectionView.prototype._sortSegment=function(t,i,o){var n=t.slice(i,o);e.prototype._performSort.call(this,n);for(var r=0;r<n.length;r++)t[i+r]=n[r]};PivotCollectionView.prototype._sortData=function(t){for(var i=0;i<t.length;i++)if(!(this._getItemLevel(t[i])>-1)){for(var o=i;o<t.length-1&&!(this._getItemLevel(t[o+1])>-1);o++);if(o>i){var n=t.slice(i,o+1);e.prototype._performSort.call(this,n);for(var r=0;r<n.length;r++)t[i+r]=n[r]}i=o}};PivotCollectionView.prototype._getItemLevel=function(e){return e[_PivotKey._ROW_KEY_NAME].level};return PivotCollectionView}(wijmo_1.CollectionView);exports.PivotCollectionView=PivotCollectionView;var PivotField=function(){function PivotField(e,t,i,o){this._isExplicitAggregate=!1;this.propertyChanged=new wijmo_1.Event;this._ng=e;this._binding=new PivotFieldBinding(this,t);this._header=i||wijmo_1.toHeaderCase(t);this._showAs=ShowAs.NoCalculation;this._isContentHtml=!1;this._visible=!0;this._format="";this._filter=new PivotFilter(this);wijmo_1.copy(this,o);null==this._dataType&&this._updateDataTypeByBinding();this._isExplicitAggregate||this._updateAggregateByDataType()}Object.defineProperty(PivotField.prototype,"binding",{get:function(){return this._binding?this._binding.path:null},set:function(e){if(e!=this.binding){var t=this.binding,i=wijmo_1.asString(e);this._binding=i?new PivotFieldBinding(this,i):null;if(null==this._dataType){this._updateDataTypeByBinding();this._isExplicitAggregate||this._updateAggregateByDataType()}var o=new wijmo_1.PropertyChangedEventArgs("binding",t,e);this.onPropertyChanged(o)}},enumerable:!0,configurable:!0});Object.defineProperty(PivotField.prototype,"getValue",{get:function(){return this._getValueFn},set:function(e){this._getValueFn=wijmo_1.asFunction(e,!0)},enumerable:!0,configurable:!0});Object.defineProperty(PivotField.prototype,"getAggregateValue",{get:function(){return this._getAggValueFn},set:function(e){this._getAggValueFn=wijmo_1.asFunction(e,!0)},enumerable:!0,configurable:!0});Object.defineProperty(PivotField.prototype,"header",{get:function(){return this._header},set:function(e){e=wijmo_1.asString(e,!1);var t=this._ng.fields.getField(e);!e||t&&t!=this?wijmo_1.assert(!1,"field headers must be unique and non-empty."):this._setProp("_header",wijmo_1.asString(e))},enumerable:!0,configurable:!0});Object.defineProperty(PivotField.prototype,"filter",{get:function(){return this._filter},enumerable:!0,configurable:!0});Object.defineProperty(PivotField.prototype,"aggregate",{get:function(){return this._aggregate},set:function(e){this._isExplicitAggregate=!0;this._setProp("_aggregate",wijmo_1.asEnum(e,wijmo_1.Aggregate))},enumerable:!0,configurable:!0});Object.defineProperty(PivotField.prototype,"showAs",{get:function(){return this._showAs},set:function(e){this._setProp("_showAs",wijmo_1.asEnum(e,ShowAs))},enumerable:!0,configurable:!0});Object.defineProperty(PivotField.prototype,"weightField",{get:function(){return this._weightField},set:function(e){this._setProp("_weightField",wijmo_1.asType(e,PivotField,!0))},enumerable:!0,configurable:!0});Object.defineProperty(PivotField.prototype,"dataType",{get:function(){return this._dataType},set:function(e){this._setProp("_dataType",wijmo_1.asEnum(e,wijmo_1.DataType))},enumerable:!0,configurable:!0});Object.defineProperty(PivotField.prototype,"isMeasure",{get:function(){return this._dataType==wijmo_1.DataType.Number},enumerable:!0,configurable:!0});Object.defineProperty(PivotField.prototype,"subFields",{get:function(){return this._subFields},enumerable:!0,configurable:!0});Object.defineProperty(PivotField.prototype,"format",{get:function(){return this._format},set:function(e){this._setProp("_format",wijmo_1.asString(e))},enumerable:!0,configurable:!0});Object.defineProperty(PivotField.prototype,"align",{get:function(){return this._align},set:function(e){this._setProp("_align",wijmo_1.asString(e))},enumerable:!0,configurable:!0});Object.defineProperty(PivotField.prototype,"width",{get:function(){return this._width},set:function(e){this._setProp("_width",wijmo_1.asNumber(e,!0,!0))},enumerable:!0,configurable:!0});Object.defineProperty(PivotField.prototype,"wordWrap",{get:function(){return this._wordWrap},set:function(e){this._setProp("_wordWrap",wijmo_1.asBoolean(e))},enumerable:!0,configurable:!0});Object.defineProperty(PivotField.prototype,"descending",{get:function(){return!!this._descending},set:function(e){this._setProp("_descending",wijmo_1.asBoolean(e))},enumerable:!0,configurable:!0});Object.defineProperty(PivotField.prototype,"isContentHtml",{get:function(){return this._isContentHtml},set:function(e){this._setProp("_isContentHtml",wijmo_1.asBoolean(e))},enumerable:!0,configurable:!0});Object.defineProperty(PivotField.prototype,"visible",{get:function(){return this._visible},set:function(e){this._setProp("_visible",wijmo_1.asBoolean(e))},enumerable:!0,configurable:!0});Object.defineProperty(PivotField.prototype,"sortComparer",{get:function(){return this._srtCmp},set:function(e){e!=this.sortComparer&&(this._srtCmp=wijmo_1.asFunction(e))},enumerable:!0,configurable:!0});Object.defineProperty(PivotField.prototype,"engine",{get:function(){return this._ng},enumerable:!0,configurable:!0});Object.defineProperty(PivotField.prototype,"collectionView",{get:function(){return this.engine?this.engine.collectionView:null},enumerable:!0,configurable:!0});Object.defineProperty(PivotField.prototype,"isActive",{get:function(){return this._getIsActive()},set:function(e){this._setIsActive(e)},enumerable:!0,configurable:!0});Object.defineProperty(PivotField.prototype,"parentField",{get:function(){return this._parent},enumerable:!0,configurable:!0});Object.defineProperty(PivotField.prototype,"key",{get:function(){return this.header},enumerable:!0,configurable:!0});PivotField.prototype.onPropertyChanged=function(e){this.propertyChanged.raise(this,e);this._ng._fieldPropertyChanged(this,e)};PivotField.prototype._updateDataTypeByBinding=function(){if(this._ng&&this._binding)for(var e=this._ng.collectionView,t=e?e.items.length:0,i=0;i<t;i++){var o=e.items[i];if(null!=o){this._dataType=wijmo_1.getType(this._binding.getValue(o));break}}};PivotField.prototype._updateAggregateByDataType=function(){this._aggregate=this.dataType==wijmo_1.DataType.Number?wijmo_1.Aggregate.Sum:wijmo_1.Aggregate.Cnt};PivotField.prototype._copy=function(e,t){var i=this;if("subFields"==e){this._subFields?this._subFields.splice(0,this._subFields.length):this._subFields=[];t&&t.length&&t.forEach((function(e){var t=i.engine._createField(e,i._autoGenerated);i._subFields.push(t)}));return!0}if("filter"==e){this._setFilterProxy(t);return!0}return!1};PivotField.prototype._getFilterProxy=function(){var e=this.filter;if(e.conditionFilter.isActive){var t=e.conditionFilter,i={condition1:{operator:t.condition1.operator,value:t.condition1.value},and:t.and,condition2:{operator:t.condition2.operator,value:t.condition2.value}};t.condition1.isActive||delete i.condition1;t.condition2.isActive||delete i.condition2;return i}if(e.valueFilter.isActive){var o=e.valueFilter;return{filterText:o.filterText,showValues:o.showValues}}wijmo_1.assert(!1,"inactive filters shouldn't be persisted.");return null};PivotField.prototype._setFilterProxy=function(e){var t=this.filter,i=t.conditionFilter,o=t.valueFilter;t.clear();e.conditionFilter?e=e.conditionFilter:e.valueFilter&&(e=e.valueFilter);if(e.condition1){var n=e.condition1,r=wijmo_1.changeType(n.value,this.dataType);i.condition1.value=r||n.value;i.condition1.operator=n.operator;var s=e.condition2;if(s){var l=wijmo_1.changeType(s.value,this.dataType);i.condition2.value=l||s.value;i.condition2.operator=s.operator}wijmo_1.isBoolean(e.and)&&(i.and=e.and)}if(e.showValues){o.filterText=e.filterText;o.showValues=e.showValues}};PivotField.prototype._getIsActive=function(){if(this._ng&&!this._hasSubFields())for(var e=this._ng._viewLists,t=0;t<e.length;t++)if(e[t].indexOf(this)>-1)return!0;return!1};PivotField.prototype._setIsActive=function(e){if(this._ng&&!this._hasSubFields()){var t=this.isActive;if((e=wijmo_1.asBoolean(e))!=t)if(e)this.isMeasure?this._ng.valueFields.push(this):this._ng.rowFields.push(this);else{for(var i=this._ng._viewLists,o=0;o<i.length;o++)for(var n=i[o],r=0;r<n.length;r++){if((l=n[r])==this||l.parentField==this){n.removeAt(r);r--}}var s=this._ng.fields;for(r=s.length-1;r>=0;r--){var l;if((l=s[r]).parentField==this){s.removeAt(r);r--}}}}};PivotField.prototype._hasSubFields=function(){return null!=this._subFields&&this._subFields.length>0};PivotField.prototype._clone=function(){var e=new PivotField(this._ng,this.binding);this._ng._copyProps(e,this,PivotField._props);e._autoGenerated=!0;e._parent=this;for(var t=this.header.replace(/\d+$/,""),i=2;;i++){var o=t+i.toString();if(null==this._ng.fields.getField(o)){e._header=o;break}}return e};PivotField.prototype._setProp=function(e,t,i){var o=this[e];if(t!=o){this[e]=t;var n=new wijmo_1.PropertyChangedEventArgs(e.substr(1),o,t);this.onPropertyChanged(n)}};PivotField.prototype._getName=function(){return this.header||this.binding};PivotField.prototype._getValue=function(e,t){var i=this._binding,o=null;e&&(o=wijmo_1.isFunction(this._getValueFn)?this._getValueFn.call(this,e):this._ng.isServer?e[this.key]:i._key?e[i._key]:i.getValue(e));return t&&"string"!=typeof o?wijmo_1.Globalize.format(o,this._format):o};PivotField.prototype._getWeight=function(e){var t=this._weightField?this._weightField._getValue(e,!1):null;return wijmo_1.isNumber(t)?t:null};PivotField._props=["dataType","format","width","wordWrap","aggregate","showAs","descending","isContentHtml","visible"];return PivotField}();exports.PivotField=PivotField;var DimensionType,CubePivotField=function(e){__extends(CubePivotField,e);function CubePivotField(t,i,o,n){var r=e.call(this,t,i,o,n)||this;wijmo_1.assert(null!=r.dimensionType,"CubePivotField objects must specify the field's dimensionType");return r}Object.defineProperty(CubePivotField.prototype,"header",{get:function(){return this._header},set:function(e){this._setProp("_header",wijmo_1.asString(e))},enumerable:!0,configurable:!0});Object.defineProperty(CubePivotField.prototype,"dimensionType",{get:function(){return this._dimensionType},set:function(e){this._setProp("_dimensionType",wijmo_1.asEnum(e,DimensionType,!1))},enumerable:!0,configurable:!0});Object.defineProperty(CubePivotField.prototype,"isMeasure",{get:function(){switch(this._dimensionType){case 1:case 2:case 8:return!0}return!1},enumerable:!0,configurable:!0});Object.defineProperty(CubePivotField.prototype,"key",{get:function(){return this.binding},enumerable:!0,configurable:!0});CubePivotField.prototype._clone=function(){throw"CubePivotField objects cannot be cloned"};return CubePivotField}(PivotField);exports.CubePivotField=CubePivotField;!function(e){e[e.Dimension=0]="Dimension";e[e.Measure=1]="Measure";e[e.Kpi=2]="Kpi";e[e.NameSet=3]="NameSet";e[e.Attribute=4]="Attribute";e[e.Folder=5]="Folder";e[e.Hierarchy=6]="Hierarchy";e[e.Date=7]="Date";e[e.Currency=8]="Currency"}(DimensionType=exports.DimensionType||(exports.DimensionType={}));var Slicer=function(e){__extends(Slicer,e);function Slicer(t,i){var o=e.call(this,t,null,wijmo_1.isIE()&&!wijmo_1.isEdge())||this;o._hdr=null;o._mSel=!1;o._updatingFilter=!1;o._propChanged=!1;o._fldPropChangeBnd=o._fldPropChange.bind(o);var n=o.getTemplate();o.applyTemplate(exports.SlicerClsNames.hostElement+" "+exports.SlicerClsNames.noCheck+" "+wijmo_1.ControlClsNames.hostElement+" "+wijmo_1.ControlClsNames.content,n,{_root:"root",_divHdr:"div-hdr",_divHdrText:"div-hdr-text",_btnMSel:"btn-msel",_btnClear:"btn-clear"});var r=wijmo_1.culture.olap.Slicer;o._tt=new wijmo_1.Tooltip;wijmo_1.setAttribute(o._btnMSel,"aria-label",r.multiSelect);wijmo_1.setAttribute(o._btnClear,"aria-label",r.clearFilter);o._tt.setTooltip(o._btnMSel,r.multiSelect);o._tt.setTooltip(o._btnClear,r.clearFilter);o.addEventListener(o._btnClear,"click",(function(e){o._clear()}));o.addEventListener(o._btnMSel,"click",(function(e){o.multiSelect=!o.multiSelect}));o.initialize(i);return o}Object.defineProperty(Slicer,"controlTemplate",{get:function(){Slicer._ctrlTemplate||(Slicer._ctrlTemplate='<div wj-part="root"><div wj-part="div-hdr" class="'+exports.SlicerClsNames.header+'"><div wj-part="div-hdr-text"></div><button wj-part="btn-msel" class="'+wijmo_1.InputFormElementsClsNames.btn+' btn-msel" tabindex="-1"><span class='+wijmo_1.GlyphClsNames.glyph+'>≡</span></button><button wj-part="btn-clear" class="'+wijmo_1.InputFormElementsClsNames.btn+' btn-clear" tabindex="-1"><span class='+wijmo_1.GlyphClsNames.glyph+">×</span></button></div></div>");return Slicer._ctrlTemplate},set:function(e){Slicer._ctrlTemplate=e},enumerable:!0,configurable:!0});Object.defineProperty(Slicer.prototype,"field",{get:function(){return this._fld},set:function(e){var t=this;if(e!=this._fld){if(this._divListBox){wijmo_1.removeChild(this._divListBox);this._divListBox=null;this._lbx.dispose();this._lbx=null}if(this._edt){this._clear();this._edt.dispose()}var i=this._fld;if(i){i.filter.filterType=this._originalFilterType;i.filter.valueFilter.uniqueValues=this._uniqueValues;i.propertyChanged.removeHandler(this._fldPropChangeBnd)}if(i=this._fld=wijmo_1.asType(e,PivotField,!0)){this._originalFilterType=i.filter.filterType;i.filter.filterType=wijmo_grid_filter_1.FilterType.Value;var o=i.engine;this._uniqueValues=i.filter.valueFilter.uniqueValues;if(o.isServer&&!this._uniqueValues){var n=o._getUniqueValues(i);i.filter.valueFilter.uniqueValues=n}i.propertyChanged.addHandler(this._fldPropChangeBnd);i.isActive||i.engine.filterFields.push(i);var r=document.createElement("div");this._edt=new wijmo_grid_filter_1.ValueFilterEditor(r,i.filter.valueFilter)}if(this._edt){this._divListBox=this._edt.hostElement.querySelector("."+wijmo_input_1.ListBoxClsNames.hostElement);this._root.appendChild(this._divListBox);this._lbx=wijmo_1.Control.getControl(this._divListBox);this._lbx.checkedItemsChanged.addHandler((function(e,o){if(!t._propChanged){var n=t._lbx.selectedItem;if(!t.multiSelect&&n){t._mSel=!0;t._lbx.checkedItems=[n];t._mSel=!1}}if(t._edt&&i){t._updateFilter();i.engine.invalidate()}}))}this._updateHeader();wijmo_1.isIE()&&!wijmo_1.isEdge()&&this.refresh()}},enumerable:!0,configurable:!0});Object.defineProperty(Slicer.prototype,"header",{get:function(){return this._hdr},set:function(e){if(e!=this._hdr){this._hdr=wijmo_1.asString(e);this._updateHeader()}},enumerable:!0,configurable:!0});Object.defineProperty(Slicer.prototype,"showHeader",{get:function(){return"none"!=this._divHdr.style.display},set:function(e){this._divHdr.style.display=wijmo_1.asBoolean(e)?"":"none"},enumerable:!0,configurable:!0});Object.defineProperty(Slicer.prototype,"showCheckboxes",{get:function(){return!wijmo_1.hasClass(this.hostElement,exports.SlicerClsNames.noCheck)},set:function(e){wijmo_1.toggleClass(this.hostElement,exports.SlicerClsNames.noCheck,!wijmo_1.asBoolean(e))},enumerable:!0,configurable:!0});Object.defineProperty(Slicer.prototype,"multiSelect",{get:function(){return this._mSel},set:function(e){this._mSel=wijmo_1.asBoolean(e);wijmo_1.toggleClass(this._btnMSel,wijmo_1.ControlStateClsNames.active,this._mSel)},enumerable:!0,configurable:!0});Slicer.prototype.refresh=function(t){var i=this;void 0===t&&(t=!0);wijmo_1.isIE()&&!wijmo_1.isEdge()&&this.hostElement&&(this._setCssTimer=setTimeout((function(){wijmo_1.setCss(i._lbx.hostElement,{height:i.hostElement.clientHeight-i._divHdr.offsetHeight})})));e.prototype.refresh.call(this,t)};Slicer.prototype._fldPropChange=function(e,t){this._propChanged=!0;switch(t.propertyName){case"header":this._updateHeader();break;case"format":case"binding":e.filter.clear();this._edt.updateEditor();break;case"filter":this._updatingFilter||this._edt.updateEditor()}this._propChanged=!1};Slicer.prototype._updateHeader=function(){var e=this._hdr;e||null==this._fld||(e=this._fld.header);this._divHdrText.textContent=e};Slicer.prototype._clear=function(){if(this._edt){this._edt.clearEditor(!1);this._updateFilter();this._fld.engine.invalidate()}};Slicer.prototype._updateFilter=function(){this._updatingFilter=!0;this._edt.updateFilter();this._updatingFilter=!1};Slicer.prototype.dispose=function(){if(this._tt){this._tt.dispose();this._tt=null}if(this._edt){this._edt.dispose();this._edt=null}if(this._lbx){this._lbx.dispose();this._lbx=null}if(this._setCssTimer){clearTimeout(this._setCssTimer);this._setCssTimer=null}this._fld&&this._fld.propertyChanged.removeHandler(this._fldPropChangeBnd);e.prototype.dispose.call(this)};Slicer._ctrlTemplate="";return Slicer}(wijmo_1.Control);exports.Slicer=Slicer;var _GridContextMenu=function(e){__extends(_GridContextMenu,e);function _GridContextMenu(){var t=e.call(this,document.createElement("div"),{header:"PivotGrid Context Menu",displayMemberPath:"text",commandParameterPath:"parm",command:{executeCommand:function(e){t._execute(e)},canExecuteCommand:function(e){return t._canExecute(e)}}})||this;t.itemsSource=t._getMenuItems();wijmo_1.addClass(t.dropDown,"context-menu "+exports._GridContextMenuClsNames.hostElement);return t}Object.defineProperty(_GridContextMenu,"controlTemplate",{get:function(){_GridContextMenu._ctrlTemplate||(_GridContextMenu._ctrlTemplate=wijmo_input_1.Menu.controlTemplate);return _GridContextMenu._ctrlTemplate},set:function(e){_GridContextMenu._ctrlTemplate=e},enumerable:!0,configurable:!0});_GridContextMenu.prototype.refresh=function(t){void 0===t&&(t=!0);this.itemsSource=this._getMenuItems();e.prototype.refresh.call(this,t)};_GridContextMenu.prototype.attach=function(e){var t=this;wijmo_1.assert(e instanceof PivotGrid,"Expecting a PivotGrid control...");var i=e.hostElement;this._gridOwner=i;this._contextMenuHandler=function(o){if(e.customContextMenu){o.preventDefault();t.owner=i;if(t._selectField(o)){var n=t.dropDown;t.selectedIndex=-1;if(t.onIsDroppedDownChanging(new wijmo_1.CancelEventArgs)){wijmo_1.showPopup(n,o);t.onIsDroppedDownChanged();n.focus()}}}};this._gridOwner.addEventListener("contextmenu",this._contextMenuHandler)};_GridContextMenu.prototype._selectField=function(e){this._targetField=null;this._htDown=null;var t=wijmo_1.Control.getControl(this.owner),i=t.engine,o=i.valueFields,n=i.columnFields,r=t.hitTest(e),s=wijmo_grid_1.CellType;switch(r.cellType){case s.Cell:t.select(r.range);this._targetField=o[r.col%o.length];this._htDown=r;break;case s.ColumnHeader:this._targetField=r.row<n.length?n[r.row]:o[r.col%o.length];break;case s.RowHeader:this._targetField=t._colRowFields.get(r.getColumn());break;case s.TopLeft:r.row==r.panel.rows.length-1&&(this._targetField=t._colRowFields.get(r.getColumn()))}return null!=this._targetField};_GridContextMenu.prototype._getMenuItems=function(){for(var e=[{text:'<div class="menu-icon menu-icon-remove">✖</div>Remove Field',parm:"remove"},{text:'<div class="menu-icon">⛭</div>Field Settings...',parm:"edit"},{text:'<div class="'+wijmo_1.UtilitesClsNames.separator+'"></div>'},{text:'<div class="menu-icon">⌕</div>Show Detail...',parm:"detail"}],t=0;t<e.length;t++){var i=e[t];if(i.parm){var o=wijmo_1.culture.olap._ListContextMenu[i.parm];wijmo_1.assert(o,"missing localized text for item "+i.parm);i.text=i.text.replace(/([^>]+$)/,o)}}return e};_GridContextMenu.prototype._execute=function(e){var t=this._targetField,i=wijmo_1.Control.getControl(this.owner),o=i?i.engine:null,n=this._htDown;switch(e){case"remove":o.removeField(t);break;case"edit":o.editField(t);break;case"detail":i.showDetail(n.row,n.col)}};_GridContextMenu.prototype._canExecute=function(e){var t=this._targetField,i=wijmo_1.Control.getControl(this.owner),o=i?i.engine:null,n=this._htDown;if(null==t||null==o)return!1;switch(e){case"remove":return!0;case"edit":return o.allowFieldEditing;case"detail":return null!=n&&!(t instanceof CubePivotField)&&o.valueFields.length>0}return!0};_GridContextMenu.prototype.dispose=function(){if(this._gridOwner){this._gridOwner.removeEventListener("contextmenu",this._contextMenuHandler);this._contextMenuHandler=null;this._gridOwner=null}this._targetField=null;this._htDown=null;this.command=null;this.itemsSource=null;e.prototype.dispose.call(this)};_GridContextMenu._ctrlTemplate="";return _GridContextMenu}(wijmo_input_1.Menu);exports._GridContextMenu=_GridContextMenu;var PivotFieldCollection=function(e){__extends(PivotFieldCollection,e);function PivotFieldCollection(t){var i=e.call(this)||this;i._ng=t;return i}Object.defineProperty(PivotFieldCollection.prototype,"maxItems",{get:function(){return this._maxItems},set:function(e){this._maxItems=wijmo_1.asInt(e,!0,!0)},enumerable:!0,configurable:!0});Object.defineProperty(PivotFieldCollection.prototype,"engine",{get:function(){return this._ng},enumerable:!0,configurable:!0});PivotFieldCollection.prototype.getField=function(e){return this._getField(this,e)};PivotFieldCollection.prototype._getField=function(e,t){for(var i=0;i<e.length;i++){var o=e[i];if(o.key==t)return o;if(o._hasSubFields()&&(o=this._getField(o.subFields,t)))return o}return null};PivotFieldCollection.prototype.push=function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];for(var o=this._ng,n=0;t&&n<t.length;n++){var r=t[n];wijmo_1.isString(r)&&(r=this==o.fields?new PivotField(o,r):o.fields.getField(r));wijmo_1.assert(r instanceof PivotField,"This collection must contain PivotField objects only.");if(r.key&&this.getField(r.key)){wijmo_1.assert(!1,"PivotField keys must be unique.");return-1}if(null!=this._maxItems&&this.length>=this._maxItems)break;e.prototype.push.call(this,r)}return this.length};return PivotFieldCollection}(wijmo_1.ObservableArray);exports.PivotFieldCollection=PivotFieldCollection;var _PivotNode=function(){function _PivotNode(e,t,i,o,n,r){this._key=new _PivotKey(e,t,i,o,n);this._nodes={};this._parent=r}_PivotNode.prototype.getNode=function(e,t,i,o,n){for(var r=this,s=0;s<t;s++){var l=e[s]._getValue(n,!0);if(!(a=r._nodes[l])){a=new _PivotNode(e,s+1,i,o,n,r);r._nodes[l]=a}r=a}if(i&&o>-1){var a;l=i[o].header;if(!(a=r._nodes[l])){a=new _PivotNode(e,t,i,o,n,r);r._nodes[l]=a}r=a}return r};Object.defineProperty(_PivotNode.prototype,"key",{get:function(){return this._key},enumerable:!0,configurable:!0});Object.defineProperty(_PivotNode.prototype,"parent",{get:function(){return this._parent},enumerable:!0,configurable:!0});Object.defineProperty(_PivotNode.prototype,"tree",{get:function(){this._tree||(this._tree=new _PivotNode(null,0,null,-1,null));return this._tree},enumerable:!0,configurable:!0});return _PivotNode}();exports._PivotNode=_PivotNode;var _ServerConnection=function(){function _ServerConnection(e,t){this._ng=wijmo_1.asType(e,PivotEngine);wijmo_1.assert(this._isValidUrl(t),"Invalid service Url: "+t+")")}_ServerConnection.prototype.getFields=function(){var e=this,t=null;wijmo_1.httpRequest(this._getUrl("Fields"),{async:!1,success:function(e){t=JSON.parse(e.responseText);wijmo_1.isArray(t)||console.error("Failed to get fields from server: "+e.responseText)},error:function(t){e._handleError("Getting Fields",t)}});return t};_ServerConnection.prototype.getUniqueValues=function(e){var t=this,i=null;wijmo_1.httpRequest(this._getUrl("UniqueValues",null,e.header),{method:"POST",async:!1,data:{view:this._ng.viewDefinition},success:function(e){i=JSON.parse(e.responseText);wijmo_1.isArray(i)||console.error("Failed to get unique field values from server: "+e.responseText)},error:function(e){t._handleError("Getting Unique Field Values",e)}});return i};_ServerConnection.prototype.getOutputView=function(e){var t=this;this.clearPendingRequests();this._sendHttpRequest("Analyses",{method:"POST",data:{view:this._ng.viewDefinition},success:function(i){var o=JSON.parse(i.responseText);t._token=o.token;t._start=Date.now();t._handleResult(o.status,e)},error:function(e){t._handleError("Analyses",e)}})};_ServerConnection.prototype.getDetail=function(e,t){for(var i,o=[],n=this._ng.rowFields.length,r=e?e.values.length:0,s=0;s<n;s++)s<r?o.push(_ServerConnection._getRequestedValue(e.values[s])):o.push(null);n=this._ng.columnFields.length;r=t?t.values.length:0;for(s=0;s<n;s++)s<r?o.push(_ServerConnection._getRequestedValue(t.values[s])):o.push(null);i=new wijmo_1.ObservableArray;this._loadArray("Detail",i,{method:"POST",view:this._ng.viewDefinition,keys:o,max:this._ng.serverMaxDetail});return i};_ServerConnection.prototype.getSortedKeys=function(e,t){var i=this,o=Object.keys(e);if(this._ng.sortOnServer){if(o.length>1){var n={},r=[],s=[];o.forEach((function(e){i._insertKey(n,e,t)}));this._reorderKeys(n,null,null,r,t);if(!t&&this._ng.valueFields.length>1){for(var l=r.length/this._ng.valueFields.length,a=r.length/l,d=0;d<l;d++)for(var h=0;h<a;h++)s.push(r[d+h*l]);return s}return r}}else o.sort((function(e,t){return i._ng._keys[e].compareTo(i._ng._keys[t])}));return o};_ServerConnection._getRequestedValue=function(e){if(wijmo_1.isDate(e)){var t=e;return new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()))}return e};_ServerConnection.prototype.clearPendingRequests=function(){this._clearRequest();this._clearTimeout();this._clearToken()};_ServerConnection.prototype.updateTallies=function(e){var t=this,i=this._ng,o=i.rowFields.length,n=i.columnFields.length,r=i.valueFields.length,s=new _PivotNode(i.rowFields,0,null,-1,null);e.forEach((function(e,l,a){var d=t._getAggregatedFieldCount(e,i.rowFields),h=s.getNode(i.rowFields,o-d,null,-1,e),u=h.key,_=u.toString(null),c=i._tallies[_];if(!c){i._keys[_]=u;i._tallies[_]=c={}}d=t._getAggregatedFieldCount(e,i.columnFields);for(var p=0;p<r;p++){var g=h.tree.getNode(i.columnFields,n-d,i.valueFields,p,e).key,f=g.toString(),v=i.valueFields[p],m=c[f];if(!m){i._keys[f]=g;(m=c[f]=new _ServerTally).add(t._getFieldValue(v,e,!1))}}}))};_ServerConnection.prototype._getFieldValue=function(e,t,i){var o=t[e.key];return i&&"string"!=typeof o?wijmo_1.Globalize.format(o,e.format):o};_ServerConnection.prototype._getKeyLength=function(e,t){return e.split(";").length-(t?1:2)};_ServerConnection.prototype._insertKey=function(e,t,i){var o=t.split(";");i||o.pop();if(1==o.length)e[o.pop()]={};else{var n=o.pop(),r=e[n];r||(e[n]=r={});for(;o.length>0;){var s=o.shift();r[s]||(r[s]={});r=r[s]}}};_ServerConnection.prototype._joinKeys=function(e,t,i){return t&&i?[t,e,i].join(";"):i?[e,i].join(";"):e};_ServerConnection.prototype._reorderKeys=function(e,t,i,o,n){var r=this;Object.keys(e).forEach((function(s){var l=r._joinKeys(s,t,i),a=n?r._ng.showRowTotals:r._ng.showColumnTotals,d=Object.keys(e[s]).length,h=!t&&!i&&a!==ShowTotals.None||!t&&!d||t||a===ShowTotals.Subtotals;n||(l+=";");r._ng.totalsBeforeData&&h&&o.push(l);i?t?r._reorderKeys(e[s],[t,s].join(";"),i,o,n):r._reorderKeys(e[s],s,i,o,n):r._reorderKeys(e[s],null,s,o,n);!r._ng.totalsBeforeData&&h&&o.push(l)}))};_ServerConnection.prototype._getAggregatedFieldCount=function(e,t){for(var i=t.length,o=0,n=0;n<i;n++){var r=t[n];null==this._getFieldValue(r,e,!1)&&o++}return o};_ServerConnection.prototype._loadArray=function(e,t,i){var o=this;i||(i={});null==i.skip&&(i.skip=0);null==i.top&&(i.top=100);var n=wijmo_1.isNumber(i.max)?i.max:1e6;this._request=wijmo_1.httpRequest(this._getUrl(e),{data:i,method:i.method||"GET",success:function(r){var s=JSON.parse(r.responseText);t.deferUpdate((function(){s.value.forEach((function(e){t.push(e)}))}));if(s.value.length==i.top&&t.length<n){i.skip+=i.top;o._loadArray(e,t,i)}},error:function(t){o._handleError(e,t)}})};_ServerConnection.prototype._getUrl=function(e,t,i){void 0===t&&(t=this._token);var o=this._ng.itemsSource.toString(),n=o.lastIndexOf("/");o.substr(0,n);switch(e=e.toLowerCase()){case"rawdata":case"detail":return o;case"fields":case"analyses":return o+"/"+e;case"clear":return o+"/analyses/"+t+"/";case"result":case"status":return o+"/analyses/"+t+"/"+e;case"uniquevalues":return o+"/fields/"+i+"/"+e}wijmo_1.assert(!1,"Unrecognized command")};_ServerConnection.prototype._isValidUrl=function(e){var t=document.createElement("a");t.href=wijmo_1.asString(e);var i=t.href;t.href=i;return t.protocol&&t.hostname&&t.pathname&&"/"!=e[e.length-1]};_ServerConnection.prototype._handleResult=function(e,t){var i=this;switch(e.executingStatus.toLowerCase()){case"executing":case"notset":if(Date.now()-this._start>this._ng.serverTimeout){this._handleError("Analyses",{status:500,statusText:"Analysis timed out"});return}this._progress=e.progress;this._ng.onUpdatingView(new ProgressEventArgs(this._progress));this._clearTimeout();this._toGetStatus=setTimeout((function(){i._waitUntilComplete(t)}),this._ng.serverPollInterval);break;case"completed":this._progress=100;this._ng.onUpdatingView(new ProgressEventArgs(this._progress));this._getResults(t);break;case"exception":this._getResults(t);break;default:this._handleError("Analyses",{status:500,statusText:"Unexpected result..."})}};_ServerConnection.prototype._waitUntilComplete=function(e){var t=this;this._sendHttpRequest("Status",{success:function(i){var o=JSON.parse(i.responseText);t._handleResult(o,e)},error:function(e){t._handleError("Status",e)}})};_ServerConnection.prototype._getResults=function(e){var t=this;this._sendHttpRequest("Result",{success:function(i){t._clearToken();var o=JSON.parse(i.responseText);wijmo_1.assert(wijmo_1.isArray(o),"Result array Expected.");var n=[];t._ng._viewLists.forEach((function(e){n=n.concat(e.filter((function(e){return e.dataType==wijmo_1.DataType.Date})))}));n.length>0&&o.forEach((function(e){n.forEach((function(t){var i=t._binding,o=i.getValue(e);wijmo_1.isString(o)&&i.setValue(e,new Date(o))}))}));wijmo_1.asFunction(e)(o)},error:function(e){t._handleError("Result",e)}})};_ServerConnection.prototype._handleError=function(e,t){this.clearPendingRequests();e='** HttpRequest error on command "'+e+'"';this._ng.onError(new wijmo_1.RequestErrorEventArgs(t,e))&&this._throwResponseError(e,t)};_ServerConnection.prototype._sendHttpRequest=function(e,t){var i=this._getUrl(e);this._request=wijmo_1.httpRequest(i,t)};_ServerConnection.prototype._throwResponseError=function(e,t){e=e+"\r\n"+t.status+"\r\n";var i=t.responseText||"";if(500==t.status&&t.responseText){i=JSON.parse(t.responseText).ExceptionMessage}throw e+=i||t.statusText};_ServerConnection.prototype._clearToken=function(){if(this._token){this._clearRequest();this._clearTimeout();this._sendHttpRequest("Clear",{method:"DELETE"});this._token=null}};_ServerConnection.prototype._clearRequest=function(){if(this._request&&4!=this._request.readyState){this._request.abort();this._request=null}};_ServerConnection.prototype._clearTimeout=function(){if(this._toGetStatus){clearTimeout(this._toGetStatus);this._toGetStatus=null}};_ServerConnection._TIMEOUT=6e4;_ServerConnection._POLL_INTERVAL=500;_ServerConnection._MAXDETAIL=1e3;return _ServerConnection}();exports._ServerConnection=_ServerConnection;var ShowTotals,ShowAs,_ServerTally=function(e){__extends(_ServerTally,e);function _ServerTally(){return null!==e&&e.apply(this,arguments)||this}_ServerTally.prototype.add=function(e,t){wijmo_1.assert(0==this._cnt,"Server tallies have a single value.");this._aggregatedValue=e};_ServerTally.prototype.getAggregate=function(e){return this._aggregatedValue};return _ServerTally}(_Tally);wijmo_1._addCultureInfo("olap",{PivotEngine:{grandTotal:"Grand Total",subTotal:"Subtotal"},PivotPanel:{fields:"Choose fields to add to report:",drag:"Drag fields between areas below:",filters:"Filters",cols:"Columns",rows:"Rows",vals:"Values",defer:"Defer Updates",update:"Update"},PivotFieldEditor:{dialogHeader:"Field settings:",header:"Header:",summary:"Summary:",showAs:"Show As:",weighBy:"Weigh by:",sort:"Sort:",filter:"Filter:",format:"Format:",sample:"Sample:",edit:"Edit...",clear:"Clear",ok:"OK",cancel:"Cancel",none:"(none)",sorts:{asc:"Ascending",desc:"Descending"},aggs:{sum:"Sum",cnt:"Count",avg:"Average",max:"Max",min:"Min",rng:"Range",std:"StdDev",var:"Var",stdp:"StdDevPop",varp:"VarPop",first:"First",last:"Last"},calcs:{noCalc:"No calculation",dRow:"Difference from previous row",dRowPct:"% Difference from previous row",dCol:"Difference from previous column",dColPct:"% Difference from previous column",dPctGrand:"% of grand total",dPctRow:"% of row total",dPrevRow:"% of value in the previous row",dPctCol:"% of column total",dPrevCol:"% of value in the previous column",dRunTot:"Running total",dRunTotPct:"% running total"},formats:{n0:"Integer (n0)",n2:"Float (n2)",c:"Currency (c)",p0:"Percentage (p0)",p2:"Percentage (p2)",n2c:"Thousands (n2,)",n2cc:"Millions (n2,,)",n2ccc:"Billions (n2,,,)",d:"Date (d)",MMMMddyyyy:"Month Day Year (MMMM dd, yyyy)",dMyy:"Day Month Year (d/M/yy)",ddMyy:"Day Month Year (dd/M/yy)",dMyyyy:"Day Month Year (dd/M/yyyy)",MMMyyyy:"Month Year (MMM yyyy)",MMMMyyyy:"Month Year (MMMM yyyy)",yyyy:"Year (yyyy)",yyyyQq:'Year Quarter (yyyy "Q"q)',FYEEEEQU:'Fiscal Year Quarter ("FY"EEEE "Q"U)'}},_ListContextMenu:{up:"Move Up",down:"Move Down",first:"Move to Beginning",last:"Move to End",filter:"Move to Report Filter",rows:"Move to Row Labels",cols:"Move to Column Labels",vals:"Move to Values",remove:"Remove Field",edit:"Field Settings...",detail:"Show Detail..."},DetailDialog:{header:"Detail View:",ok:"OK",items:"{cnt:n0} items",item:"{cnt} item",row:"Row",col:"Column"},PivotChart:{by:"by",and:"and"},Slicer:{multiSelect:"Multi-Select",clearFilter:"Clear Filter"}});!function(e){e[e.None=0]="None";e[e.GrandTotals=1]="GrandTotals";e[e.Subtotals=2]="Subtotals"}(ShowTotals=exports.ShowTotals||(exports.ShowTotals={}));!function(e){e[e.NoCalculation=0]="NoCalculation";e[e.DiffRow=1]="DiffRow";e[e.DiffRowPct=2]="DiffRowPct";e[e.DiffCol=3]="DiffCol";e[e.DiffColPct=4]="DiffColPct";e[e.PctGrand=5]="PctGrand";e[e.PctRow=6]="PctRow";e[e.PctCol=7]="PctCol";e[e.RunTot=8]="RunTot";e[e.RunTotPct=9]="RunTotPct";e[e.PctPrevRow=10]="PctPrevRow";e[e.PctPrevCol=11]="PctPrevCol"}(ShowAs=exports.ShowAs||(exports.ShowAs={}));var PivotEngine=function(){function PivotEngine(e){this._autoGenFields=!0;this._allowFieldEditing=!0;this._showRowTotals=ShowTotals.GrandTotals;this._showColTotals=ShowTotals.GrandTotals;this._totalsBefore=!1;this._sortableGroups=!0;this._showZeros=!1;this._updating=0;this._xValueSearch=!0;this._async=!0;this._sortOnServer=!1;this._cntTotal=0;this._cntFiltered=0;this._serverParms={timeout:_ServerConnection._TIMEOUT,pollInterval:_ServerConnection._POLL_INTERVAL,maxDetail:_ServerConnection._MAXDETAIL};this.itemsSourceChanged=new wijmo_1.Event;this.viewDefinitionChanged=new wijmo_1.Event;this.updatingView=new wijmo_1.Event;this.updatedView=new wijmo_1.Event;this.error=new wijmo_1.Event;this._isUpdatingChanged=new wijmo_1.Event;this._hasDeferredUpdatesChanged=new wijmo_1.Event;this._pivotView=new PivotCollectionView(this);this._fields=new PivotFieldCollection(this);this._rowFields=new PivotFieldCollection(this);this._columnFields=new PivotFieldCollection(this);this._valueFields=new PivotFieldCollection(this);this._filterFields=new PivotFieldCollection(this);this._viewLists=[this._rowFields,this._columnFields,this._valueFields,this._filterFields];var t=this._fieldListChanged.bind(this);this._fields.collectionChanged.addHandler(t);this._viewLists.forEach((function(e){e.collectionChanged.addHandler(t)}));this._defaultFilterType=null;wijmo_1.copy(this,e)}Object.defineProperty(PivotEngine.prototype,"itemsSource",{get:function(){return this._items},set:function(e){var t=this;if(this._items!=e){if(this._cv){this._cv.collectionChanged.removeHandler(this._cvCollectionChanged,this);this._cv=null}if(this._server){this._server.clearPendingRequests();this._server=null}this._items=e;wijmo_1.isString(e)?this._server=new _ServerConnection(this,e):wijmo_1.isObject(e)&&!wijmo_1.tryCast(e,"ICollectionView")?this._server=new _SqlServerConnection(this,e):this._cv=wijmo_1.asCollectionView(e);null!=this._cv&&this._cv.collectionChanged.addHandler(this._cvCollectionChanged,this);this.deferUpdate((function(){t.autoGenerateFields&&t._generateFields();t._updateFieldTypes()}));this.onItemsSourceChanged()}},enumerable:!0,configurable:!0});Object.defineProperty(PivotEngine.prototype,"isServer",{get:function(){return null!=this._server},enumerable:!0,configurable:!0});Object.defineProperty(PivotEngine.prototype,"collectionView",{get:function(){return this._cv},enumerable:!0,configurable:!0});Object.defineProperty(PivotEngine.prototype,"pivotView",{get:function(){return this._pivotView},enumerable:!0,configurable:!0});Object.defineProperty(PivotEngine.prototype,"showRowTotals",{get:function(){return this._showRowTotals},set:function(e){if((e=wijmo_1.asEnum(e,ShowTotals))!=this.showRowTotals){this._showRowTotals=e;this.onViewDefinitionChanged();this.invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(PivotEngine.prototype,"showColumnTotals",{get:function(){return this._showColTotals},set:function(e){if((e=wijmo_1.asEnum(e,ShowTotals))!=this.showColumnTotals){this._showColTotals=e;this.onViewDefinitionChanged();this.invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(PivotEngine.prototype,"totalsBeforeData",{get:function(){return this._totalsBefore},set:function(e){if(e!=this._totalsBefore){this._totalsBefore=wijmo_1.asBoolean(e);this.onViewDefinitionChanged();this._updatePivotView()}},enumerable:!0,configurable:!0});Object.defineProperty(PivotEngine.prototype,"sortableGroups",{get:function(){return this._sortableGroups},set:function(e){if(e!=this._sortableGroups){this._sortableGroups=wijmo_1.asBoolean(e);this.onViewDefinitionChanged()}},enumerable:!0,configurable:!0});Object.defineProperty(PivotEngine.prototype,"sortOnServer",{get:function(){return this._sortOnServer},set:function(e){this._sortOnServer=wijmo_1.asBoolean(e)},enumerable:!0,configurable:!0});Object.defineProperty(PivotEngine.prototype,"showZeros",{get:function(){return this._showZeros},set:function(e){if(e!=this._showZeros){this._showZeros=wijmo_1.asBoolean(e);this.onViewDefinitionChanged();this._updatePivotView()}},enumerable:!0,configurable:!0});Object.defineProperty(PivotEngine.prototype,"defaultFilterType",{get:function(){return null!=this._defaultFilterType?this._defaultFilterType:this._server?wijmo_grid_filter_1.FilterType.Condition:wijmo_grid_filter_1.FilterType.Both},set:function(e){this._defaultFilterType=wijmo_1.asEnum(e,wijmo_grid_filter_1.FilterType,!0)},enumerable:!0,configurable:!0});Object.defineProperty(PivotEngine.prototype,"exclusiveValueSearch",{get:function(){return this._xValueSearch},set:function(e){this._xValueSearch=wijmo_1.asBoolean(e)},enumerable:!0,configurable:!0});Object.defineProperty(PivotEngine.prototype,"autoGenerateFields",{get:function(){return this._autoGenFields},set:function(e){this._autoGenFields=wijmo_1.asBoolean(e)},enumerable:!0,configurable:!0});Object.defineProperty(PivotEngine.prototype,"allowFieldEditing",{get:function(){return this._allowFieldEditing},set:function(e){this._allowFieldEditing=wijmo_1.asBoolean(e)},enumerable:!0,configurable:!0});Object.defineProperty(PivotEngine.prototype,"fields",{get:function(){return this._fields},enumerable:!0,configurable:!0});Object.defineProperty(PivotEngine.prototype,"rowFields",{get:function(){return this._rowFields},enumerable:!0,configurable:!0});Object.defineProperty(PivotEngine.prototype,"columnFields",{get:function(){return this._columnFields},enumerable:!0,configurable:!0});Object.defineProperty(PivotEngine.prototype,"filterFields",{get:function(){return this._filterFields},enumerable:!0,configurable:!0});Object.defineProperty(PivotEngine.prototype,"valueFields",{get:function(){return this._valueFields},enumerable:!0,configurable:!0});Object.defineProperty(PivotEngine.prototype,"viewDefinition",{get:function(){var e=this,t={showZeros:this.showZeros,showColumnTotals:this.showColumnTotals,showRowTotals:this.showRowTotals,defaultFilterType:this.defaultFilterType,totalsBeforeData:this.totalsBeforeData,sortableGroups:this.sortableGroups,fields:[],rowFields:this._getFieldCollectionProxy(this.rowFields),columnFields:this._getFieldCollectionProxy(this.columnFields),filterFields:this._getFieldCollectionProxy(this.filterFields),valueFields:this._getFieldCollectionProxy(this.valueFields)};this.fields.forEach((function(i){var o=e._getFieldDefinition(i);t.fields.push(o)}));return JSON.stringify(t)},set:function(e){var t=this,i=JSON.parse(e);i&&this.deferUpdate((function(){t._copyProps(t,i,PivotEngine._props);t.fields.clear();i.fields.forEach((function(e){var i=t._getFieldFromDefinition(e);t.fields.push(i)}));i.fields.forEach((function(e,i){wijmo_1.isString(e.weightField)&&(t.fields[i].weightField=t.fields.getField(e.weightField))}));t._setFieldCollectionProxy(t.rowFields,i.rowFields);t._setFieldCollectionProxy(t.columnFields,i.columnFields);t._setFieldCollectionProxy(t.filterFields,i.filterFields);t._setFieldCollectionProxy(t.valueFields,i.valueFields)}))},enumerable:!0,configurable:!0});Object.defineProperty(PivotEngine.prototype,"isViewDefined",{get:function(){var e=this._valueFields.length,t=this._rowFields.length,i=this._columnFields.length;return this._server?e>0&&(t>0||i>0):e>0||t>0||i>0},enumerable:!0,configurable:!0});PivotEngine.prototype.beginUpdate=function(){this.cancelPendingUpdates();this._updating++;1===this._updating&&this._onIsUpdatingChanged()};PivotEngine.prototype.endUpdate=function(){this._updating--;if(this._updating<=0){if(this._viewDefinitionChanged){this._viewDefinitionChanged=!1;this.onViewDefinitionChanged();this._setHasDeferredUpdates(!1)}this._onIsUpdatingChanged();this.refresh()}};Object.defineProperty(PivotEngine.prototype,"isUpdating",{get:function(){return this._updating>0},enumerable:!0,configurable:!0});Object.defineProperty(PivotEngine.prototype,"hasDeferredUpdates",{get:function(){return this._hasDeferredUpdates},enumerable:!0,configurable:!0});PivotEngine.prototype._setHasDeferredUpdates=function(e){if(this._hasDeferredUpdates!==e){this._hasDeferredUpdates=e;this._onHasDeferredUpdatesChanged()}};PivotEngine.prototype.deferUpdate=function(e){try{this.beginUpdate();e()}finally{this.endUpdate()}};PivotEngine.prototype.refresh=function(e){void 0===e&&(e=!1);this._updateView(e)};PivotEngine.prototype.invalidate=function(){var e=this;this._toInv&&(this._toInv=clearTimeout(this._toInv));this.isUpdating||this.isDisposed||(this._toInv=setTimeout((function(){e.refresh()}),wijmo_1.Control._REFRESH_INTERVAL))};Object.defineProperty(PivotEngine.prototype,"async",{get:function(){return this._async},set:function(e){if(e!=this._async){this.cancelPendingUpdates();this._async=wijmo_1.asBoolean(e)}},enumerable:!0,configurable:!0});Object.defineProperty(PivotEngine.prototype,"serverTimeout",{get:function(){return this._serverParms.timeout},set:function(e){this._serverParms.timeout=wijmo_1.asNumber(e,!1,!0)},enumerable:!0,configurable:!0});Object.defineProperty(PivotEngine.prototype,"serverPollInterval",{get:function(){return this._serverParms.pollInterval},set:function(e){this._serverParms.pollInterval=wijmo_1.asNumber(e,!1,!0)},enumerable:!0,configurable:!0});Object.defineProperty(PivotEngine.prototype,"serverMaxDetail",{get:function(){return this._serverParms.maxDetail},set:function(e){this._serverParms.maxDetail=wijmo_1.asNumber(e,!1,!0)},enumerable:!0,configurable:!0});PivotEngine.prototype.cancelPendingUpdates=function(){if(this._toUpdateTallies){clearTimeout(this._toUpdateTallies);this._toUpdateTallies=null}};PivotEngine.prototype.getDetail=function(e,t){var i=this,o=e?e[_PivotKey._ROW_KEY_NAME]:null,n=this._getKey(t);if(this._server)return this._server.getDetail(o,n);var r=this.collectionView.items,s=[];r.forEach((function(e){!i._applyFilter(e)||null!=o&&!o.matchesItem(e)||null!=n&&!n.matchesItem(e)||s.push(e)}));return s};PivotEngine.prototype.getDetailView=function(e,t){var i=this.getDetail(e,t);return new wijmo_1.CollectionView(i)};PivotEngine.prototype.getKeys=function(e,t){var i=e?e[_PivotKey._ROW_KEY_NAME]:null,o=this._getKey(t);return{rowKey:{fields:i?i.fieldNames:[],values:i?i.values:[]},colKey:{fields:o?o.fieldNames:[],values:o?o.values:[]}}};PivotEngine.prototype.editField=function(e){if(this.allowFieldEditing){this.edt=new PivotFieldEditor(document.createElement("div"),{field:e});this._dlg=new wijmo_input_1.Popup(document.createElement("div"),{content:this.edt.hostElement});this._dlg.show(!0)}};PivotEngine.prototype.removeField=function(e){for(var t=0;t<this._viewLists.length;t++){var i=this._viewLists[t],o=i.indexOf(e);if(o>-1){i.removeAt(o);return}}};PivotEngine.prototype.onItemsSourceChanged=function(e){this.itemsSourceChanged.raise(this,e)};PivotEngine.prototype.onViewDefinitionChanged=function(e){if(this._updating<=0){this.viewDefinitionChanged.raise(this,e);this._viewDefinitionChanged=!1;this._setHasDeferredUpdates(!1)}else{this._viewDefinitionChanged=!0;this._setHasDeferredUpdates(!0)}};PivotEngine.prototype.onUpdatingView=function(e){this.updatingView.raise(this,e)};PivotEngine.prototype.onUpdatedView=function(e){this.updatedView.raise(this,e)};PivotEngine.prototype.onError=function(e){this.error.raise(this,e);return!e.cancel};PivotEngine.prototype._onIsUpdatingChanged=function(e){this._isUpdatingChanged.raise(this,e)};PivotEngine.prototype._onHasDeferredUpdatesChanged=function(e){this._hasDeferredUpdatesChanged.raise(this,e)};PivotEngine.prototype._copy=function(e,t){var i=this;switch(e){case"fields":this.fields.clear();this._viewLists.forEach((function(e){e.clear()}));wijmo_1.asArray(t).forEach((function(e){var t=i._createField(e,!1);i.fields.push(t)}));this._updateFieldTypes();return!0;case"rowFields":case"columnFields":case"valueFields":case"filterFields":this[e].clear();if(!wijmo_1.isArray(t)){this[e].maxItems=t.maxItems;t=t.items}wijmo_1.asArray(t).forEach((function(t){var o=i.fields.getField(t);i[e].push(o)}));return!0}return!1};PivotEngine.prototype._getKey=function(e){return this._keys[e]};PivotEngine.prototype._getRowKey=function(e){var t=e;if(wijmo_1.isNumber(e)){var i=this._pivotView;t=(i.items.length?i.items:i.sourceCollection)[e]}return t?t[_PivotKey._ROW_KEY_NAME]:null};PivotEngine.prototype._getRowLevel=function(e){var t=this._getRowKey(e);return t?t.level:-1};PivotEngine.prototype._getColKey=function(e){wijmo_1.isNumber(e)&&(e=this._colBindings[e]);if(wijmo_1.isString(e))return this._getKey(e);wijmo_1.assert(null==e||e instanceof _PivotKey,"invalid parameter in call to _getColLevel");return e};PivotEngine.prototype._getColLevel=function(e){return(e=this._getColKey(e))?e.level:-1};PivotEngine.prototype._getFieldByColKey=function(e){var t=this._getColKey(e);return t&&t.valueField};PivotEngine.prototype._applyFilter=function(e){for(var t=this._activeFilterFields,i=0;i<t.length;i++){if(!t[i].filter.apply(e))return!1}return!0};PivotEngine.prototype._updateView=function(e){var t=this;void 0===e&&(e=!1);if(!this.isUpdating||e){this.cancelPendingUpdates();this._cntTotal=this._cntFiltered=0;this._tallies={};this._keys={};this._activeFilterFields=[];if(this._server&&this.isViewDefined){this._server.getOutputView((function(i){if(t.isViewDefined){t._server.updateTallies(i);t._updatePivotView(e)}}));return}this._viewLists.forEach((function(e){e.forEach((function(e){e.filter.isActive&&t._activeFilterFields.push(e)}))}));if(this.isViewDefined&&wijmo_1.hasItems(this._cv)){this._batchStart=Date.now();this._updateTallies(this._cv.items,0,e)}else this._updatePivotView(e);this._setHasDeferredUpdates(!1)}};PivotEngine.prototype._updateTallies=function(e,t,i){var o=this;void 0===i&&(i=!1);var n=e.length,r=new _PivotNode(this._rowFields,0,null,-1,null),s=this.valueFields;0==s.length&&this.columnFields.length>0&&(s=new PivotFieldCollection(this)).push(new PivotField(this,"","",{aggregate:wijmo_1.Aggregate.Sum}));for(var l=ShowTotals,a=this._rowFields.length,d=this._getShowRowTotals(),h=d==l.None?a:0,u=d==l.GrandTotals?Math.max(1,a):1,_=this._columnFields.length,c=this._getShowColTotals(),p=c==l.None?_:0,g=c==l.GrandTotals?Math.max(1,_):1,f=s.length,_loop_1=function(n){if(v._async&&n-t>=PivotEngine._BATCH_SIZE&&Date.now()-v._batchStart>PivotEngine._BATCH_DELAY){v._toUpdateTallies=setTimeout((function(){o.onUpdatingView(new ProgressEventArgs(Math.round(n/e.length*100)));o._batchStart=Date.now();o._updateTallies(e,n,i)}),PivotEngine._BATCH_TIMEOUT);return{value:void 0}}v._cntTotal++;var l=e[n];if(!v._activeFilterFields.length||v._applyFilter(l)){v._cntFiltered++;for(var d=h;d<=a;d+=u){var c=r.getNode(v._rowFields,d,null,-1,l),m=c.key,w=m.toString(),y=v._tallies[w];if(!y){v._keys[w]=m;v._tallies[w]=y={}}for(var b=p;b<=_;b+=g)for(var C=0;C<f;C++){var P=c.tree.getNode(v._columnFields,b,s,C,l).key,F=P.toString(),j=y[F];if(!j){v._keys[F]=P;j=y[F]=new _Tally}var x=s[C],S=x._getValue(l,!1),T=x.weightField?x._getWeight(l):null;j.add(S,T)}}}},v=this,m=t;m<n;m++){var w=_loop_1(m);if("object"==typeof w)return w.value}this._toUpdateTallies=null;this._updatePivotView(i)};PivotEngine.prototype._updatePivotView=function(e){var t=this;void 0===e&&(e=!1);if(!this.isUpdating||e){var i=this._pivotView;i.deferUpdate((function(){t.onUpdatingView(new ProgressEventArgs(100));i.cancelEdit();i.cancelNew();var e=i.sourceCollection;e.length=0;var o={};for(var n in t._tallies)o[n]=!0;var r={};for(var n in t._tallies){var s=t._tallies[n];for(var l in s)r[l]=!0}var a=[],d=[];if(t._server){a=t._server.getSortedKeys(o,!0);d=t._server.getSortedKeys(r,!1)}else{a=t._getSortedKeys(o);d=t._getSortedKeys(r)}for(var h=0;h<a.length;h++){var u=a[h],_=(s=t._tallies[u],{});_[_PivotKey._ROW_KEY_NAME]=t._getKey(u);for(var c=0;c<d.length;c++){var p=d[c],g=s[p],f=t._getKey(p),v=g?g.getAggregate(f.aggregate):null;null==v&&t._showZeros&&(v=0);_[p]=v}e.push(_)}t._colBindings=d;t._updateFieldValues(e);i.sortDescriptions.clear();i.refresh()}));this.onUpdatedView()}};PivotEngine.prototype._getSortedKeys=function(e){var t=this,i=Object.keys(e);i.sort((function(e,i){return t._keys[e].compareTo(t._keys[i])}));return i};PivotEngine.prototype._updateFieldValues=function(e){for(var t=this.valueFields.length,i=0;i<t;i++){var o=this.valueFields[i];if(wijmo_1.isFunction(o.getAggregateValue))for(var n=i;n<this._colBindings.length;n+=t)for(var r=0;r<e.length;r++){var s=e[r],l=this._colBindings[n],a=this._getAggregateObject(s,l);s[l]=o.getAggregateValue.call(this,a)}}var _loop_2=function(i){var o=d.valueFields[i];switch(o.showAs){case ShowAs.RunTot:case ShowAs.RunTotPct:for(var n=i;n<d._colBindings.length;n+=t){for(var r=0;r<e.length;r++){(h=e[r])[c=d._colBindings[n]]=d._getRunningTotal(e,r,n)}if(o.showAs==ShowAs.RunTotPct)for(r=0;r<e.length;r++){var s=(h=e[r])[c=d._colBindings[n]];if(wijmo_1.isNumber(s)){var l=d._getLastValueInRowGroup(e,r,n);0!=l&&(h[c]=s/l)}}}break;case ShowAs.PctGrand:case ShowAs.PctCol:var a=0;if(o.showAs==ShowAs.PctGrand)for(n=i;n<d._colBindings.length;n+=t)-1==d._getColLevel(n)&&(a+=d._getColTotal(e,n));var _loop_3=function(t){o.showAs==ShowAs.PctCol&&(a=d._getColTotal(e,t));var i=d._colBindings[t];e.forEach((function(e){var t=e[i];wijmo_1.isNumber(t)&&(e[i]=0!=a?t/a:null)}))};for(n=i;n<d._colBindings.length;n+=t)_loop_3(n);break;case ShowAs.PctRow:for(r=0;r<e.length;r++){var h=e[r],u=0;for(n=i;n<d._colBindings.length;n+=t)if(-1==d._getColLevel(n)){var _=h[c=d._colBindings[n]];wijmo_1.isNumber(_)&&(u+=_)}for(n=i;n<d._colBindings.length;n+=t){_=h[c=d._colBindings[n]];wijmo_1.isNumber(_)&&(h[c]=0!=u?_/u:null)}}break;case ShowAs.DiffRow:case ShowAs.DiffRowPct:case ShowAs.PctPrevRow:for(n=i;n<d._colBindings.length;n+=t)for(r=e.length-1;r>=0;r--){(h=e[r])[c=d._colBindings[n]]=d._getRowDifference(e,r,n,o.showAs)}break;case ShowAs.DiffCol:case ShowAs.DiffColPct:case ShowAs.PctPrevCol:for(r=0;r<e.length;r++)for(n=d._colBindings.length-t+i;n>=0;n-=t){var c;(h=e[r])[c=d._colBindings[n]]=d._getColDifference(e,r,n,o.showAs)}}},d=this;for(i=0;i<t;i++)_loop_2(i)};PivotEngine.prototype._getAggregateObject=function(e,t){var i={},o=/(.+:.+;)*((.+):.+;)/,n=t.match(o);for(var r in e){var s=r.match(o);s&&s[1]==n[1]&&(i[s[3]]=e[r])}return i};PivotEngine.prototype._getColTotal=function(e,t){var i=this,o=this._colBindings[t],n=0;e.forEach((function(e){if(-1==i._getRowLevel(e)){var t=e[o];wijmo_1.isNumber(t)&&(n+=t)}}));return n};PivotEngine.prototype._getRunningTotal=function(e,t,i){var o=this._getRowLevel(e[t]);if(0==o)return null;for(var n=this._colBindings[i],r=e[t][n],s=this._getShowRowTotals(),l=this.rowFields.length-2,a=t-1;a>=0;a--){var d=this._getRowLevel(e[a]);if(d==o){if(l>-1&&o<0&&s!=ShowTotals.Subtotals){var h=e[t].$rowKey,u=e[a].$rowKey;if(h.values[l]!=u.values[l])return null}r+=e[a][n];break}if(d>o)break}return r};PivotEngine.prototype._getLastValueInRowGroup=function(e,t,i){for(var o=this._colBindings[i],n=e[t][o],r=this._getRowLevel(e[t]),s=this.rowFields.length-2,l=this._getShowRowTotals(),a=t+1;a<e.length;a++){var d=this._getRowLevel(e[a]);if(d==r){if(s>-1&&r<0&&l!=ShowTotals.Subtotals){var h=e[t].$rowKey,u=e[a].$rowKey;if(h.values[s]!=u.values[s])return n}n=e[a][o]}if(d>r)break}return n};PivotEngine.prototype._getRowDifference=function(e,t,i,o){var n=this._getRowLevel(e[t]);if(0==n)return null;for(var r=this._colBindings[i],s=e[t][r],l=this.rowFields.length-2,a=this._getShowRowTotals(),d=t-1;d>=0;d--){var h=this._getRowLevel(e[d]);if(h==n){if(l>-1&&n<0&&a!=ShowTotals.Subtotals){var u=e[t].$rowKey,_=e[d].$rowKey;if(u.values[l]!=_.values[l])return null}var c=e[d][r];switch(o){case ShowAs.DiffRow:s-=c;break;case ShowAs.DiffRowPct:s=(s-c)/c;break;case ShowAs.PctPrevRow:s/=c}return s}if(h>n)break}return o==ShowAs.PctPrevRow?1:null};PivotEngine.prototype._getColDifference=function(e,t,i,o){var n=this._getColLevel(i);if(0==n)return null;for(var r=e[t],s=r[this._colBindings[i]],l=this.valueFields.length,a=this.columnFields.length-2,d=this._getShowColTotals(),h=i-l;h>=0;h-=l){var u=this._getColLevel(h);if(u==n){if(a>-1&&n<0&&d!=ShowTotals.Subtotals){var _=this._getKey(this._colBindings[i]),c=this._getKey(this._colBindings[h]);if(_.values[a]!=c.values[a])return null}var p=r[this._colBindings[h]];switch(o){case ShowAs.DiffCol:s-=p;break;case ShowAs.DiffColPct:s=(s-p)/p;break;case ShowAs.PctPrevCol:s/=p}return s}if(u>n)break}return o==ShowAs.PctPrevCol?1:null};PivotEngine.prototype._getShowRowTotals=function(){return this._valueFields.length?this._showRowTotals:ShowTotals.None};PivotEngine.prototype._getShowColTotals=function(){return this._valueFields.length?this._showColTotals:ShowTotals.None};PivotEngine.prototype._getUniqueValues=function(e){return this._server?this._server.getUniqueValues(e):null};PivotEngine.prototype._generateFields=function(){var e=this;this._viewLists.forEach((function(e){e.clear()}));for(var t=0;t<this.fields.length;t++){if(this.fields[t]._autoGenerated){this.fields.removeAt(t);t--}}if(this._server){this._server.getFields().forEach((function(t){var i=e._createField(t,!0);e.fields.getField(i.header)||e.fields.push(i)}))}else{var i=this.collectionView,o=i?i.items:null;o&&o.length&&this.autoGenerateFields&&wijmo_1.getTypes(o,0).forEach((function(t){var i=e._createField({binding:t.binding,header:wijmo_1.toHeaderCase(t.binding),dataType:t.dataType},!0);e.fields.getField(i.header)||e.fields.push(i)}))}};PivotEngine.prototype._updateFieldTypes=function(){var e=this,t=this.collectionView,i=t?t.sourceCollection:null;i&&i.length&&this.fields.forEach((function(t){e._updateFieldType(t,i)}))};PivotEngine.prototype._updateFieldType=function(e,t){var i=this;if(e._hasSubFields())e.subFields.forEach((function(e){i._updateFieldType(e,t)}));else{if(null==e.dataType&&e.binding)for(var o=0;o<t.length;o++){var n=e._binding.getValue(t[o]);if(null!=n){e.dataType=wijmo_1.isPrimitive(n)?wijmo_1.getType(n):null;break}}if(null!=e.dataType){e.format||(e.format=e.dataType==wijmo_1.DataType.Date?"d":"n0");e.aggregate==wijmo_1.Aggregate.Sum&&e.dataType!=wijmo_1.DataType.Number&&(e.aggregate=wijmo_1.Aggregate.Cnt)}}};PivotEngine.prototype._createField=function(e,t){var i;if(wijmo_1.isString(e))i=new PivotField(this,e);else if(e){e.key&&delete e.key;i=null!=e.dimensionType?new CubePivotField(this,e.binding,e.header,e):new PivotField(this,e.binding,e.header,e);null!=e.dataType&&(i.dataType=e.dataType)}i._autoGenerated=t;if(t||wijmo_1.isString(e)){i.format=i.dataType==wijmo_1.DataType.Date?"d":"n0";i.aggregate=i.dataType==wijmo_1.DataType.Number?wijmo_1.Aggregate.Sum:wijmo_1.Aggregate.Cnt}e&&!wijmo_1.isString(e)&&wijmo_1.copy(i,e);return i};PivotEngine.prototype._cvCollectionChanged=function(e,t){this.invalidate()};PivotEngine.prototype._fieldListChanged=function(e,t){if(t.action==wijmo_1.NotifyCollectionChangedAction.Add){for(var i=e,o=0;o<i.length-1;o++)if(i[o].key)for(var n=o+1;n<i.length;n++)if(i[o].key==i[n].key){i.removeAt(n);n--}if(i!=this._fields)if(this._fields.getField(t.item.key)){for(o=0;o<this._viewLists.length;o++)if(this._viewLists[o]!=i){var r=this._viewLists[o];(s=r.indexOf(t.item))>-1&&r.removeAt(s)}}else i.removeAt(t.index);if(wijmo_1.isNumber(i.maxItems)&&i.maxItems>-1)for(;i.length>i.maxItems;){var s;i[s=i.length-1]==t.item&&s>0&&s--;i.removeAt(s)}}this.onViewDefinitionChanged();this.invalidate()};PivotEngine.prototype._fieldPropertyChanged=function(e,t){this.onViewDefinitionChanged();if(e.isActive){var i=t.propertyName;"visible"!=i&&("width"!=i&&"wordWrap"!=i&&"isContentHtml"!=i?"format"==i&&this.valueFields.indexOf(e)>-1?this._pivotView.refresh():"showAs"!=i?"descending"!=i?"aggregate"!=i?this.invalidate():this.valueFields.indexOf(e)>-1&&!this.isUpdating&&(this._server?this._updateView():this._updatePivotView()):this._updatePivotView():this.valueFields.indexOf(e)>-1&&!this.isUpdating&&this._updatePivotView():this._pivotView.refresh())}};PivotEngine.prototype._copyProps=function(e,t,i){for(var o=0;o<i.length;o++){var n=i[o];null!=t[n]&&(e[n]=t[n])}};PivotEngine.prototype._getFieldFromDefinition=function(e){var t=e.filter;e.filter&&delete e.filter;var i=this._createField(e,!0);if(t){i._setFilterProxy(t);e.filter=t}return i};PivotEngine.prototype._getFieldDefinition=function(e){var t=this,i={binding:e.binding,header:e.header,dataType:e.dataType,aggregate:e.aggregate,showAs:e.showAs,descending:e.descending,format:e.format,align:e.align,wordWrap:e.wordWrap,width:e.width,isContentHtml:e.isContentHtml};e.weightField&&(i.weightField=e.weightField._getName());e.key&&(i.key=e.key);e.filter.isActive&&(i.filter=e._getFilterProxy());if(e._hasSubFields()){i.subFields=[];e.subFields.forEach((function(e){i.subFields.push(t._getFieldDefinition(e))}))}e instanceof CubePivotField&&(i.dimensionType=e.dimensionType);return i};PivotEngine.prototype._getFieldCollectionProxy=function(e){var t={items:[]};wijmo_1.isNumber(e.maxItems)&&e.maxItems>-1&&(t.maxItems=e.maxItems);for(var i=0;i<e.length;i++){var o=e[i];t.items.push(o.key)}return t};PivotEngine.prototype._setFieldCollectionProxy=function(e,t){e.clear();e.maxItems=wijmo_1.isNumber(t.maxItems)?t.maxItems:null;for(var i=0;i<t.items.length;i++)e.push(t.items[i])};PivotEngine.prototype.dispose=function(){var e=this;this.isDisposed=!0;if(this._cv){this._cv.collectionChanged.removeHandler(this._cvCollectionChanged,this);this._cv=null}if(this._server){this._server.clearPendingRequests();this._server=null}this._fields&&this._fields.collectionChanged&&this._fields.collectionChanged.removeHandler(this._fieldListChanged,this);this._viewLists.forEach((function(t){t.collectionChanged&&t.collectionChanged.removeHandler(e._fieldListChanged,e)}));this._tallies=null;this._keys=null;this._activeFilterFields=null;if(this._toInv){clearTimeout(this._toInv);this._toInv=null}if(this._toUpdateTallies){clearTimeout(this._toUpdateTallies);this._toUpdateTallies=null}if(this.edt){this.edt.dispose();this.edt=null}if(this._dlg){this._dlg.dispose();this._dlg=null}this._items=null;if(this._fields){this._fields.clear();this._fields=null}if(this._rowFields){this._rowFields.clear();this._rowFields=null}if(this._columnFields){this._columnFields.clear();this._columnFields=null}if(this._valueFields){this._valueFields.clear();this._valueFields=null}if(this._filterFields){this._filterFields.clear();this._filterFields=null}this._serverParms=null;this._colBindings=null;delete this.isDisposed};PivotEngine._BATCH_SIZE=1e4;PivotEngine._BATCH_TIMEOUT=0;PivotEngine._BATCH_DELAY=100;PivotEngine._props=["showZeros","showRowTotals","showColumnTotals","totalsBeforeData","sortableGroups","defaultFilterType"];return PivotEngine}();exports.PivotEngine=PivotEngine;var ProgressEventArgs=function(e){__extends(ProgressEventArgs,e);function ProgressEventArgs(t){var i=e.call(this)||this;i._progress=wijmo_1.asNumber(t);return i}Object.defineProperty(ProgressEventArgs.prototype,"progress",{get:function(){return this._progress},enumerable:!0,configurable:!0});return ProgressEventArgs}(wijmo_1.EventArgs);exports.ProgressEventArgs=ProgressEventArgs;var _ListContextMenu=function(e){__extends(_ListContextMenu,e);function _ListContextMenu(t){var i=e.call(this,document.createElement("div"),{header:"Field Context Menu",displayMemberPath:"text",commandParameterPath:"parm",command:{executeCommand:function(e){i._execute(e)},canExecuteCommand:function(e){return i._canExecute(e)}}})||this;i._full=t;i.itemsSource=i._getMenuItems(t);wijmo_1.addClass(i.dropDown,"context-menu "+exports._GridContextMenuClsNames.hostElement);return i}Object.defineProperty(_ListContextMenu,"controlTemplate",{get:function(){_ListContextMenu._ctrlTemplate||(_ListContextMenu._ctrlTemplate=wijmo_input_1.Menu.controlTemplate);return _ListContextMenu._ctrlTemplate},set:function(e){_ListContextMenu._ctrlTemplate=e},enumerable:!0,configurable:!0});_ListContextMenu.prototype.refresh=function(t){void 0===t&&(t=!0);this.itemsSource=this._getMenuItems(this._full);e.prototype.refresh.call(this,t)};_ListContextMenu.prototype.attach=function(e){var t=this;wijmo_1.assert(e instanceof wijmo_grid_1.FlexGrid,"Expecting a FlexGrid control...");var i=e.hostElement;this._contextMenuHandler=function(o){if(t._selectField(e,o)){o.preventDefault();t.owner=i;t.show(o)}};i.addEventListener("contextmenu",this._contextMenuHandler)};_ListContextMenu.prototype._selectField=function(e,t){var i=e.hitTest(t);if(i.panel!=e.cells||!i.range.isValid)return!1;var o=e.rows[i.row].dataItem;if(o instanceof CubePivotField&&o.subFields&&o.subFields.length)return!1;e.select(i.range,!0);return!0};_ListContextMenu.prototype._getMenuItems=function(e){var t;t=e?[{text:'<div class="menu-icon"></div>*',parm:"up"},{text:'<div class="menu-icon"></div>*',parm:"down"},{text:'<div class="menu-icon"></div>*',parm:"first"},{text:'<div class="menu-icon"></div>*',parm:"last"},{text:'<div class="'+wijmo_1.UtilitesClsNames.separator+'"></div>'},{text:'<div class="menu-icon"><span class='+wijmo_1.GlyphClsNames.filter+"></span></div>*",parm:"filter"},{text:'<div class="menu-icon">≡</div>*',parm:"rows"},{text:'<div class="menu-icon">⫴</div>*',parm:"cols"},{text:'<div class="menu-icon">Σ</div>*',parm:"vals"},{text:'<div class="'+wijmo_1.UtilitesClsNames.separator+'"></div>'},{text:'<div class="menu-icon menu-icon-remove">✖</div>*',parm:"remove"},{text:'<div class="'+wijmo_1.UtilitesClsNames.separator+'"></div>'},{text:'<div class="menu-icon">⛭</div>*',parm:"edit"}]:[{text:'<div class="menu-icon"><span class='+wijmo_1.GlyphClsNames.filter+"></span></div>*",parm:"filter"},{text:'<div class="menu-icon">≡</div>*',parm:"rows"},{text:'<div class="menu-icon">⫴</div>*',parm:"cols"},{text:'<div class="menu-icon">Σ</div>*',parm:"vals"},{text:'<div class="'+wijmo_1.UtilitesClsNames.separator+'"></div>'},{text:'<div class="menu-icon">⛭</div>*',parm:"edit"}];for(var i=0;i<t.length;i++){var o=t[i];if(o.parm){var n=wijmo_1.culture.olap._ListContextMenu[o.parm];wijmo_1.assert(n,"missing localized text for item "+o.parm);o.text=o.text.replace(/([^>]+$)/,n)}}return t};_ListContextMenu.prototype._execute=function(e){var t=wijmo_1.Control.getControl(this.owner),i=t.itemsSource,o=t.selection.row,n=t.rows[o].dataItem,r=n?n.engine:null,s=this._getTargetList(r,e);switch(e){case"up":case"first":case"down":case"last":if(r){var l=i.indexOf(n),a="up"==e?l-1:"first"==e?0:"down"==e?l+1:"last"==e?i.length:-1;r.deferUpdate((function(){i.removeAt(l);i.insert(a,n)}))}break;case"filter":case"rows":case"cols":case"vals":s&&n&&s.push(n);break;case"remove":n&&r.removeField(n);break;case"edit":n&&r.editField(n)}};_ListContextMenu.prototype._canExecute=function(e){var t=wijmo_1.Control.getControl(this.owner);if(!t)return!1;var i=t.selection.row,o=i>-1?t.rows[i].dataItem:null,n=o?o.engine:null,r=this._getTargetList(n,e),s=!!o&&o instanceof CubePivotField,l=!!o&&o.isMeasure;switch(e){case"up":case"first":return i>0;case"down":case"last":return i<t.rows.length-1;case"filter":case"rows":case"cols":return!l&&r&&r.indexOf(o)<0;case"vals":return(!s||l)&&r&&r.indexOf(o)<0;case"edit":return n&&n.allowFieldEditing;case"detail":return o&&!s}return!0};_ListContextMenu.prototype._getTargetList=function(e,t){if(e)switch(t){case"filter":return e.filterFields;case"rows":return e.rowFields;case"cols":return e.columnFields;case"vals":return e.valueFields}return null};_ListContextMenu.prototype.dispose=function(){if(this.owner instanceof HTMLElement){this.owner.removeEventListener("contextmenu",this._contextMenuHandler);this._contextMenuHandler=null;this._owner=null}this.itemsSource=null;e.prototype.dispose.call(this)};_ListContextMenu._ctrlTemplate="";return _ListContextMenu}(wijmo_input_1.Menu);exports._ListContextMenu=_ListContextMenu;var PivotPanel=function(e){__extends(PivotPanel,e);function PivotPanel(t,i){var o=e.call(this,t,null,!0)||this;o._showIcons=!0;o._restrictDrag=null;o.deferredUpdateChanged=new wijmo_1.Event;o.itemsSourceChanged=new wijmo_1.Event;o.viewDefinitionChanged=new wijmo_1.Event;o.updatingView=new wijmo_1.Event;o.updatedView=new wijmo_1.Event;o._isUpdatingChangedBnd=o._isUpdatingChanged.bind(o);var n=o.getTemplate();o.applyTemplate(wijmo_1.ControlClsNames.hostElement+" "+wijmo_1.ControlClsNames.content+" "+exports.PivotPanelClsNames.hostElement,n,{_dFields:"d-fields",_dFilters:"d-filters",_dRows:"d-rows",_dCols:"d-cols",_dVals:"d-vals",_dProgress:"d-prog",_btnUpdate:"btn-update",_chkDefer:"chk-defer",_gFlds:"g-flds",_gDrag:"g-drag",_gFlt:"g-flt",_gCols:"g-cols",_gRows:"g-rows",_gVals:"g-vals",_gDefer:"g-defer"});o._globalize();var r=o.hostElement;o.addEventListener(r,"dragstart",o._dragstart.bind(o));o.addEventListener(r,"dragover",o._dragover.bind(o));o.addEventListener(r,"dragleave",o._dragover.bind(o));o.addEventListener(r,"drop",o._drop.bind(o));o.addEventListener(r,"dragend",o._dragend.bind(o));o._lbFields=o._createFieldGrid(o._dFields);o._lbFilters=o._createFieldGrid(o._dFilters);o._lbRows=o._createFieldGrid(o._dRows);o._lbCols=o._createFieldGrid(o._dCols);o._lbVals=o._createFieldGrid(o._dVals);o._ctxMenuShort=new _ListContextMenu(!1);var s=o._ctxMenuShort;s.attach(o._lbFields);(s=o._ctxMenuFull=new _ListContextMenu(!0)).attach(o._lbFilters);s.attach(o._lbRows);s.attach(o._lbCols);s.attach(o._lbVals);o._dMarker=wijmo_1.createElement('<div class="'+wijmo_grid_1.FlexGridClsNames.marker+'" style="display:none"> </div>');o.hostElement.appendChild(o._dMarker);o.addEventListener(o._btnUpdate,"click",(function(e){o._ng.refresh(!0);o.refresh();e.preventDefault()}));o.addEventListener(o._chkDefer,"click",(function(e){o.deferredUpdate=o._chkDefer.checked;o._updateDeferredUpdateElements()}));o.engine=new PivotEngine;o.initialize(i);return o}Object.defineProperty(PivotPanel,"controlTemplate",{get:function(){PivotPanel._ctrlTemplate||(PivotPanel._ctrlTemplate='<div><label wj-part="g-flds"></label><div wj-part="d-fields"></div><label wj-part="g-drag"></label><table><tr><td width="50%"><label><span class="'+wijmo_1.GlyphClsNames.glyph+" "+wijmo_1.GlyphClsNames.filter+'"></span> <span wj-part="g-flt"></span></label><div wj-part="d-filters"></div></td><td width= "50%" style="border-left-style:solid"><label><span class='+wijmo_1.GlyphClsNames.glyph+'>⫴</span> <span wj-part="g-cols"></span></label><div wj-part="d-cols"></div></td></tr><tr style="border-top-style:solid"><td width="50%"><label><span class='+wijmo_1.GlyphClsNames.glyph+'>≡</span> <span wj-part="g-rows"></span></label><div wj-part="d-rows"></div></td><td width= "50%" style="border-left-style:solid"><label><span class='+wijmo_1.GlyphClsNames.glyph+'>Σ</span> <span wj-part="g-vals"></span></label><div wj-part="d-vals"></div></td></tr></table><div wj-part="d-prog" class='+wijmo_1.ControlStateClsNames.selected+' style="width:0px;height:3px"></div><div style="display:table"><label style="display:table-cell;vertical-align:middle"><input wj-part="chk-defer" type="checkbox"/> <span wj-part="g-defer"></span></label><button wj-part="btn-update" class="'+wijmo_1.InputFormElementsClsNames.btn+" "+wijmo_1.ControlStateClsNames.disabled+'" style="float:right;margin:6px" disabled></button></div></div>');return PivotPanel._ctrlTemplate},set:function(e){PivotPanel._ctrlTemplate=e},enumerable:!0,configurable:!0});PivotPanel.prototype._getProductInfo=function(){return"D6F4,PivotPanel"};Object.defineProperty(PivotPanel.prototype,"engine",{get:function(){return this._ng},set:function(e){var t,i=this,o=this._ng;if(o){o.itemsSourceChanged.removeHandler(this._itemsSourceChanged);o.viewDefinitionChanged.removeHandler(this._viewDefinitionChanged);o.updatingView.removeHandler(this._updatingView);o.updatedView.removeHandler(this._updatedView);o.error.removeHandler(this._requestError);o._isUpdatingChanged.removeHandler(this._isUpdatingChangedBnd);t=this.deferredUpdate}e=wijmo_1.asType(e,PivotEngine,!1);(o=this._ng=e).itemsSourceChanged.addHandler(this._itemsSourceChanged,this);o.viewDefinitionChanged.addHandler(this._viewDefinitionChanged,this);o.updatingView.addHandler(this._updatingView,this);o.updatedView.addHandler(this._updatedView,this);o.error.addHandler(this._requestError,this);o._isUpdatingChanged.addHandler(this._isUpdatingChangedBnd);t!==this.deferredUpdate&&this.onDeferredUpdateChanged();this._lbFields.itemsSource=e.fields;this._lbFilters.itemsSource=e.filterFields;this._lbRows.itemsSource=e.rowFields;this._lbCols.itemsSource=e.columnFields;this._lbVals.itemsSource=e.valueFields;this._filterFieldVisibleWithRoot=function(e){return e.visible&&null==e.parentField};this._filterFieldVisibleOnly=function(e){return e.visible};this._lbFields.collectionView.filter=this._filterFieldVisibleWithRoot;"Filters,Rows,Cols,Vals".split(",").forEach((function(e){i["_lb"+e].collectionView.filter=i._filterFieldVisibleOnly}));this._updateDeferredUpdateElements()},enumerable:!0,configurable:!0});Object.defineProperty(PivotPanel.prototype,"itemsSource",{get:function(){return this._ng.itemsSource},set:function(e){e instanceof PivotEngine?this.engine=e:this._ng.itemsSource=e},enumerable:!0,configurable:!0});Object.defineProperty(PivotPanel.prototype,"collectionView",{get:function(){return this._ng.collectionView},enumerable:!0,configurable:!0});Object.defineProperty(PivotPanel.prototype,"pivotView",{get:function(){return this._ng.pivotView},enumerable:!0,configurable:!0});Object.defineProperty(PivotPanel.prototype,"autoGenerateFields",{get:function(){return this.engine.autoGenerateFields},set:function(e){this._ng.autoGenerateFields=e},enumerable:!0,configurable:!0});Object.defineProperty(PivotPanel.prototype,"fields",{get:function(){return this._ng.fields},enumerable:!0,configurable:!0});Object.defineProperty(PivotPanel.prototype,"rowFields",{get:function(){return this._ng.rowFields},enumerable:!0,configurable:!0});Object.defineProperty(PivotPanel.prototype,"columnFields",{get:function(){return this._ng.columnFields},enumerable:!0,configurable:!0});Object.defineProperty(PivotPanel.prototype,"valueFields",{get:function(){return this._ng.valueFields},enumerable:!0,configurable:!0});Object.defineProperty(PivotPanel.prototype,"filterFields",{get:function(){return this._ng.filterFields},enumerable:!0,configurable:!0});Object.defineProperty(PivotPanel.prototype,"viewDefinition",{get:function(){return this._ng.viewDefinition},set:function(e){this._ng.viewDefinition=e},enumerable:!0,configurable:!0});Object.defineProperty(PivotPanel.prototype,"isViewDefined",{get:function(){return this._ng.isViewDefined},enumerable:!0,configurable:!0});Object.defineProperty(PivotPanel.prototype,"showFieldIcons",{get:function(){return this._showIcons},set:function(e){if(e!=this._showIcons){this._showIcons=wijmo_1.asBoolean(e);this.invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(PivotPanel.prototype,"restrictDragging",{get:function(){return this._restrictDrag},set:function(e){this._restrictDrag=wijmo_1.asBoolean(e,!0)},enumerable:!0,configurable:!0});Object.defineProperty(PivotPanel.prototype,"deferredUpdate",{get:function(){return this.engine.isUpdating},set:function(e){this.deferredUpdate!=e&&(e?this._ng.beginUpdate():this._ng.endUpdate())},enumerable:!0,configurable:!0});PivotPanel.prototype.onDeferredUpdateChanged=function(e){this.deferredUpdateChanged.raise(this,e)};PivotPanel.prototype.onItemsSourceChanged=function(e){this.itemsSourceChanged.raise(this,e)};PivotPanel.prototype.onViewDefinitionChanged=function(e){this.viewDefinitionChanged.raise(this,e)};PivotPanel.prototype.onUpdatingView=function(e){this.updatingView.raise(this,e)};PivotPanel.prototype.onUpdatedView=function(e){this.updatedView.raise(this,e)};PivotPanel.prototype.refresh=function(t){var i=this;void 0===t&&(t=!0);if(this.hostElement){["Fields","Filters","Rows","Cols","Vals"].forEach((function(e){var t=i["_lb"+e],o=t?t.collectionView:null;if(t&&o){t.refresh();o.refresh()}}));if(t){this._globalize();this._ctxMenuShort.refresh();this._ctxMenuFull.refresh()}}e.prototype.refresh.call(this,t)};PivotPanel.prototype._copy=function(e,t){switch(e){case"engine":this.engine=t;return!0}return!1};PivotPanel.prototype._globalize=function(){var e=wijmo_1.culture.olap.PivotPanel;wijmo_1.setText(this._gFlds,e.fields);wijmo_1.setText(this._gDrag,e.drag);wijmo_1.setText(this._gFlt,e.filters);wijmo_1.setText(this._gCols,e.cols);wijmo_1.setText(this._gRows,e.rows);wijmo_1.setText(this._gVals,e.vals);wijmo_1.setText(this._gDefer,e.defer);wijmo_1.setText(this._btnUpdate,e.update)};PivotPanel.prototype._itemsSourceChanged=function(e,t){this.onItemsSourceChanged(t)};PivotPanel.prototype._viewDefinitionChanged=function(e,t){this.invalidate();this.onViewDefinitionChanged(t)};PivotPanel.prototype._updatingView=function(e,t){var i=wijmo_1.clamp(t.progress,5,100)%100;this._dProgress.style.width=i+"%";this.onUpdatingView(t)};PivotPanel.prototype._updatedView=function(e,t){this.onUpdatedView(t)};PivotPanel.prototype._requestError=function(e,t){this._dProgress.style.width="0"};PivotPanel.prototype._isUpdatingChanged=function(){this._updateDeferredUpdateElements();this.onDeferredUpdateChanged()};PivotPanel.prototype._updateDeferredUpdateElements=function(){var e=this.deferredUpdate;this._chkDefer.checked=e;wijmo_1.enable(this._btnUpdate,e)};PivotPanel.prototype._createFieldGrid=function(e){var t=this,i=new wijmo_grid_1.FlexGrid(e,{autoGenerateColumns:!1,childItemsPath:"subFields",columns:[{binding:"header",width:"*"}],headersVisibility:"None",selectionMode:"Cell",alternatingRowStep:0});i.cells.hostElement.parentElement.style.overflowX="hidden";i.formatItem.addHandler((function(e,i){var o=e.rows[i.row].dataItem;wijmo_1.assert(o instanceof PivotField,"PivotField expected...");var n=o._hasSubFields();wijmo_1.toggleClass(i.cell,exports.PivotPanelClsNames.header,n);i.cell.setAttribute("draggable",(!n).toString());var r=i.cell.innerHTML;o.filter.isActive&&(r+=" <span class="+wijmo_1.GlyphClsNames.filter+"></span>");e!=t._lbVals||wijmo_1.isFunction(o.getAggregateValue)||(r+=' <span class="'+exports.PivotPanelClsNames.aggregate+'">('+wijmo_1.Aggregate[o.aggregate]+")</span>");if(e==t._lbFields&&!n){if(t._showIcons){var s=o.isMeasure?"measure":"dimension";r='<span class="'+wijmo_1.GlyphClsNames.glyph+"-"+s+'"></span> '+r}r='<label><input type="checkbox"'+(o.isActive?" checked":"")+"> "+r+"</label>"}i.cell.innerHTML=r}));i.addEventListener(e,"click",(function(e){var o=e.target;if(o instanceof HTMLInputElement&&"checkbox"==o.type){var n=t._hitTestField(i,e);n instanceof PivotField&&(n.isActive=o.checked)}}));return i};PivotPanel.prototype._dragstart=function(e){var t=this._getFlexGridTarget(e);if(t){this._dragField=this._hitTestField(t,e);this._dragSource=this._dragField instanceof PivotField?t.hostElement:null;if(this._dragSource&&e.dataTransfer){wijmo_1._startDrag(e.dataTransfer,"copyMove");e.stopPropagation()}}};PivotPanel.prototype._dragover=function(e){var t=!1,i=this._getFlexGridTarget(e);if(i&&this._dragField){if(this._dragSource==this._dFields&&i!=this._lbFields){var o=i.itemsSource;if(null==o.maxItems||o.length<o.maxItems){var n=this._dragField;i.itemsSource.indexOf(n)<0?t=!0:i==this._lbVals&&(t=!(n instanceof CubePivotField))}}this._dragSource&&this._dragSource!=this._dFields&&(t=!0)}if(t&&this._getRestrictDrag()&&this._dragSource!=i.hostElement){var r=this._dragField.isMeasure;i==this._lbVals?t=r:i!=this._lbRows&&i!=this._lbCols||(t=!r)}if(t){this._updateDropMarker(i,e);e.dataTransfer.dropEffect=this._dragSource==this._dFields?"copy":"move";e.preventDefault();e.stopPropagation()}else this._updateDropMarker()};PivotPanel.prototype._drop=function(e){var t=this,i=this._getFlexGridTarget(e);if(i&&this._dragField){var o=wijmo_1.Control.getControl(this._dragSource),n=this._dragField;if(o==this._lbFields&&i==this._lbVals&&i.itemsSource.indexOf(n)>-1){n=n._clone();this.engine.fields.push(n)}i==this._lbFields?n.isActive=!1:this._ng.deferUpdate((function(){var e=i.itemsSource,o=e.indexOf(n);if(o!=t._dropIndex){if(o>-1){e.removeAt(o);o<t._dropIndex&&t._dropIndex--}e.insert(t._dropIndex,n)}}))}this._resetMouseState()};PivotPanel.prototype._dragend=function(e){this._resetMouseState()};PivotPanel.prototype._hitTestField=function(e,t){var i=e.hitTest(t.target);if(i.panel==e.cells&&i.range.isValid){e.select(i.range,!0);return e.rows[i.row].dataItem}return null};PivotPanel.prototype._getRestrictDrag=function(){var e=this._restrictDrag;null==e&&this.fields.length&&(e=this.fields[0]instanceof CubePivotField);return e};PivotPanel.prototype._resetMouseState=function(){this._dragSource=null;this._updateDropMarker()};PivotPanel.prototype._getFlexGridTarget=function(e){var t=wijmo_1.Control.getControl(wijmo_1.closest(e.target,"."+wijmo_grid_1.FlexGridClsNames.hostElement));return t instanceof wijmo_grid_1.FlexGrid?t:null};PivotPanel.prototype._updateDropMarker=function(e,t){if(t){var i,o=this.hostElement,n=o.getBoundingClientRect();if(e.rows.length){var r=e.hitTest(t).row;if(r>-1){i=e.getCellBoundingRect(r,0);if(t.clientY>o.scrollTop+i.top+i.height/2&&r<e.rows.length){i.top+=i.height;r++}this._dropIndex=r}else{r=e.viewRange.bottomRow;(i=e.getCellBoundingRect(r,0)).top+=i.height;this._dropIndex=r+1}}else{(i=wijmo_1.Rect.fromBoundingRect(e.hostElement.getBoundingClientRect())).top+=4;this._dropIndex=0}wijmo_1.setCss(this._dMarker,{left:Math.round(i.left-n.left)+o.scrollLeft,top:Math.round(i.top-n.top-2)+o.scrollTop,width:Math.round(i.width),height:4,display:""})}else this._dMarker.style.display="none"};PivotPanel.prototype.dispose=function(){var t=this;this._lbFields&&this._lbFields.collectionView&&(this._lbFields.collectionView.filter=null);["Filters","Rows","Cols","Vals"].forEach((function(e){var i=t["_lb"+e];i&&i.collectionView&&(i.collectionView.filter=null)}));if(this._ctxMenuShort){this._ctxMenuShort.dispose();this._ctxMenuShort=null}if(this._ctxMenuFull){this._ctxMenuFull.dispose();this._ctxMenuFull=null}if(this._lbFields){this._lbFields.dispose();this._lbFields=null}if(this._lbFilters){this._lbFilters.dispose();this._lbFilters=null}if(this._lbRows){this._lbRows.dispose();this._lbRows=null}if(this._lbCols){this._lbCols.dispose();this._lbCols=null}if(this._lbVals){this._lbVals.dispose();this._lbVals=null}if(this._ng){this._ng.itemsSourceChanged.removeHandler(this._itemsSourceChanged);this._ng.viewDefinitionChanged.removeHandler(this._viewDefinitionChanged);this._ng.updatingView.removeHandler(this._updatingView);this._ng.updatedView.removeHandler(this._updatedView);this._ng.error.removeHandler(this._requestError);this._ng._isUpdatingChanged.removeHandler(this._isUpdatingChangedBnd)}this.engine.dispose();e.prototype.dispose.call(this)};PivotPanel._ctrlTemplate="";return PivotPanel}(wijmo_1.Control);exports.PivotPanel=PivotPanel;var PivotGrid=function(e){__extends(PivotGrid,e);function PivotGrid(t,i){var o=e.call(this,t)||this;o._showDetailOnDoubleClick=!0;o._collapsibleSubtotals=!0;o._customCtxMenu=!0;o._ctxMenu=new _GridContextMenu;o._showRowFldSort=!1;o._showRowFldHdrs=!0;o._showColFldHdrs=!0;o._showValFldHdrs=!1;o._centerVert=!0;o._collapsedKeys={};o._resizingColumn=!1;o._outlineMode=!1;o._ignoreClick=!1;o._colRowFields=new Map;o._prevCulture=wijmo_1.culture.Globalize.name;o._hdrCols._setDefaultSize(o._cols.defaultSize);wijmo_1.addClass(o.hostElement,exports.PivotGridClsNames.hostElement);o.isReadOnly=!0;o.copyHeaders=wijmo_grid_1.HeadersVisibility.All;o.deferResizing=!0;o.alternatingRowStep=0;o.autoGenerateColumns=!1;o.allowDragging=wijmo_grid_1.AllowDragging.None;o.allowMerging=wijmo_grid_1.AllowMerging.All;o.mergeManager=new _PivotMergeManager;o.customContextMenu=!0;o.treeIndent=32;o.initialize(i);o.formatItem.addHandler(o._formatItem,o);var n=o.hostElement;o.addEventListener(n,"mousedown",o._mousedown.bind(o),!0);o.addEventListener(n,"mouseup",o._mouseup.bind(o),!0);o.addEventListener(n,"dblclick",o._dblclick.bind(o),!0);o.addEventListener(n,"click",o._click.bind(o),!0);o.addEventListener(n,"keydown",o._keydown.bind(o),!0);o._ctxMenu.attach(o);return o}Object.defineProperty(PivotGrid,"controlTemplate",{get:function(){PivotGrid._ctrlTemplate||(PivotGrid._ctrlTemplate=wijmo_grid_1.FlexGrid.controlTemplate);return PivotGrid._ctrlTemplate},set:function(e){PivotGrid._ctrlTemplate=e},enumerable:!0,configurable:!0});PivotGrid.prototype._getProductInfo=function(){return"D6F4,PivotGrid"};Object.defineProperty(PivotGrid.prototype,"engine",{get:function(){return this._ng},enumerable:!0,configurable:!0});Object.defineProperty(PivotGrid.prototype,"showDetailOnDoubleClick",{get:function(){return this._showDetailOnDoubleClick},set:function(e){this._showDetailOnDoubleClick=wijmo_1.asBoolean(e)},enumerable:!0,configurable:!0});Object.defineProperty(PivotGrid.prototype,"detailDialog",{get:function(){this._dlgDetail||(this._dlgDetail=new DetailDialog(document.createElement("div")));return this._dlgDetail},enumerable:!0,configurable:!0});Object.defineProperty(PivotGrid.prototype,"showRowFieldHeaders",{get:function(){return this._showRowFldHdrs},set:function(e){if(e!=this._showRowFldHdrs){this._showRowFldHdrs=wijmo_1.asBoolean(e);this._updateFixedContent()}},enumerable:!0,configurable:!0});Object.defineProperty(PivotGrid.prototype,"showColumnFieldHeaders",{get:function(){return this._showColFldHdrs},set:function(e){if(e!=this._showColFldHdrs){this._showColFldHdrs=wijmo_1.asBoolean(e);this._updateFixedContent()}},enumerable:!0,configurable:!0});Object.defineProperty(PivotGrid.prototype,"showValueFieldHeaders",{get:function(){return this._showValFldHdrs},set:function(e){if(e!=this._showValFldHdrs){this._showValFldHdrs=wijmo_1.asBoolean(e);this._updateFixedCounts();this._updateFixedContent()}},enumerable:!0,configurable:!0});Object.defineProperty(PivotGrid.prototype,"showRowFieldSort",{get:function(){return this._showRowFldSort},set:function(e){if(e!=this._showRowFldSort){this._showRowFldSort=wijmo_1.asBoolean(e);this._updateFixedContent()}},enumerable:!0,configurable:!0});Object.defineProperty(PivotGrid.prototype,"customContextMenu",{get:function(){return this._customCtxMenu},set:function(e){this._customCtxMenu=wijmo_1.asBoolean(e)},enumerable:!0,configurable:!0});Object.defineProperty(PivotGrid.prototype,"collapsibleSubtotals",{get:function(){return this._collapsibleSubtotals},set:function(e){if(e!=this._collapsibleSubtotals){this._collapsibleSubtotals=wijmo_1.asBoolean(e);this.invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(PivotGrid.prototype,"centerHeadersVertically",{get:function(){return this._centerVert},set:function(e){if(e!=this._centerVert){this._centerVert=wijmo_1.asBoolean(e);this.invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(PivotGrid.prototype,"outlineMode",{get:function(){return this._outlineMode},set:function(e){if(e!=this._outlineMode){this._outlineMode=wijmo_1.asBoolean(e);this._bindGrid(!0)}},enumerable:!0,configurable:!0});PivotGrid.prototype.getKeys=function(e,t){var i=this.rows[wijmo_1.asInt(e)],o=this.columns[wijmo_1.asInt(t)],n=i?i.dataItem:null,r=o?o.binding:null;return this._ng.getKeys(n,r)};PivotGrid.prototype.getDetail=function(e,t){var i=this.rows[wijmo_1.asInt(e)].dataItem,o=this.columns[wijmo_1.asInt(t)].binding;return this._ng.getDetail(i,o)};PivotGrid.prototype.getDetailView=function(e,t){var i=this.rows[wijmo_1.asInt(e)].dataItem,o=this.columns[wijmo_1.asInt(t)].binding;return this._ng.getDetailView(i,o)};PivotGrid.prototype.showDetail=function(e,t){if(this._ng.valueFields.length){var i=this.detailDialog;i.showDetail(this,new wijmo_grid_1.CellRange(e,t));i.show(!0)}};PivotGrid.prototype.collapseRowsToLevel=function(e){this._collapseRowsToLevel(e)};PivotGrid.prototype.collapseColumnsToLevel=function(e){this._collapseColsToLevel(e)};PivotGrid.prototype._getQuickAutoSize=function(){return wijmo_1.isBoolean(this.quickAutoSize)?this.quickAutoSize:this.formatItem.handlerCount<=1&&null==this.itemFormatter};PivotGrid.prototype._bindGrid=function(t){var i=this;this.deferUpdate((function(){var o=i.preserveOutlineState||i._resizingColumn,n=i._collapsedKeys,r=i.rows,s=i.columns;o||(n=i._collapsedKeys={});e.prototype._bindGrid.call(i,t);if(i._ng&&o&&!wijmo_1.isEmpty(n)){for(var l=i._ng.totalsBeforeData,a=l?r.length-1:0,d=l?-1:r.length,h=l?-1:1,u=a;u!=d;u+=h){var _=r[u].dataItem;(c=_?_[_PivotKey._ROW_KEY_NAME]:null)&&c.level>=0&&n[c.toString()]&&i._setRowCollapsed(new wijmo_grid_1.CellRange(u,c.level-1),!0)}a=l?s.length-1:0;d=l?-1:s.length;h=l?-1:1;for(u=a;u!=d;u+=h){var c,p=s[u].binding;(c=i._ng._getKey(p))&&c.level>0&&n[c.toString()]&&i._setColCollapsed(new wijmo_grid_1.CellRange(c.level-1,u),!0)}}}))};PivotGrid.prototype._getCollectionView=function(e){e instanceof PivotPanel?e=e.engine.pivotView:e instanceof PivotEngine&&(e=e.pivotView);return wijmo_1.asCollectionView(e)};PivotGrid.prototype.refresh=function(t){void 0===t&&(t=!0);this._ctxMenu.refresh();var i=wijmo_1.culture.Globalize.name;if(this._prevCulture!==i){this._prevCulture=i;this._updateFixedContent()}e.prototype.refresh.call(this,t)};PivotGrid.prototype.onItemsSourceChanged=function(t){if(this._ng){this._ng.updatingView.removeHandler(this._updatingView,this);this._ng.viewDefinitionChanged.removeHandler(this._viewDefinitionChanged,this);this._ng._hasDeferredUpdatesChanged.removeHandler(this._hasDeferredUpdatesChanged,this)}this._collapsedKeys={};var i=this.collectionView;this._ng=i instanceof PivotCollectionView?i.engine:null;if(this._ng){this._ng.updatingView.addHandler(this._updatingView,this);this._ng.viewDefinitionChanged.addHandler(this._viewDefinitionChanged,this);this._ng._hasDeferredUpdatesChanged.addHandler(this._hasDeferredUpdatesChanged,this)}this._updatingView();this._bindGrid(!0);e.prototype.onItemsSourceChanged.call(this,t)};PivotGrid.prototype.onResizedColumn=function(t){var i=this._ng;if(i){this._resizingColumn=!0;if(t.panel.columns==this.rowHeaders.columns){(n=this._colRowFields.get(t.getColumn()))instanceof PivotField&&(n.width=t.panel.columns[t.col].renderWidth)}if(t.panel.columns==this.columnHeaders.columns){var o=i.valueFields;if(o.length>0){var n;(n=o[t.col%o.length]).width=t.panel.columns[t.col].renderWidth}}this._resizingColumn=!1}e.prototype.onResizedColumn.call(this,t)};PivotGrid.prototype.onSortingColumn=function(t){var i=this._ng;return(!i||!i.isUpdating)&&e.prototype.onSortingColumn.call(this,t)};PivotGrid.prototype.onDraggingColumn=function(t){var i=this._ng;return(!i||!i.isUpdating)&&e.prototype.onDraggingColumn.call(this,t)};PivotGrid.prototype.onDraggedColumn=function(t){var i=this._ng;if(i&&t.panel.columns==this.topLeftCells.columns){var o=i.rowFields,n=o[t.data.col];i.deferUpdate((function(){o.removeAt(t.data.col);o.insert(t.col,n)}))}e.prototype.onDraggedColumn.call(this,t)};PivotGrid.prototype._updatingView=function(){this._updateFixedCounts();this.columns.clear();this.rows.clear()};PivotGrid.prototype._viewDefinitionChanged=function(){this._resizingColumn||(this._collapsedKeys={})};PivotGrid.prototype._hasDeferredUpdatesChanged=function(){for(var e,t=this.engine,i=t&&t.hasDeferredUpdates,o=this.hostElement.querySelectorAll("."+PivotGrid._WJC_COLLAPSE),n=0;n<o.length;n++)e=o[n],wijmo_1.toggleClass(e,PivotGrid._WJC_DISABLED,i)};PivotGrid.prototype.onLoadedRows=function(t){0==this.columns.length&&this._generateColumns();this._updateFixedCounts();this._updateFixedContent();e.prototype.onLoadedRows.call(this,t)};PivotGrid.prototype._generateColumns=function(){var e=this.collectionView,t=e?e.sourceCollection:null,i=t&&t.length,o=this.engine;if(o&&i)for(var n=Object.keys(t[0]).filter((function(e){return e!=_PivotKey._ROW_KEY_NAME})),r=[wijmo_1.Aggregate.Cnt,wijmo_1.Aggregate.CntAll],s=0;s<n.length;s++){var l=o._getFieldByColKey(n[s]);this.columns.push(new wijmo_grid_1.Column({binding:n[s],dataType:l&&-1===r.indexOf(l.aggregate)?l.dataType:wijmo_1.DataType.Number,allowMerging:!0}))}};PivotGrid.prototype._updateFixedCounts=function(){var e,t=this._ng,i=t&&t.isViewDefined;e=Math.max(1,i?t.rowFields.length:1);var o=this.topLeftCells.columns;o.clear();this._colRowFields.clear();for(var n=0;n<e;n++){var r=new wijmo_grid_1.Column({allowMerging:!0});o.push(r);i&&this._colRowFields.set(r,t.rowFields[n])}e=Math.max(1,i?t.columnFields.length:1);t&&t.columnFields.length&&(t.valueFields.length>1||this.showValueFieldHeaders)&&e++;var s=this.topLeftCells.rows;s.clear();for(n=0;n<e;n++)s.push(new wijmo_grid_1.Row)};PivotGrid.prototype._updateFixedContent=function(){var e=this._ng;if(e&&e.isViewDefined){for(var t=e.rowFields,i=e.columnFields,o=e.valueFields,n=this.outlineMode?t.map((function(e){return e.header})).join(" / "):"",r=this.topLeftCells,s=0;s<r.rows.length;s++)for(var l=0;l<r.columns.length;l++){var a="";this.showRowFieldHeaders&&l<t.length&&s==r.rows.length-1&&(a=this.outlineMode?n:t[l].header);this.showColumnFieldHeaders&&!a&&s<i.length&&0==l&&(a=i[s].header+":");r.setCellData(s,l,a,!1,!1)}r=this.rowHeaders;for(s=0;s<r.rows.length;s++){var d=r.rows[s].dataItem[_PivotKey._ROW_KEY_NAME];wijmo_1.assert(d instanceof _PivotKey,"missing PivotKey for row...");for(l=0;l<r.columns.length;l++){a=d.getValue(l,!0);r.setCellData(s,l,a,!1,!1)}}r=this.columnHeaders;for(l=0;l<r.columns.length;l++){d=e._getKey(r.columns[l].binding);wijmo_1.assert(d instanceof _PivotKey,"missing PivotKey for column...");for(s=0;s<r.rows.length;s++){a=d.getValue(s,!0);s==r.rows.length-1&&o.length&&(o.length>1||0==i.length||d.level>-1||this.showValueFieldHeaders)&&(a=o[l%o.length].header);r.setCellData(s,l,a,!1,!1)}}r=this.topLeftCells;for(l=0;l<r.columns.length;l++){var h=r.columns[l],u=l<t.length?t[l]:null;h.wordWrap=u?u.wordWrap:null;h.align=u?u.align:null;if(this.outlineMode&&l<r.columns.length-1){h.width=this.treeIndent;h.allowResizing=!1}else{h.allowResizing=!0;h.width=u&&wijmo_1.isNumber(u.width)?u.width:null}}r=this.cells;for(l=0;l<r.columns.length;l++){h=r.columns[l],u=o.length?o[l%o.length]:null;h.width=u&&wijmo_1.isNumber(u.width)?u.width:null;h.wordWrap=u?u.wordWrap:null;h.format=u?u.format:null;h.align=u?u.align:null}this.invalidate()}else this.topLeftCells.setCellData(0,0,null)};PivotGrid.prototype._updateDefaultSizes=function(){var t=e.prototype._updateDefaultSizes.call(this);this._hdrCols._setDefaultSize(4*t);return t};PivotGrid.prototype._formatItem=function(e,t){var i=this._ng,o=t.panel,n=t.cell;if(i){if(o==this.topLeftCells){var r=0==i.rowFields.length||t.row<o.rows.length-1||t.row==o.rows.length-1&&!this.showRowFieldHeaders;wijmo_1.toggleClass(n,exports.PivotGridClsNames.colFieldHdr,r);wijmo_1.toggleClass(n,exports.PivotGridClsNames.rowFieldHdr,!r)}var s,l=null;o==this.topLeftCells&&t.row==o.rows.length-1&&this.allowDragging&wijmo_grid_1.AllowDragging.Columns&&(l=!0);wijmo_1.setAttribute(n,"draggable",l);switch(o){case this.rowHeaders:s=i.rowFields[t.col%i.rowFields.length];break;case this.columnHeaders:s=i.columnFields[t.row];break;case this.cells:s=i.valueFields[t.col]}s&&s.isContentHtml&&(n.innerHTML=n.textContent);var a=o.columns[t.col].binding,d=o.rows==this.rows?i._getRowLevel(t.row):-1,h=o.columns==this.columns?i._getColLevel(a):-1;wijmo_1.toggleClass(n,exports.PivotPanelClsNames.aggregate,d>-1||h>-1);if(this._collapsibleSubtotals){if(o==this.rowHeaders&&i._getShowRowTotals()==ShowTotals.Subtotals)if(this.outlineMode){var u=this._getGroupedRows(t.range);if(t.col<i.rowFields.length-1){if(!u.containsRow(t.row)){var _=this._getRowCollapsed(t.range);n.innerHTML=this._getCollapsedGlyph(_)+n.innerHTML}}}else{u=this.getMergedRange(o,t.row,t.col,!1)||t.range;if(t.col<i.rowFields.length-1&&u.rowSpan>1){_=this._getRowCollapsed(u);n.innerHTML=this._getCollapsedGlyph(_)+n.innerHTML}}this.outlineMode&&o==this.rowHeaders&&t.range.rightCol<o.columns.length-1&&(n.innerHTML="");if(o==this.columnHeaders&&i._getShowColTotals()==ShowTotals.Subtotals){u=this.getMergedRange(o,t.row,t.col,!1)||t.range;if(t.row<i.columnFields.length-1&&u.columnSpan>1){var c=this._getColCollapsed(u);n.innerHTML=this._getCollapsedGlyph(c)+n.innerHTML}}}if(o==this.topLeftCells&&this.showRowFieldSort&&t.col<i.rowFields.length&&t.row==this._getSortRowIndex()){s=i.rowFields[t.col];wijmo_1.toggleClass(n,wijmo_grid_1.FlexGridClsNames.sortAsc,!s.descending);wijmo_1.toggleClass(n,wijmo_grid_1.FlexGridClsNames.sortDesc,s.descending);n.innerHTML+=' <span class="'+wijmo_1.GlyphClsNames.glyph+"-"+(s.descending?"down":"up")+'"></span>'}o!=this.cells&&wijmo_1.toggleClass(n,wijmo_1.UtilitesClsNames.alignVCenter,this._centerVert)}};PivotGrid.prototype._getCollapsedGlyph=function(e){var t=this.engine,i=t&&t.hasDeferredUpdates;return'<div class="'+(PivotGrid._WJC_COLLAPSE+(i?" "+PivotGrid._WJC_DISABLED:""))+'"><span class="'+wijmo_1.GlyphClsNames.glyph+"-"+(e?"plus":"minus")+'"></span></div>'};PivotGrid.prototype._mousedown=function(e){if(e.defaultPrevented||0!=e.button)this._htDown=null;else{this._htDown=this.hitTest(e);var t=this._htDown,i=t.panel;this._ignoreClick=!1;var o=this.engine,n=o&&o.hasDeferredUpdates,r=wijmo_1.closestClass(e.target,PivotGrid._WJC_COLLAPSE);if(!n&&null!=r&&null!=i){var s=t.range,l=void 0;switch(i.cellType){case wijmo_grid_1.CellType.RowHeader:var a=this.getMergedRange(i,s.row,s.col);a&&s.copy(a);l=this._getRowCollapsed(s);e.shiftKey||e.ctrlKey?this._collapseRowsToLevel(s.col+(l?2:1)):this._setRowCollapsed(s,!l);break;case wijmo_grid_1.CellType.ColumnHeader:l=this._getColCollapsed(s);e.shiftKey||e.ctrlKey?this._collapseColsToLevel(s.row+(l?2:1)):this._setColCollapsed(s,!l)}e.preventDefault();this._ignoreClick=!0;this._htDown=null;this.focus()}}};PivotGrid.prototype._mouseup=function(e){if(this._htDown&&!e.defaultPrevented&&!this._mouseHdl._szRowCol){var t=this.hitTest(e);if(this._htDown.panel==t.panel&&t.range.equals(this._htDown.range)){var i=this._ng,o=this.topLeftCells;if(t.panel==o&&t.row==o.rows.length-1&&t.col>-1){var n=t.getColumn();if(this.allowSorting&&n.allowSorting&&!t.edgeRight){var r=this._colRowFields.get(n);if(r&&!i.isUpdating){var s=new wijmo_grid_1.CellRangeEventArgs(t.panel,t.range);if(this.onSortingColumn(s)){i.pivotView.sortDescriptions.clear();r.descending=!r.descending;this.onSortedColumn(s)}}}e.preventDefault();this._ignoreClick=!0}}}};PivotGrid.prototype._click=function(e){this._ignoreClick&&e.preventDefault()};PivotGrid.prototype._dblclick=function(e){if(!e.defaultPrevented&&this._showDetailOnDoubleClick){var t=this._htDown;if(t&&t.panel==this.cells){var i=this._ng;i&&i.fields.length>0&&(i.fields[0]instanceof CubePivotField||this.showDetail(t.row,t.col))}}};PivotGrid.prototype._keydown=function(e){if(!e.defaultPrevented&&!e.ctrlKey&&e.altKey&&this.collapsibleSubtotals){var t=this.selection;if(t.isValid){var i=this._getRowLevel(t.topRow);i<0&&(i=this.rowHeaders.columns.length-1);var o=this._getKeyCode(e);switch(o){case wijmo_1.Key.Left:case wijmo_1.Key.Right:var n=new wijmo_grid_1.CellRange(t.row,i-1);this._setRowCollapsed(n,o==wijmo_1.Key.Left);e.preventDefault()}}}};PivotGrid.prototype._getRowLevel=function(e){return this._ng._getRowLevel(e)};PivotGrid.prototype._getGroupedRows=function(e){var t,i=this._getRowLevel.bind(this),o=e.col+1,n=this.rows.length,r=this._ng.totalsBeforeData,s=e.row;if(0==i(s)){s=r?1:0;t=r?n-1:n-2}else{if(r)for(;s<n&&!(i(s)<0);s++);else for(;s>=0&&!(i(s)<0);s--);for(;s>0;s--){if((l=i(s-1))>=0&&l<=o)break}for(t=s;t<n-1;t++){var l;if((l=i(t+1))>=0&&l<=o)break}}wijmo_1.assert(t>=s,"group end < start?");return t>=s?new wijmo_grid_1.CellRange(s,e.col,t,e.col2):e};PivotGrid.prototype._toggleRowCollapsed=function(e){this._setRowCollapsed(e,!this._getRowCollapsed(e))};PivotGrid.prototype._getRowCollapsed=function(e){e=this._getGroupedRows(e);var t=this._ng.totalsBeforeData?e.row-1:e.row2+1,i=this.rows[t]||this.rows[e.row],o=i?i.dataItem[_PivotKey._ROW_KEY_NAME]:null;return!!o&&this._collapsedKeys[o.toString()]};PivotGrid.prototype._setRowCollapsed=function(e,t){var i=this;e=this._getGroupedRows(e);var o=this._ng.totalsBeforeData?e.row-1:e.row2+1,n=this.rows[o]||this.rows[e.row],r=n?n.dataItem[_PivotKey._ROW_KEY_NAME]:null;r&&(this._collapsedKeys[r.toString()]=t);this.deferUpdate((function(){for(var r=e.row;r<=e.row2;r++)i.rows[r].visible=!t;n&&(n.visible=!0);if(!t){var s=i._getRowLevel(o),l=[];for(r=e.row;r<=e.row2;r++)if(i._getRowLevel(r)>-1){var a=i._getGroupedRows(new wijmo_grid_1.CellRange(r,s));wijmo_1.assert(a.row>=e.row&&a.row2<=e.row2,"child range overflow");l.push(a);r++}l.forEach((function(e){var t=i._getRowCollapsed(e);i._setRowCollapsed(e,t)}))}}))};PivotGrid.prototype._collapseRowsToLevel=function(e){var t=this;e>=this._ng.rowFields.length&&(e=-1);this.deferUpdate((function(){for(var i=0;i<t.rows.length;i++){var o=t._getRowLevel(i);if(o>0){var n=t.rows[i].dataItem[_PivotKey._ROW_KEY_NAME];t._collapsedKeys[n.toString()]=e>0&&o>=e}if(e<0)t.rows[i].visible=!0;else{var r=o>-1&&o<=e;r||(t._ng.totalsBeforeData?0==i&&(r=!0):i==t.rows.length-1&&(r=!0));t.rows[i].visible=r}}}))};PivotGrid.prototype._getColLevel=function(e){return this._ng._getColLevel(this.columns[e].binding)};PivotGrid.prototype._getGroupedCols=function(e){var t,i=this._getColLevel.bind(this),o=e.row+1,n=this.columns.length,r=this._ng.totalsBeforeData,s=e.col;if(0==i(s)){s=r?1:0;t=r?n-1:n-2}else{if(this._ng.totalsBeforeData)for(s=e.col;s<n&&!(i(s)<0);s++);else for(s=e.col;s>=0&&!(i(s)<0);s--);for(;s>0;s--){if((l=i(s-1))>=0&&l<=o)break}for(t=s;t<n-1;t++){var l;if((l=i(t+1))>=0&&l<=o)break}}wijmo_1.assert(t>=s,"group end < start?");return t>=s?new wijmo_grid_1.CellRange(e.row,s,e.row2,t):e};PivotGrid.prototype._toggleColCollapsed=function(e){this._setColCollapsed(e,!this._getColCollapsed(e))};PivotGrid.prototype._getColCollapsed=function(e){e=this._getGroupedCols(e);var t=this._ng,i=t.totalsBeforeData?e.col-t.valueFields.length:e.col2+1,o=this.columns[i],n=o?o.binding:null;return!!n&&this._collapsedKeys[n.toString()]};PivotGrid.prototype._setColCollapsed=function(e,t){var i=this;e=this._getGroupedCols(e);var o=this._ng,n=o.totalsBeforeData?e.col-o.valueFields.length:e.col2+1,r=this.columns[n],s=r?r.binding:null;s&&(this._collapsedKeys[s.toString()]=t);this.deferUpdate((function(){for(var r=1;r<=o.valueFields.length;r++)i.columns[o.totalsBeforeData?e.col-r:e.col2+r].visible=!0;for(var s=e.col;s<=e.col2;s++)i.columns[s].visible=!t;if(!t){var l=i._getColLevel(n),a=[];for(s=e.col;s<=e.col2;s++)if(i._getColLevel(s)>-1){var d=i._getGroupedCols(new wijmo_grid_1.CellRange(l,s));wijmo_1.assert(d.col>=e.col&&d.col2<=e.col2,"child range overflow");a.push(d);s+=o.valueFields.length-1}a.forEach((function(e){var t=i._getColCollapsed(e);i._setColCollapsed(e,t)}))}}))};PivotGrid.prototype._collapseColsToLevel=function(e){var t=this;e>=this._ng.columnFields.length&&(e=-1);this.deferUpdate((function(){for(var i=0;i<t.columns.length;i++){var o=t._getColLevel(i);if(o>0){var n=t._ng._getKey(t.columns[i].binding);t._collapsedKeys[n.toString()]=e>0&&o>=e}if(e<0)t.columns[i].visible=!0;else{var r=o>-1&&o<=e;t.columns[i].visible=r}}}))};PivotGrid.prototype.dispose=function(){if(this._ctxMenu){this._ctxMenu.dispose();this._ctxMenu=null}if(this._dlgDetail){this._dlgDetail.dispose();this._dlgDetail=null}if(this._ng){this._ng.updatingView.removeHandler(this._updatingView,this);this._ng.viewDefinitionChanged.removeHandler(this._viewDefinitionChanged,this);this._ng._hasDeferredUpdatesChanged.removeHandler(this._hasDeferredUpdatesChanged,this)}e.prototype.dispose.call(this)};PivotGrid._WJC_COLLAPSE=exports.PivotGridClsNames.pivotCollapse;PivotGrid._WJC_DISABLED=wijmo_1.ControlStateClsNames.disabled;PivotGrid._ctrlTemplate="";return PivotGrid}(wijmo_grid_1.FlexGrid);exports.PivotGrid=PivotGrid;var DetailDialog=function(e){__extends(DetailDialog,e);function DetailDialog(t,i){var o=e.call(this,t,null)||this,n=o.getTemplate();o.applyTemplate(wijmo_1.ControlClsNames.hostElement+" "+exports.DetailDialogClsNames.hostElement,n,{_sCnt:"sp-cnt",_dSummary:"div-summary",_dGrid:"div-grid",_btnOK:"btn-ok",_gHdr:"g-hdr"});o._g=new wijmo_grid_1.FlexGrid(o._dGrid,{isReadOnly:!0});o.initialize(i);return o}Object.defineProperty(DetailDialog,"controlTemplate",{get:function(){DetailDialog._ctrlTemplate||(DetailDialog._ctrlTemplate='<div><div class="'+exports.DetailDialogClsNames.dialogHeader+'"><span wj-part="g-hdr">Detail View:</span> <span wj-part="sp-cnt"></span></div><div class="'+exports.DetailDialogClsNames.dialogBody+'"><div wj-part="div-summary" class="'+exports.DetailDialogClsNames.summary+'"></div><div wj-part="div-grid"></div></div><div class="'+exports.DetailDialogClsNames.dialogFooter+'"><button wj-part="btn-ok"class="'+wijmo_1.UtilitesClsNames.hide+" "+wijmo_1.InputFormElementsClsNames.btn+'">OK</button> </div></div>');return DetailDialog._ctrlTemplate},set:function(e){DetailDialog._ctrlTemplate=e},enumerable:!0,configurable:!0});DetailDialog.prototype.showDetail=function(e,t){var i=this,o=e.getDetailView(t.row,t.col);this._g.itemsSource=o;var n=wijmo_1.tryCast(o,"IPagedCollectionView");this._updateDetailCount(n?n.totalItemCount:o.items.length);o.collectionChanged.addHandler((function(){i._updateDetailCount(o.items.length)}));var r=e.engine,s=wijmo_1.culture.olap.DetailDialog,l="";this._gHdr.textContent=s.header;this._btnOK.textContent=s.ok;var a=e.rows[t.row].dataItem[_PivotKey._ROW_KEY_NAME];this._rowHdr=wijmo_1.escapeHtml(this._getHeader(a));this._rowHdr&&(l+=s.row+": <b>"+this._rowHdr+"</b><br>");var d=r._getKey(e.columns[t.col].binding);this._colHdr=wijmo_1.escapeHtml(this._getHeader(d));this._colHdr&&(l+=s.col+": <b>"+this._colHdr+"</b><br>");var h=r.valueFields,u=h[t.col%h.length],_=e.getCellData(t.row,t.col,!0);this._cellHdr=wijmo_1.escapeHtml(u.header);this._cellValue=wijmo_1.escapeHtml(_);l+=this._cellHdr+": <b>"+this._cellValue+"</b>";this._dSummary.innerHTML=l};Object.defineProperty(DetailDialog.prototype,"rowHeader",{get:function(){return this._rowHdr},enumerable:!0,configurable:!0});Object.defineProperty(DetailDialog.prototype,"columnHeader",{get:function(){return this._colHdr},enumerable:!0,configurable:!0});Object.defineProperty(DetailDialog.prototype,"cellHeader",{get:function(){return this._cellHdr},enumerable:!0,configurable:!0});Object.defineProperty(DetailDialog.prototype,"cellValue",{get:function(){return this._cellValue},enumerable:!0,configurable:!0});Object.defineProperty(DetailDialog.prototype,"detailCount",{get:function(){return this._detailCount},enumerable:!0,configurable:!0});DetailDialog.prototype._updateDetailCount=function(e){var t=wijmo_1.culture.olap.DetailDialog;this._sCnt.textContent=wijmo_1.format(1==e?t.item:t.items,{cnt:e});this._detailCount=e};DetailDialog.prototype._getHeader=function(e){if(e&&e.values&&e.values.length){for(var t=[],i=0;i<e.values.length;i++)t.push(e.getValue(i,!0));return t.join(" - ")}return null};DetailDialog._ctrlTemplate="";return DetailDialog}(wijmo_input_1.Popup);exports.DetailDialog=DetailDialog;var PivotChartType,LegendVisibility,_PivotMergeManager=function(e){__extends(_PivotMergeManager,e);function _PivotMergeManager(){return null!==e&&e.apply(this,arguments)||this}_PivotMergeManager.prototype.getMergedRange=function(e,t,i,o){void 0===o&&(o=!0);return this._getMergedRange(e,t,i,o)};_PivotMergeManager.prototype._getMergedRange=function(t,i,o,n,r){void 0===n&&(n=!0);void 0===r&&(r=!0);var s=t.grid.collectionView;this._ng=s instanceof PivotCollectionView?s.engine:null;if(!this._ng)return e.prototype._getMergedRange.call(this,t,i,o,n,r);if(i<0||i>=t.rows.length||o<0||o>=t.columns.length)return null;var l=t.grid.allowMerging,a=wijmo_grid_1.AllowMerging;switch(t.cellType){case wijmo_grid_1.CellType.TopLeft:return 0!=(l&a.AllHeaders)?this._getMergedTopLeftRange(t,i,o):null;case wijmo_grid_1.CellType.RowHeader:return 0!=(l&a.RowHeaders)?this._getMergedRowHeaderRange(t,i,o,n?t.viewRange:null):null;case wijmo_grid_1.CellType.ColumnHeader:return 0!=(l&a.ColumnHeaders)?this._getMergedColumnHeaderRange(t,i,o,n?t.viewRange:null):null}return null};_PivotMergeManager.prototype._getMergedTopLeftRange=function(e,t,i){var o=new wijmo_grid_1.CellRange(t,i),n=e.grid;if(n.outlineMode&&n.showRowFieldHeaders&&o.row==e.rows.length-1){o.col=0;o.col2=e.columns.length-1;return o}for(;o.col>0&&!e.getCellData(t,o.col,!0);)o.col--;for(;o.col2<e.columns.length-1&&!e.getCellData(t,o.col2+1,!0);)o.col2++;return o.isSingleCell?null:o};_PivotMergeManager.prototype._getMergedRowHeaderRange=function(e,t,i,o){var n=e.grid,r=e.columns[i],s=e.columns,l=e.rows;if(!r.allowMerging)return null;if(n.outlineMode){if(this._isSubtotal(e,t,i)||this._isSubtotal(e,t,i+1)){var a=this._getOutlineRange(e,t,i);return a.isSingleCell?null:a}if(i<e.columns.length-1){var d=n._getGroupedRows(new wijmo_grid_1.CellRange(t,i));return d.isSingleCell?null:d}return null}var h=this._ng._getRowLevel(t);if(h>-1&&i>=h){var u=e.getCellData(t,i,!1),_=void 0,c=void 0,p=0,g=s.length-1;if(i>=s._frozenInternal&&n._vtCols<s.length&&o){p=o.col;g=o.col2}for(_=i;_>p&&e.getCellData(t,_-1,!1)==u;_--);for(c=i;c<g&&e.getCellData(t,c+1,!1)==u;c++);return _!=c?new wijmo_grid_1.CellRange(t,_,t,c):null}var f,v,m=0,w=l.length-1;if(i>=l._frozenInternal&&n._vtRows<l.length&&o){m=o.row;w=o.row2}for(f=t;f>m&&this._sameColumnValues(e,t,f-1,i);f--);for(v=t;v<w&&this._sameColumnValues(e,t,v+1,i);v++);return f!=v?new wijmo_grid_1.CellRange(f,i,v,i):null};_PivotMergeManager.prototype._sameColumnValues=function(e,t,i,o){for(;o>=0;o--){if(e.getCellData(t,o,!1)!=e.getCellData(i,o,!1))return!1}return!0};_PivotMergeManager.prototype._isSubtotal=function(e,t,i){var o=e.rows[t].dataItem,n=o?o[_PivotKey._ROW_KEY_NAME]:null;return o&&i>n.values.length-1&&i<e.columns.length};_PivotMergeManager.prototype._getOutlineRange=function(e,t,i){var o=new wijmo_grid_1.CellRange(t,i);o.col2=e.columns.length-1;for(;o.col&&this._isSubtotal(e,t,o.col);)o.col--;return o};_PivotMergeManager.prototype._getMergedColumnHeaderRange=function(e,t,i,o){var n=e.columns[i],r=this._ng._getKey(n.binding),s=e.getCellData(t,i,!1),l=e.grid,a=e.columns,d=e.rows,h=this._ng._getColLevel(r);if(h>-1&&t>=h){var u=void 0,_=void 0,c=0,p=d.length-1;if(i>=d._frozenInternal&&l._vtRows<d.length&&o){c=o.row;p=o.row2}for(u=t;u>c&&e.getCellData(u-1,i,!1)==s;u--);for(_=t;_<p&&e.getCellData(_+1,i,!1)==s;_++);if(u!=_)return new wijmo_grid_1.CellRange(u,i,_,i)}if(o){i<e.columns._frozenInternal&&(o.col=o.col2=0);t<e.rows._frozenInternal&&(o.row=o.row2=0)}var g,f,v=0,m=a.length-1;if(i>=a._frozenInternal&&l._vtCols<a.length&&o){v=o.col;m=o.col2}for(g=i;g>v&&this._sameRowValues(e,t,i,g-1);g--);for(f=i;f<m&&this._sameRowValues(e,t,i,f+1);f++);return g!=f?new wijmo_grid_1.CellRange(t,g,t,f):null};_PivotMergeManager.prototype._sameRowValues=function(e,t,i,o){for(;t>=0;t--){if(e.getCellData(t,i,!1)!=e.getCellData(t,o,!1))return!1}return!0};return _PivotMergeManager}(wijmo_grid_1.MergeManager);exports._PivotMergeManager=_PivotMergeManager;!function(e){e[e.Column=0]="Column";e[e.Bar=1]="Bar";e[e.Scatter=2]="Scatter";e[e.Line=3]="Line";e[e.Area=4]="Area";e[e.Pie=5]="Pie"}(PivotChartType=exports.PivotChartType||(exports.PivotChartType={}));!function(e){e[e.Always=0]="Always";e[e.Never=1]="Never";e[e.Auto=2]="Auto"}(LegendVisibility=exports.LegendVisibility||(exports.LegendVisibility={}));var PivotChart=function(e){__extends(PivotChart,e);function PivotChart(t,i){var o=e.call(this,t)||this;o._chartType=PivotChartType.Column;o._showHierarchicalAxes=!0;o._showTotals=!1;o._showTitle=!0;o._showLegend=LegendVisibility.Always;o._legendPosition=wijmo_chart_1.Position.Right;o._maxSeries=PivotChart.MAX_SERIES;o._maxPoints=PivotChart.MAX_POINTS;o._stacking=wijmo_chart_1.Stacking.None;o._colItms=[];o._dataItms=[];o._lblsSrc=[];o._grpLblsSrc=[];wijmo_1.addClass(o.hostElement,exports.PivotChartClsNames.hostElement);o._isPieChart()?o._createFlexPie():o._createFlexChart();e.prototype.initialize.call(o,i);return o}PivotChart.prototype._getProductInfo=function(){return"D6F4,PivotChart"};Object.defineProperty(PivotChart.prototype,"engine",{get:function(){return this._ng},enumerable:!0,configurable:!0});Object.defineProperty(PivotChart.prototype,"itemsSource",{get:function(){return this._itemsSource},set:function(e){if(e&&this._itemsSource!==e){var t=this._itemsSource;e instanceof PivotPanel?e=e.engine.pivotView:e instanceof PivotEngine&&(e=e.pivotView);this._itemsSource=wijmo_1.asCollectionView(e);this._onItemsSourceChanged(t)}},enumerable:!0,configurable:!0});Object.defineProperty(PivotChart.prototype,"chartType",{get:function(){return this._chartType},set:function(e){if((e=wijmo_1.asEnum(e,PivotChartType))!=this._chartType){var t=this._chartType;this._chartType=e;this._changeChartType();e!==PivotChartType.Bar&&t!==PivotChartType.Bar||this._updatePivotChart()}},enumerable:!0,configurable:!0});Object.defineProperty(PivotChart.prototype,"showHierarchicalAxes",{get:function(){return this._showHierarchicalAxes},set:function(e){if(e!=this._showHierarchicalAxes){this._showHierarchicalAxes=wijmo_1.asBoolean(e,!0);!this._isPieChart()&&this._flexChart&&this._updateFlexChart(this._dataItms,this._lblsSrc,this._grpLblsSrc)}},enumerable:!0,configurable:!0});Object.defineProperty(PivotChart.prototype,"showTotals",{get:function(){return this._showTotals},set:function(e){if(e!=this._showTotals){this._showTotals=wijmo_1.asBoolean(e,!0);this._updatePivotChart()}},enumerable:!0,configurable:!0});Object.defineProperty(PivotChart.prototype,"showTitle",{get:function(){return this._showTitle},set:function(e){if(e!=this._showTitle){this._showTitle=wijmo_1.asBoolean(e,!0);this._updatePivotChart()}},enumerable:!0,configurable:!0});Object.defineProperty(PivotChart.prototype,"showLegend",{get:function(){return this._showLegend},set:function(e){if((e=wijmo_1.asEnum(e,LegendVisibility))!=this.showLegend){this._showLegend=e;this._updatePivotChart()}},enumerable:!0,configurable:!0});Object.defineProperty(PivotChart.prototype,"legendPosition",{get:function(){return this._legendPosition},set:function(e){if((e=wijmo_1.asEnum(e,wijmo_chart_1.Position))!=this.legendPosition){this._legendPosition=e;this._updatePivotChart()}},enumerable:!0,configurable:!0});Object.defineProperty(PivotChart.prototype,"stacking",{get:function(){return this._stacking},set:function(e){if((e=wijmo_1.asEnum(e,wijmo_chart_1.Stacking))!=this._stacking){this._stacking=e;if(this._flexChart){this._flexChart.stacking=this._stacking;this._updatePivotChart()}}},enumerable:!0,configurable:!0});Object.defineProperty(PivotChart.prototype,"maxSeries",{get:function(){return this._maxSeries},set:function(e){if(e!=this._maxSeries){this._maxSeries=wijmo_1.asNumber(e);this._updatePivotChart()}},enumerable:!0,configurable:!0});Object.defineProperty(PivotChart.prototype,"maxPoints",{get:function(){return this._maxPoints},set:function(e){if(e!=this._maxPoints){this._maxPoints=wijmo_1.asNumber(e);this._updatePivotChart()}},enumerable:!0,configurable:!0});Object.defineProperty(PivotChart.prototype,"flexChart",{get:function(){return this._flexChart},enumerable:!0,configurable:!0});Object.defineProperty(PivotChart.prototype,"flexPie",{get:function(){return this._flexPie},enumerable:!0,configurable:!0});Object.defineProperty(PivotChart.prototype,"header",{get:function(){return this._header},set:function(e){if(e!=this._header){this._header=wijmo_1.asString(e,!0);this.invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(PivotChart.prototype,"footer",{get:function(){return this._footer},set:function(e){if(e!=this._footer){this._footer=wijmo_1.asString(e,!0);this.invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(PivotChart.prototype,"headerStyle",{get:function(){return this._headerStyle},set:function(e){if(e!=this._headerStyle){this._headerStyle=e;this.invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(PivotChart.prototype,"footerStyle",{get:function(){return this._footerStyle},set:function(e){if(e!=this._footerStyle){this._footerStyle=e;this.invalidate()}},enumerable:!0,configurable:!0});PivotChart.prototype.refresh=function(t){void 0===t&&(t=!0);e.prototype.refresh.call(this,t);this._isPieChart()?this._flexPie&&this._flexPie.refresh(t):this._flexChart&&this._flexChart.refresh(t);this._updatePivotChart()};PivotChart.prototype.saveImageToDataUrl=function(e,t){this._isPieChart()?this._flexPie&&this._flexPie.saveImageToDataUrl(e,t):this._flexChart&&this._flexChart.saveImageToDataUrl(e,t)};PivotChart.prototype.saveImageToFile=function(e){this._isPieChart()?this._flexPie&&this._flexPie.saveImageToFile(e):this._flexChart&&this._flexChart.saveImageToFile(e)};PivotChart.prototype._onItemsSourceChanged=function(e){this._ng&&this._ng.updatedView.removeHandler(this._updatePivotChart,this);e&&e.collectionChanged.removeHandler(this._updatePivotChart,this);var t=this._itemsSource;this._ng=t instanceof PivotCollectionView?t.engine:null;this._ng&&this._ng.updatedView.addHandler(this._updatePivotChart,this);this._itemsSource&&this._itemsSource.collectionChanged.addHandler(this._updatePivotChart,this);this._updatePivotChart()};PivotChart.prototype._createFlexChart=function(){var e=this,t=document.createElement("div");this.hostElement.appendChild(t);this._flexChart=new wijmo_chart_1.FlexChart(t);this._flexChart._bindingSeparator=null;this._flexChart.legend.position=wijmo_chart_1.Position.Right;this._flexChart.bindingX=_PivotKey._ROW_KEY_NAME;this._flexChart.stacking=this._stacking;this._flexChart.tooltip.content=function(t){var i=t.name?"<b>"+t.name+"</b> <br/>":"";return i+=e._getLabel(t.x)+" "+e._getValue(t)};this._flexChart.hostElement.style.visibility="hidden"};PivotChart.prototype._createFlexPie=function(){var e=this,t=document.createElement("div");this.hostElement.appendChild(t);this._colMenu=new wijmo_input_1.MultiSelect(t,{displayMemberPath:"text",placeholder:wijmo_1.culture.olap.PivotPanel.cols,selectedValuePath:"prop",showSelectAllCheckbox:!0,keyActionPrintCharacters:0,keyActionTab:0});this._colMenu.hostElement.style.visibility="hidden";this._colMenu.checkedItemsChanged.addHandler((function(t,i){return e._updateFlexPieBinding()}));var i=document.createElement("div");this.hostElement.appendChild(i);this._flexPie=new wijmo_chart_1.FlexPie(i);this._flexPie.bindingName=_PivotKey._ROW_KEY_NAME;this._flexPie.tooltip.content=function(t){return"<b>"+e._getLabel(e._dataItms[t.pointIndex][_PivotKey._ROW_KEY_NAME])+"</b> <br/>"+e._getValue(t)};this._flexPie.rendering.addHandler(this._updatePieInfo,this)};PivotChart.prototype._updatePivotChart=function(){if(this._ng&&this._ng.pivotView){for(var e,t=[],i=[],o=[],n=0,r=this._ng.pivotView,s=this._ng.rowFields,l=0;l<r.items.length;l++){var a=r.items[l],d=a.$rowKey;0==l&&this._getColumns(a);if(t.length>=this._maxPoints)break;if(!this._isTotalRow(a[_PivotKey._ROW_KEY_NAME])){t.push(a);i.push({value:t.length-1,text:this._getLabel(a[_PivotKey._ROW_KEY_NAME])});for(var h=0;h<s.length;h++){o.length<=h&&o.push([]);if(this._getMergeIndex(d,e)<h){n=o[h].length-1;var u=o[h][n];0===n&&h<s.length-1&&(u.value=(u.width-1)/2);if(n>0&&h<s.length-1){var _=this._getOffsetWidth(o[h]);u.value=_+(u.width-1)/2}o[h].push({value:t.length-1,text:d.getValue(h,!0),width:1})}else{n=o[h].length-1;o[h][n].width++}}e=d}}for(h=0;h<s.length;h++)if(h<o.length){n=o[h].length-1;o[h][n].value=this._getOffsetWidth(o[h])+(o[h][n].width-1)/2}this._dataItms=t;this._lblsSrc=i;this._grpLblsSrc=o;this._updateFlexChartOrPie()}};PivotChart.prototype._updateFlexChartOrPie=function(){var e=this._isPieChart();!e&&this._flexChart?this._updateFlexChart(this._dataItms,this._lblsSrc,this._grpLblsSrc):e&&this._flexPie&&this._updateFlexPie(this._dataItms,this._lblsSrc)};PivotChart.prototype._updateFlexChart=function(e,t,i){var o,n=this._flexChart,r=n?n.hostElement:null;if(this._ng&&n&&r){n.beginUpdate();n.itemsSource=e;this._createSeries();n.series&&n.series.length>0&&e.length>0?r.style.visibility="visible":r.style.visibility="hidden";n.header=this.header||this._getChartTitle();this.headerStyle&&(n.headerStyle=this.headerStyle);this.footer&&(n.footer=this.footer);this.footerStyle&&(n.footerStyle=this.footerStyle);if(this._isRotatedChart()){if(this._showHierarchicalAxes&&i.length>0){n.axisY.itemsSource=i[i.length-1];n.axisX.labelAngle=void 0;if(i.length>=2)for(var s=i.length-2;s>=0;s--)this._createGroupAxes(i[s])}else{n.axisY.labelAngle=void 0;n.axisY.itemsSource=t}n.axisX.itemsSource=void 0}else{if(this._showHierarchicalAxes&&i.length>0){n.axisX.itemsSource=i[i.length-1];if(i.length>=2)for(s=i.length-2;s>=0;s--)this._createGroupAxes(i[s])}else{n.axisX.labelAngle=void 0;n.axisX.itemsSource=t}n.axisY.itemsSource=void 0}n.axisX.labelPadding=6;n.axisY.labelPadding=6;if(this._isRotatedChart()){o=n.axisX;n.axisY.reversed=!0}else{o=n.axisY;n.axisY.reversed=!1}n.stacking!==wijmo_chart_1.Stacking.Stacked100pc&&this._ng.valueFields.length>0&&this._ng.valueFields[0].format?o.format=this._ng.valueFields[0].format:o.format="";n.legend.position=this._getLegendPosition();n.endUpdate()}};PivotChart.prototype._updateFlexPie=function(e,t){var i=this._flexPie,o=i?i.hostElement:null,n=this._colMenu;if(this._ng&&i&&o){this._colItms.length>0&&e.length>0?o.style.visibility="visible":o.style.visibility="hidden";i.beginUpdate();i.itemsSource=e;i.bindingName=_PivotKey._ROW_KEY_NAME;this._colItms&&this._colItms.length>0&&(i.binding=this._colItms[0].prop);i.header=this.header||this._getChartTitle();this.headerStyle&&(i.headerStyle=this.headerStyle);this.footer&&(i.footer=this.footer);this.footerStyle&&(i.footerStyle=this.footerStyle);i.legend.position=this._getLegendPosition();i.endUpdate();var r=this._getTitle(this._ng.columnFields);""!==r&&(r="<b>"+r+": </b>");if(this._colItms&&this._colItms.length>1&&e.length>0){n.hostElement.style.visibility="visible";n.itemsSource=this._colItms;n.checkedItems=[this._colItms[0]];n.invalidate()}else n.hostElement.style.visibility="hidden"}};PivotChart.prototype._getLegendPosition=function(){var e=this.legendPosition;if(this.showLegend==LegendVisibility.Never)e=wijmo_chart_1.Position.None;else if(this.showLegend==LegendVisibility.Auto&&this.flexChart&&this.flexChart.series){var t=0;this.flexChart.series.forEach((function(e){var i=e.visibility;e.name&&i!=wijmo_chart_1.SeriesVisibility.Hidden&&i!=wijmo_chart_1.SeriesVisibility.Plot&&t++}));t<2&&(e=wijmo_chart_1.Position.None)}return e};PivotChart.prototype._createSeries=function(){this._flexChart&&(this._flexChart.series.length=0);for(var e=1==this._ng.valueFields.length,t=0;t<this._colItms.length;t++){var i=new wijmo_chart_1.Series,o=this._colItms[t].prop,n=this._colItms[t].text;if(e){var r=n.lastIndexOf(";");r>-1&&(n=n.substr(0,r))}i.binding=o;i.name=n;this._flexChart.series.push(i)}};PivotChart.prototype._getColumns=function(e){var t,i=0;if(e){this._colItms=[];for(var o in e)if(e.hasOwnProperty(o)&&o!==_PivotKey._ROW_KEY_NAME&&i<this._maxSeries&&this._isValidColumn(o)){t=this._ng._getKey(o);this._getLabel(t);this._colItms.push({prop:o,text:this._getLabel(t)});i++}}};PivotChart.prototype._createGroupAxes=function(e){var t,i=this,o=this._flexChart,n=this._isRotatedChart()?o.axisY:o.axisX;if(e){(t=new wijmo_chart_1.Axis).labelAngle=0;t.labelPadding=6;t.position=this._isRotatedChart()?wijmo_chart_1.Position.Left:wijmo_chart_1.Position.Bottom;t.majorTickMarks=wijmo_chart_1.TickMark.None;t.itemsSource=e;t.reversed=n.reversed;t.axisLine=!1;t.itemFormatter=function(o,n){if(t._axrect){var r=.5*e.filter((function(e){return e.value==n.val}))[0].width;if(i._isRotatedChart()){var s=t.reversed?-1:1,l=t.convert(n.val+r)+5*s,a=t.convert(n.val-r)-5*s,d=t._axrect.left+t._axrect.width-5;o.drawLine(d,l,d,a,PivotChart.HRHAXISCSS);o.drawLine(d,l,d+5,l,PivotChart.HRHAXISCSS);o.drawLine(d,a,d+5,a,PivotChart.HRHAXISCSS);o.drawLine(d,n.pos.y,d-5,n.pos.y,PivotChart.HRHAXISCSS)}else{var h=t.convert(n.val-r)+5,u=t.convert(n.val+r)-5,_=t._axrect.top;o.drawLine(h,_,u,_,PivotChart.HRHAXISCSS);o.drawLine(h,_,h,_-5,PivotChart.HRHAXISCSS);o.drawLine(u,_,u,_-5,PivotChart.HRHAXISCSS);o.drawLine(n.pos.x,_,n.pos.x,_+5,PivotChart.HRHAXISCSS)}}return n};t.min=n.actualMin;t.max=n.actualMax;n.rangeChanged.addHandler((function(){isNaN(t.min)&&isNaN(n.actualMin)||t.min==n.actualMin||(t.min=n.actualMin);isNaN(t.max)&&isNaN(n.actualMax)||t.max==n.actualMax||(t.max=n.actualMax)}));var r=new wijmo_chart_1.Series;r.visibility=wijmo_chart_1.SeriesVisibility.Hidden;this._isRotatedChart()?r.axisY=t:r.axisX=t;o.series.push(r)}};PivotChart.prototype._updateFlexPieBinding=function(){var e="",t=[];this._colMenu.checkedItems.forEach((function(i){e.length>0&&(e+=",");e+=i.prop;t.push(i.text)}));this._flexPie.binding=e;this._flexPie.titles=t.length>1?t:null};PivotChart.prototype._updatePieInfo=function(){var e=this;this._flexPie&&(this._flexPie._labels=this._flexPie._labels.map((function(t,i){return e._lblsSrc[i].text})))};PivotChart.prototype._changeChartType=function(){var e=null;if(this.chartType===PivotChartType.Pie){this._flexPie||this._createFlexPie();this._updateFlexPie(this._dataItms,this._lblsSrc);this._swapChartAndPie(!1)}else{switch(this.chartType){case PivotChartType.Column:e=wijmo_chart_1.ChartType.Column;break;case PivotChartType.Bar:e=wijmo_chart_1.ChartType.Bar;break;case PivotChartType.Scatter:e=wijmo_chart_1.ChartType.Scatter;break;case PivotChartType.Line:e=wijmo_chart_1.ChartType.Line;break;case PivotChartType.Area:e=wijmo_chart_1.ChartType.Area}if(this._flexChart)"none"!==this._flexChart.hostElement.style.display&&e!==PivotChartType.Bar&&this._flexChart.chartType!==wijmo_chart_1.ChartType.Bar||this._updateFlexChart(this._dataItms,this._lblsSrc,this._grpLblsSrc);else{this._createFlexChart();this._updateFlexChart(this._dataItms,this._lblsSrc,this._grpLblsSrc)}this._flexChart.chartType=e;this._swapChartAndPie(!0)}};PivotChart.prototype._swapChartAndPie=function(e){var t=this;this._flexChart&&(this._flexChart.hostElement.style.display=e?"block":"none");this._flexPie&&(this._flexPie.hostElement.style.display=e?"none":"block");if(this._colMenu&&this._colMenu.hostElement){this._colMenu.hostElement.style.display=e?"none":"block";this._colMenu.hostElement.style.top="0";this._clearStyleTopTimer=setTimeout((function(){t._colMenu.hostElement.style.top=""}),0)}};PivotChart.prototype._getLabel=function(e){var t="";if(!e||!e.values)return t;var i=e.valueFields?e.valueField:null;switch(e.values.length){case 0:i&&(t+=i.header);break;case 1:t+=e.getValue(0,!0);i&&(t+="; "+i.header);break;default:for(var o=0;o<e.values.length;o++){o>0&&(t+="; ");t+=e.getValue(o,!0)}i&&(t+="; "+i.header)}return t};PivotChart.prototype._getValue=function(e){var t=this._ng.valueFields,i=e.series?e.series.chart.series.indexOf(e.series):0,o=i<t.length?t[i].format:t.length?t[0].format:"";return o?wijmo_1.Globalize.format(e.y,o):e._yfmt};PivotChart.prototype._getChartTitle=function(){if(!this.showTitle||!this._ng.valueFields.length)return null;var e=this._ng,t=this._getTitle(e.valueFields),i=this._getTitle(e.rowFields),o=this._getTitle(e.columnFields),n=t,r=wijmo_1.culture.olap.PivotChart;if(t&&this._dataItms.length>0){i&&(n+=wijmo_1.format(" {by} {rows}",{by:r.by,rows:i}));o&&(n+=wijmo_1.format(" {and} {cols}",{and:i?r.and:r.by,cols:o}))}return n};PivotChart.prototype._getTitle=function(e){for(var t="",i=0;i<e.length;i++){t.length>0&&(t+="; ");t+=e[i].header}return t};PivotChart.prototype._isValidColumn=function(e){var t=e.split(";"),i=this._showTotals;return 0===this._ng.columnFields.length||(t&&2===t.length?i:!(!t||t.length-2!==this._ng.columnFields.length)&&!i)};PivotChart.prototype._isTotalRow=function(e){return e.values.length<this._ng.rowFields.length};PivotChart.prototype._isPieChart=function(){return this._chartType==PivotChartType.Pie};PivotChart.prototype._isRotatedChart=function(){return!this._isPieChart()&&this._chartType==PivotChartType.Bar!==this._flexChart.rotated};PivotChart.prototype._getMergeIndex=function(e,t){var i=-1;if(null!=e&&null!=t&&e.values.length==t.values.length&&e.values.length==e.fields.length&&t.values.length==t.fields.length)for(var o=0;o<e.values.length;o++){if(e.getValue(o,!0)!=t.getValue(o,!0))return i;i=o}return i};PivotChart.prototype._getOffsetWidth=function(e){var t=0;if(e.length<=1)return t;for(var i=0;i<e.length-1;i++)t+=e[i].width;return t};PivotChart.prototype.dispose=function(){if(this._flexChart){this._flexChart.dispose();this._flexChart=null}if(this._flexPie){this._flexPie.dispose();this._flexPie=null}if(this._colMenu){this._colMenu.dispose();this._colMenu=null}if(this._clearStyleTopTimer){clearTimeout(this._clearStyleTopTimer);this._clearStyleTopTimer=null}this._ng&&this._ng.updatedView.removeHandler(this._updatePivotChart,this);this._itemsSource&&this._itemsSource.collectionChanged.removeHandler(this._updatePivotChart,this);e.prototype.dispose.call(this)};PivotChart.MAX_SERIES=100;PivotChart.MAX_POINTS=100;PivotChart.HRHAXISCSS=exports.PivotChartClsNames.hierarchicalAxesLine;return PivotChart}(wijmo_1.Control);exports.PivotChart=PivotChart;var _MdxQueryBuilder=function(){function _MdxQueryBuilder(e,t){this._ng=null;this._cubeName=null;this._ng=e;this._cubeName=t}_MdxQueryBuilder.prototype.buildQuery=function(){var e=new _TextBuilder,t=this.buildWhereSection(this._ng.valueFields);e.append("SELECT ",this.buildAxes()," FROM ",this.buildCubeName(),t);e.append(" CELL PROPERTIES VALUE, FORMAT_STRING");return e.toString()};_MdxQueryBuilder.prototype.buildWhereSection=function(e){var t=new _TextBuilder;if(1==e.length){t.append(this.buildSetForMeasuresShelf(e));t.wrap(" WHERE ","")}return t.toString()};_MdxQueryBuilder.prototype.buildCubeName=function(){var e=new _TextBuilder;e.append(this.buildSubcubeExpression());var t=e.length>0;t&&e.wrap("SELECT "," FROM ");e.append("[",this._cubeName,"]");t&&e.wrap("(",")");return e.toString()};_MdxQueryBuilder.prototype.buildSubcubeExpression=function(){var e=new _TextBuilder,t=this.getMeasureFilterExpressions(this._ng.valueFields),i=this.buildFilterAttributeSet(this._ng.filterFields),o=this.buildFilterAttributeSet(this._ng.rowFields,t),n=this.buildFilterAttributeSet(this._ng.columnFields,0==o.length?t:null);e.joinItemToList(i);e.joinItemToList(o);e.joinItemToList(n);if(e.length>0){e.wrap("(",")");e.append(" ON COLUMNS")}return e.toString()};_MdxQueryBuilder.prototype.buildFilterAttributeSet=function(e,t){for(var i=new _TextBuilder,o=0;o<e.length;o++){var n=e[o],r=this.buildFilterString(n,0==o?t:null);i.joinItemToList(r)}return i.toString()};_MdxQueryBuilder.prototype.buildFilterString=function(e,t){var i=new _TextBuilder;e.filter.isActive?e.filter.conditionFilter.isActive?i.append(this.getConditionFilterString(e,t)):e.filter.valueFilter.isActive&&i.append(this.getValueFilterString(e)):t&&i.append(this.getConditionFilterString(e,t));return i.toString()};_MdxQueryBuilder.prototype.getValueFilterString=function(e){var t=new _TextBuilder,i=e.filter.valueFilter,o=Object.keys(i.showValues).map((function(t){return e.key+".["+t+"]"}));t.append(o.join(","));t.length>0&&t.wrap("{","}");return t.toString()};_MdxQueryBuilder.prototype.getConditionFilterString=function(e,t){var i=new _TextBuilder,o=e.key+".LEVELS(1).ALLMEMBERS",n=e.filter.conditionFilter.condition1,r=e.filter.conditionFilter.condition2;if(n.isActive){i.append(this.getConditionFilterExpression(e,n));r.isActive&&i.append(e.filter.conditionFilter.and?" AND ":" OR ")}r.isActive&&i.append(this.getConditionFilterExpression(e,r));if(t&&t.length>0){i.length>0&&i.append(" AND ");i.append(t.join(" AND "))}i.length>0&&i.wrap("Filter("+o+",(","))");return i.toString()};_MdxQueryBuilder.prototype.getMeasureFilterExpressions=function(e){for(var t=[],i=0;i<e.length;i++){var o=new _TextBuilder,n=e[i],r=(n.dimensionType,DimensionType.Measure,n.filter.conditionFilter.condition1),s=n.filter.conditionFilter.condition2;if(r.isActive){o.append(this.getConditionFilterExpression(n,r));s.isActive&&o.append(n.filter.conditionFilter.and?" AND ":" OR ")}s.isActive&&o.append(this.getConditionFilterExpression(n,s));if(o.length>0){o.wrap("(",")");t.push(o.toString())}}return t};_MdxQueryBuilder.prototype.getConditionFilterExpression=function(e,t){if(!t.isActive)return"";var i=e.dimensionType==DimensionType.Measure,o=e.dataType==wijmo_1.DataType.Number,n=e.dataType==wijmo_1.DataType.Date,r=o||n?"member_value":"member_caption",s=i?e.key:e.key+".CurrentMember."+r,l=n?"CDate('"+wijmo_1.Globalize.formatDate(t.value,"d")+"')":t.value.toString(),a=new _TextBuilder;switch(t.operator){case wijmo_grid_filter_1.Operator.BW:a.append("(Left(",s,",",l.length.toString(),')="',l,'")');break;case wijmo_grid_filter_1.Operator.NBW:a.append("(Left(",s,",",l.length.toString(),')<>"',l,'")');break;case wijmo_grid_filter_1.Operator.EW:a.append("(Right(",s,",",l.length.toString(),')="',l,'")');break;case wijmo_grid_filter_1.Operator.NEW:a.append("(Right(",s,",",l.length.toString(),')<>"',l,'")');break;case wijmo_grid_filter_1.Operator.EQ:i||o||n?a.append("(",s,")=",l):a.append("(",s,')="',l,'"');break;case wijmo_grid_filter_1.Operator.NE:i||o||n?a.append("(",s,")<>",l):a.append("(",s,')<>"',l,'"');break;case wijmo_grid_filter_1.Operator.CT:a.append("(InStr(1,",s,',"',l,'")>0)');break;case wijmo_grid_filter_1.Operator.NC:a.append("(InStr(1,",s,',"',l,'")=0))');break;case wijmo_grid_filter_1.Operator.GT:a.append("(",s,")>",l);break;case wijmo_grid_filter_1.Operator.LT:a.append("(",s,")<",l);break;case wijmo_grid_filter_1.Operator.GE:a.append("(",s,")>=",l);break;case wijmo_grid_filter_1.Operator.LE:a.append("(",s,")<=",l)}return a.toString()};_MdxQueryBuilder.prototype.buildAxes=function(){var e=new _TextBuilder,t=this.buildSetForAttributesShelf(this._ng.rowFields);e.joinItemToList(t);this._ng.rowFields.length>0&&(this._ng.columnFields.length>0||this._ng.valueFields.length>1?e.append(" ON ROWS"):e.append(" ON COLUMNS"));t=this.buildSetForAttributesColumnShelf(this._ng.columnFields);e.joinItemToList(t);this._ng.columnFields.length>0&&e.append(" ON COLUMNS");if(this._ng.valueFields.length>1&&0==this._ng.columnFields.length){t=this.buildSetForMeasuresShelf(this._ng.valueFields);e.joinItemToList(t);e.append(" ON COLUMNS")}return e.toString()};_MdxQueryBuilder.prototype.buildSetForAttributesShelf=function(e){for(var t=new _TextBuilder,i=0;i<e.length;i++){var o=e[i];o.dimensionType!=DimensionType.Attribute&&o.dimensionType!=DimensionType.Hierarchy||t.joinItemToList(this.buildAttributeSetForAxis(o));i>0&&t.wrap("CrossJoin(",")")}t.wrap("NON EMPTY ","");return t.toString()};_MdxQueryBuilder.prototype.buildSetForAttributesColumnShelf=function(e){for(var t=new _TextBuilder,i=0;i<e.length;i++){var o=e[i];o.dimensionType!=DimensionType.Attribute&&o.dimensionType!=DimensionType.Hierarchy||t.joinItemToList(this.buildAttributeSetForAxis(o))}this._ng.valueFields.length>1&&e.length>0&&t.joinItemToList(this.buildSetForMeasuresShelf(this._ng.valueFields));(this._ng.valueFields.length>1&&e.length>0||e.length>1)&&t.wrap("CrossJoin(",")");t.wrap("NON EMPTY ","");return t.toString()};_MdxQueryBuilder.prototype.buildSetForMeasuresShelf=function(e){for(var t=new _TextBuilder,i=0;i<e.length;i++){var o=e[i];o.dimensionType!=DimensionType.Measure&&o.dimensionType!=DimensionType.Kpi||t.joinItemToList(this.buildMeasureSetForAxis(o))}t.wrap("{","}");return t.toString()};_MdxQueryBuilder.prototype.buildAttributeSetForAxis=function(e){var t=new _TextBuilder;if(e.dimensionType==DimensionType.Hierarchy){t.append(e.key);t.append(".ALLMEMBERS");t.wrap("{","}");t.wrap("HIERARCHIZE(",")")}return t.toString()};_MdxQueryBuilder.prototype.buildMeasureSetForAxis=function(e){var t=new _TextBuilder;e.dimensionType!=DimensionType.Measure&&e.dimensionType!=DimensionType.Kpi||t.append(e.key);return t.toString()};return _MdxQueryBuilder}();exports._MdxQueryBuilder=_MdxQueryBuilder;var _SqlServerConnection=function(e){__extends(_SqlServerConnection,e);function _SqlServerConnection(t,i){var o=e.call(this,t,i.url)||this;o._jsonResult=null;o._dataTypes=null;t.sortOnServer=!0;wijmo_1.assert(wijmo_1.isString(i.cube)&&!wijmo_1.isNullOrWhiteSpace(i.cube),"Cube name required.");o._cubeName=i.cube;o._catalogName=wijmo_1.isString(i.catalog)&&!wijmo_1.isNullOrWhiteSpace(i.catalog)?i.catalog:"";o._url=i.url;o._user=i.user;o._password=i.password;return o}_SqlServerConnection.prototype.getFields=function(){this._getSession();this._jsonResult=null;this._dataTypes=null;this._getProperties(this._token);this._getDimensions(this._token);this._endSession();return this._jsonResult};_SqlServerConnection.prototype.getOutputView=function(e){var t=this;this._ng.onUpdatingView(new ProgressEventArgs(0));var i=new _MdxQueryBuilder(this._ng,this._cubeName).buildQuery();this._jsonResult=[];this._getSession();this._execQuery(this._token,i,(function(i){wijmo_1.asFunction(e)(t._jsonResult);t._ng.onUpdatedView(new ProgressEventArgs(100))}))};_SqlServerConnection.prototype.getDetail=function(e,t){throw"getDetail method not supported"};_SqlServerConnection.prototype.getSortedKeys=function(e,t){var i=this,o=Object.keys(e);if(this._ng.sortOnServer){if(o.length>1){var n=t?this._ng.showRowTotals:this._ng.showColumnTotals,r=t?this._ng.rowFields.length:this._ng.columnFields.length,s=this._ng.valueFields.length;if(!this._ng.totalsBeforeData&&n!==ShowTotals.None){var l=-1,a=[],d=[];o.forEach((function(e){var o=i._getKeyLength(e,t);if(o===r)d.push(e);else if(o>=l)a.push(e);else{if(a.length>=s)for(var n=0;n<s;n++)d.push(a.pop());a.push(e)}l=o}));if(a.length>0){a.reverse();d=d.concat(a)}return d}}}else o.sort((function(e,t){return i._ng._keys[e].compareTo(i._ng._keys[t])}));return o};_SqlServerConnection.prototype._getSession=function(){var e=this,t=this._url;return wijmo_1.httpRequest(t,{async:!1,data:_ENV_SESSION,method:"POST",user:this._user,password:this._password,requestHeaders:{"Content-Type":"text/xml"},success:function(t){var i=t.responseXML.getElementsByTagName("Session");e._token=i[0].getAttribute("SessionId")},error:function(t){e._handleError("Begin Session",t)}})};_SqlServerConnection.prototype._endSession=function(){var e=this,t=this._url;return wijmo_1.httpRequest(t,{async:!1,data:_ENV_ENDSESSION(this._token),method:"POST",user:this._user,password:this._password,requestHeaders:{"Content-Type":"text/xml"},error:function(t){e._handleError("End Session",t)},complete:function(t){e._token=void 0}})};_SqlServerConnection.prototype._getProperties=function(e){var t=this,i=this._url;return wijmo_1.httpRequest(i,{async:!1,data:_ENV_PROPERTIES(e,this._catalogName,this._cubeName),method:"POST",user:this._user,password:this._password,requestHeaders:{"Content-Type":"text/xml"},success:function(e){for(var i={},o=e.responseXML.getElementsByTagName("row"),n=0;n<o.length;n++){var r=_getTagValue(o[n],"HIERARCHY_UNIQUE_NAME");switch(Number(_getTagValue(o[n],"DATA_TYPE"))){case 2:case 3:case 4:case 5:case 6:i[r]=wijmo_1.DataType.Number;break;case 7:i[r]=wijmo_1.DataType.Date}}t._dataTypes=i},error:function(e){t._handleError("Get Properties",e)}})};_SqlServerConnection.prototype._getDimensions=function(e){var t=this,i=this._url;return wijmo_1.httpRequest(i,{async:!1,data:_ENV_DIMENSIONS(e,this._catalogName,this._cubeName),method:"POST",user:this._user,password:this._password,requestHeaders:{"Content-Type":"text/xml"},success:function(i){for(var o=[],n=i.responseXML.getElementsByTagName("row"),r=0;r<n.length;r++){if("2"!==_getTagValue(n[r],"DIMENSION_TYPE")){var s=_getTagValue(n[r],"DIMENSION_UNIQUE_NAME"),l={header:_getTagValue(n[r],"DIMENSION_CAPTION"),dataType:wijmo_1.DataType.Object,dimensionType:DimensionType.Dimension,subFields:[]};t._getSubFolders(e,s,l);o.push(l)}else t._getMeasures(e,o)}var a={header:"KPIs",dataType:wijmo_1.DataType.Object,dimensionType:DimensionType.Kpi,subFields:[]};t._getKPIs(e,a);o.push(a);t._jsonResult=o},error:function(e){t._handleError("Get Dimensions",e)}})};_SqlServerConnection.prototype._getSubFolders=function(e,t,i){var o=this,n=this._url;wijmo_1.httpRequest(n,{async:!1,data:_ENV_HIERARCHIES(e,this._catalogName,this._cubeName,t),method:"POST",user:this._user,password:this._password,requestHeaders:{"Content-Type":"text/xml"},success:function(e){for(var t=e.responseXML.getElementsByTagName("row"),n=0;n<t.length;n++){var r={header:_getTagValue(t[n],"HIERARCHY_NAME"),binding:_getTagValue(t[n],"HIERARCHY_UNIQUE_NAME"),dataType:wijmo_1.DataType.String,dimensionType:DimensionType.Hierarchy};o._dataTypes[r.binding]&&(r.dataType=o._dataTypes[r.binding]);for(var s=_getTagValue(t[n],"HIERARCHY_DISPLAY_FOLDER").split("\\"),l=i,a=0;a<s.length;a++)if(""!=s[a]){var d={header:s[a],dataType:wijmo_1.DataType.Object,dimensionType:DimensionType.Folder,subFields:[]};if(_containsFolder(l,s[a]))l=_findSubFieldByName(l,s[a]);else{l.subFields.push(d);l=d}}l.subFields.push(r)}},error:function(e){o._handleError("Get Hierarchies",e)}})};_SqlServerConnection.prototype._getMeasures=function(e,t){var i=this,o=this._url;return wijmo_1.httpRequest(o,{async:!1,data:_ENV_MEASURES(e,this._catalogName,this._cubeName),method:"POST",user:this._user,password:this._password,requestHeaders:{"Content-Type":"text/xml"},success:function(e){for(var i=e.responseXML.getElementsByTagName("row"),o={},n=0;n<i.length;n++){var r=_getTagValue(i[n],"MEASUREGROUP_NAME"),s={header:_getTagValue(i[n],"MEASURE_CAPTION"),binding:_getTagValue(i[n],"MEASURE_UNIQUE_NAME"),dataType:wijmo_1.DataType.Number,dimensionType:DimensionType.Measure};if(Object.keys(o).indexOf(r)<0){var l={header:r,dataType:wijmo_1.DataType.Number,dimensionType:DimensionType.Measure,subFields:[]};l.subFields.push(s);t.push(l);o[r]=l}else o[r].subFields.push(s)}},error:function(e){i._handleError("Get Measures",e)}})};_SqlServerConnection.prototype._getKPIs=function(e,t){var i=this,o=this._url;return wijmo_1.httpRequest(o,{async:!1,data:_ENV_KPIS(e,this._catalogName,this._cubeName),method:"POST",user:this._user,password:this._password,requestHeaders:{"Content-Type":"text/xml"},success:function(e){for(var i=e.responseXML.getElementsByTagName("row"),o=0;o<i.length;o++){for(var n=_getTagValue(i[o],"KPI_DISPLAY_FOLDER").split("\\"),r=t,s=0;s<n.length;s++){var l={header:n[s],dataType:wijmo_1.DataType.Object,dimensionType:DimensionType.Folder,subFields:[]};if(_containsFolder(r,n[s]))r=_findSubFieldByName(r,n[s]);else{r.subFields.push(l);r=l}}var a={header:_getTagValue(i[o],"KPI_CAPTION"),binding:_getTagValue(i[o],"KPI_VALUE"),dataType:wijmo_1.DataType.Number,dimensionType:DimensionType.Kpi};r.subFields.push(a)}},error:function(e){i._handleError("Get KPIs",e)}})};_SqlServerConnection.prototype._execQuery=function(e,t,i){var o=this,n=this._url;return wijmo_1.httpRequest(n,{async:!0,data:_ENV_QUERY(e,this._catalogName,t),method:"POST",user:this._user,password:this._password,requestHeaders:{"Content-Type":"text/xml"},success:function(e){var n=e.responseXML,r=n.querySelector("Error");if(r){throw"SSAS Error\r\n"+r.getAttribute("Description")+"\r\n"+t}o._createPivotKeys(n);wijmo_1.asFunction(i)(e)},error:function(e){o._handleError("Execute Query",e)},complete:function(){o._endSession()}})};_SqlServerConnection.prototype._createPivotKeys=function(e){var t=null,i=null,o=e.querySelector("CellData");if(this._ng.columnFields.length>0||this._ng.valueFields.length>1){i=e.querySelector("Axis[name='Axis0']");this._ng.rowFields.length>0&&(t=e.querySelector("Axis[name='Axis1']"))}else this._ng.rowFields.length>0&&(t=e.querySelector("Axis[name='Axis0']"));var n=t&&this._ng.rowFields.length>0,r=i&&this._ng.columnFields.length>0;n&&r?this._createRowKeys(o,t,i):n?this._createRowOnlyKeys(o,t):r&&this._createColumnOnlyKeys(o,i)};_SqlServerConnection.prototype._createRowKeys=function(e,t,i){for(var o=t.getElementsByTagName("Tuple"),n=i.getElementsByTagName("Tuple"),r=this._ng.showRowTotals!==ShowTotals.None?0:1,s=this._ng.showColumnTotals!==ShowTotals.None?0:this._ng.valueFields.length,l=r;l<o.length;l++){var a=l*n.length,d=o[l],h=this._validateTuple(d,this._ng.showRowTotals);if(h)for(var u=s;u<n.length;u++){var _=n[u],c=this._validateTuple(_,this._ng.showColumnTotals);if(c){for(var p in h)c[p]=h[p];for(var g=0;g<this._ng.valueFields.length;g++){c[this._ng.valueFields[g].key]=_getCellValue(e,a+u+g)}this._jsonResult.push(c)}}}};_SqlServerConnection.prototype._createRowOnlyKeys=function(e,t){for(var i=t.getElementsByTagName("Tuple"),o=this._ng.valueFields.length,n=this._ng.showRowTotals!==ShowTotals.None?0:1,r=n*o,s=n;s<i.length;s++){var l=i[s],a=this._validateTuple(l,this._ng.showRowTotals);if(a){for(var d=0;d<this._ng.valueFields.length;d++){a[this._ng.valueFields[d].key]=_getCellValue(e,r++)}this._jsonResult.push(a)}else r++}};_SqlServerConnection.prototype._createColumnOnlyKeys=function(e,t){for(var i=t.getElementsByTagName("Tuple"),o=this._ng.valueFields.length,n=this._ng.showColumnTotals!==ShowTotals.None?0:1,r=n;r<i.length;r+=o){var s=i[r],l=this._validateTuple(s,this._ng.showColumnTotals);if(l){for(var a=0;a<this._ng.valueFields.length;a++){l[this._ng.valueFields[a].key]=_getCellValue(e,r-n+a)}this._jsonResult.push(l)}}};_SqlServerConnection.prototype._validateTuple=function(e,t){for(var i,o=e.getElementsByTagName("Member"),n={},r=0;r<o.length;r++){var s=o[r],l=_getLevelNumber(s),a=s.getAttribute("Hierarchy"),d=_getCaptionValue(s);if(0==r)i=l;else{if(l>i)return null;if(t!==ShowTotals.Subtotals&&l!==i&&"[Measures]"!==a)return null;i=l}a.indexOf(".")>=0?n[a]=d:null!==d&&(n[d]=null)}return n};return _SqlServerConnection}(_ServerConnection);exports._SqlServerConnection=_SqlServerConnection;function _getTagValue(e,t){var i=e.querySelector(t);return i?i.innerHTML||i.textContent:null}function _getLevelNumber(e){return Number(_getTagValue(e,"LNum"))}function _getCaptionValue(e){return _getLevelNumber(e)>0?_getTagValue(e,"Caption"):null}function _getCellValue(e,t){var i="Cell[CellOrdinal='"+t.toString()+"']",o=e.querySelector(i);if(o){var n=_getTagValue(o,"Value");if(n)return Number(n)}return null}function _findSubFieldByName(e,t){if(e.subFields)for(var i=0;i<e.subFields.length;i++){var o=e.subFields[i];if(o.header==t)return o}return e}function _containsFolder(e,t){if(e.subFields)for(var i=0;i<e.subFields.length;i++){if(e.subFields[i].header==t)return!0}return!1}var _ENV_SESSION='\n <Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">\n <Header>\n <BeginSession soap:mustUnderstand="1" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns="urn:schemas-microsoft-com:xml-analysis" />\n </Header>\n <Body>\n <Execute xmlns="urn:schemas-microsoft-com:xml-analysis">\n <Command>\n <Statement />\n </Command>\n <Properties>\n </Properties>\n </Execute>\n </Body>\n </Envelope>',_ENV_ENDSESSION=function(e){return'\n <Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">\n <Header>\n <XA:EndSession soap:mustUnderstand="1" SessionId="'+e+'" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:XA="urn:schemas-microsoft-com:xml-analysis" />\n </Header>\n <Body>\n <Execute xmlns="urn:schemas-microsoft-com:xml-analysis">\n <Command>\n <Statement />\n </Command>\n <Properties>\n </Properties>\n </Execute>\n </Body>\n </Envelope>'},_ENV_DIMENSIONS=function(e,t,i){return'\n <Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">\n <Header>\n <XA:Session soap:mustUnderstand="1" SessionId="'+e+'" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:XA="urn:schemas-microsoft-com:xml-analysis" />\n </Header>\n <Body>\n <Discover xmlns="urn:schemas-microsoft-com:xml-analysis">\n <RequestType>MDSCHEMA_DIMENSIONS</RequestType>\n <Restrictions>\n <RestrictionList>\n <CATALOG_NAME>'+t+"</CATALOG_NAME>\n <CUBE_NAME>"+i+"</CUBE_NAME>\n </RestrictionList>\n </Restrictions>\n <Properties>\n </Properties>\n </Discover>\n </Body>\n </Envelope>"},_ENV_HIERARCHIES=function(e,t,i,o){return'\n <Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">\n <Header>\n <XA:Session soap:mustUnderstand="1" SessionId="'+e+'" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:XA="urn:schemas-microsoft-com:xml-analysis" />\n </Header>\n <Body>\n <Discover xmlns="urn:schemas-microsoft-com:xml-analysis">\n <RequestType>MDSCHEMA_HIERARCHIES</RequestType>\n <Restrictions>\n <RestrictionList>\n <CATALOG_NAME>'+t+"</CATALOG_NAME>\n <CUBE_NAME>"+i+"</CUBE_NAME>\n <DIMENSION_UNIQUE_NAME>"+o+"</DIMENSION_UNIQUE_NAME>\n </RestrictionList>\n </Restrictions>\n <Properties>\n </Properties>\n </Discover>\n </Body>\n </Envelope>"},_ENV_MEASURES=function(e,t,i){return'\n <Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">\n <Header>\n <XA:Session soap:mustUnderstand="1" SessionId="'+e+'" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:XA="urn:schemas-microsoft-com:xml-analysis" />\n </Header>\n <Body>\n <Discover xmlns="urn:schemas-microsoft-com:xml-analysis">\n <RequestType>MDSCHEMA_MEASURES</RequestType>\n <Restrictions>\n <RestrictionList>\n <CATALOG_NAME>'+t+"</CATALOG_NAME>\n <CUBE_NAME>"+i+"</CUBE_NAME>\n </RestrictionList>\n </Restrictions>\n <Properties>\n </Properties>\n </Discover>\n </Body>\n </Envelope>"},_ENV_KPIS=function(e,t,i){return'\n <Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">\n <Header>\n <XA:Session soap:mustUnderstand="1" SessionId="'+e+'" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:XA="urn:schemas-microsoft-com:xml-analysis" />\n </Header>\n <Body>\n <Discover xmlns="urn:schemas-microsoft-com:xml-analysis">\n <RequestType>MDSCHEMA_KPIS</RequestType>\n <Restrictions>\n <RestrictionList>\n <CATALOG_NAME>'+t+"</CATALOG_NAME>\n <CUBE_NAME>"+i+"</CUBE_NAME>\n </RestrictionList>\n </Restrictions>\n <Properties>\n </Properties>\n </Discover>\n </Body>\n </Envelope>"},_ENV_LEVELS=function(e,t,i){return'\n <Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">\n <Header>\n <XA:Session soap:mustUnderstand="1" SessionId="'+e+'" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:XA="urn:schemas-microsoft-com:xml-analysis" />\n </Header>\n <Body>\n <Discover xmlns="urn:schemas-microsoft-com:xml-analysis">\n <RequestType>MDSCHEMA_LEVELS</RequestType>\n <Restrictions>\n <RestrictionList>\n <CATALOG_NAME>'+t+"</CATALOG_NAME>\n <CUBE_NAME>"+i+"</CUBE_NAME>\n </RestrictionList>\n </Restrictions>\n <Properties>\n </Properties>\n </Discover>\n </Body>\n </Envelope>"},_ENV_PROPERTIES=function(e,t,i){return'\n <Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">\n <Header>\n <XA:Session soap:mustUnderstand="1" SessionId="'+e+'" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:XA="urn:schemas-microsoft-com:xml-analysis" />\n </Header>\n <Body>\n <Discover xmlns="urn:schemas-microsoft-com:xml-analysis">\n <RequestType>MDSCHEMA_PROPERTIES</RequestType>\n <Restrictions>\n <RestrictionList>\n <CATALOG_NAME>'+t+"</CATALOG_NAME>\n <CUBE_NAME>"+i+"</CUBE_NAME>\n <PROPERTY_NAME>MEMBER_VALUE</PROPERTY_NAME>\n </RestrictionList>\n </Restrictions>\n <Properties>\n </Properties>\n </Discover>\n </Body>\n </Envelope>"},_ENV_QUERY=function(e,t,i){return'\n <Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">\n <Header>\n <XA:Session soap:mustUnderstand="1" SessionId="'+e+'" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:XA="urn:schemas-microsoft-com:xml-analysis" />\n </Header>\n <Body>\n <Execute xmlns="urn:schemas-microsoft-com:xml-analysis">\n <Command>\n <Statement>\n <![CDATA[\n '+i+"\n ]]>\n </Statement>\n </Command>\n <Properties>\n <PropertyList>\n <Catalog>"+t+"</Catalog>\n <Content>Data</Content>\n </PropertyList>\n </Properties>\n </Execute>\n </Body>\n </Envelope>"},PivotFilter=function(){function PivotFilter(e){this._fld=e;var t=e;this._valueFilter=new wijmo_grid_filter_1.ValueFilter(t);this._valueFilter.exclusiveValueSearch=this._fld.engine.exclusiveValueSearch;this._conditionFilter=new wijmo_grid_filter_1.ConditionFilter(t)}Object.defineProperty(PivotFilter.prototype,"filterType",{get:function(){return null!=this._filterType?this._filterType:this._fld.engine.defaultFilterType},set:function(e){if((e=wijmo_1.asEnum(e,wijmo_grid_filter_1.FilterType,!0))!=this._filterType){this._filterType=e;this.clear()}},enumerable:!0,configurable:!0});PivotFilter.prototype.apply=function(e){return this._conditionFilter.apply(e)&&this._valueFilter.apply(e)};Object.defineProperty(PivotFilter.prototype,"isActive",{get:function(){return this._conditionFilter.isActive||this._valueFilter.isActive},enumerable:!0,configurable:!0});PivotFilter.prototype.clear=function(){var e=!1;if(this._valueFilter.isActive){this._valueFilter.clear();e=!0}if(this._conditionFilter.isActive){this._valueFilter.clear();e=!0}e&&this._fld.onPropertyChanged(new wijmo_1.PropertyChangedEventArgs("filter",null,null))};Object.defineProperty(PivotFilter.prototype,"valueFilter",{get:function(){return this._valueFilter},enumerable:!0,configurable:!0});Object.defineProperty(PivotFilter.prototype,"conditionFilter",{get:function(){return this._conditionFilter},enumerable:!0,configurable:!0});return PivotFilter}();exports.PivotFilter=PivotFilter;var PivotFilterEditor=function(e){__extends(PivotFilterEditor,e);function PivotFilterEditor(t,i,o){var n=e.call(this,t)||this;n.finishEditing=new wijmo_1.Event;n.hostElement.tabIndex=-1;var r=n.getTemplate();n.applyTemplate(wijmo_1.ControlClsNames.hostElement+" "+wijmo_1.ControlClsNames.content+" "+exports.PivotFilterEditorClsNames.hostElement,r,{_divType:"div-type",_aVal:"a-val",_aCnd:"a-cnd",_divEdtVal:"div-edt-val",_divEdtCnd:"div-edt-cnd",_btnOk:"btn-ok"});wijmo_1.setText(n._aVal,wijmo_1.culture.FlexGridFilter.values);wijmo_1.setText(n._aCnd,wijmo_1.culture.FlexGridFilter.conditions);wijmo_1.setText(n._btnOk,wijmo_1.culture.olap.PivotFieldEditor.ok);var s=n._btnClicked.bind(n);n.addEventListener(n._btnOk,"click",s);n.addEventListener(n._aVal,"click",s);n.addEventListener(n._aCnd,"click",s);n.addEventListener(n.hostElement,"keydown",(function(e){switch(e.keyCode){case wijmo_1.Key.Enter:switch(e.target.tagName){case"A":case"BUTTON":n._btnClicked(e);break;default:n.onFinishEditing(new wijmo_1.CancelEventArgs)}e.preventDefault();break;case wijmo_1.Key.Escape:n.onFinishEditing(new wijmo_1.CancelEventArgs);e.preventDefault();break;case wijmo_1.Key.Tab:wijmo_1.moveFocus(n.hostElement,e.shiftKey?-1:1);e.preventDefault()}}));n._fld=i;n._uniqueValues=i.filter.valueFilter.uniqueValues;n.initialize(o);n.updateEditor();return n}Object.defineProperty(PivotFilterEditor,"controlTemplate",{get:function(){PivotFilterEditor._ctrlTemplate||(PivotFilterEditor._ctrlTemplate='<div><div wj-part="div-type" style="text-align:center;margin-bottom:12px;font-size:80%"><a wj-part="a-cnd" href="" tabindex="-1" draggable="false"></a> | <a wj-part="a-val" href="" tabindex="-1" draggable="false"></a></div><div wj-part="div-edt-val" tabindex="-1"></div><div wj-part="div-edt-cnd" tabindex="-1"></div><div style="text-align:right;margin-top:10px"><button wj-part="btn-ok" class="'+wijmo_1.InputFormElementsClsNames.btn+'"></button></div></div>');return PivotFilterEditor._ctrlTemplate},set:function(e){PivotFilterEditor._ctrlTemplate=e},enumerable:!0,configurable:!0});Object.defineProperty(PivotFilterEditor.prototype,"field",{get:function(){return this._fld},enumerable:!0,configurable:!0});Object.defineProperty(PivotFilterEditor.prototype,"filter",{get:function(){return this._fld?this._fld.filter:null},enumerable:!0,configurable:!0});Object.defineProperty(PivotFilterEditor.prototype,"isEditorClear",{get:function(){switch(this._getFilterType()){case wijmo_grid_filter_1.FilterType.Value:return!this._edtVal||this._edtVal.isEditorClear;case wijmo_grid_filter_1.FilterType.Condition:return!this._edtCnd||this._edtCnd.isEditorClear}wijmo_1.assert(!1,"unknown filter type?");return!1},enumerable:!0,configurable:!0});PivotFilterEditor.prototype.updateEditor=function(){var e=wijmo_grid_filter_1.FilterType,t=e.None;if(this.filter){t=this.filter.conditionFilter.isActive||0==(this.filter.filterType&e.Value)?e.Condition:e.Value;this._showFilter(t)}if(this._edtVal){var i=this._fld,o=i.engine;if(o.isServer&&!this._uniqueValues){var n=o._getUniqueValues(i);i.filter.valueFilter.uniqueValues=n}this._edtVal.updateEditor()}this._edtCnd&&this._edtCnd.updateEditor()};PivotFilterEditor.prototype.updateFilter=function(){switch(this._getFilterType()){case wijmo_grid_filter_1.FilterType.Value:this._edtVal.updateFilter();this.filter.conditionFilter.clear();break;case wijmo_grid_filter_1.FilterType.Condition:this._edtCnd.updateFilter();this.filter.valueFilter.clear()}this.field.onPropertyChanged(new wijmo_1.PropertyChangedEventArgs("filter",null,null))};PivotFilterEditor.prototype.clearEditor=function(){this._edtVal&&this._edtVal.clearEditor();this._edtCnd&&this._edtCnd.clearEditor()};PivotFilterEditor.prototype.onFinishEditing=function(e){this.finishEditing.raise(this,e);return!e.cancel};PivotFilterEditor.prototype._showFilter=function(e){e==wijmo_grid_filter_1.FilterType.Value&&null==this._edtVal&&(this._edtVal=new wijmo_grid_filter_1.ValueFilterEditor(this._divEdtVal,this.filter.valueFilter));e==wijmo_grid_filter_1.FilterType.Condition&&null==this._edtCnd&&(this._edtCnd=new wijmo_grid_filter_1.ConditionFilterEditor(this._divEdtCnd,this.filter.conditionFilter));if(0!=(e&this.filter.filterType))if(e==wijmo_grid_filter_1.FilterType.Value){this._divEdtVal.style.display="";this._divEdtCnd.style.display="none";this._enableLink(this._aVal,!1);this._enableLink(this._aCnd,!0)}else{this._divEdtVal.style.display="none";this._divEdtCnd.style.display="";this._enableLink(this._aVal,!0);this._enableLink(this._aCnd,!1)}switch(this.filter.filterType){case wijmo_grid_filter_1.FilterType.None:case wijmo_grid_filter_1.FilterType.Condition:case wijmo_grid_filter_1.FilterType.Value:this._divType.style.display="none";break;default:this._divType.style.display=""}};PivotFilterEditor.prototype._enableLink=function(e,t){e.style.textDecoration=t?"":"none";e.style.fontWeight=t?"":"bold";wijmo_1.setAttribute(e,"href",t?"":null)};PivotFilterEditor.prototype._getFilterType=function(){var e=wijmo_grid_filter_1.FilterType;return"none"!=this._divEdtVal.style.display?e.Value:e.Condition};PivotFilterEditor.prototype._btnClicked=function(e){e.preventDefault();e.stopPropagation();if(!wijmo_1.hasClass(e.target,wijmo_1.ControlStateClsNames.disabled))if(e.target!=this._aVal)if(e.target!=this._aCnd)this.onFinishEditing(new wijmo_1.CancelEventArgs);else{this._showFilter(wijmo_grid_filter_1.FilterType.Condition);wijmo_1.moveFocus(this._edtCnd.hostElement,0)}else{this._showFilter(wijmo_grid_filter_1.FilterType.Value);wijmo_1.moveFocus(this._edtVal.hostElement,0)}};PivotFilterEditor._ctrlTemplate="";return PivotFilterEditor}(wijmo_1.Control);exports.PivotFilterEditor=PivotFilterEditor;var PivotFieldEditor=function(e){__extends(PivotFieldEditor,e);function PivotFieldEditor(t,i){var o=e.call(this,t,null,!0)||this;o.hostElement.tabIndex=-1;var n=o.getTemplate();o.applyTemplate(wijmo_1.ControlClsNames.hostElement+" "+exports.PivotFieldEditorClsNames.hostElement,n,{_dBnd:"sp-bnd",_dHdr:"div-hdr",_dAgg:"div-agg",_dShw:"div-shw",_dWFl:"div-wfl",_dSrt:"div-srt",_btnFltEdt:"btn-flt-edt",_btnFltClr:"btn-flt-clr",_dFmt:"div-fmt",_dSmp:"div-smp",_btnApply:"btn-apply",_btnCancel:"btn-cancel",_gDlg:"g-dlg",_gHdr:"g-hdr",_gAgg:"g-agg",_gShw:"g-shw",_gWfl:"g-wfl",_gSrt:"g-srt",_gFlt:"g-flt",_gFmt:"g-fmt",_gSmp:"g-smp"});o._pvDate=new Date;var r=wijmo_1.culture.olap.PivotFieldEditor;wijmo_1.setText(o._gDlg,r.dialogHeader);wijmo_1.setText(o._gHdr,r.header);wijmo_1.setText(o._gAgg,r.summary);wijmo_1.setText(o._gShw,r.showAs);wijmo_1.setText(o._gWfl,r.weighBy);wijmo_1.setText(o._gSrt,r.sort);wijmo_1.setText(o._gFlt,r.filter);wijmo_1.setText(o._gFmt,r.format);wijmo_1.setText(o._gSmp,r.sample);wijmo_1.setText(o._btnFltEdt,r.edit);wijmo_1.setText(o._btnFltClr,r.clear);wijmo_1.setText(o._btnApply,r.ok);wijmo_1.setText(o._btnCancel,r.cancel);o._cmbHdr=new wijmo_input_1.ComboBox(o._dHdr,{keyActionPrintCharacters:0,keyActionTab:0});o._cmbAgg=new wijmo_input_1.ComboBox(o._dAgg,{keyActionPrintCharacters:0,keyActionTab:0});o._cmbShw=new wijmo_input_1.ComboBox(o._dShw,{keyActionPrintCharacters:0,keyActionTab:0});o._cmbWFl=new wijmo_input_1.ComboBox(o._dWFl,{keyActionPrintCharacters:0,keyActionTab:0});o._cmbSrt=new wijmo_input_1.ComboBox(o._dSrt,{keyActionPrintCharacters:0,keyActionTab:0});o._cmbFmt=new wijmo_input_1.ComboBox(o._dFmt,{keyActionPrintCharacters:0,keyActionTab:0});o._cmbSmp=new wijmo_input_1.ComboBox(o._dSmp,{keyActionPrintCharacters:0,keyActionTab:0});o._initAggregateOptions();o._initShowAsOptions();o._initFormatOptions();o._initSortOptions();o._updatePreview();o._cmbShw.textChanged.addHandler(o._updateFormat,o);o._cmbFmt.textChanged.addHandler(o._updatePreview,o);o.addEventListener(o._btnFltEdt,"click",(function(e){o._editFilter();e.preventDefault()}));o.addEventListener(o._btnFltClr,"click",(function(e){o._createFilterEditor();o._closeAndFocusTimer=setTimeout((function(){o._eFlt.clearEditor();o._btnFltEdt.focus();wijmo_1.enable(o._btnFltClr,!1)}));e.preventDefault()}));o.addEventListener(o._btnApply,"click",(function(e){o.updateField()}));o.initialize(i);return o}Object.defineProperty(PivotFieldEditor,"controlTemplate",{get:function(){PivotFieldEditor._ctrlTemplate||(PivotFieldEditor._ctrlTemplate='<div><div class="'+exports.DetailDialogClsNames.dialogHeader+'" tabindex="-1"><span wj-part="g-dlg"></span> <span wj-part="sp-bnd"></span></div><div class="'+exports.DetailDialogClsNames.dialogBody+'"><table style="table-layout:fixed"><tr><td wj-part="g-hdr"></td><td><div wj-part="div-hdr"></div></td></tr><tr class="'+wijmo_1.UtilitesClsNames.separator+'"><td wj-part="g-agg"></td><td><div wj-part="div-agg"></div></td></tr><tr class="'+wijmo_1.UtilitesClsNames.separator+'"><td wj-part="g-shw"></td><td><div wj-part="div-shw"></div></td></tr><tr><td wj-part="g-wfl"></td><td><div wj-part="div-wfl"></div></td></tr><tr><td wj-part="g-srt"></td><td><div wj-part="div-srt"></div></td></tr><tr class="'+wijmo_1.UtilitesClsNames.separator+'"><td wj-part="g-flt"></td><td><div><button wj-part="btn-flt-edt" class="'+wijmo_1.InputFormElementsClsNames.btn+'"></button> <button wj-part="btn-flt-clr" class="'+wijmo_1.InputFormElementsClsNames.btn+'"></button></div></td></tr><tr class="'+wijmo_1.UtilitesClsNames.separator+'"><td wj-part="g-fmt"></td><td><div wj-part="div-fmt"></div></td></tr><tr><td wj-part="g-smp"></td><td><div wj-part="div-smp" readonly tabindex="-1"></div></td></tr></table></div><div class="'+exports.DetailDialogClsNames.dialogFooter+'"><button wj-part="btn-apply" class="'+wijmo_1.InputFormElementsClsNames.btn+" "+wijmo_1.UtilitesClsNames.hide+'"></button> <button wj-part="btn-cancel" class="'+wijmo_1.InputFormElementsClsNames.btn+" "+wijmo_1.UtilitesClsNames.hide+'"></button></div></div>');return PivotFieldEditor._ctrlTemplate},set:function(e){PivotFieldEditor._ctrlTemplate=e},enumerable:!0,configurable:!0});Object.defineProperty(PivotFieldEditor.prototype,"field",{get:function(){return this._fld},set:function(e){if(e!=this._fld){this._fld=wijmo_1.asType(e,PivotField);this.updateEditor()}},enumerable:!0,configurable:!0});PivotFieldEditor.prototype.updateEditor=function(){var e=this._fld;if(e&&e.engine){this._dBnd.textContent=e.binding;this._cmbHdr.text=e.header;this._cmbAgg.collectionView.refresh();this._cmbAgg.selectedValue=e.aggregate;this._cmbSrt.selectedValue=e.descending;this._cmbShw.selectedValue=e.showAs;this._initWeighByOptions();var t=e.engine.defaultFilterType!=wijmo_grid_filter_1.FilterType.None&&(null!=e.binding||wijmo_1.isFunction(e.getValue));wijmo_1.enable(this._btnFltEdt,t);wijmo_1.enable(this._btnFltClr,t&&e.filter.isActive);this._cmbFmt.collectionView.refresh();this._cmbFmt.selectedValue=e.format;this._cmbFmt.selectedValue||(this._cmbFmt.text=e.format);var i=e instanceof CubePivotField;this._cmbAgg.isDisabled=i||!!e.getAggregateValue;this._cmbWFl.isDisabled=i}};PivotFieldEditor.prototype.updateField=function(){var e=this._fld;if(e){var t=this._cmbHdr.text.trim();e.header=t||wijmo_1.toHeaderCase(e.binding);e.aggregate=this._cmbAgg.selectedValue;e.showAs=this._cmbShw.selectedValue;e.weightField=this._cmbWFl.selectedValue;e.descending=this._cmbSrt.selectedValue;var i=e.format;e.format=this._cmbFmt.selectedValue||this._cmbFmt.text;var o=this._eFlt;if(o){o.updateFilter();var n=e.dataType==wijmo_1.DataType.Number,r=e.dataType==wijmo_1.DataType.Date;if(i!=e.format&&(n||r)){var s=e.filter.valueFilter;if(s&&s.isActive&&!s.dataMap){var l={};if(n)for(var a in s.showValues){var d=wijmo_1.Globalize.parseFloat(a);l[wijmo_1.Globalize.format(d,e.format)]=!0}else if(r)for(var a in s.showValues){d=wijmo_1.Globalize.parseDate(a,i);l[wijmo_1.Globalize.format(d,e.format)]=!0}s.showValues=l}}}}};PivotFieldEditor.prototype._initAggregateOptions=function(){var e=this,t=wijmo_1.culture.olap.PivotFieldEditor.aggs,i=wijmo_1.Aggregate,o=[{key:t.sum,val:i.Sum,all:!1},{key:t.cnt,val:i.Cnt,all:!0},{key:t.avg,val:i.Avg,all:!1},{key:t.max,val:i.Max,all:!0},{key:t.min,val:i.Min,all:!0},{key:t.rng,val:i.Rng,all:!1},{key:t.std,val:i.Std,all:!1},{key:t.var,val:i.Var,all:!1},{key:t.stdp,val:i.StdPop,all:!1},{key:t.varp,val:i.VarPop,all:!1},{key:t.first,val:i.First,all:!0},{key:t.last,val:i.Last,all:!0}];this._cmbAgg.itemsSource=o;this._cmbAgg.collectionView.filter=function(t){if(t&&t.all)return!0;if(e._fld){var i=e._fld.dataType;return i==wijmo_1.DataType.Number||i==wijmo_1.DataType.Boolean}return!1};this._cmbAgg.initialize({displayMemberPath:"key",selectedValuePath:"val"})};PivotFieldEditor.prototype._initShowAsOptions=function(){var e=wijmo_1.culture.olap.PivotFieldEditor.calcs,t=[{key:e.noCalc,val:ShowAs.NoCalculation},{key:e.dRow,val:ShowAs.DiffRow},{key:e.dRowPct,val:ShowAs.DiffRowPct},{key:e.dCol,val:ShowAs.DiffCol},{key:e.dColPct,val:ShowAs.DiffColPct},{key:e.dPctGrand,val:ShowAs.PctGrand},{key:e.dPctRow,val:ShowAs.PctRow},{key:e.dPrevRow,val:ShowAs.PctPrevRow},{key:e.dPctCol,val:ShowAs.PctCol},{key:e.dPrevCol,val:ShowAs.PctPrevCol},{key:e.dRunTot,val:ShowAs.RunTot},{key:e.dRunTotPct,val:ShowAs.RunTotPct}];this._cmbShw.itemsSource=t;this._cmbShw.initialize({displayMemberPath:"key",selectedValuePath:"val"})};PivotFieldEditor.prototype._initFormatOptions=function(){var e=this,t=wijmo_1.culture.olap.PivotFieldEditor.formats,i=[{key:t.n0,val:"n0",all:!0},{key:t.n2,val:"n2",all:!0},{key:t.c,val:"c",all:!0},{key:t.p0,val:"p0",all:!0},{key:t.p2,val:"p2",all:!0},{key:t.n2c,val:"n2,",all:!0},{key:t.n2cc,val:"n2,,",all:!0},{key:t.n2ccc,val:"n2,,,",all:!0},{key:t.d,val:"d",all:!1},{key:t.MMMMddyyyy,val:"MMMM dd, yyyy",all:!1},{key:t.dMyy,val:"d/M/yy",all:!1},{key:t.ddMyy,val:"dd/M/yy",all:!1},{key:t.dMyyyy,val:"dd/M/yyyy",all:!1},{key:t.MMMyyyy,val:"MMM yyyy",all:!1},{key:t.MMMMyyyy,val:"MMMM yyyy",all:!1},{key:t.yyyy,val:"yyyy",all:!1},{key:t.yyyyQq,val:'yyyy "Q"q',all:!1},{key:t.FYEEEEQU,val:'"FY"EEEE "Q"U',all:!1}];this._cmbFmt.itemsSource=i;this._cmbFmt.isEditable=!0;this._cmbFmt.isRequired=!1;this._cmbFmt.collectionView.filter=function(t){return!(!t||!t.all)||!!e._fld&&e._fld.dataType==wijmo_1.DataType.Date};this._cmbFmt.initialize({displayMemberPath:"key",selectedValuePath:"val"})};PivotFieldEditor.prototype._initWeighByOptions=function(){var e=this._fld;if(e){var t=[{key:wijmo_1.culture.olap.PivotFieldEditor.none,val:null}];e.engine.fields.forEach((function(i){i!=e&&i.dataType==wijmo_1.DataType.Number&&t.push({key:i.header,val:i})}));this._cmbWFl.initialize({displayMemberPath:"key",selectedValuePath:"val",itemsSource:t,selectedValue:e.weightField})}};PivotFieldEditor.prototype._initSortOptions=function(){var e=wijmo_1.culture.olap.PivotFieldEditor.sorts,t=[{key:e.asc,val:!1},{key:e.desc,val:!0}];this._cmbSrt.itemsSource=t;this._cmbSrt.initialize({displayMemberPath:"key",selectedValuePath:"val"})};PivotFieldEditor.prototype._updateFormat=function(){var e=ShowAs[this._cmbShw.selectedValue];this._cmbFmt.selectedValue=e.indexOf("Pct")>-1?"p0":"n0"};PivotFieldEditor.prototype._updatePreview=function(){var e=this._cmbFmt.selectedValue||this._cmbFmt.text,t=wijmo_1.Globalize.format,i="";if(e){var o=e[0].toLowerCase();i="nfgxc".indexOf(o)>-1?t(1234.5678,e):t("p"==o?.12345678:this._pvDate,e)}this._cmbSmp.text=i};PivotFieldEditor.prototype._editFilter=function(){this._createFilterEditor();wijmo_1.showPopup(this._dFlt,this._btnFltEdt,!1,!1,!1);wijmo_1.moveFocus(this._dFlt,0)};PivotFieldEditor.prototype._createFilterEditor=function(){var e=this;if(!this._dFlt){this._dFlt=document.createElement("div");this._eFlt=new PivotFilterEditor(this._dFlt,this._fld);wijmo_1.addClass(this._dFlt,wijmo_input_1.DropDownClsNames.dropDownPanel);this._lostFocusHandler=function(){e._closeFilterTimer=setTimeout((function(){var t=wijmo_1.Control.getControl(e._dFlt);t&&!t.containsFocus()&&e._closeFilter()}),10)};this._eFlt.lostFocus.addHandler(this._lostFocusHandler);this._eFlt.finishEditing.addHandler((function(){e._closeFilter();wijmo_1.enable(e._btnFltClr,!e._eFlt.isEditorClear)}))}};PivotFieldEditor.prototype._closeFilter=function(){if(this._dFlt){wijmo_1.hidePopup(this._dFlt,!0);this.focus()}};PivotFieldEditor.prototype.dispose=function(){if(this._closeFilterTimer){clearTimeout(this._closeFilterTimer);this._closeFilterTimer=null}this._cmbShw&&this._cmbShw.textChanged.removeHandler(this._updateFormat,this);this._cmbFmt&&this._cmbFmt.textChanged.removeHandler(this._updatePreview,this);if(this._eFlt){this._eFlt.dispose();this._eFlt=null}if(this._dFlt){this._dFlt.innerHTML="";this._dFlt=null}if(this._closeFilterTimer){clearTimeout(this._closeFilterTimer);this._closeFilterTimer=null}if(this._closeAndFocusTimer){clearTimeout(this._closeAndFocusTimer);this._closeAndFocusTimer=null}this.hostElement&&(this.hostElement[wijmo_1.Control._CTRL_KEY]=null);e.prototype.dispose.call(this)};PivotFieldEditor._ctrlTemplate="";return PivotFieldEditor}(wijmo_1.Control);exports.PivotFieldEditor=PivotFieldEditor;wijmo_1._registerModule("wijmo.olap",selfModule);var PivotFieldBinding=function(e){__extends(PivotFieldBinding,e);function PivotFieldBinding(t,i){var o=e.call(this,i)||this;o._fld=t;return o}PivotFieldBinding.prototype.getValue=function(t){var i=this._fld;return wijmo_1.isFunction(i.getValue)?i._getValue(t,!1):e.prototype.getValue.call(this,t)};return PivotFieldBinding}(wijmo_1.Binding);exports.PivotFieldBinding=PivotFieldBinding;
|