@sme.up/ketchup 5.2.0-SNAPSHOT → 6.0.0

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.
Files changed (214) hide show
  1. package/dist/cjs/{cell-utils-5b16c180.js → cell-utils-a78d6fac.js} +2 -2
  2. package/dist/cjs/{component-d1496215.js → component-72a5b626.js} +30 -0
  3. package/dist/cjs/{f-button-3b9f32af.js → f-button-ac179257.js} +2 -2
  4. package/dist/cjs/{f-cell-c6ad973a.js → f-cell-69294bca.js} +33 -121
  5. package/dist/cjs/{f-chip-bed86c4a.js → f-chip-b00897d7.js} +5 -4
  6. package/dist/cjs/{f-image-08a3d340.js → f-image-89f25556.js} +2 -2
  7. package/dist/cjs/f-paginator-utils-8fa501b3.js +1898 -0
  8. package/dist/cjs/f-text-field-e1e45ade.js +94 -0
  9. package/dist/cjs/f-text-field-mdc-85997738.js +2570 -0
  10. package/dist/cjs/{index-8d7bb3be.js → index-eb556444.js} +2 -0
  11. package/dist/cjs/ketchup.cjs.js +3 -3
  12. package/dist/cjs/kup-accordion.cjs.entry.js +5 -5
  13. package/dist/cjs/{kup-autocomplete_27.cjs.entry.js → kup-autocomplete_25.cjs.entry.js} +1788 -8378
  14. package/dist/cjs/{kup-echart.cjs.entry.js → kup-box_2.cjs.entry.js} +17102 -14788
  15. package/dist/cjs/kup-calendar.cjs.entry.js +42 -34
  16. package/dist/cjs/kup-cell.cjs.entry.js +8 -7
  17. package/dist/cjs/kup-dash-list.cjs.entry.js +4 -4
  18. package/dist/cjs/kup-dash_2.cjs.entry.js +3 -3
  19. package/dist/cjs/kup-drawer.cjs.entry.js +12 -5
  20. package/dist/cjs/kup-field.cjs.entry.js +2 -2
  21. package/dist/cjs/kup-form-editor.cjs.entry.js +404 -0
  22. package/dist/cjs/kup-iframe.cjs.entry.js +3 -3
  23. package/dist/cjs/kup-image-list.cjs.entry.js +228 -0
  24. package/dist/cjs/kup-lazy.cjs.entry.js +3 -3
  25. package/dist/cjs/kup-magic-box.cjs.entry.js +4 -4
  26. package/dist/cjs/kup-manager-7a941909.js +16703 -0
  27. package/dist/cjs/kup-nav-bar.cjs.entry.js +3 -3
  28. package/dist/cjs/kup-numeric-picker.cjs.entry.js +423 -0
  29. package/dist/cjs/kup-photo-frame.cjs.entry.js +5 -5
  30. package/dist/cjs/kup-probe.cjs.entry.js +2 -2
  31. package/dist/cjs/kup-qlik.cjs.entry.js +2 -2
  32. package/dist/cjs/kup-snackbar.cjs.entry.js +6 -6
  33. package/dist/cjs/loader.cjs.js +3 -3
  34. package/dist/cjs/{utils-b9df398c.js → utils-6287d878.js} +1 -1
  35. package/dist/collection/assets/card.js +4 -5
  36. package/dist/collection/assets/data-table.js +44 -79
  37. package/dist/collection/assets/form-editor.js +338 -0
  38. package/dist/collection/assets/image-list.js +624 -0
  39. package/dist/collection/assets/index.js +16 -0
  40. package/dist/collection/assets/kupdata.js +0 -3
  41. package/dist/collection/assets/kuptooltip.js +654 -0
  42. package/dist/collection/assets/tree.js +0 -128
  43. package/dist/collection/collection-manifest.json +8 -6
  44. package/dist/collection/components/kup-autocomplete/kup-autocomplete.js +1 -1
  45. package/dist/collection/components/kup-box/kup-box-declarations.js +0 -4
  46. package/dist/collection/components/kup-box/kup-box.js +7 -135
  47. package/dist/collection/components/kup-card/built-in/kup-card-built-in.js +10 -0
  48. package/dist/collection/components/kup-card/built-in/kup-card-clock.js +1 -1
  49. package/dist/collection/components/kup-card/built-in/kup-card-column-drop-menu.js +1 -2
  50. package/dist/collection/components/kup-card/built-in/kup-card-numeric.js +153 -0
  51. package/dist/collection/components/kup-card/kup-card.css +61 -8
  52. package/dist/collection/components/kup-card/kup-card.js +2 -2
  53. package/dist/collection/components/kup-card/standard/kup-card-standard.js +14 -6
  54. package/dist/collection/components/kup-combobox/kup-combobox.js +1 -1
  55. package/dist/collection/components/kup-data-table/kup-data-table-declarations.js +1 -3
  56. package/dist/collection/components/kup-data-table/kup-data-table-state.js +1 -1
  57. package/dist/collection/components/kup-data-table/kup-data-table.js +50 -138
  58. package/dist/collection/components/kup-date-picker/kup-date-picker.js +1 -1
  59. package/dist/collection/components/kup-drawer/kup-drawer.css +1 -0
  60. package/dist/collection/components/kup-drawer/kup-drawer.js +8 -1
  61. package/dist/collection/components/kup-form-editor/kup-form-editor-declarations.js +23 -0
  62. package/dist/collection/components/kup-form-editor/kup-form-editor.css +80 -0
  63. package/dist/collection/components/kup-form-editor/kup-form-editor.js +561 -0
  64. package/dist/collection/components/kup-image-list/kup-image-list-declarations.js +10 -0
  65. package/dist/collection/components/kup-image-list/kup-image-list.css +166 -0
  66. package/dist/collection/components/kup-image-list/kup-image-list.js +432 -0
  67. package/dist/collection/components/kup-numeric-picker/kup-numeric-picker-declarations.js +16 -0
  68. package/dist/collection/components/kup-numeric-picker/kup-numeric-picker.css +50 -0
  69. package/dist/collection/components/kup-numeric-picker/kup-numeric-picker.js +895 -0
  70. package/dist/collection/components/kup-photo-frame/kup-photo-frame.css +3 -13
  71. package/dist/collection/components/kup-photo-frame/kup-photo-frame.js +1 -1
  72. package/dist/collection/components/kup-snackbar/kup-snackbar.css +4 -0
  73. package/dist/collection/components/kup-tab-bar/kup-tab-bar.js +18 -19
  74. package/dist/collection/components/kup-time-picker/kup-time-picker.js +2 -2
  75. package/dist/collection/components/kup-tree/kup-tree-declarations.js +0 -4
  76. package/dist/collection/components/kup-tree/kup-tree.css +10 -3
  77. package/dist/collection/components/kup-tree/kup-tree.js +81 -145
  78. package/dist/collection/f-components/f-cell/f-cell.js +7 -7
  79. package/dist/collection/f-components/f-chip/f-chip.js +2 -1
  80. package/dist/collection/managers/kup-data/kup-data-node-helper.js +24 -0
  81. package/dist/collection/managers/kup-data/kup-data.js +4 -1
  82. package/dist/collection/managers/kup-debug/kup-debug.js +1 -0
  83. package/dist/collection/managers/kup-dynamic-position/kup-dynamic-position.js +4 -2
  84. package/dist/collection/managers/kup-interact/kup-interact.js +1 -22
  85. package/dist/collection/managers/kup-language/kup-language-declarations.js +2 -0
  86. package/dist/collection/managers/kup-manager/kup-manager.js +31 -1
  87. package/dist/collection/managers/kup-math/kup-math.js +11 -1
  88. package/dist/collection/managers/kup-theme/kup-theme-declarations.js +6 -0
  89. package/dist/collection/managers/kup-tooltip/kup-tooltip-declarations.js +1 -0
  90. package/dist/collection/managers/kup-tooltip/kup-tooltip.js +224 -0
  91. package/dist/collection/types/GenericTypes.js +3 -0
  92. package/dist/collection/utils/kup-column-menu/kup-column-menu.js +8 -12
  93. package/dist/esm/{cell-utils-69f75e2e.js → cell-utils-964da6b5.js} +3 -3
  94. package/dist/esm/{component-c4eb6153.js → component-b1bedf1d.js} +27 -2
  95. package/dist/esm/{f-button-7e7607d8.js → f-button-871a544b.js} +2 -2
  96. package/dist/esm/{f-cell-e4d83c27.js → f-cell-521ef17a.js} +33 -120
  97. package/dist/esm/{f-chip-51dfefaf.js → f-chip-1dda722f.js} +6 -5
  98. package/dist/esm/{f-image-de331954.js → f-image-c468d8ae.js} +2 -2
  99. package/dist/esm/f-paginator-utils-7dff8ff0.js +1884 -0
  100. package/dist/esm/f-text-field-d6c61c73.js +92 -0
  101. package/dist/esm/f-text-field-mdc-d42d3f9e.js +2568 -0
  102. package/dist/esm/{index-aeec9835.js → index-baeab1ac.js} +2 -1
  103. package/dist/esm/ketchup.js +3 -3
  104. package/dist/esm/kup-accordion.entry.js +6 -6
  105. package/dist/esm/{kup-autocomplete_27.entry.js → kup-autocomplete_25.entry.js} +1724 -8312
  106. package/dist/esm/{kup-echart.entry.js → kup-box_2.entry.js} +17102 -14789
  107. package/dist/esm/kup-calendar.entry.js +43 -35
  108. package/dist/esm/kup-cell.entry.js +8 -7
  109. package/dist/esm/kup-dash-list.entry.js +4 -4
  110. package/dist/esm/kup-dash_2.entry.js +3 -3
  111. package/dist/esm/kup-drawer.entry.js +12 -5
  112. package/dist/esm/kup-field.entry.js +2 -2
  113. package/dist/esm/kup-form-editor.entry.js +400 -0
  114. package/dist/esm/kup-iframe.entry.js +3 -3
  115. package/dist/esm/kup-image-list.entry.js +224 -0
  116. package/dist/esm/kup-lazy.entry.js +3 -3
  117. package/dist/esm/kup-magic-box.entry.js +4 -4
  118. package/dist/esm/kup-manager-58b075b4.js +16686 -0
  119. package/dist/esm/kup-nav-bar.entry.js +3 -3
  120. package/dist/esm/kup-numeric-picker.entry.js +419 -0
  121. package/dist/esm/kup-photo-frame.entry.js +5 -5
  122. package/dist/esm/kup-probe.entry.js +2 -2
  123. package/dist/esm/kup-qlik.entry.js +2 -2
  124. package/dist/esm/kup-snackbar.entry.js +6 -6
  125. package/dist/esm/loader.js +3 -3
  126. package/dist/esm/polyfills/css-shim.js +1 -1
  127. package/dist/esm/{tslib.es6-8f2d44b6.js → tslib.es6-3eea2234.js} +1 -1
  128. package/dist/esm/{utils-35c7a90d.js → utils-d7e4b3c2.js} +2 -2
  129. package/dist/ketchup/ketchup.esm.js +1 -1
  130. package/dist/ketchup/{p-5d190cf5.js → p-1ae66cc5.js} +1 -1
  131. package/dist/ketchup/{p-8be1337b.js → p-34b74425.js} +1 -1
  132. package/dist/ketchup/{p-fea316ab.entry.js → p-3c11e615.entry.js} +1 -1
  133. package/dist/ketchup/p-44ec4f03.js +1 -0
  134. package/dist/ketchup/p-4ffbc3ff.js +1 -0
  135. package/dist/ketchup/p-5264a3e6.entry.js +1 -0
  136. package/dist/ketchup/{p-d7af8156.entry.js → p-65974e48.entry.js} +1 -1
  137. package/dist/ketchup/p-65b46587.entry.js +40 -0
  138. package/dist/ketchup/{p-3813281b.entry.js → p-6dff70f8.entry.js} +1 -1
  139. package/dist/ketchup/{p-33073f4a.js → p-7454cb92.js} +1 -1
  140. package/dist/ketchup/{p-a0b1d769.js → p-79b0730b.js} +1 -1
  141. package/dist/ketchup/p-7eff4eee.js +1 -0
  142. package/dist/ketchup/p-80968627.entry.js +1 -0
  143. package/dist/ketchup/{p-8c44c3b9.js → p-81605f08.js} +4 -5
  144. package/dist/ketchup/p-8cdf61a4.js +1 -0
  145. package/dist/ketchup/{p-f9c41e20.entry.js → p-954cc340.entry.js} +1 -1
  146. package/dist/ketchup/p-99e0d768.entry.js +1 -0
  147. package/dist/ketchup/{p-8f735633.entry.js → p-a0f6e25c.entry.js} +1 -1
  148. package/dist/ketchup/p-a203f78b.js +45 -0
  149. package/dist/ketchup/{p-9bcda66f.entry.js → p-a615a92b.entry.js} +1 -1
  150. package/dist/ketchup/p-aca0e54b.js +30 -0
  151. package/dist/ketchup/p-b8939a8b.entry.js +1 -0
  152. package/dist/ketchup/p-bfc3bac7.js +1 -0
  153. package/dist/ketchup/{p-67c64257.entry.js → p-c5ce8951.entry.js} +1 -1
  154. package/dist/ketchup/p-cad1e097.entry.js +9 -0
  155. package/dist/ketchup/{p-68fc1428.entry.js → p-d2ee56dd.entry.js} +1 -1
  156. package/dist/ketchup/p-db71436b.entry.js +27 -0
  157. package/dist/ketchup/{p-10c8d755.js → p-e0035c58.js} +1 -1
  158. package/dist/ketchup/p-e1039cf2.entry.js +1 -0
  159. package/dist/ketchup/{p-b5e1dbfa.entry.js → p-ea10176c.entry.js} +1 -1
  160. package/dist/ketchup/p-f09f2f98.entry.js +1 -0
  161. package/dist/ketchup/{p-0751aaf6.entry.js → p-f71a1675.entry.js} +1 -1
  162. package/dist/ketchup/{p-4081f5f7.entry.js → p-fac1a08b.entry.js} +1 -1
  163. package/dist/types/components/kup-box/kup-box-declarations.d.ts +3 -5
  164. package/dist/types/components/kup-box/kup-box.d.ts +0 -22
  165. package/dist/types/components/kup-card/built-in/kup-card-built-in.d.ts +7 -0
  166. package/dist/types/components/kup-card/built-in/kup-card-numeric.d.ts +2 -0
  167. package/dist/types/components/kup-card/kup-card-declarations.d.ts +26 -1
  168. package/dist/types/components/kup-data-table/kup-data-table-declarations.d.ts +4 -4
  169. package/dist/types/components/kup-data-table/kup-data-table-state.d.ts +1 -1
  170. package/dist/types/components/kup-data-table/kup-data-table.d.ts +5 -19
  171. package/dist/types/components/kup-form-editor/kup-form-editor-declarations.d.ts +79 -0
  172. package/dist/types/components/kup-form-editor/kup-form-editor.d.ts +72 -0
  173. package/dist/types/components/kup-image-list/kup-image-list-declarations.d.ts +14 -0
  174. package/dist/types/components/kup-image-list/kup-image-list.d.ts +56 -0
  175. package/dist/types/components/kup-numeric-picker/kup-numeric-picker-declarations.d.ts +19 -0
  176. package/dist/types/components/kup-numeric-picker/kup-numeric-picker.d.ts +121 -0
  177. package/dist/types/components/kup-tab-bar/kup-tab-bar-declarations.d.ts +3 -9
  178. package/dist/types/components/kup-tab-bar/kup-tab-bar.d.ts +6 -6
  179. package/dist/types/components/kup-tree/kup-tree-declarations.d.ts +1 -5
  180. package/dist/types/components/kup-tree/kup-tree.d.ts +1 -25
  181. package/dist/types/components.d.ts +265 -232
  182. package/dist/types/managers/kup-data/kup-data-declarations.d.ts +1 -0
  183. package/dist/types/managers/kup-data/kup-data-node-helper.d.ts +7 -0
  184. package/dist/types/managers/kup-data/kup-data.d.ts +1 -0
  185. package/dist/types/managers/kup-language/kup-language-declarations.d.ts +2 -0
  186. package/dist/types/managers/kup-manager/kup-manager-declarations.d.ts +14 -0
  187. package/dist/types/managers/kup-manager/kup-manager.d.ts +14 -0
  188. package/dist/types/managers/kup-math/kup-math-declarations.d.ts +6 -0
  189. package/dist/types/managers/kup-math/kup-math.d.ts +2 -1
  190. package/dist/types/managers/kup-tooltip/kup-tooltip-declarations.d.ts +8 -0
  191. package/dist/types/managers/kup-tooltip/kup-tooltip.d.ts +51 -0
  192. package/dist/types/types/GenericTypes.d.ts +3 -0
  193. package/dist/types/utils/kup-column-menu/kup-column-menu.d.ts +1 -3
  194. package/package.json +16 -15
  195. package/dist/cjs/kup-manager-4227f0a2.js +0 -8582
  196. package/dist/collection/assets/tooltip.js +0 -73
  197. package/dist/collection/components/kup-tooltip/kup-tooltip-declarations.js +0 -20
  198. package/dist/collection/components/kup-tooltip/kup-tooltip.css +0 -149
  199. package/dist/collection/components/kup-tooltip/kup-tooltip.js +0 -1205
  200. package/dist/collection/utils/helpers.js +0 -38
  201. package/dist/esm/kup-manager-0ab94726.js +0 -8565
  202. package/dist/ketchup/p-24df4f29.entry.js +0 -27
  203. package/dist/ketchup/p-2d4f19f4.js +0 -1
  204. package/dist/ketchup/p-3445be1e.entry.js +0 -1
  205. package/dist/ketchup/p-3aab1f0d.entry.js +0 -1
  206. package/dist/ketchup/p-47b57d97.js +0 -1
  207. package/dist/ketchup/p-5186885c.entry.js +0 -1
  208. package/dist/ketchup/p-78223dc0.entry.js +0 -143
  209. package/dist/ketchup/p-96101f09.entry.js +0 -39
  210. package/dist/ketchup/p-c314b1e6.js +0 -1
  211. package/dist/ketchup/p-ee33cbe9.js +0 -9
  212. package/dist/types/components/kup-tooltip/kup-tooltip-declarations.d.ts +0 -93
  213. package/dist/types/components/kup-tooltip/kup-tooltip.d.ts +0 -142
  214. package/dist/types/utils/helpers.d.ts +0 -4
@@ -1 +1 @@
1
- import{r as t,c as i,f as s,h as e,H as o,g as h}from"./p-8be1337b.js";import{k as n,j as r}from"./p-ee33cbe9.js";import{g as a,s as d}from"./p-10c8d755.js";var c;!function(t){t.buttonData="Props of the button (when isButton is set to true).",t.isButton="The component will be rendered as a button, which opens the link associated to the iframe in another tab when clicked.",t.src="The address the iframe should be referencing to."}(c||(c={}));const p=class{constructor(s){t(this,s),this.kupIframeError=i(this,"kup-iframe-error",6),this.kupIframeLoad=i(this,"kup-iframe-load",6),this.buttonData={},this.isButton=!1,this.src=void 0,this.kupManager=n()}onKupIframeError(){this.kupIframeError.emit({comp:this,id:this.rootElement.id})}onKupIframeLoad(){this.kupIframeLoad.emit({comp:this,id:this.rootElement.id})}async getProps(t){return a(this,c,t)}async refresh(){s(this)}async setProps(t){d(this,c,t)}openInNew(){window.open(this.src,"_blank")}componentWillLoad(){this.kupManager.debug.logLoad(this,!1)}componentDidLoad(){this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1)}componentDidRender(){this.kupManager.debug.logRender(this,!0)}render(){if(null!=this.src&&""!==this.src)return this.buttonData.icon||(this.buttonData.icon="open_in_new"),this.buttonData.label||(this.buttonData.label="Open in new tab"),this.isButton?e(o,{"is-button":!0},e("kup-button",Object.assign({},this.buttonData,{"onkup-button-click":()=>this.openInNew()}))):e(o,{"is-iframe":!0},e("iframe",{onError:this.onKupIframeError.bind(this),onLoad:this.onKupIframeLoad.bind(this),src:this.src}));this.kupManager.debug.logMessage(this,"Resource undefined, not rendering!",r.WARNING)}get rootElement(){return h(this)}};p.style="iframe{box-sizing:border-box;height:100%;width:100%}:host([is-iframe]){box-sizing:border-box;display:block;height:100%;width:100%}";export{p as kup_iframe}
1
+ import{r as t,c as i,f as s,h as e,H as o,g as h}from"./p-34b74425.js";import{k as n,c as r}from"./p-aca0e54b.js";import{g as a,s as c}from"./p-e0035c58.js";var d;!function(t){t.buttonData="Props of the button (when isButton is set to true).",t.isButton="The component will be rendered as a button, which opens the link associated to the iframe in another tab when clicked.",t.src="The address the iframe should be referencing to."}(d||(d={}));const p=class{constructor(s){t(this,s),this.kupIframeError=i(this,"kup-iframe-error",6),this.kupIframeLoad=i(this,"kup-iframe-load",6),this.buttonData={},this.isButton=!1,this.src=void 0,this.kupManager=n()}onKupIframeError(){this.kupIframeError.emit({comp:this,id:this.rootElement.id})}onKupIframeLoad(){this.kupIframeLoad.emit({comp:this,id:this.rootElement.id})}async getProps(t){return a(this,d,t)}async refresh(){s(this)}async setProps(t){c(this,d,t)}openInNew(){window.open(this.src,"_blank")}componentWillLoad(){this.kupManager.debug.logLoad(this,!1)}componentDidLoad(){this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1)}componentDidRender(){this.kupManager.debug.logRender(this,!0)}render(){if(null!=this.src&&""!==this.src)return this.buttonData.icon||(this.buttonData.icon="open_in_new"),this.buttonData.label||(this.buttonData.label="Open in new tab"),this.isButton?e(o,{"is-button":!0},e("kup-button",Object.assign({},this.buttonData,{"onkup-button-click":()=>this.openInNew()}))):e(o,{"is-iframe":!0},e("iframe",{onError:this.onKupIframeError.bind(this),onLoad:this.onKupIframeLoad.bind(this),src:this.src}));this.kupManager.debug.logMessage(this,"Resource undefined, not rendering!",r.WARNING)}get rootElement(){return h(this)}};p.style="iframe{box-sizing:border-box;height:100%;width:100%}:host([is-iframe]){box-sizing:border-box;display:block;height:100%;width:100%}";export{p as kup_iframe}
@@ -1 +1 @@
1
- import{k as n,m as l,o as u,d as t}from"./p-10c8d755.js";import{d as r}from"./p-ee33cbe9.js";const e=document.documentElement;function f(n,l){if(null!=l&&null!=l.displayedValue)return l.displayedValue;let u=s(l.value,n,l);return null!=l&&(l.displayedValue=u),u}function i(n,l){return null==n?"":(null!=n.displayedValue&&""!=n.displayedValue.trim()||(n.displayedValue=s(n.value,l,null)),n.displayedValue)}function o(n){return e.ketchup.math.numberify(n.obj?n.obj.k:n.value)}function s(n,l,u){let t=null!=l?l.obj:null;return null!=u&&(t=u.obj?u.obj:t),c(n,t,null!=l?l.decimals:null)}function c(t,f,i){return null==t||""==t.trim()?t:e.ketchup.objects.isNumber(f)?n(t,i||-1,f?f.p:""):e.ketchup.objects.isDate(f)&&e.ketchup.dates.isValid(t,r.ISO_DATE)?e.ketchup.dates.format(t):e.ketchup.objects.isTime(f)?l(t,e.ketchup.objects.isTimeWithSeconds(f),f.t+f.p):e.ketchup.objects.isTimestamp(f)?u(t):t}function a(n,l){if(null==n)return null;for(let u of n)if(u.name===l)return u;return null}function m(n,l,u){return d(n.obj,n.value,l.obj,l.value,u)}function d(n,l,u,f,i){const o="A"===i?1:-1;if(null==n||null==u)return o*p(l,f);if(n.t!==u.t||n.p!==u.p){let l=p(n.t,u.t);return 0===l&&(l=p(n.p,u.p)),l*o}let s=l,c=f;if(s==c)return 0;if(""==s)return-1*o;if(""==c)return 1*o;let a=s,m=c;if(e.ketchup.objects.isNumber(n))a=t(s),m=t(c);else if(e.ketchup.objects.isDate(n))a=e.ketchup.dates.toDate(e.ketchup.dates.format(s,r.ISO_DATE)),m=e.ketchup.dates.toDate(e.ketchup.dates.format(c,r.ISO_DATE));else if(e.ketchup.objects.isTime(n)){let l=e.ketchup.objects.isTimeWithSeconds(n);a=e.ketchup.dates.toDate(e.ketchup.dates.format(s,l?r.ISO_TIME:r.ISO_TIME_WITHOUT_SECONDS)),m=e.ketchup.dates.toDate(e.ketchup.dates.format(c,l?r.ISO_TIME:r.ISO_TIME_WITHOUT_SECONDS))}else e.ketchup.objects.isTimestamp(n)&&(a=e.ketchup.dates.toDate(e.ketchup.dates.format(s,r.ISO_DATE_TIME)),m=e.ketchup.dates.toDate(e.ketchup.dates.format(c,r.ISO_DATE_TIME)));return a>m?1*o:a<m?-1*o:0}function p(n,l){let u=null==n?0:n.length,t=null==l?0:l.length;const r=Math.min(u,t);let e=0;for(;e<r;){const u=n[e],t=l[e];if(u!==t)return u.charCodeAt(0)-t.charCodeAt(0);e++}return u-t}export{i as a,f as b,a as c,d,m as e,o as f,c as g}
1
+ import{u as n,d as l,e as u,h as t}from"./p-e0035c58.js";import{d as r}from"./p-aca0e54b.js";const e=document.documentElement;function f(n,l){if(null!=l&&null!=l.displayedValue)return l.displayedValue;let u=s(l.value,n,l);return null!=l&&(l.displayedValue=u),u}function i(n,l){return null==n?"":(null!=n.displayedValue&&""!=n.displayedValue.trim()||(n.displayedValue=s(n.value,l,null)),n.displayedValue)}function o(n){return e.ketchup.math.numberify(n.obj?n.obj.k:n.value)}function s(n,l,u){let t=null!=l?l.obj:null;return null!=u&&(t=u.obj?u.obj:t),c(n,t,null!=l?l.decimals:null)}function c(t,f,i){return null==t||""==t.trim()?t:e.ketchup.objects.isNumber(f)?n(t,i||-1,f?f.p:""):e.ketchup.objects.isDate(f)&&e.ketchup.dates.isValid(t,r.ISO_DATE)?e.ketchup.dates.format(t):e.ketchup.objects.isTime(f)?l(t,e.ketchup.objects.isTimeWithSeconds(f),f.t+f.p):e.ketchup.objects.isTimestamp(f)?u(t):t}function a(n,l){if(null==n)return null;for(let u of n)if(u.name===l)return u;return null}function m(n,l,u){return p(n.obj,n.value,l.obj,l.value,u)}function p(n,l,u,f,i){const o="A"===i?1:-1;if(null==n||null==u)return o*d(l,f);if(n.t!==u.t||n.p!==u.p){let l=d(n.t,u.t);return 0===l&&(l=d(n.p,u.p)),l*o}let s=l,c=f;if(s==c)return 0;if(""==s)return-1*o;if(""==c)return 1*o;let a=s,m=c;if(e.ketchup.objects.isNumber(n))a=t(s),m=t(c);else if(e.ketchup.objects.isDate(n))a=e.ketchup.dates.toDate(e.ketchup.dates.format(s,r.ISO_DATE)),m=e.ketchup.dates.toDate(e.ketchup.dates.format(c,r.ISO_DATE));else if(e.ketchup.objects.isTime(n)){let l=e.ketchup.objects.isTimeWithSeconds(n);a=e.ketchup.dates.toDate(e.ketchup.dates.format(s,l?r.ISO_TIME:r.ISO_TIME_WITHOUT_SECONDS)),m=e.ketchup.dates.toDate(e.ketchup.dates.format(c,l?r.ISO_TIME:r.ISO_TIME_WITHOUT_SECONDS))}else e.ketchup.objects.isTimestamp(n)&&(a=e.ketchup.dates.toDate(e.ketchup.dates.format(s,r.ISO_DATE_TIME)),m=e.ketchup.dates.toDate(e.ketchup.dates.format(c,r.ISO_DATE_TIME)));return a>m?1*o:a<m?-1*o:0}function d(n,l){let u=null==n?0:n.length,t=null==l?0:l.length;const r=Math.min(u,t);let e=0;for(;e<r;){const u=n[e],t=l[e];if(u!==t)return u.charCodeAt(0)-t.charCodeAt(0);e++}return u-t}export{i as a,c as b,f as c,p as d,m as e,o as f,a as g}
@@ -12,4 +12,4 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
12
12
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
13
13
  PERFORMANCE OF THIS SOFTWARE.
14
14
  ***************************************************************************** */
15
- var n=function(r,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(n[t]=r[t])})(r,t)};function r(r,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function o(){this.constructor=r}n(r,t),r.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}var t=function(){return(t=Object.assign||function(n){for(var r,t=1,o=arguments.length;t<o;t++)for(var e in r=arguments[t])Object.prototype.hasOwnProperty.call(r,e)&&(n[e]=r[e]);return n}).apply(this,arguments)};function o(n){var r="function"==typeof Symbol&&Symbol.iterator,t=r&&n[r],o=0;if(t)return t.call(n);if(n&&"number"==typeof n.length)return{next:function(){return n&&o>=n.length&&(n=void 0),{value:n&&n[o++],done:!n}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")}function e(n,r){var t="function"==typeof Symbol&&n[Symbol.iterator];if(!t)return n;var o,e,i=t.call(n),f=[];try{for(;(void 0===r||r-- >0)&&!(o=i.next()).done;)f.push(o.value)}catch(n){e={error:n}}finally{try{o&&!o.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}return f}function i(n,r){for(var t=0,o=r.length,e=n.length;t<o;t++,e++)n[e]=r[t];return n}export{i as _,e as a,r as b,t as c,o as d}
15
+ var n=function(r,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(n[t]=r[t])})(r,t)};function r(r,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function o(){this.constructor=r}n(r,t),r.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}var t=function(){return(t=Object.assign||function(n){for(var r,t=1,o=arguments.length;t<o;t++)for(var e in r=arguments[t])Object.prototype.hasOwnProperty.call(r,e)&&(n[e]=r[e]);return n}).apply(this,arguments)};function o(n){var r="function"==typeof Symbol&&Symbol.iterator,t=r&&n[r],o=0;if(t)return t.call(n);if(n&&"number"==typeof n.length)return{next:function(){return n&&o>=n.length&&(n=void 0),{value:n&&n[o++],done:!n}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")}function e(n,r){var t="function"==typeof Symbol&&n[Symbol.iterator];if(!t)return n;var o,e,i=t.call(n),f=[];try{for(;(void 0===r||r-- >0)&&!(o=i.next()).done;)f.push(o.value)}catch(n){e={error:n}}finally{try{o&&!o.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}return f}function i(n,r){for(var t=0,o=r.length,e=n.length;t<o;t++,e++)n[e]=r[t];return n}export{r as _,t as a,o as b,i as c,e as d}
@@ -0,0 +1 @@
1
+ import{h as c}from"./p-34b74425.js";import{F as i}from"./p-bfc3bac7.js";import{a as s,h as e,b as n}from"./p-aca0e54b.js";var p;!function(c){c.CHOICE="choice",c.FILTER="filter",c.INPUT="input",c.STANDARD="standard"}(p||(p={}));const l=document.documentElement,a=a=>{a.type||(a.type=p.STANDARD);const r=a.type.toLowerCase()===p.CHOICE,t=a.type.toLowerCase()===p.FILTER,o=a.type.toLowerCase()===p.INPUT,d={"chip-set":!0,"chip-set--choice":!!r,"chip-set--filter":!!t,"chip-set--input":!!o};return c("div",Object.assign({class:`f-chip ${a.danger?"kup-danger":""} ${a.info?"kup-info":""} ${a.secondary?"kup-secondary":""} ${a.success?"kup-success":""} ${a.warning?"kup-warning":""} ${a.wrapperClass?a.wrapperClass:""}`},a.dataSet,{id:a.id,title:a.title}),c("div",{class:d,role:"grid"},function(p,a,r,t){const o=[];for(let u=0;p.data&&u<p.data.length;u++){const _=[];function d(n,a){const r=!!(n.children&&n.children.length>0),t=!(!r||!n.isExpanded),o={"--kup_chip_indent_offset":a.toString()};if(_.push(c("div",{class:"chip-set__wrapper "+(r&&!t?"chip-set__wrapper--hidden-children":"")},c("div",{class:"chip-set__indent",style:o}),r?c(i,{onClick:p.onExpansionClick&&p.onExpansionClick[u]?p.onExpansionClick[u].bind(p.onExpansionClick[u],n):null,resource:`${s.DROPDOWN}`,sizeX:"18px",sizeY:"18px",title:l.ketchup.language.translate(e.EXPAND)+"/"+l.ketchup.language.translate(e.COLLAPSE)+" (CTRL + Click)",wrapperClass:"dropdown-icon"}):a?c(i,{resource:"blank",sizeX:"18px",sizeY:"18px",wrapperClass:"dropdown-icon"}):null,h(n))),t)for(let c=0;c<n.children.length;c++)n.children[c]&&d(n.children[c],a+1)}function h(e){let l="chip "+(e.icon&&!e.value?"chip--only-icon":""),o=[],d="chip__icon chip__icon--leading";return(r||a)&&e.checked&&(l+=" chip--selected",r&&(d+=" chip__icon--leading-hidden")),e.icon&&o.push(c(i,Object.assign({},{color:a&&e.checked?`var(${n.PRIMARY})`:`var(${n.TEXT})`,resource:e.icon,sizeX:"18px",sizeY:"18px",wrapperClass:d}))),r&&o.push(c("span",{class:"chip__checkmark"},c("svg",{class:"chip__checkmark-svg",viewBox:"-2 -3 30 30"},c("path",{class:"chip__checkmark-path",fill:"none",stroke:"black",d:"M1.73,12.91 8.1,19.28 22.79,4.59"})))),c("div",{class:l,"data-value":e.id,onClick:p.onClick&&p.onClick[u]?p.onClick[u].bind(p.onClick[u],e):null,role:"row",title:e.title?e.title:""},c("span",{class:"chip-set__indent"}),o,c("span",{role:"gridcell"},c("span",{role:"button",tabindex:u,class:"chip__primary-action",value:e.id,checked:e.checked,onBlur:p.onBlur&&p.onBlur[u]?p.onBlur[u].bind(p.onBlur[u],e):null,onFocus:p.onFocus&&p.onFocus[u]?p.onFocus[u].bind(p.onFocus[u],e):null},c("span",{class:"chip__text"},e.value))),t?c("span",{role:"gridcell"},c("span",{tabindex:"-1",class:`kup-icon chip__icon ${s.CLEAR.replace("--","")}`,onClick:p.onIconClick&&p.onIconClick[u]?p.onIconClick[u].bind(p.onIconClick[u],e):null})):null)}d(p.data[u],0),o.push(c("div",{class:"chip-set__item"},..._))}return o}(a,r,t,o)))};export{p as F,a}
@@ -0,0 +1 @@
1
+ import{r as t,f as s,h as i,H as e,g as h}from"./p-34b74425.js";import{k as o,B as n,h as r}from"./p-aca0e54b.js";import{g as a,s as c}from"./p-e0035c58.js";import{c as l}from"./p-97e8ea42.js";import{a as p,b as m}from"./p-4ffbc3ff.js";import"./p-7454cb92.js";import"./p-44ec4f03.js";import"./p-bfc3bac7.js";import"./p-7eff4eee.js";var d;!function(t){t.customStyle="Custom style of the component.",t.data="The data of the cell.",t.density="The density of the cell, defaults at 'dense' and can be also set to 'wide' or 'medium'.",t.dragEnabled="When set to true, the component is draggable."}(d||(d={}));const f=class{constructor(s){t(this,s),this.customStyle="",this.data=null,this.density=p.NONE,this.dragEnabled=!1,this.kupManager=o()}async addCssClasses(t){if(this.data.cssClass||(this.data.cssClass=""),t)for(let s=0;s<t.length;s++){const i=t[s];this.data.cssClass.indexOf(i)<0&&(this.data.cssClass+=` ${i}`)}this.refresh()}async getProps(t){return a(this,d,t)}async refresh(){s(this)}async removeCssClasses(t){if(this.data.cssClass){if(t)for(let s=0;s<t.length;s++){const i=t[s];this.data.cssClass.indexOf(i)>0&&(this.data.cssClass=this.data.cssClass.replace(new RegExp(i,"g"),""))}this.refresh()}}async setProps(t){c(this,d,t)}didRenderInteractables(){if(this.dragEnabled){const t=()=>({cell:this.data,column:this.generateColumn(),id:this.rootElement.id,multiple:!1,row:this.generateRow()});this.kupManager.interact.draggable(this.rootElement.shadowRoot.querySelector("#"+l),{cursorChecker:()=>null},{callback:t},n.BADGE)}}generateColumn(){return{name:this.data&&this.data.obj&&this.data.obj.t?this.data.obj.t+";"+this.data.obj.p:"KUPCELL",title:this.data&&this.data.obj&&this.data.obj.t?this.data.obj.t+";"+this.data.obj.p:this.kupManager.language.translate(r.EMPTY_OBJECT)}}generateRow(){const t=this.generateColumn(),s={cells:{}};return s.cells[t.name]=this.data,s}componentWillLoad(){this.kupManager.dates.register(this),this.kupManager.debug.logLoad(this,!1),this.kupManager.language.register(this),this.kupManager.theme.register(this)}componentDidLoad(){this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1)}componentDidRender(){this.didRenderInteractables(),this.kupManager.debug.logRender(this,!0)}render(){const t={cell:this.data,column:this.generateColumn(),component:this,density:this.density,editable:this.data.isEditable,renderKup:!0,row:this.generateRow()};return i(e,null,i("style",null,this.kupManager.theme.setKupStyle(this.rootElement)),i("div",{id:l},i(m,Object.assign({},t))))}disconnectedCallback(){this.kupManager.dates.unregister(this),this.kupManager.language.unregister(this),this.kupManager.theme.unregister(this)}get rootElement(){return h(this)}};f.style=":host{display:block;height:100%;width:100%}#kup-component{height:100%;width:100%}";export{f as kup_cell}
@@ -1,4 +1,4 @@
1
- import{_ as t,a as n,b as i,c as e,d as r}from"./p-a0b1d769.js";
1
+ import{c as t,d as n,_ as i,a as e,b as r}from"./p-79b0730b.js";
2
2
  /**
3
3
  * @license
4
4
  * Copyright 2016 Google Inc.
@@ -87,7 +87,7 @@ function u(t){return void 0===t&&(t=window),!!function(t){void 0===t&&(t=window)
87
87
  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
88
88
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
89
89
  * THE SOFTWARE.
90
- */(t)&&{passive:!0}}
90
+ */(t)&&{passive:!0}}function a(t,n){return(t.matches||t.webkitMatchesSelector||t.msMatchesSelector).call(t,n)}function c(t){if(null!==t.offsetParent)return t.scrollWidth;var n=t.cloneNode(!0);n.style.setProperty("position","absolute"),n.style.setProperty("transform","translate(-9999px, -9999px)"),document.documentElement.appendChild(n);var i=n.scrollWidth;return document.documentElement.removeChild(n),i}
91
91
  /**
92
92
  * @license
93
93
  * Copyright 2016 Google Inc.
@@ -109,8 +109,7 @@ function u(t){return void 0===t&&(t=window),!!function(t){void 0===t&&(t=window)
109
109
  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
110
110
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
111
111
  * THE SOFTWARE.
112
- */
113
- var c,a={BG_FOCUSED:"mdc-ripple-upgraded--background-focused",FG_ACTIVATION:"mdc-ripple-upgraded--foreground-activation",FG_DEACTIVATION:"mdc-ripple-upgraded--foreground-deactivation",ROOT:"mdc-ripple-upgraded",UNBOUNDED:"mdc-ripple-upgraded--unbounded"},h={VAR_FG_SCALE:"--mdc-ripple-fg-scale",VAR_FG_SIZE:"--mdc-ripple-fg-size",VAR_FG_TRANSLATE_END:"--mdc-ripple-fg-translate-end",VAR_FG_TRANSLATE_START:"--mdc-ripple-fg-translate-start",VAR_LEFT:"--mdc-ripple-left",VAR_TOP:"--mdc-ripple-top"},f={DEACTIVATION_TIMEOUT_MS:225,FG_DEACTIVATION_MS:150,INITIAL_ORIGIN_SCALE:.6,PADDING:10,TAP_DELAY_MS:300},d=["touchstart","pointerdown","mousedown","keydown"],l=["touchend","pointerup","mouseup","contextmenu"],v=[],m=function(t){function n(i){var r=t.call(this,e(e({},n.defaultAdapter),i))||this;return r.activationAnimationHasEnded=!1,r.activationTimer=0,r.fgDeactivationRemovalTimer=0,r.fgScale="0",r.frame={width:0,height:0},r.initialSize=0,r.layoutFrame=0,r.maxRadius=0,r.unboundedCoords={left:0,top:0},r.activationState=r.defaultActivationState(),r.activationTimerCallback=function(){r.activationAnimationHasEnded=!0,r.runDeactivationUXLogicIfReady()},r.activateHandler=function(t){r.activateImpl(t)},r.deactivateHandler=function(){r.deactivateImpl()},r.focusHandler=function(){r.handleFocus()},r.blurHandler=function(){r.handleBlur()},r.resizeHandler=function(){r.layout()},r}return i(n,t),Object.defineProperty(n,"cssClasses",{get:function(){return a},enumerable:!1,configurable:!0}),Object.defineProperty(n,"strings",{get:function(){return h},enumerable:!1,configurable:!0}),Object.defineProperty(n,"numbers",{get:function(){return f},enumerable:!1,configurable:!0}),Object.defineProperty(n,"defaultAdapter",{get:function(){return{addClass:function(){},browserSupportsCssVars:function(){return!0},computeBoundingRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},containsEventTarget:function(){return!0},deregisterDocumentInteractionHandler:function(){},deregisterInteractionHandler:function(){},deregisterResizeHandler:function(){},getWindowPageOffset:function(){return{x:0,y:0}},isSurfaceActive:function(){return!0},isSurfaceDisabled:function(){return!0},isUnbounded:function(){return!0},registerDocumentInteractionHandler:function(){},registerInteractionHandler:function(){},registerResizeHandler:function(){},removeClass:function(){},updateCssVariable:function(){}}},enumerable:!1,configurable:!0}),n.prototype.init=function(){var t=this,i=this.supportsPressRipple();if(this.registerRootHandlers(i),i){var e=n.cssClasses,r=e.ROOT,s=e.UNBOUNDED;requestAnimationFrame((function(){t.adapter.addClass(r),t.adapter.isUnbounded()&&(t.adapter.addClass(s),t.layoutInternal())}))}},n.prototype.destroy=function(){var t=this;if(this.supportsPressRipple()){this.activationTimer&&(clearTimeout(this.activationTimer),this.activationTimer=0,this.adapter.removeClass(n.cssClasses.FG_ACTIVATION)),this.fgDeactivationRemovalTimer&&(clearTimeout(this.fgDeactivationRemovalTimer),this.fgDeactivationRemovalTimer=0,this.adapter.removeClass(n.cssClasses.FG_DEACTIVATION));var i=n.cssClasses,e=i.ROOT,r=i.UNBOUNDED;requestAnimationFrame((function(){t.adapter.removeClass(e),t.adapter.removeClass(r),t.removeCssVars()}))}this.deregisterRootHandlers(),this.deregisterDeactivationHandlers()},n.prototype.activate=function(t){this.activateImpl(t)},n.prototype.deactivate=function(){this.deactivateImpl()},n.prototype.layout=function(){var t=this;this.layoutFrame&&cancelAnimationFrame(this.layoutFrame),this.layoutFrame=requestAnimationFrame((function(){t.layoutInternal(),t.layoutFrame=0}))},n.prototype.setUnbounded=function(t){var i=n.cssClasses.UNBOUNDED;t?this.adapter.addClass(i):this.adapter.removeClass(i)},n.prototype.handleFocus=function(){var t=this;requestAnimationFrame((function(){return t.adapter.addClass(n.cssClasses.BG_FOCUSED)}))},n.prototype.handleBlur=function(){var t=this;requestAnimationFrame((function(){return t.adapter.removeClass(n.cssClasses.BG_FOCUSED)}))},n.prototype.supportsPressRipple=function(){return this.adapter.browserSupportsCssVars()},n.prototype.defaultActivationState=function(){return{activationEvent:void 0,hasDeactivationUXRun:!1,isActivated:!1,isProgrammatic:!1,wasActivatedByPointer:!1,wasElementMadeActive:!1}},n.prototype.registerRootHandlers=function(t){var n,i;if(t){try{for(var e=r(d),s=e.next();!s.done;s=e.next())this.adapter.registerInteractionHandler(s.value,this.activateHandler)}catch(t){n={error:t}}finally{try{s&&!s.done&&(i=e.return)&&i.call(e)}finally{if(n)throw n.error}}this.adapter.isUnbounded()&&this.adapter.registerResizeHandler(this.resizeHandler)}this.adapter.registerInteractionHandler("focus",this.focusHandler),this.adapter.registerInteractionHandler("blur",this.blurHandler)},n.prototype.registerDeactivationHandlers=function(t){var n,i;if("keydown"===t.type)this.adapter.registerInteractionHandler("keyup",this.deactivateHandler);else try{for(var e=r(l),s=e.next();!s.done;s=e.next())this.adapter.registerDocumentInteractionHandler(s.value,this.deactivateHandler)}catch(t){n={error:t}}finally{try{s&&!s.done&&(i=e.return)&&i.call(e)}finally{if(n)throw n.error}}},n.prototype.deregisterRootHandlers=function(){var t,n;try{for(var i=r(d),e=i.next();!e.done;e=i.next())this.adapter.deregisterInteractionHandler(e.value,this.activateHandler)}catch(n){t={error:n}}finally{try{e&&!e.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}this.adapter.deregisterInteractionHandler("focus",this.focusHandler),this.adapter.deregisterInteractionHandler("blur",this.blurHandler),this.adapter.isUnbounded()&&this.adapter.deregisterResizeHandler(this.resizeHandler)},n.prototype.deregisterDeactivationHandlers=function(){var t,n;this.adapter.deregisterInteractionHandler("keyup",this.deactivateHandler);try{for(var i=r(l),e=i.next();!e.done;e=i.next())this.adapter.deregisterDocumentInteractionHandler(e.value,this.deactivateHandler)}catch(n){t={error:n}}finally{try{e&&!e.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}},n.prototype.removeCssVars=function(){var t=this,i=n.strings;Object.keys(i).forEach((function(n){0===n.indexOf("VAR_")&&t.adapter.updateCssVariable(i[n],null)}))},n.prototype.activateImpl=function(t){var n=this;if(!this.adapter.isSurfaceDisabled()){var i=this.activationState;if(!i.isActivated){var e=this.previousActivationEvent;e&&void 0!==t&&e.type!==t.type||(i.isActivated=!0,i.isProgrammatic=void 0===t,i.activationEvent=t,i.wasActivatedByPointer=!i.isProgrammatic&&void 0!==t&&("mousedown"===t.type||"touchstart"===t.type||"pointerdown"===t.type),void 0!==t&&v.length>0&&v.some((function(t){return n.adapter.containsEventTarget(t)}))?this.resetActivationState():(void 0!==t&&(v.push(t.target),this.registerDeactivationHandlers(t)),i.wasElementMadeActive=this.checkElementMadeActive(t),i.wasElementMadeActive&&this.animateActivation(),requestAnimationFrame((function(){v=[],i.wasElementMadeActive||void 0===t||" "!==t.key&&32!==t.keyCode||(i.wasElementMadeActive=n.checkElementMadeActive(t),i.wasElementMadeActive&&n.animateActivation()),i.wasElementMadeActive||(n.activationState=n.defaultActivationState())}))))}}},n.prototype.checkElementMadeActive=function(t){return void 0===t||"keydown"!==t.type||this.adapter.isSurfaceActive()},n.prototype.animateActivation=function(){var t=this,i=n.strings,e=i.VAR_FG_TRANSLATE_START,r=i.VAR_FG_TRANSLATE_END,s=n.cssClasses,o=s.FG_DEACTIVATION,u=s.FG_ACTIVATION,c=n.numbers.DEACTIVATION_TIMEOUT_MS;this.layoutInternal();var a="",h="";if(!this.adapter.isUnbounded()){var f=this.getFgTranslationCoordinates(),d=f.startPoint,l=f.endPoint;a=d.x+"px, "+d.y+"px",h=l.x+"px, "+l.y+"px"}this.adapter.updateCssVariable(e,a),this.adapter.updateCssVariable(r,h),clearTimeout(this.activationTimer),clearTimeout(this.fgDeactivationRemovalTimer),this.rmBoundedActivationClasses(),this.adapter.removeClass(o),this.adapter.computeBoundingRect(),this.adapter.addClass(u),this.activationTimer=setTimeout((function(){t.activationTimerCallback()}),c)},n.prototype.getFgTranslationCoordinates=function(){var t,n=this.activationState;return{startPoint:t={x:(t=n.wasActivatedByPointer?function(t,n,i){if(!t)return{x:0,y:0};var e,r,s=n.x+i.left,o=n.y+i.top;return"touchstart"===t.type?(e=t.changedTouches[0].pageX-s,r=t.changedTouches[0].pageY-o):(e=t.pageX-s,r=t.pageY-o),{x:e,y:r}}
112
+ */var f,h={BG_FOCUSED:"mdc-ripple-upgraded--background-focused",FG_ACTIVATION:"mdc-ripple-upgraded--foreground-activation",FG_DEACTIVATION:"mdc-ripple-upgraded--foreground-deactivation",ROOT:"mdc-ripple-upgraded",UNBOUNDED:"mdc-ripple-upgraded--unbounded"},d={VAR_FG_SCALE:"--mdc-ripple-fg-scale",VAR_FG_SIZE:"--mdc-ripple-fg-size",VAR_FG_TRANSLATE_END:"--mdc-ripple-fg-translate-end",VAR_FG_TRANSLATE_START:"--mdc-ripple-fg-translate-start",VAR_LEFT:"--mdc-ripple-left",VAR_TOP:"--mdc-ripple-top"},l={DEACTIVATION_TIMEOUT_MS:225,FG_DEACTIVATION_MS:150,INITIAL_ORIGIN_SCALE:.6,PADDING:10,TAP_DELAY_MS:300},v=["touchstart","pointerdown","mousedown","keydown"],m=["touchend","pointerup","mouseup","contextmenu"],p=[],g=function(t){function n(i){var r=t.call(this,e(e({},n.defaultAdapter),i))||this;return r.activationAnimationHasEnded=!1,r.activationTimer=0,r.fgDeactivationRemovalTimer=0,r.fgScale="0",r.frame={width:0,height:0},r.initialSize=0,r.layoutFrame=0,r.maxRadius=0,r.unboundedCoords={left:0,top:0},r.activationState=r.defaultActivationState(),r.activationTimerCallback=function(){r.activationAnimationHasEnded=!0,r.runDeactivationUXLogicIfReady()},r.activateHandler=function(t){r.activateImpl(t)},r.deactivateHandler=function(){r.deactivateImpl()},r.focusHandler=function(){r.handleFocus()},r.blurHandler=function(){r.handleBlur()},r.resizeHandler=function(){r.layout()},r}return i(n,t),Object.defineProperty(n,"cssClasses",{get:function(){return h},enumerable:!1,configurable:!0}),Object.defineProperty(n,"strings",{get:function(){return d},enumerable:!1,configurable:!0}),Object.defineProperty(n,"numbers",{get:function(){return l},enumerable:!1,configurable:!0}),Object.defineProperty(n,"defaultAdapter",{get:function(){return{addClass:function(){},browserSupportsCssVars:function(){return!0},computeBoundingRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},containsEventTarget:function(){return!0},deregisterDocumentInteractionHandler:function(){},deregisterInteractionHandler:function(){},deregisterResizeHandler:function(){},getWindowPageOffset:function(){return{x:0,y:0}},isSurfaceActive:function(){return!0},isSurfaceDisabled:function(){return!0},isUnbounded:function(){return!0},registerDocumentInteractionHandler:function(){},registerInteractionHandler:function(){},registerResizeHandler:function(){},removeClass:function(){},updateCssVariable:function(){}}},enumerable:!1,configurable:!0}),n.prototype.init=function(){var t=this,i=this.supportsPressRipple();if(this.registerRootHandlers(i),i){var e=n.cssClasses,r=e.ROOT,s=e.UNBOUNDED;requestAnimationFrame((function(){t.adapter.addClass(r),t.adapter.isUnbounded()&&(t.adapter.addClass(s),t.layoutInternal())}))}},n.prototype.destroy=function(){var t=this;if(this.supportsPressRipple()){this.activationTimer&&(clearTimeout(this.activationTimer),this.activationTimer=0,this.adapter.removeClass(n.cssClasses.FG_ACTIVATION)),this.fgDeactivationRemovalTimer&&(clearTimeout(this.fgDeactivationRemovalTimer),this.fgDeactivationRemovalTimer=0,this.adapter.removeClass(n.cssClasses.FG_DEACTIVATION));var i=n.cssClasses,e=i.ROOT,r=i.UNBOUNDED;requestAnimationFrame((function(){t.adapter.removeClass(e),t.adapter.removeClass(r),t.removeCssVars()}))}this.deregisterRootHandlers(),this.deregisterDeactivationHandlers()},n.prototype.activate=function(t){this.activateImpl(t)},n.prototype.deactivate=function(){this.deactivateImpl()},n.prototype.layout=function(){var t=this;this.layoutFrame&&cancelAnimationFrame(this.layoutFrame),this.layoutFrame=requestAnimationFrame((function(){t.layoutInternal(),t.layoutFrame=0}))},n.prototype.setUnbounded=function(t){var i=n.cssClasses.UNBOUNDED;t?this.adapter.addClass(i):this.adapter.removeClass(i)},n.prototype.handleFocus=function(){var t=this;requestAnimationFrame((function(){return t.adapter.addClass(n.cssClasses.BG_FOCUSED)}))},n.prototype.handleBlur=function(){var t=this;requestAnimationFrame((function(){return t.adapter.removeClass(n.cssClasses.BG_FOCUSED)}))},n.prototype.supportsPressRipple=function(){return this.adapter.browserSupportsCssVars()},n.prototype.defaultActivationState=function(){return{activationEvent:void 0,hasDeactivationUXRun:!1,isActivated:!1,isProgrammatic:!1,wasActivatedByPointer:!1,wasElementMadeActive:!1}},n.prototype.registerRootHandlers=function(t){var n,i;if(t){try{for(var e=r(v),s=e.next();!s.done;s=e.next())this.adapter.registerInteractionHandler(s.value,this.activateHandler)}catch(t){n={error:t}}finally{try{s&&!s.done&&(i=e.return)&&i.call(e)}finally{if(n)throw n.error}}this.adapter.isUnbounded()&&this.adapter.registerResizeHandler(this.resizeHandler)}this.adapter.registerInteractionHandler("focus",this.focusHandler),this.adapter.registerInteractionHandler("blur",this.blurHandler)},n.prototype.registerDeactivationHandlers=function(t){var n,i;if("keydown"===t.type)this.adapter.registerInteractionHandler("keyup",this.deactivateHandler);else try{for(var e=r(m),s=e.next();!s.done;s=e.next())this.adapter.registerDocumentInteractionHandler(s.value,this.deactivateHandler)}catch(t){n={error:t}}finally{try{s&&!s.done&&(i=e.return)&&i.call(e)}finally{if(n)throw n.error}}},n.prototype.deregisterRootHandlers=function(){var t,n;try{for(var i=r(v),e=i.next();!e.done;e=i.next())this.adapter.deregisterInteractionHandler(e.value,this.activateHandler)}catch(n){t={error:n}}finally{try{e&&!e.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}this.adapter.deregisterInteractionHandler("focus",this.focusHandler),this.adapter.deregisterInteractionHandler("blur",this.blurHandler),this.adapter.isUnbounded()&&this.adapter.deregisterResizeHandler(this.resizeHandler)},n.prototype.deregisterDeactivationHandlers=function(){var t,n;this.adapter.deregisterInteractionHandler("keyup",this.deactivateHandler);try{for(var i=r(m),e=i.next();!e.done;e=i.next())this.adapter.deregisterDocumentInteractionHandler(e.value,this.deactivateHandler)}catch(n){t={error:n}}finally{try{e&&!e.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}},n.prototype.removeCssVars=function(){var t=this,i=n.strings;Object.keys(i).forEach((function(n){0===n.indexOf("VAR_")&&t.adapter.updateCssVariable(i[n],null)}))},n.prototype.activateImpl=function(t){var n=this;if(!this.adapter.isSurfaceDisabled()){var i=this.activationState;if(!i.isActivated){var e=this.previousActivationEvent;e&&void 0!==t&&e.type!==t.type||(i.isActivated=!0,i.isProgrammatic=void 0===t,i.activationEvent=t,i.wasActivatedByPointer=!i.isProgrammatic&&void 0!==t&&("mousedown"===t.type||"touchstart"===t.type||"pointerdown"===t.type),void 0!==t&&p.length>0&&p.some((function(t){return n.adapter.containsEventTarget(t)}))?this.resetActivationState():(void 0!==t&&(p.push(t.target),this.registerDeactivationHandlers(t)),i.wasElementMadeActive=this.checkElementMadeActive(t),i.wasElementMadeActive&&this.animateActivation(),requestAnimationFrame((function(){p=[],i.wasElementMadeActive||void 0===t||" "!==t.key&&32!==t.keyCode||(i.wasElementMadeActive=n.checkElementMadeActive(t),i.wasElementMadeActive&&n.animateActivation()),i.wasElementMadeActive||(n.activationState=n.defaultActivationState())}))))}}},n.prototype.checkElementMadeActive=function(t){return void 0===t||"keydown"!==t.type||this.adapter.isSurfaceActive()},n.prototype.animateActivation=function(){var t=this,i=n.strings,e=i.VAR_FG_TRANSLATE_START,r=i.VAR_FG_TRANSLATE_END,s=n.cssClasses,o=s.FG_DEACTIVATION,u=s.FG_ACTIVATION,a=n.numbers.DEACTIVATION_TIMEOUT_MS;this.layoutInternal();var c="",f="";if(!this.adapter.isUnbounded()){var h=this.getFgTranslationCoordinates(),d=h.startPoint,l=h.endPoint;c=d.x+"px, "+d.y+"px",f=l.x+"px, "+l.y+"px"}this.adapter.updateCssVariable(e,c),this.adapter.updateCssVariable(r,f),clearTimeout(this.activationTimer),clearTimeout(this.fgDeactivationRemovalTimer),this.rmBoundedActivationClasses(),this.adapter.removeClass(o),this.adapter.computeBoundingRect(),this.adapter.addClass(u),this.activationTimer=setTimeout((function(){t.activationTimerCallback()}),a)},n.prototype.getFgTranslationCoordinates=function(){var t,n=this.activationState;return{startPoint:t={x:(t=n.wasActivatedByPointer?function(t,n,i){if(!t)return{x:0,y:0};var e,r,s=n.x+i.left,o=n.y+i.top;return"touchstart"===t.type?(e=t.changedTouches[0].pageX-s,r=t.changedTouches[0].pageY-o):(e=t.pageX-s,r=t.pageY-o),{x:e,y:r}}
114
113
  /**
115
114
  * @license
116
115
  * Copyright 2016 Google Inc.
@@ -132,4 +131,4 @@ var c,a={BG_FOCUSED:"mdc-ripple-upgraded--background-focused",FG_ACTIVATION:"mdc
132
131
  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
133
132
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
134
133
  * THE SOFTWARE.
135
- */(n.activationEvent,this.adapter.getWindowPageOffset(),this.adapter.computeBoundingRect()):{x:this.frame.width/2,y:this.frame.height/2}).x-this.initialSize/2,y:t.y-this.initialSize/2},endPoint:{x:this.frame.width/2-this.initialSize/2,y:this.frame.height/2-this.initialSize/2}}},n.prototype.runDeactivationUXLogicIfReady=function(){var t=this,i=n.cssClasses.FG_DEACTIVATION,e=this.activationState;(e.hasDeactivationUXRun||!e.isActivated)&&this.activationAnimationHasEnded&&(this.rmBoundedActivationClasses(),this.adapter.addClass(i),this.fgDeactivationRemovalTimer=setTimeout((function(){t.adapter.removeClass(i)}),f.FG_DEACTIVATION_MS))},n.prototype.rmBoundedActivationClasses=function(){this.adapter.removeClass(n.cssClasses.FG_ACTIVATION),this.activationAnimationHasEnded=!1,this.adapter.computeBoundingRect()},n.prototype.resetActivationState=function(){var t=this;this.previousActivationEvent=this.activationState.activationEvent,this.activationState=this.defaultActivationState(),setTimeout((function(){return t.previousActivationEvent=void 0}),n.numbers.TAP_DELAY_MS)},n.prototype.deactivateImpl=function(){var t=this,n=this.activationState;if(n.isActivated){var i=e({},n);n.isProgrammatic?(requestAnimationFrame((function(){t.animateDeactivation(i)})),this.resetActivationState()):(this.deregisterDeactivationHandlers(),requestAnimationFrame((function(){t.activationState.hasDeactivationUXRun=!0,t.animateDeactivation(i),t.resetActivationState()})))}},n.prototype.animateDeactivation=function(t){(t.wasActivatedByPointer||t.wasElementMadeActive)&&this.runDeactivationUXLogicIfReady()},n.prototype.layoutInternal=function(){this.frame=this.adapter.computeBoundingRect();var t=Math.max(this.frame.height,this.frame.width);this.maxRadius=this.adapter.isUnbounded()?t:Math.sqrt(Math.pow(this.frame.width,2)+Math.pow(this.frame.height,2))+n.numbers.PADDING;var i=Math.floor(t*n.numbers.INITIAL_ORIGIN_SCALE);this.initialSize=this.adapter.isUnbounded()&&i%2!=0?i-1:i,this.fgScale=""+this.maxRadius/this.initialSize,this.updateLayoutCssVars()},n.prototype.updateLayoutCssVars=function(){var t=n.strings,i=t.VAR_LEFT,e=t.VAR_TOP,r=t.VAR_FG_SCALE;this.adapter.updateCssVariable(t.VAR_FG_SIZE,this.initialSize+"px"),this.adapter.updateCssVariable(r,this.fgScale),this.adapter.isUnbounded()&&(this.unboundedCoords={left:Math.round(this.frame.width/2-this.initialSize/2),top:Math.round(this.frame.height/2-this.initialSize/2)},this.adapter.updateCssVariable(i,this.unboundedCoords.left+"px"),this.adapter.updateCssVariable(e,this.unboundedCoords.top+"px"))},n}(s),p=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.disabled=!1,n}return i(n,t),n.attachTo=function(t,i){void 0===i&&(i={isUnbounded:void 0});var e=new n(t);return void 0!==i.isUnbounded&&(e.unbounded=i.isUnbounded),e},n.createAdapter=function(t){return{addClass:function(n){return t.root.classList.add(n)},browserSupportsCssVars:function(){return function(t,n){void 0===n&&(n=!1);var i,e=window.CSS;if("boolean"==typeof c&&!n)return c;if(!e||"function"!=typeof e.supports)return!1;var r=e.supports("--css-vars","yes"),s=e.supports("(--css-vars: yes)")&&e.supports("color","#00000000");return i=r||s,n||(c=i),i}()},computeBoundingRect:function(){return t.root.getBoundingClientRect()},containsEventTarget:function(n){return t.root.contains(n)},deregisterDocumentInteractionHandler:function(t,n){return document.documentElement.removeEventListener(t,n,u())},deregisterInteractionHandler:function(n,i){return t.root.removeEventListener(n,i,u())},deregisterResizeHandler:function(t){return window.removeEventListener("resize",t)},getWindowPageOffset:function(){return{x:window.pageXOffset,y:window.pageYOffset}},isSurfaceActive:function(){return((n=t.root).matches||n.webkitMatchesSelector||n.msMatchesSelector).call(n,":active");var n},isSurfaceDisabled:function(){return Boolean(t.disabled)},isUnbounded:function(){return Boolean(t.unbounded)},registerDocumentInteractionHandler:function(t,n){return document.documentElement.addEventListener(t,n,u())},registerInteractionHandler:function(n,i){return t.root.addEventListener(n,i,u())},registerResizeHandler:function(t){return window.addEventListener("resize",t)},removeClass:function(n){return t.root.classList.remove(n)},updateCssVariable:function(n,i){return t.root.style.setProperty(n,i)}}},Object.defineProperty(n.prototype,"unbounded",{get:function(){return Boolean(this.isUnbounded)},set:function(t){this.isUnbounded=Boolean(t),this.setUnbounded()},enumerable:!1,configurable:!0}),n.prototype.activate=function(){this.foundation.activate()},n.prototype.deactivate=function(){this.foundation.deactivate()},n.prototype.layout=function(){this.foundation.layout()},n.prototype.getDefaultFoundation=function(){return new m(n.createAdapter(this))},n.prototype.initialSyncWithDOM=function(){this.isUnbounded="mdcRippleIsUnbounded"in this.root.dataset},n.prototype.setUnbounded=function(){this.foundation.setUnbounded(Boolean(this.isUnbounded))},n}(o);export{p as M,m as a}
134
+ */(n.activationEvent,this.adapter.getWindowPageOffset(),this.adapter.computeBoundingRect()):{x:this.frame.width/2,y:this.frame.height/2}).x-this.initialSize/2,y:t.y-this.initialSize/2},endPoint:{x:this.frame.width/2-this.initialSize/2,y:this.frame.height/2-this.initialSize/2}}},n.prototype.runDeactivationUXLogicIfReady=function(){var t=this,i=n.cssClasses.FG_DEACTIVATION,e=this.activationState;(e.hasDeactivationUXRun||!e.isActivated)&&this.activationAnimationHasEnded&&(this.rmBoundedActivationClasses(),this.adapter.addClass(i),this.fgDeactivationRemovalTimer=setTimeout((function(){t.adapter.removeClass(i)}),l.FG_DEACTIVATION_MS))},n.prototype.rmBoundedActivationClasses=function(){this.adapter.removeClass(n.cssClasses.FG_ACTIVATION),this.activationAnimationHasEnded=!1,this.adapter.computeBoundingRect()},n.prototype.resetActivationState=function(){var t=this;this.previousActivationEvent=this.activationState.activationEvent,this.activationState=this.defaultActivationState(),setTimeout((function(){return t.previousActivationEvent=void 0}),n.numbers.TAP_DELAY_MS)},n.prototype.deactivateImpl=function(){var t=this,n=this.activationState;if(n.isActivated){var i=e({},n);n.isProgrammatic?(requestAnimationFrame((function(){t.animateDeactivation(i)})),this.resetActivationState()):(this.deregisterDeactivationHandlers(),requestAnimationFrame((function(){t.activationState.hasDeactivationUXRun=!0,t.animateDeactivation(i),t.resetActivationState()})))}},n.prototype.animateDeactivation=function(t){(t.wasActivatedByPointer||t.wasElementMadeActive)&&this.runDeactivationUXLogicIfReady()},n.prototype.layoutInternal=function(){this.frame=this.adapter.computeBoundingRect();var t=Math.max(this.frame.height,this.frame.width);this.maxRadius=this.adapter.isUnbounded()?t:Math.sqrt(Math.pow(this.frame.width,2)+Math.pow(this.frame.height,2))+n.numbers.PADDING;var i=Math.floor(t*n.numbers.INITIAL_ORIGIN_SCALE);this.initialSize=this.adapter.isUnbounded()&&i%2!=0?i-1:i,this.fgScale=""+this.maxRadius/this.initialSize,this.updateLayoutCssVars()},n.prototype.updateLayoutCssVars=function(){var t=n.strings,i=t.VAR_LEFT,e=t.VAR_TOP,r=t.VAR_FG_SCALE;this.adapter.updateCssVariable(t.VAR_FG_SIZE,this.initialSize+"px"),this.adapter.updateCssVariable(r,this.fgScale),this.adapter.isUnbounded()&&(this.unboundedCoords={left:Math.round(this.frame.width/2-this.initialSize/2),top:Math.round(this.frame.height/2-this.initialSize/2)},this.adapter.updateCssVariable(i,this.unboundedCoords.left+"px"),this.adapter.updateCssVariable(e,this.unboundedCoords.top+"px"))},n}(s),b=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.disabled=!1,n}return i(n,t),n.attachTo=function(t,i){void 0===i&&(i={isUnbounded:void 0});var e=new n(t);return void 0!==i.isUnbounded&&(e.unbounded=i.isUnbounded),e},n.createAdapter=function(t){return{addClass:function(n){return t.root.classList.add(n)},browserSupportsCssVars:function(){return function(t,n){void 0===n&&(n=!1);var i,e=window.CSS;if("boolean"==typeof f&&!n)return f;if(!e||"function"!=typeof e.supports)return!1;var r=e.supports("--css-vars","yes"),s=e.supports("(--css-vars: yes)")&&e.supports("color","#00000000");return i=r||s,n||(f=i),i}()},computeBoundingRect:function(){return t.root.getBoundingClientRect()},containsEventTarget:function(n){return t.root.contains(n)},deregisterDocumentInteractionHandler:function(t,n){return document.documentElement.removeEventListener(t,n,u())},deregisterInteractionHandler:function(n,i){return t.root.removeEventListener(n,i,u())},deregisterResizeHandler:function(t){return window.removeEventListener("resize",t)},getWindowPageOffset:function(){return{x:window.pageXOffset,y:window.pageYOffset}},isSurfaceActive:function(){return a(t.root,":active")},isSurfaceDisabled:function(){return Boolean(t.disabled)},isUnbounded:function(){return Boolean(t.unbounded)},registerDocumentInteractionHandler:function(t,n){return document.documentElement.addEventListener(t,n,u())},registerInteractionHandler:function(n,i){return t.root.addEventListener(n,i,u())},registerResizeHandler:function(t){return window.addEventListener("resize",t)},removeClass:function(n){return t.root.classList.remove(n)},updateCssVariable:function(n,i){return t.root.style.setProperty(n,i)}}},Object.defineProperty(n.prototype,"unbounded",{get:function(){return Boolean(this.isUnbounded)},set:function(t){this.isUnbounded=Boolean(t),this.setUnbounded()},enumerable:!1,configurable:!0}),n.prototype.activate=function(){this.foundation.activate()},n.prototype.deactivate=function(){this.foundation.deactivate()},n.prototype.layout=function(){this.foundation.layout()},n.prototype.getDefaultFoundation=function(){return new g(n.createAdapter(this))},n.prototype.initialSyncWithDOM=function(){this.isUnbounded="mdcRippleIsUnbounded"in this.root.dataset},n.prototype.setUnbounded=function(){this.foundation.setUnbounded(Boolean(this.isUnbounded))},n}(o);export{b as M,s as a,o as b,u as c,g as d,c as e,a as m}
@@ -0,0 +1 @@
1
+ import{V as e,d as t,r as l,s as n,J as r,T as i,W as s,n as o,h as a}from"./p-aca0e54b.js";import{b as u,f as c,j as f,k as h,l as d,m as p,h as m,o as b}from"./p-e0035c58.js";import{b as F,a as v,c as x,g,d as w,e as T}from"./p-7454cb92.js";import{h as k}from"./p-34b74425.js";import{F as V}from"./p-1ae66cc5.js";import{F as y}from"./p-6c77a36c.js";var C;!function(e){e[e.FROM=0]="FROM",e[e.TO=1]="TO"}(C||(C={}));const j=/^('|!')(%){0,1}(.*?)(%){0,1}(')$/;var O;!function(e){e.SIMPLE="simple",e.HIGHLIGHT="highlight"}(O||(O={}));const I=document.documentElement;class M{static isTree(t){return t.rootElement.tagName===e.TREE}isObjFiltrableByInterval(e){return!!(I.ketchup.objects.isDate(e)||I.ketchup.objects.isTime(e)||I.ketchup.objects.isTimestamp(e)||I.ketchup.objects.isNumber(e))}normalizeValue(e,n){let r=null!=e?e.trim():e;if(null==r||""==r||null==n)return r;if(I.ketchup.objects.isDate(n)){if(I.ketchup.dates.isValid(e,t.ISO_DATE))return r;if(I.ketchup.dates.isValid(e))return I.ketchup.dates.format(I.ketchup.dates.normalize(e,l.DATE),t.ISO_DATE)}else if(I.ketchup.objects.isTime(n)){let l=I.ketchup.objects.isTimeWithSeconds(n);if(I.ketchup.dates.isValid(e,l?t.ISO_TIME:t.ISO_TIME_WITHOUT_SECONDS))return r;if(u(e,l))return c(e,l?t.ISO_TIME:t.ISO_TIME_WITHOUT_SECONDS,l)}else if(I.ketchup.objects.isTimestamp(n)){if(I.ketchup.dates.isValid(e,t.ISO_DATE_TIME))return r;if(u(e,!0))return f(e)}else if(I.ketchup.objects.isNumber(n)&&h(e,n?n.p:""))return d(e,n?n.p:"");return r}filterIsNegative(e){const t=e.match(j);return!!t&&t[1].indexOf("!")>=0}isFilterCompliantForValue(e,t){if(null==e)return!1;if(null==t)return!1;const l=this.filterIsNegative(t);return e.toLowerCase().includes(t.toLowerCase())||this.matchSpecialFilter(e.toLowerCase(),t.toLowerCase().match(j),!0)?!l:!!l}matchSpecialFilter(e,t,l=!1){if(null!=t){const n=""===t[3]&&!e.trim()||!t[2]&&t[4]&&e.startsWith(t[3])||t[2]&&!t[4]&&e.endsWith(t[3])||!t[2]&&!t[4]&&e===t[3]||t[2]&&t[4]&&e.indexOf(t[3])>=0;return l||t[1].indexOf("!")<0?n:!n}return!1}isFilterCompliantForSimpleValue(e,l,n,r){if(null==e)return!1;n=this.normalizeValue(n,l);let i=e,s="",o="";null!=r&&(s=r[C.FROM],o=r[C.TO]);let a=!0;if(I.ketchup.objects.isNumber(l)){i=p(i,l?l.p:"");let e=m(i);if(""!=s)if(b(s)){if(a=!1,e<m(s))return!1}else n=s;if(""!=o)if(b(o)){if(a=!1,e>m(o))return!1}else n=o}if(I.ketchup.objects.isDate(l)||I.ketchup.objects.isTime(l)||I.ketchup.objects.isTimestamp(l)){let e=null,r=t.ISO_DATE;if(I.ketchup.objects.isDate(l)?r=t.ISO_DATE:I.ketchup.objects.isTime(l)?r=I.ketchup.objects.isTimeWithSeconds(l)?t.ISO_TIME:t.ISO_TIME_WITHOUT_SECONDS:I.ketchup.objects.isTimestamp(l)&&(r=t.ISO_DATE_TIME),I.ketchup.dates.isValid(i,r,!0)&&(e=I.ketchup.dates.toDate(i,r)),""!=s)if(null!=e&&I.ketchup.dates.isValid(s,r,!0)){if(a=!1,e<I.ketchup.dates.toDate(s,r))return!1}else n=s;if(""!=o)if(null!=e&&I.ketchup.dates.isValid(o,r,!0)){if(a=!1,e>I.ketchup.dates.toDate(o,r))return!1}else n=o;I.ketchup.dates.isValid(n,r)||I.ketchup.dates.isValid(n)||(i=I.ketchup.dates.format(i))}return!a||this.isFilterCompliantForValue(i,n)}static valuesArrayContainsValue(e,t){return M.indexOfValueInValuesArray(e,t)>=0}static indexOfValueInValuesArray(e,t){if(null==e||e.length<1)return-1;for(let l=0;l<e.length;l++)if(e[l].value==t)return l;return-1}}class N extends M{getTextFilterValue(e={},t){return this._getTextFilterValue(e,t,!1)}getTextFilterValueTmp(e={},t){return this._getTextFilterValue(e,t,!0)}_getTextFilterValue(e={},t,l){let n="";if(null==e)return n;let r=e[t];return null==r||(n=l?r.textFieldTmp:r.textField),n}hasFiltersForColumn(e={},t){return this._hasFiltersForColumn(e,t,!1)}hasFiltersForColumnTmp(e={},t){return this._hasFiltersForColumn(e,t,!0)}_hasFiltersForColumn(e={},t,l){if(!t)return!1;let n=this._getTextFilterValue(e,t.name,l);if(null!=n&&""!=n.trim())return!0;if(this._hasIntervalTextFieldFilterValues(e,t,l))return!0;let r=this.getCheckBoxFilterValues(e,t.name);return!(null==r||r.length<1)}getCheckBoxFilterValues(e={},t){let l=[];if(null==e)return l;let n=e[t];return null==n||null==n.checkBoxes||(l=n.checkBoxes),l}hasIntervalTextFieldFilterValues(e={},t){return this._hasIntervalTextFieldFilterValues(e,t,!1)}hasIntervalTextFieldFilterValuesTmp(e={},t){return this._hasIntervalTextFieldFilterValues(e,t,!0)}_hasIntervalTextFieldFilterValues(e={},t,l){if(null==t)return!1;if(!this.isColumnFiltrableByInterval(t))return!1;let n=this._getIntervalTextFieldFilterValue(e,t.name,C.FROM,l);if(null!=n&&""!=n.trim())return!0;let r=this._getIntervalTextFieldFilterValue(e,t.name,C.TO,l);return null!=r&&""!=r.trim()}addCheckboxFilter(e={},t,l){if(null==e)return;let n=e[t];null==n&&(n={textField:"",textFieldTmp:"",checkBoxes:[],interval:null,intervalTmp:null},e[t]=n),null==n.checkBoxes&&(n.checkBoxes=[]),null==l||null==l.value?n.checkBoxes=[]:M.valuesArrayContainsValue(n.checkBoxes,l.value)||(n.checkBoxes[n.checkBoxes.length]=l)}removeCheckboxFilter(e={},t,l){if(null==e||null==l)return;let n=e[t];if(null==n)return;null==n.checkBoxes&&(n.checkBoxes=[]);let r=M.indexOfValueInValuesArray(n.checkBoxes,l);if(r>=0){let e=[];for(let t=0;t<n.checkBoxes.length;t++)t!=r&&(e[e.length]=n.checkBoxes[t]);n.checkBoxes=[...e]}}isColumnFiltrableByInterval(e){return this.isObjFiltrableByInterval(e.obj)}getIntervalTextFieldFilterValues(e={},t){return this._getIntervalTextFieldFilterValues(e,t,!1)}getIntervalTextFieldFilterValuesTmp(e={},t){return this._getIntervalTextFieldFilterValues(e,t,!0)}_getIntervalTextFieldFilterValues(e={},t,l){return this._hasIntervalTextFieldFilterValues(e,t,l)?[this._getIntervalTextFieldFilterValue(e,t.name,C.FROM,l),this._getIntervalTextFieldFilterValue(e,t.name,C.TO,l)]:["",""]}getIntervalTextFieldFilterValue(e={},t,l){return this._getIntervalTextFieldFilterValue(e,t,l,!1)}getIntervalTextFieldFilterValueTmp(e={},t,l){return this._getIntervalTextFieldFilterValue(e,t,l,!0)}_getIntervalTextFieldFilterValue(e={},t,l,n){let r="";if(null==e)return r;let i=e[t];return null==i||n&&null==i.intervalTmp?r:n||null!=i.interval?(r=n?i.intervalTmp[l]:i.interval[l],r):r}setTextFieldFilterValue(e={},t,l){this._setTextFieldFilterValue(e,t,l,!0)}_setTextFieldFilterValue(e={},t,l,n){if(null==e)return;let r=e[t];null==r&&(r={textField:"",textFieldTmp:"",checkBoxes:[],interval:null,intervalTmp:null},e[t]=r),n?r.textFieldTmp=null!=l?l.trim():l:r.textField=null!=l?l.trim():l}setIntervalTextFieldFilterValue(e={},t,l,n){this._setIntervalTextFieldFilterValue(e,t,l,n,!0)}_setIntervalTextFieldFilterValue(e={},t,l,n,r){if(null==e)return;let i=e[t];null==i&&(i={textField:"",textFieldTmp:"",checkBoxes:[],interval:null,intervalTmp:null},e[t]=i),null==i.interval&&(i.interval=[],i.interval.push("","")),null==i.intervalTmp&&(i.intervalTmp=[],i.intervalTmp.push("","")),r?i.intervalTmp[n]=null!=l?l.trim():l:i.interval[n]=null!=l?l.trim():l}saveTextualFilters(e={},t){this._setTextFieldFilterValue(e,t,this.getTextFilterValueTmp(e,t),!1),this._setIntervalTextFieldFilterValue(e,t,this.getIntervalTextFieldFilterValueTmp(e,t,C.FROM),C.FROM,!1),this._setIntervalTextFieldFilterValue(e,t,this.getIntervalTextFieldFilterValueTmp(e,t,C.TO),C.TO,!1)}resetTextualFilters(e={},t){this._setTextFieldFilterValue(e,t,this.getTextFilterValue(e,t),!0),this._setIntervalTextFieldFilterValue(e,t,this.getIntervalTextFieldFilterValue(e,t,C.FROM),C.FROM,!0),this._setIntervalTextFieldFilterValue(e,t,this.getIntervalTextFieldFilterValue(e,t,C.TO),C.TO,!0)}getFilterValueForTooltip(e={},t){let l=this.getTextFilterValue(e,t.name),n=this.getIntervalTextFieldFilterValues(e,t),r=this.getCheckBoxFilterValues(e,t.name),i="",s=F(l,t.obj,t.decimals);""!=l&&(i=" AND "),""!=n[C.FROM]&&(s+=i+"(>= "+F(n[C.FROM],t.obj,t.decimals)+")",i=" AND "),""!=n[C.TO]&&(s+=i+"(<= "+F(n[C.TO],t.obj,t.decimals)+")",i=" AND "),i="";let o="";return r.forEach((e=>{o+=i+v(e,t),i=" OR "})),""!=o&&(o="("+o+")",""!=s&&(o=" AND "+o)),o=s+o,o}removeFilter(e={},t){e[t]={textField:"",textFieldTmp:"",checkBoxes:[],interval:null,intervalTmp:null}}}var _;!function(e){e.asAccordion="When enabled, the first level of depth will give an accordion look to nodes.",e.autoSelectionNodeMode="Auto select programmatic selectic node",e.columns="The columns of the tree when tree visualization is active.",e.customStyle="Custom style of the component.",e.data="The json data used to populate the tree view: the basic, always visible tree nodes.",e.density="The density of the rows, defaults at 'medium' and can also be set to 'dense' or 'wide'.",e.dynamicExpansionCallback="Function that gets invoked when a new set of nodes must be loaded as children of a node. When useDynamicExpansion is set, the tree component will have two different behaviors depending on the value of this prop. If this prop is set to null, no callback to download data is available: the component will emit an event requiring the parent to load the children of the given node. If this prop is set to have a callback, then the component will automatically make requests to load children of a given node. After the load has been completed, a different event will be fired to alert the parent of the change.",e.enableExtraColumns="Enables adding extra columns.",e.expanded="Flag: the nodes of the whole tree must be already expanded upon loading. Disabled nodes do NOT get expanded.",e.expansionMode="Behavior of nodes' expansion: it can be chosen between expanding a node by clicking on the dropdown icon, or by clicking on the whole node.",e.filters="List of filters set by the user.",e.globalFilter="When set to true it activates the global filter.",e.globalFilterValue="The value of the global filter.",e.globalFilterMode="The mode of the global filter.",e.removableColumns="Sets the possibility to remove the selected column.",e.preventXScroll="Experimental feature: when active, the tree will try to prevent horizontal overflowing elements by setting a width on the content of the table cells. It works only on cells of the main column.",e.ripple="When enabled displays Material's ripple effect on nodes (only when no columns are displayed).",e.scrollOnHover="Activates the scroll on hover function.",e.selectedNode="An array of integers containing the path to a selected child. Groups up the properties SelFirst, SelItem, SelName.",e.showColumns="Shows the tree data as a table.",e.showFilters="When set to true enables the column filters.",e.showFooter="When set to true shows the footer.",e.showHeader="Flag: shows the header of the tree when the tree is displayed as a table.",e.showIcons="Shows the icons of the nodes.",e.stateId="",e.store="",e.totals="Defines the current totals options.",e.useDynamicExpansion="When the component must use the dynamic expansion feature to open its nodes, it means that not all the nodes of the tree have been passed inside the data property. Therefore, when expanding a node, the tree must emit an event (or run a given callback) and wait for the child nodes to be downloaded from the server."}(_||(_={}));const A="TREE_COLUMN";var S;!function(e){e.DROPDOWN="dropdown",e.NODE="node"}(S||(S={}));const W=document.documentElement,B=W.ketchup?W.ketchup.objects:new n;class E extends M{isFilterCompliantForCell(e,t,l){return!!e&&this.isFilterCompliantForSimpleValue(e.value,e.obj,t,l)}isFilterCompliantForCellObj(e,t,l){return!!e&&!!e.obj&&this.isFilterCompliantForSimpleValue(e.obj.k,e.obj,t,l)}isRowCompliant(e,t={},l="",n=!1,r=[],i){return this.areCellsCompliant(e.cells,t,l,n,r,i)}areCellsCompliant(e,t={},l="",n=!1,r=[],i){if(n){let t=!0;if(r&&null!=r&&r.length>0){t=!1;let n=this.filterIsNegative(l);for(let i=0;i<r.length;i++){if(0==r[i].visible)continue;const s=e[r[i].name];if(null==s)continue;t=this.isFilterCompliantForValue(s.value,l);let o=x(r[i],s);if(o!=s.value&&(t=t||this.isFilterCompliantForValue(o,l)),1==t&&!n)break;if(0==t&&n)break}}if(!t)return!1}if(null==i&&(i=new N),!this.hasFilters(t,r,i))return!0;let s=Object.keys(t);for(let l=0;l<s.length;l++){let n=s[l];const o=e[n];if(!o)return!1;let a=i.getTextFilterValue(t,n),u=i.getIntervalTextFieldFilterValues(t,g(r,n));const c=this.filterIsNegative(a);let f=this.isFilterCompliantForCell(o,a,u),h=c;if(B.isNumber(o.obj)||B.isDate(o.obj)||B.isTime(o.obj)||B.isTimestamp(o.obj)||(h=this.isFilterCompliantForCellObj(o,a,u)),c){if(!f||!h)return!1}else if(!f&&!h)return!1;let d=i.getCheckBoxFilterValues(t,n);if(0==d.length)continue;let p=!1;for(let e=0;e<d.length;e++){let t=d[e];if(null!=t&&null!=t.value){if(null!=o.value&&o.value.toLowerCase().trim()==t.value.toLowerCase().trim()){p=!0;break}if(null!=o.obj&&o.obj.k.toLowerCase().trim()==t.value.toLowerCase().trim()){p=!0;break}}}if(!p)return!1}return!0}hasFilters(e={},t,l){if(null==e)return!1;let n=Object.keys(e);if(null==n||n.length<1)return!1;null==l&&(l=new N);for(let r=0;r<n.length;r++){let i=n[r],s=null;if(s="TREE_COLUMN"===i?{name:"TREE_COLUMN",title:""}:g(t,i),l.hasFiltersForColumn(e,s))return!0}return!1}filterRows(e=[],t={},l="",n=[],r){if(!e||null==e)return[];let i=[];const s=!(!l||!n);if(this.hasFilters(t,n,r)||s)for(let o=0;o<e.length;o++){let a=e[o];this.isRowCompliant(a,t,l,s,n,r)&&(i[i.length]=a)}else i=[...e];return i}getColumnValues(e,t,l,n){let i=new Array;null==n&&(n=new N);let s=n.getTextFilterValueTmp(e.filters,t.name),o=n.getIntervalTextFieldFilterValuesTmp(e.filters,t),a=n.getCheckBoxFilterValues(e.filters,t.name);if(null!=t.valuesForFilter&&t.valuesForFilter.length>0)return t.valuesForFilter.forEach((e=>{let l=e;(M.valuesArrayContainsValue(a,l)||""==s||n.isFilterCompliantForSimpleValue(l,t.obj,s,o))&&i.push({value:l,displayedValue:F(l,t.obj,t.decimals)})})),i;let u=Object.assign({},e.filters);u[t.name]={textField:s,textFieldTmp:s,checkBoxes:[],interval:o,intervalTmp:o};let c=this.filterRows(e.getRows(),u,l,e.getVisibleColumns(),n);for(let e=0;e<a.length;e++)i.push(a[e]);return this.extractColumnValues(c,t,i),i.sort(((e,l)=>w(null,v(e,t),null,v(l,t),r.A))),i}extractColumnValues(e,t,l){return e.forEach((e=>this.addColumnValueFromRow(l,t,e.cells[t.name]))),l}addColumnValueFromRow(e,t,l){if(l){let n={value:l.value,displayedValue:x(t,l)};M.valuesArrayContainsValue(e,l.value)||e.push(n)}}}const R=document.documentElement;function $(e=[],t=[]){if(!e||0===e.length)return[];if(e[0].group)return function(e=[],t=[]){if(!e||0===e.length)return[];const l=e[0].group.column;let n=function(e="",t=[]){if(!e||!t||0===t.length)return null;for(let l of t)if(l.column===e)return l;return null}(l,t);return n||(n={column:l,sortMode:r.A}),e.sort(((e,t)=>T({obj:e.group.obj,value:e.group.id},{obj:t.group.obj,value:t.group.id},n.sortMode))),e.forEach((e=>{e.group.children=$(e.group.children,t)})),e}(e,t);if(!t||0===t.length)return e;const l=t.length>1;return e.slice(0).sort(((e,n)=>{if(l){for(let l=0;l<t.length;l++){const r=D(e,n,t[l]);if(0!==r)return r}return 0}return D(e,n,t[0])}))}function D(e,t,l){const n=e.cells[l.column],r=t.cells[l.column];return n||r?n?r?T(n,r,l.sortMode):-1:1:0}function L(e=[],t={},l="",n=[],r,i){return null==i&&(i=new E),i.filterRows(e,t,l,n,r)}function z(e=[],t=[],l=[],n={}){if(!t)return[];if(!l||0===l.length||!e||0===e.length)return t;const r={},s=l.filter((({column:t})=>{for(let{name:l,title:n}of e)if(l===t)return r[l]=n,!0;return!1}));if(0===s.length)return t;const o=[];let a={};return t.forEach((t=>{const l=s[0].column,u=t.cells[l];if(u){const c=g(e,l),f=x(c,u),h=u.value;let d=null;for(let e of o)if(e.group.label===f){d=e;break}null===d&&(d={group:{id:h,parent:null,column:l,columnLabel:r[l],expanded:!1,label:f,children:[],obj:u.obj,totals:{}},cells:{}},o.push(d));for(let l=1;l<s.length;l++){const n=s[l],i=t.cells[n.column];if(i){const t=g(e,n.column),l=x(t,i),s=i.value;let o=null;for(let e=0;e<d.group.children.length;e++){const t=d.group.children[e];if(t.group.label===l){o=t;break}}o||(o={cells:{},group:{id:s,parent:d,column:n.column,columnLabel:r[n.column],children:[],expanded:!1,label:l,totals:{},obj:i.obj}},H(o),d.group.children.push(o)),d=o}}d.group.children.push(t),function(e,t,l,n){if(!e||!t)return;const r=Object.keys(t);0!==r.length&&r.forEach((r=>{const s=R.ketchup.math.numberify(e.group.totals[r]||0),o=l.cells[r];if(o){let l=R.ketchup.objects.isNumber(o.obj);const a=t[r];switch(a){case i.COUNT:e.group.totals[r]=s+1;let t=e.group.parent;for(;null!=t;)t.group.totals[r]=(t.group.totals[r]||0)+1,t=t.group.parent;break;case i.DISTINCT:let u;if(u=l?R.ketchup.math.numberify(m(o.value)):o.value,n[e.group.id]){let t=n[e.group.id][r];t?t.push(u):(n[e.group.id][r]=[],n[e.group.id][r].push(u))}else n[e.group.id]={},n[e.group.id][r]=[],n[e.group.id][r].push(u);let c=e.group.parent;for(;null!=c;){if(n[c.group.id]){let e=n[c.group.id][r];e?e.push(u):(n[c.group.id][r]=[],n[c.group.id][r].push(u))}else n[c.group.id]={},n[c.group.id][r]=[],n[c.group.id][r].push(u);c=c.group.parent}break;case i.SUM:case i.AVERAGE:if(l){const t=R.ketchup.math.numberify(m(o.value));e.group.totals[r]=t+s;let l=e.group.parent;for(;null!=l;){const e=R.ketchup.math.numberify(l.group.totals[r]||0);l.group.totals[r]=t+e,l=l.group.parent}}break;case i.MIN:if(l){const t=e.group.totals[r],l=R.ketchup.math.numberify(m(o.value));e.group.totals[r]=t?Math.min(t,l):l;let n=e.group.parent;for(;null!=n;){const e=n.group.totals[r];n.group.totals[r]=e?Math.min(e,l):l,n=n.group.parent}}else if(R.ketchup.objects.isDate(o.obj)){const t=o.obj?R.ketchup.objects.parseDate(o.obj):R.ketchup.dates.toDayjs(o.value);if(R.ketchup.dates.isValid(t)){const l=R.ketchup.dates.toDate(t),n=e.group.totals[r];if(n){let t=[];t.push(l),t.push(R.ketchup.dates.format(n)),e.group.totals[r]=R.ketchup.dates.format(R.ketchup.dates.min(t))}else e.group.totals[r]=l;let i=e.group.parent;for(;null!=i;){const e=i.group.totals[r];if(e){let t=[];t.push(l),t.push(R.ketchup.dates.format(e)),i.group.totals[r]=R.ketchup.dates.format(R.ketchup.dates.min(t))}else i.group.totals[r]=l;i=i.group.parent}}}break;case i.MAX:if(l){const t=e.group.totals[r],l=R.ketchup.math.numberify(m(o.value));e.group.totals[r]=t?Math.max(t,l):l;let n=e.group.parent;for(;null!=n;){const e=n.group.totals[r];n.group.totals[r]=e?Math.max(e,l):l,n=n.group.parent}}else if(R.ketchup.objects.isDate(o.obj)){const t=o.obj?R.ketchup.objects.parseDate(o.obj):R.ketchup.dates.toDayjs(o.value);if(R.ketchup.dates.isValid(t)){const l=R.ketchup.dates.toDate(t),n=e.group.totals[r];if(n){let t=[];t.push(l),t.push(R.ketchup.dates.format(n)),e.group.totals[r]=R.ketchup.dates.format(R.ketchup.dates.max(t))}else e.group.totals[r]=l;let i=e.group.parent;for(;null!=i;){const e=i.group.totals[r];if(e){let t=[];t.push(l),t.push(R.ketchup.dates.format(e)),i.group.totals[r]=R.ketchup.dates.format(R.ketchup.dates.max(t))}else i.group.totals[r]=l;i=i.group.parent}}}break;default:0!=a.indexOf(i.MATH)&&console.warn(`invalid total mode: ${a}`)}}}))}(d,n,t,a)}})),function(e,t,l){if(!e||!t)return;const n=Object.keys(t);if(0===e.length||!e[0].group||0===n.length)return;let r=n.filter((e=>i.DISTINCT===t[e]));r.length>0&&e.filter((e=>e.group.children.length>0)).forEach((e=>q(e,r,l)))}(o,n,a),U(o,i.AVERAGE,n),U(o,i.MATH,n),o}function U(e,t,l){if(!e||!l)return;const n=Object.keys(l);if(0===e.length||!e[0].group||0===n.length)return;let r;t==i.AVERAGE&&(r=n.filter((e=>i.AVERAGE===l[e]))),t==i.MATH&&(r=n.filter((e=>0==l[e].indexOf(i.MATH)))),r.length>0&&e.filter((e=>e.group.children.length>0)).forEach((e=>G(e,t,r,l)))}function q(e,t,l){const n=e.group.children;0!==n.length&&(n[0].group&&n.forEach((e=>{q(e,t,l)})),t.forEach((t=>{e.group.totals[t]=new Set(l[e.group.id][t]).size})))}function G(e,t,l,n){const r=e.group.children;if(0===r.length)return 0;let s=0;return r[0].group?r.forEach((e=>{s+=G(e,t,l,n)})):s=r.length,l.forEach((l=>{if(t==i.AVERAGE&&(e.group.totals[l]=R.ketchup.math.numberify(e.group.totals[l])/s),t==i.MATH){let t=n[l].substring(i.MATH.length);e.group.totals[l]=R.ketchup.math.formulas.custom(t,e.group.totals)}})),s}function J(e,t){if(t){const l=Object.assign(t);return t.forEach((t=>{e.forEach((e=>{if(t.cells){const l=t.cells[e.name];l&&e.obj&&!l.obj&&(l.obj={t:e.obj.t,p:e.obj.p,k:l.value})}}))})),l}}function K(e=[],t={}){if(R.ketchup.objects.isEmptyJsObject(e)||R.ketchup.objects.isEmptyJsObject(t))return{};const l=Object.keys(t),n={};if(0===l.length&&l.every((e=>t[e]===i.COUNT)))l.forEach((t=>n[t]=e.length));else{let r={};e.forEach(((e,s,o)=>{l.filter((e=>i.COUNT!==t[e]&&0!=t[e].indexOf(i.MATH))).forEach((l=>{const a=e.cells[l];if(a)if(t[l]===i.DISTINCT){let e;e=R.ketchup.objects.isNumber(a.obj)?R.ketchup.math.numberify(m(a.value)):a.value;let t=r[l];t?t.push(e):(r[l]=[],r[l].push(e))}else if(R.ketchup.objects.isNumber(a.obj)){const e=R.ketchup.math.numberify(m(a.value));let r=n[l];switch(!0){case t[l]===i.MIN:n[l]=r?Math.min(r,e):e;break;case t[l]===i.MAX:n[l]=r?Math.max(r,e):e;break;default:r=n[l]||0,n[l]=e+R.ketchup.math.numberify(r)}}else if(R.ketchup.objects.isDate(a.obj)){const e=a.obj?R.ketchup.objects.parseDate(a.obj):R.ketchup.dates.toDayjs(a.value);if(R.ketchup.dates.isValid(e)){const r=R.ketchup.dates.toDate(e),s=n[l];switch(!0){case t[l]===i.MIN:if(s){let e=[];e.push(r),e.push(R.ketchup.dates.format(s)),n[l]=R.ketchup.dates.format(R.ketchup.dates.min(e))}else n[l]=r;break;case t[l]===i.MAX:if(s){let e=[];e.push(r),e.push(R.ketchup.dates.format(s)),n[l]=R.ketchup.dates.format(R.ketchup.dates.max(e))}else n[l]=r}}}s===o.length-1&&t[l]===i.DISTINCT&&(n[l]=new Set(r[l]).size,r[l]=[])}))}));for(let r of l){switch(!0){case t[r]===i.AVERAGE:const l=n[r];l&&e.length>0&&(n[r]=l/e.length);break;case t[r]===i.COUNT:n[r]=e.length;break;case 0==t[r].indexOf(i.MATH):n[r]=R.ketchup.math.formulas.custom(t[r].substring(i.MATH.length),n)}n[r]&&(n[r]=+n[r].toFixed(2))}}return n}function H(e){if(!e.group)return;let t=e.group.id,l=e.group.parent;for(;null!==l;)t=`${l.group.id};${t}`,l=l.group.parent;e.group.id=t}function P(e,t,l,n){const r=t*l-l,i=r+Number(l);if(0==n)return e.slice(r,i);let s=[];return Q(e,s,r,Number(l),0),s}function Q(e,t,l,n,r){let i=!1;for(let s=0;s<e.length;s++){let o=e[s],a=X(e[s]);if(null!=o.group&&null!=o.group.children&&o.group.children.length>0){a.group.children=[];let e=Q(o.group.children,a.group.children,l,n,r);r=e.ci,i=e.added,1==i&&(t[t.length]=a)}else r>=l&&(t[t.length]=a,i=!0),r++;if(r>=l+n)break}return{ci:r,added:i}}function X(e){return null==e?null:{id:e.id,cells:Object.assign({},e.cells),actions:e.actions?[...e.actions]:null,group:Z(e.group),readOnly:e.readOnly,cssClass:e.cssClass}}function Y(e){if(null==e)return null;let t=[];for(let l=0;l<e.length;l++)t[t.length]=X(e[l]);return t}function Z(e){return null==e?null:{id:e.id,parent:Object.assign({},e.parent),column:e.column,columnLabel:e.columnLabel,expanded:e.expanded,label:e.label,children:Y(e.children),obj:Object.assign({},e.obj),totals:Object.assign({},e.totals)}}var ee;!function(e){e.SIMPLE="simple",e.FULL="full"}(ee||(ee={}));const te=document.documentElement,le=e=>{const t=Math.ceil(e.max/e.perPage),l=function(e,t){const l=[];for(let n=1;n<=t;n++){const t=n==e.currentPage;l.push({id:n.toString(),selected:t,value:n.toString()})}return l}(e,t),n=function(e){const t=[];let l=e.perPage;if(0===l)return t;for(;l<e.max;){const n=l==e.perPage;t.push({id:l.toString(),selected:n,value:l.toString()}),l*=2}const n=e.max==e.perPage;return t.push({id:e.max.toString(),selected:n,value:e.max.toString()}),t}(e),r={"kup-list":{data:l},"kup-text-field":{label:te.ketchup.language.translate(s.PAGE),helper:te.ketchup.language.translate(s.TOTAL)+`: ${t}`,helperWhenFocused:!0,inputType:"number",max:t,min:1}},i={"kup-list":{data:n},"kup-text-field":{label:te.ketchup.language.translate(o.ROWS)+" / "+te.ketchup.language.translate(s.PAGE),helper:te.ketchup.language.translate(o.TOTAL)+`: ${e.max}`,helperWhenFocused:!0,inputType:"number",max:e.max,min:1}};return k("div",Object.assign({class:`f-paginator ${e.mode?e.mode:""} ${e.wrapperClass?e.wrapperClass:""}`},e.dataSet,{id:e.id,title:e.title}),e.mode!==ee.SIMPLE?k(V,{icon:"chevron_left",disabled:re(e),onClick:e.onPrevPage,wrapperClass:"prev-page"}):null,k("kup-combobox",{class:"page-selector",data:r,initialValue:e.currentPage.toString(),"onkup-combobox-change":e.onPageChange}),e.mode!==ee.SIMPLE?k(V,{icon:"chevron_right",disabled:ne(e),onClick:e.onNextPage,wrapperClass:"next-page"}):null,k("kup-combobox",{class:"rows-selector",data:i,initialValue:e.perPage.toString(),"onkup-combobox-change":e.onRowsChange}),e.onLoadMore?k(V,{icon:"plus",onClick:e.onLoadMore,label:te.ketchup.language.translate(a.LOAD_MORE),styling:y.FLAT,wrapperClass:"load-more-button"}):null)};function ne(e){return e.currentPage*e.perPage>=e.max}function re(e){return 1==e.currentPage}function ie(e,t,l){if(b(e)){const n=Math.ceil(t/l);let r=e;return r>n&&(r=n),r<1&&(r=1),r}return null}function se(e,t){if(b(e)){let l=e;return l>t&&(l=t),l<1&&(l=1),l}return null}export{N as F,S as K,E as a,M as b,C as c,K as d,le as e,L as f,z as g,ie as h,O as i,_ as j,ee as k,J as n,P as p,se as r,$ as s,A as t}
@@ -1 +1 @@
1
- import{r,c as o,f as t,h as e,H as a,g as i}from"./p-8be1337b.js";import{k as s}from"./p-ee33cbe9.js";import{g as p,s as n}from"./p-10c8d755.js";import{c as d}from"./p-97e8ea42.js";var c;!function(r){r.customStyle="Custom style of the component.",r.opened="Defaults at false. When set to true, the drawer appears."}(c||(c={}));const u=class{constructor(t){r(this,t),this.kupDrawerClose=o(this,"kup-drawer-close",6),this.kupDrawerOpen=o(this,"kup-drawer-open",6),this.kupDrawerReady=o(this,"kup-drawer-ready",6),this.opened=!1,this.customStyle="",this.kupManager=s()}async close(){this.opened=!1,this.kupDrawerClose.emit({comp:this,id:this.rootElement.id})}async getProps(r){return p(this,c,r)}async isOpened(){return this.opened}async open(){this.opened=!0,this.kupDrawerOpen.emit({comp:this,id:this.rootElement.id})}async refresh(){t(this)}async setProps(r){n(this,c,r)}async toggle(){this.opened?this.close():this.open()}content(){const r=[],o=Array.prototype.slice.call(this.rootElement.children,0),t=[];for(let t=0;t<o.length;t++)r.push(e("slot",null));return t.push(e("div",{class:"drawer__content"},r)),t}componentWillLoad(){this.kupManager.debug.logLoad(this,!1),this.kupManager.theme.register(this)}componentDidLoad(){this.kupDrawerReady.emit({comp:this,id:this.rootElement.id}),this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1)}componentDidRender(){this.kupManager.debug.logRender(this,!0)}render(){return e(a,{"kup-opened":this.opened},e("style",null,this.kupManager.theme.setKupStyle(this.rootElement)),e("div",{class:"backdrop",onPointerDown:r=>{r.stopPropagation(),this.close()}}),e("div",{id:d},e("div",{class:"drawer"},this.content())))}disconnectedCallback(){this.kupManager.theme.unregister(this)}get rootElement(){return i(this)}};u.style=":host{--kup_drawer_backdrop:var(--kup-drawer-backdrop, rgba(0, 0, 0, 0.32));--kup_drawer_box_shadow:var(\n --kup-drawer-box-shadow,\n 0 8px 10px -5px rgba(0, 0, 0, 0.2),\n 0 16px 24px 2px rgba(0, 0, 0, 0.14),\n 0 6px 30px 5px rgba(0, 0, 0, 0.12)\n );--kup_drawer_permanent_border:var(\n --kup-drawer-permanent-border,\n 1px solid var(--kup-border-color)\n );--kup_drawer_slide_transition:var(--kup-drawer-slide-transition, 750ms);--kup_drawer_transition:var(--kup-drawer-transition, 250ms);box-shadow:var(--kup_drawer_box_shadow);display:block;font-size:var(--kup-font-size);height:100vh;left:calc(var(--kup-drawer-width) * -1);position:fixed;top:0;transition:left var(--kup_drawer_slide_transition) cubic-bezier(0.4, 0, 0.2, 1), right var(--kup_drawer_slide_transition) cubic-bezier(0.4, 0, 0.2, 1);width:var(--kup-drawer-width);z-index:var(--kup-drawer-zindex)}#kup-component{height:100%;width:100%}.backdrop{position:fixed;top:0;left:0;width:100%;height:100%;background:var(--kup_drawer_backdrop);opacity:0;pointer-events:none;transition:opacity var(--kup_drawer_transition) ease-in;z-index:var(--kup-drawer-zindex)}.drawer{height:100%;position:fixed;width:var(--kup-drawer-width);z-index:calc(var(--kup-drawer-zindex) + 1)}.drawer__content{background-color:var(--kup-drawer-background-color);box-sizing:border-box;height:100%;overflow-y:auto;width:100%}.drawer ::slotted(*){--kup-button-primary-color:var(--kup-drawer-color);--kup-button-primary-color-rgb:var(--kup-drawer-color-rgb);--kup-button-primary-color-h:var(--kup-drawer-color-h);--kup-button-primary-color-s:var(--kup-drawer-color-s);--kup-button-primary-color-l:var(--kup-drawer-color-l);--kup-switch-label-color:var(--kup-drawer-color);--kup-switch-primary-color:var(--kup-drawer-color);--kup-switch-primary-color-rgb:var(--kup-drawer-color-rgb);--kup-textfield-color:var(--kup-drawer-color);--kup-textfield-color-rgb:var(--kup-drawer-color-rgb);--kup-textfield-primary-color:var(--kup-drawer-color);--kup-textfield-primary-color-rgb:var(--kup-drawer-color-rgb);--kup-tree-color:var(--kup-drawer-color);--kup-tree-color-rgb:var(--kup-drawer-color-rgb);--kup-tree-icon-color:var(--kup-drawer-color);color:var(--kup-drawer-color);fill:var(--kup-drawer-color)}:host([kup-opened]){left:0}:host([kup-opened]) .backdrop{opacity:1;pointer-events:all}:host(.kup-right){left:unset;right:-100%}:host([kup-opened].kup-right){right:0}:host(.kup-permanent){box-shadow:unset;transition:all 250ms}:host(.kup-permanent) .backdrop{display:none}:host(.kup-permanent) .drawer{position:relative}:host(.kup-permanent) .drawer__content{border-right:var(--kup_drawer_permanent_border)}";export{u as kup_drawer}
1
+ import{r,c as o,f as t,h as e,H as a,g as i}from"./p-34b74425.js";import{k as p}from"./p-aca0e54b.js";import{g as s,s as n}from"./p-e0035c58.js";import{c as d}from"./p-97e8ea42.js";var c;!function(r){r.customStyle="Custom style of the component.",r.opened="Defaults at false. When set to true, the drawer appears."}(c||(c={}));const u=class{constructor(t){r(this,t),this.kupDrawerClose=o(this,"kup-drawer-close",6),this.kupDrawerOpen=o(this,"kup-drawer-open",6),this.kupDrawerReady=o(this,"kup-drawer-ready",6),this.opened=!1,this.customStyle="",this.kupManager=p()}async close(){this.opened=!1,this.kupDrawerClose.emit({comp:this,id:this.rootElement.id})}async getProps(r){return s(this,c,r)}async isOpened(){return this.opened}async open(){this.opened=!0,this.kupDrawerOpen.emit({comp:this,id:this.rootElement.id})}async refresh(){t(this)}async setProps(r){n(this,c,r)}async toggle(){this.opened?this.close():this.open()}content(){const r=[],o=Array.prototype.slice.call(this.rootElement.children,0),t=[];for(let t=0;t<o.length;t++)r.push(e("slot",null));return t.push(e("div",{class:"drawer__content"},r)),t}componentWillLoad(){this.kupManager.debug.logLoad(this,!1),this.kupManager.theme.register(this)}componentDidLoad(){this.kupDrawerReady.emit({comp:this,id:this.rootElement.id}),this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1)}componentDidRender(){this.kupManager.debug.logRender(this,!0)}render(){return e(a,{"kup-opened":this.opened},e("style",null,this.kupManager.theme.setKupStyle(this.rootElement)),e("div",{class:"backdrop",onClick:r=>{r.preventDefault(),r.stopPropagation()},onPointerDown:r=>{r.preventDefault(),r.stopPropagation(),this.close()},onTouchStart:r=>{r.preventDefault(),r.stopPropagation()}}),e("div",{id:d},e("div",{class:"drawer"},this.content())))}disconnectedCallback(){this.kupManager.theme.unregister(this)}get rootElement(){return i(this)}};u.style=":host{--kup_drawer_backdrop:var(--kup-drawer-backdrop, rgba(0, 0, 0, 0.32));--kup_drawer_box_shadow:var(\n --kup-drawer-box-shadow,\n 0 8px 10px -5px rgba(0, 0, 0, 0.2),\n 0 16px 24px 2px rgba(0, 0, 0, 0.14),\n 0 6px 30px 5px rgba(0, 0, 0, 0.12)\n );--kup_drawer_permanent_border:var(\n --kup-drawer-permanent-border,\n 1px solid var(--kup-border-color)\n );--kup_drawer_slide_transition:var(--kup-drawer-slide-transition, 750ms);--kup_drawer_transition:var(--kup-drawer-transition, 250ms);box-shadow:var(--kup_drawer_box_shadow);display:block;font-size:var(--kup-font-size);height:100vh;left:calc(var(--kup-drawer-width) * -1);position:fixed;top:0;transition:left var(--kup_drawer_slide_transition) cubic-bezier(0.4, 0, 0.2, 1), right var(--kup_drawer_slide_transition) cubic-bezier(0.4, 0, 0.2, 1);width:var(--kup-drawer-width);z-index:var(--kup-drawer-zindex)}#kup-component{height:100%;width:100%}.backdrop{position:fixed;top:0;left:0;width:100%;height:100%;background:var(--kup_drawer_backdrop);opacity:0;pointer-events:none;transition:opacity var(--kup_drawer_transition) ease-in;z-index:var(--kup-drawer-zindex)}.drawer{height:100%;position:fixed;width:var(--kup-drawer-width);z-index:calc(var(--kup-drawer-zindex) + 1)}.drawer__content{background-color:var(--kup-drawer-background-color);box-sizing:border-box;height:100%;overflow-y:auto;width:100%}.drawer ::slotted(*){--kup-button-primary-color:var(--kup-drawer-color);--kup-button-primary-color-rgb:var(--kup-drawer-color-rgb);--kup-button-primary-color-h:var(--kup-drawer-color-h);--kup-button-primary-color-s:var(--kup-drawer-color-s);--kup-button-primary-color-l:var(--kup-drawer-color-l);--kup-switch-label-color:var(--kup-drawer-color);--kup-switch-primary-color:var(--kup-drawer-color);--kup-switch-primary-color-rgb:var(--kup-drawer-color-rgb);--kup-textfield-color:var(--kup-drawer-color);--kup-textfield-color-rgb:var(--kup-drawer-color-rgb);--kup-textfield-primary-color:var(--kup-drawer-color);--kup-textfield-primary-color-rgb:var(--kup-drawer-color-rgb);--kup-tree-color:var(--kup-drawer-color);--kup-tree-color-rgb:var(--kup-drawer-color-rgb);--kup-tree-filter-background-color:var(--kup-drawer-background-color);--kup-tree-icon-color:var(--kup-drawer-color);color:var(--kup-drawer-color);fill:var(--kup-drawer-color)}:host([kup-opened]){left:0}:host([kup-opened]) .backdrop{opacity:1;pointer-events:all}:host(.kup-right){left:unset;right:-100%}:host([kup-opened].kup-right){right:0}:host(.kup-permanent){box-shadow:unset;transition:all 250ms}:host(.kup-permanent) .backdrop{display:none}:host(.kup-permanent) .drawer{position:relative}:host(.kup-permanent) .drawer__content{border-right:var(--kup_drawer_permanent_border)}";export{u as kup_drawer}
@@ -0,0 +1 @@
1
+ import{r as t,c as s,f as i,h as a,H as o,g as n}from"./p-34b74425.js";import{k as r}from"./p-aca0e54b.js";import{g as e,s as c}from"./p-e0035c58.js";import{c as l}from"./p-97e8ea42.js";import{F as p}from"./p-1ae66cc5.js";import"./p-6c77a36c.js";import"./p-bfc3bac7.js";var h;!function(t){t.actionButton="Set of FButton props to set the action button.",t.closeButton="When true, the hide button will be displayed.",t.customStyle="Custom style of the component.",t.text="Sets the textual content of the snackbar.",t.timeout="Defaults at null, when set the snackbar will automatically disappear after the specified amount of milliseconds."}(h||(h={}));const u=class{constructor(i){t(this,i),this.kupActionClick=s(this,"kup-snackbar-actionclick",6),this.visible=!1,this.actionButton=null,this.closeButton=!0,this.customStyle="",this.text="",this.timeout=null,this.kupManager=r()}onKupActionClick(){this.hide(),this.kupActionClick.emit({comp:this,id:this.rootElement.id})}async getProps(t){return e(this,h,t)}async hide(){this.visible=!1}async refresh(){i(this)}async setProps(t){c(this,h,t)}async show(){this.visible=!0}componentWillLoad(){this.kupManager.debug.logLoad(this,!1),this.kupManager.theme.register(this)}componentDidLoad(){this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1)}componentDidRender(){this.timeout&&this.visible&&setTimeout((()=>{this.hide()}),this.timeout),this.kupManager.debug.logRender(this,!0)}render(){return a(o,{"kup-visible":this.visible},a("style",null,this.kupManager.theme.setKupStyle(this.rootElement)),a("div",{id:l},a("div",{class:"snackbar"},a("div",{class:"snackbar__text"},this.text),this.actionButton||this.closeButton?a("div",{class:"snackbar__buttons"},this.actionButton?a("div",{class:"snackbar__action"},a(p,Object.assign({},this.actionButton,{onClick:()=>this.onKupActionClick()}))):null,this.closeButton?a("div",{class:"snackbar__close"},a(p,{icon:"close",onClick:()=>this.hide()})):null):null)))}disconnectedCallback(){this.kupManager.theme.unregister(this)}get rootElement(){return n(this)}};u.style=":host{animation:snackbar-show 125ms;bottom:0;box-sizing:border-box;display:block;left:0;outline:none;pointer-events:none;position:fixed;transition:opacity 0.15s cubic-bezier(0, 0, 0.2, 1) 0ms, transform 0.15s cubic-bezier(0, 0, 0.2, 1) 0ms, -webkit-transform 0.15s cubic-bezier(0, 0, 0.2, 1) 0ms;width:100%;z-index:calc(var(--kup-navbar-zindex) + 1)}:host(:not([kup-visible])){display:none}#kup-component{display:flex;justify-content:center;height:100%;padding:8px;width:100%}.snackbar{align-items:center;background:var(--kup-navbar-background-color);border-radius:5px;box-shadow:var(--kup-box-shadow);color:var(--kup-navbar-color);display:flex;justify-content:flex-start;max-width:672px;min-height:48px;min-width:344px}.snackbar__text{padding:14px 16px;pointer-events:all;white-space:nowrap}.snackbar__buttons{--kup-button-primary-color:var(--kup-navbar-color);--kup-button-primary-color-rgb:var(--kup-navbar-color-rgb);--kup-button-primary-color-h:var(--kup-navbar-color-h);--kup-button-primary-color-s:var(--kup-navbar-color-s);--kup-button-primary-color-l:var(--kup-navbar-color-l);align-items:center;display:flex;justify-content:flex-end;margin-right:8px;pointer-events:all;width:100%}.snackbar__close{--kup-button-font-size:11px;margin-left:8px;pointer-events:all}@keyframes snackbar-show{from{transform:scale(0.5);opacity:0}to{transform:scale(1);opacity:1}}:host(.kup-top){bottom:unset;top:var(--kup-navbar-height, 0)}";export{u as kup_snackbar}
@@ -1 +1 @@
1
- import{r as t,f as i,h as s,H as e,g as o}from"./p-8be1337b.js";import{k as a,i as c,j as n,_ as r,F as h,$ as l,o as u,b as p}from"./p-ee33cbe9.js";import{F as d}from"./p-6c77a36c.js";import{F as b}from"./p-47b57d97.js";import{g as m,s as k}from"./p-10c8d755.js";import{c as g}from"./p-97e8ea42.js";var f,x;!function(t){t.customStyle="Custom style of the component.",t.data="Sets the data that will be used to display different components."}(f||(f={})),function(t){t.BOX="Box",t.BUTTON_LIST="Button List",t.CHART="Chart",t.CHIP="Chip",t.ECHART="Echart",t.DATATABLE="Datatable",t.JSON="JSON",t.TREE="Tree"}(x||(x={}));const y=class{constructor(i){t(this,i),this.display=x.DATATABLE,this.customStyle="",this.data=null,this.dragHandler=null,this.kupManager=a(),this.textArea=null,this.wrapperRef=null}async getProps(t){return m(this,f,t)}async refresh(){i(this)}async setProps(t){k(this,f,t)}comboboxProps(){const t=[];for(const i in x)Object.prototype.hasOwnProperty.call(x,i)&&t.push({id:x[i],selected:!1,value:x[i]});return{data:{"kup-list":{data:t,id:"kup-debug-theme-changer-list"},"kup-text-field":{emitSubmitEventOnEnter:!1,inputType:"text",label:this.kupManager.language.translate(c.VIEW_AS)}},id:"comp-switcher",initialValue:this.display,isSelect:!0,"onKup-combobox-itemclick":t=>{this.display=t.detail.value}}}setContent(){const t=!!(this.data&&this.data.columns&&this.data.columns.length>0),i=[],e={};if(this.display===x.JSON)e.initialValue=this.data?JSON.stringify(this.data,null,2):"",e.textArea=!0,i.push(s("kup-text-field",Object.assign({class:"kup-full-width kup-full-height"},e,{ref:t=>this.textArea=t,"onkup-textfield-input":t=>{try{this.data=JSON.parse(t.detail.value)}catch(t){this.data={columns:[{name:"ERROR",title:"Error"}],rows:[{cells:{ERROR:{value:"Invalid JSON:"+t}}}]}}}})));else if(t)switch(this.display){case x.BOX:e.data=this.data,i.push(s("kup-box",Object.assign({},e)));break;case x.BUTTON_LIST:e.data=this.data,i.push(s("kup-button-list",Object.assign({},e)));break;case x.CHIP:e.data=this.data,i.push(s("kup-chip",Object.assign({},e)));break;case x.CHART:case x.ECHART:e.data=this.data,e.series=[],e.axis=null;for(let t=0;t<this.data.columns.length;t++){const i=this.data.columns[t];i.obj&&this.kupManager.objects.isNumber(i.obj)||null!==e.axis?e.series.push(this.display===x.CHART?{code:i.name,decode:i.title}:i.name):e.axis=i.name}0===e.series.length&&this.kupManager.debug.logMessage(this,"Not enough numerical columns to display a chart!",n.WARNING),e.axis||this.kupManager.debug.logMessage(this,"No axis for the chart!",n.WARNING),i.push(s(this.display===x.CHART?"kup-chart":"kup-echart",Object.assign({},e)));break;case x.DATATABLE:e.data=this.data,e.autoFillMissingCells=!0,i.push(s("kup-data-table",Object.assign({},e)));break;case x.TREE:e.data=this.data,i.push(s("kup-tree",Object.assign({class:"kup-full-width"},e)));break;default:return void this.kupManager.debug.logMessage(this,"Display mode not supported ("+this.display+")!",n.ERROR)}else i.push(s("div",{class:"empty"},s(b,{sizeY:"100px",resource:"move_to_inbox"}),s("div",{class:"empty-text"},this.kupManager.language.translate(c.DROP_YOUR_DATA))));return i}updateData(t){{const i=Object.assign({},this.data),s=t.detail.sourceElement&&t.detail.sourceElement.column?t.detail.sourceElement.column:null,e=t.detail.sourceElement&&t.detail.sourceElement.row?t.detail.sourceElement.row:null;if(s&&s.name?i.columns?this.data.columns.find((t=>t.name===s.name))||i.columns.push(s):i.columns=[s]:this.kupManager.debug.logMessage(this,"Invalid column received.",n.WARNING),e&&(i.rows?i.rows.push(e):i.rows=[e]),this.data=i,this.data&&this.textArea)try{this.textArea.setValue(JSON.stringify(this.data,null,2))}catch(t){this.textArea.setValue("Invalid JSON:"+t)}}}componentWillLoad(){this.kupManager.debug.logLoad(this,!1),this.kupManager.language.register(this),this.kupManager.theme.register(this)}componentDidLoad(){this.rootElement.addEventListener(r,(t=>this.updateData(t))),this.dragHandler=this.rootElement.shadowRoot.querySelector("#drag-handle"),this.kupManager.interact.dialogify(this.rootElement,this.dragHandler),this.kupManager.interact.dropzone(this.wrapperRef,{accept:`[${h}],[${l}]`},{dispatcher:this.rootElement,type:u.MAGICBOX}),this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1)}componentDidRender(){this.kupManager.debug.logRender(this,!0)}render(){return s(e,null,s("style",null,this.kupManager.theme.setKupStyle(this.rootElement)),s("div",{id:g},s("div",{class:"magic-box-wrapper"},s("div",{class:"actions",id:"drag-handle"},s("kup-combobox",Object.assign({},this.comboboxProps())),s("kup-button",{styling:d.FLAT,icon:"delete",label:"Reset","onkup-button-click":()=>{this.data=null}}),s("kup-button",{id:"close-dialog",customStyle:`:host{${p.PRIMARY}: var(${p.TITLE});}`,icon:"clear","onkup-button-click":()=>{this.kupManager.hideMagicBox()}})),s("div",{class:"content",ref:t=>this.wrapperRef=t},this.setContent()))))}disconnectedCallback(){this.kupManager.interact.unregister([this.rootElement,this.wrapperRef]),this.kupManager.language.unregister(this),this.kupManager.theme.unregister(this)}get rootElement(){return o(this)}};y.style=":host{background-color:var(--kup-background-color);color:var(--kup-text-color);display:block;height:300px;min-width:700px;width:700px}#kup-component,.magic-box-wrapper{height:100%;width:100%}.magic-box-wrapper{border:3px dashed var(--kup-border-color);box-sizing:border-box;display:flex;flex-direction:column}.actions{align-items:center;background-color:var(--kup-title-background-color);display:inline-flex;height:52px;justify-content:center;left:0;position:absolute;top:0;width:100%;z-index:1}.actions kup-button{margin:0.5em}.actions #comp-switcher{margin:auto 0}.actions #close-dialog{position:absolute;margin:0;top:0;right:0;background-color:var(--kup-title-background-color)}.content{box-sizing:border-box;height:100%;margin-top:52px;overflow:auto;transition:background-color 125ms ease}.empty{flex-direction:column;display:flex;text-align:center;justify-content:center;height:100%;width:100%;opacity:0.5;transition:opacity 0.25s ease-out}.empty .f-image{margin:0}.json{font-family:var(--kup-font-family-monospace);margin:0}[kup-drag-over]{background-color:rgba(var(--kup-success-color-rgb), 0.25)}";export{y as kup_magic_box}
1
+ import{r as t,f as i,h as s,H as e,g as o}from"./p-34b74425.js";import{k as a,h as c,c as n,_ as r,z as h,$ as l,D as u,b as p}from"./p-aca0e54b.js";import{F as d}from"./p-6c77a36c.js";import{F as b}from"./p-bfc3bac7.js";import{g as m,s as k}from"./p-e0035c58.js";import{c as g}from"./p-97e8ea42.js";var f,x;!function(t){t.customStyle="Custom style of the component.",t.data="Sets the data that will be used to display different components."}(f||(f={})),function(t){t.BOX="Box",t.BUTTON_LIST="Button List",t.CHART="Chart",t.CHIP="Chip",t.ECHART="Echart",t.DATATABLE="Datatable",t.JSON="JSON",t.TREE="Tree"}(x||(x={}));const y=class{constructor(i){t(this,i),this.display=x.DATATABLE,this.customStyle="",this.data=null,this.dragHandler=null,this.kupManager=a(),this.textArea=null,this.wrapperRef=null}async getProps(t){return m(this,f,t)}async refresh(){i(this)}async setProps(t){k(this,f,t)}comboboxProps(){const t=[];for(const i in x)Object.prototype.hasOwnProperty.call(x,i)&&t.push({id:x[i],selected:!1,value:x[i]});return{data:{"kup-list":{data:t,id:"kup-debug-theme-changer-list"},"kup-text-field":{emitSubmitEventOnEnter:!1,inputType:"text",label:this.kupManager.language.translate(c.VIEW_AS)}},id:"comp-switcher",initialValue:this.display,isSelect:!0,"onKup-combobox-itemclick":t=>{this.display=t.detail.value}}}setContent(){const t=!!(this.data&&this.data.columns&&this.data.columns.length>0),i=[],e={};if(this.display===x.JSON)e.initialValue=this.data?JSON.stringify(this.data,null,2):"",e.textArea=!0,i.push(s("kup-text-field",Object.assign({class:"kup-full-width kup-full-height"},e,{ref:t=>this.textArea=t,"onkup-textfield-input":t=>{try{this.data=JSON.parse(t.detail.value)}catch(t){this.data={columns:[{name:"ERROR",title:"Error"}],rows:[{cells:{ERROR:{value:"Invalid JSON:"+t}}}]}}}})));else if(t)switch(this.display){case x.BOX:e.data=this.data,i.push(s("kup-box",Object.assign({},e)));break;case x.BUTTON_LIST:e.data=this.data,i.push(s("kup-button-list",Object.assign({},e)));break;case x.CHIP:e.data=this.data,i.push(s("kup-chip",Object.assign({},e)));break;case x.CHART:case x.ECHART:e.data=this.data,e.series=[],e.axis=null;for(let t=0;t<this.data.columns.length;t++){const i=this.data.columns[t];i.obj&&this.kupManager.objects.isNumber(i.obj)||null!==e.axis?e.series.push(this.display===x.CHART?{code:i.name,decode:i.title}:i.name):e.axis=i.name}0===e.series.length&&this.kupManager.debug.logMessage(this,"Not enough numerical columns to display a chart!",n.WARNING),e.axis||this.kupManager.debug.logMessage(this,"No axis for the chart!",n.WARNING),i.push(s(this.display===x.CHART?"kup-chart":"kup-echart",Object.assign({},e)));break;case x.DATATABLE:e.data=this.data,e.autoFillMissingCells=!0,i.push(s("kup-data-table",Object.assign({},e)));break;case x.TREE:e.data=this.data,i.push(s("kup-tree",Object.assign({class:"kup-full-width"},e)));break;default:return void this.kupManager.debug.logMessage(this,"Display mode not supported ("+this.display+")!",n.ERROR)}else i.push(s("div",{class:"empty"},s(b,{sizeY:"100px",resource:"move_to_inbox"}),s("div",{class:"empty-text"},this.kupManager.language.translate(c.DROP_YOUR_DATA))));return i}updateData(t){{const i=Object.assign({},this.data),s=t.detail.sourceElement&&t.detail.sourceElement.column?t.detail.sourceElement.column:null,e=t.detail.sourceElement&&t.detail.sourceElement.row?t.detail.sourceElement.row:null;if(s&&s.name?i.columns?this.data.columns.find((t=>t.name===s.name))||i.columns.push(s):i.columns=[s]:this.kupManager.debug.logMessage(this,"Invalid column received.",n.WARNING),e&&(i.rows?i.rows.push(e):i.rows=[e]),this.data=i,this.data&&this.textArea)try{this.textArea.setValue(JSON.stringify(this.data,null,2))}catch(t){this.textArea.setValue("Invalid JSON:"+t)}}}componentWillLoad(){this.kupManager.debug.logLoad(this,!1),this.kupManager.language.register(this),this.kupManager.theme.register(this)}componentDidLoad(){this.rootElement.addEventListener(r,(t=>this.updateData(t))),this.dragHandler=this.rootElement.shadowRoot.querySelector("#drag-handle"),this.kupManager.interact.dialogify(this.rootElement,this.dragHandler),this.kupManager.interact.dropzone(this.wrapperRef,{accept:`[${h}],[${l}]`},{dispatcher:this.rootElement,type:u.MAGICBOX}),this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1)}componentDidRender(){this.kupManager.debug.logRender(this,!0)}render(){return s(e,null,s("style",null,this.kupManager.theme.setKupStyle(this.rootElement)),s("div",{id:g},s("div",{class:"magic-box-wrapper"},s("div",{class:"actions",id:"drag-handle"},s("kup-combobox",Object.assign({},this.comboboxProps())),s("kup-button",{styling:d.FLAT,icon:"delete",label:"Reset","onkup-button-click":()=>{this.data=null}}),s("kup-button",{id:"close-dialog",customStyle:`:host{${p.PRIMARY}: var(${p.TITLE});}`,icon:"clear","onkup-button-click":()=>{this.kupManager.hideMagicBox()}})),s("div",{class:"content",ref:t=>this.wrapperRef=t},this.setContent()))))}disconnectedCallback(){this.kupManager.interact.unregister([this.rootElement,this.wrapperRef]),this.kupManager.language.unregister(this),this.kupManager.theme.unregister(this)}get rootElement(){return o(this)}};y.style=":host{background-color:var(--kup-background-color);color:var(--kup-text-color);display:block;height:300px;min-width:700px;width:700px}#kup-component,.magic-box-wrapper{height:100%;width:100%}.magic-box-wrapper{border:3px dashed var(--kup-border-color);box-sizing:border-box;display:flex;flex-direction:column}.actions{align-items:center;background-color:var(--kup-title-background-color);display:inline-flex;height:52px;justify-content:center;left:0;position:absolute;top:0;width:100%;z-index:1}.actions kup-button{margin:0.5em}.actions #comp-switcher{margin:auto 0}.actions #close-dialog{position:absolute;margin:0;top:0;right:0;background-color:var(--kup-title-background-color)}.content{box-sizing:border-box;height:100%;margin-top:52px;overflow:auto;transition:background-color 125ms ease}.empty{flex-direction:column;display:flex;text-align:center;justify-content:center;height:100%;width:100%;opacity:0.5;transition:opacity 0.25s ease-out}.empty .f-image{margin:0}.json{font-family:var(--kup-font-family-monospace);margin:0}[kup-drag-over]{background-color:rgba(var(--kup-success-color-rgb), 0.25)}";export{y as kup_magic_box}
@@ -0,0 +1,45 @@
1
+ import{_ as t,a as n,b as i}from"./p-79b0730b.js";import{a as e,b as r,e as u,c as s,M as o,m as c,d as f}from"./p-81605f08.js";
2
+ /**
3
+ * @license
4
+ * Copyright 2016 Google Inc.
5
+ *
6
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ * of this software and associated documentation files (the "Software"), to deal
8
+ * in the Software without restriction, including without limitation the rights
9
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ * copies of the Software, and to permit persons to whom the Software is
11
+ * furnished to do so, subject to the following conditions:
12
+ *
13
+ * The above copyright notice and this permission notice shall be included in
14
+ * all copies or substantial portions of the Software.
15
+ *
16
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
+ * THE SOFTWARE.
23
+ */var a={LABEL_FLOAT_ABOVE:"mdc-floating-label--float-above",LABEL_REQUIRED:"mdc-floating-label--required",LABEL_SHAKE:"mdc-floating-label--shake",ROOT:"mdc-floating-label"},h=function(i){function e(t){var r=i.call(this,n(n({},e.defaultAdapter),t))||this;return r.shakeAnimationEndHandler=function(){r.handleShakeAnimationEnd()},r}return t(e,i),Object.defineProperty(e,"cssClasses",{get:function(){return a},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},getWidth:function(){return 0},registerInteractionHandler:function(){},deregisterInteractionHandler:function(){}}},enumerable:!1,configurable:!0}),e.prototype.init=function(){this.adapter.registerInteractionHandler("animationend",this.shakeAnimationEndHandler)},e.prototype.destroy=function(){this.adapter.deregisterInteractionHandler("animationend",this.shakeAnimationEndHandler)},e.prototype.getWidth=function(){return this.adapter.getWidth()},e.prototype.shake=function(t){var n=e.cssClasses.LABEL_SHAKE;t?this.adapter.addClass(n):this.adapter.removeClass(n)},e.prototype.float=function(t){var n=e.cssClasses,i=n.LABEL_FLOAT_ABOVE,r=n.LABEL_SHAKE;t?this.adapter.addClass(i):(this.adapter.removeClass(i),this.adapter.removeClass(r))},e.prototype.setRequired=function(t){var n=e.cssClasses.LABEL_REQUIRED;t?this.adapter.addClass(n):this.adapter.removeClass(n)},e.prototype.handleShakeAnimationEnd=function(){this.adapter.removeClass(e.cssClasses.LABEL_SHAKE)},e}(e),l=function(n){function i(){return null!==n&&n.apply(this,arguments)||this}return t(i,n),i.attachTo=function(t){return new i(t)},i.prototype.shake=function(t){this.foundation.shake(t)},i.prototype.float=function(t){this.foundation.float(t)},i.prototype.setRequired=function(t){this.foundation.setRequired(t)},i.prototype.getWidth=function(){return this.foundation.getWidth()},i.prototype.getDefaultFoundation=function(){var t=this;return new h({addClass:function(n){return t.root.classList.add(n)},removeClass:function(n){return t.root.classList.remove(n)},getWidth:function(){return u(t.root)},registerInteractionHandler:function(n,i){return t.listen(n,i)},deregisterInteractionHandler:function(n,i){return t.unlisten(n,i)}})},i}(r),d={LINE_RIPPLE_ACTIVE:"mdc-line-ripple--active",LINE_RIPPLE_DEACTIVATING:"mdc-line-ripple--deactivating"},b=function(i){function e(t){var r=i.call(this,n(n({},e.defaultAdapter),t))||this;return r.transitionEndHandler=function(t){r.handleTransitionEnd(t)},r}return t(e,i),Object.defineProperty(e,"cssClasses",{get:function(){return d},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},setStyle:function(){},registerEventHandler:function(){},deregisterEventHandler:function(){}}},enumerable:!1,configurable:!0}),e.prototype.init=function(){this.adapter.registerEventHandler("transitionend",this.transitionEndHandler)},e.prototype.destroy=function(){this.adapter.deregisterEventHandler("transitionend",this.transitionEndHandler)},e.prototype.activate=function(){this.adapter.removeClass(d.LINE_RIPPLE_DEACTIVATING),this.adapter.addClass(d.LINE_RIPPLE_ACTIVE)},e.prototype.setRippleCenter=function(t){this.adapter.setStyle("transform-origin",t+"px center")},e.prototype.deactivate=function(){this.adapter.addClass(d.LINE_RIPPLE_DEACTIVATING)},e.prototype.handleTransitionEnd=function(t){var n=this.adapter.hasClass(d.LINE_RIPPLE_DEACTIVATING);"opacity"===t.propertyName&&n&&(this.adapter.removeClass(d.LINE_RIPPLE_ACTIVE),this.adapter.removeClass(d.LINE_RIPPLE_DEACTIVATING))},e}(e),g=function(n){function i(){return null!==n&&n.apply(this,arguments)||this}return t(i,n),i.attachTo=function(t){return new i(t)},i.prototype.activate=function(){this.foundation.activate()},i.prototype.deactivate=function(){this.foundation.deactivate()},i.prototype.setRippleCenter=function(t){this.foundation.setRippleCenter(t)},i.prototype.getDefaultFoundation=function(){var t=this;return new b({addClass:function(n){return t.root.classList.add(n)},removeClass:function(n){return t.root.classList.remove(n)},hasClass:function(n){return t.root.classList.contains(n)},setStyle:function(n,i){return t.root.style.setProperty(n,i)},registerEventHandler:function(n,i){return t.listen(n,i)},deregisterEventHandler:function(n,i){return t.unlisten(n,i)}})},i}(r),m={NOTCH_ELEMENT_SELECTOR:".mdc-notched-outline__notch"},v={NOTCH_ELEMENT_PADDING:8},O={NO_LABEL:"mdc-notched-outline--no-label",OUTLINE_NOTCHED:"mdc-notched-outline--notched",OUTLINE_UPGRADED:"mdc-notched-outline--upgraded"},E=function(i){function e(t){return i.call(this,n(n({},e.defaultAdapter),t))||this}return t(e,i),Object.defineProperty(e,"strings",{get:function(){return m},enumerable:!1,configurable:!0}),Object.defineProperty(e,"cssClasses",{get:function(){return O},enumerable:!1,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return v},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},setNotchWidthProperty:function(){},removeNotchWidthProperty:function(){}}},enumerable:!1,configurable:!0}),e.prototype.notch=function(t){var n=e.cssClasses.OUTLINE_NOTCHED;t>0&&(t+=v.NOTCH_ELEMENT_PADDING),this.adapter.setNotchWidthProperty(t),this.adapter.addClass(n)},e.prototype.closeNotch=function(){this.adapter.removeClass(e.cssClasses.OUTLINE_NOTCHED),this.adapter.removeNotchWidthProperty()},e}(e),I=function(n){function i(){return null!==n&&n.apply(this,arguments)||this}return t(i,n),i.attachTo=function(t){return new i(t)},i.prototype.initialSyncWithDOM=function(){this.notchElement=this.root.querySelector(m.NOTCH_ELEMENT_SELECTOR);var t=this.root.querySelector("."+h.cssClasses.ROOT);t?(t.style.transitionDuration="0s",this.root.classList.add(O.OUTLINE_UPGRADED),requestAnimationFrame((function(){t.style.transitionDuration=""}))):this.root.classList.add(O.NO_LABEL)},i.prototype.notch=function(t){this.foundation.notch(t)},i.prototype.closeNotch=function(){this.foundation.closeNotch()},i.prototype.getDefaultFoundation=function(){var t=this;return new E({addClass:function(n){return t.root.classList.add(n)},removeClass:function(n){return t.root.classList.remove(n)},setNotchWidthProperty:function(n){t.notchElement.style.setProperty("width",n+"px")},removeNotchWidthProperty:function(){t.notchElement.style.removeProperty("width")}})},i}(r),p={ROOT:"mdc-text-field-character-counter"},L={ROOT_SELECTOR:"."+p.ROOT},C=function(i){function e(t){return i.call(this,n(n({},e.defaultAdapter),t))||this}return t(e,i),Object.defineProperty(e,"cssClasses",{get:function(){return p},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return L},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{setContent:function(){}}},enumerable:!1,configurable:!0}),e.prototype.setCounterValue=function(t,n){t=Math.min(t,n),this.adapter.setContent(t+" / "+n)},e}(e),A=function(n){function i(){return null!==n&&n.apply(this,arguments)||this}return t(i,n),i.attachTo=function(t){return new i(t)},Object.defineProperty(i.prototype,"foundationForTextField",{get:function(){return this.foundation},enumerable:!1,configurable:!0}),i.prototype.getDefaultFoundation=function(){var t=this;return new C({setContent:function(n){t.root.textContent=n}})},i}(r),T={ARIA_CONTROLS:"aria-controls",ARIA_DESCRIBEDBY:"aria-describedby",INPUT_SELECTOR:".mdc-text-field__input",LABEL_SELECTOR:".mdc-floating-label",LEADING_ICON_SELECTOR:".mdc-text-field__icon--leading",LINE_RIPPLE_SELECTOR:".mdc-line-ripple",OUTLINE_SELECTOR:".mdc-notched-outline",PREFIX_SELECTOR:".mdc-text-field__affix--prefix",SUFFIX_SELECTOR:".mdc-text-field__affix--suffix",TRAILING_ICON_SELECTOR:".mdc-text-field__icon--trailing"},x={DISABLED:"mdc-text-field--disabled",FOCUSED:"mdc-text-field--focused",HELPER_LINE:"mdc-text-field-helper-line",INVALID:"mdc-text-field--invalid",LABEL_FLOATING:"mdc-text-field--label-floating",NO_LABEL:"mdc-text-field--no-label",OUTLINED:"mdc-text-field--outlined",ROOT:"mdc-text-field",TEXTAREA:"mdc-text-field--textarea",WITH_LEADING_ICON:"mdc-text-field--with-leading-icon",WITH_TRAILING_ICON:"mdc-text-field--with-trailing-icon",WITH_INTERNAL_COUNTER:"mdc-text-field--with-internal-counter"},_={LABEL_SCALE:.75},R=["pattern","min","max","required","step","minlength","maxlength"],j=["color","date","datetime-local","month","range","time","week"],w=["mousedown","touchstart"],N=["click","keydown"],H=function(e){function r(t,i){void 0===i&&(i={});var u=e.call(this,n(n({},r.defaultAdapter),t))||this;return u.isFocused=!1,u.receivedUserInput=!1,u.valid=!0,u.useNativeValidation=!0,u.validateOnValueChange=!0,u.helperText=i.helperText,u.characterCounter=i.characterCounter,u.leadingIcon=i.leadingIcon,u.trailingIcon=i.trailingIcon,u.inputFocusHandler=function(){u.activateFocus()},u.inputBlurHandler=function(){u.deactivateFocus()},u.inputInputHandler=function(){u.handleInput()},u.setPointerXOffset=function(t){u.setTransformOrigin(t)},u.textFieldInteractionHandler=function(){u.handleTextFieldInteraction()},u.validationAttributeChangeHandler=function(t){u.handleValidationAttributeChange(t)},u}return t(r,e),Object.defineProperty(r,"cssClasses",{get:function(){return x},enumerable:!1,configurable:!0}),Object.defineProperty(r,"strings",{get:function(){return T},enumerable:!1,configurable:!0}),Object.defineProperty(r,"numbers",{get:function(){return _},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"shouldAlwaysFloat",{get:function(){var t=this.getNativeInput().type;return j.indexOf(t)>=0},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"shouldFloat",{get:function(){return this.shouldAlwaysFloat||this.isFocused||!!this.getValue()||this.isBadInput()},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"shouldShake",{get:function(){return!this.isFocused&&!this.isValid()&&!!this.getValue()},enumerable:!1,configurable:!0}),Object.defineProperty(r,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!0},setInputAttr:function(){},removeInputAttr:function(){},registerTextFieldInteractionHandler:function(){},deregisterTextFieldInteractionHandler:function(){},registerInputInteractionHandler:function(){},deregisterInputInteractionHandler:function(){},registerValidationAttributeChangeHandler:function(){return new MutationObserver((function(){}))},deregisterValidationAttributeChangeHandler:function(){},getNativeInput:function(){return null},isFocused:function(){return!1},activateLineRipple:function(){},deactivateLineRipple:function(){},setLineRippleTransformOrigin:function(){},shakeLabel:function(){},floatLabel:function(){},setLabelRequired:function(){},hasLabel:function(){return!1},getLabelWidth:function(){return 0},hasOutline:function(){return!1},notchOutline:function(){},closeOutline:function(){}}},enumerable:!1,configurable:!0}),r.prototype.init=function(){var t,n,e,r;this.adapter.hasLabel()&&this.getNativeInput().required&&this.adapter.setLabelRequired(!0),this.adapter.isFocused()?this.inputFocusHandler():this.adapter.hasLabel()&&this.shouldFloat&&(this.notchOutline(!0),this.adapter.floatLabel(!0),this.styleFloating(!0)),this.adapter.registerInputInteractionHandler("focus",this.inputFocusHandler),this.adapter.registerInputInteractionHandler("blur",this.inputBlurHandler),this.adapter.registerInputInteractionHandler("input",this.inputInputHandler);try{for(var u=i(w),s=u.next();!s.done;s=u.next())this.adapter.registerInputInteractionHandler(s.value,this.setPointerXOffset)}catch(n){t={error:n}}finally{try{s&&!s.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}try{for(var o=i(N),c=o.next();!c.done;c=o.next())this.adapter.registerTextFieldInteractionHandler(c.value,this.textFieldInteractionHandler)}catch(t){e={error:t}}finally{try{c&&!c.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}this.validationObserver=this.adapter.registerValidationAttributeChangeHandler(this.validationAttributeChangeHandler),this.setcharacterCounter(this.getValue().length)},r.prototype.destroy=function(){var t,n,e,r;this.adapter.deregisterInputInteractionHandler("focus",this.inputFocusHandler),this.adapter.deregisterInputInteractionHandler("blur",this.inputBlurHandler),this.adapter.deregisterInputInteractionHandler("input",this.inputInputHandler);try{for(var u=i(w),s=u.next();!s.done;s=u.next())this.adapter.deregisterInputInteractionHandler(s.value,this.setPointerXOffset)}catch(n){t={error:n}}finally{try{s&&!s.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}try{for(var o=i(N),c=o.next();!c.done;c=o.next())this.adapter.deregisterTextFieldInteractionHandler(c.value,this.textFieldInteractionHandler)}catch(t){e={error:t}}finally{try{c&&!c.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}this.adapter.deregisterValidationAttributeChangeHandler(this.validationObserver)},r.prototype.handleTextFieldInteraction=function(){var t=this.adapter.getNativeInput();t&&t.disabled||(this.receivedUserInput=!0)},r.prototype.handleValidationAttributeChange=function(t){var n=this;t.some((function(t){return R.indexOf(t)>-1&&(n.styleValidity(!0),n.adapter.setLabelRequired(n.getNativeInput().required),!0)})),t.indexOf("maxlength")>-1&&this.setcharacterCounter(this.getValue().length)},r.prototype.notchOutline=function(t){if(this.adapter.hasOutline()&&this.adapter.hasLabel())if(t){var n=this.adapter.getLabelWidth()*_.LABEL_SCALE;this.adapter.notchOutline(n)}else this.adapter.closeOutline()},r.prototype.activateFocus=function(){this.isFocused=!0,this.styleFocused(this.isFocused),this.adapter.activateLineRipple(),this.adapter.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter.floatLabel(this.shouldFloat),this.styleFloating(this.shouldFloat),this.adapter.shakeLabel(this.shouldShake)),!this.helperText||!this.helperText.isPersistent()&&this.helperText.isValidation()&&this.valid||this.helperText.showToScreenReader()},r.prototype.setTransformOrigin=function(t){if(!this.isDisabled()&&!this.adapter.hasOutline()){var n=t.touches,i=n?n[0]:t,e=i.target.getBoundingClientRect();this.adapter.setLineRippleTransformOrigin(i.clientX-e.left)}},r.prototype.handleInput=function(){this.autoCompleteFocus(),this.setcharacterCounter(this.getValue().length)},r.prototype.autoCompleteFocus=function(){this.receivedUserInput||this.activateFocus()},r.prototype.deactivateFocus=function(){this.isFocused=!1,this.adapter.deactivateLineRipple();var t=this.isValid();this.styleValidity(t),this.styleFocused(this.isFocused),this.adapter.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter.floatLabel(this.shouldFloat),this.styleFloating(this.shouldFloat),this.adapter.shakeLabel(this.shouldShake)),this.shouldFloat||(this.receivedUserInput=!1)},r.prototype.getValue=function(){return this.getNativeInput().value},r.prototype.setValue=function(t){if(this.getValue()!==t&&(this.getNativeInput().value=t),this.setcharacterCounter(t.length),this.validateOnValueChange){var n=this.isValid();this.styleValidity(n)}this.adapter.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter.floatLabel(this.shouldFloat),this.styleFloating(this.shouldFloat),this.validateOnValueChange&&this.adapter.shakeLabel(this.shouldShake))},r.prototype.isValid=function(){return this.useNativeValidation?this.isNativeInputValid():this.valid},r.prototype.setValid=function(t){this.valid=t,this.styleValidity(t);var n=!t&&!this.isFocused&&!!this.getValue();this.adapter.hasLabel()&&this.adapter.shakeLabel(n)},r.prototype.setValidateOnValueChange=function(t){this.validateOnValueChange=t},r.prototype.getValidateOnValueChange=function(){return this.validateOnValueChange},r.prototype.setUseNativeValidation=function(t){this.useNativeValidation=t},r.prototype.isDisabled=function(){return this.getNativeInput().disabled},r.prototype.setDisabled=function(t){this.getNativeInput().disabled=t,this.styleDisabled(t)},r.prototype.setHelperTextContent=function(t){this.helperText&&this.helperText.setContent(t)},r.prototype.setLeadingIconAriaLabel=function(t){this.leadingIcon&&this.leadingIcon.setAriaLabel(t)},r.prototype.setLeadingIconContent=function(t){this.leadingIcon&&this.leadingIcon.setContent(t)},r.prototype.setTrailingIconAriaLabel=function(t){this.trailingIcon&&this.trailingIcon.setAriaLabel(t)},r.prototype.setTrailingIconContent=function(t){this.trailingIcon&&this.trailingIcon.setContent(t)},r.prototype.setcharacterCounter=function(t){if(this.characterCounter){var n=this.getNativeInput().maxLength;if(-1===n)throw new Error("MDCTextFieldFoundation: Expected maxlength html property on text input or textarea.");this.characterCounter.setCounterValue(t,n)}},r.prototype.isBadInput=function(){return this.getNativeInput().validity.badInput||!1},r.prototype.isNativeInputValid=function(){return this.getNativeInput().validity.valid},r.prototype.styleValidity=function(t){var n=r.cssClasses.INVALID;if(t?this.adapter.removeClass(n):this.adapter.addClass(n),this.helperText){if(this.helperText.setValidity(t),!this.helperText.isValidation())return;var i=this.helperText.isVisible(),e=this.helperText.getId();i&&e?this.adapter.setInputAttr(T.ARIA_DESCRIBEDBY,e):this.adapter.removeInputAttr(T.ARIA_DESCRIBEDBY)}},r.prototype.styleFocused=function(t){var n=r.cssClasses.FOCUSED;t?this.adapter.addClass(n):this.adapter.removeClass(n)},r.prototype.styleDisabled=function(t){var n=r.cssClasses,i=n.DISABLED,e=n.INVALID;t?(this.adapter.addClass(i),this.adapter.removeClass(e)):this.adapter.removeClass(i),this.leadingIcon&&this.leadingIcon.setDisabled(t),this.trailingIcon&&this.trailingIcon.setDisabled(t)},r.prototype.styleFloating=function(t){var n=r.cssClasses.LABEL_FLOATING;t?this.adapter.addClass(n):this.adapter.removeClass(n)},r.prototype.getNativeInput=function(){return(this.adapter?this.adapter.getNativeInput():null)||{disabled:!1,maxLength:-1,required:!1,type:"input",validity:{badInput:!1,valid:!0},value:""}},r}(e),y={HELPER_TEXT_PERSISTENT:"mdc-text-field-helper-text--persistent",HELPER_TEXT_VALIDATION_MSG:"mdc-text-field-helper-text--validation-msg",ROOT:"mdc-text-field-helper-text"},F={ARIA_HIDDEN:"aria-hidden",ROLE:"role",ROOT_SELECTOR:"."+y.ROOT},S=function(i){function e(t){return i.call(this,n(n({},e.defaultAdapter),t))||this}return t(e,i),Object.defineProperty(e,"cssClasses",{get:function(){return y},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return F},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},getAttr:function(){return null},setAttr:function(){},removeAttr:function(){},setContent:function(){}}},enumerable:!1,configurable:!0}),e.prototype.getId=function(){return this.adapter.getAttr("id")},e.prototype.isVisible=function(){return"true"!==this.adapter.getAttr(F.ARIA_HIDDEN)},e.prototype.setContent=function(t){this.adapter.setContent(t)},e.prototype.isPersistent=function(){return this.adapter.hasClass(y.HELPER_TEXT_PERSISTENT)},e.prototype.setPersistent=function(t){t?this.adapter.addClass(y.HELPER_TEXT_PERSISTENT):this.adapter.removeClass(y.HELPER_TEXT_PERSISTENT)},e.prototype.isValidation=function(){return this.adapter.hasClass(y.HELPER_TEXT_VALIDATION_MSG)},e.prototype.setValidation=function(t){t?this.adapter.addClass(y.HELPER_TEXT_VALIDATION_MSG):this.adapter.removeClass(y.HELPER_TEXT_VALIDATION_MSG)},e.prototype.showToScreenReader=function(){this.adapter.removeAttr(F.ARIA_HIDDEN)},e.prototype.setValidity=function(t){var n=this.adapter.hasClass(y.HELPER_TEXT_PERSISTENT),i=this.adapter.hasClass(y.HELPER_TEXT_VALIDATION_MSG)&&!t;i?(this.showToScreenReader(),"alert"===this.adapter.getAttr(F.ROLE)?this.refreshAlertRole():this.adapter.setAttr(F.ROLE,"alert")):this.adapter.removeAttr(F.ROLE),n||i||this.hide()},e.prototype.hide=function(){this.adapter.setAttr(F.ARIA_HIDDEN,"true")},e.prototype.refreshAlertRole=function(){var t=this;this.adapter.removeAttr(F.ROLE),requestAnimationFrame((function(){t.adapter.setAttr(F.ROLE,"alert")}))},e}(e),D=function(n){function i(){return null!==n&&n.apply(this,arguments)||this}return t(i,n),i.attachTo=function(t){return new i(t)},Object.defineProperty(i.prototype,"foundationForTextField",{get:function(){return this.foundation},enumerable:!1,configurable:!0}),i.prototype.getDefaultFoundation=function(){var t=this;return new S({addClass:function(n){return t.root.classList.add(n)},removeClass:function(n){return t.root.classList.remove(n)},hasClass:function(n){return t.root.classList.contains(n)},getAttr:function(n){return t.root.getAttribute(n)},setAttr:function(n,i){return t.root.setAttribute(n,i)},removeAttr:function(n){return t.root.removeAttribute(n)},setContent:function(n){t.root.textContent=n}})},i}(r),P={ICON_EVENT:"MDCTextField:icon",ICON_ROLE:"button"},B={ROOT:"mdc-text-field__icon"},k=["click","keydown"],V=function(e){function r(t){var i=e.call(this,n(n({},r.defaultAdapter),t))||this;return i.savedTabIndex=null,i.interactionHandler=function(t){i.handleInteraction(t)},i}return t(r,e),Object.defineProperty(r,"strings",{get:function(){return P},enumerable:!1,configurable:!0}),Object.defineProperty(r,"cssClasses",{get:function(){return B},enumerable:!1,configurable:!0}),Object.defineProperty(r,"defaultAdapter",{get:function(){return{getAttr:function(){return null},setAttr:function(){},removeAttr:function(){},setContent:function(){},registerInteractionHandler:function(){},deregisterInteractionHandler:function(){},notifyIconAction:function(){}}},enumerable:!1,configurable:!0}),r.prototype.init=function(){var t,n;this.savedTabIndex=this.adapter.getAttr("tabindex");try{for(var e=i(k),r=e.next();!r.done;r=e.next())this.adapter.registerInteractionHandler(r.value,this.interactionHandler)}catch(n){t={error:n}}finally{try{r&&!r.done&&(n=e.return)&&n.call(e)}finally{if(t)throw t.error}}},r.prototype.destroy=function(){var t,n;try{for(var e=i(k),r=e.next();!r.done;r=e.next())this.adapter.deregisterInteractionHandler(r.value,this.interactionHandler)}catch(n){t={error:n}}finally{try{r&&!r.done&&(n=e.return)&&n.call(e)}finally{if(t)throw t.error}}},r.prototype.setDisabled=function(t){this.savedTabIndex&&(t?(this.adapter.setAttr("tabindex","-1"),this.adapter.removeAttr("role")):(this.adapter.setAttr("tabindex",this.savedTabIndex),this.adapter.setAttr("role",P.ICON_ROLE)))},r.prototype.setAriaLabel=function(t){this.adapter.setAttr("aria-label",t)},r.prototype.setContent=function(t){this.adapter.setContent(t)},r.prototype.handleInteraction=function(t){("click"===t.type||"Enter"===t.key||13===t.keyCode)&&(t.preventDefault(),this.adapter.notifyIconAction())},r}(e),W=function(n){function i(){return null!==n&&n.apply(this,arguments)||this}return t(i,n),i.attachTo=function(t){return new i(t)},Object.defineProperty(i.prototype,"foundationForTextField",{get:function(){return this.foundation},enumerable:!1,configurable:!0}),i.prototype.getDefaultFoundation=function(){var t=this;return new V({getAttr:function(n){return t.root.getAttribute(n)},setAttr:function(n,i){return t.root.setAttribute(n,i)},removeAttr:function(n){return t.root.removeAttribute(n)},setContent:function(n){t.root.textContent=n},registerInteractionHandler:function(n,i){return t.listen(n,i)},deregisterInteractionHandler:function(n,i){return t.unlisten(n,i)},notifyIconAction:function(){return t.emit(V.strings.ICON_EVENT,{},!0)}})},i}(r),U=function(i){function e(){return null!==i&&i.apply(this,arguments)||this}return t(e,i),e.attachTo=function(t){return new e(t)},e.prototype.initialize=function(t,n,i,e,r,u,s){void 0===t&&(t=function(t,n){return new o(t,n)}),void 0===n&&(n=function(t){return new g(t)}),void 0===i&&(i=function(t){return new D(t)}),void 0===e&&(e=function(t){return new A(t)}),void 0===r&&(r=function(t){return new W(t)}),void 0===u&&(u=function(t){return new l(t)}),void 0===s&&(s=function(t){return new I(t)}),this.input=this.root.querySelector(T.INPUT_SELECTOR);var c=this.root.querySelector(T.LABEL_SELECTOR);this.label=c?u(c):null;var f=this.root.querySelector(T.LINE_RIPPLE_SELECTOR);this.lineRipple=f?n(f):null;var a=this.root.querySelector(T.OUTLINE_SELECTOR);this.outline=a?s(a):null;var h=S.strings,d=this.root.nextElementSibling,b=d&&d.classList.contains(x.HELPER_LINE),m=b&&d&&d.querySelector(h.ROOT_SELECTOR);this.helperText=m?i(m):null;var v=C.strings,O=this.root.querySelector(v.ROOT_SELECTOR);!O&&b&&d&&(O=d.querySelector(v.ROOT_SELECTOR)),this.characterCounter=O?e(O):null;var E=this.root.querySelector(T.LEADING_ICON_SELECTOR);this.leadingIcon=E?r(E):null;var p=this.root.querySelector(T.TRAILING_ICON_SELECTOR);this.trailingIcon=p?r(p):null,this.prefix=this.root.querySelector(T.PREFIX_SELECTOR),this.suffix=this.root.querySelector(T.SUFFIX_SELECTOR),this.ripple=this.createRipple(t)},e.prototype.destroy=function(){this.ripple&&this.ripple.destroy(),this.lineRipple&&this.lineRipple.destroy(),this.helperText&&this.helperText.destroy(),this.characterCounter&&this.characterCounter.destroy(),this.leadingIcon&&this.leadingIcon.destroy(),this.trailingIcon&&this.trailingIcon.destroy(),this.label&&this.label.destroy(),this.outline&&this.outline.destroy(),i.prototype.destroy.call(this)},e.prototype.initialSyncWithDOM=function(){this.disabled=this.input.disabled},Object.defineProperty(e.prototype,"value",{get:function(){return this.foundation.getValue()},set:function(t){this.foundation.setValue(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{get:function(){return this.foundation.isDisabled()},set:function(t){this.foundation.setDisabled(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"valid",{get:function(){return this.foundation.isValid()},set:function(t){this.foundation.setValid(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"required",{get:function(){return this.input.required},set:function(t){this.input.required=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pattern",{get:function(){return this.input.pattern},set:function(t){this.input.pattern=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"minLength",{get:function(){return this.input.minLength},set:function(t){this.input.minLength=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxLength",{get:function(){return this.input.maxLength},set:function(t){t<0?this.input.removeAttribute("maxLength"):this.input.maxLength=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"min",{get:function(){return this.input.min},set:function(t){this.input.min=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"max",{get:function(){return this.input.max},set:function(t){this.input.max=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"step",{get:function(){return this.input.step},set:function(t){this.input.step=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"helperTextContent",{set:function(t){this.foundation.setHelperTextContent(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"leadingIconAriaLabel",{set:function(t){this.foundation.setLeadingIconAriaLabel(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"leadingIconContent",{set:function(t){this.foundation.setLeadingIconContent(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"trailingIconAriaLabel",{set:function(t){this.foundation.setTrailingIconAriaLabel(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"trailingIconContent",{set:function(t){this.foundation.setTrailingIconContent(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"useNativeValidation",{set:function(t){this.foundation.setUseNativeValidation(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"prefixText",{get:function(){return this.prefix?this.prefix.textContent:null},set:function(t){this.prefix&&(this.prefix.textContent=t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"suffixText",{get:function(){return this.suffix?this.suffix.textContent:null},set:function(t){this.suffix&&(this.suffix.textContent=t)},enumerable:!1,configurable:!0}),e.prototype.focus=function(){this.input.focus()},e.prototype.layout=function(){this.foundation.notchOutline(this.foundation.shouldFloat)},e.prototype.getDefaultFoundation=function(){var t=n(n(n(n(n({},this.getRootAdapterMethods()),this.getInputAdapterMethods()),this.getLabelAdapterMethods()),this.getLineRippleAdapterMethods()),this.getOutlineAdapterMethods());return new H(t,this.getFoundationMap())},e.prototype.getRootAdapterMethods=function(){var t=this;return{addClass:function(n){return t.root.classList.add(n)},removeClass:function(n){return t.root.classList.remove(n)},hasClass:function(n){return t.root.classList.contains(n)},registerTextFieldInteractionHandler:function(n,i){t.listen(n,i)},deregisterTextFieldInteractionHandler:function(n,i){t.unlisten(n,i)},registerValidationAttributeChangeHandler:function(n){var i=new MutationObserver((function(t){return n(function(t){return t.map((function(t){return t.attributeName})).filter((function(t){return t}))}(t))}));return i.observe(t.input,{attributes:!0}),i},deregisterValidationAttributeChangeHandler:function(t){t.disconnect()}}},e.prototype.getInputAdapterMethods=function(){var t=this;return{getNativeInput:function(){return t.input},setInputAttr:function(n,i){t.input.setAttribute(n,i)},removeInputAttr:function(n){t.input.removeAttribute(n)},isFocused:function(){return document.activeElement===t.input},registerInputInteractionHandler:function(n,i){t.input.addEventListener(n,i,s())},deregisterInputInteractionHandler:function(n,i){t.input.removeEventListener(n,i,s())}}},e.prototype.getLabelAdapterMethods=function(){var t=this;return{floatLabel:function(n){t.label&&t.label.float(n)},getLabelWidth:function(){return t.label?t.label.getWidth():0},hasLabel:function(){return Boolean(t.label)},shakeLabel:function(n){t.label&&t.label.shake(n)},setLabelRequired:function(n){t.label&&t.label.setRequired(n)}}},e.prototype.getLineRippleAdapterMethods=function(){var t=this;return{activateLineRipple:function(){t.lineRipple&&t.lineRipple.activate()},deactivateLineRipple:function(){t.lineRipple&&t.lineRipple.deactivate()},setLineRippleTransformOrigin:function(n){t.lineRipple&&t.lineRipple.setRippleCenter(n)}}},e.prototype.getOutlineAdapterMethods=function(){var t=this;return{closeOutline:function(){t.outline&&t.outline.closeNotch()},hasOutline:function(){return Boolean(t.outline)},notchOutline:function(n){t.outline&&t.outline.notch(n)}}},e.prototype.getFoundationMap=function(){return{characterCounter:this.characterCounter?this.characterCounter.foundationForTextField:void 0,helperText:this.helperText?this.helperText.foundationForTextField:void 0,leadingIcon:this.leadingIcon?this.leadingIcon.foundationForTextField:void 0,trailingIcon:this.trailingIcon?this.trailingIcon.foundationForTextField:void 0}},e.prototype.createRipple=function(t){var i=this,e=this.root.classList.contains(x.TEXTAREA),r=this.root.classList.contains(x.OUTLINED);if(e||r)return null;var u=n(n({},o.createAdapter(this)),{isSurfaceActive:function(){return c(i.input,":active")},registerInteractionHandler:function(t,n){i.input.addEventListener(t,n,s())},deregisterInteractionHandler:function(t,n){i.input.removeEventListener(t,n,s())}});return t(this.root,new f(u))},e}(r),q={ROOT:"mdc-form-field"},G={LABEL_SELECTOR:".mdc-form-field > label"},M=function(i){function e(t){var r=i.call(this,n(n({},e.defaultAdapter),t))||this;return r.click=function(){r.handleClick()},r}return t(e,i),Object.defineProperty(e,"cssClasses",{get:function(){return q},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return G},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{activateInputRipple:function(){},deactivateInputRipple:function(){},deregisterInteractionHandler:function(){},registerInteractionHandler:function(){}}},enumerable:!1,configurable:!0}),e.prototype.init=function(){this.adapter.registerInteractionHandler("click",this.click)},e.prototype.destroy=function(){this.adapter.deregisterInteractionHandler("click",this.click)},e.prototype.handleClick=function(){var t=this;this.adapter.activateInputRipple(),requestAnimationFrame((function(){t.adapter.deactivateInputRipple()}))},e}(e),X=function(n){function i(){return null!==n&&n.apply(this,arguments)||this}return t(i,n),i.attachTo=function(t){return new i(t)},i.prototype.labelEl=function(){return this.root.querySelector(M.strings.LABEL_SELECTOR)},i.prototype.getDefaultFoundation=function(){var t=this;return new M({activateInputRipple:function(){t.input&&t.input.ripple&&t.input.ripple.activate()},deactivateInputRipple:function(){t.input&&t.input.ripple&&t.input.ripple.deactivate()},deregisterInteractionHandler:function(n,i){var e=t.labelEl();e&&e.removeEventListener(n,i)},registerInteractionHandler:function(n,i){var e=t.labelEl();e&&e.addEventListener(n,i)}})},i}(r);
24
+ /**
25
+ * @license
26
+ * Copyright 2016 Google Inc.
27
+ *
28
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
29
+ * of this software and associated documentation files (the "Software"), to deal
30
+ * in the Software without restriction, including without limitation the rights
31
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
32
+ * copies of the Software, and to permit persons to whom the Software is
33
+ * furnished to do so, subject to the following conditions:
34
+ *
35
+ * The above copyright notice and this permission notice shall be included in
36
+ * all copies or substantial portions of the Software.
37
+ *
38
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
39
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
40
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
41
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
42
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
43
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
44
+ * THE SOFTWARE.
45
+ */function K(t){const n=new U(t.querySelector(".mdc-text-field")),i=t.querySelector(".mdc-form-field"),e=t.querySelector(".mdc-text-field-helper-text"),r=t.querySelector(".mdc-text-field-character-counter"),u=t.querySelector(".mdc-text-field-icon");if(i){const t=X.attachTo(i);t&&(t.input=n)}e&&new D(e),r&&new A(r),u&&new W(u)}export{K as F}
@@ -1 +1 @@
1
- import{r,c as a,f as o,h as t,H as n,g as i}from"./p-8be1337b.js";import{k as s}from"./p-ee33cbe9.js";import{g as p,s as e}from"./p-10c8d755.js";import{c as b}from"./p-97e8ea42.js";var v,l;!function(r){r.customStyle="Custom style of the component.",r.image="Image displayed by the nav bar, uses the kup-image component's props.",r.label="Text displayed by the nav bar.",r.showMenuButton="When true, the menu button will be displayed on the left of the nav bar.",r.styling="Defines the style of the nav bar"}(v||(v={})),function(r){r.SHORT="short",r.STANDARD="standard"}(l||(l={}));const u=class{constructor(o){r(this,o),this.kupNavbarReady=a(this,"kup-navbar-ready",6),this.kupNavbarResize=a(this,"kup-navbar-resize",6),this.customStyle="",this.styling=l.STANDARD,this.kupManager=s()}async getProps(r){return p(this,v,r)}async refresh(){o(this)}async resizeCallback(){window.clearTimeout(this.resizeTimeout),this.resizeTimeout=window.setTimeout((()=>{this.kupNavbarResize.emit({comp:this,id:this.rootElement.id})}),300)}async setProps(r){e(this,v,r)}content(){const r=Array.prototype.slice.call(this.rootElement.children,0),a=[],o=[];for(let n=0;n<r.length;n++)"left"===r[n].slot?a.push(t("slot",{name:"left"})):o.push(t("slot",{name:"right"}));return[a.length?t("section",{class:"nav-bar__section nav-bar__section--align-start"},a):null,o.length?t("section",{class:"nav-bar__section nav-bar__section--align-end",role:"toolbar"},o):null]}componentWillLoad(){this.kupManager.debug.logLoad(this,!1),this.kupManager.language.register(this),this.kupManager.theme.register(this)}componentDidLoad(){this.kupNavbarReady.emit({comp:this,id:this.rootElement.id}),this.kupManager.resize.observe(this.rootElement),this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1)}componentDidRender(){this.kupManager.debug.logRender(this,!0)}render(){return t(n,{class:"header"},t("style",null,this.kupManager.theme.setKupStyle(this.rootElement)),t("div",{id:b},t("header",{class:`nav-bar nav-bar--${this.styling.toLowerCase()} `},t("div",{class:"nav-bar__row"},this.content()))))}disconnectedCallback(){this.kupManager.language.unregister(this),this.kupManager.resize.unobserve(this.rootElement),this.kupManager.theme.unregister(this)}get rootElement(){return i(this)}};u.style=":host{--kup_navbar_box_shadow:var(\n --kup-navbar-box-shadow,\n 0 2px 4px -1px rgba(128, 128, 128, 0.2),\n 0 4px 5px 0 rgba(128, 128, 128, 0.14),\n 0 1px 10px 0 rgba(128, 128, 128, 0.12)\n );--kup_navbar_padding:var(--kup-navbar-padding, 8px 12px);--kup_navbar_position:var(--kup-navbar-position, fixed);--kup_navbar_short_border_radius:var(\n --kup-navbar-short-border-radius,\n 0px 0px 24px\n );--kup_navbar_short_box_shadow:var(\n --kup-navbar-short-box-shadow,\n rgba(128, 128, 128, 0.2) 0px 2px 4px -1px,\n rgba(128, 128, 128, 0.14) 0px 4px 5px 0px,\n rgba(128, 128, 128, 0.12) 0px 1px 10px 0px\n );--kup_navbar_short_width:var(--kup-navbar-short-width, 9em);--kup_navbar_transition:var(--kup-navbar-transition, 250ms);--kup_navbar_width:var(--kup-navbar-width, 100%);box-sizing:border-box;font-size:var(--kup-font-size);left:0;position:var(--kup_navbar_position);top:0;transition:all var(--kup_navbar_transition);width:var(--kup_navbar_width);z-index:var(--kup-navbar-zindex)}#kup-component{width:var(--kup_navbar_width)}.nav-bar{background-color:var(--kup-navbar-background-color);box-shadow:var(--kup_navbar_box_shadow);box-sizing:border-box;color:var(--kup-navbar-color);display:flex;flex-direction:column;justify-content:space-between;width:var(--kup_navbar_width)}.nav-bar--short{border-radius:var(--kup_navbar_short_border_radius);box-shadow:var(--kup_navbar_short_box_shadow);width:var(--kup_navbar_short_width)}.nav-bar--short .nav-bar__section{padding:0 0.5em}.nav-bar--short section{overflow:hidden}.nav-bar ::slotted(*){--kup-button-primary-color:var(--kup-navbar-color);--kup-button-primary-color-rgb:var(--kup-navbar-color-rgb);--kup-button-primary-color-h:var(--kup-navbar-color-h);--kup-button-primary-color-s:var(--kup-navbar-color-s);--kup-button-primary-color-l:var(--kup-navbar-color-l);--kup-switch-label-color:var(--kup-navbar-color);--kup-switch-primary-color:var(--kup-navbar-color);--kup-switch-primary-color-rgb:var(--kup-navbar-color-rgb);--kup-textfield-color:var(--kup-navbar-color);--kup-textfield-color-rgb:var(--kup-navbar-color-rgb);--kup-tree-color:var(--kup-navbar-color);--kup-tree-color-rgb:var(--kup-navbar-color-rgb);color:var(--kup-navbar-color);fill:var(--kup-navbar-color);margin:0}.nav-bar__row{box-sizing:border-box;display:flex;height:var(--kup-navbar-height);position:relative;width:var(--kup_navbar_width)}.nav-bar__section{align-items:center;display:inline-flex;flex:1 1 auto;min-width:0;padding:var(--kup_navbar_padding)}.nav-bar__section--align-start{flex-shrink:5;justify-content:flex-start;order:-1}.nav-bar__section--align-end{justify-content:flex-end;order:1;overflow:hidden}::slotted(*){--kup-button-primary-color:var(--kup-navbar-color);--kup-button-primary-color-rgb:var(--kup-navbar-color-rgb);--kup-button-primary-color-h:var(--kup-navbar-color-h);--kup-button-primary-color-s:var(--kup-navbar-color-s);--kup-button-primary-color-l:var(--kup-navbar-color-l);--kup-switch-label-color:var(--kup-navbar-color);--kup-switch-primary-color:var(--kup-navbar-color);--kup-switch-primary-color-rgb:var(--kup-navbar-color-rgb);--kup-textfield-color:var(--kup-navbar-color);--kup-textfield-color-rgb:var(--kup-navbar-color-rgb);--kup-textfield-primary-color:var(--kup-navbar-color);--kup-textfield-primary-color-rgb:var(--kup-navbar-color-rgb);--kup-tree-color:var(--kup-navbar-color);--kup-tree-color-rgb:var(--kup-navbar-color-rgb);color:var(--kup-navbar-color);fill:var(--kup-navbar-color);margin:0}";export{u as kup_nav_bar}
1
+ import{r,c as a,f as o,h as t,H as n,g as i}from"./p-34b74425.js";import{k as s}from"./p-aca0e54b.js";import{g as p,s as e}from"./p-e0035c58.js";import{c as b}from"./p-97e8ea42.js";var v,l;!function(r){r.customStyle="Custom style of the component.",r.image="Image displayed by the nav bar, uses the kup-image component's props.",r.label="Text displayed by the nav bar.",r.showMenuButton="When true, the menu button will be displayed on the left of the nav bar.",r.styling="Defines the style of the nav bar"}(v||(v={})),function(r){r.SHORT="short",r.STANDARD="standard"}(l||(l={}));const u=class{constructor(o){r(this,o),this.kupNavbarReady=a(this,"kup-navbar-ready",6),this.kupNavbarResize=a(this,"kup-navbar-resize",6),this.customStyle="",this.styling=l.STANDARD,this.kupManager=s()}async getProps(r){return p(this,v,r)}async refresh(){o(this)}async resizeCallback(){window.clearTimeout(this.resizeTimeout),this.resizeTimeout=window.setTimeout((()=>{this.kupNavbarResize.emit({comp:this,id:this.rootElement.id})}),300)}async setProps(r){e(this,v,r)}content(){const r=Array.prototype.slice.call(this.rootElement.children,0),a=[],o=[];for(let n=0;n<r.length;n++)"left"===r[n].slot?a.push(t("slot",{name:"left"})):o.push(t("slot",{name:"right"}));return[a.length?t("section",{class:"nav-bar__section nav-bar__section--align-start"},a):null,o.length?t("section",{class:"nav-bar__section nav-bar__section--align-end",role:"toolbar"},o):null]}componentWillLoad(){this.kupManager.debug.logLoad(this,!1),this.kupManager.language.register(this),this.kupManager.theme.register(this)}componentDidLoad(){this.kupNavbarReady.emit({comp:this,id:this.rootElement.id}),this.kupManager.resize.observe(this.rootElement),this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1)}componentDidRender(){this.kupManager.debug.logRender(this,!0)}render(){return t(n,{class:"header"},t("style",null,this.kupManager.theme.setKupStyle(this.rootElement)),t("div",{id:b},t("header",{class:`nav-bar nav-bar--${this.styling.toLowerCase()} `},t("div",{class:"nav-bar__row"},this.content()))))}disconnectedCallback(){this.kupManager.language.unregister(this),this.kupManager.resize.unobserve(this.rootElement),this.kupManager.theme.unregister(this)}get rootElement(){return i(this)}};u.style=":host{--kup_navbar_box_shadow:var(\n --kup-navbar-box-shadow,\n 0 2px 4px -1px rgba(128, 128, 128, 0.2),\n 0 4px 5px 0 rgba(128, 128, 128, 0.14),\n 0 1px 10px 0 rgba(128, 128, 128, 0.12)\n );--kup_navbar_padding:var(--kup-navbar-padding, 8px 12px);--kup_navbar_position:var(--kup-navbar-position, fixed);--kup_navbar_short_border_radius:var(\n --kup-navbar-short-border-radius,\n 0px 0px 24px\n );--kup_navbar_short_box_shadow:var(\n --kup-navbar-short-box-shadow,\n rgba(128, 128, 128, 0.2) 0px 2px 4px -1px,\n rgba(128, 128, 128, 0.14) 0px 4px 5px 0px,\n rgba(128, 128, 128, 0.12) 0px 1px 10px 0px\n );--kup_navbar_short_width:var(--kup-navbar-short-width, 9em);--kup_navbar_transition:var(--kup-navbar-transition, 250ms);--kup_navbar_width:var(--kup-navbar-width, 100%);box-sizing:border-box;font-size:var(--kup-font-size);left:0;position:var(--kup_navbar_position);top:0;transition:all var(--kup_navbar_transition);width:var(--kup_navbar_width);z-index:var(--kup-navbar-zindex)}#kup-component{width:var(--kup_navbar_width)}.nav-bar{background-color:var(--kup-navbar-background-color);box-shadow:var(--kup_navbar_box_shadow);box-sizing:border-box;color:var(--kup-navbar-color);display:flex;flex-direction:column;justify-content:space-between;width:var(--kup_navbar_width)}.nav-bar--short{border-radius:var(--kup_navbar_short_border_radius);box-shadow:var(--kup_navbar_short_box_shadow);width:var(--kup_navbar_short_width)}.nav-bar--short .nav-bar__section{padding:0 0.5em}.nav-bar--short section{overflow:hidden}.nav-bar ::slotted(*){--kup-button-primary-color:var(--kup-navbar-color);--kup-button-primary-color-rgb:var(--kup-navbar-color-rgb);--kup-button-primary-color-h:var(--kup-navbar-color-h);--kup-button-primary-color-s:var(--kup-navbar-color-s);--kup-button-primary-color-l:var(--kup-navbar-color-l);--kup-switch-label-color:var(--kup-navbar-color);--kup-switch-primary-color:var(--kup-navbar-color);--kup-switch-primary-color-rgb:var(--kup-navbar-color-rgb);--kup-textfield-color:var(--kup-navbar-color);--kup-textfield-color-rgb:var(--kup-navbar-color-rgb);--kup-tree-color:var(--kup-navbar-color);--kup-tree-color-rgb:var(--kup-navbar-color-rgb);color:var(--kup-navbar-color);fill:var(--kup-navbar-color);margin:0}.nav-bar__row{box-sizing:border-box;display:flex;height:var(--kup-navbar-height);position:relative;width:var(--kup_navbar_width)}.nav-bar__section{align-items:center;display:inline-flex;flex:1 1 auto;min-width:0;padding:var(--kup_navbar_padding)}.nav-bar__section--align-start{flex-shrink:5;justify-content:flex-start;order:-1}.nav-bar__section--align-end{justify-content:flex-end;order:1;overflow:hidden}::slotted(*){--kup-button-primary-color:var(--kup-navbar-color);--kup-button-primary-color-rgb:var(--kup-navbar-color-rgb);--kup-button-primary-color-h:var(--kup-navbar-color-h);--kup-button-primary-color-s:var(--kup-navbar-color-s);--kup-button-primary-color-l:var(--kup-navbar-color-l);--kup-switch-label-color:var(--kup-navbar-color);--kup-switch-primary-color:var(--kup-navbar-color);--kup-switch-primary-color-rgb:var(--kup-navbar-color-rgb);--kup-textfield-color:var(--kup-navbar-color);--kup-textfield-color-rgb:var(--kup-navbar-color-rgb);--kup-textfield-primary-color:var(--kup-navbar-color);--kup-textfield-primary-color-rgb:var(--kup-navbar-color-rgb);--kup-tree-color:var(--kup-navbar-color);--kup-tree-color-rgb:var(--kup-navbar-color-rgb);color:var(--kup-navbar-color);fill:var(--kup-navbar-color);margin:0}";export{u as kup_nav_bar}