@dnncommunity/dnn-elements 0.14.1-beta.1 → 0.15.0-beta.10

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 (404) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +24 -24
  3. package/dist/cjs/{debounce-1de79bc7.js → debounce-901e1f0c.js} +18 -18
  4. package/dist/cjs/{debounce-1de79bc7.js.map → debounce-901e1f0c.js.map} +1 -1
  5. package/dist/cjs/{dnn-button_16.cjs.entry.js → dnn-button_17.cjs.entry.js} +2024 -1710
  6. package/dist/cjs/dnn-button_17.cjs.entry.js.map +1 -0
  7. package/dist/cjs/dnn.cjs.js +5 -113
  8. package/dist/cjs/dnn.cjs.js.map +1 -1
  9. package/dist/cjs/{index-7505bd72.js → index-514ef6dd.js} +32 -2
  10. package/dist/cjs/index-514ef6dd.js.map +1 -0
  11. package/dist/cjs/index.cjs.js +41 -41
  12. package/dist/cjs/loader.cjs.js +3 -19
  13. package/dist/cjs/loader.cjs.js.map +1 -1
  14. package/dist/collection/collection-manifest.json +3 -2
  15. package/dist/collection/components/dnn-button/dnn-button.js +275 -271
  16. package/dist/collection/components/dnn-button/dnn-button.js.map +1 -1
  17. package/dist/collection/components/dnn-button/dnn-button.stories.js +72 -0
  18. package/dist/collection/components/dnn-button/dnn-button.stories.js.map +1 -0
  19. package/dist/collection/components/dnn-checkbox/dnn-checkbox.css +6 -0
  20. package/dist/collection/components/dnn-checkbox/dnn-checkbox.js +151 -139
  21. package/dist/collection/components/dnn-checkbox/dnn-checkbox.js.map +1 -1
  22. package/dist/collection/components/dnn-checkbox/dnn-checkbox.stories.js +39 -0
  23. package/dist/collection/components/dnn-checkbox/dnn-checkbox.stories.js.map +1 -0
  24. package/dist/collection/components/dnn-chevron/dnn-chevron.js +106 -106
  25. package/dist/collection/components/dnn-chevron/dnn-chevron.js.map +1 -1
  26. package/dist/collection/components/dnn-chevron/dnn-chevron.stories.js +38 -0
  27. package/dist/collection/components/dnn-chevron/dnn-chevron.stories.js.map +1 -0
  28. package/dist/collection/components/dnn-collapsible/dnn-collapsible.js +145 -142
  29. package/dist/collection/components/dnn-collapsible/dnn-collapsible.js.map +1 -1
  30. package/dist/collection/components/dnn-collapsible/dnn-collapsible.stories.js +39 -0
  31. package/dist/collection/components/dnn-collapsible/dnn-collapsible.stories.js.map +1 -0
  32. package/dist/collection/components/dnn-color-picker/dnn-color-picker.js +433 -433
  33. package/dist/collection/components/dnn-color-picker/dnn-color-picker.stories.js +33 -0
  34. package/dist/collection/components/dnn-color-picker/dnn-color-picker.stories.js.map +1 -0
  35. package/dist/collection/components/dnn-dropzone/dnn-dropzone.js +265 -265
  36. package/dist/collection/components/dnn-dropzone/dnn-dropzone.js.map +1 -1
  37. package/dist/collection/components/dnn-dropzone/dnn-dropzone.stories.js +48 -0
  38. package/dist/collection/components/dnn-dropzone/dnn-dropzone.stories.js.map +1 -0
  39. package/dist/collection/components/dnn-image-cropper/CornerType.js +8 -8
  40. package/dist/collection/components/dnn-image-cropper/dnn-image-cropper.js +522 -522
  41. package/dist/collection/components/dnn-image-cropper/dnn-image-cropper.js.map +1 -1
  42. package/dist/collection/components/dnn-image-cropper/dnn-image-cropper.stories.js +60 -0
  43. package/dist/collection/components/dnn-image-cropper/dnn-image-cropper.stories.js.map +1 -0
  44. package/dist/collection/components/dnn-modal/dnn-modal.js +190 -172
  45. package/dist/collection/components/dnn-modal/dnn-modal.js.map +1 -1
  46. package/dist/collection/components/dnn-modal/dnn-modal.stories.js +47 -0
  47. package/dist/collection/components/dnn-modal/dnn-modal.stories.js.map +1 -0
  48. package/dist/collection/components/dnn-permissions-grid/dnn-permissions-grid.css +83 -0
  49. package/dist/collection/components/dnn-permissions-grid/dnn-permissions-grid.js +531 -0
  50. package/dist/collection/components/dnn-permissions-grid/dnn-permissions-grid.js.map +1 -0
  51. package/dist/collection/components/dnn-permissions-grid/dnn-permissions-grid.stories.js +273 -0
  52. package/dist/collection/components/dnn-permissions-grid/dnn-permissions-grid.stories.js.map +1 -0
  53. package/dist/collection/components/dnn-permissions-grid/localization-interface.js +3 -0
  54. package/dist/collection/components/dnn-permissions-grid/localization-interface.js.map +1 -0
  55. package/dist/collection/components/dnn-permissions-grid/permissions-interface.js +3 -0
  56. package/dist/collection/components/dnn-permissions-grid/permissions-interface.js.map +1 -0
  57. package/dist/collection/components/dnn-permissions-grid/role-group-interface.js +2 -0
  58. package/dist/collection/components/dnn-permissions-grid/role-group-interface.js.map +1 -0
  59. package/dist/collection/components/dnn-permissions-grid/role-interface.js +2 -0
  60. package/dist/collection/components/dnn-permissions-grid/role-interface.js.map +1 -0
  61. package/dist/collection/components/dnn-permissions-grid/searched-user-interface.js +2 -0
  62. package/dist/collection/components/dnn-permissions-grid/searched-user-interface.js.map +1 -0
  63. package/dist/collection/components/dnn-searchbox/dnn-searchbox.js +136 -136
  64. package/dist/collection/components/dnn-searchbox/dnn-searchbox.js.map +1 -1
  65. package/dist/collection/components/dnn-searchbox/dnn-searchbox.stories.js +26 -0
  66. package/dist/collection/components/dnn-searchbox/dnn-searchbox.stories.js.map +1 -0
  67. package/dist/collection/components/dnn-sort-icon/dnn-sort-icon.css +6 -3
  68. package/dist/collection/components/dnn-sort-icon/dnn-sort-icon.js +80 -80
  69. package/dist/collection/components/dnn-sort-icon/dnn-sort-icon.js.map +1 -1
  70. package/dist/collection/components/dnn-sort-icon/dnn-sort-icon.stories.js +58 -0
  71. package/dist/collection/components/dnn-sort-icon/dnn-sort-icon.stories.js.map +1 -0
  72. package/dist/collection/components/dnn-tab/dnn-tab.js +83 -83
  73. package/dist/collection/components/dnn-tab/dnn-tab.stories.js +25 -0
  74. package/dist/collection/components/dnn-tab/dnn-tab.stories.js.map +1 -0
  75. package/dist/collection/components/dnn-tabs/dnn-tabs.js +54 -54
  76. package/dist/collection/components/dnn-tabs/dnn-tabs.stories.js +48 -0
  77. package/dist/collection/components/dnn-tabs/dnn-tabs.stories.js.map +1 -0
  78. package/dist/collection/components/dnn-toggle/dnn-toggle.css +1 -1
  79. package/dist/collection/components/dnn-toggle/dnn-toggle.js +93 -93
  80. package/dist/collection/components/dnn-toggle/dnn-toggle.js.map +1 -1
  81. package/dist/collection/components/dnn-toggle/dnn-toggle.stories.js +53 -0
  82. package/dist/collection/components/dnn-toggle/dnn-toggle.stories.js.map +1 -0
  83. package/dist/collection/components/dnn-toggle/toggle-interface.js +1 -1
  84. package/dist/collection/components/dnn-treeview-item/dnn-treeview-item.js +130 -126
  85. package/dist/collection/components/dnn-treeview-item/dnn-treeview-item.js.map +1 -1
  86. package/dist/collection/components/dnn-treeview-item/dnn-treeview-item.stories.js +36 -0
  87. package/dist/collection/components/dnn-treeview-item/dnn-treeview-item.stories.js.map +1 -0
  88. package/dist/collection/components/dnn-vertical-overflow-menu/dnn-vertical-overflow-menu.css +6 -7
  89. package/dist/collection/components/dnn-vertical-overflow-menu/dnn-vertical-overflow-menu.js +133 -131
  90. package/dist/collection/components/dnn-vertical-overflow-menu/dnn-vertical-overflow-menu.js.map +1 -1
  91. package/dist/collection/components/dnn-vertical-overflow-menu/dnn-vertical-overflow-menu.stories.js +60 -0
  92. package/dist/collection/components/dnn-vertical-overflow-menu/dnn-vertical-overflow-menu.stories.js.map +1 -0
  93. package/dist/collection/components/dnn-vertical-splitview/dnn-vertical-splitview.css +4 -2
  94. package/dist/collection/components/dnn-vertical-splitview/dnn-vertical-splitview.js +233 -233
  95. package/dist/collection/components/dnn-vertical-splitview/dnn-vertical-splitview.js.map +1 -1
  96. package/dist/collection/components/dnn-vertical-splitview/dnn-vertical-splitview.stories.js +75 -0
  97. package/dist/collection/components/dnn-vertical-splitview/dnn-vertical-splitview.stories.js.map +1 -0
  98. package/dist/collection/index.js +2 -2
  99. package/dist/collection/index.js.map +1 -1
  100. package/dist/collection/utilities/colorInfo.js +190 -190
  101. package/dist/collection/utilities/debounce.js +18 -18
  102. package/dist/collection/utilities/dnnServicesFramework.js +41 -41
  103. package/dist/collection/utilities/mouseUtilities.js +19 -19
  104. package/dist/dnn/dnn.esm.js +1 -126
  105. package/dist/dnn/dnn.esm.js.map +1 -1
  106. package/dist/dnn/dnn.js +1 -1
  107. package/dist/dnn/index.esm.js +1 -46
  108. package/dist/dnn/index.esm.js.map +1 -1
  109. package/dist/dnn/{p-646cfb1b.system.js → p-1e26a4e1.system.js} +1 -1
  110. package/dist/dnn/{debounce-eef81bf7.system.js.map → p-1e26a4e1.system.js.map} +0 -0
  111. package/dist/dnn/p-31dc68a7.system.entry.js +11 -0
  112. package/dist/dnn/p-31dc68a7.system.entry.js.map +1 -0
  113. package/dist/dnn/p-5bcf3629.system.js +2 -0
  114. package/dist/dnn/p-5bcf3629.system.js.map +1 -0
  115. package/dist/dnn/{p-fb637662.system.js → p-78561bb1.system.js} +2 -2
  116. package/dist/dnn/{p-fb637662.system.js.map → p-78561bb1.system.js.map} +0 -0
  117. package/dist/dnn/p-7ffdbed1.js +2 -0
  118. package/dist/dnn/p-7ffdbed1.js.map +1 -0
  119. package/dist/dnn/{p-0e94f5ee.js → p-9b8731a9.js} +1 -1
  120. package/dist/dnn/{p-0e94f5ee.js.map → p-9b8731a9.js.map} +0 -0
  121. package/dist/dnn/p-b8064287.system.js +2 -0
  122. package/dist/dnn/p-b8064287.system.js.map +1 -0
  123. package/dist/dnn/p-c222c8b7.entry.js +11 -0
  124. package/dist/dnn/p-c222c8b7.entry.js.map +1 -0
  125. package/dist/esm/{debounce-06f55268.js → debounce-6be67abd.js} +18 -18
  126. package/dist/{dnn/debounce-06f55268.js.map → esm/debounce-6be67abd.js.map} +1 -1
  127. package/dist/esm/{dnn-button_16.entry.js → dnn-button_17.entry.js} +2024 -1711
  128. package/dist/esm/dnn-button_17.entry.js.map +1 -0
  129. package/dist/esm/dnn.js +5 -113
  130. package/dist/esm/dnn.js.map +1 -1
  131. package/dist/esm/{index-cdbad319.js → index-59e0950f.js} +32 -2
  132. package/dist/esm/index-59e0950f.js.map +1 -0
  133. package/dist/esm/index.js +41 -41
  134. package/dist/esm/loader.js +3 -19
  135. package/dist/esm/loader.js.map +1 -1
  136. package/dist/esm/polyfills/core-js.js +0 -0
  137. package/dist/esm/polyfills/css-shim.js +1 -1
  138. package/dist/esm/polyfills/dom.js +0 -0
  139. package/dist/esm/polyfills/es5-html-element.js +0 -0
  140. package/dist/esm/polyfills/index.js +0 -0
  141. package/dist/esm/polyfills/system.js +0 -0
  142. package/dist/esm-es5/{debounce-06f55268.js → debounce-6be67abd.js} +1 -1
  143. package/dist/esm-es5/{debounce-06f55268.js.map → debounce-6be67abd.js.map} +0 -0
  144. package/dist/esm-es5/dnn-button_17.entry.js +11 -0
  145. package/dist/esm-es5/dnn-button_17.entry.js.map +1 -0
  146. package/dist/esm-es5/dnn.js +1 -1
  147. package/dist/esm-es5/dnn.js.map +1 -1
  148. package/dist/esm-es5/index-59e0950f.js +2 -0
  149. package/dist/esm-es5/index-59e0950f.js.map +1 -0
  150. package/dist/esm-es5/index.js +1 -1
  151. package/dist/esm-es5/loader.js +1 -1
  152. package/dist/esm-es5/loader.js.map +1 -1
  153. package/dist/index.js +1 -1
  154. package/dist/types/components/dnn-button/dnn-button.d.ts +56 -55
  155. package/dist/types/components/dnn-button/dnn-button.stories.d.ts +4 -0
  156. package/dist/types/components/dnn-checkbox/dnn-checkbox.d.ts +20 -16
  157. package/dist/types/components/dnn-checkbox/dnn-checkbox.stories.d.ts +4 -0
  158. package/dist/types/components/dnn-chevron/dnn-chevron.d.ts +13 -13
  159. package/dist/types/components/dnn-chevron/dnn-chevron.stories.d.ts +4 -0
  160. package/dist/types/components/dnn-collapsible/dnn-collapsible.d.ts +19 -18
  161. package/dist/types/components/dnn-collapsible/dnn-collapsible.stories.d.ts +4 -0
  162. package/dist/types/components/dnn-color-picker/dnn-color-picker.d.ts +46 -46
  163. package/dist/types/components/dnn-color-picker/dnn-color-picker.stories.d.ts +4 -0
  164. package/dist/types/components/dnn-dropzone/dnn-dropzone.d.ts +45 -45
  165. package/dist/types/components/dnn-dropzone/dnn-dropzone.stories.d.ts +4 -0
  166. package/dist/types/components/dnn-image-cropper/CornerType.d.ts +6 -6
  167. package/dist/types/components/dnn-image-cropper/dnn-image-cropper.d.ts +61 -61
  168. package/dist/types/components/dnn-image-cropper/dnn-image-cropper.stories.d.ts +4 -0
  169. package/dist/types/components/dnn-modal/dnn-modal.d.ts +38 -35
  170. package/dist/types/components/dnn-modal/dnn-modal.stories.d.ts +4 -0
  171. package/dist/types/components/dnn-permissions-grid/dnn-permissions-grid.d.ts +47 -0
  172. package/dist/types/components/dnn-permissions-grid/dnn-permissions-grid.stories.d.ts +4 -0
  173. package/dist/types/components/dnn-permissions-grid/localization-interface.d.ts +11 -0
  174. package/dist/types/components/dnn-permissions-grid/permissions-interface.d.ts +26 -0
  175. package/dist/types/components/dnn-permissions-grid/role-group-interface.d.ts +6 -0
  176. package/dist/types/components/dnn-permissions-grid/role-interface.d.ts +6 -0
  177. package/dist/types/components/dnn-permissions-grid/searched-user-interface.d.ts +4 -0
  178. package/dist/types/components/dnn-searchbox/dnn-searchbox.d.ts +22 -22
  179. package/dist/types/components/dnn-searchbox/dnn-searchbox.stories.d.ts +4 -0
  180. package/dist/types/components/dnn-sort-icon/dnn-sort-icon.d.ts +9 -9
  181. package/dist/types/components/dnn-sort-icon/dnn-sort-icon.stories.d.ts +4 -0
  182. package/dist/types/components/dnn-tab/dnn-tab.d.ts +11 -11
  183. package/dist/types/components/dnn-tab/dnn-tab.stories.d.ts +4 -0
  184. package/dist/types/components/dnn-tabs/dnn-tabs.d.ts +11 -11
  185. package/dist/types/components/dnn-tabs/dnn-tabs.stories.d.ts +4 -0
  186. package/dist/types/components/dnn-toggle/dnn-toggle.d.ts +13 -13
  187. package/dist/types/components/dnn-toggle/dnn-toggle.stories.d.ts +4 -0
  188. package/dist/types/components/dnn-toggle/toggle-interface.d.ts +3 -3
  189. package/dist/types/components/dnn-treeview-item/dnn-treeview-item.d.ts +28 -24
  190. package/dist/types/components/dnn-treeview-item/dnn-treeview-item.stories.d.ts +4 -0
  191. package/dist/types/components/dnn-vertical-overflow-menu/dnn-vertical-overflow-menu.d.ts +16 -16
  192. package/dist/types/components/dnn-vertical-overflow-menu/dnn-vertical-overflow-menu.stories.d.ts +4 -0
  193. package/dist/types/components/dnn-vertical-splitview/dnn-vertical-splitview.d.ts +28 -28
  194. package/dist/types/components/dnn-vertical-splitview/dnn-vertical-splitview.stories.d.ts +4 -0
  195. package/dist/types/components.d.ts +108 -34
  196. package/dist/types/global.d.ts +1 -0
  197. package/dist/types/index.d.ts +3 -3
  198. package/dist/types/utilities/colorInfo.d.ts +52 -52
  199. package/dist/types/utilities/debounce.d.ts +5 -5
  200. package/dist/types/utilities/dnnServicesFramework.d.ts +19 -19
  201. package/dist/types/utilities/mouseUtilities.d.ts +4 -4
  202. package/package.json +63 -48
  203. package/dist/cjs/app-globals-3a1e7e63.js +0 -7
  204. package/dist/cjs/app-globals-3a1e7e63.js.map +0 -1
  205. package/dist/cjs/css-shim-3bfdba4f.js +0 -8
  206. package/dist/cjs/css-shim-3bfdba4f.js.map +0 -1
  207. package/dist/cjs/dnn-button.cjs.entry.js +0 -88
  208. package/dist/cjs/dnn-button.cjs.entry.js.map +0 -1
  209. package/dist/cjs/dnn-button_16.cjs.entry.js.map +0 -1
  210. package/dist/cjs/dnn-checkbox.cjs.entry.js +0 -58
  211. package/dist/cjs/dnn-checkbox.cjs.entry.js.map +0 -1
  212. package/dist/cjs/dnn-chevron.cjs.entry.js +0 -34
  213. package/dist/cjs/dnn-chevron.cjs.entry.js.map +0 -1
  214. package/dist/cjs/dnn-collapsible.cjs.entry.js +0 -66
  215. package/dist/cjs/dnn-collapsible.cjs.entry.js.map +0 -1
  216. package/dist/cjs/dnn-color-picker.cjs.entry.js +0 -508
  217. package/dist/cjs/dnn-color-picker.cjs.entry.js.map +0 -1
  218. package/dist/cjs/dnn-dropzone.cjs.entry.js +0 -153
  219. package/dist/cjs/dnn-dropzone.cjs.entry.js.map +0 -1
  220. package/dist/cjs/dnn-image-cropper.cjs.entry.js +0 -408
  221. package/dist/cjs/dnn-image-cropper.cjs.entry.js.map +0 -1
  222. package/dist/cjs/dnn-modal.cjs.entry.js +0 -62
  223. package/dist/cjs/dnn-modal.cjs.entry.js.map +0 -1
  224. package/dist/cjs/dnn-searchbox.cjs.entry.js +0 -66
  225. package/dist/cjs/dnn-searchbox.cjs.entry.js.map +0 -1
  226. package/dist/cjs/dnn-sort-icon.cjs.entry.js +0 -43
  227. package/dist/cjs/dnn-sort-icon.cjs.entry.js.map +0 -1
  228. package/dist/cjs/dnn-tab.cjs.entry.js +0 -31
  229. package/dist/cjs/dnn-tab.cjs.entry.js.map +0 -1
  230. package/dist/cjs/dnn-tabs.cjs.entry.js +0 -52
  231. package/dist/cjs/dnn-tabs.cjs.entry.js.map +0 -1
  232. package/dist/cjs/dnn-toggle.cjs.entry.js +0 -37
  233. package/dist/cjs/dnn-toggle.cjs.entry.js.map +0 -1
  234. package/dist/cjs/dnn-treeview-item.cjs.entry.js +0 -68
  235. package/dist/cjs/dnn-treeview-item.cjs.entry.js.map +0 -1
  236. package/dist/cjs/dnn-vertical-overflow-menu.cjs.entry.js +0 -122
  237. package/dist/cjs/dnn-vertical-overflow-menu.cjs.entry.js.map +0 -1
  238. package/dist/cjs/dnn-vertical-splitview.cjs.entry.js +0 -133
  239. package/dist/cjs/dnn-vertical-splitview.cjs.entry.js.map +0 -1
  240. package/dist/cjs/dom-8ac1ad03.js +0 -77
  241. package/dist/cjs/dom-8ac1ad03.js.map +0 -1
  242. package/dist/cjs/index-7505bd72.js.map +0 -1
  243. package/dist/cjs/index-aff4d89a.js +0 -3069
  244. package/dist/cjs/index-aff4d89a.js.map +0 -1
  245. package/dist/cjs/mouseUtilities-75be531a.js +0 -25
  246. package/dist/cjs/mouseUtilities-75be531a.js.map +0 -1
  247. package/dist/cjs/shadow-css-41d9783d.js +0 -392
  248. package/dist/cjs/shadow-css-41d9783d.js.map +0 -1
  249. package/dist/dnn/app-globals-0f993ce5.js +0 -5
  250. package/dist/dnn/app-globals-0f993ce5.js.map +0 -1
  251. package/dist/dnn/app-globals-497eb362.system.js +0 -2
  252. package/dist/dnn/app-globals-497eb362.system.js.map +0 -1
  253. package/dist/dnn/css-shim-20dbffa5.js +0 -6
  254. package/dist/dnn/css-shim-20dbffa5.js.map +0 -1
  255. package/dist/dnn/css-shim-856c55de.system.js +0 -2
  256. package/dist/dnn/css-shim-856c55de.system.js.map +0 -1
  257. package/dist/dnn/debounce-06f55268.js +0 -22
  258. package/dist/dnn/debounce-eef81bf7.system.js +0 -2
  259. package/dist/dnn/dnn-button.entry.js +0 -84
  260. package/dist/dnn/dnn-button.entry.js.map +0 -1
  261. package/dist/dnn/dnn-button.system.entry.js +0 -2
  262. package/dist/dnn/dnn-button.system.entry.js.map +0 -1
  263. package/dist/dnn/dnn-checkbox.entry.js +0 -54
  264. package/dist/dnn/dnn-checkbox.entry.js.map +0 -1
  265. package/dist/dnn/dnn-checkbox.system.entry.js +0 -2
  266. package/dist/dnn/dnn-checkbox.system.entry.js.map +0 -1
  267. package/dist/dnn/dnn-chevron.entry.js +0 -30
  268. package/dist/dnn/dnn-chevron.entry.js.map +0 -1
  269. package/dist/dnn/dnn-chevron.system.entry.js +0 -2
  270. package/dist/dnn/dnn-chevron.system.entry.js.map +0 -1
  271. package/dist/dnn/dnn-collapsible.entry.js +0 -62
  272. package/dist/dnn/dnn-collapsible.entry.js.map +0 -1
  273. package/dist/dnn/dnn-collapsible.system.entry.js +0 -2
  274. package/dist/dnn/dnn-collapsible.system.entry.js.map +0 -1
  275. package/dist/dnn/dnn-color-picker.entry.js +0 -504
  276. package/dist/dnn/dnn-color-picker.entry.js.map +0 -1
  277. package/dist/dnn/dnn-color-picker.system.entry.js +0 -12
  278. package/dist/dnn/dnn-color-picker.system.entry.js.map +0 -1
  279. package/dist/dnn/dnn-dropzone.entry.js +0 -149
  280. package/dist/dnn/dnn-dropzone.entry.js.map +0 -1
  281. package/dist/dnn/dnn-dropzone.system.entry.js +0 -2
  282. package/dist/dnn/dnn-dropzone.system.entry.js.map +0 -1
  283. package/dist/dnn/dnn-image-cropper.entry.js +0 -404
  284. package/dist/dnn/dnn-image-cropper.entry.js.map +0 -1
  285. package/dist/dnn/dnn-image-cropper.system.entry.js +0 -2
  286. package/dist/dnn/dnn-image-cropper.system.entry.js.map +0 -1
  287. package/dist/dnn/dnn-modal.entry.js +0 -58
  288. package/dist/dnn/dnn-modal.entry.js.map +0 -1
  289. package/dist/dnn/dnn-modal.system.entry.js +0 -2
  290. package/dist/dnn/dnn-modal.system.entry.js.map +0 -1
  291. package/dist/dnn/dnn-searchbox.entry.js +0 -62
  292. package/dist/dnn/dnn-searchbox.entry.js.map +0 -1
  293. package/dist/dnn/dnn-searchbox.system.entry.js +0 -2
  294. package/dist/dnn/dnn-searchbox.system.entry.js.map +0 -1
  295. package/dist/dnn/dnn-sort-icon.entry.js +0 -39
  296. package/dist/dnn/dnn-sort-icon.entry.js.map +0 -1
  297. package/dist/dnn/dnn-sort-icon.system.entry.js +0 -2
  298. package/dist/dnn/dnn-sort-icon.system.entry.js.map +0 -1
  299. package/dist/dnn/dnn-tab.entry.js +0 -27
  300. package/dist/dnn/dnn-tab.entry.js.map +0 -1
  301. package/dist/dnn/dnn-tab.system.entry.js +0 -2
  302. package/dist/dnn/dnn-tab.system.entry.js.map +0 -1
  303. package/dist/dnn/dnn-tabs.entry.js +0 -48
  304. package/dist/dnn/dnn-tabs.entry.js.map +0 -1
  305. package/dist/dnn/dnn-tabs.system.entry.js +0 -2
  306. package/dist/dnn/dnn-tabs.system.entry.js.map +0 -1
  307. package/dist/dnn/dnn-toggle.entry.js +0 -33
  308. package/dist/dnn/dnn-toggle.entry.js.map +0 -1
  309. package/dist/dnn/dnn-toggle.system.entry.js +0 -2
  310. package/dist/dnn/dnn-toggle.system.entry.js.map +0 -1
  311. package/dist/dnn/dnn-treeview-item.entry.js +0 -64
  312. package/dist/dnn/dnn-treeview-item.entry.js.map +0 -1
  313. package/dist/dnn/dnn-treeview-item.system.entry.js +0 -2
  314. package/dist/dnn/dnn-treeview-item.system.entry.js.map +0 -1
  315. package/dist/dnn/dnn-vertical-overflow-menu.entry.js +0 -118
  316. package/dist/dnn/dnn-vertical-overflow-menu.entry.js.map +0 -1
  317. package/dist/dnn/dnn-vertical-overflow-menu.system.entry.js +0 -2
  318. package/dist/dnn/dnn-vertical-overflow-menu.system.entry.js.map +0 -1
  319. package/dist/dnn/dnn-vertical-splitview.entry.js +0 -129
  320. package/dist/dnn/dnn-vertical-splitview.entry.js.map +0 -1
  321. package/dist/dnn/dnn-vertical-splitview.system.entry.js +0 -2
  322. package/dist/dnn/dnn-vertical-splitview.system.entry.js.map +0 -1
  323. package/dist/dnn/dnn.system.js +0 -2
  324. package/dist/dnn/dnn.system.js.map +0 -1
  325. package/dist/dnn/dom-938307ec.system.js +0 -22
  326. package/dist/dnn/dom-938307ec.system.js.map +0 -1
  327. package/dist/dnn/dom-c5ed0ba5.js +0 -75
  328. package/dist/dnn/dom-c5ed0ba5.js.map +0 -1
  329. package/dist/dnn/index-a3a55419.system.js +0 -2
  330. package/dist/dnn/index-a3a55419.system.js.map +0 -1
  331. package/dist/dnn/index-b5a28c1d.js +0 -3033
  332. package/dist/dnn/index-b5a28c1d.js.map +0 -1
  333. package/dist/dnn/index.system.js +0 -2
  334. package/dist/dnn/index.system.js.map +0 -1
  335. package/dist/dnn/mouseUtilities-817973b4.js +0 -23
  336. package/dist/dnn/mouseUtilities-817973b4.js.map +0 -1
  337. package/dist/dnn/mouseUtilities-e7e4e78f.system.js +0 -2
  338. package/dist/dnn/mouseUtilities-e7e4e78f.system.js.map +0 -1
  339. package/dist/dnn/p-058ba146.system.js +0 -2
  340. package/dist/dnn/p-058ba146.system.js.map +0 -1
  341. package/dist/dnn/p-45ce2139.js +0 -2
  342. package/dist/dnn/p-45ce2139.js.map +0 -1
  343. package/dist/dnn/p-646cfb1b.system.js.map +0 -1
  344. package/dist/dnn/p-755d047d.system.entry.js +0 -11
  345. package/dist/dnn/p-755d047d.system.entry.js.map +0 -1
  346. package/dist/dnn/p-8ec1f3a8.entry.js +0 -11
  347. package/dist/dnn/p-8ec1f3a8.entry.js.map +0 -1
  348. package/dist/dnn/p-f91193e2.system.js +0 -2
  349. package/dist/dnn/p-f91193e2.system.js.map +0 -1
  350. package/dist/dnn/shadow-css-8c625855.js +0 -390
  351. package/dist/dnn/shadow-css-8c625855.js.map +0 -1
  352. package/dist/dnn/shadow-css-d573707f.system.js +0 -14
  353. package/dist/dnn/shadow-css-d573707f.system.js.map +0 -1
  354. package/dist/esm/app-globals-0f993ce5.js +0 -5
  355. package/dist/esm/app-globals-0f993ce5.js.map +0 -1
  356. package/dist/esm/css-shim-20dbffa5.js +0 -6
  357. package/dist/esm/css-shim-20dbffa5.js.map +0 -1
  358. package/dist/esm/debounce-06f55268.js.map +0 -1
  359. package/dist/esm/dnn-button.entry.js +0 -84
  360. package/dist/esm/dnn-button.entry.js.map +0 -1
  361. package/dist/esm/dnn-button_16.entry.js.map +0 -1
  362. package/dist/esm/dnn-checkbox.entry.js +0 -54
  363. package/dist/esm/dnn-checkbox.entry.js.map +0 -1
  364. package/dist/esm/dnn-chevron.entry.js +0 -30
  365. package/dist/esm/dnn-chevron.entry.js.map +0 -1
  366. package/dist/esm/dnn-collapsible.entry.js +0 -62
  367. package/dist/esm/dnn-collapsible.entry.js.map +0 -1
  368. package/dist/esm/dnn-color-picker.entry.js +0 -504
  369. package/dist/esm/dnn-color-picker.entry.js.map +0 -1
  370. package/dist/esm/dnn-dropzone.entry.js +0 -149
  371. package/dist/esm/dnn-dropzone.entry.js.map +0 -1
  372. package/dist/esm/dnn-image-cropper.entry.js +0 -404
  373. package/dist/esm/dnn-image-cropper.entry.js.map +0 -1
  374. package/dist/esm/dnn-modal.entry.js +0 -58
  375. package/dist/esm/dnn-modal.entry.js.map +0 -1
  376. package/dist/esm/dnn-searchbox.entry.js +0 -62
  377. package/dist/esm/dnn-searchbox.entry.js.map +0 -1
  378. package/dist/esm/dnn-sort-icon.entry.js +0 -39
  379. package/dist/esm/dnn-sort-icon.entry.js.map +0 -1
  380. package/dist/esm/dnn-tab.entry.js +0 -27
  381. package/dist/esm/dnn-tab.entry.js.map +0 -1
  382. package/dist/esm/dnn-tabs.entry.js +0 -48
  383. package/dist/esm/dnn-tabs.entry.js.map +0 -1
  384. package/dist/esm/dnn-toggle.entry.js +0 -33
  385. package/dist/esm/dnn-toggle.entry.js.map +0 -1
  386. package/dist/esm/dnn-treeview-item.entry.js +0 -64
  387. package/dist/esm/dnn-treeview-item.entry.js.map +0 -1
  388. package/dist/esm/dnn-vertical-overflow-menu.entry.js +0 -118
  389. package/dist/esm/dnn-vertical-overflow-menu.entry.js.map +0 -1
  390. package/dist/esm/dnn-vertical-splitview.entry.js +0 -129
  391. package/dist/esm/dnn-vertical-splitview.entry.js.map +0 -1
  392. package/dist/esm/dom-c5ed0ba5.js +0 -75
  393. package/dist/esm/dom-c5ed0ba5.js.map +0 -1
  394. package/dist/esm/index-b5a28c1d.js +0 -3033
  395. package/dist/esm/index-b5a28c1d.js.map +0 -1
  396. package/dist/esm/index-cdbad319.js.map +0 -1
  397. package/dist/esm/mouseUtilities-817973b4.js +0 -23
  398. package/dist/esm/mouseUtilities-817973b4.js.map +0 -1
  399. package/dist/esm/shadow-css-8c625855.js +0 -390
  400. package/dist/esm/shadow-css-8c625855.js.map +0 -1
  401. package/dist/esm-es5/dnn-button_16.entry.js +0 -11
  402. package/dist/esm-es5/dnn-button_16.entry.js.map +0 -1
  403. package/dist/esm-es5/index-cdbad319.js +0 -2
  404. package/dist/esm-es5/index-cdbad319.js.map +0 -1
@@ -1,191 +1,191 @@
1
- /** Color utility class with hsl and rgb converters
2
- * based on math at https://en.wikipedia.org/wiki/HSL_and_HSV
3
- * @copyright Copyright (c) .NET Foundation. All rights reserved.
4
- * @license MIT
5
- */
6
- export class ColorInfo {
7
- constructor() {
8
- this._hue = 0;
9
- this._saturation = 0;
10
- this._lightness = 0;
11
- }
12
- /** gets the color hue
13
- * @returns a number between 0 and 359, could contain decimals
14
- */
15
- get hue() { return this._hue; }
16
- set hue(value) {
17
- if (value < 0) {
18
- value = 0;
19
- }
20
- if (value > 359) {
21
- value = 359;
22
- }
23
- this._hue = value;
24
- }
25
- /** gets the color saturation
26
- * @returns a number between 0 and 1, could contain decimals
27
- */
28
- get saturation() { return this._saturation; }
29
- set saturation(value) {
30
- if (value < 0) {
31
- value = 0;
32
- }
33
- if (value > 1) {
34
- value = 1;
35
- }
36
- this._saturation = value;
37
- }
38
- /** gets the color lightness
39
- * @returns a number between 0 and 1, could contain decimals
40
- */
41
- get lightness() { return this._lightness; }
42
- set lightness(value) {
43
- if (value < 0) {
44
- value = 0;
45
- }
46
- if (value > 1) {
47
- value = 1;
48
- }
49
- this._lightness = value;
50
- }
51
- /** gets or sets the red component
52
- * @returns an integer between 0 and 255
53
- */
54
- get red() {
55
- return this.getRGB().red;
56
- }
57
- set red(value) {
58
- this.setHSL(value, this.green, this.blue);
59
- }
60
- /** gets or sets the green component
61
- * @returns an integer between 0 and 255
62
- */
63
- get green() {
64
- return this.getRGB().green;
65
- }
66
- set green(value) {
67
- this.setHSL(this.red, value, this.blue);
68
- }
69
- /** gets or sets the blue component
70
- * @returns an integer between 0 and 255
71
- */
72
- get blue() {
73
- return this.getRGB().blue;
74
- }
75
- set blue(value) {
76
- this.setHSL(this.red, this.green, value);
77
- }
78
- /** gets or sets the hex color value, expresses as 6 hexadecimal characters.
79
- * @returns hex representation of the color
80
- */
81
- get hex() {
82
- var r = this.getHex(this.red);
83
- var g = this.getHex(this.green);
84
- var b = this.getHex(this.blue);
85
- return r + g + b;
86
- }
87
- set hex(value) {
88
- this.red = parseInt(value.substr(0, 2));
89
- this.green = parseInt(value.substr(2, 2));
90
- this.blue = parseInt(value.substr(4, 2));
91
- }
92
- /** gets white or black color that is a good oposite to the current color
93
- * @returns - "000000" or "FFFFFF"
94
- */
95
- get contrastColor() {
96
- const brightness = (this.red * 299 + this.green * 587 + this.blue * 114) / 1000;
97
- if (brightness > 127) {
98
- return "000000";
99
- }
100
- return "FFFFFF";
101
- }
102
- getRGB() {
103
- const chroma = (1 - Math.abs((2 * this._lightness) - 1)) * this.saturation;
104
- // find the quandrant of the hue
105
- const quadrant = this._hue / 60;
106
- // calculate the offset from the quandrant center
107
- const offset = chroma * (1 - Math.abs(quadrant % 2 - 1));
108
- // Apply the chroma to the primary component and the offset to the 2nd most important component
109
- let r = 0, g = 0, b = 0;
110
- if (0 <= quadrant && quadrant <= 1) {
111
- r = chroma;
112
- g = offset; // red to yellow
113
- }
114
- else if (1 <= quadrant && quadrant <= 2) {
115
- g = chroma;
116
- r = offset; // yellow to green
117
- }
118
- else if (2 <= quadrant && quadrant <= 3) {
119
- g = chroma;
120
- b = offset; // green to cyan
121
- }
122
- else if (3 <= quadrant && quadrant <= 4) {
123
- b = chroma;
124
- g = offset; // cyan to blue
125
- }
126
- else if (4 <= quadrant && quadrant <= 5) {
127
- b = chroma;
128
- r = offset; // blue to magenta
129
- }
130
- else if (5 <= quadrant && quadrant <= 6) {
131
- r = chroma;
132
- b = offset; // magenta to red
133
- }
134
- // calculate the bias to add to all channels to match the lightness
135
- const bias = this._lightness - (chroma / 2);
136
- return {
137
- red: Math.round((r + bias) * 255),
138
- green: Math.round((g + bias) * 255),
139
- blue: Math.round((b + bias) * 255)
140
- };
141
- }
142
- setHSL(red, green, blue) {
143
- // GENERAL DATA
144
- // all math is based on values from 0 to 1
145
- const r = red / 255, g = green / 255, b = blue / 255;
146
- // we need to max, min and the difference between them to derive hsl
147
- const min = Math.min(r, g, b);
148
- const max = Math.max(r, g, b);
149
- const diff = max - min;
150
- let h = 0, s = 0, l = 0;
151
- // HUE
152
- if (diff === 0) { // neutral
153
- h = 0;
154
- }
155
- else if (max === r) { // red (magenta to yellow range)
156
- h = 60 * ((g - b) / diff);
157
- }
158
- else if (max === g) { // green (yellow to cyan range)
159
- h = 60 * (2 + ((b - r) / diff));
160
- }
161
- else if (max === b) { // blue (cyan to magenta range)
162
- h = 60 * (4 + ((r - g) / diff));
163
- }
164
- if (h < 0) {
165
- h = h + 360;
166
- } // ensures positive hues only
167
- if (h > 359) {
168
- h = 359;
169
- } // ensures we never return 360 for simplicity since it is the same as 0
170
- // LIGHTNESS
171
- l = (max + min) / 2;
172
- // SATURATION
173
- if (max === 0 || min === 1) { // pure black or white have no saturation
174
- s = 0;
175
- }
176
- else {
177
- s = (max - l) / (Math.min(l, 1 - l));
178
- }
179
- this._hue = h;
180
- this._saturation = s;
181
- this._lightness = l;
182
- }
183
- getHex(value) {
184
- var hex = value.toString(16);
185
- if (hex.length < 2) {
186
- hex = "0" + hex;
187
- }
188
- return hex;
189
- }
190
- }
1
+ /** Color utility class with hsl and rgb converters
2
+ * based on math at https://en.wikipedia.org/wiki/HSL_and_HSV
3
+ * @copyright Copyright (c) .NET Foundation. All rights reserved.
4
+ * @license MIT
5
+ */
6
+ export class ColorInfo {
7
+ constructor() {
8
+ this._hue = 0;
9
+ this._saturation = 0;
10
+ this._lightness = 0;
11
+ }
12
+ /** gets the color hue
13
+ * @returns a number between 0 and 359, could contain decimals
14
+ */
15
+ get hue() { return this._hue; }
16
+ set hue(value) {
17
+ if (value < 0) {
18
+ value = 0;
19
+ }
20
+ if (value > 359) {
21
+ value = 359;
22
+ }
23
+ this._hue = value;
24
+ }
25
+ /** gets the color saturation
26
+ * @returns a number between 0 and 1, could contain decimals
27
+ */
28
+ get saturation() { return this._saturation; }
29
+ set saturation(value) {
30
+ if (value < 0) {
31
+ value = 0;
32
+ }
33
+ if (value > 1) {
34
+ value = 1;
35
+ }
36
+ this._saturation = value;
37
+ }
38
+ /** gets the color lightness
39
+ * @returns a number between 0 and 1, could contain decimals
40
+ */
41
+ get lightness() { return this._lightness; }
42
+ set lightness(value) {
43
+ if (value < 0) {
44
+ value = 0;
45
+ }
46
+ if (value > 1) {
47
+ value = 1;
48
+ }
49
+ this._lightness = value;
50
+ }
51
+ /** gets or sets the red component
52
+ * @returns an integer between 0 and 255
53
+ */
54
+ get red() {
55
+ return this.getRGB().red;
56
+ }
57
+ set red(value) {
58
+ this.setHSL(value, this.green, this.blue);
59
+ }
60
+ /** gets or sets the green component
61
+ * @returns an integer between 0 and 255
62
+ */
63
+ get green() {
64
+ return this.getRGB().green;
65
+ }
66
+ set green(value) {
67
+ this.setHSL(this.red, value, this.blue);
68
+ }
69
+ /** gets or sets the blue component
70
+ * @returns an integer between 0 and 255
71
+ */
72
+ get blue() {
73
+ return this.getRGB().blue;
74
+ }
75
+ set blue(value) {
76
+ this.setHSL(this.red, this.green, value);
77
+ }
78
+ /** gets or sets the hex color value, expresses as 6 hexadecimal characters.
79
+ * @returns hex representation of the color
80
+ */
81
+ get hex() {
82
+ var r = this.getHex(this.red);
83
+ var g = this.getHex(this.green);
84
+ var b = this.getHex(this.blue);
85
+ return r + g + b;
86
+ }
87
+ set hex(value) {
88
+ this.red = parseInt(value.substr(0, 2));
89
+ this.green = parseInt(value.substr(2, 2));
90
+ this.blue = parseInt(value.substr(4, 2));
91
+ }
92
+ /** gets white or black color that is a good oposite to the current color
93
+ * @returns - "000000" or "FFFFFF"
94
+ */
95
+ get contrastColor() {
96
+ const brightness = (this.red * 299 + this.green * 587 + this.blue * 114) / 1000;
97
+ if (brightness > 127) {
98
+ return "000000";
99
+ }
100
+ return "FFFFFF";
101
+ }
102
+ getRGB() {
103
+ const chroma = (1 - Math.abs((2 * this._lightness) - 1)) * this.saturation;
104
+ // find the quandrant of the hue
105
+ const quadrant = this._hue / 60;
106
+ // calculate the offset from the quandrant center
107
+ const offset = chroma * (1 - Math.abs(quadrant % 2 - 1));
108
+ // Apply the chroma to the primary component and the offset to the 2nd most important component
109
+ let r = 0, g = 0, b = 0;
110
+ if (0 <= quadrant && quadrant <= 1) {
111
+ r = chroma;
112
+ g = offset; // red to yellow
113
+ }
114
+ else if (1 <= quadrant && quadrant <= 2) {
115
+ g = chroma;
116
+ r = offset; // yellow to green
117
+ }
118
+ else if (2 <= quadrant && quadrant <= 3) {
119
+ g = chroma;
120
+ b = offset; // green to cyan
121
+ }
122
+ else if (3 <= quadrant && quadrant <= 4) {
123
+ b = chroma;
124
+ g = offset; // cyan to blue
125
+ }
126
+ else if (4 <= quadrant && quadrant <= 5) {
127
+ b = chroma;
128
+ r = offset; // blue to magenta
129
+ }
130
+ else if (5 <= quadrant && quadrant <= 6) {
131
+ r = chroma;
132
+ b = offset; // magenta to red
133
+ }
134
+ // calculate the bias to add to all channels to match the lightness
135
+ const bias = this._lightness - (chroma / 2);
136
+ return {
137
+ red: Math.round((r + bias) * 255),
138
+ green: Math.round((g + bias) * 255),
139
+ blue: Math.round((b + bias) * 255)
140
+ };
141
+ }
142
+ setHSL(red, green, blue) {
143
+ // GENERAL DATA
144
+ // all math is based on values from 0 to 1
145
+ const r = red / 255, g = green / 255, b = blue / 255;
146
+ // we need to max, min and the difference between them to derive hsl
147
+ const min = Math.min(r, g, b);
148
+ const max = Math.max(r, g, b);
149
+ const diff = max - min;
150
+ let h = 0, s = 0, l = 0;
151
+ // HUE
152
+ if (diff === 0) { // neutral
153
+ h = 0;
154
+ }
155
+ else if (max === r) { // red (magenta to yellow range)
156
+ h = 60 * ((g - b) / diff);
157
+ }
158
+ else if (max === g) { // green (yellow to cyan range)
159
+ h = 60 * (2 + ((b - r) / diff));
160
+ }
161
+ else if (max === b) { // blue (cyan to magenta range)
162
+ h = 60 * (4 + ((r - g) / diff));
163
+ }
164
+ if (h < 0) {
165
+ h = h + 360;
166
+ } // ensures positive hues only
167
+ if (h > 359) {
168
+ h = 359;
169
+ } // ensures we never return 360 for simplicity since it is the same as 0
170
+ // LIGHTNESS
171
+ l = (max + min) / 2;
172
+ // SATURATION
173
+ if (max === 0 || min === 1) { // pure black or white have no saturation
174
+ s = 0;
175
+ }
176
+ else {
177
+ s = (max - l) / (Math.min(l, 1 - l));
178
+ }
179
+ this._hue = h;
180
+ this._saturation = s;
181
+ this._lightness = l;
182
+ }
183
+ getHex(value) {
184
+ var hex = value.toString(16);
185
+ if (hex.length < 2) {
186
+ hex = "0" + hex;
187
+ }
188
+ return hex;
189
+ }
190
+ }
191
191
  //# sourceMappingURL=colorInfo.js.map
@@ -1,19 +1,19 @@
1
- /**
2
- * Debounces a function call, see http://demo.nimius.net/debounce_throttle/ for explanation of debounce vs throttle.
3
- * @param debounceTime How many milliseconds to debounce for.
4
- */
5
- export function Debounce(debounceTime = 500) {
6
- return function (_target, _key, descriptor) {
7
- let originalMethod = descriptor.value;
8
- let timer = null;
9
- descriptor.value = function (...args) {
10
- clearTimeout(timer);
11
- return new Promise(resolve => {
12
- timer = setTimeout(() => {
13
- resolve(originalMethod.apply(this, args));
14
- }, debounceTime);
15
- });
16
- };
17
- };
18
- }
1
+ /**
2
+ * Debounces a function call, see http://demo.nimius.net/debounce_throttle/ for explanation of debounce vs throttle.
3
+ * @param debounceTime How many milliseconds to debounce for.
4
+ */
5
+ export function Debounce(debounceTime = 500) {
6
+ return function (_target, _key, descriptor) {
7
+ let originalMethod = descriptor.value;
8
+ let timer = null;
9
+ descriptor.value = function (...args) {
10
+ clearTimeout(timer);
11
+ return new Promise(resolve => {
12
+ timer = setTimeout(() => {
13
+ resolve(originalMethod.apply(this, args));
14
+ }, debounceTime);
15
+ });
16
+ };
17
+ };
18
+ }
19
19
  //# sourceMappingURL=debounce.js.map
@@ -1,42 +1,42 @@
1
- export class DnnServicesFramework {
2
- /**
3
- * Initializes the serivces framework
4
- */
5
- constructor(moduleId) {
6
- this.getServiceRoot = (moduleName) => {
7
- var serviceRoot = window.top.dnn.getVar("sf_siteRoot", "/");
8
- serviceRoot += "API/" + moduleName + "/";
9
- return serviceRoot;
10
- };
11
- this.getTabId = () => {
12
- var tabId = window.top.dnn.getVar("sf_tabId", "-1");
13
- return parseInt(tabId);
14
- };
15
- this.getModuleId = () => {
16
- return this._moduleId;
17
- };
18
- this.getAntiForgeryValue = () => {
19
- const el = document.querySelector("input[name=__RequestVerificationToken]");
20
- if (el != null) {
21
- return el.value;
22
- }
23
- else {
24
- return null;
25
- }
26
- };
27
- this.getModuleHeaders = () => {
28
- var headers = new Headers();
29
- if (this.getTabId() > -1) {
30
- headers.append("ModuleId", this._moduleId.toString());
31
- headers.append("TabId", this.getTabId().toString());
32
- }
33
- const afValue = this.getAntiForgeryValue();
34
- if (afValue != null) {
35
- headers.append("RequestVerificationToken", afValue);
36
- }
37
- return headers;
38
- };
39
- this._moduleId = moduleId;
40
- }
41
- }
1
+ export class DnnServicesFramework {
2
+ /**
3
+ * Initializes the serivces framework
4
+ */
5
+ constructor(moduleId) {
6
+ this.getServiceRoot = (moduleName) => {
7
+ var serviceRoot = window.top.dnn.getVar("sf_siteRoot", "/");
8
+ serviceRoot += "API/" + moduleName + "/";
9
+ return serviceRoot;
10
+ };
11
+ this.getTabId = () => {
12
+ var tabId = window.top.dnn.getVar("sf_tabId", "-1");
13
+ return parseInt(tabId);
14
+ };
15
+ this.getModuleId = () => {
16
+ return this._moduleId;
17
+ };
18
+ this.getAntiForgeryValue = () => {
19
+ const el = document.querySelector("input[name=__RequestVerificationToken]");
20
+ if (el != null) {
21
+ return el.value;
22
+ }
23
+ else {
24
+ return null;
25
+ }
26
+ };
27
+ this.getModuleHeaders = () => {
28
+ var headers = new Headers();
29
+ if (this.getTabId() > -1) {
30
+ headers.append("ModuleId", this._moduleId.toString());
31
+ headers.append("TabId", this.getTabId().toString());
32
+ }
33
+ const afValue = this.getAntiForgeryValue();
34
+ if (afValue != null) {
35
+ headers.append("RequestVerificationToken", afValue);
36
+ }
37
+ return headers;
38
+ };
39
+ this._moduleId = moduleId;
40
+ }
41
+ }
42
42
  //# sourceMappingURL=dnnServicesFramework.js.map
@@ -1,20 +1,20 @@
1
- export function getMovementFromEvent(event, previousTouch) {
2
- let movementX = 0;
3
- let movementY = 0;
4
- if (event instanceof MouseEvent) {
5
- movementX = event.movementX;
6
- movementY = event.movementY;
7
- }
8
- if (typeof TouchEvent !== "undefined") {
9
- if (event instanceof TouchEvent) {
10
- let touch = event.touches[0];
11
- if (previousTouch != undefined) {
12
- movementX = touch.pageX - this.previousTouch.pageX;
13
- movementY = touch.pageY - this.previousTouch.pageY;
14
- }
15
- previousTouch = touch;
16
- }
17
- }
18
- return { movementX, movementY };
19
- }
1
+ export function getMovementFromEvent(event, previousTouch) {
2
+ let movementX = 0;
3
+ let movementY = 0;
4
+ if (event instanceof MouseEvent) {
5
+ movementX = event.movementX;
6
+ movementY = event.movementY;
7
+ }
8
+ if (typeof TouchEvent !== "undefined") {
9
+ if (event instanceof TouchEvent) {
10
+ let touch = event.touches[0];
11
+ if (previousTouch != undefined) {
12
+ movementX = touch.pageX - this.previousTouch.pageX;
13
+ movementY = touch.pageY - this.previousTouch.pageY;
14
+ }
15
+ previousTouch = touch;
16
+ }
17
+ }
18
+ return { movementX, movementY };
19
+ }
20
20
  //# sourceMappingURL=mouseUtilities.js.map