@inspark/inspark-components 1.0.44 → 14.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (252) hide show
  1. package/full/components/autocomplete/autocomplete.component.d.ts +12 -1
  2. package/full/components/breadcrumb/breadcrumb.component.d.ts +3 -0
  3. package/full/components/button/button.component.d.ts +5 -1
  4. package/full/components/checkbox/checkbox.component.d.ts +3 -0
  5. package/full/components/communication.service.d.ts +3 -0
  6. package/full/components/component-container/component-container.component.d.ts +3 -0
  7. package/full/components/content-toggle/content-toggle.component.d.ts +3 -0
  8. package/full/components/dropdown/dropdown.component.d.ts +65 -13
  9. package/full/components/empty/empty.component.d.ts +3 -0
  10. package/full/components/file/file.component.d.ts +3 -0
  11. package/full/components/header/header.component.d.ts +3 -0
  12. package/full/components/inline-message/inline-message.component.d.ts +3 -0
  13. package/full/components/input-group/input-group.component.d.ts +3 -0
  14. package/full/components/input-text/input-text.component.d.ts +3 -0
  15. package/full/components/inspark.module.d.ts +47 -0
  16. package/full/components/inspark.shared.d.ts +3 -0
  17. package/full/components/link/link.component.d.ts +5 -1
  18. package/full/components/modal-input-text/modal-input-text.component.d.ts +4 -1
  19. package/full/components/object-tree/object-tree.component.d.ts +3 -0
  20. package/full/components/panel/panel.component.d.ts +3 -0
  21. package/full/components/pie/pie.component.d.ts +3 -0
  22. package/full/components/pie/pie.service.d.ts +3 -0
  23. package/full/components/preloader/preloader.component.d.ts +3 -0
  24. package/full/components/primeng.module.d.ts +5 -0
  25. package/full/components/radiobutton/radiobutton.component.d.ts +3 -0
  26. package/full/components/select-button/select-button.component.d.ts +3 -0
  27. package/full/components/select-list/select-list.component.d.ts +4 -1
  28. package/full/components/status-circle/status-circle.component.d.ts +3 -0
  29. package/full/components/sticky/sticky.component.d.ts +3 -0
  30. package/full/components/svg/svg.component.d.ts +4 -1
  31. package/full/components/switcher/switcher.component.d.ts +3 -0
  32. package/full/components/table/table-click-outside.directive.d.ts +3 -0
  33. package/full/components/table/table-columns-multiselect/table-columns-multiselect.component.d.ts +3 -0
  34. package/full/components/table/table-menu-overlay/table-menu-overlay.component.d.ts +3 -0
  35. package/full/components/table/table.component.d.ts +18 -0
  36. package/full/components/textarea/textarea.component.d.ts +3 -0
  37. package/full/components/toolbar/toolbar.component.d.ts +3 -0
  38. package/full/components/tooltip/tooltip.component.d.ts +3 -0
  39. package/full/components/tree-table/tree-table.component.d.ts +12 -0
  40. package/full/esm2020/components/autocomplete/autocomplete.component.mjs +220 -0
  41. package/full/esm2020/components/breadcrumb/breadcrumb.component.mjs +20 -0
  42. package/full/esm2020/components/button/button.component.mjs +160 -0
  43. package/full/esm2020/components/checkbox/checkbox.component.mjs +89 -0
  44. package/full/esm2020/components/communication.service.mjs +25 -0
  45. package/full/esm2020/components/component-container/component-container.component.mjs +17 -0
  46. package/full/esm2020/components/content-toggle/content-toggle.component.mjs +49 -0
  47. package/full/esm2020/components/dropdown/dropdown.component.mjs +328 -0
  48. package/full/esm2020/components/empty/empty.component.mjs +12 -0
  49. package/full/esm2020/components/file/file.component.mjs +53 -0
  50. package/full/esm2020/components/header/header.component.mjs +23 -0
  51. package/full/esm2020/components/inline-message/inline-message.component.mjs +20 -0
  52. package/full/esm2020/components/input-group/input-group.component.mjs +163 -0
  53. package/full/esm2020/components/input-text/input-text.component.mjs +149 -0
  54. package/full/esm2020/components/inspark.module.mjs +239 -0
  55. package/full/esm2020/components/inspark.shared.mjs +25 -0
  56. package/full/esm2020/components/link/link.component.mjs +131 -0
  57. package/full/esm2020/components/modal-input-text/modal-input-text.component.mjs +88 -0
  58. package/full/esm2020/components/object-tree/object-tree.component.mjs +14 -0
  59. package/full/esm2020/components/panel/panel.component.mjs +11 -0
  60. package/full/esm2020/components/pie/pie.component.mjs +44 -0
  61. package/full/esm2020/components/pie/pie.service.mjs +55 -0
  62. package/full/esm2020/components/preloader/preloader.component.mjs +25 -0
  63. package/full/esm2020/components/primeng.module.mjs +22 -0
  64. package/full/esm2020/components/radiobutton/radiobutton.component.mjs +50 -0
  65. package/full/esm2020/components/select-button/select-button.component.mjs +147 -0
  66. package/full/esm2020/components/select-list/select-list.component.mjs +55 -0
  67. package/full/esm2020/components/status-circle/status-circle.component.mjs +36 -0
  68. package/full/esm2020/components/sticky/sticky.component.mjs +64 -0
  69. package/full/esm2020/components/svg/svg.component.mjs +28 -0
  70. package/full/esm2020/components/switcher/switcher.component.mjs +123 -0
  71. package/full/esm2020/components/table/table-click-outside.directive.mjs +31 -0
  72. package/full/esm2020/components/table/table-columns-multiselect/table-columns-multiselect.component.mjs +32 -0
  73. package/full/esm2020/components/table/table-menu-overlay/table-menu-overlay.component.mjs +26 -0
  74. package/full/esm2020/components/table/table.component.mjs +472 -0
  75. package/full/esm2020/components/textarea/textarea.component.mjs +87 -0
  76. package/full/esm2020/components/toolbar/toolbar.component.mjs +30 -0
  77. package/full/esm2020/components/tooltip/tooltip.component.mjs +14 -0
  78. package/full/esm2020/components/tree-table/tree-table.component.mjs +206 -0
  79. package/full/esm2020/inspark-inspark-components.mjs +5 -0
  80. package/full/esm2020/interface.mjs +2 -0
  81. package/full/esm2020/pipes/pipes.module.mjs +19 -0
  82. package/full/esm2020/pipes/propertyValue.pipe.mjs +25 -0
  83. package/full/esm2020/pipes/safeUrl.pipe.mjs +36 -0
  84. package/full/esm2020/pipes/sort-by.pipe.mjs +28 -0
  85. package/full/esm2020/pipes/time.pipe.mjs +206 -0
  86. package/full/esm2020/public_api.mjs +60 -0
  87. package/full/esm2020/services/inspark-dialog.service.mjs +52 -0
  88. package/full/esm2020/services/inspark-message.service.mjs +71 -0
  89. package/full/esm2020/utils/gettextMarker.function.mjs +5 -0
  90. package/full/esm2020/utils/hybrid/prime-table/row-state.enum.mjs +9 -0
  91. package/full/esm2020/utils/hybrid/prime-table/table-row-data.model.mjs +2 -0
  92. package/full/fesm2015/inspark-inspark-components.mjs +3574 -0
  93. package/full/fesm2015/inspark-inspark-components.mjs.map +1 -0
  94. package/full/fesm2020/inspark-inspark-components.mjs +3577 -0
  95. package/full/fesm2020/inspark-inspark-components.mjs.map +1 -0
  96. package/full/index.css +1265 -3352
  97. package/{interface/inspark-inspark-components.d.ts → full/index.d.ts} +1 -0
  98. package/full/index.js +1 -1
  99. package/full/interface.d.ts +1 -1
  100. package/full/package.json +26 -16
  101. package/full/pipes/pipes.module.d.ts +8 -0
  102. package/full/pipes/propertyValue.pipe.d.ts +3 -0
  103. package/full/pipes/safeUrl.pipe.d.ts +3 -0
  104. package/full/pipes/sort-by.pipe.d.ts +3 -0
  105. package/full/pipes/time.pipe.d.ts +9 -0
  106. package/full/public_api.d.ts +15 -1
  107. package/full/services/inspark-dialog.service.d.ts +4 -2
  108. package/full/services/inspark-message.service.d.ts +3 -0
  109. package/interface/esm2020/inspark-inspark-components.mjs +5 -0
  110. package/interface/esm2020/interface.mjs +2 -0
  111. package/interface/esm2020/public_api.mjs +5 -0
  112. package/interface/fesm2015/inspark-inspark-components.mjs +8 -0
  113. package/interface/fesm2015/inspark-inspark-components.mjs.map +1 -0
  114. package/interface/fesm2020/inspark-inspark-components.mjs +8 -0
  115. package/interface/fesm2020/inspark-inspark-components.mjs.map +1 -0
  116. package/interface/index.d.ts +5 -0
  117. package/interface/interface.d.ts +1 -1
  118. package/interface/package.json +26 -16
  119. package/package.json +1 -1
  120. package/full/bundles/inspark-inspark-components.umd.js +0 -4622
  121. package/full/bundles/inspark-inspark-components.umd.js.map +0 -1
  122. package/full/bundles/inspark-inspark-components.umd.min.js +0 -16
  123. package/full/bundles/inspark-inspark-components.umd.min.js.map +0 -1
  124. package/full/esm2015/components/autocomplete/autocomplete.component.js +0 -310
  125. package/full/esm2015/components/breadcrumb/breadcrumb.component.js +0 -23
  126. package/full/esm2015/components/button/button.component.js +0 -217
  127. package/full/esm2015/components/checkbox/checkbox.component.js +0 -104
  128. package/full/esm2015/components/communication.service.js +0 -24
  129. package/full/esm2015/components/component-container/component-container.component.js +0 -20
  130. package/full/esm2015/components/content-toggle/content-toggle.component.js +0 -66
  131. package/full/esm2015/components/dropdown/dropdown.component.js +0 -353
  132. package/full/esm2015/components/empty/empty.component.js +0 -13
  133. package/full/esm2015/components/file/file.component.js +0 -65
  134. package/full/esm2015/components/header/header.component.js +0 -30
  135. package/full/esm2015/components/inline-message/inline-message.component.js +0 -25
  136. package/full/esm2015/components/input-group/input-group.component.js +0 -197
  137. package/full/esm2015/components/input-text/input-text.component.js +0 -198
  138. package/full/esm2015/components/inspark.module.js +0 -137
  139. package/full/esm2015/components/inspark.shared.js +0 -30
  140. package/full/esm2015/components/link/link.component.js +0 -164
  141. package/full/esm2015/components/modal-input-text/modal-input-text.component.js +0 -94
  142. package/full/esm2015/components/object-tree/object-tree.component.js +0 -18
  143. package/full/esm2015/components/panel/panel.component.js +0 -13
  144. package/full/esm2015/components/pie/pie.component.js +0 -59
  145. package/full/esm2015/components/pie/pie.service.js +0 -54
  146. package/full/esm2015/components/preloader/preloader.component.js +0 -34
  147. package/full/esm2015/components/primeng.module.js +0 -19
  148. package/full/esm2015/components/radiobutton/radiobutton.component.js +0 -75
  149. package/full/esm2015/components/select-button/select-button.component.js +0 -176
  150. package/full/esm2015/components/select-list/select-list.component.js +0 -60
  151. package/full/esm2015/components/status-circle/status-circle.component.js +0 -51
  152. package/full/esm2015/components/sticky/sticky.component.js +0 -82
  153. package/full/esm2015/components/svg/svg.component.js +0 -36
  154. package/full/esm2015/components/switcher/switcher.component.js +0 -148
  155. package/full/esm2015/components/table/table-click-outside.directive.js +0 -38
  156. package/full/esm2015/components/table/table-columns-multiselect/table-columns-multiselect.component.js +0 -37
  157. package/full/esm2015/components/table/table-menu-overlay/table-menu-overlay.component.js +0 -35
  158. package/full/esm2015/components/table/table.component.js +0 -535
  159. package/full/esm2015/components/textarea/textarea.component.js +0 -101
  160. package/full/esm2015/components/toolbar/toolbar.component.js +0 -40
  161. package/full/esm2015/components/tooltip/tooltip.component.js +0 -18
  162. package/full/esm2015/components/tree-table/tree-table.component.js +0 -255
  163. package/full/esm2015/inspark-inspark-components.js +0 -20
  164. package/full/esm2015/interface.js +0 -1
  165. package/full/esm2015/pipes/pipes.module.js +0 -16
  166. package/full/esm2015/pipes/propertyValue.pipe.js +0 -23
  167. package/full/esm2015/pipes/safeUrl.pipe.js +0 -37
  168. package/full/esm2015/pipes/sort-by.pipe.js +0 -26
  169. package/full/esm2015/pipes/time.pipe.js +0 -201
  170. package/full/esm2015/public_api.js +0 -45
  171. package/full/esm2015/services/inspark-dialog.service.js +0 -59
  172. package/full/esm2015/services/inspark-message.service.js +0 -73
  173. package/full/esm2015/utils/gettextMarker.function.js +0 -5
  174. package/full/esm2015/utils/hybrid/prime-table/row-state.enum.js +0 -9
  175. package/full/esm2015/utils/hybrid/prime-table/table-row-data.model.js +0 -1
  176. package/full/esm5/components/autocomplete/autocomplete.component.js +0 -318
  177. package/full/esm5/components/breadcrumb/breadcrumb.component.js +0 -24
  178. package/full/esm5/components/button/button.component.js +0 -224
  179. package/full/esm5/components/checkbox/checkbox.component.js +0 -106
  180. package/full/esm5/components/communication.service.js +0 -25
  181. package/full/esm5/components/component-container/component-container.component.js +0 -21
  182. package/full/esm5/components/content-toggle/content-toggle.component.js +0 -67
  183. package/full/esm5/components/dropdown/dropdown.component.js +0 -357
  184. package/full/esm5/components/empty/empty.component.js +0 -16
  185. package/full/esm5/components/file/file.component.js +0 -66
  186. package/full/esm5/components/header/header.component.js +0 -31
  187. package/full/esm5/components/inline-message/inline-message.component.js +0 -26
  188. package/full/esm5/components/input-group/input-group.component.js +0 -199
  189. package/full/esm5/components/input-text/input-text.component.js +0 -200
  190. package/full/esm5/components/inspark.module.js +0 -140
  191. package/full/esm5/components/inspark.shared.js +0 -31
  192. package/full/esm5/components/link/link.component.js +0 -165
  193. package/full/esm5/components/modal-input-text/modal-input-text.component.js +0 -98
  194. package/full/esm5/components/object-tree/object-tree.component.js +0 -20
  195. package/full/esm5/components/panel/panel.component.js +0 -16
  196. package/full/esm5/components/pie/pie.component.js +0 -60
  197. package/full/esm5/components/pie/pie.service.js +0 -56
  198. package/full/esm5/components/preloader/preloader.component.js +0 -35
  199. package/full/esm5/components/primeng.module.js +0 -22
  200. package/full/esm5/components/radiobutton/radiobutton.component.js +0 -76
  201. package/full/esm5/components/select-button/select-button.component.js +0 -179
  202. package/full/esm5/components/select-list/select-list.component.js +0 -62
  203. package/full/esm5/components/status-circle/status-circle.component.js +0 -52
  204. package/full/esm5/components/sticky/sticky.component.js +0 -84
  205. package/full/esm5/components/svg/svg.component.js +0 -39
  206. package/full/esm5/components/switcher/switcher.component.js +0 -150
  207. package/full/esm5/components/table/table-click-outside.directive.js +0 -39
  208. package/full/esm5/components/table/table-columns-multiselect/table-columns-multiselect.component.js +0 -38
  209. package/full/esm5/components/table/table-menu-overlay/table-menu-overlay.component.js +0 -36
  210. package/full/esm5/components/table/table.component.js +0 -554
  211. package/full/esm5/components/textarea/textarea.component.js +0 -103
  212. package/full/esm5/components/toolbar/toolbar.component.js +0 -41
  213. package/full/esm5/components/tooltip/tooltip.component.js +0 -20
  214. package/full/esm5/components/tree-table/tree-table.component.js +0 -280
  215. package/full/esm5/inspark-inspark-components.js +0 -20
  216. package/full/esm5/interface.js +0 -1
  217. package/full/esm5/pipes/pipes.module.js +0 -19
  218. package/full/esm5/pipes/propertyValue.pipe.js +0 -26
  219. package/full/esm5/pipes/safeUrl.pipe.js +0 -38
  220. package/full/esm5/pipes/sort-by.pipe.js +0 -29
  221. package/full/esm5/pipes/time.pipe.js +0 -212
  222. package/full/esm5/public_api.js +0 -45
  223. package/full/esm5/services/inspark-dialog.service.js +0 -61
  224. package/full/esm5/services/inspark-message.service.js +0 -78
  225. package/full/esm5/utils/gettextMarker.function.js +0 -5
  226. package/full/esm5/utils/hybrid/prime-table/row-state.enum.js +0 -9
  227. package/full/esm5/utils/hybrid/prime-table/table-row-data.model.js +0 -1
  228. package/full/fesm2015/inspark-inspark-components.js +0 -4174
  229. package/full/fesm2015/inspark-inspark-components.js.map +0 -1
  230. package/full/fesm5/inspark-inspark-components.js +0 -4324
  231. package/full/fesm5/inspark-inspark-components.js.map +0 -1
  232. package/full/fonts/primeicons.eot +0 -0
  233. package/full/fonts/primeicons.svg +0 -163
  234. package/full/fonts/primeicons.ttf +0 -0
  235. package/full/fonts/primeicons.woff +0 -0
  236. package/full/inspark-inspark-components.d.ts +0 -19
  237. package/full/inspark-inspark-components.metadata.json +0 -1
  238. package/interface/bundles/inspark-inspark-components.umd.js +0 -11
  239. package/interface/bundles/inspark-inspark-components.umd.js.map +0 -1
  240. package/interface/bundles/inspark-inspark-components.umd.min.js +0 -2
  241. package/interface/bundles/inspark-inspark-components.umd.min.js.map +0 -1
  242. package/interface/esm2015/inspark-inspark-components.js +0 -4
  243. package/interface/esm2015/interface.js +0 -1
  244. package/interface/esm2015/public_api.js +0 -4
  245. package/interface/esm5/inspark-inspark-components.js +0 -4
  246. package/interface/esm5/interface.js +0 -1
  247. package/interface/esm5/public_api.js +0 -4
  248. package/interface/fesm2015/inspark-inspark-components.js +0 -4
  249. package/interface/fesm2015/inspark-inspark-components.js.map +0 -1
  250. package/interface/fesm5/inspark-inspark-components.js +0 -4
  251. package/interface/fesm5/inspark-inspark-components.js.map +0 -1
  252. package/interface/inspark-inspark-components.metadata.json +0 -1
@@ -1,4324 +0,0 @@
1
- import { __decorate, __metadata, __assign, __extends, __read, __values } from 'tslib';
2
- import { Pipe, NgModule, Injectable, ComponentFactoryResolver, ApplicationRef, Injector, EventEmitter, ChangeDetectorRef, Input, ViewChild, HostBinding, Output, Component, ViewEncapsulation, ChangeDetectionStrategy, forwardRef, ElementRef, TemplateRef, Directive, HostListener, ContentChildren, QueryList, NO_ERRORS_SCHEMA } from '@angular/core';
3
- import { TranslateService, TranslateModule } from '@ngx-translate/core';
4
- export { TranslateModule } from '@ngx-translate/core';
5
- import { DomSanitizer } from '@angular/platform-browser';
6
- import { MessageService, ConfirmationService, DynamicDialogConfig, DynamicDialogRef, DomHandler } from 'primeng/api';
7
- import { _ } from '@biesbjerg/ngx-translate-extract/dist/utils/utils';
8
- import { DynamicDialogComponent } from 'primeng/dynamicdialog';
9
- import { DynamicDialogInjector } from 'primeng/components/dynamicdialog/dynamicdialog-injector';
10
- import { Subject } from 'rxjs';
11
- import { NG_VALUE_ACCESSOR, FormsModule, ReactiveFormsModule } from '@angular/forms';
12
- import { CommonModule } from '@angular/common';
13
- import { Menu, Button, DropdownModule, Dropdown, TooltipModule, TreeTableModule, AutoComplete, ButtonModule, RadioButtonModule, BreadcrumbModule, TreeModule, SharedModule } from 'primeng/primeng';
14
- export { BreadcrumbModule, RadioButtonModule, SharedModule, TreeModule } from 'primeng/primeng';
15
- import { Router } from '@angular/router';
16
- import { ScrollingModule } from '@angular/cdk/scrolling';
17
- import { trigger, state, style, transition, animate } from '@angular/animations';
18
- import { TableService, Table, TableModule } from 'primeng/table';
19
- import { DropdownModule as DropdownModule$1 } from 'primeng/dropdown';
20
- import { MultiSelectModule } from 'primeng/multiselect';
21
- import { NgbDropdownModule, NgbModule } from '@ng-bootstrap/ng-bootstrap';
22
- export { NgbModule } from '@ng-bootstrap/ng-bootstrap';
23
- import { CheckboxModule } from 'primeng/checkbox';
24
- import { ObjectUtils } from 'primeng/components/utils/objectutils';
25
- import { InlineSVGModule } from 'ng-inline-svg';
26
- export { InlineSVGModule } from 'ng-inline-svg';
27
- import { MenuModule } from 'primeng/menu';
28
- export { MenuModule } from 'primeng/menu';
29
- import { SliderModule } from 'primeng/slider';
30
- export { SliderModule } from 'primeng/slider';
31
-
32
- var PropertyValuePipe = /** @class */ (function () {
33
- function PropertyValuePipe() {
34
- }
35
- PropertyValuePipe.prototype.transform = function (value, name) {
36
- if (Array.isArray(value) || !(value instanceof Object) || !name) {
37
- return value;
38
- }
39
- else if (name.indexOf('.') > -1) {
40
- var splitName = name.split(/\.(.+)/, 2);
41
- return this.transform(value[splitName[0]], splitName[1]);
42
- }
43
- else {
44
- return value[name];
45
- }
46
- };
47
- PropertyValuePipe = __decorate([
48
- Pipe({
49
- name: 'propertyValue'
50
- })
51
- ], PropertyValuePipe);
52
- return PropertyValuePipe;
53
- }());
54
-
55
- function isTime(value) {
56
- return /^[0-9]{1,2}\:[0-9]{1,2}$/.test(value.toString());
57
- }
58
- function addLeadZero(num, isNegative) {
59
- if (isNegative === void 0) { isNegative = false; }
60
- return (isNegative ? '-' : '') + ('000' + Math.abs(num)).slice(-2);
61
- }
62
- function parseIntervalToMinutes(interval) {
63
- if (!isTime(interval)) {
64
- return 0;
65
- }
66
- var parts = interval.split(':');
67
- var hours = parseInt(parts[0], 10);
68
- var minutes = parseInt(parts[1], 10);
69
- if (isNaN(hours) || isNaN(minutes)) {
70
- throw new Error(interval + ' не может быть обработан как время HH:MM');
71
- }
72
- return 60 * hours + minutes;
73
- }
74
- function shortWeekdayToNum(dayKey) {
75
- switch (dayKey) {
76
- case 'sun':
77
- return 0;
78
- case 'mon':
79
- return 1;
80
- case 'tue':
81
- return 2;
82
- case 'wed':
83
- return 3;
84
- case 'thu':
85
- return 4;
86
- case 'fri':
87
- return 5;
88
- case 'sat':
89
- return 6;
90
- case 'd1':
91
- return 7;
92
- case 'd2':
93
- return 8;
94
- }
95
- return -1;
96
- }
97
- function formatNumberToTime(num) {
98
- if (isTime(num)) {
99
- return num;
100
- }
101
- var value = parseInt(num, 10);
102
- var isNegative = value < 0 ? true : false;
103
- var absValue = Math.abs(value);
104
- return addLeadZero(Math.floor(absValue / 60), isNegative) + ':' + addLeadZero(absValue % 60);
105
- }
106
- function numToShortWeekday(num) {
107
- var days = [
108
- 'sun',
109
- 'mon',
110
- 'tue',
111
- 'wed',
112
- 'thu',
113
- 'fri',
114
- 'sat',
115
- 'd1',
116
- 'd2'
117
- ];
118
- return days[parseInt(num, 10)] ? days[parseInt(num, 10)] : 'custom';
119
- }
120
- function shortToFullWeekday(day) {
121
- var days = {
122
- 'sun': 'sunday',
123
- 'mon': 'monday',
124
- 'tue': 'tuesday',
125
- 'wed': 'wednesday',
126
- 'thu': 'thursday',
127
- 'fri': 'friday',
128
- 'sat': 'saturday',
129
- 'd1': 'day1',
130
- 'd2': 'day2'
131
- };
132
- return days[day];
133
- }
134
- var ShortToFullWeekdayPipe = /** @class */ (function () {
135
- function ShortToFullWeekdayPipe() {
136
- }
137
- ShortToFullWeekdayPipe.prototype.transform = function (value, args) {
138
- return shortToFullWeekday(value);
139
- };
140
- ShortToFullWeekdayPipe = __decorate([
141
- Pipe({
142
- name: 'shortToFullWeekday'
143
- })
144
- ], ShortToFullWeekdayPipe);
145
- return ShortToFullWeekdayPipe;
146
- }());
147
- /**
148
- * Pipe используется для преобразования числа в день недели
149
- * 0-6 - вс-сб, 7,8 - день1, день2
150
- */
151
- var NumToShortWeekdayPipe = /** @class */ (function () {
152
- function NumToShortWeekdayPipe() {
153
- }
154
- NumToShortWeekdayPipe.prototype.transform = function (value, args) {
155
- return numToShortWeekday(value);
156
- };
157
- NumToShortWeekdayPipe = __decorate([
158
- Pipe({
159
- name: 'numToShortWeekday'
160
- })
161
- ], NumToShortWeekdayPipe);
162
- return NumToShortWeekdayPipe;
163
- }());
164
- var FormatNumToTime = /** @class */ (function () {
165
- function FormatNumToTime() {
166
- }
167
- FormatNumToTime.prototype.transform = function (value, args) {
168
- if (args) {
169
- var isHour = false;
170
- var isMin = false;
171
- var isSec = false;
172
- if (args.indexOf('HH') !== -1) {
173
- isHour = true;
174
- }
175
- if (args.indexOf('mm') !== -1) {
176
- isMin = true;
177
- }
178
- if (args.indexOf('SS') !== -1) {
179
- isSec = true;
180
- }
181
- var absValue = Math.floor(Math.abs(value / 1000));
182
- var hours = 0;
183
- var hh = '00';
184
- if (isHour) {
185
- hours = Math.floor(absValue / (60 * 60));
186
- hh = String(hours < 10 ? '0' + hours : hours);
187
- }
188
- var Mins = 0;
189
- var MM = '00';
190
- if (isMin) {
191
- Mins = Math.ceil((absValue - hours * 60 * 60) / 60);
192
- MM = String(Mins < 10 ? '0' + Mins : Mins);
193
- }
194
- var sec = 0;
195
- var ss = '00';
196
- if (isSec) {
197
- sec = absValue - hours * 60 * 60 - Mins * 60;
198
- ss = String(sec < 10 ? '0' + sec : sec);
199
- }
200
- if (isHour && isMin && isSec) {
201
- return hh + ':' + MM + ':' + ss;
202
- }
203
- else if (isHour && isMin) {
204
- return hh + ':' + MM;
205
- }
206
- else if (isMin && isSec) {
207
- return MM + ':' + ss;
208
- }
209
- else if (isHour) {
210
- return hh;
211
- }
212
- else if (isMin) {
213
- return MM;
214
- }
215
- else if (isSec) {
216
- return ss;
217
- }
218
- }
219
- return formatNumberToTime(value);
220
- };
221
- FormatNumToTime = __decorate([
222
- Pipe({
223
- name: 'formatNumToTime'
224
- })
225
- ], FormatNumToTime);
226
- return FormatNumToTime;
227
- }());
228
- var InDate = /** @class */ (function () {
229
- function InDate(translate) {
230
- this.translate = translate;
231
- }
232
- InDate.prototype.transform = function (value, args) {
233
- var isSec = args ? args.indexOf('ss') !== -1 : false;
234
- var isHour = args ? args.indexOf('hh') !== -1 : true;
235
- var isMin = args ? args.indexOf('MM') !== -1 : true;
236
- var date = new Date(value);
237
- var now = new Date();
238
- var time = (isHour ? "" + ('0' + date.getHours()).slice(-2) : "")
239
- + (isMin ? ":" + ('0' + date.getMinutes()).slice(-2) : "")
240
- + (isSec ? ":" + ('0' + date.getSeconds()).slice(-2) + " " : "");
241
- if (date.getFullYear() === now.getFullYear() && date.getMonth() === now.getMonth() && date.getDate() === now.getDate()) {
242
- return this.translate.instant('today at') + ' ' + time;
243
- }
244
- else {
245
- return ('0' + date.getDate()).slice(-2) + '.' + ('0' + (date.getMonth() + 1)).slice(-2) + '.' + ('0' + date.getFullYear()).slice(-2) + ' ' + time;
246
- }
247
- };
248
- InDate.ctorParameters = function () { return [
249
- { type: TranslateService }
250
- ]; };
251
- InDate = __decorate([
252
- Pipe({
253
- name: 'inDate'
254
- }),
255
- __metadata("design:paramtypes", [TranslateService])
256
- ], InDate);
257
- return InDate;
258
- }());
259
-
260
- /**
261
- * Sanitize HTML
262
- */
263
- var SafeUrlPipe = /** @class */ (function () {
264
- /**
265
- * Pipe Constructor
266
- *
267
- * @param _sanitizer: DomSanitezer
268
- */
269
- // tslint:disable-next-line
270
- function SafeUrlPipe(_sanitizer) {
271
- this._sanitizer = _sanitizer;
272
- }
273
- /**
274
- * Transform
275
- *
276
- * @param value: string
277
- */
278
- SafeUrlPipe.prototype.transform = function (value) {
279
- return this._sanitizer.bypassSecurityTrustResourceUrl(value);
280
- };
281
- SafeUrlPipe.ctorParameters = function () { return [
282
- { type: DomSanitizer }
283
- ]; };
284
- SafeUrlPipe = __decorate([
285
- Pipe({
286
- name: 'safeUrl'
287
- }),
288
- __metadata("design:paramtypes", [DomSanitizer])
289
- ], SafeUrlPipe);
290
- return SafeUrlPipe;
291
- }());
292
-
293
- var SortByPipe = /** @class */ (function () {
294
- function SortByPipe() {
295
- }
296
- SortByPipe.prototype.transform = function (arr, options) {
297
- if (arr === undefined) {
298
- return;
299
- }
300
- return arr.sort(function (a, b) {
301
- var cmp = 0;
302
- for (var i = 0; i < options.length; i++) {
303
- var x = a[options[i].sortField];
304
- var y = b[options[i].sortField];
305
- var asc = options[i].isAscending ? -1 : 1;
306
- cmp = (((x === y) ? 0 : (x < y) ? -1 * asc : 1 * asc) + cmp) * 10;
307
- }
308
- return cmp;
309
- });
310
- };
311
- SortByPipe = __decorate([
312
- Pipe({
313
- name: 'SortByPipe'
314
- })
315
- ], SortByPipe);
316
- return SortByPipe;
317
- }());
318
-
319
- var PipesModule = /** @class */ (function () {
320
- function PipesModule() {
321
- }
322
- PipesModule = __decorate([
323
- NgModule({
324
- exports: [PropertyValuePipe, NumToShortWeekdayPipe, FormatNumToTime, InDate, ShortToFullWeekdayPipe, SafeUrlPipe, SortByPipe],
325
- declarations: [PropertyValuePipe, NumToShortWeekdayPipe, FormatNumToTime, InDate, ShortToFullWeekdayPipe, SafeUrlPipe, SortByPipe]
326
- })
327
- ], PipesModule);
328
- return PipesModule;
329
- }());
330
-
331
- function gettext(a) {
332
- return _(a);
333
- }
334
-
335
- var InsparkMessageService = /** @class */ (function () {
336
- function InsparkMessageService(translate, messageService, confirmationService) {
337
- this.translate = translate;
338
- this.messageService = messageService;
339
- this.confirmationService = confirmationService;
340
- }
341
- /**
342
- * @deprecated
343
- * @param options
344
- */
345
- InsparkMessageService.prototype.add = function (options) {
346
- this.messageService.add(options);
347
- };
348
- InsparkMessageService.prototype.confirm = function (message, options) {
349
- var _this = this;
350
- this.translate.get(message).subscribe(function (res) {
351
- _this.confirmationService.confirm(__assign(__assign({}, options), { message: res }));
352
- });
353
- };
354
- InsparkMessageService.prototype.success = function (message) {
355
- var _this = this;
356
- this.translate.get(gettext('Toast_Success_Caption')).subscribe(function (title) {
357
- _this.translate.get(message).subscribe(function (res) {
358
- _this.messageService.add({ severity: 'success', summary: title, detail: res });
359
- });
360
- });
361
- };
362
- InsparkMessageService.prototype.message = function (message) {
363
- var _this = this;
364
- this.translate.get(gettext('Toast_Message_Caption')).subscribe(function (title) {
365
- _this.translate.get(message).subscribe(function (res) {
366
- _this.messageService.add({ severity: 'info', summary: title, detail: res });
367
- });
368
- });
369
- };
370
- /*TODO: костыль перевода, - чтобы избежать переполнения стека изза рекурсии*/
371
- InsparkMessageService.prototype.error = function (message) {
372
- var _this = this;
373
- var title = this.getToastErrorTitleLocalized();
374
- // this.translate.get(gettext('Toast_Error_Caption')).subscribe((title: string) => {
375
- this.translate.get(message).subscribe(function (res) {
376
- _this.messageService.add({ severity: 'error', summary: title, detail: res });
377
- });
378
- // });
379
- };
380
- InsparkMessageService.prototype.getToastErrorTitleLocalized = function () {
381
- var ilocale = localStorage.getItem('ilocale_');
382
- if (ilocale && ilocale.replace(/"/g, '') === 'en-US') {
383
- return 'Error';
384
- }
385
- return 'Ошибка';
386
- /*
387
- if (ilocale && (this.localeService.locale$.getValue() === undefined || this.localeService.locale$.getValue().serverShort !== ilocale.replace(/"/g, ''))) {
388
- this.localeService.setLocale(ilocale.replace(/"/g, ''));
389
- this.translate.use(this.localeService.locale$.getValue().short);
390
- }
391
- */
392
- };
393
- InsparkMessageService.ctorParameters = function () { return [
394
- { type: TranslateService },
395
- { type: MessageService },
396
- { type: ConfirmationService }
397
- ]; };
398
- InsparkMessageService = __decorate([
399
- Injectable(),
400
- __metadata("design:paramtypes", [TranslateService,
401
- MessageService,
402
- ConfirmationService])
403
- ], InsparkMessageService);
404
- return InsparkMessageService;
405
- }());
406
-
407
- var InsparkDialogService = /** @class */ (function () {
408
- function InsparkDialogService(componentFactoryResolver, appRef, injector) {
409
- this.componentFactoryResolver = componentFactoryResolver;
410
- this.appRef = appRef;
411
- this.injector = injector;
412
- }
413
- InsparkDialogService.prototype.open = function (componentType, config) {
414
- var dialogRef = this.appendDialogComponentToBody(config);
415
- console.log('window.scrollY', window.scrollY);
416
- document.body.style.top = "-" + window.scrollY + "px";
417
- document.body.style.position = 'fixed';
418
- dialogRef.onClose.subscribe(function () {
419
- console.log('custom subscrnve');
420
- var scrollY = document.body.style.top;
421
- document.body.style.position = '';
422
- document.body.style.top = '';
423
- window.scrollTo(0, parseInt(scrollY || '0') * -1);
424
- });
425
- this.dialogComponentRef.instance.childComponentType = componentType;
426
- return dialogRef;
427
- };
428
- InsparkDialogService.prototype.appendDialogComponentToBody = function (config) {
429
- var _this = this;
430
- var map = new WeakMap();
431
- map.set(DynamicDialogConfig, config);
432
- var dialogRef = new DynamicDialogRef();
433
- map.set(DynamicDialogRef, dialogRef);
434
- var sub = dialogRef.onClose.subscribe(function () {
435
- _this.removeDialogComponentFromBody();
436
- sub.unsubscribe();
437
- });
438
- var componentFactory = this.componentFactoryResolver.resolveComponentFactory(DynamicDialogComponent);
439
- var componentRef = componentFactory.create(new DynamicDialogInjector(this.injector, map));
440
- this.appRef.attachView(componentRef.hostView);
441
- var domElem = componentRef.hostView.rootNodes[0];
442
- document.body.appendChild(domElem);
443
- this.dialogComponentRef = componentRef;
444
- return dialogRef;
445
- };
446
- InsparkDialogService.prototype.removeDialogComponentFromBody = function () {
447
- this.appRef.detachView(this.dialogComponentRef.hostView);
448
- this.dialogComponentRef.destroy();
449
- };
450
- InsparkDialogService.ctorParameters = function () { return [
451
- { type: ComponentFactoryResolver },
452
- { type: ApplicationRef },
453
- { type: Injector }
454
- ]; };
455
- InsparkDialogService = __decorate([
456
- Injectable(),
457
- __metadata("design:paramtypes", [ComponentFactoryResolver, ApplicationRef, Injector])
458
- ], InsparkDialogService);
459
- return InsparkDialogService;
460
- }());
461
-
462
- var CommunicationService = /** @class */ (function () {
463
- function CommunicationService() {
464
- this.messageSource = {};
465
- this.message$ = {};
466
- }
467
- CommunicationService.prototype.create = function (id) {
468
- if (!this.messageSource[id]) {
469
- this.messageSource[id] = new Subject();
470
- this.message$[id] = this.messageSource[id].asObservable();
471
- }
472
- };
473
- CommunicationService.prototype.next = function (widgetId, value) {
474
- this.create(widgetId);
475
- this.messageSource[widgetId].next(value);
476
- };
477
- CommunicationService = __decorate([
478
- Injectable()
479
- ], CommunicationService);
480
- return CommunicationService;
481
- }());
482
-
483
- var ButtonComponent = /** @class */ (function (_super) {
484
- __extends(ButtonComponent, _super);
485
- function ButtonComponent(cdr) {
486
- var _this = _super.call(this) || this;
487
- _this.cdr = cdr;
488
- _this.size = 'normal';
489
- _this.color = 'normal';
490
- _this.type = 'button';
491
- _this.name = '';
492
- _this.testId = '';
493
- _this.label = '';
494
- _this.icon = '';
495
- _this.className = '';
496
- _this.notify = null;
497
- _this.svg = '';
498
- _this.width = 'auto';
499
- _this.link = '';
500
- _this.isLoading = false;
501
- _this.shadow = false;
502
- _this.isIconOnly = false;
503
- /**
504
- * external - ссылка на внешний источник
505
- * internal - ссылка внутри приложения
506
- * auto - определяется автоматически исходя из link
507
- */
508
- _this.linkType = 'auto';
509
- /**
510
- * self - открывается в этом же окне
511
- * blank - открывается в новом окне
512
- * auto - определяется автоматически исходя из linkType
513
- */
514
- _this.linkTarget = 'auto';
515
- // Отображает кнопку нажатой
516
- _this.pressed = false;
517
- _this.disabled = false;
518
- _this.iconPos = 'left';
519
- _this.selectedItem = null;
520
- _this.menuPlacement = 'bottom-left';
521
- _this.menuItems = [];
522
- _this.focus = new EventEmitter();
523
- _this.blur = new EventEmitter();
524
- _this.click = new EventEmitter();
525
- _this._target = '_self';
526
- _this._linkType = 'auto';
527
- _this.isMaterialIcon = false;
528
- return _this;
529
- }
530
- Object.defineProperty(ButtonComponent.prototype, "pointerEvents", {
531
- get: function () {
532
- return this.disabled ? 'none' : 'auto';
533
- },
534
- enumerable: true,
535
- configurable: true
536
- });
537
- ButtonComponent.prototype.ngOnInit = function () {
538
- this.updateData();
539
- };
540
- ButtonComponent.prototype.ngOnChanges = function (changes) {
541
- this.updateData();
542
- };
543
- ButtonComponent.prototype.updateData = function () {
544
- this._linkType = this.linkType;
545
- if (this._linkType === 'auto') {
546
- if ((this.link.indexOf('://') !== -1 || this.link.indexOf('//') === 0)) {
547
- this._linkType = 'external';
548
- }
549
- else {
550
- this._linkType = 'internal';
551
- }
552
- }
553
- if (this.linkTarget === 'auto') {
554
- if (this._linkType === 'external') {
555
- this._target = '_blank';
556
- }
557
- else {
558
- this._target = '_self';
559
- }
560
- }
561
- else {
562
- this._target = this.linkTarget === 'self' ? '_self' : 'blank';
563
- }
564
- if (this.icon && this.icon.indexOf('fa-') === -1) {
565
- this.isMaterialIcon = true;
566
- }
567
- else {
568
- this.isMaterialIcon = false;
569
- }
570
- };
571
- ButtonComponent.prototype._onClick = function ($event) {
572
- this.cdr.detectChanges();
573
- };
574
- ButtonComponent.ctorParameters = function () { return [
575
- { type: ChangeDetectorRef }
576
- ]; };
577
- __decorate([
578
- Input(),
579
- __metadata("design:type", String)
580
- ], ButtonComponent.prototype, "size", void 0);
581
- __decorate([
582
- Input(),
583
- __metadata("design:type", String)
584
- ], ButtonComponent.prototype, "color", void 0);
585
- __decorate([
586
- Input(),
587
- __metadata("design:type", String)
588
- ], ButtonComponent.prototype, "type", void 0);
589
- __decorate([
590
- Input(),
591
- __metadata("design:type", Object)
592
- ], ButtonComponent.prototype, "name", void 0);
593
- __decorate([
594
- Input(),
595
- __metadata("design:type", Object)
596
- ], ButtonComponent.prototype, "testId", void 0);
597
- __decorate([
598
- Input(),
599
- __metadata("design:type", Object)
600
- ], ButtonComponent.prototype, "label", void 0);
601
- __decorate([
602
- Input(),
603
- __metadata("design:type", Object)
604
- ], ButtonComponent.prototype, "icon", void 0);
605
- __decorate([
606
- Input(),
607
- __metadata("design:type", Object)
608
- ], ButtonComponent.prototype, "className", void 0);
609
- __decorate([
610
- Input(),
611
- __metadata("design:type", String)
612
- ], ButtonComponent.prototype, "notify", void 0);
613
- __decorate([
614
- Input(),
615
- __metadata("design:type", Object)
616
- ], ButtonComponent.prototype, "svg", void 0);
617
- __decorate([
618
- Input(),
619
- __metadata("design:type", Object)
620
- ], ButtonComponent.prototype, "width", void 0);
621
- __decorate([
622
- Input(),
623
- __metadata("design:type", Object)
624
- ], ButtonComponent.prototype, "link", void 0);
625
- __decorate([
626
- Input(),
627
- __metadata("design:type", Object)
628
- ], ButtonComponent.prototype, "isLoading", void 0);
629
- __decorate([
630
- Input(),
631
- __metadata("design:type", Object)
632
- ], ButtonComponent.prototype, "shadow", void 0);
633
- __decorate([
634
- Input(),
635
- __metadata("design:type", Object)
636
- ], ButtonComponent.prototype, "isIconOnly", void 0);
637
- __decorate([
638
- Input(),
639
- __metadata("design:type", String)
640
- ], ButtonComponent.prototype, "linkType", void 0);
641
- __decorate([
642
- Input(),
643
- __metadata("design:type", String)
644
- ], ButtonComponent.prototype, "linkTarget", void 0);
645
- __decorate([
646
- Input(),
647
- __metadata("design:type", Object)
648
- ], ButtonComponent.prototype, "pressed", void 0);
649
- __decorate([
650
- Input(),
651
- __metadata("design:type", Object)
652
- ], ButtonComponent.prototype, "disabled", void 0);
653
- __decorate([
654
- Input(),
655
- __metadata("design:type", String)
656
- ], ButtonComponent.prototype, "iconPos", void 0);
657
- __decorate([
658
- Input(),
659
- __metadata("design:type", Object)
660
- ], ButtonComponent.prototype, "selectedItem", void 0);
661
- __decorate([
662
- Input(),
663
- __metadata("design:type", Object)
664
- ], ButtonComponent.prototype, "menuPlacement", void 0);
665
- __decorate([
666
- Input(),
667
- __metadata("design:type", Array)
668
- ], ButtonComponent.prototype, "menuItems", void 0);
669
- __decorate([
670
- ViewChild(Menu, { static: false }),
671
- __metadata("design:type", Menu)
672
- ], ButtonComponent.prototype, "_menu", void 0);
673
- __decorate([
674
- HostBinding('style.pointer-events'),
675
- __metadata("design:type", String),
676
- __metadata("design:paramtypes", [])
677
- ], ButtonComponent.prototype, "pointerEvents", null);
678
- __decorate([
679
- Output(),
680
- __metadata("design:type", EventEmitter)
681
- ], ButtonComponent.prototype, "focus", void 0);
682
- __decorate([
683
- Output(),
684
- __metadata("design:type", EventEmitter)
685
- ], ButtonComponent.prototype, "blur", void 0);
686
- __decorate([
687
- Output(),
688
- __metadata("design:type", EventEmitter)
689
- ], ButtonComponent.prototype, "click", void 0);
690
- ButtonComponent = __decorate([
691
- Component({
692
- selector: 'in-button',
693
- template: "<a (blur)=\"blur.emit($event)\"\n (click)=\"_onClick($event)\"\n (focus)=\"focus.emit($event)\"\n *ngIf=\"link && _linkType ==='external'\"\n [attr.type]=\"type\"\n [class]=\"className + ' ' + testId + ' field_' + name\"\n [href]=\"link\"\n [ngClass]=\"{'ui-button ui-widget ui-state-default ui-corner-all':true,\n 'ui-button-icon-only': ((icon || svg) && !label),\n 'ui-button-text-icon-left': ((icon || svg) && label && iconPos === 'left'),\n 'ui-button-text-icon-right': ((icon || svg) && label && iconPos === 'right'),\n 'ui-button-text-only': (!(icon || svg) && label),\n 'ui-button-text-empty': (!(icon || svg) && !label),\n 'ui-button-svg': svg,\n 'ui-button-material': isMaterialIcon,\n 'ui-state-disabled': disabled,\n 'ui-button-tiny': size === 'tiny',\n 'ui-button-small': size === 'small',\n 'ui-button-large': size === 'large',\n 'ui-button-primary': color === 'primary',\n 'ui-button-secondary': color === 'secondary',\n 'ui-button-danger': color === 'danger',\n 'ui-button-transparency': color === 'transparent',\n 'ui-button-pressed' : pressed}\"\n [ngStyle]=\"{width:width}\"\n [style]=\"style\"\n [target]=\"_target\" class=\"button-container\">\n <ng-container *ngTemplateOutlet=\"content;\"></ng-container>\n</a>\n<a (blur)=\"blur.emit($event)\"\n (click)=\"_onClick($event)\"\n (focus)=\"focus.emit($event)\"\n *ngIf=\"link && _linkType ==='internal'\"\n [attr.type]=\"type\"\n [class]=\"className + ' ' + testId + ' field_' + name\"\n [ngClass]=\"{'ui-button ui-widget ui-state-default ui-corner-all':true,\n 'ui-button-icon-only': ((icon || svg) && !label),\n 'ui-button-text-icon-left': ((icon || svg) && label && iconPos === 'left'),\n 'ui-button-text-icon-right': ((icon || svg) && label && iconPos === 'right'),\n 'ui-button-text-only': (!(icon || svg) && label),\n 'ui-button-text-empty': (!(icon || svg) && !label),\n 'ui-button-svg': svg,\n 'ui-button-material': isMaterialIcon,\n 'ui-state-disabled': disabled,\n 'ui-button-tiny': size === 'tiny',\n 'ui-button-small': size === 'small',\n 'ui-button-large': size === 'large',\n 'ui-button-primary': color === 'primary',\n 'ui-button-secondary': color === 'secondary',\n 'ui-button-danger': color === 'danger',\n 'ui-button-transparency': color === 'transparent',\n 'ui-button-pressed' : pressed}\"\n [ngStyle]=\"{width:width}\"\n [routerLink]=\"link\"\n [style]=\"style\"\n [target]=\"_target\" class=\"button-container\">\n <ng-container *ngTemplateOutlet=\"content;\"></ng-container>\n</a>\n<span #dropdown=\"ngbDropdown\" *ngIf=\"!link && menuItems.length\" [ngStyle]=\"{width:width}\" class=\"button-container\" container=\"body\"\n ngbDropdown>\n <button\n (blur)=\"blur.emit($event)\"\n (click)=\"_onClick($event)\"\n (focus)=\"focus.emit($event)\"\n [attr.type]=\"type\"\n [class]=\"className + ' ' + testId + ' field_' + name\"\n [disabled]=\"disabled\"\n [ngClass]=\" {'ui-button ui-widget ui-state-default ui-corner-all':true,\n 'ui-button-icon-only': ((icon || svg) && !label),\n 'ui-button-text-icon-left': ((icon || svg) && label && iconPos === 'left'),\n 'ui-button-text-icon-right': ((icon || svg) && label && iconPos === 'right'),\n 'ui-button-text-only': (!(icon || svg) && label),\n 'ui-button-text-empty': (!(icon || svg) && !label),\n 'ui-button-svg': svg,\n 'ui-button-material': isMaterialIcon,\n 'ui-state-disabled': disabled,\n 'ui-button-tiny': size === 'tiny',\n 'ui-button-small': size === 'small',\n 'ui-button-large': size === 'large',\n 'ui-button-primary': color === 'primary',\n 'ui-button-secondary': color === 'secondary',\n 'ui-button-danger': color === 'danger',\n 'ui-button-transparency': color === 'transparent',\n 'ui-button-shadowed': shadow === true,\n 'ui-button-pressed' : pressed}\"\n [style]=\"style\" ngbDropdownToggle>\n <ng-container *ngTemplateOutlet=\"content;\"></ng-container>\n </button>\n <div *ngIf=\"menuItems.length\" aria-labelledby=\"menu\"\n class=\"in-dropdown-menu\"\n ngbDropdownMenu>\n <div *ngFor=\"let item of menuItems\" class=\"in-dropdown-menu-item\" role=\"menuitem\">\n <in-button (click)=\"dropdown.close(); item.command();\"\n [color]=\"selectedItem && selectedItem == item.id?'primary':'transparent'\"\n [icon]=\"item.icon\"\n [label]=\"item.label\"\n [svg]=\"item.svg\"\n size=\"large\"\n width=\"100%\"></in-button>\n </div>\n </div>\n\n <div *ngIf=\"notify\" [ngClass]=\"notify\" class=\"notify\"></div>\n</span>\n<span *ngIf=\"!link && !menuItems.length\" [ngStyle]=\"{width:width}\" class=\"button-container\">\n <button\n (blur)=\"blur.emit($event)\"\n (click)=\"_onClick($event)\"\n (focus)=\"focus.emit($event)\"\n [attr.type]=\"type\"\n [class]=\"className + ' ' + testId + ' field_' + name\"\n [disabled]=\"disabled\"\n [ngClass]=\" {'ui-button ui-widget ui-state-default ui-corner-all':true,\n 'ui-button-icon-only': ((icon || svg) && !label) || isIconOnly,\n 'ui-button-text-icon-left': ((icon || svg) && label && iconPos === 'left'),\n 'ui-button-text-icon-right': ((icon || svg) && label && iconPos === 'right'),\n 'ui-button-text-only': (!(icon || svg) && label),\n 'ui-button-text-empty': (!(icon || svg) && !label),\n 'ui-button-svg': svg,\n 'ui-button-material': isMaterialIcon,\n 'ui-state-disabled': disabled,\n 'ui-button-tiny': size === 'tiny',\n 'ui-button-small': size === 'small',\n 'ui-button-large': size === 'large',\n 'ui-button-primary': color === 'primary',\n 'ui-button-secondary': color === 'secondary',\n 'ui-button-danger': color === 'danger',\n 'ui-button-transparency': color === 'transparent',\n 'ui-button-shadowed': shadow === true,\n 'ui-button-pressed' : pressed}\" [style]=\"style\">\n <ng-container *ngTemplateOutlet=\"content;\"></ng-container>\n </button>\n <div *ngIf=\"notify\" [ngClass]=\"notify\" class=\"notify\"></div>\n</span>\n\n<ng-template #content>\n <span *ngIf=\"!isMaterialIcon && icon && !isLoading\" [class]=\"icon\"\n [ngClass]=\"{'ui-clickable': true,\n 'ui-button-icon-left': (iconPos === 'left'),\n 'ui-button-icon-right': (iconPos === 'right')}\"></span>\n <span *ngIf=\"isMaterialIcon && icon && !isLoading\" [ngClass]=\"{'ui-clickable': true,\n 'ui-button-icon-left': (iconPos === 'left'),\n 'ui-button-icon-right': (iconPos === 'right')}\"\n ><i class=\"material-icons\">{{icon}}</i></span>\n <in-preloader *ngIf=\"isLoading\" size=\"small\"></in-preloader>\n <span class=\"ui-button-text ui-clickable\">{{label}}</span>\n <span *ngIf=\"svg && !isLoading\" [ngClass]=\"{'ui-clickable': true,\n 'ui-button-icon-left': (iconPos === 'left'),\n 'ui-button-icon-right': (iconPos === 'right')}\">\n <in-svg *ngIf=\"size === 'normal'\" [src]=\"svg\" height=\"20px\" width=\"20px\"></in-svg>\n <in-svg *ngIf=\"size === 'large'\" [src]=\"svg\" height=\"20px\" width=\"20px\"></in-svg>\n <in-svg *ngIf=\"size === 'small'\" [src]=\"svg\" height=\"20px\" width=\"20px\"></in-svg>\n <in-svg *ngIf=\"size === 'tiny'\" [src]=\"svg\" height=\"10px\" width=\"10px\"></in-svg>\n </span>\n</ng-template>\n",
694
- encapsulation: ViewEncapsulation.Emulated,
695
- changeDetection: ChangeDetectionStrategy.OnPush,
696
- styles: ["@charset \"UTF-8\";.container{display:inline-block}.button-container{position:relative;display:inline-block}button{outline:0;width:100%}.ui-button-icon-only .ui-button-icon-left{margin-top:-9px}.ui-button-text{vertical-align:middle}.notify{width:8px;height:8px;border-radius:100%;position:absolute;right:8px;top:8px}.notify.warning{background:var(--colorWarning)}.notify.success{background:var(--colorSuccess)}.notify.error{background:var(--colorError)}.notify.critical{background:var(--colorCritical)}.ui-button{margin-right:0;height:36px;display:inline-flex;align-items:center;justify-content:center}.ui-button.ui-button-pressed{background-color:var(--colorBgLevel4)}.ui-button.ui-button-large{height:48px}.ui-button.ui-button-large .ui-button-icon-left{font-size:18px;margin-top:-8px}.ui-button.ui-button-large .ui-button-text{padding:0 1em 0 48px;margin-top:6px}.ui-button-text-icon-left .ui-button-text{padding:0 1em 0 2.4em}.ui-button-icon-only{font-size:18px;display:inline-flex;align-items:center;justify-content:center}.ui-button-icon-only.ui-button-large{width:48px;height:48px}.ui-button-icon-only .svg,.ui-button-icon-only.ui-button-large .svg{display:inline-block;line-height:0}.ui-button-transparency{background:0 0;color:currentColor}.ui-button-transparency:hover{color:currentColor}.ui-button-shadowed{box-shadow:0 2px 6px 0 rgba(0,0,0,.2)}.ui-button.ui-button-svg.ui-button-small .ui-button-icon-left{margin-top:-4px}.ui-button.ui-button-svg.ui-button-small.ui-button-icon-only .ui-button-icon-left{margin-top:-2px}.ui-button.ui-button-svg .ui-button-icon-left{left:6px;transform:translateY(-50%);margin-top:-4px}.ui-button.ui-button-svg.ui-button-icon-only .ui-button-icon-left{left:50%;width:auto;transform:translate(-50%,-50%);margin-left:0;margin-top:0}.ui-button.ui-button-svg.ui-button-large.ui-button-icon-only .ui-button-icon-left{margin-top:0}.ui-button-material.ui-button-icon-only .material-icons{font-size:20px}.ui-button-material.ui-button-icon-only .ui-button-icon-left{margin-top:-10px;margin-left:-12px}.ui-button-material .material-icons{font-size:16px}.ui-button-material .ui-button-icon-left{margin-top:-8px;margin-left:-2px}.ui-button-material.ui-button-small .ui-button-icon-left{margin-top:-7px}.ui-button-material.ui-button-small .material-icons{font-size:14px}.ui-button-material.ui-button-small.ui-button-icon-only .ui-button-icon-left{margin-top:-12px;margin-left:-10px}.ui-button-material.ui-button-small.ui-button-icon-only .ui-button-icon-left .material-icons{font-size:18px}.ui-button-material.ui-button-large .material-icons{font-size:24px}.ui-button-material.ui-button-large .ui-button-icon-left{margin-top:-11px}.ui-button-material.ui-button-large.ui-button-icon-only .ui-button-icon-left{margin-top:-11px;margin-left:-13px}:host .ui-menu .ui-menuitem-link{font-size:16px}.dropdown-menu{display:none;background:var(--colorBgLevel3);padding:4px}.dropdown-menu li{padding:4px;font-size:14px}.dropdown-menu.show{display:block}.in-dropdown-menu{background:var(--colorBgLevel2);padding:0;position:absolute;display:none;margin-left:0;box-shadow:0 0 3px 1px rgba(0,0,0,.2)}.in-dropdown-menu.show{display:block}.in-dropdown-menu .in-dropdown-menu-item{list-style-type:none;min-width:250px;display:flex;align-items:center;justify-content:flex-start;min-height:48px}.in-dropdown-menu .in-dropdown-menu-item in-button,.in-dropdown-menu .in-dropdown-menu-item in-button ::ng-deep button{width:100%;border-radius:0}.in-dropdown-menu .in-dropdown-menu-item in-button .ui-button,.in-dropdown-menu .in-dropdown-menu-item in-button ::ng-deep button .ui-button{justify-content:flex-start}.in-dropdown-menu .in-dropdown-menu-item .switcher{flex:1;display:flex;justify-content:flex-end;padding-right:4px}.in-dropdown-menu .in-dropdown-menu-item+.in-dropdown-menu-item{border-top:1px solid var(--colorBgLevel4)}"]
697
- }),
698
- __metadata("design:paramtypes", [ChangeDetectorRef])
699
- ], ButtonComponent);
700
- return ButtonComponent;
701
- }(Button));
702
-
703
- var InputTextComponent = /** @class */ (function () {
704
- function InputTextComponent() {
705
- this.name = null;
706
- this.autocomplete = true;
707
- this.label = null;
708
- this.required = false;
709
- this.error = null;
710
- this.size = 100000;
711
- this.maxlength = 100000;
712
- this.width = '';
713
- this.display = true;
714
- this.large = true;
715
- this.small = false;
716
- this.widget = false;
717
- this.forms = false;
718
- this.placeholder = '';
719
- this.id = null;
720
- this.testId = null;
721
- this.opacity = true;
722
- this.shadow = false;
723
- this.right = false;
724
- this.type = 'text';
725
- this.focus = new EventEmitter();
726
- this.blur = new EventEmitter();
727
- this.onClick = new EventEmitter();
728
- this.propagateChange = function (_) {
729
- };
730
- }
731
- InputTextComponent_1 = InputTextComponent;
732
- /**
733
- * Write form value to the DOM element (model => view)
734
- */
735
- InputTextComponent.prototype.writeValue = function (value) {
736
- this.value = value;
737
- };
738
- /**
739
- * Write form disabled state to the DOM element (model => view)
740
- */
741
- InputTextComponent.prototype.setDisabledState = function (isDisabled) {
742
- this.disabled = isDisabled;
743
- };
744
- /**
745
- * Update form when DOM element value changes (view => model)
746
- */
747
- InputTextComponent.prototype.registerOnChange = function (fn) {
748
- // Store the provided function as an internal method.
749
- this.propagateChange = fn;
750
- };
751
- /**
752
- * Update form when DOM element is blurred (view => model)
753
- */
754
- InputTextComponent.prototype.registerOnTouched = function (fn) {
755
- // Store the provided function as an internal method.
756
- this.onTouched = fn;
757
- };
758
- InputTextComponent.prototype.clear = function () {
759
- this.value = '';
760
- this.propagateChange('');
761
- this.onClick.emit('');
762
- };
763
- InputTextComponent.prototype.onChange = function (_) {
764
- if (this.type === 'number') {
765
- this.propagateChange(+this.value);
766
- }
767
- else {
768
- this.propagateChange(this.value);
769
- }
770
- };
771
- InputTextComponent.prototype.onTouched = function () {
772
- };
773
- var InputTextComponent_1;
774
- __decorate([
775
- Input(),
776
- __metadata("design:type", Object)
777
- ], InputTextComponent.prototype, "name", void 0);
778
- __decorate([
779
- Input(),
780
- __metadata("design:type", Object)
781
- ], InputTextComponent.prototype, "autocomplete", void 0);
782
- __decorate([
783
- Input(),
784
- __metadata("design:type", Object)
785
- ], InputTextComponent.prototype, "label", void 0);
786
- __decorate([
787
- Input(),
788
- __metadata("design:type", Object)
789
- ], InputTextComponent.prototype, "required", void 0);
790
- __decorate([
791
- Input(),
792
- __metadata("design:type", Object)
793
- ], InputTextComponent.prototype, "error", void 0);
794
- __decorate([
795
- Input(),
796
- __metadata("design:type", Object)
797
- ], InputTextComponent.prototype, "size", void 0);
798
- __decorate([
799
- Input(),
800
- __metadata("design:type", Object)
801
- ], InputTextComponent.prototype, "maxlength", void 0);
802
- __decorate([
803
- Input(),
804
- __metadata("design:type", Object)
805
- ], InputTextComponent.prototype, "width", void 0);
806
- __decorate([
807
- Input(),
808
- __metadata("design:type", Object)
809
- ], InputTextComponent.prototype, "display", void 0);
810
- __decorate([
811
- Input(),
812
- __metadata("design:type", Object)
813
- ], InputTextComponent.prototype, "large", void 0);
814
- __decorate([
815
- Input(),
816
- __metadata("design:type", Object)
817
- ], InputTextComponent.prototype, "small", void 0);
818
- __decorate([
819
- Input(),
820
- __metadata("design:type", Object)
821
- ], InputTextComponent.prototype, "widget", void 0);
822
- __decorate([
823
- Input(),
824
- __metadata("design:type", Object)
825
- ], InputTextComponent.prototype, "forms", void 0);
826
- __decorate([
827
- Input(),
828
- __metadata("design:type", Object)
829
- ], InputTextComponent.prototype, "placeholder", void 0);
830
- __decorate([
831
- Input(),
832
- __metadata("design:type", Object)
833
- ], InputTextComponent.prototype, "id", void 0);
834
- __decorate([
835
- Input(),
836
- __metadata("design:type", Object)
837
- ], InputTextComponent.prototype, "testId", void 0);
838
- __decorate([
839
- Input(),
840
- __metadata("design:type", Boolean)
841
- ], InputTextComponent.prototype, "disabled", void 0);
842
- __decorate([
843
- Input(),
844
- __metadata("design:type", Object)
845
- ], InputTextComponent.prototype, "opacity", void 0);
846
- __decorate([
847
- Input(),
848
- __metadata("design:type", Object)
849
- ], InputTextComponent.prototype, "shadow", void 0);
850
- __decorate([
851
- Input(),
852
- __metadata("design:type", Object)
853
- ], InputTextComponent.prototype, "right", void 0);
854
- __decorate([
855
- Input(),
856
- __metadata("design:type", Object)
857
- ], InputTextComponent.prototype, "type", void 0);
858
- __decorate([
859
- Input(),
860
- __metadata("design:type", Number)
861
- ], InputTextComponent.prototype, "step", void 0);
862
- __decorate([
863
- Input(),
864
- __metadata("design:type", Number)
865
- ], InputTextComponent.prototype, "min", void 0);
866
- __decorate([
867
- Input(),
868
- __metadata("design:type", Number)
869
- ], InputTextComponent.prototype, "max", void 0);
870
- __decorate([
871
- Output(),
872
- __metadata("design:type", EventEmitter)
873
- ], InputTextComponent.prototype, "focus", void 0);
874
- __decorate([
875
- Output(),
876
- __metadata("design:type", EventEmitter)
877
- ], InputTextComponent.prototype, "blur", void 0);
878
- __decorate([
879
- Output(),
880
- __metadata("design:type", EventEmitter)
881
- ], InputTextComponent.prototype, "onClick", void 0);
882
- InputTextComponent = InputTextComponent_1 = __decorate([
883
- Component({
884
- selector: 'in-input-text',
885
- template: "<label [ngStyle]=\"{width: width}\" class=\"label type_varchars\">\n <span *ngIf=\"label\" class=\"c-label__content\">\n {{label}}\n <span *ngIf=\"required\" class=\"c-label__req\">*</span>\n <span *ngIf=\"error\" class=\"c-label__sub_is-error\">{{error}}</span>\n <span\n *ngIf=\"maxlength && value && value.length && value.length >= maxlength\"\n class=\"constraints-message__warning u-text_uppercase\">\n {{'maxlength: ' | translate}} {{maxlength}}</span>\n </span>\n <div class=\"input-wrapper u-margin-right-tiny\" [ngClass]=\"{'u-margin-right-tiny': right}\">\n <input (blur)=\"this.blur.emit($event)\"\n (change)=\"onChange($event)\"\n (focus)=\"this.focus.emit($event)\"\n (input)=\"onChange($event)\"\n [(ngModel)]=\"value\"\n [autocomplete]=\"autocomplete? 'on':'off'\"\n [disabled]=\"disabled\"\n [id]=\"id\"\n [maxlength]=\"maxlength\"\n [name]=\"name\"\n [ngClass]=\"{'c-input_opaque' : opacity === false,\n 'c-input_shadowed' : shadow,\n 'c-input_large' : large,\n 'c-input_small' : small,\n 'c-input_margin_padding': widget,\n 'c-input_padding_right': forms}\"\n [ngModelOptions]=\"{standalone: true}\"\n [placeholder]=\"placeholder\"\n [required]=\"required\"\n [size]=\"size\"\n [min]=\"min\"\n [max]=\"max\"\n [step]=\"step\"\n class=\"search-box c-input field_{{id}}\"\n [type]=\"type\">\n <button (click)=\"clear()\"\n class=\"button-reset empty\"\n [ngClass]=\"{empty: display}\"\n type=\"submit\"\n [attr.title]=\"'Reset' | translate\">\n <i class=\"fa fa-close\"></i>\n </button>\n </div>\n</label>\n",
886
- providers: [
887
- {
888
- provide: NG_VALUE_ACCESSOR,
889
- useExisting: forwardRef(function () { return InputTextComponent_1; }),
890
- multi: true,
891
- }
892
- ],
893
- styles: ["@charset \"UTF-8\";.label{display:inline-block;margin-bottom:0}.c-input{height:36px;width:100%}.c-input_opaque{background:var(--colorBgLevel3)}.c-input_shadowed{box-shadow:0 2px 6px 0 rgba(0,0,0,.2)}.constraints-message__warning{color:red}.button-reset{display:flex;align-items:center;position:absolute;right:6px;top:5px;padding:6px;font-size:15px;border:none;outline:0;cursor:pointer;color:var(--colorTextMuted);background-color:transparent}.button-reset:hover{color:var(--ids-theme-btn-default-color,#fff)}.empty{display:none}.input-wrapper{position:relative;display:flex;align-items:baseline}.c-input:not(:valid)~.button-reset{display:none}.c-input_margin_padding{margin-left:56px;padding-right:10px;max-width:1200px}.c-input_padding_right{padding-right:28px}"]
894
- })
895
- ], InputTextComponent);
896
- return InputTextComponent;
897
- }());
898
-
899
- var TextareaComponent = /** @class */ (function () {
900
- function TextareaComponent() {
901
- this.name = null;
902
- this.label = null;
903
- this.required = false;
904
- this.error = null;
905
- this.placeholder = '';
906
- this.id = null;
907
- this.minHeight = 30;
908
- this.maxlength = 100000;
909
- this.propagateChange = function (_) {
910
- };
911
- }
912
- TextareaComponent_1 = TextareaComponent;
913
- /**
914
- * Write form value to the DOM element (model => view)
915
- */
916
- TextareaComponent.prototype.writeValue = function (value) {
917
- this.value = value;
918
- };
919
- /**
920
- * Write form disabled state to the DOM element (model => view)
921
- */
922
- TextareaComponent.prototype.setDisabledState = function (isDisabled) {
923
- this.disabled = isDisabled;
924
- };
925
- /**
926
- * Update form when DOM element value changes (view => model)
927
- */
928
- TextareaComponent.prototype.registerOnChange = function (fn) {
929
- // Store the provided function as an internal method.
930
- this.propagateChange = fn;
931
- };
932
- /**
933
- * Update form when DOM element is blurred (view => model)
934
- */
935
- TextareaComponent.prototype.registerOnTouched = function (fn) {
936
- // Store the provided function as an internal method.
937
- this.onTouched = fn;
938
- };
939
- TextareaComponent.prototype.onChange = function (_) {
940
- this.propagateChange(this.value);
941
- };
942
- TextareaComponent.prototype.onTouched = function () {
943
- };
944
- var TextareaComponent_1;
945
- __decorate([
946
- Input(),
947
- __metadata("design:type", Object)
948
- ], TextareaComponent.prototype, "name", void 0);
949
- __decorate([
950
- Input(),
951
- __metadata("design:type", Object)
952
- ], TextareaComponent.prototype, "label", void 0);
953
- __decorate([
954
- Input(),
955
- __metadata("design:type", Object)
956
- ], TextareaComponent.prototype, "required", void 0);
957
- __decorate([
958
- Input(),
959
- __metadata("design:type", Object)
960
- ], TextareaComponent.prototype, "error", void 0);
961
- __decorate([
962
- Input(),
963
- __metadata("design:type", Object)
964
- ], TextareaComponent.prototype, "placeholder", void 0);
965
- __decorate([
966
- Input(),
967
- __metadata("design:type", Object)
968
- ], TextareaComponent.prototype, "id", void 0);
969
- __decorate([
970
- Input(),
971
- __metadata("design:type", Boolean)
972
- ], TextareaComponent.prototype, "disabled", void 0);
973
- __decorate([
974
- Input(),
975
- __metadata("design:type", Object)
976
- ], TextareaComponent.prototype, "minHeight", void 0);
977
- __decorate([
978
- Input(),
979
- __metadata("design:type", Object)
980
- ], TextareaComponent.prototype, "maxlength", void 0);
981
- TextareaComponent = TextareaComponent_1 = __decorate([
982
- Component({
983
- selector: 'in-textarea',
984
- template: "<label class=\"c-label\">\n <span *ngIf=\"label\" class=\"c-label__content\">\n {{label}}\n <span *ngIf=\"required\" class=\"c-label__req\">*</span>\n<span *ngIf=\"error\" class=\"c-label__sub_is-error\">{{error}}</span>\n </span>\n <textarea (change)=\"onChange($event)\"\n (input)=\"onChange($event)\"\n [(ngModel)]=\"value\"\n [disabled]=\"disabled\"\n [id]=\"id\"\n [name]=\"name\"\n [ngStyle]=\"{ 'min-height': minHeight+'px' }\"\n [placeholder]=\"placeholder\"\n [required]=\"required\"\n class=\"c-textarea field_{{id}}\"\n type=\"text\"\n ></textarea>\n</label>\n",
985
- providers: [
986
- {
987
- provide: NG_VALUE_ACCESSOR,
988
- useExisting: forwardRef(function () { return TextareaComponent_1; }),
989
- multi: true,
990
- }
991
- ],
992
- styles: [""]
993
- })
994
- ], TextareaComponent);
995
- return TextareaComponent;
996
- }());
997
-
998
- var PanelComponent = /** @class */ (function () {
999
- function PanelComponent() {
1000
- }
1001
- PanelComponent = __decorate([
1002
- Component({
1003
- selector: 'in-panel',
1004
- template: "<div class=\"c-panel inspark-panel\">\n <ng-content></ng-content>\n</div>\n",
1005
- styles: [".inspark-panel{padding:8px}"]
1006
- })
1007
- ], PanelComponent);
1008
- return PanelComponent;
1009
- }());
1010
-
1011
- var ComponentContainerComponent = /** @class */ (function () {
1012
- function ComponentContainerComponent() {
1013
- this.align = 'left';
1014
- }
1015
- __decorate([
1016
- Input(),
1017
- __metadata("design:type", String)
1018
- ], ComponentContainerComponent.prototype, "align", void 0);
1019
- ComponentContainerComponent = __decorate([
1020
- Component({
1021
- selector: 'in-component-container',
1022
- template: "<div [ngClass]=\"align\" class=\"inspark-component-container\">\n <ng-content></ng-content>\n</div>\n",
1023
- styles: ["@charset \"UTF-8\";.inspark-component-container{display:flex}@media screen and (min-width:480px){.inspark-component-container{padding-bottom:0}}:host ::ng-deep in-button{margin-right:8px}:host ::ng-deep in-button:last-child{margin-right:0}:host ::ng-deep in-link{margin-right:8px}:host ::ng-deep in-link:last-child{margin-right:0}.right{justify-content:flex-end}"]
1024
- })
1025
- ], ComponentContainerComponent);
1026
- return ComponentContainerComponent;
1027
- }());
1028
-
1029
- var CheckboxComponent = /** @class */ (function () {
1030
- function CheckboxComponent(element, cdRef, router) {
1031
- this.element = element;
1032
- this.cdRef = cdRef;
1033
- this.router = router;
1034
- this.name = null;
1035
- this.label = null;
1036
- this.required = false;
1037
- this.error = null;
1038
- this.placeholder = '';
1039
- this.id = null;
1040
- this.propagateChange = function (_) {
1041
- };
1042
- }
1043
- CheckboxComponent_1 = CheckboxComponent;
1044
- /**
1045
- * Write form value to the DOM element (model => view)
1046
- */
1047
- CheckboxComponent.prototype.writeValue = function (value) {
1048
- this.value = value;
1049
- if (!this.cdRef['destroyed']) {
1050
- this.cdRef.detectChanges();
1051
- }
1052
- };
1053
- /**
1054
- * Write form disabled state to the DOM element (model => view)
1055
- */
1056
- CheckboxComponent.prototype.setDisabledState = function (isDisabled) {
1057
- this.disabled = isDisabled;
1058
- };
1059
- /**
1060
- * Update form when DOM element value changes (view => model)
1061
- */
1062
- CheckboxComponent.prototype.registerOnChange = function (fn) {
1063
- // Store the provided function as an internal method.
1064
- this.propagateChange = fn;
1065
- };
1066
- /**
1067
- * Update form when DOM element is blurred (view => model)
1068
- */
1069
- CheckboxComponent.prototype.registerOnTouched = function (fn) {
1070
- // Store the provided function as an internal method.
1071
- this.onTouched = fn;
1072
- };
1073
- CheckboxComponent.prototype.onChange = function (_) {
1074
- this.propagateChange(this.value);
1075
- };
1076
- CheckboxComponent.prototype.onTouched = function () {
1077
- };
1078
- var CheckboxComponent_1;
1079
- CheckboxComponent.ctorParameters = function () { return [
1080
- { type: ElementRef },
1081
- { type: ChangeDetectorRef },
1082
- { type: Router }
1083
- ]; };
1084
- __decorate([
1085
- Input(),
1086
- __metadata("design:type", Object)
1087
- ], CheckboxComponent.prototype, "name", void 0);
1088
- __decorate([
1089
- Input(),
1090
- __metadata("design:type", Object)
1091
- ], CheckboxComponent.prototype, "label", void 0);
1092
- __decorate([
1093
- Input(),
1094
- __metadata("design:type", Object)
1095
- ], CheckboxComponent.prototype, "required", void 0);
1096
- __decorate([
1097
- Input(),
1098
- __metadata("design:type", Object)
1099
- ], CheckboxComponent.prototype, "error", void 0);
1100
- __decorate([
1101
- Input(),
1102
- __metadata("design:type", Object)
1103
- ], CheckboxComponent.prototype, "placeholder", void 0);
1104
- __decorate([
1105
- Input(),
1106
- __metadata("design:type", Object)
1107
- ], CheckboxComponent.prototype, "id", void 0);
1108
- __decorate([
1109
- Input(),
1110
- __metadata("design:type", Boolean)
1111
- ], CheckboxComponent.prototype, "disabled", void 0);
1112
- CheckboxComponent = CheckboxComponent_1 = __decorate([
1113
- Component({
1114
- selector: 'in-checkbox',
1115
- template: "<label class=\"c-checkbox\">\n <input (change)=\"onChange($event)\" (input)=\"onChange($event)\"\n (ngModelChange)=\"onChange(value)\"\n [(ngModel)]=\"value\"\n [disabled]=\"disabled\"\n class=\"c-checkbox__input field_{{id}}\"\n name=\"element_name\"\n type=\"checkbox\"/>\n <i class=\"c-checkbox__icon\"></i>\n <span *ngIf=\"label\" class=\"label\">{{ label }}</span>\n <span class=\"label\"><ng-content></ng-content></span>\n</label>\n",
1116
- providers: [
1117
- {
1118
- provide: NG_VALUE_ACCESSOR,
1119
- useExisting: forwardRef(function () { return CheckboxComponent_1; }),
1120
- multi: true,
1121
- }
1122
- ],
1123
- styles: [":host{width:100%}.c-checkbox{margin:0;display:flex;min-width:100%;align-items:center;padding:8px}.c-checkbox .c-checkbox__input+.c-checkbox__icon{padding-left:20px;top:0}.c-checkbox .label{display:flex;align-items:center}.c-checkbox .label:not(:empty){display:inline-flex;padding-left:8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}"]
1124
- }),
1125
- __metadata("design:paramtypes", [ElementRef, ChangeDetectorRef, Router])
1126
- ], CheckboxComponent);
1127
- return CheckboxComponent;
1128
- }());
1129
-
1130
- var PrimengComponentsModule = /** @class */ (function () {
1131
- function PrimengComponentsModule() {
1132
- }
1133
- PrimengComponentsModule = __decorate([
1134
- NgModule({
1135
- imports: [
1136
- DropdownModule,
1137
- ],
1138
- declarations: [],
1139
- exports: [
1140
- DropdownModule
1141
- ],
1142
- entryComponents: []
1143
- })
1144
- ], PrimengComponentsModule);
1145
- return PrimengComponentsModule;
1146
- }());
1147
-
1148
- var DropdownItem = /** @class */ (function () {
1149
- function DropdownItem() {
1150
- this.onClick = new EventEmitter();
1151
- }
1152
- DropdownItem.prototype.onOptionClick = function (event) {
1153
- this.onClick.emit({
1154
- originalEvent: event,
1155
- option: this.option
1156
- });
1157
- };
1158
- __decorate([
1159
- Input(),
1160
- __metadata("design:type", Object)
1161
- ], DropdownItem.prototype, "option", void 0);
1162
- __decorate([
1163
- Input(),
1164
- __metadata("design:type", Boolean)
1165
- ], DropdownItem.prototype, "selected", void 0);
1166
- __decorate([
1167
- Input(),
1168
- __metadata("design:type", Boolean)
1169
- ], DropdownItem.prototype, "disabled", void 0);
1170
- __decorate([
1171
- Input(),
1172
- __metadata("design:type", Boolean)
1173
- ], DropdownItem.prototype, "visible", void 0);
1174
- __decorate([
1175
- Input(),
1176
- __metadata("design:type", Number)
1177
- ], DropdownItem.prototype, "itemSize", void 0);
1178
- __decorate([
1179
- Input(),
1180
- __metadata("design:type", TemplateRef)
1181
- ], DropdownItem.prototype, "template", void 0);
1182
- __decorate([
1183
- Output(),
1184
- __metadata("design:type", EventEmitter)
1185
- ], DropdownItem.prototype, "onClick", void 0);
1186
- DropdownItem = __decorate([
1187
- Component({
1188
- selector: 'p-dropdownItem',
1189
- template: "\n <li (click)=\"onOptionClick($event)\" role=\"option\"\n [attr.aria-label]=\"option.label\"\n [attr.title]=\"option.label\"\n [ngStyle]=\"{'height': itemSize + 'px'}\"\n [ngClass]=\"{'ui-dropdown-item ui-corner-all':true,\n 'ui-state-highlight': selected,\n 'ui-state-disabled':(option.disabled),\n 'ui-dropdown-item-empty': !option.label||option.label.length === 0}\">\n <span *ngIf=\"!template\">{{option.label || 'empty'}}</span>\n <ng-container *ngTemplateOutlet=\"template; context: {$implicit: option}\"></ng-container>\n </li>\n "
1190
- })
1191
- ], DropdownItem);
1192
- return DropdownItem;
1193
- }());
1194
- var DropdownComponent = /** @class */ (function (_super) {
1195
- __extends(DropdownComponent, _super);
1196
- function DropdownComponent() {
1197
- var _this = _super !== null && _super.apply(this, arguments) || this;
1198
- _this.scrollHeight = '200px';
1199
- _this.filterBy = 'label';
1200
- _this.resetFilterOnHide = false;
1201
- _this.dropdownIcon = 'pi pi-chevron-down';
1202
- _this.autoDisplayFirst = true;
1203
- _this.emptyFilterMessage = 'No results found';
1204
- _this.autoZIndex = true;
1205
- _this.baseZIndex = 0;
1206
- _this.showTransitionOptions = '0ms';
1207
- _this.hideTransitionOptions = '0ms';
1208
- _this.filterMatchMode = 'contains';
1209
- _this.tooltip = '';
1210
- _this.error = null;
1211
- _this.tooltipPosition = 'right';
1212
- _this.tooltipPositionStyle = 'absolute';
1213
- _this.onChange = new EventEmitter();
1214
- _this.onFocus = new EventEmitter();
1215
- _this.onBlur = new EventEmitter();
1216
- _this.onClick = new EventEmitter();
1217
- _this.onShow = new EventEmitter();
1218
- _this.onHide = new EventEmitter();
1219
- _this._label = '';
1220
- return _this;
1221
- }
1222
- DropdownComponent_1 = DropdownComponent;
1223
- Object.defineProperty(DropdownComponent.prototype, "label", {
1224
- get: function () {
1225
- return this._label;
1226
- },
1227
- set: function (val) {
1228
- this._label = val;
1229
- },
1230
- enumerable: true,
1231
- configurable: true
1232
- });
1233
- Object.defineProperty(DropdownComponent.prototype, "labelText", {
1234
- get: function () {
1235
- return (this.selectedOption ? this.selectedOption.label : null);
1236
- },
1237
- enumerable: true,
1238
- configurable: true
1239
- });
1240
- var DropdownComponent_1;
1241
- __decorate([
1242
- Input(),
1243
- __metadata("design:type", Object)
1244
- ], DropdownComponent.prototype, "scrollHeight", void 0);
1245
- __decorate([
1246
- Input(),
1247
- __metadata("design:type", Boolean)
1248
- ], DropdownComponent.prototype, "filter", void 0);
1249
- __decorate([
1250
- Input(),
1251
- __metadata("design:type", String)
1252
- ], DropdownComponent.prototype, "name", void 0);
1253
- __decorate([
1254
- Input(),
1255
- __metadata("design:type", Number)
1256
- ], DropdownComponent.prototype, "defaultValue", void 0);
1257
- __decorate([
1258
- Input(),
1259
- __metadata("design:type", Object)
1260
- ], DropdownComponent.prototype, "style", void 0);
1261
- __decorate([
1262
- Input(),
1263
- __metadata("design:type", Object)
1264
- ], DropdownComponent.prototype, "panelStyle", void 0);
1265
- __decorate([
1266
- Input(),
1267
- __metadata("design:type", String)
1268
- ], DropdownComponent.prototype, "styleClass", void 0);
1269
- __decorate([
1270
- Input(),
1271
- __metadata("design:type", String)
1272
- ], DropdownComponent.prototype, "panelStyleClass", void 0);
1273
- __decorate([
1274
- Input(),
1275
- __metadata("design:type", Boolean)
1276
- ], DropdownComponent.prototype, "readonly", void 0);
1277
- __decorate([
1278
- Input(),
1279
- __metadata("design:type", Boolean)
1280
- ], DropdownComponent.prototype, "required", void 0);
1281
- __decorate([
1282
- Input(),
1283
- __metadata("design:type", Boolean)
1284
- ], DropdownComponent.prototype, "editable", void 0);
1285
- __decorate([
1286
- Input(),
1287
- __metadata("design:type", Object)
1288
- ], DropdownComponent.prototype, "appendTo", void 0);
1289
- __decorate([
1290
- Input(),
1291
- __metadata("design:type", Number)
1292
- ], DropdownComponent.prototype, "tabindex", void 0);
1293
- __decorate([
1294
- Input(),
1295
- __metadata("design:type", String)
1296
- ], DropdownComponent.prototype, "placeholder", void 0);
1297
- __decorate([
1298
- Input(),
1299
- __metadata("design:type", String)
1300
- ], DropdownComponent.prototype, "filterPlaceholder", void 0);
1301
- __decorate([
1302
- Input(),
1303
- __metadata("design:type", String)
1304
- ], DropdownComponent.prototype, "inputId", void 0);
1305
- __decorate([
1306
- Input(),
1307
- __metadata("design:type", String)
1308
- ], DropdownComponent.prototype, "selectId", void 0);
1309
- __decorate([
1310
- Input(),
1311
- __metadata("design:type", String)
1312
- ], DropdownComponent.prototype, "dataKey", void 0);
1313
- __decorate([
1314
- Input(),
1315
- __metadata("design:type", Object)
1316
- ], DropdownComponent.prototype, "filterBy", void 0);
1317
- __decorate([
1318
- Input(),
1319
- __metadata("design:type", Boolean)
1320
- ], DropdownComponent.prototype, "autofocus", void 0);
1321
- __decorate([
1322
- Input(),
1323
- __metadata("design:type", Object)
1324
- ], DropdownComponent.prototype, "resetFilterOnHide", void 0);
1325
- __decorate([
1326
- Input(),
1327
- __metadata("design:type", Object)
1328
- ], DropdownComponent.prototype, "dropdownIcon", void 0);
1329
- __decorate([
1330
- Input(),
1331
- __metadata("design:type", String)
1332
- ], DropdownComponent.prototype, "optionLabel", void 0);
1333
- __decorate([
1334
- Input(),
1335
- __metadata("design:type", Object)
1336
- ], DropdownComponent.prototype, "autoDisplayFirst", void 0);
1337
- __decorate([
1338
- Input(),
1339
- __metadata("design:type", Boolean)
1340
- ], DropdownComponent.prototype, "group", void 0);
1341
- __decorate([
1342
- Input(),
1343
- __metadata("design:type", Boolean)
1344
- ], DropdownComponent.prototype, "showClear", void 0);
1345
- __decorate([
1346
- Input(),
1347
- __metadata("design:type", Object)
1348
- ], DropdownComponent.prototype, "emptyFilterMessage", void 0);
1349
- __decorate([
1350
- Input(),
1351
- __metadata("design:type", Boolean)
1352
- ], DropdownComponent.prototype, "virtualScroll", void 0);
1353
- __decorate([
1354
- Input(),
1355
- __metadata("design:type", Number)
1356
- ], DropdownComponent.prototype, "itemSize", void 0);
1357
- __decorate([
1358
- Input(),
1359
- __metadata("design:type", Object)
1360
- ], DropdownComponent.prototype, "autoZIndex", void 0);
1361
- __decorate([
1362
- Input(),
1363
- __metadata("design:type", Object)
1364
- ], DropdownComponent.prototype, "baseZIndex", void 0);
1365
- __decorate([
1366
- Input(),
1367
- __metadata("design:type", Object)
1368
- ], DropdownComponent.prototype, "showTransitionOptions", void 0);
1369
- __decorate([
1370
- Input(),
1371
- __metadata("design:type", Object)
1372
- ], DropdownComponent.prototype, "hideTransitionOptions", void 0);
1373
- __decorate([
1374
- Input(),
1375
- __metadata("design:type", String)
1376
- ], DropdownComponent.prototype, "ariaFilterLabel", void 0);
1377
- __decorate([
1378
- Input(),
1379
- __metadata("design:type", Object)
1380
- ], DropdownComponent.prototype, "filterMatchMode", void 0);
1381
- __decorate([
1382
- Input(),
1383
- __metadata("design:type", Number)
1384
- ], DropdownComponent.prototype, "maxlength", void 0);
1385
- __decorate([
1386
- Input(),
1387
- __metadata("design:type", Object)
1388
- ], DropdownComponent.prototype, "tooltip", void 0);
1389
- __decorate([
1390
- Input(),
1391
- __metadata("design:type", Array)
1392
- ], DropdownComponent.prototype, "options", void 0);
1393
- __decorate([
1394
- Input(),
1395
- __metadata("design:type", Object)
1396
- ], DropdownComponent.prototype, "error", void 0);
1397
- __decorate([
1398
- Input(),
1399
- __metadata("design:type", Object)
1400
- ], DropdownComponent.prototype, "tooltipPosition", void 0);
1401
- __decorate([
1402
- Input(),
1403
- __metadata("design:type", Object)
1404
- ], DropdownComponent.prototype, "tooltipPositionStyle", void 0);
1405
- __decorate([
1406
- Input(),
1407
- __metadata("design:type", String)
1408
- ], DropdownComponent.prototype, "tooltipStyleClass", void 0);
1409
- __decorate([
1410
- Output(),
1411
- __metadata("design:type", EventEmitter)
1412
- ], DropdownComponent.prototype, "onChange", void 0);
1413
- __decorate([
1414
- Output(),
1415
- __metadata("design:type", EventEmitter)
1416
- ], DropdownComponent.prototype, "onFocus", void 0);
1417
- __decorate([
1418
- Output(),
1419
- __metadata("design:type", EventEmitter)
1420
- ], DropdownComponent.prototype, "onBlur", void 0);
1421
- __decorate([
1422
- Output(),
1423
- __metadata("design:type", EventEmitter)
1424
- ], DropdownComponent.prototype, "onClick", void 0);
1425
- __decorate([
1426
- Output(),
1427
- __metadata("design:type", EventEmitter)
1428
- ], DropdownComponent.prototype, "onShow", void 0);
1429
- __decorate([
1430
- Output(),
1431
- __metadata("design:type", EventEmitter)
1432
- ], DropdownComponent.prototype, "onHide", void 0);
1433
- __decorate([
1434
- Input(),
1435
- __metadata("design:type", String),
1436
- __metadata("design:paramtypes", [Object])
1437
- ], DropdownComponent.prototype, "label", null);
1438
- DropdownComponent = DropdownComponent_1 = __decorate([
1439
- Component({
1440
- selector: 'in-dropdown',
1441
- template: "<span *ngIf=\"label\" class=\"c-label__content\">\n {{label}}\n <span *ngIf=\"required\" class=\"c-label__req\">*</span>\n<span *ngIf=\"error\" class=\"c-label__sub_is-error\">{{error}}</span>\n </span>\n<div #container (click)=\"onMouseclick($event)\"\n [class]=\"styleClass\" [ngClass]=\"{'ui-dropdown ui-widget ui-state-default ui-corner-all ui-helper-clearfix':true,\n 'ui-state-disabled':disabled, 'ui-dropdown-open':overlayVisible, 'ui-state-focus':focused, 'ui-dropdown-clearable': showClear && !disabled}\" [ngStyle]=\"style\">\n <div class=\"ui-helper-hidden-accessible\">\n <input #in (blur)=\"onInputBlur($event)\" (focus)=\"onInputFocus($event)\" (keydown)=\"onKeydown($event, true)\"\n [attr.aria-label]=\"selectedOption ? selectedOption.label : ' '\" [attr.autofocus]=\"autofocus\" [attr.id]=\"inputId\"\n [attr.tabindex]=\"tabindex\" [disabled]=\"disabled\" aria-haspopup=\"listbox\"\n readonly type=\"text\">\n </div>\n <div class=\"ui-helper-hidden-accessible ui-dropdown-hidden-select\">\n <select [attr.name]=\"name\" [attr.required]=\"required\" aria-hidden=\"true\" tabindex=\"-1\">\n <option *ngIf=\"placeholder\" value=\"\">{{placeholder}}</option>\n <option *ngIf=\"selectedOption\" [selected]=\"true\"\n [value]=\"selectedOption.value\">{{selectedOption.label}}</option>\n </select>\n </div>\n <div [pTooltip]=\"tooltip\" [positionStyle]=\"tooltipPositionStyle\" [tooltipPosition]=\"tooltipPosition\"\n [tooltipStyleClass]=\"tooltipStyleClass\" class=\"ui-dropdown-label-container\">\n <label\n *ngIf=\"!editable && (labelText != null)\"\n [attr.title]=\"labelText ? (labelText | translate) : null\"\n [ngClass]=\"{'ui-dropdown-label ui-inputtext ui-corner-all':true,'ui-dropdown-label-empty':(labelText == null || labelText.length === 0)}\">\n <ng-container *ngIf=\"!selectedItemTemplate\">{{labelText || 'empty'}}</ng-container>\n <ng-container *ngTemplateOutlet=\"selectedItemTemplate; context: {$implicit: selectedOption}\"></ng-container>\n </label>\n <label\n *ngIf=\"!editable && (labelText == null)\"\n [ngClass]=\"{'ui-dropdown-label ui-inputtext ui-corner-all ui-placeholder':true,'ui-dropdown-label-empty': (placeholder == null || placeholder.length === 0)}\">{{placeholder || 'empty'}}</label>\n <input #editableInput (blur)=\"onInputBlur($event)\" (click)=\"onEditableInputClick($event)\"\n (focus)=\"onEditableInputFocus($event)\"\n (input)=\"onEditableInputChange($event)\" *ngIf=\"editable\" [attr.aria-label]=\"selectedOption ? selectedOption.label : ' '\"\n [attr.maxlength]=\"maxlength\"\n [attr.placeholder]=\"placeholder\" [disabled]=\"disabled\"\n class=\"ui-dropdown-label ui-inputtext ui-corner-all\" type=\"text\">\n <i (click)=\"clear($event)\" *ngIf=\"value != null && showClear && !disabled\"\n class=\"ui-dropdown-clear-icon pi pi-times\"></i>\n </div>\n <div class=\"ui-dropdown-trigger ui-state-default ui-corner-right\">\n <span [ngClass]=\"dropdownIcon\" class=\"ui-dropdown-trigger-icon ui-clickable\"></span>\n </div>\n <div (@overlayAnimation.start)=\"onOverlayAnimationStart($event)\" *ngIf=\"overlayVisible\"\n [@overlayAnimation]=\"{value: 'visible', params: {showTransitionParams: showTransitionOptions, hideTransitionParams: hideTransitionOptions}}\"\n [class]=\"panelStyleClass\"\n [ngClass]=\"'ui-dropdown-panel ui-widget ui-widget-content ui-corner-all ui-shadow'\"\n [ngStyle]=\"panelStyle\"\n [attr.virtual-scroll]=\"virtualScroll ? 'true' : null\">\n <div (click)=\"$event.stopPropagation()\" *ngIf=\"filter\" class=\"ui-dropdown-filter-container\">\n <input #filter (input)=\"onFilter($event)\" (keydown)=\"onKeydown($event, false)\" (keydown.enter)=\"$event.preventDefault()\"\n [attr.aria-label]=\"ariaFilterLabel\"\n [attr.placeholder]=\"filterPlaceholder\"\n [value]=\"filterValue||''\" autocomplete=\"off\"\n class=\"ui-dropdown-filter ui-inputtext ui-widget ui-state-default ui-corner-all\" type=\"text\">\n <span class=\"ui-dropdown-filter-icon pi pi-search\"></span>\n </div>\n <div [style.max-height]=\"virtualScroll ? 'auto' : (scrollHeight||'auto')\" class=\"ui-dropdown-items-wrapper\">\n <ul class=\"ui-dropdown-items ui-dropdown-list ui-widget-content ui-widget ui-corner-all ui-helper-reset\"\n role=\"listbox\">\n <ng-container *ngIf=\"group\">\n <ng-template [ngForOf]=\"optionsToDisplay\" let-optgroup ngFor>\n <li class=\"ui-dropdown-item-group\">\n <span *ngIf=\"!groupTemplate\">{{optgroup.label || ''}}</span>\n <ng-container\n *ngTemplateOutlet=\"groupTemplate; context: {$implicit: optgroup}\"></ng-container>\n </li>\n <ng-container\n *ngTemplateOutlet=\"itemslist; context: {$implicit: optgroup.items, selectedOption: selectedOption}\"></ng-container>\n </ng-template>\n </ng-container>\n <ng-container *ngIf=\"!group\">\n <ng-container\n *ngTemplateOutlet=\"itemslist; context: {$implicit: optionsToDisplay, selectedOption: selectedOption}\"></ng-container>\n </ng-container>\n <ng-template #itemslist let-options let-selectedOption=\"selectedOption\">\n <ng-container *ngIf=\"!virtualScroll; else virtualScrollList\">\n <ng-template [ngForOf]=\"options\" let-i=\"index\" let-option ngFor>\n <p-dropdownItem (onClick)=\"onItemClick($event)\" [option]=\"option\"\n [selected]=\"selectedOption == option\"\n [template]=\"itemTemplate\"></p-dropdownItem>\n </ng-template>\n </ng-container>\n <ng-template #virtualScrollList>\n <cdk-virtual-scroll-viewport #viewport\n (scrolledIndexChange)=\"scrollToSelectedVirtualScrollElement()\" *ngIf=\"virtualScroll && optionsToDisplay && optionsToDisplay.length\"\n [itemSize]=\"itemSize\"\n [ngStyle]=\"{'height': scrollHeight}\">\n <ng-container\n *cdkVirtualFor=\"let option of options; let i = index; let c = count; let f = first; let l = last; let e = even; let o = odd\">\n <p-dropdownItem (onClick)=\"onItemClick($event)\" [option]=\"option\"\n [attr.title]=\"option.label\"\n [selected]=\"selectedOption == option\"\n [template]=\"itemTemplate\"></p-dropdownItem>\n </ng-container>\n </cdk-virtual-scroll-viewport>\n </ng-template>\n </ng-template>\n <li *ngIf=\"filter && optionsToDisplay && optionsToDisplay.length === 0\"\n class=\"ui-dropdown-empty-message\">{{emptyFilterMessage}}</li>\n </ul>\n </div>\n </div>\n</div>\n",
1442
- animations: [
1443
- trigger('overlayAnimation', [
1444
- state('void', style({
1445
- transform: 'translateY(5%)',
1446
- opacity: 0
1447
- })),
1448
- state('visible', style({
1449
- transform: 'translateY(0)',
1450
- opacity: 1
1451
- })),
1452
- transition('void => visible', animate('{{showTransitionParams}}')),
1453
- transition('visible => void', animate('{{hideTransitionParams}}'))
1454
- ])
1455
- ],
1456
- providers: [{
1457
- provide: NG_VALUE_ACCESSOR,
1458
- useExisting: forwardRef(function () { return DropdownComponent_1; }),
1459
- multi: true
1460
- }],
1461
- styles: [""]
1462
- })
1463
- ], DropdownComponent);
1464
- return DropdownComponent;
1465
- }(Dropdown));
1466
- var DropdownComponentModule = /** @class */ (function () {
1467
- function DropdownComponentModule() {
1468
- }
1469
- DropdownComponentModule = __decorate([
1470
- NgModule({
1471
- declarations: [
1472
- DropdownComponent,
1473
- DropdownItem,
1474
- ],
1475
- imports: [
1476
- TooltipModule,
1477
- ScrollingModule,
1478
- CommonModule,
1479
- PrimengComponentsModule,
1480
- TranslateModule,
1481
- ],
1482
- exports: [
1483
- DropdownComponent,
1484
- ],
1485
- entryComponents: [
1486
- DropdownComponent,
1487
- ]
1488
- })
1489
- ], DropdownComponentModule);
1490
- return DropdownComponentModule;
1491
- }());
1492
-
1493
- var InsparkTemplate = /** @class */ (function () {
1494
- function InsparkTemplate(template) {
1495
- this.template = template;
1496
- }
1497
- InsparkTemplate.prototype.getType = function () {
1498
- return this.name;
1499
- };
1500
- InsparkTemplate.ctorParameters = function () { return [
1501
- { type: TemplateRef }
1502
- ]; };
1503
- __decorate([
1504
- Input(),
1505
- __metadata("design:type", String)
1506
- ], InsparkTemplate.prototype, "type", void 0);
1507
- __decorate([
1508
- Input('inTemplate'),
1509
- __metadata("design:type", String)
1510
- ], InsparkTemplate.prototype, "name", void 0);
1511
- InsparkTemplate = __decorate([
1512
- Directive({
1513
- selector: '[inTemplate]',
1514
- host: {}
1515
- }),
1516
- __metadata("design:paramtypes", [TemplateRef])
1517
- ], InsparkTemplate);
1518
- return InsparkTemplate;
1519
- }());
1520
-
1521
- var TableColumnsMultiselectComponent = /** @class */ (function () {
1522
- function TableColumnsMultiselectComponent() {
1523
- this.isExpanded = false;
1524
- /**
1525
- * true - все активные чекбоксы становятся неактивными
1526
- * false - не влияет на чекбоксы
1527
- */
1528
- this.disableActiveCheckboxes = false;
1529
- this.columnsChange = new EventEmitter();
1530
- }
1531
- TableColumnsMultiselectComponent.prototype.ngOnInit = function () {
1532
- };
1533
- __decorate([
1534
- Input(),
1535
- __metadata("design:type", Array)
1536
- ], TableColumnsMultiselectComponent.prototype, "columns", void 0);
1537
- __decorate([
1538
- Input(),
1539
- __metadata("design:type", Object)
1540
- ], TableColumnsMultiselectComponent.prototype, "disableActiveCheckboxes", void 0);
1541
- __decorate([
1542
- Output(),
1543
- __metadata("design:type", Object)
1544
- ], TableColumnsMultiselectComponent.prototype, "columnsChange", void 0);
1545
- TableColumnsMultiselectComponent = __decorate([
1546
- Component({
1547
- selector: 'in-table-columns-multiselect',
1548
- template: "<in-table-menu-overlay [isExpanded]=\"isExpanded\">\n <ng-container ngProjectAs=\"host\">\n <button class=\"c-btn c-btn_border-free c-btn_small\">\n <i [title]=\"('column switch' | translate)\" class=\"fa fa-cog\"></i><i class=\"c-caret\"></i>\n </button>\n\n </ng-container>\n <ng-container ngProjectAs=\"body\">\n <ul class=\"o-list\">\n <li *ngFor=\"let column of columns\" class=\"c-dropdown-menu__listitem\" role=\"menuitem\">\n <div class=\"c-dropdown-menu__content\">\n <label class=\"c-checkbox c-checkbox_switch c-checkbox_compact\">\n <input (ngModelChange)=\"columnsChange.emit({event: $event, column: column})\"\n [disabled]=\"(!column.isHidden && disableActiveCheckboxes) || column.isRequired\"\n [ngModel]=\"!column.isHidden \"\n class=\"c-checkbox__input\"\n type=\"checkbox\">\n <i class=\"c-checkbox__icon\"></i>\n <span class=\"c-checkbox__label dropdown-label\">{{column.label | translate}}</span>\n </label>\n </div>\n </li>\n </ul>\n\n </ng-container>\n</in-table-menu-overlay>\n",
1549
- styles: [".dropdown-label{color:var(--text-color)}"]
1550
- }),
1551
- __metadata("design:paramtypes", [])
1552
- ], TableColumnsMultiselectComponent);
1553
- return TableColumnsMultiselectComponent;
1554
- }());
1555
-
1556
- var TableMenuOverlayComponent = /** @class */ (function () {
1557
- function TableMenuOverlayComponent(element) {
1558
- this.element = element;
1559
- this.isExpanded = false;
1560
- }
1561
- TableMenuOverlayComponent.prototype.isClickedOutsideOverlay = function (event) {
1562
- if (!this.element.nativeElement.contains(event.target)) {
1563
- this.isExpanded = false;
1564
- }
1565
- };
1566
- TableMenuOverlayComponent.ctorParameters = function () { return [
1567
- { type: ElementRef }
1568
- ]; };
1569
- __decorate([
1570
- Input(),
1571
- __metadata("design:type", Object)
1572
- ], TableMenuOverlayComponent.prototype, "isExpanded", void 0);
1573
- __decorate([
1574
- Input(),
1575
- __metadata("design:type", String)
1576
- ], TableMenuOverlayComponent.prototype, "positionClass", void 0);
1577
- TableMenuOverlayComponent = __decorate([
1578
- Component({
1579
- selector: 'in-table-menu-overlay',
1580
- template: "<div class=\"c-overlay is-dropdown_open\">\n <div (click)=\"isExpanded = !isExpanded;\"\n class=\"c-overlay__toggle\">\n <ng-content select=\"host\"></ng-content>\n </div>\n <ng-container *ngIf=\"isExpanded\">\n <div (clickedOutside)=\"isClickedOutsideOverlay($event)\" class=\"c-overlay__body\"\n inClickOutside>\n <!--{{positionClass}}-->\n <ng-content select=\"body\"></ng-content>\n </div>\n </ng-container>\n</div>\n",
1581
- changeDetection: ChangeDetectionStrategy.OnPush,
1582
- styles: ["@charset \"UTF-8\";.c-overlay{position:relative;display:inline-block}.c-overlay__toggle{display:inline-block}.c-overlay__body{text-align:left;position:absolute;top:100%;padding:6px 12px;z-index:1050;box-shadow:0 10px 20px rgba(0,0,0,.19),0 6px 6px rgba(0,0,0,.23);max-height:500px;overflow:auto}:host-context(.theme-dark) .c-overlay__body{background-color:#53555c;background-color:var(--ids-theme-color-gray-35,#53555c)}", "@charset \"UTF-8\";:host-context(.theme-contrast) .c-overlay__body{background-color:#ebebeb;background-color:var(--ids-theme-color-gray-5,#ebebeb)}", "@charset \"UTF-8\";:host-context(.theme-light) .c-overlay__body{background-color:#ebebeb;background-color:var(--ids-theme-color-gray-5,#ebebeb)}", "@charset \"UTF-8\";:host-context(.theme-green) .c-overlay__body{background-color:#ebebeb;background-color:var(--ids-theme-color-gray-5,#ebebeb)}", "@charset \"UTF-8\";:host-context(.theme-blue) .c-overlay__body{background-color:#202127;background-color:var(--colorBgLevel1,#202127)}"]
1583
- }),
1584
- __metadata("design:paramtypes", [ElementRef])
1585
- ], TableMenuOverlayComponent);
1586
- return TableMenuOverlayComponent;
1587
- }());
1588
-
1589
- var TableClickOutsideDirective = /** @class */ (function () {
1590
- function TableClickOutsideDirective(element) {
1591
- this.element = element;
1592
- this.clickedOutside = new EventEmitter();
1593
- }
1594
- TableClickOutsideDirective.prototype.click = function (event) {
1595
- if (!this.element.nativeElement.contains(event.target)) {
1596
- // console.log('clicked outside');
1597
- this.clickedOutside.emit(event);
1598
- }
1599
- else {
1600
- // console.log('clicked inside');
1601
- }
1602
- };
1603
- TableClickOutsideDirective.ctorParameters = function () { return [
1604
- { type: ElementRef }
1605
- ]; };
1606
- __decorate([
1607
- Output(),
1608
- __metadata("design:type", Object)
1609
- ], TableClickOutsideDirective.prototype, "clickedOutside", void 0);
1610
- __decorate([
1611
- HostListener('document:click', ['$event']),
1612
- __metadata("design:type", Function),
1613
- __metadata("design:paramtypes", [Object]),
1614
- __metadata("design:returntype", void 0)
1615
- ], TableClickOutsideDirective.prototype, "click", null);
1616
- TableClickOutsideDirective = __decorate([
1617
- Directive({
1618
- selector: '[inClickOutside]'
1619
- }),
1620
- __metadata("design:paramtypes", [ElementRef])
1621
- ], TableClickOutsideDirective);
1622
- return TableClickOutsideDirective;
1623
- }());
1624
-
1625
- // NEW Factory Function
1626
- function tableFactory(wrapper) {
1627
- return wrapper.dt;
1628
- }
1629
- var TableComponent = /** @class */ (function () {
1630
- function TableComponent() {
1631
- this.columns = [];
1632
- this.filteredColumns = [];
1633
- this.globalFilteredColumns = [];
1634
- this.primaryColumns = [];
1635
- this.values = [];
1636
- this.checkboxSelection = true;
1637
- this.showHeader = true;
1638
- this.isMobileView = false;
1639
- this.resizableColumns = true;
1640
- this.isTextSearch = true;
1641
- this.isSortIcon = true;
1642
- this.activeChange = new EventEmitter();
1643
- this.selectionChange = new EventEmitter();
1644
- this.addAction = new EventEmitter();
1645
- this.csvAction = new EventEmitter();
1646
- this.saveAction = new EventEmitter();
1647
- this.removeAction = new EventEmitter();
1648
- this.unlinkAction = new EventEmitter();
1649
- this.linkAction = new EventEmitter();
1650
- this.groupEditAction = new EventEmitter();
1651
- this.paramsEditAction = new EventEmitter();
1652
- this.sortFunction = new EventEmitter();
1653
- this.filterFunction = new EventEmitter();
1654
- this.groupMode = 0;
1655
- this.groupInfo = {};
1656
- this.groupIndex = {};
1657
- this._selection = null;
1658
- }
1659
- TableComponent_1 = TableComponent;
1660
- Object.defineProperty(TableComponent.prototype, "selection", {
1661
- set: function (val) {
1662
- this._selection = val;
1663
- },
1664
- enumerable: true,
1665
- configurable: true
1666
- });
1667
- Object.defineProperty(TableComponent.prototype, "selectionValue", {
1668
- get: function () {
1669
- return this._selection;
1670
- },
1671
- set: function (val) {
1672
- this._selection = val;
1673
- this.selectionChange.emit(val);
1674
- },
1675
- enumerable: true,
1676
- configurable: true
1677
- });
1678
- TableComponent.prototype.isRowActive = function (row) {
1679
- return this.active && this.active.id === row.id;
1680
- };
1681
- TableComponent.prototype.ngOnInit = function () {
1682
- this.updateData();
1683
- };
1684
- TableComponent.prototype.ngAfterViewInit = function () {
1685
- var _this = this;
1686
- Object.entries(this.dt.filters).forEach(function (_a) {
1687
- var _b = __read(_a, 2), key = _b[0], value = _b[1];
1688
- _this.dt.filter('', "" + key, 'contains');
1689
- });
1690
- this.dt.filterGlobal(this.searchText, 'contains');
1691
- };
1692
- TableComponent.prototype.ngOnChanges = function (changes) {
1693
- this.resetColumnWidth();
1694
- this.visibleColumns();
1695
- };
1696
- TableComponent.prototype.updateData = function () {
1697
- this.primaryColumns = this.columns.filter(function (column) { return !column.isSecondary; });
1698
- this.globalFilteredColumns = this.columns.filter(function (column) { return column.isFiltering !== false; }).map(function (val) { return val.field; });
1699
- };
1700
- TableComponent.prototype.ngAfterContentInit = function () {
1701
- var _this = this;
1702
- this.visibleColumns();
1703
- this.restoreSearchText();
1704
- this.templates.forEach(function (item) {
1705
- switch (item.getType()) {
1706
- case 'caption':
1707
- _this.captionTemplate = item.template;
1708
- break;
1709
- case 'header':
1710
- _this.headerTemplate = item.template;
1711
- break;
1712
- case 'body':
1713
- _this.bodyTemplate = item.template;
1714
- break;
1715
- case 'value':
1716
- _this.valueTemplate = item.template;
1717
- break;
1718
- case 'loadingbody':
1719
- _this.loadingBodyTemplate = item.template;
1720
- break;
1721
- case 'footer':
1722
- _this.footerTemplate = item.template;
1723
- break;
1724
- case 'summary':
1725
- _this.summaryTemplate = item.template;
1726
- break;
1727
- case 'colgroup':
1728
- _this.colGroupTemplate = item.template;
1729
- break;
1730
- case 'rowexpansion':
1731
- _this.expandedRowTemplate = item.template;
1732
- break;
1733
- case 'frozenrows':
1734
- _this.frozenRowsTemplate = item.template;
1735
- break;
1736
- case 'frozenheader':
1737
- _this.frozenHeaderTemplate = item.template;
1738
- break;
1739
- case 'frozenbody':
1740
- _this.frozenBodyTemplate = item.template;
1741
- break;
1742
- case 'frozenfooter':
1743
- _this.frozenFooterTemplate = item.template;
1744
- break;
1745
- case 'frozencolgroup':
1746
- _this.frozenColGroupTemplate = item.template;
1747
- break;
1748
- case 'emptymessage':
1749
- _this.emptyMessageTemplate = item.template;
1750
- break;
1751
- case 'paginatorleft':
1752
- _this.paginatorLeftTemplate = item.template;
1753
- break;
1754
- case 'paginatorright':
1755
- _this.paginatorRightTemplate = item.template;
1756
- break;
1757
- }
1758
- });
1759
- };
1760
- TableComponent.prototype.visibleColumns = function () {
1761
- this.restoreHiddenColumns();
1762
- this.filteredColumns = this.columns.filter(function (column) { return !column.isHidden; });
1763
- return this.filteredColumns;
1764
- };
1765
- TableComponent.prototype.columnsChange = function (data) {
1766
- data.column.isHidden = !data.event;
1767
- this.resetColumnWidth();
1768
- this.saveHiddenColumns();
1769
- this.visibleColumns();
1770
- };
1771
- TableComponent.prototype.showTooltip = function (event) {
1772
- var target = event.target;
1773
- if (target.title === undefined || !target.textContent) {
1774
- return;
1775
- }
1776
- target.title = target.scrollWidth > target.clientWidth ? target.textContent : '';
1777
- };
1778
- TableComponent.prototype.colFilter = function (field) {
1779
- var found = this.toolbar.filter.cols.filter(function (item) { return item.field === field; });
1780
- return found.length === 1 ? found[0] : '';
1781
- };
1782
- TableComponent.prototype.onFilterToolbar = function (event) {
1783
- if (this.toolbar && this.toolbar.filter) {
1784
- this.toolbar.filter.active = !this.toolbar.filter.active;
1785
- }
1786
- };
1787
- TableComponent.prototype.onFilter = function (event) {
1788
- this.filterFunction.emit(event.filteredValue);
1789
- };
1790
- TableComponent.prototype.stateSave = function (state) {
1791
- };
1792
- TableComponent.prototype.saveToLocalStorage = function (state, key) {
1793
- if (key) {
1794
- window.localStorage.setItem(key, JSON.stringify(state));
1795
- }
1796
- };
1797
- TableComponent.prototype.isHiddenFieldsChanged = function () {
1798
- var hiddenFieldsSaved = this.getHiddenHiddenFieldsFromStorage();
1799
- var hiddenFieldsColumns = (this.columns || []).filter(function (_col) { return _col.isHidden; }).map(function (_col) { return _col.field; });
1800
- if (hiddenFieldsSaved.length === hiddenFieldsColumns.length) {
1801
- var diff = hiddenFieldsSaved.filter(function (field) { return !hiddenFieldsColumns.includes(field); });
1802
- diff.length !== 0;
1803
- }
1804
- return true;
1805
- };
1806
- TableComponent.prototype.saveHiddenColumns = function () {
1807
- if (this.stateKey) {
1808
- if (!this.isHiddenFieldsChanged()) {
1809
- return;
1810
- }
1811
- var hiddenFields = (this.columns || []).filter(function (_col) { return _col.isHidden; }).map(function (_col) { return _col.field; }).join(',');
1812
- this.saveToLocalStorage(hiddenFields, this.stateKey + 'HiddenFields');
1813
- window.localStorage.removeItem(this.stateKey);
1814
- if (this.searchText) {
1815
- window.localStorage.setItem(this.stateKey, JSON.stringify({
1816
- filters: { global: { value: this.searchText, matchMode: 'contains' } }
1817
- }));
1818
- }
1819
- if (this.dt) {
1820
- this.dt.restoreState();
1821
- }
1822
- }
1823
- };
1824
- TableComponent.prototype.countVisibleColumns = function () {
1825
- return (this.columns || []).filter(function (_col) { return !_col.isHidden; }).length;
1826
- };
1827
- TableComponent.prototype.restoreSearchText = function () {
1828
- var state = window.localStorage.getItem(this.stateKey);
1829
- if (state) {
1830
- var parsedState = JSON.parse(state);
1831
- this.searchText = (parsedState.filters || { global: { value: '' } }).global ? (parsedState.filters || { global: { value: '' } }).global.value : '';
1832
- this.sortField = parsedState.sortField || this.sortField;
1833
- }
1834
- else {
1835
- this.resetColumnWidth();
1836
- }
1837
- };
1838
- TableComponent.prototype.resetColumnWidthIfToWide = function () {
1839
- var visibleColumns = this.columns.filter(function (_column) { return !_column.isHidden; });
1840
- var totalWidthInPercent = visibleColumns.reduce(function (s, column) {
1841
- var percent = column.width.indexOf('%') > 0 ? parseInt(column.width, 10) : 0;
1842
- return s + percent;
1843
- }, 0);
1844
- if (totalWidthInPercent > 100) {
1845
- console.error("\u041C\u0430\u0441\u0438\u043C\u0430\u043B\u044C\u043D\u0430\u044F \u0441\u0443\u043C\u043C\u0430\u0440\u043D\u0430\u044F \u0448\u0438\u0440\u0438\u043D\u0430 \u0441\u0442\u043E\u043B\u0431\u0446\u043E\u0432 \u0442\u0430\u0431\u043B\u0438\u0446\u044B 100%, \u0442\u0435\u043A\u0443\u0449\u0430\u044F \u0441\u0443\u043C\u043C\u0430\u0440\u043D\u0430\u044F \u0448\u0438\u0440\u0438\u043D\u0430 " + totalWidthInPercent + "%."
1846
- + ("\u0412\u044B\u043F\u043E\u043B\u043D\u044F\u0435\u0442\u0441\u044F \u043F\u0440\u0438\u043D\u0443\u0434\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0439 \u043F\u0435\u0440\u0435\u0440\u0430\u0441\u0447\u0435\u0442 \u0448\u0438\u0440\u0438\u043D\u044B \u0434\u043B\u044F \u0442\u0430\u0431\u043B\u0438\u0446\u044B " + this.stateKey));
1847
- this.resetColumnWidth();
1848
- }
1849
- if (totalWidthInPercent < 100 && this.columns.length > 0) {
1850
- // расширяем первый столбец, чтобы не тянулся столбец с чекбоксом
1851
- var percent = this.columns[0].width.indexOf('%') > 0 ? parseInt(this.columns[0].width, 10) : 0;
1852
- this.columns[0].width = 100 - totalWidthInPercent + percent + '%';
1853
- }
1854
- };
1855
- TableComponent.prototype.resetColumnWidth = function () {
1856
- var cvc = this.countVisibleColumns();
1857
- var percent = Math.floor(100 / cvc);
1858
- var firstColumnPercent = percent;
1859
- if (cvc > 10) {
1860
- percent = Math.floor(90 / (cvc - 1));
1861
- firstColumnPercent = Math.floor(100 - (percent * (cvc - 1)));
1862
- }
1863
- this.columns.forEach(function (column, index) { return column.width = index === 0 ? firstColumnPercent + '%' : percent + "%"; });
1864
- };
1865
- TableComponent.prototype.getHiddenHiddenFieldsFromStorage = function () {
1866
- if (this.stateKey) {
1867
- var hiddenFields = window.localStorage.getItem(this.stateKey + 'HiddenFields');
1868
- if (hiddenFields) {
1869
- return JSON.parse(hiddenFields).split(',');
1870
- }
1871
- }
1872
- return [];
1873
- };
1874
- TableComponent.prototype.restoreHiddenColumns = function () {
1875
- if (this.stateKey && window.localStorage.getItem(this.stateKey + 'HiddenFields')) {
1876
- var hiddenFieldsArray_1 = this.getHiddenHiddenFieldsFromStorage();
1877
- this.columns.forEach(function (_col) { return _col.isHidden = hiddenFieldsArray_1.includes(_col.field) || _col.col_invisible; });
1878
- }
1879
- };
1880
- TableComponent.prototype.calcWidth = function (idx, label, width) {
1881
- return width && idx >= 0 ? width : 'auto';
1882
- };
1883
- TableComponent.prototype.onSort = function () {
1884
- var _this = this;
1885
- if (this.isGrouped) {
1886
- Object.entries(this.groupInfo).forEach(function (_a) {
1887
- var _b = __read(_a, 2), key = _b[0], value = _b[1];
1888
- var cacheFlag = (_this.groupInfo[key] || {}).isExpanded;
1889
- _this.groupInfo[key] = { isExpanded: cacheFlag === undefined ? true : cacheFlag };
1890
- });
1891
- this.sortByGroup();
1892
- if (this.dt && this.dt.filteredValue) {
1893
- this.sortByGroup(this.dt.filteredValue, this.dt._sortOrder);
1894
- }
1895
- else if (this.dt && this.dt._value && this.dt._sortOrder) {
1896
- this.sortByGroup(this.dt._value, this.dt._sortOrder);
1897
- }
1898
- }
1899
- };
1900
- TableComponent.prototype.isShowGroup = function (key, rowIndex) {
1901
- if (rowIndex === 0) {
1902
- this.groupIndex = {};
1903
- }
1904
- if (!this.groupInfo[key]) {
1905
- this.groupInfo[key] = { isExpanded: this.isGroupedExpanded !== undefined ? this.isGroupedExpanded : true };
1906
- }
1907
- if (!this.groupIndex[key]) {
1908
- this.groupIndex[key] = { rowIndex: rowIndex };
1909
- }
1910
- return this.groupIndex[key].rowIndex === rowIndex;
1911
- };
1912
- TableComponent.prototype.toggleGroup = function (rowIndex, key) {
1913
- this.groupInfo[key].isExpanded = !this.groupInfo[key].isExpanded;
1914
- };
1915
- TableComponent.prototype.clear = function () {
1916
- this.dt.filterGlobal('', 'contains');
1917
- };
1918
- TableComponent.prototype.localSearch = function (dt, searchText) {
1919
- dt.filterGlobal(searchText, 'contains');
1920
- };
1921
- TableComponent.prototype.sortByGroup = function (values, sortOrder) {
1922
- var g = this.groupMode;
1923
- if (values) {
1924
- return values.sort(function (row1, row2) {
1925
- if (typeof (row1.groupOrder[g]) === 'number') {
1926
- return sortOrder * (row1.groupOrder[g] - row2.groupOrder[g]);
1927
- }
1928
- else {
1929
- return sortOrder * row1.groupOrder[g].localeCompare(row2.groupOrder[g], undefined, { numeric: true, sensitivity: 'base' });
1930
- }
1931
- });
1932
- }
1933
- this.values.sort(function (row1, row2) {
1934
- if (typeof (row1.groupOrder[g]) === 'number') {
1935
- return row1.groupOrder[g] - row2.groupOrder[g];
1936
- }
1937
- else {
1938
- return row1.groupOrder[g].localeCompare(row2.groupOrder[g], undefined, { numeric: true, sensitivity: 'base' });
1939
- }
1940
- });
1941
- };
1942
- TableComponent.prototype.countGroup = function (groupKey, g) {
1943
- return this.values.filter(function (_value) { return _value.groupKey[g] === groupKey; }).length;
1944
- };
1945
- TableComponent.prototype.toggleNodes = function (isExpanded) {
1946
- var _this = this;
1947
- var g = this.groupMode;
1948
- this.values.forEach(function (v) {
1949
- if (_this.groupInfo[v.groupKey[g]]) {
1950
- _this.groupInfo[v.groupKey[g]].isExpanded = isExpanded;
1951
- }
1952
- });
1953
- };
1954
- TableComponent.prototype.toggleMode = function (item) {
1955
- this.groupMode = item;
1956
- this.groupInfo = {};
1957
- for (var i = 0; i < this.values.length; i++) {
1958
- this.isShowGroup(this.values[i].groupKey[this.groupMode], i);
1959
- }
1960
- if (this.searchText) {
1961
- this.dt.filterGlobal(this.searchText, 'contains');
1962
- }
1963
- this.sortByGroup();
1964
- };
1965
- var TableComponent_1;
1966
- __decorate([
1967
- Input(),
1968
- __metadata("design:type", Array)
1969
- ], TableComponent.prototype, "columns", void 0);
1970
- __decorate([
1971
- Input(),
1972
- __metadata("design:type", Object)
1973
- ], TableComponent.prototype, "values", void 0);
1974
- __decorate([
1975
- Input(),
1976
- __metadata("design:type", String)
1977
- ], TableComponent.prototype, "scrollHeight", void 0);
1978
- __decorate([
1979
- Input(),
1980
- __metadata("design:type", Boolean)
1981
- ], TableComponent.prototype, "scrollable", void 0);
1982
- __decorate([
1983
- Input(),
1984
- __metadata("design:type", String)
1985
- ], TableComponent.prototype, "selectionMode", void 0);
1986
- __decorate([
1987
- Input(),
1988
- __metadata("design:type", String)
1989
- ], TableComponent.prototype, "label", void 0);
1990
- __decorate([
1991
- Input(),
1992
- __metadata("design:type", String)
1993
- ], TableComponent.prototype, "error", void 0);
1994
- __decorate([
1995
- Input(),
1996
- __metadata("design:type", String)
1997
- ], TableComponent.prototype, "class", void 0);
1998
- __decorate([
1999
- Input(),
2000
- __metadata("design:type", Boolean)
2001
- ], TableComponent.prototype, "required", void 0);
2002
- __decorate([
2003
- Input(),
2004
- __metadata("design:type", Object)
2005
- ], TableComponent.prototype, "style", void 0);
2006
- __decorate([
2007
- Input(),
2008
- __metadata("design:type", Object)
2009
- ], TableComponent.prototype, "toolbar", void 0);
2010
- __decorate([
2011
- Input(),
2012
- __metadata("design:type", Object)
2013
- ], TableComponent.prototype, "checkboxSelection", void 0);
2014
- __decorate([
2015
- Input(),
2016
- __metadata("design:type", Object)
2017
- ], TableComponent.prototype, "active", void 0);
2018
- __decorate([
2019
- Input(),
2020
- __metadata("design:type", Object)
2021
- ], TableComponent.prototype, "sortField", void 0);
2022
- __decorate([
2023
- Input(),
2024
- __metadata("design:type", Object)
2025
- ], TableComponent.prototype, "isAscending", void 0);
2026
- __decorate([
2027
- Input(),
2028
- __metadata("design:type", Object)
2029
- ], TableComponent.prototype, "dataKey", void 0);
2030
- __decorate([
2031
- Input(),
2032
- __metadata("design:type", Object)
2033
- ], TableComponent.prototype, "stateKey", void 0);
2034
- __decorate([
2035
- Input(),
2036
- __metadata("design:type", Boolean)
2037
- ], TableComponent.prototype, "isGrouped", void 0);
2038
- __decorate([
2039
- Input(),
2040
- __metadata("design:type", Boolean)
2041
- ], TableComponent.prototype, "customSort", void 0);
2042
- __decorate([
2043
- Input(),
2044
- __metadata("design:type", Boolean)
2045
- ], TableComponent.prototype, "isGroupedExpanded", void 0);
2046
- __decorate([
2047
- Input(),
2048
- __metadata("design:type", Boolean)
2049
- ], TableComponent.prototype, "showHeader", void 0);
2050
- __decorate([
2051
- Input(),
2052
- __metadata("design:type", Boolean)
2053
- ], TableComponent.prototype, "isMobileView", void 0);
2054
- __decorate([
2055
- Input(),
2056
- __metadata("design:type", Boolean)
2057
- ], TableComponent.prototype, "resizableColumns", void 0);
2058
- __decorate([
2059
- Input(),
2060
- __metadata("design:type", Boolean)
2061
- ], TableComponent.prototype, "isTextSearch", void 0);
2062
- __decorate([
2063
- Input(),
2064
- __metadata("design:type", Boolean)
2065
- ], TableComponent.prototype, "isSortIcon", void 0);
2066
- __decorate([
2067
- Output(),
2068
- __metadata("design:type", Object)
2069
- ], TableComponent.prototype, "activeChange", void 0);
2070
- __decorate([
2071
- ContentChildren(InsparkTemplate),
2072
- __metadata("design:type", QueryList)
2073
- ], TableComponent.prototype, "templates", void 0);
2074
- __decorate([
2075
- Output(),
2076
- __metadata("design:type", EventEmitter)
2077
- ], TableComponent.prototype, "selectionChange", void 0);
2078
- __decorate([
2079
- Output(),
2080
- __metadata("design:type", EventEmitter)
2081
- ], TableComponent.prototype, "addAction", void 0);
2082
- __decorate([
2083
- Output(),
2084
- __metadata("design:type", EventEmitter)
2085
- ], TableComponent.prototype, "csvAction", void 0);
2086
- __decorate([
2087
- Output(),
2088
- __metadata("design:type", EventEmitter)
2089
- ], TableComponent.prototype, "saveAction", void 0);
2090
- __decorate([
2091
- Output(),
2092
- __metadata("design:type", EventEmitter)
2093
- ], TableComponent.prototype, "removeAction", void 0);
2094
- __decorate([
2095
- Output(),
2096
- __metadata("design:type", EventEmitter)
2097
- ], TableComponent.prototype, "unlinkAction", void 0);
2098
- __decorate([
2099
- Output(),
2100
- __metadata("design:type", EventEmitter)
2101
- ], TableComponent.prototype, "linkAction", void 0);
2102
- __decorate([
2103
- Output(),
2104
- __metadata("design:type", EventEmitter)
2105
- ], TableComponent.prototype, "groupEditAction", void 0);
2106
- __decorate([
2107
- Output(),
2108
- __metadata("design:type", EventEmitter)
2109
- ], TableComponent.prototype, "paramsEditAction", void 0);
2110
- __decorate([
2111
- Output(),
2112
- __metadata("design:type", EventEmitter)
2113
- ], TableComponent.prototype, "sortFunction", void 0);
2114
- __decorate([
2115
- Output(),
2116
- __metadata("design:type", EventEmitter)
2117
- ], TableComponent.prototype, "filterFunction", void 0);
2118
- __decorate([
2119
- ViewChild('dt', { static: false }),
2120
- __metadata("design:type", Object)
2121
- ], TableComponent.prototype, "dt", void 0);
2122
- __decorate([
2123
- Input(),
2124
- __metadata("design:type", Object),
2125
- __metadata("design:paramtypes", [Object])
2126
- ], TableComponent.prototype, "selection", null);
2127
- TableComponent = TableComponent_1 = __decorate([
2128
- Component({
2129
- selector: 'in-table',
2130
- template: "<span *ngIf=\"label\" class=\"c-label\">\n {{label}}\n <span *ngIf=\"required\" class=\"c-label__req\">*</span>\n <span *ngIf=\"error\" class=\"c-label__sub_is-error\">{{error}}</span>\n</span>\n<p-table #dt\n (onFilter) = onFilter($event)\n (onSort)=\"onSort()\"\n (onStateRestore)=\"restoreSearchText()\"\n (onStateSave)=\"stateSave($event)\"\n (sortFunction)=\"sortFunction? sortFunction.emit($event): null\"\n [(selection)]=\"selectionValue\"\n [class]=\"class\"\n [columns]=\"filteredColumns\"\n [customSort]=\"customSort\"\n [dataKey]=\"dataKey || 'id'\"\n [globalFilterFields]=\"globalFilteredColumns\"\n [resizableColumns]=\"resizableColumns\"\n [scrollHeight]=\"scrollHeight\"\n [scrollable]=\"scrollable\"\n [selectionMode]=\"selectionMode\"\n [sortField]=\"sortField || 'id'\"\n [sortOrder]=\"isAscending ? 1 : -1\"\n [stateKey]=\"stateKey\"\n [stateStorage]=\"'local'\"\n [style]=\"style\"\n [value]=\"values\"\n columnResizeMode=\"expand\"\n\n>\n\n <ng-template *ngIf=\"colGroupTemplate\" let-columns pTemplate=\"body\">\n <ng-container\n *ngTemplateOutlet=\"colGroupTemplate; context: {$implicit: { columns: columns}}\"></ng-container>\n </ng-template>\n\n <ng-template *ngIf=\"!colGroupTemplate\" let-columns pTemplate=\"colgroup\">\n <colgroup *ngIf=\"!isMobileView\">\n <col *ngIf=\"checkboxSelection\" style=\"width: 44px;\">\n <col *ngFor=\"let col of filteredColumns; let idx = index\" [style.width]=\"calcWidth(idx, col.field, col.width)\">\n </colgroup>\n </ng-template>\n\n <ng-template let-columns pTemplate=\"header\">\n <ng-container *ngIf=\"showHeader\">\n <tr>\n <th *ngIf=\"checkboxSelection\" class=\"u-position-relative u-text_center\" pResizableColumn style=\"width: 44px;\">\n <p-tableHeaderCheckbox></p-tableHeaderCheckbox>\n </th>\n <th *ngFor=\"let col of filteredColumns\" [pSortableColumn]=\"col.field\" class=\"u-position-relative\"\n pResizableColumn>\n <div class=\"ui-table-thead-title\"\n title=\"{{col.label | translate}}\">\n {{col.label | translate}}\n </div>\n <p-sortIcon *ngIf=\"isSortIcon\" [field]=\"col.field\"\n class=\"u-position-absolute u-position-absolute-right c-sorticon\"\n style=\"display: flex; width: 18px; top: 0; height: 100%;\"></p-sortIcon>\n </th>\n </tr>\n <tr *ngIf=\"toolbar && toolbar.filter && toolbar.filter.active\">\n <th *ngIf=\"checkboxSelection\" class=\"u-position-relative u-text_center\" pResizableColumn\n style=\"width: 44px;\"></th>\n <th *ngFor=\"let col of columns\" [ngSwitch]=\"col.field\">\n <input\n (input)=\"dt.filter($event.target.value, col.field, 'contains')\"\n *ngSwitchCase=\"colFilter(col.field).type === 'text' ? col.field : ''\"\n autofocus=\"\"\n class=\"c-input c-input_small ng-pristine ng-valid ng-scope ng-empty ng-touched\"\n pInputText\n type=\"text\">\n\n <p-dropdown (onChange)=\"dt.filter($event.value, col.field, 'equals')\"\n *ngSwitchCase=\"colFilter(col.field).type === 'dropdown' ? col.field : ''\"\n [options]=\"colFilter(col.field).options\"\n [style]=\"{ width: '100%', overflow: 'visible' }\"\n appendTo=\"body\"></p-dropdown>\n\n <p-multiSelect (onChange)=\"dt.filter($event.value, col.field, 'in')\"\n *ngSwitchCase=\"colFilter(col.field).type === 'multiselect' ? col.field : ''\"\n [options]=\"colFilter(col.field).options\"\n [style]=\"{ width: '100%', overflow: 'visible' }\" appendTo=\"body\"\n defaultLabel=\"{{'All' | translate}}\"></p-multiSelect>\n <input\n (input)=\"dt.filter($event.target.value, col.field + '2filter', 'contains')\"\n *ngSwitchCase=\"colFilter(col.field).type === 'datetext' ? col.field : ''\"\n autofocus=\"\"\n class=\"c-input c-input_small ng-pristine ng-valid ng-scope ng-empty ng-touched\"\n pInputText\n type=\"text\">\n </th>\n </tr>\n </ng-container>\n </ng-template>\n\n <ng-template *ngIf=\"bodyTemplate\" let-columns=\"columns\" let-rowData let-rowIndex=\"rowIndex\" pTemplate=\"body\">\n <ng-container\n *ngTemplateOutlet=\"bodyTemplate; context: {$implicit: { rowIndex: rowIndex, rowData: rowData, columns: columns}}\"></ng-container>\n </ng-template>\n\n <ng-template *ngIf=\"!bodyTemplate\" let-columns=\"columns\" let-index=\"rowIndex\" let-rowData pTemplate=\"body\">\n <tr\n (click)=\"toggleGroup(index, rowData.groupKey[groupMode])\"\n *ngIf=\"isGrouped && isShowGroup(rowData.groupKey[groupMode], index)\"\n class=\"row_hover_highlight\">\n <td [colSpan]=\"countVisibleColumns() + 1\">\n <span>\n <i\n [ngClass]=\"groupInfo[rowData.groupKey[groupMode]].isExpanded ? 'fa fa-fw fa-angle-down' : 'fa fa-fw fa-angle-right'\"></i>\n <span>{{rowData.groupKey[groupMode] | translate }} ({{countGroup(rowData.groupKey[groupMode], groupMode)}}\n )</span>\n </span>\n </td>\n </tr>\n <tr *ngIf=\"!isGrouped || groupInfo[(rowData.groupKey[groupMode])].isExpanded\"\n [ngClass]=\"{row_active: isRowActive(rowData)}\"\n [pSelectableRow]=\"rowData\"\n class=\"row\">\n <td *ngIf=\"checkboxSelection\" [ngClass]=\"{\n 'row_status_success': rowData.sdirparamstatecolor === 'success',\n 'row_status_error': rowData.sdirparamstatecolor === 'error',\n 'row_status_warning': rowData.sdirparamstatecolor === 'warning',\n 'row_status_critical': rowData.sdirparamstatecolor === 'critical',\n 'row_status_falsevalue': rowData.sdirparamstatecolor === 'falsevalue'\n }\" class=\"u-text_center\"\n style=\"width: 44px\"\n >\n <p-tableCheckbox [value]=\"rowData\"></p-tableCheckbox>\n </td>\n <td (click)=\"activeChange.emit(rowData)\"\n *ngFor=\"let col of filteredColumns\"\n class=\"u-overflow-visible\">\n <div (mouseover)=\"showTooltip($event)\" *ngIf=\"!valueTemplate\" class=\"ui-table-tbody-content\" title>\n {{col.translatable ? (rowData | propertyValue: col.field | translate) : (rowData | propertyValue: col.field)}}\n </div>\n <ng-container\n *ngTemplateOutlet=\"valueTemplate; context: {$implicit: { data: rowData, col: col}}\"></ng-container>\n </td>\n </tr>\n </ng-template>\n\n <ng-template *ngIf=\"toolbar\" pTemplate=\"caption\">\n\n <div class=\"o-grid o-grid_no-gutter\">\n <div class=\"c-tree-table__toolbar-content u-display-inline-flex\">\n <div *ngIf=\"isTextSearch\" class=\"c-form c-form_inline u-display-inline-block\">\n <form class=\"c-label\">\n <div class=\"input-wrapper u-margin-right-tiny\">\n <input #searchTextInput\n (input)=\"localSearch(dt, searchText)\"\n [(ngModel)]=\"searchText\"\n [ngModelOptions]=\"{standalone: true}\"\n autofocus=\"\"\n class=\"search-box c-input c-input_small ng-pristine ng-valid ng-scope ng-empty ng-touched\"\n pInputText\n placeholder=\"{{('SHARED.SEARCH' | translate) + ':'}}\"\n required\n style=\"padding-right: 28px\"\n tabindex=\"1\"\n type=\"search\"\n >\n <button (click)=\"clear()\" class=\"button-reset\" type=\"reset\"\n [attr.title]=\"'Reset' | translate\">\n <i class=\"fa fa-close\"></i>\n </button>\n </div>\n </form>\n </div>\n <div class=\"c-btn c-btn_border-free c-btn_small\">\n <in-table-columns-multiselect (columnsChange)=\"columnsChange($event)\"\n [columns]=\"primaryColumns\"\n [disableActiveCheckboxes]=\"countVisibleColumns() === 1\"></in-table-columns-multiselect>\n </div>\n\n <button (click)=\"onFilterToolbar($event)\" *ngIf=\"toolbar.filter\"\n class=\"c-btn c-btn_border-free c-btn_small\"\n >\n <i class=\"fa fa-filter\" title=\"{{'Service filter' | translate}}\"></i>\n </button>\n\n <button (click)=\"addAction.emit($event)\" *ngIf=\"toolbar.add\" [disabled]=\"toolbar.add.disabled\"\n class=\"c-btn c-btn_border-free c-btn_small\"\n >\n <i class=\"fa fa-plus\" title=\"{{'Add' | translate}}\"></i>\n </button>\n\n <button (click)=\"linkAction.emit($event)\" *ngIf=\"toolbar.link\" [disabled]=\"toolbar.link.disabled\"\n class=\"c-btn c-btn_border-free c-btn_small\"\n >\n <i class=\"fa fa-link\" title=\"{{'Link' | translate}}\"></i>\n </button>\n <button (click)=\"csvAction.emit($event)\" *ngIf=\"toolbar.csv\" [disabled]=\"toolbar.csv.disabled\"\n class=\"c-btn c-btn_border-free c-btn_small\"\n >\n <i class=\"fa fa-file-csv\" title=\"{{'LOGS.SAVE_TO_SCV' | translate}}\"></i>\n </button>\n <button (click)=\"saveAction.emit($event)\" *ngIf=\"toolbar.save\"\n [disabled]=\"toolbar.save.disabled\"\n class=\"c-btn c-btn_primary c-btn_small\"\n title=\"{{'Save' | translate}}\"\n >\n {{'Save' | translate}}\n </button>\n <button (click)=\"groupEditAction.emit($event)\" *ngIf=\"toolbar.groupEdit && toolbar.groupEdit.active\"\n [disabled]=\"toolbar.groupEdit.disabled\"\n class=\"c-btn c-btn_border-free c-btn_small\">\n <i class=\"fa fa-pencil-square-o\" title=\"{{'groupEdit' | translate}}\"></i>\n </button>\n <ng-content select=\"[buttons]\"></ng-content>\n <button (click)=\"paramsEditAction.emit($event)\" *ngIf=\"toolbar.paramsEdit && toolbar.paramsEdit.active\"\n [disabled]=\"toolbar.paramsEdit.disabled\"\n class=\"c-btn c-btn_border-free c-btn_small\">\n <i class=\"fa fa-share-square-o\" title=\"{{'paramsEdit' | translate}}\"></i>\n </button>\n\n\n <button (click)=\"removeAction.emit($event)\" *ngIf=\"toolbar.remove && toolbar.remove.active\"\n [disabled]=\"toolbar.remove.disabled\"\n class=\"c-btn c-btn_border-free c-btn_small\">\n <i class=\"fa fa-trash\" title=\"{{'Delete' | translate}}\"></i>\n </button>\n <button (click)=\"unlinkAction.emit($event)\" *ngIf=\"toolbar.unlink\" [disabled]=\"toolbar.unlink.disabled\"\n class=\"c-btn c-btn_border-free c-btn_small\">\n <i class=\"fa fa-unlink\" title=\"{{'Detach tag from selected items' | translate}}\"></i>\n </button>\n <button (click)=\"toggleNodes(true)\"\n *ngIf=\"toolbar.expandAll\"\n class=\"c-btn c-btn_small c-btn_svg-24 c-icon c-icon_svg c-icon_svg-24 c-btn_border-free\"\n title=\"{{'Expand all' | translate}}\">\n <svg fill=\"currentColor\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M20 2H4v2h16V2zM4 20v2h16v-2H4zM12 5l5 6H7l5-6zM17 13l-5 6-5-6h10z\"/>\n </svg>\n </button>\n <button (click)=\"toggleNodes(false)\"\n *ngIf=\"toolbar.expandAll\"\n class=\"c-btn c-btn_small c-btn_svg-24 c-icon c-icon_svg c-icon_svg-24 c-btn_border-free\"\n title=\"{{'Collapse all' | translate}}\">\n <svg fill=\"currentColor\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\" xmlns=\"http://www.w3.org/2000/svg\">\n <path clip-rule=\"evenodd\" d=\"M17 3l-5 6-5-6h10zM4 13v-2h16v2H4zm8 2l5 6H7l5-6z\" fill-rule=\"evenodd\"/>\n </svg>\n </button>\n\n <div *ngIf=\"toolbar.groupSort\"\n class=\"c-btn-group\"\n container=\"body\"\n ngbDropdown>\n\n <button class=\"c-btn c-btn_border-free c-btn_small\"\n id=\"dropdownGroupType\"\n ngbDropdownToggle\n title=\"{{'Change the way parameters are grouped' | translate}}\">\n <i aria-hidden=\"true\" class=\"fa fa-object-group\"></i>\n <i aria-hidden=\"true\" class=\"c-caret\"></i>\n </button>\n\n <ul aria-labelledby=\"dropdownGroupType\"\n class=\"c-dropdown-menu c-dropdown-menu_right ng-star-inserted\"\n ngbDropdownMenu\n role=\"menu\">\n <li *ngFor=\"let item of toolbar.groupSort.label\"\n [ngClass]=\"{'is-dropdown-menu__listitem_active': item.value === groupMode}\"\n class=\"c-dropdown-menu__listitem is-dropdown-menu__listitem_active\"\n ngbDropdownItem\n role=\"menuitem\">\n <a (click)=\"toggleMode(item.value)\" class=\"c-dropdown-menu__content\">\n {{item.label}}\n </a>\n </li>\n </ul>\n </div>\n </div>\n </div>\n </ng-template>\n</p-table>\n",
2131
- entryComponents: [],
2132
- providers: [
2133
- DomHandler,
2134
- ObjectUtils,
2135
- TableService,
2136
- {
2137
- provide: Table,
2138
- useFactory: tableFactory,
2139
- deps: [TableComponent_1],
2140
- },
2141
- ],
2142
- styles: ["@charset \"UTF-8\";.u-overflow-visible{overflow:visible!important}.row_status_success{padding-left:9px!important;border-left:4px solid var(--ids-theme-status-success,#31ac51)}.row_status_error{padding-left:9px!important;border-left:4px solid var(--ids-theme-status-error,#f95c5d)}.row_status_warning{padding-left:9px!important;border-left:4px solid var(--ids-theme-status-warning,#ee9946)}.row_status_critical{padding-left:9px!important;border-left:4px solid var(--ids-theme-status-critical,#f95c5d)}.row_status_falsevalue{padding-left:9px!important;border-left:4px solid var(--ids-theme-status-falsevalue,#85b3cb)}.row_status_disabled{padding-left:9px!important;border-left:4px solid var(--ids-theme-status-disabled)}.row_status_none{padding-left:9px!important;border-left:4px solid transparent}.button-reset{display:flex;align-items:center;position:absolute;right:6px;top:5px;padding:6px;font-size:15px;border:none;outline:0;cursor:pointer;color:var(--colorTextMuted);background-color:transparent}.button-reset:hover{color:var(--ids-theme-btn-default-color,#fff)}.input-wrapper{position:relative;display:flex;align-items:baseline}.c-input:not(:valid)~.button-reset{display:none}"]
2143
- })
2144
- ], TableComponent);
2145
- return TableComponent;
2146
- }());
2147
- var TableComponentModule = /** @class */ (function () {
2148
- function TableComponentModule() {
2149
- }
2150
- TableComponentModule = __decorate([
2151
- NgModule({
2152
- imports: [CommonModule, TableModule, PipesModule, TranslateModule, FormsModule, DropdownModule$1, MultiSelectModule, NgbDropdownModule, CheckboxModule],
2153
- exports: [TableComponent, TableColumnsMultiselectComponent],
2154
- declarations: [TableComponent, TableColumnsMultiselectComponent, TableMenuOverlayComponent, TableClickOutsideDirective]
2155
- })
2156
- ], TableComponentModule);
2157
- return TableComponentModule;
2158
- }());
2159
-
2160
- var EmptyComponent = /** @class */ (function () {
2161
- function EmptyComponent() {
2162
- }
2163
- EmptyComponent = __decorate([
2164
- Component({
2165
- selector: 'in-empty',
2166
- template: "<div class=\"status-text\">\n {{'no_records' | translate}}\n</div>\n",
2167
- styles: [".status-text{font-size:16px;opacity:.8}"]
2168
- })
2169
- ], EmptyComponent);
2170
- return EmptyComponent;
2171
- }());
2172
-
2173
- var PreloaderComponent = /** @class */ (function () {
2174
- function PreloaderComponent() {
2175
- this.inline = false;
2176
- this.overlay = false;
2177
- this.size = 'normal';
2178
- }
2179
- PreloaderComponent.prototype.ngOnInit = function () {
2180
- };
2181
- __decorate([
2182
- Input(),
2183
- __metadata("design:type", Object)
2184
- ], PreloaderComponent.prototype, "inline", void 0);
2185
- __decorate([
2186
- Input(),
2187
- __metadata("design:type", Object)
2188
- ], PreloaderComponent.prototype, "overlay", void 0);
2189
- __decorate([
2190
- Input(),
2191
- __metadata("design:type", String)
2192
- ], PreloaderComponent.prototype, "size", void 0);
2193
- PreloaderComponent = __decorate([
2194
- Component({
2195
- selector: 'in-preloader',
2196
- template: "<div [ngClass]=\"{float:!inline, small: size==='small'}\" class=\"preloader-container\">\n <div class=\"lds-spinner\">\n <div></div>\n <div></div>\n <div></div>\n <div></div>\n <div></div>\n <div></div>\n <div></div>\n <div></div>\n <div></div>\n <div></div>\n <div></div>\n <div></div>\n </div>\n</div>\n<div *ngIf=\"overlay\" class=\"overlay\"></div>\n",
2197
- encapsulation: ViewEncapsulation.Emulated,
2198
- styles: ["@charset \"UTF-8\";.preloader-container{display:inline-flex;width:100%;height:64px;position:relative;align-items:center;justify-content:center;z-index:101}.preloader-container.float{position:absolute;height:auto;width:auto;top:50%;left:50%;transform:translate(-50%,-50%)}.preloader-container.small{width:32px;height:32px}.preloader-container.small .lds-spinner{color:var(--ids-theme-btn-primary-background);width:32px;height:32px}.lds-spinner{color:var(--ids-theme-btn-primary-background);width:64px;height:64px}.lds-spinner div{transform-origin:32px 32px;-webkit-animation:1.2s linear infinite lds-spinner;animation:1.2s linear infinite lds-spinner}.small .lds-spinner div{transform-origin:16px 16px}.lds-spinner div:after{content:\" \";display:block;position:absolute;top:3px;left:29px;width:5px;height:14px;border-radius:20%;background:var(--ids-theme-btn-primary-background,#78f4ff)}.small .lds-spinner div:after{width:3px;height:6px;left:15px}.lds-spinner div:nth-child(1){transform:rotate(0);-webkit-animation-delay:-1.1s;animation-delay:-1.1s}.lds-spinner div:nth-child(2){transform:rotate(30deg);-webkit-animation-delay:-1s;animation-delay:-1s}.lds-spinner div:nth-child(3){transform:rotate(60deg);-webkit-animation-delay:-.9s;animation-delay:-.9s}.lds-spinner div:nth-child(4){transform:rotate(90deg);-webkit-animation-delay:-.8s;animation-delay:-.8s}.lds-spinner div:nth-child(5){transform:rotate(120deg);-webkit-animation-delay:-.7s;animation-delay:-.7s}.lds-spinner div:nth-child(6){transform:rotate(150deg);-webkit-animation-delay:-.6s;animation-delay:-.6s}.lds-spinner div:nth-child(7){transform:rotate(180deg);-webkit-animation-delay:-.5s;animation-delay:-.5s}.lds-spinner div:nth-child(8){transform:rotate(210deg);-webkit-animation-delay:-.4s;animation-delay:-.4s}.lds-spinner div:nth-child(9){transform:rotate(240deg);-webkit-animation-delay:-.3s;animation-delay:-.3s}.lds-spinner div:nth-child(10){transform:rotate(270deg);-webkit-animation-delay:-.2s;animation-delay:-.2s}.lds-spinner div:nth-child(11){transform:rotate(300deg);-webkit-animation-delay:-.1s;animation-delay:-.1s}.lds-spinner div:nth-child(12){transform:rotate(330deg);-webkit-animation-delay:0s;animation-delay:0s}@-webkit-keyframes lds-spinner{0%{opacity:1}100%{opacity:0}}@keyframes lds-spinner{0%{opacity:1}100%{opacity:0}}.overlay{position:fixed;left:0;top:0;width:100%;height:100%;background:rgba(0,0,0,.7);z-index:100}"]
2199
- }),
2200
- __metadata("design:paramtypes", [])
2201
- ], PreloaderComponent);
2202
- return PreloaderComponent;
2203
- }());
2204
-
2205
- var InsparkStickyComponent = /** @class */ (function () {
2206
- function InsparkStickyComponent(cdr) {
2207
- var _this = this;
2208
- this.cdr = cdr;
2209
- this.top = 100;
2210
- this.isInline = false;
2211
- this.isFloated = true;
2212
- this.zIndex = 10;
2213
- this.class = '';
2214
- this.isSticky = false;
2215
- this.height = 0;
2216
- this.width = 0;
2217
- this.left = 0;
2218
- this.right = 0;
2219
- this.resize = function () {
2220
- var rect = _this.stickyRef.nativeElement.getBoundingClientRect();
2221
- _this.width = rect.width;
2222
- _this.left = rect.x;
2223
- _this.cdr.detectChanges();
2224
- };
2225
- this.scroll = function () {
2226
- var rect = _this.stickyRef.nativeElement.getBoundingClientRect();
2227
- var isSticky = rect.top < _this.top;
2228
- if (isSticky !== _this.isSticky) {
2229
- _this.height = rect.height;
2230
- _this.isSticky = rect.top < _this.top;
2231
- _this.left = rect.x;
2232
- _this.width = rect.width;
2233
- _this.right = rect.right;
2234
- _this.cdr.detectChanges();
2235
- }
2236
- };
2237
- }
2238
- InsparkStickyComponent.prototype.ngOnInit = function () {
2239
- document.addEventListener('scroll', this.scroll);
2240
- window.addEventListener('resize', this.resize);
2241
- };
2242
- InsparkStickyComponent.prototype.ngOnDestroy = function () {
2243
- document.removeEventListener('scroll', this.scroll);
2244
- window.removeEventListener('resize', this.resize);
2245
- };
2246
- InsparkStickyComponent.ctorParameters = function () { return [
2247
- { type: ChangeDetectorRef }
2248
- ]; };
2249
- __decorate([
2250
- ViewChild('sticky', { static: false }),
2251
- __metadata("design:type", ElementRef)
2252
- ], InsparkStickyComponent.prototype, "stickyRef", void 0);
2253
- __decorate([
2254
- Input(),
2255
- __metadata("design:type", Object)
2256
- ], InsparkStickyComponent.prototype, "top", void 0);
2257
- __decorate([
2258
- Input(),
2259
- __metadata("design:type", Object)
2260
- ], InsparkStickyComponent.prototype, "isInline", void 0);
2261
- __decorate([
2262
- Input(),
2263
- __metadata("design:type", Object)
2264
- ], InsparkStickyComponent.prototype, "isFloated", void 0);
2265
- __decorate([
2266
- Input(),
2267
- __metadata("design:type", Object)
2268
- ], InsparkStickyComponent.prototype, "zIndex", void 0);
2269
- __decorate([
2270
- Input(),
2271
- __metadata("design:type", Object)
2272
- ], InsparkStickyComponent.prototype, "class", void 0);
2273
- InsparkStickyComponent = __decorate([
2274
- Component({
2275
- selector: 'in-sticky',
2276
- template: "<div #sticky [ngClass]=\"{inline:isInline}\" [ngStyle]=\"{height: this.height?this.height+'px':'auto'}\"\n class=\"sticky-container\">\n <div [ngClass]=\"{sticky: isSticky, floated: isFloated && isSticky}\"\n [ngStyle]=\"{zIndex:this.zIndex, top: (this.top) + 'px', left: this.left+ 'px', width: this.width?this.width+'px':'auto'}\">\n <div [ngClass]=\"class\">\n <ng-content></ng-content>\n </div>\n </div>\n</div>\n",
2277
- encapsulation: ViewEncapsulation.Emulated,
2278
- changeDetection: ChangeDetectionStrategy.OnPush,
2279
- styles: [".sticky{position:fixed;display:inline-block}.floated{box-shadow:0 0 4px 2px rgba(0,0,0,.3)}.inline{display:inline-block}"]
2280
- }),
2281
- __metadata("design:paramtypes", [ChangeDetectorRef])
2282
- ], InsparkStickyComponent);
2283
- return InsparkStickyComponent;
2284
- }());
2285
-
2286
- var InsparkHeaderComponent = /** @class */ (function () {
2287
- function InsparkHeaderComponent() {
2288
- this.level = 1;
2289
- this.label = '';
2290
- }
2291
- InsparkHeaderComponent.prototype.ngOnInit = function () {
2292
- this.level = Math.max(Math.min(this.level, 6), 1);
2293
- };
2294
- __decorate([
2295
- Input(),
2296
- __metadata("design:type", Object)
2297
- ], InsparkHeaderComponent.prototype, "level", void 0);
2298
- __decorate([
2299
- Input(),
2300
- __metadata("design:type", Object)
2301
- ], InsparkHeaderComponent.prototype, "label", void 0);
2302
- InsparkHeaderComponent = __decorate([
2303
- Component({
2304
- selector: 'in-header',
2305
- template: "<div [ngClass]=\"{h1: level === 1, h2: level === 2, h3: level === 3, h4: level === 4, h5: level === 5, h6:level === 6}\"\n class=\"header u-margin-bottom-tiny u-margin-top-small\">\n <div *ngIf=\"level === 1\" [title]=\"label\" class=\"u-h1 header__wrapper\">\n {{label}}\n </div>\n <div *ngIf=\"level === 2\" [title]=\"label\" class=\"u-h2 header__wrapper\">\n {{label}}\n </div>\n <div *ngIf=\"level === 3\" [title]=\"label\" class=\"u-h3 header__wrapper\">\n {{label}}\n </div>\n <div *ngIf=\"level === 4\" [title]=\"label\" class=\"u-h4 header__wrapper\">\n {{label}}\n </div>\n <div *ngIf=\"level === 5\" [title]=\"label\" class=\"u-h5 header__wrapper\">\n {{label}}\n </div>\n <div *ngIf=\"level === 6\" [title]=\"label\" class=\"u-h6 header__wrapper\">\n {{label}}\n </div>\n <div class=\"buttons\">\n <ng-content></ng-content>\n </div>\n</div>\n",
2306
- encapsulation: ViewEncapsulation.Emulated,
2307
- styles: [".header{display:flex;align-items:center}.header h1,.header h2,.header h3,.header h5,.header h6{display:inline-block;margin:0;color:var(--colorText)}.header h1{font-size:24px}.header .buttons{margin-left:8px;display:flex;align-items:center}.header__wrapper{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}"]
2308
- }),
2309
- __metadata("design:paramtypes", [])
2310
- ], InsparkHeaderComponent);
2311
- return InsparkHeaderComponent;
2312
- }());
2313
-
2314
- var ToolbarComponent = /** @class */ (function () {
2315
- function ToolbarComponent(element, cdRef, router) {
2316
- this.element = element;
2317
- this.cdRef = cdRef;
2318
- this.router = router;
2319
- this.display = false;
2320
- }
2321
- ToolbarComponent.prototype.ngOnInit = function () {
2322
- };
2323
- ToolbarComponent.prototype.clickedOutsideOverlay = function (event) {
2324
- if (!this.element.nativeElement.contains(event.target)) {
2325
- this.display = false;
2326
- this.cdRef.detectChanges();
2327
- }
2328
- };
2329
- ToolbarComponent.ctorParameters = function () { return [
2330
- { type: ElementRef },
2331
- { type: ChangeDetectorRef },
2332
- { type: Router }
2333
- ]; };
2334
- __decorate([
2335
- Input(),
2336
- __metadata("design:type", String)
2337
- ], ToolbarComponent.prototype, "title", void 0);
2338
- ToolbarComponent = __decorate([
2339
- Component({
2340
- selector: 'in-toolbar',
2341
- template: "<div class=\"toolbar-wrapper\">\n <in-sticky top=\"60\">\n\n <div class=\"c-panel toolbar-container\">\n <div class=\"c-toolbar\">\n <div class=\"c-toolbar__side-left\">\n <div class=\"c-toolbar__title\">{{title}}</div>\n </div>\n <div class=\"c-toolbar__side-center\">\n\n </div>\n <div class=\"c-toolbar__side-right\">\n <ng-content></ng-content>\n </div>\n\n </div>\n </div>\n </in-sticky>\n</div>\n",
2342
- changeDetection: ChangeDetectionStrategy.OnPush,
2343
- entryComponents: [],
2344
- styles: [".toolbar-wrapper{padding-bottom:4px}.toolbar-container{padding:8px;position:relative}:host{position:-webkit-sticky;position:sticky;z-index:2}.c-toolbar{display:inline-flex;width:100%}.c-toolbar__side-left{flex:1;text-align:left}.c-toolbar__title{display:inline-flex;vertical-align:middle;font-size:22px}.c-toolbar__side-right{display:flex;text-align:right}.add-widget{position:fixed;right:16px;bottom:16px}.widget-container{position:absolute;left:0;top:40px;right:0;bottom:0;overflow:auto}.widget-block{position:absolute;left:5px;top:5px;right:5px;bottom:5px}.sidebar{background:var(--main-background);position:absolute;left:0;top:35px;bottom:0;height:100vh;z-index:100;width:300px;box-shadow:0 0 3px 8px rgba(0,0,0,.1);overflow:auto}.right-side{display:flex;align-items:center;justify-content:flex-end;flex:1}.right-side>*{margin-left:5px}.left-side{white-space:nowrap;display:flex;align-items:center;justify-content:flex-start}.left-side>*{margin-right:5px}.controls-panel{height:41px;border-radius:2px;padding:4px 0;margin:0 5px 5px;display:flex}.dashboard-list{position:relative}.title{font-size:22px}"]
2345
- }),
2346
- __metadata("design:paramtypes", [ElementRef, ChangeDetectorRef, Router])
2347
- ], ToolbarComponent);
2348
- return ToolbarComponent;
2349
- }());
2350
-
2351
- var BreadcrumbComponent = /** @class */ (function () {
2352
- function BreadcrumbComponent() {
2353
- }
2354
- BreadcrumbComponent.prototype.ngOnInit = function () {
2355
- };
2356
- __decorate([
2357
- Input(),
2358
- __metadata("design:type", Array)
2359
- ], BreadcrumbComponent.prototype, "items", void 0);
2360
- BreadcrumbComponent = __decorate([
2361
- Component({
2362
- selector: 'in-breadcrumb',
2363
- template: "<div>\n <ul class=\"c-crumb\">\n <li class=\"c-crumb__item\">\n <a [routerLink]=\"['/main/page/home']\" translate=\"\">{{'Home' | translate }}</a>\n </li>\n <li *ngFor=\"let item of items; last as isLast\" class=\"c-crumb__item\">\n <a *ngIf=\"item.url && !isLast; else noUrl\" [routerLink]=\"item.url\" translate=\"\">{{item.label}}</a>\n <ng-template #noUrl>\n <span translate=\"\">{{item.label}}</span>\n </ng-template>\n </li>\n </ul>\n</div>\n",
2364
- changeDetection: ChangeDetectionStrategy.OnPush,
2365
- styles: [""]
2366
- }),
2367
- __metadata("design:paramtypes", [])
2368
- ], BreadcrumbComponent);
2369
- return BreadcrumbComponent;
2370
- }());
2371
-
2372
- var FileComponent = /** @class */ (function () {
2373
- function FileComponent() {
2374
- this.name = null;
2375
- this.label = null;
2376
- this.accept = null;
2377
- this.required = false;
2378
- this.error = null;
2379
- this.onChange = new EventEmitter();
2380
- this.file = null;
2381
- }
2382
- FileComponent.prototype.onClear = function () {
2383
- this.file = null;
2384
- this.onChange.emit(this.file);
2385
- this.el.nativeElement.value = '';
2386
- };
2387
- FileComponent.prototype.onClickChoose = function () {
2388
- this.el.nativeElement.click();
2389
- };
2390
- FileComponent.prototype.onChangeFile = function (e) {
2391
- e.preventDefault();
2392
- if (e.srcElement.files[0]) {
2393
- this.file = e.srcElement.files[0];
2394
- this.onChange.emit(this.file);
2395
- }
2396
- };
2397
- __decorate([
2398
- Input(),
2399
- __metadata("design:type", Object)
2400
- ], FileComponent.prototype, "name", void 0);
2401
- __decorate([
2402
- Input(),
2403
- __metadata("design:type", Object)
2404
- ], FileComponent.prototype, "label", void 0);
2405
- __decorate([
2406
- Input(),
2407
- __metadata("design:type", String)
2408
- ], FileComponent.prototype, "accept", void 0);
2409
- __decorate([
2410
- Input(),
2411
- __metadata("design:type", Object)
2412
- ], FileComponent.prototype, "required", void 0);
2413
- __decorate([
2414
- Input(),
2415
- __metadata("design:type", Object)
2416
- ], FileComponent.prototype, "error", void 0);
2417
- __decorate([
2418
- Output(),
2419
- __metadata("design:type", EventEmitter)
2420
- ], FileComponent.prototype, "onChange", void 0);
2421
- __decorate([
2422
- ViewChild('fileInput', { static: false }),
2423
- __metadata("design:type", ElementRef)
2424
- ], FileComponent.prototype, "el", void 0);
2425
- FileComponent = __decorate([
2426
- Component({
2427
- selector: 'in-file',
2428
- template: "<span *ngIf=\"label\" class=\"c-label__content\">\n {{label}}\n <span *ngIf=\"required\" class=\"c-label__req\">*</span>\n<span *ngIf=\"error\" class=\"c-label__sub_is-error\">{{error}}</span>\n </span>\n<in-button (click)=\"onClickChoose()\" *ngIf=\"file\" [label]=\"file.name\"></in-button>\n<in-button (click)=\"onClear()\" *ngIf=\"file\" label=\"X\"></in-button>\n<in-button (click)=\"onClickChoose()\" *ngIf=\"!file\" [label]=\"'Select file' | translate\"></in-button>\n\n<div class=\"hide\"><input #fileInput (change)=\"onChangeFile($event)\" [accept]=\"accept\" type=\"file\"/></div>\n",
2429
- styles: [".hide{display:none}"]
2430
- })
2431
- ], FileComponent);
2432
- return FileComponent;
2433
- }());
2434
-
2435
- var SelectButtonComponent = /** @class */ (function () {
2436
- function SelectButtonComponent(cdRef) {
2437
- this.cdRef = cdRef;
2438
- this.name = '';
2439
- this.testId = '';
2440
- this.label = '';
2441
- this.icon = '';
2442
- this.error = '';
2443
- this.iconPos = 'left';
2444
- this.options = [];
2445
- this.required = false;
2446
- this.multiple = false;
2447
- this.focus = new EventEmitter();
2448
- this.blur = new EventEmitter();
2449
- this.click = new EventEmitter();
2450
- this.change = new EventEmitter();
2451
- this.selected = [];
2452
- this.propagateChange = function (_) {
2453
- };
2454
- }
2455
- SelectButtonComponent_1 = SelectButtonComponent;
2456
- SelectButtonComponent.prototype.ngOnInit = function () {
2457
- };
2458
- SelectButtonComponent.prototype.ngOnChanges = function () {
2459
- if (this.initial) {
2460
- this.selected = this.initial;
2461
- }
2462
- else {
2463
- this.selected = [];
2464
- }
2465
- };
2466
- SelectButtonComponent.prototype.clickButton = function (option) {
2467
- var _this = this;
2468
- if (option.readonly) {
2469
- return false;
2470
- }
2471
- if (this.multiple) {
2472
- if (this.selected.indexOf(option.value) !== -1) {
2473
- this.selected = this.selected.filter(function (item) { return item !== option.value; });
2474
- }
2475
- else {
2476
- this.selected.push(option.value);
2477
- }
2478
- this.value = this.options.filter(function (item) { return _this.selected.indexOf(item.value) !== -1; }).map(function (val) { return val.value; });
2479
- }
2480
- else {
2481
- this.selected = [option.value];
2482
- this.value = option.value;
2483
- }
2484
- this.cdRef.detectChanges();
2485
- this.onChange();
2486
- };
2487
- /**
2488
- * Write form value to the DOM element (model => view)
2489
- */
2490
- SelectButtonComponent.prototype.writeValue = function (value) {
2491
- this.value = value;
2492
- if (value !== null && value !== undefined) {
2493
- if (Array.isArray(value)) {
2494
- this.selected = value.map(function (val) { return val; });
2495
- }
2496
- else {
2497
- this.selected = [value];
2498
- }
2499
- }
2500
- this.cdRef.detectChanges();
2501
- };
2502
- /**
2503
- * Write form disabled state to the DOM element (model => view)
2504
- */
2505
- SelectButtonComponent.prototype.setDisabledState = function (isDisabled) {
2506
- this.disabled = isDisabled;
2507
- };
2508
- /**
2509
- * Update form when DOM element value changes (view => model)
2510
- */
2511
- SelectButtonComponent.prototype.registerOnChange = function (fn) {
2512
- // Store the provided function as an internal method.
2513
- this.propagateChange = fn;
2514
- };
2515
- /**
2516
- * Update form when DOM element is blurred (view => model)
2517
- */
2518
- SelectButtonComponent.prototype.registerOnTouched = function (fn) {
2519
- // Store the provided function as an internal method.
2520
- this.onTouched = fn;
2521
- };
2522
- SelectButtonComponent.prototype.onChange = function () {
2523
- this.propagateChange(this.value);
2524
- this.change.emit(this.value);
2525
- };
2526
- SelectButtonComponent.prototype.onTouched = function () {
2527
- };
2528
- var SelectButtonComponent_1;
2529
- SelectButtonComponent.ctorParameters = function () { return [
2530
- { type: ChangeDetectorRef }
2531
- ]; };
2532
- __decorate([
2533
- Input(),
2534
- __metadata("design:type", Object)
2535
- ], SelectButtonComponent.prototype, "name", void 0);
2536
- __decorate([
2537
- Input(),
2538
- __metadata("design:type", Object)
2539
- ], SelectButtonComponent.prototype, "testId", void 0);
2540
- __decorate([
2541
- Input(),
2542
- __metadata("design:type", Object)
2543
- ], SelectButtonComponent.prototype, "label", void 0);
2544
- __decorate([
2545
- Input(),
2546
- __metadata("design:type", Object)
2547
- ], SelectButtonComponent.prototype, "icon", void 0);
2548
- __decorate([
2549
- Input(),
2550
- __metadata("design:type", Object)
2551
- ], SelectButtonComponent.prototype, "error", void 0);
2552
- __decorate([
2553
- Input(),
2554
- __metadata("design:type", String)
2555
- ], SelectButtonComponent.prototype, "iconPos", void 0);
2556
- __decorate([
2557
- Input(),
2558
- __metadata("design:type", Array)
2559
- ], SelectButtonComponent.prototype, "options", void 0);
2560
- __decorate([
2561
- Input(),
2562
- __metadata("design:type", Boolean)
2563
- ], SelectButtonComponent.prototype, "disabled", void 0);
2564
- __decorate([
2565
- Input(),
2566
- __metadata("design:type", Object)
2567
- ], SelectButtonComponent.prototype, "required", void 0);
2568
- __decorate([
2569
- Input(),
2570
- __metadata("design:type", Object)
2571
- ], SelectButtonComponent.prototype, "multiple", void 0);
2572
- __decorate([
2573
- Input(),
2574
- __metadata("design:type", Array)
2575
- ], SelectButtonComponent.prototype, "initial", void 0);
2576
- __decorate([
2577
- Output(),
2578
- __metadata("design:type", EventEmitter)
2579
- ], SelectButtonComponent.prototype, "focus", void 0);
2580
- __decorate([
2581
- Output(),
2582
- __metadata("design:type", EventEmitter)
2583
- ], SelectButtonComponent.prototype, "blur", void 0);
2584
- __decorate([
2585
- Output(),
2586
- __metadata("design:type", EventEmitter)
2587
- ], SelectButtonComponent.prototype, "click", void 0);
2588
- __decorate([
2589
- Output(),
2590
- __metadata("design:type", EventEmitter)
2591
- ], SelectButtonComponent.prototype, "change", void 0);
2592
- SelectButtonComponent = SelectButtonComponent_1 = __decorate([
2593
- Component({
2594
- selector: 'in-select-button',
2595
- template: "<span *ngIf=\"label\" class=\"c-label__content\">\n {{label}}\n <span *ngIf=\"required\" class=\"c-label__req\">*</span>\n <span *ngIf=\"error\" class=\"c-label__sub_is-error\">{{error}}</span>\n </span>\n<div class=\"container\">\n <in-button class=\"button-none\"></in-button>\n <in-button (click)=\"clickButton(option)\"\n *ngFor=\"let option of options\"\n [color]=\"selected.indexOf(option.value) === -1 ? 'normal': 'primary' \"\n [icon]=\"option.icon\"\n [label]=\"option.label | translate\"\n [testId]=\"'filter-buttons-' + option.value\"\n [title]=\"option.title ? (option.title | translate) : ''\"\n [name] = option.label\n [disabled]=\"option.readonly\"\n >\n </in-button>\n</div>\n",
2596
- providers: [
2597
- {
2598
- provide: NG_VALUE_ACCESSOR,
2599
- useExisting: forwardRef(function () { return SelectButtonComponent_1; }),
2600
- multi: true,
2601
- }
2602
- ],
2603
- styles: [".container{white-space:nowrap}in-button ::ng-deep button{outline:0}in-button:first-child ::ng-deep button{border-bottom-right-radius:0;border-top-right-radius:0;border-right:1px solid #000}in-button:not(:first-child):not(:last-child) ::ng-deep button{border-radius:0;border-right:1px solid #000}in-button:last-child ::ng-deep button{border-bottom-left-radius:0;border-top-left-radius:0}.button-none{display:none}"]
2604
- }),
2605
- __metadata("design:paramtypes", [ChangeDetectorRef])
2606
- ], SelectButtonComponent);
2607
- return SelectButtonComponent;
2608
- }());
2609
-
2610
- var StatusCircleComponent = /** @class */ (function () {
2611
- function StatusCircleComponent() {
2612
- this.label = '';
2613
- this.title = '';
2614
- this.icon = '';
2615
- this.showLabel = true;
2616
- this.mode = 'success';
2617
- this.size = 'normal';
2618
- this.content = '';
2619
- }
2620
- __decorate([
2621
- Input(),
2622
- __metadata("design:type", Object)
2623
- ], StatusCircleComponent.prototype, "label", void 0);
2624
- __decorate([
2625
- Input(),
2626
- __metadata("design:type", Object)
2627
- ], StatusCircleComponent.prototype, "title", void 0);
2628
- __decorate([
2629
- Input(),
2630
- __metadata("design:type", Object)
2631
- ], StatusCircleComponent.prototype, "icon", void 0);
2632
- __decorate([
2633
- Input(),
2634
- __metadata("design:type", Object)
2635
- ], StatusCircleComponent.prototype, "showLabel", void 0);
2636
- __decorate([
2637
- Input(),
2638
- __metadata("design:type", String)
2639
- ], StatusCircleComponent.prototype, "mode", void 0);
2640
- __decorate([
2641
- Input(),
2642
- __metadata("design:type", String)
2643
- ], StatusCircleComponent.prototype, "size", void 0);
2644
- __decorate([
2645
- Input(),
2646
- __metadata("design:type", Object)
2647
- ], StatusCircleComponent.prototype, "content", void 0);
2648
- StatusCircleComponent = __decorate([
2649
- Component({
2650
- selector: 'in-status-circle',
2651
- template: "<div [ngClass]=\"{'icon': icon ,'has-content': content!==''}\"\n class=\"circle-container {{size}}\"\n title=\"{{title ? title : label}}\">\n <span class=\"circle {{mode}}\">\n <in-svg *ngIf=\"icon\" [src]=\"icon\"></in-svg>\n <span *ngIf=\"content!==''\" class=\"content\">{{content}}</span>\n </span>\n <span *ngIf=\"showLabel && label\" class=\"label\">{{label}}</span>\n</div>\n",
2652
- encapsulation: ViewEncapsulation.Emulated,
2653
- styles: ["@charset \"UTF-8\";:host{display:inline-block;line-height:0}.circle-container{font-size:14px;display:inline-block}.circle-container.small{font-size:12px}.circle-container.small .circle{width:8px;height:8px}.circle-container.normal .circle{width:12px;height:12px}.circle-container.big .circle{min-width:20px;min-height:20px}.circle-container.mini{margin-top:-2px;position:relative;padding:0;top:-3px}.circle-container.mini .circle{width:4px;height:4px}.circle{display:inline-flex;align-items:center;justify-content:center;color:var(--colorTextOnStatus);border-radius:20px;position:relative}.circle in-svg{position:absolute;left:50%;top:50%;height:18px;width:18px;transform:translate(-50%,-50%)}.falsevalue{background:var(--colorFalseValue)}.success{background:var(--colorSuccess)}.warning{background:var(--colorWarning)}.error{background:var(--colorError)}.none{background:var(--colorNoControl)}.critical{background:var(--colorCritical)}.primary{background:var(--ids-theme-primary,#78f4ff)}.inverse{background:var(--colorIcon,#78f4ff);color:var(--colorTextInverse)}.black{background:#000}.label{margin-left:6px}.content{display:inline-block;line-height:100%;padding:0 5px}"]
2654
- })
2655
- ], StatusCircleComponent);
2656
- return StatusCircleComponent;
2657
- }());
2658
-
2659
- var SvgComponent = /** @class */ (function (_super) {
2660
- __extends(SvgComponent, _super);
2661
- function SvgComponent() {
2662
- var _this = _super !== null && _super.apply(this, arguments) || this;
2663
- _this.size = 'normal';
2664
- _this.width = '100%';
2665
- _this.height = '100%';
2666
- return _this;
2667
- }
2668
- __decorate([
2669
- Input(),
2670
- __metadata("design:type", String)
2671
- ], SvgComponent.prototype, "size", void 0);
2672
- __decorate([
2673
- Input(),
2674
- __metadata("design:type", Object)
2675
- ], SvgComponent.prototype, "width", void 0);
2676
- __decorate([
2677
- Input(),
2678
- __metadata("design:type", Object)
2679
- ], SvgComponent.prototype, "height", void 0);
2680
- __decorate([
2681
- Input(),
2682
- __metadata("design:type", String)
2683
- ], SvgComponent.prototype, "src", void 0);
2684
- SvgComponent = __decorate([
2685
- Component({
2686
- selector: 'in-svg',
2687
- template: "<span [inlineSVG]=\"src\"\n [ngClass]=\"{svg: true, 'c-icon_svg-small': size === 'small', 'c-icon_svg-large': size === 'large'}\" [ngStyle]=\"{width: width, height: height}\"></span>\n\n",
2688
- styles: [".svg{display:inline-flex;align-items:center;justify-content:center}.c-icon_svg-small{width:16px;height:16px}:host{display:inline-block}"]
2689
- })
2690
- ], SvgComponent);
2691
- return SvgComponent;
2692
- }(Button));
2693
-
2694
- var SwitcherComponent = /** @class */ (function () {
2695
- function SwitcherComponent(element, cdRef, router) {
2696
- this.element = element;
2697
- this.cdRef = cdRef;
2698
- this.router = router;
2699
- this.name = null;
2700
- this.label = null;
2701
- this.error = null;
2702
- this.iconOff = '';
2703
- this.iconOn = '';
2704
- this.labelOff = 'Off';
2705
- this.labelOn = 'On';
2706
- this.faIconOn = '';
2707
- this.faIconOff = '';
2708
- this.id = null;
2709
- this.change = new EventEmitter();
2710
- this._isBoolean = false;
2711
- this.propagateChange = function (_) {
2712
- };
2713
- }
2714
- SwitcherComponent_1 = SwitcherComponent;
2715
- SwitcherComponent.prototype.ngOnInit = function () {
2716
- this._isBoolean = typeof this.value === 'boolean';
2717
- this.value = typeof this.value === 'string' ? JSON.parse(this.value) : !!this.value;
2718
- };
2719
- SwitcherComponent.prototype.ngOnChanges = function (changes) {
2720
- };
2721
- /**
2722
- * Write form value to the DOM element (model => view)
2723
- */
2724
- SwitcherComponent.prototype.writeValue = function (value) {
2725
- this._isBoolean = typeof value === 'boolean';
2726
- this.value = value;
2727
- this.cdRef.detectChanges();
2728
- };
2729
- /**
2730
- * Write form disabled state to the DOM element (model => view)
2731
- */
2732
- SwitcherComponent.prototype.setDisabledState = function (isDisabled) {
2733
- this.disabled = isDisabled;
2734
- };
2735
- /**
2736
- * Update form when DOM element value changes (view => model)
2737
- */
2738
- SwitcherComponent.prototype.registerOnChange = function (fn) {
2739
- // Store the provided function as an internal method.
2740
- this.propagateChange = fn;
2741
- };
2742
- /**
2743
- * Update form when DOM element is blurred (view => model)
2744
- */
2745
- SwitcherComponent.prototype.registerOnTouched = function (fn) {
2746
- // Store the provided function as an internal method.
2747
- this.onTouched = fn;
2748
- };
2749
- SwitcherComponent.prototype.onChange = function (e) {
2750
- e.stopPropagation();
2751
- e.preventDefault();
2752
- if (this._isBoolean) {
2753
- this.propagateChange(this.value);
2754
- this.change.emit(this.value);
2755
- }
2756
- else {
2757
- this.propagateChange(this.value ? 1 : 0);
2758
- this.change.emit(this.value ? 1 : 0);
2759
- }
2760
- };
2761
- SwitcherComponent.prototype.onTouched = function () {
2762
- };
2763
- var SwitcherComponent_1;
2764
- SwitcherComponent.ctorParameters = function () { return [
2765
- { type: ElementRef },
2766
- { type: ChangeDetectorRef },
2767
- { type: Router }
2768
- ]; };
2769
- __decorate([
2770
- Input(),
2771
- __metadata("design:type", Object)
2772
- ], SwitcherComponent.prototype, "name", void 0);
2773
- __decorate([
2774
- Input(),
2775
- __metadata("design:type", Object)
2776
- ], SwitcherComponent.prototype, "label", void 0);
2777
- __decorate([
2778
- Input(),
2779
- __metadata("design:type", Object)
2780
- ], SwitcherComponent.prototype, "error", void 0);
2781
- __decorate([
2782
- Input(),
2783
- __metadata("design:type", Object)
2784
- ], SwitcherComponent.prototype, "iconOff", void 0);
2785
- __decorate([
2786
- Input(),
2787
- __metadata("design:type", Object)
2788
- ], SwitcherComponent.prototype, "iconOn", void 0);
2789
- __decorate([
2790
- Input(),
2791
- __metadata("design:type", Object)
2792
- ], SwitcherComponent.prototype, "labelOff", void 0);
2793
- __decorate([
2794
- Input(),
2795
- __metadata("design:type", Object)
2796
- ], SwitcherComponent.prototype, "labelOn", void 0);
2797
- __decorate([
2798
- Input(),
2799
- __metadata("design:type", Object)
2800
- ], SwitcherComponent.prototype, "faIconOn", void 0);
2801
- __decorate([
2802
- Input(),
2803
- __metadata("design:type", Object)
2804
- ], SwitcherComponent.prototype, "faIconOff", void 0);
2805
- __decorate([
2806
- Input(),
2807
- __metadata("design:type", Object)
2808
- ], SwitcherComponent.prototype, "id", void 0);
2809
- __decorate([
2810
- Input(),
2811
- __metadata("design:type", Boolean)
2812
- ], SwitcherComponent.prototype, "disabled", void 0);
2813
- __decorate([
2814
- Input(),
2815
- __metadata("design:type", Boolean)
2816
- ], SwitcherComponent.prototype, "waiting", void 0);
2817
- __decorate([
2818
- Output(),
2819
- __metadata("design:type", EventEmitter)
2820
- ], SwitcherComponent.prototype, "change", void 0);
2821
- SwitcherComponent = SwitcherComponent_1 = __decorate([
2822
- Component({
2823
- selector: 'in-switcher',
2824
- template: "<label class=\"c-checkbox c-checkbox_switch container\">\n <span *ngIf=\"label\" class=\"label\">{{label}}</span>\n <span class=\"switcher-container\">\n <span class=\"c-checkbox__label u-vertical-align-middle u-text_center\">\n <span *ngIf=\"!iconOff\">{{labelOff | translate}}</span>\n <span *ngIf=\"faIconOff\"><i class=\"fa\" [ngClass]=\"faIconOff\"></i></span>\n <in-svg *ngIf=\"iconOff\" [src]=\"iconOff\" height=\"48px\" size=\"large\" width=\"48px\"></in-svg>\n </span>\n <input *ngIf=\"!waiting\" (change)=\"onChange($event)\"\n [(ngModel)]=\"value\"\n [checked]=\"value\" [disabled]=\"disabled\"\n class=\"c-checkbox__input\"\n name=\"element_name\"\n type=\"checkbox\"/>\n <i *ngIf=\"!waiting\" class=\"c-checkbox__icon u-margin-left-tiny u-vertical-align-baseline\"></i>\n <span *ngIf = \"waiting\" class=\"c-spinner \" style = \"display: inline-block; width:50px; text-align: center\"><i class=\"fa fa-circle-o-notch fa-spin \"></i></span>\n <span class=\"c-spinner c-checkbox__label u-vertical-align-middle u-text_center\">\n <span *ngIf=\"!iconOn\">{{labelOn | translate}}</span>\n <span *ngIf=\"faIconOn\"><i class=\"fa\" [ngClass]=\"faIconOn\"></i></span>\n <in-svg *ngIf=\"iconOn\" [src]=\"iconOn\" height=\"48px\" size=\"large\" width=\"48px\"></in-svg>\n </span>\n </span>\n</label>\n",
2825
- providers: [
2826
- {
2827
- provide: NG_VALUE_ACCESSOR,
2828
- useExisting: forwardRef(function () { return SwitcherComponent_1; }),
2829
- multi: true,
2830
- }
2831
- ],
2832
- styles: [".container{display:inline-flex;align-items:center;justify-content:center;flex-direction:column}.c-checkbox_switch .c-checkbox__icon{height:30px}.c-checkbox{margin-right:0}.label{font-size:11px;font-weight:700;display:block;text-align:center;text-transform:uppercase;margin-bottom:2px}.switcher-container{display:flex;align-items:center;justify-content:center}"]
2833
- }),
2834
- __metadata("design:paramtypes", [ElementRef, ChangeDetectorRef, Router])
2835
- ], SwitcherComponent);
2836
- return SwitcherComponent;
2837
- }());
2838
-
2839
- var InlineMessageComponent = /** @class */ (function () {
2840
- function InlineMessageComponent() {
2841
- this.message = '';
2842
- this.align = 'center';
2843
- }
2844
- __decorate([
2845
- Input(),
2846
- __metadata("design:type", Object)
2847
- ], InlineMessageComponent.prototype, "message", void 0);
2848
- __decorate([
2849
- Input(),
2850
- __metadata("design:type", String)
2851
- ], InlineMessageComponent.prototype, "align", void 0);
2852
- InlineMessageComponent = __decorate([
2853
- Component({
2854
- selector: 'in-inline-message',
2855
- template: "<div [ngClass]=\"align\" class=\"message\">\n {{message}}\n <ng-content></ng-content>\n</div>\n",
2856
- styles: [".message{padding:12px 0;text-align:center;color:#aaa}.message.left{text-align:left}.message.right{text-align:right}"]
2857
- })
2858
- ], InlineMessageComponent);
2859
- return InlineMessageComponent;
2860
- }());
2861
-
2862
- var LinkComponent = /** @class */ (function () {
2863
- function LinkComponent() {
2864
- this.color = 'normal';
2865
- this.name = '';
2866
- this.testId = '';
2867
- this.label = '';
2868
- this.icon = '';
2869
- this.className = '';
2870
- this.svg = '';
2871
- this.link = '';
2872
- /**
2873
- * external - ссылка на внешний источник
2874
- * internal - ссылка внутри приложения
2875
- * auto - определяется автоматически исходя из link
2876
- */
2877
- this.linkType = 'auto';
2878
- /**
2879
- * self - открывается в этом же окне
2880
- * blank - открывается в новом окне
2881
- * auto - определяется автоматически исходя из linkType
2882
- */
2883
- this.linkTarget = 'auto';
2884
- // Отображает кнопку нажатой
2885
- this.pressed = false;
2886
- this.disabled = false;
2887
- this.iconPos = 'left';
2888
- this.menuItems = [];
2889
- this.focus = new EventEmitter();
2890
- this.blur = new EventEmitter();
2891
- this.click = new EventEmitter();
2892
- this.style = {};
2893
- this._target = '_self';
2894
- this._linkType = 'auto';
2895
- this.isMaterialIcon = false;
2896
- }
2897
- LinkComponent.prototype.ngOnInit = function () {
2898
- this.updateData();
2899
- };
2900
- LinkComponent.prototype.ngOnChanges = function (changes) {
2901
- this.updateData();
2902
- };
2903
- LinkComponent.prototype.updateData = function () {
2904
- this._linkType = this.linkType;
2905
- if (this._linkType === 'auto') {
2906
- if ((this.link.indexOf('://') !== -1 || this.link.indexOf('//') === 0)) {
2907
- this._linkType = 'external';
2908
- }
2909
- else {
2910
- this._linkType = 'internal';
2911
- }
2912
- }
2913
- if (this.linkTarget === 'auto') {
2914
- if (this._linkType === 'external') {
2915
- this._target = '_blank';
2916
- }
2917
- else {
2918
- this._target = '_self';
2919
- }
2920
- }
2921
- else {
2922
- this._target = this.linkTarget === 'self' ? '_self' : 'blank';
2923
- }
2924
- if (this.icon && this.icon.indexOf('fa-') === -1) {
2925
- this.isMaterialIcon = true;
2926
- }
2927
- else {
2928
- this.isMaterialIcon = false;
2929
- }
2930
- };
2931
- LinkComponent.prototype._onClick = function ($event) {
2932
- // if (!this.link) {
2933
- // $event.stopPropagation();
2934
- // $event.preventDefault();
2935
- // this.click.emit($event);
2936
- // }
2937
- if (this.menuItems.length) {
2938
- this._menu.toggle($event);
2939
- }
2940
- };
2941
- __decorate([
2942
- Input(),
2943
- __metadata("design:type", String)
2944
- ], LinkComponent.prototype, "color", void 0);
2945
- __decorate([
2946
- Input(),
2947
- __metadata("design:type", Object)
2948
- ], LinkComponent.prototype, "name", void 0);
2949
- __decorate([
2950
- Input(),
2951
- __metadata("design:type", Object)
2952
- ], LinkComponent.prototype, "testId", void 0);
2953
- __decorate([
2954
- Input(),
2955
- __metadata("design:type", Object)
2956
- ], LinkComponent.prototype, "label", void 0);
2957
- __decorate([
2958
- Input(),
2959
- __metadata("design:type", Object)
2960
- ], LinkComponent.prototype, "icon", void 0);
2961
- __decorate([
2962
- Input(),
2963
- __metadata("design:type", Object)
2964
- ], LinkComponent.prototype, "className", void 0);
2965
- __decorate([
2966
- Input(),
2967
- __metadata("design:type", Object)
2968
- ], LinkComponent.prototype, "svg", void 0);
2969
- __decorate([
2970
- Input(),
2971
- __metadata("design:type", Object)
2972
- ], LinkComponent.prototype, "link", void 0);
2973
- __decorate([
2974
- Input(),
2975
- __metadata("design:type", String)
2976
- ], LinkComponent.prototype, "linkType", void 0);
2977
- __decorate([
2978
- Input(),
2979
- __metadata("design:type", String)
2980
- ], LinkComponent.prototype, "linkTarget", void 0);
2981
- __decorate([
2982
- Input(),
2983
- __metadata("design:type", Object)
2984
- ], LinkComponent.prototype, "pressed", void 0);
2985
- __decorate([
2986
- Input(),
2987
- __metadata("design:type", Object)
2988
- ], LinkComponent.prototype, "disabled", void 0);
2989
- __decorate([
2990
- Input(),
2991
- __metadata("design:type", String)
2992
- ], LinkComponent.prototype, "iconPos", void 0);
2993
- __decorate([
2994
- Input(),
2995
- __metadata("design:type", Array)
2996
- ], LinkComponent.prototype, "menuItems", void 0);
2997
- __decorate([
2998
- ViewChild(Menu, { static: false }),
2999
- __metadata("design:type", Menu)
3000
- ], LinkComponent.prototype, "_menu", void 0);
3001
- __decorate([
3002
- Output(),
3003
- __metadata("design:type", EventEmitter)
3004
- ], LinkComponent.prototype, "focus", void 0);
3005
- __decorate([
3006
- Output(),
3007
- __metadata("design:type", EventEmitter)
3008
- ], LinkComponent.prototype, "blur", void 0);
3009
- __decorate([
3010
- Output(),
3011
- __metadata("design:type", EventEmitter)
3012
- ], LinkComponent.prototype, "click", void 0);
3013
- LinkComponent = __decorate([
3014
- Component({
3015
- selector: 'in-link',
3016
- template: "<a (blur)=\"blur.emit($event)\"\n (focus)=\"focus.emit($event)\"\n *ngIf=\"link &&_linkType ==='external'\"\n [class]=\"className\"\n [href]=\"link\"\n [ngClass]=\"{'ui-link ui-state-default ui-corner-all ui-link-transparency':true,\n 'ui-link-text-icon-left': ((icon || svg) && label && iconPos === 'left'),\n 'ui-link-text-icon-right': ((icon || svg) && label && iconPos === 'right'),\n 'ui-link-text-only': (!(icon || svg) && label),\n 'ui-link-text-empty': (!(icon || svg) && !label),\n 'ui-link-svg': svg,\n 'ui-link-material': isMaterialIcon,\n 'ui-state-disabled': disabled,\n 'ui-link-primary': color === 'primary',\n 'ui-link-secondary': color === 'secondary',\n 'ui-link-danger': color === 'danger'}\"\n [style]=\"style\" [target]=\"_target\">\n <ng-container *ngTemplateOutlet=\"content;\"></ng-container>\n</a>\n<a (blur)=\"blur.emit($event)\"\n (focus)=\"focus.emit($event)\"\n *ngIf=\"link && _linkType ==='internal'\"\n [class]=\"className\"\n [ngClass]=\"{'ui-link ui-state-default ui-corner-all ui-link-transparency':true,\n 'ui-link-text-icon-left': ((icon || svg) && label && iconPos === 'left'),\n 'ui-link-text-icon-right': ((icon || svg) && label && iconPos === 'right'),\n 'ui-link-text-only': (!(icon || svg) && label),\n 'ui-link-text-empty': (!(icon || svg) && !label),\n 'ui-link-svg': svg,\n 'ui-link-material': isMaterialIcon,\n 'ui-state-disabled': disabled,\n 'ui-link-primary': color === 'primary',\n 'ui-link-secondary': color === 'secondary',\n 'ui-link-danger': color === 'danger'}\"\n [routerLink]=\"link\"\n [style]=\"style\" [target]=\"_target\">\n <ng-container *ngTemplateOutlet=\"content;\"></ng-container>\n</a>\n<span (blur)=\"blur.emit($event)\"\n (click)=\"_onClick($event)\"\n (focus)=\"focus.emit($event)\"\n *ngIf=\"!link\"\n [class]=\"className\"\n [ngClass]=\"{'ui-link ui-state-default ui-corner-all ui-link-transparency':true,\n 'ui-link-text-icon-left': ((icon || svg) && label && iconPos === 'left'),\n 'ui-link-text-icon-right': ((icon || svg) && label && iconPos === 'right'),\n 'ui-link-text-only': (!(icon || svg) && label),\n 'ui-link-text-empty': (!(icon || svg) && !label),\n 'ui-link-svg': svg,\n 'ui-link-material': isMaterialIcon,\n 'ui-state-disabled': disabled,\n 'ui-link-primary': color === 'primary',\n 'ui-link-secondary': color === 'secondary',\n 'ui-link-danger': color === 'danger'}\" [style]=\"style\">\n <ng-container *ngTemplateOutlet=\"content;\"></ng-container>\n</span>\n<p-menu *ngIf=\"menuItems.length\" [model]=\"menuItems\" [popup]=\"true\" appendTo=\"body\" styleClass=\"button-menu\"></p-menu>\n\n<ng-template #content>\n <span *ngIf=\"!isMaterialIcon && icon\" [class]=\"icon\"\n [ngClass]=\"{'ui-clickable': true,\n 'ui-link-icon-left': (iconPos === 'left'),\n 'ui-link-icon-right': (iconPos === 'right')}\"></span>\n <span *ngIf=\"isMaterialIcon && icon\" [ngClass]=\"{'ui-clickable': true,\n 'ui-link-icon-left': (iconPos === 'left'),\n 'ui-link-icon-right': (iconPos === 'right')}\"\n ><i class=\"material-icons\">{{icon}}</i></span>\n <span *ngIf=\"svg\" [ngClass]=\"{'ui-clickable': true,\n 'ui-link-icon-left': (iconPos === 'left'),\n 'ui-link-icon-right': (iconPos === 'right')}\">\n <in-svg [src]=\"svg\" height=\"20px\" width=\"20px\"></in-svg>\n </span>\n <span class=\"ui-link-text ui-clickable\">{{label}}</span>\n\n</ng-template>\n",
3017
- styles: [".ui-link{text-decoration:none;color:var(--colorLink);cursor:pointer;margin-right:0;display:inline-flex;align-items:center;justify-content:center}.ui-link.ui-link-secondary{color:var(--colorTextSecondary)}.ui-link:hover{color:var(--colorLink)}.ui-link:hover .ui-link-text{text-decoration:underline;color:var(--colorLink)}button{outline:0}.ui-link-icon-only .ui-link-icon-left{margin-top:-9px}.ui-link-text{vertical-align:middle}.ui-link-text-icon-left .ui-link-text{padding-left:.6em}.ui-link-icon-only{font-size:18px;display:inline-flex;align-items:center;justify-content:center}.ui-link-icon-only .svg{display:inline-block;line-height:0}.ui-link-transparency{background:0 0}.ui-link.ui-link-svg .ui-clickable{height:20px}.ui-link.ui-link-svg .ui-link-icon-left{left:6px;margin-top:-2px}.ui-link.ui-link-svg.ui-link-icon-only .ui-link-icon-left{left:50%;width:auto;transform:translate(-50%,-50%);margin-left:0;margin-top:0}.ui-link-material .material-icons{font-size:16px}:host .ui-menu .ui-menuitem-link{font-size:16px}"]
3018
- })
3019
- ], LinkComponent);
3020
- return LinkComponent;
3021
- }());
3022
-
3023
- var TooltipComponent = /** @class */ (function () {
3024
- function TooltipComponent() {
3025
- }
3026
- TooltipComponent.prototype.ngOnInit = function () {
3027
- };
3028
- TooltipComponent = __decorate([
3029
- Component({
3030
- selector: 'in-tooltip',
3031
- template: "<div class=\"c-tooltip c-tooltip_left\">\n <ng-content></ng-content>\n <div class=\"c-tooltip__content\" style=\"width: 12em;\" >\n <ng-content select=\"tooltip_content\"></ng-content>\n </div>\n</div>\n\n",
3032
- changeDetection: ChangeDetectionStrategy.OnPush,
3033
- styles: [".c-tooltip{display:inline-block;position:relative;text-align:left;overflow:visible}.c-tooltip:hover .c-tooltip__content{visibility:visible;opacity:1}.c-tooltip_left>.c-tooltip__content{left:auto;right:100%;top:50%;bottom:auto;margin-right:12px;border-top-right-radius:0}.c-tooltip_left>.c-tooltip__content:before{border-top-color:var(--colorBgLevel2,#282a31);border-left-color:var(--colorBgLevel2,#282a31)}.c-tooltip__content{position:absolute;width:auto;margin:0 0 12px;padding:9px 12px;font-size:13px;font-weight:400;letter-spacing:normal;border-radius:3px;line-height:1.64286;visibility:hidden;opacity:0;transition:opacity .3s linear;z-index:1070;background:var(--colorBgLevel2,#282a31);color:var(--ids-theme-text-color,#fff);white-space:normal;text-transform:none}"]
3034
- }),
3035
- __metadata("design:paramtypes", [])
3036
- ], TooltipComponent);
3037
- return TooltipComponent;
3038
- }());
3039
-
3040
- var TreeTableComponent = /** @class */ (function () {
3041
- function TreeTableComponent() {
3042
- this.columns = [];
3043
- this.values = [];
3044
- this.checkboxSelection = true;
3045
- this.activeChange = new EventEmitter();
3046
- this.selectionChange = new EventEmitter();
3047
- this.addAction = new EventEmitter();
3048
- this.csvAction = new EventEmitter();
3049
- this.saveAction = new EventEmitter();
3050
- this.collapseAction = new EventEmitter();
3051
- this.removeAction = new EventEmitter();
3052
- this.unlinkAction = new EventEmitter();
3053
- this.groupEditAction = new EventEmitter();
3054
- this.groupAddAction = new EventEmitter();
3055
- this.rowIndex = 0;
3056
- this.isCollapse = true;
3057
- this._selection = null;
3058
- }
3059
- Object.defineProperty(TreeTableComponent.prototype, "selection", {
3060
- set: function (val) {
3061
- this._selection = val;
3062
- },
3063
- enumerable: true,
3064
- configurable: true
3065
- });
3066
- Object.defineProperty(TreeTableComponent.prototype, "selectionValue", {
3067
- get: function () {
3068
- return this._selection;
3069
- },
3070
- set: function (val) {
3071
- this._selection = val;
3072
- this.selectionChange.emit(val);
3073
- },
3074
- enumerable: true,
3075
- configurable: true
3076
- });
3077
- TreeTableComponent.prototype.isRowActive = function (row) {
3078
- return this.active && this.active.id === row.id;
3079
- };
3080
- TreeTableComponent.prototype.visibleColumns = function () {
3081
- return this.columns.filter(function (column) { return !column.isHidden; });
3082
- };
3083
- TreeTableComponent.prototype.columnsChange = function (data) {
3084
- data.column.isHidden = !data.event;
3085
- };
3086
- TreeTableComponent.prototype.ngAfterContentInit = function () {
3087
- var _this = this;
3088
- this.templates.forEach(function (item) {
3089
- switch (item.getType()) {
3090
- case 'caption':
3091
- _this.captionTemplate = item.template;
3092
- break;
3093
- case 'header':
3094
- _this.headerTemplate = item.template;
3095
- break;
3096
- case 'body':
3097
- _this.bodyTemplate = item.template;
3098
- break;
3099
- case 'value':
3100
- _this.valueTemplate = item.template;
3101
- break;
3102
- case 'loadingbody':
3103
- _this.loadingBodyTemplate = item.template;
3104
- break;
3105
- case 'footer':
3106
- _this.footerTemplate = item.template;
3107
- break;
3108
- case 'summary':
3109
- _this.summaryTemplate = item.template;
3110
- break;
3111
- case 'colgroup':
3112
- _this.colGroupTemplate = item.template;
3113
- break;
3114
- case 'rowexpansion':
3115
- _this.expandedRowTemplate = item.template;
3116
- break;
3117
- case 'frozenrows':
3118
- _this.frozenRowsTemplate = item.template;
3119
- break;
3120
- case 'frozenheader':
3121
- _this.frozenHeaderTemplate = item.template;
3122
- break;
3123
- case 'frozenbody':
3124
- _this.frozenBodyTemplate = item.template;
3125
- break;
3126
- case 'frozenfooter':
3127
- _this.frozenFooterTemplate = item.template;
3128
- break;
3129
- case 'frozencolgroup':
3130
- _this.frozenColGroupTemplate = item.template;
3131
- break;
3132
- case 'emptymessage':
3133
- _this.emptyMessageTemplate = item.template;
3134
- break;
3135
- case 'paginatorleft':
3136
- _this.paginatorLeftTemplate = item.template;
3137
- break;
3138
- case 'paginatorright':
3139
- _this.paginatorRightTemplate = item.template;
3140
- break;
3141
- }
3142
- });
3143
- };
3144
- TreeTableComponent.prototype.collapse = function (event, dt) {
3145
- var _this = this;
3146
- this.values.forEach(function (node) {
3147
- _this.toggleCollapse(node, _this.isCollapse);
3148
- });
3149
- this.isCollapse = !this.isCollapse;
3150
- dt.filterGlobal(this.searchText, 'contains');
3151
- };
3152
- TreeTableComponent.prototype.toggleCollapse = function (node, isCollapsed) {
3153
- var e_1, _a;
3154
- if (node.children) {
3155
- node.expanded = isCollapsed;
3156
- try {
3157
- for (var _b = __values(node.children), _c = _b.next(); !_c.done; _c = _b.next()) {
3158
- var cn = _c.value;
3159
- if (cn) {
3160
- this.toggleCollapse(cn, isCollapsed);
3161
- }
3162
- }
3163
- }
3164
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
3165
- finally {
3166
- try {
3167
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
3168
- }
3169
- finally { if (e_1) throw e_1.error; }
3170
- }
3171
- }
3172
- };
3173
- __decorate([
3174
- Input(),
3175
- __metadata("design:type", Array)
3176
- ], TreeTableComponent.prototype, "columns", void 0);
3177
- __decorate([
3178
- Input(),
3179
- __metadata("design:type", Object)
3180
- ], TreeTableComponent.prototype, "values", void 0);
3181
- __decorate([
3182
- Input(),
3183
- __metadata("design:type", String)
3184
- ], TreeTableComponent.prototype, "scrollHeight", void 0);
3185
- __decorate([
3186
- Input(),
3187
- __metadata("design:type", Boolean)
3188
- ], TreeTableComponent.prototype, "scrollable", void 0);
3189
- __decorate([
3190
- Input(),
3191
- __metadata("design:type", String)
3192
- ], TreeTableComponent.prototype, "selectionMode", void 0);
3193
- __decorate([
3194
- Input(),
3195
- __metadata("design:type", String)
3196
- ], TreeTableComponent.prototype, "label", void 0);
3197
- __decorate([
3198
- Input(),
3199
- __metadata("design:type", String)
3200
- ], TreeTableComponent.prototype, "error", void 0);
3201
- __decorate([
3202
- Input(),
3203
- __metadata("design:type", String)
3204
- ], TreeTableComponent.prototype, "class", void 0);
3205
- __decorate([
3206
- Input(),
3207
- __metadata("design:type", Boolean)
3208
- ], TreeTableComponent.prototype, "required", void 0);
3209
- __decorate([
3210
- Input(),
3211
- __metadata("design:type", Object)
3212
- ], TreeTableComponent.prototype, "style", void 0);
3213
- __decorate([
3214
- Input(),
3215
- __metadata("design:type", Object)
3216
- ], TreeTableComponent.prototype, "toolbar", void 0);
3217
- __decorate([
3218
- Input(),
3219
- __metadata("design:type", Object)
3220
- ], TreeTableComponent.prototype, "checkboxSelection", void 0);
3221
- __decorate([
3222
- Input(),
3223
- __metadata("design:type", Object)
3224
- ], TreeTableComponent.prototype, "active", void 0);
3225
- __decorate([
3226
- Input(),
3227
- __metadata("design:type", Object)
3228
- ], TreeTableComponent.prototype, "sortField", void 0);
3229
- __decorate([
3230
- Input(),
3231
- __metadata("design:type", Object)
3232
- ], TreeTableComponent.prototype, "isAscending", void 0);
3233
- __decorate([
3234
- Input(),
3235
- __metadata("design:type", Object)
3236
- ], TreeTableComponent.prototype, "dataKey", void 0);
3237
- __decorate([
3238
- Output(),
3239
- __metadata("design:type", Object)
3240
- ], TreeTableComponent.prototype, "activeChange", void 0);
3241
- __decorate([
3242
- ContentChildren(InsparkTemplate),
3243
- __metadata("design:type", QueryList)
3244
- ], TreeTableComponent.prototype, "templates", void 0);
3245
- __decorate([
3246
- Output(),
3247
- __metadata("design:type", EventEmitter)
3248
- ], TreeTableComponent.prototype, "selectionChange", void 0);
3249
- __decorate([
3250
- Output(),
3251
- __metadata("design:type", EventEmitter)
3252
- ], TreeTableComponent.prototype, "addAction", void 0);
3253
- __decorate([
3254
- Output(),
3255
- __metadata("design:type", EventEmitter)
3256
- ], TreeTableComponent.prototype, "csvAction", void 0);
3257
- __decorate([
3258
- Output(),
3259
- __metadata("design:type", EventEmitter)
3260
- ], TreeTableComponent.prototype, "saveAction", void 0);
3261
- __decorate([
3262
- Output(),
3263
- __metadata("design:type", EventEmitter)
3264
- ], TreeTableComponent.prototype, "collapseAction", void 0);
3265
- __decorate([
3266
- Output(),
3267
- __metadata("design:type", EventEmitter)
3268
- ], TreeTableComponent.prototype, "removeAction", void 0);
3269
- __decorate([
3270
- Output(),
3271
- __metadata("design:type", EventEmitter)
3272
- ], TreeTableComponent.prototype, "unlinkAction", void 0);
3273
- __decorate([
3274
- Output(),
3275
- __metadata("design:type", EventEmitter)
3276
- ], TreeTableComponent.prototype, "groupEditAction", void 0);
3277
- __decorate([
3278
- Output(),
3279
- __metadata("design:type", EventEmitter)
3280
- ], TreeTableComponent.prototype, "groupAddAction", void 0);
3281
- __decorate([
3282
- Input(),
3283
- __metadata("design:type", Object),
3284
- __metadata("design:paramtypes", [Object])
3285
- ], TreeTableComponent.prototype, "selection", null);
3286
- TreeTableComponent = __decorate([
3287
- Component({
3288
- selector: 'in-tree-table',
3289
- template: "<p-treeTable #dt\n [(selection)]=\"selectionValue\"\n [class]=\"class\"\n [columns]=\"visibleColumns()\"\n [resizableColumns]=\"true\"\n [scrollHeight]=\"scrollHeight\"\n [scrollable]=\"scrollable\"\n [selectionMode]=\"selectionMode\"\n [sortField]=\"sortField || 'id'\"\n [sortOrder]=\"isAscending ? 1 : -1\"\n [style]=\"style\"\n [value]=\"values\"\n columnResizeMode=\"expand\"\n>\n <ng-template let-columns pTemplate=\"colgroup\">\n <colgroup>\n <col *ngIf=\"checkboxSelection\" style=\"width:44px;\">\n <col *ngFor=\"let col of visibleColumns()\" [style.width]=\"col.width ? col.width : '10px'\">\n </colgroup>\n </ng-template>\n <ng-template let-columns pTemplate=\"header\">\n <tr>\n <th *ngIf=\"checkboxSelection\">\n <p-treeTableHeaderCheckbox></p-treeTableHeaderCheckbox>\n </th>\n <th *ngFor=\"let col of columns; let i = index\" [ttSortableColumn]=\"col.field\" class=\"u-position-relative\"\n ttResizableColumn>\n <div class=\"ui-treetable-thead-title\" title=\"{{col.label | translate}}\">\n {{col.label | translate}}\n </div>\n <p-treeTableSortIcon [field]=\"col.field\" class=\"ui-sortable-column-buttons\"></p-treeTableSortIcon>\n </th>\n </tr>\n </ng-template>\n\n <ng-template let-columns=\"columns\" let-rowData=\"rowData\" let-rowNode pTemplate=\"body\">\n <tr [ngClass]=\"{row_active: isRowActive(rowData)}\" [ttSelectableRow]=\"rowNode\" class=\"row\">\n <td *ngIf=\"checkboxSelection\">\n <p-treeTableCheckbox [value]=\"rowNode\"></p-treeTableCheckbox>\n </td>\n <td (click)=\"activeChange.emit(rowData)\" *ngFor=\"let col of columns; let i = index\"\n class=\"_u-overflow-visible\">\n <div class=\"\" style=\"display: flex; flex-wrap: nowrap;\">\n <ng-template [ngIf]=\"i == 0\">\n <p-treeTableToggler [rowNode]=\"rowNode\" style=\"align-self: center;\"></p-treeTableToggler>\n </ng-template>\n <div [ngClass]=\"{ 'ui-treetable-tbody-content_has-toggler ': i == 0 }\"\n class=\"ui-treetable-tbody-content cell-content_hover\"\n style=\"flex-grow: 1;\"\n title=\"{{rowData | propertyValue: col.field}}\">\n <ng-container *ngIf=\"!valueTemplate\">\n <i *ngIf=\"rowData.icon && i == 0\" [ngClass]=\"rowData.icon\" class=\"u-margin-right-tiny\"></i>\n {{rowData | propertyValue: col.field}}\n </ng-container>\n\n <ng-container\n *ngTemplateOutlet=\"valueTemplate; context: {$implicit: { data: rowData, col: col}}\"></ng-container>\n </div>\n </div>\n </td>\n </tr>\n </ng-template>\n\n <ng-template *ngIf=\"toolbar\" pTemplate=\"caption\">\n\n <div class=\"o-grid o-grid_no-gutter\">\n <div class=\"c-tree-table__toolbar-content u-display-inline-flex\">\n <div class=\"c-form c-form_inline u-display-inline-block\">\n <form class=\"c-label\">\n <div class=\"input-wrapper u-margin-right-tiny\">\n <input #searchTextInput\n (input)=\"dt.filterGlobal($event.target.value, 'contains')\"\n [(ngModel)]=\"searchText\"\n [ngModelOptions]=\"{standalone: true}\"\n autofocus=\"\"\n class=\"search-box c-input c-input_small ng-pristine ng-valid ng-scope ng-empty ng-touched\"\n pInputText\n placeholder=\"{{('SHARED.SEARCH' | translate) + ':'}}\"\n required\n style=\"padding-right: 28px\"\n tabindex=\"1\"\n type=\"search\"\n >\n <button (click)=\"dt.filterGlobal($event.target.value, 'contains')\" class=\"button-reset\" type=\"reset\"\n [attr.title]=\"'Reset' | translate\">\n <i class=\"fa fa-close\"></i>\n </button>\n </div>\n </form>\n </div>\n <div class=\"c-btn c-btn_border-free c-btn_small\">\n <in-table-columns-multiselect (columnsChange)=\"columnsChange($event)\"\n [columns]=\"columns\"></in-table-columns-multiselect>\n </div>\n\n <button (click)=\"addAction.emit($event)\" *ngIf=\"toolbar.add\" [disabled]=\"toolbar.add.disabled\"\n class=\"c-btn c-btn_border-free c-btn_small\"\n >\n <i class=\"fa fa-plus\" [title]=\"toolbar.add.title || '\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C'\"></i>\n </button>\n\n <button (click)=\"groupAddAction.emit($event)\" *ngIf=\"toolbar.groupAdd\" [disabled]=\"toolbar.groupAdd.disabled\"\n class=\"c-btn c-btn_border-free c-btn_small\"\n >\n <i class=\"fa fa-folder\" [title]=\"toolbar.groupAdd.title || '\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0433\u0440\u0443\u043F\u043F\u0443'\"></i>\n </button>\n\n\n <button (click)=\"saveAction.emit($event)\" *ngIf=\"toolbar.save\"\n [disabled]=\"toolbar.save.disabled\"\n class=\"c-btn c-btn_primary c-btn_small\"\n title=\"{{'Save' | translate}}\"\n >\n {{'Save' | translate}}\n </button>\n <button (click)=\"groupEditAction.emit($event)\" *ngIf=\"toolbar.groupEdit && toolbar.groupEdit.active\"\n [disabled]=\"toolbar.groupEdit.disabled\"\n class=\"c-btn c-btn_border-free c-btn_small\">\n <i class=\"fa fa-pencil-square-o\" title=\"{{'groupEdit' | translate}}\"></i>\n </button>\n <button (click)=\"removeAction.emit($event)\" *ngIf=\"toolbar.remove && toolbar.remove.active\"\n [disabled]=\"toolbar.remove.disabled\"\n class=\"c-btn c-btn_border-free c-btn_small\">\n <i class=\"fa fa-trash\" [title]=\"toolbar.remove?.title || '\u0423\u0434\u0430\u043B\u0438\u0442\u044C'\"></i>\n </button>\n <button (click)=\"unlinkAction.emit($event)\" *ngIf=\"toolbar.unlink\" [disabled]=\"toolbar.unlink.disabled\"\n class=\"c-btn c-btn_border-free c-btn_small\">\n <i class=\"fa fa-unlink\" title=\"{{'Detach tag from selected items' | translate}}\"></i>\n </button>\n <button (click)=\"csvAction.emit($event)\" *ngIf=\"toolbar.csv\" [disabled]=\"toolbar.csv.disabled\"\n class=\"c-btn c-btn_border-free c-btn_small\"\n >\n <i class=\"fas fa-file-csv\" title=\"\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C \u043A\u0430\u043A CSV\"></i>\n </button>\n <button *ngIf=\"toolbar.collapse\"\n class=\"c-btn c-btn_small c-btn_svg-24 c-icon c-icon_svg c-icon_svg-24 c-btn_border-free\"\n (click)=\"collapse($event, dt)\"\n title=\"{{(isCollapse ? 'Expand all' : 'Collapse all') | translate}}\">\n <svg *ngIf=\"isCollapse\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" fill=\"currentColor\" viewBox=\"0 0 24 24\">\n <path d=\"M20 2H4v2h16V2zM4 20v2h16v-2H4zM12 5l5 6H7l5-6zM17 13l-5 6-5-6h10z\"/>\n </svg>\n <svg *ngIf=\"!isCollapse\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" fill=\"currentColor\" viewBox=\"0 0 24 24\">\n <path fill-rule=\"evenodd\" d=\"M17 3l-5 6-5-6h10zM4 13v-2h16v2H4zm8 2l5 6H7l5-6z\" clip-rule=\"evenodd\"/>\n </svg>\n </button>\n </div>\n </div>\n </ng-template>\n</p-treeTable>\n",
3290
- entryComponents: [],
3291
- styles: ["@charset \"UTF-8\";.ui-sortable-column{cursor:pointer;position:relative}.ui-sortable-column-buttons{position:absolute;top:0;right:0;width:18px;height:100%;display:inline-flex;align-items:center;z-index:10000}.ui-sortable-column-buttons>a{position:absolute;top:50%;right:0;left:0;transform:translateY(-50%)}.u-overflow-visible{overflow:visible!important}.button-reset{display:flex;align-items:center;position:absolute;right:6px;top:5px;padding:6px;font-size:15px;border:none;outline:0;cursor:pointer;color:var(--colorTextMuted);background-color:transparent}.button-reset:hover{color:var(--colorIcon)}.input-wrapper{position:relative;display:flex;align-items:baseline}.c-input:not(:valid)~.button-reset{display:none}"]
3292
- })
3293
- ], TreeTableComponent);
3294
- return TreeTableComponent;
3295
- }());
3296
- var TreeTableComponentModule = /** @class */ (function () {
3297
- function TreeTableComponentModule() {
3298
- }
3299
- TreeTableComponentModule = __decorate([
3300
- NgModule({
3301
- imports: [CommonModule, TreeTableModule, PipesModule, TranslateModule, FormsModule, TableComponentModule],
3302
- exports: [TreeTableComponent],
3303
- declarations: [TreeTableComponent]
3304
- })
3305
- ], TreeTableComponentModule);
3306
- return TreeTableComponentModule;
3307
- }());
3308
-
3309
- var RadiobuttonComponent = /** @class */ (function () {
3310
- function RadiobuttonComponent() {
3311
- this.name = null;
3312
- this.label = null;
3313
- this.required = false;
3314
- this.error = null;
3315
- this.placeholder = '';
3316
- this.id = null;
3317
- this.change = new EventEmitter();
3318
- }
3319
- RadiobuttonComponent.prototype.onChangeEvent = function (value) {
3320
- this.change.next({ name: this.name, value: value });
3321
- };
3322
- __decorate([
3323
- Input(),
3324
- __metadata("design:type", Object)
3325
- ], RadiobuttonComponent.prototype, "name", void 0);
3326
- __decorate([
3327
- Input(),
3328
- __metadata("design:type", Object)
3329
- ], RadiobuttonComponent.prototype, "label", void 0);
3330
- __decorate([
3331
- Input(),
3332
- __metadata("design:type", Object)
3333
- ], RadiobuttonComponent.prototype, "required", void 0);
3334
- __decorate([
3335
- Input(),
3336
- __metadata("design:type", Object)
3337
- ], RadiobuttonComponent.prototype, "error", void 0);
3338
- __decorate([
3339
- Input(),
3340
- __metadata("design:type", Object)
3341
- ], RadiobuttonComponent.prototype, "placeholder", void 0);
3342
- __decorate([
3343
- Input(),
3344
- __metadata("design:type", Object)
3345
- ], RadiobuttonComponent.prototype, "id", void 0);
3346
- __decorate([
3347
- Input(),
3348
- __metadata("design:type", Boolean)
3349
- ], RadiobuttonComponent.prototype, "disabled", void 0);
3350
- __decorate([
3351
- Input(),
3352
- __metadata("design:type", Object)
3353
- ], RadiobuttonComponent.prototype, "value", void 0);
3354
- __decorate([
3355
- Input(),
3356
- __metadata("design:type", Object)
3357
- ], RadiobuttonComponent.prototype, "values", void 0);
3358
- __decorate([
3359
- Input(),
3360
- __metadata("design:type", Object)
3361
- ], RadiobuttonComponent.prototype, "keyLabel", void 0);
3362
- __decorate([
3363
- Input(),
3364
- __metadata("design:type", Object)
3365
- ], RadiobuttonComponent.prototype, "item", void 0);
3366
- __decorate([
3367
- Output(),
3368
- __metadata("design:type", Object)
3369
- ], RadiobuttonComponent.prototype, "change", void 0);
3370
- RadiobuttonComponent = __decorate([
3371
- Component({
3372
- selector: 'in-radiobutton',
3373
- template: "<ng-container *ngFor=\"let element of values\">\n <p-radioButton\n class=\"u-margin-left-tiny u-vertical-align-middle field_{{name}}\"\n (onClick)=\"onChangeEvent(element)\"\n [id]=\"element[keyLabel]\"\n [(ngModel)]=\"item\"\n [name]=\"name\"\n [value]=\"element.id\"\n [disabled]=\"disabled\"\n [label]=\"element[keyLabel]\">\n </p-radioButton>\n</ng-container>\n",
3374
- changeDetection: ChangeDetectionStrategy.OnPush,
3375
- styles: [""]
3376
- }),
3377
- __metadata("design:paramtypes", [])
3378
- ], RadiobuttonComponent);
3379
- return RadiobuttonComponent;
3380
- }());
3381
-
3382
- var SelectListComponent = /** @class */ (function () {
3383
- function SelectListComponent(ref, config, messageService, router) {
3384
- this.ref = ref;
3385
- this.config = config;
3386
- this.messageService = messageService;
3387
- this.router = router;
3388
- this.options = null;
3389
- this.isShowSpinner = false;
3390
- }
3391
- SelectListComponent.prototype.ngOnInit = function () {
3392
- this.options = this.config.data.command.options.map(function (item) {
3393
- return { value: item, checked: false };
3394
- });
3395
- this.selected = Array(this.options.length).fill(false);
3396
- };
3397
- SelectListComponent.prototype.closeModal = function (val) {
3398
- if (val === void 0) { val = null; }
3399
- this.ref.close(val);
3400
- };
3401
- SelectListComponent.prototype.applySelection = function () {
3402
- if (!this.selected) {
3403
- this.messageService.message(gettext('Select object'));
3404
- return;
3405
- }
3406
- else {
3407
- this.closeModal({ selected: this.options.filter(function (o) { return o.checked; }) });
3408
- }
3409
- };
3410
- SelectListComponent.prototype.select = function (i) {
3411
- this.options[i].checked = !this.options[i].checked;
3412
- };
3413
- SelectListComponent.prototype.highlight = function (value, text) {
3414
- var regex = new RegExp('(' + text + ')', 'gi');
3415
- return value.replace(regex, '<span class="u-text-highlight">$1</span>');
3416
- };
3417
- SelectListComponent.ctorParameters = function () { return [
3418
- { type: DynamicDialogRef },
3419
- { type: DynamicDialogConfig },
3420
- { type: InsparkMessageService },
3421
- { type: Router }
3422
- ]; };
3423
- SelectListComponent = __decorate([
3424
- Component({
3425
- selector: 'app-select-list',
3426
- template: "<div class=\"c-panel__heading-title h4\">\n {{'Select objects for which to execute the command' | translate}}\n</div>\n<span *ngIf=\"isShowSpinner\"><ng-container *ngTemplateOutlet=\"spinner\"></ng-container></span>\n<div class=\"container\">\n <div class=\"c-form-group type_treeblock\">\n <div style=\"overflow: hidden; width: 100%; white-space: nowrap; display: inline-flex;\" *ngFor=\"let item of options; let i = index\">\n <span class=\"c-label c-label__content\" style=\"width: 100px; min-height: 30px;\">{{item.value}}</span>\n <input class=\"c-checkbox__input\" type=\"checkbox\" [checked]=\"options[i].checked\" >\n <i class=\"ui-chkbox-box c-checkbox__icon\" (click)=\"select(i)\"></i>\n </div>\n\n </div>\n <div class=\"buttons\">\n <in-component-container>\n <in-button id=\"close\" (click)=\"closeModal()\"\n label=\"{{'Cancel' | translate}}\"></in-button>\n <in-button id=\"edit\" (click)=\"applySelection()\" type=\"submit\"\n label=\"{{'Apply' | translate}}\"\n color=\"primary\" [disabled]=\"\" [title]=\"'Select an action' | translate\"></in-button>\n </in-component-container>\n </div>\n</div>\n\n<ng-template #spinner><span class=\"c-spinner\">\n <i class=\"fa fa-circle-o-notch fa-spin \"></i>\n</span></ng-template>\n",
3427
- styles: [".buttons{text-align:right}.buttons p-button{margin-left:8px}.container{padding:12px}:host ::ng-deep .c-select_block{position:relative;left:10px;width:30%}:host ::ng-deep .c-input_small{width:50%}:host ::ng-deep .my-tree{width:100%;display:inline-block;position:relative}:host ::ng-deep .my-tree .c-inputtext{width:500px}"]
3428
- }),
3429
- __metadata("design:paramtypes", [DynamicDialogRef,
3430
- DynamicDialogConfig,
3431
- InsparkMessageService,
3432
- Router])
3433
- ], SelectListComponent);
3434
- return SelectListComponent;
3435
- }());
3436
-
3437
- var ObjectTreeComponent = /** @class */ (function () {
3438
- function ObjectTreeComponent() {
3439
- }
3440
- ObjectTreeComponent.prototype.ngOnInit = function () {
3441
- };
3442
- ObjectTreeComponent = __decorate([
3443
- Component({
3444
- selector: 'in-object-tree',
3445
- template: "<p>object-tree works!</p>\n",
3446
- changeDetection: ChangeDetectionStrategy.OnPush,
3447
- styles: [""]
3448
- }),
3449
- __metadata("design:paramtypes", [])
3450
- ], ObjectTreeComponent);
3451
- return ObjectTreeComponent;
3452
- }());
3453
-
3454
- var ModalInputTextComponent = /** @class */ (function () {
3455
- function ModalInputTextComponent(ref, config, translateService, messageService, router) {
3456
- this.ref = ref;
3457
- this.config = config;
3458
- this.translateService = translateService;
3459
- this.messageService = messageService;
3460
- this.router = router;
3461
- this.options = null;
3462
- this.isShowSpinner = false;
3463
- this.maxLength = 0;
3464
- }
3465
- ModalInputTextComponent.prototype.ngOnInit = function () {
3466
- this.param = this.config.data.command.param;
3467
- this.options = this.config.data.command.options.map(function (item) {
3468
- return { value: item, checked: false };
3469
- });
3470
- if (this.options && this.options.length > 0) {
3471
- this.calculateWidth();
3472
- }
3473
- this.selected = Array(this.options.length).fill(false);
3474
- };
3475
- ModalInputTextComponent.prototype.closeModal = function (val) {
3476
- if (val === void 0) { val = null; }
3477
- this.ref.close(val);
3478
- };
3479
- ModalInputTextComponent.prototype.applySelection = function () {
3480
- if (!this.selected) {
3481
- this.messageService.message(gettext('Select object'));
3482
- return;
3483
- }
3484
- else {
3485
- this.closeModal({
3486
- selected: this.options.filter(function (o) { return o.checked; }),
3487
- param: this.param ? this.param.value : undefined
3488
- });
3489
- }
3490
- };
3491
- ModalInputTextComponent.prototype.select = function (i) {
3492
- this.options[i].checked = !this.options[i].checked;
3493
- };
3494
- ModalInputTextComponent.prototype.checkSelected = function () {
3495
- if (this.param) {
3496
- return !this.param.value;
3497
- }
3498
- else if (this.options) {
3499
- return this.options.filter(function (opt) { return opt.checked; }).length === 0;
3500
- }
3501
- return false;
3502
- };
3503
- ModalInputTextComponent.prototype.highlight = function (value, text) {
3504
- var regex = new RegExp('(' + text + ')', 'gi');
3505
- return value.replace(regex, '<span class="u-text-highlight">$1</span>');
3506
- };
3507
- ModalInputTextComponent.prototype.calculateWidth = function () {
3508
- var _this = this;
3509
- this.options.forEach(function (opt) {
3510
- if (opt.value.length * 7 > _this.maxLength) {
3511
- _this.maxLength = opt.value.length * 7 + 100;
3512
- }
3513
- });
3514
- };
3515
- ModalInputTextComponent.prototype.translate = function (str) {
3516
- var _this = this;
3517
- var splited = str.split('\n');
3518
- var translated = '';
3519
- splited.forEach(function (s) { return translated += _this.translateService.instant(s) + '\n'; });
3520
- return translated;
3521
- };
3522
- ModalInputTextComponent.ctorParameters = function () { return [
3523
- { type: DynamicDialogRef },
3524
- { type: DynamicDialogConfig },
3525
- { type: TranslateService },
3526
- { type: InsparkMessageService },
3527
- { type: Router }
3528
- ]; };
3529
- ModalInputTextComponent = __decorate([
3530
- Component({
3531
- selector: 'app-modal-input-text',
3532
- template: "<div class=\"c-panel__heading-title h4\">\n {{'Enter parameter value' | translate}}\n</div>\n<span *ngIf=\"isShowSpinner\"><ng-container *ngTemplateOutlet=\"spinner\"></ng-container></span>\n<div class=\"container\">\n <div *ngIf = this.options class=\"c-form-group type_treeblock\">\n <div *ngFor=\"let item of options; let i = index\">\n <label class=\"c-label type_bool\" style=\"overflow: hidden; width: 100%; white-space: nowrap; display: inline-flex;\">\n <span class=\"c-onecolumn-form_label__content\" [style.width]=\"maxLength + 'px'\" style=\"position: relative; top: 5px; min-height: 30px;\">\n {{item.value}}\n </span>\n <span class=\"c-onecolumn-form_label__content field_{{item.value}}\" style=\"min-height: 30px;\">\n <input class=\"c-checkbox__input field_{{item.value}}\" type=\"checkbox\" [checked]=\"options[i].checked\" (click)=\"select(i)\">\n <i class=\"ui-chkbox-box c-checkbox__icon\" ></i>\n </span>\n </label>\n </div>\n </div>\n\n <div *ngIf=this.param class=\"o-grid o-grid_wrap\">\n <div class=\"o-grid__cell o-grid__cell_width-100 o-grid__cell_width-100@medium o-grid__cell_width-100@large\">\n <div class=\"c-form-group\">\n <label class=\"c-label type_varchars\">\n <span class=\"c-label__content\" style=\"width: 500px;white-space: pre-line\">{{translate(param.title)}}</span>\n <input [(ngModel)]=\"param.value\" class=\"c-input c-input_block field_{{config.data.command.label}}\" type=\"text\" maxlength=\"60\">\n </label>\n </div>\n </div>\n </div>\n <div class=\"buttons\">\n <in-component-container>\n <in-button id=\"close\" (click)=\"closeModal()\"\n label=\"{{'Cancel' | translate}}\"\n [name]=\"'Cancel'\"\n ></in-button>\n <in-button id=\"edit\" (click)=\"applySelection()\" type=\"submit\"\n label=\"{{'Apply' | translate}}\"\n [name]=\"'Apply'\"\n color=\"primary\" [disabled]=\"checkSelected()\" [title]=\"'Select an action' | translate\"></in-button>\n </in-component-container>\n </div>\n</div>\n\n<ng-template #spinner><span class=\"c-spinner\">\n <i class=\"fa fa-circle-o-notch fa-spin \"></i>\n</span></ng-template>\n",
3533
- styles: [".buttons{text-align:right}.buttons p-button{margin-left:8px}.container{padding:12px}:host ::ng-deep .c-select_block{position:relative;left:10px;width:30%}:host ::ng-deep .c-input_small{width:50%}:host ::ng-deep .my-tree{width:100%;display:inline-block;position:relative}:host ::ng-deep .my-tree .c-inputtext{width:500px}"]
3534
- }),
3535
- __metadata("design:paramtypes", [DynamicDialogRef,
3536
- DynamicDialogConfig,
3537
- TranslateService,
3538
- InsparkMessageService,
3539
- Router])
3540
- ], ModalInputTextComponent);
3541
- return ModalInputTextComponent;
3542
- }());
3543
-
3544
- var ContentToggleComponent = /** @class */ (function () {
3545
- function ContentToggleComponent(cdr) {
3546
- this.cdr = cdr;
3547
- this.defaultOpen = true;
3548
- this.isOpen = this.defaultOpen;
3549
- this.icon = null;
3550
- this.manualArrow = true;
3551
- this.toggle = new EventEmitter();
3552
- }
3553
- ContentToggleComponent.prototype.ngOnInit = function () {
3554
- this.isOpen = this.defaultOpen;
3555
- };
3556
- ContentToggleComponent.prototype.toggleOpen = function (e) {
3557
- // Получаем родительский элемент div
3558
- var parentElement = this.elementButtons.nativeElement;
3559
- // Проверяем, входит ли цель события в родительский элемент
3560
- if (!parentElement.contains(e.target) || e.target === parentElement) {
3561
- this.isOpen = !this.isOpen;
3562
- this.toggle.emit(this.isOpen);
3563
- this.cdr.detectChanges();
3564
- }
3565
- };
3566
- ContentToggleComponent.ctorParameters = function () { return [
3567
- { type: ChangeDetectorRef }
3568
- ]; };
3569
- __decorate([
3570
- Input(),
3571
- __metadata("design:type", Object)
3572
- ], ContentToggleComponent.prototype, "label", void 0);
3573
- __decorate([
3574
- Input(),
3575
- __metadata("design:type", Boolean)
3576
- ], ContentToggleComponent.prototype, "defaultOpen", void 0);
3577
- __decorate([
3578
- Input(),
3579
- __metadata("design:type", Object)
3580
- ], ContentToggleComponent.prototype, "isOpen", void 0);
3581
- __decorate([
3582
- Input(),
3583
- __metadata("design:type", String)
3584
- ], ContentToggleComponent.prototype, "icon", void 0);
3585
- __decorate([
3586
- Input(),
3587
- __metadata("design:type", Boolean)
3588
- ], ContentToggleComponent.prototype, "manualArrow", void 0);
3589
- __decorate([
3590
- Output(),
3591
- __metadata("design:type", EventEmitter)
3592
- ], ContentToggleComponent.prototype, "toggle", void 0);
3593
- __decorate([
3594
- ViewChild('buttons', { static: true }),
3595
- __metadata("design:type", ElementRef)
3596
- ], ContentToggleComponent.prototype, "elementButtons", void 0);
3597
- ContentToggleComponent = __decorate([
3598
- Component({
3599
- selector: 'in-content-toggle',
3600
- template: "<div class=\"block\" (click)=\"toggleOpen($event)\" tabIndex=\"1\">\n <span [ngClass]=\"{arrow: true, close: !isOpen}\">\n <in-svg *ngIf=\"manualArrow\" [src]=\"'arrow-down.svg'\" width=\"48px\" height=\"48px\"></in-svg>\n <ng-content select=\"[arrow]\"></ng-content>\n </span>\n <span class=\"label\">\n <in-svg *ngIf=\"icon\" class=\"label-icon\" [src]=\"icon\"></in-svg>\n {{label}}\n </span>\n <span class=\"counter\">\n <ng-content select=\"[header]\"></ng-content>\n </span>\n <div class=\"buttons\" #buttons>\n <ng-content select=\"[buttons]\"></ng-content>\n </div>\n</div>\n<div class=\"container\" *ngIf=\"isOpen\">\n <ng-content select=\"[body]\"></ng-content>\n</div>\n",
3601
- styles: ["@charset \"UTF-8\";.block{font-size:12px;text-transform:uppercase;cursor:pointer;display:flex;white-space:nowrap}.block .buttons{flex:1;display:flex;justify-content:flex-end;align-items:center;-webkit-user-select:none;-moz-user-select:none;user-select:none}.block:hover{background:var(--colorBgLevel2)}.block>span{display:inline-block;margin-right:4px}.block .label{margin-right:8px;display:flex;align-items:center;overflow:hidden;text-overflow:ellipsis}.block .counter{display:flex;align-items:center;padding-right:8px}.block .arrow{margin-right:0}.block .arrow.close{transform:rotate(-90deg)}.label-icon{margin-right:4px;width:16px;height:16px}"]
3602
- }),
3603
- __metadata("design:paramtypes", [ChangeDetectorRef])
3604
- ], ContentToggleComponent);
3605
- return ContentToggleComponent;
3606
- }());
3607
-
3608
- var InputGroupComponent = /** @class */ (function () {
3609
- function InputGroupComponent() {
3610
- this.name = null;
3611
- this.measureunit = null;
3612
- this.autocomplete = true;
3613
- this.label = null;
3614
- this.required = false;
3615
- this.error = null;
3616
- this.size = 100000;
3617
- this.maxlength = 100000;
3618
- this.width = 'auto';
3619
- this.placeholder = '';
3620
- this.id = null;
3621
- this.testId = null;
3622
- this.opacity = true;
3623
- this.shadow = false;
3624
- this.isEditMode = true;
3625
- this.focus = new EventEmitter();
3626
- this.blur = new EventEmitter();
3627
- this.updateValue = new EventEmitter();
3628
- this.disableEditableView = new EventEmitter();
3629
- this.validators = [/^-?\d*\.?\d*$/];
3630
- this.isEditable = true;
3631
- this.propagateChange = function (_) {
3632
- };
3633
- }
3634
- InputGroupComponent_1 = InputGroupComponent;
3635
- InputGroupComponent.prototype.ngOnInit = function () {
3636
- this._value = this.value;
3637
- };
3638
- /**
3639
- * Write form value to the DOM element (model => view)
3640
- */
3641
- InputGroupComponent.prototype.writeValue = function (value) {
3642
- this.value = value ? value : this.name;
3643
- this._value = this.value;
3644
- };
3645
- /**
3646
- * Write form disabled state to the DOM element (model => view)
3647
- */
3648
- InputGroupComponent.prototype.setDisabledState = function (isDisabled) {
3649
- this.disabled = isDisabled;
3650
- };
3651
- /**
3652
- * Update form when DOM element value changes (view => model)
3653
- */
3654
- InputGroupComponent.prototype.registerOnChange = function (fn) {
3655
- // Store the provided function as an internal method.
3656
- this.propagateChange = fn;
3657
- };
3658
- /**
3659
- * Update form when DOM element is blurred (view => model)
3660
- */
3661
- InputGroupComponent.prototype.registerOnTouched = function (fn) {
3662
- // Store the provided function as an internal method.
3663
- this.onTouched = fn;
3664
- };
3665
- InputGroupComponent.prototype.onChange = function (_) {
3666
- this.propagateChange(this.value);
3667
- };
3668
- InputGroupComponent.prototype.onTouched = function () {
3669
- };
3670
- InputGroupComponent.prototype.cancel = function () {
3671
- this.isEditable = false;
3672
- this.disableEditableView.emit(false);
3673
- this.value = this._value;
3674
- };
3675
- InputGroupComponent.prototype.numberOnly = function (event) {
3676
- if (event.keyCode === 8) {
3677
- return true;
3678
- }
3679
- var test = '';
3680
- if (this.value) {
3681
- test = this.value + event.key;
3682
- }
3683
- else {
3684
- test = event.key;
3685
- }
3686
- return this.validators[0].test(test);
3687
- };
3688
- InputGroupComponent.prototype.changeEditMode = function () {
3689
- this.isEditable = !this.isEditable;
3690
- };
3691
- //
3692
- // disableEditableView() {
3693
- // this.isEditableView.emit(false);
3694
- // }
3695
- InputGroupComponent.prototype.changeValue = function (value) {
3696
- this.value = value;
3697
- this._value = this.value;
3698
- // this.isEditable = false;
3699
- this.updateValue.emit(value);
3700
- this.disableEditableView.emit(false);
3701
- };
3702
- InputGroupComponent.prototype.isApplyDisabled = function () {
3703
- return this.value != null ? false : true;
3704
- };
3705
- var InputGroupComponent_1;
3706
- __decorate([
3707
- Input(),
3708
- __metadata("design:type", Object)
3709
- ], InputGroupComponent.prototype, "name", void 0);
3710
- __decorate([
3711
- Input(),
3712
- __metadata("design:type", Object)
3713
- ], InputGroupComponent.prototype, "measureunit", void 0);
3714
- __decorate([
3715
- Input(),
3716
- __metadata("design:type", Object)
3717
- ], InputGroupComponent.prototype, "autocomplete", void 0);
3718
- __decorate([
3719
- Input(),
3720
- __metadata("design:type", Object)
3721
- ], InputGroupComponent.prototype, "label", void 0);
3722
- __decorate([
3723
- Input(),
3724
- __metadata("design:type", Object)
3725
- ], InputGroupComponent.prototype, "required", void 0);
3726
- __decorate([
3727
- Input(),
3728
- __metadata("design:type", Object)
3729
- ], InputGroupComponent.prototype, "error", void 0);
3730
- __decorate([
3731
- Input(),
3732
- __metadata("design:type", Object)
3733
- ], InputGroupComponent.prototype, "size", void 0);
3734
- __decorate([
3735
- Input(),
3736
- __metadata("design:type", Object)
3737
- ], InputGroupComponent.prototype, "maxlength", void 0);
3738
- __decorate([
3739
- Input(),
3740
- __metadata("design:type", Object)
3741
- ], InputGroupComponent.prototype, "width", void 0);
3742
- __decorate([
3743
- Input(),
3744
- __metadata("design:type", Object)
3745
- ], InputGroupComponent.prototype, "placeholder", void 0);
3746
- __decorate([
3747
- Input(),
3748
- __metadata("design:type", Object)
3749
- ], InputGroupComponent.prototype, "id", void 0);
3750
- __decorate([
3751
- Input(),
3752
- __metadata("design:type", Object)
3753
- ], InputGroupComponent.prototype, "testId", void 0);
3754
- __decorate([
3755
- Input(),
3756
- __metadata("design:type", Boolean)
3757
- ], InputGroupComponent.prototype, "disabled", void 0);
3758
- __decorate([
3759
- Input(),
3760
- __metadata("design:type", Object)
3761
- ], InputGroupComponent.prototype, "opacity", void 0);
3762
- __decorate([
3763
- Input(),
3764
- __metadata("design:type", Object)
3765
- ], InputGroupComponent.prototype, "shadow", void 0);
3766
- __decorate([
3767
- Input(),
3768
- __metadata("design:type", Object)
3769
- ], InputGroupComponent.prototype, "isEditMode", void 0);
3770
- __decorate([
3771
- Output(),
3772
- __metadata("design:type", EventEmitter)
3773
- ], InputGroupComponent.prototype, "focus", void 0);
3774
- __decorate([
3775
- Output(),
3776
- __metadata("design:type", EventEmitter)
3777
- ], InputGroupComponent.prototype, "blur", void 0);
3778
- __decorate([
3779
- Output(),
3780
- __metadata("design:type", EventEmitter)
3781
- ], InputGroupComponent.prototype, "updateValue", void 0);
3782
- __decorate([
3783
- Output(),
3784
- __metadata("design:type", EventEmitter)
3785
- ], InputGroupComponent.prototype, "disableEditableView", void 0);
3786
- InputGroupComponent = InputGroupComponent_1 = __decorate([
3787
- Component({
3788
- selector: 'in-input-group',
3789
- template: "<label class=\"label type_varchars\">\n <div class=\"ui-inputgroup\">\n <span class=\"ui-inputgroup-addon ui-inputgroup-addon_trancated\" title=\"{{measureunit}}\">\n <span class=\"ui-inputgroup-addon__content\">{{measureunit}}</span>\n </span>\n <input (focus)=\"this.focus.emit($event)\"\n (keydown)=\"numberOnly($event)\"\n [(ngModel)]=\"value\"\n [autocomplete]=\"autocomplete? 'on':'off'\"\n [disabled]=\"disabled || !isEditable\"\n [id]=\"id\"\n [maxlength]=\"30\"\n [ngStyle]=\"{textAlign: 'left', width: '100%'}\"\n [placeholder]=\"placeholder\"\n [required]=\"required\"\n [size]=\"size\"\n class=\"ui-inputtext c-input c-input_large field_{{id}}\"\n type=\"text\"/>\n <in-button (click)=\"changeValue(value)\"\n [color]=\"'primary'\"\n [disabled]=\"isApplyDisabled()\"\n [isIconOnly]=\"true\"\n [label]=\"\"\n [name]=\"'apply'\"\n [size]=\"'tiny'\"\n [title]=\"'Apply' | translate\"\n icon=\"fa fa-check\"></in-button>\n <in-button (click)=\"cancel()\"\n [isIconOnly]=\"true\"\n [label]=\"\"\n [name]=\"'cancel'\"\n [size]=\"'tiny'\"\n [title]=\"'Cancel' | translate\"\n color=\"transparent\"\n icon=\"fa fa-times\"></in-button>\n </div>\n\n</label>\n\n<!--<div *ngIf=\"!disabled\" class=\"button\">-->\n<!-- <in-button (click)=\"changeValue(value)\" [color]=\"'primary'\"-->\n<!-- [disabled]=\"isApplyDisabled()\"-->\n<!-- [isIconOnly]=\"true\"-->\n<!-- [label]=\"\"-->\n<!-- [name]=\"'apply'\"-->\n<!-- [ngStyle]=\"{'font-size':'1px', 'display': 'inline-block', 'line-height': '2px', position: 'relative', left: '70px',-->\n<!-- opacity: !isEditable ? '0' : '1',-->\n<!-- visibility: !isEditable ? 'hidden' : 'visible'-->\n<!-- }\"-->\n<!-- [size]=\"'tiny'\"-->\n<!-- [title]=\"'Apply' | translate\" color=\"transparent\" icon=\"fa fa-check\"></in-button>-->\n<!-- <in-button (click)=\"cancel()\" [isIconOnly]=\"true\" [label]=\"\"-->\n<!-- [name]=\"'cancel'\"-->\n<!-- [ngStyle]=\"{'font-size':'1px', 'display': 'inline-block', 'line-height': '2px', position: 'relative', left: '90px',-->\n<!-- opacity: !isEditable ? '0' : '1',-->\n<!-- visibility: !isEditable ? 'hidden' : 'visible'-->\n<!-- }\"-->\n<!-- [size]=\"'tiny'\"-->\n<!-- [title]=\"'Cancel' | translate\" color=\"transparent\" icon=\"fa fa-times\"></in-button>-->\n<!-- <in-button (click)=\"changeEditMode()\" [isIconOnly]=\"true\" [label]=\"\"-->\n<!-- [ngStyle]=\"{'font-size':'1px',-->\n<!-- 'display': 'inline-block',-->\n<!-- 'line-height': '2px',-->\n<!-- position: 'relative',-->\n<!-- left: '80px',-->\n<!-- top: '2px',-->\n<!-- opacity: isEditable ? '0' : '1',-->\n<!-- visibility: isEditable ? 'hidden' : 'visible'-->\n<!-- }\"-->\n<!-- [size]=\"'tiny'\"-->\n<!-- [title]=\"'Edit' | translate\"-->\n<!-- color=\"transparent\" icon=\"fa fa-pencil\" name=\"edit\"></in-button>-->\n<!--</div>-->\n\n",
3790
- providers: [
3791
- {
3792
- provide: NG_VALUE_ACCESSOR,
3793
- useExisting: forwardRef(function () { return InputGroupComponent_1; }),
3794
- multi: true,
3795
- }
3796
- ],
3797
- styles: [""]
3798
- })
3799
- ], InputGroupComponent);
3800
- return InputGroupComponent;
3801
- }());
3802
-
3803
- var AutoCompleteComponent = /** @class */ (function (_super) {
3804
- __extends(AutoCompleteComponent, _super);
3805
- function AutoCompleteComponent() {
3806
- var _this = _super !== null && _super.apply(this, arguments) || this;
3807
- _this.minLength = 1;
3808
- _this.delay = 300;
3809
- _this.type = 'text';
3810
- _this.autoZIndex = true;
3811
- _this.baseZIndex = 0;
3812
- _this.dropdownIcon = "pi pi-caret-down";
3813
- _this.unique = true;
3814
- _this.completeMethod = new EventEmitter();
3815
- _this.onSelect = new EventEmitter();
3816
- _this.onUnselect = new EventEmitter();
3817
- _this.onFocus = new EventEmitter();
3818
- _this.onBlur = new EventEmitter();
3819
- _this.onDropdownClick = new EventEmitter();
3820
- _this.onClear = new EventEmitter();
3821
- _this.onKeyUp = new EventEmitter();
3822
- _this.scrollHeight = '200px';
3823
- _this.dropdownMode = 'blank';
3824
- _this.immutable = true;
3825
- _this.showTransitionOptions = '225ms ease-out';
3826
- _this.hideTransitionOptions = '195ms ease-in';
3827
- _this.autocomplete = 'off';
3828
- return _this;
3829
- }
3830
- AutoCompleteComponent_1 = AutoCompleteComponent;
3831
- AutoCompleteComponent.prototype.ngAfterContentInit = function () {
3832
- var _this = this;
3833
- this.templates.forEach(function (item) {
3834
- switch (item.getType()) {
3835
- case 'item':
3836
- _this.itemTemplate = item.template;
3837
- break;
3838
- case 'selectedItem':
3839
- _this.selectedItemTemplate = item.template;
3840
- break;
3841
- default:
3842
- _this.itemTemplate = item.template;
3843
- break;
3844
- }
3845
- });
3846
- };
3847
- var AutoCompleteComponent_1;
3848
- __decorate([
3849
- Input(),
3850
- __metadata("design:type", Number)
3851
- ], AutoCompleteComponent.prototype, "minLength", void 0);
3852
- __decorate([
3853
- Input(),
3854
- __metadata("design:type", Number)
3855
- ], AutoCompleteComponent.prototype, "delay", void 0);
3856
- __decorate([
3857
- Input(),
3858
- __metadata("design:type", Object)
3859
- ], AutoCompleteComponent.prototype, "style", void 0);
3860
- __decorate([
3861
- Input(),
3862
- __metadata("design:type", Object)
3863
- ], AutoCompleteComponent.prototype, "panelStyle", void 0);
3864
- __decorate([
3865
- Input(),
3866
- __metadata("design:type", String)
3867
- ], AutoCompleteComponent.prototype, "styleClass", void 0);
3868
- __decorate([
3869
- Input(),
3870
- __metadata("design:type", String)
3871
- ], AutoCompleteComponent.prototype, "panelStyleClass", void 0);
3872
- __decorate([
3873
- Input(),
3874
- __metadata("design:type", Object)
3875
- ], AutoCompleteComponent.prototype, "inputStyle", void 0);
3876
- __decorate([
3877
- Input(),
3878
- __metadata("design:type", String)
3879
- ], AutoCompleteComponent.prototype, "inputId", void 0);
3880
- __decorate([
3881
- Input(),
3882
- __metadata("design:type", String)
3883
- ], AutoCompleteComponent.prototype, "inputStyleClass", void 0);
3884
- __decorate([
3885
- Input(),
3886
- __metadata("design:type", String)
3887
- ], AutoCompleteComponent.prototype, "placeholder", void 0);
3888
- __decorate([
3889
- Input(),
3890
- __metadata("design:type", Boolean)
3891
- ], AutoCompleteComponent.prototype, "readonly", void 0);
3892
- __decorate([
3893
- Input(),
3894
- __metadata("design:type", Boolean)
3895
- ], AutoCompleteComponent.prototype, "disabled", void 0);
3896
- __decorate([
3897
- Input(),
3898
- __metadata("design:type", Number)
3899
- ], AutoCompleteComponent.prototype, "maxlength", void 0);
3900
- __decorate([
3901
- Input(),
3902
- __metadata("design:type", String)
3903
- ], AutoCompleteComponent.prototype, "name", void 0);
3904
- __decorate([
3905
- Input(),
3906
- __metadata("design:type", Boolean)
3907
- ], AutoCompleteComponent.prototype, "required", void 0);
3908
- __decorate([
3909
- Input(),
3910
- __metadata("design:type", Number)
3911
- ], AutoCompleteComponent.prototype, "size", void 0);
3912
- __decorate([
3913
- Input(),
3914
- __metadata("design:type", Object)
3915
- ], AutoCompleteComponent.prototype, "appendTo", void 0);
3916
- __decorate([
3917
- Input(),
3918
- __metadata("design:type", Boolean)
3919
- ], AutoCompleteComponent.prototype, "autoHighlight", void 0);
3920
- __decorate([
3921
- Input(),
3922
- __metadata("design:type", Boolean)
3923
- ], AutoCompleteComponent.prototype, "forceSelection", void 0);
3924
- __decorate([
3925
- Input(),
3926
- __metadata("design:type", String)
3927
- ], AutoCompleteComponent.prototype, "type", void 0);
3928
- __decorate([
3929
- Input(),
3930
- __metadata("design:type", Boolean)
3931
- ], AutoCompleteComponent.prototype, "autoZIndex", void 0);
3932
- __decorate([
3933
- Input(),
3934
- __metadata("design:type", Number)
3935
- ], AutoCompleteComponent.prototype, "baseZIndex", void 0);
3936
- __decorate([
3937
- Input(),
3938
- __metadata("design:type", String)
3939
- ], AutoCompleteComponent.prototype, "ariaLabel", void 0);
3940
- __decorate([
3941
- Input(),
3942
- __metadata("design:type", String)
3943
- ], AutoCompleteComponent.prototype, "ariaLabelledBy", void 0);
3944
- __decorate([
3945
- Input(),
3946
- __metadata("design:type", String)
3947
- ], AutoCompleteComponent.prototype, "dropdownIcon", void 0);
3948
- __decorate([
3949
- Input(),
3950
- __metadata("design:type", Boolean)
3951
- ], AutoCompleteComponent.prototype, "unique", void 0);
3952
- __decorate([
3953
- Output(),
3954
- __metadata("design:type", EventEmitter)
3955
- ], AutoCompleteComponent.prototype, "completeMethod", void 0);
3956
- __decorate([
3957
- Output(),
3958
- __metadata("design:type", EventEmitter)
3959
- ], AutoCompleteComponent.prototype, "onSelect", void 0);
3960
- __decorate([
3961
- Output(),
3962
- __metadata("design:type", EventEmitter)
3963
- ], AutoCompleteComponent.prototype, "onUnselect", void 0);
3964
- __decorate([
3965
- Output(),
3966
- __metadata("design:type", EventEmitter)
3967
- ], AutoCompleteComponent.prototype, "onFocus", void 0);
3968
- __decorate([
3969
- Output(),
3970
- __metadata("design:type", EventEmitter)
3971
- ], AutoCompleteComponent.prototype, "onBlur", void 0);
3972
- __decorate([
3973
- Output(),
3974
- __metadata("design:type", EventEmitter)
3975
- ], AutoCompleteComponent.prototype, "onDropdownClick", void 0);
3976
- __decorate([
3977
- Output(),
3978
- __metadata("design:type", EventEmitter)
3979
- ], AutoCompleteComponent.prototype, "onClear", void 0);
3980
- __decorate([
3981
- Output(),
3982
- __metadata("design:type", EventEmitter)
3983
- ], AutoCompleteComponent.prototype, "onKeyUp", void 0);
3984
- __decorate([
3985
- Input(),
3986
- __metadata("design:type", String)
3987
- ], AutoCompleteComponent.prototype, "field", void 0);
3988
- __decorate([
3989
- Input(),
3990
- __metadata("design:type", String)
3991
- ], AutoCompleteComponent.prototype, "scrollHeight", void 0);
3992
- __decorate([
3993
- Input(),
3994
- __metadata("design:type", Boolean)
3995
- ], AutoCompleteComponent.prototype, "dropdown", void 0);
3996
- __decorate([
3997
- Input(),
3998
- __metadata("design:type", String)
3999
- ], AutoCompleteComponent.prototype, "dropdownMode", void 0);
4000
- __decorate([
4001
- Input(),
4002
- __metadata("design:type", Boolean)
4003
- ], AutoCompleteComponent.prototype, "multiple", void 0);
4004
- __decorate([
4005
- Input(),
4006
- __metadata("design:type", Number)
4007
- ], AutoCompleteComponent.prototype, "tabindex", void 0);
4008
- __decorate([
4009
- Input(),
4010
- __metadata("design:type", String)
4011
- ], AutoCompleteComponent.prototype, "dataKey", void 0);
4012
- __decorate([
4013
- Input(),
4014
- __metadata("design:type", String)
4015
- ], AutoCompleteComponent.prototype, "emptyMessage", void 0);
4016
- __decorate([
4017
- Input(),
4018
- __metadata("design:type", Boolean)
4019
- ], AutoCompleteComponent.prototype, "immutable", void 0);
4020
- __decorate([
4021
- Input(),
4022
- __metadata("design:type", String)
4023
- ], AutoCompleteComponent.prototype, "showTransitionOptions", void 0);
4024
- __decorate([
4025
- Input(),
4026
- __metadata("design:type", String)
4027
- ], AutoCompleteComponent.prototype, "hideTransitionOptions", void 0);
4028
- __decorate([
4029
- Input(),
4030
- __metadata("design:type", Boolean)
4031
- ], AutoCompleteComponent.prototype, "autofocus", void 0);
4032
- __decorate([
4033
- Input(),
4034
- __metadata("design:type", String)
4035
- ], AutoCompleteComponent.prototype, "autocomplete", void 0);
4036
- __decorate([
4037
- ViewChild('in', { static: false }),
4038
- __metadata("design:type", ElementRef)
4039
- ], AutoCompleteComponent.prototype, "inputEL", void 0);
4040
- __decorate([
4041
- ViewChild('multiIn', { static: false }),
4042
- __metadata("design:type", ElementRef)
4043
- ], AutoCompleteComponent.prototype, "multiInputEL", void 0);
4044
- __decorate([
4045
- ViewChild('multiContainer', { static: false }),
4046
- __metadata("design:type", ElementRef)
4047
- ], AutoCompleteComponent.prototype, "multiContainerEL", void 0);
4048
- __decorate([
4049
- ViewChild('ddBtn', { static: false }),
4050
- __metadata("design:type", ElementRef)
4051
- ], AutoCompleteComponent.prototype, "dropdownButton", void 0);
4052
- __decorate([
4053
- ContentChildren(InsparkTemplate),
4054
- __metadata("design:type", QueryList)
4055
- ], AutoCompleteComponent.prototype, "templates", void 0);
4056
- AutoCompleteComponent = AutoCompleteComponent_1 = __decorate([
4057
- Component({
4058
- selector: 'in-autocomplete',
4059
- template: "<span [ngClass]=\"{'ui-autocomplete ui-widget':true,'ui-autocomplete-dd':dropdown,'ui-autocomplete-multiple':multiple}\"\n [ngStyle]=\"style\" [class]=\"styleClass\">\n <input *ngIf=\"!multiple\" #in [attr.type]=\"type\" [attr.id]=\"inputId\" [ngStyle]=\"inputStyle\"\n [class]=\"inputStyleClass\" [autocomplete]=\"autocomplete\" [attr.required]=\"required\" [attr.name]=\"name\"\n [ngClass]=\"'ui-inputtext ui-widget ui-state-default ui-corner-all ui-autocomplete-input'\"\n [value]=\"inputFieldValue\" aria-autocomplete=\"list\" role=\"combobox\"\n [attr.aria-expanded]=\"overlayVisible\" aria-haspopup=\"true\"\n [attr.aria-activedescendant]=\"'p-highlighted-option'\"\n (click)=\"onInputClick($event)\" (input)=\"onInput($event)\" (keydown)=\"onKeydown($event)\"\n (keyup)=\"onKeyup($event)\" [attr.autofocus]=\"autofocus\" (focus)=\"onInputFocus($event)\"\n (blur)=\"onInputBlur($event)\" (change)=\"onInputChange($event)\" (paste)=\"onInputPaste($event)\"\n [attr.placeholder]=\"placeholder\" [attr.size]=\"size\" [attr.maxlength]=\"maxlength\"\n [attr.tabindex]=\"tabindex\" [readonly]=\"readonly\" [disabled]=\"disabled\" [attr.aria-label]=\"ariaLabel\"\n [attr.aria-labelledby]=\"ariaLabelledBy\" [attr.aria-required]=\"required\"\n ><ul *ngIf=\"multiple\" #multiContainer\n class=\"ui-autocomplete-multiple-container ui-widget ui-inputtext ui-state-default ui-corner-all\"\n [ngClass]=\"{'ui-state-disabled':disabled,'ui-state-focus':focus}\" (click)=\"multiIn.focus()\">\n <li #token *ngFor=\"let val of value\" class=\"ui-autocomplete-token ui-state-highlight ui-corner-all\">\n <span class=\"ui-autocomplete-token-icon pi pi-fw pi-times\" (click)=\"removeItem(token)\"\n *ngIf=\"!disabled\"></span>\n <span *ngIf=\"!selectedItemTemplate\"\n class=\"ui-autocomplete-token-label\">{{resolveFieldData(val)}}</span>\n <ng-container *ngTemplateOutlet=\"selectedItemTemplate; context: {$implicit: val}\"></ng-container>\n </li>\n <li class=\"ui-autocomplete-input-token\">\n <input #multiIn [attr.type]=\"type\" [attr.id]=\"inputId\" [disabled]=\"disabled\"\n [attr.placeholder]=\"(value&&value.length ? null : placeholder)\" [attr.tabindex]=\"tabindex\"\n [attr.maxlength]=\"maxlength\" (input)=\"onInput($event)\" (click)=\"onInputClick($event)\"\n (keydown)=\"onKeydown($event)\" [readonly]=\"readonly\" (keyup)=\"onKeyup($event)\"\n [attr.autofocus]=\"autofocus\" (focus)=\"onInputFocus($event)\" (blur)=\"onInputBlur($event)\"\n (change)=\"onInputChange($event)\" (paste)=\"onInputPaste($event)\" [autocomplete]=\"autocomplete\"\n [ngStyle]=\"inputStyle\" [class]=\"inputStyleClass\" [attr.aria-label]=\"ariaLabel\"\n [attr.aria-labelledby]=\"ariaLabelledBy\" [attr.aria-required]=\"required\"\n aria-autocomplete=\"list\" role=\"combobox\" [attr.aria-expanded]=\"overlayVisible\"\n aria-haspopup=\"true\" [attr.aria-activedescendant]=\"'p-highlighted-option'\">\n </li>\n </ul\n ><i *ngIf=\"loading\" class=\"ui-autocomplete-loader pi pi-spinner pi-spin\"></i><button #ddBtn type=\"button\"\n pButton\n [icon]=\"dropdownIcon\"\n class=\"ui-autocomplete-dropdown\"\n [disabled]=\"disabled\"\n (click)=\"handleDropdownClick($event)\"\n *ngIf=\"dropdown\"\n [attr.tabindex]=\"tabindex\"></button>\n <div #panel *ngIf=\"overlayVisible\"\n [ngClass]=\"['ui-autocomplete-panel ui-widget ui-widget-content ui-corner-all ui-shadow']\"\n [style.max-height]=\"scrollHeight\" [ngStyle]=\"panelStyle\" [class]=\"panelStyleClass\"\n [@overlayAnimation]=\"{value: 'visible', params: {showTransitionParams: showTransitionOptions, hideTransitionParams: hideTransitionOptions}}\"\n (@overlayAnimation.start)=\"onOverlayAnimationStart($event)\"\n (@overlayAnimation.done)=\"onOverlayAnimationDone($event)\">\n <ul role=\"listbox\"\n class=\"ui-autocomplete-items ui-autocomplete-list ui-widget-content ui-widget ui-corner-all ui-helper-reset\">\n <li role=\"option\" *ngFor=\"let option of suggestions; let idx = index\"\n [ngClass]=\"{'ui-autocomplete-list-item ui-corner-all':true,'ui-state-highlight':(highlightOption==option)}\"\n (mouseenter)=\"highlightOption=option\" (mouseleave)=\"highlightOption=null\"\n [id]=\"highlightOption == option ? 'p-highlighted-option':''\" (click)=\"selectItem(option)\">\n <span *ngIf=\"!itemTemplate\">{{resolveFieldData(option)}}</span>\n <ng-container\n *ngTemplateOutlet=\"itemTemplate; context: {$implicit: option, index: idx}\"></ng-container>\n </li>\n <li *ngIf=\"noResults && emptyMessage\"\n class=\"ui-autocomplete-emptymessage ui-autocomplete-list-item ui-corner-all\">{{emptyMessage}}</li>\n </ul>\n </div>\n </span>\n",
4060
- animations: [
4061
- trigger('overlayAnimation', [
4062
- state('void', style({
4063
- transform: 'translateY(5%)',
4064
- opacity: 0
4065
- })),
4066
- state('visible', style({
4067
- transform: 'translateY(0)',
4068
- opacity: 1
4069
- })),
4070
- transition('void => visible', animate('{{showTransitionParams}}')),
4071
- transition('visible => void', animate('{{hideTransitionParams}}'))
4072
- ])
4073
- ],
4074
- providers: [{
4075
- provide: NG_VALUE_ACCESSOR,
4076
- useExisting: forwardRef(function () { return AutoCompleteComponent_1; }),
4077
- multi: true
4078
- }],
4079
- styles: [""]
4080
- })
4081
- ], AutoCompleteComponent);
4082
- return AutoCompleteComponent;
4083
- }(AutoComplete));
4084
- var AutoCompleteComponentModule = /** @class */ (function () {
4085
- function AutoCompleteComponentModule() {
4086
- }
4087
- AutoCompleteComponentModule = __decorate([
4088
- NgModule({
4089
- declarations: [
4090
- AutoCompleteComponent,
4091
- ],
4092
- imports: [
4093
- TooltipModule,
4094
- ScrollingModule,
4095
- CommonModule,
4096
- PrimengComponentsModule,
4097
- ButtonModule,
4098
- ],
4099
- exports: [
4100
- AutoCompleteComponent,
4101
- ],
4102
- entryComponents: [
4103
- AutoCompleteComponent,
4104
- ]
4105
- })
4106
- ], AutoCompleteComponentModule);
4107
- return AutoCompleteComponentModule;
4108
- }());
4109
-
4110
- var PieService = /** @class */ (function () {
4111
- function PieService() {
4112
- this.colorArray = ['-1', 0, 1, 2, 3, 4]; // Цвета и последовательность в которой они будут отображены
4113
- this.colors = {
4114
- 1: '#31ac51',
4115
- 2: '#EE9946',
4116
- 3: '#F95C5D',
4117
- 4: '#a20000',
4118
- 0: '#7E8087',
4119
- '-1': '#85B3CB'
4120
- };
4121
- }
4122
- PieService.prototype.create = function (statuses, size) {
4123
- var _this = this;
4124
- var data = [];
4125
- var allCount = 0;
4126
- this.colorArray.forEach(function (color) {
4127
- allCount += statuses[color] || 0;
4128
- });
4129
- var cumulativePercent = 0;
4130
- this.colorArray.forEach(function (color) {
4131
- var count = statuses[color];
4132
- if (!count) {
4133
- return;
4134
- }
4135
- var percent = count / allCount;
4136
- var _a = __read(_this.getCoordinatesForPercent(size, cumulativePercent), 2), startX = _a[0], startY = _a[1];
4137
- cumulativePercent += percent;
4138
- var _b = __read(_this.getCoordinatesForPercent(size, cumulativePercent), 2), endX = _b[0], endY = _b[1];
4139
- var largeArcFlag = percent > .5 ? 1 : 0;
4140
- var pathData = [
4141
- "M " + startX + " " + startY,
4142
- "A 20 20 0 " + largeArcFlag + " 1 " + endX + " " + endY,
4143
- "L 0 0",
4144
- ].join(' ');
4145
- data.push({
4146
- path: pathData,
4147
- color: _this.colors[color + '']
4148
- });
4149
- });
4150
- return data;
4151
- };
4152
- PieService.prototype.getCoordinatesForPercent = function (size, percent) {
4153
- var x = size / 2 * Math.cos(2 * Math.PI * percent);
4154
- var y = size / 2 * Math.sin(2 * Math.PI * percent);
4155
- return [x, y];
4156
- };
4157
- PieService = __decorate([
4158
- Injectable()
4159
- ], PieService);
4160
- return PieService;
4161
- }());
4162
-
4163
- var ObjectPieComponent = /** @class */ (function () {
4164
- function ObjectPieComponent(translate, pieService, cdr) {
4165
- this.translate = translate;
4166
- this.pieService = pieService;
4167
- this.cdr = cdr;
4168
- this.count = 30;
4169
- this.size = 40;
4170
- this.statuses = {
4171
- '-1': 20,
4172
- 0: 4,
4173
- 1: 3,
4174
- 2: 4,
4175
- 3: 5
4176
- };
4177
- }
4178
- ObjectPieComponent.prototype.ngOnInit = function () {
4179
- this.data = this.pieService.create(this.statuses, this.size);
4180
- };
4181
- ObjectPieComponent.prototype.ngOnDestroy = function () {
4182
- };
4183
- ObjectPieComponent.prototype.ngOnChanges = function (changes) {
4184
- };
4185
- ObjectPieComponent.ctorParameters = function () { return [
4186
- { type: TranslateService },
4187
- { type: PieService },
4188
- { type: ChangeDetectorRef }
4189
- ]; };
4190
- __decorate([
4191
- Input(),
4192
- __metadata("design:type", Object)
4193
- ], ObjectPieComponent.prototype, "count", void 0);
4194
- __decorate([
4195
- Input(),
4196
- __metadata("design:type", Object)
4197
- ], ObjectPieComponent.prototype, "size", void 0);
4198
- __decorate([
4199
- Input(),
4200
- __metadata("design:type", Object)
4201
- ], ObjectPieComponent.prototype, "statuses", void 0);
4202
- ObjectPieComponent = __decorate([
4203
- Component({
4204
- selector: 'in-pie',
4205
- template: "<div class=\"pie-block\">\n <svg viewBox=\"-20 -20 40 40\">\n <defs>\n <clipPath id=\"cut-off-bottom\">\n <circle cx=\"0\" cy=\"0\" r=\"12\"></circle>\n </clipPath>\n </defs>\n <mask id=\"re8-clip\">\n <circle cx=\"0\" cy=\"0\" r=\"20\" fill=\"white\"></circle>\n <circle cx=\"0\" cy=\"0\" r=\"14\" fill=\"black\"></circle>\n </mask>\n <path *ngFor=\"let path of data\" [attr.d]=\"path.path\" [attr.fill]=\"path.color\" mask=\"url(#re8-clip)\"></path>\n <text x=\"0\" y=\"4\" text-anchor=\"middle\" fill=\"currentColor\">{{count}}</text>\n </svg>\n</div>\n\n\n",
4206
- encapsulation: ViewEncapsulation.Emulated,
4207
- providers: [],
4208
- changeDetection: ChangeDetectionStrategy.OnPush,
4209
- styles: [".pie-block{width:40px;height:40px;color:var(--text-color)}.pie-block text{width:20px;height:20px;background:var(--colorBgLevel2);font-size:11px}.pie-block svg{width:40px;height:40px}"]
4210
- }),
4211
- __metadata("design:paramtypes", [TranslateService,
4212
- PieService,
4213
- ChangeDetectorRef])
4214
- ], ObjectPieComponent);
4215
- return ObjectPieComponent;
4216
- }());
4217
-
4218
- var InsparkComponentsModule = /** @class */ (function () {
4219
- function InsparkComponentsModule() {
4220
- }
4221
- InsparkComponentsModule = __decorate([
4222
- NgModule({
4223
- imports: [
4224
- AutoCompleteComponentModule,
4225
- FormsModule,
4226
- ReactiveFormsModule,
4227
- CommonModule,
4228
- DropdownComponentModule,
4229
- TableComponentModule,
4230
- TreeTableComponentModule,
4231
- RadioButtonModule,
4232
- TranslateModule,
4233
- MenuModule,
4234
- SliderModule,
4235
- NgbModule,
4236
- InlineSVGModule.forRoot({ baseUrl: 'assets/images/' }),
4237
- BreadcrumbModule,
4238
- TreeModule,
4239
- SharedModule
4240
- ],
4241
- declarations: [
4242
- ButtonComponent,
4243
- InputTextComponent,
4244
- TextareaComponent,
4245
- PanelComponent,
4246
- ComponentContainerComponent,
4247
- CheckboxComponent,
4248
- EmptyComponent,
4249
- PreloaderComponent,
4250
- InsparkStickyComponent,
4251
- InsparkHeaderComponent,
4252
- ToolbarComponent,
4253
- BreadcrumbComponent,
4254
- FileComponent,
4255
- SelectButtonComponent,
4256
- ModalInputTextComponent,
4257
- SelectListComponent,
4258
- StatusCircleComponent,
4259
- SvgComponent,
4260
- SwitcherComponent,
4261
- InlineMessageComponent,
4262
- LinkComponent,
4263
- InsparkTemplate,
4264
- TooltipComponent,
4265
- RadiobuttonComponent,
4266
- ObjectTreeComponent,
4267
- ContentToggleComponent,
4268
- InputGroupComponent,
4269
- ObjectPieComponent,
4270
- ],
4271
- exports: [
4272
- ButtonComponent,
4273
- InputTextComponent,
4274
- TextareaComponent,
4275
- PanelComponent,
4276
- ComponentContainerComponent,
4277
- CheckboxComponent,
4278
- DropdownComponentModule,
4279
- TableComponentModule,
4280
- TreeTableComponentModule,
4281
- EmptyComponent,
4282
- PreloaderComponent,
4283
- InsparkStickyComponent,
4284
- InsparkHeaderComponent,
4285
- ToolbarComponent,
4286
- BreadcrumbComponent,
4287
- FileComponent,
4288
- SelectButtonComponent,
4289
- ModalInputTextComponent,
4290
- SelectListComponent,
4291
- StatusCircleComponent,
4292
- SvgComponent,
4293
- SwitcherComponent,
4294
- MenuModule,
4295
- SliderModule,
4296
- InlineMessageComponent,
4297
- LinkComponent,
4298
- InsparkTemplate,
4299
- NgbModule,
4300
- TooltipComponent,
4301
- RadiobuttonComponent,
4302
- ObjectTreeComponent,
4303
- ContentToggleComponent,
4304
- ObjectPieComponent,
4305
- InputGroupComponent,
4306
- AutoCompleteComponentModule
4307
- ],
4308
- entryComponents: [SelectListComponent, ModalInputTextComponent],
4309
- schemas: [NO_ERRORS_SCHEMA]
4310
- })
4311
- ], InsparkComponentsModule);
4312
- return InsparkComponentsModule;
4313
- }());
4314
-
4315
- /*
4316
- * Public API Surface of inspark-components
4317
- */
4318
-
4319
- /**
4320
- * Generated bundle index. Do not edit.
4321
- */
4322
-
4323
- export { AutoCompleteComponentModule, BreadcrumbComponent, ButtonComponent, CheckboxComponent, CommunicationService, ComponentContainerComponent, ContentToggleComponent, DropdownComponentModule, EmptyComponent, FileComponent, InlineMessageComponent, InputTextComponent, InsparkComponentsModule, InsparkDialogService, InsparkHeaderComponent, InsparkMessageService, InsparkStickyComponent, InsparkTemplate, LinkComponent, ModalInputTextComponent, ObjectTreeComponent, PanelComponent, PipesModule, PreloaderComponent, RadiobuttonComponent, SelectButtonComponent, SelectListComponent, StatusCircleComponent, SvgComponent, SwitcherComponent, TableComponentModule, TextareaComponent, ToolbarComponent, TooltipComponent, TreeTableComponentModule, DropdownItem as ɵa, DropdownComponent as ɵb, tableFactory as ɵc, TableComponent as ɵd, TreeTableComponent as ɵe, AutoCompleteComponent as ɵf, PropertyValuePipe as ɵg, ShortToFullWeekdayPipe as ɵh, NumToShortWeekdayPipe as ɵi, FormatNumToTime as ɵj, InDate as ɵk, SafeUrlPipe as ɵl, SortByPipe as ɵm, PrimengComponentsModule as ɵn, TableColumnsMultiselectComponent as ɵo, TableMenuOverlayComponent as ɵp, TableClickOutsideDirective as ɵq, InputGroupComponent as ɵr, ObjectPieComponent as ɵs, PieService as ɵt };
4324
- //# sourceMappingURL=inspark-inspark-components.js.map