@gipisistemas/ng-core 1.1.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (782) hide show
  1. package/assets/styles/colors.scss +261 -0
  2. package/assets/styles/layout-grid.scss +146 -0
  3. package/assets/styles/styles.scss +149 -0
  4. package/assets/styles/theme.scss +22 -0
  5. package/assets/styles/typography.scss +54 -0
  6. package/assets/styles/variable.scss +41 -0
  7. package/bundles/gipisistemas-ng-core.umd.js +28311 -0
  8. package/bundles/gipisistemas-ng-core.umd.js.map +1 -0
  9. package/bundles/gipisistemas-ng-core.umd.min.js +66 -0
  10. package/bundles/gipisistemas-ng-core.umd.min.js.map +1 -0
  11. package/core/app-messages.d.ts +9 -0
  12. package/core/app.messages.d.ts +4 -0
  13. package/core/components/abstract-crud.component.d.ts +27 -0
  14. package/core/components/abstract-find.component.d.ts +43 -0
  15. package/core/components/abstract.component.d.ts +23 -0
  16. package/core/components/alert/alert.component.d.ts +7 -0
  17. package/core/core.module.d.ts +17 -0
  18. package/core/custom-breakpoints.d.ts +7 -0
  19. package/core/enums/local-time.enum.d.ts +5 -0
  20. package/core/extensions/string.extension.d.ts +3 -0
  21. package/core/gipi-components/components/abstract-crud.component.d.ts +25 -0
  22. package/core/gipi-components/components/abstract-find.component.d.ts +73 -0
  23. package/core/gipi-components/components/abstract.component.d.ts +38 -0
  24. package/core/gipi-components/decorators/autowired.decorator.d.ts +7 -0
  25. package/core/gipi-components/enums/sort-direction.enum.d.ts +5 -0
  26. package/core/gipi-components/interface/abstract-crud.interface.d.ts +5 -0
  27. package/core/gipi-components/interface/abstract-find.interface.d.ts +12 -0
  28. package/core/gipi-components/interface/abstract.interface.d.ts +11 -0
  29. package/core/gipi-components/interface/base-permission.interface.d.ts +9 -0
  30. package/core/gipi-components/models/abstract-filter.model.d.ts +9 -0
  31. package/core/gipi-components/models/abstract.model.d.ts +7 -0
  32. package/core/gipi-components/models/applied-filter.model.d.ts +9 -0
  33. package/core/gipi-components/models/dto/abstract.dto.d.ts +7 -0
  34. package/core/gipi-components/models/page-event.model.d.ts +18 -0
  35. package/core/gipi-components/models/page.model.d.ts +7 -0
  36. package/core/gipi-components/models/sort.model.d.ts +6 -0
  37. package/core/gipi-components/services/abstract-crud.service.d.ts +83 -0
  38. package/core/gipi-components/services/abstract.service.d.ts +19 -0
  39. package/core/gipi-components/services/base.service.d.ts +35 -0
  40. package/core/gipi-components/services/file.service.d.ts +6 -0
  41. package/core/gipi-components/services/session-storage.service.d.ts +8 -0
  42. package/core/gipi-components/types/generic.type.d.ts +1 -0
  43. package/core/gipi-components/types/uuid.type.d.ts +1 -0
  44. package/core/guards/auth.guard.d.ts +11 -0
  45. package/core/guards/permission.guard.d.ts +14 -0
  46. package/core/guards/public.guard.d.ts +11 -0
  47. package/core/interceptors/auth.interceptor.d.ts +9 -0
  48. package/core/interceptors/error.interceptor.d.ts +11 -0
  49. package/core/models/abstract.model.d.ts +3 -0
  50. package/core/models/archive.model.d.ts +4 -0
  51. package/core/models/authority.model.d.ts +3 -0
  52. package/core/models/base-user.model.d.ts +12 -0
  53. package/core/models/dto/abstract.dto.d.ts +2 -0
  54. package/core/models/dto/api-error.dto.d.ts +9 -0
  55. package/core/models/dto/api-sub-error.dto.d.ts +7 -0
  56. package/core/models/dto/chart.dto.d.ts +5 -0
  57. package/core/models/dto/confirmation.dto.d.ts +10 -0
  58. package/core/models/dto/dialog.dto.d.ts +36 -0
  59. package/core/models/dto/filter.dto.d.ts +8 -0
  60. package/core/models/dto/input-listbox.dto.d.ts +6 -0
  61. package/core/models/dto/menu.dto.d.ts +15 -0
  62. package/core/models/dto/message.dto.d.ts +7 -0
  63. package/core/models/dto/page.dto.d.ts +8 -0
  64. package/core/models/dto/sort.dto.d.ts +7 -0
  65. package/core/models/dto/tab.dto.d.ts +12 -0
  66. package/core/models/dto/table-column.dto.d.ts +21 -0
  67. package/core/models/dto/table-group-header.dto.d.ts +7 -0
  68. package/core/models/dto/table-page-event.dto.d.ts +6 -0
  69. package/core/models/dto/token.dto.d.ts +8 -0
  70. package/core/models/enums/criteria-operation.enum.d.ts +13 -0
  71. package/core/models/enums/criteria-sort-direction.enum.d.ts +4 -0
  72. package/core/models/enums/menu-type.enum.d.ts +6 -0
  73. package/core/models/enums/radio-button.enum.d.ts +6 -0
  74. package/core/models/enums/sort-direction.enum.d.ts +4 -0
  75. package/core/models/multitenant.model.d.ts +4 -0
  76. package/core/models/permission.model.d.ts +8 -0
  77. package/core/models/role.model.d.ts +7 -0
  78. package/core/pipes/local-time.pipe.d.ts +6 -0
  79. package/core/services/abstract-crud.service.d.ts +15 -0
  80. package/core/services/abstract-find.service.d.ts +30 -0
  81. package/core/services/abstract.service.d.ts +13 -0
  82. package/core/services/authentication.service.d.ts +23 -0
  83. package/core/services/breakpoint-observer.service.d.ts +9 -0
  84. package/core/services/confirmation.service.d.ts +8 -0
  85. package/core/services/dialog.service.d.ts +8 -0
  86. package/core/services/message.service.d.ts +8 -0
  87. package/core/services/nav.service.d.ts +16 -0
  88. package/core/services/svg-register.service.d.ts +22 -0
  89. package/core/types/local-time.type.d.ts +5 -0
  90. package/core/types/ng-class.type.d.ts +10 -0
  91. package/core/utils/array.util.d.ts +14 -0
  92. package/core/utils/browser.util.d.ts +4 -0
  93. package/core/utils/currency.util.d.ts +6 -0
  94. package/core/utils/date.util.d.ts +39 -0
  95. package/core/utils/document.util.d.ts +11 -0
  96. package/core/utils/email.util.d.ts +4 -0
  97. package/core/utils/number.util.d.ts +8 -0
  98. package/core/utils/object.util.d.ts +20 -0
  99. package/core/utils/password.util.d.ts +11 -0
  100. package/core/utils/phone.util.d.ts +13 -0
  101. package/core/utils/string.util.d.ts +9 -0
  102. package/core/utils/table-column-builder.d.ts +40 -0
  103. package/core/utils/time.util.d.ts +9 -0
  104. package/core/utils/url-params.util.d.ts +7 -0
  105. package/core/utils/uuid.util.d.ts +5 -0
  106. package/core/utils/zindex.util.d.ts +7 -0
  107. package/core.d.ts +88 -0
  108. package/esm2015/core/app-messages.js +1 -0
  109. package/esm2015/core/app.messages.js +12 -0
  110. package/esm2015/core/components/abstract-crud.component.js +97 -0
  111. package/esm2015/core/components/abstract-find.component.js +189 -0
  112. package/esm2015/core/components/abstract.component.js +110 -0
  113. package/esm2015/core/components/alert/alert.component.js +24 -0
  114. package/esm2015/core/core.module.js +103 -0
  115. package/esm2015/core/custom-breakpoints.js +87 -0
  116. package/esm2015/core/enums/local-time.enum.js +6 -0
  117. package/esm2015/core/extensions/string.extension.js +37 -0
  118. package/esm2015/core/gipi-components/components/abstract-crud.component.js +110 -0
  119. package/esm2015/core/gipi-components/components/abstract-find.component.js +471 -0
  120. package/esm2015/core/gipi-components/components/abstract.component.js +140 -0
  121. package/esm2015/core/gipi-components/decorators/autowired.decorator.js +47 -0
  122. package/esm2015/core/gipi-components/enums/sort-direction.enum.js +6 -0
  123. package/esm2015/core/gipi-components/interface/abstract-crud.interface.js +1 -0
  124. package/esm2015/core/gipi-components/interface/abstract-find.interface.js +1 -0
  125. package/esm2015/core/gipi-components/interface/abstract.interface.js +1 -0
  126. package/esm2015/core/gipi-components/interface/base-permission.interface.js +1 -0
  127. package/esm2015/core/gipi-components/models/abstract-filter.model.js +3 -0
  128. package/esm2015/core/gipi-components/models/abstract.model.js +3 -0
  129. package/esm2015/core/gipi-components/models/applied-filter.model.js +19 -0
  130. package/esm2015/core/gipi-components/models/dto/abstract.dto.js +3 -0
  131. package/esm2015/core/gipi-components/models/page-event.model.js +35 -0
  132. package/esm2015/core/gipi-components/models/page.model.js +7 -0
  133. package/esm2015/core/gipi-components/models/sort.model.js +7 -0
  134. package/esm2015/core/gipi-components/services/abstract-crud.service.js +109 -0
  135. package/esm2015/core/gipi-components/services/abstract.service.js +47 -0
  136. package/esm2015/core/gipi-components/services/base.service.js +102 -0
  137. package/esm2015/core/gipi-components/services/file.service.js +51 -0
  138. package/esm2015/core/gipi-components/services/session-storage.service.js +44 -0
  139. package/esm2015/core/gipi-components/types/generic.type.js +1 -0
  140. package/esm2015/core/gipi-components/types/uuid.type.js +1 -0
  141. package/esm2015/core/guards/auth.guard.js +48 -0
  142. package/esm2015/core/guards/permission.guard.js +61 -0
  143. package/esm2015/core/guards/public.guard.js +45 -0
  144. package/esm2015/core/interceptors/auth.interceptor.js +28 -0
  145. package/esm2015/core/interceptors/error.interceptor.js +110 -0
  146. package/esm2015/core/models/abstract.model.js +3 -0
  147. package/esm2015/core/models/archive.model.js +3 -0
  148. package/esm2015/core/models/authority.model.js +3 -0
  149. package/esm2015/core/models/base-user.model.js +8 -0
  150. package/esm2015/core/models/dto/abstract.dto.js +3 -0
  151. package/esm2015/core/models/dto/api-error.dto.js +8 -0
  152. package/esm2015/core/models/dto/api-sub-error.dto.js +4 -0
  153. package/esm2015/core/models/dto/chart.dto.js +4 -0
  154. package/esm2015/core/models/dto/confirmation.dto.js +8 -0
  155. package/esm2015/core/models/dto/dialog.dto.js +4 -0
  156. package/esm2015/core/models/dto/filter.dto.js +4 -0
  157. package/esm2015/core/models/dto/input-listbox.dto.js +7 -0
  158. package/esm2015/core/models/dto/menu.dto.js +9 -0
  159. package/esm2015/core/models/dto/message.dto.js +4 -0
  160. package/esm2015/core/models/dto/page.dto.js +9 -0
  161. package/esm2015/core/models/dto/sort.dto.js +9 -0
  162. package/esm2015/core/models/dto/tab.dto.js +10 -0
  163. package/esm2015/core/models/dto/table-column.dto.js +24 -0
  164. package/esm2015/core/models/dto/table-group-header.dto.js +10 -0
  165. package/esm2015/core/models/dto/table-page-event.dto.js +7 -0
  166. package/esm2015/core/models/dto/token.dto.js +4 -0
  167. package/esm2015/core/models/enums/criteria-operation.enum.js +15 -0
  168. package/esm2015/core/models/enums/criteria-sort-direction.enum.js +6 -0
  169. package/esm2015/core/models/enums/menu-type.enum.js +7 -0
  170. package/esm2015/core/models/enums/radio-button.enum.js +8 -0
  171. package/esm2015/core/models/enums/sort-direction.enum.js +6 -0
  172. package/esm2015/core/models/multitenant.model.js +4 -0
  173. package/esm2015/core/models/permission.model.js +11 -0
  174. package/esm2015/core/models/role.model.js +8 -0
  175. package/esm2015/core/pipes/local-time.pipe.js +21 -0
  176. package/esm2015/core/services/abstract-crud.service.js +24 -0
  177. package/esm2015/core/services/abstract-find.service.js +65 -0
  178. package/esm2015/core/services/abstract.service.js +30 -0
  179. package/esm2015/core/services/authentication.service.js +100 -0
  180. package/esm2015/core/services/breakpoint-observer.service.js +42 -0
  181. package/esm2015/core/services/confirmation.service.js +55 -0
  182. package/esm2015/core/services/dialog.service.js +41 -0
  183. package/esm2015/core/services/message.service.js +33 -0
  184. package/esm2015/core/services/nav.service.js +48 -0
  185. package/esm2015/core/services/svg-register.service.js +55 -0
  186. package/esm2015/core/types/local-time.type.js +1 -0
  187. package/esm2015/core/types/ng-class.type.js +1 -0
  188. package/esm2015/core/utils/array.util.js +110 -0
  189. package/esm2015/core/utils/browser.util.js +13 -0
  190. package/esm2015/core/utils/currency.util.js +21 -0
  191. package/esm2015/core/utils/date.util.js +257 -0
  192. package/esm2015/core/utils/document.util.js +153 -0
  193. package/esm2015/core/utils/email.util.js +25 -0
  194. package/esm2015/core/utils/number.util.js +28 -0
  195. package/esm2015/core/utils/object.util.js +199 -0
  196. package/esm2015/core/utils/password.util.js +38 -0
  197. package/esm2015/core/utils/phone.util.js +125 -0
  198. package/esm2015/core/utils/string.util.js +40 -0
  199. package/esm2015/core/utils/table-column-builder.js +85 -0
  200. package/esm2015/core/utils/time.util.js +59 -0
  201. package/esm2015/core/utils/url-params.util.js +12 -0
  202. package/esm2015/core/utils/uuid.util.js +17 -0
  203. package/esm2015/core/utils/zindex.util.js +35 -0
  204. package/esm2015/core.js +89 -0
  205. package/esm2015/gipi-components.js +105 -0
  206. package/esm2015/gipisistemas-ng-core.js +21 -0
  207. package/esm2015/public_api.js +4 -0
  208. package/esm2015/shared/api/generate-id-component.js +12 -0
  209. package/esm2015/shared/api/gipi-ng-config.js +76 -0
  210. package/esm2015/shared/api/overlay-message.js +1 -0
  211. package/esm2015/shared/api/throttle.js +60 -0
  212. package/esm2015/shared/api/translation.js +1 -0
  213. package/esm2015/shared/components/button/button.component.js +110 -0
  214. package/esm2015/shared/components/card/card.component.js +44 -0
  215. package/esm2015/shared/components/checkbox/checkbox.component.js +79 -0
  216. package/esm2015/shared/components/dom/connected-overlay-scroll-handler.js +27 -0
  217. package/esm2015/shared/components/dom/dom-handler.js +538 -0
  218. package/esm2015/shared/components/icon/icon.component.js +35 -0
  219. package/esm2015/shared/components/input/input.component.js +235 -0
  220. package/esm2015/shared/components/input-currency/input-currency.component.js +115 -0
  221. package/esm2015/shared/components/input-file/input-file.component.js +161 -0
  222. package/esm2015/shared/components/loading/loading.component.js +15 -0
  223. package/esm2015/shared/components/loading-overlay/loading-overlay.component.js +21 -0
  224. package/esm2015/shared/components/overlay-panel/overlay-panel.component.js +361 -0
  225. package/esm2015/shared/components/popover/popover-ref.js +25 -0
  226. package/esm2015/shared/components/popover/popover.component.js +34 -0
  227. package/esm2015/shared/components/popover/popover.service.js +85 -0
  228. package/esm2015/shared/components/radio-group-entity/radio-group-entity.component.js +74 -0
  229. package/esm2015/shared/components/radio-group-enum/radio-group-enum.component.js +126 -0
  230. package/esm2015/shared/components/select-button/select-button.component.js +181 -0
  231. package/esm2015/shared/components/select-entity/select-entity.component.js +262 -0
  232. package/esm2015/shared/components/select-entity-paged/select-entity-paged.component.js +419 -0
  233. package/esm2015/shared/components/select-entity-paged/shared/default-options.js +35 -0
  234. package/esm2015/shared/components/select-entity-paged/shared/select-button-add/select-button-add.component.js +69 -0
  235. package/esm2015/shared/components/select-entity-paged/shared/select-button-next-batch/select-button-next-batch.component.js +59 -0
  236. package/esm2015/shared/components/select-entity-paged/shared/select-no-entries-found.directive.js +20 -0
  237. package/esm2015/shared/components/select-entity-paged/shared/select-search/select-search.component.js +547 -0
  238. package/esm2015/shared/components/select-entity-paged/shared/select-search-clear.directive.js +18 -0
  239. package/esm2015/shared/components/select-enum/select-enum.component.js +117 -0
  240. package/esm2015/shared/components/select-month-period/select-month-period.component.js +87 -0
  241. package/esm2015/shared/components/slide-toggle/slide-toggle.component.js +75 -0
  242. package/esm2015/shared/components/stepper/stepper.component.js +32 -0
  243. package/esm2015/shared/components/tab/tab.component.js +57 -0
  244. package/esm2015/shared/components/tab-group/tab-group.component.js +117 -0
  245. package/esm2015/shared/components/table/table.component.js +523 -0
  246. package/esm2015/shared/components/table-scrolled/table-scrolled.component.js +105 -0
  247. package/esm2015/shared/components/textarea/textarea.component.js +156 -0
  248. package/esm2015/shared/directives/dynamic-tab.directive.js +18 -0
  249. package/esm2015/shared/directives/generic-template.directive.js +30 -0
  250. package/esm2015/shared/directives/input-select-infinite-scroll.directive.js +109 -0
  251. package/esm2015/shared/directives/lower-case.directive.js +47 -0
  252. package/esm2015/shared/directives/phone-mask.directive.js +60 -0
  253. package/esm2015/shared/directives/space-drop.directive.js +47 -0
  254. package/esm2015/shared/directives/upper-case.directive.js +47 -0
  255. package/esm2015/shared/gipi-components/abstract-form/abstract-form.component.js +119 -0
  256. package/esm2015/shared/gipi-components/action-row/action-row.component.js +30 -0
  257. package/esm2015/shared/gipi-components/badge/badge.component.js +44 -0
  258. package/esm2015/shared/gipi-components/button/button.component.js +251 -0
  259. package/esm2015/shared/gipi-components/chips/chips.component.js +149 -0
  260. package/esm2015/shared/gipi-components/confirmation-dialog/confirmation-dialog.component.js +44 -0
  261. package/esm2015/shared/gipi-components/datepicker/date-range-picker/date-range-picker.component.js +324 -0
  262. package/esm2015/shared/gipi-components/datepicker/date-range-picker/shared/max-range/max-range-selection-startegy.js +41 -0
  263. package/esm2015/shared/gipi-components/datepicker/date-range-picker/shared/max-range/max-range.directive.js +35 -0
  264. package/esm2015/shared/gipi-components/datepicker/date-range-picker/shared/preset-range/preset-range.component.js +259 -0
  265. package/esm2015/shared/gipi-components/datepicker/datepicker/datepicker.component.js +218 -0
  266. package/esm2015/shared/gipi-components/datepicker/datepicker.module.js +130 -0
  267. package/esm2015/shared/gipi-components/datepicker/mat-datepicker/calendar-body.js +341 -0
  268. package/esm2015/shared/gipi-components/datepicker/mat-datepicker/calendar.js +397 -0
  269. package/esm2015/shared/gipi-components/datepicker/mat-datepicker/date-range-input-parts.js +325 -0
  270. package/esm2015/shared/gipi-components/datepicker/mat-datepicker/date-range-input.js +329 -0
  271. package/esm2015/shared/gipi-components/datepicker/mat-datepicker/date-range-picker.js +41 -0
  272. package/esm2015/shared/gipi-components/datepicker/mat-datepicker/date-range-selection-strategy.js +61 -0
  273. package/esm2015/shared/gipi-components/datepicker/mat-datepicker/date-selection-model.js +159 -0
  274. package/esm2015/shared/gipi-components/datepicker/mat-datepicker/datepicker-animations.js +35 -0
  275. package/esm2015/shared/gipi-components/datepicker/mat-datepicker/datepicker-base.js +555 -0
  276. package/esm2015/shared/gipi-components/datepicker/mat-datepicker/datepicker-errors.js +14 -0
  277. package/esm2015/shared/gipi-components/datepicker/mat-datepicker/datepicker-input-base.js +303 -0
  278. package/esm2015/shared/gipi-components/datepicker/mat-datepicker/datepicker-input.js +179 -0
  279. package/esm2015/shared/gipi-components/datepicker/mat-datepicker/datepicker-intl.js +51 -0
  280. package/esm2015/shared/gipi-components/datepicker/mat-datepicker/datepicker-toggle.js +124 -0
  281. package/esm2015/shared/gipi-components/datepicker/mat-datepicker/datepicker.js +29 -0
  282. package/esm2015/shared/gipi-components/datepicker/mat-datepicker/month-view.js +365 -0
  283. package/esm2015/shared/gipi-components/datepicker/mat-datepicker/multi-year-view.js +305 -0
  284. package/esm2015/shared/gipi-components/datepicker/mat-datepicker/shared/adapter/date-adapter.js +116 -0
  285. package/esm2015/shared/gipi-components/datepicker/mat-datepicker/shared/adapter/date-formats.js +10 -0
  286. package/esm2015/shared/gipi-components/datepicker/mat-datepicker/shared/adapter/native-date-adapter.js +294 -0
  287. package/esm2015/shared/gipi-components/datepicker/mat-datepicker/shared/adapter/native-date-formats.js +19 -0
  288. package/esm2015/shared/gipi-components/datepicker/mat-datepicker/shared/adapter/platform.js +81 -0
  289. package/esm2015/shared/gipi-components/datepicker/mat-datepicker/year-view.js +294 -0
  290. package/esm2015/shared/gipi-components/dom/connected-overlay-scroll-handler.js +27 -0
  291. package/esm2015/shared/gipi-components/dom/dom-handler.js +645 -0
  292. package/esm2015/shared/gipi-components/dropdown-menu/dropdown-menu.component.js +185 -0
  293. package/esm2015/shared/gipi-components/expansion-panel/expansion-panel.component.js +81 -0
  294. package/esm2015/shared/gipi-components/file-drag-and-drop/file-drag-and-drop.component.js +240 -0
  295. package/esm2015/shared/gipi-components/file-drag-and-drop/shared/file-drag-and-drop.directive.js +92 -0
  296. package/esm2015/shared/gipi-components/footer/footer.component.js +29 -0
  297. package/esm2015/shared/gipi-components/form-field/form-field.component.js +262 -0
  298. package/esm2015/shared/gipi-components/helpful-tip/helpful-tip.component.js +62 -0
  299. package/esm2015/shared/gipi-components/infinite-scroll/infinite-scroll.directive.js +103 -0
  300. package/esm2015/shared/gipi-components/input-checkbox/input-checkbox.component.js +112 -0
  301. package/esm2015/shared/gipi-components/input-currency/input-currency.component.js +197 -0
  302. package/esm2015/shared/gipi-components/input-monthpicker/input-monthpicker.component.js +408 -0
  303. package/esm2015/shared/gipi-components/input-select/input-select.component.js +655 -0
  304. package/esm2015/shared/gipi-components/input-select-enum/input-select-enum.component.js +311 -0
  305. package/esm2015/shared/gipi-components/input-select-listbox/input-select-listbox.component.js +422 -0
  306. package/esm2015/shared/gipi-components/input-select-paged/input-search/input-search.component.js +374 -0
  307. package/esm2015/shared/gipi-components/input-select-paged/input-select-paged.component.js +350 -0
  308. package/esm2015/shared/gipi-components/input-select-radio/input-select-radio.component.js +269 -0
  309. package/esm2015/shared/gipi-components/layout-grid/col.directive.js +161 -0
  310. package/esm2015/shared/gipi-components/layout-grid/row.directive.js +124 -0
  311. package/esm2015/shared/gipi-components/layout-grid/services/breakpoint.service.js +87 -0
  312. package/esm2015/shared/gipi-components/layout-grid/services/resize.service.js +64 -0
  313. package/esm2015/shared/gipi-components/month-year-picker/calendar-month-year/calendar-month-year.component.js +193 -0
  314. package/esm2015/shared/gipi-components/month-year-picker/mont-year-picker.module.js +47 -0
  315. package/esm2015/shared/gipi-components/month-year-picker/month-year-picker.component.js +460 -0
  316. package/esm2015/shared/gipi-components/notification/notification.component.js +104 -0
  317. package/esm2015/shared/gipi-components/novelties/novelties.component.js +109 -0
  318. package/esm2015/shared/gipi-components/overlay/overlay.component.js +565 -0
  319. package/esm2015/shared/gipi-components/overlay/shared/overlay-service.js +21 -0
  320. package/esm2015/shared/gipi-components/overlay/shared/overlay_options.js +1 -0
  321. package/esm2015/shared/gipi-components/password-requeriments/password-requeriments.component.js +127 -0
  322. package/esm2015/shared/gipi-components/popover/popover.component.js +397 -0
  323. package/esm2015/shared/gipi-components/popover/shared/popover-animations.js +29 -0
  324. package/esm2015/shared/gipi-components/popover/shared/popover-errors.js +27 -0
  325. package/esm2015/shared/gipi-components/popover/shared/popover-interfaces.js +1 -0
  326. package/esm2015/shared/gipi-components/popover/shared/popover-target.js +19 -0
  327. package/esm2015/shared/gipi-components/popover/shared/popover-trigger.js +514 -0
  328. package/esm2015/shared/gipi-components/popover/shared/popover-types.js +1 -0
  329. package/esm2015/shared/gipi-components/radio-group/radio-group.component.js +143 -0
  330. package/esm2015/shared/gipi-components/range-page/range-page.component.js +254 -0
  331. package/esm2015/shared/gipi-components/range-slider/range-slider.component.js +345 -0
  332. package/esm2015/shared/gipi-components/select/select.component.js +211 -0
  333. package/esm2015/shared/gipi-components/select-button/select-button.component.js +187 -0
  334. package/esm2015/shared/gipi-components/sidebar/container/container.component.js +83 -0
  335. package/esm2015/shared/gipi-components/sidebar/sidenav/sidenav.component.js +240 -0
  336. package/esm2015/shared/gipi-components/stepper/stepper.component.js +37 -0
  337. package/esm2015/shared/gipi-components/table/components/table-body/table-body.component.js +203 -0
  338. package/esm2015/shared/gipi-components/table/components/table-footer/table-footer.component.js +30 -0
  339. package/esm2015/shared/gipi-components/table/components/table-header/table-header.component.js +152 -0
  340. package/esm2015/shared/gipi-components/table/components/table-pagination/shared/paginate.pipe.js +122 -0
  341. package/esm2015/shared/gipi-components/table/components/table-pagination/shared/pagination-controls.directive.js +225 -0
  342. package/esm2015/shared/gipi-components/table/components/table-pagination/shared/pagination-instance.js +1 -0
  343. package/esm2015/shared/gipi-components/table/components/table-pagination/shared/pagination.service.js +105 -0
  344. package/esm2015/shared/gipi-components/table/components/table-pagination/table-pagination.component.js +102 -0
  345. package/esm2015/shared/gipi-components/table/components/table-progress-bar/table-progress-bar.component.js +30 -0
  346. package/esm2015/shared/gipi-components/table/models/pipe-transform.model.js +1 -0
  347. package/esm2015/shared/gipi-components/table/models/sort.model.js +19 -0
  348. package/esm2015/shared/gipi-components/table/models/sorted-column.model.js +2 -0
  349. package/esm2015/shared/gipi-components/table/models/table-column-builder.model.js +104 -0
  350. package/esm2015/shared/gipi-components/table/models/table-column.model.js +162 -0
  351. package/esm2015/shared/gipi-components/table/table.component.js +159 -0
  352. package/esm2015/shared/gipi-components/table/types/sort-direction.type.js +1 -0
  353. package/esm2015/shared/gipi-components/table/types/sort.type.js +1 -0
  354. package/esm2015/shared/gipi-components/template/template.directive.js +33 -0
  355. package/esm2015/shared/gipi-components/toolbar/toolbar.component.js +53 -0
  356. package/esm2015/shared/gipi-components/top-nav/top-nav.component.js +38 -0
  357. package/esm2015/shared/gipi-components/user-profile/user-profile.component.js +109 -0
  358. package/esm2015/shared/material.module.js +102 -0
  359. package/esm2015/shared/shared.module.js +339 -0
  360. package/esm2015/shared.js +36 -0
  361. package/esm5/core/app-messages.js +1 -0
  362. package/esm5/core/app.messages.js +12 -0
  363. package/esm5/core/components/abstract-crud.component.js +108 -0
  364. package/esm5/core/components/abstract-find.component.js +201 -0
  365. package/esm5/core/components/abstract.component.js +112 -0
  366. package/esm5/core/components/alert/alert.component.js +25 -0
  367. package/esm5/core/core.module.js +107 -0
  368. package/esm5/core/custom-breakpoints.js +87 -0
  369. package/esm5/core/enums/local-time.enum.js +6 -0
  370. package/esm5/core/extensions/string.extension.js +37 -0
  371. package/esm5/core/gipi-components/components/abstract-crud.component.js +122 -0
  372. package/esm5/core/gipi-components/components/abstract-find.component.js +507 -0
  373. package/esm5/core/gipi-components/components/abstract.component.js +152 -0
  374. package/esm5/core/gipi-components/decorators/autowired.decorator.js +52 -0
  375. package/esm5/core/gipi-components/enums/sort-direction.enum.js +6 -0
  376. package/esm5/core/gipi-components/interface/abstract-crud.interface.js +1 -0
  377. package/esm5/core/gipi-components/interface/abstract-find.interface.js +1 -0
  378. package/esm5/core/gipi-components/interface/abstract.interface.js +1 -0
  379. package/esm5/core/gipi-components/interface/base-permission.interface.js +1 -0
  380. package/esm5/core/gipi-components/models/abstract-filter.model.js +7 -0
  381. package/esm5/core/gipi-components/models/abstract.model.js +7 -0
  382. package/esm5/core/gipi-components/models/applied-filter.model.js +29 -0
  383. package/esm5/core/gipi-components/models/dto/abstract.dto.js +7 -0
  384. package/esm5/core/gipi-components/models/page-event.model.js +49 -0
  385. package/esm5/core/gipi-components/models/page.model.js +9 -0
  386. package/esm5/core/gipi-components/models/sort.model.js +9 -0
  387. package/esm5/core/gipi-components/services/abstract-crud.service.js +114 -0
  388. package/esm5/core/gipi-components/services/abstract.service.js +49 -0
  389. package/esm5/core/gipi-components/services/base.service.js +143 -0
  390. package/esm5/core/gipi-components/services/file.service.js +53 -0
  391. package/esm5/core/gipi-components/services/session-storage.service.js +45 -0
  392. package/esm5/core/gipi-components/types/generic.type.js +1 -0
  393. package/esm5/core/gipi-components/types/uuid.type.js +1 -0
  394. package/esm5/core/guards/auth.guard.js +50 -0
  395. package/esm5/core/guards/permission.guard.js +74 -0
  396. package/esm5/core/guards/public.guard.js +47 -0
  397. package/esm5/core/interceptors/auth.interceptor.js +29 -0
  398. package/esm5/core/interceptors/error.interceptor.js +129 -0
  399. package/esm5/core/models/abstract.model.js +7 -0
  400. package/esm5/core/models/archive.model.js +7 -0
  401. package/esm5/core/models/authority.model.js +7 -0
  402. package/esm5/core/models/base-user.model.js +13 -0
  403. package/esm5/core/models/dto/abstract.dto.js +7 -0
  404. package/esm5/core/models/dto/api-error.dto.js +13 -0
  405. package/esm5/core/models/dto/api-sub-error.dto.js +11 -0
  406. package/esm5/core/models/dto/chart.dto.js +11 -0
  407. package/esm5/core/models/dto/confirmation.dto.js +13 -0
  408. package/esm5/core/models/dto/dialog.dto.js +11 -0
  409. package/esm5/core/models/dto/filter.dto.js +11 -0
  410. package/esm5/core/models/dto/input-listbox.dto.js +11 -0
  411. package/esm5/core/models/dto/menu.dto.js +14 -0
  412. package/esm5/core/models/dto/message.dto.js +11 -0
  413. package/esm5/core/models/dto/page.dto.js +14 -0
  414. package/esm5/core/models/dto/sort.dto.js +14 -0
  415. package/esm5/core/models/dto/tab.dto.js +15 -0
  416. package/esm5/core/models/dto/table-column.dto.js +29 -0
  417. package/esm5/core/models/dto/table-group-header.dto.js +15 -0
  418. package/esm5/core/models/dto/table-page-event.dto.js +11 -0
  419. package/esm5/core/models/dto/token.dto.js +11 -0
  420. package/esm5/core/models/enums/criteria-operation.enum.js +15 -0
  421. package/esm5/core/models/enums/criteria-sort-direction.enum.js +6 -0
  422. package/esm5/core/models/enums/menu-type.enum.js +7 -0
  423. package/esm5/core/models/enums/radio-button.enum.js +8 -0
  424. package/esm5/core/models/enums/sort-direction.enum.js +6 -0
  425. package/esm5/core/models/multitenant.model.js +11 -0
  426. package/esm5/core/models/permission.model.js +16 -0
  427. package/esm5/core/models/role.model.js +13 -0
  428. package/esm5/core/pipes/local-time.pipe.js +26 -0
  429. package/esm5/core/services/abstract-crud.service.js +30 -0
  430. package/esm5/core/services/abstract-find.service.js +71 -0
  431. package/esm5/core/services/abstract.service.js +32 -0
  432. package/esm5/core/services/authentication.service.js +121 -0
  433. package/esm5/core/services/breakpoint-observer.service.js +52 -0
  434. package/esm5/core/services/confirmation.service.js +66 -0
  435. package/esm5/core/services/dialog.service.js +44 -0
  436. package/esm5/core/services/message.service.js +36 -0
  437. package/esm5/core/services/nav.service.js +51 -0
  438. package/esm5/core/services/svg-register.service.js +67 -0
  439. package/esm5/core/types/local-time.type.js +1 -0
  440. package/esm5/core/types/ng-class.type.js +1 -0
  441. package/esm5/core/utils/array.util.js +120 -0
  442. package/esm5/core/utils/browser.util.js +17 -0
  443. package/esm5/core/utils/currency.util.js +26 -0
  444. package/esm5/core/utils/date.util.js +269 -0
  445. package/esm5/core/utils/document.util.js +157 -0
  446. package/esm5/core/utils/email.util.js +29 -0
  447. package/esm5/core/utils/number.util.js +32 -0
  448. package/esm5/core/utils/object.util.js +204 -0
  449. package/esm5/core/utils/password.util.js +42 -0
  450. package/esm5/core/utils/phone.util.js +135 -0
  451. package/esm5/core/utils/string.util.js +44 -0
  452. package/esm5/core/utils/table-column-builder.js +87 -0
  453. package/esm5/core/utils/time.util.js +65 -0
  454. package/esm5/core/utils/url-params.util.js +16 -0
  455. package/esm5/core/utils/uuid.util.js +21 -0
  456. package/esm5/core/utils/zindex.util.js +35 -0
  457. package/esm5/core.js +89 -0
  458. package/esm5/gipi-components.js +105 -0
  459. package/esm5/gipisistemas-ng-core.js +21 -0
  460. package/esm5/public_api.js +4 -0
  461. package/esm5/shared/api/generate-id-component.js +16 -0
  462. package/esm5/shared/api/gipi-ng-config.js +77 -0
  463. package/esm5/shared/api/overlay-message.js +1 -0
  464. package/esm5/shared/api/throttle.js +60 -0
  465. package/esm5/shared/api/translation.js +1 -0
  466. package/esm5/shared/components/button/button.component.js +111 -0
  467. package/esm5/shared/components/card/card.component.js +45 -0
  468. package/esm5/shared/components/checkbox/checkbox.component.js +85 -0
  469. package/esm5/shared/components/dom/connected-overlay-scroll-handler.js +30 -0
  470. package/esm5/shared/components/dom/dom-handler.js +573 -0
  471. package/esm5/shared/components/icon/icon.component.js +38 -0
  472. package/esm5/shared/components/input/input.component.js +242 -0
  473. package/esm5/shared/components/input-currency/input-currency.component.js +121 -0
  474. package/esm5/shared/components/input-file/input-file.component.js +165 -0
  475. package/esm5/shared/components/loading/loading.component.js +18 -0
  476. package/esm5/shared/components/loading-overlay/loading-overlay.component.js +23 -0
  477. package/esm5/shared/components/overlay-panel/overlay-panel.component.js +366 -0
  478. package/esm5/shared/components/popover/popover-ref.js +28 -0
  479. package/esm5/shared/components/popover/popover.component.js +35 -0
  480. package/esm5/shared/components/popover/popover.service.js +88 -0
  481. package/esm5/shared/components/radio-group-entity/radio-group-entity.component.js +80 -0
  482. package/esm5/shared/components/radio-group-enum/radio-group-enum.component.js +138 -0
  483. package/esm5/shared/components/select-button/select-button.component.js +195 -0
  484. package/esm5/shared/components/select-entity/select-entity.component.js +269 -0
  485. package/esm5/shared/components/select-entity-paged/select-entity-paged.component.js +453 -0
  486. package/esm5/shared/components/select-entity-paged/shared/default-options.js +35 -0
  487. package/esm5/shared/components/select-entity-paged/shared/select-button-add/select-button-add.component.js +72 -0
  488. package/esm5/shared/components/select-entity-paged/shared/select-button-next-batch/select-button-next-batch.component.js +62 -0
  489. package/esm5/shared/components/select-entity-paged/shared/select-no-entries-found.directive.js +23 -0
  490. package/esm5/shared/components/select-entity-paged/shared/select-search/select-search.component.js +590 -0
  491. package/esm5/shared/components/select-entity-paged/shared/select-search-clear.directive.js +21 -0
  492. package/esm5/shared/components/select-enum/select-enum.component.js +124 -0
  493. package/esm5/shared/components/select-month-period/select-month-period.component.js +91 -0
  494. package/esm5/shared/components/slide-toggle/slide-toggle.component.js +81 -0
  495. package/esm5/shared/components/stepper/stepper.component.js +36 -0
  496. package/esm5/shared/components/tab/tab.component.js +58 -0
  497. package/esm5/shared/components/tab-group/tab-group.component.js +125 -0
  498. package/esm5/shared/components/table/table.component.js +538 -0
  499. package/esm5/shared/components/table-scrolled/table-scrolled.component.js +107 -0
  500. package/esm5/shared/components/textarea/textarea.component.js +174 -0
  501. package/esm5/shared/directives/dynamic-tab.directive.js +19 -0
  502. package/esm5/shared/directives/generic-template.directive.js +31 -0
  503. package/esm5/shared/directives/input-select-infinite-scroll.directive.js +113 -0
  504. package/esm5/shared/directives/lower-case.directive.js +48 -0
  505. package/esm5/shared/directives/phone-mask.directive.js +61 -0
  506. package/esm5/shared/directives/space-drop.directive.js +48 -0
  507. package/esm5/shared/directives/upper-case.directive.js +48 -0
  508. package/esm5/shared/gipi-components/abstract-form/abstract-form.component.js +141 -0
  509. package/esm5/shared/gipi-components/action-row/action-row.component.js +33 -0
  510. package/esm5/shared/gipi-components/badge/badge.component.js +46 -0
  511. package/esm5/shared/gipi-components/button/button.component.js +257 -0
  512. package/esm5/shared/gipi-components/chips/chips.component.js +159 -0
  513. package/esm5/shared/gipi-components/confirmation-dialog/confirmation-dialog.component.js +46 -0
  514. package/esm5/shared/gipi-components/datepicker/date-range-picker/date-range-picker.component.js +378 -0
  515. package/esm5/shared/gipi-components/datepicker/date-range-picker/shared/max-range/max-range-selection-startegy.js +42 -0
  516. package/esm5/shared/gipi-components/datepicker/date-range-picker/shared/max-range/max-range.directive.js +40 -0
  517. package/esm5/shared/gipi-components/datepicker/date-range-picker/shared/preset-range/preset-range.component.js +291 -0
  518. package/esm5/shared/gipi-components/datepicker/datepicker/datepicker.component.js +252 -0
  519. package/esm5/shared/gipi-components/datepicker/datepicker.module.js +133 -0
  520. package/esm5/shared/gipi-components/datepicker/mat-datepicker/calendar-body.js +349 -0
  521. package/esm5/shared/gipi-components/datepicker/mat-datepicker/calendar.js +441 -0
  522. package/esm5/shared/gipi-components/datepicker/mat-datepicker/date-range-input-parts.js +339 -0
  523. package/esm5/shared/gipi-components/datepicker/mat-datepicker/date-range-input.js +376 -0
  524. package/esm5/shared/gipi-components/datepicker/mat-datepicker/date-range-picker.js +46 -0
  525. package/esm5/shared/gipi-components/datepicker/mat-datepicker/date-range-selection-strategy.js +62 -0
  526. package/esm5/shared/gipi-components/datepicker/mat-datepicker/date-selection-model.js +167 -0
  527. package/esm5/shared/gipi-components/datepicker/mat-datepicker/datepicker-animations.js +35 -0
  528. package/esm5/shared/gipi-components/datepicker/mat-datepicker/datepicker-base.js +586 -0
  529. package/esm5/shared/gipi-components/datepicker/mat-datepicker/datepicker-errors.js +14 -0
  530. package/esm5/shared/gipi-components/datepicker/mat-datepicker/datepicker-input-base.js +327 -0
  531. package/esm5/shared/gipi-components/datepicker/mat-datepicker/datepicker-input.js +199 -0
  532. package/esm5/shared/gipi-components/datepicker/mat-datepicker/datepicker-intl.js +52 -0
  533. package/esm5/shared/gipi-components/datepicker/mat-datepicker/datepicker-toggle.js +133 -0
  534. package/esm5/shared/gipi-components/datepicker/mat-datepicker/datepicker.js +34 -0
  535. package/esm5/shared/gipi-components/datepicker/mat-datepicker/month-view.js +384 -0
  536. package/esm5/shared/gipi-components/datepicker/mat-datepicker/multi-year-view.js +324 -0
  537. package/esm5/shared/gipi-components/datepicker/mat-datepicker/shared/adapter/date-adapter.js +118 -0
  538. package/esm5/shared/gipi-components/datepicker/mat-datepicker/shared/adapter/date-formats.js +10 -0
  539. package/esm5/shared/gipi-components/datepicker/mat-datepicker/shared/adapter/native-date-adapter.js +300 -0
  540. package/esm5/shared/gipi-components/datepicker/mat-datepicker/shared/adapter/native-date-formats.js +19 -0
  541. package/esm5/shared/gipi-components/datepicker/mat-datepicker/shared/adapter/platform.js +82 -0
  542. package/esm5/shared/gipi-components/datepicker/mat-datepicker/year-view.js +313 -0
  543. package/esm5/shared/gipi-components/dom/connected-overlay-scroll-handler.js +30 -0
  544. package/esm5/shared/gipi-components/dom/dom-handler.js +681 -0
  545. package/esm5/shared/gipi-components/dropdown-menu/dropdown-menu.component.js +191 -0
  546. package/esm5/shared/gipi-components/expansion-panel/expansion-panel.component.js +83 -0
  547. package/esm5/shared/gipi-components/file-drag-and-drop/file-drag-and-drop.component.js +255 -0
  548. package/esm5/shared/gipi-components/file-drag-and-drop/shared/file-drag-and-drop.directive.js +93 -0
  549. package/esm5/shared/gipi-components/footer/footer.component.js +32 -0
  550. package/esm5/shared/gipi-components/form-field/form-field.component.js +276 -0
  551. package/esm5/shared/gipi-components/helpful-tip/helpful-tip.component.js +68 -0
  552. package/esm5/shared/gipi-components/infinite-scroll/infinite-scroll.directive.js +106 -0
  553. package/esm5/shared/gipi-components/input-checkbox/input-checkbox.component.js +118 -0
  554. package/esm5/shared/gipi-components/input-currency/input-currency.component.js +207 -0
  555. package/esm5/shared/gipi-components/input-monthpicker/input-monthpicker.component.js +426 -0
  556. package/esm5/shared/gipi-components/input-select/input-select.component.js +698 -0
  557. package/esm5/shared/gipi-components/input-select-enum/input-select-enum.component.js +351 -0
  558. package/esm5/shared/gipi-components/input-select-listbox/input-select-listbox.component.js +437 -0
  559. package/esm5/shared/gipi-components/input-select-paged/input-search/input-search.component.js +397 -0
  560. package/esm5/shared/gipi-components/input-select-paged/input-select-paged.component.js +384 -0
  561. package/esm5/shared/gipi-components/input-select-radio/input-select-radio.component.js +286 -0
  562. package/esm5/shared/gipi-components/layout-grid/col.directive.js +164 -0
  563. package/esm5/shared/gipi-components/layout-grid/row.directive.js +127 -0
  564. package/esm5/shared/gipi-components/layout-grid/services/breakpoint.service.js +90 -0
  565. package/esm5/shared/gipi-components/layout-grid/services/resize.service.js +68 -0
  566. package/esm5/shared/gipi-components/month-year-picker/calendar-month-year/calendar-month-year.component.js +200 -0
  567. package/esm5/shared/gipi-components/month-year-picker/mont-year-picker.module.js +50 -0
  568. package/esm5/shared/gipi-components/month-year-picker/month-year-picker.component.js +505 -0
  569. package/esm5/shared/gipi-components/notification/notification.component.js +106 -0
  570. package/esm5/shared/gipi-components/novelties/novelties.component.js +111 -0
  571. package/esm5/shared/gipi-components/overlay/overlay.component.js +670 -0
  572. package/esm5/shared/gipi-components/overlay/shared/overlay-service.js +22 -0
  573. package/esm5/shared/gipi-components/overlay/shared/overlay_options.js +1 -0
  574. package/esm5/shared/gipi-components/password-requeriments/password-requeriments.component.js +157 -0
  575. package/esm5/shared/gipi-components/popover/popover.component.js +473 -0
  576. package/esm5/shared/gipi-components/popover/shared/popover-animations.js +29 -0
  577. package/esm5/shared/gipi-components/popover/shared/popover-errors.js +21 -0
  578. package/esm5/shared/gipi-components/popover/shared/popover-interfaces.js +1 -0
  579. package/esm5/shared/gipi-components/popover/shared/popover-target.js +20 -0
  580. package/esm5/shared/gipi-components/popover/shared/popover-trigger.js +529 -0
  581. package/esm5/shared/gipi-components/popover/shared/popover-types.js +1 -0
  582. package/esm5/shared/gipi-components/radio-group/radio-group.component.js +155 -0
  583. package/esm5/shared/gipi-components/range-page/range-page.component.js +283 -0
  584. package/esm5/shared/gipi-components/range-slider/range-slider.component.js +364 -0
  585. package/esm5/shared/gipi-components/select/select.component.js +222 -0
  586. package/esm5/shared/gipi-components/select-button/select-button.component.js +206 -0
  587. package/esm5/shared/gipi-components/sidebar/container/container.component.js +96 -0
  588. package/esm5/shared/gipi-components/sidebar/sidenav/sidenav.component.js +267 -0
  589. package/esm5/shared/gipi-components/stepper/stepper.component.js +43 -0
  590. package/esm5/shared/gipi-components/table/components/table-body/table-body.component.js +209 -0
  591. package/esm5/shared/gipi-components/table/components/table-footer/table-footer.component.js +33 -0
  592. package/esm5/shared/gipi-components/table/components/table-header/table-header.component.js +155 -0
  593. package/esm5/shared/gipi-components/table/components/table-pagination/shared/paginate.pipe.js +123 -0
  594. package/esm5/shared/gipi-components/table/components/table-pagination/shared/pagination-controls.directive.js +228 -0
  595. package/esm5/shared/gipi-components/table/components/table-pagination/shared/pagination-instance.js +1 -0
  596. package/esm5/shared/gipi-components/table/components/table-pagination/shared/pagination.service.js +108 -0
  597. package/esm5/shared/gipi-components/table/components/table-pagination/table-pagination.component.js +116 -0
  598. package/esm5/shared/gipi-components/table/components/table-progress-bar/table-progress-bar.component.js +33 -0
  599. package/esm5/shared/gipi-components/table/models/pipe-transform.model.js +1 -0
  600. package/esm5/shared/gipi-components/table/models/sort.model.js +29 -0
  601. package/esm5/shared/gipi-components/table/models/sorted-column.model.js +2 -0
  602. package/esm5/shared/gipi-components/table/models/table-column-builder.model.js +106 -0
  603. package/esm5/shared/gipi-components/table/models/table-column.model.js +252 -0
  604. package/esm5/shared/gipi-components/table/table.component.js +161 -0
  605. package/esm5/shared/gipi-components/table/types/sort-direction.type.js +1 -0
  606. package/esm5/shared/gipi-components/table/types/sort.type.js +1 -0
  607. package/esm5/shared/gipi-components/template/template.directive.js +34 -0
  608. package/esm5/shared/gipi-components/toolbar/toolbar.component.js +56 -0
  609. package/esm5/shared/gipi-components/top-nav/top-nav.component.js +40 -0
  610. package/esm5/shared/gipi-components/user-profile/user-profile.component.js +115 -0
  611. package/esm5/shared/material.module.js +101 -0
  612. package/esm5/shared/shared.module.js +340 -0
  613. package/esm5/shared.js +36 -0
  614. package/fesm2015/gipisistemas-ng-core.js +25879 -0
  615. package/fesm2015/gipisistemas-ng-core.js.map +1 -0
  616. package/fesm5/gipisistemas-ng-core.js +27905 -0
  617. package/fesm5/gipisistemas-ng-core.js.map +1 -0
  618. package/gipi-components.d.ts +97 -0
  619. package/gipisistemas-ng-core.d.ts +20 -0
  620. package/gipisistemas-ng-core.metadata.json +1 -0
  621. package/package.json +31 -83
  622. package/public_api.d.ts +3 -0
  623. package/shared/api/generate-id-component.d.ts +3 -0
  624. package/shared/api/gipi-ng-config.d.ts +18 -0
  625. package/shared/api/overlay-message.d.ts +14 -0
  626. package/shared/api/throttle.d.ts +17 -0
  627. package/shared/api/translation.d.ts +45 -0
  628. package/shared/components/button/button.component.d.ts +26 -0
  629. package/shared/components/card/card.component.d.ts +10 -0
  630. package/shared/components/checkbox/checkbox.component.d.ts +20 -0
  631. package/shared/components/dom/connected-overlay-scroll-handler.d.ts +9 -0
  632. package/shared/components/dom/dom-handler.d.ts +74 -0
  633. package/shared/components/icon/icon.component.d.ts +9 -0
  634. package/shared/components/input/input.component.d.ts +52 -0
  635. package/shared/components/input-currency/input-currency.component.d.ts +29 -0
  636. package/shared/components/input-file/input-file.component.d.ts +28 -0
  637. package/shared/components/loading/loading.component.d.ts +4 -0
  638. package/shared/components/loading-overlay/loading-overlay.component.d.ts +6 -0
  639. package/shared/components/overlay-panel/overlay-panel.component.d.ts +67 -0
  640. package/shared/components/popover/popover-ref.d.ts +17 -0
  641. package/shared/components/popover/popover.component.d.ts +10 -0
  642. package/shared/components/popover/popover.service.d.ts +23 -0
  643. package/shared/components/radio-group-entity/radio-group-entity.component.d.ts +19 -0
  644. package/shared/components/radio-group-enum/radio-group-enum.component.d.ts +30 -0
  645. package/shared/components/select-button/select-button.component.d.ts +35 -0
  646. package/shared/components/select-entity/select-entity.component.d.ts +52 -0
  647. package/shared/components/select-entity-paged/select-entity-paged.component.d.ts +78 -0
  648. package/shared/components/select-entity-paged/shared/default-options.d.ts +25 -0
  649. package/shared/components/select-entity-paged/shared/select-button-add/select-button-add.component.d.ts +18 -0
  650. package/shared/components/select-entity-paged/shared/select-button-next-batch/select-button-next-batch.component.d.ts +16 -0
  651. package/shared/components/select-entity-paged/shared/select-no-entries-found.directive.d.ts +11 -0
  652. package/shared/components/select-entity-paged/shared/select-search/select-search.component.d.ts +119 -0
  653. package/shared/components/select-entity-paged/shared/select-search-clear.directive.d.ts +9 -0
  654. package/shared/components/select-enum/select-enum.component.d.ts +29 -0
  655. package/shared/components/select-month-period/select-month-period.component.d.ts +20 -0
  656. package/shared/components/slide-toggle/slide-toggle.component.d.ts +19 -0
  657. package/shared/components/stepper/stepper.component.d.ts +7 -0
  658. package/shared/components/tab/tab.component.d.ts +14 -0
  659. package/shared/components/tab-group/tab-group.component.d.ts +22 -0
  660. package/shared/components/table/table.component.d.ts +86 -0
  661. package/shared/components/table-scrolled/table-scrolled.component.d.ts +31 -0
  662. package/shared/components/textarea/textarea.component.d.ts +35 -0
  663. package/shared/directives/dynamic-tab.directive.d.ts +5 -0
  664. package/shared/directives/generic-template.directive.d.ts +8 -0
  665. package/shared/directives/input-select-infinite-scroll.directive.d.ts +35 -0
  666. package/shared/directives/lower-case.directive.d.ts +9 -0
  667. package/shared/directives/phone-mask.directive.d.ts +8 -0
  668. package/shared/directives/space-drop.directive.d.ts +9 -0
  669. package/shared/directives/upper-case.directive.d.ts +9 -0
  670. package/shared/gipi-components/abstract-form/abstract-form.component.d.ts +21 -0
  671. package/shared/gipi-components/action-row/action-row.component.d.ts +5 -0
  672. package/shared/gipi-components/badge/badge.component.d.ts +8 -0
  673. package/shared/gipi-components/button/button.component.d.ts +56 -0
  674. package/shared/gipi-components/chips/chips.component.d.ts +37 -0
  675. package/shared/gipi-components/confirmation-dialog/confirmation-dialog.component.d.ts +11 -0
  676. package/shared/gipi-components/datepicker/date-range-picker/date-range-picker.component.d.ts +71 -0
  677. package/shared/gipi-components/datepicker/date-range-picker/shared/max-range/max-range-selection-startegy.d.ts +11 -0
  678. package/shared/gipi-components/datepicker/date-range-picker/shared/max-range/max-range.directive.d.ts +6 -0
  679. package/shared/gipi-components/datepicker/date-range-picker/shared/preset-range/preset-range.component.d.ts +40 -0
  680. package/shared/gipi-components/datepicker/datepicker/datepicker.component.d.ts +49 -0
  681. package/shared/gipi-components/datepicker/datepicker.module.d.ts +2 -0
  682. package/shared/gipi-components/datepicker/mat-datepicker/calendar-body.d.ts +143 -0
  683. package/shared/gipi-components/datepicker/mat-datepicker/calendar.d.ts +152 -0
  684. package/shared/gipi-components/datepicker/mat-datepicker/date-range-input-parts.d.ts +102 -0
  685. package/shared/gipi-components/datepicker/mat-datepicker/date-range-input.d.ts +124 -0
  686. package/shared/gipi-components/datepicker/mat-datepicker/date-range-picker.d.ts +21 -0
  687. package/shared/gipi-components/datepicker/mat-datepicker/date-range-selection-strategy.d.ts +45 -0
  688. package/shared/gipi-components/datepicker/mat-datepicker/date-selection-model.d.ts +106 -0
  689. package/shared/gipi-components/datepicker/mat-datepicker/datepicker-animations.d.ts +16 -0
  690. package/shared/gipi-components/datepicker/mat-datepicker/datepicker-base.d.ts +209 -0
  691. package/shared/gipi-components/datepicker/mat-datepicker/datepicker-errors.d.ts +9 -0
  692. package/shared/gipi-components/datepicker/mat-datepicker/datepicker-input-base.d.ts +136 -0
  693. package/shared/gipi-components/datepicker/mat-datepicker/datepicker-input.d.ts +68 -0
  694. package/shared/gipi-components/datepicker/mat-datepicker/datepicker-intl.d.ts +38 -0
  695. package/shared/gipi-components/datepicker/mat-datepicker/datepicker-toggle.d.ts +39 -0
  696. package/shared/gipi-components/datepicker/mat-datepicker/datepicker.d.ts +11 -0
  697. package/shared/gipi-components/datepicker/mat-datepicker/month-view.d.ts +120 -0
  698. package/shared/gipi-components/datepicker/mat-datepicker/multi-year-view.d.ts +85 -0
  699. package/shared/gipi-components/datepicker/mat-datepicker/shared/adapter/date-adapter.d.ts +225 -0
  700. package/shared/gipi-components/datepicker/mat-datepicker/shared/adapter/date-formats.d.ts +20 -0
  701. package/shared/gipi-components/datepicker/mat-datepicker/shared/adapter/native-date-adapter.d.ts +76 -0
  702. package/shared/gipi-components/datepicker/mat-datepicker/shared/adapter/native-date-formats.d.ts +9 -0
  703. package/shared/gipi-components/datepicker/mat-datepicker/shared/adapter/platform.d.ts +33 -0
  704. package/shared/gipi-components/datepicker/mat-datepicker/year-view.d.ts +97 -0
  705. package/shared/gipi-components/dom/connected-overlay-scroll-handler.d.ts +9 -0
  706. package/shared/gipi-components/dom/dom-handler.d.ts +85 -0
  707. package/shared/gipi-components/dropdown-menu/dropdown-menu.component.d.ts +36 -0
  708. package/shared/gipi-components/expansion-panel/expansion-panel.component.d.ts +16 -0
  709. package/shared/gipi-components/file-drag-and-drop/file-drag-and-drop.component.d.ts +43 -0
  710. package/shared/gipi-components/file-drag-and-drop/shared/file-drag-and-drop.directive.d.ts +13 -0
  711. package/shared/gipi-components/footer/footer.component.d.ts +5 -0
  712. package/shared/gipi-components/form-field/form-field.component.d.ts +61 -0
  713. package/shared/gipi-components/helpful-tip/helpful-tip.component.d.ts +13 -0
  714. package/shared/gipi-components/infinite-scroll/infinite-scroll.directive.d.ts +27 -0
  715. package/shared/gipi-components/input-checkbox/input-checkbox.component.d.ts +28 -0
  716. package/shared/gipi-components/input-currency/input-currency.component.d.ts +48 -0
  717. package/shared/gipi-components/input-monthpicker/input-monthpicker.component.d.ts +89 -0
  718. package/shared/gipi-components/input-select/input-select.component.d.ts +120 -0
  719. package/shared/gipi-components/input-select-enum/input-select-enum.component.d.ts +65 -0
  720. package/shared/gipi-components/input-select-listbox/input-select-listbox.component.d.ts +85 -0
  721. package/shared/gipi-components/input-select-paged/input-search/input-search.component.d.ts +77 -0
  722. package/shared/gipi-components/input-select-paged/input-select-paged.component.d.ts +66 -0
  723. package/shared/gipi-components/input-select-radio/input-select-radio.component.d.ts +53 -0
  724. package/shared/gipi-components/layout-grid/col.directive.d.ts +38 -0
  725. package/shared/gipi-components/layout-grid/row.directive.d.ts +28 -0
  726. package/shared/gipi-components/layout-grid/services/breakpoint.service.d.ts +30 -0
  727. package/shared/gipi-components/layout-grid/services/resize.service.d.ts +17 -0
  728. package/shared/gipi-components/month-year-picker/calendar-month-year/calendar-month-year.component.d.ts +37 -0
  729. package/shared/gipi-components/month-year-picker/mont-year-picker.module.d.ts +2 -0
  730. package/shared/gipi-components/month-year-picker/month-year-picker.component.d.ts +104 -0
  731. package/shared/gipi-components/notification/notification.component.d.ts +21 -0
  732. package/shared/gipi-components/novelties/novelties.component.d.ts +22 -0
  733. package/shared/gipi-components/overlay/overlay.component.d.ts +113 -0
  734. package/shared/gipi-components/overlay/shared/overlay-service.d.ts +6 -0
  735. package/shared/gipi-components/overlay/shared/overlay_options.d.ts +50 -0
  736. package/shared/gipi-components/password-requeriments/password-requeriments.component.d.ts +27 -0
  737. package/shared/gipi-components/popover/popover.component.d.ts +133 -0
  738. package/shared/gipi-components/popover/shared/popover-animations.d.ts +13 -0
  739. package/shared/gipi-components/popover/shared/popover-errors.d.ts +14 -0
  740. package/shared/gipi-components/popover/shared/popover-interfaces.d.ts +43 -0
  741. package/shared/gipi-components/popover/shared/popover-target.d.ts +5 -0
  742. package/shared/gipi-components/popover/shared/popover-trigger.d.ts +140 -0
  743. package/shared/gipi-components/popover/shared/popover-types.d.ts +4 -0
  744. package/shared/gipi-components/radio-group/radio-group.component.d.ts +33 -0
  745. package/shared/gipi-components/range-page/range-page.component.d.ts +55 -0
  746. package/shared/gipi-components/range-slider/range-slider.component.d.ts +57 -0
  747. package/shared/gipi-components/select/select.component.d.ts +45 -0
  748. package/shared/gipi-components/select-button/select-button.component.d.ts +39 -0
  749. package/shared/gipi-components/sidebar/container/container.component.d.ts +15 -0
  750. package/shared/gipi-components/sidebar/sidenav/sidenav.component.d.ts +40 -0
  751. package/shared/gipi-components/stepper/stepper.component.d.ts +8 -0
  752. package/shared/gipi-components/table/components/table-body/table-body.component.d.ts +36 -0
  753. package/shared/gipi-components/table/components/table-footer/table-footer.component.d.ts +5 -0
  754. package/shared/gipi-components/table/components/table-header/table-header.component.d.ts +28 -0
  755. package/shared/gipi-components/table/components/table-pagination/shared/paginate.pipe.d.ts +40 -0
  756. package/shared/gipi-components/table/components/table-pagination/shared/pagination-controls.directive.d.ts +81 -0
  757. package/shared/gipi-components/table/components/table-pagination/shared/pagination-instance.d.ts +24 -0
  758. package/shared/gipi-components/table/components/table-pagination/shared/pagination.service.d.ts +45 -0
  759. package/shared/gipi-components/table/components/table-pagination/table-pagination.component.d.ts +21 -0
  760. package/shared/gipi-components/table/components/table-progress-bar/table-progress-bar.component.d.ts +5 -0
  761. package/shared/gipi-components/table/models/pipe-transform.model.d.ts +3 -0
  762. package/shared/gipi-components/table/models/sort.model.d.ts +10 -0
  763. package/shared/gipi-components/table/models/sorted-column.model.d.ts +6 -0
  764. package/shared/gipi-components/table/models/table-column-builder.model.d.ts +52 -0
  765. package/shared/gipi-components/table/models/table-column.model.d.ts +74 -0
  766. package/shared/gipi-components/table/table.component.d.ts +37 -0
  767. package/shared/gipi-components/table/types/sort-direction.type.d.ts +1 -0
  768. package/shared/gipi-components/table/types/sort.type.d.ts +1 -0
  769. package/shared/gipi-components/template/template.directive.d.ts +8 -0
  770. package/shared/gipi-components/toolbar/toolbar.component.d.ts +11 -0
  771. package/shared/gipi-components/top-nav/top-nav.component.d.ts +8 -0
  772. package/shared/gipi-components/user-profile/user-profile.component.d.ts +24 -0
  773. package/shared/material.module.d.ts +2 -0
  774. package/shared/shared.module.d.ts +6 -0
  775. package/shared.d.ts +35 -0
  776. package/README.md +0 -38
  777. package/_ITSS-NG-CI-CD.yml +0 -53
  778. package/_ITSS-NG-CI-PR.yml +0 -53
  779. package/angular-cli.json +0 -42
  780. package/azure-pipelines.yml +0 -35
  781. package/projects/itss-ng/ng-package.json +0 -7
  782. package/projects/itss-ng/package.json +0 -25
@@ -0,0 +1,35 @@
1
+ import { __decorate, __metadata, __param } from "tslib";
2
+ import { Directive, Inject, Input } from '@angular/core';
3
+ import { MAT_DATE_RANGE_SELECTION_STRATEGY } from '../../../mat-datepicker/date-range-selection-strategy';
4
+ import { MaxRangeSelectionStrategy } from './max-range-selection-startegy';
5
+ let MaxRangeDirective = class MaxRangeDirective {
6
+ constructor(maxRangeStrategy) {
7
+ this.maxRangeStrategy = maxRangeStrategy;
8
+ }
9
+ set maxRange(value) {
10
+ this.maxRangeStrategy.delta = +value || 365;
11
+ }
12
+ };
13
+ MaxRangeDirective.ctorParameters = () => [
14
+ { type: MaxRangeSelectionStrategy, decorators: [{ type: Inject, args: [MAT_DATE_RANGE_SELECTION_STRATEGY,] }] }
15
+ ];
16
+ __decorate([
17
+ Input(),
18
+ __metadata("design:type", Number),
19
+ __metadata("design:paramtypes", [Number])
20
+ ], MaxRangeDirective.prototype, "maxRange", null);
21
+ MaxRangeDirective = __decorate([
22
+ Directive({
23
+ selector: '[maxRange]',
24
+ providers: [
25
+ {
26
+ provide: MAT_DATE_RANGE_SELECTION_STRATEGY,
27
+ useClass: MaxRangeSelectionStrategy,
28
+ }
29
+ ]
30
+ }),
31
+ __param(0, Inject(MAT_DATE_RANGE_SELECTION_STRATEGY)),
32
+ __metadata("design:paramtypes", [MaxRangeSelectionStrategy])
33
+ ], MaxRangeDirective);
34
+ export { MaxRangeDirective };
35
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWF4LXJhbmdlLmRpcmVjdGl2ZS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0BnaXBpc2lzdGVtYXMvbmctY29yZS8iLCJzb3VyY2VzIjpbInNoYXJlZC9naXBpL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EaXJlY3RpdmUsIEluamVjdCwgSW5wdXQgfSBmcm9tICdAYW5ndWxhci9jb3JlJztcblxuaW1wb3J0IHsgTUFUX0RBVEVfUkFOR0VfU0VMRUNUSU9OX1NUUkFURUdZIH0gZnJvbSAnLi4vLi4vLi4vbWF0LWRhdGVwaWNrZXIvZGF0ZS1yYW5nZS1zZWxlY3Rpb24tc3RyYXRlZ3knO1xuaW1wb3J0IHsgTWF4UmFuZ2VTZWxlY3Rpb25TdHJhdGVneSB9IGZyb20gJy4vbWF4LXJhbmdlLXNlbGVjdGlvbi1zdGFydGVneSc7XG5cbkBEaXJlY3RpdmUoe1xuICAgIHNlbGVjdG9yOiAnW21heFJhbmdlXScsXG4gICAgcHJvdmlkZXJzOiBbXG4gICAgICAgIHtcbiAgICAgICAgICAgIHByb3ZpZGU6IE1BVF9EQVRFX1JBTkdFX1NFTEVDVElPTl9TVFJBVEVHWSxcbiAgICAgICAgICAgIHVzZUNsYXNzOiBNYXhSYW5nZVNlbGVjdGlvblN0cmF0ZWd5LFxuICAgICAgICB9XG4gICAgXVxufSlcbmV4cG9ydCBjbGFzcyBNYXhSYW5nZURpcmVjdGl2ZSB7XG5cbiAgICBjb25zdHJ1Y3RvcihcbiAgICAgICAgQEluamVjdChNQVRfREFURV9SQU5HRV9TRUxFQ1RJT05fU1RSQVRFR1kpXG4gICAgICAgIHByaXZhdGUgbWF4UmFuZ2VTdHJhdGVneTogTWF4UmFuZ2VTZWxlY3Rpb25TdHJhdGVneTxhbnk+XG4gICAgKSB7IH1cblxuICAgIEBJbnB1dCgpIHNldCBtYXhSYW5nZSh2YWx1ZTogbnVtYmVyKSB7XG4gICAgICAgIHRoaXMubWF4UmFuZ2VTdHJhdGVneS5kZWx0YSA9ICt2YWx1ZSB8fCAzNjU7XG4gICAgfVxuXG59XG4iXX0=
@@ -0,0 +1,259 @@
1
+ var PresetRangeComponent_1;
2
+ import { __decorate, __metadata } from "tslib";
3
+ import { ChangeDetectionStrategy, ChangeDetectorRef, Component, forwardRef, Input, OnDestroy, OnInit } from '@angular/core';
4
+ import { Subject } from 'rxjs';
5
+ import { takeUntil } from 'rxjs/operators';
6
+ import * as moment_ from 'moment';
7
+ const moment = moment_;
8
+ import { NG_VALUE_ACCESSOR } from '@angular/forms';
9
+ import { MatCalendar } from '../../../mat-datepicker/calendar';
10
+ import { MatDateRangeInput } from '../../../mat-datepicker/date-range-input';
11
+ import { MatDateRangePicker } from '../../../mat-datepicker/date-range-picker';
12
+ let PresetRangeComponent = PresetRangeComponent_1 = class PresetRangeComponent {
13
+ constructor(_changeDetectorRef) {
14
+ this._changeDetectorRef = _changeDetectorRef;
15
+ this._destroy$ = new Subject();
16
+ this.rangesArray = [];
17
+ this.selectedRange = '';
18
+ this.matDateRangeInput = null;
19
+ this.matCalendar = null;
20
+ this.matDateRangePicker = null;
21
+ this._customRangeLabel = 'Personalizado';
22
+ }
23
+ get customRangeLabel() {
24
+ return this._customRangeLabel;
25
+ }
26
+ set customRangeLabel(value) {
27
+ this._customRangeLabel = value;
28
+ }
29
+ get ranges() {
30
+ return this._ranges;
31
+ }
32
+ set ranges(value) {
33
+ this._ranges = value;
34
+ this._renderRanges();
35
+ }
36
+ get maxRange() {
37
+ return this._maxRange;
38
+ }
39
+ set maxRange(value) {
40
+ this._maxRange = value;
41
+ }
42
+ get _startDate() {
43
+ const selectedRange = this.matCalendar.selected;
44
+ return selectedRange.start;
45
+ }
46
+ get _endDate() {
47
+ const selectedRange = this.matCalendar.selected;
48
+ return selectedRange.end;
49
+ }
50
+ get _minDate() {
51
+ return this.matCalendar.minDate;
52
+ }
53
+ get _maxDate() {
54
+ return this.matCalendar.maxDate;
55
+ }
56
+ ngOnInit() {
57
+ this.matCalendar.stateChanges
58
+ .pipe(takeUntil(this._destroy$))
59
+ .subscribe(() => {
60
+ this._loadSelectedRange();
61
+ this._changeDetectorRef.markForCheck();
62
+ });
63
+ this._loadSelectedRange();
64
+ }
65
+ ngOnDestroy() {
66
+ this._destroy$.next();
67
+ }
68
+ _renderRanges() {
69
+ let start;
70
+ let end;
71
+ if (typeof this.ranges === 'object') {
72
+ for (const range in this.ranges) {
73
+ if (this.ranges[range]) {
74
+ // Start date
75
+ if (typeof this.ranges[range][0] === 'string') {
76
+ start = moment(this.ranges[range][0]);
77
+ }
78
+ else {
79
+ start = moment(this.ranges[range][0]);
80
+ }
81
+ if (typeof this.ranges[range][1] === 'string') {
82
+ end = moment(this.ranges[range][1]);
83
+ }
84
+ else {
85
+ end = moment(this.ranges[range][1]);
86
+ }
87
+ const minDate = moment(this._minDate).clone();
88
+ let maxDate = moment(this._maxDate).clone();
89
+ if (minDate.isValid() && start.isBefore(minDate)) {
90
+ start = minDate.clone();
91
+ }
92
+ if (maxDate.isValid() && start.clone().add((this.maxRange - 1), 'days').isAfter(maxDate)) {
93
+ maxDate = start;
94
+ }
95
+ if (maxDate.isValid() && end.isAfter(maxDate)) {
96
+ end = maxDate.clone();
97
+ }
98
+ if ((minDate && end.isBefore(minDate, 'day')) ||
99
+ (maxDate && start.isAfter(maxDate, 'day'))) {
100
+ continue;
101
+ }
102
+ this.ranges[range] = [start, end];
103
+ }
104
+ }
105
+ for (const range in this.ranges) {
106
+ if (this.ranges[range]) {
107
+ this.rangesArray.push(range);
108
+ }
109
+ }
110
+ }
111
+ this._loadSelectedRange();
112
+ }
113
+ _loadSelectedRange() {
114
+ let customRange = true;
115
+ let i = 0;
116
+ if (this.rangesArray.length > 0) {
117
+ const startDate = moment(this._startDate).startOf('day');
118
+ const endDate = moment(this._endDate).startOf('day');
119
+ for (const range in this.ranges) {
120
+ if (this.ranges[range]) {
121
+ const startRange = (this.ranges[range][0]).startOf('day');
122
+ const endRange = (this.ranges[range][1]).startOf('day');
123
+ if (startDate.isSame(startRange) && endDate.isSame(endRange)) {
124
+ customRange = false;
125
+ this.selectedRange = this.rangesArray[i];
126
+ break;
127
+ }
128
+ i++;
129
+ }
130
+ }
131
+ if (customRange) {
132
+ this.selectedRange = this.customRangeLabel;
133
+ }
134
+ }
135
+ else {
136
+ this.selectedRange = this.customRangeLabel;
137
+ }
138
+ }
139
+ _calculateDateRange(range) {
140
+ const minDate = this._minDate ? moment(this._minDate) : null;
141
+ const maxDate = this._maxDate ? moment(this._maxDate) : null;
142
+ const [start, end] = [this.ranges[range][0], this.ranges[range][1]];
143
+ let startDateResp = null;
144
+ let endDateResp = null;
145
+ if (minDate && start.isBefore(minDate)) {
146
+ startDateResp = minDate.clone();
147
+ }
148
+ else {
149
+ startDateResp = start.clone();
150
+ }
151
+ if (maxDate && end.isAfter(maxDate)) {
152
+ endDateResp = maxDate.clone();
153
+ }
154
+ else {
155
+ endDateResp = end.clone();
156
+ }
157
+ if (range === this.customRangeLabel) {
158
+ const selectedRange = this.matCalendar.selected;
159
+ startDateResp = selectedRange.start;
160
+ endDateResp = selectedRange.end;
161
+ }
162
+ return [this._getValidDateOrNull(startDateResp.toDate()), this._getValidDateOrNull(endDateResp.toDate())];
163
+ }
164
+ _getValidDateOrNull(obj) {
165
+ return this._isDateInstance(obj) && this._isValid(obj) ? obj : null;
166
+ }
167
+ _isDateInstance(obj) {
168
+ return obj instanceof Date;
169
+ }
170
+ _isValid(date) {
171
+ return !isNaN(date.getTime());
172
+ }
173
+ clickRange(event, range) {
174
+ if (range === this.customRangeLabel) {
175
+ return;
176
+ }
177
+ const [start, end] = this._calculateDateRange(range);
178
+ // (this.matCalendar.selected as any).start = start;
179
+ // (this.matCalendar.selected as any).end = end;
180
+ // this.matCalendar.updateTodaysDate();
181
+ // this.matCalendar.activeDate = start;
182
+ // this.matCalendar.activeDate = end;
183
+ this.matDateRangePicker.select(start);
184
+ this.matDateRangePicker.select(end);
185
+ this.matDateRangePicker.close();
186
+ }
187
+ isDisableRange(range) {
188
+ if (range === this._customRangeLabel) {
189
+ return false;
190
+ }
191
+ const rangeMarkers = this._ranges[range];
192
+ const areBothBefore = rangeMarkers.every((date) => {
193
+ const minDate = moment(this.matCalendar.minDate);
194
+ if (!minDate) {
195
+ return false;
196
+ }
197
+ return moment(date).isBefore(minDate);
198
+ });
199
+ const areBothAfter = rangeMarkers.every((date) => {
200
+ const maxDate = moment(this.matCalendar.maxDate);
201
+ if (!maxDate) {
202
+ return false;
203
+ }
204
+ return moment(date).isAfter(maxDate);
205
+ });
206
+ return areBothBefore || areBothAfter;
207
+ }
208
+ };
209
+ PresetRangeComponent.ctorParameters = () => [
210
+ { type: ChangeDetectorRef }
211
+ ];
212
+ __decorate([
213
+ Input(),
214
+ __metadata("design:type", MatDateRangeInput)
215
+ ], PresetRangeComponent.prototype, "matDateRangeInput", void 0);
216
+ __decorate([
217
+ Input(),
218
+ __metadata("design:type", MatCalendar)
219
+ ], PresetRangeComponent.prototype, "matCalendar", void 0);
220
+ __decorate([
221
+ Input(),
222
+ __metadata("design:type", MatDateRangePicker)
223
+ ], PresetRangeComponent.prototype, "matDateRangePicker", void 0);
224
+ __decorate([
225
+ Input(),
226
+ __metadata("design:type", String),
227
+ __metadata("design:paramtypes", [String])
228
+ ], PresetRangeComponent.prototype, "customRangeLabel", null);
229
+ __decorate([
230
+ Input(),
231
+ __metadata("design:type", Object),
232
+ __metadata("design:paramtypes", [Object])
233
+ ], PresetRangeComponent.prototype, "ranges", null);
234
+ __decorate([
235
+ Input(),
236
+ __metadata("design:type", Number),
237
+ __metadata("design:paramtypes", [Number])
238
+ ], PresetRangeComponent.prototype, "maxRange", null);
239
+ PresetRangeComponent = PresetRangeComponent_1 = __decorate([
240
+ Component({
241
+ selector: 'gipi-preset-range',
242
+ template: "<div class=\"preset-range-wrapper\">\n <button *ngFor=\"let range of rangesArray\"\n class=\"preset-range-btn\"\n [class.selected]=\"range === selectedRange\"\n [disabled]=\"isDisableRange(range)\"\n (click)=\"clickRange($event, range)\">\n {{ range }}\n </button>\n <button class=\"preset-range-btn\"\n [disabled]=\"isDisableRange(customRangeLabel)\"\n [class.selected]=\"selectedRange === customRangeLabel\">\n {{ customRangeLabel }}\n </button>\n</div>\n",
243
+ changeDetection: ChangeDetectionStrategy.OnPush,
244
+ providers: [
245
+ {
246
+ provide: NG_VALUE_ACCESSOR,
247
+ useExisting: forwardRef(() => PresetRangeComponent_1),
248
+ multi: true
249
+ },
250
+ ],
251
+ host: {
252
+ 'class': 'gipi-preset-range',
253
+ },
254
+ styles: [".preset-range-wrapper{display:flex;flex-direction:column;padding:.9rem;height:100%;background:#f0f0f0;border-top-left-radius:.6rem;border-bottom-left-radius:.6rem}.preset-range-btn{display:flex;align-items:center;justify-content:flex-start;padding:.8rem;height:3.6rem;border-radius:.6rem;background-color:transparent;outline:0;cursor:pointer;color:#595959;border:none;transition:.2s}.preset-range-btn.selected{background-color:#e0313e;color:#fff}.preset-range-btn.selected:hover{background-color:#9f232c}.preset-range-btn:hover{background-color:#e0313e;color:#fff}"]
255
+ }),
256
+ __metadata("design:paramtypes", [ChangeDetectorRef])
257
+ ], PresetRangeComponent);
258
+ export { PresetRangeComponent };
259
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJlc2V0LXJhbmdlLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0BnaXBpc2lzdGVtYXMvbmctY29yZS8iLCJzb3VyY2VzIjpbInNoYXJlZC9naXBpLWNvbXBvbmVudHMvZGF0ZXBpY2tlci9kYXRlLXJhbmdlLXBpY2tlci9zaGFyZWQvcHJlc2V0LXJhbmdlL3ByZXNldC1yYW5nZS5jb21wb25lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSxPQUFPLEVBQUUsdUJBQXVCLEVBQUUsaUJBQWlCLEVBQUUsU0FBUyxFQUFFLFVBQVUsRUFBRSxLQUFLLEVBQUUsU0FBUyxFQUFFLE1BQU0sRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUM1SCxPQUFPLEVBQUUsT0FBTyxFQUFFLE1BQU0sTUFBTSxDQUFDO0FBQy9CLE9BQU8sRUFBRSxTQUFTLEVBQUUsTUFBTSxnQkFBZ0IsQ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ICAgICAgICAgICB0aGlzLl9sb2FkU2VsZWN0ZWRSYW5nZSgpO1xuICAgICAgICAgICAgICAgIHRoaXMuX2NoYW5nZURldGVjdG9yUmVmLm1hcmtGb3JDaGVjaygpO1xuICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgdGhpcy5fbG9hZFNlbGVjdGVkUmFuZ2UoKTtcbiAgICB9XG5cbiAgICBuZ09uRGVzdHJveSgpOiB2b2lkIHtcbiAgICAgICAgdGhpcy5fZGVzdHJveSQubmV4dCgpO1xuICAgIH1cblxuICAgIHByaXZhdGUgX3JlbmRlclJhbmdlcygpOiB2b2lkIHtcbiAgICAgICAgbGV0IHN0YXJ0OiBtb21lbnQuTW9tZW50O1xuICAgICAgICBsZXQgZW5kOiBtb21lbnQuTW9tZW50O1xuXG4gICAgICAgIGlmICh0eXBlb2YgdGhpcy5yYW5nZXMgPT09ICdvYmplY3QnKSB7XG4gICAgICAgICAgICBmb3IgKGNvbnN0IHJhbmdlIGluIHRoaXMucmFuZ2VzKSB7XG4gICAgICAgICAgICAgICAgaWYgKHRoaXMucmFuZ2VzW3JhbmdlXSkge1xuICAgICAgICAgICAgICAgICAgICAvLyBTdGFydCBkYXRlXG4gICAgICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgdGhpcy5yYW5nZXNbcmFuZ2VdWzBdID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgICAgICAgICAgICAgc3RhcnQgPSBtb21lbnQodGhpcy5yYW5nZXNbcmFuZ2VdWzBdKTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHN0YXJ0ID0gbW9tZW50KHRoaXMucmFuZ2VzW3JhbmdlXVswXSk7XG4gICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICBpZiAodHlwZW9mIHRoaXMucmFuZ2VzW3JhbmdlXVsxXSA9PT0gJ3N0cmluZycpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGVuZCA9IG1vbWVudCh0aGlzLnJhbmdlc1tyYW5nZV1bMV0pO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgZW5kID0gbW9tZW50KHRoaXMucmFuZ2VzW3JhbmdlXVsxXSk7XG4gICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICBjb25zdCBtaW5EYXRlOiBtb21lbnQuTW9tZW50ID0gbW9tZW50KHRoaXMuX21pbkRhdGUpLmNsb25lKCk7XG4gICAgICAgICAgICAgICAgICAgIGxldCBtYXhEYXRlOiBtb21lbnQuTW9tZW50ID0gbW9tZW50KHRoaXMuX21heERhdGUpLmNsb25lKCk7XG5cbiAgICAgICAgICAgICAgICAgICAgaWYgKG1pbkRhdGUuaXNWYWxpZCgpICYmIHN0YXJ0LmlzQmVmb3JlKG1pbkRhdGUpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBzdGFydCA9IG1pbkRhdGUuY2xvbmUoKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAobWF4RGF0ZS5pc1ZhbGlkKCkgJiYgc3RhcnQuY2xvbmUoKS5hZGQoKHRoaXMubWF4UmFuZ2UgLSAxKSwgJ2RheXMnKS5pc0FmdGVyKG1heERhdGUpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBtYXhEYXRlID0gc3RhcnQ7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaWYgKG1heERhdGUuaXNWYWxpZCgpICYmIGVuZC5pc0FmdGVyKG1heERhdGUpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBlbmQgPSBtYXhEYXRlLmNsb25lKCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgICAgKG1pbkRhdGUgJiYgZW5kLmlzQmVmb3JlKG1pbkRhdGUsICdkYXknKSkgfHxcbiAgICAgICAgICAgICAgICAgICAgICAgIChtYXhEYXRlICYmIHN0YXJ0LmlzQWZ0ZXIobWF4RGF0ZSwgJ2RheScpKVxuICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgdGhpcy5yYW5nZXNbcmFuZ2VdID0gW3N0YXJ0LCBlbmRdO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgZm9yIChjb25zdCByYW5nZSBpbiB0aGlzLnJhbmdlcykge1xuICAgICAgICAgICAgICAgIGlmICh0aGlzLnJhbmdlc1tyYW5nZV0pIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5yYW5nZXNBcnJheS5wdXNoKHJhbmdlKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLl9sb2FkU2VsZWN0ZWRSYW5nZSgpO1xuICAgIH1cblxuICAgIHByaXZhdGUgX2xvYWRTZWxlY3RlZFJhbmdlKCk6IHZvaWQge1xuICAgICAgICBsZXQgY3VzdG9tUmFuZ2U6IGJvb2xlYW4gPSB0cnVlO1xuICAgICAgICBsZXQgaTogbnVtYmVyID0gMDtcbiAgICAgICAgaWYgKHRoaXMucmFuZ2VzQXJyYXkubGVuZ3RoID4gMCkge1xuICAgICAgICAgICAgY29uc3Qgc3RhcnREYXRlOiBtb21lbnQuTW9tZW50ID0gbW9tZW50KHRoaXMuX3N0YXJ0RGF0ZSkuc3RhcnRPZignZGF5Jyk7XG4gICAgICAgICAgICBjb25zdCBlbmREYXRlOiBtb21lbnQuTW9tZW50ID0gbW9tZW50KHRoaXMuX2VuZERhdGUpLnN0YXJ0T2YoJ2RheScpO1xuXG4gICAgICAgICAgICBmb3IgKGNvbnN0IHJhbmdlIGluIHRoaXMucmFuZ2VzKSB7XG4gICAgICAgICAgICAgICAgaWYgKHRoaXMucmFuZ2VzW3JhbmdlXSkge1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBzdGFydFJhbmdlOiBtb21lbnQuTW9tZW50ID0gKHRoaXMucmFuZ2VzW3JhbmdlXVswXSkuc3RhcnRPZignZGF5Jyk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IGVuZFJhbmdlOiBtb21lbnQuTW9tZW50ID0gKHRoaXMucmFuZ2VzW3JhbmdlXVsxXSkuc3RhcnRPZignZGF5Jyk7XG4gICAgICAgICAgICAgICAgICAgIGlmIChzdGFydERhdGUuaXNTYW1lKHN0YXJ0UmFuZ2UpICYmIGVuZERhdGUuaXNTYW1lKGVuZFJhbmdlKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgY3VzdG9tUmFuZ2UgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuc2VsZWN0ZWRSYW5nZSA9IHRoaXMucmFuZ2VzQXJyYXlbaV07XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIGkrKztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoY3VzdG9tUmFuZ2UpIHtcbiAgICAgICAgICAgICAgICB0aGlzLnNlbGVjdGVkUmFuZ2UgPSB0aGlzLmN1c3RvbVJhbmdlTGFiZWw7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICB0aGlzLnNlbGVjdGVkUmFuZ2UgPSB0aGlzLmN1c3RvbVJhbmdlTGFiZWw7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBwcml2YXRlIF9jYWxjdWxhdGVEYXRlUmFuZ2UocmFuZ2U6IHN0cmluZyk6IERhdGVbXSB7XG4gICAgICAgIGNvbnN0IG1pbkRhdGU6IG1vbWVudC5Nb21l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GVyID0gcmFuZ2VNYXJrZXJzLmV2ZXJ5KChkYXRlKSA9PiB7XG4gICAgICAgICAgICBjb25zdCBtYXhEYXRlOiBtb21lbnQuTW9tZW50ID0gbW9tZW50KHRoaXMubWF0Q2FsZW5kYXIubWF4RGF0ZSk7XG4gICAgICAgICAgICBpZiAoIW1heERhdGUpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gbW9tZW50KGRhdGUpLmlzQWZ0ZXIobWF4RGF0ZSk7XG4gICAgICAgIH0pO1xuXG4gICAgICAgIHJldHVybiBhcmVCb3RoQmVmb3JlIHx8IGFyZUJvdGhBZnRlcjtcbiAgICB9XG5cbn1cbiJdfQ==
@@ -0,0 +1,218 @@
1
+ var DatepickerComponent_1;
2
+ import { __decorate, __metadata } from "tslib";
3
+ import { coerceBooleanProperty } from '@angular/cdk/coercion';
4
+ import { ChangeDetectorRef, Component, ElementRef, forwardRef, Input, OnDestroy, OnInit, ViewChild } from '@angular/core';
5
+ import { NG_VALUE_ACCESSOR } from '@angular/forms';
6
+ import * as moment_ from 'moment';
7
+ const moment = moment_;
8
+ import { BrowserUtil } from '../../../../core/utils/browser.util';
9
+ import { DateUtil } from '../../../../core/utils/date.util';
10
+ import { MatDatepickerToggle } from '../mat-datepicker/datepicker-toggle';
11
+ let nextUniqueId = 0;
12
+ let DatepickerComponent = DatepickerComponent_1 = class DatepickerComponent {
13
+ constructor(elementRef, _changeDetectorRef) {
14
+ this.elementRef = elementRef;
15
+ this._changeDetectorRef = _changeDetectorRef;
16
+ this._name = `gipi-date-range-${nextUniqueId++}`;
17
+ this.id = `${this._name}-date`;
18
+ this.name = `${this._name}-date`;
19
+ this.label = '';
20
+ this.placeholder = '__/__/____';
21
+ this.help = '';
22
+ this._minDate = new Date('01/01/2000');
23
+ this._required = false;
24
+ this._readonly = false;
25
+ this._disabled = false;
26
+ this._dateFilter = null;
27
+ this.onChange = () => { };
28
+ this.onTouched = () => { };
29
+ }
30
+ get minDate() {
31
+ return this._minDate;
32
+ }
33
+ set minDate(value) {
34
+ this._minDate = value;
35
+ this._minDate.setHours(0, 0, 0, 0);
36
+ }
37
+ get maxDate() {
38
+ return this._maxDate;
39
+ }
40
+ set maxDate(value) {
41
+ this._maxDate = value;
42
+ this._maxDate.setHours(0, 0, 0, 0);
43
+ }
44
+ get required() {
45
+ return this._required;
46
+ }
47
+ set required(value) {
48
+ this._required = coerceBooleanProperty(value);
49
+ }
50
+ get readonly() {
51
+ return this._readonly;
52
+ }
53
+ set readonly(value) {
54
+ this._readonly = coerceBooleanProperty(value);
55
+ }
56
+ get disabled() {
57
+ return this._disabled;
58
+ }
59
+ set disabled(value) {
60
+ this._disabled = coerceBooleanProperty(value);
61
+ }
62
+ get dateFilter() {
63
+ return this._dateFilter;
64
+ }
65
+ set dateFilter(value) {
66
+ this._dateFilter = value;
67
+ }
68
+ get value() {
69
+ return this._value;
70
+ }
71
+ set value(value) {
72
+ this._value = value;
73
+ this.onChange(this._value);
74
+ this.onTouched(this._value);
75
+ }
76
+ get formattedValue() {
77
+ return '';
78
+ }
79
+ ngOnInit() { }
80
+ ngOnDestroy() { }
81
+ writeValue(value) {
82
+ this._value = value;
83
+ this._changeDetectorRef.detectChanges();
84
+ }
85
+ registerOnChange(fn) {
86
+ this.onChange = fn;
87
+ }
88
+ registerOnTouched(fn) {
89
+ this.onTouched = fn;
90
+ }
91
+ setDisabledState(isDisabled) {
92
+ this.disabled = isDisabled;
93
+ this._changeDetectorRef.markForCheck();
94
+ }
95
+ onInputContentClick(event) {
96
+ if (!this.readonly || !this.matDatepickerToggleRef) {
97
+ return;
98
+ }
99
+ }
100
+ generatedDate(valueDate, keyUp) {
101
+ if (!keyUp && BrowserUtil.getBrowser() === 'Firefox') {
102
+ return;
103
+ }
104
+ let match = false;
105
+ if (valueDate.includes('/') && (!keyUp || valueDate.length === 10)) {
106
+ this.value = moment(valueDate, 'DD/MM/YYYY').toDate();
107
+ match = true;
108
+ }
109
+ else if (!valueDate.includes('/') && (!keyUp || valueDate.length === 8)) {
110
+ this.value = moment(valueDate, 'DDMMYYYY').toDate();
111
+ match = true;
112
+ }
113
+ if (BrowserUtil.getBrowser() !== 'Firefox') {
114
+ if (match && !DateUtil.isValid(this.value)) {
115
+ this.value = undefined;
116
+ }
117
+ }
118
+ else {
119
+ if (match && !this.value) {
120
+ this.value = undefined;
121
+ }
122
+ }
123
+ }
124
+ validateMinAndMaxDate(valueDate) {
125
+ const dateInput = moment(valueDate, 'DD/MM/YYYY').toDate();
126
+ if (DateUtil.isLessThan(dateInput, this.minDate)) {
127
+ this.value = undefined;
128
+ }
129
+ else if (this.maxDate) {
130
+ this.value = (DateUtil.isGreaterThan(dateInput, this.maxDate) ? undefined : dateInput);
131
+ }
132
+ }
133
+ };
134
+ DatepickerComponent.ctorParameters = () => [
135
+ { type: ElementRef },
136
+ { type: ChangeDetectorRef }
137
+ ];
138
+ __decorate([
139
+ ViewChild(MatDatepickerToggle, { static: true }),
140
+ __metadata("design:type", MatDatepickerToggle)
141
+ ], DatepickerComponent.prototype, "matDatepickerToggleRef", void 0);
142
+ __decorate([
143
+ Input(),
144
+ __metadata("design:type", String)
145
+ ], DatepickerComponent.prototype, "id", void 0);
146
+ __decorate([
147
+ Input(),
148
+ __metadata("design:type", String)
149
+ ], DatepickerComponent.prototype, "name", void 0);
150
+ __decorate([
151
+ Input(),
152
+ __metadata("design:type", String)
153
+ ], DatepickerComponent.prototype, "label", void 0);
154
+ __decorate([
155
+ Input(),
156
+ __metadata("design:type", String)
157
+ ], DatepickerComponent.prototype, "placeholder", void 0);
158
+ __decorate([
159
+ Input(),
160
+ __metadata("design:type", String)
161
+ ], DatepickerComponent.prototype, "help", void 0);
162
+ __decorate([
163
+ Input('min'),
164
+ __metadata("design:type", Date),
165
+ __metadata("design:paramtypes", [Date])
166
+ ], DatepickerComponent.prototype, "minDate", null);
167
+ __decorate([
168
+ Input('max'),
169
+ __metadata("design:type", Date),
170
+ __metadata("design:paramtypes", [Date])
171
+ ], DatepickerComponent.prototype, "maxDate", null);
172
+ __decorate([
173
+ Input(),
174
+ __metadata("design:type", Boolean),
175
+ __metadata("design:paramtypes", [Boolean])
176
+ ], DatepickerComponent.prototype, "required", null);
177
+ __decorate([
178
+ Input(),
179
+ __metadata("design:type", Boolean),
180
+ __metadata("design:paramtypes", [Boolean])
181
+ ], DatepickerComponent.prototype, "readonly", null);
182
+ __decorate([
183
+ Input(),
184
+ __metadata("design:type", Boolean),
185
+ __metadata("design:paramtypes", [Boolean])
186
+ ], DatepickerComponent.prototype, "disabled", null);
187
+ __decorate([
188
+ Input(),
189
+ __metadata("design:type", Function),
190
+ __metadata("design:paramtypes", [Function])
191
+ ], DatepickerComponent.prototype, "dateFilter", null);
192
+ __decorate([
193
+ Input(),
194
+ __metadata("design:type", Date),
195
+ __metadata("design:paramtypes", [Date])
196
+ ], DatepickerComponent.prototype, "value", null);
197
+ DatepickerComponent = DatepickerComponent_1 = __decorate([
198
+ Component({
199
+ selector: 'gipi-datepicker',
200
+ exportAs: 'gipiDatePicker',
201
+ template: "<div class=\"input-wrapper\">\n\n <label *ngIf=\"label\"\n class=\"input-label\"\n [attr.for]=\"id\">\n {{ label }}\n <span *ngIf=\"required\"> * </span>\n </label>\n\n <div class=\"input-content\"\n (click)=\"onInputContentClick($event)\">\n <input matInput\n class=\"input-element\"\n type=\"text\"\n [attr.id]=\"id\"\n [attr.name]=\"name\"\n [gipiMatDatepicker]=\"picker\"\n [min]=\"minDate\"\n [max]=\"maxDate\"\n [maxlength]=\"10\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n [required]=\"required\"\n [readOnly]=\"readonly\"\n [autocomplete]=\"'off'\"\n [autofocus]=\"false\"\n [(ngModel)]=\"value\"\n (keyup)=\"generatedDate($event.target.value, true)\"\n (change)=\"generatedDate($event.target.value, false)\"\n (blur)=\"validateMinAndMaxDate($event.target.value)\" />\n\n <div class=\"suffix\">\n <gipi-mat-datepicker-toggle [for]=\"picker\"> </gipi-mat-datepicker-toggle>\n </div>\n </div>\n\n <small *ngIf=\"help\"\n class=\"input-help\">\n {{ help }}\n </small>\n</div>\n\n<gipi-mat-datepicker #picker> </gipi-mat-datepicker>",
202
+ providers: [
203
+ {
204
+ provide: NG_VALUE_ACCESSOR,
205
+ useExisting: forwardRef(() => DatepickerComponent_1),
206
+ multi: true
207
+ },
208
+ ],
209
+ host: {
210
+ 'class': 'gipi-datepicker',
211
+ },
212
+ styles: [":host{display:block;width:100%}.input-wrapper{display:flex;flex-direction:column;gap:.8rem;font-size:1.4rem;color:#696969}.input-wrapper .input-label{display:flex;align-items:center;gap:.4rem;color:#131313;line-height:1.6rem}.input-wrapper .input-label>span{font-size:1.6rem;line-height:1.6rem;color:#d14014}.input-wrapper .input-content{display:flex;font-family:inherit;font-size:inherit;color:inherit;height:4rem;background:#fff;border:1px solid rgba(0,0,0,.12);transition:background-color .2s,color .2s,border-color .2s,box-shadow .2s;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:.6rem}.input-wrapper .input-content .input-element{padding:.75rem .8rem;border:none;outline:0;background-color:transparent;flex:1;color:inherit;caret-color:#696969;min-width:0}.input-wrapper .input-content:not(.input-element:disabled):has(.input-element:enabled:hover),.input-wrapper .input-content:not(.input-element:disabled):has(.prefix:hover),.input-wrapper .input-content:not(.input-element:disabled):has(.suffix:hover){border-color:#6d6f73}.input-wrapper .input-content:not(.input-element:disabled):has(.input-element:enabled:focus){outline:0;outline-offset:0;box-shadow:0 0 0 .2rem #e0e1e2;border-color:#6d6f73}.input-wrapper .input-content:has(.input-element:disabled){color:#bbbdc1!important;border-color:#e0e1e2!important;background-color:#f5f5f6!important;cursor:not-allowed}.input-wrapper .input-content:has(.input-element:disabled) .suffix>mat-icon{color:#bbbdc1!important}.input-wrapper .input-content .input-element:disabled{cursor:not-allowed}.input-wrapper .input-content .suffix{display:flex;align-items:center;justify-content:center;padding-block:.75rem;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;padding-right:.8rem}.input-wrapper .input-content .suffix>mat-icon{width:2rem;height:2rem;font-size:2rem;color:#696969}.input-wrapper .input-help{flex:1;font-size:1rem;font-weight:500;margin-top:-.4rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}::-webkit-input-placeholder{color:#bbbdc1}:-moz-placeholder{color:#bbbdc1}::-moz-placeholder{color:#bbbdc1}:-ms-input-placeholder{color:#bbbdc1}"]
213
+ }),
214
+ __metadata("design:paramtypes", [ElementRef,
215
+ ChangeDetectorRef])
216
+ ], DatepickerComponent);
217
+ export { DatepickerComponent };
218
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGF0ZXBpY2tlci5jb21wb25lbnQuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9AZ2lwaXNpc3RlbWFzL25nLWNvcmUvIiwic291cmNlcyI6WyJzaGFyZWQvZ2lwaS1jb21wb25lbnRzL2RhdGVwaWNrZXIvZGF0ZXBpY2tlci9kYXRlcGlja2VyLmNvbXBvbmVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLE9BQU8sRUFBRSxxQkFBcUIsRUFBRSxNQUFNLHVCQUF1QixDQUFDO0FBQzlELE9BQU8sRUFBRSxpQkFBaUIsRUFBRSxTQUFTLEVBQUUsVUFBVSxFQUFFLFVBQVUsRUFBRSxLQUFLLEVBQUUsU0FBUyxFQUFFLE1BQU0sRUFBRSxTQUFTLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDMUgsT0FBTyxFQUF3QixpQkFBaUIsRUFBRSxNQUFNLGdCQUFnQixDQUFDO0FBRXpFLE9BQU8sS0FBSyxPQUFPLE1BQU0sUUFBUSxDQUFDO0FBQ2xDLE1BQU0sTUFBTSxHQUFHLE9BQU8sQ0FBQztBQUV2QixPQUFPLEVBQUUsV0FBVyxFQUFFLE1BQU0scUNBQXFDLENBQUM7QUFDbEUsT0FBTyxFQ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