@wavemaker-ai/app-ng-runtime 1.0.0-rc.309

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 (1846) hide show
  1. package/build-task/.npmignore +2 -0
  2. package/build-task/bundles/index.umd.js +3060 -0
  3. package/build-task/fesm2022/index.mjs +2949 -0
  4. package/build-task/fesm2022/index.mjs.map +1 -0
  5. package/build-task/index.d.ts +882 -0
  6. package/build-task/package.json +23 -0
  7. package/components/advanced/carousel/.npmignore +2 -0
  8. package/components/advanced/carousel/bundles/index.umd.js +352 -0
  9. package/components/advanced/carousel/fesm2022/index.mjs +335 -0
  10. package/components/advanced/carousel/fesm2022/index.mjs.map +1 -0
  11. package/components/advanced/carousel/index.d.ts +89 -0
  12. package/components/advanced/carousel/package.json +18 -0
  13. package/components/advanced/custom/.npmignore +2 -0
  14. package/components/advanced/custom/bundles/index.umd.js +258 -0
  15. package/components/advanced/custom/fesm2022/index.mjs +244 -0
  16. package/components/advanced/custom/fesm2022/index.mjs.map +1 -0
  17. package/components/advanced/custom/index.d.ts +50 -0
  18. package/components/advanced/custom/package.json +18 -0
  19. package/components/advanced/login/.npmignore +2 -0
  20. package/components/advanced/login/bundles/index.umd.js +135 -0
  21. package/components/advanced/login/fesm2022/index.mjs +120 -0
  22. package/components/advanced/login/fesm2022/index.mjs.map +1 -0
  23. package/components/advanced/login/index.d.ts +34 -0
  24. package/components/advanced/login/package.json +18 -0
  25. package/components/advanced/marquee/.npmignore +2 -0
  26. package/components/advanced/marquee/bundles/index.umd.js +71 -0
  27. package/components/advanced/marquee/fesm2022/index.mjs +53 -0
  28. package/components/advanced/marquee/fesm2022/index.mjs.map +1 -0
  29. package/components/advanced/marquee/index.d.ts +12 -0
  30. package/components/advanced/marquee/package.json +18 -0
  31. package/components/base/.npmignore +2 -0
  32. package/components/base/bundles/index.umd.js +6055 -0
  33. package/components/base/fesm2022/index.mjs +5931 -0
  34. package/components/base/fesm2022/index.mjs.map +1 -0
  35. package/components/base/index.d.ts +1436 -0
  36. package/components/base/package.json +26 -0
  37. package/components/basic/anchor/.npmignore +2 -0
  38. package/components/basic/anchor/bundles/index.umd.js +204 -0
  39. package/components/basic/anchor/fesm2022/index.mjs +187 -0
  40. package/components/basic/anchor/fesm2022/index.mjs.map +1 -0
  41. package/components/basic/anchor/index.d.ts +40 -0
  42. package/components/basic/anchor/package.json +18 -0
  43. package/components/basic/audio/.npmignore +2 -0
  44. package/components/basic/audio/bundles/index.umd.js +83 -0
  45. package/components/basic/audio/fesm2022/index.mjs +65 -0
  46. package/components/basic/audio/fesm2022/index.mjs.map +1 -0
  47. package/components/basic/audio/index.d.ts +23 -0
  48. package/components/basic/audio/package.json +18 -0
  49. package/components/basic/html/.npmignore +2 -0
  50. package/components/basic/html/bundles/index.umd.js +122 -0
  51. package/components/basic/html/fesm2022/index.mjs +105 -0
  52. package/components/basic/html/fesm2022/index.mjs.map +1 -0
  53. package/components/basic/html/index.d.ts +17 -0
  54. package/components/basic/html/package.json +18 -0
  55. package/components/basic/icon/.npmignore +2 -0
  56. package/components/basic/icon/bundles/index.umd.js +80 -0
  57. package/components/basic/icon/fesm2022/index.mjs +62 -0
  58. package/components/basic/icon/fesm2022/index.mjs.map +1 -0
  59. package/components/basic/icon/index.d.ts +18 -0
  60. package/components/basic/icon/package.json +18 -0
  61. package/components/basic/iframe/.npmignore +2 -0
  62. package/components/basic/iframe/bundles/index.umd.js +101 -0
  63. package/components/basic/iframe/fesm2022/index.mjs +84 -0
  64. package/components/basic/iframe/fesm2022/index.mjs.map +1 -0
  65. package/components/basic/iframe/index.d.ts +29 -0
  66. package/components/basic/iframe/package.json +18 -0
  67. package/components/basic/label/.npmignore +2 -0
  68. package/components/basic/label/bundles/index.umd.js +129 -0
  69. package/components/basic/label/fesm2022/index.mjs +113 -0
  70. package/components/basic/label/fesm2022/index.mjs.map +1 -0
  71. package/components/basic/label/index.d.ts +15 -0
  72. package/components/basic/label/package.json +18 -0
  73. package/components/basic/picture/.npmignore +2 -0
  74. package/components/basic/picture/bundles/index.umd.js +138 -0
  75. package/components/basic/picture/fesm2022/index.mjs +121 -0
  76. package/components/basic/picture/fesm2022/index.mjs.map +1 -0
  77. package/components/basic/picture/index.d.ts +22 -0
  78. package/components/basic/picture/package.json +18 -0
  79. package/components/basic/progress/progress-bar/.npmignore +2 -0
  80. package/components/basic/progress/progress-bar/bundles/index.umd.js +170 -0
  81. package/components/basic/progress/progress-bar/fesm2022/index.mjs +154 -0
  82. package/components/basic/progress/progress-bar/fesm2022/index.mjs.map +1 -0
  83. package/components/basic/progress/progress-bar/index.d.ts +45 -0
  84. package/components/basic/progress/progress-bar/package.json +18 -0
  85. package/components/basic/progress/progress-circle/.npmignore +2 -0
  86. package/components/basic/progress/progress-circle/bundles/index.umd.js +171 -0
  87. package/components/basic/progress/progress-circle/fesm2022/index.mjs +155 -0
  88. package/components/basic/progress/progress-circle/fesm2022/index.mjs.map +1 -0
  89. package/components/basic/progress/progress-circle/index.d.ts +43 -0
  90. package/components/basic/progress/progress-circle/package.json +18 -0
  91. package/components/basic/progress/progress-utils/.npmignore +2 -0
  92. package/components/basic/progress/progress-utils/bundles/index.umd.js +35 -0
  93. package/components/basic/progress/progress-utils/fesm2022/index.mjs +32 -0
  94. package/components/basic/progress/progress-utils/fesm2022/index.mjs.map +1 -0
  95. package/components/basic/progress/progress-utils/index.d.ts +5 -0
  96. package/components/basic/progress/progress-utils/package.json +18 -0
  97. package/components/basic/rich-text-editor/.npmignore +2 -0
  98. package/components/basic/rich-text-editor/bundles/index.umd.js +236 -0
  99. package/components/basic/rich-text-editor/fesm2022/index.mjs +222 -0
  100. package/components/basic/rich-text-editor/fesm2022/index.mjs.map +1 -0
  101. package/components/basic/rich-text-editor/index.d.ts +58 -0
  102. package/components/basic/rich-text-editor/package.json +18 -0
  103. package/components/basic/search/.npmignore +2 -0
  104. package/components/basic/search/bundles/index.umd.js +1091 -0
  105. package/components/basic/search/fesm2022/index.mjs +1080 -0
  106. package/components/basic/search/fesm2022/index.mjs.map +1 -0
  107. package/components/basic/search/index.d.ts +125 -0
  108. package/components/basic/search/package.json +18 -0
  109. package/components/basic/spinner/.npmignore +2 -0
  110. package/components/basic/spinner/bundles/index.umd.js +126 -0
  111. package/components/basic/spinner/fesm2022/index.mjs +111 -0
  112. package/components/basic/spinner/fesm2022/index.mjs.map +1 -0
  113. package/components/basic/spinner/index.d.ts +30 -0
  114. package/components/basic/spinner/package.json +18 -0
  115. package/components/basic/tree/.npmignore +2 -0
  116. package/components/basic/tree/bundles/index.umd.js +767 -0
  117. package/components/basic/tree/fesm2022/index.mjs +751 -0
  118. package/components/basic/tree/fesm2022/index.mjs.map +1 -0
  119. package/components/basic/tree/index.d.ts +97 -0
  120. package/components/basic/tree/package.json +18 -0
  121. package/components/basic/video/.npmignore +2 -0
  122. package/components/basic/video/bundles/index.umd.js +116 -0
  123. package/components/basic/video/fesm2022/index.mjs +99 -0
  124. package/components/basic/video/fesm2022/index.mjs.map +1 -0
  125. package/components/basic/video/index.d.ts +30 -0
  126. package/components/basic/video/package.json +18 -0
  127. package/components/chart/.npmignore +2 -0
  128. package/components/chart/bundles/index.umd.js +1747 -0
  129. package/components/chart/fesm2022/index.mjs +1774 -0
  130. package/components/chart/fesm2022/index.mjs.map +1 -0
  131. package/components/chart/index.d.ts +103 -0
  132. package/components/chart/package.json +18 -0
  133. package/components/containers/accordion/.npmignore +2 -0
  134. package/components/containers/accordion/bundles/index.umd.js +500 -0
  135. package/components/containers/accordion/fesm2022/index.mjs +486 -0
  136. package/components/containers/accordion/fesm2022/index.mjs.map +1 -0
  137. package/components/containers/accordion/index.d.ts +114 -0
  138. package/components/containers/accordion/package.json +18 -0
  139. package/components/containers/layout-grid/.npmignore +2 -0
  140. package/components/containers/layout-grid/bundles/index.umd.js +172 -0
  141. package/components/containers/layout-grid/fesm2022/index.mjs +153 -0
  142. package/components/containers/layout-grid/fesm2022/index.mjs.map +1 -0
  143. package/components/containers/layout-grid/index.d.ts +29 -0
  144. package/components/containers/layout-grid/package.json +18 -0
  145. package/components/containers/linear-layout/.npmignore +2 -0
  146. package/components/containers/linear-layout/bundles/index.umd.js +186 -0
  147. package/components/containers/linear-layout/fesm2022/index.mjs +167 -0
  148. package/components/containers/linear-layout/fesm2022/index.mjs.map +1 -0
  149. package/components/containers/linear-layout/index.d.ts +27 -0
  150. package/components/containers/linear-layout/package.json +18 -0
  151. package/components/containers/panel/.npmignore +2 -0
  152. package/components/containers/panel/bundles/index.umd.js +223 -0
  153. package/components/containers/panel/fesm2022/index.mjs +210 -0
  154. package/components/containers/panel/fesm2022/index.mjs.map +1 -0
  155. package/components/containers/panel/index.d.ts +46 -0
  156. package/components/containers/panel/package.json +18 -0
  157. package/components/containers/tabs/.npmignore +2 -0
  158. package/components/containers/tabs/bundles/index.umd.js +788 -0
  159. package/components/containers/tabs/fesm2022/index.mjs +775 -0
  160. package/components/containers/tabs/fesm2022/index.mjs.map +1 -0
  161. package/components/containers/tabs/index.d.ts +127 -0
  162. package/components/containers/tabs/package.json +18 -0
  163. package/components/containers/tile/.npmignore +2 -0
  164. package/components/containers/tile/bundles/index.umd.js +68 -0
  165. package/components/containers/tile/fesm2022/index.mjs +50 -0
  166. package/components/containers/tile/fesm2022/index.mjs.map +1 -0
  167. package/components/containers/tile/index.d.ts +12 -0
  168. package/components/containers/tile/package.json +18 -0
  169. package/components/containers/wizard/.npmignore +2 -0
  170. package/components/containers/wizard/bundles/index.umd.js +1074 -0
  171. package/components/containers/wizard/fesm2022/index.mjs +1058 -0
  172. package/components/containers/wizard/fesm2022/index.mjs.map +1 -0
  173. package/components/containers/wizard/index.d.ts +257 -0
  174. package/components/containers/wizard/package.json +18 -0
  175. package/components/data/card/.npmignore +2 -0
  176. package/components/data/card/bundles/index.umd.js +237 -0
  177. package/components/data/card/fesm2022/index.mjs +220 -0
  178. package/components/data/card/fesm2022/index.mjs.map +1 -0
  179. package/components/data/card/index.d.ts +51 -0
  180. package/components/data/card/package.json +18 -0
  181. package/components/data/form/.npmignore +2 -0
  182. package/components/data/form/bundles/index.umd.js +3339 -0
  183. package/components/data/form/fesm2022/index.mjs +3327 -0
  184. package/components/data/form/fesm2022/index.mjs.map +1 -0
  185. package/components/data/form/index.d.ts +487 -0
  186. package/components/data/form/package.json +18 -0
  187. package/components/data/list/.npmignore +2 -0
  188. package/components/data/list/bundles/index.umd.js +1610 -0
  189. package/components/data/list/fesm2022/index.mjs +1602 -0
  190. package/components/data/list/fesm2022/index.mjs.map +1 -0
  191. package/components/data/list/index.d.ts +283 -0
  192. package/components/data/list/package.json +18 -0
  193. package/components/data/live-table/.npmignore +2 -0
  194. package/components/data/live-table/bundles/index.umd.js +283 -0
  195. package/components/data/live-table/fesm2022/index.mjs +268 -0
  196. package/components/data/live-table/fesm2022/index.mjs.map +1 -0
  197. package/components/data/live-table/index.d.ts +39 -0
  198. package/components/data/live-table/package.json +18 -0
  199. package/components/data/pagination/.npmignore +2 -0
  200. package/components/data/pagination/bundles/index.umd.js +885 -0
  201. package/components/data/pagination/fesm2022/index.mjs +880 -0
  202. package/components/data/pagination/fesm2022/index.mjs.map +1 -0
  203. package/components/data/pagination/index.d.ts +106 -0
  204. package/components/data/pagination/package.json +18 -0
  205. package/components/data/table/.npmignore +2 -0
  206. package/components/data/table/bundles/index.umd.js +4991 -0
  207. package/components/data/table/fesm2022/index.mjs +4978 -0
  208. package/components/data/table/fesm2022/index.mjs.map +1 -0
  209. package/components/data/table/index.d.ts +744 -0
  210. package/components/data/table/package.json +18 -0
  211. package/components/dialogs/alert-dialog/.npmignore +2 -0
  212. package/components/dialogs/alert-dialog/bundles/index.umd.js +126 -0
  213. package/components/dialogs/alert-dialog/fesm2022/index.mjs +114 -0
  214. package/components/dialogs/alert-dialog/fesm2022/index.mjs.map +1 -0
  215. package/components/dialogs/alert-dialog/index.d.ts +26 -0
  216. package/components/dialogs/alert-dialog/package.json +18 -0
  217. package/components/dialogs/confirm-dialog/.npmignore +2 -0
  218. package/components/dialogs/confirm-dialog/bundles/index.umd.js +129 -0
  219. package/components/dialogs/confirm-dialog/fesm2022/index.mjs +117 -0
  220. package/components/dialogs/confirm-dialog/fesm2022/index.mjs.map +1 -0
  221. package/components/dialogs/confirm-dialog/index.d.ts +29 -0
  222. package/components/dialogs/confirm-dialog/package.json +18 -0
  223. package/components/dialogs/default/.npmignore +2 -0
  224. package/components/dialogs/default/bundles/index.umd.js +380 -0
  225. package/components/dialogs/default/fesm2022/index.mjs +363 -0
  226. package/components/dialogs/default/fesm2022/index.mjs.map +1 -0
  227. package/components/dialogs/default/index.d.ts +89 -0
  228. package/components/dialogs/default/package.json +18 -0
  229. package/components/dialogs/design-dialog/.npmignore +2 -0
  230. package/components/dialogs/design-dialog/bundles/index.umd.js +150 -0
  231. package/components/dialogs/design-dialog/fesm2022/index.mjs +135 -0
  232. package/components/dialogs/design-dialog/fesm2022/index.mjs.map +1 -0
  233. package/components/dialogs/design-dialog/index.d.ts +20 -0
  234. package/components/dialogs/design-dialog/package.json +18 -0
  235. package/components/dialogs/iframe-dialog/.npmignore +2 -0
  236. package/components/dialogs/iframe-dialog/bundles/index.umd.js +119 -0
  237. package/components/dialogs/iframe-dialog/fesm2022/index.mjs +108 -0
  238. package/components/dialogs/iframe-dialog/fesm2022/index.mjs.map +1 -0
  239. package/components/dialogs/iframe-dialog/index.d.ts +22 -0
  240. package/components/dialogs/iframe-dialog/package.json +18 -0
  241. package/components/dialogs/login-dialog/.npmignore +2 -0
  242. package/components/dialogs/login-dialog/bundles/index.umd.js +114 -0
  243. package/components/dialogs/login-dialog/fesm2022/index.mjs +98 -0
  244. package/components/dialogs/login-dialog/fesm2022/index.mjs.map +1 -0
  245. package/components/dialogs/login-dialog/index.d.ts +26 -0
  246. package/components/dialogs/login-dialog/package.json +18 -0
  247. package/components/dialogs/partial-dialog/.npmignore +2 -0
  248. package/components/dialogs/partial-dialog/bundles/index.umd.js +157 -0
  249. package/components/dialogs/partial-dialog/fesm2022/index.mjs +146 -0
  250. package/components/dialogs/partial-dialog/fesm2022/index.mjs.map +1 -0
  251. package/components/dialogs/partial-dialog/index.d.ts +32 -0
  252. package/components/dialogs/partial-dialog/package.json +18 -0
  253. package/components/input/base-form/.npmignore +2 -0
  254. package/components/input/base-form/bundles/index.umd.js +147 -0
  255. package/components/input/base-form/fesm2022/index.mjs +131 -0
  256. package/components/input/base-form/fesm2022/index.mjs.map +1 -0
  257. package/components/input/base-form/index.d.ts +29 -0
  258. package/components/input/base-form/package.json +18 -0
  259. package/components/input/base-form-custom/.npmignore +2 -0
  260. package/components/input/base-form-custom/bundles/index.umd.js +129 -0
  261. package/components/input/base-form-custom/fesm2022/index.mjs +112 -0
  262. package/components/input/base-form-custom/fesm2022/index.mjs.map +1 -0
  263. package/components/input/base-form-custom/index.d.ts +26 -0
  264. package/components/input/base-form-custom/package.json +18 -0
  265. package/components/input/button/.npmignore +2 -0
  266. package/components/input/button/bundles/index.umd.js +98 -0
  267. package/components/input/button/fesm2022/index.mjs +81 -0
  268. package/components/input/button/fesm2022/index.mjs.map +1 -0
  269. package/components/input/button/index.d.ts +22 -0
  270. package/components/input/button/package.json +18 -0
  271. package/components/input/button-group/.npmignore +2 -0
  272. package/components/input/button-group/bundles/index.umd.js +80 -0
  273. package/components/input/button-group/fesm2022/index.mjs +62 -0
  274. package/components/input/button-group/fesm2022/index.mjs.map +1 -0
  275. package/components/input/button-group/index.d.ts +14 -0
  276. package/components/input/button-group/package.json +18 -0
  277. package/components/input/calendar/.npmignore +2 -0
  278. package/components/input/calendar/bundles/index.umd.js +655 -0
  279. package/components/input/calendar/fesm2022/index.mjs +665 -0
  280. package/components/input/calendar/fesm2022/index.mjs.map +1 -0
  281. package/components/input/calendar/index.d.ts +131 -0
  282. package/components/input/calendar/package.json +18 -0
  283. package/components/input/caption-position/.npmignore +2 -0
  284. package/components/input/caption-position/bundles/index.umd.js +196 -0
  285. package/components/input/caption-position/fesm2022/index.mjs +178 -0
  286. package/components/input/caption-position/fesm2022/index.mjs.map +1 -0
  287. package/components/input/caption-position/index.d.ts +34 -0
  288. package/components/input/caption-position/package.json +18 -0
  289. package/components/input/checkbox/.npmignore +2 -0
  290. package/components/input/checkbox/bundles/index.umd.js +206 -0
  291. package/components/input/checkbox/fesm2022/index.mjs +191 -0
  292. package/components/input/checkbox/fesm2022/index.mjs.map +1 -0
  293. package/components/input/checkbox/index.d.ts +39 -0
  294. package/components/input/checkbox/package.json +18 -0
  295. package/components/input/checkboxset/.npmignore +2 -0
  296. package/components/input/checkboxset/bundles/index.umd.js +178 -0
  297. package/components/input/checkboxset/fesm2022/index.mjs +165 -0
  298. package/components/input/checkboxset/fesm2022/index.mjs.map +1 -0
  299. package/components/input/checkboxset/index.d.ts +27 -0
  300. package/components/input/checkboxset/package.json +18 -0
  301. package/components/input/chips/.npmignore +2 -0
  302. package/components/input/chips/bundles/index.umd.js +741 -0
  303. package/components/input/chips/fesm2022/index.mjs +729 -0
  304. package/components/input/chips/fesm2022/index.mjs.map +1 -0
  305. package/components/input/chips/index.d.ts +90 -0
  306. package/components/input/chips/package.json +18 -0
  307. package/components/input/color-picker/.npmignore +2 -0
  308. package/components/input/color-picker/bundles/index.umd.js +145 -0
  309. package/components/input/color-picker/fesm2022/index.mjs +132 -0
  310. package/components/input/color-picker/fesm2022/index.mjs.map +1 -0
  311. package/components/input/color-picker/index.d.ts +36 -0
  312. package/components/input/color-picker/package.json +18 -0
  313. package/components/input/composite/.npmignore +2 -0
  314. package/components/input/composite/bundles/index.umd.js +120 -0
  315. package/components/input/composite/fesm2022/index.mjs +103 -0
  316. package/components/input/composite/fesm2022/index.mjs.map +1 -0
  317. package/components/input/composite/index.d.ts +27 -0
  318. package/components/input/composite/package.json +18 -0
  319. package/components/input/currency/.npmignore +2 -0
  320. package/components/input/currency/bundles/index.umd.js +112 -0
  321. package/components/input/currency/fesm2022/index.mjs +97 -0
  322. package/components/input/currency/fesm2022/index.mjs.map +1 -0
  323. package/components/input/currency/index.d.ts +31 -0
  324. package/components/input/currency/package.json +18 -0
  325. package/components/input/dataset-aware-form/.npmignore +2 -0
  326. package/components/input/dataset-aware-form/bundles/index.umd.js +354 -0
  327. package/components/input/dataset-aware-form/fesm2022/index.mjs +340 -0
  328. package/components/input/dataset-aware-form/fesm2022/index.mjs.map +1 -0
  329. package/components/input/dataset-aware-form/index.d.ts +80 -0
  330. package/components/input/dataset-aware-form/package.json +18 -0
  331. package/components/input/epoch/base-date-time/.npmignore +2 -0
  332. package/components/input/epoch/base-date-time/bundles/index.umd.js +1093 -0
  333. package/components/input/epoch/base-date-time/fesm2022/index.mjs +1084 -0
  334. package/components/input/epoch/base-date-time/fesm2022/index.mjs.map +1 -0
  335. package/components/input/epoch/base-date-time/index.d.ts +249 -0
  336. package/components/input/epoch/base-date-time/package.json +18 -0
  337. package/components/input/epoch/date/.npmignore +2 -0
  338. package/components/input/epoch/date/bundles/index.umd.js +515 -0
  339. package/components/input/epoch/date/fesm2022/index.mjs +505 -0
  340. package/components/input/epoch/date/fesm2022/index.mjs.map +1 -0
  341. package/components/input/epoch/date/index.d.ts +64 -0
  342. package/components/input/epoch/date/package.json +18 -0
  343. package/components/input/epoch/date-time/.npmignore +2 -0
  344. package/components/input/epoch/date-time/bundles/index.umd.js +519 -0
  345. package/components/input/epoch/date-time/fesm2022/index.mjs +510 -0
  346. package/components/input/epoch/date-time/fesm2022/index.mjs.map +1 -0
  347. package/components/input/epoch/date-time/index.d.ts +112 -0
  348. package/components/input/epoch/date-time/package.json +18 -0
  349. package/components/input/epoch/date-time-picker/.npmignore +2 -0
  350. package/components/input/epoch/date-time-picker/bundles/index.umd.js +453 -0
  351. package/components/input/epoch/date-time-picker/fesm2022/index.mjs +439 -0
  352. package/components/input/epoch/date-time-picker/fesm2022/index.mjs.map +1 -0
  353. package/components/input/epoch/date-time-picker/index.d.ts +83 -0
  354. package/components/input/epoch/date-time-picker/package.json +18 -0
  355. package/components/input/epoch/picker/.npmignore +2 -0
  356. package/components/input/epoch/picker/bundles/index.umd.js +192 -0
  357. package/components/input/epoch/picker/fesm2022/index.mjs +172 -0
  358. package/components/input/epoch/picker/fesm2022/index.mjs.map +1 -0
  359. package/components/input/epoch/picker/index.d.ts +39 -0
  360. package/components/input/epoch/picker/package.json +18 -0
  361. package/components/input/epoch/time/.npmignore +2 -0
  362. package/components/input/epoch/time/bundles/index.umd.js +401 -0
  363. package/components/input/epoch/time/fesm2022/index.mjs +391 -0
  364. package/components/input/epoch/time/fesm2022/index.mjs.map +1 -0
  365. package/components/input/epoch/time/index.d.ts +108 -0
  366. package/components/input/epoch/time/package.json +18 -0
  367. package/components/input/file-upload/.npmignore +2 -0
  368. package/components/input/file-upload/bundles/index.umd.js +483 -0
  369. package/components/input/file-upload/fesm2022/index.mjs +469 -0
  370. package/components/input/file-upload/fesm2022/index.mjs.map +1 -0
  371. package/components/input/file-upload/index.d.ts +106 -0
  372. package/components/input/file-upload/package.json +18 -0
  373. package/components/input/number/.npmignore +2 -0
  374. package/components/input/number/bundles/index.umd.js +109 -0
  375. package/components/input/number/fesm2022/index.mjs +95 -0
  376. package/components/input/number/fesm2022/index.mjs.map +1 -0
  377. package/components/input/number/index.d.ts +29 -0
  378. package/components/input/number/package.json +18 -0
  379. package/components/input/radioset/.npmignore +2 -0
  380. package/components/input/radioset/bundles/index.umd.js +164 -0
  381. package/components/input/radioset/fesm2022/index.mjs +151 -0
  382. package/components/input/radioset/fesm2022/index.mjs.map +1 -0
  383. package/components/input/radioset/index.d.ts +26 -0
  384. package/components/input/radioset/package.json +18 -0
  385. package/components/input/rating/.npmignore +2 -0
  386. package/components/input/rating/bundles/index.umd.js +270 -0
  387. package/components/input/rating/fesm2022/index.mjs +257 -0
  388. package/components/input/rating/fesm2022/index.mjs.map +1 -0
  389. package/components/input/rating/index.d.ts +47 -0
  390. package/components/input/rating/package.json +18 -0
  391. package/components/input/select/.npmignore +2 -0
  392. package/components/input/select/bundles/index.umd.js +225 -0
  393. package/components/input/select/fesm2022/index.mjs +211 -0
  394. package/components/input/select/fesm2022/index.mjs.map +1 -0
  395. package/components/input/select/index.d.ts +39 -0
  396. package/components/input/select/package.json +18 -0
  397. package/components/input/slider/.npmignore +2 -0
  398. package/components/input/slider/bundles/index.umd.js +203 -0
  399. package/components/input/slider/fesm2022/index.mjs +189 -0
  400. package/components/input/slider/fesm2022/index.mjs.map +1 -0
  401. package/components/input/slider/index.d.ts +42 -0
  402. package/components/input/slider/package.json +18 -0
  403. package/components/input/switch/.npmignore +2 -0
  404. package/components/input/switch/bundles/index.umd.js +224 -0
  405. package/components/input/switch/fesm2022/index.mjs +211 -0
  406. package/components/input/switch/fesm2022/index.mjs.map +1 -0
  407. package/components/input/switch/index.d.ts +33 -0
  408. package/components/input/switch/package.json +18 -0
  409. package/components/input/text/.npmignore +2 -0
  410. package/components/input/text/bundles/index.umd.js +1130 -0
  411. package/components/input/text/fesm2022/index.mjs +1114 -0
  412. package/components/input/text/fesm2022/index.mjs.map +1 -0
  413. package/components/input/text/index.d.ts +316 -0
  414. package/components/input/text/package.json +18 -0
  415. package/components/input/textarea/.npmignore +2 -0
  416. package/components/input/textarea/bundles/index.umd.js +108 -0
  417. package/components/input/textarea/fesm2022/index.mjs +94 -0
  418. package/components/input/textarea/fesm2022/index.mjs.map +1 -0
  419. package/components/input/textarea/index.d.ts +33 -0
  420. package/components/input/textarea/package.json +18 -0
  421. package/components/navigation/breadcrumb/.npmignore +2 -0
  422. package/components/navigation/breadcrumb/bundles/index.umd.js +138 -0
  423. package/components/navigation/breadcrumb/fesm2022/index.mjs +121 -0
  424. package/components/navigation/breadcrumb/fesm2022/index.mjs.map +1 -0
  425. package/components/navigation/breadcrumb/index.d.ts +28 -0
  426. package/components/navigation/breadcrumb/package.json +18 -0
  427. package/components/navigation/menu/.npmignore +2 -0
  428. package/components/navigation/menu/bundles/index.umd.js +947 -0
  429. package/components/navigation/menu/fesm2022/index.mjs +929 -0
  430. package/components/navigation/menu/fesm2022/index.mjs.map +1 -0
  431. package/components/navigation/menu/index.d.ts +189 -0
  432. package/components/navigation/menu/package.json +18 -0
  433. package/components/navigation/navbar/.npmignore +2 -0
  434. package/components/navigation/navbar/bundles/index.umd.js +87 -0
  435. package/components/navigation/navbar/fesm2022/index.mjs +70 -0
  436. package/components/navigation/navbar/fesm2022/index.mjs.map +1 -0
  437. package/components/navigation/navbar/index.d.ts +19 -0
  438. package/components/navigation/navbar/package.json +18 -0
  439. package/components/navigation/popover/.npmignore +2 -0
  440. package/components/navigation/popover/bundles/index.umd.js +527 -0
  441. package/components/navigation/popover/fesm2022/index.mjs +513 -0
  442. package/components/navigation/popover/fesm2022/index.mjs.map +1 -0
  443. package/components/navigation/popover/index.d.ts +86 -0
  444. package/components/navigation/popover/package.json +18 -0
  445. package/components/page/default/.npmignore +2 -0
  446. package/components/page/default/bundles/index.umd.js +458 -0
  447. package/components/page/default/fesm2022/index.mjs +438 -0
  448. package/components/page/default/fesm2022/index.mjs.map +1 -0
  449. package/components/page/default/index.d.ts +124 -0
  450. package/components/page/default/package.json +18 -0
  451. package/components/page/footer/.npmignore +2 -0
  452. package/components/page/footer/bundles/index.umd.js +71 -0
  453. package/components/page/footer/fesm2022/index.mjs +53 -0
  454. package/components/page/footer/fesm2022/index.mjs.map +1 -0
  455. package/components/page/footer/index.d.ts +12 -0
  456. package/components/page/footer/package.json +18 -0
  457. package/components/page/header/.npmignore +2 -0
  458. package/components/page/header/bundles/index.umd.js +67 -0
  459. package/components/page/header/fesm2022/index.mjs +49 -0
  460. package/components/page/header/fesm2022/index.mjs.map +1 -0
  461. package/components/page/header/index.d.ts +13 -0
  462. package/components/page/header/package.json +18 -0
  463. package/components/page/left-panel/.npmignore +2 -0
  464. package/components/page/left-panel/bundles/index.umd.js +415 -0
  465. package/components/page/left-panel/fesm2022/index.mjs +400 -0
  466. package/components/page/left-panel/fesm2022/index.mjs.map +1 -0
  467. package/components/page/left-panel/index.d.ts +41 -0
  468. package/components/page/left-panel/package.json +18 -0
  469. package/components/page/right-panel/.npmignore +2 -0
  470. package/components/page/right-panel/bundles/index.umd.js +86 -0
  471. package/components/page/right-panel/fesm2022/index.mjs +69 -0
  472. package/components/page/right-panel/fesm2022/index.mjs.map +1 -0
  473. package/components/page/right-panel/index.d.ts +13 -0
  474. package/components/page/right-panel/package.json +18 -0
  475. package/components/page/top-nav/.npmignore +2 -0
  476. package/components/page/top-nav/bundles/index.umd.js +68 -0
  477. package/components/page/top-nav/fesm2022/index.mjs +50 -0
  478. package/components/page/top-nav/fesm2022/index.mjs.map +1 -0
  479. package/components/page/top-nav/index.d.ts +12 -0
  480. package/components/page/top-nav/package.json +18 -0
  481. package/components/prefab/.npmignore +2 -0
  482. package/components/prefab/bundles/index.umd.js +176 -0
  483. package/components/prefab/fesm2022/index.mjs +159 -0
  484. package/components/prefab/fesm2022/index.mjs.map +1 -0
  485. package/components/prefab/index.d.ts +33 -0
  486. package/components/prefab/package.json +18 -0
  487. package/core/.npmignore +2 -0
  488. package/core/bundles/index.umd.js +5627 -0
  489. package/core/fesm2022/index.mjs +5475 -0
  490. package/core/fesm2022/index.mjs.map +1 -0
  491. package/core/index.d.ts +2143 -0
  492. package/core/package.json +24 -0
  493. package/http/.npmignore +2 -0
  494. package/http/bundles/index.umd.js +421 -0
  495. package/http/fesm2022/index.mjs +405 -0
  496. package/http/fesm2022/index.mjs.map +1 -0
  497. package/http/index.d.ts +120 -0
  498. package/http/package.json +23 -0
  499. package/locales/angular/af-na.js +17 -0
  500. package/locales/angular/af.js +17 -0
  501. package/locales/angular/agq.js +15 -0
  502. package/locales/angular/ak.js +17 -0
  503. package/locales/angular/am.js +17 -0
  504. package/locales/angular/ar-ae.js +25 -0
  505. package/locales/angular/ar-bh.js +25 -0
  506. package/locales/angular/ar-dj.js +25 -0
  507. package/locales/angular/ar-dz.js +25 -0
  508. package/locales/angular/ar-eg.js +25 -0
  509. package/locales/angular/ar-eh.js +25 -0
  510. package/locales/angular/ar-er.js +25 -0
  511. package/locales/angular/ar-il.js +25 -0
  512. package/locales/angular/ar-iq.js +25 -0
  513. package/locales/angular/ar-jo.js +25 -0
  514. package/locales/angular/ar-km.js +25 -0
  515. package/locales/angular/ar-kw.js +25 -0
  516. package/locales/angular/ar-lb.js +25 -0
  517. package/locales/angular/ar-ly.js +25 -0
  518. package/locales/angular/ar-ma.js +25 -0
  519. package/locales/angular/ar-mr.js +25 -0
  520. package/locales/angular/ar-om.js +25 -0
  521. package/locales/angular/ar-ps.js +25 -0
  522. package/locales/angular/ar-qa.js +25 -0
  523. package/locales/angular/ar-sa.js +25 -0
  524. package/locales/angular/ar-sd.js +25 -0
  525. package/locales/angular/ar-so.js +25 -0
  526. package/locales/angular/ar-ss.js +25 -0
  527. package/locales/angular/ar-sy.js +25 -0
  528. package/locales/angular/ar-td.js +25 -0
  529. package/locales/angular/ar-tn.js +25 -0
  530. package/locales/angular/ar-ye.js +25 -0
  531. package/locales/angular/ar.js +25 -0
  532. package/locales/angular/as.js +17 -0
  533. package/locales/angular/asa.js +17 -0
  534. package/locales/angular/ast.js +17 -0
  535. package/locales/angular/az-cyrl.js +15 -0
  536. package/locales/angular/az-latn.js +17 -0
  537. package/locales/angular/az.js +17 -0
  538. package/locales/angular/bas.js +15 -0
  539. package/locales/angular/be-tarask.js +21 -0
  540. package/locales/angular/be.js +21 -0
  541. package/locales/angular/bem.js +17 -0
  542. package/locales/angular/bez.js +17 -0
  543. package/locales/angular/bg.js +17 -0
  544. package/locales/angular/bm.js +15 -0
  545. package/locales/angular/bn-in.js +17 -0
  546. package/locales/angular/bn.js +17 -0
  547. package/locales/angular/bo-in.js +15 -0
  548. package/locales/angular/bo.js +15 -0
  549. package/locales/angular/br.js +23 -0
  550. package/locales/angular/brx.js +17 -0
  551. package/locales/angular/bs-cyrl.js +15 -0
  552. package/locales/angular/bs-latn.js +19 -0
  553. package/locales/angular/bs.js +19 -0
  554. package/locales/angular/ca-ad.js +17 -0
  555. package/locales/angular/ca-es-valencia.js +17 -0
  556. package/locales/angular/ca-fr.js +17 -0
  557. package/locales/angular/ca-it.js +17 -0
  558. package/locales/angular/ca.js +17 -0
  559. package/locales/angular/ccp-in.js +15 -0
  560. package/locales/angular/ccp.js +15 -0
  561. package/locales/angular/ce.js +17 -0
  562. package/locales/angular/ceb.js +17 -0
  563. package/locales/angular/cgg.js +17 -0
  564. package/locales/angular/chr.js +17 -0
  565. package/locales/angular/ckb-ir.js +17 -0
  566. package/locales/angular/ckb.js +17 -0
  567. package/locales/angular/cs.js +21 -0
  568. package/locales/angular/cy.js +25 -0
  569. package/locales/angular/da-gl.js +17 -0
  570. package/locales/angular/da.js +17 -0
  571. package/locales/angular/dav.js +15 -0
  572. package/locales/angular/de-at.js +17 -0
  573. package/locales/angular/de-be.js +17 -0
  574. package/locales/angular/de-ch.js +17 -0
  575. package/locales/angular/de-it.js +17 -0
  576. package/locales/angular/de-li.js +17 -0
  577. package/locales/angular/de-lu.js +17 -0
  578. package/locales/angular/de.js +17 -0
  579. package/locales/angular/dje.js +15 -0
  580. package/locales/angular/doi.js +17 -0
  581. package/locales/angular/dsb.js +21 -0
  582. package/locales/angular/dua.js +15 -0
  583. package/locales/angular/dyo.js +15 -0
  584. package/locales/angular/dz.js +15 -0
  585. package/locales/angular/ebu.js +15 -0
  586. package/locales/angular/ee-tg.js +17 -0
  587. package/locales/angular/ee.js +17 -0
  588. package/locales/angular/el-cy.js +17 -0
  589. package/locales/angular/el.js +17 -0
  590. package/locales/angular/en-001.js +17 -0
  591. package/locales/angular/en-150.js +17 -0
  592. package/locales/angular/en-ae.js +17 -0
  593. package/locales/angular/en-ag.js +17 -0
  594. package/locales/angular/en-ai.js +17 -0
  595. package/locales/angular/en-as.js +17 -0
  596. package/locales/angular/en-at.js +17 -0
  597. package/locales/angular/en-au.js +17 -0
  598. package/locales/angular/en-bb.js +17 -0
  599. package/locales/angular/en-be.js +17 -0
  600. package/locales/angular/en-bi.js +17 -0
  601. package/locales/angular/en-bm.js +17 -0
  602. package/locales/angular/en-bs.js +17 -0
  603. package/locales/angular/en-bw.js +17 -0
  604. package/locales/angular/en-bz.js +17 -0
  605. package/locales/angular/en-ca.js +17 -0
  606. package/locales/angular/en-cc.js +17 -0
  607. package/locales/angular/en-ch.js +17 -0
  608. package/locales/angular/en-ck.js +17 -0
  609. package/locales/angular/en-cm.js +17 -0
  610. package/locales/angular/en-cx.js +17 -0
  611. package/locales/angular/en-cy.js +17 -0
  612. package/locales/angular/en-de.js +17 -0
  613. package/locales/angular/en-dg.js +17 -0
  614. package/locales/angular/en-dk.js +17 -0
  615. package/locales/angular/en-dm.js +17 -0
  616. package/locales/angular/en-er.js +17 -0
  617. package/locales/angular/en-fi.js +17 -0
  618. package/locales/angular/en-fj.js +17 -0
  619. package/locales/angular/en-fk.js +17 -0
  620. package/locales/angular/en-fm.js +17 -0
  621. package/locales/angular/en-gb.js +17 -0
  622. package/locales/angular/en-gd.js +17 -0
  623. package/locales/angular/en-gg.js +17 -0
  624. package/locales/angular/en-gh.js +17 -0
  625. package/locales/angular/en-gi.js +17 -0
  626. package/locales/angular/en-gm.js +17 -0
  627. package/locales/angular/en-gu.js +17 -0
  628. package/locales/angular/en-gy.js +17 -0
  629. package/locales/angular/en-hk.js +17 -0
  630. package/locales/angular/en-ie.js +17 -0
  631. package/locales/angular/en-il.js +17 -0
  632. package/locales/angular/en-im.js +17 -0
  633. package/locales/angular/en-in.js +17 -0
  634. package/locales/angular/en-io.js +17 -0
  635. package/locales/angular/en-je.js +17 -0
  636. package/locales/angular/en-jm.js +17 -0
  637. package/locales/angular/en-ke.js +17 -0
  638. package/locales/angular/en-ki.js +17 -0
  639. package/locales/angular/en-kn.js +17 -0
  640. package/locales/angular/en-ky.js +17 -0
  641. package/locales/angular/en-lc.js +17 -0
  642. package/locales/angular/en-lr.js +17 -0
  643. package/locales/angular/en-ls.js +17 -0
  644. package/locales/angular/en-mg.js +17 -0
  645. package/locales/angular/en-mh.js +17 -0
  646. package/locales/angular/en-mo.js +17 -0
  647. package/locales/angular/en-mp.js +17 -0
  648. package/locales/angular/en-ms.js +17 -0
  649. package/locales/angular/en-mt.js +17 -0
  650. package/locales/angular/en-mu.js +17 -0
  651. package/locales/angular/en-mv.js +17 -0
  652. package/locales/angular/en-mw.js +17 -0
  653. package/locales/angular/en-my.js +17 -0
  654. package/locales/angular/en-na.js +17 -0
  655. package/locales/angular/en-nf.js +17 -0
  656. package/locales/angular/en-ng.js +17 -0
  657. package/locales/angular/en-nl.js +17 -0
  658. package/locales/angular/en-nr.js +17 -0
  659. package/locales/angular/en-nu.js +17 -0
  660. package/locales/angular/en-nz.js +17 -0
  661. package/locales/angular/en-pg.js +17 -0
  662. package/locales/angular/en-ph.js +17 -0
  663. package/locales/angular/en-pk.js +17 -0
  664. package/locales/angular/en-pn.js +17 -0
  665. package/locales/angular/en-pr.js +17 -0
  666. package/locales/angular/en-pw.js +17 -0
  667. package/locales/angular/en-rw.js +17 -0
  668. package/locales/angular/en-sb.js +17 -0
  669. package/locales/angular/en-sc.js +17 -0
  670. package/locales/angular/en-sd.js +17 -0
  671. package/locales/angular/en-se.js +17 -0
  672. package/locales/angular/en-sg.js +17 -0
  673. package/locales/angular/en-sh.js +17 -0
  674. package/locales/angular/en-si.js +17 -0
  675. package/locales/angular/en-sl.js +17 -0
  676. package/locales/angular/en-ss.js +17 -0
  677. package/locales/angular/en-sx.js +17 -0
  678. package/locales/angular/en-sz.js +17 -0
  679. package/locales/angular/en-tc.js +17 -0
  680. package/locales/angular/en-tk.js +17 -0
  681. package/locales/angular/en-to.js +17 -0
  682. package/locales/angular/en-tt.js +17 -0
  683. package/locales/angular/en-tv.js +17 -0
  684. package/locales/angular/en-tz.js +17 -0
  685. package/locales/angular/en-ug.js +17 -0
  686. package/locales/angular/en-um.js +17 -0
  687. package/locales/angular/en-vc.js +17 -0
  688. package/locales/angular/en-vg.js +17 -0
  689. package/locales/angular/en-vi.js +17 -0
  690. package/locales/angular/en-vu.js +17 -0
  691. package/locales/angular/en-ws.js +17 -0
  692. package/locales/angular/en-za.js +17 -0
  693. package/locales/angular/en-zm.js +17 -0
  694. package/locales/angular/en-zw.js +17 -0
  695. package/locales/angular/en.js +17 -0
  696. package/locales/angular/eo.js +17 -0
  697. package/locales/angular/es-419.js +19 -0
  698. package/locales/angular/es-ar.js +19 -0
  699. package/locales/angular/es-bo.js +19 -0
  700. package/locales/angular/es-br.js +19 -0
  701. package/locales/angular/es-bz.js +19 -0
  702. package/locales/angular/es-cl.js +19 -0
  703. package/locales/angular/es-co.js +19 -0
  704. package/locales/angular/es-cr.js +19 -0
  705. package/locales/angular/es-cu.js +19 -0
  706. package/locales/angular/es-do.js +19 -0
  707. package/locales/angular/es-ea.js +19 -0
  708. package/locales/angular/es-ec.js +19 -0
  709. package/locales/angular/es-gq.js +19 -0
  710. package/locales/angular/es-gt.js +19 -0
  711. package/locales/angular/es-hn.js +19 -0
  712. package/locales/angular/es-ic.js +19 -0
  713. package/locales/angular/es-mx.js +19 -0
  714. package/locales/angular/es-ni.js +19 -0
  715. package/locales/angular/es-pa.js +19 -0
  716. package/locales/angular/es-pe.js +19 -0
  717. package/locales/angular/es-ph.js +19 -0
  718. package/locales/angular/es-pr.js +19 -0
  719. package/locales/angular/es-py.js +19 -0
  720. package/locales/angular/es-sv.js +19 -0
  721. package/locales/angular/es-us.js +19 -0
  722. package/locales/angular/es-uy.js +19 -0
  723. package/locales/angular/es-ve.js +19 -0
  724. package/locales/angular/es.js +19 -0
  725. package/locales/angular/et.js +17 -0
  726. package/locales/angular/eu.js +17 -0
  727. package/locales/angular/ewo.js +15 -0
  728. package/locales/angular/fa-af.js +17 -0
  729. package/locales/angular/fa.js +17 -0
  730. package/locales/angular/ff-adlm-bf.js +15 -0
  731. package/locales/angular/ff-adlm-cm.js +15 -0
  732. package/locales/angular/ff-adlm-gh.js +15 -0
  733. package/locales/angular/ff-adlm-gm.js +15 -0
  734. package/locales/angular/ff-adlm-gw.js +15 -0
  735. package/locales/angular/ff-adlm-lr.js +15 -0
  736. package/locales/angular/ff-adlm-mr.js +15 -0
  737. package/locales/angular/ff-adlm-ne.js +15 -0
  738. package/locales/angular/ff-adlm-ng.js +15 -0
  739. package/locales/angular/ff-adlm-sl.js +15 -0
  740. package/locales/angular/ff-adlm-sn.js +15 -0
  741. package/locales/angular/ff-adlm.js +15 -0
  742. package/locales/angular/ff-cm.js +64 -0
  743. package/locales/angular/ff-gn.js +64 -0
  744. package/locales/angular/ff-latn-bf.js +17 -0
  745. package/locales/angular/ff-latn-cm.js +17 -0
  746. package/locales/angular/ff-latn-gh.js +17 -0
  747. package/locales/angular/ff-latn-gm.js +17 -0
  748. package/locales/angular/ff-latn-gn.js +17 -0
  749. package/locales/angular/ff-latn-gw.js +17 -0
  750. package/locales/angular/ff-latn-lr.js +17 -0
  751. package/locales/angular/ff-latn-mr.js +17 -0
  752. package/locales/angular/ff-latn-ne.js +17 -0
  753. package/locales/angular/ff-latn-ng.js +17 -0
  754. package/locales/angular/ff-latn-sl.js +17 -0
  755. package/locales/angular/ff-latn.js +17 -0
  756. package/locales/angular/ff-mr.js +64 -0
  757. package/locales/angular/ff.js +17 -0
  758. package/locales/angular/fi.js +17 -0
  759. package/locales/angular/fil.js +17 -0
  760. package/locales/angular/fo-dk.js +17 -0
  761. package/locales/angular/fo.js +17 -0
  762. package/locales/angular/fr-be.js +19 -0
  763. package/locales/angular/fr-bf.js +19 -0
  764. package/locales/angular/fr-bi.js +19 -0
  765. package/locales/angular/fr-bj.js +19 -0
  766. package/locales/angular/fr-bl.js +19 -0
  767. package/locales/angular/fr-ca.js +19 -0
  768. package/locales/angular/fr-cd.js +19 -0
  769. package/locales/angular/fr-cf.js +19 -0
  770. package/locales/angular/fr-cg.js +19 -0
  771. package/locales/angular/fr-ch.js +19 -0
  772. package/locales/angular/fr-ci.js +19 -0
  773. package/locales/angular/fr-cm.js +19 -0
  774. package/locales/angular/fr-dj.js +19 -0
  775. package/locales/angular/fr-dz.js +19 -0
  776. package/locales/angular/fr-ga.js +19 -0
  777. package/locales/angular/fr-gf.js +19 -0
  778. package/locales/angular/fr-gn.js +19 -0
  779. package/locales/angular/fr-gp.js +19 -0
  780. package/locales/angular/fr-gq.js +19 -0
  781. package/locales/angular/fr-ht.js +19 -0
  782. package/locales/angular/fr-km.js +19 -0
  783. package/locales/angular/fr-lu.js +19 -0
  784. package/locales/angular/fr-ma.js +19 -0
  785. package/locales/angular/fr-mc.js +19 -0
  786. package/locales/angular/fr-mf.js +19 -0
  787. package/locales/angular/fr-mg.js +19 -0
  788. package/locales/angular/fr-ml.js +19 -0
  789. package/locales/angular/fr-mq.js +19 -0
  790. package/locales/angular/fr-mr.js +19 -0
  791. package/locales/angular/fr-mu.js +19 -0
  792. package/locales/angular/fr-nc.js +19 -0
  793. package/locales/angular/fr-ne.js +19 -0
  794. package/locales/angular/fr-pf.js +19 -0
  795. package/locales/angular/fr-pm.js +19 -0
  796. package/locales/angular/fr-re.js +19 -0
  797. package/locales/angular/fr-rw.js +19 -0
  798. package/locales/angular/fr-sc.js +19 -0
  799. package/locales/angular/fr-sn.js +19 -0
  800. package/locales/angular/fr-sy.js +19 -0
  801. package/locales/angular/fr-td.js +19 -0
  802. package/locales/angular/fr-tg.js +19 -0
  803. package/locales/angular/fr-tn.js +19 -0
  804. package/locales/angular/fr-vu.js +19 -0
  805. package/locales/angular/fr-wf.js +19 -0
  806. package/locales/angular/fr-yt.js +19 -0
  807. package/locales/angular/fr.js +19 -0
  808. package/locales/angular/fur.js +17 -0
  809. package/locales/angular/fy.js +17 -0
  810. package/locales/angular/ga-gb.js +23 -0
  811. package/locales/angular/ga.js +23 -0
  812. package/locales/angular/gd.js +21 -0
  813. package/locales/angular/gl.js +17 -0
  814. package/locales/angular/global/af-na.js +24 -0
  815. package/locales/angular/global/af.js +24 -0
  816. package/locales/angular/global/agq.js +22 -0
  817. package/locales/angular/global/ak.js +24 -0
  818. package/locales/angular/global/am.js +24 -0
  819. package/locales/angular/global/ar-ae.js +32 -0
  820. package/locales/angular/global/ar-bh.js +32 -0
  821. package/locales/angular/global/ar-dj.js +32 -0
  822. package/locales/angular/global/ar-dz.js +32 -0
  823. package/locales/angular/global/ar-eg.js +32 -0
  824. package/locales/angular/global/ar-eh.js +32 -0
  825. package/locales/angular/global/ar-er.js +32 -0
  826. package/locales/angular/global/ar-il.js +32 -0
  827. package/locales/angular/global/ar-iq.js +32 -0
  828. package/locales/angular/global/ar-jo.js +32 -0
  829. package/locales/angular/global/ar-km.js +32 -0
  830. package/locales/angular/global/ar-kw.js +32 -0
  831. package/locales/angular/global/ar-lb.js +32 -0
  832. package/locales/angular/global/ar-ly.js +32 -0
  833. package/locales/angular/global/ar-ma.js +32 -0
  834. package/locales/angular/global/ar-mr.js +32 -0
  835. package/locales/angular/global/ar-om.js +32 -0
  836. package/locales/angular/global/ar-ps.js +32 -0
  837. package/locales/angular/global/ar-qa.js +32 -0
  838. package/locales/angular/global/ar-sa.js +32 -0
  839. package/locales/angular/global/ar-sd.js +32 -0
  840. package/locales/angular/global/ar-so.js +32 -0
  841. package/locales/angular/global/ar-ss.js +32 -0
  842. package/locales/angular/global/ar-sy.js +32 -0
  843. package/locales/angular/global/ar-td.js +32 -0
  844. package/locales/angular/global/ar-tn.js +32 -0
  845. package/locales/angular/global/ar-ye.js +32 -0
  846. package/locales/angular/global/ar.js +32 -0
  847. package/locales/angular/global/as.js +24 -0
  848. package/locales/angular/global/asa.js +24 -0
  849. package/locales/angular/global/ast.js +24 -0
  850. package/locales/angular/global/az-cyrl.js +22 -0
  851. package/locales/angular/global/az-latn.js +24 -0
  852. package/locales/angular/global/az.js +24 -0
  853. package/locales/angular/global/bas.js +22 -0
  854. package/locales/angular/global/be-tarask.js +28 -0
  855. package/locales/angular/global/be.js +28 -0
  856. package/locales/angular/global/bem.js +24 -0
  857. package/locales/angular/global/bez.js +24 -0
  858. package/locales/angular/global/bg.js +24 -0
  859. package/locales/angular/global/bm.js +22 -0
  860. package/locales/angular/global/bn-in.js +24 -0
  861. package/locales/angular/global/bn.js +24 -0
  862. package/locales/angular/global/bo-in.js +22 -0
  863. package/locales/angular/global/bo.js +22 -0
  864. package/locales/angular/global/br.js +30 -0
  865. package/locales/angular/global/brx.js +24 -0
  866. package/locales/angular/global/bs-cyrl.js +22 -0
  867. package/locales/angular/global/bs-latn.js +26 -0
  868. package/locales/angular/global/bs.js +26 -0
  869. package/locales/angular/global/ca-ad.js +24 -0
  870. package/locales/angular/global/ca-es-valencia.js +24 -0
  871. package/locales/angular/global/ca-fr.js +24 -0
  872. package/locales/angular/global/ca-it.js +24 -0
  873. package/locales/angular/global/ca.js +24 -0
  874. package/locales/angular/global/ccp-in.js +22 -0
  875. package/locales/angular/global/ccp.js +22 -0
  876. package/locales/angular/global/ce.js +24 -0
  877. package/locales/angular/global/ceb.js +24 -0
  878. package/locales/angular/global/cgg.js +24 -0
  879. package/locales/angular/global/chr.js +24 -0
  880. package/locales/angular/global/ckb-ir.js +24 -0
  881. package/locales/angular/global/ckb.js +24 -0
  882. package/locales/angular/global/cs.js +28 -0
  883. package/locales/angular/global/cy.js +32 -0
  884. package/locales/angular/global/da-gl.js +24 -0
  885. package/locales/angular/global/da.js +24 -0
  886. package/locales/angular/global/dav.js +22 -0
  887. package/locales/angular/global/de-at.js +24 -0
  888. package/locales/angular/global/de-be.js +24 -0
  889. package/locales/angular/global/de-ch.js +24 -0
  890. package/locales/angular/global/de-it.js +24 -0
  891. package/locales/angular/global/de-li.js +24 -0
  892. package/locales/angular/global/de-lu.js +24 -0
  893. package/locales/angular/global/de.js +24 -0
  894. package/locales/angular/global/dje.js +22 -0
  895. package/locales/angular/global/doi.js +24 -0
  896. package/locales/angular/global/dsb.js +28 -0
  897. package/locales/angular/global/dua.js +22 -0
  898. package/locales/angular/global/dyo.js +22 -0
  899. package/locales/angular/global/dz.js +22 -0
  900. package/locales/angular/global/ebu.js +22 -0
  901. package/locales/angular/global/ee-tg.js +24 -0
  902. package/locales/angular/global/ee.js +24 -0
  903. package/locales/angular/global/el-cy.js +24 -0
  904. package/locales/angular/global/el.js +24 -0
  905. package/locales/angular/global/en-001.js +24 -0
  906. package/locales/angular/global/en-150.js +24 -0
  907. package/locales/angular/global/en-ae.js +24 -0
  908. package/locales/angular/global/en-ag.js +24 -0
  909. package/locales/angular/global/en-ai.js +24 -0
  910. package/locales/angular/global/en-as.js +24 -0
  911. package/locales/angular/global/en-at.js +24 -0
  912. package/locales/angular/global/en-au.js +24 -0
  913. package/locales/angular/global/en-bb.js +24 -0
  914. package/locales/angular/global/en-be.js +24 -0
  915. package/locales/angular/global/en-bi.js +24 -0
  916. package/locales/angular/global/en-bm.js +24 -0
  917. package/locales/angular/global/en-bs.js +24 -0
  918. package/locales/angular/global/en-bw.js +24 -0
  919. package/locales/angular/global/en-bz.js +24 -0
  920. package/locales/angular/global/en-ca.js +24 -0
  921. package/locales/angular/global/en-cc.js +24 -0
  922. package/locales/angular/global/en-ch.js +24 -0
  923. package/locales/angular/global/en-ck.js +24 -0
  924. package/locales/angular/global/en-cm.js +24 -0
  925. package/locales/angular/global/en-cx.js +24 -0
  926. package/locales/angular/global/en-cy.js +24 -0
  927. package/locales/angular/global/en-de.js +24 -0
  928. package/locales/angular/global/en-dg.js +24 -0
  929. package/locales/angular/global/en-dk.js +24 -0
  930. package/locales/angular/global/en-dm.js +24 -0
  931. package/locales/angular/global/en-er.js +24 -0
  932. package/locales/angular/global/en-fi.js +24 -0
  933. package/locales/angular/global/en-fj.js +24 -0
  934. package/locales/angular/global/en-fk.js +24 -0
  935. package/locales/angular/global/en-fm.js +24 -0
  936. package/locales/angular/global/en-gb.js +24 -0
  937. package/locales/angular/global/en-gd.js +24 -0
  938. package/locales/angular/global/en-gg.js +24 -0
  939. package/locales/angular/global/en-gh.js +24 -0
  940. package/locales/angular/global/en-gi.js +24 -0
  941. package/locales/angular/global/en-gm.js +24 -0
  942. package/locales/angular/global/en-gu.js +24 -0
  943. package/locales/angular/global/en-gy.js +24 -0
  944. package/locales/angular/global/en-hk.js +24 -0
  945. package/locales/angular/global/en-ie.js +24 -0
  946. package/locales/angular/global/en-il.js +24 -0
  947. package/locales/angular/global/en-im.js +24 -0
  948. package/locales/angular/global/en-in.js +24 -0
  949. package/locales/angular/global/en-io.js +24 -0
  950. package/locales/angular/global/en-je.js +24 -0
  951. package/locales/angular/global/en-jm.js +24 -0
  952. package/locales/angular/global/en-ke.js +24 -0
  953. package/locales/angular/global/en-ki.js +24 -0
  954. package/locales/angular/global/en-kn.js +24 -0
  955. package/locales/angular/global/en-ky.js +24 -0
  956. package/locales/angular/global/en-lc.js +24 -0
  957. package/locales/angular/global/en-lr.js +24 -0
  958. package/locales/angular/global/en-ls.js +24 -0
  959. package/locales/angular/global/en-mg.js +24 -0
  960. package/locales/angular/global/en-mh.js +24 -0
  961. package/locales/angular/global/en-mo.js +24 -0
  962. package/locales/angular/global/en-mp.js +24 -0
  963. package/locales/angular/global/en-ms.js +24 -0
  964. package/locales/angular/global/en-mt.js +24 -0
  965. package/locales/angular/global/en-mu.js +24 -0
  966. package/locales/angular/global/en-mv.js +24 -0
  967. package/locales/angular/global/en-mw.js +24 -0
  968. package/locales/angular/global/en-my.js +24 -0
  969. package/locales/angular/global/en-na.js +24 -0
  970. package/locales/angular/global/en-nf.js +24 -0
  971. package/locales/angular/global/en-ng.js +24 -0
  972. package/locales/angular/global/en-nl.js +24 -0
  973. package/locales/angular/global/en-nr.js +24 -0
  974. package/locales/angular/global/en-nu.js +24 -0
  975. package/locales/angular/global/en-nz.js +24 -0
  976. package/locales/angular/global/en-pg.js +24 -0
  977. package/locales/angular/global/en-ph.js +24 -0
  978. package/locales/angular/global/en-pk.js +24 -0
  979. package/locales/angular/global/en-pn.js +24 -0
  980. package/locales/angular/global/en-pr.js +24 -0
  981. package/locales/angular/global/en-pw.js +24 -0
  982. package/locales/angular/global/en-rw.js +24 -0
  983. package/locales/angular/global/en-sb.js +24 -0
  984. package/locales/angular/global/en-sc.js +24 -0
  985. package/locales/angular/global/en-sd.js +24 -0
  986. package/locales/angular/global/en-se.js +24 -0
  987. package/locales/angular/global/en-sg.js +24 -0
  988. package/locales/angular/global/en-sh.js +24 -0
  989. package/locales/angular/global/en-si.js +24 -0
  990. package/locales/angular/global/en-sl.js +24 -0
  991. package/locales/angular/global/en-ss.js +24 -0
  992. package/locales/angular/global/en-sx.js +24 -0
  993. package/locales/angular/global/en-sz.js +24 -0
  994. package/locales/angular/global/en-tc.js +24 -0
  995. package/locales/angular/global/en-tk.js +24 -0
  996. package/locales/angular/global/en-to.js +24 -0
  997. package/locales/angular/global/en-tt.js +24 -0
  998. package/locales/angular/global/en-tv.js +24 -0
  999. package/locales/angular/global/en-tz.js +24 -0
  1000. package/locales/angular/global/en-ug.js +24 -0
  1001. package/locales/angular/global/en-um.js +24 -0
  1002. package/locales/angular/global/en-vc.js +24 -0
  1003. package/locales/angular/global/en-vg.js +24 -0
  1004. package/locales/angular/global/en-vi.js +24 -0
  1005. package/locales/angular/global/en-vu.js +24 -0
  1006. package/locales/angular/global/en-ws.js +24 -0
  1007. package/locales/angular/global/en-za.js +24 -0
  1008. package/locales/angular/global/en-zm.js +24 -0
  1009. package/locales/angular/global/en-zw.js +24 -0
  1010. package/locales/angular/global/en.js +24 -0
  1011. package/locales/angular/global/eo.js +24 -0
  1012. package/locales/angular/global/es-419.js +26 -0
  1013. package/locales/angular/global/es-ar.js +26 -0
  1014. package/locales/angular/global/es-bo.js +26 -0
  1015. package/locales/angular/global/es-br.js +26 -0
  1016. package/locales/angular/global/es-bz.js +26 -0
  1017. package/locales/angular/global/es-cl.js +26 -0
  1018. package/locales/angular/global/es-co.js +26 -0
  1019. package/locales/angular/global/es-cr.js +26 -0
  1020. package/locales/angular/global/es-cu.js +26 -0
  1021. package/locales/angular/global/es-do.js +26 -0
  1022. package/locales/angular/global/es-ea.js +26 -0
  1023. package/locales/angular/global/es-ec.js +26 -0
  1024. package/locales/angular/global/es-gq.js +26 -0
  1025. package/locales/angular/global/es-gt.js +26 -0
  1026. package/locales/angular/global/es-hn.js +26 -0
  1027. package/locales/angular/global/es-ic.js +26 -0
  1028. package/locales/angular/global/es-mx.js +26 -0
  1029. package/locales/angular/global/es-ni.js +26 -0
  1030. package/locales/angular/global/es-pa.js +26 -0
  1031. package/locales/angular/global/es-pe.js +26 -0
  1032. package/locales/angular/global/es-ph.js +26 -0
  1033. package/locales/angular/global/es-pr.js +26 -0
  1034. package/locales/angular/global/es-py.js +26 -0
  1035. package/locales/angular/global/es-sv.js +26 -0
  1036. package/locales/angular/global/es-us.js +26 -0
  1037. package/locales/angular/global/es-uy.js +26 -0
  1038. package/locales/angular/global/es-ve.js +26 -0
  1039. package/locales/angular/global/es.js +26 -0
  1040. package/locales/angular/global/et.js +24 -0
  1041. package/locales/angular/global/eu.js +24 -0
  1042. package/locales/angular/global/ewo.js +22 -0
  1043. package/locales/angular/global/fa-af.js +24 -0
  1044. package/locales/angular/global/fa.js +24 -0
  1045. package/locales/angular/global/ff-adlm-bf.js +22 -0
  1046. package/locales/angular/global/ff-adlm-cm.js +22 -0
  1047. package/locales/angular/global/ff-adlm-gh.js +22 -0
  1048. package/locales/angular/global/ff-adlm-gm.js +22 -0
  1049. package/locales/angular/global/ff-adlm-gw.js +22 -0
  1050. package/locales/angular/global/ff-adlm-lr.js +22 -0
  1051. package/locales/angular/global/ff-adlm-mr.js +22 -0
  1052. package/locales/angular/global/ff-adlm-ne.js +22 -0
  1053. package/locales/angular/global/ff-adlm-ng.js +22 -0
  1054. package/locales/angular/global/ff-adlm-sl.js +22 -0
  1055. package/locales/angular/global/ff-adlm-sn.js +22 -0
  1056. package/locales/angular/global/ff-adlm.js +22 -0
  1057. package/locales/angular/global/ff-cm.js +74 -0
  1058. package/locales/angular/global/ff-gn.js +74 -0
  1059. package/locales/angular/global/ff-latn-bf.js +24 -0
  1060. package/locales/angular/global/ff-latn-cm.js +24 -0
  1061. package/locales/angular/global/ff-latn-gh.js +24 -0
  1062. package/locales/angular/global/ff-latn-gm.js +24 -0
  1063. package/locales/angular/global/ff-latn-gn.js +24 -0
  1064. package/locales/angular/global/ff-latn-gw.js +24 -0
  1065. package/locales/angular/global/ff-latn-lr.js +24 -0
  1066. package/locales/angular/global/ff-latn-mr.js +24 -0
  1067. package/locales/angular/global/ff-latn-ne.js +24 -0
  1068. package/locales/angular/global/ff-latn-ng.js +24 -0
  1069. package/locales/angular/global/ff-latn-sl.js +24 -0
  1070. package/locales/angular/global/ff-latn.js +24 -0
  1071. package/locales/angular/global/ff-mr.js +74 -0
  1072. package/locales/angular/global/ff.js +24 -0
  1073. package/locales/angular/global/fi.js +24 -0
  1074. package/locales/angular/global/fil.js +24 -0
  1075. package/locales/angular/global/fo-dk.js +24 -0
  1076. package/locales/angular/global/fo.js +24 -0
  1077. package/locales/angular/global/fr-be.js +26 -0
  1078. package/locales/angular/global/fr-bf.js +26 -0
  1079. package/locales/angular/global/fr-bi.js +26 -0
  1080. package/locales/angular/global/fr-bj.js +26 -0
  1081. package/locales/angular/global/fr-bl.js +26 -0
  1082. package/locales/angular/global/fr-ca.js +26 -0
  1083. package/locales/angular/global/fr-cd.js +26 -0
  1084. package/locales/angular/global/fr-cf.js +26 -0
  1085. package/locales/angular/global/fr-cg.js +26 -0
  1086. package/locales/angular/global/fr-ch.js +26 -0
  1087. package/locales/angular/global/fr-ci.js +26 -0
  1088. package/locales/angular/global/fr-cm.js +26 -0
  1089. package/locales/angular/global/fr-dj.js +26 -0
  1090. package/locales/angular/global/fr-dz.js +26 -0
  1091. package/locales/angular/global/fr-ga.js +26 -0
  1092. package/locales/angular/global/fr-gf.js +26 -0
  1093. package/locales/angular/global/fr-gn.js +26 -0
  1094. package/locales/angular/global/fr-gp.js +26 -0
  1095. package/locales/angular/global/fr-gq.js +26 -0
  1096. package/locales/angular/global/fr-ht.js +26 -0
  1097. package/locales/angular/global/fr-km.js +26 -0
  1098. package/locales/angular/global/fr-lu.js +26 -0
  1099. package/locales/angular/global/fr-ma.js +26 -0
  1100. package/locales/angular/global/fr-mc.js +26 -0
  1101. package/locales/angular/global/fr-mf.js +26 -0
  1102. package/locales/angular/global/fr-mg.js +26 -0
  1103. package/locales/angular/global/fr-ml.js +26 -0
  1104. package/locales/angular/global/fr-mq.js +26 -0
  1105. package/locales/angular/global/fr-mr.js +26 -0
  1106. package/locales/angular/global/fr-mu.js +26 -0
  1107. package/locales/angular/global/fr-nc.js +26 -0
  1108. package/locales/angular/global/fr-ne.js +26 -0
  1109. package/locales/angular/global/fr-pf.js +26 -0
  1110. package/locales/angular/global/fr-pm.js +26 -0
  1111. package/locales/angular/global/fr-re.js +26 -0
  1112. package/locales/angular/global/fr-rw.js +26 -0
  1113. package/locales/angular/global/fr-sc.js +26 -0
  1114. package/locales/angular/global/fr-sn.js +26 -0
  1115. package/locales/angular/global/fr-sy.js +26 -0
  1116. package/locales/angular/global/fr-td.js +26 -0
  1117. package/locales/angular/global/fr-tg.js +26 -0
  1118. package/locales/angular/global/fr-tn.js +26 -0
  1119. package/locales/angular/global/fr-vu.js +26 -0
  1120. package/locales/angular/global/fr-wf.js +26 -0
  1121. package/locales/angular/global/fr-yt.js +26 -0
  1122. package/locales/angular/global/fr.js +26 -0
  1123. package/locales/angular/global/fur.js +24 -0
  1124. package/locales/angular/global/fy.js +24 -0
  1125. package/locales/angular/global/ga-gb.js +30 -0
  1126. package/locales/angular/global/ga.js +30 -0
  1127. package/locales/angular/global/gd.js +28 -0
  1128. package/locales/angular/global/gl.js +24 -0
  1129. package/locales/angular/global/gsw-fr.js +24 -0
  1130. package/locales/angular/global/gsw-li.js +24 -0
  1131. package/locales/angular/global/gsw.js +24 -0
  1132. package/locales/angular/global/gu.js +24 -0
  1133. package/locales/angular/global/guz.js +22 -0
  1134. package/locales/angular/global/gv.js +30 -0
  1135. package/locales/angular/global/ha-gh.js +24 -0
  1136. package/locales/angular/global/ha-ne.js +24 -0
  1137. package/locales/angular/global/ha.js +24 -0
  1138. package/locales/angular/global/haw.js +24 -0
  1139. package/locales/angular/global/he.js +28 -0
  1140. package/locales/angular/global/hi-latn.js +24 -0
  1141. package/locales/angular/global/hi.js +24 -0
  1142. package/locales/angular/global/hr-ba.js +26 -0
  1143. package/locales/angular/global/hr.js +26 -0
  1144. package/locales/angular/global/hsb.js +28 -0
  1145. package/locales/angular/global/hu.js +24 -0
  1146. package/locales/angular/global/hy.js +24 -0
  1147. package/locales/angular/global/ia.js +24 -0
  1148. package/locales/angular/global/id.js +22 -0
  1149. package/locales/angular/global/ig.js +22 -0
  1150. package/locales/angular/global/ii.js +22 -0
  1151. package/locales/angular/global/is.js +24 -0
  1152. package/locales/angular/global/it-ch.js +26 -0
  1153. package/locales/angular/global/it-sm.js +26 -0
  1154. package/locales/angular/global/it-va.js +26 -0
  1155. package/locales/angular/global/it.js +26 -0
  1156. package/locales/angular/global/ja.js +22 -0
  1157. package/locales/angular/global/jgo.js +24 -0
  1158. package/locales/angular/global/jmc.js +24 -0
  1159. package/locales/angular/global/jv.js +22 -0
  1160. package/locales/angular/global/ka.js +24 -0
  1161. package/locales/angular/global/kab.js +24 -0
  1162. package/locales/angular/global/kam.js +22 -0
  1163. package/locales/angular/global/kde.js +22 -0
  1164. package/locales/angular/global/kea.js +22 -0
  1165. package/locales/angular/global/kgp.js +22 -0
  1166. package/locales/angular/global/khq.js +22 -0
  1167. package/locales/angular/global/ki.js +22 -0
  1168. package/locales/angular/global/kk.js +24 -0
  1169. package/locales/angular/global/kkj.js +24 -0
  1170. package/locales/angular/global/kl.js +24 -0
  1171. package/locales/angular/global/kln.js +22 -0
  1172. package/locales/angular/global/km.js +22 -0
  1173. package/locales/angular/global/kn.js +24 -0
  1174. package/locales/angular/global/ko-kp.js +22 -0
  1175. package/locales/angular/global/ko.js +22 -0
  1176. package/locales/angular/global/kok.js +22 -0
  1177. package/locales/angular/global/ks-arab.js +24 -0
  1178. package/locales/angular/global/ks-deva.js +22 -0
  1179. package/locales/angular/global/ks.js +24 -0
  1180. package/locales/angular/global/ksb.js +24 -0
  1181. package/locales/angular/global/ksf.js +22 -0
  1182. package/locales/angular/global/ksh.js +26 -0
  1183. package/locales/angular/global/ku.js +24 -0
  1184. package/locales/angular/global/kw.js +32 -0
  1185. package/locales/angular/global/ky.js +24 -0
  1186. package/locales/angular/global/lag.js +26 -0
  1187. package/locales/angular/global/lb.js +24 -0
  1188. package/locales/angular/global/lg.js +24 -0
  1189. package/locales/angular/global/lkt.js +22 -0
  1190. package/locales/angular/global/ln-ao.js +24 -0
  1191. package/locales/angular/global/ln-cf.js +24 -0
  1192. package/locales/angular/global/ln-cg.js +24 -0
  1193. package/locales/angular/global/ln.js +24 -0
  1194. package/locales/angular/global/lo.js +22 -0
  1195. package/locales/angular/global/lrc-iq.js +22 -0
  1196. package/locales/angular/global/lrc.js +22 -0
  1197. package/locales/angular/global/lt.js +28 -0
  1198. package/locales/angular/global/lu.js +22 -0
  1199. package/locales/angular/global/luo.js +22 -0
  1200. package/locales/angular/global/luy.js +22 -0
  1201. package/locales/angular/global/lv.js +26 -0
  1202. package/locales/angular/global/mai.js +22 -0
  1203. package/locales/angular/global/mas-tz.js +24 -0
  1204. package/locales/angular/global/mas.js +24 -0
  1205. package/locales/angular/global/mer.js +22 -0
  1206. package/locales/angular/global/mfe.js +22 -0
  1207. package/locales/angular/global/mg.js +24 -0
  1208. package/locales/angular/global/mgh.js +22 -0
  1209. package/locales/angular/global/mgo.js +24 -0
  1210. package/locales/angular/global/mi.js +22 -0
  1211. package/locales/angular/global/mk.js +24 -0
  1212. package/locales/angular/global/ml.js +24 -0
  1213. package/locales/angular/global/mn.js +24 -0
  1214. package/locales/angular/global/mni-beng.js +22 -0
  1215. package/locales/angular/global/mni.js +22 -0
  1216. package/locales/angular/global/mr.js +24 -0
  1217. package/locales/angular/global/ms-bn.js +22 -0
  1218. package/locales/angular/global/ms-id.js +22 -0
  1219. package/locales/angular/global/ms-sg.js +22 -0
  1220. package/locales/angular/global/ms.js +22 -0
  1221. package/locales/angular/global/mt.js +28 -0
  1222. package/locales/angular/global/mua.js +22 -0
  1223. package/locales/angular/global/my.js +22 -0
  1224. package/locales/angular/global/mzn.js +22 -0
  1225. package/locales/angular/global/naq.js +26 -0
  1226. package/locales/angular/global/nb-sj.js +24 -0
  1227. package/locales/angular/global/nb.js +24 -0
  1228. package/locales/angular/global/nd.js +24 -0
  1229. package/locales/angular/global/nds-nl.js +22 -0
  1230. package/locales/angular/global/nds.js +22 -0
  1231. package/locales/angular/global/ne-in.js +24 -0
  1232. package/locales/angular/global/ne.js +24 -0
  1233. package/locales/angular/global/nl-aw.js +24 -0
  1234. package/locales/angular/global/nl-be.js +24 -0
  1235. package/locales/angular/global/nl-bq.js +24 -0
  1236. package/locales/angular/global/nl-cw.js +24 -0
  1237. package/locales/angular/global/nl-sr.js +24 -0
  1238. package/locales/angular/global/nl-sx.js +24 -0
  1239. package/locales/angular/global/nl.js +24 -0
  1240. package/locales/angular/global/nmg.js +22 -0
  1241. package/locales/angular/global/nn.js +24 -0
  1242. package/locales/angular/global/nnh.js +24 -0
  1243. package/locales/angular/global/no.js +24 -0
  1244. package/locales/angular/global/nus.js +22 -0
  1245. package/locales/angular/global/nyn.js +24 -0
  1246. package/locales/angular/global/om-ke.js +24 -0
  1247. package/locales/angular/global/om.js +24 -0
  1248. package/locales/angular/global/or.js +24 -0
  1249. package/locales/angular/global/os-ru.js +24 -0
  1250. package/locales/angular/global/os.js +24 -0
  1251. package/locales/angular/global/pa-arab.js +22 -0
  1252. package/locales/angular/global/pa-guru.js +24 -0
  1253. package/locales/angular/global/pa.js +24 -0
  1254. package/locales/angular/global/pcm.js +24 -0
  1255. package/locales/angular/global/pl.js +28 -0
  1256. package/locales/angular/global/ps-pk.js +24 -0
  1257. package/locales/angular/global/ps.js +24 -0
  1258. package/locales/angular/global/pt-ao.js +26 -0
  1259. package/locales/angular/global/pt-ch.js +26 -0
  1260. package/locales/angular/global/pt-cv.js +26 -0
  1261. package/locales/angular/global/pt-gq.js +26 -0
  1262. package/locales/angular/global/pt-gw.js +26 -0
  1263. package/locales/angular/global/pt-lu.js +26 -0
  1264. package/locales/angular/global/pt-mo.js +26 -0
  1265. package/locales/angular/global/pt-mz.js +26 -0
  1266. package/locales/angular/global/pt-pt.js +26 -0
  1267. package/locales/angular/global/pt-st.js +26 -0
  1268. package/locales/angular/global/pt-tl.js +26 -0
  1269. package/locales/angular/global/pt.js +26 -0
  1270. package/locales/angular/global/qu-bo.js +22 -0
  1271. package/locales/angular/global/qu-ec.js +22 -0
  1272. package/locales/angular/global/qu.js +22 -0
  1273. package/locales/angular/global/rm.js +24 -0
  1274. package/locales/angular/global/rn.js +22 -0
  1275. package/locales/angular/global/ro-md.js +26 -0
  1276. package/locales/angular/global/ro.js +26 -0
  1277. package/locales/angular/global/rof.js +24 -0
  1278. package/locales/angular/global/ru-by.js +28 -0
  1279. package/locales/angular/global/ru-kg.js +28 -0
  1280. package/locales/angular/global/ru-kz.js +28 -0
  1281. package/locales/angular/global/ru-md.js +28 -0
  1282. package/locales/angular/global/ru-ua.js +28 -0
  1283. package/locales/angular/global/ru.js +28 -0
  1284. package/locales/angular/global/rw.js +22 -0
  1285. package/locales/angular/global/rwk.js +24 -0
  1286. package/locales/angular/global/sa.js +22 -0
  1287. package/locales/angular/global/sah.js +22 -0
  1288. package/locales/angular/global/saq.js +24 -0
  1289. package/locales/angular/global/sat-olck.js +26 -0
  1290. package/locales/angular/global/sat.js +26 -0
  1291. package/locales/angular/global/sbp.js +22 -0
  1292. package/locales/angular/global/sc.js +24 -0
  1293. package/locales/angular/global/sd-arab.js +24 -0
  1294. package/locales/angular/global/sd-deva.js +22 -0
  1295. package/locales/angular/global/sd.js +24 -0
  1296. package/locales/angular/global/se-fi.js +26 -0
  1297. package/locales/angular/global/se-se.js +26 -0
  1298. package/locales/angular/global/se.js +26 -0
  1299. package/locales/angular/global/seh.js +24 -0
  1300. package/locales/angular/global/ses.js +22 -0
  1301. package/locales/angular/global/sg.js +22 -0
  1302. package/locales/angular/global/shi-latn.js +22 -0
  1303. package/locales/angular/global/shi-tfng.js +26 -0
  1304. package/locales/angular/global/shi.js +26 -0
  1305. package/locales/angular/global/si.js +24 -0
  1306. package/locales/angular/global/sk.js +28 -0
  1307. package/locales/angular/global/sl.js +28 -0
  1308. package/locales/angular/global/smn.js +26 -0
  1309. package/locales/angular/global/sn.js +24 -0
  1310. package/locales/angular/global/so-dj.js +24 -0
  1311. package/locales/angular/global/so-et.js +24 -0
  1312. package/locales/angular/global/so-ke.js +24 -0
  1313. package/locales/angular/global/so.js +24 -0
  1314. package/locales/angular/global/sq-mk.js +24 -0
  1315. package/locales/angular/global/sq-xk.js +24 -0
  1316. package/locales/angular/global/sq.js +24 -0
  1317. package/locales/angular/global/sr-cyrl-ba.js +26 -0
  1318. package/locales/angular/global/sr-cyrl-me.js +26 -0
  1319. package/locales/angular/global/sr-cyrl-xk.js +26 -0
  1320. package/locales/angular/global/sr-cyrl.js +26 -0
  1321. package/locales/angular/global/sr-latn-ba.js +22 -0
  1322. package/locales/angular/global/sr-latn-me.js +22 -0
  1323. package/locales/angular/global/sr-latn-xk.js +22 -0
  1324. package/locales/angular/global/sr-latn.js +22 -0
  1325. package/locales/angular/global/sr.js +26 -0
  1326. package/locales/angular/global/su-latn.js +22 -0
  1327. package/locales/angular/global/su.js +22 -0
  1328. package/locales/angular/global/sv-ax.js +24 -0
  1329. package/locales/angular/global/sv-fi.js +24 -0
  1330. package/locales/angular/global/sv.js +24 -0
  1331. package/locales/angular/global/sw-cd.js +24 -0
  1332. package/locales/angular/global/sw-ke.js +24 -0
  1333. package/locales/angular/global/sw-ug.js +24 -0
  1334. package/locales/angular/global/sw.js +24 -0
  1335. package/locales/angular/global/ta-lk.js +24 -0
  1336. package/locales/angular/global/ta-my.js +24 -0
  1337. package/locales/angular/global/ta-sg.js +24 -0
  1338. package/locales/angular/global/ta.js +24 -0
  1339. package/locales/angular/global/te.js +24 -0
  1340. package/locales/angular/global/teo-ke.js +24 -0
  1341. package/locales/angular/global/teo.js +24 -0
  1342. package/locales/angular/global/tg.js +22 -0
  1343. package/locales/angular/global/th.js +22 -0
  1344. package/locales/angular/global/ti-er.js +24 -0
  1345. package/locales/angular/global/ti.js +24 -0
  1346. package/locales/angular/global/tk.js +24 -0
  1347. package/locales/angular/global/to.js +22 -0
  1348. package/locales/angular/global/tr-cy.js +24 -0
  1349. package/locales/angular/global/tr.js +24 -0
  1350. package/locales/angular/global/tt.js +22 -0
  1351. package/locales/angular/global/twq.js +22 -0
  1352. package/locales/angular/global/tzm.js +24 -0
  1353. package/locales/angular/global/ug.js +24 -0
  1354. package/locales/angular/global/uk.js +28 -0
  1355. package/locales/angular/global/und.js +24 -0
  1356. package/locales/angular/global/ur-in.js +24 -0
  1357. package/locales/angular/global/ur.js +24 -0
  1358. package/locales/angular/global/uz-arab.js +22 -0
  1359. package/locales/angular/global/uz-cyrl.js +22 -0
  1360. package/locales/angular/global/uz-latn.js +24 -0
  1361. package/locales/angular/global/uz.js +24 -0
  1362. package/locales/angular/global/vai-latn.js +22 -0
  1363. package/locales/angular/global/vai-vaii.js +22 -0
  1364. package/locales/angular/global/vai.js +22 -0
  1365. package/locales/angular/global/vi.js +22 -0
  1366. package/locales/angular/global/vun.js +24 -0
  1367. package/locales/angular/global/wae.js +24 -0
  1368. package/locales/angular/global/wo.js +22 -0
  1369. package/locales/angular/global/xh.js +24 -0
  1370. package/locales/angular/global/xog.js +24 -0
  1371. package/locales/angular/global/yav.js +22 -0
  1372. package/locales/angular/global/yi.js +24 -0
  1373. package/locales/angular/global/yo-bj.js +22 -0
  1374. package/locales/angular/global/yo.js +22 -0
  1375. package/locales/angular/global/yrl-co.js +22 -0
  1376. package/locales/angular/global/yrl-ve.js +22 -0
  1377. package/locales/angular/global/yrl.js +22 -0
  1378. package/locales/angular/global/yue-hans.js +22 -0
  1379. package/locales/angular/global/yue-hant.js +22 -0
  1380. package/locales/angular/global/yue.js +22 -0
  1381. package/locales/angular/global/zgh.js +22 -0
  1382. package/locales/angular/global/zh-hans-hk.js +22 -0
  1383. package/locales/angular/global/zh-hans-mo.js +22 -0
  1384. package/locales/angular/global/zh-hans-sg.js +22 -0
  1385. package/locales/angular/global/zh-hans.js +22 -0
  1386. package/locales/angular/global/zh-hant-hk.js +22 -0
  1387. package/locales/angular/global/zh-hant-mo.js +22 -0
  1388. package/locales/angular/global/zh-hant.js +22 -0
  1389. package/locales/angular/global/zh.js +22 -0
  1390. package/locales/angular/global/zu.js +24 -0
  1391. package/locales/angular/gsw-fr.js +17 -0
  1392. package/locales/angular/gsw-li.js +17 -0
  1393. package/locales/angular/gsw.js +17 -0
  1394. package/locales/angular/gu.js +17 -0
  1395. package/locales/angular/guz.js +15 -0
  1396. package/locales/angular/gv.js +23 -0
  1397. package/locales/angular/ha-gh.js +17 -0
  1398. package/locales/angular/ha-ne.js +17 -0
  1399. package/locales/angular/ha.js +17 -0
  1400. package/locales/angular/haw.js +17 -0
  1401. package/locales/angular/he.js +21 -0
  1402. package/locales/angular/hi-latn.js +17 -0
  1403. package/locales/angular/hi.js +17 -0
  1404. package/locales/angular/hr-ba.js +19 -0
  1405. package/locales/angular/hr.js +19 -0
  1406. package/locales/angular/hsb.js +21 -0
  1407. package/locales/angular/hu.js +17 -0
  1408. package/locales/angular/hy.js +17 -0
  1409. package/locales/angular/ia.js +17 -0
  1410. package/locales/angular/id.js +15 -0
  1411. package/locales/angular/ig.js +15 -0
  1412. package/locales/angular/ii.js +15 -0
  1413. package/locales/angular/is.js +17 -0
  1414. package/locales/angular/it-ch.js +19 -0
  1415. package/locales/angular/it-sm.js +19 -0
  1416. package/locales/angular/it-va.js +19 -0
  1417. package/locales/angular/it.js +19 -0
  1418. package/locales/angular/ja.js +15 -0
  1419. package/locales/angular/jgo.js +17 -0
  1420. package/locales/angular/jmc.js +17 -0
  1421. package/locales/angular/jv.js +15 -0
  1422. package/locales/angular/ka.js +17 -0
  1423. package/locales/angular/kab.js +17 -0
  1424. package/locales/angular/kam.js +15 -0
  1425. package/locales/angular/kde.js +15 -0
  1426. package/locales/angular/kea.js +15 -0
  1427. package/locales/angular/kgp.js +15 -0
  1428. package/locales/angular/khq.js +15 -0
  1429. package/locales/angular/ki.js +15 -0
  1430. package/locales/angular/kk.js +17 -0
  1431. package/locales/angular/kkj.js +17 -0
  1432. package/locales/angular/kl.js +17 -0
  1433. package/locales/angular/kln.js +15 -0
  1434. package/locales/angular/km.js +15 -0
  1435. package/locales/angular/kn.js +17 -0
  1436. package/locales/angular/ko-kp.js +15 -0
  1437. package/locales/angular/ko.js +15 -0
  1438. package/locales/angular/kok.js +15 -0
  1439. package/locales/angular/ks-arab.js +17 -0
  1440. package/locales/angular/ks-deva.js +15 -0
  1441. package/locales/angular/ks.js +17 -0
  1442. package/locales/angular/ksb.js +17 -0
  1443. package/locales/angular/ksf.js +15 -0
  1444. package/locales/angular/ksh.js +19 -0
  1445. package/locales/angular/ku.js +17 -0
  1446. package/locales/angular/kw.js +25 -0
  1447. package/locales/angular/ky.js +17 -0
  1448. package/locales/angular/lag.js +19 -0
  1449. package/locales/angular/lb.js +17 -0
  1450. package/locales/angular/lg.js +17 -0
  1451. package/locales/angular/lkt.js +15 -0
  1452. package/locales/angular/ln-ao.js +17 -0
  1453. package/locales/angular/ln-cf.js +17 -0
  1454. package/locales/angular/ln-cg.js +17 -0
  1455. package/locales/angular/ln.js +17 -0
  1456. package/locales/angular/lo.js +15 -0
  1457. package/locales/angular/lrc-iq.js +15 -0
  1458. package/locales/angular/lrc.js +15 -0
  1459. package/locales/angular/lt.js +21 -0
  1460. package/locales/angular/lu.js +15 -0
  1461. package/locales/angular/luo.js +15 -0
  1462. package/locales/angular/luy.js +15 -0
  1463. package/locales/angular/lv.js +19 -0
  1464. package/locales/angular/mai.js +15 -0
  1465. package/locales/angular/mas-tz.js +17 -0
  1466. package/locales/angular/mas.js +17 -0
  1467. package/locales/angular/mer.js +15 -0
  1468. package/locales/angular/mfe.js +15 -0
  1469. package/locales/angular/mg.js +17 -0
  1470. package/locales/angular/mgh.js +15 -0
  1471. package/locales/angular/mgo.js +17 -0
  1472. package/locales/angular/mi.js +15 -0
  1473. package/locales/angular/mk.js +17 -0
  1474. package/locales/angular/ml.js +17 -0
  1475. package/locales/angular/mn.js +17 -0
  1476. package/locales/angular/mni-beng.js +15 -0
  1477. package/locales/angular/mni.js +15 -0
  1478. package/locales/angular/mr.js +17 -0
  1479. package/locales/angular/ms-bn.js +15 -0
  1480. package/locales/angular/ms-id.js +15 -0
  1481. package/locales/angular/ms-sg.js +15 -0
  1482. package/locales/angular/ms.js +15 -0
  1483. package/locales/angular/mt.js +21 -0
  1484. package/locales/angular/mua.js +15 -0
  1485. package/locales/angular/my.js +15 -0
  1486. package/locales/angular/mzn.js +15 -0
  1487. package/locales/angular/naq.js +19 -0
  1488. package/locales/angular/nb-sj.js +17 -0
  1489. package/locales/angular/nb.js +17 -0
  1490. package/locales/angular/nd.js +17 -0
  1491. package/locales/angular/nds-nl.js +15 -0
  1492. package/locales/angular/nds.js +15 -0
  1493. package/locales/angular/ne-in.js +17 -0
  1494. package/locales/angular/ne.js +17 -0
  1495. package/locales/angular/nl-aw.js +17 -0
  1496. package/locales/angular/nl-be.js +17 -0
  1497. package/locales/angular/nl-bq.js +17 -0
  1498. package/locales/angular/nl-cw.js +17 -0
  1499. package/locales/angular/nl-sr.js +17 -0
  1500. package/locales/angular/nl-sx.js +17 -0
  1501. package/locales/angular/nl.js +17 -0
  1502. package/locales/angular/nmg.js +15 -0
  1503. package/locales/angular/nn.js +17 -0
  1504. package/locales/angular/nnh.js +17 -0
  1505. package/locales/angular/no.js +17 -0
  1506. package/locales/angular/nus.js +15 -0
  1507. package/locales/angular/nyn.js +17 -0
  1508. package/locales/angular/om-ke.js +17 -0
  1509. package/locales/angular/om.js +17 -0
  1510. package/locales/angular/or.js +17 -0
  1511. package/locales/angular/os-ru.js +17 -0
  1512. package/locales/angular/os.js +17 -0
  1513. package/locales/angular/pa-arab.js +15 -0
  1514. package/locales/angular/pa-guru.js +17 -0
  1515. package/locales/angular/pa.js +17 -0
  1516. package/locales/angular/pcm.js +17 -0
  1517. package/locales/angular/pl.js +21 -0
  1518. package/locales/angular/ps-pk.js +17 -0
  1519. package/locales/angular/ps.js +17 -0
  1520. package/locales/angular/pt-ao.js +19 -0
  1521. package/locales/angular/pt-ch.js +19 -0
  1522. package/locales/angular/pt-cv.js +19 -0
  1523. package/locales/angular/pt-gq.js +19 -0
  1524. package/locales/angular/pt-gw.js +19 -0
  1525. package/locales/angular/pt-lu.js +19 -0
  1526. package/locales/angular/pt-mo.js +19 -0
  1527. package/locales/angular/pt-mz.js +19 -0
  1528. package/locales/angular/pt-pt.js +19 -0
  1529. package/locales/angular/pt-st.js +19 -0
  1530. package/locales/angular/pt-tl.js +19 -0
  1531. package/locales/angular/pt.js +19 -0
  1532. package/locales/angular/qu-bo.js +15 -0
  1533. package/locales/angular/qu-ec.js +15 -0
  1534. package/locales/angular/qu.js +15 -0
  1535. package/locales/angular/rm.js +17 -0
  1536. package/locales/angular/rn.js +15 -0
  1537. package/locales/angular/ro-md.js +19 -0
  1538. package/locales/angular/ro.js +19 -0
  1539. package/locales/angular/rof.js +17 -0
  1540. package/locales/angular/ru-by.js +21 -0
  1541. package/locales/angular/ru-kg.js +21 -0
  1542. package/locales/angular/ru-kz.js +21 -0
  1543. package/locales/angular/ru-md.js +21 -0
  1544. package/locales/angular/ru-ua.js +21 -0
  1545. package/locales/angular/ru.js +21 -0
  1546. package/locales/angular/rw.js +15 -0
  1547. package/locales/angular/rwk.js +17 -0
  1548. package/locales/angular/sa.js +15 -0
  1549. package/locales/angular/sah.js +15 -0
  1550. package/locales/angular/saq.js +17 -0
  1551. package/locales/angular/sat-olck.js +19 -0
  1552. package/locales/angular/sat.js +19 -0
  1553. package/locales/angular/sbp.js +15 -0
  1554. package/locales/angular/sc.js +17 -0
  1555. package/locales/angular/sd-arab.js +17 -0
  1556. package/locales/angular/sd-deva.js +15 -0
  1557. package/locales/angular/sd.js +17 -0
  1558. package/locales/angular/se-fi.js +19 -0
  1559. package/locales/angular/se-se.js +19 -0
  1560. package/locales/angular/se.js +19 -0
  1561. package/locales/angular/seh.js +17 -0
  1562. package/locales/angular/ses.js +15 -0
  1563. package/locales/angular/sg.js +15 -0
  1564. package/locales/angular/shi-latn.js +15 -0
  1565. package/locales/angular/shi-tfng.js +19 -0
  1566. package/locales/angular/shi.js +19 -0
  1567. package/locales/angular/si.js +17 -0
  1568. package/locales/angular/sk.js +21 -0
  1569. package/locales/angular/sl.js +21 -0
  1570. package/locales/angular/smn.js +19 -0
  1571. package/locales/angular/sn.js +17 -0
  1572. package/locales/angular/so-dj.js +17 -0
  1573. package/locales/angular/so-et.js +17 -0
  1574. package/locales/angular/so-ke.js +17 -0
  1575. package/locales/angular/so.js +17 -0
  1576. package/locales/angular/sq-mk.js +17 -0
  1577. package/locales/angular/sq-xk.js +17 -0
  1578. package/locales/angular/sq.js +17 -0
  1579. package/locales/angular/sr-cyrl-ba.js +19 -0
  1580. package/locales/angular/sr-cyrl-me.js +19 -0
  1581. package/locales/angular/sr-cyrl-xk.js +19 -0
  1582. package/locales/angular/sr-cyrl.js +19 -0
  1583. package/locales/angular/sr-latn-ba.js +15 -0
  1584. package/locales/angular/sr-latn-me.js +15 -0
  1585. package/locales/angular/sr-latn-xk.js +15 -0
  1586. package/locales/angular/sr-latn.js +15 -0
  1587. package/locales/angular/sr.js +19 -0
  1588. package/locales/angular/su-latn.js +15 -0
  1589. package/locales/angular/su.js +15 -0
  1590. package/locales/angular/sv-ax.js +17 -0
  1591. package/locales/angular/sv-fi.js +17 -0
  1592. package/locales/angular/sv.js +17 -0
  1593. package/locales/angular/sw-cd.js +17 -0
  1594. package/locales/angular/sw-ke.js +17 -0
  1595. package/locales/angular/sw-ug.js +17 -0
  1596. package/locales/angular/sw.js +17 -0
  1597. package/locales/angular/ta-lk.js +17 -0
  1598. package/locales/angular/ta-my.js +17 -0
  1599. package/locales/angular/ta-sg.js +17 -0
  1600. package/locales/angular/ta.js +17 -0
  1601. package/locales/angular/te.js +17 -0
  1602. package/locales/angular/teo-ke.js +17 -0
  1603. package/locales/angular/teo.js +17 -0
  1604. package/locales/angular/tg.js +15 -0
  1605. package/locales/angular/th.js +15 -0
  1606. package/locales/angular/ti-er.js +17 -0
  1607. package/locales/angular/ti.js +17 -0
  1608. package/locales/angular/tk.js +17 -0
  1609. package/locales/angular/to.js +15 -0
  1610. package/locales/angular/tr-cy.js +17 -0
  1611. package/locales/angular/tr.js +17 -0
  1612. package/locales/angular/tt.js +15 -0
  1613. package/locales/angular/twq.js +15 -0
  1614. package/locales/angular/tzm.js +17 -0
  1615. package/locales/angular/ug.js +17 -0
  1616. package/locales/angular/uk.js +21 -0
  1617. package/locales/angular/und.js +17 -0
  1618. package/locales/angular/ur-in.js +17 -0
  1619. package/locales/angular/ur.js +17 -0
  1620. package/locales/angular/uz-arab.js +15 -0
  1621. package/locales/angular/uz-cyrl.js +15 -0
  1622. package/locales/angular/uz-latn.js +17 -0
  1623. package/locales/angular/uz.js +17 -0
  1624. package/locales/angular/vai-latn.js +15 -0
  1625. package/locales/angular/vai-vaii.js +15 -0
  1626. package/locales/angular/vai.js +15 -0
  1627. package/locales/angular/vi.js +15 -0
  1628. package/locales/angular/vun.js +17 -0
  1629. package/locales/angular/wae.js +17 -0
  1630. package/locales/angular/wo.js +15 -0
  1631. package/locales/angular/xh.js +17 -0
  1632. package/locales/angular/xog.js +17 -0
  1633. package/locales/angular/yav.js +15 -0
  1634. package/locales/angular/yi.js +17 -0
  1635. package/locales/angular/yo-bj.js +15 -0
  1636. package/locales/angular/yo.js +15 -0
  1637. package/locales/angular/yrl-co.js +15 -0
  1638. package/locales/angular/yrl-ve.js +15 -0
  1639. package/locales/angular/yrl.js +15 -0
  1640. package/locales/angular/yue-hans.js +15 -0
  1641. package/locales/angular/yue-hant.js +15 -0
  1642. package/locales/angular/yue.js +15 -0
  1643. package/locales/angular/zgh.js +15 -0
  1644. package/locales/angular/zh-hans-hk.js +15 -0
  1645. package/locales/angular/zh-hans-mo.js +15 -0
  1646. package/locales/angular/zh-hans-sg.js +15 -0
  1647. package/locales/angular/zh-hans.js +15 -0
  1648. package/locales/angular/zh-hant-hk.js +15 -0
  1649. package/locales/angular/zh-hant-mo.js +15 -0
  1650. package/locales/angular/zh-hant.js +15 -0
  1651. package/locales/angular/zh.js +15 -0
  1652. package/locales/angular/zu.js +17 -0
  1653. package/locales/moment/af.js +82 -0
  1654. package/locales/moment/ar-dz.js +167 -0
  1655. package/locales/moment/ar-kw.js +66 -0
  1656. package/locales/moment/ar-ly.js +182 -0
  1657. package/locales/moment/ar-ma.js +67 -0
  1658. package/locales/moment/ar-ps.js +123 -0
  1659. package/locales/moment/ar-sa.js +116 -0
  1660. package/locales/moment/ar-tn.js +66 -0
  1661. package/locales/moment/ar.js +200 -0
  1662. package/locales/moment/az.js +113 -0
  1663. package/locales/moment/be.js +153 -0
  1664. package/locales/moment/bg.js +98 -0
  1665. package/locales/moment/bm.js +62 -0
  1666. package/locales/moment/bn-bd.js +140 -0
  1667. package/locales/moment/bn.js +130 -0
  1668. package/locales/moment/bo.js +135 -0
  1669. package/locales/moment/br.js +179 -0
  1670. package/locales/moment/bs.js +171 -0
  1671. package/locales/moment/ca.js +111 -0
  1672. package/locales/moment/cs.js +192 -0
  1673. package/locales/moment/cv.js +74 -0
  1674. package/locales/moment/cy.js +109 -0
  1675. package/locales/moment/da.js +64 -0
  1676. package/locales/moment/de-at.js +90 -0
  1677. package/locales/moment/de-ch.js +87 -0
  1678. package/locales/moment/de.js +89 -0
  1679. package/locales/moment/dv.js +101 -0
  1680. package/locales/moment/el.js +117 -0
  1681. package/locales/moment/en-au.js +79 -0
  1682. package/locales/moment/en-ca.js +75 -0
  1683. package/locales/moment/en-gb.js +79 -0
  1684. package/locales/moment/en-ie.js +79 -0
  1685. package/locales/moment/en-il.js +75 -0
  1686. package/locales/moment/en-in.js +79 -0
  1687. package/locales/moment/en-nz.js +79 -0
  1688. package/locales/moment/en-sg.js +79 -0
  1689. package/locales/moment/eo.js +79 -0
  1690. package/locales/moment/es-do.js +119 -0
  1691. package/locales/moment/es-mx.js +121 -0
  1692. package/locales/moment/es-us.js +121 -0
  1693. package/locales/moment/es.js +121 -0
  1694. package/locales/moment/et.js +89 -0
  1695. package/locales/moment/eu.js +76 -0
  1696. package/locales/moment/fa.js +124 -0
  1697. package/locales/moment/fi.js +135 -0
  1698. package/locales/moment/fil.js +69 -0
  1699. package/locales/moment/fo.js +68 -0
  1700. package/locales/moment/fr-ca.js +81 -0
  1701. package/locales/moment/fr-ch.js +85 -0
  1702. package/locales/moment/fr.js +119 -0
  1703. package/locales/moment/fy.js +86 -0
  1704. package/locales/moment/ga.js +106 -0
  1705. package/locales/moment/gd.js +106 -0
  1706. package/locales/moment/gl.js +86 -0
  1707. package/locales/moment/gom-deva.js +137 -0
  1708. package/locales/moment/gom-latn.js +135 -0
  1709. package/locales/moment/gu.js +133 -0
  1710. package/locales/moment/he.js +105 -0
  1711. package/locales/moment/hi.js +179 -0
  1712. package/locales/moment/hr.js +167 -0
  1713. package/locales/moment/hu.js +129 -0
  1714. package/locales/moment/hy-am.js +105 -0
  1715. package/locales/moment/id.js +87 -0
  1716. package/locales/moment/is.js +151 -0
  1717. package/locales/moment/it-ch.js +75 -0
  1718. package/locales/moment/it.js +117 -0
  1719. package/locales/moment/ja.js +159 -0
  1720. package/locales/moment/jv.js +87 -0
  1721. package/locales/moment/ka.js +103 -0
  1722. package/locales/moment/kk.js +93 -0
  1723. package/locales/moment/km.js +114 -0
  1724. package/locales/moment/kn.js +135 -0
  1725. package/locales/moment/ko.js +86 -0
  1726. package/locales/moment/ku-kmr.js +125 -0
  1727. package/locales/moment/ku.js +129 -0
  1728. package/locales/moment/ky.js +95 -0
  1729. package/locales/moment/lb.js +148 -0
  1730. package/locales/moment/lo.js +77 -0
  1731. package/locales/moment/lt.js +136 -0
  1732. package/locales/moment/lv.js +105 -0
  1733. package/locales/moment/me.js +128 -0
  1734. package/locales/moment/mi.js +71 -0
  1735. package/locales/moment/mk.js +97 -0
  1736. package/locales/moment/ml.js +93 -0
  1737. package/locales/moment/mn.js +111 -0
  1738. package/locales/moment/mr.js +214 -0
  1739. package/locales/moment/ms-my.js +87 -0
  1740. package/locales/moment/ms.js +86 -0
  1741. package/locales/moment/mt.js +67 -0
  1742. package/locales/moment/my.js +102 -0
  1743. package/locales/moment/nb.js +71 -0
  1744. package/locales/moment/ne.js +132 -0
  1745. package/locales/moment/nl-be.js +113 -0
  1746. package/locales/moment/nl.js +115 -0
  1747. package/locales/moment/nn.js +70 -0
  1748. package/locales/moment/oc-lnc.js +96 -0
  1749. package/locales/moment/pa-in.js +133 -0
  1750. package/locales/moment/pl.js +151 -0
  1751. package/locales/moment/pt-br.js +69 -0
  1752. package/locales/moment/pt.js +74 -0
  1753. package/locales/moment/ro.js +87 -0
  1754. package/locales/moment/ru.js +224 -0
  1755. package/locales/moment/sd.js +92 -0
  1756. package/locales/moment/se.js +68 -0
  1757. package/locales/moment/si.js +80 -0
  1758. package/locales/moment/sk.js +156 -0
  1759. package/locales/moment/sl.js +182 -0
  1760. package/locales/moment/sq.js +76 -0
  1761. package/locales/moment/sr-cyrl.js +138 -0
  1762. package/locales/moment/sr.js +140 -0
  1763. package/locales/moment/ss.js +95 -0
  1764. package/locales/moment/sv.js +79 -0
  1765. package/locales/moment/sw.js +66 -0
  1766. package/locales/moment/ta.js +142 -0
  1767. package/locales/moment/te.js +99 -0
  1768. package/locales/moment/tet.js +79 -0
  1769. package/locales/moment/tg.js +128 -0
  1770. package/locales/moment/th.js +76 -0
  1771. package/locales/moment/tk.js +102 -0
  1772. package/locales/moment/tl-ph.js +68 -0
  1773. package/locales/moment/tlh.js +135 -0
  1774. package/locales/moment/tr.js +117 -0
  1775. package/locales/moment/tzl.js +100 -0
  1776. package/locales/moment/tzm-latn.js +65 -0
  1777. package/locales/moment/tzm.js +65 -0
  1778. package/locales/moment/ug-cn.js +122 -0
  1779. package/locales/moment/uk.js +178 -0
  1780. package/locales/moment/ur.js +93 -0
  1781. package/locales/moment/uz-latn.js +65 -0
  1782. package/locales/moment/uz.js +62 -0
  1783. package/locales/moment/vi.js +91 -0
  1784. package/locales/moment/x-pseudo.js +84 -0
  1785. package/locales/moment/yo.js +64 -0
  1786. package/locales/moment/zh-cn.js +131 -0
  1787. package/locales/moment/zh-hk.js +112 -0
  1788. package/locales/moment/zh-mo.js +111 -0
  1789. package/locales/moment/zh-tw.js +110 -0
  1790. package/locales/moment-timezone/moment-timezone-with-data.js +1582 -0
  1791. package/npm-shrinkwrap.json +17 -0
  1792. package/oAuth/.npmignore +2 -0
  1793. package/oAuth/bundles/index.umd.js +495 -0
  1794. package/oAuth/fesm2022/index.mjs +478 -0
  1795. package/oAuth/fesm2022/index.mjs.map +1 -0
  1796. package/oAuth/index.d.ts +43 -0
  1797. package/oAuth/package.json +23 -0
  1798. package/package-lock.json +17 -0
  1799. package/package.json +16 -0
  1800. package/runtime/base/.npmignore +2 -0
  1801. package/runtime/base/bundles/index.umd.js +6144 -0
  1802. package/runtime/base/fesm2022/index.mjs +6180 -0
  1803. package/runtime/base/fesm2022/index.mjs.map +1 -0
  1804. package/runtime/base/index.d.ts +1426 -0
  1805. package/runtime/base/package.json +23 -0
  1806. package/runtime/dynamic/.npmignore +2 -0
  1807. package/runtime/dynamic/bundles/index.umd.js +887 -0
  1808. package/runtime/dynamic/fesm2022/index.mjs +950 -0
  1809. package/runtime/dynamic/fesm2022/index.mjs.map +1 -0
  1810. package/runtime/dynamic/index.d.ts +164 -0
  1811. package/runtime/dynamic/package.json +23 -0
  1812. package/scripts/@wavemaker/nvd3/build/nv.d3.min.js +1 -0
  1813. package/scripts/d3/d3.min.js +2 -0
  1814. package/scripts/datatable/datatable.js +3787 -0
  1815. package/scripts/iscroll/build/iscroll.js +2091 -0
  1816. package/scripts/jquery-ui/ui/widgets/droppable.js +503 -0
  1817. package/scripts/jquery-ui/ui/widgets/resizable.js +1275 -0
  1818. package/scripts/jquery-ui/ui/widgets/sortable.js +1608 -0
  1819. package/scripts/jquery.ui.touch-punch/jquery.ui.touch-punch.min.js +11 -0
  1820. package/scripts/summernote/dist/summernote-lite.min.js +2 -0
  1821. package/scripts/swipey/swipey.jquery.plugin.js +799 -0
  1822. package/scripts/tree-keyboard-navigation/keyboard-navigation.js +251 -0
  1823. package/security/.npmignore +2 -0
  1824. package/security/bundles/index.umd.js +446 -0
  1825. package/security/fesm2022/index.mjs +444 -0
  1826. package/security/fesm2022/index.mjs.map +1 -0
  1827. package/security/index.d.ts +130 -0
  1828. package/security/package.json +23 -0
  1829. package/swipey/.npmignore +2 -0
  1830. package/swipey/bundles/index.umd.js +54 -0
  1831. package/swipey/fesm2022/index.mjs +51 -0
  1832. package/swipey/fesm2022/index.mjs.map +1 -0
  1833. package/swipey/index.d.ts +21 -0
  1834. package/swipey/package.json +23 -0
  1835. package/transpiler/.npmignore +2 -0
  1836. package/transpiler/bundles/index.umd.js +814 -0
  1837. package/transpiler/fesm2022/index.mjs +808 -0
  1838. package/transpiler/fesm2022/index.mjs.map +1 -0
  1839. package/transpiler/index.d.ts +47 -0
  1840. package/transpiler/package.json +24 -0
  1841. package/variables/.npmignore +2 -0
  1842. package/variables/bundles/index.umd.js +3174 -0
  1843. package/variables/fesm2022/index.mjs +3236 -0
  1844. package/variables/fesm2022/index.mjs.map +1 -0
  1845. package/variables/index.d.ts +468 -0
  1846. package/variables/package.json +23 -0
@@ -0,0 +1,3787 @@
1
+ /*global $, window, angular, moment, _, document, parseInt, navigator*/
2
+ /**
3
+ * JQuery Datagrid widget.
4
+ */
5
+
6
+ 'use strict';
7
+
8
+ $.widget('wm.datatable', {
9
+ options: {
10
+ data: [],
11
+ statusMsg: '',
12
+ colDefs: [],
13
+ rowActions: [],
14
+ headerConfig: [],
15
+ sortInfo: {
16
+ 'field': '',
17
+ 'direction': ''
18
+ },
19
+ isMobile: false,
20
+ enableSort: true,
21
+ filtermode: '',
22
+ filteronkeypress: false,
23
+ caseinsensitive: false,
24
+ activeRow: undefined,
25
+ isrowselectable: false,
26
+ allowpagesizechange: false,
27
+ height: '100%',
28
+ showHeader: true,
29
+ selectFirstRow: false,
30
+ showNewRow: true,
31
+ showRowIndex: false,
32
+ enableRowSelection: true,
33
+ enableColumnSelection: false,
34
+ multiselect: false,
35
+ headerselectall: false,
36
+ multiselecttitle: '',
37
+ multiselectarialabel: '',
38
+ radioselecttitle:'',
39
+ radioselectarialabel: '',
40
+ filterNullRecords: true,
41
+ navigation: '',
42
+ isdynamictable: '',
43
+ cssClassNames: {
44
+ 'tableRow': 'app-datagrid-row',
45
+ 'headerCell': 'app-datagrid-header-cell',
46
+ 'groupHeaderCell': 'app-datagrid-group-header-cell',
47
+ 'tableCell': 'app-datagrid-cell',
48
+ 'grid': '',
49
+ 'gridDefault': 'table',
50
+ 'gridBody': 'app-datagrid-body',
51
+ 'gridFooter': 'app-datagrid-footer',
52
+ 'deleteRow': 'danger',
53
+ 'ascIcon': 'wi wi-long-arrow-up',
54
+ 'descIcon': 'wi wi-long-arrow-down',
55
+ 'selectedColumn': 'selected-column',
56
+ 'rowExpandIcon': 'wi wi-minus-square',
57
+ 'rowCollapseIcon': 'wi wi-plus-square',
58
+ 'gridRowExpansionClass': 'table-row-expansion',
59
+ 'expandedRowClass' : 'expanded'
60
+ },
61
+ dataStates: {
62
+ 'loading': 'Loading...',
63
+ 'ready': '',
64
+ 'error': 'An error occurred in loading the data.',
65
+ 'nodata': 'No data found.'
66
+ },
67
+ messages: {
68
+ 'selectField': 'Select Field'
69
+ },
70
+ loadingicon: '',
71
+ ondemandmessage: '',
72
+ viewlessmessage: '',
73
+ startRowIndex: 1,
74
+ editmode: '',
75
+ actionsEnabled: {
76
+ 'edit': true,
77
+ 'new': true
78
+ },
79
+ rowExpansionEnabled: false,
80
+ rowDef: {
81
+ position: '0',
82
+ closeothers: false,
83
+ columnwidth: '50px'
84
+ },
85
+ summaryRow: false,
86
+ summaryRowDefs: [],
87
+ summaryRowDefsObject: [],
88
+ searchHandler: function () {
89
+ },
90
+ sortHandler: function () {
91
+ }
92
+ },
93
+ customColumnDefs: {
94
+ 'checkbox': {
95
+ 'field': 'checkbox',
96
+ 'type': 'custom',
97
+ 'displayName': '',
98
+ 'sortable': false,
99
+ 'searchable': false,
100
+ 'resizable': false,
101
+ 'selectable': false,
102
+ 'readonly': true,
103
+ 'style': 'width: 50px; text-align: center;',
104
+ 'textAlignment': 'center',
105
+ 'isMultiSelectCol': true,
106
+ 'show': true,
107
+ 'multiselecttitle': '',
108
+ 'multiselectarialabel': ''
109
+ },
110
+ 'radio': {
111
+ 'field': 'radio',
112
+ 'type': 'custom',
113
+ 'displayName': '',
114
+ 'sortable': false,
115
+ 'searchable': false,
116
+ 'resizable': false,
117
+ 'selectable': false,
118
+ 'readonly': true,
119
+ 'style': 'width: 50px; text-align: center;',
120
+ 'textAlignment': 'center',
121
+ 'show': true,
122
+ 'radioselecttitle': '',
123
+ 'radioselectarialabel': ''
124
+ },
125
+ '__expand': {
126
+ 'field': '__expand',
127
+ 'type': 'custom',
128
+ 'displayName': '',
129
+ 'sortable': false,
130
+ 'searchable': false,
131
+ 'resizable': false,
132
+ 'selectable': false,
133
+ 'readonly': true,
134
+ 'style': 'text-align: center;',
135
+ 'textAlignment': 'center',
136
+ 'show': true,
137
+ 'width': '50px'
138
+ },
139
+ 'rowIndex': {
140
+ 'field': 'rowIndex',
141
+ 'type': 'custom',
142
+ 'displayName': 'S. No.',
143
+ 'sortable': false,
144
+ 'searchable': false,
145
+ 'selectable': false,
146
+ 'readonly': true,
147
+ 'style': 'text-align: left;',
148
+ 'textAlignment': 'left',
149
+ 'show': true
150
+ }
151
+ },
152
+ CONSTANTS: {
153
+ 'QUICK_EDIT': 'quickedit',
154
+ 'INLINE': 'inline',
155
+ 'FORM': 'form',
156
+ 'DIALOG': 'dialog',
157
+ 'SEARCH': 'search',
158
+ 'MULTI_COLUMN': 'multicolumn'
159
+ },
160
+ Utils: {
161
+ random: function () {
162
+ return Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1);
163
+ },
164
+ isDefined: function (value) {
165
+ return value !== undefined;
166
+ },
167
+ isObject: function (value) {
168
+ return value !== null && typeof value === 'object';
169
+ },
170
+ getObjectIndex: function (data, obj) {
171
+ var matchIndex = -1;
172
+ if (!Array.isArray(data)) {
173
+ return -1;
174
+ }
175
+ data.some(function (data, index) {
176
+ if (_.isEqual(data, obj)) {
177
+ matchIndex = index;
178
+ return true;
179
+ }
180
+ });
181
+ return matchIndex;
182
+ },
183
+ generateGuid: function () {
184
+ var random = this.random;
185
+ return random() + random() + '-' + random() + '-' + random() + '-' +
186
+ random() + '-' + random() + random() + random();
187
+ },
188
+ isValidHtml: function (htm) {
189
+ var validHtmlRegex = /<[a-z][\s\S]*>/i;
190
+ return validHtmlRegex.test(htm);
191
+ },
192
+ isMac: function () {
193
+ return navigator.platform.toUpperCase().indexOf('MAC') >= 0;
194
+ },
195
+ isDeleteKey: function (event) {
196
+ return (this.isMac() && event.which === 8) || event.which === 46;
197
+ }
198
+ },
199
+
200
+ /**
201
+ * used to parse styles expression and apply individual styles to a DOM node
202
+ * this is done to mitigate CSP unsafe-inline policy on styles
203
+ * @param $el
204
+ * @param styleString
205
+ * @returns {*}
206
+ * @private
207
+ */
208
+ _setStyles: function($el, styleString) {
209
+ if (!styleString) {
210
+ return;
211
+ }
212
+ var styles = styleString.split(';');
213
+ styles.forEach(function (styleBit) {
214
+ var parts = styleBit.split(':');
215
+ var property, value;
216
+ if (parts.length === 2) {
217
+ property = parts[0].trim();
218
+ value = parts[1].trim();
219
+ $el.css(property, value);
220
+ }
221
+ });
222
+ return styleString;
223
+ },
224
+
225
+ _getColumnSortDirection: function (field) {
226
+ var sortInfo = this.options.sortInfo;
227
+ return field === sortInfo.field ? sortInfo.direction : '';
228
+ },
229
+ /*Based on the spacing property, add or remove classes*/
230
+ _toggleSpacingClasses: function (value) {
231
+ switch (value) {
232
+ case 'normal':
233
+ this.tableContainer.removeClass('table-condensed');
234
+ if (this.gridSearch) {
235
+ this.gridSearch.find('.form-group').removeClass('form-group-sm');
236
+ this.gridSearch.find('select').removeClass('input-sm');
237
+ this.gridSearch.find('.input-group').removeClass('input-group-sm');
238
+ }
239
+ break;
240
+ case 'condensed':
241
+ this.tableContainer.addClass('table-condensed');
242
+ if (this.gridSearch) {
243
+ this.gridSearch.find('.form-group').addClass('form-group-sm');
244
+ this.gridSearch.find('select').addClass('input-sm');
245
+ this.gridSearch.find('.input-group').addClass('input-group-sm');
246
+ }
247
+ break;
248
+ }
249
+ },
250
+ //Method to calculate and get the column span of the header cells
251
+ _getColSpan: function (cols) {
252
+ var colSpan = 0,
253
+ self = this;
254
+ _.forEach(cols, function (col) {
255
+ var colDef;
256
+ if (col.isGroup) {
257
+ colSpan += self._getColSpan(col.columns);
258
+ } else {
259
+ colDef = _.find(self.preparedHeaderData, {'field': col.field});
260
+ //If show is false, don't increment the col span
261
+ colSpan = (!_.isUndefined(colDef.show) && !colDef.show) ? colSpan : colSpan + 1;
262
+ }
263
+ });
264
+ return colSpan;
265
+ },
266
+ //Method to set the column span of the header cells in the config
267
+ _setColSpan: function (config) {
268
+ var self = this;
269
+ _.forEach(config, function (col) {
270
+ if (col.isGroup) {
271
+ col.colspan = self._getColSpan(col.columns);
272
+ self.gridHeaderElement.find('th[data-col-group="' + col.field + '"]').attr('colspan', col.colspan);
273
+ self._setColSpan(col.columns);
274
+ }
275
+ });
276
+ },
277
+ /* Returns the table header template. */
278
+ _getHeaderTemplate: function () {
279
+
280
+ var $colgroup = $('<colgroup></colgroup>'),
281
+ $htm = this.gridHeaderElement.empty(),
282
+ isDefined = this.Utils.isDefined,
283
+ sortInfo = this.options.sortInfo,
284
+ sortField = sortInfo.field,
285
+ self = this,
286
+ rowTemplates = [],
287
+ headerConfig = this.options.headerConfig,
288
+ headerGroupClass = self.options.cssClassNames.groupHeaderCell,
289
+ $row;
290
+
291
+ function generateHeaderCell(value, index) {
292
+ var id = index,
293
+ field = value.field,
294
+ headerLabel = self.Utils.isDefined(value.displayName) ? value.displayName : (field || ''),
295
+ titleLabel = headerLabel,
296
+ sortEnabled = self.options.enableSort && (_.isUndefined(value.show) || value.show) && (_.isUndefined(value.sortable) || value.sortable),
297
+ headerClasses = self.options.cssClassNames.headerCell,
298
+ sortClass,
299
+ tl = '',
300
+ $th,
301
+ $col,
302
+ $sortSpan,
303
+ $sortIcon;
304
+ headerLabel = (!self.Utils.isDefined(headerLabel) || headerLabel === '') ? '&nbsp;' : headerLabel; //If headername is empty, add an empty space
305
+ $col = $('<col/>');
306
+ if (value.style) {
307
+ self._setStyles($col, value.style);
308
+ }
309
+ $colgroup.append($col);
310
+ /* thead */
311
+
312
+ if (isDefined(value.class)) {
313
+ headerClasses += ' ' + value.class;
314
+ }
315
+ if (value.selected) {
316
+ headerClasses += ' ' + self.options.cssClassNames.selectedColumn + ' ';
317
+ }
318
+ if (field === 'checkbox' || field === 'radio') {
319
+ headerClasses += ' grid-col-small';
320
+ }
321
+ tl += '<th';
322
+ if ((_.isUndefined(value.resizable) || value.resizable) && (_.isUndefined(value.show) || value.show)) { //If show is false, do not add the resize option
323
+ tl += ' data-col-resizable';
324
+ }
325
+ if (self.options.enableColumnSelection && (_.isUndefined(value.selectable) || value.selectable)) {
326
+ tl += ' data-col-selectable';
327
+ }
328
+ if (sortEnabled) {
329
+ tl += ' data-col-sortable';
330
+ }
331
+ tl += '></th>';
332
+ $th = $(tl);
333
+ $th.attr({
334
+ 'data-col-id': id,
335
+ 'data-col-field': field,
336
+ 'title': titleLabel,
337
+ 'tabindex': 0,
338
+ 'scope': 'col',
339
+ 'role':'columnheader'
340
+ });
341
+ self._setStyles($th, 'text-align: ' + value.textAlignment)
342
+ $th.addClass(headerClasses);
343
+ /* For custom columns, show display name if provided, else don't show any label. */
344
+ if (field === 'checkbox') {
345
+ $th.append(self._getCheckbox());
346
+ }
347
+ if (field === 'radio') {
348
+ $th.attr('aria-label', "Select row");
349
+ }
350
+ $th.append('<span class="header-data">' + headerLabel + '</span>');
351
+ if (sortEnabled) { //If sort info is present, show the sort icon for that column on grid render
352
+ $sortSpan = $('<span class="sort-buttons-container"></span>');
353
+ $sortIcon = $('<i class="sort-icon"></i>');
354
+ if (sortField && sortField === value.field && sortInfo.direction) {
355
+ sortClass = sortInfo.direction === 'asc' ? self.options.cssClassNames.ascIcon : self.options.cssClassNames.descIcon;
356
+ $sortSpan.addClass('active');
357
+ $sortIcon.addClass(sortClass + ' ' + sortInfo.direction);
358
+ }
359
+ $th.append($sortSpan.append($sortIcon));
360
+ }
361
+ return $th;
362
+ }
363
+
364
+ //Method to generate the header row based on the column group config
365
+ function generateRow(cols, i) {
366
+ var $thList = [];
367
+ _.forEach(cols, function (col) {
368
+ var index,
369
+ value,
370
+ classes,
371
+ styles,
372
+ $groupTl;
373
+ if (col.columns && col.columns.length) {
374
+ //If columns is present, this is a group header cell.
375
+ $groupTl = $('<th></th>');
376
+ classes = headerGroupClass + ' ' + (col.class || '');
377
+ styles = 'text-align: ' + col.textAlignment + ';background-color: ' + (col.backgroundColor || '') + ';';
378
+ $groupTl.attr({
379
+ 'data-col-group': col.field,
380
+ 'class': classes,
381
+ 'title': col.displayName,
382
+ 'tabindex': 0
383
+ });
384
+ self._setStyles($groupTl, styles);
385
+ $groupTl.append('<span class="header-data">' + col.displayName + '</span>');
386
+ $thList.push($groupTl);
387
+ generateRow(col.columns, (i + 1));
388
+ } else {
389
+ //For non group cells, fetch the relative field definition and generate the template
390
+ index = _.findIndex(self.preparedHeaderData, {'field': col.field});
391
+ value = self.preparedHeaderData[index];
392
+ if (value) {
393
+ $thList.push(generateHeaderCell(value, index));
394
+ }
395
+ }
396
+ });
397
+ rowTemplates[i] = rowTemplates[i] || [];
398
+ rowTemplates[i] = rowTemplates[i].concat($thList);
399
+ }
400
+
401
+ //If header config is not present, this is a dynamic grid. Generate headers directly from field defs
402
+ if (_.isEmpty(headerConfig)) {
403
+ $row = $('<tr></tr>');
404
+ self.preparedHeaderData.forEach(function (value, index) {
405
+ $row.append(generateHeaderCell(value, index));
406
+ });
407
+ $htm.append($row);
408
+ } else {
409
+ generateRow(headerConfig, 0);
410
+ //Combine all the row templates to generate the header
411
+ rowTemplates.forEach(function($thList, index) {
412
+ $row = $('<tr role="row" tabindex="0"></tr>');
413
+ // To fix ADA issue "Tables headers in datatable must refer to data cells"
414
+ var rowSpan = rowTemplates.length - index;
415
+ //append all t-heads to the tr
416
+ $thList.forEach(function($th) {
417
+ // if rowspan > 1, apply it to all non-group t-heads
418
+ if (rowSpan > 1 && $th.hasClass('app-datagrid-header-cell')) {
419
+ $th.attr('rowspan', rowSpan);
420
+ }
421
+ $row.append($th);
422
+ });
423
+ $htm.append($row);
424
+ });
425
+ }
426
+
427
+ return {'colgroup': $colgroup, 'header': $htm};
428
+ },
429
+
430
+ /* Returns the seachbox template. */
431
+ _getSearchEl: function () {
432
+ var htm,
433
+ sel = '<select name="wm-datatable" data-element="dgFilterValue" ' +
434
+ 'class="form-control app-select">' +
435
+ '<option value="" selected class="placeholder">' + this.options.messages.selectField + '</option>',
436
+ searchLabel = (this.Utils.isDefined(this.options.searchLabel) &&
437
+ this.options.searchLabel.length) ? this.options.searchLabel : '';
438
+ this.options.colDefs.forEach(function (colDef, index) {
439
+ if (colDef.field !== 'none' && colDef.field !== 'rowOperations' && colDef.searchable && _.toString(colDef.showinfilter) !== 'false') {
440
+ sel += '<option value="' + colDef.field +
441
+ '" data-coldef-index="' + index + '">' +
442
+ (colDef.displayName || colDef.field) + '</option>';
443
+ }
444
+ });
445
+
446
+ sel += '</select>';
447
+ htm =
448
+ '<form class="form-search form-inline" onsubmit="return false;"><div class="form-group">' +
449
+ '<input type="text" data-element="dgSearchText" class="form-control app-textbox" value="" placeholder="' + searchLabel + '"/>' +
450
+ '</div><div class="input-append input-group">' +
451
+ sel +
452
+ '<span class="input-group-addon"><button type="button" data-element="dgSearchButton" class="app-search-button" title="' + searchLabel + '">' +
453
+ '<i class="wi wi-search"></i>' +
454
+ '</button></span>' +
455
+ '</div>' +
456
+ '</div></form>';
457
+ var $htm = $(htm);
458
+ this._setStyles($htm.find('[data-element="dgSearchText"]'), "display: inline-block;");
459
+ return $htm;
460
+ },
461
+ _appendRowExpansionButtons: function ($htm) {
462
+ var self = this;
463
+ $htm.find("[data-identifier='rowExpansionButtons']").each(function (index) {
464
+ var _rowData, $row, rowId, rowIndex = index;
465
+ $row = $(this).closest('tr.app-datagrid-row');
466
+ rowId = parseInt($row.attr('data-row-id'), 10);
467
+ _rowData = _.clone(self.options.data[rowId]);
468
+ _rowData.$index = rowIndex + 1;
469
+ self.options.generateRowExpansionCell(_rowData, rowIndex);
470
+ $(this).empty().append(self.options.getRowExpansionAction(rowIndex));
471
+ var expandtitleExpr = $(this).children()[0].getAttribute('expandtitle.bind'),
472
+ collapsetitleExpr = $(this).children()[0].getAttribute('collapsetitle.bind');
473
+
474
+ if(expandtitleExpr) {
475
+ self.options.registerCollapseOrExpandTitleWatch(expandtitleExpr, _rowData, rowIndex, "expandtitle", $(this).children()[0]);
476
+ }
477
+ if(collapsetitleExpr) {
478
+ self.options.registerCollapseOrExpandTitleWatch(collapsetitleExpr, _rowData, rowIndex, "collapsetitle", $(this).children()[0]);
479
+ }
480
+
481
+ });
482
+ },
483
+
484
+ setSummaryRowDef: function (key, data, rowIndex, refreshIndicator) {
485
+ this.options.summaryRow = true;
486
+ if (this.options.summaryRowDefs[rowIndex] == undefined) {
487
+ this.options.summaryRowDefs[rowIndex] = {};
488
+ this.options.summaryRowDefsObject[rowIndex] = {};
489
+ }
490
+ this.options.summaryRowDefsObject[rowIndex][key] = data;
491
+ this.options.summaryRowDefs[rowIndex][key] = (data && data.value) ? data.value : data;
492
+ if (refreshIndicator) this.refreshGridData();
493
+ },
494
+
495
+ /* Returns the tbody markup. */
496
+ _getSummaryRowTemplate: function () {
497
+ var self = this,
498
+ $tfoot = $('<tfoot class="' + this.options.cssClassNames.gridFooter + '"></tfoot>');
499
+ this._setStyles($tfoot, "border-top: 3px solid #eee;");
500
+
501
+ _.forEach(this.options.summaryRowDefs, function (row, index) {
502
+ row.$$pk = index;
503
+ $tfoot.append(self._getRowTemplate(row, index, true));
504
+ });
505
+
506
+ return $tfoot;
507
+ },
508
+
509
+
510
+ /* function to get start index of the current active page */
511
+ getPageStartIndex: function() {
512
+ // Guard against undefined getCurrentPage or getPageSize functions
513
+ var getCurrentPageFn = this.options.getCurrentPage;
514
+ var getPageSizeFn = this.options.getPageSize;
515
+ var currentPage, pagesize;
516
+ if (!getCurrentPageFn || typeof getCurrentPageFn !== 'function') {
517
+ // Default to page 1 if getCurrentPage is not available
518
+ currentPage = 1;
519
+ } else {
520
+ currentPage = getCurrentPageFn();
521
+ }
522
+ if (!getPageSizeFn || typeof getPageSizeFn !== 'function') {
523
+ // Default to 10 if getPageSize is not available
524
+ pagesize = 10;
525
+ } else {
526
+ pagesize = getPageSizeFn();
527
+ }
528
+ var isPrevPageUpdated = this.options.actionRowPage < currentPage;
529
+ var pageIndex = isPrevPageUpdated ? this.options.actionRowPage : currentPage;
530
+ return ((pageIndex - 1) * pagesize);
531
+ },
532
+
533
+ /*
534
+ function which filters the Prepared Data list and remove the rowdata if it is already present in the table
535
+ */
536
+ _getPreparedDataForInfiniteScroll : function ($tbody, preparedData) {
537
+ preparedData = preparedData.filter(function(row, index) {
538
+ var isExists = $tbody.find('tr.app-datagrid-row[data-row-id=' + row.$$pk + ']');
539
+ if (!isExists.length) { return row;}
540
+ })
541
+ return preparedData;
542
+ },
543
+
544
+ // when the edit action is performed, update the tr with the new data
545
+ _updateTrData : function ($tbody) {
546
+ var editedRow,updatedRowData, self = this;
547
+ editedRow = $tbody.find('tr.app-datagrid-row[data-row-id=' + self.options.actionRowIndex + ']');
548
+ updatedRowData = self.preparedData[self.options.actionRowIndex];
549
+ self.options.generateCustomExpressions(updatedRowData, self.options.actionRowIndex);
550
+ var rowTemplate = self._getRowTemplate(updatedRowData, self.options.actionRowIndex);
551
+ editedRow.replaceWith(rowTemplate[0]);
552
+ },
553
+
554
+ /*
555
+ handles the edit, search-sort operations performed on table with pagination type infinite scroll or On-demand
556
+ -> when search-sort is performed, clear the tbody
557
+ -> when the edit is performed update the tr with newly updated data
558
+ */
559
+ _handleCRUDForInfiniteScroll : function ($tbody) {
560
+ var self = this;
561
+
562
+ //When search or sort applied or dataset is updated, clear the tbody and render with filtered data
563
+ // Fix for [WMS-23263] 'isDataUpdatedByUser' flag is true when dataset is updated from script
564
+ if ((self.options.lastActionPerformed === self.options.ACTIONS.SEARCH_OR_SORT || self.options.lastActionPerformed === self.options.ACTIONS.FILTER_CRITERIA || self.options.lastActionPerformed === self.options.ACTIONS.DATASET_UPDATE) && (self.options.isSearchTrigerred || self.options.isDatasetUpdated || self.options.isDataUpdatedByUser)) {
565
+ $tbody.html('');
566
+ // In case of on demand pagination, when the next page is not disabled show the loading/load more button accordingly
567
+ if(this.options.navigation === 'On-Demand' && !this.options.isLastPage)
568
+ this.element.find('.on-demand-datagrid').show();
569
+ // Fix for [WMS-22904]- clearing customExpr and RowDetailExpr whenever tbody content is cleared
570
+ self.options.clearCustomExpression();
571
+ self.options.clearRowDetailExpression();
572
+ self.options.setIsSearchTrigerred(false);
573
+ self.options.setIsDatasetUpdated(false);
574
+ }
575
+
576
+ //In edit mode, replace the tr with newly updated values
577
+ else if (self.options.lastActionPerformed === self.options.ACTIONS.EDIT && self.options.actionRowIndex !== undefined && self.options.editmode !== this.CONSTANTS.QUICK_EDIT) {
578
+ self._updateTrData($tbody);
579
+ }
580
+ },
581
+
582
+ /* Returns the tbody markup. */
583
+ _getGridTemplate: function () {
584
+
585
+ var self = this, preparedData,$tbody,pageStartIndex = self.getPageStartIndex(),
586
+ startRowIndex = self.options.startRowIndex,
587
+ isScrollorOnDemand = self.options.isNavTypeScrollOrOndemand();
588
+ var $activeRow = self.gridElement.find('tr.row-editing:not(.always-new-row)').first();
589
+ var index = $activeRow.index();
590
+ if(isScrollorOnDemand) {
591
+ $tbody = this.gridElement;
592
+ if(this.renderTableOnViewLess) {
593
+ $tbody = this.gridElement.empty();
594
+ this.hideLoadingIndicator();
595
+ // this.addNavigationControls();
596
+ this.renderTableOnViewLess = false;
597
+ }
598
+ } else {
599
+ $tbody = this.gridElement.empty();
600
+ }
601
+
602
+ if(isScrollorOnDemand) {
603
+ this._handleCRUDForInfiniteScroll($tbody);
604
+ //Increment the startRowIndex, when delete action is prformed.
605
+ if (self.options.lastActionPerformed === self.options.ACTIONS.DELETE) {
606
+ startRowIndex = self.options.actionRowIndex + 1;
607
+ }
608
+ preparedData = this._getPreparedDataForInfiniteScroll($tbody, this.preparedData.slice(pageStartIndex));
609
+ } else {
610
+ // if navigation type is not scroll or on-Demand then clear CustomExpressions and RowDetailExpression
611
+ // as the expressions will be generated again
612
+ this.options.clearCustomExpression();
613
+ this.options.clearRowDetailExpression();
614
+ preparedData = this.preparedData;
615
+ }
616
+ _.forEach(preparedData, function (row, index) {
617
+ var _row = _.clone(row), rowIndex = (isScrollorOnDemand) ? startRowIndex + index - 1 : index, rowTemplate;
618
+ _row.$index = rowIndex + 1;
619
+ self.options.generateCustomExpressions(_row, rowIndex);
620
+ self.options.registerRowNgClassWatcher(_row, rowIndex);
621
+ rowTemplate = self._getRowTemplate(row, rowIndex);
622
+ $tbody.append(rowTemplate);
623
+ if (self.options.rowExpansionEnabled) {
624
+ var rowHeight = self.options.rowDef.height;
625
+ var colSpanLength = _.filter(self.preparedHeaderData, function(c) {return c.show}).length;
626
+ var $tr = $('<tr class="app-datagrid-detail-row" tabindex="0" role="row" data-row-id="' + row.$$pk + '"><td colspan="' + colSpanLength + '" class="app-datagrid-row-details-cell">' +
627
+ '<div class="row-overlay"><div class="row-status"><i class="' + self.options.loadingicon + '"></i></div></div><div class="details-section"></div>' +
628
+ '</td></tr>');
629
+ if (rowHeight) {
630
+ $tr.find('div.row-overlay').css('min-height', rowHeight);
631
+ }
632
+ $tr.css('display', 'none')
633
+ $tr.find('.details-section').css('display', 'none');
634
+ $tbody.append($tr);
635
+ }
636
+ });
637
+ // set last action performed to default and clear action row index, after generating templates
638
+ // Fix for [WMS-23263] For Dynamic table _getGridTemplate() is being called twice
639
+ // so reset the lastActionPerformed flag if it is not dynamic table
640
+ if (!this.options.isdynamictable) {
641
+ this.options.setLastActionPerformed(this.options.ACTIONS.DEFAULT);
642
+ this.options.setIsDataUpdatedByUser(false);
643
+ this.options.clearActionRowIndex();
644
+ }
645
+ if(this.options.editmode===this.CONSTANTS.QUICK_EDIT){
646
+ if (index>=0) {
647
+ const $newActiveRow = self.gridElement.find('tr').eq(index);
648
+ if ($newActiveRow && $newActiveRow.length) {
649
+ $newActiveRow.addClass('active');
650
+ $newActiveRow.trigger('click', [undefined, {action: 'edit', skipFocus:false}]);
651
+ self.setActiveRow($newActiveRow);
652
+ self.focusActiveRow();
653
+ }
654
+ }}
655
+ return $tbody;
656
+ },
657
+
658
+ /* Returns the table row template. */
659
+ _getRowTemplate: function (row, rowIndex, summaryRow) {
660
+ var $htm,
661
+ self = this,
662
+ gridOptions = self.options;
663
+
664
+ $htm = $('<tr role="row" tabindex="0" class="' + gridOptions.cssClassNames.tableRow + ' ' + (gridOptions.rowClass || '') + '" data-row-id="' + row.$$pk + '"></tr>');
665
+ this.preparedHeaderData.forEach(function (current, colIndex) {
666
+ $htm.append(self._getColumnTemplate(row, colIndex, current, rowIndex, summaryRow));
667
+ });
668
+ return $htm;
669
+ },
670
+
671
+ _getRowActionsColumnDefIndex: function () {
672
+ var i, len = this.preparedHeaderData.length;
673
+ for (i = 0; i < len; i += 1) {
674
+ if (this.preparedHeaderData[i].field === 'rowOperations') {
675
+ return i;
676
+ }
677
+ }
678
+ return -1;
679
+ },
680
+
681
+ _getRowActionsColumnDef: function () {
682
+ var index = this._getRowActionsColumnDefIndex();
683
+ if (index !== -1) {
684
+ return this.preparedHeaderData[index];
685
+ }
686
+ return null;
687
+ },
688
+
689
+ /* Returns the checkbox template. */
690
+ _getCheckboxTemplate: function (row, isMultiSelectCol) {
691
+ var checked = row._checked === true ? ' checked' : '',
692
+ disabled = row.disabed ? ' disabled' : '',
693
+ chkBoxName = isMultiSelectCol ? 'gridMultiSelect' : '',
694
+ labelClass = row._checked === true ? '' : 'unchecked';
695
+
696
+ return this._getCheckbox(labelClass, chkBoxName, checked, disabled);
697
+ },
698
+
699
+ /* Return checkbox literal */
700
+ _getCheckbox: function (labelClass = '', chkBoxName = '', checked = '', disabled = '') {
701
+ return `<div class="app-checkbox checkbox">
702
+ <label class="${labelClass}">
703
+ <span class="sr-only" aria-live="assertive">${this._getCheckboxLabel(chkBoxName)}</span>
704
+ <input type="checkbox" name="${chkBoxName}" ${checked} ${disabled} role="checkbox">
705
+ <span class="caption"></span>
706
+ </label>
707
+ </div>`
708
+ },
709
+
710
+ _getCheckboxLabel: function (chkBoxName) {
711
+ if (chkBoxName) { // it is a row
712
+ return 'Select row';
713
+ } else {
714
+ return 'Select all rows';
715
+ }
716
+ },
717
+ /* Returns the radio template. */
718
+ _getRadioTemplate: function (row) {
719
+ var checked = row._checked === true ? ' checked' : '',
720
+ disabled = row.disabed ? ' disabled' : '';
721
+ return `<div class="radio app-radio">
722
+ <label>
723
+ <input type="radio" rowSelectInput name="" value="" ${checked} ${disabled}>
724
+ <span class="caption"></span>
725
+ </label>
726
+ </div>`;
727
+ },
728
+
729
+ /* Returns the table cell template. */
730
+ _getColumnTemplate: function (row, colId, colDef, rowIndex, summaryRow) {
731
+ var $htm,
732
+ columnValue,
733
+ columnValueObject,
734
+ cellPreloader = '<div class="overlay"><span aria-hidden="true" class="form-field-spinner fa fa-circle-o-notch fa-spin form-control-feedback"></span></div>',
735
+ customExpressionHtml,
736
+ innerTmpl,
737
+ classes = this.options.cssClassNames.tableCell + ' ' + (colDef.class || ''),
738
+ colExpression = colDef.customExpression,
739
+ styles = "text-align: " + colDef.textAlignment + ";position: relative;"
740
+
741
+ $htm = $('<td class="' + classes + '" data-col-id="' + colId + '" role="cell" tabindex="0"></td>');
742
+ this._setStyles($htm, styles);
743
+
744
+ columnValue = _.get(row, colDef.field);
745
+
746
+ if (summaryRow) {
747
+ columnValueObject = this.options.summaryRowDefsObject[rowIndex][colDef.field];
748
+ if (columnValueObject instanceof Object) {
749
+ if (columnValueObject.class) {
750
+ $htm.addClass(columnValueObject.class);
751
+ }
752
+ }
753
+
754
+ if (columnValue instanceof Promise) {
755
+ customExpressionHtml = cellPreloader;
756
+ $htm.html(customExpressionHtml);
757
+ } else {
758
+ innerTmpl = (_.isUndefined(columnValue) || columnValue === null) ? '' : columnValue;
759
+ $htm.html(innerTmpl);
760
+ }
761
+ } else if (colExpression) {
762
+ $htm.html(this.options.getCustomExpression(colDef.field, rowIndex));
763
+ } else {
764
+ if (colDef.type !== 'custom') {
765
+ columnValue = _.get(row, colDef.field);
766
+ /* 1. Show "null" values as null if filterNullRecords is true, else show empty string.
767
+ * 2. Show "undefined" values as empty string. */
768
+ if ((this.options.filterNullRecords && columnValue === null) ||
769
+ _.isUndefined(columnValue)) {
770
+ columnValue = '';
771
+ }
772
+ $htm.attr('title', columnValue);
773
+ //Add empty quote, to convert boolean false to 'false', so that value is rendered
774
+ $htm.text("" + columnValue);
775
+ } else {
776
+ switch (colDef.field) {
777
+ case 'checkbox':
778
+ if(Array.isArray(this.options.multiselecttitle)) {
779
+ $htm.attr('title',this.options.multiselecttitle[row.$$index-1])
780
+ } else{
781
+ $htm.attr('title',this.options.multiselecttitle);
782
+ }
783
+ if(Array.isArray(this.options.multiselectarialabel)) {
784
+ $htm.attr('aria-label',this.options.multiselectarialabel[row.$$index-1])
785
+ } else{
786
+ $htm.attr('aria-label',this.options.multiselectarialabel);
787
+ }
788
+ innerTmpl = this._getCheckboxTemplate(row, colDef.isMultiSelectCol);
789
+ break;
790
+ case '__expand':
791
+ innerTmpl = '<span class="row-expansion-column" data-identifier="rowExpansionButtons"></span>';
792
+ break;
793
+ case 'radio':
794
+ if(Array.isArray(this.options.radioselecttitle)) {
795
+ $htm.attr('title',this.options.radioselecttitle[row.$$index-1])
796
+ } else{
797
+ $htm.attr('title',this.options.radioselecttitle);
798
+ }
799
+ if(Array.isArray(this.options.radioselectarialabel)) {
800
+ $htm.attr('aria-label',this.options.radioselectarialabel[row.$$index-1])
801
+ } else{
802
+ $htm.attr('aria-label',this.options.radioselectarialabel);
803
+ }
804
+ innerTmpl = this._getRadioTemplate(row);
805
+ break;
806
+ case 'rowOperations':
807
+ innerTmpl = '<span class="actions-column" data-identifier="actionButtons"></span>';
808
+ break;
809
+ case 'rowIndex':
810
+ innerTmpl = row.$$index;
811
+ break;
812
+ case 'none':
813
+ innerTmpl = '';
814
+ break;
815
+ default:
816
+ innerTmpl = (_.isUndefined(columnValue) || columnValue === null) ? '' : columnValue;
817
+ }
818
+ $htm.html(innerTmpl);
819
+ }
820
+ }
821
+ row.$index = rowIndex + 1;
822
+ this.options.registerColNgClassWatcher(row, colDef, rowIndex, colId, summaryRow);
823
+ return $htm;
824
+ },
825
+ //Get event related template for editable widget
826
+ _getEventTemplate: function (colDef) {
827
+ var events = _.filter(_.keys(colDef), function (key) {
828
+ return _.startsWith(key, 'on');
829
+ }),
830
+ changeEvt,
831
+ template = '';
832
+ //On change events for the widget
833
+ changeEvt = colDef.editWidgetType === 'autocomplete' ? 'onSubmit' : 'onChange';
834
+ events = _.union(events, [changeEvt]);
835
+ _.forEach(events, function (eventName) {
836
+ template += ' ' + _.kebabCase(eventName) + '="';
837
+ if (eventName === 'onSubmit' || eventName === 'onChange') {
838
+ template += '_' + eventName + 'Field($event, $scope, newVal, oldVal);'
839
+ }
840
+ template += (colDef[eventName] || '') + '" ';
841
+ });
842
+ return template;
843
+ },
844
+ _insertFieldInHeaderConfig: function (headerConfig, fieldName, position) {
845
+ var index = _.findIndex(headerConfig, {field: position}),
846
+ self = this;
847
+ if (index === -1) {
848
+ _.forEach(headerConfig, function (config) {
849
+ if (config.isGroup) {
850
+ self._insertFieldInHeaderConfig(config.columns, fieldName, position);
851
+ }
852
+ });
853
+ } else {
854
+ headerConfig.splice(index + 1, 0, {'field': fieldName, 'isPredefined': true});
855
+ }
856
+ },
857
+ setHeaderConfigForDefaultFields: function (name, position) {
858
+ if (_.isEmpty(this.options.headerConfig)) {
859
+ return;
860
+ }
861
+ var fieldName = this.customColumnDefs[name].field;
862
+ _.remove(this.options.headerConfig, {'field': fieldName});
863
+ if (position === '0') {
864
+ this.options.headerConfig.unshift({'field': fieldName, 'isPredefined': true});
865
+ } else if (position === '-1') {
866
+ this.options.headerConfig.push({'field': fieldName, 'isPredefined': true});
867
+ } else {
868
+ this._insertFieldInHeaderConfig(this.options.headerConfig, fieldName, position);
869
+ }
870
+ },
871
+ setDefaultColsData: function (header) {
872
+ //If columns are not present, do not add the default columns
873
+ if (_.isEmpty(this.preparedHeaderData)) {
874
+ return;
875
+ }
876
+ var rowExpandPosition,
877
+ rowExpandCol;
878
+ if (this.options.rowExpansionEnabled) {
879
+ rowExpandPosition = this.options.rowDef.position;
880
+ rowExpandCol = _.clone(this.customColumnDefs.__expand);
881
+ rowExpandCol.width = this.options.rowDef.columnwidth;
882
+ if (header) {
883
+ if (rowExpandPosition === '-1') {
884
+ this.preparedHeaderData.push(rowExpandCol);
885
+ } else if (rowExpandPosition === '0') {
886
+ this.preparedHeaderData.unshift(rowExpandCol);
887
+ } else {
888
+ var index = _.findIndex(this.preparedHeaderData, {field: rowExpandPosition});
889
+ this.preparedHeaderData.splice(index + 1, 0, rowExpandCol);
890
+ }
891
+ }
892
+ this.setHeaderConfigForDefaultFields('__expand', rowExpandPosition);
893
+ }
894
+ if (this.options.showRowIndex) {
895
+ if (header) {
896
+ this.preparedHeaderData.unshift(this.customColumnDefs.rowIndex);
897
+ }
898
+ this.setHeaderConfigForDefaultFields('rowIndex', '0');
899
+ }
900
+ if (this.options.multiselect) {
901
+ if (header) {
902
+ this.preparedHeaderData.unshift(this.customColumnDefs.checkbox);
903
+ }
904
+ this.setHeaderConfigForDefaultFields('checkbox', '0');
905
+ }
906
+ if (!this.options.multiselect && this.options.showRadioColumn) {
907
+ if (header) {
908
+ this.preparedHeaderData.unshift(this.customColumnDefs.radio);
909
+ }
910
+ this.setHeaderConfigForDefaultFields('radio', '0');
911
+ }
912
+ },
913
+ /* Prepares the grid header data by adding custom column definitions if needed. */
914
+ _prepareHeaderData: function () {
915
+ this.preparedHeaderData = [];
916
+
917
+ $.extend(this.preparedHeaderData, this.options.colDefs);
918
+ this.setDefaultColsData(true);
919
+ },
920
+
921
+ /* Generates default column definitions from given data. */
922
+ _generateCustomColDefs: function () {
923
+ var colDefs = [],
924
+ generatedColDefs = {};
925
+
926
+ function generateColumnDef(key) {
927
+ if (!generatedColDefs[key]) {
928
+ var colDef = {
929
+ 'type': 'string',
930
+ 'field': key
931
+ };
932
+ colDefs.push(colDef);
933
+ generatedColDefs[key] = true;
934
+ }
935
+ }
936
+
937
+ this.options.data.forEach(function (item) {
938
+ _.keys(item).forEach(generateColumnDef);
939
+ });
940
+
941
+ this.options.colDefs = colDefs;
942
+ this._prepareHeaderData();
943
+ },
944
+
945
+ /* Prepares the grid data by adding a primary key to each row's data. */
946
+ _prepareData: function () {
947
+ var data = [],
948
+ colDefs = this.options.colDefs,
949
+ self = this,
950
+ gridData = [],
951
+ pageStartIndex = self.getPageStartIndex(),
952
+ isObject = this.Utils.isObject,
953
+ isDefined = this.Utils.isDefined;
954
+ if (!this.options.colDefs.length && this.options.data.length) {
955
+ this._generateCustomColDefs();
956
+ }
957
+ gridData = this.options.isNavTypeScrollOrOndemand() ? this.options.data.slice(pageStartIndex) : this.options.data;
958
+ gridData.forEach(function (item, i) {
959
+ var rowData = $.extend(true, {}, item);
960
+ colDefs.forEach(function (colDef) {
961
+ if (!colDef.field) {
962
+ return;
963
+ }
964
+ var fields = colDef.field.split('.'),
965
+ text = item,
966
+ j,
967
+ len = fields.length,
968
+ key,
969
+ isArray;
970
+
971
+ for (j = 0; j < len; j++) {
972
+ key = fields[j];
973
+ isArray = undefined;
974
+ if (key.indexOf('[0]') !== -1) {
975
+ key = key.replace('[0]', '');
976
+ isArray = true;
977
+ }
978
+ if (isObject(text) && !isArray) {
979
+ text = _.get(text, key);
980
+ } else if (isArray) {
981
+ text = _.get(text, key + '[0]');
982
+ } else {
983
+ text = undefined;
984
+ break;
985
+ }
986
+ }
987
+ if (isDefined(text)) {
988
+ rowData[colDef.field] = text;
989
+ } else if (fields.length > 1 && _.has(item, colDef.field)) {
990
+ /* For case when coldef field name has ".", but data is in
991
+ * format [{'foo.bar': 'test'}], i.e. when the key value is
992
+ * not a nested object but a primitive value.
993
+ * (Ideally if coldef name has ".", for e.g. field name 'foo.bar',
994
+ * data should be [{'foo': {'bar': 'test'}})*/
995
+ rowData[colDef.field] = item[colDef.field];
996
+ }
997
+ });
998
+
999
+ /* Add a unique identifier for each row. */
1000
+ rowData.$$index = pageStartIndex + i + 1;
1001
+ rowData.$$pk = (self.options.isNavTypeScrollOrOndemand()) ? (pageStartIndex + i ) : i;
1002
+ data.push(rowData);
1003
+ });
1004
+ if (self.options.isNavTypeScrollOrOndemand()) {
1005
+ // If search action is performed or dataset is updated, then directly assign data to preparedData
1006
+ if((self.options.isSearchTrigerred && !self.emptySearch) || self.options.isDatasetUpdated){
1007
+ self.preparedData = data;
1008
+ }
1009
+ // else update the existing data (if any edit action is performed) or push data (if the data is not present) to preparedData list.
1010
+ else if (self.preparedData.length) {
1011
+ data.forEach(function (rowData, index) {
1012
+ var rowId = pageStartIndex + index;
1013
+ // assigning updated value to prepareData list
1014
+ if (self.preparedData[rowId] && rowData.$$index === self.preparedData[rowId].$$index) {
1015
+ self.preparedData[rowId] = rowData;
1016
+ } else {
1017
+ // appending new values to preparedData
1018
+ self.preparedData.push(rowData);
1019
+ }
1020
+ })
1021
+ } else {
1022
+ // if there is no preparedData initially then push data to preparedData list
1023
+ self.preparedData.push(...data);
1024
+ }
1025
+ } else {
1026
+ self.preparedData = data;
1027
+ }
1028
+ },
1029
+
1030
+ /* Select previously selected columns after refreshing grid data. */
1031
+ _reselectColumns: function () {
1032
+ var selectedColumns = [],
1033
+ self = this;
1034
+ //If enableColumnSelection is set to true, reselect the columns on data refresh
1035
+ if (this.gridHeaderElement && this.options.enableColumnSelection) {
1036
+ selectedColumns = this.gridHeaderElement.find('th.' + this.options.cssClassNames.selectedColumn);
1037
+ //Call the column selection handler on each of the selected columns
1038
+ if (selectedColumns.length) {
1039
+ selectedColumns.each(function () {
1040
+ self.columnSelectionHandler(undefined, $(this));
1041
+ });
1042
+ }
1043
+ }
1044
+ //reset select all checkbox.
1045
+ if (this.options.multiselect) {
1046
+ this.updateSelectAllCheckboxState();
1047
+ }
1048
+ },
1049
+
1050
+ /* Initializes the grid. */
1051
+ _create: function () {
1052
+ // Add all instance specific values here.
1053
+ $.extend(this, {
1054
+ dataStatus: {
1055
+ 'message': '',
1056
+ 'state': 'ready'
1057
+ },
1058
+ preparedData: [],
1059
+ preparedHeaderData: [],
1060
+ dataStatusContainer: null,
1061
+ gridContainer: null,
1062
+ gridElement: null,
1063
+ gridHeader: null,
1064
+ gridBody: null,
1065
+ columnClickInfo: {},
1066
+ gridFooter: null,
1067
+ gridSearch: null,
1068
+ tableId: null,
1069
+ searchObj: {
1070
+ 'field': '',
1071
+ 'value': '',
1072
+ 'event': null
1073
+ },
1074
+ compiledCellTemplates: {},
1075
+ // MEMORY LEAK FIX: Store bound function for proper event listener cleanup
1076
+ // boundRowClickHandlerOnCapture: null
1077
+ });
1078
+ // TODO: Variable loading status is getting updated before dataset update. This is resulting in loader going off before data is rendered.
1079
+ // Need to update code with suitable fix. For now 250ms is added as workaround
1080
+ this._setStatus = _.debounce(function (isCreated) {
1081
+ this.__setStatus(isCreated);
1082
+ }, 100);
1083
+ this._debounceOnEnter = _.debounce(function ($target, $row, quickEdit, event) {
1084
+ this._onEnter($target, $row, quickEdit, event);
1085
+ }, 150);
1086
+ this.options.summaryRow = false;
1087
+ this.options.summaryRowDefs = [];
1088
+ this._prepareHeaderData();
1089
+ this._prepareData();
1090
+ this._render(true);
1091
+ },
1092
+ _setGridEditMode: function (val) {
1093
+ if (_.isFunction(this.options.setGridEditMode)) {
1094
+ this.options.setGridEditMode(val);
1095
+ }
1096
+ },
1097
+ /* Re-renders the whole grid. */
1098
+ _refreshGrid: function () {
1099
+ this._prepareHeaderData();
1100
+ this._prepareData();
1101
+ this._render();
1102
+ this.addOrRemoveScroll();
1103
+ this._setGridEditMode(false);
1104
+ },
1105
+
1106
+ refreshGrid: function () {
1107
+ window.clearTimeout(this.refreshGridTimeout);
1108
+ this.refreshGridTimeout = window.setTimeout(this._refreshGrid.bind(this), 50);
1109
+ },
1110
+ /* Function to call the renderGrid method for infinite scroll pagination type
1111
+ * Remove the markup of grid-footer and always-new-row
1112
+ * */
1113
+ callRenderGridForInfiniteScroll: function() {
1114
+ this.gridFooter.remove();
1115
+ var $alwaysNewRow = this.gridElement.find('> tr.app-datagrid-row.always-new-row');
1116
+ if ($alwaysNewRow.length) {
1117
+ $alwaysNewRow.remove();
1118
+ }
1119
+ this._renderGrid(undefined);
1120
+ },
1121
+ /* Re-renders the table body. */
1122
+ refreshGridData: function () {
1123
+ this._prepareData();
1124
+ //If the pagination type is not Infinite Scroll or On-demand, remove the tbody and footer
1125
+ if (!this.options.isNavTypeScrollOrOndemand()) {
1126
+ this.gridFooter.remove();
1127
+ this._renderGrid();
1128
+ } else {
1129
+ this.callRenderGridForInfiniteScroll();
1130
+ }
1131
+ this._reselectColumns();
1132
+ this.addOrRemoveScroll();
1133
+ this._setGridEditMode(false);
1134
+ this.toggleNewRowActions(false);
1135
+ },
1136
+ //Populate row data with default data
1137
+ setDefaultRowData: function (rowData) {
1138
+ _.forEach(this.preparedHeaderData, function (colDef) {
1139
+ rowData[colDef.field] = colDef.defaultvalue;
1140
+ });
1141
+ },
1142
+ /* Inserts a new blank row in the table. */
1143
+ addNewRow: function (skipFocus, alwaysNewRow) {
1144
+ var rowId = this.gridElement.find('> tr.app-datagrid-row:visible').length || 99999, //Dummy value if rows are not there
1145
+ self = this,
1146
+ rowData = {},
1147
+ $row,
1148
+ $gridBody,
1149
+ $alwaysNewRow;
1150
+
1151
+ if (!alwaysNewRow && _.isFunction(this.options.beforeRowInsert)) {
1152
+ this.options.beforeRowInsert();
1153
+ }
1154
+
1155
+ $gridBody = this.gridElement;
1156
+ $alwaysNewRow = $gridBody.find('> tr.app-datagrid-row.always-new-row');
1157
+ //Focus the new row if already present
1158
+ if ($alwaysNewRow.length) {
1159
+ this.setFocusOnElement(undefined, $alwaysNewRow);
1160
+ // QUICK EDIT MODE | On Add Click on new row, trigger save action
1161
+ if(this.options.editmode===this.CONSTANTS.QUICK_EDIT){
1162
+ var $qTarget = $alwaysNewRow.find("input").length>0?$($alwaysNewRow.find("input")[0]):null;
1163
+ if($qTarget!==null){
1164
+ var event = $.Event("keydown");
1165
+ event.which = 13;
1166
+ $qTarget.trigger(event);
1167
+ }
1168
+ }
1169
+ return;
1170
+ }
1171
+
1172
+ rowData.$index = rowId;
1173
+ rowData.$$pk = rowId;
1174
+ if (this.options.editmode !== this.CONSTANTS.FORM && this.options.editmode !== this.CONSTANTS.DIALOG) {
1175
+ $row = $(this._getRowTemplate(rowData, rowData.$index));
1176
+ if (!this.preparedData.length) {
1177
+ this.setStatus('ready', this.dataStatus.ready);
1178
+ }
1179
+ //Based on the form position, add new row at top or bottom
1180
+ if (this.options.formPosition === 'top') {
1181
+ $gridBody.prepend($row);
1182
+ } else {
1183
+ $gridBody.append($row);
1184
+ }
1185
+ this._appendRowActions($row, true, rowData);
1186
+ this.attachEventHandlers($row);
1187
+ //For quick edit, do not remove the delete button
1188
+ if (alwaysNewRow || this.options.editmode !== this.CONSTANTS.QUICK_EDIT) {
1189
+ $row.find('.delete-row-button').hide();
1190
+ //Hide the edit button for always new row
1191
+ if (alwaysNewRow) {
1192
+ $row.find('.edit-row-button').hide()
1193
+ }
1194
+ }
1195
+ this._findAndReplaceCompiledTemplates();
1196
+
1197
+ //For always show new row, make the row editable with default values
1198
+ if (alwaysNewRow) {
1199
+ this.setDefaultRowData(rowData);
1200
+
1201
+ $row.addClass('always-new-row').addClass('row-editing');
1202
+ this.options.runInNgZone(function () {
1203
+ self.makeRowEditable($row, rowData, true);
1204
+ });
1205
+ } else {
1206
+ $row.trigger('click', [undefined, {action: 'edit', operation: 'new', skipFocus: skipFocus}]);
1207
+ }
1208
+
1209
+ this.updateSelectAllCheckboxState();
1210
+ this.addOrRemoveScroll();
1211
+ this.options.timeoutCall(function () {
1212
+ self.setColGroupWidths();
1213
+ }, 100);
1214
+ }
1215
+ },
1216
+
1217
+ /* Inserts a load more button at the end of the table when the pagination selected is on demand */
1218
+ addLoadMoreBtn : function (onDemandMsg, loadingdatamsg, cb, infScroll) {
1219
+ // Show Load more button only if it not the last page
1220
+ var $btnEl;
1221
+ if (!this.options.isLastPage || infScroll) {
1222
+ var self = this;
1223
+ var $parenEl = $('<div class="on-demand-datagrid"><a class="app-button btn btn-block on-demand-load-btn"></a></div>');
1224
+ $btnEl = $parenEl.find('a');
1225
+ $btnEl.append(onDemandMsg);
1226
+ // Adding load more button in case of on demand pagination
1227
+ this.element.find('.app-grid-header-inner').append($parenEl);
1228
+ if(infScroll) {
1229
+ if(this.element.find('.on-demand-load-btn').length) {
1230
+ this.element.find('.on-demand-load-btn').text(this.options.viewlessmessage);
1231
+ }
1232
+ }
1233
+
1234
+ // Adding click event to the button
1235
+ $btnEl.on('click', function (e) {
1236
+ // when the button is clicked, hide the button and show loading indicator
1237
+ var lastPage = (self.options.getCurrentPage() == self.options.getPageCount());
1238
+ if(!lastPage) {
1239
+ self.showLoadingIndicator(loadingdatamsg, false);
1240
+ }
1241
+ if(!self.options.showviewlessbutton){
1242
+ $btnEl.hide();
1243
+ }
1244
+ if(infScroll) {
1245
+ if(lastPage) {
1246
+ self.element.find('.on-demand-datagrid').remove();
1247
+ }
1248
+ }
1249
+ // Fix for [WMS-23839] refresh data when clicked on View less button
1250
+ if (lastPage && self.options.showviewlessbutton) {
1251
+ $btnEl.hide();
1252
+ self.renderTableOnViewLess = true;
1253
+ self.renderPaginationOnViewLess = true;
1254
+ self.options.enableNavigation();
1255
+ self._renderGrid();
1256
+ }
1257
+ if (cb && typeof cb === 'function') {
1258
+ cb(e);
1259
+ }
1260
+
1261
+ });
1262
+ }
1263
+
1264
+ },
1265
+
1266
+ /* Shows loading indicator when clicked on load more button or in case of infinite scroll event is triggered */
1267
+ showLoadingIndicator: function (loadingdatamsg, infScroll) {
1268
+ var hasLoadingEl = this.element.find('.loading-data-msg');
1269
+ var $dataGrid = this.element.find('.on-demand-datagrid');
1270
+ if (hasLoadingEl.length && !infScroll) {
1271
+ // in case of on demand pagination, show the loading ele which was hidden
1272
+ hasLoadingEl.show();
1273
+ } else if (infScroll && $dataGrid.length) {
1274
+ // in case of infinite scroll show the demand-grid ele which was hidden
1275
+ $dataGrid.show();
1276
+ } else {
1277
+ // if the loading indicator ele is not created, create it and append it to grid ele if it is already present.
1278
+ // If not create grid ele and then append the loading indicator to grid ele
1279
+ var $loadingEl = $('<div class="loading-data-msg spin-icon-in-center"><span><i class="app-icon panel-icon fa-spin ' + this.options.loadingicon + '"></i>' +
1280
+ '<span class="sr-only">Loading</span><span class="loading-text"></span></span></div>');
1281
+ $loadingEl.find('.loading-text').html(loadingdatamsg);
1282
+ if ($dataGrid.length) {
1283
+ $dataGrid.append($loadingEl);
1284
+ } else {
1285
+ var gridEl = $('<div class="on-demand-datagrid">' + $loadingEl[0].outerHTML + '</div>');
1286
+ this.element.find('.app-grid-header-inner').append(gridEl);
1287
+ }
1288
+ }
1289
+ },
1290
+
1291
+ /* Hides loading indicator and shows load more button */
1292
+ hideLoadingIndicator: function (showLoadBtn, infScroll) {
1293
+ if (!showLoadBtn && !infScroll) {
1294
+ // In case of on demand pagination, when the next page is not disabled hide the individual elements
1295
+ this.element.find('.loading-data-msg').hide();
1296
+ this.element.find('.on-demand-load-btn').text(this.options.ondemandmessage);
1297
+ this.element.find('.on-demand-load-btn').show();
1298
+ } else if(this.options.getCurrentPage && typeof this.options.getCurrentPage === 'function' &&
1299
+ this.options.getPageCount && typeof this.options.getPageCount === 'function' &&
1300
+ (this.options.getCurrentPage() == this.options.getPageCount()) && this.options.showviewlessbutton) {
1301
+ this.element.find('.on-demand-load-btn').show().text(this.options.viewlessmessage);
1302
+ this.element.find('.loading-data-msg').hide();
1303
+ if(infScroll) {
1304
+ if(!this.element.find('.on-demand-load-btn').length) {
1305
+ this.options.addLoadMoreBtn();
1306
+ }
1307
+ this.element.find('.loading-data-msg').hide();
1308
+ }
1309
+ } else {
1310
+ this.element.find('.on-demand-datagrid').hide();
1311
+ }
1312
+ },
1313
+
1314
+ /* Returns the selected rows in the table. */
1315
+ getSelectedRows: function () {
1316
+ this.getSelectedColumns();
1317
+ var selectedRowsData = [],
1318
+ self = this;
1319
+
1320
+ this.preparedData.forEach(function (data, i) {
1321
+ if (data._selected) {
1322
+ selectedRowsData.push(self.options.data[i]);
1323
+ }
1324
+ });
1325
+ return selectedRowsData;
1326
+ },
1327
+ /* Sets the selected rows in the table. */
1328
+ selectRows: function (rows) {
1329
+ var self = this;
1330
+ var _rows = _.isArray(rows) ? rows.slice() : [rows];
1331
+ /*Deselect all the previous selected rows in the table*/
1332
+ self.gridElement.find('tr.app-datagrid-row').each(function (index) {
1333
+ if (self.preparedData[index] && self.preparedData[index]._selected === true) {
1334
+ $(this).trigger('click', [$(this), {skipSingleCheck: true}]);
1335
+ }
1336
+ });
1337
+ /*Select the given row. If rows is an array, loop through the array and set the row*/
1338
+ if (_.isArray(_rows)) {
1339
+ _.forEach(_rows, function (row) {
1340
+ self.selectRow(row, true);
1341
+ });
1342
+ } else {
1343
+ self.selectRow(_rows, true);
1344
+ }
1345
+ },
1346
+ toggleRowFilter: function(show) {
1347
+ if (this.options.filtermode === this.CONSTANTS.MULTI_COLUMN && this.gridSearch) {
1348
+ if (show) {
1349
+ this.gridSearch.show();
1350
+ } else {
1351
+ this.gridSearch.hide();
1352
+ }
1353
+ }
1354
+ },
1355
+ /*Set the default widths for the colgroup*/
1356
+ setColGroupWidths: function () {
1357
+ var self = this,
1358
+ headerCols = this.options.isMobile ? this.tableContainer.find('col') : this.tableContainer.find('col'),
1359
+ bodyCols = this.tableContainer.find('col'),
1360
+ headerCells = this.options.showHeader ? this.gridContainer.find('th.app-datagrid-header-cell') : this.gridElement.find('tr.app-datagrid-row').first().find('td'),
1361
+ colLength = this.preparedHeaderData.length,
1362
+ scrollLeft = this.gridElement.parent().prop('scrollLeft'); //Preserve the scroll left to keep the same scroll after setting width
1363
+ if (!headerCols.length && !headerCells.length) {
1364
+ return;
1365
+ }
1366
+ //Set the col spans for the header groups
1367
+ this._setColSpan(this.options.headerConfig);
1368
+ // Hide the row filter. As different widgets are present inside row filter, this will effect the column size
1369
+ this.toggleRowFilter();
1370
+
1371
+ // Find if cols of colgroup has any width defined, if yes remove those columns from colsLen
1372
+ var definedColWidth = 0;
1373
+ var colsLen = headerCols.length;
1374
+ headerCols.each(function () {
1375
+ var eachColWidth = $(this).width();
1376
+ if (eachColWidth) {
1377
+ definedColWidth = definedColWidth + eachColWidth;
1378
+ colsLen = colsLen - 1;
1379
+ }
1380
+ });
1381
+
1382
+
1383
+ //First Hide or show the column based on the show property so that width is calculated correctly
1384
+ headerCells.each(function () {
1385
+ var id = Number($(this).attr('data-col-id')),
1386
+ colDef = self.preparedHeaderData[id],
1387
+ $headerCell = self.gridContainer.find('th[data-col-id="' + id + '"]'),
1388
+ $tdCell = self.gridElement.find('td.app-datagrid-cell[data-col-id="' + id + '"]'),
1389
+ $footCell=self.tableContainer.find('tfoot tr.app-datagrid-row td.app-datagrid-cell[data-col-id="' + id + '"]'),
1390
+ $headerCol = $(headerCols[id]),
1391
+ $bodyCol = $(bodyCols[id]),
1392
+ definedWidth,
1393
+ width;
1394
+ if (!colDef) {
1395
+ return;
1396
+ }
1397
+ definedWidth = colDef.width;
1398
+ if (!_.isUndefined(colDef.show) && !colDef.show) { //If show is false, set width to 0 to hide the column
1399
+ //Hide the header and column if show is false
1400
+ $headerCell.hide();
1401
+ $tdCell.hide();
1402
+ $headerCol.hide();
1403
+ $bodyCol.hide();
1404
+ $footCell.hide();
1405
+ } else {
1406
+ $headerCell.show();
1407
+ $tdCell.show();
1408
+ $headerCol.show();
1409
+ $bodyCol.show();
1410
+ $footCell.show();
1411
+ }
1412
+ //If default width is set, reset the width so that correct width is set on reload
1413
+ if ($headerCol.length && $headerCol[0].style.width === '90px') {
1414
+ width = _.isUndefined(definedWidth) ? '' : definedWidth;
1415
+ $headerCol.css('width', width);
1416
+ $bodyCol.css('width', width);
1417
+ }
1418
+ });
1419
+ //setting the header col width based on the content width
1420
+ headerCells.each(function () {
1421
+ var $header = $(this),
1422
+ id = Number($header.attr('data-col-id')),
1423
+ colDef = self.preparedHeaderData[id],
1424
+ definedWidth,
1425
+ width,
1426
+ tempWidth,
1427
+ $headerCol;
1428
+ if (!colDef) {
1429
+ return;
1430
+ }
1431
+ definedWidth = colDef.width;
1432
+ if (!_.isUndefined(colDef.show) && !colDef.show) { //If show is false, set width to 0 to hide the column
1433
+ //Hide the header and column if show is false
1434
+ width = 0;
1435
+ } else {
1436
+ if ($header.hasClass('grid-col-small')) { //For checkbox or radio, set width as 30
1437
+ width = 50;
1438
+ } else {
1439
+ if (_.isUndefined(definedWidth) || definedWidth === '' || _.includes(definedWidth, '%')) {
1440
+ $headerCol = $(headerCols[id]);
1441
+ if ($headerCol.length) {
1442
+ tempWidth = $headerCol[0].style.width;
1443
+ if (tempWidth === '' || tempWidth === '0px' || tempWidth === '90px' || _.includes(tempWidth, '%')) { //If width is not 0px, width is already set. So, set the same width again
1444
+ width = $header.width();
1445
+ /*
1446
+ * WMS-21545: In case of tabs / accordions / wizard, width of $header is not available for inactive panes
1447
+ * In such cases, calculating the width of column cells against the closest parent whose width is available
1448
+ */
1449
+ if (width <= 0) {
1450
+ var currentNode = $header;
1451
+ var elemWidth = width;
1452
+ var padding = 0;
1453
+ while (elemWidth <= 0) {
1454
+ currentNode = currentNode.parent();
1455
+ elemWidth = currentNode.width();
1456
+ // Find padding of all the elements which are on top of table
1457
+ if (currentNode.find('table').length && currentNode.prop('style')) {
1458
+ padding = padding + parseFloat(currentNode.css('padding-left')) + parseFloat(currentNode.css('padding-right'));
1459
+ }
1460
+ }
1461
+ if (elemWidth > 0) {
1462
+ // remove padding from parent elem width to avoid assign extra width to table columns
1463
+ if (padding) {
1464
+ elemWidth = elemWidth - padding;
1465
+ }
1466
+
1467
+ // If the width is provided in % for inactive panes, convert % to pixel
1468
+ if (_.includes(tempWidth, '%')) {
1469
+ var widthPercent = parseInt(tempWidth);
1470
+ var pixelWidth = (elemWidth)*(widthPercent/100);
1471
+ width = pixelWidth;
1472
+ } else { // Else divide the parent width by the number of columns available
1473
+ // If any columns have defined width, remove that width from parent elem width
1474
+ var parentWidth = (definedColWidth && definedColWidth > 0) ? elemWidth - definedColWidth : elemWidth;
1475
+ // ColsLen has length of columns whose width is undefined
1476
+ var totalCols = colsLen ? colsLen : headerCols.length;
1477
+ width = parentWidth / totalCols;
1478
+ width = width > 90 ? ((colLength === id + 1) ? width - 17 : width) : 90; //columnSanity check to prevent width being too small and Last column, adjust for the scroll width
1479
+ }
1480
+ } else {
1481
+ width = width > 90 ? ((colLength === id + 1) ? width - 17 : width) : 90; // fallback to the older approach
1482
+ }
1483
+ } else {
1484
+ width = width > 90 ? ((colLength === id + 1) ? width - 17 : width) : 90; //columnSanity check to prevent width being too small and Last column, adjust for the scroll width
1485
+ }
1486
+ } else {
1487
+ width = tempWidth;
1488
+ }
1489
+ }
1490
+ } else {
1491
+ width = definedWidth;
1492
+ }
1493
+ }
1494
+ }
1495
+ $(headerCols[id]).css('width', width);
1496
+ $(bodyCols[id]).css('width', width);
1497
+ });
1498
+ this.toggleRowFilter(true);
1499
+ this.gridElement.parent().prop('scrollLeft', scrollLeft);
1500
+ this.gridHeaderElement.parent().prop('scrollLeft', scrollLeft);
1501
+ },
1502
+
1503
+ /* Returns the selected columns in the table. */
1504
+ getSelectedColumns: function () {
1505
+ var selectedColsData = {},
1506
+ headerData = [],
1507
+ self = this,
1508
+ multiSelectColIndex,
1509
+ radioColIndex,
1510
+ colIndex;
1511
+ $.extend(headerData, this.preparedHeaderData);
1512
+
1513
+ if (this.options.multiselect) {
1514
+ headerData.some(function (item, i) {
1515
+ if (item.field === 'checkbox') {
1516
+ multiSelectColIndex = i;
1517
+ return true;
1518
+ }
1519
+ });
1520
+ headerData.splice(multiSelectColIndex, 1);
1521
+ } else if (this.options.showRadioColumn) {
1522
+ headerData.some(function (item, i) {
1523
+ if (item.field === 'radio') {
1524
+ radioColIndex = i;
1525
+ return true;
1526
+ }
1527
+ });
1528
+ headerData.splice(radioColIndex, 1);
1529
+ }
1530
+ if (this.options.showRowIndex) {
1531
+ headerData.some(function (item, i) {
1532
+ if (item.field === 'rowIndex') {
1533
+ colIndex = i;
1534
+ return true;
1535
+ }
1536
+ });
1537
+ headerData.splice(colIndex, 1);
1538
+ }
1539
+
1540
+ headerData.forEach(function (colDef) {
1541
+ var field = colDef.field;
1542
+ if (colDef.selected) {
1543
+ selectedColsData[field] = {
1544
+ 'colDef': colDef,
1545
+ 'colData': self.options.data.map(function (data) {
1546
+ return data[field];
1547
+ })
1548
+ };
1549
+ }
1550
+ });
1551
+ return selectedColsData;
1552
+ },
1553
+
1554
+ /* Sets the options for the grid. */
1555
+ _setOption: function (key, value) {
1556
+ this._super(key, value);
1557
+ switch (key) {
1558
+ case 'enableSort':
1559
+ if (this.tableContainer?.length) {
1560
+ this.refreshSortHeader(); // Refresh the table header and update column widths when sort is enabled/disabled
1561
+ }
1562
+ break;
1563
+ case 'enableColumnSelection':
1564
+ if (this.tableContainer?.length) {
1565
+ this.refreshSortHeader(); // Refresh the table header and update column widths when column selection is enabled/disabled
1566
+ }
1567
+ break;
1568
+ case 'showHeader':
1569
+ this._toggleHeader();
1570
+ this._toggleSearch();
1571
+ this.setColGroupWidths();
1572
+ this.addOrRemoveScroll();
1573
+ break;
1574
+ case 'filtermode':
1575
+ this._toggleSearch();
1576
+ break;
1577
+ case 'searchLabel':
1578
+ if (this.gridSearch) {
1579
+ this.gridSearch.find('[data-element="dgSearchText"]').attr('placeholder', value);
1580
+ this.gridSearch.find('[data-element="dgSearchButton"]').attr('title', value);
1581
+ }
1582
+ break;
1583
+ case 'selectFirstRow':
1584
+ this.selectFirstRow(value);
1585
+ break;
1586
+ case 'data':
1587
+ if(!this.isResetSortIconsDone) {
1588
+ this.setSortIconDefault();
1589
+ }
1590
+ this.refreshGridData();
1591
+ break;
1592
+ case 'dataStates':
1593
+ if (this.dataStatus.state === 'nodata') {
1594
+ this.setStatus('nodata', this.dataStatus.nodata);
1595
+ } else if (this.dataStatus.state === 'loading') {
1596
+ this.setStatus('loading');
1597
+ }
1598
+ break;
1599
+ case 'loadingicon':
1600
+ this.dataStatusContainer.find('i').removeClass().addClass(this.options.loadingicon);
1601
+ break;
1602
+ case 'colDefs':
1603
+ if(this.options.isNavTypeScrollOrOndemand() && this.options.isNextPageData) {
1604
+ this.tableContainer.find('colgroup').remove();
1605
+ this._prepareHeaderData();
1606
+ this.setColGroupWidths();
1607
+ this._renderHeader();
1608
+ this._renderSearch();
1609
+ this.attachEventHandlers(this.gridElement);
1610
+ this._reselectColumns();
1611
+ this.addOrRemoveScroll();
1612
+ break;
1613
+ }
1614
+ case 'multiselecttitle':
1615
+ case 'multiselectarialabel':
1616
+ case 'radioselecttitle':
1617
+ case 'radioselectarialabel':
1618
+ case 'multiselect': // Fallthrough
1619
+ case 'showRadioColumn':
1620
+ case 'isrowselectable' :
1621
+ case 'rowActions':
1622
+ case 'filterNullRecords':
1623
+ case 'showRowIndex':
1624
+ this.refreshGrid();
1625
+ break;
1626
+ case 'cssClassNames':
1627
+ var gridClass = this.options.cssClassNames.gridDefault + ' ' + this.options.cssClassNames.grid;
1628
+ if (this.options.rowExpansionEnabled) {
1629
+ gridClass = gridClass + ' ' + this.options.cssClassNames.gridRowExpansionClass;
1630
+ }
1631
+ // Set grid class on table.
1632
+ this.tableContainer.attr('class', gridClass);
1633
+ if (this.options.spacing === 'condensed') {
1634
+ this._toggleSpacingClasses('condensed');
1635
+ }
1636
+ break;
1637
+ case 'spacing':
1638
+ this._toggleSpacingClasses(value);
1639
+ break;
1640
+ case 'messages':
1641
+ this.gridSearch && this.gridSearch.find('option.placeholder').text(value && value.selectField);
1642
+ break;
1643
+ }
1644
+ },
1645
+
1646
+ getOptions: function () {
1647
+ return this.options;
1648
+ },
1649
+
1650
+ /** function to rebuild table header and update column widths. */
1651
+ refreshSortHeader: function () {
1652
+ this._prepareHeaderData();
1653
+ if (this.options.showHeader) {
1654
+ this._renderHeader();
1655
+ this._attachHeaderEventHandlers();
1656
+ }
1657
+ this.setColGroupWidths();
1658
+ this.addOrRemoveScroll();
1659
+ },
1660
+
1661
+ /* Toggles the table header visibility. */
1662
+ _toggleHeader: function () {
1663
+ if (this.gridHeaderElement) {
1664
+ this.gridHeaderElement.empty();
1665
+ }
1666
+ if (this.tableContainer) {
1667
+ this.tableContainer.find('colgroup').remove();
1668
+ this.tableContainer.find('thead').remove();
1669
+ }
1670
+ this.setDefaultColsData();
1671
+ if (this.options.showHeader) {
1672
+ this._renderHeader();
1673
+ this._attachHeaderEventHandlers(); // Attach all event handlers specifically for the table header
1674
+ }
1675
+ },
1676
+
1677
+ /* Toggles the searchbox visibility. */
1678
+ _toggleSearch: function () {
1679
+ if (this.gridSearch) {
1680
+ this.gridSearch.remove();
1681
+ }
1682
+ if (this.options.filtermode === this.CONSTANTS.SEARCH) {
1683
+ this._renderSearch();
1684
+ } else if (this.options.filtermode === this.CONSTANTS.MULTI_COLUMN) {
1685
+ this._renderRowFilter();
1686
+ this.setColGroupWidths();
1687
+ }
1688
+ },
1689
+ /* Marks the first row as selected. */
1690
+ selectFirstRow: function (value, visible) {
1691
+ var $row,
1692
+ id;
1693
+ //If visible flag is true, select the first visible row item (Do not select the always new row)
1694
+ if (visible && this.gridElement.find('tr').is(':visible')) {
1695
+ this.__setStatus();
1696
+ $row = this.gridElement.find('tr.app-datagrid-row:visible:not(.always-new-row)').first();
1697
+ } else {
1698
+ $row = this.gridElement.find('tr.app-datagrid-row:not(.always-new-row)').first();
1699
+ }
1700
+ id = $row.attr('data-row-id');
1701
+ // Select the first row if it exists, i.e. it is not the first row being added.
1702
+ if ($row.length && this.preparedData.length) {
1703
+ this.preparedData[id]._selected = !value;
1704
+ // Triggering row click event using javascript click method because jquery trigger method is not triggering the events which are attached through javascript addEventListener method.
1705
+ $row[0].click();
1706
+ }
1707
+ },
1708
+
1709
+ /* Selects a row. */
1710
+ selectRow: function (row, value,index) {
1711
+ var rowIndex =index?index:( _.isNumber(row) ? row : this.Utils.getObjectIndex(this.options.data, row)),
1712
+ selector,
1713
+ $row;
1714
+ if (rowIndex !== -1) {
1715
+ selector = 'tr.app-datagrid-row[data-row-id=' + rowIndex + ']';
1716
+ $row = this.gridElement.find(selector);
1717
+ if ($row.length) {
1718
+ this.preparedData[rowIndex]._selected = !value;
1719
+ }
1720
+ if (value) {
1721
+ $row.trigger('click');
1722
+ } else {
1723
+ this.toggleRowSelection($row, value);
1724
+ this.options.callOnRowDeselectEvent(this.preparedData[rowIndex]);
1725
+ }
1726
+ }
1727
+ },
1728
+ /**
1729
+ * deselect a row
1730
+ */
1731
+ deselectRow: function (row) {
1732
+ this.selectRow(row, false);
1733
+ },
1734
+
1735
+ /* Toggles the table row selection. */
1736
+ toggleRowSelection: function ($row, selected, e, isSelectAll) {
1737
+ if (!$row.length) {
1738
+ return;
1739
+ }
1740
+
1741
+ var rowId = $row.attr('data-row-id'),
1742
+ $checkbox,
1743
+ $radio;
1744
+ if (!this.preparedData[rowId]) {
1745
+ return;
1746
+ }
1747
+ this.preparedData[rowId]._selected = selected;
1748
+ if (selected) {
1749
+ $row.addClass('active');
1750
+ } else {
1751
+ $row.removeClass('active');
1752
+ }
1753
+ if (this.options.showRadioColumn) {
1754
+ $radio = $row.find('td input[rowSelectInput]:radio:not(:disabled)');
1755
+ $radio.prop('checked', selected);
1756
+ $radio.attr('checked', selected ? 'checked' : null); //
1757
+ this.preparedData[rowId]._checked = selected;
1758
+ }
1759
+ if (this.options.multiselect) {
1760
+ $checkbox = $row.find('td input[name="gridMultiSelect"]:checkbox:not(:disabled)');
1761
+ $checkbox.prop('checked', selected);
1762
+ $checkbox.attr('checked', selected ? 'checked' : null);
1763
+ $checkbox.closest('label').toggleClass('unchecked', !selected);
1764
+ $checkbox.siblings('span.sr-only').text(selected ? 'Row Selected' : 'Row Deselected');
1765
+ this.preparedData[rowId]._checked = selected;
1766
+ // if we check header checkbox(select/unselect all the records) then updating selectAll checkbox state is not required.
1767
+ if (!isSelectAll) {
1768
+ this.updateSelectAllCheckboxState();
1769
+ }
1770
+ } else {
1771
+ this._deselectPreviousSelection($row, e);
1772
+ }
1773
+ },
1774
+
1775
+ /* Checks the header checkbox if all table checkboxes are checked, else unchecks it. */
1776
+ updateSelectAllCheckboxState: function () {
1777
+ if (!this.options.showHeader || !this.options.multiselect) {
1778
+ return;
1779
+ }
1780
+ //As rows visibility is checked, remove loading icon
1781
+ this.__setStatus();
1782
+ var $headerCheckbox = this.gridHeaderElement.find('th.app-datagrid-header-cell input:checkbox'),
1783
+ $tbody = this.gridElement,
1784
+ checkedItemsLength = $tbody.find('tr.app-datagrid-row:visible input[name="gridMultiSelect"]:checkbox:checked').length,
1785
+ visibleRowsLength = $tbody.find('tr.app-datagrid-row:visible').length;
1786
+
1787
+ if (!visibleRowsLength) {
1788
+ $headerCheckbox.prop('checked', false);
1789
+ return;
1790
+ }
1791
+ if (checkedItemsLength === visibleRowsLength) {
1792
+ $headerCheckbox.prop('checked', true);
1793
+ } else {
1794
+ $headerCheckbox.prop('checked', false);
1795
+ }
1796
+ },
1797
+
1798
+ // triggered on capture phase of click listener.
1799
+ // sets the selected rowdata on click.
1800
+ rowClickHandlerOnCapture: function (e, $row, options) {
1801
+ // If 'isrowselectable' property is enabled, clicking anywhere on the row will trigger its selection. Otherwise, the row will not be selected on click.
1802
+ // Also this flag works if mutliselect or radioselect is enabled.
1803
+ // In quick edit mode, clicking any part of the row switches it to edit mode, regardless of the flag setting.
1804
+ if (this.options.editmode !== this.CONSTANTS.QUICK_EDIT) {
1805
+ if ((this.options.multiselect || this.options.showRadioColumn) && !this.options.isrowselectable) {
1806
+ if (Number(this.getColInfo(e))) {
1807
+ e.stopPropagation();
1808
+ this.closeDropdown(e);
1809
+ return;
1810
+ }
1811
+ }
1812
+ }
1813
+ $row = $row || $(e.target).closest('tr.app-datagrid-row');
1814
+ var gridRow = this.gridElement.find($row);
1815
+ // WMS-21139 trigger selectedItems change when the captured click is on the current table but not on child table
1816
+ if (gridRow.length && gridRow.closest('tbody').attr('id') === this.gridElement.attr('id')) {
1817
+ var rowId = $row.attr('data-row-id');
1818
+ var rowData = this.preparedData[rowId];
1819
+ var data = this.options.data[rowId];
1820
+ this.options.assignSelectedItems(data, e, {'rowId': rowId, '_selected': rowData?._selected});
1821
+ }
1822
+ },
1823
+
1824
+ /* Handles row selection. */
1825
+ rowSelectionHandler: function (e, $row, options) {
1826
+ // If 'isrowselectable' property is enabled, clicking anywhere on the row will trigger its selection. Otherwise, the row will not be selected on click.
1827
+ // Also this flag works if mutliselect or radioselect is enabled.
1828
+ // In quick edit mode, clicking any part of the row switches it to edit mode, regardless of the flag setting.
1829
+ if (this.options.editmode !== this.CONSTANTS.QUICK_EDIT) {
1830
+ if ((this.options.multiselect || this.options.showRadioColumn) && !this.options.isrowselectable) {
1831
+ if (Number(this.getColInfo(e))) {
1832
+ e.stopPropagation();
1833
+ this.closeDropdown(e);
1834
+ return;
1835
+ }
1836
+ }
1837
+ }
1838
+ options = options || {};
1839
+ var rowId,
1840
+ rowData,
1841
+ data,
1842
+ selected,
1843
+ self = this,
1844
+ action = options.action,
1845
+ $target = $(e.target),
1846
+ isQuickEdit = this.options.editmode === this.CONSTANTS.QUICK_EDIT;
1847
+
1848
+ function callRowSelectionEvents() {
1849
+ if (selected && _.isFunction(self.options.onRowSelect)) {
1850
+ self.options.onRowSelect(data, e);
1851
+ }
1852
+ if (!selected && _.isFunction(self.options.onRowDeselect)) {
1853
+ self.options.onRowDeselect(data, e);
1854
+ }
1855
+ }
1856
+
1857
+ $row = $row || $target.closest('tr.app-datagrid-row');
1858
+
1859
+ // Fix for [WMS-20546]: If column has a value expression, an extra div is getting added inside <td>.
1860
+ // so checking if target or its parent element has the class '.app-datagrid-cell'
1861
+ if (action || (isQuickEdit && ($target.hasClass('app-datagrid-cell') || $target.closest("td.app-datagrid-cell").length) && !$row.hasClass('always-new-row'))) {
1862
+ //In case of advanced edit, Edit the row on click of a row
1863
+ options.action = options.action || 'edit';
1864
+
1865
+ if (options.operation === 'new' || self.options.actionsEnabled.edit) {
1866
+ self.toggleEditRow(e, options)
1867
+ }
1868
+
1869
+ if (options.skipSelect) {
1870
+ return;
1871
+ }
1872
+ }
1873
+ rowId = $row.attr('data-row-id');
1874
+ rowData = this.preparedData[rowId];
1875
+ data = this.options.data[rowId];
1876
+ selected = (rowData && rowData._selected) || false;
1877
+ if (!options.skipSingleCheck && (($row.hasClass('active') && !this.options.multiselect) || !rowData)) {
1878
+ if (!isQuickEdit && options.operation !== 'new') { //For quick edit, row will be in edit mode. So, no need to call events.
1879
+ callRowSelectionEvents();
1880
+ }
1881
+ return;
1882
+ }
1883
+ this.options.callOnRowClickEvent(data, e);
1884
+ selected = !selected;
1885
+ this.options.assignSelectedItems(data, e, {'rowId': rowId, '_selected': selected});
1886
+ this.toggleRowSelection($row, selected, e);
1887
+ callRowSelectionEvents();
1888
+ },
1889
+ /*Handles the double click of the grid row*/
1890
+ rowDblClickHandler: function (e, $row) {
1891
+ e.stopPropagation();
1892
+ $row = $row || $(e.target).closest('tr.app-datagrid-row');
1893
+ var rowData, rowId = $row.attr('data-row-id');
1894
+ rowData = this.preparedData[rowId];
1895
+ if (!rowData) {
1896
+ return;
1897
+ }
1898
+ if (_.isFunction(this.options.onRowDblClick)) {
1899
+ this.options.onRowDblClick(rowData, e);
1900
+ }
1901
+ },
1902
+ closePopover: function() {
1903
+ //If the DataTable is in the popover, popover shouldn't be closed
1904
+ this.options.closePopover(this.element);
1905
+ },
1906
+ closeDropdown: function(e){
1907
+ this.element[0].querySelectorAll('.app-menu').forEach(el => {
1908
+ if (el && el.classList.contains('open') && el.getAttribute('autoclose') === 'outsideClick' && e?.originalEvent?.isTrusted &&
1909
+ e.target !== el.querySelector('[dropdowntoggle]')&& e.target.parentElement!== el.querySelector('[dropdowntoggle]')) {
1910
+ el?.widget?.bsDropdown?.hide();
1911
+ }
1912
+ });
1913
+ },
1914
+ headerClickHandler: function (e) {
1915
+ var $th = $(e.target).closest('th.app-datagrid-header-cell'),
1916
+ id = $th.attr('data-col-id');
1917
+ //Closing the popovers if any present when clicked on header or while sorting
1918
+ this.closePopover();
1919
+ this.options.onHeaderClick(this.preparedHeaderData[id], e);
1920
+ },
1921
+ /* Handles column selection. */
1922
+ columnSelectionHandler: function (e, $headerCell) {
1923
+ if (e) {
1924
+ e.stopImmediatePropagation();
1925
+ }
1926
+ var $th = e ? $(e.target).closest('th.app-datagrid-header-cell') : $headerCell,
1927
+ id = $th.attr('data-col-id'),
1928
+ colDef = this.preparedHeaderData[id],
1929
+ field = colDef.field,
1930
+ selector = 'td[data-col-id="' + id + '"]',
1931
+ $column = this.gridElement.find(selector),
1932
+ selected = $column.data('selected') || false,
1933
+ colInfo = {
1934
+ colDef: colDef,
1935
+ data: this.options.data.map(function (data) {
1936
+ return data[field];
1937
+ }),
1938
+ sortDirection: this._getColumnSortDirection(colDef.field)
1939
+ },
1940
+ selectedClass = this.options.cssClassNames.selectedColumn;
1941
+ selected = !selected;
1942
+ colDef.selected = selected;
1943
+ $column.data('selected', selected);
1944
+
1945
+ if (selected) {
1946
+ $column.addClass(selectedClass);
1947
+ $th.addClass(selectedClass);
1948
+ if (_.isFunction(this.options.onColumnSelect) && e) {
1949
+ this.options.onColumnSelect(colInfo, e);
1950
+ }
1951
+ } else {
1952
+ $column.removeClass(selectedClass);
1953
+ $th.removeClass(selectedClass);
1954
+ if (_.isFunction(this.options.onColumnDeselect) && e) {
1955
+ this.options.onColumnDeselect(colInfo, e);
1956
+ }
1957
+ }
1958
+ },
1959
+ getTextValue: function (fieldName, alwaysNewRow) {
1960
+ return this.options.getFieldValue(alwaysNewRow ? fieldName + '_new' : fieldName);
1961
+ },
1962
+ getUploadedFiles: function ($el, fieldName) {
1963
+ return _.get(document.forms, [$el.find('form').attr('name'), fieldName, 'files', 0]);
1964
+ },
1965
+ isDataModified: function ($editableElements, rowData, alwaysNewRow) {
1966
+ var isDataChanged = false,
1967
+ self = this;
1968
+
1969
+ function getEpoch(val) {
1970
+ return val ? moment(val).valueOf() : val;
1971
+ }
1972
+
1973
+ $editableElements.each(function () {
1974
+ var $el = $(this),
1975
+ colId = $el.attr('data-col-id'),
1976
+ colDef = self.preparedHeaderData[colId],
1977
+ text = self.getTextValue(colDef.field, alwaysNewRow),
1978
+ originalData = _.get(rowData, colDef.field);
1979
+ if (colDef.editWidgetType === 'upload') {
1980
+ //For upload widget, check if any file is uploaded
1981
+ isDataChanged = self.getUploadedFiles($el, colDef.field) instanceof File;
1982
+ } else {
1983
+ //If new value and old value are not defined, then data is not changed
1984
+ if (!self.Utils.isDefined(text) && (originalData === null || originalData === undefined)) {
1985
+ isDataChanged = false;
1986
+ } else {
1987
+ //For datetime, compare the values in epoch format
1988
+ if (colDef.editWidgetType === 'datetime') {
1989
+ isDataChanged = !(getEpoch(originalData) === getEpoch(text));
1990
+ } else {
1991
+ isDataChanged = !(originalData == text);
1992
+ }
1993
+ }
1994
+ }
1995
+ if (isDataChanged) {
1996
+ return !isDataChanged;
1997
+ }
1998
+ });
1999
+ return isDataChanged;
2000
+ },
2001
+ //Focus the active row
2002
+ focusActiveRow: function () {
2003
+ this.gridElement.find('tr.app-datagrid-row.active').focus();
2004
+ },
2005
+ focusNewRow: function () {
2006
+ var newRow = this.gridElement.find('tr.always-new-row');
2007
+ var newRowInputs = newRow && newRow.find("input") || [];
2008
+ newRowInputs.length && newRowInputs[0].focus();
2009
+ },
2010
+ disableActions: function (val) {
2011
+ var $deleteBtns = this.gridElement.find('.delete-row-button'),
2012
+ $editBtns = this.gridElement.find('.edit-row-button');
2013
+ if (val) {
2014
+ //Disable edit and delete actions while editing a row
2015
+ $editBtns.addClass('disabled-action');
2016
+ $deleteBtns.addClass('disabled-action');
2017
+ } else {
2018
+ $editBtns.removeClass('disabled-action');
2019
+ $deleteBtns.removeClass('disabled-action');
2020
+ }
2021
+ },
2022
+ //Function to the first input element in a row
2023
+ setFocusOnElement: function (e, $el, skipDelay) {
2024
+ var $firstEl,
2025
+ $target = e && $(e.target),
2026
+ $focusEl;
2027
+ //If focused directly on the cell, focus the input in the cell
2028
+ if ($target && $target.hasClass('app-datagrid-cell')) {
2029
+ $firstEl = $target.find('input');
2030
+ } else {
2031
+ if (!$el) {
2032
+ $el = $target.closest('tr.app-datagrid-row').find('td.cell-editing');
2033
+ } else if ($el.hasClass('app-datagrid-row')) {
2034
+ $el = $el.find('td.cell-editing');
2035
+ }
2036
+
2037
+ $firstEl = $($el).first().find('input');
2038
+ if (!$firstEl.length) {
2039
+ $firstEl = $($el).first().find('textarea');
2040
+ }
2041
+ if (!$firstEl.length) {
2042
+ $firstEl = $($el).first().find('select');
2043
+ }
2044
+ if(!($(e?.target).find('td').first().hasClass('td.cell-editing'))){
2045
+ $firstEl=$el.find('td');
2046
+ }
2047
+ }
2048
+ //Focus and select the first element
2049
+ if ($firstEl.length) {
2050
+ $focusEl = $firstEl.first();
2051
+ if (skipDelay) {
2052
+ $focusEl.focus();
2053
+ $focusEl.select();
2054
+ } else {
2055
+ this.options.timeoutCall(function () {
2056
+ $focusEl.focus();
2057
+ $focusEl.select();
2058
+ });
2059
+ }
2060
+ }
2061
+ },
2062
+ removeNewRow: function ($row) {
2063
+ this.disableActions(false);
2064
+ this._setGridEditMode(false);
2065
+
2066
+ //Don't remove the always new row
2067
+ if ($row.hasClass('always-new-row')) {
2068
+ return;
2069
+ }
2070
+
2071
+ $row.attr('data-removed', true);
2072
+ $row.remove();
2073
+ if (!this.preparedData.length) {
2074
+ this.setStatus('nodata', this.dataStatus.nodata);
2075
+ }
2076
+ this.addOrRemoveScroll();
2077
+ this.toggleNewRowActions(false);
2078
+ },
2079
+ //Method to save a row which is in editable state
2080
+ saveRow: function (callBack) {
2081
+ this.gridElement.find('tr.app-datagrid-row.row-editing:not(.always-new-row)').each(function () {
2082
+ $(this).trigger('click', [undefined, {action: 'save', skipSelect: true, noMsg: true, success: callBack}]);
2083
+ });
2084
+ },
2085
+ //Method to make row editable with widgets
2086
+ makeRowEditable: function ($row, rowData, alwaysNewRow) {
2087
+ var self = this,
2088
+ $originalElements = $row.find('td.app-datagrid-cell'),
2089
+ rowId = parseInt($row.attr('data-row-id'), 10),
2090
+ $editableElements,
2091
+ _rowData = _.clone(rowData);
2092
+
2093
+ _rowData.$index = rowId + 1;
2094
+ // Function to remove validators and set form state to untouched for inline form control
2095
+ this.options.removeValidations(alwaysNewRow);
2096
+ this.options.generateInlineEditRow(_rowData, alwaysNewRow);
2097
+
2098
+ $originalElements.each(function () {
2099
+ var $el = $(this),
2100
+ cellText = $el.text(),
2101
+ id = $el.attr('data-col-id'),
2102
+ colDef = self.preparedHeaderData[id],
2103
+ value,
2104
+ editableTemplate;
2105
+
2106
+ if (!colDef.readonly) {
2107
+ value = _.get(rowData, colDef.field);
2108
+ editableTemplate = self.options.getInlineEditWidget(colDef.field, value, alwaysNewRow);
2109
+ // Fix for [WMS-27289]: In Edit mode (inline and quick edit),
2110
+ // pressing the Tab key initially focuses on the `<td>` element, and pressing Tab again moves the focus to the input widget.
2111
+ // To address this, the `tabindex` and `title` attributes are removed from the `<td>` element during Edit mode
2112
+ // and are re-applied when switching back to View mode.
2113
+ $el.removeAttr('title');
2114
+ $el.removeAttr('tabindex');
2115
+ if (!(colDef.customExpression || (colDef.formatpattern && colDef.formatpattern !== 'None'))) {
2116
+ $el.addClass('cell-editing').html(editableTemplate).data('originalText', cellText);
2117
+ } else {
2118
+ $el.addClass('cell-editing editable-expression').data('originalValue', {
2119
+ 'rowIndex': rowId,
2120
+ 'fieldName': colDef.field
2121
+ });
2122
+ $el.addClass('cell-editing editable-expression').html(editableTemplate).data('originalText', cellText);
2123
+ }
2124
+ $el.addClass('form-group');
2125
+ // Function to apply validators to Inline form controls
2126
+ if (colDef.binding !== 'rowOperations') {
2127
+ self.options.timeoutCall(function () {
2128
+ self.options.applyValidations(colDef, alwaysNewRow);
2129
+ if (colDef.required) {
2130
+ $el.addClass('required-field');
2131
+ }
2132
+ });
2133
+ } else if (colDef.required) {
2134
+ $el.addClass('required-field');
2135
+ }
2136
+ }
2137
+ });
2138
+
2139
+ $editableElements = $row.find('td.cell-editing');
2140
+ // PERFORMANCE FIX: Use event delegation on row instead of individual cell listeners
2141
+ $row.on('click.cellEdit', 'td.cell-editing', function (e) {
2142
+ e.stopPropagation();
2143
+ });
2144
+ $row.on('keydown.cellEdit', 'td.cell-editing', function (e) {
2145
+ //To prevent up and down arrows, navigating to other rows in edit mode
2146
+ if ((e.which === 38 || e.which === 40) && (e.currentTarget && !e.currentTarget.closest('.always-new-row'))) {
2147
+ e.stopPropagation();
2148
+ }
2149
+ });
2150
+ },
2151
+ // WMS-18568 changes added Save and Cancel buttons for Inline Data Table with no actions
2152
+ toggleNewRowActions: function (saveInd) {
2153
+ var self = this,
2154
+ $gridActions = $(this.element).siblings('div.panel-footer, div.panel-heading').find('div.app-datagrid-actions'),
2155
+ $newRow = this.gridElement.find('tr.app-datagrid-row.row-editing'),
2156
+ $newRowButton = $gridActions.find('i.wi-plus').closest('.app-button');
2157
+ if (this.options.editmode === this.CONSTANTS.INLINE && (this.options.rowActions.length === 0 || !_.some(this.options.rowActions, { action: 'editRow($event)' }))) {
2158
+ if (saveInd) {
2159
+ $gridActions.append('<button type="button" wmbutton="" class="btn app-button btn-default cancelNewRow" tabindex="0" accesskey="" title="Cancel">'+
2160
+ '<i aria-hidden="true" class="app-icon wi wi-cancel"></i>'+
2161
+ '<span class="sr-only">Cancel Icon</span><span class="btn-caption">Cancel</span>'+
2162
+ '</button>'+
2163
+ '<button type="button" wmbutton="" class="btn app-button btn-primary saveNewRow" tabindex="0" accesskey="" title="Save">'+
2164
+ '<i aria-hidden="true" class="app-icon wi wi-done"></i>'+
2165
+ '<span class="sr-only">Save Icon</span><span class="btn-caption">Save</span>'+
2166
+ '</button>');
2167
+ $gridActions.find('.cancelNewRow').on('click', function (event) {
2168
+ self.toggleEditRow(event, {action: 'cancel', $row: $newRow});
2169
+ });
2170
+ $gridActions.find('.saveNewRow').on('click', function (event) {
2171
+ self.toggleEditRow(event, {action: 'save', $row: $newRow});
2172
+ });
2173
+ $newRowButton.hide();
2174
+ } else {
2175
+ $('typeahead-container').removeClass('open');
2176
+ $gridActions.find('.cancelNewRow').remove();
2177
+ $gridActions.find('.saveNewRow').remove();
2178
+ $newRowButton.show();
2179
+ }
2180
+ }
2181
+ },
2182
+ _isNewRow: function ($row) {
2183
+ var rowId = parseInt($row.attr('data-row-id'), 10);
2184
+ return rowId >= this.preparedData.length || $row.hasClass('always-new-row');
2185
+ },
2186
+ /* Toggles the edit state of a row. */
2187
+ toggleEditRow: function (e, options) {
2188
+ if(e?.target && $(e.target).closest('.app-menu').length) {
2189
+ return;
2190
+ }
2191
+ options = options || {};
2192
+ this.closeDropdown(e);
2193
+ if (e) {
2194
+ e.stopPropagation();
2195
+ }
2196
+ //Closing the popovers if clicked on any row for Quick edit
2197
+ this.closePopover();
2198
+ var $row = options.$row || $(e.target).closest('tr.app-datagrid-row'),
2199
+ $editButton = $row.find('.edit-row-button'),
2200
+ $cancelButton = $row.find('.cancel-edit-row-button'),
2201
+ $saveButton = $row.find('.save-edit-row-button'),
2202
+ $deleteButton = $row.find('.delete-row-button'),
2203
+ rowData = _.cloneDeep(this.options.data[$row.attr('data-row-id')]) || {},
2204
+ self = this,
2205
+ action,
2206
+ isNewRow,
2207
+ $editableElements,
2208
+ isDataChanged = false,
2209
+ isValid,
2210
+ $requiredEls,
2211
+ alwaysNewRow = $row.hasClass('always-new-row'),
2212
+ advancedEdit = self.options.editmode === self.CONSTANTS.QUICK_EDIT,
2213
+ editOptions = {},
2214
+ rowindex=$row.attr('data-row-id');
2215
+
2216
+ // when a row is edited set actionrow variables
2217
+ this.options.setActionRowIndex($row.attr('data-row-id'));
2218
+ this.options.setLastActionPerformed(this.options.ACTIONS.EDIT);
2219
+
2220
+ //On success of update or delete
2221
+ function onSaveSuccess(skipFocus, error) {
2222
+ if (_.isFunction(options.success)) {
2223
+ options.success(skipFocus, error);
2224
+ }
2225
+ if (!advancedEdit || self.options.actionsEnabled.edit) {
2226
+ self.focusActiveRow();
2227
+ }
2228
+ }
2229
+
2230
+ if ($row.attr('data-removed') === 'true') {
2231
+ //Even after removing row, focus out is triggered and edit is called. In this case, return here
2232
+ return;
2233
+ }
2234
+ //Select the current edited row
2235
+ if (options.selectRow) {
2236
+ this.selectRow(rowData, true,rowindex);
2237
+ }
2238
+ e = e || {};
2239
+ e.data = e.data || {};
2240
+ action = e.data.action || options.action;
2241
+ if (action === 'edit') {
2242
+ if (this.options.editmode === this.CONSTANTS.INLINE) {
2243
+ this.options.callLoadInlineWidgetData();
2244
+ }
2245
+ if (advancedEdit && self.gridElement.find('tr.app-datagrid-row.row-editing:not(.always-new-row)').length) {
2246
+ //In case of advanced edit, save the previous row
2247
+ self.saveRow(function (skipFocus, error) {
2248
+ self.editSuccessHandler(skipFocus, error, e, $row, true);
2249
+ });
2250
+ return;
2251
+ }
2252
+ $row.addClass('row-editing');
2253
+ if (_.isFunction(this.options.beforeRowUpdate)) {
2254
+ this.options.beforeRowUpdate(rowData, e);
2255
+ }
2256
+
2257
+ if (self.options.editmode === self.CONSTANTS.FORM || self.options.editmode === self.CONSTANTS.DIALOG) {
2258
+ return;
2259
+ }
2260
+ //For new operation, set the rowdata from the default values
2261
+ if (options.operation === 'new') {
2262
+ self.setDefaultRowData(rowData);
2263
+ self.toggleNewRowActions(true);
2264
+ }
2265
+ //Event for on before form render. User can update row data here.
2266
+ if (_.isFunction(this.options.onBeforeFormRender)) {
2267
+ isValid = this.options.onBeforeFormRender(rowData, e, options.operation || action);
2268
+ if (isValid === false) {
2269
+ return;
2270
+ }
2271
+ }
2272
+ this._setGridEditMode(true);
2273
+ this.disableActions(true);
2274
+ $deleteButton.removeClass('disabled-action');
2275
+ this.options.runInNgZone(function () {
2276
+ self.makeRowEditable($row, rowData);
2277
+ });
2278
+ // Show editable row.
2279
+ $editButton.addClass('hidden');
2280
+ $cancelButton.removeClass('hidden');
2281
+ $saveButton.removeClass('hidden');
2282
+ $editableElements = $row.find('td.cell-editing');
2283
+ if (!options.skipFocus && $editableElements) {
2284
+ this.options.timeoutCall(function () {
2285
+ self.setFocusOnElement(e, $editableElements);
2286
+ });
2287
+ }
2288
+ //Event for on before form render. User can access form widgets here.
2289
+ if (_.isFunction(this.options.onFormRender)) {
2290
+ this.options.onFormRender($row, e, options.operation || action, $row.hasClass('always-new-row'));
2291
+ }
2292
+ } else {
2293
+ $editableElements = $row.find('td.cell-editing');
2294
+ isNewRow = self._isNewRow($row);
2295
+ if (action === 'save') {
2296
+
2297
+ if (isNewRow) {
2298
+ isDataChanged = true;
2299
+ } else {
2300
+ isDataChanged = this.isDataModified($editableElements, rowData, alwaysNewRow);
2301
+ }
2302
+
2303
+ if (isDataChanged) {
2304
+ $editableElements.each(function () {
2305
+ var $el = $(this),
2306
+ colId = $el.attr('data-col-id'),
2307
+ colDef = self.preparedHeaderData[colId],
2308
+ fields = _.split(colDef.field, '.'),
2309
+ text;
2310
+ text = self.getTextValue(colDef.field, alwaysNewRow);
2311
+ if (fields.length === 1 && colDef.editWidgetType === 'upload') {
2312
+ _.set(rowData, colDef.field, self.getUploadedFiles($el, colDef.field));
2313
+ } else {
2314
+ text = ((fields.length === 1 || isNewRow) && text === '') ? undefined : text; //Set empty values as undefined
2315
+ if (self.Utils.isDefined(text)) {
2316
+ text = text === 'null' ? null : text; //For select, null is returned as string null. Set this back to ull
2317
+ if (text === null) {
2318
+ if (fields.length > 1) {
2319
+ _.set(rowData, fields[0], text); //For related fields, set the object to null
2320
+ } else {
2321
+ if (!isNewRow) {
2322
+ _.set(rowData, colDef.field, ''); //Set to empty for normal fields
2323
+ }
2324
+ }
2325
+ } else {
2326
+ _.set(rowData, colDef.field, text);
2327
+ }
2328
+ } else {
2329
+ //Set undefined while editing the rows
2330
+ if (fields.length === 1 && !isNewRow) {
2331
+ _.set(rowData, colDef.field, text);
2332
+ }
2333
+ }
2334
+ }
2335
+ });
2336
+
2337
+ // Check for form control async state and recall save function
2338
+ if ($editableElements.find('.ng-pending').length > 0) {
2339
+ setTimeout(this.toggleEditRow.bind(this, e, options), 200);
2340
+ return;
2341
+ }
2342
+
2343
+ $requiredEls = $editableElements.find('.ng-invalid');
2344
+ //If required fields are present and value is not filled, return here
2345
+ if ($requiredEls.length > 0) {
2346
+ $requiredEls.each(function (index) {
2347
+ var $invalidTd = $(this).closest('td.app-datagrid-cell');
2348
+ if (index === 0) {
2349
+ $invalidTd.find('[focus-target]').focus();
2350
+ }
2351
+ self.options.setTouched($invalidTd.find('[formcontrolname]').attr('formcontrolname'));
2352
+ });
2353
+ if (_.isFunction(options.success)) {
2354
+ options.success(false, true);
2355
+ }
2356
+ return;
2357
+ }
2358
+
2359
+ if (isNewRow && advancedEdit && _.isEmpty(rowData)) {
2360
+ self.removeNewRow($row);
2361
+ if (_.isFunction(options.success)) {
2362
+ options.success(false, undefined, true);
2363
+ }
2364
+ return;
2365
+ }
2366
+
2367
+ if (isNewRow) {
2368
+ if (_.isFunction(this.options.onBeforeRowInsert)) {
2369
+ isValid = this.options.onBeforeRowInsert(rowData, e, editOptions);
2370
+ if (isValid === false) {
2371
+ return;
2372
+ }
2373
+ }
2374
+ this.options.onRowInsert(rowData, e, onSaveSuccess, editOptions);
2375
+ self.toggleNewRowActions(false);
2376
+ /**
2377
+ * In case of on demand and scroll paginations in inline edit mode
2378
+ * Once the new row is added remove it from the view
2379
+ * As the newly added data will be shown as the last record of the whole dataset
2380
+ */
2381
+ if (!$row.hasClass('always-new-row') && (self.options.isNavTypeScrollOrOndemand())) {
2382
+ self.removeNewRow($row);
2383
+ }
2384
+ } else {
2385
+ if (_.isFunction(this.options.onBeforeRowUpdate)) {
2386
+ isValid = this.options.onBeforeRowUpdate(rowData, e, editOptions);
2387
+ if (isValid === false) {
2388
+ return;
2389
+ }
2390
+ }
2391
+ if(this.options?.getDataSource()?.category== "wm.Variable") {
2392
+ editOptions.rowindex = rowindex;
2393
+ }
2394
+ this.options.afterRowUpdate(rowData, e, onSaveSuccess, editOptions);
2395
+ }
2396
+ } else {
2397
+ this.cancelEdit($row);
2398
+ if (!options.noMsg) {
2399
+ this.options.noChangesDetected();
2400
+ }
2401
+ if (_.isFunction(options.success)) {
2402
+ options.success(false);
2403
+ }
2404
+ }
2405
+ } else {
2406
+ if (isNewRow) {
2407
+ // close the typeahead dropdown when cancel btn is clicked
2408
+ $("typeahead-container").removeClass("open");
2409
+ self.removeNewRow($row);
2410
+ return;
2411
+ }
2412
+ // Cancel edit.
2413
+ this.cancelEdit($row);
2414
+ }
2415
+ }
2416
+ this.addOrRemoveScroll();
2417
+ },
2418
+ cancelEdit: function ($row) {
2419
+ var self = this,
2420
+ $editableElements = $row.find('td.cell-editing'),
2421
+ $cancelButton = $row.find('.cancel-edit-row-button'),
2422
+ $saveButton = $row.find('.save-edit-row-button'),
2423
+ $editButton = $row.find('.edit-row-button');
2424
+
2425
+ // when edit action is cancelled on the row clear actionrow variables
2426
+ this.options.clearActionRowIndex();
2427
+
2428
+ this.disableActions(false);
2429
+ $row.removeClass('row-editing');
2430
+ // PERFORMANCE FIX: Remove namespaced event listeners from row
2431
+ $row.off('.cellEdit');
2432
+ $editableElements.off('click');
2433
+ $editableElements.each(function () {
2434
+ var $el = $(this),
2435
+ value = $el.data('originalValue');
2436
+ // Fix for [WMS-27289]: Reassigning `tabindex` and `title` attributes to the `<td>` element when the cancel button is clicked in Edit mode.
2437
+ $el.attr('tabindex', 0);
2438
+ $el.removeClass('datetime-wrapper cell-editing required-field form-group');
2439
+ if (!value) {
2440
+ $el.text($el.data('originalText') || '');
2441
+ $el.attr('title', $el.text());
2442
+ } else {
2443
+ $el.html(self.options.getCustomExpression(value.fieldName, value.rowIndex));
2444
+ }
2445
+ });
2446
+ $('typeahead-container').removeClass('open');
2447
+ $editButton.removeClass('hidden');
2448
+ $cancelButton.addClass('hidden');
2449
+ $saveButton.addClass('hidden');
2450
+ this._setGridEditMode(false);
2451
+ },
2452
+ //Function to close the current editing row
2453
+ closeEditedRow: function () {
2454
+ var $row = this.gridElement.find('tr.app-datagrid-row.row-editing');
2455
+ if ($row.length) {
2456
+ //If new row, remove the row. Else, cancel the row edit
2457
+ if (this._isNewRow($row)) {
2458
+ this.removeNewRow($row);
2459
+ } else {
2460
+ this.cancelEdit($row);
2461
+ }
2462
+ }
2463
+ },
2464
+ hideRowEditMode: function ($row) {
2465
+ /**
2466
+ * In case of on demand and scroll paginations in quick edit mode
2467
+ * Once the new row is added, reset the row values
2468
+ * Row will always be shown to have a provision of inserting new reccords
2469
+ */
2470
+ if ($row.hasClass('always-new-row') && (this.options.isNavTypeScrollOrOndemand())) {
2471
+ this.resetNewRow($row);
2472
+ return;
2473
+ }
2474
+ var $editableElements = $row.find('td.cell-editing'),
2475
+ $editButton = $row.find('.edit-row-button'),
2476
+ $cancelButton = $row.find('.cancel-edit-row-button'),
2477
+ $saveButton = $row.find('.save-edit-row-button'),
2478
+ self = this;
2479
+ $row.removeClass('row-editing');
2480
+ // PERFORMANCE FIX: Remove namespaced event listeners from row
2481
+ $row.off('.cellEdit');
2482
+ $editableElements.off('click');
2483
+ this.disableActions(false);
2484
+ this._setGridEditMode(false);
2485
+ $editableElements.each(function () {
2486
+ var $el = $(this),
2487
+ value = $el.data('originalValue'),
2488
+ text,
2489
+ colDef;
2490
+ //Fix for [WMS-27289]: Reassigning `tabindex` and `title` attributes to the `<td>` element when the save button is clicked in Edit mode.
2491
+ $el.attr('tabindex', 0);
2492
+ $el.removeClass('datetime-wrapper cell-editing required-field form-group');
2493
+ if (!value) {
2494
+ colDef = self.preparedHeaderData[$el.attr('data-col-id')];
2495
+ text = self.getTextValue(colDef.field);
2496
+ $el.text(self.Utils.isDefined(text) ? text : '');
2497
+ $el.attr('title', $el.text());
2498
+ } else {
2499
+ $el.html(self.options.getCustomExpression(value.fieldName, value.rowIndex));
2500
+ }
2501
+ });
2502
+ $editButton.removeClass('hidden');
2503
+ $cancelButton.addClass('hidden');
2504
+ $saveButton.addClass('hidden');
2505
+ this.addOrRemoveScroll();
2506
+ },
2507
+ /* Deletes a row. */
2508
+ deleteRow: function (e) {
2509
+ e.stopPropagation();
2510
+ var $row = $(e.target).closest('tr.app-datagrid-row'),
2511
+ rowId = $row.attr('data-row-id'),
2512
+ rowData = this.options.data[rowId],
2513
+ isNewRow = this._isNewRow($row),
2514
+ className,
2515
+ isActiveRow,
2516
+ isValid,
2517
+ options = {},
2518
+ self = this;
2519
+ // when delete is clicked on the row set actionrow variables
2520
+ this.options.setActionRowIndex(rowId);
2521
+ this.options.setLastActionPerformed(this.options.ACTIONS.DELETE);
2522
+
2523
+ if (_.isFunction(this.options.beforeRowDelete)) {
2524
+ this.options.beforeRowDelete(rowData, e);
2525
+ }
2526
+ if (isNewRow) {
2527
+ this.disableActions(false);
2528
+ this._setGridEditMode(false);
2529
+ $row.attr('data-removed', true);
2530
+ $row.remove();
2531
+ if (!this.preparedData.length) {
2532
+ //On delete of a new row with no data, show no data message
2533
+ this.setStatus('nodata', this.dataStatus.nodata);
2534
+ }
2535
+ this.addOrRemoveScroll();
2536
+ return;
2537
+ }
2538
+ /* calling onbeforerowDelete callback function.*/
2539
+ if(_.isFunction(this.options.onBeforeRowDelete)) {
2540
+ isValid = this.options.onBeforeRowDelete(rowData, e, options);
2541
+ if (isValid === false) {
2542
+ return;
2543
+ }
2544
+ }
2545
+ if (_.isFunction(this.options.onRowDelete)) {
2546
+ className = this.options.cssClassNames.deleteRow;
2547
+ isActiveRow = $row.attr('class').indexOf('active') !== -1;
2548
+ if (isActiveRow) {
2549
+ $row.removeClass('active');
2550
+ }
2551
+ $row.addClass(className);
2552
+ this.options.onRowDelete(rowData, function () {
2553
+ if (isActiveRow) {
2554
+ $row.addClass('active');
2555
+ }
2556
+ $row.removeClass(className);
2557
+ self.addOrRemoveScroll();
2558
+ }, e, function (skipFocus, error) {
2559
+ if (self.options.isNavTypeScrollOrOndemand()) {
2560
+ var rowId = +$(e.target).closest("tr.app-datagrid-row").attr("data-row-id");
2561
+ // remove existing row from tbody
2562
+ var $row = self.gridElement.find('tr.app-datagrid-row[data-row-id="' + rowId + '"]');
2563
+ self.options.setDeletedRowIndex(rowId);
2564
+ // remove data
2565
+ self.preparedData.splice(rowId,1);
2566
+ // storing the data of deleted row in "options.deletedRowData"
2567
+ self.options.data.splice(rowId,1);
2568
+ // decrementing index values and data-row-id for remaining rows
2569
+ self.gridElement.find('tr.app-datagrid-row:gt(' + rowId + ')').each(function(index, row) {
2570
+ if (!$row.is(':last-child') && (!$(row).hasClass('always-new-row'))) {
2571
+ $(row).attr("data-row-id", rowId);
2572
+ self.preparedData[rowId].$$pk--;
2573
+ self.preparedData[rowId].$$index--;
2574
+ self.preparedData[rowId].$index--;
2575
+ rowId++;
2576
+ }
2577
+ });
2578
+ $row.remove();
2579
+ }
2580
+
2581
+
2582
+ //For quick edit, on clicking of delete button or DELETE key, edit the next row
2583
+ if (self.options.editmode !== self.CONSTANTS.QUICK_EDIT || !($(e.target).hasClass('delete-row-button') || self.Utils.isDeleteKey(e))) {
2584
+ return;
2585
+ }
2586
+ //Call set status, so that the rows are visible for fom operations
2587
+ self.__setStatus();
2588
+ var rowID,
2589
+ $nextRow;
2590
+ if (error) {
2591
+ return;
2592
+ }
2593
+ //On success, Focus the next row. If row is not present, focus the previous row
2594
+ rowID = +$(e.target).closest('tr.app-datagrid-row').attr('data-row-id');
2595
+ $nextRow = self.gridElement.find('tr.app-datagrid-row[data-row-id="' + rowID + '"]');
2596
+ if (!$nextRow.length) {
2597
+ $nextRow = self.gridElement.find('tr.app-datagrid-row[data-row-id="' + (rowID - 1) + '"]');
2598
+ }
2599
+ $nextRow.trigger('click', [undefined, {action: 'edit', skipFocus: skipFocus}]);
2600
+ }, options);
2601
+ }
2602
+ },
2603
+
2604
+ /* Deletes a row and updates the header checkbox if multiselect is true. */
2605
+ deleteRowAndUpdateSelectAll: function (e) {
2606
+ this.deleteRow(e);
2607
+ this.updateSelectAllCheckboxState();
2608
+ },
2609
+
2610
+ /* Keeps a track of the currently selected row, and deselects the previous row, if multiselect is false. */
2611
+ _deselectPreviousSelection: function ($row, e) {
2612
+ var selectedRows = this.gridElement.find('tr.app-datagrid-row.active'),
2613
+ rowId = $row.attr('data-row-id'),
2614
+ self = this;
2615
+ selectedRows.each(function () {
2616
+ var id = $(this).attr('data-row-id'),
2617
+ preparedData = self.preparedData[id];
2618
+ if (id !== rowId && preparedData) {
2619
+ $(this).find('input[rowSelectInput]:radio').prop('checked', false);
2620
+ preparedData._selected = preparedData._checked = false;
2621
+ $(this).removeClass('active');
2622
+ self.options.callOnRowDeselectEvent(preparedData, e);
2623
+ }
2624
+ });
2625
+ },
2626
+ //Method to remove sort icons from the column header cells
2627
+ resetSortIcons: function ($el) {
2628
+ this.isResetSortIconsDone = true;
2629
+ var $sortContainer;
2630
+ //If sort icon is not passed, find out the sort icon from the active class
2631
+ if (!$el && this.gridHeaderElement) {
2632
+ $sortContainer = this.gridHeaderElement.find('.sort-buttons-container.active');
2633
+ $el = $sortContainer.find('i.sort-icon');
2634
+ $sortContainer.removeClass('active');
2635
+ }
2636
+ $el.removeClass('desc asc').removeClass(this.options.cssClassNames.descIcon).removeClass(this.options.cssClassNames.ascIcon);
2637
+ },
2638
+ setSortIconDefault: function() {
2639
+ const sortInfo = this.options.sortInfo,
2640
+ $e = this.tableContainer,
2641
+ $th = $e.find("[data-col-field='" + sortInfo.field + "']"),
2642
+ $sortContainer = $th.find('.sort-buttons-container'),
2643
+ $sortIcon = $sortContainer.find('i.sort-icon'),
2644
+ direction = sortInfo.direction;
2645
+ if (direction === 'asc') {
2646
+ $sortIcon.addClass(direction + ' ' + this.options.cssClassNames.ascIcon);
2647
+ $sortContainer.addClass('active');
2648
+ } else if (direction === 'desc'){
2649
+ $sortIcon.addClass(direction + ' ' + this.options.cssClassNames.descIcon);
2650
+ $sortContainer.addClass('active');
2651
+ }
2652
+
2653
+ },
2654
+ /* Handles table sorting. */
2655
+ sortHandler: function (e) {
2656
+ e.stopImmediatePropagation();
2657
+ // If header span is clicked and column selection is enabled, call header click hand
2658
+ //Calling the column selection handler so that column selection works even when the bind exp changes later from false to true.
2659
+ if ($(e.target).hasClass('header-data') && this.options.enableColumnSelection) {
2660
+ this.columnSelectionHandler(e);
2661
+ this.headerClickHandler(e);
2662
+ }
2663
+ var $e = $(e.target),
2664
+ $th = $e.closest('th.app-datagrid-header-cell'),
2665
+ id = $th.attr('data-col-id'),
2666
+ $sortContainer = $th.find('.sort-buttons-container'),
2667
+ $sortIcon = $sortContainer.find('i.sort-icon'),
2668
+ direction = $sortIcon.hasClass('asc') ? 'desc' : 'asc',
2669
+ sortInfo = this.options.sortInfo,
2670
+ $previousSortMarker = this.gridHeaderElement.find('.sort-buttons-container.active'),
2671
+ field = $th.attr('data-col-field'),
2672
+ $previousSortedColumn,
2673
+ $previousSortIcon,
2674
+ colId,
2675
+ colDef;
2676
+ this.resetSortIcons($sortIcon);
2677
+ $sortIcon.addClass(direction);
2678
+ //Add the classes based on the direction
2679
+ if (direction === 'asc') {
2680
+ $sortIcon.addClass(this.options.cssClassNames.ascIcon);
2681
+ $sortContainer.addClass('active');
2682
+ } else if (direction === 'desc') {
2683
+ $sortIcon.addClass(this.options.cssClassNames.descIcon);
2684
+ $sortContainer.addClass('active');
2685
+ }
2686
+ if ($previousSortMarker.length) {
2687
+ //Reset the previous sorted column icons and info
2688
+ $previousSortedColumn = $previousSortMarker.closest('th.app-datagrid-header-cell');
2689
+ colId = $previousSortedColumn.attr('data-col-id');
2690
+ colDef = this.preparedHeaderData[colId];
2691
+ $previousSortIcon = $previousSortMarker.find('i.sort-icon');
2692
+ if (colDef.field !== field) {
2693
+ $previousSortMarker.removeClass('active');
2694
+ this.resetSortIcons($previousSortIcon);
2695
+ }
2696
+ colDef.sortInfo = {'sorted': false, 'direction': ''};
2697
+ }
2698
+ sortInfo.direction = direction;
2699
+ sortInfo.field = this.preparedHeaderData && this.preparedHeaderData[e.currentTarget.getAttribute('data-col-id')].sortby || field;
2700
+ sortInfo.sortBy = this.preparedHeaderData && this.preparedHeaderData[e.currentTarget.getAttribute('data-col-id')].sortby ? field : '';
2701
+ if (direction !== '') {
2702
+ this.preparedHeaderData[id].sortInfo = {'sorted': true, 'direction': direction};
2703
+ }
2704
+ this._setGridEditMode(false);
2705
+ this.closeEditedRow();
2706
+ this.options.sortHandler.call(this, this.options.sortInfo, e, 'sort');
2707
+ },
2708
+ //Method to handle up and next key presses
2709
+ processUpDownKeys: function (event, $row, direction) {
2710
+ var self = this;
2711
+ var rowData = $row.find('input').val();
2712
+ if ($row.hasClass('row-editing') && self.options.editmode === self.CONSTANTS.QUICK_EDIT && rowData) {
2713
+ self.toggleEditRow(event, {
2714
+ 'action': 'save',
2715
+ 'noMsg': true,
2716
+ 'success': function (skipFocus, error) {
2717
+ self.editSuccessHandler(skipFocus, error, event, $row, true, direction);
2718
+ }
2719
+ });
2720
+ } else {
2721
+ $row = direction === 'down' ? $row.next() : $row.prev();
2722
+ if (this.options.rowExpansionEnabled && !$row.is(':visible')) {
2723
+ $row = direction === 'down' ? $row.next() : $row.prev();
2724
+ }
2725
+ $row.focus();
2726
+ }
2727
+ },
2728
+ //Reset new row data
2729
+ resetNewRow: function ($row) {
2730
+ var rowData = {},
2731
+ self = this;
2732
+
2733
+ this.options.clearForm(true);
2734
+
2735
+ self.setDefaultRowData(rowData);
2736
+
2737
+ //Set the default values for widgets in the row
2738
+ $row.find('[data-field-name]').each(function () {
2739
+ var $input = $(this),
2740
+ fieldName = $input.attr('data-field-name') + '_new';
2741
+ self.options.setFieldValue(fieldName, rowData[$input.attr('data-field-name')] || '')
2742
+ });
2743
+ self.options.safeApply();
2744
+ self.setFocusOnElement(undefined, $row, true);
2745
+ },
2746
+ _onEnter: function ($target, $row, quickEdit, event) {
2747
+ var self = this;
2748
+ if($target.is('button')){
2749
+ return;
2750
+ }
2751
+ if (quickEdit && $target.hasClass('app-datagrid-row') && !$target.hasClass('row-editing')) {
2752
+ $row.trigger('click', [undefined, {action: 'edit'}]);
2753
+ } else {
2754
+ //On click of enter while inside a widget in editing row, save the row
2755
+ if ($row.hasClass('row-editing') && $target.closest('[data-field-name]').length) {
2756
+ const $editingRow = $row;
2757
+ $target.blur(); //Blur the input, to update the model
2758
+ self.toggleEditRow(event, {
2759
+ 'action': 'save',
2760
+ 'success': function (skipFocus, error) {
2761
+ //On error, focus the same field. Else, focus the row
2762
+ if (error) {
2763
+ $target.focus();
2764
+ } else {
2765
+ if(!quickEdit){
2766
+ self.focusActiveRow();
2767
+ }
2768
+ self.options.timeoutCall(function () {
2769
+ if(quickEdit){
2770
+ var rowId = $editingRow[0]?.getAttribute('data-row-id');
2771
+ if($editingRow.hasClass("always-new-row")){
2772
+ rowId= self.gridElement[0].querySelector("tr.always-new-row")?.getAttribute('data-row-id')-1;
2773
+ }
2774
+ var matchingRow = self.gridElement[0].querySelector("tr[data-row-id='" + rowId + "']");
2775
+ if($(matchingRow).hasClass('always-new-row')){return;}
2776
+ if (matchingRow) {
2777
+ if (!self.options.multiselect) {
2778
+ $(self.gridElement).find('tr.app-datagrid-row.active').removeClass('active');
2779
+ }
2780
+ matchingRow.classList.remove('active');
2781
+ self.hideRowEditMode($(matchingRow));
2782
+ }
2783
+ }
2784
+ self.focusNewRow();
2785
+ }, 400);
2786
+ }
2787
+ }
2788
+ });
2789
+ } else {
2790
+ $row.trigger('click');
2791
+ // When enter event is recived on the new row focus the row to enter text
2792
+ if (quickEdit && $target.hasClass('always-new-row') && $target.hasClass('row-editing')) {
2793
+ self.focusNewRow();
2794
+ }
2795
+ }
2796
+ }
2797
+ //Stop the enter keypress from submitting any parent form. If target is button, event should not be stopped as this stops click event on button
2798
+ if (!$target.is('button')) {
2799
+ event.stopPropagation();
2800
+ }
2801
+ },
2802
+ // Handles keydown event on row items.
2803
+ onKeyDown: function (event) {
2804
+ var $target = $(event.target),
2805
+ $row = $target.closest('tr.app-datagrid-row'),
2806
+ self = this,
2807
+ quickEdit = this.options.editmode === this.CONSTANTS.QUICK_EDIT,
2808
+ isNewRow;
2809
+ if (this.options.rowExpansionEnabled && !$row.length) {
2810
+ $row = $target.closest('tr.app-datagrid-detail-row')
2811
+ }
2812
+
2813
+ if (this.Utils.isDeleteKey(event)) { //Delete Key
2814
+ //For input elements, dont delete the row. If delete button is not present, dont allowe deleting by keyboard shortcut
2815
+ if (!this.options.actionsEnabled.delete || $target.is('input') || $target.hasClass('form-control')) {
2816
+ return;
2817
+ }
2818
+ this.deleteRow(event);
2819
+ return;
2820
+ }
2821
+ if (event.which === 27) { //Escape key
2822
+ isNewRow = this._isNewRow($row);
2823
+ //On Escape, cancel the row edit
2824
+ if (isNewRow && $row.hasClass('always-new-row')) {
2825
+ $target.blur();
2826
+ self.resetNewRow($row);
2827
+ } else {
2828
+ $row.trigger('click', [undefined, {action: 'cancel'}]);
2829
+ }
2830
+
2831
+ if (!isNewRow && self.options.editmode!==this.CONSTANTS.QUICK_EDIT) {
2832
+ $row.focus();
2833
+ }
2834
+ return;
2835
+ }
2836
+ if (event.which === 13) { //Enter key
2837
+ event.stopPropagation();
2838
+ // Fix for [WMS-28247]: prevent row getting selected when pressing Enter on a data table field in view mode when isrowselectable flag is false.
2839
+ if (this.options.editmode !== this.CONSTANTS.QUICK_EDIT && !$row.hasClass('row-editing')) {
2840
+ if ((this.options.multiselect || this.options.showRadioColumn) && !this.options.isrowselectable && Number(this.getColInfo(event))) {
2841
+ return;
2842
+ }
2843
+ }
2844
+ this._debounceOnEnter($target, $row, quickEdit, event);
2845
+ return;
2846
+ }
2847
+ if (event.which === 38) { // up-arrow action
2848
+ this.processUpDownKeys(event, $row, 'up');
2849
+ return;
2850
+ }
2851
+ if (event.which === 40) { // down-arrow action
2852
+ this.processUpDownKeys(event, $row, 'down');
2853
+ }
2854
+ },
2855
+ editSuccessHandler: function (skipFocus, error, e, $row, isSameRow, direction) {
2856
+ var self = this,
2857
+ rowID,
2858
+ $nextRow;
2859
+ //Call set status, so that the rows are visible for fom operations
2860
+ self.__setStatus();
2861
+ //On error, focus the current row first element
2862
+ if (error) {
2863
+ self.setFocusOnElement(e);
2864
+ return;
2865
+ }
2866
+ //On success, make next row editable. If next row is not present, add new row
2867
+ rowID = +$row.attr('data-row-id');
2868
+ if (direction) {
2869
+ rowID = direction === 'down' ? ++rowID : --rowID;
2870
+ $nextRow = self.gridElement.find('tr.app-datagrid-row[data-row-id="' + rowID + '"]');
2871
+ if ($nextRow.length) {
2872
+ $nextRow.focus();
2873
+ } else {
2874
+ $row.focus();
2875
+ }
2876
+ return;
2877
+ }
2878
+ // Fix for [WMS-20545]: The deselect/select event is being triggered twice when isSameRow is undefined
2879
+ if (!isSameRow && !_.isUndefined(isSameRow)) {
2880
+ rowID++;
2881
+ }
2882
+ $nextRow = self.gridElement.find('tr.app-datagrid-row[data-row-id="' + rowID + '"]');
2883
+
2884
+ //For always new row, dont trigger the edit action
2885
+ if ($nextRow.hasClass('always-new-row')) {
2886
+ if (self.options.formPosition !== 'top' || $row.hasClass('always-new-row')) {
2887
+ self.addNewRow(skipFocus);
2888
+ }
2889
+ } else if ($nextRow.length) {
2890
+ $nextRow.trigger('click', [undefined, {
2891
+ action: 'edit',
2892
+ skipFocus: skipFocus,
2893
+ skipSelect: self.options.multiselect
2894
+ }]);
2895
+ } else if (self.options.actionsEnabled.new) {
2896
+ self.addNewRow(skipFocus);
2897
+ }
2898
+ },
2899
+ //Method to check if the docus is on last column
2900
+ isLastColumn: function ($target) {
2901
+ var $cell = $target.closest('td.app-datagrid-cell'),
2902
+ $editCells;
2903
+
2904
+ if ($cell.is(':last-child') || $cell.nextAll('td.app-datagrid-cell:visible').length === 0) {
2905
+ return true;
2906
+ }
2907
+
2908
+ if ($cell.hasClass('cell-editing')) {
2909
+ //Find and compare the last editable column which is not disabled
2910
+ $editCells = $cell.closest('tr.app-datagrid-row').find('.cell-editing').has('> :not([disabled="disabled"])');
2911
+ return $cell.attr('data-col-id') === $editCells.last().attr('data-col-id');
2912
+ }
2913
+ return false;
2914
+ },
2915
+ getColInfo: function(event) {
2916
+ var column = $(event.target).closest('td.app-datagrid-cell');
2917
+ var colId = column.attr('data-col-id');
2918
+ return colId;
2919
+ },
2920
+ keydownHandler: function(event) {
2921
+ if (event && event.key === 'Enter') {
2922
+ this.sortHandler(event);
2923
+ }
2924
+ },
2925
+ /* Attaches all event handlers for the table. */
2926
+ attachEventHandlers: function ($htm) {
2927
+ var self = this;
2928
+
2929
+ if (this.options.enableRowSelection) {
2930
+ $htm[0].removeEventListener('click', this.rowClickHandlerOnCapture.bind(this));
2931
+ // MEMORY LEAK FIX: Remove old listener if exists before adding new one
2932
+ // if (this.boundRowClickHandlerOnCapture && $htm[0]) {
2933
+ // $htm[0].removeEventListener('click', this.boundRowClickHandlerOnCapture, true);
2934
+ // }
2935
+ $htm.off();
2936
+ $htm[0].addEventListener('click', this.rowClickHandlerOnCapture.bind(this));
2937
+
2938
+ // MEMORY LEAK FIX: Store bound function reference for proper removal
2939
+ // this.boundRowClickHandlerOnCapture = this.rowClickHandlerOnCapture.bind(this);
2940
+ // $htm[0].addEventListener('click', this.boundRowClickHandlerOnCapture, true);
2941
+
2942
+ // add js click handler for capture phase in order to first listen on grid and
2943
+ // assign selectedItems so that any child actions can have access to the selectedItems.
2944
+ $htm.on('click', this.rowSelectionHandler.bind(this));
2945
+ $htm.on('dblclick', this.rowDblClickHandler.bind(this));
2946
+ $htm.on('keydown', this.onKeyDown.bind(this));
2947
+ }
2948
+
2949
+ this._attachHeaderEventHandlers();
2950
+
2951
+ if (this.options.rowActions.length) {
2952
+ $htm.find('.cancel-edit-row-button').off('click');
2953
+ $htm.find('.save-edit-row-button').off('click');
2954
+ $htm.find('.cancel-edit-row-button').on('click', {action: 'cancel'}, this.toggleEditRow.bind(this));
2955
+ $htm.find('.save-edit-row-button').on('click', {action: 'save'}, this.toggleEditRow.bind(this));
2956
+ }
2957
+ if (self.options.editmode === self.CONSTANTS.QUICK_EDIT) {
2958
+ $htm.on('focus', 'tr.app-datagrid-row', function (e) {
2959
+ var $row = $(e.currentTarget);
2960
+ if (!$row.hasClass('row-editing')) {
2961
+ if(e.target===e.currentTarget && (e.which===0||!e.which)) {
2962
+ return;
2963
+ }
2964
+ self.toggleEditRow(e, { $row: $row, action: 'edit'});
2965
+ }
2966
+ });
2967
+ //On tab out of a row, save the current row and make next row editable
2968
+ $htm.on('focusout', 'tr.app-datagrid-row','thead.table-header', function (e) {
2969
+ var $target = $(e.target),
2970
+ $row = $target.closest('tr.app-datagrid-row'),
2971
+ $relatedTarget = $(e.relatedTarget),
2972
+ isLastColumn = self.isLastColumn($target, $relatedTarget),
2973
+ isTargetRowAction = $target.closest('span.actions-column').length>0,
2974
+ isRelatedTargetRowAction = $relatedTarget.closest('span.actions-column').length>0,
2975
+ isTargetGridAction = $relatedTarget.closest('div.app-datagrid-actions').length>0,
2976
+ isRelatedTargetGridAction = $relatedTarget.closest('div.app-datagrid-actions').length>0,
2977
+ currentGridId = $($target.closest('.app-grid'))?.attr('widget-id'),
2978
+ relatedGrid = $relatedTarget.closest('.app-grid')[0],
2979
+ relatedGridId = relatedGrid ? $(relatedGrid).attr('widget-id') : null,
2980
+ isRelatedGridDifferent = relatedGrid && relatedGridId !== currentGridId,
2981
+ invalidTargets = '.row-editing:not(".always-new-row"), .row-action-button, .app-datagrid-cell, .caption, button.btn-time, button.btn-date';
2982
+
2983
+ //Check if the focus out element is outside the grid or some special elements
2984
+ function isInvalidTarget() {
2985
+ // If relatedTarget is not in any grid, it's invalid (outside all tables)
2986
+ if (!relatedGrid) {
2987
+ return true;
2988
+ }
2989
+ // If relatedTarget is in a different grid, allow save (return false)
2990
+ if (isRelatedGridDifferent) {
2991
+ return false; // NOT invalid - we should save the grid
2992
+ }
2993
+ // If relatedTarget is in SAME grid, check if it's an invalid target within this grid
2994
+ return $relatedTarget.is(invalidTargets);
2995
+ }
2996
+
2997
+ //If focus is on the same row, return here
2998
+ if ($relatedTarget.is('tr.app-datagrid-row')) {
2999
+ if ($relatedTarget.attr('data-row-id') === $row.attr('data-row-id')) {
3000
+ return;
3001
+ }
3002
+ }
3003
+ // If class has danger, confirm dialog is opened, so dont save the row.
3004
+ //If focusout is because of input element or row action or current row, dont save the row
3005
+ if (isRelatedTargetRowAction || $row.hasClass("danger") || isRelatedTargetGridAction || (isTargetRowAction && isRelatedTargetRowAction) || (isTargetRowAction && e.relatedTarget ===null) || isInvalidTarget() || $relatedTarget.attr("focus-target") === "") {
3006
+ return;
3007
+ }
3008
+ // Save the Row if any button from Grid action is clicked / AddRow action is
3009
+ // triggered from the Row Actions
3010
+ if (!isTargetGridAction && !isTargetRowAction && !isRelatedGridDifferent) {
3011
+ // If focus moved to a DIFFERENT grid, allow save (skip isLastColumn check)
3012
+ // Otherwise Save the row on last column of the data table. Do not save the row if focus is out of input file.
3013
+ if (!isLastColumn || (isLastColumn && (e.relatedTarget === null || $(e.target).is('tr.app-datagrid-row'))) || $target.hasClass("file-upload")) {
3014
+ return;
3015
+ }
3016
+ }
3017
+ self.options.timeoutCall(function () {
3018
+ self.toggleEditRow(e, {
3019
+ 'action': 'save',
3020
+ 'noMsg': true,
3021
+ 'success': function (skipFocus, error, isNewRow) {
3022
+ // Only navigate to next row if staying in SAME grid
3023
+ // If switching to DIFFERENT grid, let that grid's click handler take over
3024
+ if (!isNewRow && !isRelatedGridDifferent) {
3025
+ self.editSuccessHandler(skipFocus, error, e, $row,false);
3026
+ }
3027
+ }
3028
+ });
3029
+ });
3030
+ });
3031
+ }
3032
+
3033
+ // row selection
3034
+ $htm.find('[data-identifier="rowExpansionButtons"]').off("click");
3035
+ $htm.find('[data-identifier="rowExpansionButtons"]').on('click', function (e) {
3036
+ var $row = $(e.target).closest('tr.app-datagrid-row');
3037
+ if ($(this).find('.app-button').attr('disabled')) {
3038
+ return;
3039
+ }
3040
+ self.toggleExpandRow(+$row.attr('data-row-id'), undefined, e);
3041
+ });
3042
+ },
3043
+ /**
3044
+ * Function which attaches all event handlers specifically for the table header.
3045
+ * Needed when table header is rebuilt (e.g. showHeader toggle) without a full _renderGrid
3046
+ */
3047
+ _attachHeaderEventHandlers: function () {
3048
+ var $header = this.gridHeaderElement;
3049
+ if (!$header || !$header.length) {
3050
+ return;
3051
+ }
3052
+ if (this.options.enableColumnSelection) {
3053
+ $header.find('th[data-col-selectable]').off('click', this.columnSelectionHandler.bind(this));
3054
+ $header.find('th[data-col-selectable]').on('click', this.columnSelectionHandler.bind(this));
3055
+ } else {
3056
+ $header.find('th[data-col-selectable]').off('click');
3057
+ }
3058
+
3059
+ if (!(this.options.enableSort === false || this.options.enableSort === 'false')) {
3060
+ if (this.options.enableColumnSelection) {
3061
+ $header.find('th[data-col-sortable] .header-data').off('click', this.sortHandler.bind(this));
3062
+ $header.find('th[data-col-sortable] .header-data').on('click', this.sortHandler.bind(this));
3063
+ $header.find('th[data-col-sortable]').off('keydown', this.keydownHandler.bind(this));
3064
+ $header.find('th[data-col-sortable]').on('keydown', this.keydownHandler.bind(this));
3065
+ } else {
3066
+ $header.find('th[data-col-sortable]').off('click', this.sortHandler.bind(this));
3067
+ $header.find('th[data-col-sortable]').on('click', this.sortHandler.bind(this));
3068
+ $header.find('th[data-col-sortable]').off('keydown', this.keydownHandler.bind(this));
3069
+ $header.find('th[data-col-sortable]').on('keydown', this.keydownHandler.bind(this));
3070
+ }
3071
+ } else {
3072
+ if (this.options.enableColumnSelection) {
3073
+ $header.find('th[data-col-sortable] .header-data').off('click');
3074
+ } else {
3075
+ $header.find('th[data-col-sortable]').off('click');
3076
+ }
3077
+ }
3078
+ },
3079
+ expandRow: function(rowId) {
3080
+ this.toggleExpandRow(rowId, true)
3081
+ },
3082
+ collapseRow: function(rowId) {
3083
+ this.toggleExpandRow(rowId, false)
3084
+ },
3085
+ hasAllClasses: function (element, classNames) { // function to check if all the class names are present in the element
3086
+ return classNames && classNames.every(cls => element.hasClass(cls));
3087
+ },
3088
+ _collapseRow: function(e, rowData, rowId, $nextDetailRow, $icon) {
3089
+ var self = this,
3090
+ $tbody = self.gridElement,
3091
+ $row = $($tbody.find('> tr.app-datagrid-row[data-row-id="'+ rowId +'"]'));
3092
+ $row.removeClass(self.options.cssClassNames.expandedRowClass);
3093
+ $row.find( 'button, a').attr('aria-expanded', 'false').attr('aria-live', 'polite');
3094
+ if (this.options.onBeforeRowCollapse(e, rowData, rowId) === false) {
3095
+ return;
3096
+ }
3097
+ if ($icon.length && this.hasAllClasses($icon, this.options.cssClassNames.rowExpandIcon?.split(' '))) {
3098
+ $icon.removeClass(this.options.cssClassNames.rowExpandIcon).addClass(this.options.cssClassNames.rowCollapseIcon);
3099
+ }
3100
+ $nextDetailRow.hide();
3101
+ this.options.onRowCollapse(e, rowData)
3102
+ },
3103
+ toggleExpandRow: function(rowId, isExpand, e) {
3104
+ var self = this,
3105
+ $tbody = self.gridElement,
3106
+ $row = $($tbody.find('> tr.app-datagrid-row[data-row-id="'+ rowId +'"]')),
3107
+ rowData = _.clone(self.options.data[rowId]),
3108
+ $nextDetailRow = $row.next('tr.app-datagrid-detail-row'),
3109
+ isClosed = !$nextDetailRow.is(':visible'),
3110
+ $icon = $row.find('[data-identifier="rowExpansionButtons"] i.app-icon'),
3111
+ expandRowBtn = $row.find( 'button, a');
3112
+ rowData.$index = rowId + 1;
3113
+ if (isExpand && !isClosed) {
3114
+ return;
3115
+ }
3116
+ if (isExpand === false && isClosed) {
3117
+ return;
3118
+ }
3119
+ if (isClosed) {
3120
+ $row.addClass(self.options.cssClassNames.expandedRowClass);
3121
+ if(self.options.rowDef.collapsetitle) expandRowBtn.attr('title', self.options.rowDef.collapsetitle);
3122
+ else {
3123
+ expandRowBtn.attr('title', expandRowBtn.attr('collapsetitle'));
3124
+ }
3125
+ $row.find( 'button, a').attr('aria-expanded', 'true');
3126
+ if (e && self.preparedData[rowId]._selected) {
3127
+ e.stopPropagation();
3128
+ }
3129
+ if (self.options.rowDef.closeothers) {
3130
+ $tbody.find('> tr.app-datagrid-detail-row:visible').each(function() {
3131
+ var $otherDetailRow = $(this),
3132
+ $otherIcon = $otherDetailRow.prev('tr.app-datagrid-row').find('[data-identifier="rowExpansionButtons"] i.app-icon'),
3133
+ otherRowId = +$otherDetailRow.attr('data-row-id'),
3134
+ otherRowData = self.options.data[otherRowId];
3135
+ $otherDetailRow.hide();
3136
+ self._collapseRow(e, otherRowData, otherRowId, $otherDetailRow, $otherIcon);
3137
+ });
3138
+ }
3139
+ self.options.generateRowDetailView(e, rowData, rowId, $nextDetailRow.find('td.app-datagrid-row-details-cell .details-section'),
3140
+ $nextDetailRow.find('td.app-datagrid-row-details-cell .row-overlay'), function () {
3141
+ if ($icon.length && self.hasAllClasses($icon, self.options.cssClassNames.rowCollapseIcon?.split(' '))) {
3142
+ $icon.removeClass(self.options.cssClassNames.rowCollapseIcon).addClass(self.options.cssClassNames.rowExpandIcon);
3143
+ }
3144
+ $nextDetailRow.show();
3145
+ });
3146
+ } else {
3147
+ if(self.options.rowDef.expandtitle) expandRowBtn.attr('title', self.options.rowDef.expandtitle);
3148
+ else {
3149
+ expandRowBtn.attr('title', expandRowBtn.attr('expandtitle'));
3150
+ }
3151
+ self._collapseRow(e, rowData, rowId, $nextDetailRow, $icon);
3152
+ }
3153
+ },
3154
+ /* Replaces all the templates needing angular compilation with the actual compiled templates. */
3155
+ _findAndReplaceCompiledTemplates: function () {
3156
+ if (!this.gridElement) {
3157
+ return;
3158
+ }
3159
+ var $compiledCells = this.gridElement.find('td[data-compiled-template]'),
3160
+ self = this;
3161
+
3162
+ $compiledCells.each(function () {
3163
+ var $cell = $(this),
3164
+ id = $cell.attr('data-compiled-template');
3165
+
3166
+ $cell.replaceWith(self.compiledCellTemplates[id]);
3167
+ });
3168
+ },
3169
+
3170
+ /* Renders the search box. */
3171
+ _renderSearch: function () {
3172
+ var $htm = $(this._getSearchEl()),
3173
+ self = this,
3174
+ $searchBox;
3175
+
3176
+ function search(e) {
3177
+ e.stopPropagation();
3178
+ var searchText = $htm.find('[data-element="dgSearchText"]')[0].value,
3179
+ $filterField = $htm.find('[data-element="dgFilterValue"]'),
3180
+ field = $filterField[0].value,
3181
+ colDefIndex = $htm.find('option:selected').attr('data-coldef-index'),
3182
+ colDef = self.options.colDefs[colDefIndex],
3183
+ type = colDef && colDef.type ? colDef.type : '';
3184
+
3185
+ self.searchObj = {
3186
+ 'field': field,
3187
+ 'value': searchText,
3188
+ 'type': type,
3189
+ 'event': e
3190
+ };
3191
+ self.options.searchHandler.call(self, self.searchObj, e, 'search');
3192
+ }
3193
+
3194
+ this.element.find('.form-search').remove();
3195
+ $htm.insertBefore(this.gridContainer);
3196
+ this.gridSearch = this.element.find('.form-search');
3197
+
3198
+ $searchBox = this.gridSearch.find('[data-element="dgSearchText"]');
3199
+ this.gridSearch.find('.app-search-button').on('click', search);
3200
+ this.gridSearch.find('[data-element="dgFilterValue"]').on('change', function (e) {
3201
+ // If "No data found" message is shown, and user changes the selection, then fetch all data.
3202
+ if (self.dataStatusContainer.find('.status').text() === self.options.dataStates.nodata) {
3203
+ search(e);
3204
+ }
3205
+ });
3206
+ $searchBox.on('keyup', function (e) {
3207
+ e.stopPropagation();
3208
+ // If the search text is empty then show all the rows.
3209
+ if (!$(this).val()) {
3210
+ self.emptySearch = true;
3211
+ if (self.searchObj.value) {
3212
+ self.searchObj.value = '';
3213
+ search(e);
3214
+ }
3215
+ } else {
3216
+ self.emptySearch = false;
3217
+ }
3218
+
3219
+ /* Search only when enter key is pressed. */
3220
+ if (e.which === 13 || self.options.filteronkeypress) {
3221
+ search(e);
3222
+ }
3223
+ });
3224
+ },
3225
+ //Generate the row level filter
3226
+ _renderRowFilter: function () {
3227
+ var $row = $('<tr class="filter-row"></tr>'),
3228
+ self = this,
3229
+ $headerElement = (this.options.isMobile && !this.options.showHeader) ? this.gridElement : this.gridHeaderElement;
3230
+ $headerElement.find('.filter-row').remove();
3231
+ this.options.generateFilterRow();
3232
+ this.preparedHeaderData.forEach(function (field, index) {
3233
+ var fieldName = field.field,
3234
+ $th = $('<th data-col-id="' + index + '"></th>');
3235
+ if (!field.searchable) {
3236
+ $row.append($th);
3237
+ return;
3238
+ }
3239
+ $th.append(self.options.getFilterWidget(fieldName));
3240
+ $row.append($th);
3241
+ }, this);
3242
+ if (this.options.showHeader) {
3243
+ this.gridHeaderElement.append($row);
3244
+ } else {
3245
+ if (this.options.isMobile) {
3246
+ $headerElement.empty().append($row);
3247
+ } else {
3248
+ $headerElement.empty().append($row);
3249
+ }
3250
+ }
3251
+ this.gridSearch = $headerElement.find('.filter-row');
3252
+ },
3253
+ /* Renders the table header. */
3254
+ _renderHeader: function () {
3255
+ var headerTemplate = this._getHeaderTemplate(),
3256
+ $colgroup = headerTemplate.colgroup,
3257
+ self = this,
3258
+ $header;
3259
+ /*On scroll of the content table, scroll the header*/
3260
+ this.gridElement.parent().scroll(function () {
3261
+ self.gridHeaderElement.parent().prop('scrollLeft', this.scrollLeft);
3262
+ });
3263
+ if (!this.options.showHeader) {
3264
+ this.tableContainer.find('colgroup').remove(); // Remove the colgroup from the table container when showHeader is false
3265
+ this.tableContainer.append($colgroup);
3266
+ this.gridHeaderElement.hide();
3267
+ //this.gridElement.prepend($colgroup.clone());
3268
+ return;
3269
+ } else {
3270
+ /* _toggleHeader() removes thead from the DOM when toggling showHeader; gridHeaderElement
3271
+ * still references the detached thead. Re-insert it before the tbody so the header
3272
+ * is visible when bind changes from false to true. */
3273
+ if (this.gridHeaderElement.length && this.tableContainer?.length &&
3274
+ !this.tableContainer[0].contains(this.gridHeaderElement[0])) {
3275
+ this.tableContainer.prepend(this.gridHeaderElement); // Re-insert the table header before the tbody when showHeader is true
3276
+ }
3277
+ this.gridHeaderElement.show();
3278
+ }
3279
+ $header = headerTemplate.header;
3280
+
3281
+ function toggleSelectAll(e) {
3282
+ var $checkboxes = $('tr.app-datagrid-row:not(.always-new-row):visible td input[name="gridMultiSelect"]:checkbox', self.gridElement),
3283
+ checked = this.checked,
3284
+ $headerCheckbox = self.gridHeaderElement.find("th.app-datagrid-header-cell input:checkbox");
3285
+ $headerCheckbox.siblings('span.sr-only').text(checked ? 'All Rows Selected' : 'All Rows Deselected');
3286
+ $checkboxes.prop('checked', checked);
3287
+ $checkboxes.each(function () {
3288
+ var $row = $(this).closest('tr.app-datagrid-row'),
3289
+ rowId = $row.attr('data-row-id'),
3290
+ rowData = self.options.data[rowId];
3291
+ self.toggleRowSelection($row, checked, e, true);
3292
+ // If we enable multiselect and check header checkbox then updating selecteditem in datatable.
3293
+ self.options.assignSelectedItems(rowData, e, {
3294
+ 'rowId': rowId,
3295
+ '_selected': self.preparedData[rowId]?._selected
3296
+ });
3297
+ if(!(self.options.headerselectall && self.options.multiselect)){
3298
+ if (checked && _.isFunction(self.options.onRowSelect)) {
3299
+ self.options.onRowSelect(rowData, e);
3300
+ }
3301
+ if (!checked && _.isFunction(self.options.onRowDeselect)) {
3302
+ self.options.onRowDeselect(rowData, e);
3303
+ }
3304
+ }
3305
+ });
3306
+ self.options.selectAllRows(checked,e);
3307
+ }
3308
+
3309
+ // WMS-17629: Hiding the table header column when show property is set to false
3310
+ var headerCells = $header.find("th.app-datagrid-header-cell");
3311
+ var headerCols = $colgroup.find('col');
3312
+ headerCells.each(function () {
3313
+ var id = Number($(this).attr('data-col-id')),
3314
+ colDef = self.preparedHeaderData[id],
3315
+ $headerCol = $(headerCols[id]);
3316
+ if (!colDef) {
3317
+ return;
3318
+ }
3319
+ if (!_.isUndefined(colDef.show) && !colDef.show) {
3320
+ //Hide the header and column if show is false
3321
+ $(this).hide();
3322
+ $headerCol.hide();
3323
+ }
3324
+ });
3325
+ this.tableContainer.find('colgroup').remove(); // Remove the colgroup from the table container when showHeader is false
3326
+ /*For mobile view, append header to the main table only*/
3327
+ if (this.options.isMobile) {
3328
+ this.tableContainer.append($colgroup);
3329
+ } else {
3330
+ /**Append the colgroup to the header and the body.
3331
+ * Colgroup is used to maintain the consistent widths between the header table and body table**/
3332
+ this.tableContainer.append($colgroup);
3333
+ /**As jquery references the colgroup, clone the colgroup and add it to the table body**/
3334
+ }
3335
+ /**Add event handler, to the select all checkbox on the header**/
3336
+ $header.on('click', '.app-datagrid-header-cell input:checkbox', toggleSelectAll);
3337
+ $header.on('keydown', '.app-datagrid-header-cell input:checkbox', function(event) {
3338
+ if (event.key === 'Enter' || event.keyCode === 13) {
3339
+ event.preventDefault(); // Prevent default behavior
3340
+
3341
+ // Simulate a click on the checkbox
3342
+ const checkbox = this;
3343
+ setTimeout(() => checkbox.click(), 0);
3344
+ }
3345
+ });
3346
+
3347
+ if (_.isFunction(this.options.onHeaderClick)) {
3348
+ this.gridHeaderElement.find('th.app-datagrid-header-cell').on('click', this.headerClickHandler.bind(this));
3349
+ this.gridHeaderElement.find('th.app-datagrid-header-cell').on('keydown', function (e) {
3350
+ if (e.key === 'Enter' || e.keyCode === 13) {
3351
+ var $target = $(e.target);
3352
+ // Only run if on the checkbox column
3353
+ if ($target.attr('data-col-field') === 'checkbox') {
3354
+ e.preventDefault();
3355
+ // Trigger native click on the checkbox inside the header
3356
+ $target.find('input[type="checkbox"]').trigger('click');
3357
+ }
3358
+ }
3359
+ });
3360
+ }
3361
+
3362
+ if (!this.options.isMobile && this.gridHeaderElement.length) {
3363
+ this.gridHeaderElement.find('th[data-col-resizable]').resizable({
3364
+ handles: 'e',
3365
+ minWidth: 50,
3366
+ // set COL width
3367
+ /* This is needed because if width is initially set on col from coldefs,
3368
+ * then that column was not getting resized.*/
3369
+ resize: function (evt, ui) {
3370
+ var $colElement,
3371
+ $colHeaderElement,
3372
+ $cellElements,
3373
+ colIndex = +ui.helper.attr('data-col-id') + 1,
3374
+ originalWidth = ui.helper.width(),
3375
+ newWidth = ui.size.width,
3376
+ originalTableWidth,
3377
+ newTableWidth;
3378
+ $colHeaderElement = self.tableContainer.find('colgroup > col:nth-child(' + colIndex + ')');
3379
+ $colElement = self.tableContainer.find('colgroup > col:nth-child(' + colIndex + ')');
3380
+ $cellElements = self.gridElement.find('tr.app-datagrid-row > td:nth-child(' + colIndex + ') > div');
3381
+ $colElement.width(newWidth);
3382
+ $colHeaderElement.width(newWidth);
3383
+ $cellElements.width(newWidth);
3384
+ // height must be set in order to prevent IE9 to set wrong height
3385
+ $(this).css('height', 'auto');
3386
+ /*Adjust the table width only if the column width is increased*/
3387
+ if (newWidth > ui.originalSize.width) {
3388
+ /*Increase or decrease table width on resizing the column*/
3389
+ originalTableWidth = self.gridHeaderElement.width();
3390
+ newTableWidth = originalTableWidth + newWidth - originalWidth;
3391
+ self.gridHeaderElement.width(newTableWidth);
3392
+ self.gridElement.width(newTableWidth);
3393
+ }
3394
+ self.addOrRemoveScroll();
3395
+ self.options.redrawWidgets();
3396
+ }
3397
+ });
3398
+ }
3399
+ if(!this.isResetSortIconsDone) {
3400
+ this.setSortIconDefault();
3401
+ }
3402
+ },
3403
+ addOrRemoveScroll: function () {
3404
+ var gridContent = this.gridContainer.find('tbody'),
3405
+ gridHeader = this.gridContainer.find('.table-header');
3406
+ /*If scroll bar is present on the grid content, add padding to the header*/
3407
+ if ((gridContent.scrollHeight > gridContent.clientHeight) && !this.Utils.isMac()) {
3408
+ gridHeader.addClass('scroll-visible');
3409
+ } else {
3410
+ gridHeader.removeClass('scroll-visible');
3411
+ }
3412
+ },
3413
+
3414
+ //Triggers actual function in scope
3415
+ _handleCustomEvents: function (e, options) {
3416
+ this.options.handleCustomEvents(e, options);
3417
+ },
3418
+
3419
+ //Generates markup for row operations
3420
+ _setActionsEnabled: function () {
3421
+ var self = this;
3422
+ _.forEach(this.options.rowActions, function (def) {
3423
+ if (_.includes(def.action, 'editRow(')) {
3424
+ self.options.actionsEnabled.edit = true;
3425
+ } else if (_.includes(def.action, 'deleteRow(')) {
3426
+ self.options.actionsEnabled.delete = true;
3427
+ }
3428
+ });
3429
+ },
3430
+
3431
+ //Appends row operations markup to grid template
3432
+ _appendRowActions: function ($htm, isNewRow, rowData) {
3433
+ var self,
3434
+ rowOperationsCol = this._getRowActionsColumnDef();
3435
+ if (this.options.rowActions.length || rowOperationsCol) {
3436
+ this._setActionsEnabled();
3437
+ self = this;
3438
+ $htm.find("[data-identifier='actionButtons']").each(function (index) {
3439
+ var _rowData, $row, rowId, rowIndex = index;
3440
+ if (isNewRow) {
3441
+ _rowData = rowData;
3442
+ } else {
3443
+ $row = $(this).closest('tr.app-datagrid-row');
3444
+ rowId = parseInt($row.attr('data-row-id'), 10);
3445
+ _rowData = _.clone(self.options.data[rowId]);
3446
+ _rowData.$index = rowIndex + 1;
3447
+ }
3448
+ self.options.generateRowActions(_rowData, rowIndex);
3449
+ $(this).empty().append(self.options.getRowAction(rowIndex));
3450
+ });
3451
+ }
3452
+ },
3453
+ /* Renders the table body. */
3454
+ _renderGrid: function (isCreated) {
3455
+ var $htm, isScrollorOnDemand = this.options.isNavTypeScrollOrOndemand(), pageStartIndex = this.getPageStartIndex();
3456
+ $('table.table-bordered').parents('.app-grid-header-inner').addClass('table_border');
3457
+ if(isScrollorOnDemand) {
3458
+ var $tbody = this.gridElement;
3459
+ // get markup for new rows and append it to tbod
3460
+ var template = this._getGridTemplate();
3461
+ $htm = $(template);
3462
+ if (template && !$tbody.length) {
3463
+ // initally append tbody to gridElement
3464
+ this.gridElement.append($htm);
3465
+ }
3466
+
3467
+ } else {
3468
+ var templates = this._getGridTemplate();
3469
+ $htm = $(templates);
3470
+ if(templates) {
3471
+ this.gridElement.append($htm);
3472
+ }
3473
+ }
3474
+
3475
+ if (this.options.summaryRow) {
3476
+ var $summaryRowHtm = $(this._getSummaryRowTemplate());
3477
+ this.tableContainer.find('tfoot').remove();
3478
+ if (this.options.data.length){
3479
+ this.tableContainer.append($summaryRowHtm);
3480
+ }
3481
+ }
3482
+ // Set proper data status messages after the grid is rendered.
3483
+ if (!this.options.data.length && this.dataStatus.state === 'nodata') {
3484
+ this.setStatus('nodata');
3485
+ } else {
3486
+ this.dataStatus.state = this.dataStatus.state || 'loading';
3487
+ this.dataStatus.message = this.dataStatus.message || this.options.dataStates.loading;
3488
+ this.setStatus(this.dataStatus.state, this.dataStatus.message, isCreated);
3489
+ }
3490
+ this.gridBody = this.gridElement.find('tbody');
3491
+ this.gridFooter = this.tableContainer.find('tfoot');
3492
+ this._findAndReplaceCompiledTemplates();
3493
+ this.options.clearRowActions();
3494
+ // attach event handlers
3495
+ this._appendRowExpansionButtons($htm);
3496
+ this._appendRowActions($htm);
3497
+ this.attachEventHandlers($htm);
3498
+ this.__setStatus(isCreated);
3499
+ //Add new row, if always show new row is present for quick edit
3500
+ if (this.options.editmode === this.CONSTANTS.QUICK_EDIT && this.options.showNewRow) {
3501
+ this.addNewRow(false, true);
3502
+ }
3503
+ if (isCreated) {
3504
+ this._setColSpan(this.options.headerConfig);
3505
+ }
3506
+ if (_.isFunction(this.options.onDataRender)) {
3507
+ this.options.onDataRender();
3508
+ }
3509
+ if (!isCreated && this.options.selectFirstRow) {
3510
+ if (this.options.multiselect) {
3511
+ //Set selectFirstRow to false, to prevent first item being selected in next page
3512
+ this.options.selectFirstRow = false;
3513
+ }
3514
+ if (this.gridElement.find('tr.app-datagrid-row.active').length <= 0) {
3515
+ this.selectFirstRow(true, true);
3516
+ }
3517
+ }
3518
+ },
3519
+
3520
+ /* Renders the table container. */
3521
+ _render: function (isCreated) {
3522
+ if (!this.tableId) {
3523
+ this.tableId = this.Utils.generateGuid();
3524
+ }
3525
+ var overflow = (this.options.isNavTypeScrollOrOndemand() && (this.options.height === '100%' || this.options.height === 'auto')) ? 'hidden' : 'auto';
3526
+ var statusContainer =
3527
+ '<div class="overlay">' +
3528
+ '<div class="status"><i class="' + this.options.loadingicon + '"></i><span class="message"></span></div>' +
3529
+ '</div>',
3530
+
3531
+ table = '<div class="table-container table-responsive">' +
3532
+ '<div class="app-grid-header">' +
3533
+ '<div class="app-grid-header-inner">' +
3534
+ '<table tabindex="0" class="' + this.options.cssClassNames.gridDefault + ' ' + this.options.cssClassNames.grid + '">' +
3535
+ '<thead class="table-header thead-sticky" id="table_header_' + this.tableId + '" role="rowgroup">' +
3536
+ '</thead><tbody class="app-grid-content app-datagrid-body" id="table_' + this.tableId + '" role="rowgroup">' +
3537
+ '</tbody></table>' +
3538
+ '</div></div></div>',
3539
+ $statusContainer = $(statusContainer),
3540
+ $tableContainer = this.element.find('.table-container');
3541
+ this.gridContainer = $(table);
3542
+ this.gridHeaderElement = this.gridContainer.find('.table-header');
3543
+ this._setStyles($statusContainer.find('div.overlay'), "display:none");
3544
+ this._setStyles(this.gridContainer.find('div.app-grid-header-inner'), 'height:' + this.options.height + '; overflow: auto;');
3545
+ this.tableContainer = this.gridContainer.find('table');
3546
+ this.gridElement = this.gridContainer.find('.app-grid-content');
3547
+
3548
+
3549
+ if ((this.options.isNavTypeScrollOrOndemand() && (!$tableContainer.length || !this.options.isNextPageData)) || (!this.options.isNavTypeScrollOrOndemand())) {
3550
+ this.element.find('.table-container').remove();
3551
+ this.element.append(this.gridContainer);
3552
+
3553
+ }
3554
+ // Fix for [WMS-23263]: reset the 'isNextPageData' flag
3555
+
3556
+ this.options.setIsNextPageData(false);
3557
+
3558
+ // Fix for [WMS-23263]: Adding data status container
3559
+ if (!this.gridContainer.find('.overlay').length) {
3560
+ this.dataStatusContainer = $(statusContainer);
3561
+ this.gridContainer.append(this.dataStatusContainer);
3562
+ }
3563
+
3564
+ // Fix for [WMS-23263]: clear the header template for removing existing colgroup in case of dynamictable
3565
+ if (this.gridHeaderElement) {
3566
+ this.gridHeaderElement.empty();
3567
+ this.gridElement.find('colgroup').remove();
3568
+ }
3569
+ this._renderHeader();
3570
+ if (this.options.filtermode === this.CONSTANTS.SEARCH && (_.isEmpty(this.searchObj) || (this.searchObj && !this.searchObj.field && !this.searchObj.value))) {
3571
+ this._renderSearch();
3572
+ } else if (this.options.filtermode === this.CONSTANTS.MULTI_COLUMN) {
3573
+ this._renderRowFilter();
3574
+ }
3575
+ if (this.options.spacing === 'condensed') {
3576
+ this._toggleSpacingClasses('condensed');
3577
+ }
3578
+ this._renderGrid(isCreated);
3579
+ this.addNavigationControls();
3580
+ },
3581
+ addNavigationControls: function() {
3582
+ /**
3583
+ * bind on demand / scroll events to the table in case of dynamictable in render fn
3584
+ * Render is called everytime when there is a change in dataset and the previously binded events are lost
3585
+ */
3586
+ if (this.options.isdynamictable) {
3587
+ this.element.find('.on-demand-datagrid').remove();
3588
+ if (this.options.navigation === 'On-Demand' && (!this.element.find('.on-demand-datagrid').length)) {
3589
+ this.options.addLoadMoreBtn();
3590
+ } else if (this.options.navigation === 'Scroll') {
3591
+ this.options.bindScrollEvt();
3592
+ }
3593
+ }
3594
+ },
3595
+ __setStatus: function (isCreated) {
3596
+ var loadingIndicator = this.dataStatusContainer.find('i'),
3597
+ state = this.dataStatus.state,
3598
+ isScrollOrOndemand = this.options.isNavTypeScrollOrOndemand();
3599
+ this.dataStatusContainer.find('.message').text(this.dataStatus.message);
3600
+ if (state === 'loading') {
3601
+ loadingIndicator.removeClass('hidden');
3602
+ } else {
3603
+ loadingIndicator.addClass('hidden');
3604
+ }
3605
+ if (state === 'ready') {
3606
+ this.dataStatusContainer.hide();
3607
+ } else {
3608
+ // [WMS-23839] always show load more btn if show view less btn is true
3609
+ if (this.options.isNavTypeScrollOrOndemand() &&
3610
+ (state === 'nodata' ||
3611
+ (this.options.getCurrentPage && typeof this.options.getCurrentPage === 'function' &&
3612
+ this.options.getPageCount && typeof this.options.getPageCount === 'function' &&
3613
+ (this.options.getCurrentPage() == this.options.getPageCount()) && !this.options.showviewlessbutton))) {
3614
+ this.element.find('.on-demand-datagrid a').hide();
3615
+ }
3616
+ this.dataStatusContainer.show();
3617
+ }
3618
+ if (state === 'nodata' || state === 'loading' || state === 'error') {
3619
+ if (this.options.height === '100%' || this.options.height === 'auto') { //If height is auto or 100%, Set the loading overlay height as present grid content height
3620
+ if (state === 'nodata') {
3621
+ this.dataStatusContainer.css('height', 'auto');
3622
+ this.dataStatus.contentHeight = 0;
3623
+ } else if (this.options.isNavTypeScrollOrOndemand() &&
3624
+ this.options.getCurrentPage && typeof this.options.getCurrentPage === 'function' &&
3625
+ this.options.getCurrentPage() > 1){
3626
+ // showing the loading icon only for the first page
3627
+ // from second page there is another loader which is being shown instead of LoadMore btn
3628
+ this.dataStatusContainer.hide();
3629
+ } else {
3630
+ this.dataStatus.height = this.dataStatus.height || this.dataStatusContainer.outerHeight();
3631
+ this.dataStatus.contentHeight = this.gridElement.outerHeight() || this.dataStatus.contentHeight;
3632
+ this.dataStatusContainer.css('height', this.dataStatus.height > this.dataStatus.contentHeight ? 'auto' : this.dataStatus.contentHeight);
3633
+ }
3634
+ }
3635
+ if (!isScrollOrOndemand || (isScrollOrOndemand &&
3636
+ this.options.getCurrentPage && typeof this.options.getCurrentPage === 'function' &&
3637
+ this.options.getCurrentPage() === 1)) {
3638
+ this.gridContainer.addClass("show-msg");
3639
+ }
3640
+ } else {
3641
+ this.gridContainer.removeClass('show-msg');
3642
+
3643
+ // In case of quickeditmode, if active row is found, focus the row and bind the event listeners to the row
3644
+ if (this.options.editmode === this.CONSTANTS.QUICK_EDIT) {
3645
+ if (this.options.activeRow) {
3646
+ this.attachHandlersToActiveRow(this.options.activeRow);
3647
+ }
3648
+ this.options.activeRow = undefined;
3649
+ }
3650
+ }
3651
+ if (!isCreated) {
3652
+ this.setColGroupWidths();
3653
+ }
3654
+ this.addOrRemoveScroll();
3655
+ },
3656
+ /**
3657
+ *
3658
+ * @param {*} rowObj Contains the object which is part of options.data
3659
+ * In this method, active row will be focused and event handlers are attached.
3660
+ * If object is recieved, node extraction will be done and if found operations on the row are performed
3661
+ */
3662
+ attachHandlersToActiveRow(rowObj) {
3663
+ var rowIndex = this.Utils.getObjectIndex(this.options.data, rowObj);
3664
+ var row = this.gridElement.find('tr.app-datagrid-row[data-row-id=' + rowIndex + ']');
3665
+ if (!row.length) {
3666
+ return;
3667
+ } else if (!row.hasClass('active')) {
3668
+ row.addClass('active');
3669
+ }
3670
+ this.focusActiveRow();
3671
+ this.attachEventHandlers(row);
3672
+ },
3673
+ // This method sets the activerow on which save operation is performed in quickeditmode
3674
+ setActiveRow(row) {
3675
+ this.options.activeRow = row;
3676
+ },
3677
+ //This method is used to show or hide data loading/ no data found overlay
3678
+ setStatus: function (state, message, isCreated) {
3679
+ var $newRow;
3680
+ //If state is nodata and always new row is present, change state to ready
3681
+ if (state === 'nodata') {
3682
+ $newRow = this.gridElement && this.gridElement.find('tr.app-datagrid-row.always-new-row');
3683
+ state = ($newRow && $newRow.length) ? 'ready' : state;
3684
+ }
3685
+
3686
+ this.dataStatus.state = state;
3687
+ this.options.setGridState(state);
3688
+ this.dataStatus.message = message || this.options.dataStates[state];
3689
+ //First time call the status function, afterwards use debounce with 100 ms wait
3690
+ if (this._setStatusCalled) {
3691
+ this._setStatus(isCreated);
3692
+ } else {
3693
+ this.__setStatus(isCreated);
3694
+ this._setStatusCalled = true;
3695
+ }
3696
+ },
3697
+
3698
+ setGridDimensions: function (key, value) {
3699
+ if (value.indexOf('px') === -1 && value.indexOf('%') === -1 && value.indexOf('em') === -1 && value != 'auto') {
3700
+ value = value + 'px';
3701
+ }
3702
+ this.options[key] = value;
3703
+ if (key === 'height') {
3704
+ // if(this.dataStatus.state != 'loading') {
3705
+ var elements = this.gridHeaderElement.find('th');
3706
+ // this._setStyles(this.tableContainer, 'border-collapse: separate;');
3707
+
3708
+ // for (var i = 0; i < elements.length; i += 1) {
3709
+ // this._setStyles($(elements[i]), 'border: 1px solid #eee');
3710
+ // }
3711
+ //}
3712
+ this.gridContainer.find('.app-grid-header-inner').css(key, value);
3713
+ // this.gridContainer.find('.app-grid-header-inner').css('border', '1px solid #eee');
3714
+ if (this.options.isNavTypeScrollOrOndemand() && (this.options.height != '100%' && this.options.height != 'auto')) {
3715
+ this.gridContainer.find('.app-grid-header-inner').css('overflow', 'auto');
3716
+ }
3717
+ this.dataStatusContainer.css(key, value);
3718
+ }
3719
+ this.addOrRemoveScroll();
3720
+ },
3721
+ /*Change the column header title. function will be called if display name changes in runmode*/
3722
+ setColumnProp: function (fieldName, property, val, isGroup) {
3723
+ var $col;
3724
+ if (property === 'displayName') {
3725
+ if (isGroup) {
3726
+ $col = this.gridHeaderElement.find('th[data-col-group="' + fieldName + '"]');
3727
+ } else {
3728
+ $col = this.gridHeaderElement.find('th[data-col-field="' + fieldName + '"]');
3729
+ }
3730
+ $col.attr('title', val);
3731
+ $col.find('.header-data').html(val);
3732
+
3733
+ //Change the display name in the search filter options
3734
+ if (this.options.filtermode === this.CONSTANTS.SEARCH && this.gridSearch) {
3735
+ this.gridSearch.find('select option[value="' + fieldName + '"]').text(val);
3736
+ }
3737
+ }
3738
+ },
3739
+
3740
+ applyRowNgClass: function (val, index) {
3741
+ var $row = this.gridElement.find('tr.app-datagrid-row[data-row-id="' + index + '"]');
3742
+ $row.removeClass(val.toRemove);
3743
+ $row.addClass(val.toAdd);
3744
+ },
3745
+
3746
+ applyColNgClass: function (val, rowIndex, colIndex) {
3747
+ var $cell = this.gridElement.find('tr.app-datagrid-row[data-row-id="' + rowIndex + '"] td.app-datagrid-cell[data-col-id="' + colIndex + '"]');
3748
+ var $head = this.tableContainer.find('thead tr th.app-datagrid-header-cell[data-col-id="' + colIndex + '"]');
3749
+ $cell.removeClass(val.toRemove);
3750
+ $cell.addClass(val.toAdd);
3751
+ $head.removeClass(val.toRemove);
3752
+ $head.addClass(val.toAdd);
3753
+ },
3754
+
3755
+ _destroy: function () {
3756
+ // MEMORY LEAK FIX: Remove native event listener using stored bound function
3757
+ // if (this.gridElement && this.gridElement[0] && this.boundRowClickHandlerOnCapture) {
3758
+ // this.gridElement[0].removeEventListener('click', this.boundRowClickHandlerOnCapture, true);
3759
+ // this.boundRowClickHandlerOnCapture = null;
3760
+ // }
3761
+
3762
+ // MEMORY LEAK FIX: Remove all jQuery event handlers
3763
+ if (this.gridHeaderElement) {
3764
+ this.gridHeaderElement.off();
3765
+ }
3766
+ if (this.gridElement) {
3767
+ this.gridElement.off();
3768
+ }
3769
+ if (this.gridSearch) {
3770
+ this.gridSearch.off();
3771
+ }
3772
+ if (this.tableContainer) {
3773
+ this.tableContainer.off();
3774
+ }
3775
+ if (this.gridContainer) {
3776
+ this.gridContainer.off();
3777
+ }
3778
+
3779
+ // MEMORY LEAK FIX: Clear all internal structures
3780
+ this.preparedData = [];
3781
+ this.preparedHeaderData = [];
3782
+ this.compiledCellTemplates = {};
3783
+
3784
+ this.element.text('');
3785
+ window.clearTimeout(this.refreshGridTimeout);
3786
+ }
3787
+ });